@wp-playground/client 0.9.45 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.cjs +141 -122
  2. package/index.d.ts +20 -1
  3. package/index.js +10827 -5957
  4. package/package.json +10 -8
package/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Kr=function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(Kr==="NODE"){let r=function(o){return new Promise(function(a,l){o.onload=o.onerror=function(i){o.onload=o.onerror=null,i.type==="load"?a(o.result):l(new Error("Failed to read the blob/file"))}})},t=function(){const o=new Uint8Array([1,2,3,4]),l=new File([o],"test").stream();try{return l.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class o extends Blob{constructor(l,i,e){super(l);let f;e!=null&&e.lastModified&&(f=new Date),(!f||isNaN(f.getFullYear()))&&(f=new Date),this.lastModifiedDate=f,this.lastModified=f.getMilliseconds(),this.name=i||""}}global.File=o}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const a=new FileReader;return a.readAsArrayBuffer(this),r(a)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const a=new FileReader;return a.readAsText(this),r(a)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let o=0;const a=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(l){const i=l.byobRequest.view,f=await a.slice(o,o+i.byteLength).arrayBuffer(),h=new Uint8Array(f);new Uint8Array(i.buffer).set(h);const b=h.byteLength;l.byobRequest.respond(b),o+=b,o>=a.size&&l.close()}})})}if(Kr==="NODE"&&typeof CustomEvent>"u"){class r extends Event{constructor(o,a={}){super(o,a),this.detail=a.detail}initCustomEvent(){}}globalThis.CustomEvent=r}const Ar=["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"],Xr=Symbol("SleepFinished");function zt(r){return new Promise(t=>{setTimeout(()=>t(Xr),r)})}class Vt extends Error{constructor(){super("Acquiring lock timed out")}}class Ht{constructor({concurrency:t,timeout:o}){this._running=0,this.concurrency=t,this.timeout=o,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(o=>{this.queue.push(o)});this.timeout!==void 0?await Promise.race([t,zt(this.timeout)]).then(o=>{if(o===Xr)throw new Vt}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const o=await this.acquire();try{return await t()}finally{o()}}}function ie(...r){function t(i){return i.substring(i.length-1)==="/"}let o=r.join("/");const a=o[0]==="/",l=t(o);return o=rt(o),!o&&!a&&(o="."),o&&l&&!t(o)&&(o+="/"),o}function et(r){if(r==="/")return"/";r=rt(r);const t=r.lastIndexOf("/");return t===-1?"":t===0?"/":r.substr(0,t)}function rt(r){const t=r[0]==="/";return r=Gt(r.split("/").filter(o=>!!o),!t).join("/"),(t?"/":"")+r.replace(/\/$/,"")}function Gt(r,t){let o=0;for(let a=r.length-1;a>=0;a--){const l=r[a];l==="."?r.splice(a,1):l===".."?(r.splice(a,1),o++):o&&(r.splice(a,1),o--)}if(t)for(;o;o--)r.unshift("..");return r}function tt(r=36,t="!@#$%^&*()_+=-[]/.,<>?"){const o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let a="";for(let l=r;l>0;--l)a+=o[Math.floor(Math.random()*o.length)];return a}function Yt(){return tt(36,"-_")}function se(r){return`json_decode(base64_decode('${Zt(JSON.stringify(r))}'), true)`}function We(r){const t={};for(const o in r)t[o]=se(r[o]);return t}function Zt(r){return Qt(new TextEncoder().encode(r))}function Qt(r){const t=String.fromCodePoint(...r);return btoa(t)}const Jt="playground-log",Dr=(r,...t)=>{ae.dispatchEvent(new CustomEvent(Jt,{detail:{log:r,args:t}}))},Kt=(r,...t)=>{switch(typeof r.message=="string"?Reflect.set(r,"message",$r(r.message)):r.message.message&&typeof r.message.message=="string"&&Reflect.set(r.message,"message",$r(r.message.message)),r.severity){case"Debug":console.debug(r.message,...t);break;case"Info":console.info(r.message,...t);break;case"Warn":console.warn(r.message,...t);break;case"Error":console.error(r.message,...t);break;case"Fatal":console.error(r.message,...t);break;default:console.log(r.message,...t)}},Xt=r=>r instanceof Error?[r.message,r.stack].join(`
2
- `):JSON.stringify(r,null,2),st=[],Mr=r=>{st.push(r)},Er=r=>{if(r.raw===!0)Mr(r.message);else{const t=is(typeof r.message=="object"?Xt(r.message):r.message,r.severity??"Info",r.prefix??"JavaScript");Mr(t)}};let wr=0;const Br="/wordpress/wp-content/debug.log",es=async r=>await r.fileExists(Br)?await r.readFileAsText(Br):"",rs=(r,t)=>{t.addEventListener("request.end",async()=>{const o=await es(t);if(o.length>wr){const a=o.substring(wr);r.logMessage({message:a,raw:!0}),wr=o.length}}),t.addEventListener("request.error",o=>{o=o,o.error&&(r.logMessage({message:`${o.error.message} ${o.error.stack}`,severity:"Fatal",prefix:o.source==="request"?"PHP":"WASM Crash"}),r.dispatchEvent(new CustomEvent(r.fatalErrorEvent,{detail:{logs:r.getLogs(),source:o.source}})))})};class ts extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Er)?[...st]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Bn=function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(Bn==="NODE"){let e=function(s){return new Promise(function(n,o){s.onload=s.onerror=function(i){s.onload=s.onerror=null,i.type==="load"?n(s.result):o(new Error("Failed to read the blob/file"))}})},r=function(){const s=new Uint8Array([1,2,3,4]),o=new File([s],"test").stream();try{return o.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class s extends Blob{constructor(o,i,t){super(o);let p;t!=null&&t.lastModified&&(p=new Date),(!p||isNaN(p.getFullYear()))&&(p=new Date),this.lastModifiedDate=p,this.lastModified=p.getMilliseconds(),this.name=i||""}}global.File=s}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const n=new FileReader;return n.readAsArrayBuffer(this),e(n)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const n=new FileReader;return n.readAsText(this),e(n)}),(typeof Blob.prototype.stream>"u"||!r())&&(Blob.prototype.stream=function(){let s=0;const n=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(o){const i=o.byobRequest.view,p=await n.slice(s,s+i.byteLength).arrayBuffer(),y=new Uint8Array(p);new Uint8Array(i.buffer).set(y);const u=y.byteLength;o.byobRequest.respond(u),s+=u,s>=n.size&&o.close()}})})}if(Bn==="NODE"&&typeof CustomEvent>"u"){class e extends Event{constructor(s,n={}){super(s,n),this.detail=n.detail}initCustomEvent(){}}globalThis.CustomEvent=e}const ii=["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"],In=Symbol("SleepFinished");function Ao(e){return new Promise(r=>{setTimeout(()=>r(In),e)})}class So extends Error{constructor(){super("Acquiring lock timed out")}}class Ro{constructor({concurrency:r,timeout:s}){this._running=0,this.concurrency=r,this.timeout=s,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const r=new Promise(s=>{this.queue.push(s)});this.timeout!==void 0?await Promise.race([r,Ao(this.timeout)]).then(s=>{if(s===In)throw new So}):await r}else{this._running++;let r=!1;return()=>{r||(r=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(r){const s=await this.acquire();try{return await r()}finally{s()}}}function ge(...e){function r(i){return i.substring(i.length-1)==="/"}let s=e.join("/");const n=s[0]==="/",o=r(s);return s=ni(s),!s&&!n&&(s="."),s&&o&&!r(s)&&(s+="/"),s}function gt(e){if(e==="/")return"/";e=ni(e);const r=e.lastIndexOf("/");return r===-1?"":r===0?"/":e.substr(0,r)}function ni(e){const r=e[0]==="/";return e=Fo(e.split("/").filter(s=>!!s),!r).join("/"),(r?"/":"")+e.replace(/\/$/,"")}function Fo(e,r){let s=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o==="."?e.splice(n,1):o===".."?(e.splice(n,1),s++):s&&(e.splice(n,1),s--)}if(r)for(;s;s--)e.unshift("..");return e}function jn(e=36,r="!@#$%^&*()_+=-[]/.,<>?"){const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+r;let n="";for(let o=e;o>0;--o)n+=s[Math.floor(Math.random()*s.length)];return n}function Bo(){return jn(36,"-_")}function Fe(e){return`json_decode(base64_decode('${Io(JSON.stringify(e))}'), true)`}function xt(e){const r={};for(const s in e)r[s]=Fe(e[s]);return r}function Io(e){return jo(new TextEncoder().encode(e))}function jo(e){const r=String.fromCodePoint(...e);return btoa(r)}const Lo="playground-log",$i=(e,...r)=>{Se.dispatchEvent(new CustomEvent(Lo,{detail:{log:e,args:r}}))},No=(e,...r)=>{switch(typeof e.message=="string"?Reflect.set(e,"message",Ws(e.message)):e.message.message&&typeof e.message.message=="string"&&Reflect.set(e.message,"message",Ws(e.message.message)),e.severity){case"Debug":console.debug(e.message,...r);break;case"Info":console.info(e.message,...r);break;case"Warn":console.warn(e.message,...r);break;case"Error":console.error(e.message,...r);break;case"Fatal":console.error(e.message,...r);break;default:console.log(e.message,...r)}},Co=e=>e instanceof Error?[e.message,e.stack].join(`
2
+ `):JSON.stringify(e,null,2),Ln=[],Ai=e=>{Ln.push(e)},Ms=e=>{if(e.raw===!0)Ai(e.message);else{const r=Mo(typeof e.message=="object"?Co(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");Ai(r)}};let bs=0;const Si="/wordpress/wp-content/debug.log",Do=async e=>await e.fileExists(Si)?await e.readFileAsText(Si):"",qo=(e,r)=>{r.addEventListener("request.end",async()=>{const s=await Do(r);if(s.length>bs){const n=s.substring(bs);e.logMessage({message:n,raw:!0}),bs=s.length}}),r.addEventListener("request.error",s=>{s=s,s.error&&(e.logMessage({message:`${s.error.message} ${s.error.stack}`,severity:"Fatal",prefix:s.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:s.source}})))})};class Uo extends EventTarget{constructor(r=[]){super(),this.handlers=r,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Ms)?[...Ln]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
3
3
  If you're using a custom logger instance, make sure to register logToMemory handler.
4
- `),[])}logMessage(t,...o){for(const a of this.handlers)a(t,...o)}log(t,...o){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...o)}debug(t,...o){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...o)}info(t,...o){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...o)}warn(t,...o){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...o)}error(t,...o){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...o)}}const ss=()=>{try{if(process.env.NODE_ENV==="test")return[Er,Dr]}catch{}return[Er,Kt,Dr]},ae=new ts(ss()),$r=r=>r.replace(/\t/g,""),is=(r,t,o)=>{const a=new Date,l=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(a).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(a),e=l+" "+i;return r=$r(r),`[${e}] ${o} ${t}: ${r}`},dr=async(r,{pluginPath:t,pluginName:o},a)=>{a==null||a.tracker.setCaption(`Activating ${o||t}`);const l=await r.documentRoot,i=await r.run({code:`<?php
4
+ `),[])}logMessage(r,...s){for(const n of this.handlers)n(r,...s)}log(r,...s){this.logMessage({message:r,severity:void 0,prefix:"JavaScript",raw:!1},...s)}debug(r,...s){this.logMessage({message:r,severity:"Debug",prefix:"JavaScript",raw:!1},...s)}info(r,...s){this.logMessage({message:r,severity:"Info",prefix:"JavaScript",raw:!1},...s)}warn(r,...s){this.logMessage({message:r,severity:"Warn",prefix:"JavaScript",raw:!1},...s)}error(r,...s){this.logMessage({message:r,severity:"Error",prefix:"JavaScript",raw:!1},...s)}}const zo=()=>{try{if(process.env.NODE_ENV==="test")return[Ms,$i]}catch{}return[Ms,No,$i]},Se=new Uo(zo()),Ws=e=>e.replace(/\t/g,""),Mo=(e,r,s)=>{const n=new Date,o=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(n).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(n),t=o+" "+i;return e=Ws(e),`[${t}] ${s} ${r}: ${e}`},ai=async(e,{pluginPath:r,pluginName:s},n)=>{n==null||n.tracker.setCaption(`Activating ${s||r}`);const o=await e.documentRoot,i=await e.run({code:`<?php
5
5
  define( 'WP_ADMIN', true );
6
- require_once( ${se(l)}. "/wp-load.php" );
7
- require_once( ${se(l)}. "/wp-admin/includes/plugin.php" );
6
+ require_once( ${Fe(o)}. "/wp-load.php" );
7
+ require_once( ${Fe(o)}. "/wp-admin/includes/plugin.php" );
8
8
 
9
9
  // Set current user to admin
10
10
  wp_set_current_user( get_users(array('role' => 'Administrator') )[0]->ID );
11
11
 
12
- $plugin_path = ${se(t)};
12
+ $plugin_path = ${Fe(r)};
13
13
  $response = false;
14
14
  if (!is_dir($plugin_path)) {
15
15
  $response = activate_plugin($plugin_path);
@@ -33,13 +33,13 @@
33
33
  }
34
34
 
35
35
  throw new Exception( 'Unable to activate plugin' );
36
- `});if(i.text!=="Plugin activated successfully")throw ae.debug(i),new Error(`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},qr=async(r,{themeFolderName:t},o)=>{o==null||o.tracker.setCaption(`Activating ${t}`);const a=await r.documentRoot,l=`${a}/wp-content/themes/${t}`;if(!await r.fileExists(l))throw new Error(`
37
- Couldn't activate theme ${t}.
38
- Theme not found at the provided theme path: ${l}.
36
+ `});if(i.text!=="Plugin activated successfully")throw Se.debug(i),new Error(`Plugin ${r} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},oi=async(e,{themeFolderName:r},s)=>{s==null||s.tracker.setCaption(`Activating ${r}`);const n=await e.documentRoot,o=`${n}/wp-content/themes/${r}`;if(!await e.fileExists(o))throw new Error(`
37
+ Couldn't activate theme ${r}.
38
+ Theme not found at the provided theme path: ${o}.
39
39
  Check the theme path to ensure it's correct.
40
40
  If the theme is not installed, you can install it using the installTheme step.
41
41
  More info can be found in the Blueprint documentation: https://wordpress.github.io/wordpress-playground/blueprints/steps/#ActivateThemeStep
42
- `);const i=await r.run({code:`<?php
42
+ `);const i=await e.run({code:`<?php
43
43
  define( 'WP_ADMIN', true );
44
44
  require_once( getenv('docroot') . "/wp-load.php" );
45
45
 
@@ -52,7 +52,7 @@
52
52
  throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
53
53
  }
54
54
  die('Theme activated successfully');
55
- `,env:{docroot:a,themeFolderName:t}});if(i.text!=="Theme activated successfully")throw ae.debug(i),new Error(`Theme ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},it=async(r,{code:t})=>await r.run({code:t}),ot=async(r,{options:t})=>await r.run(t),Rr=async(r,{path:t})=>{await r.unlink(t)},nt=async(r,{sql:t},o)=>{o==null||o.tracker.setCaption("Executing SQL Queries");const a=`/tmp/${Yt()}.sql`;await r.writeFile(a,new Uint8Array(await t.arrayBuffer()));const l=await r.documentRoot,i=We({docroot:l,sqlFilename:a}),e=await r.run({code:`<?php
55
+ `,env:{docroot:n,themeFolderName:r}});if(i.text!=="Theme activated successfully")throw Se.debug(i),new Error(`Theme ${r} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},Nn=async(e,{code:r})=>await e.run({code:r}),Cn=async(e,{options:r})=>await e.run(r),pi=async(e,{path:r})=>{await e.unlink(r)},Dn=async(e,{sql:r},s)=>{s==null||s.tracker.setCaption("Executing SQL Queries");const n=`/tmp/${Bo()}.sql`;await e.writeFile(n,new Uint8Array(await r.arrayBuffer()));const o=await e.documentRoot,i=xt({docroot:o,sqlFilename:n}),t=await e.run({code:`<?php
56
56
  require_once ${i.docroot} . '/wp-load.php';
57
57
 
58
58
  $handle = fopen(${i.sqlFilename}, 'r');
@@ -71,7 +71,7 @@
71
71
  $wpdb->query($buffer);
72
72
  $buffer = '';
73
73
  }
74
- `});return await Rr(r,{path:a}),e},or=async(r,{request:t})=>{ae.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const o=await r.request(t);if(o.httpStatusCode>399||o.httpStatusCode<200)throw ae.warn("WordPress response was",{response:o}),new Error(`Request failed with status ${o.httpStatusCode}`);return o},os=`<?php
74
+ `});return await pi(e,{path:n}),t},qn=async(e,{request:r})=>{Se.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const s=await e.request(r);if(s.httpStatusCode>399||s.httpStatusCode<200)throw Se.warn("WordPress response was",{response:s}),new Error(`Request failed with status ${s.httpStatusCode}`);return s},Wo=`<?php
75
75
 
76
76
  /**
77
77
  * Rewrites the wp-config.php file to ensure specific constants are defined
@@ -402,69 +402,57 @@ function skip_whitespace($tokens) {
402
402
  }
403
403
  return $output;
404
404
  }
405
- `,Ie=async(r,{consts:t,method:o="define-before-run"})=>{switch(o){case"define-before-run":await ns(r,t);break;case"rewrite-wp-config":{const a=await r.documentRoot,l=ie(a,"/wp-config.php"),i=await r.readFileAsText(l),e=await as(r,i,t);await r.writeFile(l,e);break}default:throw new Error(`Invalid method: ${o}`)}};async function ns(r,t){for(const o in t)await r.defineConstant(o,t[o])}async function as(r,t,o){await r.writeFile("/tmp/code.php",t);const a=We({consts:o});return await r.run({code:`${os}
405
+ `,ns=async(e,{consts:r,method:s="define-before-run"})=>{switch(s){case"define-before-run":await Ho(e,r);break;case"rewrite-wp-config":{const n=await e.documentRoot,o=ge(n,"/wp-config.php"),i=await e.readFileAsText(o),t=await Zo(e,i,r);await e.writeFile(o,t);break}default:throw new Error(`Invalid method: ${s}`)}};async function Ho(e,r){for(const s in r)await e.defineConstant(s,r[s])}async function Zo(e,r,s){await e.writeFile("/tmp/code.php",r);const n=xt({consts:s});return await e.run({code:`${Wo}
406
406
  $wp_config_path = '/tmp/code.php';
407
407
  $wp_config = file_get_contents($wp_config_path);
408
- $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${a.consts});
408
+ $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${n.consts});
409
409
  file_put_contents($wp_config_path, $new_wp_config);
410
- `}),await r.readFileAsText("/tmp/code.php")}const nr=async(r,{username:t="admin",password:o="password"}={},a)=>{var i,e,f;a==null||a.tracker.setCaption((a==null?void 0:a.initialCaption)||"Logging in"),await r.request({url:"/wp-login.php"});const l=await r.request({url:"/wp-login.php",method:"POST",body:{log:t,pwd:o,rememberme:"forever"}});if(!((f=(e=(i=l.headers)==null?void 0:i.location)==null?void 0:e[0])!=null&&f.includes("/wp-admin/")))throw ae.warn("WordPress response was",{response:l,text:l.text}),new Error(`Failed to log in as ${t} with password ${o}`)},Lr=async(r,{options:t})=>{const o=await r.documentRoot;await r.run({code:`<?php
411
- include ${se(o)} . '/wp-load.php';
412
- $site_options = ${se(t)};
410
+ `}),await e.readFileAsText("/tmp/code.php")}const fi=async(e,{options:r})=>{const s=await e.documentRoot;await e.run({code:`<?php
411
+ include ${Fe(s)} . '/wp-load.php';
412
+ $site_options = ${Fe(r)};
413
413
  foreach($site_options as $name => $value) {
414
414
  update_option($name, $value);
415
415
  }
416
416
  echo "Success";
417
- `})},at=async(r,{meta:t,userId:o})=>{const a=await r.documentRoot;await r.run({code:`<?php
418
- include ${se(a)} . '/wp-load.php';
419
- $meta = ${se(t)};
417
+ `})},Un=async(e,{meta:r,userId:s})=>{const n=await e.documentRoot;await e.run({code:`<?php
418
+ include ${Fe(n)} . '/wp-load.php';
419
+ $meta = ${Fe(r)};
420
420
  foreach($meta as $name => $value) {
421
- update_user_meta(${se(o)}, $name, $value);
421
+ update_user_meta(${Fe(s)}, $name, $value);
422
422
  }
423
- `})};function pt(r){return r.pathname.startsWith("/scope:")}function ps(r){return pt(r)?r.pathname.split("/")[1].split(":")[1]:null}const lt=async r=>{var w;await Ie(r,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await r.absoluteUrl);if(t.port!==""){let S=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.hostname==="localhost"&&(S+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(S)}const o=t.pathname.replace(/\/$/,"")+"/",a=`${t.protocol}//${t.hostname}${o}`;await Lr(r,{options:{siteurl:a,home:a}}),await nr(r,{});const l=await r.documentRoot,e=(await r.run({code:`<?php
424
- define( 'WP_ADMIN', true );
425
- require_once(${se(l)} . "/wp-load.php");
426
-
427
- // Set current user to admin
428
- ( get_users(array('role' => 'Administrator') )[0] );
429
-
430
- require_once(${se(l)} . "/wp-admin/includes/plugin.php");
431
- $plugins_root = ${se(l)} . "/wp-content/plugins";
432
- $plugins = glob($plugins_root . "/*");
433
-
434
- $deactivated_plugins = [];
435
- foreach($plugins as $plugin_path) {
436
- if (str_ends_with($plugin_path, '/index.php')) {
437
- continue;
438
- }
439
- if (!is_dir($plugin_path)) {
440
- $deactivated_plugins[] = substr($plugin_path, strlen($plugins_root) + 1);
441
- deactivate_plugins($plugin_path);
442
- continue;
443
- }
444
- // Find plugin entry file
445
- foreach ( ( glob( $plugin_path . '/*.php' ) ?: array() ) as $file ) {
446
- $info = get_plugin_data( $file, false, false );
447
- if ( ! empty( $info['Name'] ) ) {
448
- deactivate_plugins( $file );
449
- $deactivated_plugins[] = substr($file, strlen($plugins_root) + 1);
450
- break;
451
- }
452
- }
453
- }
454
- echo json_encode($deactivated_plugins);
455
- `})).json,h=(w=(await or(r,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:w[1],b=await or(r,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:ls({_wpnonce:h,_wp_http_referer:o+"wp-admin/network.php",sitename:"My WordPress Website Sites",email:"admin@localhost.com",submit:"Install"})}});if(b.httpStatusCode!==200)throw ae.warn("WordPress response was",{response:b,text:b.text,headers:b.headers}),new Error(`Failed to enable multisite. Response code was ${b.httpStatusCode}`);await Ie(r,{consts:{MULTISITE:!0,SUBDOMAIN_INSTALL:!1,SITE_ID_CURRENT_SITE:1,BLOG_ID_CURRENT_SITE:1,DOMAIN_CURRENT_SITE:t.hostname,PATH_CURRENT_SITE:o}});const k=new URL(await r.absoluteUrl),m=pt(k)?"scope:"+ps(k):null;await r.writeFile("/internal/shared/preload/sunrise.php",`<?php
456
- $_SERVER['HTTP_HOST'] = ${se(k.hostname)};
457
- $folder = ${se(m)};
458
- if ($folder && strpos($_SERVER['REQUEST_URI'],"/$folder") === false) {
459
- $_SERVER['REQUEST_URI'] = "/$folder/" . ltrim($_SERVER['REQUEST_URI'], '/');
460
- }
461
- `),await r.writeFile("/internal/shared/mu-plugins/sunrise.php",`<?php
462
- if ( !defined( 'BLOG_ID_CURRENT_SITE' ) ) {
463
- define( 'BLOG_ID_CURRENT_SITE', 1 );
464
- }
465
- `),await nr(r,{});for(const S of e)try{await dr(r,{pluginPath:S})}catch(I){ae.error("Error activating plugin",S,I)}};function ls(r){return Object.keys(r).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(r[t])).join("&")}const ft=async(r,{fromPath:t,toPath:o})=>{await r.writeFile(o,await r.readFileAsBuffer(t))},ut=async(r,{fromPath:t,toPath:o})=>{await r.mv(t,o)},dt=async(r,{path:t})=>{await r.mkdir(t)},ct=async(r,{path:t})=>{await r.rmdir(t)},Sr=async(r,{path:t,data:o})=>{o instanceof File&&(o=new Uint8Array(await o.arrayBuffer())),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,o)},xr=async(r,{siteUrl:t})=>{await Ie(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},mt=async(r,{file:t},o)=>{var l;(l=o==null?void 0:o.tracker)==null||l.setCaption("Importing content"),await Sr(r,{path:"/tmp/import.wxr",data:t});const a=await r.documentRoot;await r.run({code:`<?php
466
- require ${se(a)} . '/wp-load.php';
467
- require ${se(a)} . '/wp-admin/includes/admin.php';
423
+ `})},li="/tmp/wp-cli.phar",Vo={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},zn=async(e,r=li)=>{if(!await e.fileExists(r))throw new Error(`wp-cli.phar not found at ${r}.
424
+ You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
425
+ {
426
+ "extraLibraries": [ "wp-cli" ]
427
+ }
428
+ Read more about it in the documentation.
429
+ https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},ui=async(e,{command:r,wpCliPath:s=li})=>{await zn(e,s);let n;if(typeof r=="string"?(r=r.trim(),n=Go(r)):n=r,n.shift()!=="wp")throw new Error('The first argument must be "wp".');const i=await e.documentRoot;await e.writeFile("/tmp/stdout",""),await e.writeFile("/tmp/stderr",""),await e.writeFile(ge(i,"run-cli.php"),`<?php
430
+ // Set up the environment to emulate a shell script
431
+ // call.
432
+
433
+ // Set SHELL_PIPE to 0 to ensure WP-CLI formats
434
+ // the output as ASCII tables.
435
+ // @see https://github.com/wp-cli/wp-cli/issues/1102
436
+ putenv( 'SHELL_PIPE=0' );
437
+
438
+ // Set the argv global.
439
+ $GLOBALS['argv'] = array_merge([
440
+ "/tmp/wp-cli.phar",
441
+ "--path=${i}"
442
+ ], ${Fe(n)});
443
+
444
+ // Provide stdin, stdout, stderr streams outside of
445
+ // the CLI SAPI.
446
+ define('STDIN', fopen('php://stdin', 'rb'));
447
+ define('STDOUT', fopen('php://stdout', 'wb'));
448
+ define('STDERR', fopen('php://stderr', 'wb'));
449
+
450
+ require( ${Fe(s)} );
451
+ `);const t=await e.run({scriptPath:ge(i,"run-cli.php")});if(t.errors)throw new Error(t.errors);return t};function Go(e){let n=0,o="";const i=[];let t="";for(let p=0;p<e.length;p++){const y=e[p];n===0?y==='"'||y==="'"?(n=1,o=y):y.match(/\s/)?(t&&i.push(t),t=""):t+=y:n===1&&(y==="\\"?(p++,t+=e[p]):y===o?(n=0,o=""):t+=y)}return t&&i.push(t),i}const Mn=async(e,{wpCliPath:r})=>{await zn(e,r),await ns(e,{consts:{WP_ALLOW_MULTISITE:1}});const s=new URL(await e.absoluteUrl);if(s.port!==""){let i=`The current host is ${s.host}, but WordPress multisites do not support custom ports.`;throw s.hostname==="localhost"&&(i+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(i)}const n=s.pathname.replace(/\/$/,"")+"/",o=`${s.protocol}//${s.hostname}${n}`;await fi(e,{options:{siteurl:o,home:o}}),await ui(e,{command:`wp core multisite-convert --base="${n}"`})},Wn=async(e,{fromPath:r,toPath:s})=>{await e.writeFile(s,await e.readFileAsBuffer(r))},Hn=async(e,{fromPath:r,toPath:s})=>{await e.mv(r,s)},Zn=async(e,{path:r})=>{await e.mkdir(r)},Vn=async(e,{path:r})=>{await e.rmdir(r)},ci=async(e,{path:r,data:s})=>{s instanceof File&&(s=new Uint8Array(await s.arrayBuffer())),r.startsWith("/wordpress/wp-content/mu-plugins")&&!await e.fileExists("/wordpress/wp-content/mu-plugins")&&await e.mkdir("/wordpress/wp-content/mu-plugins"),await e.writeFile(r,s)},Xt={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function Yo(e){const r=typeof e=="object"?e==null?void 0:e.errno:null;if(r in Xt)return Xt[r]}function Ye(e=""){return function(s,n,o){const i=o.value;o.value=function(...t){try{return i.apply(this,t)}catch(p){const y=typeof p=="object"?p==null?void 0:p.errno:null;if(y in Xt){const u=Xt[y],d=typeof t[1]=="string"?t[1]:null,w=d!==null?e.replaceAll("{path}",d):e;throw new Error(`${w}: ${u}`,{cause:p})}throw p}}}}var Ko=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ke=(e,r,s,n)=>{for(var o=n>1?void 0:n?Xo(r,s):r,i=e.length-1,t;i>=0;i--)(t=e[i])&&(o=(n?t(r,s,o):t(o))||o);return n&&o&&Ko(r,s,o),o};const Xe=class Ie{static readFileAsText(r,s){return new TextDecoder().decode(Ie.readFileAsBuffer(r,s))}static readFileAsBuffer(r,s){return r.readFile(s)}static writeFile(r,s,n){r.writeFile(s,n)}static unlink(r,s){r.unlink(s)}static mv(r,s,n){try{const o=r.lookupPath(s).node.mount,i=Ie.fileExists(r,n)?r.lookupPath(n).node.mount:r.lookupPath(gt(n)).node.mount;o.mountpoint!==i.mountpoint?(Ie.copyRecursive(r,s,n),Ie.isDir(r,s)?Ie.rmdir(r,s,{recursive:!0}):r.unlink(s)):r.rename(s,n)}catch(o){const i=Yo(o);throw i?new Error(`Could not move ${s} to ${n}: ${i}`,{cause:o}):o}}static rmdir(r,s,n={recursive:!0}){n!=null&&n.recursive&&Ie.listFiles(r,s).forEach(o=>{const i=`${s}/${o}`;Ie.isDir(r,i)?Ie.rmdir(r,i,n):Ie.unlink(r,i)}),r.rmdir(s)}static listFiles(r,s,n={prependPath:!1}){if(!Ie.fileExists(r,s))return[];try{const o=r.readdir(s).filter(i=>i!=="."&&i!=="..");if(n.prependPath){const i=s.replace(/\/$/,"");return o.map(t=>`${i}/${t}`)}return o}catch(o){return Se.error(o,{path:s}),[]}}static isDir(r,s){return Ie.fileExists(r,s)?r.isDir(r.lookupPath(s,{follow:!0}).node.mode):!1}static isFile(r,s){return Ie.fileExists(r,s)?r.isFile(r.lookupPath(s,{follow:!0}).node.mode):!1}static symlink(r,s,n){return r.symlink(s,n)}static isSymlink(r,s){return Ie.fileExists(r,s)?r.isLink(r.lookupPath(s).node.mode):!1}static readlink(r,s){return r.readlink(s)}static realpath(r,s){return r.lookupPath(s,{follow:!0}).path}static fileExists(r,s){try{return r.lookupPath(s),!0}catch{return!1}}static mkdir(r,s){r.mkdirTree(s)}static copyRecursive(r,s,n){const o=r.lookupPath(s).node;if(r.isDir(o.mode)){r.mkdirTree(n);const i=r.readdir(s).filter(t=>t!=="."&&t!=="..");for(const t of i)Ie.copyRecursive(r,ge(s,t),ge(n,t))}else r.writeFile(n,r.readFile(s))}};Ke([Ye('Could not read "{path}"')],Xe,"readFileAsText",1);Ke([Ye('Could not read "{path}"')],Xe,"readFileAsBuffer",1);Ke([Ye('Could not write to "{path}"')],Xe,"writeFile",1);Ke([Ye('Could not unlink "{path}"')],Xe,"unlink",1);Ke([Ye('Could not remove directory "{path}"')],Xe,"rmdir",1);Ke([Ye('Could not list files in "{path}"')],Xe,"listFiles",1);Ke([Ye('Could not stat "{path}"')],Xe,"isDir",1);Ke([Ye('Could not stat "{path}"')],Xe,"isFile",1);Ke([Ye('Could not stat "{path}"')],Xe,"realpath",1);Ke([Ye('Could not stat "{path}"')],Xe,"fileExists",1);Ke([Ye('Could not create directory "{path}"')],Xe,"mkdir",1);Ke([Ye('Could not copy files from "{path}"')],Xe,"copyRecursive",1);const Qo={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class Qt{constructor(r,s,n,o="",i=0){this.httpStatusCode=r,this.headers=s,this.bytes=n,this.exitCode=i,this.errors=o}static forHttpCode(r,s=""){return new Qt(r,{},new TextEncoder().encode(s||Qo[r]||""))}static fromRawData(r){return new Qt(r.httpStatusCode,r.headers,r.bytes,r.errors,r.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const Ri="/internal/shared/php.ini";function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const{hasOwnProperty:_s}=Object.prototype,Hs=(e,r={})=>{typeof r=="string"&&(r={section:r}),r.align=r.align===!0,r.newline=r.newline===!0,r.sort=r.sort===!0,r.whitespace=r.whitespace===!0||r.align===!0,r.platform=r.platform||typeof process<"u"&&process.platform,r.bracketedArray=r.bracketedArray!==!1;const s=r.platform==="win32"?`\r
452
+ `:`
453
+ `,n=r.whitespace?" = ":"=",o=[],i=r.sort?Object.keys(e).sort():Object.keys(e);let t=0;r.align&&(t=yr(i.filter(u=>e[u]===null||Array.isArray(e[u])||typeof e[u]!="object").map(u=>Array.isArray(e[u])?`${u}[]`:u).concat([""]).reduce((u,d)=>yr(u).length>=yr(d).length?u:d)).length);let p="";const y=r.bracketedArray?"[]":"";for(const u of i){const d=e[u];if(d&&Array.isArray(d))for(const w of d)p+=yr(`${u}${y}`).padEnd(t," ")+n+yr(w)+s;else d&&typeof d=="object"?o.push(u):p+=yr(u).padEnd(t," ")+n+yr(d)+s}r.section&&p.length&&(p="["+yr(r.section)+"]"+(r.newline?s+s:s)+p);for(const u of o){const d=Gn(u,".").join("\\."),w=(r.section?r.section+".":"")+d,_=Hs(e[u],{...r,section:w});p.length&&_.length&&(p+=s),p+=_}return p};function Gn(e,r){var s=0,n=0,o=0,i=[];do if(o=e.indexOf(r,s),o!==-1){if(s=o+r.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+r.length}while(o!==-1);return i.push(e.slice(n)),i}const Fi=(e,r={})=>{r.bracketedArray=r.bracketedArray!==!1;const s=Object.create(null);let n=s,o=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,t=e.split(/[\r\n]+/g),p={};for(const u of t){if(!u||u.match(/^\s*[;#]/)||u.match(/^\s*$/))continue;const d=u.match(i);if(!d)continue;if(d[1]!==void 0){if(o=zt(d[1]),o==="__proto__"){n=Object.create(null);continue}n=s[o]=s[o]||Object.create(null);continue}const w=zt(d[2]);let _;r.bracketedArray?_=w.length>2&&w.slice(-2)==="[]":(p[w]=((p==null?void 0:p[w])||0)+1,_=p[w]>1);const b=_?w.slice(0,-2):w;if(b==="__proto__")continue;const B=d[3]?zt(d[4]):!0,P=B==="true"||B==="false"||B==="null"?JSON.parse(B):B;_&&(_s.call(n,b)?Array.isArray(n[b])||(n[b]=[n[b]]):n[b]=[]),Array.isArray(n[b])?n[b].push(P):n[b]=P}const y=[];for(const u of Object.keys(s)){if(!_s.call(s,u)||typeof s[u]!="object"||Array.isArray(s[u]))continue;const d=Gn(u,".");n=s;const w=d.pop(),_=w.replace(/\\\./g,".");for(const b of d)b!=="__proto__"&&((!_s.call(n,b)||typeof n[b]!="object")&&(n[b]=Object.create(null)),n=n[b]);n===s&&_===w||(n[_]=s[u],y.push(u))}for(const u of y)delete s[u];return s},Yn=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),yr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Yn(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),zt=e=>{if(e=(e||"").trim(),Yn(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,s="";for(let n=0,o=e.length;n<o;n++){const i=e.charAt(n);if(r)"\\;#".indexOf(i)!==-1?s+=i:s+="\\"+i,r=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?r=!0:s+=i}}return r&&(s+="\\"),s.trim()}return e};var Bi={parse:Fi,decode:Fi,stringify:Hs,encode:Hs,safe:yr,unsafe:zt};async function Jo(e,r){const s=Bi.parse(await e.readFileAsText(Ri));for(const[n,o]of Object.entries(r))o==null?delete s[n]:s[n]=o;await e.writeFile(Ri,Bi.stringify(s))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)return;yield s}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const as=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Kn=as[0],ep=as;async function os(e,r,s,{rmRoot:n=!1}={}){n&&await e.isDir(r)&&await e.rmdir(r,{recursive:!0});for(const[o,i]of Object.entries(s)){const t=ge(r,o);await e.fileExists(gt(t))||await e.mkdir(gt(t)),i instanceof Uint8Array||typeof i=="string"?await e.writeFile(t,i):await os(e,t,i)}}const Xn=async(e,{writeToPath:r,filesTree:s})=>{await os(e,r,s.files)},hi=async(e,{siteUrl:r})=>{await ns(e,{consts:{WP_HOME:r,WP_SITEURL:r}})},Qn=async(e,{file:r},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing content"),await ci(e,{path:"/tmp/import.wxr",data:r});const n=await e.documentRoot;await e.run({code:`<?php
454
+ require ${Fe(n)} . '/wp-load.php';
455
+ require ${Fe(n)} . '/wp-admin/includes/admin.php';
468
456
 
469
457
  kses_remove_filters();
470
458
  $admin_id = get_users(array('role' => 'Administrator') )[0]->ID;
@@ -482,7 +470,7 @@ echo json_encode($deactivated_plugins);
482
470
  });
483
471
 
484
472
  $result = $importer->import( '/tmp/import.wxr' );
485
- `})},Nr=async(r,{themeSlug:t=""},o)=>{var l;(l=o==null?void 0:o.tracker)==null||l.setCaption("Importing theme starter content");const a=await r.documentRoot;await r.run({code:`<?php
473
+ `})},yi=async(e,{themeSlug:r=""},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing theme starter content");const n=await e.documentRoot;await e.run({code:`<?php
486
474
 
487
475
  /**
488
476
  * Ensure that the customizer loads as an admin user.
@@ -505,7 +493,7 @@ echo json_encode($deactivated_plugins);
505
493
  * See _wp_customize_include()
506
494
  */
507
495
  $_REQUEST['wp_customize'] = 'on';
508
- $_REQUEST['customize_theme'] = ${se(t)} ?: get_stylesheet();
496
+ $_REQUEST['customize_theme'] = ${Fe(r)} ?: get_stylesheet();
509
497
 
510
498
  /*
511
499
  * Claim this is a ajax request saving settings, to avoid the preview filters being applied.
@@ -517,7 +505,7 @@ echo json_encode($deactivated_plugins);
517
505
  }
518
506
  playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
519
507
 
520
- require ${se(a)} . '/wp-load.php';
508
+ require ${Fe(n)} . '/wp-load.php';
521
509
 
522
510
  // Return early if there's no starter content.
523
511
  if ( ! get_theme_starter_content() ) {
@@ -529,7 +517,7 @@ echo json_encode($deactivated_plugins);
529
517
 
530
518
  // Publish the changeset, which publishes the starter content.
531
519
  wp_publish_post( $wp_customize->changeset_post_id() );
532
- `})},vr="/tmp/file.zip",yt=async(r,t,o,a=!0)=>{if(t instanceof File){const i=t;t=vr,await r.writeFile(t,new Uint8Array(await i.arrayBuffer()))}const l=We({zipPath:t,extractToPath:o,overwriteFiles:a});await r.run({code:`<?php
520
+ `})},vs="/tmp/file.zip",Jn=async(e,r,s,n=!0)=>{if(r instanceof File){const i=r;r=vs,await e.writeFile(r,new Uint8Array(await i.arrayBuffer()))}const o=xt({zipPath:r,extractToPath:s,overwriteFiles:n});await e.run({code:`<?php
533
521
  function unzip($zipPath, $extractTo, $overwriteFiles = true)
534
522
  {
535
523
  if (!is_dir($extractTo)) {
@@ -554,11 +542,11 @@ echo json_encode($deactivated_plugins);
554
542
  throw new Exception("Could not unzip file");
555
543
  }
556
544
  }
557
- unzip(${l.zipPath}, ${l.extractToPath}, ${l.overwriteFiles});
558
- `}),await r.fileExists(vr)&&await r.unlink(vr)},cr=async(r,{zipFile:t,zipPath:o,extractToPath:a})=>{if(o)ae.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 yt(r,t||o,a)},ht=async(r,{wordPressFilesZip:t,pathInZip:o=""})=>{const a=await r.documentRoot;let l=ie("/tmp","import");await r.mkdir(l),await cr(r,{zipFile:t,extractToPath:l}),l=ie(l,o);const i=ie(l,"wp-content"),e=ie(a,"wp-content");for(const k of Ar){const m=ie(i,k);await Ur(r,m);const w=ie(e,k);await r.fileExists(w)&&(await r.mkdir(et(m)),await r.mv(w,m))}const f=ie(l,"wp-content","database");await r.fileExists(f)||await r.mv(ie(a,"wp-content","database"),f);const h=await r.listFiles(l);for(const k of h)await Ur(r,ie(a,k)),await r.mv(ie(l,k),ie(a,k));await r.rmdir(l),await xr(r,{siteUrl:await r.absoluteUrl});const b=se(ie(a,"wp-admin","upgrade.php"));await r.run({code:`<?php
545
+ unzip(${o.zipPath}, ${o.extractToPath}, ${o.overwriteFiles});
546
+ `}),await e.fileExists(vs)&&await e.unlink(vs)},ps=async(e,{zipFile:r,zipPath:s,extractToPath:n})=>{if(s)Se.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!r)throw new Error("Either zipPath or zipFile must be provided");await Jn(e,r||s,n)},ea=async(e,{wordPressFilesZip:r,pathInZip:s=""})=>{const n=await e.documentRoot;let o=ge("/tmp","import");await e.mkdir(o),await ps(e,{zipFile:r,extractToPath:o}),o=ge(o,s);const i=ge(o,"wp-content"),t=ge(n,"wp-content");for(const d of ii){const w=ge(i,d);await Ii(e,w);const _=ge(t,d);await e.fileExists(_)&&(await e.mkdir(gt(w)),await e.mv(_,w))}const p=ge(o,"wp-content","database");await e.fileExists(p)||await e.mv(ge(n,"wp-content","database"),p);const y=await e.listFiles(o);for(const d of y)await Ii(e,ge(n,d)),await e.mv(ge(o,d),ge(n,d));await e.rmdir(o),await hi(e,{siteUrl:await e.absoluteUrl});const u=Fe(ge(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
559
547
  $_GET['step'] = 'upgrade_db';
560
- require ${b};
561
- `})};async function Ur(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function gt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function bt(r,{targetPath:t,zipFile:o,ifAlreadyInstalled:a="overwrite"}){const i=o.name.replace(/\.zip$/,""),e=ie(await r.documentRoot,"wp-content"),f=ie(e,tt()),h=ie(f,"assets",i);await r.fileExists(h)&&await r.rmdir(f,{recursive:!0}),await r.mkdir(f);try{await cr(r,{zipFile:o,extractToPath:h});let b=await r.listFiles(h,{prependPath:!0});b=b.filter(I=>!I.endsWith("/__MACOSX"));const k=b.length===1&&await r.isDir(b[0]);let m,w="";k?(w=b[0],m=b[0].split("/").pop()):(w=h,m=i);const S=`${t}/${m}`;if(await r.fileExists(S)){if(!await r.isDir(S))throw new Error(`Cannot install asset ${m} to ${S} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(a==="overwrite")await r.rmdir(S,{recursive:!0});else{if(a==="skip")return{assetFolderPath:S,assetFolderName:m};throw new Error(`Cannot install asset ${m} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${a}`)}}return await r.mv(w,S),{assetFolderPath:S,assetFolderName:m}}finally{await r.rmdir(f,{recursive:!0})}}function mr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const wt=async(r,{pluginZipFile:t,ifAlreadyInstalled:o,options:a={}},l)=>{const i=t.name.split("/").pop()||"plugin.zip",e=mr(i);l==null||l.tracker.setCaption(`Installing the ${e} plugin`);const{assetFolderPath:f}=await bt(r,{ifAlreadyInstalled:o,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`});("activate"in a?a.activate:!0)&&await dr(r,{pluginPath:f,pluginName:e},l)},vt=async(r,{themeZipFile:t,ifAlreadyInstalled:o,options:a={}},l)=>{const i=mr(t.name);l==null||l.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:e}=await bt(r,{ifAlreadyInstalled:o,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`});("activate"in a?a.activate:!0)&&await qr(r,{themeFolderName:e},l),("importStarterContent"in a?a.importStarterContent:!1)&&await Nr(r,{themeSlug:e},l)},Pt=async(r,t,o)=>{var l;(l=o==null?void 0:o.tracker)==null||l.setCaption("Resetting WordPress data");const a=await r.documentRoot;await r.run({env:{DOCROOT:a},code:`<?php
548
+ require ${u};
549
+ `})};async function Ii(e,r){await e.fileExists(r)&&(await e.isDir(r)?await e.rmdir(r):await e.unlink(r))}async function ra(e){const r=await e.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([r.bytes],"export.xml")}async function ta(e,{targetPath:r,zipFile:s,ifAlreadyInstalled:n="overwrite",targetFolderName:o=""}){const t=s.name.replace(/\.zip$/,""),p=ge(await e.documentRoot,"wp-content"),y=ge(p,jn()),u=ge(y,"assets",t);await e.fileExists(u)&&await e.rmdir(y,{recursive:!0}),await e.mkdir(y);try{await ps(e,{zipFile:s,extractToPath:u});let d=await e.listFiles(u,{prependPath:!0});d=d.filter(P=>!P.endsWith("/__MACOSX"));const w=d.length===1&&await e.isDir(d[0]);let _,b="";w?(b=d[0],_=d[0].split("/").pop()):(b=u,_=t),o&&o.length&&(_=o);const B=`${r}/${_}`;if(await e.fileExists(B)){if(!await e.isDir(B))throw new Error(`Cannot install asset ${_} to ${B} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(n==="overwrite")await e.rmdir(B,{recursive:!0});else{if(n==="skip")return{assetFolderPath:B,assetFolderName:_};throw new Error(`Cannot install asset ${_} to ${r} because it already exists and the ifAlreadyInstalled option was set to ${n}`)}}return await e.mv(b,B),{assetFolderPath:B,assetFolderName:_}}finally{await e.rmdir(y,{recursive:!0})}}function fs(e){const r=e.split(".").shift().replace(/-/g," ");return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}const sa=async(e,{pluginData:r,pluginZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,Se.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const d=r.name.split("/").pop()||"plugin.zip";y=fs(d),i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const w=await ta(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/plugins`,targetFolderName:t});p=w.assetFolderPath,y=w.assetFolderName}else if(r){y=r.name,i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const d=ge(await e.documentRoot,"wp-content","plugins",t||r.name);await os(e,d,r.files,{rmRoot:!0}),p=d}("activate"in o?o.activate:!0)&&await ai(e,{pluginPath:p,pluginName:y},i)},ia=async(e,{themeData:r,themeZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,Se.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const w=r.name.split("/").pop()||"theme.zip";y=fs(w),i==null||i.tracker.setCaption(`Installing the ${y} theme`),p=(await ta(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/themes`,targetFolderName:t})).assetFolderName}else{y=r.name,p=t||y,i==null||i.tracker.setCaption(`Installing the ${y} theme`);const w=ge(await e.documentRoot,"wp-content","themes",p);await os(e,w,r.files,{rmRoot:!0})}("activate"in o?o.activate:!0)&&await oi(e,{themeFolderName:p},i),("importStarterContent"in o?o.importStarterContent:!1)&&await yi(e,{themeSlug:p},i)},na=async(e,{username:r="admin"}={},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Logging in"),e.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",r)},aa=async(e,r,s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Resetting WordPress data");const n=await e.documentRoot;await e.run({env:{DOCROOT:n},code:`<?php
562
550
  require getenv('DOCROOT') . '/wp-load.php';
563
551
 
564
552
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -572,11 +560,11 @@ echo json_encode($deactivated_plugins);
572
560
 
573
561
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
574
562
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
575
- `})},_t=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"}})},kt=async(r,{selfContained:t=!1}={})=>{const o="/tmp/wordpress-playground.zip",a=await r.documentRoot,l=ie(a,"wp-content");let i=Ar;t&&(i=i.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const e=We({zipPath:o,wpContentPath:l,documentRoot:a,exceptPaths:i.map(h=>ie(a,"wp-content",h)),additionalPaths:t?{[ie(a,"wp-config.php")]:"wp-config.php"}:{}});await us(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
576
- 'exclude_paths' => ${e.exceptPaths},
577
- 'zip_root' => ${e.documentRoot},
578
- 'additional_paths' => ${e.additionalPaths}
579
- ));`);const f=await r.readFileAsBuffer(o);return r.unlink(o),f},fs=`<?php
563
+ `})},oa=async(e,{options:r})=>{await e.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:r.adminPassword||"admin",admin_password:r.adminPassword||"password",admin_password2:r.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},pa=async(e,{selfContained:r=!1}={})=>{const s="/tmp/wordpress-playground.zip",n=await e.documentRoot,o=ge(n,"wp-content");let i=ii;r&&(i=i.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const t=xt({zipPath:s,wpContentPath:o,documentRoot:n,exceptPaths:i.map(y=>ge(n,"wp-content",y)),additionalPaths:r?{[ge(n,"wp-config.php")]:"wp-config.php"}:{}});await tp(e,`zipDir(${t.wpContentPath}, ${t.zipPath}, array(
564
+ 'exclude_paths' => ${t.exceptPaths},
565
+ 'zip_root' => ${t.documentRoot},
566
+ 'additional_paths' => ${t.additionalPaths}
567
+ ));`);const p=await e.readFileAsBuffer(s);return e.unlink(s),p},rp=`<?php
580
568
 
581
569
  function zipDir($root, $output, $options = array())
582
570
  {
@@ -635,41 +623,12 @@ function join_paths()
635
623
 
636
624
  return preg_replace('#/+#', '/', join('/', $paths));
637
625
  }
638
- `;async function us(r,t){return await r.run({code:fs+t})}const Ot=async(r,{command:t,wpCliPath:o="/tmp/wp-cli.phar"})=>{if(!await r.fileExists(o))throw new Error(`wp-cli.phar not found at ${o}.
639
- You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
640
- {
641
- "extraLibraries": [ "wp-cli" ]
642
- }
643
-
644
- Read more about it in the documentation.
645
- https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`);let a;if(typeof t=="string"?(t=t.trim(),a=ds(t)):a=t,a.shift()!=="wp")throw new Error('The first argument must be "wp".');await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile("/wordpress/run-cli.php",`<?php
646
- // Set up the environment to emulate a shell script
647
- // call.
648
-
649
- // Set SHELL_PIPE to 0 to ensure WP-CLI formats
650
- // the output as ASCII tables.
651
- // @see https://github.com/wp-cli/wp-cli/issues/1102
652
- putenv( 'SHELL_PIPE=0' );
653
-
654
- // Set the argv global.
655
- $GLOBALS['argv'] = array_merge([
656
- "/tmp/wp-cli.phar",
657
- "--path=/wordpress"
658
- ], ${se(a)});
659
-
660
- // Provide stdin, stdout, stderr streams outside of
661
- // the CLI SAPI.
662
- define('STDIN', fopen('php://stdin', 'rb'));
663
- define('STDOUT', fopen('php://stdout', 'wb'));
664
- define('STDERR', fopen('php://stderr', 'wb'));
665
-
666
- require( ${se(o)} );
667
- `);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function ds(r){let a=0,l="";const i=[];let e="";for(let f=0;f<r.length;f++){const h=r[f];a===0?h==='"'||h==="'"?(a=1,l=h):h.match(/\s/)?(e&&i.push(e),e=""):e+=h:a===1&&(h==="\\"?(f++,e+=r[f]):h===l?(a=0,l=""):e+=h)}return e&&i.push(e),i}const Et=async(r,{language:t},o)=>{o==null||o.tracker.setCaption((o==null?void 0:o.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const a=await r.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await r.run({code:`<?php
668
- require '${a}/wp-includes/version.php';
626
+ `;async function tp(e,r){return await e.run({code:rp+r})}const fa=async(e,{language:r},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Translating"),await e.defineConstant("WPLANG",r);const n=await e.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await e.run({code:`<?php
627
+ require '${n}/wp-includes/version.php';
669
628
  echo $wp_version;
670
- `})).text}/${t}.zip`,type:"core"}],f=(await r.run({code:`<?php
671
- require_once('${a}/wp-load.php');
672
- require_once('${a}/wp-admin/includes/plugin.php');
629
+ `})).text}/${r}.zip`,type:"core"}],p=(await e.run({code:`<?php
630
+ require_once('${n}/wp-load.php');
631
+ require_once('${n}/wp-admin/includes/plugin.php');
673
632
  echo json_encode(
674
633
  array_values(
675
634
  array_map(
@@ -687,9 +646,9 @@ function join_paths()
687
646
  )
688
647
  )
689
648
  )
690
- );`})).json;for(const{slug:k,version:m}of f)i.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${m}/${t}.zip`,type:"plugin"});const b=(await r.run({code:`<?php
691
- require_once('${a}/wp-load.php');
692
- require_once('${a}/wp-admin/includes/theme.php');
649
+ );`})).json;for(const{slug:d,version:w}of p)i.push({url:`https://downloads.wordpress.org/translation/plugin/${d}/${w}/${r}.zip`,type:"plugin"});const u=(await e.run({code:`<?php
650
+ require_once('${n}/wp-load.php');
651
+ require_once('${n}/wp-admin/includes/theme.php');
693
652
  echo json_encode(
694
653
  array_values(
695
654
  array_map(
@@ -702,9 +661,68 @@ function join_paths()
702
661
  wp_get_themes()
703
662
  )
704
663
  )
705
- );`})).json;for(const{slug:k,version:m}of b)i.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${m}/${t}.zip`,type:"theme"});await r.isDir(`${a}/wp-content/languages/plugins`)||await r.mkdir(`${a}/wp-content/languages/plugins`),await r.isDir(`${a}/wp-content/languages/themes`)||await r.mkdir(`${a}/wp-content/languages/themes`);for(const{url:k,type:m}of i)try{const w=await fetch(k);if(!w.ok)throw new Error(`Failed to download translations for ${m}: ${w.statusText}`);let S=`${a}/wp-content/languages`;m==="plugin"?S+="/plugins":m==="theme"&&(S+="/themes"),await yt(r,new File([await w.blob()],`${t}-${m}.zip`),S)}catch(w){if(m==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.warn(`Error downloading translations for ${m}: ${w}`)}},cs=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:dr,activateTheme:qr,cp:ft,defineSiteUrl:xr,defineWpConfigConsts:Ie,enableMultisite:lt,exportWXR:gt,importThemeStarterContent:Nr,importWordPressFiles:ht,importWxr:mt,installPlugin:wt,installTheme:vt,login:nr,mkdir:dt,mv:ut,request:or,resetData:Pt,rm:Rr,rmdir:ct,runPHP:it,runPHPWithOptions:ot,runSql:nt,runWpInstallationWizard:_t,setSiteLanguage:Et,setSiteOptions:Lr,unzip:cr,updateUserMeta:at,wpCLI:Ot,writeFile:Sr,zipWpContent:kt},Symbol.toStringTag,{value:"Module"})),ms=5*1024*1024;function ys(r,t){const o=r.headers.get("content-length")||"",a=parseInt(o,10)||ms;function l(i,e){t(new CustomEvent("progress",{detail:{loaded:i,total:e}}))}return new Response(new ReadableStream({async start(i){if(!r.body){i.close();return}const e=r.body.getReader();let f=0;for(;;)try{const{done:h,value:b}=await e.read();if(b&&(f+=b.byteLength),h){l(f,f),i.close();break}else l(f,a),i.enqueue(b)}catch(h){ae.error({e:h}),i.error(h);break}}}),{status:r.status,statusText:r.statusText,headers:r.headers})}const Pr=1e-5;class yr extends EventTarget{constructor({weight:t=1,caption:o="",fillTime:a=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=o,this._fillTime=a}stage(t,o=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Pr)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const a=new yr({caption:o,weight:t,fillTime:this._fillTime});return this._subTrackers.push(a),a.addEventListener("progress",()=>this.notifyProgress()),a.addEventListener("done",()=>{this.done&&this.notifyDone()}),a}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const o=100,a=this._fillTime/o;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},a)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Pr>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const o=this._subTrackers[t].caption;if(o)return o}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Pr>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((o,a)=>o+a.progress*a.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",o=>{t.setProgress({progress:o.detail.progress,caption:o.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,o){super.addEventListener(t,o)}removeEventListener(t,o){super.removeEventListener(t,o)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const ar={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function hs(r){const t=typeof r=="object"?r==null?void 0:r.errno:null;if(t in ar)return ar[t]}function ge(r=""){return function(o,a,l){const i=l.value;l.value=function(...e){try{return i.apply(this,e)}catch(f){const h=typeof f=="object"?f==null?void 0:f.errno:null;if(h in ar){const b=ar[h],k=typeof e[1]=="string"?e[1]:null,m=k!==null?r.replaceAll("{path}",k):r;throw new Error(`${m}: ${b}`,{cause:f})}throw f}}}}var gs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,be=(r,t,o,a)=>{for(var l=a>1?void 0:a?bs(t,o):t,i=r.length-1,e;i>=0;i--)(e=r[i])&&(l=(a?e(t,o,l):e(l))||l);return a&&l&&gs(t,o,l),l};const we=class pe{static readFileAsText(t,o){return new TextDecoder().decode(pe.readFileAsBuffer(t,o))}static readFileAsBuffer(t,o){return t.readFile(o)}static writeFile(t,o,a){t.writeFile(o,a)}static unlink(t,o){t.unlink(o)}static mv(t,o,a){try{const l=t.lookupPath(o).node.mount,i=pe.fileExists(t,a)?t.lookupPath(a).node.mount:t.lookupPath(et(a)).node.mount;l.mountpoint!==i.mountpoint?(pe.copyRecursive(t,o,a),pe.isDir(t,o)?pe.rmdir(t,o,{recursive:!0}):t.unlink(o)):t.rename(o,a)}catch(l){const i=hs(l);throw i?new Error(`Could not move ${o} to ${a}: ${i}`,{cause:l}):l}}static rmdir(t,o,a={recursive:!0}){a!=null&&a.recursive&&pe.listFiles(t,o).forEach(l=>{const i=`${o}/${l}`;pe.isDir(t,i)?pe.rmdir(t,i,a):pe.unlink(t,i)}),t.rmdir(o)}static listFiles(t,o,a={prependPath:!1}){if(!pe.fileExists(t,o))return[];try{const l=t.readdir(o).filter(i=>i!=="."&&i!=="..");if(a.prependPath){const i=o.replace(/\/$/,"");return l.map(e=>`${i}/${e}`)}return l}catch(l){return ae.error(l,{path:o}),[]}}static isDir(t,o){return pe.fileExists(t,o)?t.isDir(t.lookupPath(o,{follow:!0}).node.mode):!1}static isFile(t,o){return pe.fileExists(t,o)?t.isFile(t.lookupPath(o,{follow:!0}).node.mode):!1}static symlink(t,o,a){return t.symlink(o,a)}static isSymlink(t,o){return pe.fileExists(t,o)?t.isLink(t.lookupPath(o).node.mode):!1}static readlink(t,o){return t.readlink(o)}static realpath(t,o){return t.lookupPath(o,{follow:!0}).path}static fileExists(t,o){try{return t.lookupPath(o),!0}catch{return!1}}static mkdir(t,o){t.mkdirTree(o)}static copyRecursive(t,o,a){const l=t.lookupPath(o).node;if(t.isDir(l.mode)){t.mkdirTree(a);const i=t.readdir(o).filter(e=>e!=="."&&e!=="..");for(const e of i)pe.copyRecursive(t,ie(o,e),ie(a,e))}else t.writeFile(a,t.readFile(o))}};be([ge('Could not read "{path}"')],we,"readFileAsText",1);be([ge('Could not read "{path}"')],we,"readFileAsBuffer",1);be([ge('Could not write to "{path}"')],we,"writeFile",1);be([ge('Could not unlink "{path}"')],we,"unlink",1);be([ge('Could not remove directory "{path}"')],we,"rmdir",1);be([ge('Could not list files in "{path}"')],we,"listFiles",1);be([ge('Could not stat "{path}"')],we,"isDir",1);be([ge('Could not stat "{path}"')],we,"isFile",1);be([ge('Could not stat "{path}"')],we,"realpath",1);be([ge('Could not stat "{path}"')],we,"fileExists",1);be([ge('Could not create directory "{path}"')],we,"mkdir",1);be([ge('Could not copy files from "{path}"')],we,"copyRecursive",1);const ws={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class pr{constructor(t,o,a,l="",i=0){this.httpStatusCode=t,this.headers=o,this.bytes=a,this.exitCode=i,this.errors=l}static forHttpCode(t,o=""){return new pr(t,{},new TextEncoder().encode(o||ws[t]||""))}static fromRawData(t){return new pr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const zr="/internal/shared/php.ini",{hasOwnProperty:_r}=Object.prototype,Tr=(r,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const o=t.platform==="win32"?`\r
706
- `:`
707
- `,a=t.whitespace?" = ":"=",l=[],i=t.sort?Object.keys(r).sort():Object.keys(r);let e=0;t.align&&(e=Ee(i.filter(b=>r[b]===null||Array.isArray(r[b])||typeof r[b]!="object").map(b=>Array.isArray(r[b])?`${b}[]`:b).concat([""]).reduce((b,k)=>Ee(b).length>=Ee(k).length?b:k)).length);let f="";const h=t.bracketedArray?"[]":"";for(const b of i){const k=r[b];if(k&&Array.isArray(k))for(const m of k)f+=Ee(`${b}${h}`).padEnd(e," ")+a+Ee(m)+o;else k&&typeof k=="object"?l.push(b):f+=Ee(b).padEnd(e," ")+a+Ee(k)+o}t.section&&f.length&&(f="["+Ee(t.section)+"]"+(t.newline?o+o:o)+f);for(const b of l){const k=$t(b,".").join("\\."),m=(t.section?t.section+".":"")+k,w=Tr(r[b],{...t,section:m});f.length&&w.length&&(f+=o),f+=w}return f};function $t(r,t){var o=0,a=0,l=0,i=[];do if(l=r.indexOf(t,o),l!==-1){if(o=l+t.length,l>0&&r[l-1]==="\\")continue;i.push(r.slice(a,l)),a=l+t.length}while(l!==-1);return i.push(r.slice(a)),i}const Vr=(r,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const o=Object.create(null);let a=o,l=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,e=r.split(/[\r\n]+/g),f={};for(const b of e){if(!b||b.match(/^\s*[;#]/)||b.match(/^\s*$/))continue;const k=b.match(i);if(!k)continue;if(k[1]!==void 0){if(l=rr(k[1]),l==="__proto__"){a=Object.create(null);continue}a=o[l]=o[l]||Object.create(null);continue}const m=rr(k[2]);let w;t.bracketedArray?w=m.length>2&&m.slice(-2)==="[]":(f[m]=((f==null?void 0:f[m])||0)+1,w=f[m]>1);const S=w?m.slice(0,-2):m;if(S==="__proto__")continue;const I=k[3]?rr(k[4]):!0,P=I==="true"||I==="false"||I==="null"?JSON.parse(I):I;w&&(_r.call(a,S)?Array.isArray(a[S])||(a[S]=[a[S]]):a[S]=[]),Array.isArray(a[S])?a[S].push(P):a[S]=P}const h=[];for(const b of Object.keys(o)){if(!_r.call(o,b)||typeof o[b]!="object"||Array.isArray(o[b]))continue;const k=$t(b,".");a=o;const m=k.pop(),w=m.replace(/\\\./g,".");for(const S of k)S!=="__proto__"&&((!_r.call(a,S)||typeof a[S]!="object")&&(a[S]=Object.create(null)),a=a[S]);a===o&&w===m||(a[w]=o[b],h.push(b))}for(const b of h)delete o[b];return o},Tt=r=>r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"),Ee=r=>typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&Tt(r)||r!==r.trim()?JSON.stringify(r):r.split(";").join("\\;").split("#").join("\\#"),rr=r=>{if(r=(r||"").trim(),Tt(r)){r.charAt(0)==="'"&&(r=r.slice(1,-1));try{r=JSON.parse(r)}catch{}}else{let t=!1,o="";for(let a=0,l=r.length;a<l;a++){const i=r.charAt(a);if(t)"\\;#".indexOf(i)!==-1?o+=i:o+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:o+=i}}return t&&(o+="\\"),o.trim()}return r};var Hr={parse:Vr,decode:Vr,stringify:Tr,encode:Tr,safe:Ee,unsafe:rr};async function vs(r,t){const o=Hr.parse(await r.readFileAsText(zr));for(const[a,l]of Object.entries(t))l==null?delete o[a]:o[a]=l;await r.writeFile(zr,Hr.stringify(o))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const r=this.getReader();try{for(;;){const{done:t,value:o}=await r.read();if(t)return;yield o}}finally{r.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const hr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],jt=hr[0],Ps=hr,At=["iconv","mbstring","xml-bundle","gd"],Gr={"kitchen-sink":At,light:[]},_s=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function ks(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&_s.includes(r.resource)}class Le{static create(t,{semaphore:o,progress:a}){let l;switch(t.resource){case"vfs":l=new Os(t,a);break;case"literal":l=new Es(t,a);break;case"wordpress.org/themes":l=new js(t,a);break;case"wordpress.org/plugins":l=new As(t,a);break;case"url":l=new Ts(t,a);break;default:throw new Error(`Invalid resource: ${t}`)}return l=new qs(l),o&&(l=new Rs(l,o)),l}setPlayground(t){this.playground=t}get isAsync(){return!1}}class Os extends Le{constructor(t,o){super(),this.resource=t,this.progress=o}async resolve(){var o;const t=await this.playground.readFileAsBuffer(this.resource.path);return(o=this.progress)==null||o.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class Es extends Le{constructor(t,o){super(),this.resource=t,this.progress=o}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 Fr extends Le{constructor(t){super(),this.progress=t}async resolve(){var o,a;(o=this.progress)==null||o.setCaption(this.caption);const t=this.getURL();try{let l=await fetch(t);if(!l.ok)throw new Error(`Could not download "${t}"`);if(l=await ys(l,((a=this.progress)==null?void 0:a.loadingListener)??$s),l.status!==200)throw new Error(`Could not download "${t}"`);return new File([await l.blob()],this.name)}catch(l){throw new Error(`Could not download "${t}".
664
+ );`})).json;for(const{slug:d,version:w}of u)i.push({url:`https://downloads.wordpress.org/translation/theme/${d}/${w}/${r}.zip`,type:"theme"});await e.isDir(`${n}/wp-content/languages/plugins`)||await e.mkdir(`${n}/wp-content/languages/plugins`),await e.isDir(`${n}/wp-content/languages/themes`)||await e.mkdir(`${n}/wp-content/languages/themes`);for(const{url:d,type:w}of i)try{const _=await fetch(d);if(!_.ok)throw new Error(`Failed to download translations for ${w}: ${_.statusText}`);let b=`${n}/wp-content/languages`;w==="plugin"?b+="/plugins":w==="theme"&&(b+="/themes"),await Jn(e,new File([await _.blob()],`${r}-${w}.zip`),b)}catch(_){if(w==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${r} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);Se.warn(`Error downloading translations for ${w}: ${_}`)}},sp=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:ai,activateTheme:oi,cp:Wn,defineSiteUrl:hi,defineWpConfigConsts:ns,enableMultisite:Mn,exportWXR:ra,importThemeStarterContent:yi,importWordPressFiles:ea,importWxr:Qn,installPlugin:sa,installTheme:ia,login:na,mkdir:Zn,mv:Hn,request:qn,resetData:aa,rm:pi,rmdir:Vn,runPHP:Nn,runPHPWithOptions:Cn,runSql:Dn,runWpInstallationWizard:oa,setSiteLanguage:fa,setSiteOptions:fi,unzip:ps,updateUserMeta:Un,wpCLI:ui,writeFile:ci,writeFiles:Xn,zipWpContent:pa},Symbol.toStringTag,{value:"Module"})),ip=5*1024*1024;function np(e,r){const s=e.headers.get("content-length")||"",n=parseInt(s,10)||ip;function o(i,t){r(new CustomEvent("progress",{detail:{loaded:i,total:t}}))}return new Response(new ReadableStream({async start(i){if(!e.body){i.close();return}const t=e.body.getReader();let p=0;for(;;)try{const{done:y,value:u}=await t.read();if(u&&(p+=u.byteLength),y){o(p,p),i.close();break}else o(p,n),i.enqueue(u)}catch(y){Se.error({e:y}),i.error(y);break}}}),{status:e.status,statusText:e.statusText,headers:e.headers})}const Ps=1e-5;class ls extends EventTarget{constructor({weight:r=1,caption:s="",fillTime:n=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=r,this._selfCaption=s,this._fillTime=n}stage(r,s=""){if(r||(r=this._selfWeight),this._selfWeight-r<-Ps)throw new Error(`Cannot add a stage with weight ${r} as the total weight of registered stages would exceed 1.`);this._selfWeight-=r;const n=new ls({caption:s,weight:r,fillTime:this._fillTime});return this._subTrackers.push(n),n.addEventListener("progress",()=>this.notifyProgress()),n.addEventListener("done",()=>{this.done&&this.notifyDone()}),n}fillSlowly({stopBeforeFinishing:r=!0}={}){if(this._isFilling)return;this._isFilling=!0;const s=100,n=this._fillTime/s;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),r&&this._selfProgress>=99&&clearInterval(this._fillInterval)},n)}set(r){this._selfProgress=Math.min(r,100),this.notifyProgress(),this._selfProgress+Ps>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let r=this._subTrackers.length-1;r>=0;r--)if(!this._subTrackers[r].done){const s=this._subTrackers[r].caption;if(s)return s}return this._selfCaption}setCaption(r){this._selfCaption=r,this.notifyProgress()}get done(){return this.progress+Ps>=100}get progress(){if(this._selfDone)return 100;const r=this._subTrackers.reduce((s,n)=>s+n.progress*n.weight,this._selfProgress*this._selfWeight);return Math.round(r*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=r=>{this.set(r)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=r=>{this.set(r.detail.loaded/r.detail.total*100)}),this._loadingListener}pipe(r){r.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",s=>{r.setProgress({progress:s.detail.progress,caption:s.detail.caption})}),this.addEventListener("done",()=>{r.setLoaded()})}addEventListener(r,s){super.addEventListener(r,s)}removeEventListener(r,s){super.removeEventListener(r,s)}notifyProgress(){const r=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return r.progress},get caption(){return r.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}function ap(e){let r=[e];return{next(){return Promise.resolve({done:r.length===0,value:r.pop()})},return(){return r=[],{}},[Symbol.asyncIterator](){return this}}}function la(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:ap(e)}class ua{constructor(r){if(typeof Buffer>"u")throw new Error("Missing Buffer dependency");this.stream=la(r),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(r){if(!this.eof())return this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r),this.buffer.slice(this.undoCursor,this.cursor)}async skip(r){this.eof()||(this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:r,value:s}=await this.stream.next();return r&&(this._ended=!0,!s)?Buffer.alloc(0):(s&&(s=Buffer.from(s)),s)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(r){this.undoCursor=this.cursor,this.cursor+=r,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(r){if(this._ended)return;const s=[this.buffer];for(;this.cursor+r>op(s);){const n=await this._next();if(this._ended)break;s.push(n)}this.buffer=Buffer.concat(s)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}}function op(e){return e.reduce((r,s)=>r+s.length,0)}function pp(e,r){const s=r.toString(16);return"0".repeat(e-s.length)+s}class $e{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(r){typeof r=="string"&&(r=Buffer.from(r));const s=r.length+4,n=pp(4,s);return Buffer.concat([Buffer.from(n,"utf8"),r])}static streamReader(r){const s=new ua(r);return async function(){try{let o=await s.read(4);if(o==null)return!0;if(o=parseInt(o.toString("utf8"),16),o===0||o===1)return null;const i=await s.read(o-4);return i??!0}catch(o){return r.error=o,!0}}}}class st extends Error{constructor(r){super(r),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(r){const s=new st(r.message);return s.code=r.code,s.data=r.data,s.caller=r.caller,s.stack=r.stack,s}get isIsomorphicGitError(){return!0}}class _e extends st{constructor(r){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${r}`),this.code=this.name=_e.code,this.data={message:r}}}_e.code="InternalError";class us extends st{constructor(r){super(`The filepath "${r}" contains unsafe character sequences`),this.code=this.name=us.code,this.data={filepath:r}}}us.code="UnsafeFilepathError";function ca(e,r){return-(e<r)||+(e>r)}function fp(e,r){return ca(e.path,r.path)}function lp(e,r){return ca(ji(e),ji(r))}function ji(e){return e.mode==="040000"?e.path+"/":e.path}function da(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new _e(`Unexpected GitTree entry mode: ${e}`)}function up(e){const r=[];let s=0;for(;s<e.length;){const n=e.indexOf(32,s);if(n===-1)throw new _e(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next space character.`);const o=e.indexOf(0,s);if(o===-1)throw new _e(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next null character.`);let i=e.slice(s,n).toString("utf8");i==="40000"&&(i="040000");const t=da(i),p=e.slice(n+1,o).toString("utf8");if(p.includes("\\")||p.includes("/"))throw new us(p);const y=e.slice(o+1,o+21).toString("hex");s=o+21,r.push({mode:i,path:p,oid:y,type:t})}return r}function cp(e){if(typeof e=="number"&&(e=e.toString(8)),e.match(/^0?4.*/))return"040000";if(e.match(/^1006.*/))return"100644";if(e.match(/^1007.*/))return"100755";if(e.match(/^120.*/))return"120000";if(e.match(/^160.*/))return"160000";throw new _e(`Could not understand file mode: ${e}`)}function dp(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=cp(e.mode),e.type||(e.type=da(e.mode)),e}class mi{constructor(r){if(Buffer.isBuffer(r))this._entries=up(r);else if(Array.isArray(r))this._entries=r.map(dp);else throw new _e("invalid type passed to GitTree constructor");this._entries.sort(fp)}static from(r){return new mi(r)}render(){return this._entries.map(r=>`${r.mode} ${r.type} ${r.oid} ${r.path}`).join(`
665
+ `)}toObject(){const r=[...this._entries];return r.sort(lp),Buffer.concat(r.map(s=>{const n=Buffer.from(s.mode.replace(/^0/,"")),o=Buffer.from(" "),i=Buffer.from(s.path,"utf8"),t=Buffer.from([0]),p=Buffer.from(s.oid,"hex");return Buffer.concat([n,o,i,t,p])}))}entries(){return this._entries}*[Symbol.iterator](){for(const r of this._entries)yield r}}function Zs({name:e,email:r,timestamp:s,timezoneOffset:n}){return n=hp(n),`${e} <${r}> ${s} ${n}`}function hp(e){const r=yp(mp(e));e=Math.abs(e);const s=Math.floor(e/60);e-=s*60;let n=String(s),o=String(e);return n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),(r===-1?"-":"+")+n+o}function yp(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function mp(e){return e===0?e:-e}function mr(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+`
666
+ `,e}function Jt(e){const[,r,s,n,o]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:r,email:s,timestamp:Number(n),timezoneOffset:gp(o)}}function gp(e){let[,r,s,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(r==="+"?1:-1)*(Number(s)*60+Number(n)),wp(n)}function wp(e){return e===0?e:-e}class ut{constructor(r){if(typeof r=="string")this._tag=r;else if(Buffer.isBuffer(r))this._tag=r.toString("utf8");else if(typeof r=="object")this._tag=ut.render(r);else throw new _e("invalid type passed to GitAnnotatedTag constructor")}static from(r){return new ut(r)}static render(r){return`object ${r.object}
667
+ type ${r.type}
668
+ tag ${r.tag}
669
+ tagger ${Zs(r.tagger)}
670
+
671
+ ${r.message}
672
+ ${r.gpgsig?r.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
673
+
674
+ `))}message(){const r=this.withoutSignature();return r.slice(r.indexOf(`
675
+
676
+ `)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const r=this.justHeaders().split(`
677
+ `),s=[];for(const o of r)o[0]===" "?s[s.length-1]+=`
678
+ `+o.slice(1):s.push(o);const n={};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.tagger&&(n.tagger=Jt(n.tagger)),n.committer&&(n.committer=Jt(n.committer)),n}withoutSignature(){const r=mr(this._tag);return r.indexOf(`
679
+ -----BEGIN PGP SIGNATURE-----`)===-1?r:r.slice(0,r.lastIndexOf(`
680
+ -----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
681
+ -----BEGIN PGP SIGNATURE-----`)===-1)return;const r=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return mr(r)}payload(){return this.withoutSignature()+`
682
+ `}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(r,s,n){const o=r.payload();let{signature:i}=await s({payload:o,secretKey:n});i=mr(i);const t=o+i;return ut.from(t)}}function ks(e){return e.trim().split(`
683
+ `).map(r=>" "+r).join(`
684
+ `)+`
685
+ `}function bp(e){return e.split(`
686
+ `).map(r=>r.replace(/^ /,"")).join(`
687
+ `)}class qe{constructor(r){if(typeof r=="string")this._commit=r;else if(Buffer.isBuffer(r))this._commit=r.toString("utf8");else if(typeof r=="object")this._commit=qe.render(r);else throw new _e("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:r,signature:s}){const n=qe.justHeaders(r),o=qe.justMessage(r),i=mr(n+`
688
+ gpgsig`+ks(s)+`
689
+ `+o);return new qe(i)}static from(r){return new qe(r)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return qe.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(r){return mr(r.slice(r.indexOf(`
690
+
691
+ `)+2))}static justHeaders(r){return r.slice(0,r.indexOf(`
692
+
693
+ `))}parseHeaders(){const r=qe.justHeaders(this._commit).split(`
694
+ `),s=[];for(const o of r)o[0]===" "?s[s.length-1]+=`
695
+ `+o.slice(1):s.push(o);const n={parent:[]};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.author&&(n.author=Jt(n.author)),n.committer&&(n.committer=Jt(n.committer)),n}static renderHeaders(r){let s="";if(r.tree?s+=`tree ${r.tree}
696
+ `:s+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
697
+ `,r.parent){if(r.parent.length===void 0)throw new _e("commit 'parent' property should be an array");for(const i of r.parent)s+=`parent ${i}
698
+ `}const n=r.author;s+=`author ${Zs(n)}
699
+ `;const o=r.committer||r.author;return s+=`committer ${Zs(o)}
700
+ `,r.gpgsig&&(s+="gpgsig"+ks(r.gpgsig)),s}static render(r){return qe.renderHeaders(r)+`
701
+ `+mr(r.message)}render(){return this._commit}withoutSignature(){const r=mr(this._commit);if(r.indexOf(`
702
+ gpgsig`)===-1)return r;const s=r.slice(0,r.indexOf(`
703
+ gpgsig`)),n=r.slice(r.indexOf(`-----END PGP SIGNATURE-----
704
+ `)+28);return mr(s+`
705
+ `+n)}isolateSignature(){const r=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return bp(r)}static async sign(r,s,n){const o=r.withoutSignature(),i=qe.justMessage(r._commit);let{signature:t}=await s({payload:o,secretKey:n});t=mr(t);const y=qe.justHeaders(r._commit)+`
706
+ gpgsig`+ks(t)+`
707
+ `+i;return qe.from(y)}}var ha={};/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */(function(e){(function(r){r(typeof DO_NOT_EXPORT_CRC>"u"?e:{})})(function(r){r.version="1.2.2";function s(){for(var S=0,x=new Array(256),E=0;E!=256;++E)S=E,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,x[E]=S;return typeof Int32Array<"u"?new Int32Array(x):x}var n=s();function o(S){var x=0,E=0,O=0,D=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(O=0;O!=256;++O)D[O]=S[O];for(O=0;O!=256;++O)for(E=S[O],x=256+O;x<4096;x+=256)E=D[x]=E>>>8^S[E&255];var L=[];for(O=1;O!=16;++O)L[O-1]=typeof Int32Array<"u"?D.subarray(O*256,O*256+256):D.slice(O*256,O*256+256);return L}var i=o(n),t=i[0],p=i[1],y=i[2],u=i[3],d=i[4],w=i[5],_=i[6],b=i[7],B=i[8],P=i[9],q=i[10],C=i[11],M=i[12],I=i[13],U=i[14];function A(S,x){for(var E=x^-1,O=0,D=S.length;O<D;)E=E>>>8^n[(E^S.charCodeAt(O++))&255];return~E}function T(S,x){for(var E=x^-1,O=S.length-15,D=0;D<O;)E=U[S[D++]^E&255]^I[S[D++]^E>>8&255]^M[S[D++]^E>>16&255]^C[S[D++]^E>>>24]^q[S[D++]]^P[S[D++]]^B[S[D++]]^b[S[D++]]^_[S[D++]]^w[S[D++]]^d[S[D++]]^u[S[D++]]^y[S[D++]]^p[S[D++]]^t[S[D++]]^n[S[D++]];for(O+=15;D<O;)E=E>>>8^n[(E^S[D++])&255];return~E}function N(S,x){for(var E=x^-1,O=0,D=S.length,L=0,F=0;O<D;)L=S.charCodeAt(O++),L<128?E=E>>>8^n[(E^L)&255]:L<2048?(E=E>>>8^n[(E^(192|L>>6&31))&255],E=E>>>8^n[(E^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,F=S.charCodeAt(O++)&1023,E=E>>>8^n[(E^(240|L>>8&7))&255],E=E>>>8^n[(E^(128|L>>2&63))&255],E=E>>>8^n[(E^(128|F>>6&15|(L&3)<<4))&255],E=E>>>8^n[(E^(128|F&63))&255]):(E=E>>>8^n[(E^(224|L>>12&15))&255],E=E>>>8^n[(E^(128|L>>6&63))&255],E=E>>>8^n[(E^(128|L&63))&255]);return~E}r.table=n,r.bstr=A,r.buf=T,r.str=N})})(ha);const _p=di(ha);class vp{static wrap({type:r,object:s}){return Buffer.concat([Buffer.from(`${r} ${s.byteLength.toString()}\0`),Buffer.from(s)])}static unwrap(r){const s=r.indexOf(32),n=r.indexOf(0),o=r.slice(0,s).toString("utf8"),i=r.slice(s+1,n).toString("utf8"),t=r.length-(n+1);if(parseInt(i)!==t)throw new _e(`Length mismatch: expected ${i} bytes but got ${t} instead.`);return{type:o,object:Buffer.from(r.slice(n+1))}}}class Sr{constructor(r){this.buffer=r,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(r){this._start=r}slice(r){const s=this.buffer.slice(this._start,this._start+r);return this._start+=r,s}toString(r,s){const n=this.buffer.toString(r,this._start,this._start+s);return this._start+=s,n}write(r,s,n){const o=this.buffer.write(r,this._start,s,n);return this._start+=s,o}copy(r,s,n){const o=r.copy(this.buffer,this._start,s,n);return this._start+=o,o}readUInt8(){const r=this.buffer.readUInt8(this._start);return this._start+=1,r}writeUInt8(r){const s=this.buffer.writeUInt8(r,this._start);return this._start+=1,s}readUInt16BE(){const r=this.buffer.readUInt16BE(this._start);return this._start+=2,r}writeUInt16BE(r){const s=this.buffer.writeUInt16BE(r,this._start);return this._start+=2,s}readUInt32BE(){const r=this.buffer.readUInt32BE(this._start);return this._start+=4,r}writeUInt32BE(r){const s=this.buffer.writeUInt32BE(r,this._start);return this._start+=4,s}}function Pp(e,r){const s=new Sr(e),n=Li(s);if(n!==r.byteLength)throw new _e(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${r.length} bytes`);const o=Li(s);let i;const t=Ci(s,r);if(t.byteLength===o)i=t;else{i=Buffer.alloc(o);const p=new Sr(i);for(p.copy(t);!s.eof();)p.copy(Ci(s,r));const y=p.tell();if(o!==y)throw new _e(`applyDelta expected target buffer to be ${o} bytes but the resulting buffer was ${y} bytes`)}return i}function Li(e){let r=0,s=0,n=null;do n=e.readUInt8(),r|=(n&127)<<s,s+=7;while(n&128);return r}function Ni(e,r,s){let n=0,o=0;for(;s--;)r&1&&(n|=e.readUInt8()<<o),r>>=1,o+=8;return n}function Ci(e,r){const s=e.readUInt8(),n=128,o=15,i=112;if(s&n){const t=Ni(e,s&o,4);let p=Ni(e,(s&i)>>4,3);return p===0&&(p=65536),r.slice(t,t+p)}else return e.slice(s)}var br={};(function(e){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function s(i,t){return Object.prototype.hasOwnProperty.call(i,t)}e.assign=function(i){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var p=t.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var y in p)s(p,y)&&(i[y]=p[y])}}return i},e.shrinkBuf=function(i,t){return i.length===t?i:i.subarray?i.subarray(0,t):(i.length=t,i)};var n={arraySet:function(i,t,p,y,u){if(t.subarray&&i.subarray){i.set(t.subarray(p,p+y),u);return}for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){var t,p,y,u,d,w;for(y=0,t=0,p=i.length;t<p;t++)y+=i[t].length;for(w=new Uint8Array(y),u=0,t=0,p=i.length;t<p;t++)d=i[t],w.set(d,u),u+=d.length;return w}},o={arraySet:function(i,t,p,y,u){for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){return[].concat.apply([],i)}};e.setTyped=function(i){i?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)})(br);var Tt={},ur={},it={},kp=br,Ep=4,Di=0,qi=1,Op=2;function nt(e){for(var r=e.length;--r>=0;)e[r]=0}var xp=0,ya=1,Tp=2,$p=3,Ap=258,gi=29,$t=256,wt=$t+1+gi,et=30,wi=19,ma=2*wt+1,Fr=15,Es=16,Sp=7,bi=256,ga=16,wa=17,ba=18,Vs=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Rp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Fp=512,gr=new Array((wt+2)*2);nt(gr);var ct=new Array(et*2);nt(ct);var bt=new Array(Fp);nt(bt);var _t=new Array(Ap-$p+1);nt(_t);var _i=new Array(gi);nt(_i);var es=new Array(et);nt(es);function Os(e,r,s,n,o){this.static_tree=e,this.extra_bits=r,this.extra_base=s,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}var va,Pa,ka;function xs(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function Ea(e){return e<256?bt[e]:bt[256+(e>>>7)]}function vt(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ne(e,r,s){e.bi_valid>Es-s?(e.bi_buf|=r<<e.bi_valid&65535,vt(e,e.bi_buf),e.bi_buf=r>>Es-e.bi_valid,e.bi_valid+=s-Es):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=s)}function pr(e,r,s){Ne(e,s[r*2],s[r*2+1])}function Oa(e,r){var s=0;do s|=e&1,e>>>=1,s<<=1;while(--r>0);return s>>>1}function Bp(e){e.bi_valid===16?(vt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Ip(e,r){var s=r.dyn_tree,n=r.max_code,o=r.stat_desc.static_tree,i=r.stat_desc.has_stree,t=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,y=r.stat_desc.max_length,u,d,w,_,b,B,P=0;for(_=0;_<=Fr;_++)e.bl_count[_]=0;for(s[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<ma;u++)d=e.heap[u],_=s[s[d*2+1]*2+1]+1,_>y&&(_=y,P++),s[d*2+1]=_,!(d>n)&&(e.bl_count[_]++,b=0,d>=p&&(b=t[d-p]),B=s[d*2],e.opt_len+=B*(_+b),i&&(e.static_len+=B*(o[d*2+1]+b)));if(P!==0){do{for(_=y-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[y]--,P-=2}while(P>0);for(_=y;_!==0;_--)for(d=e.bl_count[_];d!==0;)w=e.heap[--u],!(w>n)&&(s[w*2+1]!==_&&(e.opt_len+=(_-s[w*2+1])*s[w*2],s[w*2+1]=_),d--)}}function xa(e,r,s){var n=new Array(Fr+1),o=0,i,t;for(i=1;i<=Fr;i++)n[i]=o=o+s[i-1]<<1;for(t=0;t<=r;t++){var p=e[t*2+1];p!==0&&(e[t*2]=Oa(n[p]++,p))}}function jp(){var e,r,s,n,o,i=new Array(Fr+1);for(s=0,n=0;n<gi-1;n++)for(_i[n]=s,e=0;e<1<<Vs[n];e++)_t[s++]=n;for(_t[s-1]=n,o=0,n=0;n<16;n++)for(es[n]=o,e=0;e<1<<Mt[n];e++)bt[o++]=n;for(o>>=7;n<et;n++)for(es[n]=o<<7,e=0;e<1<<Mt[n]-7;e++)bt[256+o++]=n;for(r=0;r<=Fr;r++)i[r]=0;for(e=0;e<=143;)gr[e*2+1]=8,e++,i[8]++;for(;e<=255;)gr[e*2+1]=9,e++,i[9]++;for(;e<=279;)gr[e*2+1]=7,e++,i[7]++;for(;e<=287;)gr[e*2+1]=8,e++,i[8]++;for(xa(gr,wt+1,i),e=0;e<et;e++)ct[e*2+1]=5,ct[e*2]=Oa(e,5);va=new Os(gr,Vs,$t+1,wt,Fr),Pa=new Os(ct,Mt,0,et,Fr),ka=new Os(new Array(0),Rp,0,wi,Sp)}function Ta(e){var r;for(r=0;r<wt;r++)e.dyn_ltree[r*2]=0;for(r=0;r<et;r++)e.dyn_dtree[r*2]=0;for(r=0;r<wi;r++)e.bl_tree[r*2]=0;e.dyn_ltree[bi*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function $a(e){e.bi_valid>8?vt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Lp(e,r,s,n){$a(e),n&&(vt(e,s),vt(e,~s)),kp.arraySet(e.pending_buf,e.window,r,s,e.pending),e.pending+=s}function Ui(e,r,s,n){var o=r*2,i=s*2;return e[o]<e[i]||e[o]===e[i]&&n[r]<=n[s]}function Ts(e,r,s){for(var n=e.heap[s],o=s<<1;o<=e.heap_len&&(o<e.heap_len&&Ui(r,e.heap[o+1],e.heap[o],e.depth)&&o++,!Ui(r,n,e.heap[o],e.depth));)e.heap[s]=e.heap[o],s=o,o<<=1;e.heap[s]=n}function zi(e,r,s){var n,o,i=0,t,p;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+i*2]<<8|e.pending_buf[e.d_buf+i*2+1],o=e.pending_buf[e.l_buf+i],i++,n===0?pr(e,o,r):(t=_t[o],pr(e,t+$t+1,r),p=Vs[t],p!==0&&(o-=_i[t],Ne(e,o,p)),n--,t=Ea(n),pr(e,t,s),p=Mt[t],p!==0&&(n-=es[t],Ne(e,n,p)));while(i<e.last_lit);pr(e,bi,r)}function Gs(e,r){var s=r.dyn_tree,n=r.stat_desc.static_tree,o=r.stat_desc.has_stree,i=r.stat_desc.elems,t,p,y=-1,u;for(e.heap_len=0,e.heap_max=ma,t=0;t<i;t++)s[t*2]!==0?(e.heap[++e.heap_len]=y=t,e.depth[t]=0):s[t*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=y<2?++y:0,s[u*2]=1,e.depth[u]=0,e.opt_len--,o&&(e.static_len-=n[u*2+1]);for(r.max_code=y,t=e.heap_len>>1;t>=1;t--)Ts(e,s,t);u=i;do t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ts(e,s,1),p=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=p,s[u*2]=s[t*2]+s[p*2],e.depth[u]=(e.depth[t]>=e.depth[p]?e.depth[t]:e.depth[p])+1,s[t*2+1]=s[p*2+1]=u,e.heap[1]=u++,Ts(e,s,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Ip(e,r),xa(s,y,e.bl_count)}function Mi(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),r[(s+1)*2+1]=65535,n=0;n<=s;n++)i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)&&(p<u?e.bl_tree[i*2]+=p:i!==0?(i!==o&&e.bl_tree[i*2]++,e.bl_tree[ga*2]++):p<=10?e.bl_tree[wa*2]++:e.bl_tree[ba*2]++,p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4))}function Wi(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),n=0;n<=s;n++)if(i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)){if(p<u)do pr(e,i,e.bl_tree);while(--p!==0);else i!==0?(i!==o&&(pr(e,i,e.bl_tree),p--),pr(e,ga,e.bl_tree),Ne(e,p-3,2)):p<=10?(pr(e,wa,e.bl_tree),Ne(e,p-3,3)):(pr(e,ba,e.bl_tree),Ne(e,p-11,7));p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4)}}function Np(e){var r;for(Mi(e,e.dyn_ltree,e.l_desc.max_code),Mi(e,e.dyn_dtree,e.d_desc.max_code),Gs(e,e.bl_desc),r=wi-1;r>=3&&e.bl_tree[_a[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function Cp(e,r,s,n){var o;for(Ne(e,r-257,5),Ne(e,s-1,5),Ne(e,n-4,4),o=0;o<n;o++)Ne(e,e.bl_tree[_a[o]*2+1],3);Wi(e,e.dyn_ltree,r-1),Wi(e,e.dyn_dtree,s-1)}function Dp(e){var r=4093624447,s;for(s=0;s<=31;s++,r>>>=1)if(r&1&&e.dyn_ltree[s*2]!==0)return Di;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return qi;for(s=32;s<$t;s++)if(e.dyn_ltree[s*2]!==0)return qi;return Di}var Hi=!1;function qp(e){Hi||(jp(),Hi=!0),e.l_desc=new xs(e.dyn_ltree,va),e.d_desc=new xs(e.dyn_dtree,Pa),e.bl_desc=new xs(e.bl_tree,ka),e.bi_buf=0,e.bi_valid=0,Ta(e)}function Aa(e,r,s,n){Ne(e,(xp<<1)+(n?1:0),3),Lp(e,r,s,!0)}function Up(e){Ne(e,ya<<1,3),pr(e,bi,gr),Bp(e)}function zp(e,r,s,n){var o,i,t=0;e.level>0?(e.strm.data_type===Op&&(e.strm.data_type=Dp(e)),Gs(e,e.l_desc),Gs(e,e.d_desc),t=Np(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=s+5,s+4<=o&&r!==-1?Aa(e,r,s,n):e.strategy===Ep||i===o?(Ne(e,(ya<<1)+(n?1:0),3),zi(e,gr,ct)):(Ne(e,(Tp<<1)+(n?1:0),3),Cp(e,e.l_desc.max_code+1,e.d_desc.max_code+1,t+1),zi(e,e.dyn_ltree,e.dyn_dtree)),Ta(e),n&&$a(e)}function Mp(e,r,s){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=s&255,e.last_lit++,r===0?e.dyn_ltree[s*2]++:(e.matches++,r--,e.dyn_ltree[(_t[s]+$t+1)*2]++,e.dyn_dtree[Ea(r)*2]++),e.last_lit===e.lit_bufsize-1}it._tr_init=qp;it._tr_stored_block=Aa;it._tr_flush_block=zp;it._tr_tally=Mp;it._tr_align=Up;function Wp(e,r,s,n){for(var o=e&65535|0,i=e>>>16&65535|0,t=0;s!==0;){t=s>2e3?2e3:s,s-=t;do o=o+r[n++]|0,i=i+o|0;while(--t);o%=65521,i%=65521}return o|i<<16|0}var Sa=Wp;function Hp(){for(var e,r=[],s=0;s<256;s++){e=s;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[s]=e}return r}var Zp=Hp();function Vp(e,r,s,n){var o=Zp,i=n+s;e^=-1;for(var t=n;t<i;t++)e=e>>>8^o[(e^r[t])&255];return e^-1}var Ra=Vp,vi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},je=br,Ze=it,Fa=Sa,kr=Ra,Gp=vi,Ur=0,Yp=1,Kp=3,$r=4,Zi=5,fr=0,Vi=1,Ve=-2,Xp=-3,$s=-5,Qp=-1,Jp=1,Lt=2,ef=3,rf=4,tf=0,sf=2,cs=8,nf=9,af=15,of=8,pf=29,ff=256,Ys=ff+1+pf,lf=30,uf=19,cf=2*Ys+1,df=15,oe=3,xr=258,er=xr+oe+1,hf=32,ds=42,Ks=69,Wt=73,Ht=91,Zt=103,Br=113,lt=666,xe=1,At=2,Lr=3,at=4,yf=3;function Tr(e,r){return e.msg=Gp[r],r}function Gi(e){return(e<<1)-(e>4?9:0)}function Or(e){for(var r=e.length;--r>=0;)e[r]=0}function Er(e){var r=e.state,s=r.pending;s>e.avail_out&&(s=e.avail_out),s!==0&&(je.arraySet(e.output,r.pending_buf,r.pending_out,s,e.next_out),e.next_out+=s,r.pending_out+=s,e.total_out+=s,e.avail_out-=s,r.pending-=s,r.pending===0&&(r.pending_out=0))}function Re(e,r){Ze._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Er(e.strm)}function fe(e,r){e.pending_buf[e.pending++]=r}function ft(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function mf(e,r,s,n){var o=e.avail_in;return o>n&&(o=n),o===0?0:(e.avail_in-=o,je.arraySet(r,e.input,e.next_in,o,s),e.state.wrap===1?e.adler=Fa(e.adler,r,o,s):e.state.wrap===2&&(e.adler=kr(e.adler,r,o,s)),e.next_in+=o,e.total_in+=o,o)}function Ba(e,r){var s=e.max_chain_length,n=e.strstart,o,i,t=e.prev_length,p=e.nice_match,y=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,u=e.window,d=e.w_mask,w=e.prev,_=e.strstart+xr,b=u[n+t-1],B=u[n+t];e.prev_length>=e.good_match&&(s>>=2),p>e.lookahead&&(p=e.lookahead);do if(o=r,!(u[o+t]!==B||u[o+t-1]!==b||u[o]!==u[n]||u[++o]!==u[n+1])){n+=2,o++;do;while(u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&n<_);if(i=xr-(_-n),n=_-xr,i>t){if(e.match_start=r,t=i,i>=p)break;b=u[n+t-1],B=u[n+t]}}while((r=w[r&d])>y&&--s!==0);return t<=e.lookahead?t:e.lookahead}function Nr(e){var r=e.w_size,s,n,o,i,t;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-er)){je.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,s=n;do o=e.head[--s],e.head[s]=o>=r?o-r:0;while(--n);n=r,s=n;do o=e.prev[--s],e.prev[s]=o>=r?o-r:0;while(--n);i+=r}if(e.strm.avail_in===0)break;if(n=mf(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=oe)for(t=e.strstart-e.insert,e.ins_h=e.window[t],e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+oe-1])&e.hash_mask,e.prev[t&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=t,t++,e.insert--,!(e.lookahead+e.insert<oe)););}while(e.lookahead<er&&e.strm.avail_in!==0)}function gf(e,r){var s=65535;for(s>e.pending_buf_size-5&&(s=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Nr(e),e.lookahead===0&&r===Ur)return xe;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+s;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Re(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):(e.strstart>e.block_start&&(Re(e,!1),e.strm.avail_out===0),xe)}function As(e,r){for(var s,n;;){if(e.lookahead<er){if(Nr(e),e.lookahead<er&&r===Ur)return xe;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),s!==0&&e.strstart-s<=e.w_size-er&&(e.match_length=Ba(e,s)),e.match_length>=oe)if(n=Ze._tr_tally(e,e.strstart-e.match_start,e.match_length-oe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=oe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=e.strstart<oe-1?e.strstart:oe-1,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function Gr(e,r){for(var s,n,o;;){if(e.lookahead<er){if(Nr(e),e.lookahead<er&&r===Ur)return xe;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=oe-1,s!==0&&e.prev_length<e.max_lazy_match&&e.strstart-s<=e.w_size-er&&(e.match_length=Ba(e,s),e.match_length<=5&&(e.strategy===Jp||e.match_length===oe&&e.strstart-e.match_start>4096)&&(e.match_length=oe-1)),e.prev_length>=oe&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-oe,n=Ze._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-oe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=oe-1,e.strstart++,n&&(Re(e,!1),e.strm.avail_out===0))return xe}else if(e.match_available){if(n=Ze._tr_tally(e,0,e.window[e.strstart-1]),n&&Re(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return xe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ze._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<oe-1?e.strstart:oe-1,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function wf(e,r){for(var s,n,o,i,t=e.window;;){if(e.lookahead<=xr){if(Nr(e),e.lookahead<=xr&&r===Ur)return xe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=oe&&e.strstart>0&&(o=e.strstart-1,n=t[o],n===t[++o]&&n===t[++o]&&n===t[++o])){i=e.strstart+xr;do;while(n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&o<i);e.match_length=xr-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=oe?(s=Ze._tr_tally(e,1,e.match_length-oe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function bf(e,r){for(var s;;){if(e.lookahead===0&&(Nr(e),e.lookahead===0)){if(r===Ur)return xe;break}if(e.match_length=0,s=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function nr(e,r,s,n,o){this.good_length=e,this.max_lazy=r,this.nice_length=s,this.max_chain=n,this.func=o}var Qr;Qr=[new nr(0,0,0,0,gf),new nr(4,4,8,4,As),new nr(4,5,16,8,As),new nr(4,6,32,32,As),new nr(4,4,16,16,Gr),new nr(8,16,32,32,Gr),new nr(8,16,128,128,Gr),new nr(8,32,128,256,Gr),new nr(32,128,258,1024,Gr),new nr(32,258,258,4096,Gr)];function _f(e){e.window_size=2*e.w_size,Or(e.head),e.max_lazy_match=Qr[e.level].max_lazy,e.good_match=Qr[e.level].good_length,e.nice_match=Qr[e.level].nice_length,e.max_chain_length=Qr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=oe-1,e.match_available=0,e.ins_h=0}function vf(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=cs,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new je.Buf16(cf*2),this.dyn_dtree=new je.Buf16((2*lf+1)*2),this.bl_tree=new je.Buf16((2*uf+1)*2),Or(this.dyn_ltree),Or(this.dyn_dtree),Or(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new je.Buf16(df+1),this.heap=new je.Buf16(2*Ys+1),Or(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new je.Buf16(2*Ys+1),Or(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ia(e){var r;return!e||!e.state?Tr(e,Ve):(e.total_in=e.total_out=0,e.data_type=sf,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?ds:Br,e.adler=r.wrap===2?0:1,r.last_flush=Ur,Ze._tr_init(r),fr)}function ja(e){var r=Ia(e);return r===fr&&_f(e.state),r}function Pf(e,r){return!e||!e.state||e.state.wrap!==2?Ve:(e.state.gzhead=r,fr)}function La(e,r,s,n,o,i){if(!e)return Ve;var t=1;if(r===Qp&&(r=6),n<0?(t=0,n=-n):n>15&&(t=2,n-=16),o<1||o>nf||s!==cs||n<8||n>15||r<0||r>9||i<0||i>rf)return Tr(e,Ve);n===8&&(n=9);var p=new vf;return e.state=p,p.strm=e,p.wrap=t,p.gzhead=null,p.w_bits=n,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=o+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+oe-1)/oe),p.window=new je.Buf8(p.w_size*2),p.head=new je.Buf16(p.hash_size),p.prev=new je.Buf16(p.w_size),p.lit_bufsize=1<<o+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new je.Buf8(p.pending_buf_size),p.d_buf=1*p.lit_bufsize,p.l_buf=(1+2)*p.lit_bufsize,p.level=r,p.strategy=i,p.method=s,ja(e)}function kf(e,r){return La(e,r,cs,af,of,tf)}function Ef(e,r){var s,n,o,i;if(!e||!e.state||r>Zi||r<0)return e?Tr(e,Ve):Ve;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===lt&&r!==$r)return Tr(e,e.avail_out===0?$s:Ve);if(n.strm=e,s=n.last_flush,n.last_flush=r,n.status===ds)if(n.wrap===2)e.adler=0,fe(n,31),fe(n,139),fe(n,8),n.gzhead?(fe(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),fe(n,n.gzhead.time&255),fe(n,n.gzhead.time>>8&255),fe(n,n.gzhead.time>>16&255),fe(n,n.gzhead.time>>24&255),fe(n,n.level===9?2:n.strategy>=Lt||n.level<2?4:0),fe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(fe(n,n.gzhead.extra.length&255),fe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=kr(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ks):(fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,n.level===9?2:n.strategy>=Lt||n.level<2?4:0),fe(n,yf),n.status=Br);else{var t=cs+(n.w_bits-8<<4)<<8,p=-1;n.strategy>=Lt||n.level<2?p=0:n.level<6?p=1:n.level===6?p=2:p=3,t|=p<<6,n.strstart!==0&&(t|=hf),t+=31-t%31,n.status=Br,ft(n,t),n.strstart!==0&&(ft(n,e.adler>>>16),ft(n,e.adler&65535)),e.adler=1}if(n.status===Ks)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size));)fe(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Wt)}else n.status=Wt;if(n.status===Wt)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.name.length?i=n.gzhead.name.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.gzindex=0,n.status=Ht)}else n.status=Ht;if(n.status===Ht)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.comment.length?i=n.gzhead.comment.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.status=Zt)}else n.status=Zt;if(n.status===Zt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Er(e),n.pending+2<=n.pending_buf_size&&(fe(n,e.adler&255),fe(n,e.adler>>8&255),e.adler=0,n.status=Br)):n.status=Br),n.pending!==0){if(Er(e),e.avail_out===0)return n.last_flush=-1,fr}else if(e.avail_in===0&&Gi(r)<=Gi(s)&&r!==$r)return Tr(e,$s);if(n.status===lt&&e.avail_in!==0)return Tr(e,$s);if(e.avail_in!==0||n.lookahead!==0||r!==Ur&&n.status!==lt){var y=n.strategy===Lt?bf(n,r):n.strategy===ef?wf(n,r):Qr[n.level].func(n,r);if((y===Lr||y===at)&&(n.status=lt),y===xe||y===Lr)return e.avail_out===0&&(n.last_flush=-1),fr;if(y===At&&(r===Yp?Ze._tr_align(n):r!==Zi&&(Ze._tr_stored_block(n,0,0,!1),r===Kp&&(Or(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Er(e),e.avail_out===0))return n.last_flush=-1,fr}return r!==$r?fr:n.wrap<=0?Vi:(n.wrap===2?(fe(n,e.adler&255),fe(n,e.adler>>8&255),fe(n,e.adler>>16&255),fe(n,e.adler>>24&255),fe(n,e.total_in&255),fe(n,e.total_in>>8&255),fe(n,e.total_in>>16&255),fe(n,e.total_in>>24&255)):(ft(n,e.adler>>>16),ft(n,e.adler&65535)),Er(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?fr:Vi)}function Of(e){var r;return!e||!e.state?Ve:(r=e.state.status,r!==ds&&r!==Ks&&r!==Wt&&r!==Ht&&r!==Zt&&r!==Br&&r!==lt?Tr(e,Ve):(e.state=null,r===Br?Tr(e,Xp):fr))}function xf(e,r){var s=r.length,n,o,i,t,p,y,u,d;if(!e||!e.state||(n=e.state,t=n.wrap,t===2||t===1&&n.status!==ds||n.lookahead))return Ve;for(t===1&&(e.adler=Fa(e.adler,r,s,0)),n.wrap=0,s>=n.w_size&&(t===0&&(Or(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new je.Buf8(n.w_size),je.arraySet(d,r,s-n.w_size,n.w_size,0),r=d,s=n.w_size),p=e.avail_in,y=e.next_in,u=e.input,e.avail_in=s,e.next_in=0,e.input=r,Nr(n);n.lookahead>=oe;){o=n.strstart,i=n.lookahead-(oe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+oe-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--i);n.strstart=o,n.lookahead=oe-1,Nr(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=oe-1,n.match_available=0,e.next_in=y,e.input=u,e.avail_in=p,n.wrap=t,fr}ur.deflateInit=kf;ur.deflateInit2=La;ur.deflateReset=ja;ur.deflateResetKeep=Ia;ur.deflateSetHeader=Pf;ur.deflate=Ef;ur.deflateEnd=Of;ur.deflateSetDictionary=xf;ur.deflateInfo="pako deflate (from Nodeca project)";var zr={},hs=br,Na=!0,Ca=!0;try{String.fromCharCode.apply(null,[0])}catch{Na=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ca=!1}var Pt=new hs.Buf8(256);for(var Pr=0;Pr<256;Pr++)Pt[Pr]=Pr>=252?6:Pr>=248?5:Pr>=240?4:Pr>=224?3:Pr>=192?2:1;Pt[254]=Pt[254]=1;zr.string2buf=function(e){var r,s,n,o,i,t=e.length,p=0;for(o=0;o<t;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),p+=s<128?1:s<2048?2:s<65536?3:4;for(r=new hs.Buf8(p),i=0,o=0;i<p;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),s<128?r[i++]=s:s<2048?(r[i++]=192|s>>>6,r[i++]=128|s&63):s<65536?(r[i++]=224|s>>>12,r[i++]=128|s>>>6&63,r[i++]=128|s&63):(r[i++]=240|s>>>18,r[i++]=128|s>>>12&63,r[i++]=128|s>>>6&63,r[i++]=128|s&63);return r};function Da(e,r){if(r<65534&&(e.subarray&&Ca||!e.subarray&&Na))return String.fromCharCode.apply(null,hs.shrinkBuf(e,r));for(var s="",n=0;n<r;n++)s+=String.fromCharCode(e[n]);return s}zr.buf2binstring=function(e){return Da(e,e.length)};zr.binstring2buf=function(e){for(var r=new hs.Buf8(e.length),s=0,n=r.length;s<n;s++)r[s]=e.charCodeAt(s);return r};zr.buf2string=function(e,r){var s,n,o,i,t=r||e.length,p=new Array(t*2);for(n=0,s=0;s<t;){if(o=e[s++],o<128){p[n++]=o;continue}if(i=Pt[o],i>4){p[n++]=65533,s+=i-1;continue}for(o&=i===2?31:i===3?15:7;i>1&&s<t;)o=o<<6|e[s++]&63,i--;if(i>1){p[n++]=65533;continue}o<65536?p[n++]=o:(o-=65536,p[n++]=55296|o>>10&1023,p[n++]=56320|o&1023)}return Da(p,n)};zr.utf8border=function(e,r){var s;for(r=r||e.length,r>e.length&&(r=e.length),s=r-1;s>=0&&(e[s]&192)===128;)s--;return s<0||s===0?r:s+Pt[e[s]]>r?s:r};function Tf(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var qa=Tf,dt=ur,ht=br,Xs=zr,Qs=vi,$f=qa,Ua=Object.prototype.toString,Af=0,Ss=4,rt=0,Yi=1,Ki=2,Sf=-1,Rf=0,Ff=8;function Cr(e){if(!(this instanceof Cr))return new Cr(e);this.options=ht.assign({level:Sf,method:Ff,chunkSize:16384,windowBits:15,memLevel:8,strategy:Rf,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $f,this.strm.avail_out=0;var s=dt.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(s!==rt)throw new Error(Qs[s]);if(r.header&&dt.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=Xs.string2buf(r.dictionary):Ua.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,s=dt.deflateSetDictionary(this.strm,n),s!==rt)throw new Error(Qs[s]);this._dict_set=!0}}Cr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o,i;if(this.ended)return!1;i=r===~~r?r:r===!0?Ss:Af,typeof e=="string"?s.input=Xs.string2buf(e):Ua.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new ht.Buf8(n),s.next_out=0,s.avail_out=n),o=dt.deflate(s,i),o!==Yi&&o!==rt)return this.onEnd(o),this.ended=!0,!1;(s.avail_out===0||s.avail_in===0&&(i===Ss||i===Ki))&&(this.options.to==="string"?this.onData(Xs.buf2binstring(ht.shrinkBuf(s.output,s.next_out))):this.onData(ht.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||s.avail_out===0)&&o!==Yi);return i===Ss?(o=dt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===rt):(i===Ki&&(this.onEnd(rt),s.avail_out=0),!0)};Cr.prototype.onData=function(e){this.chunks.push(e)};Cr.prototype.onEnd=function(e){e===rt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ht.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Pi(e,r){var s=new Cr(r);if(s.push(e,!0),s.err)throw s.msg||Qs[s.err];return s.result}function Bf(e,r){return r=r||{},r.raw=!0,Pi(e,r)}function If(e,r){return r=r||{},r.gzip=!0,Pi(e,r)}Tt.Deflate=Cr;Tt.deflate=Pi;Tt.deflateRaw=Bf;Tt.gzip=If;var St={},rr={},Nt=30,jf=12,Lf=function(r,s){var n,o,i,t,p,y,u,d,w,_,b,B,P,q,C,M,I,U,A,T,N,S,x,E,O;n=r.state,o=r.next_in,E=r.input,i=o+(r.avail_in-5),t=r.next_out,O=r.output,p=t-(s-r.avail_out),y=t+(r.avail_out-257),u=n.dmax,d=n.wsize,w=n.whave,_=n.wnext,b=n.window,B=n.hold,P=n.bits,q=n.lencode,C=n.distcode,M=(1<<n.lenbits)-1,I=(1<<n.distbits)-1;e:do{P<15&&(B+=E[o++]<<P,P+=8,B+=E[o++]<<P,P+=8),U=q[B&M];r:for(;;){if(A=U>>>24,B>>>=A,P-=A,A=U>>>16&255,A===0)O[t++]=U&65535;else if(A&16){T=U&65535,A&=15,A&&(P<A&&(B+=E[o++]<<P,P+=8),T+=B&(1<<A)-1,B>>>=A,P-=A),P<15&&(B+=E[o++]<<P,P+=8,B+=E[o++]<<P,P+=8),U=C[B&I];t:for(;;){if(A=U>>>24,B>>>=A,P-=A,A=U>>>16&255,A&16){if(N=U&65535,A&=15,P<A&&(B+=E[o++]<<P,P+=8,P<A&&(B+=E[o++]<<P,P+=8)),N+=B&(1<<A)-1,N>u){r.msg="invalid distance too far back",n.mode=Nt;break e}if(B>>>=A,P-=A,A=t-p,N>A){if(A=N-A,A>w&&n.sane){r.msg="invalid distance too far back",n.mode=Nt;break e}if(S=0,x=b,_===0){if(S+=d-A,A<T){T-=A;do O[t++]=b[S++];while(--A);S=t-N,x=O}}else if(_<A){if(S+=d+_-A,A-=_,A<T){T-=A;do O[t++]=b[S++];while(--A);if(S=0,_<T){A=_,T-=A;do O[t++]=b[S++];while(--A);S=t-N,x=O}}}else if(S+=_-A,A<T){T-=A;do O[t++]=b[S++];while(--A);S=t-N,x=O}for(;T>2;)O[t++]=x[S++],O[t++]=x[S++],O[t++]=x[S++],T-=3;T&&(O[t++]=x[S++],T>1&&(O[t++]=x[S++]))}else{S=t-N;do O[t++]=O[S++],O[t++]=O[S++],O[t++]=O[S++],T-=3;while(T>2);T&&(O[t++]=O[S++],T>1&&(O[t++]=O[S++]))}}else if(A&64){r.msg="invalid distance code",n.mode=Nt;break e}else{U=C[(U&65535)+(B&(1<<A)-1)];continue t}break}}else if(A&64)if(A&32){n.mode=jf;break e}else{r.msg="invalid literal/length code",n.mode=Nt;break e}else{U=q[(U&65535)+(B&(1<<A)-1)];continue r}break}}while(o<i&&t<y);T=P>>3,o-=T,P-=T<<3,B&=(1<<P)-1,r.next_in=o,r.next_out=t,r.avail_in=o<i?5+(i-o):5-(o-i),r.avail_out=t<y?257+(y-t):257-(t-y),n.hold=B,n.bits=P},Xi=br,Yr=15,Qi=852,Ji=592,en=0,Rs=1,rn=2,Nf=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Cf=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Df=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],qf=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],Uf=function(r,s,n,o,i,t,p,y){var u=y.bits,d=0,w=0,_=0,b=0,B=0,P=0,q=0,C=0,M=0,I=0,U,A,T,N,S,x=null,E=0,O,D=new Xi.Buf16(Yr+1),L=new Xi.Buf16(Yr+1),F=null,Y=0,Z,H,K;for(d=0;d<=Yr;d++)D[d]=0;for(w=0;w<o;w++)D[s[n+w]]++;for(B=u,b=Yr;b>=1&&D[b]===0;b--);if(B>b&&(B=b),b===0)return i[t++]=1<<24|64<<16|0,i[t++]=1<<24|64<<16|0,y.bits=1,0;for(_=1;_<b&&D[_]===0;_++);for(B<_&&(B=_),C=1,d=1;d<=Yr;d++)if(C<<=1,C-=D[d],C<0)return-1;if(C>0&&(r===en||b!==1))return-1;for(L[1]=0,d=1;d<Yr;d++)L[d+1]=L[d]+D[d];for(w=0;w<o;w++)s[n+w]!==0&&(p[L[s[n+w]]++]=w);if(r===en?(x=F=p,O=19):r===Rs?(x=Nf,E-=257,F=Cf,Y-=257,O=256):(x=Df,F=qf,O=-1),I=0,w=0,d=_,S=t,P=B,q=0,T=-1,M=1<<B,N=M-1,r===Rs&&M>Qi||r===rn&&M>Ji)return 1;for(;;){Z=d-q,p[w]<O?(H=0,K=p[w]):p[w]>O?(H=F[Y+p[w]],K=x[E+p[w]]):(H=32+64,K=0),U=1<<d-q,A=1<<P,_=A;do A-=U,i[S+(I>>q)+A]=Z<<24|H<<16|K|0;while(A!==0);for(U=1<<d-1;I&U;)U>>=1;if(U!==0?(I&=U-1,I+=U):I=0,w++,--D[d]===0){if(d===b)break;d=s[n+p[w]]}if(d>B&&(I&N)!==T){for(q===0&&(q=B),S+=_,P=d-q,C=1<<P;P+q<b&&(C-=D[P+q],!(C<=0));)P++,C<<=1;if(M+=1<<P,r===Rs&&M>Qi||r===rn&&M>Ji)return 1;T=I&N,i[T]=B<<24|P<<16|S-t|0}}return I!==0&&(i[S+I]=d-q<<24|64<<16|0),y.bits=B,0},ze=br,Js=Sa,ar=Ra,zf=Lf,yt=Uf,Mf=0,za=1,Ma=2,tn=4,Wf=5,Ct=6,Dr=0,Hf=1,Zf=2,Ge=-2,Wa=-3,Ha=-4,Vf=-5,sn=8,Za=1,nn=2,an=3,on=4,pn=5,fn=6,ln=7,un=8,cn=9,dn=10,rs=11,hr=12,Fs=13,hn=14,Bs=15,yn=16,mn=17,gn=18,wn=19,Dt=20,qt=21,bn=22,_n=23,vn=24,Pn=25,kn=26,Is=27,En=28,On=29,be=30,Va=31,Gf=32,Yf=852,Kf=592,Xf=15,Qf=Xf;function xn(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Jf(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ze.Buf16(320),this.work=new ze.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ga(e){var r;return!e||!e.state?Ge:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Za,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new ze.Buf32(Yf),r.distcode=r.distdyn=new ze.Buf32(Kf),r.sane=1,r.back=-1,Dr)}function Ya(e){var r;return!e||!e.state?Ge:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,Ga(e))}function Ka(e,r){var s,n;return!e||!e.state||(n=e.state,r<0?(s=0,r=-r):(s=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?Ge:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=s,n.wbits=r,Ya(e))}function Xa(e,r){var s,n;return e?(n=new Jf,e.state=n,n.window=null,s=Ka(e,r),s!==Dr&&(e.state=null),s):Ge}function el(e){return Xa(e,Qf)}var Tn=!0,js,Ls;function rl(e){if(Tn){var r;for(js=new ze.Buf32(512),Ls=new ze.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(yt(za,e.lens,0,288,js,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;yt(Ma,e.lens,0,32,Ls,0,e.work,{bits:5}),Tn=!1}e.lencode=js,e.lenbits=9,e.distcode=Ls,e.distbits=5}function Qa(e,r,s,n){var o,i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new ze.Buf8(i.wsize)),n>=i.wsize?(ze.arraySet(i.window,r,s-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),ze.arraySet(i.window,r,s-n,o,i.wnext),n-=o,n?(ze.arraySet(i.window,r,s-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}function tl(e,r){var s,n,o,i,t,p,y,u,d,w,_,b,B,P,q=0,C,M,I,U,A,T,N,S,x=new ze.Buf8(4),E,O,D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ge;s=e.state,s.mode===hr&&(s.mode=Fs),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,w=p,_=y,S=Dr;e:for(;;)switch(s.mode){case Za:if(s.wrap===0){s.mode=Fs;break}for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.wrap&2&&u===35615){s.check=0,x[0]=u&255,x[1]=u>>>8&255,s.check=ar(s.check,x,2,0),u=0,d=0,s.mode=nn;break}if(s.flags=0,s.head&&(s.head.done=!1),!(s.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",s.mode=be;break}if((u&15)!==sn){e.msg="unknown compression method",s.mode=be;break}if(u>>>=4,d-=4,N=(u&15)+8,s.wbits===0)s.wbits=N;else if(N>s.wbits){e.msg="invalid window size",s.mode=be;break}s.dmax=1<<N,e.adler=s.check=1,s.mode=u&512?dn:hr,u=0,d=0;break;case nn:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.flags=u,(s.flags&255)!==sn){e.msg="unknown compression method",s.mode=be;break}if(s.flags&57344){e.msg="unknown header flags set",s.mode=be;break}s.head&&(s.head.text=u>>8&1),s.flags&512&&(x[0]=u&255,x[1]=u>>>8&255,s.check=ar(s.check,x,2,0)),u=0,d=0,s.mode=an;case an:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.time=u),s.flags&512&&(x[0]=u&255,x[1]=u>>>8&255,x[2]=u>>>16&255,x[3]=u>>>24&255,s.check=ar(s.check,x,4,0)),u=0,d=0,s.mode=on;case on:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.xflags=u&255,s.head.os=u>>8),s.flags&512&&(x[0]=u&255,x[1]=u>>>8&255,s.check=ar(s.check,x,2,0)),u=0,d=0,s.mode=pn;case pn:if(s.flags&1024){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length=u,s.head&&(s.head.extra_len=u),s.flags&512&&(x[0]=u&255,x[1]=u>>>8&255,s.check=ar(s.check,x,2,0)),u=0,d=0}else s.head&&(s.head.extra=null);s.mode=fn;case fn:if(s.flags&1024&&(b=s.length,b>p&&(b=p),b&&(s.head&&(N=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),ze.arraySet(s.head.extra,n,i,b,N)),s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,s.length-=b),s.length))break e;s.length=0,s.mode=ln;case ln:if(s.flags&2048){if(p===0)break e;b=0;do N=n[i+b++],s.head&&N&&s.length<65536&&(s.head.name+=String.fromCharCode(N));while(N&&b<p);if(s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,N)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=un;case un:if(s.flags&4096){if(p===0)break e;b=0;do N=n[i+b++],s.head&&N&&s.length<65536&&(s.head.comment+=String.fromCharCode(N));while(N&&b<p);if(s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,N)break e}else s.head&&(s.head.comment=null);s.mode=cn;case cn:if(s.flags&512){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.check&65535)){e.msg="header crc mismatch",s.mode=be;break}u=0,d=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=hr;break;case dn:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}e.adler=s.check=xn(u),u=0,d=0,s.mode=rs;case rs:if(s.havedict===0)return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,Zf;e.adler=s.check=1,s.mode=hr;case hr:if(r===Wf||r===Ct)break e;case Fs:if(s.last){u>>>=d&7,d-=d&7,s.mode=Is;break}for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}switch(s.last=u&1,u>>>=1,d-=1,u&3){case 0:s.mode=hn;break;case 1:if(rl(s),s.mode=Dt,r===Ct){u>>>=2,d-=2;break e}break;case 2:s.mode=mn;break;case 3:e.msg="invalid block type",s.mode=be}u>>>=2,d-=2;break;case hn:for(u>>>=d&7,d-=d&7;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",s.mode=be;break}if(s.length=u&65535,u=0,d=0,s.mode=Bs,r===Ct)break e;case Bs:s.mode=yn;case yn:if(b=s.length,b){if(b>p&&(b=p),b>y&&(b=y),b===0)break e;ze.arraySet(o,n,i,b,t),p-=b,i+=b,y-=b,t+=b,s.length-=b;break}s.mode=hr;break;case mn:for(;d<14;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.nlen=(u&31)+257,u>>>=5,d-=5,s.ndist=(u&31)+1,u>>>=5,d-=5,s.ncode=(u&15)+4,u>>>=4,d-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=be;break}s.have=0,s.mode=gn;case gn:for(;s.have<s.ncode;){for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.lens[D[s.have++]]=u&7,u>>>=3,d-=3}for(;s.have<19;)s.lens[D[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,E={bits:s.lenbits},S=yt(Mf,s.lens,0,19,s.lencode,0,s.work,E),s.lenbits=E.bits,S){e.msg="invalid code lengths set",s.mode=be;break}s.have=0,s.mode=wn;case wn:for(;s.have<s.nlen+s.ndist;){for(;q=s.lencode[u&(1<<s.lenbits)-1],C=q>>>24,M=q>>>16&255,I=q&65535,!(C<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(I<16)u>>>=C,d-=C,s.lens[s.have++]=I;else{if(I===16){for(O=C+2;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u>>>=C,d-=C,s.have===0){e.msg="invalid bit length repeat",s.mode=be;break}N=s.lens[s.have-1],b=3+(u&3),u>>>=2,d-=2}else if(I===17){for(O=C+3;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=C,d-=C,N=0,b=3+(u&7),u>>>=3,d-=3}else{for(O=C+7;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=C,d-=C,N=0,b=11+(u&127),u>>>=7,d-=7}if(s.have+b>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=be;break}for(;b--;)s.lens[s.have++]=N}}if(s.mode===be)break;if(s.lens[256]===0){e.msg="invalid code -- missing end-of-block",s.mode=be;break}if(s.lenbits=9,E={bits:s.lenbits},S=yt(za,s.lens,0,s.nlen,s.lencode,0,s.work,E),s.lenbits=E.bits,S){e.msg="invalid literal/lengths set",s.mode=be;break}if(s.distbits=6,s.distcode=s.distdyn,E={bits:s.distbits},S=yt(Ma,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,E),s.distbits=E.bits,S){e.msg="invalid distances set",s.mode=be;break}if(s.mode=Dt,r===Ct)break e;case Dt:s.mode=qt;case qt:if(p>=6&&y>=258){e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,zf(e,_),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,s.mode===hr&&(s.back=-1);break}for(s.back=0;q=s.lencode[u&(1<<s.lenbits)-1],C=q>>>24,M=q>>>16&255,I=q&65535,!(C<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(M&&!(M&240)){for(U=C,A=M,T=I;q=s.lencode[T+((u&(1<<U+A)-1)>>U)],C=q>>>24,M=q>>>16&255,I=q&65535,!(U+C<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=U,d-=U,s.back+=U}if(u>>>=C,d-=C,s.back+=C,s.length=I,M===0){s.mode=kn;break}if(M&32){s.back=-1,s.mode=hr;break}if(M&64){e.msg="invalid literal/length code",s.mode=be;break}s.extra=M&15,s.mode=bn;case bn:if(s.extra){for(O=s.extra;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=_n;case _n:for(;q=s.distcode[u&(1<<s.distbits)-1],C=q>>>24,M=q>>>16&255,I=q&65535,!(C<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(!(M&240)){for(U=C,A=M,T=I;q=s.distcode[T+((u&(1<<U+A)-1)>>U)],C=q>>>24,M=q>>>16&255,I=q&65535,!(U+C<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=U,d-=U,s.back+=U}if(u>>>=C,d-=C,s.back+=C,M&64){e.msg="invalid distance code",s.mode=be;break}s.offset=I,s.extra=M&15,s.mode=vn;case vn:if(s.extra){for(O=s.extra;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.offset+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=be;break}s.mode=Pn;case Pn:if(y===0)break e;if(b=_-y,s.offset>b){if(b=s.offset-b,b>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=be;break}b>s.wnext?(b-=s.wnext,B=s.wsize-b):B=s.wnext-b,b>s.length&&(b=s.length),P=s.window}else P=o,B=t-s.offset,b=s.length;b>y&&(b=y),y-=b,s.length-=b;do o[t++]=P[B++];while(--b);s.length===0&&(s.mode=qt);break;case kn:if(y===0)break e;o[t++]=s.length,y--,s.mode=qt;break;case Is:if(s.wrap){for(;d<32;){if(p===0)break e;p--,u|=n[i++]<<d,d+=8}if(_-=y,e.total_out+=_,s.total+=_,_&&(e.adler=s.check=s.flags?ar(s.check,o,_,t-_):Js(s.check,o,_,t-_)),_=y,(s.flags?u:xn(u))!==s.check){e.msg="incorrect data check",s.mode=be;break}u=0,d=0}s.mode=En;case En:if(s.wrap&&s.flags){for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.total&4294967295)){e.msg="incorrect length check",s.mode=be;break}u=0,d=0}s.mode=On;case On:S=Hf;break e;case be:S=Wa;break e;case Va:return Ha;case Gf:default:return Ge}return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,(s.wsize||_!==e.avail_out&&s.mode<be&&(s.mode<Is||r!==tn))&&Qa(e,e.output,e.next_out,_-e.avail_out),w-=e.avail_in,_-=e.avail_out,e.total_in+=w,e.total_out+=_,s.total+=_,s.wrap&&_&&(e.adler=s.check=s.flags?ar(s.check,o,_,e.next_out-_):Js(s.check,o,_,e.next_out-_)),e.data_type=s.bits+(s.last?64:0)+(s.mode===hr?128:0)+(s.mode===Dt||s.mode===Bs?256:0),(w===0&&_===0||r===tn)&&S===Dr&&(S=Vf),S}function sl(e){if(!e||!e.state)return Ge;var r=e.state;return r.window&&(r.window=null),e.state=null,Dr}function il(e,r){var s;return!e||!e.state||(s=e.state,!(s.wrap&2))?Ge:(s.head=r,r.done=!1,Dr)}function nl(e,r){var s=r.length,n,o,i;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==rs)?Ge:n.mode===rs&&(o=1,o=Js(o,r,s,0),o!==n.check)?Wa:(i=Qa(e,r,s,s),i?(n.mode=Va,Ha):(n.havedict=1,Dr))}rr.inflateReset=Ya;rr.inflateReset2=Ka;rr.inflateResetKeep=Ga;rr.inflateInit=el;rr.inflateInit2=Xa;rr.inflate=tl;rr.inflateEnd=sl;rr.inflateGetHeader=il;rr.inflateSetDictionary=nl;rr.inflateInfo="pako inflate (from Nodeca project)";var Ja={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function al(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var ol=al,tt=rr,mt=br,Vt=zr,ke=Ja,ei=vi,pl=qa,fl=ol,eo=Object.prototype.toString;function qr(e){if(!(this instanceof qr))return new qr(e);this.options=mt.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new pl,this.strm.avail_out=0;var s=tt.inflateInit2(this.strm,r.windowBits);if(s!==ke.Z_OK)throw new Error(ei[s]);if(this.header=new fl,tt.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Vt.string2buf(r.dictionary):eo.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(s=tt.inflateSetDictionary(this.strm,r.dictionary),s!==ke.Z_OK)))throw new Error(ei[s])}qr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o=this.options.dictionary,i,t,p,y,u,d=!1;if(this.ended)return!1;t=r===~~r?r:r===!0?ke.Z_FINISH:ke.Z_NO_FLUSH,typeof e=="string"?s.input=Vt.binstring2buf(e):eo.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new mt.Buf8(n),s.next_out=0,s.avail_out=n),i=tt.inflate(s,ke.Z_NO_FLUSH),i===ke.Z_NEED_DICT&&o&&(i=tt.inflateSetDictionary(this.strm,o)),i===ke.Z_BUF_ERROR&&d===!0&&(i=ke.Z_OK,d=!1),i!==ke.Z_STREAM_END&&i!==ke.Z_OK)return this.onEnd(i),this.ended=!0,!1;s.next_out&&(s.avail_out===0||i===ke.Z_STREAM_END||s.avail_in===0&&(t===ke.Z_FINISH||t===ke.Z_SYNC_FLUSH))&&(this.options.to==="string"?(p=Vt.utf8border(s.output,s.next_out),y=s.next_out-p,u=Vt.buf2string(s.output,p),s.next_out=y,s.avail_out=n-y,y&&mt.arraySet(s.output,s.output,p,y,0),this.onData(u)):this.onData(mt.shrinkBuf(s.output,s.next_out))),s.avail_in===0&&s.avail_out===0&&(d=!0)}while((s.avail_in>0||s.avail_out===0)&&i!==ke.Z_STREAM_END);return i===ke.Z_STREAM_END&&(t=ke.Z_FINISH),t===ke.Z_FINISH?(i=tt.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ke.Z_OK):(t===ke.Z_SYNC_FLUSH&&(this.onEnd(ke.Z_OK),s.avail_out=0),!0)};qr.prototype.onData=function(e){this.chunks.push(e)};qr.prototype.onEnd=function(e){e===ke.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=mt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ki(e,r){var s=new qr(r);if(s.push(e,!0),s.err)throw s.msg||ei[s.err];return s.result}function ll(e,r){return r=r||{},r.raw=!0,ki(e,r)}St.Inflate=qr;St.inflate=ki;St.inflateRaw=ll;St.ungzip=ki;var ul=br.assign,cl=Tt,dl=St,hl=Ja,ro={};ul(ro,cl,dl,hl);var yl=ro;const to=di(yl);async function ml(e,r){const s=new ua(e);let n=await s.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new _e(`Invalid PACK header '${n}'`);let o=await s.read(4);if(o=o.readUInt32BE(0),o!==2)throw new _e(`Invalid packfile version: ${o}`);let i=await s.read(4);if(i=i.readUInt32BE(0),!(i<1))for(;!s.eof()&&i--;){const t=s.tell(),{type:p,length:y,ofs:u,reference:d}=await gl(s),w=new to.Inflate;for(;!w.result;){const _=await s.chunk();if(!_)break;if(w.push(_,!1),w.err)throw new _e(`Pako error: ${w.msg}`);if(w.result){if(w.result.length!==y)throw new _e("Inflated object size is different from that stated in packfile.");await s.undo(),await s.read(_.length-w.strm.avail_in);const b=s.tell();await r({data:w.result,type:p,num:i,offset:t,end:b,reference:d,ofs:u})}}}}async function gl(e){let r=await e.byte();const s=r>>4&7;let n=r&15;if(r&128){let t=4;do r=await e.byte(),n|=(r&127)<<t,t+=7;while(r&128)}let o,i;if(s===6){let t=0;o=0;const p=[];do r=await e.byte(),o|=(r&127)<<t,t+=7,p.push(r);while(r&128);i=Buffer.from(p)}return s===7&&(i=await e.read(20)),{type:s,length:n,ofs:o,reference:i}}let wl=!1;async function bl(e){return wl?_l(e):to.inflate(e)}async function _l(e){const r=new DecompressionStream("deflate"),s=new Blob([e]).stream().pipeThrough(r);return new Uint8Array(await new Response(s).arrayBuffer())}var ri={exports:{}};typeof Object.create=="function"?ri.exports=function(r,s){s&&(r.super_=s,r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:ri.exports=function(r,s){if(s){r.super_=s;var n=function(){};n.prototype=s.prototype,r.prototype=new n,r.prototype.constructor=r}};var vl=ri.exports,ti={exports:{}},wr={},ys={};ys.byteLength=El;ys.toByteArray=xl;ys.fromByteArray=Al;var lr=[],He=[],Pl=typeof Uint8Array<"u"?Uint8Array:Array,Ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Kr=0,kl=Ns.length;Kr<kl;++Kr)lr[Kr]=Ns[Kr],He[Ns.charCodeAt(Kr)]=Kr;He["-".charCodeAt(0)]=62;He["_".charCodeAt(0)]=63;function so(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=e.indexOf("=");s===-1&&(s=r);var n=s===r?0:4-s%4;return[s,n]}function El(e){var r=so(e),s=r[0],n=r[1];return(s+n)*3/4-n}function Ol(e,r,s){return(r+s)*3/4-s}function xl(e){var r,s=so(e),n=s[0],o=s[1],i=new Pl(Ol(e,n,o)),t=0,p=o>0?n-4:n,y;for(y=0;y<p;y+=4)r=He[e.charCodeAt(y)]<<18|He[e.charCodeAt(y+1)]<<12|He[e.charCodeAt(y+2)]<<6|He[e.charCodeAt(y+3)],i[t++]=r>>16&255,i[t++]=r>>8&255,i[t++]=r&255;return o===2&&(r=He[e.charCodeAt(y)]<<2|He[e.charCodeAt(y+1)]>>4,i[t++]=r&255),o===1&&(r=He[e.charCodeAt(y)]<<10|He[e.charCodeAt(y+1)]<<4|He[e.charCodeAt(y+2)]>>2,i[t++]=r>>8&255,i[t++]=r&255),i}function Tl(e){return lr[e>>18&63]+lr[e>>12&63]+lr[e>>6&63]+lr[e&63]}function $l(e,r,s){for(var n,o=[],i=r;i<s;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(Tl(n));return o.join("")}function Al(e){for(var r,s=e.length,n=s%3,o=[],i=16383,t=0,p=s-n;t<p;t+=i)o.push($l(e,t,t+i>p?p:t+i));return n===1?(r=e[s-1],o.push(lr[r>>2]+lr[r<<4&63]+"==")):n===2&&(r=(e[s-2]<<8)+e[s-1],o.push(lr[r>>10]+lr[r>>4&63]+lr[r<<2&63]+"=")),o.join("")}var Ei={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ei.read=function(e,r,s,n,o){var i,t,p=o*8-n-1,y=(1<<p)-1,u=y>>1,d=-7,w=s?o-1:0,_=s?-1:1,b=e[r+w];for(w+=_,i=b&(1<<-d)-1,b>>=-d,d+=p;d>0;i=i*256+e[r+w],w+=_,d-=8);for(t=i&(1<<-d)-1,i>>=-d,d+=n;d>0;t=t*256+e[r+w],w+=_,d-=8);if(i===0)i=1-u;else{if(i===y)return t?NaN:(b?-1:1)*(1/0);t=t+Math.pow(2,n),i=i-u}return(b?-1:1)*t*Math.pow(2,i-n)};Ei.write=function(e,r,s,n,o,i){var t,p,y,u=i*8-o-1,d=(1<<u)-1,w=d>>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,B=n?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,t=d):(t=Math.floor(Math.log(r)/Math.LN2),r*(y=Math.pow(2,-t))<1&&(t--,y*=2),t+w>=1?r+=_/y:r+=_*Math.pow(2,1-w),r*y>=2&&(t++,y/=2),t+w>=d?(p=0,t=d):t+w>=1?(p=(r*y-1)*Math.pow(2,o),t=t+w):(p=r*Math.pow(2,w-1)*Math.pow(2,o),t=0));o>=8;e[s+b]=p&255,b+=B,p/=256,o-=8);for(t=t<<o|p,u+=o;u>0;e[s+b]=t&255,b+=B,t/=256,u-=8);e[s+b-B]|=P*128};/*!
708
+ * The buffer module from node.js, for the browser.
709
+ *
710
+ * @author Feross Aboukhadijeh <https://feross.org>
711
+ * @license MIT
712
+ */(function(e){const r=ys,s=Ei,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=p,e.SlowBuffer=M,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,p.TYPED_ARRAY_SUPPORT=i(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const c=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),c.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function t(c){if(c>o)throw new RangeError('The value "'+c+'" is invalid for option "size"');const f=new Uint8Array(c);return Object.setPrototypeOf(f,p.prototype),f}function p(c,f,l){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(c)}return y(c,f,l)}p.poolSize=8192;function y(c,f,l){if(typeof c=="string")return _(c,f);if(ArrayBuffer.isView(c))return B(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Be(c,ArrayBuffer)||c&&Be(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(c,SharedArrayBuffer)||c&&Be(c.buffer,SharedArrayBuffer)))return P(c,f,l);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=c.valueOf&&c.valueOf();if(g!=null&&g!==c)return p.from(g,f,l);const v=q(c);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return p.from(c[Symbol.toPrimitive]("string"),f,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}p.from=function(c,f,l){return y(c,f,l)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function u(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function d(c,f,l){return u(c),c<=0?t(c):f!==void 0?typeof l=="string"?t(c).fill(f,l):t(c).fill(f):t(c)}p.alloc=function(c,f,l){return d(c,f,l)};function w(c){return u(c),t(c<0?0:C(c)|0)}p.allocUnsafe=function(c){return w(c)},p.allocUnsafeSlow=function(c){return w(c)};function _(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!p.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const l=I(c,f)|0;let g=t(l);const v=g.write(c,f);return v!==l&&(g=g.slice(0,v)),g}function b(c){const f=c.length<0?0:C(c.length)|0,l=t(f);for(let g=0;g<f;g+=1)l[g]=c[g]&255;return l}function B(c){if(Be(c,Uint8Array)){const f=new Uint8Array(c);return P(f.buffer,f.byteOffset,f.byteLength)}return b(c)}function P(c,f,l){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(l||0))throw new RangeError('"length" is outside of buffer bounds');let g;return f===void 0&&l===void 0?g=new Uint8Array(c):l===void 0?g=new Uint8Array(c,f):g=new Uint8Array(c,f,l),Object.setPrototypeOf(g,p.prototype),g}function q(c){if(p.isBuffer(c)){const f=C(c.length)|0,l=t(f);return l.length===0||c.copy(l,0,0,f),l}if(c.length!==void 0)return typeof c.length!="number"||Ae(c.length)?t(0):b(c);if(c.type==="Buffer"&&Array.isArray(c.data))return b(c.data)}function C(c){if(c>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return c|0}function M(c){return+c!=c&&(c=0),p.alloc(+c)}p.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==p.prototype},p.compare=function(f,l){if(Be(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),Be(l,Uint8Array)&&(l=p.from(l,l.offset,l.byteLength)),!p.isBuffer(f)||!p.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===l)return 0;let g=f.length,v=l.length;for(let $=0,j=Math.min(g,v);$<j;++$)if(f[$]!==l[$]){g=f[$],v=l[$];break}return g<v?-1:v<g?1:0},p.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(f,l){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return p.alloc(0);let g;if(l===void 0)for(l=0,g=0;g<f.length;++g)l+=f[g].length;const v=p.allocUnsafe(l);let $=0;for(g=0;g<f.length;++g){let j=f[g];if(Be(j,Uint8Array))$+j.length>v.length?(p.isBuffer(j)||(j=p.from(j)),j.copy(v,$)):Uint8Array.prototype.set.call(v,j,$);else if(p.isBuffer(j))j.copy(v,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=j.length}return v};function I(c,f){if(p.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Be(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const l=c.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&l===0)return 0;let v=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return vr(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return Ar(c).length;default:if(v)return g?-1:vr(c).length;f=(""+f).toLowerCase(),v=!0}}p.byteLength=I;function U(c,f,l){let g=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,f>>>=0,l<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return V(this,f,l);case"utf8":case"utf-8":return F(this,f,l);case"ascii":return H(this,f,l);case"latin1":case"binary":return K(this,f,l);case"base64":return L(this,f,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,f,l);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),g=!0}}p.prototype._isBuffer=!0;function A(c,f,l){const g=c[f];c[f]=c[l],c[l]=g}p.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<f;l+=2)A(this,l,l+1);return this},p.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<f;l+=4)A(this,l,l+3),A(this,l+1,l+2);return this},p.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<f;l+=8)A(this,l,l+7),A(this,l+1,l+6),A(this,l+2,l+5),A(this,l+3,l+4);return this},p.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?F(this,0,f):U.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(f){if(!p.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:p.compare(this,f)===0},p.prototype.inspect=function(){let f="";const l=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(f+=" ... "),"<Buffer "+f+">"},n&&(p.prototype[n]=p.prototype.inspect),p.prototype.compare=function(f,l,g,v,$){if(Be(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),!p.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(l===void 0&&(l=0),g===void 0&&(g=f?f.length:0),v===void 0&&(v=0),$===void 0&&($=this.length),l<0||g>f.length||v<0||$>this.length)throw new RangeError("out of range index");if(v>=$&&l>=g)return 0;if(v>=$)return-1;if(l>=g)return 1;if(l>>>=0,g>>>=0,v>>>=0,$>>>=0,this===f)return 0;let j=$-v,J=g-l;const ye=Math.min(j,J),de=this.slice(v,$),he=f.slice(l,g);for(let ae=0;ae<ye;++ae)if(de[ae]!==he[ae]){j=de[ae],J=he[ae];break}return j<J?-1:J<j?1:0};function T(c,f,l,g,v){if(c.length===0)return-1;if(typeof l=="string"?(g=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Ae(l)&&(l=v?0:c.length-1),l<0&&(l=c.length+l),l>=c.length){if(v)return-1;l=c.length-1}else if(l<0)if(v)l=0;else return-1;if(typeof f=="string"&&(f=p.from(f,g)),p.isBuffer(f))return f.length===0?-1:N(c,f,l,g,v);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(c,f,l):Uint8Array.prototype.lastIndexOf.call(c,f,l):N(c,[f],l,g,v);throw new TypeError("val must be string, number or Buffer")}function N(c,f,l,g,v){let $=1,j=c.length,J=f.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(c.length<2||f.length<2)return-1;$=2,j/=2,J/=2,l/=2}function ye(he,ae){return $===1?he[ae]:he.readUInt16BE(ae*$)}let de;if(v){let he=-1;for(de=l;de<j;de++)if(ye(c,de)===ye(f,he===-1?0:de-he)){if(he===-1&&(he=de),de-he+1===J)return he*$}else he!==-1&&(de-=de-he),he=-1}else for(l+J>j&&(l=j-J),de=l;de>=0;de--){let he=!0;for(let ae=0;ae<J;ae++)if(ye(c,de+ae)!==ye(f,ae)){he=!1;break}if(he)return de}return-1}p.prototype.includes=function(f,l,g){return this.indexOf(f,l,g)!==-1},p.prototype.indexOf=function(f,l,g){return T(this,f,l,g,!0)},p.prototype.lastIndexOf=function(f,l,g){return T(this,f,l,g,!1)};function S(c,f,l,g){l=Number(l)||0;const v=c.length-l;g?(g=Number(g),g>v&&(g=v)):g=v;const $=f.length;g>$/2&&(g=$/2);let j;for(j=0;j<g;++j){const J=parseInt(f.substr(j*2,2),16);if(Ae(J))return j;c[l+j]=J}return j}function x(c,f,l,g){return Me(vr(f,c.length-l),c,l,g)}function E(c,f,l,g){return Me(Hr(f),c,l,g)}function O(c,f,l,g){return Me(Ar(f),c,l,g)}function D(c,f,l,g){return Me(dr(f,c.length-l),c,l,g)}p.prototype.write=function(f,l,g,v){if(l===void 0)v="utf8",g=this.length,l=0;else if(g===void 0&&typeof l=="string")v=l,g=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(g)?(g=g>>>0,v===void 0&&(v="utf8")):(v=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-l;if((g===void 0||g>$)&&(g=$),f.length>0&&(g<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let j=!1;for(;;)switch(v){case"hex":return S(this,f,l,g);case"utf8":case"utf-8":return x(this,f,l,g);case"ascii":case"latin1":case"binary":return E(this,f,l,g);case"base64":return O(this,f,l,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,f,l,g);default:if(j)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),j=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(c,f,l){return f===0&&l===c.length?r.fromByteArray(c):r.fromByteArray(c.slice(f,l))}function F(c,f,l){l=Math.min(c.length,l);const g=[];let v=f;for(;v<l;){const $=c[v];let j=null,J=$>239?4:$>223?3:$>191?2:1;if(v+J<=l){let ye,de,he,ae;switch(J){case 1:$<128&&(j=$);break;case 2:ye=c[v+1],(ye&192)===128&&(ae=($&31)<<6|ye&63,ae>127&&(j=ae));break;case 3:ye=c[v+1],de=c[v+2],(ye&192)===128&&(de&192)===128&&(ae=($&15)<<12|(ye&63)<<6|de&63,ae>2047&&(ae<55296||ae>57343)&&(j=ae));break;case 4:ye=c[v+1],de=c[v+2],he=c[v+3],(ye&192)===128&&(de&192)===128&&(he&192)===128&&(ae=($&15)<<18|(ye&63)<<12|(de&63)<<6|he&63,ae>65535&&ae<1114112&&(j=ae))}}j===null?(j=65533,J=1):j>65535&&(j-=65536,g.push(j>>>10&1023|55296),j=56320|j&1023),g.push(j),v+=J}return Z(g)}const Y=4096;function Z(c){const f=c.length;if(f<=Y)return String.fromCharCode.apply(String,c);let l="",g=0;for(;g<f;)l+=String.fromCharCode.apply(String,c.slice(g,g+=Y));return l}function H(c,f,l){let g="";l=Math.min(c.length,l);for(let v=f;v<l;++v)g+=String.fromCharCode(c[v]&127);return g}function K(c,f,l){let g="";l=Math.min(c.length,l);for(let v=f;v<l;++v)g+=String.fromCharCode(c[v]);return g}function V(c,f,l){const g=c.length;(!f||f<0)&&(f=0),(!l||l<0||l>g)&&(l=g);let v="";for(let $=f;$<l;++$)v+=Zr[c[$]];return v}function se(c,f,l){const g=c.slice(f,l);let v="";for(let $=0;$<g.length-1;$+=2)v+=String.fromCharCode(g[$]+g[$+1]*256);return v}p.prototype.slice=function(f,l){const g=this.length;f=~~f,l=l===void 0?g:~~l,f<0?(f+=g,f<0&&(f=0)):f>g&&(f=g),l<0?(l+=g,l<0&&(l=0)):l>g&&(l=g),l<f&&(l=f);const v=this.subarray(f,l);return Object.setPrototypeOf(v,p.prototype),v};function ee(c,f,l){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>l)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f],$=1,j=0;for(;++j<l&&($*=256);)v+=this[f+j]*$;return v},p.prototype.readUintBE=p.prototype.readUIntBE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f+--l],$=1;for(;l>0&&($*=256);)v+=this[f+--l]*$;return v},p.prototype.readUint8=p.prototype.readUInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]|this[f+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]<<8|this[f+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},p.prototype.readBigUInt64LE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,$=this[++f]+this[++f]*2**8+this[++f]*2**16+g*2**24;return BigInt(v)+(BigInt($)<<BigInt(32))}),p.prototype.readBigUInt64BE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=l*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],$=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+g;return(BigInt(v)<<BigInt(32))+BigInt($)}),p.prototype.readIntLE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f],$=1,j=0;for(;++j<l&&($*=256);)v+=this[f+j]*$;return $*=128,v>=$&&(v-=Math.pow(2,8*l)),v},p.prototype.readIntBE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=l,$=1,j=this[f+--v];for(;v>0&&($*=256);)j+=this[f+--v]*$;return $*=128,j>=$&&(j-=Math.pow(2,8*l)),j},p.prototype.readInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},p.prototype.readInt16LE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const g=this[f]|this[f+1]<<8;return g&32768?g|4294901760:g},p.prototype.readInt16BE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const g=this[f+1]|this[f]<<8;return g&32768?g|4294901760:g},p.prototype.readInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},p.prototype.readInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},p.prototype.readBigInt64LE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(g<<24);return(BigInt(v)<<BigInt(32))+BigInt(l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),p.prototype.readBigInt64BE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=(l<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(v)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+g)}),p.prototype.readFloatLE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!0,23,4)},p.prototype.readFloatBE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!1,23,4)},p.prototype.readDoubleLE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!0,52,8)},p.prototype.readDoubleBE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!1,52,8)};function X(c,f,l,g,v,$){if(!p.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>v||f<$)throw new RangeError('"value" argument is out of bounds');if(l+g>c.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(f,l,g,v){if(f=+f,l=l>>>0,g=g>>>0,!v){const J=Math.pow(2,8*g)-1;X(this,f,l,g,J,0)}let $=1,j=0;for(this[l]=f&255;++j<g&&($*=256);)this[l+j]=f/$&255;return l+g},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(f,l,g,v){if(f=+f,l=l>>>0,g=g>>>0,!v){const J=Math.pow(2,8*g)-1;X(this,f,l,g,J,0)}let $=g-1,j=1;for(this[l+$]=f&255;--$>=0&&(j*=256);)this[l+$]=f/j&255;return l+g},p.prototype.writeUint8=p.prototype.writeUInt8=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,1,255,0),this[l]=f&255,l+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,65535,0),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,65535,0),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,4294967295,0),this[l+3]=f>>>24,this[l+2]=f>>>16,this[l+1]=f>>>8,this[l]=f&255,l+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,4294967295,0),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4};function Q(c,f,l,g,v){sr(f,g,v,c,l,7);let $=Number(f&BigInt(4294967295));c[l++]=$,$=$>>8,c[l++]=$,$=$>>8,c[l++]=$,$=$>>8,c[l++]=$;let j=Number(f>>BigInt(32)&BigInt(4294967295));return c[l++]=j,j=j>>8,c[l++]=j,j=j>>8,c[l++]=j,j=j>>8,c[l++]=j,l}function re(c,f,l,g,v){sr(f,g,v,c,l,7);let $=Number(f&BigInt(4294967295));c[l+7]=$,$=$>>8,c[l+6]=$,$=$>>8,c[l+5]=$,$=$>>8,c[l+4]=$;let j=Number(f>>BigInt(32)&BigInt(4294967295));return c[l+3]=j,j=j>>8,c[l+2]=j,j=j>>8,c[l+1]=j,j=j>>8,c[l]=j,l+8}p.prototype.writeBigUInt64LE=Ee(function(f,l=0){return Q(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=Ee(function(f,l=0){return re(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(f,l,g,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*g-1);X(this,f,l,g,ye-1,-ye)}let $=0,j=1,J=0;for(this[l]=f&255;++$<g&&(j*=256);)f<0&&J===0&&this[l+$-1]!==0&&(J=1),this[l+$]=(f/j>>0)-J&255;return l+g},p.prototype.writeIntBE=function(f,l,g,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*g-1);X(this,f,l,g,ye-1,-ye)}let $=g-1,j=1,J=0;for(this[l+$]=f&255;--$>=0&&(j*=256);)f<0&&J===0&&this[l+$+1]!==0&&(J=1),this[l+$]=(f/j>>0)-J&255;return l+g},p.prototype.writeInt8=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,1,127,-128),f<0&&(f=255+f+1),this[l]=f&255,l+1},p.prototype.writeInt16LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,32767,-32768),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeInt16BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,32767,-32768),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeInt32LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,2147483647,-2147483648),this[l]=f&255,this[l+1]=f>>>8,this[l+2]=f>>>16,this[l+3]=f>>>24,l+4},p.prototype.writeInt32BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4},p.prototype.writeBigInt64LE=Ee(function(f,l=0){return Q(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=Ee(function(f,l=0){return re(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(c,f,l,g,v,$){if(l+g>c.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function te(c,f,l,g,v){return f=+f,l=l>>>0,v||ne(c,f,l,4),s.write(c,f,l,g,23,4),l+4}p.prototype.writeFloatLE=function(f,l,g){return te(this,f,l,!0,g)},p.prototype.writeFloatBE=function(f,l,g){return te(this,f,l,!1,g)};function we(c,f,l,g,v){return f=+f,l=l>>>0,v||ne(c,f,l,8),s.write(c,f,l,g,52,8),l+8}p.prototype.writeDoubleLE=function(f,l,g){return we(this,f,l,!0,g)},p.prototype.writeDoubleBE=function(f,l,g){return we(this,f,l,!1,g)},p.prototype.copy=function(f,l,g,v){if(!p.isBuffer(f))throw new TypeError("argument should be a Buffer");if(g||(g=0),!v&&v!==0&&(v=this.length),l>=f.length&&(l=f.length),l||(l=0),v>0&&v<g&&(v=g),v===g||f.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),f.length-l<v-g&&(v=f.length-l+g);const $=v-g;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,g,v):Uint8Array.prototype.set.call(f,this.subarray(g,v),l),$},p.prototype.fill=function(f,l,g,v){if(typeof f=="string"){if(typeof l=="string"?(v=l,l=0,g=this.length):typeof g=="string"&&(v=g,g=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!p.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(f.length===1){const j=f.charCodeAt(0);(v==="utf8"&&j<128||v==="latin1")&&(f=j)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(l<0||this.length<l||this.length<g)throw new RangeError("Out of range index");if(g<=l)return this;l=l>>>0,g=g===void 0?this.length:g>>>0,f||(f=0);let $;if(typeof f=="number")for($=l;$<g;++$)this[$]=f;else{const j=p.isBuffer(f)?f:p.from(f,v),J=j.length;if(J===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for($=0;$<g-l;++$)this[$+l]=j[$%J]}return this};const ve={};function Le(c,f,l){ve[c]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}Le("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Le("ERR_INVALID_ARG_TYPE",function(c,f){return`The "${c}" argument must be of type number. Received type ${typeof f}`},TypeError),Le("ERR_OUT_OF_RANGE",function(c,f,l){let g=`The value of "${c}" is out of range.`,v=l;return Number.isInteger(l)&&Math.abs(l)>2**32?v=tr(String(l)):typeof l=="bigint"&&(v=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(v=tr(v)),v+="n"),g+=` It must be ${f}. Received ${v}`,g},RangeError);function tr(c){let f="",l=c.length;const g=c[0]==="-"?1:0;for(;l>=g+4;l-=3)f=`_${c.slice(l-3,l)}${f}`;return`${c.slice(0,l)}${f}`}function Mr(c,f,l){Qe(f,"offset"),(c[f]===void 0||c[f+l]===void 0)&&Ce(f,c.length-(l+1))}function sr(c,f,l,g,v,$){if(c>l||c<f){const j=typeof f=="bigint"?"n":"";let J;throw $>3?f===0||f===BigInt(0)?J=`>= 0${j} and < 2${j} ** ${($+1)*8}${j}`:J=`>= -(2${j} ** ${($+1)*8-1}${j}) and < 2 ** ${($+1)*8-1}${j}`:J=`>= ${f}${j} and <= ${l}${j}`,new ve.ERR_OUT_OF_RANGE("value",J,c)}Mr(g,v,$)}function Qe(c,f){if(typeof c!="number")throw new ve.ERR_INVALID_ARG_TYPE(f,"number",c)}function Ce(c,f,l){throw Math.floor(c)!==c?(Qe(c,l),new ve.ERR_OUT_OF_RANGE(l||"offset","an integer",c)):f<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(l||"offset",`>= ${l?1:0} and <= ${f}`,c)}const Wr=/[^+/0-9A-Za-z-_]/g;function cr(c){if(c=c.split("=")[0],c=c.trim().replace(Wr,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function vr(c,f){f=f||1/0;let l;const g=c.length;let v=null;const $=[];for(let j=0;j<g;++j){if(l=c.charCodeAt(j),l>55295&&l<57344){if(!v){if(l>56319){(f-=3)>-1&&$.push(239,191,189);continue}else if(j+1===g){(f-=3)>-1&&$.push(239,191,189);continue}v=l;continue}if(l<56320){(f-=3)>-1&&$.push(239,191,189),v=l;continue}l=(v-55296<<10|l-56320)+65536}else v&&(f-=3)>-1&&$.push(239,191,189);if(v=null,l<128){if((f-=1)<0)break;$.push(l)}else if(l<2048){if((f-=2)<0)break;$.push(l>>6|192,l&63|128)}else if(l<65536){if((f-=3)<0)break;$.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((f-=4)<0)break;$.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return $}function Hr(c){const f=[];for(let l=0;l<c.length;++l)f.push(c.charCodeAt(l)&255);return f}function dr(c,f){let l,g,v;const $=[];for(let j=0;j<c.length&&!((f-=2)<0);++j)l=c.charCodeAt(j),g=l>>8,v=l%256,$.push(v),$.push(g);return $}function Ar(c){return r.toByteArray(cr(c))}function Me(c,f,l,g){let v;for(v=0;v<g&&!(v+l>=f.length||v>=c.length);++v)f[v+l]=c[v];return v}function Be(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function Ae(c){return c!==c}const Zr=function(){const c="0123456789abcdef",f=new Array(256);for(let l=0;l<16;++l){const g=l*16;for(let v=0;v<16;++v)f[g+v]=c[l]+c[v]}return f}();function Ee(c){return typeof BigInt>"u"?Vr:c}function Vr(){throw new Error("BigInt not supported")}})(wr);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,r){var s=wr,n=s.Buffer;function o(t,p){for(var y in t)p[y]=t[y]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=s:(o(s,r),r.Buffer=i);function i(t,p,y){return n(t,p,y)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(t,p,y){if(typeof t=="number")throw new TypeError("Argument must not be a number");return n(t,p,y)},i.alloc=function(t,p,y){if(typeof t!="number")throw new TypeError("Argument must be a number");var u=n(t);return p!==void 0?typeof y=="string"?u.fill(p,y):u.fill(p):u.fill(0),u},i.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return n(t)},i.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(t)}})(ti,ti.exports);var io=ti.exports,no=io.Buffer;function ms(e,r){this._block=no.alloc(e),this._finalSize=r,this._blockSize=e,this._len=0}ms.prototype.update=function(e,r){typeof e=="string"&&(r=r||"utf8",e=no.from(e,r));for(var s=this._block,n=this._blockSize,o=e.length,i=this._len,t=0;t<o;){for(var p=i%n,y=Math.min(o-t,n-p),u=0;u<y;u++)s[p+u]=e[t+u];i+=y,t+=y,i%n===0&&this._update(s)}return this._len+=o,this};ms.prototype.digest=function(e){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var n=(s&4294967295)>>>0,o=(s-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};ms.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Sl=ms,Rl=vl,ao=Sl,Fl=io.Buffer,Bl=[1518500249,1859775393,-1894007588,-899497514],Il=new Array(80);function Rt(){this.init(),this._w=Il,ao.call(this,64,56)}Rl(Rt,ao);Rt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function jl(e){return e<<1|e>>>31}function Ll(e){return e<<5|e>>>27}function Nl(e){return e<<30|e>>>2}function Cl(e,r,s,n){return e===0?r&s|~r&n:e===2?r&s|r&n|s&n:r^s^n}Rt.prototype._update=function(e){for(var r=this._w,s=this._a|0,n=this._b|0,o=this._c|0,i=this._d|0,t=this._e|0,p=0;p<16;++p)r[p]=e.readInt32BE(p*4);for(;p<80;++p)r[p]=jl(r[p-3]^r[p-8]^r[p-14]^r[p-16]);for(var y=0;y<80;++y){var u=~~(y/20),d=Ll(s)+Cl(u,n,o,i)+t+r[y]+Bl[u]|0;t=i,i=o,o=Nl(n),n=s,s=d}this._a=s+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=t+this._e|0};Rt.prototype._hash=function(){var e=Fl.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Dl=Rt;const ql=di(Dl);function Ul(e){let r="";for(const s of new Uint8Array(e))s<16&&(r+="0"),r+=s.toString(16);return r}let Cs=null;async function $n(e){return Cs===null&&(Cs=await Ml()),Cs?oo(e):zl(e)}function zl(e){return new ql().update(e).digest("hex")}async function oo(e){const r=await crypto.subtle.digest("SHA-1",e);return Ul(r)}async function Ml(){try{if(await oo(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch{}return!1}function Wl(e){const r=[];let s=0,n=0;do{s=e.readUInt8();const o=s&127;r.push(o),n=s&128}while(n);return r.reduce((o,i)=>o+1<<7|i,-1)}function Hl(e,r){let s=r,n=4,o=null;do o=e.readUInt8(),s|=(o&127)<<n,n+=7;while(o&128);return s}class kt{constructor(r){Object.assign(this,r),this.offsetCache={}}static async fromIdx({idx:r,getExternalRefDelta:s}){const n=new Sr(r);if(n.slice(4).toString("hex")!=="ff744f63")return;const i=n.readUInt32BE();if(i!==2)throw new _e(`Unable to read version ${i} packfile IDX. (Only version 2 supported)`);if(r.byteLength>2048*1024*1024)throw new _e("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);const t=n.readUInt32BE(),p=[];for(let d=0;d<t;d++){const w=n.slice(20).toString("hex");p[d]=w}n.seek(n.tell()+4*t);const y=new Map;for(let d=0;d<t;d++)y.set(p[d],n.readUInt32BE());const u=n.slice(20).toString("hex");return new kt({hashes:p,crcs:{},offsets:y,packfileSha:u,getExternalRefDelta:s})}static async fromPack({pack:r,getExternalRefDelta:s,onProgress:n}){const o={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},i={},t=r.slice(-20).toString("hex"),p=[],y={},u=new Map;let d=null,w=null;await ml([r],async({data:q,type:C,reference:M,offset:I,num:U})=>{d===null&&(d=U);const A=Math.floor((d-U)*100/d);A!==w&&n&&await n({phase:"Receiving objects",loaded:d-U,total:d}),w=A,C=o[C],["commit","tree","blob","tag"].includes(C)?i[I]={type:C,offset:I}:C==="ofs-delta"?i[I]={type:C,offset:I}:C==="ref-delta"&&(i[I]={type:C,offset:I})});const _=Object.keys(i).map(Number);for(const[q,C]of _.entries()){const M=q+1===_.length?r.byteLength-20:_[q+1],I=i[C],U=_p.buf(r.slice(C,M))>>>0;I.end=M,I.crc=U}const b=new kt({pack:Promise.resolve(r),packfileSha:t,crcs:y,hashes:p,offsets:u,getExternalRefDelta:s});w=null;let B=0;const P=[0,0,0,0,0,0,0,0,0,0,0,0];for(let q in i){q=Number(q);const C=Math.floor(B*100/d);C!==w&&n&&await n({phase:"Resolving deltas",loaded:B,total:d}),B++,w=C;const M=i[q];if(!M.oid)try{b.readDepth=0,b.externalReadDepth=0;const{type:I,object:U}=await b.readSlice({start:q});P[b.readDepth]+=1;const A=await $n(vp.wrap({type:I,object:U}));M.oid=A,p.push(A),u.set(A,q),y[A]=M.crc}catch{continue}}return p.sort(),b}async toBuffer(){const r=[],s=(u,d)=>{r.push(Buffer.from(u,d))};s("ff744f63","hex"),s("00000002","hex");const n=new Sr(Buffer.alloc(256*4));for(let u=0;u<256;u++){let d=0;for(const w of this.hashes)parseInt(w.slice(0,2),16)<=u&&d++;n.writeUInt32BE(d)}r.push(n.buffer);for(const u of this.hashes)s(u,"hex");const o=new Sr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)o.writeUInt32BE(this.crcs[u]);r.push(o.buffer);const i=new Sr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)i.writeUInt32BE(this.offsets.get(u));r.push(i.buffer),s(this.packfileSha,"hex");const t=Buffer.concat(r),p=await $n(t),y=Buffer.alloc(20);return y.write(p,"hex"),Buffer.concat([t,y])}async load({pack:r}){this.pack=r}async unload(){this.pack=null}async read({oid:r}){if(!this.offsets.get(r)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(r);throw new _e(`Could not read object ${r} from packfile`)}const s=this.offsets.get(r);return this.readSlice({start:s})}async readSlice({start:r}){if(this.offsetCache[r])return Object.assign({},this.offsetCache[r]);this.readDepth++;const s={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new _e("Tried to read from a GitPackIndex with no packfile loaded into memory");const n=(await this.pack).slice(r),o=new Sr(n),i=o.readUInt8(),t=i&112;let p=s[t];if(p===void 0)throw new _e("Unrecognized type: 0b"+t.toString(2));const y=i&15;let u=y;i&128&&(u=Hl(o,y));let w=null,_=null;if(p==="ofs_delta"){const B=Wl(o),P=r-B;({object:w,type:p}=await this.readSlice({start:P}))}if(p==="ref_delta"){const B=o.slice(20).toString("hex");({object:w,type:p}=await this.read({oid:B}))}const b=n.slice(o.tell());if(_=Buffer.from(await bl(b)),_.byteLength!==u)throw new _e(`Packfile told us object would have length ${u} but it had length ${_.byteLength}`);return w&&(_=Buffer.from(Pp(_,w))),this.readDepth>3&&(this.offsetCache[r]={type:p,object:_}),{type:p,format:"content",object:_}}}class Et extends st{constructor(r){super(`Expected a 40-char hex object id but saw "${r}".`),this.code=this.name=Et.code,this.data={value:r}}}Et.code="InvalidOidError";class gs extends st{constructor(r,s,n,o){super(`Object ${r} ${o?`at ${o}`:""}was anticipated to be a ${n} but it is a ${s}.`),this.code=this.name=gs.code,this.data={oid:r,actual:s,expected:n,filepath:o}}}gs.code="ObjectTypeError";async function po(e,r){const s=la(e);for(;;){const{value:n,done:o}=await s.next();if(n&&await r(n),o)break}s.return&&s.return()}async function Ot(e){let r=0;const s=[];await po(e,i=>{s.push(i),r+=i.byteLength});const n=new Uint8Array(r);let o=0;for(const i of s)n.set(i,o),o+=i.byteLength;return n}class Ds{constructor(){this._queue=[]}write(r){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){const s=this._waiting;this._waiting=null,s({value:r})}else this._queue.push(r)}end(){if(this._ended=!0,this._waiting){const r=this._waiting;this._waiting=null,r({done:!0})}}destroy(r){this.error=r,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(r=>{this._waiting=r})}}class Zl{static demux(r){const s=$e.streamReader(r),n=new Ds,o=new Ds,i=new Ds,t=async function(){const p=await s();if(p===null)return t();if(p===!0){n.end(),i.end(),r.error?o.destroy(r.error):o.end();return}switch(p[0]){case 1:{o.write(p.slice(1));break}case 2:{i.write(p.slice(1));break}case 3:{const y=p.slice(1);i.write(y),n.end(),i.end(),o.destroy(new Error(y.toString("utf8")));return}default:n.write(p)}t()};return t(),{packetlines:n,packfile:o,progress:i}}}async function fo(e){const{packetlines:r,packfile:s,progress:n}=Zl.demux(e),o=[],i=[],t=[];let p=!1,y=!1;return new Promise((u,d)=>{po(r,w=>{const _=w.toString("utf8").trim();if(_.startsWith("shallow")){const b=_.slice(-41).trim();b.length!==40&&d(new Et(b)),o.push(b)}else if(_.startsWith("unshallow")){const b=_.slice(-41).trim();b.length!==40&&d(new Et(b)),i.push(b)}else if(_.startsWith("ACK")){const[,b,B]=_.split(" ");t.push({oid:b,status:B}),B||(y=!0)}else _.startsWith("NAK")?(p=!0,y=!0):(y=!0,p=!0);y&&(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))}).finally(()=>{y||(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))})})}typeof window<"u"&&(window.Buffer=wr.Buffer);async function Vl(e,r,s){const o=(await uo(e,r))[r],i=await co(e,o),t=await Kl(i,o,s),p=await Xl(e,s.map(u=>t[u].oid)),y={};return await Promise.all(s.map(async u=>{y[u]=await ho(p,t[u].oid)})),y}async function Gl(e,r){const s=await uo(e,r);if(!(r in s))throw new Error(`Branch ${r} not found`);const n=s[r],o=await co(e,n),i=await Yl(o,n);return i!=null&&i.object?lo(i):[]}function lo(e){return e.object.map(r=>{if(r.type==="blob")return{name:r.path,type:"file"};if(r.type==="tree"&&r.object)return{name:r.path,type:"folder",children:lo(r)}}).filter(r=>!!(r!=null&&r.name))}async function uo(e,r){const s=wr.Buffer.from(await Ot([$e.encode(`command=ls-refs
713
+ `),$e.encode(`agent=git/2.37.3
714
+ `),$e.encode(`object-format=sha1
715
+ `),$e.delim(),$e.encode(`peel
716
+ `),$e.encode(`ref-prefix ${r}
717
+ `),$e.flush()])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`,"Git-Protocol":"version=2"},body:s}),o={};for await(const i of Ql(n)){const t=i.indexOf(" "),p=i.slice(0,t),y=i.slice(t+1,i.length-1);o[y]=p}return o}async function co(e,r){const s=wr.Buffer.from(await Ot([$e.encode(`want ${r} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3 filter
718
+ `),$e.encode(`filter blob:none
719
+ `),$e.encode(`shallow ${r}
720
+ `),$e.encode(`deepen 1
721
+ `),$e.flush(),$e.encode(`done
722
+ `),$e.encode(`done
723
+ `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=yo(n.body),i=await fo(o),t=wr.Buffer.from(await Ot(i.packfile)),p=await kt.fromPack({pack:t}),y=p.read;return p.read=async function({oid:u,...d}){const w=await y.call(this,{oid:u,...d});return w.oid=u,w},p}async function Yl(e,r){const s=await e.read({oid:r});Ir(s);const n=await e.read({oid:s.object.tree}),o=[n];for(;o.length>0;){const i=o.pop(),t=await e.read({oid:i.oid});if(Ir(t),i.object=t.object,t.type==="tree")for(const p of t.object)p.type==="tree"&&o.push(p)}return n}async function Kl(e,r,s){const n=await e.read({oid:r});Ir(n);const o=await e.read({oid:n.object.tree});Ir(o);const i={};for(const t of s){let p=o;const y=t.split("/");for(const u of y){if(p.type!=="tree")throw new Error(`Path not found in the repo: ${t}`);let d=!1;for(const w of p.object)if(w.path===u){try{p=await e.read({oid:w.oid}),Ir(p)}catch{p=w}d=!0;break}if(!d)throw new Error(`Path not found in the repo: ${t}`)}i[t]=p}return i}async function Xl(e,r){const s=wr.Buffer.from(await Ot([...r.map(p=>$e.encode(`want ${p} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3
724
+ `)),$e.flush(),$e.encode(`done
725
+ `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=yo(n.body),i=await fo(o),t=wr.Buffer.from(await Ot(i.packfile));return await kt.fromPack({pack:t})}async function ho(e,r){const s=await e.read({oid:r});if(Ir(s),s.type==="blob")return s.object;const n={};for(const{path:o,oid:i,type:t}of s.object)if(t==="blob"){const p=await e.read({oid:i});Ir(p),n[o]=p.object}else t==="tree"&&(n[o]=await ho(e,i));return n}function Ir(e){if(e.object instanceof wr.Buffer)switch(e.type){case"commit":e.object=qe.from(e.object).parse();break;case"tree":e.object=mi.from(e.object).entries();break;case"blob":e.object=new Uint8Array(e.object),e.format="content";break;case"tag":e.object=ut.from(e.object).parse();break;default:throw new gs(e.oid,e.type,"blob|commit|tag|tree")}}async function*Ql(e){const r=await e.text();let s=0;for(;s<=r.length;){const n=parseInt(r.substring(s,s+4),16);if(n===0)break;yield r.substring(s+4,s+n),s+=n}}function yo(e){if(e[Symbol.asyncIterator])return e;const r=e.getReader();return{next(){return r.read()},return(){return r.releaseLock(),{}},[Symbol.asyncIterator](){return this}}}function Jl(e,r){r=ni(r);const s=["",".","/"].includes(r);let n=e;if(s)r="";else{const t=r.split("/");for(const p of t){const y=n==null?void 0:n.find(u=>u.name===p);if((y==null?void 0:y.type)==="folder")n=y.children;else return y?[y.name]:[]}}const o=[],i=[{tree:n,path:r}];for(;i.length>0;){const{tree:t,path:p}=i.pop();for(const y of t){const u=`${p}${p?"/":""}${y.name}`;y.type==="folder"?i.push({tree:y.children,path:u}):o.push(u)}}return o}const eu=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory"];function ru(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&eu.includes(e.resource)}class _r{get progress(){return this._progress}set progress(r){this._progress=r}setPlayground(r){this.playground=r}get isAsync(){return!1}static create(r,{semaphore:s,progress:n,corsProxy:o}){let i;switch(r.resource){case"vfs":i=new tu(r,n);break;case"literal":i=new su(r,n);break;case"wordpress.org/themes":i=new pu(r,n);break;case"wordpress.org/plugins":i=new fu(r,n);break;case"url":i=new nu(r,n);break;case"git:directory":i=new au(r,n,{corsProxy:o});break;case"literal:directory":i=new ou(r,n);break;default:throw new Error(`Invalid resource: ${r}`)}return i=new lu(i),s&&(i=new uu(i,s)),i}}class mo extends _r{constructor(r){super(),this.resource=r}get progress(){return this.resource.progress}set progress(r){this.resource.progress=r}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(r){this.resource.setPlayground(r)}}class tu extends _r{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var s;const r=await this.playground.readFileAsBuffer(this.resource.path);return(s=this.progress)==null||s.set(100),new File([r],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class su extends _r{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var r;return(r=this.progress)==null||r.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class Oi extends _r{constructor(r){super(),this._progress=r}async resolve(){var s,n;(s=this.progress)==null||s.setCaption(this.caption);const r=this.getURL();try{let o=await fetch(r);if(!o.ok)throw new Error(`Could not download "${r}"`);if(o=await np(o,((n=this.progress)==null?void 0:n.loadingListener)??iu),o.status!==200)throw new Error(`Could not download "${r}"`);return new File([await o.blob()],this.name)}catch(o){throw new Error(`Could not download "${r}".
708
726
  Check if the URL is correct and the server is reachable.
709
727
  If it is reachable, the server might be blocking the request.
710
728
  Check the browser console and network tabs for more information.
@@ -728,14 +746,15 @@ function join_paths()
728
746
  https://raw.githubusercontent.com/username/repository/branch/filename
729
747
 
730
748
  Error:
731
- ${l}`)}}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}}const $s=()=>{};class Ts extends Fr{constructor(t,o){if(super(o),this.resource=t,this.resource.url.startsWith("https://github.com/")){const a=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);a!=null&&a.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${a.groups.owner}/${a.groups.repo}/${a.groups.branch}/${a.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class js extends Fr{constructor(t,o){super(o),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${qt(this.resource.slug)}`}}class As extends Fr{constructor(t,o){super(o),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${qt(this.resource.slug)}`}}function qt(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Rt extends Le{constructor(t){super(),this.resource=t}async resolve(){return this.resource.resolve()}async setPlayground(t){return this.resource.setPlayground(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}}class qs extends Rt{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class Rs extends Rt{constructor(t,o){super(t),this.semaphore=o}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}const Ls={type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{type:"object",additionalProperties:{type:"string"},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:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},Ss={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},xs={type:"string",enum:["kitchen-sink","light"]},Lt=Object.prototype.hasOwnProperty;function re(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;const f=e;let h=!1;const b=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 W={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"};i===null?i=[W]:i.push(W),e++}else{const W=e;for(const z in r)if(!(z==="resource"||z==="path")){const c={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};i===null?i=[c]:i.push(c),e++;break}if(W===e){if(r.resource!==void 0){let z=r.resource;const c=e;if(typeof z!="string"){const A={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),e++}if(z!=="vfs"){const A={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[A]:i.push(A),e++}var m=c===e}else var m=!0;if(m)if(r.path!==void 0){const z=e;if(typeof r.path!="string"){const A={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),e++}var m=z===e}else var m=!0}}}else{const x={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[x]:i.push(x),e++}var w=b===e;if(h=h||w,!h){const x=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.resource===void 0&&(c="resource")||r.name===void 0&&(c="name")||r.contents===void 0&&(c="contents")){const A={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[A]:i.push(A),e++}else{const A=e;for(const $ in r)if(!($==="resource"||$==="name"||$==="contents")){const T={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};i===null?i=[T]:i.push(T),e++;break}if(A===e){if(r.resource!==void 0){let $=r.resource;const T=e;if(typeof $!="string"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[_]:i.push(_),e++}if($!=="literal"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[_]:i.push(_),e++}var S=T===e}else var S=!0;if(S){if(r.name!==void 0){const $=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"};i===null?i=[_]:i.push(_),e++}var S=$===e}else var S=!0;if(S)if(r.contents!==void 0){let $=r.contents;const T=e,_=e;let y=!1;const g=e;if(typeof $!="string"){const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),e++}var I=g===e;if(y=y||I,!y){const O=e;if(e===O)if($&&typeof $=="object"&&!Array.isArray($)){let q;if($.BYTES_PER_ELEMENT===void 0&&(q="BYTES_PER_ELEMENT")||$.buffer===void 0&&(q="buffer")||$.byteLength===void 0&&(q="byteLength")||$.byteOffset===void 0&&(q="byteOffset")||$.length===void 0&&(q="length")){const D={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"};i===null?i=[D]:i.push(D),e++}else{const D=e;for(const R in $)if(!(R==="BYTES_PER_ELEMENT"||R==="buffer"||R==="byteLength"||R==="byteOffset"||R==="length")){let V=$[R];const ee=e;if(!(typeof V=="number"&&isFinite(V))){const J={instancePath:t+"/contents/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var P=ee===e;if(!P)break}if(D===e){if($.BYTES_PER_ELEMENT!==void 0){let R=$.BYTES_PER_ELEMENT;const V=e;if(!(typeof R=="number"&&isFinite(R))){const ee={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"};i===null?i=[ee]:i.push(ee),e++}var U=V===e}else var U=!0;if(U){if($.buffer!==void 0){let R=$.buffer;const V=e;if(e===V)if(R&&typeof R=="object"&&!Array.isArray(R)){let J;if(R.byteLength===void 0&&(J="byteLength")){const C={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:J},message:"must have required property '"+J+"'"};i===null?i=[C]:i.push(C),e++}else{const C=e;for(const Q in R)if(Q!=="byteLength"){const M={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"};i===null?i=[M]:i.push(M),e++;break}if(C===e&&R.byteLength!==void 0){let Q=R.byteLength;if(!(typeof Q=="number"&&isFinite(Q))){const M={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"};i===null?i=[M]:i.push(M),e++}}}}else{const J={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U){if($.byteLength!==void 0){let R=$.byteLength;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U){if($.byteOffset!==void 0){let R=$.byteOffset;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U)if($.length!==void 0){let R=$.length;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0}}}}}}else{const q={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[q]:i.push(q),e++}var I=O===e;y=y||I}if(y)e=_,i!==null&&(_?i.length=_:i=null);else{const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[O]:i.push(O),e++}var S=T===e}else var S=!0}}}}else{const c={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var w=x===e;if(h=h||w,!h){const c=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let T;if(r.resource===void 0&&(T="resource")||r.slug===void 0&&(T="slug")){const _={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"};i===null?i=[_]:i.push(_),e++}else{const _=e;for(const y in r)if(!(y==="resource"||y==="slug")){const g={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};i===null?i=[g]:i.push(g),e++;break}if(_===e){if(r.resource!==void 0){let y=r.resource;const g=e;if(typeof y!="string"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[v]:i.push(v),e++}if(y!=="wordpress.org/themes"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[v]:i.push(v),e++}var te=g===e}else var te=!0;if(te)if(r.slug!==void 0){const y=e;if(typeof r.slug!="string"){const v={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[v]:i.push(v),e++}var te=y===e}else var te=!0}}}else{const T={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[T]:i.push(T),e++}var w=c===e;if(h=h||w,!h){const T=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 v={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};i===null?i=[v]:i.push(v),e++}else{const v=e;for(const O in r)if(!(O==="resource"||O==="slug")){const N={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),e++;break}if(v===e){if(r.resource!==void 0){let O=r.resource;const N=e;if(typeof O!="string"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}if(O!=="wordpress.org/plugins"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[q]:i.push(q),e++}var H=N===e}else var H=!0;if(H)if(r.slug!==void 0){const O=e;if(typeof r.slug!="string"){const q={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var H=O===e}else var H=!0}}}else{const g={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[g]:i.push(g),e++}var w=T===e;if(h=h||w,!h){const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.url===void 0&&(N="url")){const q={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[q]:i.push(q),e++}else{const q=e;for(const D in r)if(!(D==="resource"||D==="url"||D==="caption")){const R={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e){if(r.resource!==void 0){let D=r.resource;const R=e;if(typeof D!="string"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}if(D!=="url"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[V]:i.push(V),e++}var E=R===e}else var E=!0;if(E){if(r.url!==void 0){const D=e;if(typeof r.url!="string"){const V={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var E=D===e}else var E=!0;if(E)if(r.caption!==void 0){const D=e;if(typeof r.caption!="string"){const V={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var E=D===e}else var E=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),e++}var w=g===e;h=h||w}}}}if(h)e=f,i!==null&&(f?i.length=f:i=null);else{const x={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[x]:i.push(x),e++,re.errors=i,!1}return re.errors=i,e===0}const kr={type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
749
+ ${o}`)}}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}}const iu=()=>{};class nu extends Oi{constructor(r,s){if(super(s),this.resource=r,this.resource.url.startsWith("https://github.com/")){const n=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);n!=null&&n.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${n.groups.owner}/${n.groups.repo}/${n.groups.branch}/${n.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class au extends _r{constructor(r,s,n){super(),this.reference=r,this._progress=s,this.options=n}async resolve(){var p;const r=(p=this.options)!=null&&p.corsProxy?`${this.options.corsProxy}/${this.reference.url}`:this.reference.url,s=["","HEAD"].includes(this.reference.ref)?"HEAD":`refs/heads/${this.reference.ref}`,n=await Gl(r,s),o=this.reference.path.replace(/^\/+/,""),i=Jl(n,o);let t=await Vl(r,s,i);return t=Object.fromEntries(Object.entries(t).map(([y,u])=>(y=y.substring(this.reference.path.length),y=y.replace(/^\/+/,""),[y,u]))),{name:gt(this.reference.path)||this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-"),files:t}}get name(){return this.reference.path.split("/").pop()}}class ou extends _r{constructor(r,s){super(),this.reference=r,this._progress=s}async resolve(){return this.reference}get name(){return this.reference.name}}class pu extends Oi{constructor(r,s){super(s),this.resource=r}get name(){return fs(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${go(this.resource.slug)}`}}class fu extends Oi{constructor(r,s){super(s),this.resource=r}get name(){return fs(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${go(this.resource.slug)}`}}function go(e){return!e||e.endsWith(".zip")?e:e+".latest-stable.zip"}class lu extends mo{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class uu extends mo{constructor(r,s){super(r),this.semaphore=s}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}const cu={type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{type:"object",additionalProperties:{type:"string"},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"}},additionalProperties:!1},du={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},wo=Object.prototype.hasOwnProperty;function le(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let U;if(e.resource===void 0&&(U="resource")||e.path===void 0&&(U="path")){const A={instancePath:r,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};i===null?i=[A]:i.push(A),t++}else{const A=t;for(const T in e)if(!(T==="resource"||T==="path")){const N={instancePath:r,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),t++;break}if(A===t){if(e.resource!==void 0){let T=e.resource;const N=t;if(typeof T!="string"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}if(T!=="vfs"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[S]:i.push(S),t++}var w=N===t}else var w=!0;if(w)if(e.path!==void 0){const T=t;if(typeof e.path!="string"){const S={instancePath:r+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}var w=T===t}else var w=!0}}}else{const U={instancePath:r,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[U]:i.push(U),t++}var _=u===t;if(y=y||_,!y){const U=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let N;if(e.resource===void 0&&(N="resource")||e.name===void 0&&(N="name")||e.contents===void 0&&(N="contents")){const S={instancePath:r,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[S]:i.push(S),t++}else{const S=t;for(const x in e)if(!(x==="resource"||x==="name"||x==="contents")){const E={instancePath:r,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"};i===null?i=[E]:i.push(E),t++;break}if(S===t){if(e.resource!==void 0){let x=e.resource;const E=t;if(typeof x!="string"){const O={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),t++}if(x!=="literal"){const O={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[O]:i.push(O),t++}var b=E===t}else var b=!0;if(b){if(e.name!==void 0){const x=t;if(typeof e.name!="string"){const O={instancePath:r+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),t++}var b=x===t}else var b=!0;if(b)if(e.contents!==void 0){let x=e.contents;const E=t,O=t;let D=!1;const L=t;if(typeof x!="string"){const Y={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Y]:i.push(Y),t++}var B=L===t;if(D=D||B,!D){const Y=t;if(t===Y)if(x&&typeof x=="object"&&!Array.isArray(x)){let H;if(x.BYTES_PER_ELEMENT===void 0&&(H="BYTES_PER_ELEMENT")||x.buffer===void 0&&(H="buffer")||x.byteLength===void 0&&(H="byteLength")||x.byteOffset===void 0&&(H="byteOffset")||x.length===void 0&&(H="length")){const K={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:H},message:"must have required property '"+H+"'"};i===null?i=[K]:i.push(K),t++}else{const K=t;for(const V in x)if(!(V==="BYTES_PER_ELEMENT"||V==="buffer"||V==="byteLength"||V==="byteOffset"||V==="length")){let se=x[V];const ee=t;if(!(typeof se=="number"&&isFinite(se))){const X={instancePath:r+"/contents/"+V.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var P=ee===t;if(!P)break}if(K===t){if(x.BYTES_PER_ELEMENT!==void 0){let V=x.BYTES_PER_ELEMENT;const se=t;if(!(typeof V=="number"&&isFinite(V))){const ee={instancePath:r+"/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"};i===null?i=[ee]:i.push(ee),t++}var q=se===t}else var q=!0;if(q){if(x.buffer!==void 0){let V=x.buffer;const se=t;if(t===se)if(V&&typeof V=="object"&&!Array.isArray(V)){let X;if(V.byteLength===void 0&&(X="byteLength")){const Q={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"};i===null?i=[Q]:i.push(Q),t++}else{const Q=t;for(const re in V)if(re!=="byteLength"){const ne={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};i===null?i=[ne]:i.push(ne),t++;break}if(Q===t&&V.byteLength!==void 0){let re=V.byteLength;if(!(typeof re=="number"&&isFinite(re))){const ne={instancePath:r+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ne]:i.push(ne),t++}}}}else{const X={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q){if(x.byteLength!==void 0){let V=x.byteLength;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q){if(x.byteOffset!==void 0){let V=x.byteOffset;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q)if(x.length!==void 0){let V=x.length;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0}}}}}}else{const H={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[H]:i.push(H),t++}var B=Y===t;D=D||B}if(D)t=O,i!==null&&(O?i.length=O:i=null);else{const Y={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[Y]:i.push(Y),t++}var b=E===t}else var b=!0}}}}else{const N={instancePath:r,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),t++}var _=U===t;if(y=y||_,!y){const N=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let E;if(e.resource===void 0&&(E="resource")||e.slug===void 0&&(E="slug")){const O={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};i===null?i=[O]:i.push(O),t++}else{const O=t;for(const D in e)if(!(D==="resource"||D==="slug")){const L={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"};i===null?i=[L]:i.push(L),t++;break}if(O===t){if(e.resource!==void 0){let D=e.resource;const L=t;if(typeof D!="string"){const F={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[F]:i.push(F),t++}if(D!=="wordpress.org/themes"){const F={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[F]:i.push(F),t++}var C=L===t}else var C=!0;if(C)if(e.slug!==void 0){const D=t;if(typeof e.slug!="string"){const F={instancePath:r+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[F]:i.push(F),t++}var C=D===t}else var C=!0}}}else{const E={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[E]:i.push(E),t++}var _=N===t;if(y=y||_,!y){const E=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.resource===void 0&&(L="resource")||e.slug===void 0&&(L="slug")){const F={instancePath:r,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[F]:i.push(F),t++}else{const F=t;for(const Y in e)if(!(Y==="resource"||Y==="slug")){const Z={instancePath:r,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Y},message:"must NOT have additional properties"};i===null?i=[Z]:i.push(Z),t++;break}if(F===t){if(e.resource!==void 0){let Y=e.resource;const Z=t;if(typeof Y!="string"){const H={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}if(Y!=="wordpress.org/plugins"){const H={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[H]:i.push(H),t++}var M=Z===t}else var M=!0;if(M)if(e.slug!==void 0){const Y=t;if(typeof e.slug!="string"){const H={instancePath:r+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var M=Y===t}else var M=!0}}}else{const L={instancePath:r,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),t++}var _=E===t;if(y=y||_,!y){const L=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let Z;if(e.resource===void 0&&(Z="resource")||e.url===void 0&&(Z="url")){const H={instancePath:r,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[H]:i.push(H),t++}else{const H=t;for(const K in e)if(!(K==="resource"||K==="url"||K==="caption")){const V={instancePath:r,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:K},message:"must NOT have additional properties"};i===null?i=[V]:i.push(V),t++;break}if(H===t){if(e.resource!==void 0){let K=e.resource;const V=t;if(typeof K!="string"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}if(K!=="url"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[se]:i.push(se),t++}var I=V===t}else var I=!0;if(I){if(e.url!==void 0){const K=t;if(typeof e.url!="string"){const se={instancePath:r+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var I=K===t}else var I=!0;if(I)if(e.caption!==void 0){const K=t;if(typeof e.caption!="string"){const se={instancePath:r+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var I=K===t}else var I=!0}}}}else{const Z={instancePath:r,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),t++}var _=L===t;y=y||_}}}}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const U={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[U]:i.push(U),t++,le.errors=i,!1}return le.errors=i,t===0}const qs={type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
732
750
 
733
751
  - 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.
734
752
 
735
753
  - 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.
736
754
  This option is only kept in here to avoid breaking Blueprint schema validation
737
- for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"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."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."},importStarterContent:{type:"boolean",description:"Whether to import the theme's starter content after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",description:"The password to log in with. Defaults to 'password'."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{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"]}]},St={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let te;if(r.url===void 0&&(te="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"}],!1;{const H=e;for(const E in r)if(!(E==="method"||E==="url"||E==="headers"||E==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(H===e){if(r.method!==void 0){let E=r.method;const x=e;if(typeof E!="string")return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(E==="GET"||E==="POST"||E==="HEAD"||E==="OPTIONS"||E==="PATCH"||E==="PUT"||E==="DELETE"))return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:St.enum},message:"must be equal to one of the allowed values"}],!1;var f=x===e}else var f=!0;if(f){if(r.url!==void 0){const E=e;if(typeof r.url!="string")return ye.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=E===e}else var f=!0;if(f){if(r.headers!==void 0){let E=r.headers;const x=e;if(e===e)if(E&&typeof E=="object"&&!Array.isArray(E))for(const c in E){const A=e;if(typeof E[c]!="string")return ye.errors=[{instancePath:t+"/headers/"+c.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=A===e;if(!h)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=x===e}else var f=!0;if(f)if(r.body!==void 0){let E=r.body;const x=e,W=e;let z=!1;const c=e;if(typeof E!="string"){const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[$]:i.push($),e++}var b=c===e;if(z=z||b,!z){const $=e;if(e===$)if(E&&typeof E=="object"&&!Array.isArray(E)){let _;if(E.BYTES_PER_ELEMENT===void 0&&(_="BYTES_PER_ELEMENT")||E.buffer===void 0&&(_="buffer")||E.byteLength===void 0&&(_="byteLength")||E.byteOffset===void 0&&(_="byteOffset")||E.length===void 0&&(_="length")){const y={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:_},message:"must have required property '"+_+"'"};i===null?i=[y]:i.push(y),e++}else{const y=e;for(const g in E)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let v=E[g];const O=e;if(!(typeof v=="number"&&isFinite(v))){const N={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var k=O===e;if(!k)break}if(y===e){if(E.BYTES_PER_ELEMENT!==void 0){let g=E.BYTES_PER_ELEMENT;const v=e;if(!(typeof g=="number"&&isFinite(g))){const O={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[O]:i.push(O),e++}var m=v===e}else var m=!0;if(m){if(E.buffer!==void 0){let g=E.buffer;const v=e;if(e===v)if(g&&typeof g=="object"&&!Array.isArray(g)){let N;if(g.byteLength===void 0&&(N="byteLength")){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[q]:i.push(q),e++}else{const q=e;for(const D in g)if(D!=="byteLength"){const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e&&g.byteLength!==void 0){let D=g.byteLength;if(!(typeof D=="number"&&isFinite(D))){const R={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[R]:i.push(R),e++}}}}else{const N={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),e++}var m=v===e}else var m=!0;if(m){if(E.byteLength!==void 0){let g=E.byteLength;const v=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=v===e}else var m=!0;if(m){if(E.byteOffset!==void 0){let g=E.byteOffset;const v=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=v===e}else var m=!0;if(m)if(E.length!==void 0){let g=E.length;const v=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=v===e}else var m=!0}}}}}}else{const _={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[_]:i.push(_),e++}var b=$===e;if(z=z||b,!z){const _=e;if(e===_)if(E&&typeof E=="object"&&!Array.isArray(E))for(const g in E){let v=E[g];const O=e,N=e;let q=!1;const D=e;if(typeof v!="string"){const R={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}var w=D===e;if(q=q||w,!q){const R=e;if(e===R)if(v&&typeof v=="object"&&!Array.isArray(v)){let ee;if(v.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||v.buffer===void 0&&(ee="buffer")||v.byteLength===void 0&&(ee="byteLength")||v.byteOffset===void 0&&(ee="byteOffset")||v.length===void 0&&(ee="length")){const J={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:ee},message:"must have required property '"+ee+"'"};i===null?i=[J]:i.push(J),e++}else{const J=e;for(const C in v)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let Q=v[C];const M=e;if(!(typeof Q=="number"&&isFinite(Q))){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+C.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"};i===null?i=[Y]:i.push(Y),e++}var S=M===e;if(!S)break}if(J===e){if(v.BYTES_PER_ELEMENT!==void 0){let C=v.BYTES_PER_ELEMENT;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const M={instancePath:t+"/body/"+g.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"};i===null?i=[M]:i.push(M),e++}var I=Q===e}else var I=!0;if(I){if(v.buffer!==void 0){let C=v.buffer;const Q=e;if(e===Q)if(C&&typeof C=="object"&&!Array.isArray(C)){let Y;if(C.byteLength===void 0&&(Y="byteLength")){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Y},message:"must have required property '"+Y+"'"};i===null?i=[K]:i.push(K),e++}else{const K=e;for(const le in C)if(le!=="byteLength"){const fe={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:le},message:"must NOT have additional properties"};i===null?i=[fe]:i.push(fe),e++;break}if(K===e&&C.byteLength!==void 0){let le=C.byteLength;if(!(typeof le=="number"&&isFinite(le))){const fe={instancePath:t+"/body/"+g.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"};i===null?i=[fe]:i.push(fe),e++}}}}else{const Y={instancePath:t+"/body/"+g.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"};i===null?i=[Y]:i.push(Y),e++}var I=Q===e}else var I=!0;if(I){if(v.byteLength!==void 0){let C=v.byteLength;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.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"};i===null?i=[Y]:i.push(Y),e++}var I=Q===e}else var I=!0;if(I){if(v.byteOffset!==void 0){let C=v.byteOffset;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.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"};i===null?i=[Y]:i.push(Y),e++}var I=Q===e}else var I=!0;if(I)if(v.length!==void 0){let C=v.length;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.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"};i===null?i=[Y]:i.push(Y),e++}var I=Q===e}else var I=!0}}}}}}else{const ee={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[ee]:i.push(ee),e++}var w=R===e;if(q=q||w,!q){const ee=e;if(e===ee)if(v&&typeof v=="object"&&!Array.isArray(v)){let C;if(v.lastModified===void 0&&(C="lastModified")||v.name===void 0&&(C="name")||v.size===void 0&&(C="size")||v.type===void 0&&(C="type")||v.webkitRelativePath===void 0&&(C="webkitRelativePath")){const Q={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};i===null?i=[Q]:i.push(Q),e++}else{const Q=e;for(const M in v)if(!(M==="size"||M==="type"||M==="lastModified"||M==="name"||M==="webkitRelativePath")){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[Y]:i.push(Y),e++;break}if(Q===e){if(v.size!==void 0){let M=v.size;const Y=e;if(!(typeof M=="number"&&isFinite(M))){const K={instancePath:t+"/body/"+g.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"};i===null?i=[K]:i.push(K),e++}var P=Y===e}else var P=!0;if(P){if(v.type!==void 0){const M=e;if(typeof v.type!="string"){const K={instancePath:t+"/body/"+g.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"};i===null?i=[K]:i.push(K),e++}var P=M===e}else var P=!0;if(P){if(v.lastModified!==void 0){let M=v.lastModified;const Y=e;if(!(typeof M=="number"&&isFinite(M))){const le={instancePath:t+"/body/"+g.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"};i===null?i=[le]:i.push(le),e++}var P=Y===e}else var P=!0;if(P){if(v.name!==void 0){const M=e;if(typeof v.name!="string"){const K={instancePath:t+"/body/"+g.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"};i===null?i=[K]:i.push(K),e++}var P=M===e}else var P=!0;if(P)if(v.webkitRelativePath!==void 0){const M=e;if(typeof v.webkitRelativePath!="string"){const K={instancePath:t+"/body/"+g.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"};i===null?i=[K]:i.push(K),e++}var P=M===e}else var P=!0}}}}}}else{const C={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[C]:i.push(C),e++}var w=ee===e;q=q||w}}if(q)e=N,i!==null&&(N?i.length=N:i=null);else{const R={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[R]:i.push(R),e++}var U=O===e;if(!U)break}else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[g]:i.push(g),e++}var b=_===e;z=z||b}}if(z)e=W,i!==null&&(W?i.length=W:i=null);else{const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[$]:i.push($),e++,ye.errors=i,!1}var f=x===e}else var f=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=i,e===0}const Ns={type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1};function oe(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const I=e;for(const P in r)if(!Lt.call(Ns.properties,P))return oe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(I===e){if(r.relativeUri!==void 0){const P=e;if(typeof r.relativeUri!="string")return oe.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=P===e}else var f=!0;if(f){if(r.scriptPath!==void 0){const P=e;if(typeof r.scriptPath!="string")return oe.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=P===e}else var f=!0;if(f){if(r.protocol!==void 0){const P=e;if(typeof r.protocol!="string")return oe.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=P===e}else var f=!0;if(f){if(r.method!==void 0){let P=r.method;const U=e;if(typeof P!="string")return oe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(P==="GET"||P==="POST"||P==="HEAD"||P==="OPTIONS"||P==="PATCH"||P==="PUT"||P==="DELETE"))return oe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:St.enum},message:"must be equal to one of the allowed values"}],!1;var f=U===e}else var f=!0;if(f){if(r.headers!==void 0){let P=r.headers;const U=e;if(e===e)if(P&&typeof P=="object"&&!Array.isArray(P))for(const E in P){const x=e;if(typeof P[E]!="string")return oe.errors=[{instancePath:t+"/headers/"+E.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=x===e;if(!h)break}else return oe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f){if(r.body!==void 0){let P=r.body;const U=e,te=e;let H=!1;const E=e;if(typeof P!="string"){const W={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[W]:i.push(W),e++}var b=E===e;if(H=H||b,!H){const W=e;if(e===W)if(P&&typeof P=="object"&&!Array.isArray(P)){let c;if(P.BYTES_PER_ELEMENT===void 0&&(c="BYTES_PER_ELEMENT")||P.buffer===void 0&&(c="buffer")||P.byteLength===void 0&&(c="byteLength")||P.byteOffset===void 0&&(c="byteOffset")||P.length===void 0&&(c="length")){const A={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[A]:i.push(A),e++}else{const A=e;for(const $ in P)if(!($==="BYTES_PER_ELEMENT"||$==="buffer"||$==="byteLength"||$==="byteOffset"||$==="length")){let T=P[$];const _=e;if(!(typeof T=="number"&&isFinite(T))){const y={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"};i===null?i=[y]:i.push(y),e++}var k=_===e;if(!k)break}if(A===e){if(P.BYTES_PER_ELEMENT!==void 0){let $=P.BYTES_PER_ELEMENT;const T=e;if(!(typeof $=="number"&&isFinite($))){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"};i===null?i=[_]:i.push(_),e++}var m=T===e}else var m=!0;if(m){if(P.buffer!==void 0){let $=P.buffer;const T=e;if(e===T)if($&&typeof $=="object"&&!Array.isArray($)){let y;if($.byteLength===void 0&&(y="byteLength")){const g={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"};i===null?i=[g]:i.push(g),e++}else{const g=e;for(const v in $)if(v!=="byteLength"){const O={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};i===null?i=[O]:i.push(O),e++;break}if(g===e&&$.byteLength!==void 0){let v=$.byteLength;if(!(typeof v=="number"&&isFinite(v))){const O={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[O]:i.push(O),e++}}}}else{const y={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m){if(P.byteLength!==void 0){let $=P.byteLength;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m){if(P.byteOffset!==void 0){let $=P.byteOffset;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m)if(P.length!==void 0){let $=P.length;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0}}}}}}else{const c={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var b=W===e;H=H||b}if(H)e=te,i!==null&&(te?i.length=te:i=null);else{const W={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),e++,oe.errors=i,!1}var f=U===e}else var f=!0;if(f){if(r.env!==void 0){let P=r.env;const U=e;if(e===U)if(P&&typeof P=="object"&&!Array.isArray(P))for(const H in P){const E=e;if(typeof P[H]!="string")return oe.errors=[{instancePath:t+"/env/"+H.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=E===e;if(!w)break}else return oe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f){if(r.$_SERVER!==void 0){let P=r.$_SERVER;const U=e;if(e===U)if(P&&typeof P=="object"&&!Array.isArray(P))for(const H in P){const E=e;if(typeof P[H]!="string")return oe.errors=[{instancePath:t+"/$_SERVER/"+H.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=E===e;if(!S)break}else return oe.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f)if(r.code!==void 0){const P=e;if(typeof r.code!="string")return oe.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=P===e}else var f=!0}}}}}}}}}else return oe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return oe.errors=i,e===0}function n(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let br;if(r.step===void 0&&(br="step"))return n.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:br},message:"must have required property '"+br+"'"}],!1;{const G=r.step;if(typeof G=="string")if(G==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginPath===void 0&&(d="pluginPath")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="pluginPath"||s==="pluginName"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.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=j===e}else var f=!0;if(f)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.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=p===e}else var f=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var h=u===e}else var h=!0;if(h){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activatePlugin")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var h=u===e}else var h=!0;if(h){if(r.pluginPath!==void 0){const s=e;if(typeof r.pluginPath!="string")return n.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0;if(h)if(r.pluginName!==void 0){const s=e;if(typeof r.pluginName!="string")return n.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeFolderName===void 0&&(d="themeFolderName"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeFolderName"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=j===e}else var b=!0;if(b)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=p===e}else var b=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=u===e}else var k=!0;if(k){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activateTheme")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var k=u===e}else var k=!0;if(k)if(r.themeFolderName!==void 0){const s=e;if(typeof r.themeFolderName!="string")return n.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=s===e}else var k=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=j===e}else var m=!0;if(m)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=p===e}else var m=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="cp")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var w=u===e}else var w=!0;if(w){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return n.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=s===e}else var w=!0;if(w)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return n.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=s===e}else var w=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.consts===void 0&&(d="consts")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="consts"||s==="method"||s==="virtualize"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var S=j===e}else var S=!0;if(S)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=p===e}else var S=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=u===e}else var I=!0;if(I){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineWpConfigConsts")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var I=u===e}else var I=!0;if(I){if(r.consts!==void 0){let s=r.consts;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return n.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=u===e}else var I=!0;if(I){if(r.method!==void 0){let s=r.method;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="rewrite-wp-config"||s==="define-before-run"))return n.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:kr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var I=u===e}else var I=!0;if(I)if(r.virtualize!==void 0){const s=e;if(typeof r.virtualize!="boolean")return n.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var I=s===e}else var I=!0}}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.siteUrl===void 0&&(d="siteUrl")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="siteUrl"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=j===e}else var P=!0;if(P)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=p===e}else var P=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var U=u===e}else var U=!0;if(U){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineSiteUrl")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var U=u===e}else var U=!0;if(U)if(r.siteUrl!==void 0){const s=e;if(typeof r.siteUrl!="string")return n.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=s===e}else var U=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var te=j===e}else var te=!0;if(te)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var te=p===e}else var te=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var H=u===e}else var H=!0;if(H)if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="enableMultisite")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var H=u===e}else var H=!0}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.file===void 0&&(d="file")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="file"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var E=j===e}else var E=!0;if(E)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=p===e}else var E=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWxr")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var x=u===e}else var x=!0;if(x)if(r.file!==void 0){const s=e;re(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var x=s===e}else var x=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeSlug"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=j===e}else var W=!0;if(W)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=p===e}else var W=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importThemeStarterContent")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var z=u===e}else var z=!0;if(z)if(r.themeSlug!==void 0){const s=e;if(typeof r.themeSlug!="string")return n.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var z=s===e}else var z=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.wordPressFilesZip===void 0&&(d="wordPressFilesZip"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="wordPressFilesZip"||s==="pathInZip"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var c=j===e}else var c=!0;if(c)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=p===e}else var c=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var A=u===e}else var A=!0;if(A){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWordPressFiles")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var A=u===e}else var A=!0;if(A){if(r.wordPressFilesZip!==void 0){const s=e;re(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var A=s===e}else var A=!0;if(A)if(r.pathInZip!==void 0){const s=e;if(typeof r.pathInZip!="string")return n.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=s===e}else var A=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginZipFile===void 0&&(d="pluginZipFile")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="pluginZipFile"||s==="options"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.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===e}else var $=!0;if($)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=p===e}else var $=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/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.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return n.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var T=u===e}else var T=!0;if(T){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installPlugin")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var T=u===e}else var T=!0;if(T){if(r.pluginZipFile!==void 0){const s=e;re(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var T=s===e}else var T=!0;if(T)if(r.options!==void 0){let s=r.options;const u=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const j=e;for(const ke in s)if(ke!=="activate")return n.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ke},message:"must NOT have additional properties"}],!1;if(j===e&&s.activate!==void 0&&typeof s.activate!="boolean")return n.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return n.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=u===e}else var T=!0}}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeZipFile===void 0&&(d="themeZipFile"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="themeZipFile"||s==="options"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _=j===e}else var _=!0;if(_)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=p===e}else var _=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/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.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return n.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var y=u===e}else var y=!0;if(y){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installTheme")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var y=u===e}else var y=!0;if(y){if(r.themeZipFile!==void 0){const s=e;re(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var y=s===e}else var y=!0;if(y)if(r.options!==void 0){let s=r.options;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const p=e;for(const j in s)if(!(j==="activate"||j==="importStarterContent"))return n.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:j},message:"must NOT have additional properties"}],!1;if(p===e){if(s.activate!==void 0){const j=e;if(typeof s.activate!="boolean")return n.errors=[{instancePath:t+"/options/activate",schemaPath:"#/oneOf/10/properties/options/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var g=j===e}else var g=!0;if(g)if(s.importStarterContent!==void 0){const j=e;if(typeof s.importStarterContent!="boolean")return n.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/oneOf/10/properties/options/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var g=j===e}else var g=!0}}else return n.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=u===e}else var y=!0}}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="username"||s==="password"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=j===e}else var v=!0;if(v)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=p===e}else var v=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var O=u===e}else var O=!0;if(O){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="login")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var O=u===e}else var O=!0;if(O){if(r.username!==void 0){const s=e;if(typeof r.username!="string")return n.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=s===e}else var O=!0;if(O)if(r.password!==void 0){const s=e;if(typeof r.password!="string")return n.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=s===e}else var O=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var N=j===e}else var N=!0;if(N)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=p===e}else var N=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mkdir")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var q=u===e}else var q=!0;if(q)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return n.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=s===e}else var q=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var D=j===e}else var D=!0;if(D)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=p===e}else var D=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var R=u===e}else var R=!0;if(R){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mv")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var R=u===e}else var R=!0;if(R){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return n.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=s===e}else var R=!0;if(R)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return n.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=s===e}else var R=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=j===e}else var V=!0;if(V)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=p===e}else var V=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="resetData")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var ee=u===e}else var ee=!0}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.request===void 0&&(d="request")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="request"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.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=j===e}else var J=!0;if(J)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.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=p===e}else var J=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=u===e}else var C=!0;if(C){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="request")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var C=u===e}else var C=!0;if(C)if(r.request!==void 0){const s=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:l})||(i=i===null?ye.errors:i.concat(ye.errors),e=i.length);var C=s===e}else var C=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Q=j===e}else var Q=!0;if(Q)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Q=p===e}else var Q=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rm")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var M=u===e}else var M=!0;if(M)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return n.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=s===e}else var M=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Y=j===e}else var Y=!0;if(Y)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=p===e}else var Y=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var K=u===e}else var K=!0;if(K){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rmdir")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var K=u===e}else var K=!0;if(K)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return n.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=s===e}else var K=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.code===void 0&&(d="code")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="code"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var le=j===e}else var le=!0;if(le)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var le=p===e}else var le=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHP")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var fe=u===e}else var fe=!0;if(fe)if(r.code!==void 0){const s=e;if(typeof r.code!="string")return n.errors=[{instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var fe=s===e}else var fe=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var De=j===e}else var De=!0;if(De)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var De=p===e}else var De=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHPWithOptions")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var $e=u===e}else var $e=!0;if($e)if(r.options!==void 0){const s=e;oe(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:l})||(i=i===null?oe.errors:i.concat(oe.errors),e=i.length);var $e=s===e}else var $e=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=j===e}else var Me=!0;if(Me)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=p===e}else var Me=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runWpInstallationWizard")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Te=u===e}else var Te=!0;if(Te)if(r.options!==void 0){let s=r.options;const u=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const j=e;for(const ke in s)if(!(ke==="adminUsername"||ke==="adminPassword"))return n.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ke},message:"must NOT have additional properties"}],!1;if(j===e){if(s.adminUsername!==void 0){const ke=e;if(typeof s.adminUsername!="string")return n.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ke===e}else var Be=!0;if(Be)if(s.adminPassword!==void 0){const ke=e;if(typeof s.adminPassword!="string")return n.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ke===e}else var Be=!0}}else return n.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=u===e}else var Te=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.sql===void 0&&(d="sql")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="sql"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ue=j===e}else var Ue=!0;if(Ue)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ue=p===e}else var Ue=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var je=u===e}else var je=!0;if(je){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runSql")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var je=u===e}else var je=!0;if(je)if(r.sql!==void 0){const s=e;re(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var je=s===e}else var je=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=j===e}else var ze=!0;if(ze)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=p===e}else var ze=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=u===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteOptions")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Ae=u===e}else var Ae=!0;if(Ae)if(r.options!==void 0){let s=r.options;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return n.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=u===e}else var Ae=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.extractToPath===void 0&&(d="extractToPath")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="zipFile"||s==="zipPath"||s==="extractToPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ve=j===e}else var Ve=!0;if(Ve)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ve=p===e}else var Ve=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ue=u===e}else var ue=!0;if(ue){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="unzip")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var ue=u===e}else var ue=!0;if(ue){if(r.zipFile!==void 0){const s=e;re(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var ue=s===e}else var ue=!0;if(ue){if(r.zipPath!==void 0){const s=e;if(typeof r.zipPath!="string")return n.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ue=s===e}else var ue=!0;if(ue)if(r.extractToPath!==void 0){const s=e;if(typeof r.extractToPath!="string")return n.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ue=s===e}else var ue=!0}}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.meta===void 0&&(d="meta")||r.step===void 0&&(d="step")||r.userId===void 0&&(d="userId"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="meta"||s==="userId"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=j===e}else var He=!0;if(He)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=p===e}else var He=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=u===e}else var ve=!0;if(ve){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="updateUserMeta")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var ve=u===e}else var ve=!0;if(ve){if(r.meta!==void 0){let s=r.meta;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return n.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=u===e}else var ve=!0;if(ve)if(r.userId!==void 0){let s=r.userId;const u=e;if(!(typeof s=="number"&&isFinite(s)))return n.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ve=u===e}else var ve=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.data===void 0&&(d="data")||r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"||s==="data"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=j===e}else var Ge=!0;if(Ge)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=p===e}else var Ge=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="writeFile")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var Pe=u===e}else var Pe=!0;if(Pe){if(r.path!==void 0){const s=e;if(typeof r.path!="string")return n.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pe=s===e}else var Pe=!0;if(Pe)if(r.data!==void 0){let s=r.data;const u=e,L=e;let p=!1;const j=e;re(s,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var Ne=j===e;if(p=p||Ne,!p){const ce=e;if(typeof s!="string"){const Oe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Oe]:i.push(Oe),e++}var Ne=ce===e;if(p=p||Ne,!p){const Oe=e;if(e===Oe)if(s&&typeof s=="object"&&!Array.isArray(s)){let he;if(s.BYTES_PER_ELEMENT===void 0&&(he="BYTES_PER_ELEMENT")||s.buffer===void 0&&(he="buffer")||s.byteLength===void 0&&(he="byteLength")||s.byteOffset===void 0&&(he="byteOffset")||s.length===void 0&&(he="length")){const Je={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:he},message:"must have required property '"+he+"'"};i===null?i=[Je]:i.push(Je),e++}else{const Je=e;for(const Z in s)if(!(Z==="BYTES_PER_ELEMENT"||Z==="buffer"||Z==="byteLength"||Z==="byteOffset"||Z==="length")){let me=s[Z];const Ke=e;if(!(typeof me=="number"&&isFinite(me))){const ne={instancePath:t+"/data/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ne]:i.push(ne),e++}var Ut=Ke===e;if(!Ut)break}if(Je===e){if(s.BYTES_PER_ELEMENT!==void 0){let Z=s.BYTES_PER_ELEMENT;const me=e;if(!(typeof Z=="number"&&isFinite(Z))){const Ke={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"};i===null?i=[Ke]:i.push(Ke),e++}var de=me===e}else var de=!0;if(de){if(s.buffer!==void 0){let Z=s.buffer;const me=e;if(e===me)if(Z&&typeof Z=="object"&&!Array.isArray(Z)){let ne;if(Z.byteLength===void 0&&(ne="byteLength")){const Xe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:ne},message:"must have required property '"+ne+"'"};i===null?i=[Xe]:i.push(Xe),e++}else{const Xe=e;for(const Fe in Z)if(Fe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Fe},message:"must NOT have additional properties"};i===null?i=[Ce]:i.push(Ce),e++;break}if(Xe===e&&Z.byteLength!==void 0){let Fe=Z.byteLength;if(!(typeof Fe=="number"&&isFinite(Fe))){const Ce={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"};i===null?i=[Ce]:i.push(Ce),e++}}}}else{const ne={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[ne]:i.push(ne),e++}var de=me===e}else var de=!0;if(de){if(s.byteLength!==void 0){let Z=s.byteLength;const me=e;if(!(typeof Z=="number"&&isFinite(Z))){const ne={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ne]:i.push(ne),e++}var de=me===e}else var de=!0;if(de){if(s.byteOffset!==void 0){let Z=s.byteOffset;const me=e;if(!(typeof Z=="number"&&isFinite(Z))){const ne={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ne]:i.push(ne),e++}var de=me===e}else var de=!0;if(de)if(s.length!==void 0){let Z=s.length;const me=e;if(!(typeof Z=="number"&&isFinite(Z))){const ne={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ne]:i.push(ne),e++}var de=me===e}else var de=!0}}}}}}else{const he={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[he]:i.push(he),e++}var Ne=Oe===e;p=p||Ne}}if(p)e=L,i!==null&&(L?i.length=L:i=null);else{const ce={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[ce]:i.push(ce),e++,n.errors=i,!1}var Pe=u===e}else var Pe=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.command===void 0&&(d="command")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="command"||s==="wpCliPath"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=j===e}else var Ye=!0;if(Ye)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=p===e}else var Ye=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="wp-cli")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var _e=u===e}else var _e=!0;if(_e){if(r.command!==void 0){let s=r.command;const u=e,L=e;let p=!1;const j=e;if(typeof s!="string"){const ce={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ce]:i.push(ce),e++}var gr=j===e;if(p=p||gr,!p){const ce=e;if(e===ce)if(Array.isArray(s)){var Wr=!0;const Oe=s.length;for(let Qe=0;Qe<Oe;Qe++){const he=e;if(typeof s[Qe]!="string"){const Z={instancePath:t+"/command/"+Qe,schemaPath:"#/oneOf/26/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Z]:i.push(Z),e++}var Wr=he===e;if(!Wr)break}}else{const Oe={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[Oe]:i.push(Oe),e++}var gr=ce===e;p=p||gr}if(p)e=L,i!==null&&(L?i.length=L:i=null);else{const ce={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[ce]:i.push(ce),e++,n.errors=i,!1}var _e=u===e}else var _e=!0;if(_e)if(r.wpCliPath!==void 0){const s=e;if(typeof r.wpCliPath!="string")return n.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/26/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _e=s===e}else var _e=!0}}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.language===void 0&&(d="language")||r.step===void 0&&(d="step"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="language"))return n.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const L=e;for(const p in s)if(!(p==="weight"||p==="caption"))return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(L===e){if(s.weight!==void 0){let p=s.weight;const j=e;if(!(typeof p=="number"&&isFinite(p)))return n.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=j===e}else var Ze=!0;if(Ze)if(s.caption!==void 0){const p=e;if(typeof s.caption!="string")return n.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=p===e}else var Ze=!0}}else return n.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/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 s=r.step;const u=e;if(typeof s!="string")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteLanguage")return n.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var qe=u===e}else var qe=!0;if(qe)if(r.language!==void 0){const s=e;if(typeof r.language!="string")return n.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/27/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=s===e}else var qe=!0}}}}else return n.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return n.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:G},message:'value of tag "step" must be in oneOf'}],!1;else return n.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:G},message:'tag "step" must be string'}],!1}}else return n.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return n.errors=i,e===0}function B(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const z=e;for(const c in r)if(!Lt.call(Ls.properties,c))return B.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"}],!1;if(z===e){if(r.landingPage!==void 0){const c=e;if(typeof r.landingPage!="string")return B.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.description!==void 0){const c=e;if(typeof r.description!="string")return B.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.meta!==void 0){let c=r.meta;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){let T;if(c.title===void 0&&(T="title")||c.author===void 0&&(T="author"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const _=e;for(const y in c)if(!(y==="title"||y==="description"||y==="author"||y==="categories"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(_===e){if(c.title!==void 0){const y=e;if(typeof c.title!="string")return B.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h){if(c.description!==void 0){const y=e;if(typeof c.description!="string")return B.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h){if(c.author!==void 0){const y=e;if(typeof c.author!="string")return B.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h)if(c.categories!==void 0){let y=c.categories;const g=e;if(e===g)if(Array.isArray(y)){var b=!0;const O=y.length;for(let N=0;N<O;N++){const q=e;if(typeof y[N]!="string")return B.errors=[{instancePath:t+"/meta/categories/"+N,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=q===e;if(!b)break}}else return B.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var h=g===e}else var h=!0}}}}}else return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.preferredVersions!==void 0){let c=r.preferredVersions;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){let T;if(c.php===void 0&&(T="php")||c.wp===void 0&&(T="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const _=e;for(const y in c)if(!(y==="php"||y==="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(_===e){if(c.php!==void 0){let y=c.php;const g=e,v=e;let O=!1;const N=e;if(typeof y!="string"){const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}if(!(y==="8.3"||y==="8.2"||y==="8.1"||y==="8.0"||y==="7.4"||y==="7.3"||y==="7.2"||y==="7.1"||y==="7.0")){const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Ss.enum},message:"must be equal to one of the allowed values"};i===null?i=[q]:i.push(q),e++}var k=N===e;if(O=O||k,!O){const q=e;if(typeof y!="string"){const R={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}if(y!=="latest"){const R={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[R]:i.push(R),e++}var k=q===e;O=O||k}if(O)e=v,i!==null&&(v?i.length=v:i=null);else{const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[q]:i.push(q),e++,B.errors=i,!1}var m=g===e}else var m=!0;if(m)if(c.wp!==void 0){const y=e;if(typeof c.wp!="string")return B.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=y===e}else var m=!0}}}else return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.features!==void 0){let c=r.features;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){const T=e;for(const _ in c)if(_!=="networking")return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(T===e&&c.networking!==void 0&&typeof c.networking!="boolean")return B.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.extraLibraries!==void 0){let c=r.extraLibraries;const A=e;if(e===A)if(Array.isArray(c)){var w=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="wp-cli")return B.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var w=g===e;if(!w)break}}else return B.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.constants!==void 0){let c=r.constants;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c))for(const T in c){const _=e;if(typeof c[T]!="string")return B.errors=[{instancePath:t+"/constants/"+T.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constants/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=_===e;if(!S)break}else return B.errors=[{instancePath:t+"/constants",schemaPath:"#/properties/constants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.plugins!==void 0){let c=r.plugins;const A=e;if(e===A)if(Array.isArray(c)){var I=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e,v=e;let O=!1;const N=e;if(typeof y!="string"){const D={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),e++}var P=N===e;if(O=O||P,!O){const D=e;re(y,{instancePath:t+"/plugins/"+_,parentData:c,parentDataProperty:_,rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var P=D===e;O=O||P}if(O)e=v,i!==null&&(v?i.length=v:i=null);else{const D={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[D]:i.push(D),e++,B.errors=i,!1}var I=g===e;if(!I)break}}else return B.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.siteOptions!==void 0){let c=r.siteOptions;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){const T=e;for(const _ in c)if(_!=="blogname"){const y=e;if(typeof c[_]!="string")return B.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 U=y===e;if(!U)break}if(T===e&&c.blogname!==void 0&&typeof c.blogname!="string")return B.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return B.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.login!==void 0){let c=r.login;const A=e,$=e;let T=!1;const _=e;if(typeof c!="boolean"){const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[g]:i.push(g),e++}var te=_===e;if(T=T||te,!T){const g=e;if(e===g)if(c&&typeof c=="object"&&!Array.isArray(c)){let O;if(c.username===void 0&&(O="username")||c.password===void 0&&(O="password")){const N={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[N]:i.push(N),e++}else{const N=e;for(const q in c)if(!(q==="username"||q==="password")){const D={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:q},message:"must NOT have additional properties"};i===null?i=[D]:i.push(D),e++;break}if(N===e){if(c.username!==void 0){const q=e;if(typeof c.username!="string"){const D={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),e++}var H=q===e}else var H=!0;if(H)if(c.password!==void 0){const q=e;if(typeof c.password!="string"){const R={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}var H=q===e}else var H=!0}}}else{const O={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),e++}var te=g===e;T=T||te}if(T)e=$,i!==null&&($?i.length=$:i=null);else{const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[g]:i.push(g),e++,B.errors=i,!1}var f=A===e}else var f=!0;if(f){if(r.phpExtensionBundles!==void 0){let c=r.phpExtensionBundles;const A=e;if(e===A)if(Array.isArray(c)){var E=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/phpExtensionBundles/"+_,schemaPath:"#/definitions/SupportedPHPExtensionBundle/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(y==="kitchen-sink"||y==="light"))return B.errors=[{instancePath:t+"/phpExtensionBundles/"+_,schemaPath:"#/definitions/SupportedPHPExtensionBundle/enum",keyword:"enum",params:{allowedValues:xs.enum},message:"must be equal to one of the allowed values"}],!1;var E=g===e;if(!E)break}}else return B.errors=[{instancePath:t+"/phpExtensionBundles",schemaPath:"#/properties/phpExtensionBundles/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.steps!==void 0){let c=r.steps;const A=e;if(e===A)if(Array.isArray(c)){var x=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e,v=e;let O=!1;const N=e;n(y,{instancePath:t+"/steps/"+_,parentData:c,parentDataProperty:_,rootData:l})||(i=i===null?n.errors:i.concat(n.errors),e=i.length);var W=N===e;if(O=O||W,!O){const D=e;if(typeof y!="string"){const V={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var W=D===e;if(O=O||W,!O){const V=e,ee={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[ee]:i.push(ee),e++;var W=V===e;if(O=O||W,!O){const C=e;if(typeof y!="boolean"){const M={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[M]:i.push(M),e++}if(y!==!1){const M={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[M]:i.push(M),e++}var W=C===e;if(O=O||W,!O){const M=e;if(y!==null){const K={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[K]:i.push(K),e++}var W=M===e;O=O||W}}}}if(O)e=v,i!==null&&(v?i.length=v:i=null);else{const D={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[D]:i.push(D),e++,B.errors=i,!1}var x=g===e;if(!x)break}}else return B.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f)if(r.$schema!==void 0){const c=e;if(typeof r.$schema!="string")return B.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0}}}}}}}}}}}}}else return B.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return B.errors=i,e===0}function tr(r,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:l=r}={}){let i=null,e=0;return B(r,{instancePath:t,parentData:o,parentDataProperty:a,rootData:l})||(i=i===null?B.errors:i.concat(B.errors),e=i.length),tr.errors=i,e===0}const{wpCLI:Fs,...Yr}=cs,Cs={...Yr,"wp-cli":Fs,importFile:Yr.importWxr};function xt(r,{progress:t=new yr,semaphore:o=new Ht({concurrency:3}),onStepCompleted:a=()=>{}}={}){var m,w,S,I,P,U,te,H,E;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(Ms).filter(Bs)};for(const x of r.steps)typeof x=="object"&&x.step==="importFile"&&(x.step="importWxr",ae.warn('The "importFile" step is deprecated. Use "importWxr" 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 x=r.plugins.map(W=>typeof W=="string"?W.startsWith("https://")?{resource:"url",url:W}:{resource:"wordpress.org/plugins",slug:W}:W).map(W=>({step:"installPlugin",pluginZipFile:W}));r.steps.unshift(...x)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin",password:"password"}:r.login}),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles.length===0&&(r.phpExtensionBundles=[...r.phpExtensionBundles,"kitchen-sink"]);const l=((m=r.steps)==null?void 0:m.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="wp-cli"))??-1;if((w=r==null?void 0:r.extraLibraries)!=null&&w.includes("wp-cli")||l>-1){r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(W=>W!=="light"),ae.warn("WP-CLI is used in your Blueprint, and it requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. "));const x={step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"};l===-1?(S=r.steps)==null||S.push(x):(I=r.steps)==null||I.splice(l,0,x)}const i=(P=r.steps)==null?void 0:P.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="importWxr");i!==void 0&&i>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(x=>x!=="light"),ae.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(U=r.steps)==null||U.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:e,errors:f}=Is(r);if(!e){const x=new Error(`Invalid blueprint: ${f[0].message} at ${f[0].instancePath}`);throw x.errors=f,x}const h=r.steps||[],b=h.reduce((x,W)=>{var z;return x+(((z=W.progress)==null?void 0:z.weight)||1)},0),k=h.map(x=>Us(x,{semaphore:o,rootProgressTracker:t,totalProgressWeight:b}));return{versions:{php:Ws((te=r.preferredVersions)==null?void 0:te.php,hr,jt),wp:((H=r.preferredVersions)==null?void 0:H.wp)||"latest"},phpExtensions:Ds([],r.phpExtensionBundles||[]),features:{networking:((E=r.features)==null?void 0:E.networking)??!1},extraLibraries:r.extraLibraries||[],run:async x=>{try{for(const{resources:W}of k)for(const z of W)z.setPlayground(x),z.isAsync&&z.resolve();for(const[W,{run:z,step:c}]of Object.entries(k))try{const A=await z(x);a(A,c)}catch(A){throw ae.error(A),new Error(`Error when executing the blueprint step #${W} (${JSON.stringify(c)}) ${A instanceof Error?`: ${A.message}`:A}`,{cause:A})}}finally{try{await x.goTo(r.landingPage||"/")}catch{}t.finish()}}}}function Is(r){var l;const t=tr(r);if(t)return{valid:t};const o=new Set;for(const i of tr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||o.add(i.instancePath);const a=(l=tr.errors)==null?void 0:l.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&o.has(i.instancePath)));return{valid:t,errors:a}}function Ws(r,t,o){return r&&t.includes(r)?r:o}function Ds(r,t){const o=At.filter(l=>r.includes(l)),a=t.flatMap(l=>l in Gr?Gr[l]:[]);return Array.from(new Set([...o,...a]))}function Ms(r){return!!(typeof r=="object"&&r)}function Bs(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.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:o,totalProgressWeight:a}){var k;const l=o.stage((((k=r.progress)==null?void 0:k.weight)||1)/a),i={};for(const m of Object.keys(r)){let w=r[m];ks(w)&&(w=Le.create(w,{semaphore:t})),i[m]=w}const e=async m=>{var w;try{return l.fillSlowly(),await Cs[r.step](m,await zs(i),{tracker:l,initialCaption:(w=r.progress)==null?void 0:w.caption})}finally{l.finish()}},f=Zr(i),h=Zr(i).filter(m=>m.isAsync),b=1/(h.length+1);for(const m of h)m.progress=l.stage(b);return{run:e,step:r,resources:f}}function Zr(r){const t=[];for(const o in r){const a=r[o];a instanceof Le&&t.push(a)}return t}async function zs(r){const t={};for(const o in r){const a=r[o];a instanceof Le?t[o]=await a.resolve():t[o]=a}return t}async function Nt(r,t){await r.run(t)}function Vs(){}/**
755
+ 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"}},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 either a plugin zip 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.
756
+ 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:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The data to write"}},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"]}]},hu={type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]},properties:{}},Us={validate:jr};function jr(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e))for(const u in e){let d=e[u];const w=t,_=t;let b=!1;const B=t;Us.validate(d,{instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:u,rootData:o})||(i=i===null?Us.validate.errors:i.concat(Us.validate.errors),t=i.length);var p=B===t;if(b=b||p,!b){const P=t;if(!(d&&typeof d=="object"&&!Array.isArray(d))&&typeof d!="string"){const C={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:hu.additionalProperties.anyOf[1].type},message:"must be object,string"};i===null?i=[C]:i.push(C),t++}var p=P===t;b=b||p}if(b)t=_,i!==null&&(_?i.length=_:i=null);else{const P={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[P]:i.push(P),t++,jr.errors=i,!1}var y=w===t;if(!y)break}else return jr.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return jr.errors=i,t===0}function or(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let y;if(e.files===void 0&&(y="files")||e.name===void 0&&(y="name")||e.resource===void 0&&(y="resource"))return or.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const u=t;for(const d in e)if(!(d==="resource"||d==="files"||d==="name"))return or.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:d},message:"must NOT have additional properties"}],!1;if(u===t){if(e.resource!==void 0){let d=e.resource;const w=t;if(typeof d!="string")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(d!=="literal:directory")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=w===t}else var p=!0;if(p){if(e.files!==void 0){const d=t;jr(e.files,{instancePath:r+"/files",parentData:e,parentDataProperty:"files",rootData:o})||(i=i===null?jr.errors:i.concat(jr.errors),t=i.length);var p=d===t}else var p=!0;if(p)if(e.name!==void 0){const d=t;if(typeof e.name!="string")return or.errors=[{instancePath:r+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=d===t}else var p=!0}}}}else return or.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return or.errors=i,t===0}function Je(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let b;if(e.resource===void 0&&(b="resource")||e.url===void 0&&(b="url")||e.ref===void 0&&(b="ref")||e.path===void 0&&(b="path")){const B={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};i===null?i=[B]:i.push(B),t++}else{const B=t;for(const P in e)if(!(P==="resource"||P==="url"||P==="ref"||P==="path")){const q={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),t++;break}if(B===t){if(e.resource!==void 0){let P=e.resource;const q=t;if(typeof P!="string"){const C={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[C]:i.push(C),t++}if(P!=="git:directory"){const C={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"};i===null?i=[C]:i.push(C),t++}var w=q===t}else var w=!0;if(w){if(e.url!==void 0){const P=t;if(typeof e.url!="string"){const C={instancePath:r+"/url",schemaPath:"#/definitions/GitDirectoryReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[C]:i.push(C),t++}var w=P===t}else var w=!0;if(w){if(e.ref!==void 0){const P=t;if(typeof e.ref!="string"){const C={instancePath:r+"/ref",schemaPath:"#/definitions/GitDirectoryReference/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[C]:i.push(C),t++}var w=P===t}else var w=!0;if(w)if(e.path!==void 0){const P=t;if(typeof e.path!="string"){const C={instancePath:r+"/path",schemaPath:"#/definitions/GitDirectoryReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[C]:i.push(C),t++}var w=P===t}else var w=!0}}}}}else{const b={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[b]:i.push(b),t++}var _=u===t;if(y=y||_,!y){const b=t;or(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?or.errors:i.concat(or.errors),t=i.length);var _=b===t;y=y||_}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const b={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[b]:i.push(b),t++,Je.errors=i,!1}return Je.errors=i,t===0}const bo={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function Ue(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let C;if(e.url===void 0&&(C="url"))return Ue.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"}],!1;{const M=t;for(const I in e)if(!(I==="method"||I==="url"||I==="headers"||I==="body"))return Ue.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:I},message:"must NOT have additional properties"}],!1;if(M===t){if(e.method!==void 0){let I=e.method;const U=t;if(typeof I!="string")return Ue.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(I==="GET"||I==="POST"||I==="HEAD"||I==="OPTIONS"||I==="PATCH"||I==="PUT"||I==="DELETE"))return Ue.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=U===t}else var p=!0;if(p){if(e.url!==void 0){const I=t;if(typeof e.url!="string")return Ue.errors=[{instancePath:r+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=I===t}else var p=!0;if(p){if(e.headers!==void 0){let I=e.headers;const U=t;if(t===t)if(I&&typeof I=="object"&&!Array.isArray(I))for(const N in I){const S=t;if(typeof I[N]!="string")return Ue.errors=[{instancePath:r+"/headers/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===t;if(!y)break}else return Ue.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=U===t}else var p=!0;if(p)if(e.body!==void 0){let I=e.body;const U=t,A=t;let T=!1;const N=t;if(typeof I!="string"){const x={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[x]:i.push(x),t++}var u=N===t;if(T=T||u,!T){const x=t;if(t===x)if(I&&typeof I=="object"&&!Array.isArray(I)){let O;if(I.BYTES_PER_ELEMENT===void 0&&(O="BYTES_PER_ELEMENT")||I.buffer===void 0&&(O="buffer")||I.byteLength===void 0&&(O="byteLength")||I.byteOffset===void 0&&(O="byteOffset")||I.length===void 0&&(O="length")){const D={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[D]:i.push(D),t++}else{const D=t;for(const L in I)if(!(L==="BYTES_PER_ELEMENT"||L==="buffer"||L==="byteLength"||L==="byteOffset"||L==="length")){let F=I[L];const Y=t;if(!(typeof F=="number"&&isFinite(F))){const Z={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var d=Y===t;if(!d)break}if(D===t){if(I.BYTES_PER_ELEMENT!==void 0){let L=I.BYTES_PER_ELEMENT;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Y={instancePath:r+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),t++}var w=F===t}else var w=!0;if(w){if(I.buffer!==void 0){let L=I.buffer;const F=t;if(t===F)if(L&&typeof L=="object"&&!Array.isArray(L)){let Z;if(L.byteLength===void 0&&(Z="byteLength")){const H={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[H]:i.push(H),t++}else{const H=t;for(const K in L)if(K!=="byteLength"){const V={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:K},message:"must NOT have additional properties"};i===null?i=[V]:i.push(V),t++;break}if(H===t&&L.byteLength!==void 0){let K=L.byteLength;if(!(typeof K=="number"&&isFinite(K))){const V={instancePath:r+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[V]:i.push(V),t++}}}}else{const Z={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w){if(I.byteLength!==void 0){let L=I.byteLength;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w){if(I.byteOffset!==void 0){let L=I.byteOffset;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w)if(I.length!==void 0){let L=I.length;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0}}}}}}else{const O={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),t++}var u=x===t;if(T=T||u,!T){const O=t;if(t===O)if(I&&typeof I=="object"&&!Array.isArray(I))for(const L in I){let F=I[L];const Y=t,Z=t;let H=!1;const K=t;if(typeof F!="string"){const V={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),t++}var _=K===t;if(H=H||_,!H){const V=t;if(t===V)if(F&&typeof F=="object"&&!Array.isArray(F)){let ee;if(F.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||F.buffer===void 0&&(ee="buffer")||F.byteLength===void 0&&(ee="byteLength")||F.byteOffset===void 0&&(ee="byteOffset")||F.length===void 0&&(ee="length")){const X={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:ee},message:"must have required property '"+ee+"'"};i===null?i=[X]:i.push(X),t++}else{const X=t;for(const Q in F)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let re=F[Q];const ne=t;if(!(typeof re=="number"&&isFinite(re))){const te={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+Q.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"};i===null?i=[te]:i.push(te),t++}var b=ne===t;if(!b)break}if(X===t){if(F.BYTES_PER_ELEMENT!==void 0){let Q=F.BYTES_PER_ELEMENT;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const ne={instancePath:r+"/body/"+L.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"};i===null?i=[ne]:i.push(ne),t++}var B=re===t}else var B=!0;if(B){if(F.buffer!==void 0){let Q=F.buffer;const re=t;if(t===re)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let te;if(Q.byteLength===void 0&&(te="byteLength")){const we={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"};i===null?i=[we]:i.push(we),t++}else{const we=t;for(const ve in Q)if(ve!=="byteLength"){const Le={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"};i===null?i=[Le]:i.push(Le),t++;break}if(we===t&&Q.byteLength!==void 0){let ve=Q.byteLength;if(!(typeof ve=="number"&&isFinite(ve))){const Le={instancePath:r+"/body/"+L.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"};i===null?i=[Le]:i.push(Le),t++}}}}else{const te={instancePath:r+"/body/"+L.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"};i===null?i=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B){if(F.byteLength!==void 0){let Q=F.byteLength;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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"};i===null?i=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B){if(F.byteOffset!==void 0){let Q=F.byteOffset;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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"};i===null?i=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B)if(F.length!==void 0){let Q=F.length;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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"};i===null?i=[te]:i.push(te),t++}var B=re===t}else var B=!0}}}}}}else{const ee={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[ee]:i.push(ee),t++}var _=V===t;if(H=H||_,!H){const ee=t;if(t===ee)if(F&&typeof F=="object"&&!Array.isArray(F)){let Q;if(F.lastModified===void 0&&(Q="lastModified")||F.name===void 0&&(Q="name")||F.size===void 0&&(Q="size")||F.type===void 0&&(Q="type")||F.webkitRelativePath===void 0&&(Q="webkitRelativePath")){const re={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:Q},message:"must have required property '"+Q+"'"};i===null?i=[re]:i.push(re),t++}else{const re=t;for(const ne in F)if(!(ne==="size"||ne==="type"||ne==="lastModified"||ne==="name"||ne==="webkitRelativePath")){const te={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};i===null?i=[te]:i.push(te),t++;break}if(re===t){if(F.size!==void 0){let ne=F.size;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const we={instancePath:r+"/body/"+L.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"};i===null?i=[we]:i.push(we),t++}var P=te===t}else var P=!0;if(P){if(F.type!==void 0){const ne=t;if(typeof F.type!="string"){const we={instancePath:r+"/body/"+L.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"};i===null?i=[we]:i.push(we),t++}var P=ne===t}else var P=!0;if(P){if(F.lastModified!==void 0){let ne=F.lastModified;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const ve={instancePath:r+"/body/"+L.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"};i===null?i=[ve]:i.push(ve),t++}var P=te===t}else var P=!0;if(P){if(F.name!==void 0){const ne=t;if(typeof F.name!="string"){const we={instancePath:r+"/body/"+L.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"};i===null?i=[we]:i.push(we),t++}var P=ne===t}else var P=!0;if(P)if(F.webkitRelativePath!==void 0){const ne=t;if(typeof F.webkitRelativePath!="string"){const we={instancePath:r+"/body/"+L.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"};i===null?i=[we]:i.push(we),t++}var P=ne===t}else var P=!0}}}}}}else{const Q={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Q]:i.push(Q),t++}var _=ee===t;H=H||_}}if(H)t=Z,i!==null&&(Z?i.length=Z:i=null);else{const V={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[V]:i.push(V),t++}var q=Y===t;if(!q)break}else{const L={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),t++}var u=O===t;T=T||u}}if(T)t=A,i!==null&&(A?i.length=A:i=null);else{const x={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[x]:i.push(x),t++,Ue.errors=i,!1}var p=U===t}else var p=!0}}}}}else return Ue.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Ue.errors=i,t===0}const yu={type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1};function Oe(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const B=t;for(const P in e)if(!wo.call(yu.properties,P))return Oe.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(B===t){if(e.relativeUri!==void 0){const P=t;if(typeof e.relativeUri!="string")return Oe.errors=[{instancePath:r+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.scriptPath!==void 0){const P=t;if(typeof e.scriptPath!="string")return Oe.errors=[{instancePath:r+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.protocol!==void 0){const P=t;if(typeof e.protocol!="string")return Oe.errors=[{instancePath:r+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.method!==void 0){let P=e.method;const q=t;if(typeof P!="string")return Oe.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(P==="GET"||P==="POST"||P==="HEAD"||P==="OPTIONS"||P==="PATCH"||P==="PUT"||P==="DELETE"))return Oe.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=q===t}else var p=!0;if(p){if(e.headers!==void 0){let P=e.headers;const q=t;if(t===t)if(P&&typeof P=="object"&&!Array.isArray(P))for(const I in P){const U=t;if(typeof P[I]!="string")return Oe.errors=[{instancePath:r+"/headers/"+I.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=U===t;if(!y)break}else return Oe.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p){if(e.body!==void 0){let P=e.body;const q=t,C=t;let M=!1;const I=t;if(typeof P!="string"){const A={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),t++}var u=I===t;if(M=M||u,!M){const A=t;if(t===A)if(P&&typeof P=="object"&&!Array.isArray(P)){let N;if(P.BYTES_PER_ELEMENT===void 0&&(N="BYTES_PER_ELEMENT")||P.buffer===void 0&&(N="buffer")||P.byteLength===void 0&&(N="byteLength")||P.byteOffset===void 0&&(N="byteOffset")||P.length===void 0&&(N="length")){const S={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[S]:i.push(S),t++}else{const S=t;for(const x in P)if(!(x==="BYTES_PER_ELEMENT"||x==="buffer"||x==="byteLength"||x==="byteOffset"||x==="length")){let E=P[x];const O=t;if(!(typeof E=="number"&&isFinite(E))){const D={instancePath:r+"/body/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[D]:i.push(D),t++}var d=O===t;if(!d)break}if(S===t){if(P.BYTES_PER_ELEMENT!==void 0){let x=P.BYTES_PER_ELEMENT;const E=t;if(!(typeof x=="number"&&isFinite(x))){const O={instancePath:r+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[O]:i.push(O),t++}var w=E===t}else var w=!0;if(w){if(P.buffer!==void 0){let x=P.buffer;const E=t;if(t===E)if(x&&typeof x=="object"&&!Array.isArray(x)){let D;if(x.byteLength===void 0&&(D="byteLength")){const L={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};i===null?i=[L]:i.push(L),t++}else{const L=t;for(const F in x)if(F!=="byteLength"){const Y={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};i===null?i=[Y]:i.push(Y),t++;break}if(L===t&&x.byteLength!==void 0){let F=x.byteLength;if(!(typeof F=="number"&&isFinite(F))){const Y={instancePath:r+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),t++}}}}else{const D={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[D]:i.push(D),t++}var w=E===t}else var w=!0;if(w){if(P.byteLength!==void 0){let x=P.byteLength;const E=t;if(!(typeof x=="number"&&isFinite(x))){const D={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[D]:i.push(D),t++}var w=E===t}else var w=!0;if(w){if(P.byteOffset!==void 0){let x=P.byteOffset;const E=t;if(!(typeof x=="number"&&isFinite(x))){const D={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[D]:i.push(D),t++}var w=E===t}else var w=!0;if(w)if(P.length!==void 0){let x=P.length;const E=t;if(!(typeof x=="number"&&isFinite(x))){const D={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[D]:i.push(D),t++}var w=E===t}else var w=!0}}}}}}else{const N={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),t++}var u=A===t;M=M||u}if(M)t=C,i!==null&&(C?i.length=C:i=null);else{const A={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[A]:i.push(A),t++,Oe.errors=i,!1}var p=q===t}else var p=!0;if(p){if(e.env!==void 0){let P=e.env;const q=t;if(t===q)if(P&&typeof P=="object"&&!Array.isArray(P))for(const M in P){const I=t;if(typeof P[M]!="string")return Oe.errors=[{instancePath:r+"/env/"+M.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=I===t;if(!_)break}else return Oe.errors=[{instancePath:r+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p){if(e.$_SERVER!==void 0){let P=e.$_SERVER;const q=t;if(t===q)if(P&&typeof P=="object"&&!Array.isArray(P))for(const M in P){const I=t;if(typeof P[M]!="string")return Oe.errors=[{instancePath:r+"/$_SERVER/"+M.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=I===t;if(!b)break}else return Oe.errors=[{instancePath:r+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p)if(e.code!==void 0){const P=t;if(typeof e.code!="string")return Oe.errors=[{instancePath:r+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0}}}}}}}}}else return Oe.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Oe.errors=i,t===0}function h(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let ws;if(e.step===void 0&&(ws="step"))return h.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:ws},message:"must have required property '"+ws+"'"}],!1;{const pe=e.step;if(typeof pe=="string")if(pe==="activatePlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.pluginPath===void 0&&(R="pluginPath")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="pluginPath"||a==="pluginName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=W===t}else var p=!0;if(p)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===t}else var p=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=k===t}else var y=!0;if(y){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activatePlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var y=k===t}else var y=!0;if(y){if(e.pluginPath!==void 0){const a=t;if(typeof e.pluginPath!="string")return h.errors=[{instancePath:r+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0;if(y)if(e.pluginName!==void 0){const a=t;if(typeof e.pluginName!="string")return h.errors=[{instancePath:r+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="activateTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.themeFolderName===void 0&&(R="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var u=W===t}else var u=!0;if(u)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===t}else var u=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=k===t}else var d=!0;if(d){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activateTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var d=k===t}else var d=!0;if(d)if(e.themeFolderName!==void 0){const a=t;if(typeof e.themeFolderName!="string")return h.errors=[{instancePath:r+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=a===t}else var d=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="cp"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.fromPath===void 0&&(R="fromPath")||e.step===void 0&&(R="step")||e.toPath===void 0&&(R="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=W===t}else var w=!0;if(w)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=m===t}else var w=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=k===t}else var _=!0;if(_){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="cp")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var _=k===t}else var _=!0;if(_){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===t}else var _=!0;if(_)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===t}else var _=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineWpConfigConsts"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.consts===void 0&&(R="consts")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="consts"||a==="method"||a==="virtualize"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=W===t}else var b=!0;if(b)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=m===t}else var b=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var B=k===t}else var B=!0;if(B){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineWpConfigConsts")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var B=k===t}else var B=!0;if(B){if(e.consts!==void 0){let a=e.consts;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var B=k===t}else var B=!0;if(B){if(e.method!==void 0){let a=e.method;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="rewrite-wp-config"||a==="define-before-run"))return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:qs.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var B=k===t}else var B=!0;if(B)if(e.virtualize!==void 0){const a=t;if(typeof e.virtualize!="boolean")return h.errors=[{instancePath:r+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var B=a===t}else var B=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineSiteUrl"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.siteUrl===void 0&&(R="siteUrl")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="siteUrl"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=W===t}else var P=!0;if(P)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=m===t}else var P=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var q=k===t}else var q=!0;if(q){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineSiteUrl")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var q=k===t}else var q=!0;if(q)if(e.siteUrl!==void 0){const a=t;if(typeof e.siteUrl!="string")return h.errors=[{instancePath:r+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===t}else var q=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="enableMultisite"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var C=W===t}else var C=!0;if(C)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=m===t}else var C=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=k===t}else var M=!0;if(M){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="enableMultisite")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var M=k===t}else var M=!0;if(M)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=a===t}else var M=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWxr"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.file===void 0&&(R="file")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="file"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var I=W===t}else var I=!0;if(I)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var I=m===t}else var I=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var U=k===t}else var U=!0;if(U){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWxr")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var U=k===t}else var U=!0;if(U)if(e.file!==void 0){const a=t;le(e.file,{instancePath:r+"/file",parentData:e,parentDataProperty:"file",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var U=a===t}else var U=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importThemeStarterContent"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeSlug"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var A=W===t}else var A=!0;if(A)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=m===t}else var A=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=k===t}else var T=!0;if(T){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importThemeStarterContent")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var T=k===t}else var T=!0;if(T)if(e.themeSlug!==void 0){const a=t;if(typeof e.themeSlug!="string")return h.errors=[{instancePath:r+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=a===t}else var T=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWordPressFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.wordPressFilesZip===void 0&&(R="wordPressFilesZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wordPressFilesZip"||a==="pathInZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var N=W===t}else var N=!0;if(N)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=m===t}else var N=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var S=k===t}else var S=!0;if(S){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWordPressFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var S=k===t}else var S=!0;if(S){if(e.wordPressFilesZip!==void 0){const a=t;le(e.wordPressFilesZip,{instancePath:r+"/wordPressFilesZip",parentData:e,parentDataProperty:"wordPressFilesZip",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var S=a===t}else var S=!0;if(S)if(e.pathInZip!==void 0){const a=t;if(typeof e.pathInZip!="string")return h.errors=[{instancePath:r+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=a===t}else var S=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installPlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.pluginData===void 0&&(R="pluginData")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="pluginData"||a==="pluginZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var x=W===t}else var x=!0;if(x)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=m===t}else var x=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=k===t}else var E=!0;if(E){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:qs.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var E=k===t}else var E=!0;if(E){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installPlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var E=k===t}else var E=!0;if(E){if(e.pluginData!==void 0){let a=e.pluginData;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var O=W===t;if(m=m||O,!m){const Pe=t;Je(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var O=Pe===t;m=m||O}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var E=k===t}else var E=!0;if(E){if(e.pluginZipFile!==void 0){const a=t;le(e.pluginZipFile,{instancePath:r+"/pluginZipFile",parentData:e,parentDataProperty:"pluginZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var E=a===t}else var E=!0;if(E)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="activate"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var D=me===t}else var D=!0;if(D)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=me===t}else var D=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=k===t}else var E=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.themeData===void 0&&(R="themeData"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="themeData"||a==="themeZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var L=W===t}else var L=!0;if(L)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=m===t}else var L=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=k===t}else var F=!0;if(F){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:qs.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var F=k===t}else var F=!0;if(F){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var F=k===t}else var F=!0;if(F){if(e.themeData!==void 0){let a=e.themeData;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var Y=W===t;if(m=m||Y,!m){const Pe=t;Je(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var Y=Pe===t;m=m||Y}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var F=k===t}else var F=!0;if(F){if(e.themeZipFile!==void 0){const a=t;le(e.themeZipFile,{instancePath:r+"/themeZipFile",parentData:e,parentDataProperty:"themeZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var F=a===t}else var F=!0;if(F)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="activate"||me==="importStarterContent"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var Z=me===t}else var Z=!0;if(Z){if(a.importStarterContent!==void 0){const me=t;if(typeof a.importStarterContent!="boolean")return h.errors=[{instancePath:r+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var Z=me===t}else var Z=!0;if(Z)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Z=me===t}else var Z=!0}}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=k===t}else var F=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="login"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="username"||a==="password"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var H=W===t}else var H=!0;if(H)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var H=m===t}else var H=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var K=k===t}else var K=!0;if(K){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="login")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var K=k===t}else var K=!0;if(K){if(e.username!==void 0){const a=t;if(typeof e.username!="string")return h.errors=[{instancePath:r+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===t}else var K=!0;if(K)if(e.password!==void 0){const a=t;if(typeof e.password!="string")return h.errors=[{instancePath:r+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===t}else var K=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mkdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=W===t}else var V=!0;if(V)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=m===t}else var V=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var se=k===t}else var se=!0;if(se){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mkdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var se=k===t}else var se=!0;if(se)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var se=a===t}else var se=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mv"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.fromPath===void 0&&(R="fromPath")||e.step===void 0&&(R="step")||e.toPath===void 0&&(R="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ee=W===t}else var ee=!0;if(ee)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ee=m===t}else var ee=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var X=k===t}else var X=!0;if(X){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mv")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var X=k===t}else var X=!0;if(X){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0;if(X)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="resetData"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Q=W===t}else var Q=!0;if(Q)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Q=m===t}else var Q=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=k===t}else var re=!0;if(re)if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="resetData")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var re=k===t}else var re=!0}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="request"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.request===void 0&&(R="request")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="request"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ne=W===t}else var ne=!0;if(ne)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ne=m===t}else var ne=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=k===t}else var te=!0;if(te){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="request")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var te=k===t}else var te=!0;if(te)if(e.request!==void 0){const a=t;Ue(e.request,{instancePath:r+"/request",parentData:e,parentDataProperty:"request",rootData:o})||(i=i===null?Ue.errors:i.concat(Ue.errors),t=i.length);var te=a===t}else var te=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rm"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var we=W===t}else var we=!0;if(we)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var we=m===t}else var we=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=k===t}else var ve=!0;if(ve){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rm")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ve=k===t}else var ve=!0;if(ve)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ve=a===t}else var ve=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rmdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Le=W===t}else var Le=!0;if(Le)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Le=m===t}else var Le=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var tr=k===t}else var tr=!0;if(tr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rmdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var tr=k===t}else var tr=!0;if(tr)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var tr=a===t}else var tr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHP"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.code===void 0&&(R="code")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="code"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Mr=W===t}else var Mr=!0;if(Mr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Mr=m===t}else var Mr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var sr=k===t}else var sr=!0;if(sr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHP")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var sr=k===t}else var sr=!0;if(sr)if(e.code!==void 0){const a=t;if(typeof e.code!="string")return h.errors=[{instancePath:r+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var sr=a===t}else var sr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHPWithOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Qe=W===t}else var Qe=!0;if(Qe)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=m===t}else var Qe=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ce=k===t}else var Ce=!0;if(Ce){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHPWithOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Ce=k===t}else var Ce=!0;if(Ce)if(e.options!==void 0){const a=t;Oe(e.options,{instancePath:r+"/options",parentData:e,parentDataProperty:"options",rootData:o})||(i=i===null?Oe.errors:i.concat(Oe.errors),t=i.length);var Ce=a===t}else var Ce=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runWpInstallationWizard"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Wr=W===t}else var Wr=!0;if(Wr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Wr=m===t}else var Wr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=k===t}else var cr=!0;if(cr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runWpInstallationWizard")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var cr=k===t}else var cr=!0;if(cr)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="adminUsername"||me==="adminPassword"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.adminUsername!==void 0){const me=t;if(typeof a.adminUsername!="string")return h.errors=[{instancePath:r+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var vr=me===t}else var vr=!0;if(vr)if(a.adminPassword!==void 0){const me=t;if(typeof a.adminPassword!="string")return h.errors=[{instancePath:r+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var vr=me===t}else var vr=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=k===t}else var cr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runSql"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.sql===void 0&&(R="sql")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="sql"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Hr=W===t}else var Hr=!0;if(Hr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Hr=m===t}else var Hr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var dr=k===t}else var dr=!0;if(dr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runSql")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var dr=k===t}else var dr=!0;if(dr)if(e.sql!==void 0){const a=t;le(e.sql,{instancePath:r+"/sql",parentData:e,parentDataProperty:"sql",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var dr=a===t}else var dr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ar=W===t}else var Ar=!0;if(Ar)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ar=m===t}else var Ar=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Me=k===t}else var Me=!0;if(Me){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Me=k===t}else var Me=!0;if(Me)if(e.options!==void 0){let a=e.options;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Me=k===t}else var Me=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="unzip"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.extractToPath===void 0&&(R="extractToPath")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="zipFile"||a==="zipPath"||a==="extractToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Be=W===t}else var Be=!0;if(Be)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=m===t}else var Be=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=k===t}else var Ae=!0;if(Ae){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="unzip")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var Ae=k===t}else var Ae=!0;if(Ae){if(e.zipFile!==void 0){const a=t;le(e.zipFile,{instancePath:r+"/zipFile",parentData:e,parentDataProperty:"zipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var Ae=a===t}else var Ae=!0;if(Ae){if(e.zipPath!==void 0){const a=t;if(typeof e.zipPath!="string")return h.errors=[{instancePath:r+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ae=a===t}else var Ae=!0;if(Ae)if(e.extractToPath!==void 0){const a=t;if(typeof e.extractToPath!="string")return h.errors=[{instancePath:r+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ae=a===t}else var Ae=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="updateUserMeta"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.meta===void 0&&(R="meta")||e.step===void 0&&(R="step")||e.userId===void 0&&(R="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="meta"||a==="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Zr=W===t}else var Zr=!0;if(Zr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Zr=m===t}else var Zr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=k===t}else var Ee=!0;if(Ee){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="updateUserMeta")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var Ee=k===t}else var Ee=!0;if(Ee){if(e.meta!==void 0){let a=e.meta;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=k===t}else var Ee=!0;if(Ee)if(e.userId!==void 0){let a=e.userId;const k=t;if(!(typeof a=="number"&&isFinite(a)))return h.errors=[{instancePath:r+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ee=k===t}else var Ee=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFile"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.data===void 0&&(R="data")||e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"||a==="data"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Vr=W===t}else var Vr=!0;if(Vr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Vr=m===t}else var Vr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var c=k===t}else var c=!0;if(c){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFile")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var c=k===t}else var c=!0;if(c){if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=a===t}else var c=!0;if(c)if(e.data!==void 0){let a=e.data;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/data",parentData:e,parentDataProperty:"data",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var f=W===t;if(m=m||f,!m){const Pe=t;if(typeof a!="string"){const ir={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ir]:i.push(ir),t++}var f=Pe===t;if(m=m||f,!m){const ir=t;if(t===ir)if(a&&typeof a=="object"&&!Array.isArray(a)){let We;if(a.BYTES_PER_ELEMENT===void 0&&(We="BYTES_PER_ELEMENT")||a.buffer===void 0&&(We="buffer")||a.byteLength===void 0&&(We="byteLength")||a.byteOffset===void 0&&(We="byteOffset")||a.length===void 0&&(We="length")){const Bt={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:We},message:"must have required property '"+We+"'"};i===null?i=[Bt]:i.push(Bt),t++}else{const Bt=t;for(const ue in a)if(!(ue==="BYTES_PER_ELEMENT"||ue==="buffer"||ue==="byteLength"||ue==="byteOffset"||ue==="length")){let De=a[ue];const It=t;if(!(typeof De=="number"&&isFinite(De))){const Te={instancePath:r+"/data/"+ue.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var l=It===t;if(!l)break}if(Bt===t){if(a.BYTES_PER_ELEMENT!==void 0){let ue=a.BYTES_PER_ELEMENT;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const It={instancePath:r+"/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"};i===null?i=[It]:i.push(It),t++}var g=De===t}else var g=!0;if(g){if(a.buffer!==void 0){let ue=a.buffer;const De=t;if(t===De)if(ue&&typeof ue=="object"&&!Array.isArray(ue)){let Te;if(ue.byteLength===void 0&&(Te="byteLength")){const jt={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:Te},message:"must have required property '"+Te+"'"};i===null?i=[jt]:i.push(jt),t++}else{const jt=t;for(const ot in ue)if(ot!=="byteLength"){const pt={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ot},message:"must NOT have additional properties"};i===null?i=[pt]:i.push(pt),t++;break}if(jt===t&&ue.byteLength!==void 0){let ot=ue.byteLength;if(!(typeof ot=="number"&&isFinite(ot))){const pt={instancePath:r+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[pt]:i.push(pt),t++}}}}else{const Te={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g){if(a.byteLength!==void 0){let ue=a.byteLength;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g){if(a.byteOffset!==void 0){let ue=a.byteOffset;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g)if(a.length!==void 0){let ue=a.length;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0}}}}}}else{const We={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[We]:i.push(We),t++}var f=ir===t;m=m||f}}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var c=k===t}else var c=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.filesTree===void 0&&(R="filesTree")||e.step===void 0&&(R="step")||e.writeToPath===void 0&&(R="writeToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="writeToPath"||a==="filesTree"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=W===t}else var v=!0;if(v)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=m===t}else var v=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=k===t}else var $=!0;if($){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var $=k===t}else var $=!0;if($){if(e.writeToPath!==void 0){const a=t;if(typeof e.writeToPath!="string")return h.errors=[{instancePath:r+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=a===t}else var $=!0;if($)if(e.filesTree!==void 0){const a=t;Je(e.filesTree,{instancePath:r+"/filesTree",parentData:e,parentDataProperty:"filesTree",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var $=a===t}else var $=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="wp-cli"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.command===void 0&&(R="command")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="command"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var j=W===t}else var j=!0;if(j)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=m===t}else var j=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var J=k===t}else var J=!0;if(J){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="wp-cli")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var J=k===t}else var J=!0;if(J){if(e.command!==void 0){let a=e.command;const k=t,z=t;let m=!1;const W=t;if(typeof a!="string"){const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),t++}var ye=W===t;if(m=m||ye,!m){const Pe=t;if(t===Pe)if(Array.isArray(a)){var de=!0;const ir=a.length;for(let Ft=0;Ft<ir;Ft++){const We=t;if(typeof a[Ft]!="string"){const ue={instancePath:r+"/command/"+Ft,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ue]:i.push(ue),t++}var de=We===t;if(!de)break}}else{const ir={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[ir]:i.push(ir),t++}var ye=Pe===t;m=m||ye}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var J=k===t}else var J=!0;if(J)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var J=a===t}else var J=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteLanguage"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.language===void 0&&(R="language")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="language"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var he=W===t}else var he=!0;if(he)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var he=m===t}else var he=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ae=k===t}else var ae=!0;if(ae){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteLanguage")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var ae=k===t}else var ae=!0;if(ae)if(e.language!==void 0){const a=t;if(typeof e.language!="string")return h.errors=[{instancePath:r+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ae=a===t}else var ae=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:pe},message:'value of tag "step" must be in oneOf'}],!1;else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:pe},message:'tag "step" must be string'}],!1}}else return h.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return h.errors=i,t===0}function ie(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const A=t;for(const T in e)if(!wo.call(cu.properties,T))return ie.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"}],!1;if(A===t){if(e.landingPage!==void 0){const T=t;if(typeof e.landingPage!="string")return ie.errors=[{instancePath:r+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=T===t}else var p=!0;if(p){if(e.description!==void 0){const T=t;if(typeof e.description!="string")return ie.errors=[{instancePath:r+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=T===t}else var p=!0;if(p){if(e.meta!==void 0){let T=e.meta;const N=t;if(t===N)if(T&&typeof T=="object"&&!Array.isArray(T)){let x;if(T.title===void 0&&(x="title")||T.author===void 0&&(x="author"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"}],!1;{const E=t;for(const O in T)if(!(O==="title"||O==="description"||O==="author"||O==="categories"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(E===t){if(T.title!==void 0){const O=t;if(typeof T.title!="string")return ie.errors=[{instancePath:r+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y){if(T.description!==void 0){const O=t;if(typeof T.description!="string")return ie.errors=[{instancePath:r+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y){if(T.author!==void 0){const O=t;if(typeof T.author!="string")return ie.errors=[{instancePath:r+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y)if(T.categories!==void 0){let O=T.categories;const D=t;if(t===D)if(Array.isArray(O)){var u=!0;const F=O.length;for(let Y=0;Y<F;Y++){const Z=t;if(typeof O[Y]!="string")return ie.errors=[{instancePath:r+"/meta/categories/"+Y,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=Z===t;if(!u)break}}else return ie.errors=[{instancePath:r+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var y=D===t}else var y=!0}}}}}else return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.preferredVersions!==void 0){let T=e.preferredVersions;const N=t;if(t===N)if(T&&typeof T=="object"&&!Array.isArray(T)){let x;if(T.php===void 0&&(x="php")||T.wp===void 0&&(x="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"}],!1;{const E=t;for(const O in T)if(!(O==="php"||O==="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(E===t){if(T.php!==void 0){let O=T.php;const D=t,L=t;let F=!1;const Y=t;if(typeof O!="string"){const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Z]:i.push(Z),t++}if(!(O==="8.3"||O==="8.2"||O==="8.1"||O==="8.0"||O==="7.4"||O==="7.3"||O==="7.2"||O==="7.1"||O==="7.0")){const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:du.enum},message:"must be equal to one of the allowed values"};i===null?i=[Z]:i.push(Z),t++}var d=Y===t;if(F=F||d,!F){const Z=t;if(typeof O!="string"){const K={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}if(O!=="latest"){const K={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[K]:i.push(K),t++}var d=Z===t;F=F||d}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Z]:i.push(Z),t++,ie.errors=i,!1}var w=D===t}else var w=!0;if(w)if(T.wp!==void 0){const O=t;if(typeof T.wp!="string")return ie.errors=[{instancePath:r+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=O===t}else var w=!0}}}else return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.features!==void 0){let T=e.features;const N=t;if(t===N)if(T&&typeof T=="object"&&!Array.isArray(T)){const x=t;for(const E in T)if(E!=="networking")return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(x===t&&T.networking!==void 0&&typeof T.networking!="boolean")return ie.errors=[{instancePath:r+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.extraLibraries!==void 0){let T=e.extraLibraries;const N=t;if(t===N)if(Array.isArray(T)){var _=!0;const x=T.length;for(let E=0;E<x;E++){let O=T[E];const D=t;if(typeof O!="string")return ie.errors=[{instancePath:r+"/extraLibraries/"+E,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(O!=="wp-cli")return ie.errors=[{instancePath:r+"/extraLibraries/"+E,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var _=D===t;if(!_)break}}else return ie.errors=[{instancePath:r+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p){if(e.constants!==void 0){let T=e.constants;const N=t;if(t===N)if(T&&typeof T=="object"&&!Array.isArray(T))for(const x in T){const E=t;if(typeof T[x]!="string")return ie.errors=[{instancePath:r+"/constants/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constants/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=E===t;if(!b)break}else return ie.errors=[{instancePath:r+"/constants",schemaPath:"#/properties/constants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.plugins!==void 0){let T=e.plugins;const N=t;if(t===N)if(Array.isArray(T)){var B=!0;const x=T.length;for(let E=0;E<x;E++){let O=T[E];const D=t,L=t;let F=!1;const Y=t;if(typeof O!="string"){const H={instancePath:r+"/plugins/"+E,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var P=Y===t;if(F=F||P,!F){const H=t;le(O,{instancePath:r+"/plugins/"+E,parentData:T,parentDataProperty:E,rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var P=H===t;F=F||P}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const H={instancePath:r+"/plugins/"+E,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[H]:i.push(H),t++,ie.errors=i,!1}var B=D===t;if(!B)break}}else return ie.errors=[{instancePath:r+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p){if(e.siteOptions!==void 0){let T=e.siteOptions;const N=t;if(t===N)if(T&&typeof T=="object"&&!Array.isArray(T)){const x=t;for(const E in T)if(E!=="blogname"){const O=t;if(typeof T[E]!="string")return ie.errors=[{instancePath:r+"/siteOptions/"+E.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=O===t;if(!q)break}if(x===t&&T.blogname!==void 0&&typeof T.blogname!="string")return ie.errors=[{instancePath:r+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return ie.errors=[{instancePath:r+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.login!==void 0){let T=e.login;const N=t,S=t;let x=!1;const E=t;if(typeof T!="boolean"){const D={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[D]:i.push(D),t++}var C=E===t;if(x=x||C,!x){const D=t;if(t===D)if(T&&typeof T=="object"&&!Array.isArray(T)){let F;if(T.username===void 0&&(F="username")||T.password===void 0&&(F="password")){const Y={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};i===null?i=[Y]:i.push(Y),t++}else{const Y=t;for(const Z in T)if(!(Z==="username"||Z==="password")){const H={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Z},message:"must NOT have additional properties"};i===null?i=[H]:i.push(H),t++;break}if(Y===t){if(T.username!==void 0){const Z=t;if(typeof T.username!="string"){const H={instancePath:r+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var M=Z===t}else var M=!0;if(M)if(T.password!==void 0){const Z=t;if(typeof T.password!="string"){const K={instancePath:r+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}var M=Z===t}else var M=!0}}}else{const F={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[F]:i.push(F),t++}var C=D===t;x=x||C}if(x)t=S,i!==null&&(S?i.length=S:i=null);else{const D={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[D]:i.push(D),t++,ie.errors=i,!1}var p=N===t}else var p=!0;if(p){if(e.steps!==void 0){let T=e.steps;const N=t;if(t===N)if(Array.isArray(T)){var I=!0;const x=T.length;for(let E=0;E<x;E++){let O=T[E];const D=t,L=t;let F=!1;const Y=t;h(O,{instancePath:r+"/steps/"+E,parentData:T,parentDataProperty:E,rootData:o})||(i=i===null?h.errors:i.concat(h.errors),t=i.length);var U=Y===t;if(F=F||U,!F){const H=t;if(typeof O!="string"){const V={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),t++}var U=H===t;if(F=F||U,!F){const V=t,se={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[se]:i.push(se),t++;var U=V===t;if(F=F||U,!F){const X=t;if(typeof O!="boolean"){const re={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[re]:i.push(re),t++}if(O!==!1){const re={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[re]:i.push(re),t++}var U=X===t;if(F=F||U,!F){const re=t;if(O!==null){const te={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[te]:i.push(te),t++}var U=re===t;F=F||U}}}}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const H={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[H]:i.push(H),t++,ie.errors=i,!1}var I=D===t;if(!I)break}}else return ie.errors=[{instancePath:r+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p)if(e.$schema!==void 0){const T=t;if(typeof e.$schema!="string")return ie.errors=[{instancePath:r+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=T===t}else var p=!0}}}}}}}}}}}}else return ie.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ie.errors=i,t===0}function Gt(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;return ie(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?ie.errors:i.concat(ie.errors),t=i.length),Gt.errors=i,t===0}const{wpCLI:mu,...An}=sp,gu={...An,"wp-cli":mu,importFile:An.importWxr};function _o(e,{progress:r=new ls,semaphore:s=new Ro({concurrency:3}),onStepCompleted:n=()=>{},corsProxy:o}={}){var _,b,B,P,q,C,M,I,U;e=structuredClone(e),e={...e,steps:(e.steps||[]).filter(_u).filter(vu)};for(const A of e.steps)!A||typeof A!="object"||(A.step==="importFile"?(A.step="importWxr",Se.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(A==null?void 0:A.step)==="installPlugin"&&"pluginZipFile"in A?(A.pluginData=A.pluginZipFile,Se.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(A==null?void 0:A.step)==="installTheme"&&"themeZipFile"in A&&(A.themeData=A.themeZipFile,Se.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" instead.')));if(e.constants&&e.steps.unshift({step:"defineWpConfigConsts",consts:e.constants}),e.siteOptions&&e.steps.unshift({step:"setSiteOptions",options:e.siteOptions}),e.plugins){const A=e.plugins.map(T=>typeof T=="string"?T.startsWith("https://")?{resource:"url",url:T}:{resource:"wordpress.org/plugins",slug:T}:T).map(T=>({step:"installPlugin",pluginData:T}));e.steps.unshift(...A)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin"}:e.login});const i=((_=e.steps)==null?void 0:_.findIndex(A=>typeof A=="object"&&(A==null?void 0:A.step)&&["wp-cli","enableMultisite"].includes(A.step)))??-1;if((b=e==null?void 0:e.extraLibraries)!=null&&b.includes("wp-cli")||i!==-1){const A={step:"writeFile",data:Vo,path:li};i===-1?(B=e.steps)==null||B.push(A):(P=e.steps)==null||P.splice(i,0,A)}const t=(q=e.steps)==null?void 0:q.findIndex(A=>typeof A=="object"&&(A==null?void 0:A.step)==="importWxr");t!==void 0&&t>-1&&((C=e.steps)==null||C.splice(t,0,{step:"installPlugin",pluginData:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:p,errors:y}=wu(e);if(!p){const A=new Error(`Invalid blueprint: ${y[0].message} at ${y[0].instancePath}`);throw A.errors=y,A}const u=e.steps||[],d=u.reduce((A,T)=>{var N;return A+(((N=T.progress)==null?void 0:N.weight)||1)},0),w=u.map(A=>Pu(A,{semaphore:s,rootProgressTracker:r,totalProgressWeight:d,corsProxy:o}));return{versions:{php:bu((M=e.preferredVersions)==null?void 0:M.php,as,Kn),wp:((I=e.preferredVersions)==null?void 0:I.wp)||"latest"},features:{networking:((U=e.features)==null?void 0:U.networking)??!1},extraLibraries:e.extraLibraries||[],run:async A=>{try{for(const{resources:T}of w)for(const N of T)N.setPlayground(A),N.isAsync&&N.resolve();for(const[T,{run:N,step:S}]of Object.entries(w))try{const x=await N(A);n(x,S)}catch(x){throw Se.error(x),new Error(`Error when executing the blueprint step #${T} (${JSON.stringify(S)}) ${x instanceof Error?`: ${x.message}`:x}`,{cause:x})}}finally{try{await A.goTo(e.landingPage||"/")}catch{}r.finish()}}}}function wu(e){var o;const r=Gt(e);if(r)return{valid:r};const s=new Set;for(const i of Gt.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||s.add(i.instancePath);const n=(o=Gt.errors)==null?void 0:o.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&s.has(i.instancePath)));return{valid:r,errors:n}}function bu(e,r,s){return e&&r.includes(e)?e:s}function _u(e){return!!(typeof e=="object"&&e)}function vu(e){return["setPhpIniEntry","request"].includes(e.step)?(Se.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Pu(e,{semaphore:r,rootProgressTracker:s,totalProgressWeight:n,corsProxy:o}){var w;const i=s.stage((((w=e.progress)==null?void 0:w.weight)||1)/n),t={};for(const _ of Object.keys(e)){let b=e[_];ru(b)&&(b=_r.create(b,{semaphore:r,corsProxy:o})),t[_]=b}const p=async _=>{var b;try{return i.fillSlowly(),await gu[e.step](_,await ku(t),{tracker:i,initialCaption:(b=e.progress)==null?void 0:b.caption})}finally{i.finish()}},y=Sn(t),u=Sn(t).filter(_=>_.isAsync),d=1/(u.length+1);for(const _ of u)_.progress=i.stage(d);return{run:p,step:e,resources:y}}function Sn(e){const r=[];for(const s in e){const n=e[s];n instanceof _r&&r.push(n)}return r}async function ku(e){const r={};for(const s in e){const n=e[s];n instanceof _r?r[s]=await n.resolve():r[s]=n}return r}async function vo(e,r){await e.run(r)}function Eu(){}/**
738
757
  * @license
739
758
  * Copyright 2019 Google LLC
740
759
  * SPDX-License-Identifier: Apache-2.0
741
- */const Ft=Symbol("Comlink.proxy"),Hs=Symbol("Comlink.endpoint"),Gs=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),Ct=r=>typeof r=="object"&&r!==null||typeof r=="function",Ys={canHandle:r=>Ct(r)&&r[Ft],serialize(r){const{port1:t,port2:o}=new MessageChannel;return Cr(r,t),[o,[o]]},deserialize(r){return r.start(),Ir(r)}},Zs={canHandle:r=>Ct(r)&&sr in r,serialize({value:r}){let t;return r instanceof Error?t={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:t={isError:!1,value:r},[t,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},xe=new Map([["proxy",Ys],["throw",Zs]]);function Qs(r,t){for(const o of r)if(t===o||o==="*"||o instanceof RegExp&&o.test(t))return!0;return!1}function Cr(r,t=globalThis,o=["*"]){t.addEventListener("message",function a(l){if(!l||!l.data)return;if(!Qs(o,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:i,type:e,path:f}=Object.assign({path:[]},l.data),h=(l.data.argumentList||[]).map(Re);let b;try{const k=f.slice(0,-1).reduce((w,S)=>w[S],r),m=f.reduce((w,S)=>w[S],r);switch(e){case"GET":b=m;break;case"SET":k[f.slice(-1)[0]]=Re(l.data.value),b=!0;break;case"APPLY":b=m.apply(k,h);break;case"CONSTRUCT":{const w=new m(...h);b=Mt(w)}break;case"ENDPOINT":{const{port1:w,port2:S}=new MessageChannel;Cr(r,S),b=ri(w,[w])}break;case"RELEASE":b=void 0;break;default:return}}catch(k){b={value:k,[sr]:0}}Promise.resolve(b).catch(k=>({value:k,[sr]:0})).then(k=>{const[m,w]=ur(k);t.postMessage(Object.assign(Object.assign({},m),{id:i}),w),e==="RELEASE"&&(t.removeEventListener("message",a),It(t),Or in r&&typeof r[Or]=="function"&&r[Or]())}).catch(k=>{const[m,w]=ur({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},m),{id:i}),w)})}),t.start&&t.start()}function Js(r){return r.constructor.name==="MessagePort"}function It(r){Js(r)&&r.close()}function Ir(r,t){return jr(r,[],t)}function er(r){if(r)throw new Error("Proxy has been released and is not useable")}function Wt(r){return Se(r,{type:"RELEASE"}).then(()=>{It(r)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=(lr.get(r)||0)-1;lr.set(r,t),t===0&&Wt(r)});function Ks(r,t){const o=(lr.get(t)||0)+1;lr.set(t,o),fr&&fr.register(r,t,r)}function Xs(r){fr&&fr.unregister(r)}function jr(r,t=[],o=function(){}){let a=!1;const l=new Proxy(o,{get(i,e){if(er(a),e===Gs)return()=>{Xs(l),Wt(r),a=!0};if(e==="then"){if(t.length===0)return{then:()=>l};const f=Se(r,{type:"GET",path:t.map(h=>h.toString())}).then(Re);return f.then.bind(f)}return jr(r,[...t,e])},set(i,e,f){er(a);const[h,b]=ur(f);return Se(r,{type:"SET",path:[...t,e].map(k=>k.toString()),value:h},b).then(Re)},apply(i,e,f){er(a);const h=t[t.length-1];if(h===Hs)return Se(r,{type:"ENDPOINT"}).then(Re);if(h==="bind")return jr(r,t.slice(0,-1));const[b,k]=Qr(f);return Se(r,{type:"APPLY",path:t.map(m=>m.toString()),argumentList:b},k).then(Re)},construct(i,e){er(a);const[f,h]=Qr(e);return Se(r,{type:"CONSTRUCT",path:t.map(b=>b.toString()),argumentList:f},h).then(Re)}});return Ks(l,r),l}function ei(r){return Array.prototype.concat.apply([],r)}function Qr(r){const t=r.map(ur);return[t.map(o=>o[0]),ei(t.map(o=>o[1]))]}const Dt=new WeakMap;function ri(r,t){return Dt.set(r,t),r}function Mt(r){return Object.assign(r,{[Ft]:!0})}function ti(r,t=globalThis,o="*"){return{postMessage:(a,l)=>r.postMessage(a,o,l),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function ur(r){for(const[t,o]of xe)if(o.canHandle(r)){const[a,l]=o.serialize(r);return[{type:"HANDLER",name:t,value:a},l]}return[{type:"RAW",value:r},Dt.get(r)||[]]}function Re(r){switch(r.type){case"HANDLER":return xe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function Se(r,t,o){return new Promise(a=>{const l=si();r.addEventListener("message",function i(e){!e.data||!e.data.id||e.data.id!==l||(r.removeEventListener("message",i),a(e.data))}),r.start&&r.start(),r.postMessage(Object.assign({id:l},t),o)})}function si(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function ii(r,t=void 0){ni();const o=r instanceof Worker?r:ti(r,t),a=Ir(o),l=Bt(a);return new Proxy(l,{get:(i,e)=>e==="isConnected"?async()=>{for(;;)try{await oi(a.isConnected(),200);break}catch{}}:a[e]})}async function oi(r,t){return new Promise((o,a)=>{setTimeout(a,t),r.then(o)})}let Jr=!1;function ni(){if(Jr)return;Jr=!0,xe.set("EVENT",{canHandle:o=>o instanceof CustomEvent,serialize:o=>[{detail:o.detail},[]],deserialize:o=>o}),xe.set("FUNCTION",{canHandle:o=>typeof o=="function",serialize(o){const{port1:a,port2:l}=new MessageChannel;return Cr(o,a),[l,[l]]},deserialize(o){return o.start(),Ir(o)}}),xe.set("PHPResponse",{canHandle:o=>typeof o=="object"&&o!==null&&"headers"in o&&"bytes"in o&&"errors"in o&&"exitCode"in o&&"httpStatusCode"in o,serialize(o){return[o.toRawData(),[]]},deserialize(o){return pr.fromRawData(o)}});const r=xe.get("throw"),t=r==null?void 0:r.serialize;r.serialize=({value:o})=>{const a=t({value:o});return o.response&&(a[0].value.response=o.response),o.source&&(a[0].value.source=o.source),a}}function Bt(r){return new Proxy(r,{get(t,o){switch(typeof t[o]){case"function":return(...a)=>t[o](...a);case"object":return t[o]===null?t[o]:Bt(t[o]);case"undefined":case"number":case"string":return t[o];default:return Mt(t[o])}}})}new Promise(r=>{});async function ai({iframe:r,blueprint:t,remoteUrl:o,progressTracker:a=new yr,disableProgressBar:l,onBlueprintStepCompleted:i,onClientConnected:e=()=>{},sapiName:f,onBeforeBlueprint:h,mounts:b,shouldInstallWordPress:k}){li(o),pi(r),o=fi(o,{progressbar:!l}),a.setCaption("Preparing WordPress"),t||(t={phpExtensionBundles:["kitchen-sink"]});const m=xt(t,{progress:a.stage(.5),onStepCompleted:i});await new Promise(I=>{r.src=o,r.addEventListener("load",I,!1)});const w=ii(r.contentWindow,r.ownerDocument.defaultView);await w.isConnected(),a.pipe(w);const S=a.stage();return await w.onDownloadProgress(S.loadingListener),await w.boot({mounts:b,sapiName:f,shouldInstallWordPress:k,phpVersion:m.versions.php,wpVersion:m.versions.wp,phpExtensions:m.phpExtensions,withNetworking:m.features.networking}),await w.isReady(),S.finish(),rs(ae,w),e(w),h&&await h(),await Nt(m,w),a.finish(),w}function pi(r){var t,o;(t=r.sandbox)!=null&&t.length&&!((o=r.sandbox)!=null&&o.contains("allow-storage-access-by-user-activation"))&&r.sandbox.add("allow-storage-access-by-user-activation")}const ir="https://playground.wordpress.net";function li(r){const t=new URL(r,ir);if((t.origin===ir||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${ir}/remote.html.`)}function fi(r,t){const o=new URL(r,ir),a=new URLSearchParams(o.search);for(const[l,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const e of i)a.append(l,e.toString());else a.set(l,i.toString());return o.search=a.toString(),o.toString()}exports.LatestSupportedPHPVersion=jt;exports.SupportedPHPVersions=hr;exports.SupportedPHPVersionsList=Ps;exports.activatePlugin=dr;exports.activateTheme=qr;exports.compileBlueprint=xt;exports.cp=ft;exports.defineSiteUrl=xr;exports.defineWpConfigConsts=Ie;exports.enableMultisite=lt;exports.exportWXR=gt;exports.importThemeStarterContent=Nr;exports.importWordPressFiles=ht;exports.importWxr=mt;exports.installPlugin=wt;exports.installTheme=vt;exports.login=nr;exports.mkdir=dt;exports.mv=ut;exports.phpVar=se;exports.phpVars=We;exports.request=or;exports.resetData=Pt;exports.rm=Rr;exports.rmdir=ct;exports.runBlueprintSteps=Nt;exports.runPHP=it;exports.runPHPWithOptions=ot;exports.runSql=nt;exports.runWpInstallationWizard=_t;exports.setPhpIniEntries=vs;exports.setPluginProxyURL=Vs;exports.setSiteLanguage=Et;exports.setSiteOptions=Lr;exports.startPlaygroundWeb=ai;exports.unzip=cr;exports.updateUserMeta=at;exports.wpCLI=Ot;exports.wpContentFilesExcludedFromExport=Ar;exports.writeFile=Sr;exports.zipWpContent=kt;
760
+ */const Po=Symbol("Comlink.proxy"),Ou=Symbol("Comlink.endpoint"),xu=Symbol("Comlink.releaseProxy"),zs=Symbol("Comlink.finalizer"),Yt=Symbol("Comlink.thrown"),ko=e=>typeof e=="object"&&e!==null||typeof e=="function",Tu={canHandle:e=>ko(e)&&e[Po],serialize(e){const{port1:r,port2:s}=new MessageChannel;return xi(e,r),[s,[s]]},deserialize(e){return e.start(),Ti(e)}},$u={canHandle:e=>ko(e)&&Yt in e,serialize({value:e}){let r;return e instanceof Error?r={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:r={isError:!1,value:e},[r,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Jr=new Map([["proxy",Tu],["throw",$u]]);function Au(e,r){for(const s of e)if(r===s||s==="*"||s instanceof RegExp&&s.test(r))return!0;return!1}function xi(e,r=globalThis,s=["*"]){r.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Au(s,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:i,type:t,path:p}=Object.assign({path:[]},o.data),y=(o.data.argumentList||[]).map(Rr);let u;try{const d=p.slice(0,-1).reduce((_,b)=>_[b],e),w=p.reduce((_,b)=>_[b],e);switch(t){case"GET":u=w;break;case"SET":d[p.slice(-1)[0]]=Rr(o.data.value),u=!0;break;case"APPLY":u=w.apply(d,y);break;case"CONSTRUCT":{const _=new w(...y);u=To(_)}break;case"ENDPOINT":{const{port1:_,port2:b}=new MessageChannel;xi(e,b),u=Iu(_,[_])}break;case"RELEASE":u=void 0;break;default:return}}catch(d){u={value:d,[Yt]:0}}Promise.resolve(u).catch(d=>({value:d,[Yt]:0})).then(d=>{const[w,_]=is(d);r.postMessage(Object.assign(Object.assign({},w),{id:i}),_),t==="RELEASE"&&(r.removeEventListener("message",n),Eo(r),zs in e&&typeof e[zs]=="function"&&e[zs]())}).catch(d=>{const[w,_]=is({value:new TypeError("Unserializable return value"),[Yt]:0});r.postMessage(Object.assign(Object.assign({},w),{id:i}),_)})}),r.start&&r.start()}function Su(e){return e.constructor.name==="MessagePort"}function Eo(e){Su(e)&&e.close()}function Ti(e,r){return si(e,[],r)}function Ut(e){if(e)throw new Error("Proxy has been released and is not useable")}function Oo(e){return Xr(e,{type:"RELEASE"}).then(()=>{Eo(e)})}const ts=new WeakMap,ss="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const r=(ts.get(e)||0)-1;ts.set(e,r),r===0&&Oo(e)});function Ru(e,r){const s=(ts.get(r)||0)+1;ts.set(r,s),ss&&ss.register(e,r,e)}function Fu(e){ss&&ss.unregister(e)}function si(e,r=[],s=function(){}){let n=!1;const o=new Proxy(s,{get(i,t){if(Ut(n),t===xu)return()=>{Fu(o),Oo(e),n=!0};if(t==="then"){if(r.length===0)return{then:()=>o};const p=Xr(e,{type:"GET",path:r.map(y=>y.toString())}).then(Rr);return p.then.bind(p)}return si(e,[...r,t])},set(i,t,p){Ut(n);const[y,u]=is(p);return Xr(e,{type:"SET",path:[...r,t].map(d=>d.toString()),value:y},u).then(Rr)},apply(i,t,p){Ut(n);const y=r[r.length-1];if(y===Ou)return Xr(e,{type:"ENDPOINT"}).then(Rr);if(y==="bind")return si(e,r.slice(0,-1));const[u,d]=Rn(p);return Xr(e,{type:"APPLY",path:r.map(w=>w.toString()),argumentList:u},d).then(Rr)},construct(i,t){Ut(n);const[p,y]=Rn(t);return Xr(e,{type:"CONSTRUCT",path:r.map(u=>u.toString()),argumentList:p},y).then(Rr)}});return Ru(o,e),o}function Bu(e){return Array.prototype.concat.apply([],e)}function Rn(e){const r=e.map(is);return[r.map(s=>s[0]),Bu(r.map(s=>s[1]))]}const xo=new WeakMap;function Iu(e,r){return xo.set(e,r),e}function To(e){return Object.assign(e,{[Po]:!0})}function ju(e,r=globalThis,s="*"){return{postMessage:(n,o)=>e.postMessage(n,s,o),addEventListener:r.addEventListener.bind(r),removeEventListener:r.removeEventListener.bind(r)}}function is(e){for(const[r,s]of Jr)if(s.canHandle(e)){const[n,o]=s.serialize(e);return[{type:"HANDLER",name:r,value:n},o]}return[{type:"RAW",value:e},xo.get(e)||[]]}function Rr(e){switch(e.type){case"HANDLER":return Jr.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Xr(e,r,s){return new Promise(n=>{const o=Lu();e.addEventListener("message",function i(t){!t.data||!t.data.id||t.data.id!==o||(e.removeEventListener("message",i),n(t.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:o},r),s)})}function Lu(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function Nu(e,r=void 0){Du();const s=e instanceof Worker?e:ju(e,r),n=Ti(s),o=$o(n);return new Proxy(o,{get:(i,t)=>t==="isConnected"?async()=>{for(;;)try{await Cu(n.isConnected(),200);break}catch{}}:n[t]})}async function Cu(e,r){return new Promise((s,n)=>{setTimeout(n,r),e.then(s)})}let Fn=!1;function Du(){if(Fn)return;Fn=!0,Jr.set("EVENT",{canHandle:s=>s instanceof CustomEvent,serialize:s=>[{detail:s.detail},[]],deserialize:s=>s}),Jr.set("FUNCTION",{canHandle:s=>typeof s=="function",serialize(s){const{port1:n,port2:o}=new MessageChannel;return xi(s,n),[o,[o]]},deserialize(s){return s.start(),Ti(s)}}),Jr.set("PHPResponse",{canHandle:s=>typeof s=="object"&&s!==null&&"headers"in s&&"bytes"in s&&"errors"in s&&"exitCode"in s&&"httpStatusCode"in s,serialize(s){return[s.toRawData(),[]]},deserialize(s){return Qt.fromRawData(s)}});const e=Jr.get("throw"),r=e==null?void 0:e.serialize;e.serialize=({value:s})=>{const n=r({value:s});return s.response&&(n[0].value.response=s.response),s.source&&(n[0].value.source=s.source),n}}function $o(e){return new Proxy(e,{get(r,s){switch(typeof r[s]){case"function":return(...n)=>r[s](...n);case"object":return r[s]===null?r[s]:$o(r[s]);case"undefined":case"number":case"string":return r[s];default:return To(r[s])}}})}async function qu({iframe:e,blueprint:r,remoteUrl:s,progressTracker:n=new ls,disableProgressBar:o,onBlueprintStepCompleted:i,onClientConnected:t=()=>{},sapiName:p,onBeforeBlueprint:y,mounts:u,scope:d,corsProxy:w,shouldInstallWordPress:_}){zu(s),Uu(e),s=Mu(s,{progressbar:!o}),n.setCaption("Preparing WordPress"),r||(r={});const b=_o(r,{progress:n.stage(.5),onStepCompleted:i,corsProxy:w});await new Promise(q=>{e.src=s,e.addEventListener("load",q,!1)});const B=Nu(e.contentWindow,e.ownerDocument.defaultView);await B.isConnected(),n.pipe(B);const P=n.stage();return await B.onDownloadProgress(P.loadingListener),await B.boot({mounts:u,sapiName:p,scope:d??Math.random().toFixed(16),shouldInstallWordPress:_,phpVersion:b.versions.php,wpVersion:b.versions.wp,withNetworking:b.features.networking}),await B.isReady(),P.finish(),qo(Se,B),t(B),y&&await y(),await vo(b,B),n.finish(),B}function Uu(e){var r,s;(r=e.sandbox)!=null&&r.length&&!((s=e.sandbox)!=null&&s.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}const Kt="https://playground.wordpress.net";function zu(e){const r=new URL(e,Kt);if((r.origin===Kt||r.hostname==="localhost")&&r.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${r}. Expected origin to be ${Kt}/remote.html.`)}function Mu(e,r){const s=new URL(e,Kt),n=new URLSearchParams(s.search);for(const[o,i]of Object.entries(r))if(i!=null&&i!==!1)if(Array.isArray(i))for(const t of i)n.append(o,t.toString());else n.set(o,i.toString());return s.search=n.toString(),s.toString()}exports.LatestSupportedPHPVersion=Kn;exports.SupportedPHPVersions=as;exports.SupportedPHPVersionsList=ep;exports.activatePlugin=ai;exports.activateTheme=oi;exports.compileBlueprint=_o;exports.cp=Wn;exports.defineSiteUrl=hi;exports.defineWpConfigConsts=ns;exports.enableMultisite=Mn;exports.exportWXR=ra;exports.importThemeStarterContent=yi;exports.importWordPressFiles=ea;exports.importWxr=Qn;exports.installPlugin=sa;exports.installTheme=ia;exports.login=na;exports.mkdir=Zn;exports.mv=Hn;exports.phpVar=Fe;exports.phpVars=xt;exports.request=qn;exports.resetData=aa;exports.rm=pi;exports.rmdir=Vn;exports.runBlueprintSteps=vo;exports.runPHP=Nn;exports.runPHPWithOptions=Cn;exports.runSql=Dn;exports.runWpInstallationWizard=oa;exports.setPhpIniEntries=Jo;exports.setPluginProxyURL=Eu;exports.setSiteLanguage=fa;exports.setSiteOptions=fi;exports.startPlaygroundWeb=qu;exports.unzip=ps;exports.updateUserMeta=Un;exports.wpCLI=ui;exports.wpContentFilesExcludedFromExport=ii;exports.writeFile=ci;exports.writeFiles=Xn;exports.zipWpContent=pa;