@wp-playground/client 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +26 -26
- package/index.d.ts +5 -1
- package/index.js +868 -872
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Hs = async (e, { pluginPath: t, pluginName: r }, n) => {
|
|
2
2
|
n?.tracker.setCaption(`Activating ${r || t}`);
|
|
3
3
|
const s = [
|
|
4
4
|
`${await e.documentRoot}/wp-load.php`,
|
|
@@ -32,7 +32,7 @@ echo 'NO_ENTRY_FILE';
|
|
|
32
32
|
`
|
|
33
33
|
})).text.endsWith("NO_ENTRY_FILE"))
|
|
34
34
|
throw new Error("Could not find plugin entry file.");
|
|
35
|
-
},
|
|
35
|
+
}, Vs = async (e, { themeFolderName: t }, r) => {
|
|
36
36
|
r?.tracker.setCaption(`Activating ${t}`);
|
|
37
37
|
const n = `${await e.documentRoot}/wp-load.php`;
|
|
38
38
|
if (!e.fileExists(n))
|
|
@@ -55,10 +55,10 @@ async function ct(e, t, r) {
|
|
|
55
55
|
let n = "";
|
|
56
56
|
await e.fileExists(t) && (n = await e.readFileAsText(t)), await e.writeFile(t, r(n));
|
|
57
57
|
}
|
|
58
|
-
async function
|
|
58
|
+
async function Zi(e) {
|
|
59
59
|
return new Uint8Array(await e.arrayBuffer());
|
|
60
60
|
}
|
|
61
|
-
class
|
|
61
|
+
class eo extends File {
|
|
62
62
|
constructor(t, r) {
|
|
63
63
|
super(t, r), this.buffers = t;
|
|
64
64
|
}
|
|
@@ -66,9 +66,9 @@ class to extends File {
|
|
|
66
66
|
return this.buffers[0];
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
const Zr = File.prototype.arrayBuffer instanceof Function ? File :
|
|
70
|
-
const n = await e.documentRoot, s = r ?
|
|
71
|
-
return r && (e.mkdir(
|
|
69
|
+
const Zr = File.prototype.arrayBuffer instanceof Function ? File : eo, ss = "/vfs-blueprints", xt = async (e, { consts: t, virtualize: r = !1 }) => {
|
|
70
|
+
const n = await e.documentRoot, s = r ? ss : n, i = `${s}/playground-consts.json`, o = `${s}/wp-config.php`;
|
|
71
|
+
return r && (e.mkdir(ss), e.setPhpIniEntry("auto_prepend_file", o)), await ct(
|
|
72
72
|
e,
|
|
73
73
|
i,
|
|
74
74
|
(l) => JSON.stringify({
|
|
@@ -83,7 +83,7 @@ const Zr = File.prototype.arrayBuffer instanceof Function ? File : to, is = "/vf
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
?>${l}`), o;
|
|
86
|
-
},
|
|
86
|
+
}, to = `<?php
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* This transport delegates PHP HTTP requests to JavaScript synchronous XHR.
|
|
@@ -228,7 +228,7 @@ JAVASCRIPT;
|
|
|
228
228
|
return true;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
`,
|
|
231
|
+
`, ro = `<?php
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
234
|
* This transport does not perform any HTTP requests and only exists
|
|
@@ -271,7 +271,7 @@ class Requests_Transport_Dummy implements Requests_Transport
|
|
|
271
271
|
return true;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`, no = `<?php
|
|
275
275
|
/**
|
|
276
276
|
* The default WordPress requests transports have been disabled
|
|
277
277
|
* at this point. However, the Requests class requires at least
|
|
@@ -295,7 +295,7 @@ if (defined('USE_FETCH_FOR_REQUESTS') && USE_FETCH_FOR_REQUESTS) {
|
|
|
295
295
|
require(__DIR__ . '/includes/requests_transport_dummy.php');
|
|
296
296
|
Requests::add_transport('Requests_Transport_Dummy');
|
|
297
297
|
}
|
|
298
|
-
`,
|
|
298
|
+
`, so = `<?php
|
|
299
299
|
/**
|
|
300
300
|
* Add a notice to wp-login.php offering the username and password.
|
|
301
301
|
*/
|
|
@@ -310,7 +310,7 @@ add_action(
|
|
|
310
310
|
EOT;
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
|
-
`,
|
|
313
|
+
`, io = `<?php
|
|
314
314
|
/**
|
|
315
315
|
* Because the in-browser Playground doesn't have access to the internet,
|
|
316
316
|
* network-dependent features like directories don't work. Normally, you'll
|
|
@@ -345,7 +345,7 @@ add_filter( 'gettext', function( $translation ) {
|
|
|
345
345
|
}
|
|
346
346
|
return $translation;
|
|
347
347
|
} );
|
|
348
|
-
`,
|
|
348
|
+
`, oo = `<?php
|
|
349
349
|
/**
|
|
350
350
|
* Links with target="top" don't work in the playground iframe because of
|
|
351
351
|
* the sandbox attribute. What they really should be targeting is the
|
|
@@ -366,18 +366,18 @@ add_action('admin_print_scripts', function () {
|
|
|
366
366
|
<\/script>
|
|
367
367
|
<?php
|
|
368
368
|
});
|
|
369
|
-
`,
|
|
370
|
-
const r = new
|
|
369
|
+
`, ao = async (e, t) => {
|
|
370
|
+
const r = new co(
|
|
371
371
|
e,
|
|
372
372
|
t.wordpressPath || "/wordpress",
|
|
373
373
|
t.siteUrl
|
|
374
374
|
);
|
|
375
|
-
t.addPhpInfo === !0 && await r.addPhpInfo(), t.siteUrl && await r.patchSiteUrl(), t.patchSecrets === !0 && await r.patchSecrets(), t.disableSiteHealth === !0 && await r.disableSiteHealth(), t.disableWpNewBlogNotification === !0 && await r.disableWpNewBlogNotification(), t.makeEditorFrameControlled === !0 && await
|
|
375
|
+
t.addPhpInfo === !0 && await r.addPhpInfo(), t.siteUrl && await r.patchSiteUrl(), t.patchSecrets === !0 && await r.patchSecrets(), t.disableSiteHealth === !0 && await r.disableSiteHealth(), t.disableWpNewBlogNotification === !0 && await r.disableWpNewBlogNotification(), t.makeEditorFrameControlled === !0 && await zs(e, r.wordpressPath, [
|
|
376
376
|
`${r.wordpressPath}/wp-includes/js/dist/block-editor.js`,
|
|
377
377
|
`${r.wordpressPath}/wp-includes/js/dist/block-editor.min.js`
|
|
378
378
|
]), t.prepareForRunningInsideWebBrowser === !0 && await r.prepareForRunningInsideWebBrowser();
|
|
379
379
|
};
|
|
380
|
-
class
|
|
380
|
+
class co {
|
|
381
381
|
constructor(t, r, n) {
|
|
382
382
|
this.php = t, this.scopedSiteUrl = n, this.wordpressPath = r;
|
|
383
383
|
}
|
|
@@ -388,7 +388,7 @@ class lo {
|
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
390
|
async patchSiteUrl() {
|
|
391
|
-
await
|
|
391
|
+
await xt(this.php, {
|
|
392
392
|
consts: {
|
|
393
393
|
WP_HOME: this.scopedSiteUrl,
|
|
394
394
|
WP_SITEURL: this.scopedSiteUrl
|
|
@@ -397,16 +397,16 @@ class lo {
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
async patchSecrets() {
|
|
400
|
-
await
|
|
400
|
+
await xt(this.php, {
|
|
401
401
|
consts: {
|
|
402
|
-
AUTH_KEY:
|
|
403
|
-
SECURE_AUTH_KEY:
|
|
404
|
-
LOGGED_IN_KEY:
|
|
405
|
-
NONCE_KEY:
|
|
406
|
-
AUTH_SALT:
|
|
407
|
-
SECURE_AUTH_SALT:
|
|
408
|
-
LOGGED_IN_SALT:
|
|
409
|
-
NONCE_SALT:
|
|
402
|
+
AUTH_KEY: xe(40),
|
|
403
|
+
SECURE_AUTH_KEY: xe(40),
|
|
404
|
+
LOGGED_IN_KEY: xe(40),
|
|
405
|
+
NONCE_KEY: xe(40),
|
|
406
|
+
AUTH_SALT: xe(40),
|
|
407
|
+
SECURE_AUTH_SALT: xe(40),
|
|
408
|
+
LOGGED_IN_SALT: xe(40),
|
|
409
|
+
NONCE_SALT: xe(40)
|
|
410
410
|
}
|
|
411
411
|
}), await ct(
|
|
412
412
|
this.php,
|
|
@@ -436,7 +436,7 @@ class lo {
|
|
|
436
436
|
);
|
|
437
437
|
}
|
|
438
438
|
async prepareForRunningInsideWebBrowser() {
|
|
439
|
-
await
|
|
439
|
+
await xt(this.php, {
|
|
440
440
|
consts: {
|
|
441
441
|
USE_FETCH_FOR_REQUESTS: !1
|
|
442
442
|
}
|
|
@@ -458,33 +458,33 @@ class lo {
|
|
|
458
458
|
`${this.wordpressPath}/wp-content/mu-plugins/includes`
|
|
459
459
|
), await this.php.writeFile(
|
|
460
460
|
`${this.wordpressPath}/wp-content/mu-plugins/includes/requests_transport_fetch.php`,
|
|
461
|
-
|
|
461
|
+
to
|
|
462
462
|
), await this.php.writeFile(
|
|
463
463
|
`${this.wordpressPath}/wp-content/mu-plugins/includes/requests_transport_dummy.php`,
|
|
464
|
-
|
|
464
|
+
ro
|
|
465
465
|
), await this.php.writeFile(
|
|
466
466
|
`${this.wordpressPath}/wp-content/mu-plugins/add_requests_transport.php`,
|
|
467
|
-
|
|
467
|
+
no
|
|
468
468
|
), await this.php.writeFile(
|
|
469
469
|
`${this.wordpressPath}/wp-content/mu-plugins/1-show-admin-credentials-on-wp-login.php`,
|
|
470
|
-
|
|
470
|
+
so
|
|
471
471
|
), await this.php.writeFile(
|
|
472
472
|
`${this.wordpressPath}/wp-content/mu-plugins/2-nice-error-messages-for-plugins-and-themes-directories.php`,
|
|
473
|
-
|
|
473
|
+
io
|
|
474
474
|
), await this.php.writeFile(
|
|
475
475
|
`${this.wordpressPath}/wp-content/mu-plugins/3-links-targeting-top-frame-should-target-playground-iframe.php`,
|
|
476
|
-
|
|
476
|
+
oo
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function xe(e) {
|
|
481
481
|
const t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+=-[]/.,<>?";
|
|
482
482
|
let r = "";
|
|
483
483
|
for (let n = e; n > 0; --n)
|
|
484
484
|
r += t[Math.floor(Math.random() * t.length)];
|
|
485
485
|
return r;
|
|
486
486
|
}
|
|
487
|
-
async function
|
|
487
|
+
async function zs(e, t, r) {
|
|
488
488
|
const n = `
|
|
489
489
|
/**
|
|
490
490
|
* A synchronous function to read a blob URL as text.
|
|
@@ -545,24 +545,24 @@ async function Ws(e, t, r) {
|
|
|
545
545
|
"<!doctype html><script>const hash = window.location.hash.substring(1); if ( hash ) document.write(decodeURIComponent(hash))<\/script>"
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const lo = async (e, { code: t }) => await e.run({ code: t }), uo = async (e, { options: t }) => await e.run(t), fo = async (e, { key: t, value: r }) => {
|
|
549
549
|
await e.setPhpIniEntry(t, r);
|
|
550
|
-
},
|
|
550
|
+
}, po = async (e, { request: t }) => await e.request(t), ho = async (e, { fromPath: t, toPath: r }) => {
|
|
551
551
|
await e.writeFile(
|
|
552
552
|
r,
|
|
553
553
|
await e.readFileAsBuffer(t)
|
|
554
554
|
);
|
|
555
|
-
},
|
|
555
|
+
}, mo = async (e, { fromPath: t, toPath: r }) => {
|
|
556
556
|
await e.mv(t, r);
|
|
557
|
-
},
|
|
557
|
+
}, yo = async (e, { path: t }) => {
|
|
558
558
|
await e.unlink(t);
|
|
559
|
-
},
|
|
559
|
+
}, go = async (e, { path: t }) => {
|
|
560
560
|
await e.mkdir(t);
|
|
561
|
-
},
|
|
561
|
+
}, $o = async (e, { path: t }) => {
|
|
562
562
|
await e.rmdir(t);
|
|
563
|
-
},
|
|
564
|
-
r instanceof File && (r = await
|
|
565
|
-
},
|
|
563
|
+
}, Ws = async (e, { path: t, data: r }) => {
|
|
564
|
+
r instanceof File && (r = await Zi(r)), await e.writeFile(t, r);
|
|
565
|
+
}, vo = async (e, { siteUrl: t }) => await xt(e, {
|
|
566
566
|
consts: {
|
|
567
567
|
WP_HOME: t,
|
|
568
568
|
WP_SITEURL: t
|
|
@@ -596,7 +596,7 @@ class Ks {
|
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const _o = Symbol("literal");
|
|
600
600
|
function Ot(e) {
|
|
601
601
|
if (typeof e == "string")
|
|
602
602
|
return e.startsWith("$") ? e : JSON.stringify(e);
|
|
@@ -607,7 +607,7 @@ function Ot(e) {
|
|
|
607
607
|
if (e === null)
|
|
608
608
|
return "null";
|
|
609
609
|
if (typeof e == "object")
|
|
610
|
-
return
|
|
610
|
+
return _o in e ? e.toString() : `array(${Object.entries(e).map(([r, n]) => `${JSON.stringify(r)} => ${Ot(n)}`).join(", ")})`;
|
|
611
611
|
if (typeof e == "function")
|
|
612
612
|
return e();
|
|
613
613
|
throw new Error(`Unsupported value: ${e}`);
|
|
@@ -618,7 +618,7 @@ function en(e) {
|
|
|
618
618
|
t[r] = Ot(e[r]);
|
|
619
619
|
return t;
|
|
620
620
|
}
|
|
621
|
-
const
|
|
621
|
+
const is = `<?php
|
|
622
622
|
|
|
623
623
|
function zipDir($dir, $output, $additionalFiles = array())
|
|
624
624
|
{
|
|
@@ -681,19 +681,19 @@ function delTree($dir)
|
|
|
681
681
|
return rmdir($dir);
|
|
682
682
|
}
|
|
683
683
|
`;
|
|
684
|
-
async function
|
|
684
|
+
async function wo(e) {
|
|
685
685
|
const t = "wordpress-playground.zip", r = `/tmp/${t}`, n = en({
|
|
686
686
|
zipPath: r,
|
|
687
687
|
documentRoot: await e.documentRoot
|
|
688
688
|
});
|
|
689
|
-
await
|
|
689
|
+
await xs(
|
|
690
690
|
e,
|
|
691
691
|
`zipDir(${n.documentRoot}, ${n.zipPath});`
|
|
692
692
|
);
|
|
693
693
|
const s = await e.readFileAsBuffer(r);
|
|
694
694
|
return e.unlink(r), new File([s], t);
|
|
695
695
|
}
|
|
696
|
-
const
|
|
696
|
+
const bo = async (e, { fullSiteZip: t }) => {
|
|
697
697
|
const r = "/import.zip";
|
|
698
698
|
await e.writeFile(
|
|
699
699
|
r,
|
|
@@ -702,7 +702,7 @@ const Po = async (e, { fullSiteZip: t }) => {
|
|
|
702
702
|
const n = await e.absoluteUrl, s = await e.documentRoot;
|
|
703
703
|
await e.rmdir(s), await tn(e, { zipPath: r, extractToPath: "/" });
|
|
704
704
|
const i = en({ absoluteUrl: n });
|
|
705
|
-
await
|
|
705
|
+
await So(
|
|
706
706
|
e,
|
|
707
707
|
`${s}/wp-config.php`,
|
|
708
708
|
(o) => `<?php
|
|
@@ -717,25 +717,25 @@ const Po = async (e, { fullSiteZip: t }) => {
|
|
|
717
717
|
zipPath: t,
|
|
718
718
|
extractToPath: r
|
|
719
719
|
});
|
|
720
|
-
await
|
|
720
|
+
await xs(
|
|
721
721
|
e,
|
|
722
722
|
`unzip(${n.zipPath}, ${n.extractToPath});`
|
|
723
723
|
);
|
|
724
|
-
},
|
|
724
|
+
}, Po = async (e, { file: t }) => {
|
|
725
725
|
const r = await e.request({
|
|
726
726
|
url: "/wp-admin/admin.php?import=wordpress"
|
|
727
|
-
}), n =
|
|
727
|
+
}), n = os(r).getElementById("import-upload-form")?.getAttribute("action"), s = await e.request({
|
|
728
728
|
url: `/wp-admin/${n}`,
|
|
729
729
|
method: "POST",
|
|
730
730
|
files: { import: t }
|
|
731
|
-
}), i =
|
|
731
|
+
}), i = os(s).querySelector(
|
|
732
732
|
"#wpbody-content form"
|
|
733
733
|
);
|
|
734
734
|
if (!i)
|
|
735
735
|
throw console.log(s.text), new Error(
|
|
736
736
|
"Could not find an importer form in response. See the response text above for details."
|
|
737
737
|
);
|
|
738
|
-
const o =
|
|
738
|
+
const o = Eo(i);
|
|
739
739
|
o.fetch_attachments = "1";
|
|
740
740
|
for (const l in o)
|
|
741
741
|
if (l.startsWith("user_map[")) {
|
|
@@ -748,31 +748,31 @@ const Po = async (e, { fullSiteZip: t }) => {
|
|
|
748
748
|
formData: o
|
|
749
749
|
});
|
|
750
750
|
};
|
|
751
|
-
function
|
|
751
|
+
function os(e) {
|
|
752
752
|
return new DOMParser().parseFromString(e.text, "text/html");
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function Eo(e) {
|
|
755
755
|
return Object.fromEntries(new FormData(e).entries());
|
|
756
756
|
}
|
|
757
|
-
async function
|
|
757
|
+
async function So(e, t, r) {
|
|
758
758
|
await e.writeFile(
|
|
759
759
|
t,
|
|
760
760
|
r(await e.readFileAsText(t))
|
|
761
761
|
);
|
|
762
762
|
}
|
|
763
|
-
async function
|
|
763
|
+
async function xs(e, t) {
|
|
764
764
|
const r = await e.run({
|
|
765
|
-
code:
|
|
765
|
+
code: is + t
|
|
766
766
|
});
|
|
767
767
|
if (r.exitCode !== 0)
|
|
768
|
-
throw console.log(
|
|
768
|
+
throw console.log(is + t), console.log(t + ""), console.log(r.errors), r.errors;
|
|
769
769
|
return r;
|
|
770
770
|
}
|
|
771
|
-
async function
|
|
771
|
+
async function Bs(e, { targetPath: t, zipFile: r }) {
|
|
772
772
|
const n = r.name, s = n.replace(/\.zip$/, ""), i = `/tmp/assets/${s}`, o = `/tmp/${n}`, l = () => e.rmdir(i, {
|
|
773
773
|
recursive: !0
|
|
774
774
|
});
|
|
775
|
-
await e.fileExists(i) && await l(), await
|
|
775
|
+
await e.fileExists(i) && await l(), await Ws(e, {
|
|
776
776
|
path: o,
|
|
777
777
|
data: r
|
|
778
778
|
});
|
|
@@ -796,43 +796,43 @@ async function Gs(e, { targetPath: t, zipFile: r }) {
|
|
|
796
796
|
throw await p(), u;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const To = async (e, { pluginZipFile: t, options: r = {} }, n) => {
|
|
800
800
|
const s = t.name.split("/").pop() || "plugin.zip", i = Cr(s);
|
|
801
801
|
n?.tracker.setCaption(`Installing the ${i} plugin`);
|
|
802
802
|
try {
|
|
803
|
-
const { assetFolderPath: o } = await
|
|
803
|
+
const { assetFolderPath: o } = await Bs(e, {
|
|
804
804
|
zipFile: t,
|
|
805
805
|
targetPath: `${await e.documentRoot}/wp-content/plugins`
|
|
806
806
|
});
|
|
807
|
-
("activate" in r ? r.activate : !0) && await
|
|
807
|
+
("activate" in r ? r.activate : !0) && await Hs(
|
|
808
808
|
e,
|
|
809
809
|
{
|
|
810
810
|
pluginPath: o,
|
|
811
811
|
pluginName: i
|
|
812
812
|
},
|
|
813
813
|
n
|
|
814
|
-
), await
|
|
814
|
+
), await Ro(e);
|
|
815
815
|
} catch (o) {
|
|
816
816
|
console.error(
|
|
817
817
|
`Proceeding without the ${i} plugin. Could not install it in wp-admin. The original error was: ${o}`
|
|
818
818
|
), console.error(o);
|
|
819
819
|
}
|
|
820
820
|
};
|
|
821
|
-
async function
|
|
822
|
-
await e.isDir("/wordpress/wp-content/plugins/gutenberg") && !await e.fileExists("/wordpress/.gutenberg-patched") && (await e.writeFile("/wordpress/.gutenberg-patched", "1"), await
|
|
821
|
+
async function Ro(e) {
|
|
822
|
+
await e.isDir("/wordpress/wp-content/plugins/gutenberg") && !await e.fileExists("/wordpress/.gutenberg-patched") && (await e.writeFile("/wordpress/.gutenberg-patched", "1"), await zs(e, "/wordpress", [
|
|
823
823
|
"/wordpress/wp-content/plugins/gutenberg/build/block-editor/index.js",
|
|
824
824
|
"/wordpress/wp-content/plugins/gutenberg/build/block-editor/index.min.js"
|
|
825
825
|
]));
|
|
826
826
|
}
|
|
827
|
-
const
|
|
827
|
+
const Oo = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
828
828
|
const s = Cr(t.name);
|
|
829
829
|
n?.tracker.setCaption(`Installing the ${s} theme`);
|
|
830
830
|
try {
|
|
831
|
-
const { assetFolderName: i } = await
|
|
831
|
+
const { assetFolderName: i } = await Bs(e, {
|
|
832
832
|
zipFile: t,
|
|
833
833
|
targetPath: `${await e.documentRoot}/wp-content/themes`
|
|
834
834
|
});
|
|
835
|
-
("activate" in r ? r.activate : !0) && await
|
|
835
|
+
("activate" in r ? r.activate : !0) && await Vs(
|
|
836
836
|
e,
|
|
837
837
|
{
|
|
838
838
|
themeFolderName: i
|
|
@@ -844,7 +844,7 @@ const No = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
|
844
844
|
`Proceeding without the ${s} theme. Could not install it in wp-admin. The original error was: ${i}`
|
|
845
845
|
), console.error(i);
|
|
846
846
|
}
|
|
847
|
-
},
|
|
847
|
+
}, No = async (e, { username: t = "admin", password: r = "password" } = {}, n) => {
|
|
848
848
|
n?.tracker.setCaption(n?.initialCaption || "Logging in"), await e.request({
|
|
849
849
|
url: "/wp-login.php"
|
|
850
850
|
}), await e.request({
|
|
@@ -856,7 +856,7 @@ const No = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
|
856
856
|
rememberme: "forever"
|
|
857
857
|
}
|
|
858
858
|
});
|
|
859
|
-
},
|
|
859
|
+
}, Co = async (e, { options: t }) => {
|
|
860
860
|
await e.request({
|
|
861
861
|
url: "/wp-admin/install.php?step=2",
|
|
862
862
|
method: "POST",
|
|
@@ -873,7 +873,7 @@ const No = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
|
873
873
|
admin_email: "admin@localhost.com"
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
|
-
},
|
|
876
|
+
}, ko = async (e, { options: t }) => {
|
|
877
877
|
const r = `<?php
|
|
878
878
|
include 'wordpress/wp-load.php';
|
|
879
879
|
$site_options = ${Ot(t)};
|
|
@@ -884,8 +884,8 @@ const No = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
|
884
884
|
`, n = await e.run({
|
|
885
885
|
code: r
|
|
886
886
|
});
|
|
887
|
-
return
|
|
888
|
-
},
|
|
887
|
+
return Gs(n), { code: r, result: n };
|
|
888
|
+
}, jo = async (e, { meta: t, userId: r }) => {
|
|
889
889
|
const n = `<?php
|
|
890
890
|
include 'wordpress/wp-load.php';
|
|
891
891
|
$meta = ${Ot(t)};
|
|
@@ -896,42 +896,42 @@ const No = async (e, { themeZipFile: t, options: r = {} }, n) => {
|
|
|
896
896
|
`, s = await e.run({
|
|
897
897
|
code: n
|
|
898
898
|
});
|
|
899
|
-
return
|
|
899
|
+
return Gs(s), { code: n, result: s };
|
|
900
900
|
};
|
|
901
|
-
async function
|
|
901
|
+
async function Gs(e) {
|
|
902
902
|
if (e.text !== "Success")
|
|
903
903
|
throw console.log(e), new Error(`Failed to run code: ${e.text} ${e.errors}`);
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
906
906
|
__proto__: null,
|
|
907
|
-
activatePlugin:
|
|
908
|
-
activateTheme:
|
|
909
|
-
applyWordPressPatches:
|
|
910
|
-
cp:
|
|
911
|
-
defineSiteUrl:
|
|
912
|
-
defineWpConfigConsts:
|
|
913
|
-
importFile:
|
|
914
|
-
installPlugin:
|
|
915
|
-
installTheme:
|
|
916
|
-
login:
|
|
917
|
-
mkdir:
|
|
918
|
-
mv:
|
|
919
|
-
replaceSite:
|
|
920
|
-
request:
|
|
921
|
-
rm:
|
|
922
|
-
rmdir:
|
|
923
|
-
runPHP:
|
|
924
|
-
runPHPWithOptions:
|
|
925
|
-
runWpInstallationWizard:
|
|
926
|
-
setPhpIniEntry:
|
|
927
|
-
setSiteOptions:
|
|
907
|
+
activatePlugin: Hs,
|
|
908
|
+
activateTheme: Vs,
|
|
909
|
+
applyWordPressPatches: ao,
|
|
910
|
+
cp: ho,
|
|
911
|
+
defineSiteUrl: vo,
|
|
912
|
+
defineWpConfigConsts: xt,
|
|
913
|
+
importFile: Po,
|
|
914
|
+
installPlugin: To,
|
|
915
|
+
installTheme: Oo,
|
|
916
|
+
login: No,
|
|
917
|
+
mkdir: go,
|
|
918
|
+
mv: mo,
|
|
919
|
+
replaceSite: bo,
|
|
920
|
+
request: po,
|
|
921
|
+
rm: yo,
|
|
922
|
+
rmdir: $o,
|
|
923
|
+
runPHP: lo,
|
|
924
|
+
runPHPWithOptions: uo,
|
|
925
|
+
runWpInstallationWizard: Co,
|
|
926
|
+
setPhpIniEntry: fo,
|
|
927
|
+
setSiteOptions: ko,
|
|
928
928
|
unzip: tn,
|
|
929
|
-
updateUserMeta:
|
|
930
|
-
writeFile:
|
|
931
|
-
zipEntireSite:
|
|
932
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
933
|
-
function
|
|
934
|
-
const r = e.headers.get("content-length") || "", n = parseInt(r, 10) ||
|
|
929
|
+
updateUserMeta: jo,
|
|
930
|
+
writeFile: Ws,
|
|
931
|
+
zipEntireSite: wo
|
|
932
|
+
}, Symbol.toStringTag, { value: "Module" })), Ao = 5 * 1024 * 1024;
|
|
933
|
+
function Do(e, t) {
|
|
934
|
+
const r = e.headers.get("content-length") || "", n = parseInt(r, 10) || Ao;
|
|
935
935
|
function s(i, o) {
|
|
936
936
|
t(
|
|
937
937
|
new CustomEvent("progress", {
|
|
@@ -1139,7 +1139,7 @@ class kr extends EventTarget {
|
|
|
1139
1139
|
this.dispatchEvent(new CustomEvent("done"));
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1142
|
+
const as = Symbol("error"), cs = Symbol("message");
|
|
1143
1143
|
class rn extends Event {
|
|
1144
1144
|
/**
|
|
1145
1145
|
* Create a new `ErrorEvent`.
|
|
@@ -1149,22 +1149,22 @@ class rn extends Event {
|
|
|
1149
1149
|
* attributes via object members of the same name.
|
|
1150
1150
|
*/
|
|
1151
1151
|
constructor(t, r = {}) {
|
|
1152
|
-
super(t), this[
|
|
1152
|
+
super(t), this[as] = r.error === void 0 ? null : r.error, this[cs] = r.message === void 0 ? "" : r.message;
|
|
1153
1153
|
}
|
|
1154
1154
|
get error() {
|
|
1155
|
-
return this[
|
|
1155
|
+
return this[as];
|
|
1156
1156
|
}
|
|
1157
1157
|
get message() {
|
|
1158
|
-
return this[
|
|
1158
|
+
return this[cs];
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
Object.defineProperty(rn.prototype, "error", { enumerable: !0 });
|
|
1162
1162
|
Object.defineProperty(rn.prototype, "message", { enumerable: !0 });
|
|
1163
|
-
const
|
|
1164
|
-
function
|
|
1163
|
+
const Fo = typeof globalThis.ErrorEvent == "function" ? globalThis.ErrorEvent : rn;
|
|
1164
|
+
function qo(e) {
|
|
1165
1165
|
return e instanceof Error ? "exitCode" in e && e?.exitCode === 0 || e?.name === "ExitStatus" && "status" in e && e.status === 0 : !1;
|
|
1166
1166
|
}
|
|
1167
|
-
class
|
|
1167
|
+
class Mo extends EventTarget {
|
|
1168
1168
|
constructor() {
|
|
1169
1169
|
super(...arguments), this.listenersCount = 0;
|
|
1170
1170
|
}
|
|
@@ -1178,11 +1178,11 @@ class Uo extends EventTarget {
|
|
|
1178
1178
|
return this.listenersCount > 0;
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Uo(e) {
|
|
1182
1182
|
e.asm = {
|
|
1183
1183
|
...e.asm
|
|
1184
1184
|
};
|
|
1185
|
-
const t = new
|
|
1185
|
+
const t = new Mo();
|
|
1186
1186
|
for (const r in e.asm)
|
|
1187
1187
|
if (typeof e.asm[r] == "function") {
|
|
1188
1188
|
const n = e.asm[r];
|
|
@@ -1192,32 +1192,32 @@ function Lo(e) {
|
|
|
1192
1192
|
} catch (i) {
|
|
1193
1193
|
if (!(i instanceof Error))
|
|
1194
1194
|
throw i;
|
|
1195
|
-
const o =
|
|
1195
|
+
const o = Ho(
|
|
1196
1196
|
i,
|
|
1197
1197
|
e.lastAsyncifyStackSource?.stack
|
|
1198
1198
|
);
|
|
1199
1199
|
if (e.lastAsyncifyStackSource && (i.cause = e.lastAsyncifyStackSource), t.hasListeners()) {
|
|
1200
1200
|
t.dispatchEvent(
|
|
1201
|
-
new
|
|
1201
|
+
new Fo("error", {
|
|
1202
1202
|
error: i,
|
|
1203
1203
|
message: o
|
|
1204
1204
|
})
|
|
1205
1205
|
);
|
|
1206
1206
|
return;
|
|
1207
1207
|
}
|
|
1208
|
-
throw
|
|
1208
|
+
throw qo(i) || Wo(o), i;
|
|
1209
1209
|
}
|
|
1210
1210
|
};
|
|
1211
1211
|
}
|
|
1212
1212
|
return t;
|
|
1213
1213
|
}
|
|
1214
1214
|
let Wr = [];
|
|
1215
|
-
function
|
|
1215
|
+
function Lo() {
|
|
1216
1216
|
return Wr;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Ho(e, t) {
|
|
1219
1219
|
if (e.message === "unreachable") {
|
|
1220
|
-
let r =
|
|
1220
|
+
let r = Vo;
|
|
1221
1221
|
t || (r += `
|
|
1222
1222
|
|
|
1223
1223
|
This stack trace is lacking. For a better one initialize
|
|
@@ -1233,7 +1233,7 @@ the PHP runtime with { debug: true }, e.g. PHPNode.load('8.1', { debug: true }).
|
|
|
1233
1233
|
}
|
|
1234
1234
|
return e.message;
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1236
|
+
const Vo = `
|
|
1237
1237
|
"unreachable" WASM instruction executed.
|
|
1238
1238
|
|
|
1239
1239
|
The typical reason is a PHP function missing from the ASYNCIFY_ONLY
|
|
@@ -1257,17 +1257,17 @@ the Dockerfile, you'll need to trigger this error again with long stack
|
|
|
1257
1257
|
traces enabled. In node.js, you can do it using the --stack-trace-limit=100
|
|
1258
1258
|
CLI option:
|
|
1259
1259
|
|
|
1260
|
-
`,
|
|
1261
|
-
let
|
|
1262
|
-
function
|
|
1263
|
-
if (!
|
|
1264
|
-
|
|
1265
|
-
${
|
|
1266
|
-
${
|
|
1260
|
+
`, ls = "\x1B[41m", zo = "\x1B[1m", us = "\x1B[0m", ds = "\x1B[K";
|
|
1261
|
+
let fs = !1;
|
|
1262
|
+
function Wo(e) {
|
|
1263
|
+
if (!fs) {
|
|
1264
|
+
fs = !0, console.log(`${ls}
|
|
1265
|
+
${ds}
|
|
1266
|
+
${zo} WASM ERROR${us}${ls}`);
|
|
1267
1267
|
for (const t of e.split(`
|
|
1268
1268
|
`))
|
|
1269
|
-
console.log(`${
|
|
1270
|
-
console.log(`${
|
|
1269
|
+
console.log(`${ds} ${t} `);
|
|
1270
|
+
console.log(`${us}`);
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
function Ko(e) {
|
|
@@ -1332,15 +1332,15 @@ const nn = [
|
|
|
1332
1332
|
"7.1",
|
|
1333
1333
|
"7.0",
|
|
1334
1334
|
"5.6"
|
|
1335
|
-
],
|
|
1335
|
+
], xo = nn[0], Ld = nn, Js = [
|
|
1336
1336
|
"iconv",
|
|
1337
1337
|
"mbstring",
|
|
1338
1338
|
"xml-bundle",
|
|
1339
1339
|
"gd"
|
|
1340
|
-
],
|
|
1341
|
-
"kitchen-sink":
|
|
1340
|
+
], ps = {
|
|
1341
|
+
"kitchen-sink": Js
|
|
1342
1342
|
};
|
|
1343
|
-
class
|
|
1343
|
+
class Bo {
|
|
1344
1344
|
#e;
|
|
1345
1345
|
#t;
|
|
1346
1346
|
/**
|
|
@@ -1426,17 +1426,17 @@ class Go {
|
|
|
1426
1426
|
return t.join("; ");
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
const
|
|
1430
|
-
function
|
|
1429
|
+
const Go = "http://example.com";
|
|
1430
|
+
function hs(e) {
|
|
1431
1431
|
return e.toString().substring(e.origin.length);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function ms(e, t) {
|
|
1434
1434
|
return !t || !e.startsWith(t) ? e : e.substring(t.length);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function Jo(e, t) {
|
|
1437
1437
|
return !t || e.startsWith(t) ? e : t + e;
|
|
1438
1438
|
}
|
|
1439
|
-
class
|
|
1439
|
+
class Yo {
|
|
1440
1440
|
#e;
|
|
1441
1441
|
#t;
|
|
1442
1442
|
#n;
|
|
@@ -1475,7 +1475,7 @@ class Qo {
|
|
|
1475
1475
|
/** @inheritDoc */
|
|
1476
1476
|
internalUrlToPath(t) {
|
|
1477
1477
|
const r = new URL(t);
|
|
1478
|
-
return r.pathname.startsWith(this.#s) && (r.pathname = r.pathname.slice(this.#s.length)),
|
|
1478
|
+
return r.pathname.startsWith(this.#s) && (r.pathname = r.pathname.slice(this.#s.length)), hs(r);
|
|
1479
1479
|
}
|
|
1480
1480
|
get isRequestRunning() {
|
|
1481
1481
|
return this.#a.running > 0;
|
|
@@ -1492,12 +1492,12 @@ class Qo {
|
|
|
1492
1492
|
async request(t) {
|
|
1493
1493
|
const r = t.url.startsWith("http://") || t.url.startsWith("https://"), n = new URL(
|
|
1494
1494
|
t.url,
|
|
1495
|
-
r ? void 0 :
|
|
1496
|
-
), s =
|
|
1495
|
+
r ? void 0 : Go
|
|
1496
|
+
), s = ms(
|
|
1497
1497
|
n.pathname,
|
|
1498
1498
|
this.#s
|
|
1499
1499
|
), i = `${this.#e}${s}`;
|
|
1500
|
-
return
|
|
1500
|
+
return Zo(i) ? await this.#l(t, n) : this.#c(i);
|
|
1501
1501
|
}
|
|
1502
1502
|
/**
|
|
1503
1503
|
* Serves a static file from the PHP filesystem.
|
|
@@ -1524,7 +1524,7 @@ class Qo {
|
|
|
1524
1524
|
// @TODO: Infer the content-type from the arrayBuffer instead of the file path.
|
|
1525
1525
|
// The code below won't return the correct mime-type if the extension
|
|
1526
1526
|
// was tampered with.
|
|
1527
|
-
"content-type": [
|
|
1527
|
+
"content-type": [Xo(t)],
|
|
1528
1528
|
"accept-ranges": ["bytes"],
|
|
1529
1529
|
"cache-control": ["public, max-age=0"]
|
|
1530
1530
|
},
|
|
@@ -1548,7 +1548,7 @@ class Qo {
|
|
|
1548
1548
|
let s = "GET";
|
|
1549
1549
|
const i = {
|
|
1550
1550
|
host: this.#i,
|
|
1551
|
-
...
|
|
1551
|
+
...Ys(t.headers || {})
|
|
1552
1552
|
}, o = [];
|
|
1553
1553
|
if (t.files && Object.keys(t.files).length) {
|
|
1554
1554
|
s = "POST";
|
|
@@ -1561,7 +1561,7 @@ class Qo {
|
|
|
1561
1561
|
data: new Uint8Array(await d.arrayBuffer())
|
|
1562
1562
|
});
|
|
1563
1563
|
}
|
|
1564
|
-
i["content-type"]?.startsWith("multipart/form-data") && (t.formData =
|
|
1564
|
+
i["content-type"]?.startsWith("multipart/form-data") && (t.formData = Qo(
|
|
1565
1565
|
t.body || ""
|
|
1566
1566
|
), i["content-type"] = "application/x-www-form-urlencoded", delete t.body);
|
|
1567
1567
|
}
|
|
@@ -1580,8 +1580,8 @@ class Qo {
|
|
|
1580
1580
|
);
|
|
1581
1581
|
}
|
|
1582
1582
|
return await this.php.run({
|
|
1583
|
-
relativeUri:
|
|
1584
|
-
|
|
1583
|
+
relativeUri: Jo(
|
|
1584
|
+
hs(r),
|
|
1585
1585
|
this.#s
|
|
1586
1586
|
),
|
|
1587
1587
|
protocol: this.#t,
|
|
@@ -1605,7 +1605,7 @@ class Qo {
|
|
|
1605
1605
|
* @returns The resolved filesystem path.
|
|
1606
1606
|
*/
|
|
1607
1607
|
#u(t) {
|
|
1608
|
-
let r =
|
|
1608
|
+
let r = ms(t, this.#s);
|
|
1609
1609
|
r.includes(".php") ? r = r.split(".php")[0] + ".php" : (r.endsWith("/") || (r += "/"), r.endsWith("index.php") || (r += "index.php"));
|
|
1610
1610
|
const n = `${this.#e}${r}`;
|
|
1611
1611
|
if (this.php.fileExists(n))
|
|
@@ -1615,7 +1615,7 @@ class Qo {
|
|
|
1615
1615
|
return `${this.#e}/index.php`;
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function Qo(e) {
|
|
1619
1619
|
const t = {}, r = e.match(/--(.*)\r\n/);
|
|
1620
1620
|
if (!r)
|
|
1621
1621
|
return t;
|
|
@@ -1630,7 +1630,7 @@ function Xo(e) {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
}), t;
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Xo(e) {
|
|
1634
1634
|
switch (e.split(".").pop()) {
|
|
1635
1635
|
case "css":
|
|
1636
1636
|
return "text/css";
|
|
@@ -1670,16 +1670,16 @@ function Zo(e) {
|
|
|
1670
1670
|
return "application-octet-stream";
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1674
|
-
return
|
|
1673
|
+
function Zo(e) {
|
|
1674
|
+
return ea(e) || ta(e);
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function ea(e) {
|
|
1677
1677
|
return e.endsWith(".php") || e.includes(".php/");
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function ta(e) {
|
|
1680
1680
|
return !e.split("/").pop().includes(".");
|
|
1681
1681
|
}
|
|
1682
|
-
const
|
|
1682
|
+
const ys = {
|
|
1683
1683
|
0: "No error occurred. System call completed successfully.",
|
|
1684
1684
|
1: "Argument list too long.",
|
|
1685
1685
|
2: "Permission denied.",
|
|
@@ -1766,8 +1766,8 @@ function Ce(e = "") {
|
|
|
1766
1766
|
return i.apply(this, o);
|
|
1767
1767
|
} catch (l) {
|
|
1768
1768
|
const p = typeof l == "object" ? l?.errno : null;
|
|
1769
|
-
if (p in
|
|
1770
|
-
const u =
|
|
1769
|
+
if (p in ys) {
|
|
1770
|
+
const u = ys[p], d = typeof o[0] == "string" ? o[0] : null, g = d !== null ? e.replaceAll("{path}", d) : e;
|
|
1771
1771
|
throw new Error(`${g}: ${u}`, {
|
|
1772
1772
|
cause: l
|
|
1773
1773
|
});
|
|
@@ -1777,17 +1777,17 @@ function Ce(e = "") {
|
|
|
1777
1777
|
};
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
|
-
const
|
|
1781
|
-
function
|
|
1782
|
-
return
|
|
1780
|
+
const ra = [];
|
|
1781
|
+
function na(e) {
|
|
1782
|
+
return ra[e];
|
|
1783
1783
|
}
|
|
1784
1784
|
(function() {
|
|
1785
1785
|
return typeof process < "u" && process.release?.name === "node" ? "NODE" : typeof window < "u" ? "WEB" : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? "WORKER" : "NODE";
|
|
1786
1786
|
})();
|
|
1787
|
-
var
|
|
1788
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
1787
|
+
var sa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ke = (e, t, r, n) => {
|
|
1788
|
+
for (var s = n > 1 ? void 0 : n ? ia(t, r) : t, i = e.length - 1, o; i >= 0; i--)
|
|
1789
1789
|
(o = e[i]) && (s = (n ? o(t, r, s) : o(s)) || s);
|
|
1790
|
-
return n && s &&
|
|
1790
|
+
return n && s && sa(t, r, s), s;
|
|
1791
1791
|
};
|
|
1792
1792
|
const me = "string", bt = "number", ee = Symbol("__private__dont__use");
|
|
1793
1793
|
class je {
|
|
@@ -1799,8 +1799,8 @@ class je {
|
|
|
1799
1799
|
* @param serverOptions - Optional. Options for the PHPRequestHandler. If undefined, no request handler will be initialized.
|
|
1800
1800
|
*/
|
|
1801
1801
|
constructor(t, r) {
|
|
1802
|
-
this.#e = [], this.#t = !1, this.#n = null, this.#r = {}, this.#i = [], t !== void 0 && this.initializeRuntime(t), r && (this.requestHandler = new
|
|
1803
|
-
new
|
|
1802
|
+
this.#e = [], this.#t = !1, this.#n = null, this.#r = {}, this.#i = [], t !== void 0 && this.initializeRuntime(t), r && (this.requestHandler = new Bo(
|
|
1803
|
+
new Yo(this, r)
|
|
1804
1804
|
));
|
|
1805
1805
|
}
|
|
1806
1806
|
#e;
|
|
@@ -1833,13 +1833,13 @@ class je {
|
|
|
1833
1833
|
initializeRuntime(t) {
|
|
1834
1834
|
if (this[ee])
|
|
1835
1835
|
throw new Error("PHP runtime already initialized.");
|
|
1836
|
-
const r =
|
|
1836
|
+
const r = na(t);
|
|
1837
1837
|
if (!r)
|
|
1838
1838
|
throw new Error("Invalid PHP runtime id.");
|
|
1839
1839
|
this[ee] = r, r.onMessage = (n) => {
|
|
1840
1840
|
for (const s of this.#i)
|
|
1841
1841
|
s(n);
|
|
1842
|
-
}, this.#n =
|
|
1842
|
+
}, this.#n = Uo(r);
|
|
1843
1843
|
}
|
|
1844
1844
|
/** @inheritDoc */
|
|
1845
1845
|
setPhpIniPath(t) {
|
|
@@ -1873,7 +1873,7 @@ class je {
|
|
|
1873
1873
|
this.#t || (this.#s(), this.#t = !0), this.#f(t.scriptPath || ""), this.#a(t.relativeUri || ""), this.#l(t.method || "GET");
|
|
1874
1874
|
const { host: r, ...n } = {
|
|
1875
1875
|
host: "example.com:443",
|
|
1876
|
-
...
|
|
1876
|
+
...Ys(t.headers || {})
|
|
1877
1877
|
};
|
|
1878
1878
|
if (this.#c(r, t.protocol || "http"), this.#u(n), t.body && this.#d(t.body), t.fileInfos)
|
|
1879
1879
|
for (const s of t.fileInfos)
|
|
@@ -2068,7 +2068,7 @@ class je {
|
|
|
2068
2068
|
"PHP runtime has crashed – see the earlier error for details."
|
|
2069
2069
|
);
|
|
2070
2070
|
});
|
|
2071
|
-
this.functionsMaybeMissingFromAsyncify =
|
|
2071
|
+
this.functionsMaybeMissingFromAsyncify = Lo();
|
|
2072
2072
|
const o = i, l = "betterMessage" in o ? o.betterMessage : o.message, p = new Error(l);
|
|
2073
2073
|
throw p.cause = o, p;
|
|
2074
2074
|
} finally {
|
|
@@ -2172,21 +2172,21 @@ ke([
|
|
|
2172
2172
|
ke([
|
|
2173
2173
|
Ce('Could not stat "{path}"')
|
|
2174
2174
|
], je.prototype, "fileExists", 1);
|
|
2175
|
-
function
|
|
2175
|
+
function Ys(e) {
|
|
2176
2176
|
const t = {};
|
|
2177
2177
|
for (const r in e)
|
|
2178
2178
|
t[r.toLowerCase()] = e[r];
|
|
2179
2179
|
return t;
|
|
2180
2180
|
}
|
|
2181
|
-
const
|
|
2181
|
+
const oa = [
|
|
2182
2182
|
"vfs",
|
|
2183
2183
|
"literal",
|
|
2184
2184
|
"wordpress.org/themes",
|
|
2185
2185
|
"wordpress.org/plugins",
|
|
2186
2186
|
"url"
|
|
2187
2187
|
];
|
|
2188
|
-
function
|
|
2189
|
-
return e && typeof e == "object" && typeof e.resource == "string" &&
|
|
2188
|
+
function aa(e) {
|
|
2189
|
+
return e && typeof e == "object" && typeof e.resource == "string" && oa.includes(e.resource);
|
|
2190
2190
|
}
|
|
2191
2191
|
class ft {
|
|
2192
2192
|
/**
|
|
@@ -2200,24 +2200,24 @@ class ft {
|
|
|
2200
2200
|
let s;
|
|
2201
2201
|
switch (t.resource) {
|
|
2202
2202
|
case "vfs":
|
|
2203
|
-
s = new
|
|
2203
|
+
s = new ca(t, n);
|
|
2204
2204
|
break;
|
|
2205
2205
|
case "literal":
|
|
2206
|
-
s = new
|
|
2206
|
+
s = new la(t, n);
|
|
2207
2207
|
break;
|
|
2208
2208
|
case "wordpress.org/themes":
|
|
2209
|
-
s = new
|
|
2209
|
+
s = new fa(t, n);
|
|
2210
2210
|
break;
|
|
2211
2211
|
case "wordpress.org/plugins":
|
|
2212
|
-
s = new
|
|
2212
|
+
s = new pa(t, n);
|
|
2213
2213
|
break;
|
|
2214
2214
|
case "url":
|
|
2215
|
-
s = new
|
|
2215
|
+
s = new da(t, n);
|
|
2216
2216
|
break;
|
|
2217
2217
|
default:
|
|
2218
2218
|
throw new Error(`Invalid resource: ${t}`);
|
|
2219
2219
|
}
|
|
2220
|
-
return s = new
|
|
2220
|
+
return s = new ha(s), r && (s = new ma(s, r)), s;
|
|
2221
2221
|
}
|
|
2222
2222
|
setPlayground(t) {
|
|
2223
2223
|
this.playground = t;
|
|
@@ -2227,7 +2227,7 @@ class ft {
|
|
|
2227
2227
|
return !1;
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
|
-
class
|
|
2230
|
+
class ca extends ft {
|
|
2231
2231
|
/**
|
|
2232
2232
|
* Creates a new instance of `VFSResource`.
|
|
2233
2233
|
* @param playground The playground client.
|
|
@@ -2249,7 +2249,7 @@ class la extends ft {
|
|
|
2249
2249
|
return this.resource.path.split("/").pop() || "";
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
|
-
class
|
|
2252
|
+
class la extends ft {
|
|
2253
2253
|
/**
|
|
2254
2254
|
* Creates a new instance of `LiteralResource`.
|
|
2255
2255
|
* @param resource The literal reference.
|
|
@@ -2280,9 +2280,9 @@ class sn extends ft {
|
|
|
2280
2280
|
this.progress?.setCaption(this.caption);
|
|
2281
2281
|
const t = this.getURL();
|
|
2282
2282
|
let r = await fetch(t);
|
|
2283
|
-
if (r = await
|
|
2283
|
+
if (r = await Do(
|
|
2284
2284
|
r,
|
|
2285
|
-
this.progress?.loadingListener ??
|
|
2285
|
+
this.progress?.loadingListener ?? ua
|
|
2286
2286
|
), r.status !== 200)
|
|
2287
2287
|
throw new Error(`Could not download "${t}"`);
|
|
2288
2288
|
return new Zr([await r.blob()], this.name);
|
|
@@ -2307,9 +2307,9 @@ class sn extends ft {
|
|
|
2307
2307
|
return !0;
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
2310
|
-
const
|
|
2310
|
+
const ua = () => {
|
|
2311
2311
|
};
|
|
2312
|
-
class
|
|
2312
|
+
class da extends sn {
|
|
2313
2313
|
/**
|
|
2314
2314
|
* Creates a new instance of `UrlResource`.
|
|
2315
2315
|
* @param resource The URL reference.
|
|
@@ -2327,11 +2327,7 @@ class fa extends sn {
|
|
|
2327
2327
|
return this.resource.caption ?? super.caption;
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
|
|
2331
|
-
function Vd(e) {
|
|
2332
|
-
on = e;
|
|
2333
|
-
}
|
|
2334
|
-
class pa extends sn {
|
|
2330
|
+
class fa extends sn {
|
|
2335
2331
|
constructor(t, r) {
|
|
2336
2332
|
super(r), this.resource = t;
|
|
2337
2333
|
}
|
|
@@ -2339,11 +2335,10 @@ class pa extends sn {
|
|
|
2339
2335
|
return Cr(this.resource.slug);
|
|
2340
2336
|
}
|
|
2341
2337
|
getURL() {
|
|
2342
|
-
|
|
2343
|
-
return `${on}?theme=` + t;
|
|
2338
|
+
return `https://downloads.wordpress.org/theme/${Qs(this.resource.slug)}`;
|
|
2344
2339
|
}
|
|
2345
2340
|
}
|
|
2346
|
-
class
|
|
2341
|
+
class pa extends sn {
|
|
2347
2342
|
constructor(t, r) {
|
|
2348
2343
|
super(r), this.resource = t;
|
|
2349
2344
|
}
|
|
@@ -2353,14 +2348,13 @@ class ha extends sn {
|
|
|
2353
2348
|
}
|
|
2354
2349
|
/** @inheritDoc */
|
|
2355
2350
|
getURL() {
|
|
2356
|
-
|
|
2357
|
-
return `${on}?plugin=` + t;
|
|
2351
|
+
return `https://downloads.wordpress.org/plugin/${Qs(this.resource.slug)}`;
|
|
2358
2352
|
}
|
|
2359
2353
|
}
|
|
2360
|
-
function
|
|
2354
|
+
function Qs(e) {
|
|
2361
2355
|
return !e || e.endsWith(".zip") ? e : e + ".latest-stable.zip";
|
|
2362
2356
|
}
|
|
2363
|
-
class
|
|
2357
|
+
class Xs extends ft {
|
|
2364
2358
|
constructor(t) {
|
|
2365
2359
|
super(), this.resource = t;
|
|
2366
2360
|
}
|
|
@@ -2389,13 +2383,13 @@ class Zs extends ft {
|
|
|
2389
2383
|
return this.resource.isAsync;
|
|
2390
2384
|
}
|
|
2391
2385
|
}
|
|
2392
|
-
class
|
|
2386
|
+
class ha extends Xs {
|
|
2393
2387
|
/** @inheritDoc */
|
|
2394
2388
|
async resolve() {
|
|
2395
2389
|
return this.promise || (this.promise = super.resolve()), this.promise;
|
|
2396
2390
|
}
|
|
2397
2391
|
}
|
|
2398
|
-
class
|
|
2392
|
+
class ma extends Xs {
|
|
2399
2393
|
constructor(t, r) {
|
|
2400
2394
|
super(t), this.semaphore = r;
|
|
2401
2395
|
}
|
|
@@ -2404,11 +2398,11 @@ class ya extends Zs {
|
|
|
2404
2398
|
return this.isAsync ? this.semaphore.run(() => super.resolve()) : super.resolve();
|
|
2405
2399
|
}
|
|
2406
2400
|
}
|
|
2407
|
-
var
|
|
2408
|
-
function
|
|
2401
|
+
var ya = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2402
|
+
function ga(e) {
|
|
2409
2403
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2410
2404
|
}
|
|
2411
|
-
var
|
|
2405
|
+
var Kr = { exports: {} }, Zs = {}, Ne = {}, Nt = {}, er = {}, x = {}, Zt = {};
|
|
2412
2406
|
(function(e) {
|
|
2413
2407
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
2414
2408
|
class t {
|
|
@@ -2529,7 +2523,7 @@ var xr = { exports: {} }, ei = {}, Ne = {}, Nt = {}, er = {}, K = {}, Zt = {};
|
|
|
2529
2523
|
}
|
|
2530
2524
|
e.regexpCode = v;
|
|
2531
2525
|
})(Zt);
|
|
2532
|
-
var
|
|
2526
|
+
var xr = {};
|
|
2533
2527
|
(function(e) {
|
|
2534
2528
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
2535
2529
|
const t = Zt;
|
|
@@ -2649,10 +2643,10 @@ var Kr = {};
|
|
|
2649
2643
|
}
|
|
2650
2644
|
}
|
|
2651
2645
|
e.ValueScope = l;
|
|
2652
|
-
})(
|
|
2646
|
+
})(xr);
|
|
2653
2647
|
(function(e) {
|
|
2654
2648
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
2655
|
-
const t = Zt, r =
|
|
2649
|
+
const t = Zt, r = xr;
|
|
2656
2650
|
var n = Zt;
|
|
2657
2651
|
Object.defineProperty(e, "_", { enumerable: !0, get: function() {
|
|
2658
2652
|
return n._;
|
|
@@ -2671,7 +2665,7 @@ var Kr = {};
|
|
|
2671
2665
|
} }), Object.defineProperty(e, "Name", { enumerable: !0, get: function() {
|
|
2672
2666
|
return n.Name;
|
|
2673
2667
|
} });
|
|
2674
|
-
var s =
|
|
2668
|
+
var s = xr;
|
|
2675
2669
|
Object.defineProperty(e, "Scope", { enumerable: !0, get: function() {
|
|
2676
2670
|
return s.Scope;
|
|
2677
2671
|
} }), Object.defineProperty(e, "ValueScope", { enumerable: !0, get: function() {
|
|
@@ -3208,11 +3202,11 @@ var Kr = {};
|
|
|
3208
3202
|
function I(w) {
|
|
3209
3203
|
return w instanceof t.Name ? w : (0, t._)`(${w})`;
|
|
3210
3204
|
}
|
|
3211
|
-
})(
|
|
3205
|
+
})(x);
|
|
3212
3206
|
var Z = {};
|
|
3213
3207
|
(function(e) {
|
|
3214
3208
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.checkStrictMode = e.getErrorPath = e.Type = e.useFunc = e.setEvaluated = e.evaluatedPropsToName = e.mergeEvaluated = e.eachItem = e.unescapeJsonPointer = e.escapeJsonPointer = e.escapeFragment = e.unescapeFragment = e.schemaRefOrVal = e.schemaHasRulesButRef = e.schemaHasRules = e.checkUnknownRules = e.alwaysValidSchema = e.toHash = void 0;
|
|
3215
|
-
const t =
|
|
3209
|
+
const t = x, r = Zt;
|
|
3216
3210
|
function n(_) {
|
|
3217
3211
|
const O = {};
|
|
3218
3212
|
for (const A of _)
|
|
@@ -3351,7 +3345,7 @@ var Z = {};
|
|
|
3351
3345
|
})(Z);
|
|
3352
3346
|
var He = {};
|
|
3353
3347
|
Object.defineProperty(He, "__esModule", { value: !0 });
|
|
3354
|
-
const ye =
|
|
3348
|
+
const ye = x, $a = {
|
|
3355
3349
|
// validation function arguments
|
|
3356
3350
|
data: new ye.Name("data"),
|
|
3357
3351
|
// args passed from referencing schema
|
|
@@ -3374,10 +3368,10 @@ const ye = K, va = {
|
|
|
3374
3368
|
jsonLen: new ye.Name("jsonLen"),
|
|
3375
3369
|
jsonPart: new ye.Name("jsonPart")
|
|
3376
3370
|
};
|
|
3377
|
-
He.default =
|
|
3371
|
+
He.default = $a;
|
|
3378
3372
|
(function(e) {
|
|
3379
3373
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
3380
|
-
const t =
|
|
3374
|
+
const t = x, r = Z, n = He;
|
|
3381
3375
|
e.keywordError = {
|
|
3382
3376
|
message: ({ keyword: v }) => (0, t.str)`must pass "${v}" keyword validation`
|
|
3383
3377
|
}, e.keyword$DataError = {
|
|
@@ -3449,20 +3443,20 @@ He.default = va;
|
|
|
3449
3443
|
})(er);
|
|
3450
3444
|
Object.defineProperty(Nt, "__esModule", { value: !0 });
|
|
3451
3445
|
Nt.boolOrEmptySchema = Nt.topBoolOrEmptySchema = void 0;
|
|
3452
|
-
const
|
|
3446
|
+
const va = er, _a = x, wa = He, ba = {
|
|
3453
3447
|
message: "boolean schema is false"
|
|
3454
3448
|
};
|
|
3455
|
-
function
|
|
3449
|
+
function Pa(e) {
|
|
3456
3450
|
const { gen: t, schema: r, validateName: n } = e;
|
|
3457
|
-
r === !1 ?
|
|
3451
|
+
r === !1 ? ei(e, !1) : typeof r == "object" && r.$async === !0 ? t.return(wa.default.data) : (t.assign((0, _a._)`${n}.errors`, null), t.return(!0));
|
|
3458
3452
|
}
|
|
3459
|
-
Nt.topBoolOrEmptySchema =
|
|
3460
|
-
function
|
|
3453
|
+
Nt.topBoolOrEmptySchema = Pa;
|
|
3454
|
+
function Ea(e, t) {
|
|
3461
3455
|
const { gen: r, schema: n } = e;
|
|
3462
|
-
n === !1 ? (r.var(t, !1),
|
|
3456
|
+
n === !1 ? (r.var(t, !1), ei(e)) : r.var(t, !0);
|
|
3463
3457
|
}
|
|
3464
|
-
Nt.boolOrEmptySchema =
|
|
3465
|
-
function
|
|
3458
|
+
Nt.boolOrEmptySchema = Ea;
|
|
3459
|
+
function ei(e, t) {
|
|
3466
3460
|
const { gen: r, data: n } = e, s = {
|
|
3467
3461
|
gen: r,
|
|
3468
3462
|
keyword: "false schema",
|
|
@@ -3473,17 +3467,17 @@ function ti(e, t) {
|
|
|
3473
3467
|
params: {},
|
|
3474
3468
|
it: e
|
|
3475
3469
|
};
|
|
3476
|
-
(0,
|
|
3470
|
+
(0, va.reportError)(s, ba, void 0, t);
|
|
3477
3471
|
}
|
|
3478
3472
|
var tr = {}, ut = {};
|
|
3479
3473
|
Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
3480
3474
|
ut.getRules = ut.isJSONType = void 0;
|
|
3481
|
-
const
|
|
3482
|
-
function
|
|
3483
|
-
return typeof e == "string" &&
|
|
3475
|
+
const Sa = ["string", "number", "integer", "boolean", "null", "object", "array"], Ta = new Set(Sa);
|
|
3476
|
+
function Ra(e) {
|
|
3477
|
+
return typeof e == "string" && Ta.has(e);
|
|
3484
3478
|
}
|
|
3485
|
-
ut.isJSONType =
|
|
3486
|
-
function
|
|
3479
|
+
ut.isJSONType = Ra;
|
|
3480
|
+
function Oa() {
|
|
3487
3481
|
const e = {
|
|
3488
3482
|
number: { type: "number", rules: [] },
|
|
3489
3483
|
string: { type: "string", rules: [] },
|
|
@@ -3498,27 +3492,27 @@ function Na() {
|
|
|
3498
3492
|
keywords: {}
|
|
3499
3493
|
};
|
|
3500
3494
|
}
|
|
3501
|
-
ut.getRules =
|
|
3495
|
+
ut.getRules = Oa;
|
|
3502
3496
|
var ze = {};
|
|
3503
3497
|
Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
3504
3498
|
ze.shouldUseRule = ze.shouldUseGroup = ze.schemaHasRulesForType = void 0;
|
|
3505
|
-
function
|
|
3499
|
+
function Na({ schema: e, self: t }, r) {
|
|
3506
3500
|
const n = t.RULES.types[r];
|
|
3507
|
-
return n && n !== !0 &&
|
|
3501
|
+
return n && n !== !0 && ti(e, n);
|
|
3508
3502
|
}
|
|
3509
|
-
ze.schemaHasRulesForType =
|
|
3510
|
-
function
|
|
3511
|
-
return t.rules.some((r) =>
|
|
3503
|
+
ze.schemaHasRulesForType = Na;
|
|
3504
|
+
function ti(e, t) {
|
|
3505
|
+
return t.rules.some((r) => ri(e, r));
|
|
3512
3506
|
}
|
|
3513
|
-
ze.shouldUseGroup =
|
|
3514
|
-
function
|
|
3507
|
+
ze.shouldUseGroup = ti;
|
|
3508
|
+
function ri(e, t) {
|
|
3515
3509
|
var r;
|
|
3516
3510
|
return e[t.keyword] !== void 0 || ((r = t.definition.implements) === null || r === void 0 ? void 0 : r.some((n) => e[n] !== void 0));
|
|
3517
3511
|
}
|
|
3518
|
-
ze.shouldUseRule =
|
|
3512
|
+
ze.shouldUseRule = ri;
|
|
3519
3513
|
(function(e) {
|
|
3520
3514
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reportTypeError = e.checkDataTypes = e.checkDataType = e.coerceAndCheckDataType = e.getJSONTypes = e.getSchemaTypes = e.DataType = void 0;
|
|
3521
|
-
const t = ut, r = ze, n = er, s =
|
|
3515
|
+
const t = ut, r = ze, n = er, s = x, i = Z;
|
|
3522
3516
|
var o;
|
|
3523
3517
|
(function(R) {
|
|
3524
3518
|
R[R.Correct = 0] = "Correct", R[R.Wrong = 1] = "Wrong";
|
|
@@ -3664,78 +3658,78 @@ ze.shouldUseRule = ni;
|
|
|
3664
3658
|
var jr = {};
|
|
3665
3659
|
Object.defineProperty(jr, "__esModule", { value: !0 });
|
|
3666
3660
|
jr.assignDefaults = void 0;
|
|
3667
|
-
const Pt =
|
|
3668
|
-
function
|
|
3661
|
+
const Pt = x, Ca = Z;
|
|
3662
|
+
function ka(e, t) {
|
|
3669
3663
|
const { properties: r, items: n } = e.schema;
|
|
3670
3664
|
if (t === "object" && r)
|
|
3671
3665
|
for (const s in r)
|
|
3672
|
-
|
|
3666
|
+
gs(e, s, r[s].default);
|
|
3673
3667
|
else
|
|
3674
|
-
t === "array" && Array.isArray(n) && n.forEach((s, i) =>
|
|
3668
|
+
t === "array" && Array.isArray(n) && n.forEach((s, i) => gs(e, i, s.default));
|
|
3675
3669
|
}
|
|
3676
|
-
jr.assignDefaults =
|
|
3677
|
-
function
|
|
3670
|
+
jr.assignDefaults = ka;
|
|
3671
|
+
function gs(e, t, r) {
|
|
3678
3672
|
const { gen: n, compositeRule: s, data: i, opts: o } = e;
|
|
3679
3673
|
if (r === void 0)
|
|
3680
3674
|
return;
|
|
3681
3675
|
const l = (0, Pt._)`${i}${(0, Pt.getProperty)(t)}`;
|
|
3682
3676
|
if (s) {
|
|
3683
|
-
(0,
|
|
3677
|
+
(0, Ca.checkStrictMode)(e, `default is ignored for: ${l}`);
|
|
3684
3678
|
return;
|
|
3685
3679
|
}
|
|
3686
3680
|
let p = (0, Pt._)`${l} === undefined`;
|
|
3687
3681
|
o.useDefaults === "empty" && (p = (0, Pt._)`${p} || ${l} === null || ${l} === ""`), n.if(p, (0, Pt._)`${l} = ${(0, Pt.stringify)(r)}`);
|
|
3688
3682
|
}
|
|
3689
|
-
var Le = {},
|
|
3690
|
-
Object.defineProperty(
|
|
3691
|
-
|
|
3692
|
-
const ne =
|
|
3693
|
-
function
|
|
3683
|
+
var Le = {}, K = {};
|
|
3684
|
+
Object.defineProperty(K, "__esModule", { value: !0 });
|
|
3685
|
+
K.validateUnion = K.validateArray = K.usePattern = K.callValidateCode = K.schemaProperties = K.allSchemaProperties = K.noPropertyInData = K.propertyInData = K.isOwnProperty = K.hasPropFunc = K.reportMissingProp = K.checkMissingProp = K.checkReportMissingProp = void 0;
|
|
3686
|
+
const ne = x, on = Z, Be = He, ja = Z;
|
|
3687
|
+
function Ia(e, t) {
|
|
3694
3688
|
const { gen: r, data: n, it: s } = e;
|
|
3695
|
-
r.if(
|
|
3689
|
+
r.if(cn(r, n, t, s.opts.ownProperties), () => {
|
|
3696
3690
|
e.setParams({ missingProperty: (0, ne._)`${t}` }, !0), e.error();
|
|
3697
3691
|
});
|
|
3698
3692
|
}
|
|
3699
|
-
|
|
3700
|
-
function
|
|
3701
|
-
return (0, ne.or)(...n.map((i) => (0, ne.and)(
|
|
3693
|
+
K.checkReportMissingProp = Ia;
|
|
3694
|
+
function Aa({ gen: e, data: t, it: { opts: r } }, n, s) {
|
|
3695
|
+
return (0, ne.or)(...n.map((i) => (0, ne.and)(cn(e, t, i, r.ownProperties), (0, ne._)`${s} = ${i}`)));
|
|
3702
3696
|
}
|
|
3703
|
-
|
|
3704
|
-
function
|
|
3697
|
+
K.checkMissingProp = Aa;
|
|
3698
|
+
function Da(e, t) {
|
|
3705
3699
|
e.setParams({ missingProperty: t }, !0), e.error();
|
|
3706
3700
|
}
|
|
3707
|
-
|
|
3708
|
-
function
|
|
3701
|
+
K.reportMissingProp = Da;
|
|
3702
|
+
function ni(e) {
|
|
3709
3703
|
return e.scopeValue("func", {
|
|
3710
3704
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
3711
3705
|
ref: Object.prototype.hasOwnProperty,
|
|
3712
3706
|
code: (0, ne._)`Object.prototype.hasOwnProperty`
|
|
3713
3707
|
});
|
|
3714
3708
|
}
|
|
3715
|
-
|
|
3716
|
-
function
|
|
3717
|
-
return (0, ne._)`${
|
|
3709
|
+
K.hasPropFunc = ni;
|
|
3710
|
+
function an(e, t, r) {
|
|
3711
|
+
return (0, ne._)`${ni(e)}.call(${t}, ${r})`;
|
|
3718
3712
|
}
|
|
3719
|
-
|
|
3720
|
-
function
|
|
3713
|
+
K.isOwnProperty = an;
|
|
3714
|
+
function Fa(e, t, r, n) {
|
|
3721
3715
|
const s = (0, ne._)`${t}${(0, ne.getProperty)(r)} !== undefined`;
|
|
3722
|
-
return n ? (0, ne._)`${s} && ${
|
|
3716
|
+
return n ? (0, ne._)`${s} && ${an(e, t, r)}` : s;
|
|
3723
3717
|
}
|
|
3724
|
-
|
|
3725
|
-
function
|
|
3718
|
+
K.propertyInData = Fa;
|
|
3719
|
+
function cn(e, t, r, n) {
|
|
3726
3720
|
const s = (0, ne._)`${t}${(0, ne.getProperty)(r)} === undefined`;
|
|
3727
|
-
return n ? (0, ne.or)(s, (0, ne.not)(
|
|
3721
|
+
return n ? (0, ne.or)(s, (0, ne.not)(an(e, t, r))) : s;
|
|
3728
3722
|
}
|
|
3729
|
-
|
|
3730
|
-
function
|
|
3723
|
+
K.noPropertyInData = cn;
|
|
3724
|
+
function si(e) {
|
|
3731
3725
|
return e ? Object.keys(e).filter((t) => t !== "__proto__") : [];
|
|
3732
3726
|
}
|
|
3733
|
-
|
|
3734
|
-
function
|
|
3735
|
-
return
|
|
3727
|
+
K.allSchemaProperties = si;
|
|
3728
|
+
function qa(e, t) {
|
|
3729
|
+
return si(t).filter((r) => !(0, on.alwaysValidSchema)(e, t[r]));
|
|
3736
3730
|
}
|
|
3737
|
-
|
|
3738
|
-
function
|
|
3731
|
+
K.schemaProperties = qa;
|
|
3732
|
+
function Ma({ schemaCode: e, data: t, it: { gen: r, topSchemaRef: n, schemaPath: s, errorPath: i }, it: o }, l, p, u) {
|
|
3739
3733
|
const d = u ? (0, ne._)`${e}, ${t}, ${n}${s}` : t, g = [
|
|
3740
3734
|
[Be.default.instancePath, (0, ne.strConcat)(Be.default.instancePath, i)],
|
|
3741
3735
|
[Be.default.parentData, o.parentData],
|
|
@@ -3746,18 +3740,18 @@ function Ua({ schemaCode: e, data: t, it: { gen: r, topSchemaRef: n, schemaPath:
|
|
|
3746
3740
|
const C = (0, ne._)`${d}, ${r.object(...g)}`;
|
|
3747
3741
|
return p !== ne.nil ? (0, ne._)`${l}.call(${p}, ${C})` : (0, ne._)`${l}(${C})`;
|
|
3748
3742
|
}
|
|
3749
|
-
|
|
3750
|
-
const
|
|
3751
|
-
function
|
|
3743
|
+
K.callValidateCode = Ma;
|
|
3744
|
+
const Ua = (0, ne._)`new RegExp`;
|
|
3745
|
+
function La({ gen: e, it: { opts: t } }, r) {
|
|
3752
3746
|
const n = t.unicodeRegExp ? "u" : "", { regExp: s } = t.code, i = s(r, n);
|
|
3753
3747
|
return e.scopeValue("pattern", {
|
|
3754
3748
|
key: i.toString(),
|
|
3755
3749
|
ref: i,
|
|
3756
|
-
code: (0, ne._)`${s.code === "new RegExp" ?
|
|
3750
|
+
code: (0, ne._)`${s.code === "new RegExp" ? Ua : (0, ja.useFunc)(e, s)}(${r}, ${n})`
|
|
3757
3751
|
});
|
|
3758
3752
|
}
|
|
3759
|
-
|
|
3760
|
-
function
|
|
3753
|
+
K.usePattern = La;
|
|
3754
|
+
function Ha(e) {
|
|
3761
3755
|
const { gen: t, data: r, keyword: n, it: s } = e, i = t.name("valid");
|
|
3762
3756
|
if (s.allErrors) {
|
|
3763
3757
|
const l = t.let("valid", !0);
|
|
@@ -3770,17 +3764,17 @@ function Va(e) {
|
|
|
3770
3764
|
e.subschema({
|
|
3771
3765
|
keyword: n,
|
|
3772
3766
|
dataProp: u,
|
|
3773
|
-
dataPropType:
|
|
3767
|
+
dataPropType: on.Type.Num
|
|
3774
3768
|
}, i), t.if((0, ne.not)(i), l);
|
|
3775
3769
|
});
|
|
3776
3770
|
}
|
|
3777
3771
|
}
|
|
3778
|
-
|
|
3779
|
-
function
|
|
3772
|
+
K.validateArray = Ha;
|
|
3773
|
+
function Va(e) {
|
|
3780
3774
|
const { gen: t, schema: r, keyword: n, it: s } = e;
|
|
3781
3775
|
if (!Array.isArray(r))
|
|
3782
3776
|
throw new Error("ajv implementation error");
|
|
3783
|
-
if (r.some((p) => (0,
|
|
3777
|
+
if (r.some((p) => (0, on.alwaysValidSchema)(s, p)) && !s.opts.unevaluated)
|
|
3784
3778
|
return;
|
|
3785
3779
|
const o = t.let("valid", !1), l = t.name("_valid");
|
|
3786
3780
|
t.block(() => r.forEach((p, u) => {
|
|
@@ -3792,12 +3786,12 @@ function za(e) {
|
|
|
3792
3786
|
t.assign(o, (0, ne._)`${o} || ${l}`), e.mergeValidEvaluated(d, l) || t.if((0, ne.not)(o));
|
|
3793
3787
|
})), e.result(o, () => e.reset(), () => e.error(!0));
|
|
3794
3788
|
}
|
|
3795
|
-
|
|
3789
|
+
K.validateUnion = Va;
|
|
3796
3790
|
Object.defineProperty(Le, "__esModule", { value: !0 });
|
|
3797
3791
|
Le.validateKeywordUsage = Le.validSchemaType = Le.funcKeywordCode = Le.macroKeywordCode = void 0;
|
|
3798
|
-
const ge =
|
|
3792
|
+
const ge = x, st = He, za = K, Wa = er;
|
|
3799
3793
|
function Ka(e, t) {
|
|
3800
|
-
const { gen: r, keyword: n, schema: s, parentSchema: i, it: o } = e, l = t.macro.call(o.self, s, i, o), p =
|
|
3794
|
+
const { gen: r, keyword: n, schema: s, parentSchema: i, it: o } = e, l = t.macro.call(o.self, s, i, o), p = ii(r, n, l);
|
|
3801
3795
|
o.opts.validateSchema !== !1 && o.self.validateSchema(l, !0);
|
|
3802
3796
|
const u = r.name("valid");
|
|
3803
3797
|
e.subschema({
|
|
@@ -3809,18 +3803,18 @@ function Ka(e, t) {
|
|
|
3809
3803
|
}, u), e.pass(u, () => e.error(!0));
|
|
3810
3804
|
}
|
|
3811
3805
|
Le.macroKeywordCode = Ka;
|
|
3812
|
-
function
|
|
3806
|
+
function xa(e, t) {
|
|
3813
3807
|
var r;
|
|
3814
3808
|
const { gen: n, keyword: s, schema: i, parentSchema: o, $data: l, it: p } = e;
|
|
3815
|
-
|
|
3816
|
-
const u = !l && t.compile ? t.compile.call(p.self, i, o, p) : t.validate, d =
|
|
3809
|
+
Ga(p, t);
|
|
3810
|
+
const u = !l && t.compile ? t.compile.call(p.self, i, o, p) : t.validate, d = ii(n, s, u), g = n.let("valid");
|
|
3817
3811
|
e.block$data(g, C), e.ok((r = t.valid) !== null && r !== void 0 ? r : g);
|
|
3818
3812
|
function C() {
|
|
3819
3813
|
if (t.errors === !1)
|
|
3820
|
-
S(), t.modifying &&
|
|
3814
|
+
S(), t.modifying && $s(e), v(() => e.error());
|
|
3821
3815
|
else {
|
|
3822
3816
|
const y = t.async ? k() : E();
|
|
3823
|
-
t.modifying &&
|
|
3817
|
+
t.modifying && $s(e), v(() => Ba(e, y));
|
|
3824
3818
|
}
|
|
3825
3819
|
}
|
|
3826
3820
|
function k() {
|
|
@@ -3833,38 +3827,38 @@ function Ba(e, t) {
|
|
|
3833
3827
|
}
|
|
3834
3828
|
function S(y = t.async ? (0, ge._)`await ` : ge.nil) {
|
|
3835
3829
|
const T = p.opts.passContext ? st.default.this : st.default.self, R = !("compile" in t && !l || t.schema === !1);
|
|
3836
|
-
n.assign(g, (0, ge._)`${y}${(0,
|
|
3830
|
+
n.assign(g, (0, ge._)`${y}${(0, za.callValidateCode)(e, d, T, R)}`, t.modifying);
|
|
3837
3831
|
}
|
|
3838
3832
|
function v(y) {
|
|
3839
3833
|
var T;
|
|
3840
3834
|
n.if((0, ge.not)((T = t.valid) !== null && T !== void 0 ? T : g), y);
|
|
3841
3835
|
}
|
|
3842
3836
|
}
|
|
3843
|
-
Le.funcKeywordCode =
|
|
3844
|
-
function
|
|
3837
|
+
Le.funcKeywordCode = xa;
|
|
3838
|
+
function $s(e) {
|
|
3845
3839
|
const { gen: t, data: r, it: n } = e;
|
|
3846
3840
|
t.if(n.parentData, () => t.assign(r, (0, ge._)`${n.parentData}[${n.parentDataProperty}]`));
|
|
3847
3841
|
}
|
|
3848
|
-
function
|
|
3842
|
+
function Ba(e, t) {
|
|
3849
3843
|
const { gen: r } = e;
|
|
3850
3844
|
r.if((0, ge._)`Array.isArray(${t})`, () => {
|
|
3851
|
-
r.assign(st.default.vErrors, (0, ge._)`${st.default.vErrors} === null ? ${t} : ${st.default.vErrors}.concat(${t})`).assign(st.default.errors, (0, ge._)`${st.default.vErrors}.length`), (0,
|
|
3845
|
+
r.assign(st.default.vErrors, (0, ge._)`${st.default.vErrors} === null ? ${t} : ${st.default.vErrors}.concat(${t})`).assign(st.default.errors, (0, ge._)`${st.default.vErrors}.length`), (0, Wa.extendErrors)(e);
|
|
3852
3846
|
}, () => e.error());
|
|
3853
3847
|
}
|
|
3854
|
-
function
|
|
3848
|
+
function Ga({ schemaEnv: e }, t) {
|
|
3855
3849
|
if (t.async && !e.$async)
|
|
3856
3850
|
throw new Error("async keyword in sync schema");
|
|
3857
3851
|
}
|
|
3858
|
-
function
|
|
3852
|
+
function ii(e, t, r) {
|
|
3859
3853
|
if (r === void 0)
|
|
3860
3854
|
throw new Error(`keyword "${t}" failed to compile`);
|
|
3861
3855
|
return e.scopeValue("keyword", typeof r == "function" ? { ref: r } : { ref: r, code: (0, ge.stringify)(r) });
|
|
3862
3856
|
}
|
|
3863
|
-
function
|
|
3857
|
+
function Ja(e, t, r = !1) {
|
|
3864
3858
|
return !t.length || t.some((n) => n === "array" ? Array.isArray(e) : n === "object" ? e && typeof e == "object" && !Array.isArray(e) : typeof e == n || r && typeof e > "u");
|
|
3865
3859
|
}
|
|
3866
|
-
Le.validSchemaType =
|
|
3867
|
-
function
|
|
3860
|
+
Le.validSchemaType = Ja;
|
|
3861
|
+
function Ya({ schema: e, opts: t, self: r, errSchemaPath: n }, s, i) {
|
|
3868
3862
|
if (Array.isArray(s.keyword) ? !s.keyword.includes(i) : s.keyword !== i)
|
|
3869
3863
|
throw new Error("ajv implementation error");
|
|
3870
3864
|
const o = s.dependencies;
|
|
@@ -3878,12 +3872,12 @@ function Qa({ schema: e, opts: t, self: r, errSchemaPath: n }, s, i) {
|
|
|
3878
3872
|
throw new Error(p);
|
|
3879
3873
|
}
|
|
3880
3874
|
}
|
|
3881
|
-
Le.validateKeywordUsage =
|
|
3875
|
+
Le.validateKeywordUsage = Ya;
|
|
3882
3876
|
var Ye = {};
|
|
3883
3877
|
Object.defineProperty(Ye, "__esModule", { value: !0 });
|
|
3884
3878
|
Ye.extendSubschemaMode = Ye.extendSubschemaData = Ye.getSubschema = void 0;
|
|
3885
|
-
const Ue =
|
|
3886
|
-
function
|
|
3879
|
+
const Ue = x, oi = Z;
|
|
3880
|
+
function Qa(e, { keyword: t, schemaProp: r, schema: n, schemaPath: s, errSchemaPath: i, topSchemaRef: o }) {
|
|
3887
3881
|
if (t !== void 0 && n !== void 0)
|
|
3888
3882
|
throw new Error('both "keyword" and "schema" passed, only one allowed');
|
|
3889
3883
|
if (t !== void 0) {
|
|
@@ -3895,7 +3889,7 @@ function Xa(e, { keyword: t, schemaProp: r, schema: n, schemaPath: s, errSchemaP
|
|
|
3895
3889
|
} : {
|
|
3896
3890
|
schema: l[r],
|
|
3897
3891
|
schemaPath: (0, Ue._)`${e.schemaPath}${(0, Ue.getProperty)(t)}${(0, Ue.getProperty)(r)}`,
|
|
3898
|
-
errSchemaPath: `${e.errSchemaPath}/${t}/${(0,
|
|
3892
|
+
errSchemaPath: `${e.errSchemaPath}/${t}/${(0, oi.escapeFragment)(r)}`
|
|
3899
3893
|
};
|
|
3900
3894
|
}
|
|
3901
3895
|
if (n !== void 0) {
|
|
@@ -3910,14 +3904,14 @@ function Xa(e, { keyword: t, schemaProp: r, schema: n, schemaPath: s, errSchemaP
|
|
|
3910
3904
|
}
|
|
3911
3905
|
throw new Error('either "keyword" or "schema" must be passed');
|
|
3912
3906
|
}
|
|
3913
|
-
Ye.getSubschema =
|
|
3914
|
-
function
|
|
3907
|
+
Ye.getSubschema = Qa;
|
|
3908
|
+
function Xa(e, t, { dataProp: r, dataPropType: n, data: s, dataTypes: i, propertyName: o }) {
|
|
3915
3909
|
if (s !== void 0 && r !== void 0)
|
|
3916
3910
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
3917
3911
|
const { gen: l } = t;
|
|
3918
3912
|
if (r !== void 0) {
|
|
3919
3913
|
const { errorPath: u, dataPathArr: d, opts: g } = t, C = l.let("data", (0, Ue._)`${t.data}${(0, Ue.getProperty)(r)}`, !0);
|
|
3920
|
-
p(C), e.errorPath = (0, Ue.str)`${u}${(0,
|
|
3914
|
+
p(C), e.errorPath = (0, Ue.str)`${u}${(0, oi.getErrorPath)(r, n, g.jsPropertySyntax)}`, e.parentDataProperty = (0, Ue._)`${r}`, e.dataPathArr = [...d, e.parentDataProperty];
|
|
3921
3915
|
}
|
|
3922
3916
|
if (s !== void 0) {
|
|
3923
3917
|
const u = s instanceof Ue.Name ? s : l.let("data", s, !0);
|
|
@@ -3928,12 +3922,12 @@ function Za(e, t, { dataProp: r, dataPropType: n, data: s, dataTypes: i, propert
|
|
|
3928
3922
|
e.data = u, e.dataLevel = t.dataLevel + 1, e.dataTypes = [], t.definedProperties = /* @__PURE__ */ new Set(), e.parentData = t.data, e.dataNames = [...t.dataNames, u];
|
|
3929
3923
|
}
|
|
3930
3924
|
}
|
|
3931
|
-
Ye.extendSubschemaData =
|
|
3932
|
-
function
|
|
3925
|
+
Ye.extendSubschemaData = Xa;
|
|
3926
|
+
function Za(e, { jtdDiscriminator: t, jtdMetadata: r, compositeRule: n, createErrors: s, allErrors: i }) {
|
|
3933
3927
|
n !== void 0 && (e.compositeRule = n), s !== void 0 && (e.createErrors = s), i !== void 0 && (e.allErrors = i), e.jtdDiscriminator = t, e.jtdMetadata = r;
|
|
3934
3928
|
}
|
|
3935
|
-
Ye.extendSubschemaMode =
|
|
3936
|
-
var he = {},
|
|
3929
|
+
Ye.extendSubschemaMode = Za;
|
|
3930
|
+
var he = {}, ai = function e(t, r) {
|
|
3937
3931
|
if (t === r)
|
|
3938
3932
|
return !0;
|
|
3939
3933
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
@@ -3967,7 +3961,7 @@ var he = {}, ci = function e(t, r) {
|
|
|
3967
3961
|
return !0;
|
|
3968
3962
|
}
|
|
3969
3963
|
return t !== t && r !== r;
|
|
3970
|
-
},
|
|
3964
|
+
}, ci = { exports: {} }, Je = ci.exports = function(e, t, r) {
|
|
3971
3965
|
typeof t == "function" && (r = t, t = {}), r = t.cb || r;
|
|
3972
3966
|
var n = typeof r == "function" ? r : r.pre || function() {
|
|
3973
3967
|
}, s = r.post || function() {
|
|
@@ -4030,20 +4024,20 @@ function yr(e, t, r, n, s, i, o, l, p, u) {
|
|
|
4030
4024
|
} else if (d in Je.propsKeywords) {
|
|
4031
4025
|
if (g && typeof g == "object")
|
|
4032
4026
|
for (var k in g)
|
|
4033
|
-
yr(e, t, r, g[k], s + "/" + d + "/" +
|
|
4027
|
+
yr(e, t, r, g[k], s + "/" + d + "/" + ec(k), i, s, d, n, k);
|
|
4034
4028
|
} else
|
|
4035
4029
|
(d in Je.keywords || e.allKeys && !(d in Je.skipKeywords)) && yr(e, t, r, g, s + "/" + d, i, s, d, n);
|
|
4036
4030
|
}
|
|
4037
4031
|
r(n, s, i, o, l, p, u);
|
|
4038
4032
|
}
|
|
4039
4033
|
}
|
|
4040
|
-
function
|
|
4034
|
+
function ec(e) {
|
|
4041
4035
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
4042
4036
|
}
|
|
4043
|
-
var
|
|
4037
|
+
var tc = ci.exports;
|
|
4044
4038
|
Object.defineProperty(he, "__esModule", { value: !0 });
|
|
4045
4039
|
he.getSchemaRefs = he.resolveUrl = he.normalizeId = he._getFullPath = he.getFullPath = he.inlineRef = void 0;
|
|
4046
|
-
const
|
|
4040
|
+
const rc = Z, nc = ai, sc = tc, ic = /* @__PURE__ */ new Set([
|
|
4047
4041
|
"type",
|
|
4048
4042
|
"format",
|
|
4049
4043
|
"pattern",
|
|
@@ -4061,11 +4055,11 @@ const nc = Z, sc = ci, ic = rc, oc = /* @__PURE__ */ new Set([
|
|
|
4061
4055
|
"enum",
|
|
4062
4056
|
"const"
|
|
4063
4057
|
]);
|
|
4064
|
-
function
|
|
4065
|
-
return typeof e == "boolean" ? !0 : t === !0 ? !Br(e) : t ?
|
|
4058
|
+
function oc(e, t = !0) {
|
|
4059
|
+
return typeof e == "boolean" ? !0 : t === !0 ? !Br(e) : t ? li(e) <= t : !1;
|
|
4066
4060
|
}
|
|
4067
|
-
he.inlineRef =
|
|
4068
|
-
const
|
|
4061
|
+
he.inlineRef = oc;
|
|
4062
|
+
const ac = /* @__PURE__ */ new Set([
|
|
4069
4063
|
"$ref",
|
|
4070
4064
|
"$recursiveRef",
|
|
4071
4065
|
"$recursiveAnchor",
|
|
@@ -4074,7 +4068,7 @@ const cc = /* @__PURE__ */ new Set([
|
|
|
4074
4068
|
]);
|
|
4075
4069
|
function Br(e) {
|
|
4076
4070
|
for (const t in e) {
|
|
4077
|
-
if (
|
|
4071
|
+
if (ac.has(t))
|
|
4078
4072
|
return !0;
|
|
4079
4073
|
const r = e[t];
|
|
4080
4074
|
if (Array.isArray(r) && r.some(Br) || typeof r == "object" && Br(r))
|
|
@@ -4082,41 +4076,41 @@ function Br(e) {
|
|
|
4082
4076
|
}
|
|
4083
4077
|
return !1;
|
|
4084
4078
|
}
|
|
4085
|
-
function
|
|
4079
|
+
function li(e) {
|
|
4086
4080
|
let t = 0;
|
|
4087
4081
|
for (const r in e) {
|
|
4088
4082
|
if (r === "$ref")
|
|
4089
4083
|
return 1 / 0;
|
|
4090
|
-
if (t++, !
|
|
4084
|
+
if (t++, !ic.has(r) && (typeof e[r] == "object" && (0, rc.eachItem)(e[r], (n) => t += li(n)), t === 1 / 0))
|
|
4091
4085
|
return 1 / 0;
|
|
4092
4086
|
}
|
|
4093
4087
|
return t;
|
|
4094
4088
|
}
|
|
4095
|
-
function
|
|
4089
|
+
function ui(e, t = "", r) {
|
|
4096
4090
|
r !== !1 && (t = Rt(t));
|
|
4097
4091
|
const n = e.parse(t);
|
|
4098
|
-
return
|
|
4092
|
+
return di(e, n);
|
|
4099
4093
|
}
|
|
4100
|
-
he.getFullPath =
|
|
4101
|
-
function
|
|
4094
|
+
he.getFullPath = ui;
|
|
4095
|
+
function di(e, t) {
|
|
4102
4096
|
return e.serialize(t).split("#")[0] + "#";
|
|
4103
4097
|
}
|
|
4104
|
-
he._getFullPath =
|
|
4105
|
-
const
|
|
4098
|
+
he._getFullPath = di;
|
|
4099
|
+
const cc = /#\/?$/;
|
|
4106
4100
|
function Rt(e) {
|
|
4107
|
-
return e ? e.replace(
|
|
4101
|
+
return e ? e.replace(cc, "") : "";
|
|
4108
4102
|
}
|
|
4109
4103
|
he.normalizeId = Rt;
|
|
4110
|
-
function
|
|
4104
|
+
function lc(e, t, r) {
|
|
4111
4105
|
return r = Rt(r), e.resolve(t, r);
|
|
4112
4106
|
}
|
|
4113
|
-
he.resolveUrl =
|
|
4114
|
-
const
|
|
4115
|
-
function
|
|
4107
|
+
he.resolveUrl = lc;
|
|
4108
|
+
const uc = /^[a-z_][-a-z0-9._]*$/i;
|
|
4109
|
+
function dc(e, t) {
|
|
4116
4110
|
if (typeof e == "boolean")
|
|
4117
4111
|
return {};
|
|
4118
|
-
const { schemaId: r, uriResolver: n } = this.opts, s = Rt(e[r] || t), i = { "": s }, o =
|
|
4119
|
-
return
|
|
4112
|
+
const { schemaId: r, uriResolver: n } = this.opts, s = Rt(e[r] || t), i = { "": s }, o = ui(n, s, !1), l = {}, p = /* @__PURE__ */ new Set();
|
|
4113
|
+
return sc(e, { allKeys: !0 }, (g, C, k, E) => {
|
|
4120
4114
|
if (E === void 0)
|
|
4121
4115
|
return;
|
|
4122
4116
|
const S = o + C;
|
|
@@ -4132,69 +4126,69 @@ function fc(e, t) {
|
|
|
4132
4126
|
}
|
|
4133
4127
|
function T(R) {
|
|
4134
4128
|
if (typeof R == "string") {
|
|
4135
|
-
if (!
|
|
4129
|
+
if (!uc.test(R))
|
|
4136
4130
|
throw new Error(`invalid anchor "${R}"`);
|
|
4137
4131
|
y.call(this, `#${R}`);
|
|
4138
4132
|
}
|
|
4139
4133
|
}
|
|
4140
4134
|
}), l;
|
|
4141
4135
|
function u(g, C, k) {
|
|
4142
|
-
if (C !== void 0 && !
|
|
4136
|
+
if (C !== void 0 && !nc(g, C))
|
|
4143
4137
|
throw d(k);
|
|
4144
4138
|
}
|
|
4145
4139
|
function d(g) {
|
|
4146
4140
|
return new Error(`reference "${g}" resolves to more than one schema`);
|
|
4147
4141
|
}
|
|
4148
4142
|
}
|
|
4149
|
-
he.getSchemaRefs =
|
|
4143
|
+
he.getSchemaRefs = dc;
|
|
4150
4144
|
Object.defineProperty(Ne, "__esModule", { value: !0 });
|
|
4151
4145
|
Ne.getData = Ne.KeywordCxt = Ne.validateFunctionCode = void 0;
|
|
4152
|
-
const
|
|
4153
|
-
function
|
|
4154
|
-
if (
|
|
4155
|
-
|
|
4146
|
+
const fi = Nt, vs = tr, ln = ze, br = tr, fc = jr, Bt = Le, Mr = Ye, U = x, V = He, pc = he, We = Z, zt = er;
|
|
4147
|
+
function hc(e) {
|
|
4148
|
+
if (mi(e) && (yi(e), hi(e))) {
|
|
4149
|
+
gc(e);
|
|
4156
4150
|
return;
|
|
4157
4151
|
}
|
|
4158
|
-
|
|
4152
|
+
pi(e, () => (0, fi.topBoolOrEmptySchema)(e));
|
|
4159
4153
|
}
|
|
4160
|
-
Ne.validateFunctionCode =
|
|
4161
|
-
function
|
|
4154
|
+
Ne.validateFunctionCode = hc;
|
|
4155
|
+
function pi({ gen: e, validateName: t, schema: r, schemaEnv: n, opts: s }, i) {
|
|
4162
4156
|
s.code.es5 ? e.func(t, (0, U._)`${V.default.data}, ${V.default.valCxt}`, n.$async, () => {
|
|
4163
|
-
e.code((0, U._)`"use strict"; ${
|
|
4164
|
-
}) : e.func(t, (0, U._)`${V.default.data}, ${
|
|
4157
|
+
e.code((0, U._)`"use strict"; ${_s(r, s)}`), yc(e, s), e.code(i);
|
|
4158
|
+
}) : e.func(t, (0, U._)`${V.default.data}, ${mc(s)}`, n.$async, () => e.code(_s(r, s)).code(i));
|
|
4165
4159
|
}
|
|
4166
|
-
function
|
|
4160
|
+
function mc(e) {
|
|
4167
4161
|
return (0, U._)`{${V.default.instancePath}="", ${V.default.parentData}, ${V.default.parentDataProperty}, ${V.default.rootData}=${V.default.data}${e.dynamicRef ? (0, U._)`, ${V.default.dynamicAnchors}={}` : U.nil}}={}`;
|
|
4168
4162
|
}
|
|
4169
|
-
function
|
|
4163
|
+
function yc(e, t) {
|
|
4170
4164
|
e.if(V.default.valCxt, () => {
|
|
4171
4165
|
e.var(V.default.instancePath, (0, U._)`${V.default.valCxt}.${V.default.instancePath}`), e.var(V.default.parentData, (0, U._)`${V.default.valCxt}.${V.default.parentData}`), e.var(V.default.parentDataProperty, (0, U._)`${V.default.valCxt}.${V.default.parentDataProperty}`), e.var(V.default.rootData, (0, U._)`${V.default.valCxt}.${V.default.rootData}`), t.dynamicRef && e.var(V.default.dynamicAnchors, (0, U._)`${V.default.valCxt}.${V.default.dynamicAnchors}`);
|
|
4172
4166
|
}, () => {
|
|
4173
4167
|
e.var(V.default.instancePath, (0, U._)`""`), e.var(V.default.parentData, (0, U._)`undefined`), e.var(V.default.parentDataProperty, (0, U._)`undefined`), e.var(V.default.rootData, V.default.data), t.dynamicRef && e.var(V.default.dynamicAnchors, (0, U._)`{}`);
|
|
4174
4168
|
});
|
|
4175
4169
|
}
|
|
4176
|
-
function
|
|
4170
|
+
function gc(e) {
|
|
4177
4171
|
const { schema: t, opts: r, gen: n } = e;
|
|
4178
|
-
|
|
4179
|
-
r.$comment && t.$comment &&
|
|
4172
|
+
pi(e, () => {
|
|
4173
|
+
r.$comment && t.$comment && $i(e), bc(e), n.let(V.default.vErrors, null), n.let(V.default.errors, 0), r.unevaluated && $c(e), gi(e), Sc(e);
|
|
4180
4174
|
});
|
|
4181
4175
|
}
|
|
4182
|
-
function
|
|
4176
|
+
function $c(e) {
|
|
4183
4177
|
const { gen: t, validateName: r } = e;
|
|
4184
4178
|
e.evaluated = t.const("evaluated", (0, U._)`${r}.evaluated`), t.if((0, U._)`${e.evaluated}.dynamicProps`, () => t.assign((0, U._)`${e.evaluated}.props`, (0, U._)`undefined`)), t.if((0, U._)`${e.evaluated}.dynamicItems`, () => t.assign((0, U._)`${e.evaluated}.items`, (0, U._)`undefined`));
|
|
4185
4179
|
}
|
|
4186
|
-
function
|
|
4180
|
+
function _s(e, t) {
|
|
4187
4181
|
const r = typeof e == "object" && e[t.schemaId];
|
|
4188
4182
|
return r && (t.code.source || t.code.process) ? (0, U._)`/*# sourceURL=${r} */` : U.nil;
|
|
4189
4183
|
}
|
|
4190
|
-
function
|
|
4191
|
-
if (
|
|
4192
|
-
|
|
4184
|
+
function vc(e, t) {
|
|
4185
|
+
if (mi(e) && (yi(e), hi(e))) {
|
|
4186
|
+
_c(e, t);
|
|
4193
4187
|
return;
|
|
4194
4188
|
}
|
|
4195
|
-
(0,
|
|
4189
|
+
(0, fi.boolOrEmptySchema)(e, t);
|
|
4196
4190
|
}
|
|
4197
|
-
function
|
|
4191
|
+
function hi({ schema: e, self: t }) {
|
|
4198
4192
|
if (typeof e == "boolean")
|
|
4199
4193
|
return !e;
|
|
4200
4194
|
for (const r in e)
|
|
@@ -4202,41 +4196,41 @@ function mi({ schema: e, self: t }) {
|
|
|
4202
4196
|
return !0;
|
|
4203
4197
|
return !1;
|
|
4204
4198
|
}
|
|
4205
|
-
function
|
|
4199
|
+
function mi(e) {
|
|
4206
4200
|
return typeof e.schema != "boolean";
|
|
4207
4201
|
}
|
|
4208
|
-
function
|
|
4202
|
+
function _c(e, t) {
|
|
4209
4203
|
const { schema: r, gen: n, opts: s } = e;
|
|
4210
|
-
s.$comment && r.$comment &&
|
|
4204
|
+
s.$comment && r.$comment && $i(e), Pc(e), Ec(e);
|
|
4211
4205
|
const i = n.const("_errs", V.default.errors);
|
|
4212
|
-
|
|
4206
|
+
gi(e, i), n.var(t, (0, U._)`${i} === ${V.default.errors}`);
|
|
4213
4207
|
}
|
|
4214
|
-
function
|
|
4215
|
-
(0, We.checkUnknownRules)(e),
|
|
4208
|
+
function yi(e) {
|
|
4209
|
+
(0, We.checkUnknownRules)(e), wc(e);
|
|
4216
4210
|
}
|
|
4217
|
-
function
|
|
4211
|
+
function gi(e, t) {
|
|
4218
4212
|
if (e.opts.jtd)
|
|
4219
|
-
return
|
|
4220
|
-
const r = (0,
|
|
4221
|
-
|
|
4213
|
+
return ws(e, [], !1, t);
|
|
4214
|
+
const r = (0, vs.getSchemaTypes)(e.schema), n = (0, vs.coerceAndCheckDataType)(e, r);
|
|
4215
|
+
ws(e, r, !n, t);
|
|
4222
4216
|
}
|
|
4223
|
-
function
|
|
4217
|
+
function wc(e) {
|
|
4224
4218
|
const { schema: t, errSchemaPath: r, opts: n, self: s } = e;
|
|
4225
4219
|
t.$ref && n.ignoreKeywordsWithRef && (0, We.schemaHasRulesButRef)(t, s.RULES) && s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`);
|
|
4226
4220
|
}
|
|
4227
|
-
function
|
|
4221
|
+
function bc(e) {
|
|
4228
4222
|
const { schema: t, opts: r } = e;
|
|
4229
4223
|
t.default !== void 0 && r.useDefaults && r.strictSchema && (0, We.checkStrictMode)(e, "default is ignored in the schema root");
|
|
4230
4224
|
}
|
|
4231
|
-
function
|
|
4225
|
+
function Pc(e) {
|
|
4232
4226
|
const t = e.schema[e.opts.schemaId];
|
|
4233
|
-
t && (e.baseId = (0,
|
|
4227
|
+
t && (e.baseId = (0, pc.resolveUrl)(e.opts.uriResolver, e.baseId, t));
|
|
4234
4228
|
}
|
|
4235
|
-
function
|
|
4229
|
+
function Ec(e) {
|
|
4236
4230
|
if (e.schema.$async && !e.schemaEnv.$async)
|
|
4237
4231
|
throw new Error("async schema in sync schema");
|
|
4238
4232
|
}
|
|
4239
|
-
function
|
|
4233
|
+
function $i({ gen: e, schemaEnv: t, schema: r, errSchemaPath: n, opts: s }) {
|
|
4240
4234
|
const i = r.$comment;
|
|
4241
4235
|
if (s.$comment === !0)
|
|
4242
4236
|
e.code((0, U._)`${V.default.self}.logger.log(${i})`);
|
|
@@ -4245,82 +4239,82 @@ function vi({ gen: e, schemaEnv: t, schema: r, errSchemaPath: n, opts: s }) {
|
|
|
4245
4239
|
e.code((0, U._)`${V.default.self}.opts.$comment(${i}, ${o}, ${l}.schema)`);
|
|
4246
4240
|
}
|
|
4247
4241
|
}
|
|
4248
|
-
function
|
|
4242
|
+
function Sc(e) {
|
|
4249
4243
|
const { gen: t, schemaEnv: r, validateName: n, ValidationError: s, opts: i } = e;
|
|
4250
|
-
r.$async ? t.if((0, U._)`${V.default.errors} === 0`, () => t.return(V.default.data), () => t.throw((0, U._)`new ${s}(${V.default.vErrors})`)) : (t.assign((0, U._)`${n}.errors`, V.default.vErrors), i.unevaluated &&
|
|
4244
|
+
r.$async ? t.if((0, U._)`${V.default.errors} === 0`, () => t.return(V.default.data), () => t.throw((0, U._)`new ${s}(${V.default.vErrors})`)) : (t.assign((0, U._)`${n}.errors`, V.default.vErrors), i.unevaluated && Tc(e), t.return((0, U._)`${V.default.errors} === 0`));
|
|
4251
4245
|
}
|
|
4252
|
-
function
|
|
4246
|
+
function Tc({ gen: e, evaluated: t, props: r, items: n }) {
|
|
4253
4247
|
r instanceof U.Name && e.assign((0, U._)`${t}.props`, r), n instanceof U.Name && e.assign((0, U._)`${t}.items`, n);
|
|
4254
4248
|
}
|
|
4255
|
-
function
|
|
4249
|
+
function ws(e, t, r, n) {
|
|
4256
4250
|
const { gen: s, schema: i, data: o, allErrors: l, opts: p, self: u } = e, { RULES: d } = u;
|
|
4257
4251
|
if (i.$ref && (p.ignoreKeywordsWithRef || !(0, We.schemaHasRulesButRef)(i, d))) {
|
|
4258
|
-
s.block(() =>
|
|
4252
|
+
s.block(() => wi(e, "$ref", d.all.$ref.definition));
|
|
4259
4253
|
return;
|
|
4260
4254
|
}
|
|
4261
|
-
p.jtd ||
|
|
4255
|
+
p.jtd || Rc(e, t), s.block(() => {
|
|
4262
4256
|
for (const C of d.rules)
|
|
4263
4257
|
g(C);
|
|
4264
4258
|
g(d.post);
|
|
4265
4259
|
});
|
|
4266
4260
|
function g(C) {
|
|
4267
|
-
(0,
|
|
4261
|
+
(0, ln.shouldUseGroup)(i, C) && (C.type ? (s.if((0, br.checkDataType)(C.type, o, p.strictNumbers)), bs(e, C), t.length === 1 && t[0] === C.type && r && (s.else(), (0, br.reportTypeError)(e)), s.endIf()) : bs(e, C), l || s.if((0, U._)`${V.default.errors} === ${n || 0}`));
|
|
4268
4262
|
}
|
|
4269
4263
|
}
|
|
4270
|
-
function
|
|
4264
|
+
function bs(e, t) {
|
|
4271
4265
|
const { gen: r, schema: n, opts: { useDefaults: s } } = e;
|
|
4272
|
-
s && (0,
|
|
4266
|
+
s && (0, fc.assignDefaults)(e, t.type), r.block(() => {
|
|
4273
4267
|
for (const i of t.rules)
|
|
4274
|
-
(0,
|
|
4268
|
+
(0, ln.shouldUseRule)(n, i) && wi(e, i.keyword, i.definition, t.type);
|
|
4275
4269
|
});
|
|
4276
4270
|
}
|
|
4277
|
-
function
|
|
4278
|
-
e.schemaEnv.meta || !e.opts.strictTypes || (
|
|
4271
|
+
function Rc(e, t) {
|
|
4272
|
+
e.schemaEnv.meta || !e.opts.strictTypes || (Oc(e, t), e.opts.allowUnionTypes || Nc(e, t), Cc(e, e.dataTypes));
|
|
4279
4273
|
}
|
|
4280
|
-
function
|
|
4274
|
+
function Oc(e, t) {
|
|
4281
4275
|
if (t.length) {
|
|
4282
4276
|
if (!e.dataTypes.length) {
|
|
4283
4277
|
e.dataTypes = t;
|
|
4284
4278
|
return;
|
|
4285
4279
|
}
|
|
4286
4280
|
t.forEach((r) => {
|
|
4287
|
-
|
|
4288
|
-
}),
|
|
4281
|
+
vi(e.dataTypes, r) || un(e, `type "${r}" not allowed by context "${e.dataTypes.join(",")}"`);
|
|
4282
|
+
}), jc(e, t);
|
|
4289
4283
|
}
|
|
4290
4284
|
}
|
|
4291
|
-
function
|
|
4292
|
-
t.length > 1 && !(t.length === 2 && t.includes("null")) &&
|
|
4285
|
+
function Nc(e, t) {
|
|
4286
|
+
t.length > 1 && !(t.length === 2 && t.includes("null")) && un(e, "use allowUnionTypes to allow union type keyword");
|
|
4293
4287
|
}
|
|
4294
|
-
function
|
|
4288
|
+
function Cc(e, t) {
|
|
4295
4289
|
const r = e.self.RULES.all;
|
|
4296
4290
|
for (const n in r) {
|
|
4297
4291
|
const s = r[n];
|
|
4298
|
-
if (typeof s == "object" && (0,
|
|
4292
|
+
if (typeof s == "object" && (0, ln.shouldUseRule)(e.schema, s)) {
|
|
4299
4293
|
const { type: i } = s.definition;
|
|
4300
|
-
i.length && !i.some((o) =>
|
|
4294
|
+
i.length && !i.some((o) => kc(t, o)) && un(e, `missing type "${i.join(",")}" for keyword "${n}"`);
|
|
4301
4295
|
}
|
|
4302
4296
|
}
|
|
4303
4297
|
}
|
|
4304
|
-
function
|
|
4298
|
+
function kc(e, t) {
|
|
4305
4299
|
return e.includes(t) || t === "number" && e.includes("integer");
|
|
4306
4300
|
}
|
|
4307
|
-
function
|
|
4301
|
+
function vi(e, t) {
|
|
4308
4302
|
return e.includes(t) || t === "integer" && e.includes("number");
|
|
4309
4303
|
}
|
|
4310
|
-
function
|
|
4304
|
+
function jc(e, t) {
|
|
4311
4305
|
const r = [];
|
|
4312
4306
|
for (const n of e.dataTypes)
|
|
4313
|
-
|
|
4307
|
+
vi(t, n) ? r.push(n) : t.includes("integer") && n === "number" && r.push("integer");
|
|
4314
4308
|
e.dataTypes = r;
|
|
4315
4309
|
}
|
|
4316
|
-
function
|
|
4310
|
+
function un(e, t) {
|
|
4317
4311
|
const r = e.schemaEnv.baseId + e.errSchemaPath;
|
|
4318
4312
|
t += ` at "${r}" (strictTypes)`, (0, We.checkStrictMode)(e, t, e.opts.strictTypes);
|
|
4319
4313
|
}
|
|
4320
|
-
class
|
|
4314
|
+
class _i {
|
|
4321
4315
|
constructor(t, r, n) {
|
|
4322
4316
|
if ((0, Bt.validateKeywordUsage)(t, r, n), this.gen = t.gen, this.allErrors = t.allErrors, this.keyword = n, this.data = t.data, this.schema = t.schema[n], this.$data = r.$data && t.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, We.schemaRefOrVal)(t, this.schema, n, this.$data), this.schemaType = r.schemaType, this.parentSchema = t.schema, this.params = {}, this.it = t, this.def = r, this.$data)
|
|
4323
|
-
this.schemaCode = t.gen.const("vSchema",
|
|
4317
|
+
this.schemaCode = t.gen.const("vSchema", bi(this.$data, t));
|
|
4324
4318
|
else if (this.schemaCode = this.schemaValue, !(0, Bt.validSchemaType)(this.schema, r.schemaType, r.allowUndefined))
|
|
4325
4319
|
throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);
|
|
4326
4320
|
("code" in r ? r.trackErrors : r.errors !== !1) && (this.errsCount = t.gen.const("_errs", V.default.errors));
|
|
@@ -4406,7 +4400,7 @@ class wi {
|
|
|
4406
4400
|
const n = (0, Mr.getSubschema)(this.it, t);
|
|
4407
4401
|
(0, Mr.extendSubschemaData)(n, this.it, t), (0, Mr.extendSubschemaMode)(n, t);
|
|
4408
4402
|
const s = { ...this.it, ...n, items: void 0, props: void 0 };
|
|
4409
|
-
return
|
|
4403
|
+
return vc(s, r), s;
|
|
4410
4404
|
}
|
|
4411
4405
|
mergeEvaluated(t, r) {
|
|
4412
4406
|
const { it: n, gen: s } = this;
|
|
@@ -4418,22 +4412,22 @@ class wi {
|
|
|
4418
4412
|
return s.if(r, () => this.mergeEvaluated(t, U.Name)), !0;
|
|
4419
4413
|
}
|
|
4420
4414
|
}
|
|
4421
|
-
Ne.KeywordCxt =
|
|
4422
|
-
function
|
|
4423
|
-
const s = new
|
|
4415
|
+
Ne.KeywordCxt = _i;
|
|
4416
|
+
function wi(e, t, r, n) {
|
|
4417
|
+
const s = new _i(e, r, t);
|
|
4424
4418
|
"code" in r ? r.code(s, n) : s.$data && r.validate ? (0, Bt.funcKeywordCode)(s, r) : "macro" in r ? (0, Bt.macroKeywordCode)(s, r) : (r.compile || r.validate) && (0, Bt.funcKeywordCode)(s, r);
|
|
4425
4419
|
}
|
|
4426
|
-
const
|
|
4427
|
-
function
|
|
4420
|
+
const Ic = /^\/(?:[^~]|~0|~1)*$/, Ac = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
4421
|
+
function bi(e, { dataLevel: t, dataNames: r, dataPathArr: n }) {
|
|
4428
4422
|
let s, i;
|
|
4429
4423
|
if (e === "")
|
|
4430
4424
|
return V.default.rootData;
|
|
4431
4425
|
if (e[0] === "/") {
|
|
4432
|
-
if (!
|
|
4426
|
+
if (!Ic.test(e))
|
|
4433
4427
|
throw new Error(`Invalid JSON-pointer: ${e}`);
|
|
4434
4428
|
s = e, i = V.default.rootData;
|
|
4435
4429
|
} else {
|
|
4436
|
-
const u =
|
|
4430
|
+
const u = Ac.exec(e);
|
|
4437
4431
|
if (!u)
|
|
4438
4432
|
throw new Error(`Invalid JSON-pointer: ${e}`);
|
|
4439
4433
|
const d = +u[1];
|
|
@@ -4456,28 +4450,28 @@ function Pi(e, { dataLevel: t, dataNames: r, dataPathArr: n }) {
|
|
|
4456
4450
|
return `Cannot access ${u} ${d} levels up, current level is ${t}`;
|
|
4457
4451
|
}
|
|
4458
4452
|
}
|
|
4459
|
-
Ne.getData =
|
|
4453
|
+
Ne.getData = bi;
|
|
4460
4454
|
var rr = {};
|
|
4461
4455
|
Object.defineProperty(rr, "__esModule", { value: !0 });
|
|
4462
|
-
class
|
|
4456
|
+
class Dc extends Error {
|
|
4463
4457
|
constructor(t) {
|
|
4464
4458
|
super("validation failed"), this.errors = t, this.ajv = this.validation = !0;
|
|
4465
4459
|
}
|
|
4466
4460
|
}
|
|
4467
|
-
rr.default =
|
|
4461
|
+
rr.default = Dc;
|
|
4468
4462
|
var nr = {};
|
|
4469
4463
|
Object.defineProperty(nr, "__esModule", { value: !0 });
|
|
4470
4464
|
const Ur = he;
|
|
4471
|
-
class
|
|
4465
|
+
class Fc extends Error {
|
|
4472
4466
|
constructor(t, r, n, s) {
|
|
4473
4467
|
super(s || `can't resolve reference ${n} from id ${r}`), this.missingRef = (0, Ur.resolveUrl)(t, r, n), this.missingSchema = (0, Ur.normalizeId)((0, Ur.getFullPath)(t, this.missingRef));
|
|
4474
4468
|
}
|
|
4475
4469
|
}
|
|
4476
|
-
nr.default =
|
|
4470
|
+
nr.default = Fc;
|
|
4477
4471
|
var _e = {};
|
|
4478
4472
|
Object.defineProperty(_e, "__esModule", { value: !0 });
|
|
4479
4473
|
_e.resolveSchema = _e.getCompilingSchema = _e.resolveRef = _e.compileSchema = _e.SchemaEnv = void 0;
|
|
4480
|
-
const Te =
|
|
4474
|
+
const Te = x, qc = rr, nt = He, Oe = he, Ps = Z, Mc = Ne;
|
|
4481
4475
|
class Ir {
|
|
4482
4476
|
constructor(t) {
|
|
4483
4477
|
var r;
|
|
@@ -4487,14 +4481,14 @@ class Ir {
|
|
|
4487
4481
|
}
|
|
4488
4482
|
}
|
|
4489
4483
|
_e.SchemaEnv = Ir;
|
|
4490
|
-
function
|
|
4491
|
-
const t =
|
|
4484
|
+
function dn(e) {
|
|
4485
|
+
const t = Pi.call(this, e);
|
|
4492
4486
|
if (t)
|
|
4493
4487
|
return t;
|
|
4494
4488
|
const r = (0, Oe.getFullPath)(this.opts.uriResolver, e.root.baseId), { es5: n, lines: s } = this.opts.code, { ownProperties: i } = this.opts, o = new Te.CodeGen(this.scope, { es5: n, lines: s, ownProperties: i });
|
|
4495
4489
|
let l;
|
|
4496
4490
|
e.$async && (l = o.scopeValue("Error", {
|
|
4497
|
-
ref:
|
|
4491
|
+
ref: qc.default,
|
|
4498
4492
|
code: (0, Te._)`require("ajv/dist/runtime/validation_error").default`
|
|
4499
4493
|
}));
|
|
4500
4494
|
const p = o.scopeName("validate");
|
|
@@ -4525,7 +4519,7 @@ function fn(e) {
|
|
|
4525
4519
|
};
|
|
4526
4520
|
let d;
|
|
4527
4521
|
try {
|
|
4528
|
-
this._compilations.add(e), (0,
|
|
4522
|
+
this._compilations.add(e), (0, Mc.validateFunctionCode)(u), o.optimize(this.opts.code.optimize);
|
|
4529
4523
|
const g = o.toString();
|
|
4530
4524
|
d = `${o.scopeRefs(nt.default.scope)}return ${g}`, this.opts.code.process && (d = this.opts.code.process(d, e));
|
|
4531
4525
|
const k = new Function(`${nt.default.self}`, `${nt.default.scope}`, d)(this, this.scope.get());
|
|
@@ -4545,35 +4539,35 @@ function fn(e) {
|
|
|
4545
4539
|
this._compilations.delete(e);
|
|
4546
4540
|
}
|
|
4547
4541
|
}
|
|
4548
|
-
_e.compileSchema =
|
|
4549
|
-
function
|
|
4542
|
+
_e.compileSchema = dn;
|
|
4543
|
+
function Uc(e, t, r) {
|
|
4550
4544
|
var n;
|
|
4551
4545
|
r = (0, Oe.resolveUrl)(this.opts.uriResolver, t, r);
|
|
4552
4546
|
const s = e.refs[r];
|
|
4553
4547
|
if (s)
|
|
4554
4548
|
return s;
|
|
4555
|
-
let i =
|
|
4549
|
+
let i = Vc.call(this, e, r);
|
|
4556
4550
|
if (i === void 0) {
|
|
4557
4551
|
const o = (n = e.localRefs) === null || n === void 0 ? void 0 : n[r], { schemaId: l } = this.opts;
|
|
4558
4552
|
o && (i = new Ir({ schema: o, schemaId: l, root: e, baseId: t }));
|
|
4559
4553
|
}
|
|
4560
4554
|
if (i !== void 0)
|
|
4561
|
-
return e.refs[r] =
|
|
4555
|
+
return e.refs[r] = Lc.call(this, i);
|
|
4562
4556
|
}
|
|
4563
|
-
_e.resolveRef =
|
|
4564
|
-
function
|
|
4565
|
-
return (0, Oe.inlineRef)(e.schema, this.opts.inlineRefs) ? e.schema : e.validate ? e :
|
|
4557
|
+
_e.resolveRef = Uc;
|
|
4558
|
+
function Lc(e) {
|
|
4559
|
+
return (0, Oe.inlineRef)(e.schema, this.opts.inlineRefs) ? e.schema : e.validate ? e : dn.call(this, e);
|
|
4566
4560
|
}
|
|
4567
|
-
function
|
|
4561
|
+
function Pi(e) {
|
|
4568
4562
|
for (const t of this._compilations)
|
|
4569
|
-
if (
|
|
4563
|
+
if (Hc(t, e))
|
|
4570
4564
|
return t;
|
|
4571
4565
|
}
|
|
4572
|
-
_e.getCompilingSchema =
|
|
4573
|
-
function
|
|
4566
|
+
_e.getCompilingSchema = Pi;
|
|
4567
|
+
function Hc(e, t) {
|
|
4574
4568
|
return e.schema === t.schema && e.root === t.root && e.baseId === t.baseId;
|
|
4575
4569
|
}
|
|
4576
|
-
function
|
|
4570
|
+
function Vc(e, t) {
|
|
4577
4571
|
let r;
|
|
4578
4572
|
for (; typeof (r = this.refs[t]) == "string"; )
|
|
4579
4573
|
t = r;
|
|
@@ -4590,7 +4584,7 @@ function Ar(e, t) {
|
|
|
4590
4584
|
return typeof l?.schema != "object" ? void 0 : Lr.call(this, r, l);
|
|
4591
4585
|
}
|
|
4592
4586
|
if (typeof o?.schema == "object") {
|
|
4593
|
-
if (o.validate ||
|
|
4587
|
+
if (o.validate || dn.call(this, o), i === (0, Oe.normalizeId)(t)) {
|
|
4594
4588
|
const { schema: l } = o, { schemaId: p } = this.opts, u = l[p];
|
|
4595
4589
|
return u && (s = (0, Oe.resolveUrl)(this.opts.uriResolver, s, u)), new Ir({ schema: l, schemaId: p, root: e, baseId: s });
|
|
4596
4590
|
}
|
|
@@ -4598,7 +4592,7 @@ function Ar(e, t) {
|
|
|
4598
4592
|
}
|
|
4599
4593
|
}
|
|
4600
4594
|
_e.resolveSchema = Ar;
|
|
4601
|
-
const
|
|
4595
|
+
const zc = /* @__PURE__ */ new Set([
|
|
4602
4596
|
"properties",
|
|
4603
4597
|
"patternProperties",
|
|
4604
4598
|
"enum",
|
|
@@ -4612,15 +4606,15 @@ function Lr(e, { baseId: t, schema: r, root: n }) {
|
|
|
4612
4606
|
for (const l of e.fragment.slice(1).split("/")) {
|
|
4613
4607
|
if (typeof r == "boolean")
|
|
4614
4608
|
return;
|
|
4615
|
-
const p = r[(0,
|
|
4609
|
+
const p = r[(0, Ps.unescapeFragment)(l)];
|
|
4616
4610
|
if (p === void 0)
|
|
4617
4611
|
return;
|
|
4618
4612
|
r = p;
|
|
4619
4613
|
const u = typeof r == "object" && r[this.opts.schemaId];
|
|
4620
|
-
!
|
|
4614
|
+
!zc.has(l) && u && (t = (0, Oe.resolveUrl)(this.opts.uriResolver, t, u));
|
|
4621
4615
|
}
|
|
4622
4616
|
let i;
|
|
4623
|
-
if (typeof r != "boolean" && r.$ref && !(0,
|
|
4617
|
+
if (typeof r != "boolean" && r.$ref && !(0, Ps.schemaHasRulesButRef)(r, this.RULES)) {
|
|
4624
4618
|
const l = (0, Oe.resolveUrl)(this.opts.uriResolver, t, r.$ref);
|
|
4625
4619
|
i = Ar.call(this, n, l);
|
|
4626
4620
|
}
|
|
@@ -4628,9 +4622,9 @@ function Lr(e, { baseId: t, schema: r, root: n }) {
|
|
|
4628
4622
|
if (i = i || new Ir({ schema: r, schemaId: o, root: n, baseId: t }), i.schema !== i.root.schema)
|
|
4629
4623
|
return i;
|
|
4630
4624
|
}
|
|
4631
|
-
const
|
|
4625
|
+
const Wc = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", Kc = "Meta-schema for $data reference (JSON AnySchema extension proposal)", xc = "object", Bc = [
|
|
4632
4626
|
"$data"
|
|
4633
|
-
],
|
|
4627
|
+
], Gc = {
|
|
4634
4628
|
$data: {
|
|
4635
4629
|
type: "string",
|
|
4636
4630
|
anyOf: [
|
|
@@ -4642,20 +4636,20 @@ const xc = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/
|
|
|
4642
4636
|
}
|
|
4643
4637
|
]
|
|
4644
4638
|
}
|
|
4645
|
-
},
|
|
4646
|
-
$id:
|
|
4639
|
+
}, Jc = !1, Yc = {
|
|
4640
|
+
$id: Wc,
|
|
4647
4641
|
description: Kc,
|
|
4648
|
-
type:
|
|
4649
|
-
required:
|
|
4650
|
-
properties:
|
|
4651
|
-
additionalProperties:
|
|
4642
|
+
type: xc,
|
|
4643
|
+
required: Bc,
|
|
4644
|
+
properties: Gc,
|
|
4645
|
+
additionalProperties: Jc
|
|
4652
4646
|
};
|
|
4653
|
-
var
|
|
4647
|
+
var fn = {}, Gr = { exports: {} };
|
|
4654
4648
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
4655
4649
|
(function(e, t) {
|
|
4656
4650
|
(function(r, n) {
|
|
4657
4651
|
n(t);
|
|
4658
|
-
})(
|
|
4652
|
+
})(ya, function(r) {
|
|
4659
4653
|
function n() {
|
|
4660
4654
|
for (var f = arguments.length, c = Array(f), m = 0; m < f; m++)
|
|
4661
4655
|
c[m] = arguments[m];
|
|
@@ -4689,7 +4683,7 @@ var pn = {}, Gr = { exports: {} };
|
|
|
4689
4683
|
function u(f) {
|
|
4690
4684
|
var c = "[A-Za-z]", m = "[0-9]", P = n(m, "[A-Fa-f]"), b = s(s("%[EFef]" + P + "%" + P + P + "%" + P + P) + "|" + s("%[89A-Fa-f]" + P + "%" + P + P) + "|" + s("%" + P + P)), L = "[\\:\\/\\?\\#\\[\\]\\@]", H = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", X = n(L, H), re = f ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", ce = f ? "[\\uE000-\\uF8FF]" : "[]", J = n(c, m, "[\\-\\.\\_\\~]", re);
|
|
4691
4685
|
s(c + n(c, m, "[\\+\\-\\.]") + "*"), s(s(b + "|" + n(J, H, "[\\:]")) + "*");
|
|
4692
|
-
var te = s(s("25[0-5]") + "|" + s("2[0-4]" + m) + "|" + s("1" + m + m) + "|" + s("0?[1-9]" + m) + "|0?0?" + m), le = s(te + "\\." + te + "\\." + te + "\\." + te), W = s(P + "{1,4}"), se = s(s(W + "\\:" + W) + "|" + le), fe = s(s(W + "\\:") + "{6}" + se), ie = s("\\:\\:" + s(W + "\\:") + "{5}" + se),
|
|
4686
|
+
var te = s(s("25[0-5]") + "|" + s("2[0-4]" + m) + "|" + s("1" + m + m) + "|" + s("0?[1-9]" + m) + "|0?0?" + m), le = s(te + "\\." + te + "\\." + te + "\\." + te), W = s(P + "{1,4}"), se = s(s(W + "\\:" + W) + "|" + le), fe = s(s(W + "\\:") + "{6}" + se), ie = s("\\:\\:" + s(W + "\\:") + "{5}" + se), Ke = s(s(W) + "?\\:\\:" + s(W + "\\:") + "{4}" + se), Fe = s(s(s(W + "\\:") + "{0,1}" + W) + "?\\:\\:" + s(W + "\\:") + "{3}" + se), qe = s(s(s(W + "\\:") + "{0,2}" + W) + "?\\:\\:" + s(W + "\\:") + "{2}" + se), wt = s(s(s(W + "\\:") + "{0,3}" + W) + "?\\:\\:" + W + "\\:" + se), tt = s(s(s(W + "\\:") + "{0,4}" + W) + "?\\:\\:" + se), Ee = s(s(s(W + "\\:") + "{0,5}" + W) + "?\\:\\:" + W), Me = s(s(s(W + "\\:") + "{0,6}" + W) + "?\\:\\:"), rt = s([fe, ie, Ke, Fe, qe, wt, tt, Ee, Me].join("|")), Ve = s(s(J + "|" + b) + "+");
|
|
4693
4687
|
s("[vV]" + P + "+\\." + n(J, H, "[\\:]") + "+"), s(s(b + "|" + n(J, H)) + "*");
|
|
4694
4688
|
var Ht = s(b + "|" + n(J, H, "[\\:\\@]"));
|
|
4695
4689
|
return s(s(b + "|" + n(J, H, "[\\@]")) + "+"), s(s(Ht + "|" + n("[\\/\\?]", ce)) + "*"), {
|
|
@@ -4833,19 +4827,19 @@ var pn = {}, Gr = { exports: {} };
|
|
|
4833
4827
|
}
|
|
4834
4828
|
var W = m.length, se = W;
|
|
4835
4829
|
for (W && m.push(_); se < P; ) {
|
|
4836
|
-
var fe = E, ie = !0,
|
|
4830
|
+
var fe = E, ie = !0, Ke = !1, Fe = void 0;
|
|
4837
4831
|
try {
|
|
4838
4832
|
for (var qe = c[Symbol.iterator](), wt; !(ie = (wt = qe.next()).done); ie = !0) {
|
|
4839
4833
|
var tt = wt.value;
|
|
4840
4834
|
tt >= b && tt < fe && (fe = tt);
|
|
4841
4835
|
}
|
|
4842
4836
|
} catch (Vt) {
|
|
4843
|
-
|
|
4837
|
+
Ke = !0, Fe = Vt;
|
|
4844
4838
|
} finally {
|
|
4845
4839
|
try {
|
|
4846
4840
|
!ie && qe.return && qe.return();
|
|
4847
4841
|
} finally {
|
|
4848
|
-
if (
|
|
4842
|
+
if (Ke)
|
|
4849
4843
|
throw Fe;
|
|
4850
4844
|
}
|
|
4851
4845
|
}
|
|
@@ -4853,9 +4847,9 @@ var pn = {}, Gr = { exports: {} };
|
|
|
4853
4847
|
fe - b > Q((E - L) / Ee) && de("overflow"), L += (fe - b) * Ee, b = fe;
|
|
4854
4848
|
var Me = !0, rt = !1, Ve = void 0;
|
|
4855
4849
|
try {
|
|
4856
|
-
for (var Ht = c[Symbol.iterator](),
|
|
4857
|
-
var
|
|
4858
|
-
if (
|
|
4850
|
+
for (var Ht = c[Symbol.iterator](), es; !(Me = (es = Ht.next()).done); Me = !0) {
|
|
4851
|
+
var ts = es.value;
|
|
4852
|
+
if (ts < b && ++L > E && de("overflow"), ts == b) {
|
|
4859
4853
|
for (
|
|
4860
4854
|
var or = L, ar = S;
|
|
4861
4855
|
;
|
|
@@ -4865,8 +4859,8 @@ var pn = {}, Gr = { exports: {} };
|
|
|
4865
4859
|
var cr = ar <= H ? v : ar >= H + y ? y : ar - H;
|
|
4866
4860
|
if (or < cr)
|
|
4867
4861
|
break;
|
|
4868
|
-
var
|
|
4869
|
-
m.push(be(F(cr +
|
|
4862
|
+
var rs = or - cr, ns = S - cr;
|
|
4863
|
+
m.push(be(F(cr + rs % ns, 0))), or = Q(rs / ns);
|
|
4870
4864
|
}
|
|
4871
4865
|
m.push(be(F(or, 0))), H = $(L, Ee, se == W), L = 0, ++se;
|
|
4872
4866
|
}
|
|
@@ -4963,13 +4957,13 @@ var pn = {}, Gr = { exports: {} };
|
|
|
4963
4957
|
for (var H = b.toLowerCase().split("::").reverse(), X = C(H, 2), re = X[0], ce = X[1], J = ce ? ce.split(":").map(ae) : [], te = re.split(":").map(ae), le = c.IPV4ADDRESS.test(te[te.length - 1]), W = le ? 7 : 8, se = te.length - W, fe = Array(W), ie = 0; ie < W; ++ie)
|
|
4964
4958
|
fe[ie] = J[ie] || te[se + ie] || "";
|
|
4965
4959
|
le && (fe[W - 1] = Ie(fe[W - 1], c));
|
|
4966
|
-
var
|
|
4960
|
+
var Ke = fe.reduce(function(Ee, Me, rt) {
|
|
4967
4961
|
if (!Me || Me === "0") {
|
|
4968
4962
|
var Ve = Ee[Ee.length - 1];
|
|
4969
4963
|
Ve && Ve.index + Ve.length === rt ? Ve.length++ : Ee.push({ index: rt, length: 1 });
|
|
4970
4964
|
}
|
|
4971
4965
|
return Ee;
|
|
4972
|
-
}, []), Fe =
|
|
4966
|
+
}, []), Fe = Ke.sort(function(Ee, Me) {
|
|
4973
4967
|
return Me.length - Ee.length;
|
|
4974
4968
|
})[0], qe = void 0;
|
|
4975
4969
|
if (Fe && Fe.length > 1) {
|
|
@@ -5079,13 +5073,13 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5079
5073
|
var P = String(c.scheme).toLowerCase() === "https";
|
|
5080
5074
|
return (c.port === (P ? 443 : 80) || c.port === "") && (c.port = void 0), c.path || (c.path = "/"), c;
|
|
5081
5075
|
}
|
|
5082
|
-
},
|
|
5076
|
+
}, xn = {
|
|
5083
5077
|
scheme: "https",
|
|
5084
5078
|
domainHost: et.domainHost,
|
|
5085
5079
|
parse: et.parse,
|
|
5086
5080
|
serialize: et.serialize
|
|
5087
5081
|
};
|
|
5088
|
-
function
|
|
5082
|
+
function Bn(f) {
|
|
5089
5083
|
return typeof f.secure == "boolean" ? f.secure : String(f.scheme).toLowerCase() === "wss";
|
|
5090
5084
|
}
|
|
5091
5085
|
var Lt = {
|
|
@@ -5093,26 +5087,26 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5093
5087
|
domainHost: !0,
|
|
5094
5088
|
parse: function(c, m) {
|
|
5095
5089
|
var P = c;
|
|
5096
|
-
return P.secure =
|
|
5090
|
+
return P.secure = Bn(P), P.resourceName = (P.path || "/") + (P.query ? "?" + P.query : ""), P.path = void 0, P.query = void 0, P;
|
|
5097
5091
|
},
|
|
5098
5092
|
serialize: function(c, m) {
|
|
5099
|
-
if ((c.port === (
|
|
5093
|
+
if ((c.port === (Bn(c) ? 443 : 80) || c.port === "") && (c.port = void 0), typeof c.secure == "boolean" && (c.scheme = c.secure ? "wss" : "ws", c.secure = void 0), c.resourceName) {
|
|
5100
5094
|
var P = c.resourceName.split("?"), b = C(P, 2), L = b[0], H = b[1];
|
|
5101
5095
|
c.path = L && L !== "/" ? L : void 0, c.query = H, c.resourceName = void 0;
|
|
5102
5096
|
}
|
|
5103
5097
|
return c.fragment = void 0, c;
|
|
5104
5098
|
}
|
|
5105
|
-
},
|
|
5099
|
+
}, Gn = {
|
|
5106
5100
|
scheme: "wss",
|
|
5107
5101
|
domainHost: Lt.domainHost,
|
|
5108
5102
|
parse: Lt.parse,
|
|
5109
5103
|
serialize: Lt.serialize
|
|
5110
|
-
},
|
|
5104
|
+
}, Vi = {}, Jn = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", De = "[0-9A-Fa-f]", zi = s(s("%[EFef]" + De + "%" + De + De + "%" + De + De) + "|" + s("%[89A-Fa-f]" + De + "%" + De + De) + "|" + s("%" + De + De)), Wi = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", Ki = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", xi = n(Ki, '[\\"\\\\]'), Bi = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", Gi = new RegExp(Jn, "g"), _t = new RegExp(zi, "g"), Ji = new RegExp(n("[^]", Wi, "[\\.]", '[\\"]', xi), "g"), Yn = new RegExp(n("[^]", Jn, Bi), "g"), Yi = Yn;
|
|
5111
5105
|
function Fr(f) {
|
|
5112
5106
|
var c = G(f);
|
|
5113
|
-
return c.match(
|
|
5107
|
+
return c.match(Gi) ? c : f;
|
|
5114
5108
|
}
|
|
5115
|
-
var
|
|
5109
|
+
var Qn = {
|
|
5116
5110
|
scheme: "mailto",
|
|
5117
5111
|
parse: function(c, m) {
|
|
5118
5112
|
var P = c, b = P.to = P.path ? P.path.split(",") : [];
|
|
@@ -5145,8 +5139,8 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5145
5139
|
else
|
|
5146
5140
|
try {
|
|
5147
5141
|
ie[1] = N.toASCII(Pe(ie[1], m).toLowerCase());
|
|
5148
|
-
} catch (
|
|
5149
|
-
P.error = P.error || "Email address's domain name can not be converted to ASCII via punycode: " +
|
|
5142
|
+
} catch (Ke) {
|
|
5143
|
+
P.error = P.error || "Email address's domain name can not be converted to ASCII via punycode: " + Ke;
|
|
5150
5144
|
}
|
|
5151
5145
|
b[se] = ie.join("@");
|
|
5152
5146
|
}
|
|
@@ -5156,7 +5150,7 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5156
5150
|
var P = c, b = l(c.to);
|
|
5157
5151
|
if (b) {
|
|
5158
5152
|
for (var L = 0, H = b.length; L < H; ++L) {
|
|
5159
|
-
var X = String(b[L]), re = X.lastIndexOf("@"), ce = X.slice(0, re).replace(_t, Fr).replace(_t, o).replace(
|
|
5153
|
+
var X = String(b[L]), re = X.lastIndexOf("@"), ce = X.slice(0, re).replace(_t, Fr).replace(_t, o).replace(Ji, M), J = X.slice(re + 1);
|
|
5160
5154
|
try {
|
|
5161
5155
|
J = m.iri ? N.toUnicode(J) : N.toASCII(Pe(J, m).toLowerCase());
|
|
5162
5156
|
} catch (se) {
|
|
@@ -5170,13 +5164,13 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5170
5164
|
c.subject && (te.subject = c.subject), c.body && (te.body = c.body);
|
|
5171
5165
|
var le = [];
|
|
5172
5166
|
for (var W in te)
|
|
5173
|
-
te[W] !==
|
|
5167
|
+
te[W] !== Vi[W] && le.push(W.replace(_t, Fr).replace(_t, o).replace(Yn, M) + "=" + te[W].replace(_t, Fr).replace(_t, o).replace(Yi, M));
|
|
5174
5168
|
return le.length && (P.query = le.join("&")), P;
|
|
5175
5169
|
}
|
|
5176
|
-
},
|
|
5170
|
+
}, Qi = /^([^\:]+)\:(.*)/, Xn = {
|
|
5177
5171
|
scheme: "urn",
|
|
5178
5172
|
parse: function(c, m) {
|
|
5179
|
-
var P = c.path && c.path.match(
|
|
5173
|
+
var P = c.path && c.path.match(Qi), b = c;
|
|
5180
5174
|
if (P) {
|
|
5181
5175
|
var L = m.scheme || b.scheme || "urn", H = P[1].toLowerCase(), X = P[2], re = L + ":" + (m.nid || H), ce = q[re];
|
|
5182
5176
|
b.nid = H, b.nss = X, b.path = void 0, ce && (b = ce.parse(b, m));
|
|
@@ -5190,32 +5184,32 @@ var pn = {}, Gr = { exports: {} };
|
|
|
5190
5184
|
var X = c, re = c.nss;
|
|
5191
5185
|
return X.path = (b || m.nid) + ":" + re, X;
|
|
5192
5186
|
}
|
|
5193
|
-
},
|
|
5187
|
+
}, Xi = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/, Zn = {
|
|
5194
5188
|
scheme: "urn:uuid",
|
|
5195
5189
|
parse: function(c, m) {
|
|
5196
5190
|
var P = c;
|
|
5197
|
-
return P.uuid = P.nss, P.nss = void 0, !m.tolerant && (!P.uuid || !P.uuid.match(
|
|
5191
|
+
return P.uuid = P.nss, P.nss = void 0, !m.tolerant && (!P.uuid || !P.uuid.match(Xi)) && (P.error = P.error || "UUID is not valid."), P;
|
|
5198
5192
|
},
|
|
5199
5193
|
serialize: function(c, m) {
|
|
5200
5194
|
var P = c;
|
|
5201
5195
|
return P.nss = (c.uuid || "").toLowerCase(), P;
|
|
5202
5196
|
}
|
|
5203
5197
|
};
|
|
5204
|
-
q[et.scheme] = et, q[
|
|
5198
|
+
q[et.scheme] = et, q[xn.scheme] = xn, q[Lt.scheme] = Lt, q[Gn.scheme] = Gn, q[Qn.scheme] = Qn, q[Xn.scheme] = Xn, q[Zn.scheme] = Zn, r.SCHEMES = q, r.pctEncChar = M, r.pctDecChars = G, r.parse = we, r.removeDotSegments = Ae, r.serialize = $e, r.resolveComponents = vt, r.resolve = Mt, r.normalize = Ze, r.equal = Ut, r.escapeComponent = ir, r.unescapeComponent = Pe, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
5205
5199
|
});
|
|
5206
5200
|
})(Gr, Gr.exports);
|
|
5207
|
-
var
|
|
5208
|
-
Object.defineProperty(
|
|
5209
|
-
const
|
|
5210
|
-
|
|
5211
|
-
|
|
5201
|
+
var Qc = Gr.exports;
|
|
5202
|
+
Object.defineProperty(fn, "__esModule", { value: !0 });
|
|
5203
|
+
const Ei = Qc;
|
|
5204
|
+
Ei.code = 'require("ajv/dist/runtime/uri").default';
|
|
5205
|
+
fn.default = Ei;
|
|
5212
5206
|
(function(e) {
|
|
5213
5207
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
5214
5208
|
var t = Ne;
|
|
5215
5209
|
Object.defineProperty(e, "KeywordCxt", { enumerable: !0, get: function() {
|
|
5216
5210
|
return t.KeywordCxt;
|
|
5217
5211
|
} });
|
|
5218
|
-
var r =
|
|
5212
|
+
var r = x;
|
|
5219
5213
|
Object.defineProperty(e, "_", { enumerable: !0, get: function() {
|
|
5220
5214
|
return r._;
|
|
5221
5215
|
} }), Object.defineProperty(e, "str", { enumerable: !0, get: function() {
|
|
@@ -5229,7 +5223,7 @@ pn.default = Si;
|
|
|
5229
5223
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
5230
5224
|
return r.CodeGen;
|
|
5231
5225
|
} });
|
|
5232
|
-
const n = rr, s = nr, i = ut, o = _e, l =
|
|
5226
|
+
const n = rr, s = nr, i = ut, o = _e, l = x, p = he, u = tr, d = Z, g = Yc, C = fn, k = (F, $) => new RegExp(F, $);
|
|
5233
5227
|
k.code = "new RegExp";
|
|
5234
5228
|
const E = ["removeAdditional", "useDefaults", "coerceTypes"], S = /* @__PURE__ */ new Set([
|
|
5235
5229
|
"validate",
|
|
@@ -5648,30 +5642,30 @@ pn.default = Si;
|
|
|
5648
5642
|
function ht(F) {
|
|
5649
5643
|
return { anyOf: [F, It] };
|
|
5650
5644
|
}
|
|
5651
|
-
})(
|
|
5652
|
-
var
|
|
5653
|
-
Object.defineProperty(
|
|
5654
|
-
const
|
|
5645
|
+
})(Zs);
|
|
5646
|
+
var pn = {}, hn = {}, mn = {};
|
|
5647
|
+
Object.defineProperty(mn, "__esModule", { value: !0 });
|
|
5648
|
+
const Xc = {
|
|
5655
5649
|
keyword: "id",
|
|
5656
5650
|
code() {
|
|
5657
5651
|
throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
|
|
5658
5652
|
}
|
|
5659
5653
|
};
|
|
5660
|
-
|
|
5654
|
+
mn.default = Xc;
|
|
5661
5655
|
var dt = {};
|
|
5662
5656
|
Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
5663
5657
|
dt.callRef = dt.getValidate = void 0;
|
|
5664
|
-
const
|
|
5658
|
+
const Zc = nr, Es = K, ve = x, Et = He, Ss = _e, lr = Z, el = {
|
|
5665
5659
|
keyword: "$ref",
|
|
5666
5660
|
schemaType: "string",
|
|
5667
5661
|
code(e) {
|
|
5668
5662
|
const { gen: t, schema: r, it: n } = e, { baseId: s, schemaEnv: i, validateName: o, opts: l, self: p } = n, { root: u } = i;
|
|
5669
5663
|
if ((r === "#" || r === "#/") && s === u.baseId)
|
|
5670
5664
|
return g();
|
|
5671
|
-
const d =
|
|
5665
|
+
const d = Ss.resolveRef.call(p, u, s, r);
|
|
5672
5666
|
if (d === void 0)
|
|
5673
|
-
throw new
|
|
5674
|
-
if (d instanceof
|
|
5667
|
+
throw new Zc.default(n.opts.uriResolver, s, r);
|
|
5668
|
+
if (d instanceof Ss.SchemaEnv)
|
|
5675
5669
|
return C(d);
|
|
5676
5670
|
return k(d);
|
|
5677
5671
|
function g() {
|
|
@@ -5681,7 +5675,7 @@ const el = nr, Ss = x, ve = K, Et = He, Ts = _e, lr = Z, tl = {
|
|
|
5681
5675
|
return gr(e, (0, ve._)`${E}.validate`, u, u.$async);
|
|
5682
5676
|
}
|
|
5683
5677
|
function C(E) {
|
|
5684
|
-
const S =
|
|
5678
|
+
const S = Si(e, E);
|
|
5685
5679
|
gr(e, S, E, E.$async);
|
|
5686
5680
|
}
|
|
5687
5681
|
function k(E) {
|
|
@@ -5696,11 +5690,11 @@ const el = nr, Ss = x, ve = K, Et = He, Ts = _e, lr = Z, tl = {
|
|
|
5696
5690
|
}
|
|
5697
5691
|
}
|
|
5698
5692
|
};
|
|
5699
|
-
function
|
|
5693
|
+
function Si(e, t) {
|
|
5700
5694
|
const { gen: r } = e;
|
|
5701
5695
|
return t.validate ? r.scopeValue("validate", { ref: t.validate }) : (0, ve._)`${r.scopeValue("wrapper", { ref: t })}.validate`;
|
|
5702
5696
|
}
|
|
5703
|
-
dt.getValidate =
|
|
5697
|
+
dt.getValidate = Si;
|
|
5704
5698
|
function gr(e, t, r, n) {
|
|
5705
5699
|
const { gen: s, it: i } = e, { allErrors: o, schemaEnv: l, opts: p } = i, u = p.passContext ? Et.default.this : ve.nil;
|
|
5706
5700
|
n ? d() : g();
|
|
@@ -5709,13 +5703,13 @@ function gr(e, t, r, n) {
|
|
|
5709
5703
|
throw new Error("async schema referenced by sync schema");
|
|
5710
5704
|
const E = s.let("valid");
|
|
5711
5705
|
s.try(() => {
|
|
5712
|
-
s.code((0, ve._)`await ${(0,
|
|
5706
|
+
s.code((0, ve._)`await ${(0, Es.callValidateCode)(e, t, u)}`), k(t), o || s.assign(E, !0);
|
|
5713
5707
|
}, (S) => {
|
|
5714
5708
|
s.if((0, ve._)`!(${S} instanceof ${i.ValidationError})`, () => s.throw(S)), C(S), o || s.assign(E, !1);
|
|
5715
5709
|
}), e.ok(E);
|
|
5716
5710
|
}
|
|
5717
5711
|
function g() {
|
|
5718
|
-
e.result((0,
|
|
5712
|
+
e.result((0, Es.callValidateCode)(e, t, u), () => k(t), () => C(t));
|
|
5719
5713
|
}
|
|
5720
5714
|
function C(E) {
|
|
5721
5715
|
const S = (0, ve._)`${E}.errors`;
|
|
@@ -5743,136 +5737,136 @@ function gr(e, t, r, n) {
|
|
|
5743
5737
|
}
|
|
5744
5738
|
}
|
|
5745
5739
|
dt.callRef = gr;
|
|
5746
|
-
dt.default =
|
|
5747
|
-
Object.defineProperty(
|
|
5748
|
-
const
|
|
5740
|
+
dt.default = el;
|
|
5741
|
+
Object.defineProperty(hn, "__esModule", { value: !0 });
|
|
5742
|
+
const tl = mn, rl = dt, nl = [
|
|
5749
5743
|
"$schema",
|
|
5750
5744
|
"$id",
|
|
5751
5745
|
"$defs",
|
|
5752
5746
|
"$vocabulary",
|
|
5753
5747
|
{ keyword: "$comment" },
|
|
5754
5748
|
"definitions",
|
|
5755
|
-
|
|
5756
|
-
|
|
5749
|
+
tl.default,
|
|
5750
|
+
rl.default
|
|
5757
5751
|
];
|
|
5758
|
-
|
|
5759
|
-
var
|
|
5760
|
-
Object.defineProperty(
|
|
5761
|
-
const Pr =
|
|
5752
|
+
hn.default = nl;
|
|
5753
|
+
var yn = {}, gn = {};
|
|
5754
|
+
Object.defineProperty(gn, "__esModule", { value: !0 });
|
|
5755
|
+
const Pr = x, Ge = Pr.operators, Er = {
|
|
5762
5756
|
maximum: { okStr: "<=", ok: Ge.LTE, fail: Ge.GT },
|
|
5763
5757
|
minimum: { okStr: ">=", ok: Ge.GTE, fail: Ge.LT },
|
|
5764
5758
|
exclusiveMaximum: { okStr: "<", ok: Ge.LT, fail: Ge.GTE },
|
|
5765
5759
|
exclusiveMinimum: { okStr: ">", ok: Ge.GT, fail: Ge.LTE }
|
|
5766
|
-
},
|
|
5760
|
+
}, sl = {
|
|
5767
5761
|
message: ({ keyword: e, schemaCode: t }) => (0, Pr.str)`must be ${Er[e].okStr} ${t}`,
|
|
5768
5762
|
params: ({ keyword: e, schemaCode: t }) => (0, Pr._)`{comparison: ${Er[e].okStr}, limit: ${t}}`
|
|
5769
|
-
},
|
|
5763
|
+
}, il = {
|
|
5770
5764
|
keyword: Object.keys(Er),
|
|
5771
5765
|
type: "number",
|
|
5772
5766
|
schemaType: "number",
|
|
5773
5767
|
$data: !0,
|
|
5774
|
-
error:
|
|
5768
|
+
error: sl,
|
|
5775
5769
|
code(e) {
|
|
5776
5770
|
const { keyword: t, data: r, schemaCode: n } = e;
|
|
5777
5771
|
e.fail$data((0, Pr._)`${r} ${Er[t].fail} ${n} || isNaN(${r})`);
|
|
5778
5772
|
}
|
|
5779
5773
|
};
|
|
5780
|
-
|
|
5781
|
-
var
|
|
5782
|
-
Object.defineProperty(
|
|
5783
|
-
const Gt =
|
|
5774
|
+
gn.default = il;
|
|
5775
|
+
var $n = {};
|
|
5776
|
+
Object.defineProperty($n, "__esModule", { value: !0 });
|
|
5777
|
+
const Gt = x, ol = {
|
|
5784
5778
|
message: ({ schemaCode: e }) => (0, Gt.str)`must be multiple of ${e}`,
|
|
5785
5779
|
params: ({ schemaCode: e }) => (0, Gt._)`{multipleOf: ${e}}`
|
|
5786
|
-
},
|
|
5780
|
+
}, al = {
|
|
5787
5781
|
keyword: "multipleOf",
|
|
5788
5782
|
type: "number",
|
|
5789
5783
|
schemaType: "number",
|
|
5790
5784
|
$data: !0,
|
|
5791
|
-
error:
|
|
5785
|
+
error: ol,
|
|
5792
5786
|
code(e) {
|
|
5793
5787
|
const { gen: t, data: r, schemaCode: n, it: s } = e, i = s.opts.multipleOfPrecision, o = t.let("res"), l = i ? (0, Gt._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}` : (0, Gt._)`${o} !== parseInt(${o})`;
|
|
5794
5788
|
e.fail$data((0, Gt._)`(${n} === 0 || (${o} = ${r}/${n}, ${l}))`);
|
|
5795
5789
|
}
|
|
5796
5790
|
};
|
|
5797
|
-
|
|
5798
|
-
var
|
|
5799
|
-
Object.defineProperty(
|
|
5800
|
-
function
|
|
5791
|
+
$n.default = al;
|
|
5792
|
+
var vn = {}, _n = {};
|
|
5793
|
+
Object.defineProperty(_n, "__esModule", { value: !0 });
|
|
5794
|
+
function Ti(e) {
|
|
5801
5795
|
const t = e.length;
|
|
5802
5796
|
let r = 0, n = 0, s;
|
|
5803
5797
|
for (; n < t; )
|
|
5804
5798
|
r++, s = e.charCodeAt(n++), s >= 55296 && s <= 56319 && n < t && (s = e.charCodeAt(n), (s & 64512) === 56320 && n++);
|
|
5805
5799
|
return r;
|
|
5806
5800
|
}
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
Object.defineProperty(
|
|
5810
|
-
const it =
|
|
5801
|
+
_n.default = Ti;
|
|
5802
|
+
Ti.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
5803
|
+
Object.defineProperty(vn, "__esModule", { value: !0 });
|
|
5804
|
+
const it = x, cl = Z, ll = _n, ul = {
|
|
5811
5805
|
message({ keyword: e, schemaCode: t }) {
|
|
5812
5806
|
const r = e === "maxLength" ? "more" : "fewer";
|
|
5813
5807
|
return (0, it.str)`must NOT have ${r} than ${t} characters`;
|
|
5814
5808
|
},
|
|
5815
5809
|
params: ({ schemaCode: e }) => (0, it._)`{limit: ${e}}`
|
|
5816
|
-
},
|
|
5810
|
+
}, dl = {
|
|
5817
5811
|
keyword: ["maxLength", "minLength"],
|
|
5818
5812
|
type: "string",
|
|
5819
5813
|
schemaType: "number",
|
|
5820
5814
|
$data: !0,
|
|
5821
|
-
error:
|
|
5815
|
+
error: ul,
|
|
5822
5816
|
code(e) {
|
|
5823
|
-
const { keyword: t, data: r, schemaCode: n, it: s } = e, i = t === "maxLength" ? it.operators.GT : it.operators.LT, o = s.opts.unicode === !1 ? (0, it._)`${r}.length` : (0, it._)`${(0,
|
|
5817
|
+
const { keyword: t, data: r, schemaCode: n, it: s } = e, i = t === "maxLength" ? it.operators.GT : it.operators.LT, o = s.opts.unicode === !1 ? (0, it._)`${r}.length` : (0, it._)`${(0, cl.useFunc)(e.gen, ll.default)}(${r})`;
|
|
5824
5818
|
e.fail$data((0, it._)`${o} ${i} ${n}`);
|
|
5825
5819
|
}
|
|
5826
5820
|
};
|
|
5827
|
-
|
|
5828
|
-
var
|
|
5829
|
-
Object.defineProperty(
|
|
5830
|
-
const
|
|
5821
|
+
vn.default = dl;
|
|
5822
|
+
var wn = {};
|
|
5823
|
+
Object.defineProperty(wn, "__esModule", { value: !0 });
|
|
5824
|
+
const fl = K, Sr = x, pl = {
|
|
5831
5825
|
message: ({ schemaCode: e }) => (0, Sr.str)`must match pattern "${e}"`,
|
|
5832
5826
|
params: ({ schemaCode: e }) => (0, Sr._)`{pattern: ${e}}`
|
|
5833
|
-
},
|
|
5827
|
+
}, hl = {
|
|
5834
5828
|
keyword: "pattern",
|
|
5835
5829
|
type: "string",
|
|
5836
5830
|
schemaType: "string",
|
|
5837
5831
|
$data: !0,
|
|
5838
|
-
error:
|
|
5832
|
+
error: pl,
|
|
5839
5833
|
code(e) {
|
|
5840
|
-
const { data: t, $data: r, schema: n, schemaCode: s, it: i } = e, o = i.opts.unicodeRegExp ? "u" : "", l = r ? (0, Sr._)`(new RegExp(${s}, ${o}))` : (0,
|
|
5834
|
+
const { data: t, $data: r, schema: n, schemaCode: s, it: i } = e, o = i.opts.unicodeRegExp ? "u" : "", l = r ? (0, Sr._)`(new RegExp(${s}, ${o}))` : (0, fl.usePattern)(e, n);
|
|
5841
5835
|
e.fail$data((0, Sr._)`!${l}.test(${t})`);
|
|
5842
5836
|
}
|
|
5843
5837
|
};
|
|
5844
|
-
|
|
5845
|
-
var
|
|
5846
|
-
Object.defineProperty(
|
|
5847
|
-
const Jt =
|
|
5838
|
+
wn.default = hl;
|
|
5839
|
+
var bn = {};
|
|
5840
|
+
Object.defineProperty(bn, "__esModule", { value: !0 });
|
|
5841
|
+
const Jt = x, ml = {
|
|
5848
5842
|
message({ keyword: e, schemaCode: t }) {
|
|
5849
5843
|
const r = e === "maxProperties" ? "more" : "fewer";
|
|
5850
5844
|
return (0, Jt.str)`must NOT have ${r} than ${t} properties`;
|
|
5851
5845
|
},
|
|
5852
5846
|
params: ({ schemaCode: e }) => (0, Jt._)`{limit: ${e}}`
|
|
5853
|
-
},
|
|
5847
|
+
}, yl = {
|
|
5854
5848
|
keyword: ["maxProperties", "minProperties"],
|
|
5855
5849
|
type: "object",
|
|
5856
5850
|
schemaType: "number",
|
|
5857
5851
|
$data: !0,
|
|
5858
|
-
error:
|
|
5852
|
+
error: ml,
|
|
5859
5853
|
code(e) {
|
|
5860
5854
|
const { keyword: t, data: r, schemaCode: n } = e, s = t === "maxProperties" ? Jt.operators.GT : Jt.operators.LT;
|
|
5861
5855
|
e.fail$data((0, Jt._)`Object.keys(${r}).length ${s} ${n}`);
|
|
5862
5856
|
}
|
|
5863
5857
|
};
|
|
5864
|
-
|
|
5865
|
-
var
|
|
5866
|
-
Object.defineProperty(
|
|
5867
|
-
const Wt =
|
|
5858
|
+
bn.default = yl;
|
|
5859
|
+
var Pn = {};
|
|
5860
|
+
Object.defineProperty(Pn, "__esModule", { value: !0 });
|
|
5861
|
+
const Wt = K, Yt = x, gl = Z, $l = {
|
|
5868
5862
|
message: ({ params: { missingProperty: e } }) => (0, Yt.str)`must have required property '${e}'`,
|
|
5869
5863
|
params: ({ params: { missingProperty: e } }) => (0, Yt._)`{missingProperty: ${e}}`
|
|
5870
|
-
},
|
|
5864
|
+
}, vl = {
|
|
5871
5865
|
keyword: "required",
|
|
5872
5866
|
type: "object",
|
|
5873
5867
|
schemaType: "array",
|
|
5874
5868
|
$data: !0,
|
|
5875
|
-
error:
|
|
5869
|
+
error: $l,
|
|
5876
5870
|
code(e) {
|
|
5877
5871
|
const { gen: t, schema: r, schemaCode: n, data: s, $data: i, it: o } = e, { opts: l } = o;
|
|
5878
5872
|
if (!i && r.length === 0)
|
|
@@ -5883,7 +5877,7 @@ const Wt = x, Yt = K, $l = Z, vl = {
|
|
|
5883
5877
|
for (const S of r)
|
|
5884
5878
|
if (k?.[S] === void 0 && !E.has(S)) {
|
|
5885
5879
|
const v = o.schemaEnv.baseId + o.errSchemaPath, y = `required property "${S}" is not defined at "${v}" (strictRequired)`;
|
|
5886
|
-
(0,
|
|
5880
|
+
(0, gl.checkStrictMode)(o, y, o.opts.strictRequired);
|
|
5887
5881
|
}
|
|
5888
5882
|
}
|
|
5889
5883
|
function u() {
|
|
@@ -5915,42 +5909,42 @@ const Wt = x, Yt = K, $l = Z, vl = {
|
|
|
5915
5909
|
}
|
|
5916
5910
|
}
|
|
5917
5911
|
};
|
|
5918
|
-
|
|
5919
|
-
var
|
|
5920
|
-
Object.defineProperty(
|
|
5921
|
-
const Qt =
|
|
5912
|
+
Pn.default = vl;
|
|
5913
|
+
var En = {};
|
|
5914
|
+
Object.defineProperty(En, "__esModule", { value: !0 });
|
|
5915
|
+
const Qt = x, _l = {
|
|
5922
5916
|
message({ keyword: e, schemaCode: t }) {
|
|
5923
5917
|
const r = e === "maxItems" ? "more" : "fewer";
|
|
5924
5918
|
return (0, Qt.str)`must NOT have ${r} than ${t} items`;
|
|
5925
5919
|
},
|
|
5926
5920
|
params: ({ schemaCode: e }) => (0, Qt._)`{limit: ${e}}`
|
|
5927
|
-
},
|
|
5921
|
+
}, wl = {
|
|
5928
5922
|
keyword: ["maxItems", "minItems"],
|
|
5929
5923
|
type: "array",
|
|
5930
5924
|
schemaType: "number",
|
|
5931
5925
|
$data: !0,
|
|
5932
|
-
error:
|
|
5926
|
+
error: _l,
|
|
5933
5927
|
code(e) {
|
|
5934
5928
|
const { keyword: t, data: r, schemaCode: n } = e, s = t === "maxItems" ? Qt.operators.GT : Qt.operators.LT;
|
|
5935
5929
|
e.fail$data((0, Qt._)`${r}.length ${s} ${n}`);
|
|
5936
5930
|
}
|
|
5937
5931
|
};
|
|
5938
|
-
|
|
5939
|
-
var
|
|
5932
|
+
En.default = wl;
|
|
5933
|
+
var Sn = {}, sr = {};
|
|
5940
5934
|
Object.defineProperty(sr, "__esModule", { value: !0 });
|
|
5941
|
-
const
|
|
5942
|
-
|
|
5943
|
-
sr.default =
|
|
5944
|
-
Object.defineProperty(
|
|
5945
|
-
const Hr = tr, pe =
|
|
5935
|
+
const Ri = ai;
|
|
5936
|
+
Ri.code = 'require("ajv/dist/runtime/equal").default';
|
|
5937
|
+
sr.default = Ri;
|
|
5938
|
+
Object.defineProperty(Sn, "__esModule", { value: !0 });
|
|
5939
|
+
const Hr = tr, pe = x, bl = Z, Pl = sr, El = {
|
|
5946
5940
|
message: ({ params: { i: e, j: t } }) => (0, pe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,
|
|
5947
5941
|
params: ({ params: { i: e, j: t } }) => (0, pe._)`{i: ${e}, j: ${t}}`
|
|
5948
|
-
},
|
|
5942
|
+
}, Sl = {
|
|
5949
5943
|
keyword: "uniqueItems",
|
|
5950
5944
|
type: "array",
|
|
5951
5945
|
schemaType: "boolean",
|
|
5952
5946
|
$data: !0,
|
|
5953
|
-
error:
|
|
5947
|
+
error: El,
|
|
5954
5948
|
code(e) {
|
|
5955
5949
|
const { gen: t, data: r, $data: n, schema: s, parentSchema: i, schemaCode: o, it: l } = e;
|
|
5956
5950
|
if (!n && !s)
|
|
@@ -5973,46 +5967,46 @@ const Hr = tr, pe = K, Pl = Z, El = sr, Sl = {
|
|
|
5973
5967
|
});
|
|
5974
5968
|
}
|
|
5975
5969
|
function k(E, S) {
|
|
5976
|
-
const v = (0,
|
|
5970
|
+
const v = (0, bl.useFunc)(t, Pl.default), y = t.name("outer");
|
|
5977
5971
|
t.label(y).for((0, pe._)`;${E}--;`, () => t.for((0, pe._)`${S} = ${E}; ${S}--;`, () => t.if((0, pe._)`${v}(${r}[${E}], ${r}[${S}])`, () => {
|
|
5978
5972
|
e.error(), t.assign(p, !1).break(y);
|
|
5979
5973
|
})));
|
|
5980
5974
|
}
|
|
5981
5975
|
}
|
|
5982
5976
|
};
|
|
5983
|
-
|
|
5984
|
-
var
|
|
5985
|
-
Object.defineProperty(
|
|
5986
|
-
const Jr =
|
|
5977
|
+
Sn.default = Sl;
|
|
5978
|
+
var Tn = {};
|
|
5979
|
+
Object.defineProperty(Tn, "__esModule", { value: !0 });
|
|
5980
|
+
const Jr = x, Tl = Z, Rl = sr, Ol = {
|
|
5987
5981
|
message: "must be equal to constant",
|
|
5988
5982
|
params: ({ schemaCode: e }) => (0, Jr._)`{allowedValue: ${e}}`
|
|
5989
|
-
},
|
|
5983
|
+
}, Nl = {
|
|
5990
5984
|
keyword: "const",
|
|
5991
5985
|
$data: !0,
|
|
5992
|
-
error:
|
|
5986
|
+
error: Ol,
|
|
5993
5987
|
code(e) {
|
|
5994
5988
|
const { gen: t, data: r, $data: n, schemaCode: s, schema: i } = e;
|
|
5995
|
-
n || i && typeof i == "object" ? e.fail$data((0, Jr._)`!${(0,
|
|
5989
|
+
n || i && typeof i == "object" ? e.fail$data((0, Jr._)`!${(0, Tl.useFunc)(t, Rl.default)}(${r}, ${s})`) : e.fail((0, Jr._)`${i} !== ${r}`);
|
|
5996
5990
|
}
|
|
5997
5991
|
};
|
|
5998
|
-
|
|
5999
|
-
var
|
|
6000
|
-
Object.defineProperty(
|
|
6001
|
-
const
|
|
5992
|
+
Tn.default = Nl;
|
|
5993
|
+
var Rn = {};
|
|
5994
|
+
Object.defineProperty(Rn, "__esModule", { value: !0 });
|
|
5995
|
+
const Kt = x, Cl = Z, kl = sr, jl = {
|
|
6002
5996
|
message: "must be equal to one of the allowed values",
|
|
6003
|
-
params: ({ schemaCode: e }) => (0,
|
|
6004
|
-
},
|
|
5997
|
+
params: ({ schemaCode: e }) => (0, Kt._)`{allowedValues: ${e}}`
|
|
5998
|
+
}, Il = {
|
|
6005
5999
|
keyword: "enum",
|
|
6006
6000
|
schemaType: "array",
|
|
6007
6001
|
$data: !0,
|
|
6008
|
-
error:
|
|
6002
|
+
error: jl,
|
|
6009
6003
|
code(e) {
|
|
6010
6004
|
const { gen: t, data: r, $data: n, schema: s, schemaCode: i, it: o } = e;
|
|
6011
6005
|
if (!n && s.length === 0)
|
|
6012
6006
|
throw new Error("enum must have non-empty array");
|
|
6013
6007
|
const l = s.length >= o.opts.loopEnum;
|
|
6014
6008
|
let p;
|
|
6015
|
-
const u = () => p ?? (p = (0,
|
|
6009
|
+
const u = () => p ?? (p = (0, Cl.useFunc)(t, kl.default));
|
|
6016
6010
|
let d;
|
|
6017
6011
|
if (l || n)
|
|
6018
6012
|
d = t.let("valid"), e.block$data(d, g);
|
|
@@ -6020,47 +6014,47 @@ const xt = K, kl = Z, jl = sr, Il = {
|
|
|
6020
6014
|
if (!Array.isArray(s))
|
|
6021
6015
|
throw new Error("ajv implementation error");
|
|
6022
6016
|
const k = t.const("vSchema", i);
|
|
6023
|
-
d = (0,
|
|
6017
|
+
d = (0, Kt.or)(...s.map((E, S) => C(k, S)));
|
|
6024
6018
|
}
|
|
6025
6019
|
e.pass(d);
|
|
6026
6020
|
function g() {
|
|
6027
|
-
t.assign(d, !1), t.forOf("v", i, (k) => t.if((0,
|
|
6021
|
+
t.assign(d, !1), t.forOf("v", i, (k) => t.if((0, Kt._)`${u()}(${r}, ${k})`, () => t.assign(d, !0).break()));
|
|
6028
6022
|
}
|
|
6029
6023
|
function C(k, E) {
|
|
6030
6024
|
const S = s[E];
|
|
6031
|
-
return typeof S == "object" && S !== null ? (0,
|
|
6025
|
+
return typeof S == "object" && S !== null ? (0, Kt._)`${u()}(${r}, ${k}[${E}])` : (0, Kt._)`${r} === ${S}`;
|
|
6032
6026
|
}
|
|
6033
6027
|
}
|
|
6034
6028
|
};
|
|
6035
|
-
|
|
6036
|
-
Object.defineProperty(
|
|
6037
|
-
const Dl = $n, Fl = vn, ql =
|
|
6029
|
+
Rn.default = Il;
|
|
6030
|
+
Object.defineProperty(yn, "__esModule", { value: !0 });
|
|
6031
|
+
const Al = gn, Dl = $n, Fl = vn, ql = wn, Ml = bn, Ul = Pn, Ll = En, Hl = Sn, Vl = Tn, zl = Rn, Wl = [
|
|
6038
6032
|
// number
|
|
6033
|
+
Al.default,
|
|
6039
6034
|
Dl.default,
|
|
6040
|
-
Fl.default,
|
|
6041
6035
|
// string
|
|
6036
|
+
Fl.default,
|
|
6042
6037
|
ql.default,
|
|
6043
|
-
Ml.default,
|
|
6044
6038
|
// object
|
|
6039
|
+
Ml.default,
|
|
6045
6040
|
Ul.default,
|
|
6046
|
-
Ll.default,
|
|
6047
6041
|
// array
|
|
6042
|
+
Ll.default,
|
|
6048
6043
|
Hl.default,
|
|
6049
|
-
Vl.default,
|
|
6050
6044
|
// any
|
|
6051
6045
|
{ keyword: "type", schemaType: ["string", "array"] },
|
|
6052
6046
|
{ keyword: "nullable", schemaType: "boolean" },
|
|
6053
|
-
|
|
6054
|
-
|
|
6047
|
+
Vl.default,
|
|
6048
|
+
zl.default
|
|
6055
6049
|
];
|
|
6056
|
-
|
|
6057
|
-
var
|
|
6050
|
+
yn.default = Wl;
|
|
6051
|
+
var On = {}, kt = {};
|
|
6058
6052
|
Object.defineProperty(kt, "__esModule", { value: !0 });
|
|
6059
6053
|
kt.validateAdditionalItems = void 0;
|
|
6060
|
-
const ot =
|
|
6054
|
+
const ot = x, Yr = Z, Kl = {
|
|
6061
6055
|
message: ({ params: { len: e } }) => (0, ot.str)`must NOT have more than ${e} items`,
|
|
6062
6056
|
params: ({ params: { len: e } }) => (0, ot._)`{limit: ${e}}`
|
|
6063
|
-
},
|
|
6057
|
+
}, xl = {
|
|
6064
6058
|
keyword: "additionalItems",
|
|
6065
6059
|
type: "array",
|
|
6066
6060
|
schemaType: ["boolean", "object"],
|
|
@@ -6072,10 +6066,10 @@ const ot = K, Yr = Z, Kl = {
|
|
|
6072
6066
|
(0, Yr.checkStrictMode)(r, '"additionalItems" is ignored when "items" is not an array of schemas');
|
|
6073
6067
|
return;
|
|
6074
6068
|
}
|
|
6075
|
-
|
|
6069
|
+
Oi(e, n);
|
|
6076
6070
|
}
|
|
6077
6071
|
};
|
|
6078
|
-
function
|
|
6072
|
+
function Oi(e, t) {
|
|
6079
6073
|
const { gen: r, schema: n, data: s, keyword: i, it: o } = e;
|
|
6080
6074
|
o.items = !0;
|
|
6081
6075
|
const l = r.const("len", (0, ot._)`${s}.length`);
|
|
@@ -6091,12 +6085,12 @@ function Ni(e, t) {
|
|
|
6091
6085
|
});
|
|
6092
6086
|
}
|
|
6093
6087
|
}
|
|
6094
|
-
kt.validateAdditionalItems =
|
|
6095
|
-
kt.default =
|
|
6096
|
-
var
|
|
6088
|
+
kt.validateAdditionalItems = Oi;
|
|
6089
|
+
kt.default = xl;
|
|
6090
|
+
var Nn = {}, jt = {};
|
|
6097
6091
|
Object.defineProperty(jt, "__esModule", { value: !0 });
|
|
6098
6092
|
jt.validateTuple = void 0;
|
|
6099
|
-
const
|
|
6093
|
+
const Ts = x, $r = Z, Bl = K, Gl = {
|
|
6100
6094
|
keyword: "items",
|
|
6101
6095
|
type: "array",
|
|
6102
6096
|
schemaType: ["object", "array", "boolean"],
|
|
@@ -6104,16 +6098,16 @@ const Rs = K, $r = Z, Gl = x, Jl = {
|
|
|
6104
6098
|
code(e) {
|
|
6105
6099
|
const { schema: t, it: r } = e;
|
|
6106
6100
|
if (Array.isArray(t))
|
|
6107
|
-
return
|
|
6108
|
-
r.items = !0, !(0, $r.alwaysValidSchema)(r, t) && e.ok((0,
|
|
6101
|
+
return Ni(e, "additionalItems", t);
|
|
6102
|
+
r.items = !0, !(0, $r.alwaysValidSchema)(r, t) && e.ok((0, Bl.validateArray)(e));
|
|
6109
6103
|
}
|
|
6110
6104
|
};
|
|
6111
|
-
function
|
|
6105
|
+
function Ni(e, t, r = e.schema) {
|
|
6112
6106
|
const { gen: n, parentSchema: s, data: i, keyword: o, it: l } = e;
|
|
6113
6107
|
d(s), l.opts.unevaluated && r.length && l.items !== !0 && (l.items = $r.mergeEvaluated.items(n, r.length, l.items));
|
|
6114
|
-
const p = n.name("valid"), u = n.const("len", (0,
|
|
6108
|
+
const p = n.name("valid"), u = n.const("len", (0, Ts._)`${i}.length`);
|
|
6115
6109
|
r.forEach((g, C) => {
|
|
6116
|
-
(0, $r.alwaysValidSchema)(l, g) || (n.if((0,
|
|
6110
|
+
(0, $r.alwaysValidSchema)(l, g) || (n.if((0, Ts._)`${u} > ${C}`, () => e.subschema({
|
|
6117
6111
|
keyword: o,
|
|
6118
6112
|
schemaProp: C,
|
|
6119
6113
|
dataProp: C
|
|
@@ -6127,46 +6121,46 @@ function Ci(e, t, r = e.schema) {
|
|
|
6127
6121
|
}
|
|
6128
6122
|
}
|
|
6129
6123
|
}
|
|
6130
|
-
jt.validateTuple =
|
|
6131
|
-
jt.default =
|
|
6132
|
-
Object.defineProperty(
|
|
6133
|
-
const
|
|
6124
|
+
jt.validateTuple = Ni;
|
|
6125
|
+
jt.default = Gl;
|
|
6126
|
+
Object.defineProperty(Nn, "__esModule", { value: !0 });
|
|
6127
|
+
const Jl = jt, Yl = {
|
|
6134
6128
|
keyword: "prefixItems",
|
|
6135
6129
|
type: "array",
|
|
6136
6130
|
schemaType: ["array"],
|
|
6137
6131
|
before: "uniqueItems",
|
|
6138
|
-
code: (e) => (0,
|
|
6132
|
+
code: (e) => (0, Jl.validateTuple)(e, "items")
|
|
6139
6133
|
};
|
|
6140
|
-
|
|
6141
|
-
var
|
|
6142
|
-
Object.defineProperty(
|
|
6143
|
-
const
|
|
6144
|
-
message: ({ params: { len: e } }) => (0,
|
|
6145
|
-
params: ({ params: { len: e } }) => (0,
|
|
6146
|
-
},
|
|
6134
|
+
Nn.default = Yl;
|
|
6135
|
+
var Cn = {};
|
|
6136
|
+
Object.defineProperty(Cn, "__esModule", { value: !0 });
|
|
6137
|
+
const Rs = x, Ql = Z, Xl = K, Zl = kt, eu = {
|
|
6138
|
+
message: ({ params: { len: e } }) => (0, Rs.str)`must NOT have more than ${e} items`,
|
|
6139
|
+
params: ({ params: { len: e } }) => (0, Rs._)`{limit: ${e}}`
|
|
6140
|
+
}, tu = {
|
|
6147
6141
|
keyword: "items",
|
|
6148
6142
|
type: "array",
|
|
6149
6143
|
schemaType: ["object", "boolean"],
|
|
6150
6144
|
before: "uniqueItems",
|
|
6151
|
-
error:
|
|
6145
|
+
error: eu,
|
|
6152
6146
|
code(e) {
|
|
6153
6147
|
const { schema: t, parentSchema: r, it: n } = e, { prefixItems: s } = r;
|
|
6154
|
-
n.items = !0, !(0,
|
|
6148
|
+
n.items = !0, !(0, Ql.alwaysValidSchema)(n, t) && (s ? (0, Zl.validateAdditionalItems)(e, s) : e.ok((0, Xl.validateArray)(e)));
|
|
6155
6149
|
}
|
|
6156
6150
|
};
|
|
6157
|
-
|
|
6158
|
-
var
|
|
6159
|
-
Object.defineProperty(
|
|
6160
|
-
const Se =
|
|
6151
|
+
Cn.default = tu;
|
|
6152
|
+
var kn = {};
|
|
6153
|
+
Object.defineProperty(kn, "__esModule", { value: !0 });
|
|
6154
|
+
const Se = x, ur = Z, ru = {
|
|
6161
6155
|
message: ({ params: { min: e, max: t } }) => t === void 0 ? (0, Se.str)`must contain at least ${e} valid item(s)` : (0, Se.str)`must contain at least ${e} and no more than ${t} valid item(s)`,
|
|
6162
6156
|
params: ({ params: { min: e, max: t } }) => t === void 0 ? (0, Se._)`{minContains: ${e}}` : (0, Se._)`{minContains: ${e}, maxContains: ${t}}`
|
|
6163
|
-
},
|
|
6157
|
+
}, nu = {
|
|
6164
6158
|
keyword: "contains",
|
|
6165
6159
|
type: "array",
|
|
6166
6160
|
schemaType: ["object", "boolean"],
|
|
6167
6161
|
before: "uniqueItems",
|
|
6168
6162
|
trackErrors: !0,
|
|
6169
|
-
error:
|
|
6163
|
+
error: ru,
|
|
6170
6164
|
code(e) {
|
|
6171
6165
|
const { gen: t, schema: r, parentSchema: n, data: s, it: i } = e;
|
|
6172
6166
|
let o, l;
|
|
@@ -6208,11 +6202,11 @@ const Se = K, ur = Z, nu = {
|
|
|
6208
6202
|
}
|
|
6209
6203
|
}
|
|
6210
6204
|
};
|
|
6211
|
-
|
|
6212
|
-
var
|
|
6205
|
+
kn.default = nu;
|
|
6206
|
+
var Ci = {};
|
|
6213
6207
|
(function(e) {
|
|
6214
6208
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
6215
|
-
const t =
|
|
6209
|
+
const t = x, r = Z, n = K;
|
|
6216
6210
|
e.error = {
|
|
6217
6211
|
message: ({ params: { property: p, depsCount: u, deps: d } }) => {
|
|
6218
6212
|
const g = u === 1 ? "property" : "properties";
|
|
@@ -6279,20 +6273,20 @@ var ki = {};
|
|
|
6279
6273
|
), p.ok(E));
|
|
6280
6274
|
}
|
|
6281
6275
|
e.validateSchemaDeps = l, e.default = s;
|
|
6282
|
-
})(
|
|
6283
|
-
var
|
|
6284
|
-
Object.defineProperty(
|
|
6285
|
-
const
|
|
6276
|
+
})(Ci);
|
|
6277
|
+
var jn = {};
|
|
6278
|
+
Object.defineProperty(jn, "__esModule", { value: !0 });
|
|
6279
|
+
const ki = x, su = Z, iu = {
|
|
6286
6280
|
message: "property name must be valid",
|
|
6287
|
-
params: ({ params: e }) => (0,
|
|
6288
|
-
},
|
|
6281
|
+
params: ({ params: e }) => (0, ki._)`{propertyName: ${e.propertyName}}`
|
|
6282
|
+
}, ou = {
|
|
6289
6283
|
keyword: "propertyNames",
|
|
6290
6284
|
type: "object",
|
|
6291
6285
|
schemaType: ["object", "boolean"],
|
|
6292
|
-
error:
|
|
6286
|
+
error: iu,
|
|
6293
6287
|
code(e) {
|
|
6294
6288
|
const { gen: t, schema: r, data: n, it: s } = e;
|
|
6295
|
-
if ((0,
|
|
6289
|
+
if ((0, su.alwaysValidSchema)(s, r))
|
|
6296
6290
|
return;
|
|
6297
6291
|
const i = t.name("valid");
|
|
6298
6292
|
t.forIn("key", n, (o) => {
|
|
@@ -6302,25 +6296,25 @@ const ji = K, iu = Z, ou = {
|
|
|
6302
6296
|
dataTypes: ["string"],
|
|
6303
6297
|
propertyName: o,
|
|
6304
6298
|
compositeRule: !0
|
|
6305
|
-
}, i), t.if((0,
|
|
6299
|
+
}, i), t.if((0, ki.not)(i), () => {
|
|
6306
6300
|
e.error(!0), s.allErrors || t.break();
|
|
6307
6301
|
});
|
|
6308
6302
|
}), e.ok(i);
|
|
6309
6303
|
}
|
|
6310
6304
|
};
|
|
6311
|
-
|
|
6305
|
+
jn.default = ou;
|
|
6312
6306
|
var Dr = {};
|
|
6313
6307
|
Object.defineProperty(Dr, "__esModule", { value: !0 });
|
|
6314
|
-
const dr =
|
|
6308
|
+
const dr = K, Re = x, au = He, fr = Z, cu = {
|
|
6315
6309
|
message: "must NOT have additional properties",
|
|
6316
6310
|
params: ({ params: e }) => (0, Re._)`{additionalProperty: ${e.additionalProperty}}`
|
|
6317
|
-
},
|
|
6311
|
+
}, lu = {
|
|
6318
6312
|
keyword: "additionalProperties",
|
|
6319
6313
|
type: ["object"],
|
|
6320
6314
|
schemaType: ["boolean", "object"],
|
|
6321
6315
|
allowUndefined: !0,
|
|
6322
6316
|
trackErrors: !0,
|
|
6323
|
-
error:
|
|
6317
|
+
error: cu,
|
|
6324
6318
|
code(e) {
|
|
6325
6319
|
const { gen: t, schema: r, parentSchema: n, data: s, errsCount: i, it: o } = e;
|
|
6326
6320
|
if (!i)
|
|
@@ -6329,7 +6323,7 @@ const dr = x, Re = K, cu = He, fr = Z, lu = {
|
|
|
6329
6323
|
if (o.props = !0, p.removeAdditional !== "all" && (0, fr.alwaysValidSchema)(o, r))
|
|
6330
6324
|
return;
|
|
6331
6325
|
const u = (0, dr.allSchemaProperties)(n.properties), d = (0, dr.allSchemaProperties)(n.patternProperties);
|
|
6332
|
-
g(), e.ok((0, Re._)`${i} === ${
|
|
6326
|
+
g(), e.ok((0, Re._)`${i} === ${au.default.errors}`);
|
|
6333
6327
|
function g() {
|
|
6334
6328
|
t.forIn("key", s, (v) => {
|
|
6335
6329
|
!u.length && !d.length ? E(v) : t.if(C(v), () => E(v));
|
|
@@ -6377,17 +6371,17 @@ const dr = x, Re = K, cu = He, fr = Z, lu = {
|
|
|
6377
6371
|
}
|
|
6378
6372
|
}
|
|
6379
6373
|
};
|
|
6380
|
-
Dr.default =
|
|
6381
|
-
var
|
|
6382
|
-
Object.defineProperty(
|
|
6383
|
-
const
|
|
6374
|
+
Dr.default = lu;
|
|
6375
|
+
var In = {};
|
|
6376
|
+
Object.defineProperty(In, "__esModule", { value: !0 });
|
|
6377
|
+
const uu = Ne, Os = K, Vr = Z, Ns = Dr, du = {
|
|
6384
6378
|
keyword: "properties",
|
|
6385
6379
|
type: "object",
|
|
6386
6380
|
schemaType: "object",
|
|
6387
6381
|
code(e) {
|
|
6388
6382
|
const { gen: t, schema: r, parentSchema: n, data: s, it: i } = e;
|
|
6389
|
-
i.opts.removeAdditional === "all" && n.additionalProperties === void 0 &&
|
|
6390
|
-
const o = (0,
|
|
6383
|
+
i.opts.removeAdditional === "all" && n.additionalProperties === void 0 && Ns.default.code(new uu.KeywordCxt(i, Ns.default, "additionalProperties"));
|
|
6384
|
+
const o = (0, Os.allSchemaProperties)(r);
|
|
6391
6385
|
for (const g of o)
|
|
6392
6386
|
i.definedProperties.add(g);
|
|
6393
6387
|
i.opts.unevaluated && o.length && i.props !== !0 && (i.props = Vr.mergeEvaluated.props(t, (0, Vr.toHash)(o), i.props));
|
|
@@ -6396,7 +6390,7 @@ const du = Ne, Ns = x, Vr = Z, Cs = Dr, fu = {
|
|
|
6396
6390
|
return;
|
|
6397
6391
|
const p = t.name("valid");
|
|
6398
6392
|
for (const g of l)
|
|
6399
|
-
u(g) ? d(g) : (t.if((0,
|
|
6393
|
+
u(g) ? d(g) : (t.if((0, Os.propertyInData)(t, s, g, i.opts.ownProperties)), d(g), i.allErrors || t.else().var(p, !0), t.endIf()), e.it.definedProperties.add(g), e.ok(p);
|
|
6400
6394
|
function u(g) {
|
|
6401
6395
|
return i.opts.useDefaults && !i.compositeRule && r[g].default !== void 0;
|
|
6402
6396
|
}
|
|
@@ -6409,19 +6403,19 @@ const du = Ne, Ns = x, Vr = Z, Cs = Dr, fu = {
|
|
|
6409
6403
|
}
|
|
6410
6404
|
}
|
|
6411
6405
|
};
|
|
6412
|
-
|
|
6413
|
-
var
|
|
6414
|
-
Object.defineProperty(
|
|
6415
|
-
const
|
|
6406
|
+
In.default = du;
|
|
6407
|
+
var An = {};
|
|
6408
|
+
Object.defineProperty(An, "__esModule", { value: !0 });
|
|
6409
|
+
const Cs = K, pr = x, ks = Z, js = Z, fu = {
|
|
6416
6410
|
keyword: "patternProperties",
|
|
6417
6411
|
type: "object",
|
|
6418
6412
|
schemaType: "object",
|
|
6419
6413
|
code(e) {
|
|
6420
|
-
const { gen: t, schema: r, data: n, parentSchema: s, it: i } = e, { opts: o } = i, l = (0,
|
|
6414
|
+
const { gen: t, schema: r, data: n, parentSchema: s, it: i } = e, { opts: o } = i, l = (0, Cs.allSchemaProperties)(r), p = l.filter((S) => (0, ks.alwaysValidSchema)(i, r[S]));
|
|
6421
6415
|
if (l.length === 0 || p.length === l.length && (!i.opts.unevaluated || i.props === !0))
|
|
6422
6416
|
return;
|
|
6423
6417
|
const u = o.strictSchema && !o.allowMatchingProperties && s.properties, d = t.name("valid");
|
|
6424
|
-
i.props !== !0 && !(i.props instanceof pr.Name) && (i.props = (0,
|
|
6418
|
+
i.props !== !0 && !(i.props instanceof pr.Name) && (i.props = (0, js.evaluatedPropsToName)(t, i.props));
|
|
6425
6419
|
const { props: g } = i;
|
|
6426
6420
|
C();
|
|
6427
6421
|
function C() {
|
|
@@ -6430,33 +6424,33 @@ const ks = x, pr = K, js = Z, Is = Z, pu = {
|
|
|
6430
6424
|
}
|
|
6431
6425
|
function k(S) {
|
|
6432
6426
|
for (const v in u)
|
|
6433
|
-
new RegExp(S).test(v) && (0,
|
|
6427
|
+
new RegExp(S).test(v) && (0, ks.checkStrictMode)(i, `property ${v} matches pattern ${S} (use allowMatchingProperties)`);
|
|
6434
6428
|
}
|
|
6435
6429
|
function E(S) {
|
|
6436
6430
|
t.forIn("key", n, (v) => {
|
|
6437
|
-
t.if((0, pr._)`${(0,
|
|
6431
|
+
t.if((0, pr._)`${(0, Cs.usePattern)(e, S)}.test(${v})`, () => {
|
|
6438
6432
|
const y = p.includes(S);
|
|
6439
6433
|
y || e.subschema({
|
|
6440
6434
|
keyword: "patternProperties",
|
|
6441
6435
|
schemaProp: S,
|
|
6442
6436
|
dataProp: v,
|
|
6443
|
-
dataPropType:
|
|
6437
|
+
dataPropType: js.Type.Str
|
|
6444
6438
|
}, d), i.opts.unevaluated && g !== !0 ? t.assign((0, pr._)`${g}[${v}]`, !0) : !y && !i.allErrors && t.if((0, pr.not)(d), () => t.break());
|
|
6445
6439
|
});
|
|
6446
6440
|
});
|
|
6447
6441
|
}
|
|
6448
6442
|
}
|
|
6449
6443
|
};
|
|
6450
|
-
|
|
6451
|
-
var
|
|
6452
|
-
Object.defineProperty(
|
|
6453
|
-
const
|
|
6444
|
+
An.default = fu;
|
|
6445
|
+
var Dn = {};
|
|
6446
|
+
Object.defineProperty(Dn, "__esModule", { value: !0 });
|
|
6447
|
+
const pu = Z, hu = {
|
|
6454
6448
|
keyword: "not",
|
|
6455
6449
|
schemaType: ["object", "boolean"],
|
|
6456
6450
|
trackErrors: !0,
|
|
6457
6451
|
code(e) {
|
|
6458
6452
|
const { gen: t, schema: r, it: n } = e;
|
|
6459
|
-
if ((0,
|
|
6453
|
+
if ((0, pu.alwaysValidSchema)(n, r)) {
|
|
6460
6454
|
e.fail();
|
|
6461
6455
|
return;
|
|
6462
6456
|
}
|
|
@@ -6470,27 +6464,27 @@ const hu = Z, mu = {
|
|
|
6470
6464
|
},
|
|
6471
6465
|
error: { message: "must NOT be valid" }
|
|
6472
6466
|
};
|
|
6473
|
-
|
|
6474
|
-
var
|
|
6475
|
-
Object.defineProperty(
|
|
6476
|
-
const
|
|
6467
|
+
Dn.default = hu;
|
|
6468
|
+
var Fn = {};
|
|
6469
|
+
Object.defineProperty(Fn, "__esModule", { value: !0 });
|
|
6470
|
+
const mu = K, yu = {
|
|
6477
6471
|
keyword: "anyOf",
|
|
6478
6472
|
schemaType: "array",
|
|
6479
6473
|
trackErrors: !0,
|
|
6480
|
-
code:
|
|
6474
|
+
code: mu.validateUnion,
|
|
6481
6475
|
error: { message: "must match a schema in anyOf" }
|
|
6482
6476
|
};
|
|
6483
|
-
|
|
6484
|
-
var
|
|
6485
|
-
Object.defineProperty(
|
|
6486
|
-
const vr =
|
|
6477
|
+
Fn.default = yu;
|
|
6478
|
+
var qn = {};
|
|
6479
|
+
Object.defineProperty(qn, "__esModule", { value: !0 });
|
|
6480
|
+
const vr = x, gu = Z, $u = {
|
|
6487
6481
|
message: "must match exactly one schema in oneOf",
|
|
6488
6482
|
params: ({ params: e }) => (0, vr._)`{passingSchemas: ${e.passing}}`
|
|
6489
|
-
},
|
|
6483
|
+
}, vu = {
|
|
6490
6484
|
keyword: "oneOf",
|
|
6491
6485
|
schemaType: "array",
|
|
6492
6486
|
trackErrors: !0,
|
|
6493
|
-
error:
|
|
6487
|
+
error: $u,
|
|
6494
6488
|
code(e) {
|
|
6495
6489
|
const { gen: t, schema: r, parentSchema: n, it: s } = e;
|
|
6496
6490
|
if (!Array.isArray(r))
|
|
@@ -6502,7 +6496,7 @@ const vr = K, $u = Z, vu = {
|
|
|
6502
6496
|
function u() {
|
|
6503
6497
|
i.forEach((d, g) => {
|
|
6504
6498
|
let C;
|
|
6505
|
-
(0,
|
|
6499
|
+
(0, gu.alwaysValidSchema)(s, d) ? t.var(p, !0) : C = e.subschema({
|
|
6506
6500
|
keyword: "oneOf",
|
|
6507
6501
|
schemaProp: g,
|
|
6508
6502
|
compositeRule: !0
|
|
@@ -6513,10 +6507,10 @@ const vr = K, $u = Z, vu = {
|
|
|
6513
6507
|
}
|
|
6514
6508
|
}
|
|
6515
6509
|
};
|
|
6516
|
-
|
|
6517
|
-
var
|
|
6518
|
-
Object.defineProperty(
|
|
6519
|
-
const
|
|
6510
|
+
qn.default = vu;
|
|
6511
|
+
var Mn = {};
|
|
6512
|
+
Object.defineProperty(Mn, "__esModule", { value: !0 });
|
|
6513
|
+
const _u = Z, wu = {
|
|
6520
6514
|
keyword: "allOf",
|
|
6521
6515
|
schemaType: "array",
|
|
6522
6516
|
code(e) {
|
|
@@ -6525,28 +6519,28 @@ const wu = Z, bu = {
|
|
|
6525
6519
|
throw new Error("ajv implementation error");
|
|
6526
6520
|
const s = t.name("valid");
|
|
6527
6521
|
r.forEach((i, o) => {
|
|
6528
|
-
if ((0,
|
|
6522
|
+
if ((0, _u.alwaysValidSchema)(n, i))
|
|
6529
6523
|
return;
|
|
6530
6524
|
const l = e.subschema({ keyword: "allOf", schemaProp: o }, s);
|
|
6531
6525
|
e.ok(s), e.mergeEvaluated(l);
|
|
6532
6526
|
});
|
|
6533
6527
|
}
|
|
6534
6528
|
};
|
|
6535
|
-
|
|
6536
|
-
var
|
|
6537
|
-
Object.defineProperty(
|
|
6538
|
-
const Tr =
|
|
6529
|
+
Mn.default = wu;
|
|
6530
|
+
var Un = {};
|
|
6531
|
+
Object.defineProperty(Un, "__esModule", { value: !0 });
|
|
6532
|
+
const Tr = x, ji = Z, bu = {
|
|
6539
6533
|
message: ({ params: e }) => (0, Tr.str)`must match "${e.ifClause}" schema`,
|
|
6540
6534
|
params: ({ params: e }) => (0, Tr._)`{failingKeyword: ${e.ifClause}}`
|
|
6541
|
-
},
|
|
6535
|
+
}, Pu = {
|
|
6542
6536
|
keyword: "if",
|
|
6543
6537
|
schemaType: ["object", "boolean"],
|
|
6544
6538
|
trackErrors: !0,
|
|
6545
|
-
error:
|
|
6539
|
+
error: bu,
|
|
6546
6540
|
code(e) {
|
|
6547
6541
|
const { gen: t, parentSchema: r, it: n } = e;
|
|
6548
|
-
r.then === void 0 && r.else === void 0 && (0,
|
|
6549
|
-
const s =
|
|
6542
|
+
r.then === void 0 && r.else === void 0 && (0, ji.checkStrictMode)(n, '"if" without "then" and "else" is ignored');
|
|
6543
|
+
const s = Is(n, "then"), i = Is(n, "else");
|
|
6550
6544
|
if (!s && !i)
|
|
6551
6545
|
return;
|
|
6552
6546
|
const o = t.let("valid", !0), l = t.name("_valid");
|
|
@@ -6573,53 +6567,53 @@ const Tr = K, Ii = Z, Pu = {
|
|
|
6573
6567
|
}
|
|
6574
6568
|
}
|
|
6575
6569
|
};
|
|
6576
|
-
function
|
|
6570
|
+
function Is(e, t) {
|
|
6577
6571
|
const r = e.schema[t];
|
|
6578
|
-
return r !== void 0 && !(0,
|
|
6572
|
+
return r !== void 0 && !(0, ji.alwaysValidSchema)(e, r);
|
|
6579
6573
|
}
|
|
6580
|
-
|
|
6581
|
-
var
|
|
6582
|
-
Object.defineProperty(
|
|
6583
|
-
const
|
|
6574
|
+
Un.default = Pu;
|
|
6575
|
+
var Ln = {};
|
|
6576
|
+
Object.defineProperty(Ln, "__esModule", { value: !0 });
|
|
6577
|
+
const Eu = Z, Su = {
|
|
6584
6578
|
keyword: ["then", "else"],
|
|
6585
6579
|
schemaType: ["object", "boolean"],
|
|
6586
6580
|
code({ keyword: e, parentSchema: t, it: r }) {
|
|
6587
|
-
t.if === void 0 && (0,
|
|
6581
|
+
t.if === void 0 && (0, Eu.checkStrictMode)(r, `"${e}" without "if" is ignored`);
|
|
6588
6582
|
}
|
|
6589
6583
|
};
|
|
6590
|
-
|
|
6591
|
-
Object.defineProperty(
|
|
6592
|
-
const
|
|
6593
|
-
function
|
|
6584
|
+
Ln.default = Su;
|
|
6585
|
+
Object.defineProperty(On, "__esModule", { value: !0 });
|
|
6586
|
+
const Tu = kt, Ru = Nn, Ou = jt, Nu = Cn, Cu = kn, ku = Ci, ju = jn, Iu = Dr, Au = In, Du = An, Fu = Dn, qu = Fn, Mu = qn, Uu = Mn, Lu = Un, Hu = Ln;
|
|
6587
|
+
function Vu(e = !1) {
|
|
6594
6588
|
const t = [
|
|
6595
6589
|
// any
|
|
6590
|
+
Fu.default,
|
|
6596
6591
|
qu.default,
|
|
6597
6592
|
Mu.default,
|
|
6598
6593
|
Uu.default,
|
|
6599
6594
|
Lu.default,
|
|
6600
6595
|
Hu.default,
|
|
6601
|
-
Vu.default,
|
|
6602
6596
|
// object
|
|
6597
|
+
ju.default,
|
|
6603
6598
|
Iu.default,
|
|
6599
|
+
ku.default,
|
|
6604
6600
|
Au.default,
|
|
6605
|
-
|
|
6606
|
-
Du.default,
|
|
6607
|
-
Fu.default
|
|
6601
|
+
Du.default
|
|
6608
6602
|
];
|
|
6609
|
-
return e ? t.push(
|
|
6603
|
+
return e ? t.push(Ru.default, Nu.default) : t.push(Tu.default, Ou.default), t.push(Cu.default), t;
|
|
6610
6604
|
}
|
|
6611
|
-
|
|
6612
|
-
var
|
|
6613
|
-
Object.defineProperty(
|
|
6614
|
-
const ue =
|
|
6605
|
+
On.default = Vu;
|
|
6606
|
+
var Hn = {}, Vn = {};
|
|
6607
|
+
Object.defineProperty(Vn, "__esModule", { value: !0 });
|
|
6608
|
+
const ue = x, zu = {
|
|
6615
6609
|
message: ({ schemaCode: e }) => (0, ue.str)`must match format "${e}"`,
|
|
6616
6610
|
params: ({ schemaCode: e }) => (0, ue._)`{format: ${e}}`
|
|
6617
|
-
},
|
|
6611
|
+
}, Wu = {
|
|
6618
6612
|
keyword: "format",
|
|
6619
6613
|
type: ["number", "string"],
|
|
6620
6614
|
schemaType: "string",
|
|
6621
6615
|
$data: !0,
|
|
6622
|
-
error:
|
|
6616
|
+
error: zu,
|
|
6623
6617
|
code(e, t) {
|
|
6624
6618
|
const { gen: r, data: n, $data: s, schema: i, schemaCode: o, it: l } = e, { opts: p, errSchemaPath: u, schemaEnv: d, self: g } = l;
|
|
6625
6619
|
if (!p.validateFormats)
|
|
@@ -6674,10 +6668,10 @@ const ue = K, Wu = {
|
|
|
6674
6668
|
}
|
|
6675
6669
|
}
|
|
6676
6670
|
};
|
|
6677
|
-
|
|
6678
|
-
Object.defineProperty(
|
|
6679
|
-
const Ku =
|
|
6680
|
-
|
|
6671
|
+
Vn.default = Wu;
|
|
6672
|
+
Object.defineProperty(Hn, "__esModule", { value: !0 });
|
|
6673
|
+
const Ku = Vn, xu = [Ku.default];
|
|
6674
|
+
Hn.default = xu;
|
|
6681
6675
|
var Ct = {};
|
|
6682
6676
|
Object.defineProperty(Ct, "__esModule", { value: !0 });
|
|
6683
6677
|
Ct.contentVocabulary = Ct.metadataVocabulary = void 0;
|
|
@@ -6695,31 +6689,31 @@ Ct.contentVocabulary = [
|
|
|
6695
6689
|
"contentEncoding",
|
|
6696
6690
|
"contentSchema"
|
|
6697
6691
|
];
|
|
6698
|
-
Object.defineProperty(
|
|
6699
|
-
const
|
|
6692
|
+
Object.defineProperty(pn, "__esModule", { value: !0 });
|
|
6693
|
+
const Bu = hn, Gu = yn, Ju = On, Yu = Hn, As = Ct, Qu = [
|
|
6694
|
+
Bu.default,
|
|
6700
6695
|
Gu.default,
|
|
6701
|
-
Ju.default,
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
Ds.contentVocabulary
|
|
6696
|
+
(0, Ju.default)(),
|
|
6697
|
+
Yu.default,
|
|
6698
|
+
As.metadataVocabulary,
|
|
6699
|
+
As.contentVocabulary
|
|
6706
6700
|
];
|
|
6707
|
-
|
|
6708
|
-
var
|
|
6701
|
+
pn.default = Qu;
|
|
6702
|
+
var zn = {}, Ii = {};
|
|
6709
6703
|
(function(e) {
|
|
6710
6704
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DiscrError = void 0, function(t) {
|
|
6711
6705
|
t.Tag = "tag", t.Mapping = "mapping";
|
|
6712
6706
|
}(e.DiscrError || (e.DiscrError = {}));
|
|
6713
|
-
})(
|
|
6714
|
-
Object.defineProperty(
|
|
6715
|
-
const St =
|
|
6707
|
+
})(Ii);
|
|
6708
|
+
Object.defineProperty(zn, "__esModule", { value: !0 });
|
|
6709
|
+
const St = x, Qr = Ii, Ds = _e, Xu = Z, Zu = {
|
|
6716
6710
|
message: ({ params: { discrError: e, tagName: t } }) => e === Qr.DiscrError.Tag ? `tag "${t}" must be string` : `value of tag "${t}" must be in oneOf`,
|
|
6717
6711
|
params: ({ params: { discrError: e, tag: t, tagName: r } }) => (0, St._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`
|
|
6718
|
-
},
|
|
6712
|
+
}, ed = {
|
|
6719
6713
|
keyword: "discriminator",
|
|
6720
6714
|
type: "object",
|
|
6721
6715
|
schemaType: "object",
|
|
6722
|
-
error:
|
|
6716
|
+
error: Zu,
|
|
6723
6717
|
code(e) {
|
|
6724
6718
|
const { gen: t, data: r, schema: n, parentSchema: s, it: i } = e, { oneOf: o } = s;
|
|
6725
6719
|
if (!i.opts.discriminator)
|
|
@@ -6750,7 +6744,7 @@ const St = K, Qr = Ai, Fs = _e, Zu = Z, ed = {
|
|
|
6750
6744
|
let v = !0;
|
|
6751
6745
|
for (let j = 0; j < o.length; j++) {
|
|
6752
6746
|
let D = o[j];
|
|
6753
|
-
D?.$ref && !(0,
|
|
6747
|
+
D?.$ref && !(0, Xu.schemaHasRulesButRef)(D, i.self.RULES) && (D = Ds.resolveRef.call(i.self, i.schemaEnv.root, i.baseId, D?.$ref), D instanceof Ds.SchemaEnv && (D = D.schema));
|
|
6754
6748
|
const _ = (k = D?.properties) === null || k === void 0 ? void 0 : k[l];
|
|
6755
6749
|
if (typeof _ != "object")
|
|
6756
6750
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);
|
|
@@ -6779,8 +6773,8 @@ const St = K, Qr = Ai, Fs = _e, Zu = Z, ed = {
|
|
|
6779
6773
|
}
|
|
6780
6774
|
}
|
|
6781
6775
|
};
|
|
6782
|
-
|
|
6783
|
-
const
|
|
6776
|
+
zn.default = ed;
|
|
6777
|
+
const td = "http://json-schema.org/draft-07/schema#", rd = "http://json-schema.org/draft-07/schema#", nd = "Core schema meta-schema", sd = {
|
|
6784
6778
|
schemaArray: {
|
|
6785
6779
|
type: "array",
|
|
6786
6780
|
minItems: 1,
|
|
@@ -6821,10 +6815,10 @@ const rd = "http://json-schema.org/draft-07/schema#", nd = "http://json-schema.o
|
|
|
6821
6815
|
uniqueItems: !0,
|
|
6822
6816
|
default: []
|
|
6823
6817
|
}
|
|
6824
|
-
},
|
|
6818
|
+
}, id = [
|
|
6825
6819
|
"object",
|
|
6826
6820
|
"boolean"
|
|
6827
|
-
],
|
|
6821
|
+
], od = {
|
|
6828
6822
|
$id: {
|
|
6829
6823
|
type: "string",
|
|
6830
6824
|
format: "uri-reference"
|
|
@@ -7012,18 +7006,18 @@ const rd = "http://json-schema.org/draft-07/schema#", nd = "http://json-schema.o
|
|
|
7012
7006
|
not: {
|
|
7013
7007
|
$ref: "#"
|
|
7014
7008
|
}
|
|
7015
|
-
},
|
|
7016
|
-
$schema:
|
|
7017
|
-
$id:
|
|
7018
|
-
title:
|
|
7019
|
-
definitions:
|
|
7020
|
-
type:
|
|
7021
|
-
properties:
|
|
7009
|
+
}, ad = {
|
|
7010
|
+
$schema: td,
|
|
7011
|
+
$id: rd,
|
|
7012
|
+
title: nd,
|
|
7013
|
+
definitions: sd,
|
|
7014
|
+
type: id,
|
|
7015
|
+
properties: od,
|
|
7022
7016
|
default: !0
|
|
7023
7017
|
};
|
|
7024
7018
|
(function(e, t) {
|
|
7025
7019
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = void 0;
|
|
7026
|
-
const r =
|
|
7020
|
+
const r = Zs, n = pn, s = zn, i = ad, o = ["/properties"], l = "http://json-schema.org/draft-07/schema";
|
|
7027
7021
|
class p extends r.default {
|
|
7028
7022
|
_addVocabularies() {
|
|
7029
7023
|
super._addVocabularies(), n.default.forEach((E) => this.addVocabulary(E)), this.opts.discriminator && this.addKeyword(s.default);
|
|
@@ -7043,7 +7037,7 @@ const rd = "http://json-schema.org/draft-07/schema#", nd = "http://json-schema.o
|
|
|
7043
7037
|
Object.defineProperty(t, "KeywordCxt", { enumerable: !0, get: function() {
|
|
7044
7038
|
return u.KeywordCxt;
|
|
7045
7039
|
} });
|
|
7046
|
-
var d =
|
|
7040
|
+
var d = x;
|
|
7047
7041
|
Object.defineProperty(t, "_", { enumerable: !0, get: function() {
|
|
7048
7042
|
return d._;
|
|
7049
7043
|
} }), Object.defineProperty(t, "str", { enumerable: !0, get: function() {
|
|
@@ -7065,9 +7059,9 @@ const rd = "http://json-schema.org/draft-07/schema#", nd = "http://json-schema.o
|
|
|
7065
7059
|
Object.defineProperty(t, "MissingRefError", { enumerable: !0, get: function() {
|
|
7066
7060
|
return C.default;
|
|
7067
7061
|
} });
|
|
7068
|
-
})(
|
|
7069
|
-
var
|
|
7070
|
-
const
|
|
7062
|
+
})(Kr, Kr.exports);
|
|
7063
|
+
var cd = Kr.exports;
|
|
7064
|
+
const ld = /* @__PURE__ */ ga(cd), ud = "http://json-schema.org/schema", dd = "#/definitions/Blueprint", fd = {
|
|
7071
7065
|
Blueprint: {
|
|
7072
7066
|
type: "object",
|
|
7073
7067
|
properties: {
|
|
@@ -8385,12 +8379,12 @@ const ud = /* @__PURE__ */ $a(ld), dd = "http://json-schema.org/schema", fd = "#
|
|
|
8385
8379
|
},
|
|
8386
8380
|
additionalProperties: !1
|
|
8387
8381
|
}
|
|
8388
|
-
},
|
|
8389
|
-
$schema:
|
|
8390
|
-
$ref:
|
|
8391
|
-
definitions:
|
|
8382
|
+
}, pd = {
|
|
8383
|
+
$schema: ud,
|
|
8384
|
+
$ref: dd,
|
|
8385
|
+
definitions: fd
|
|
8392
8386
|
};
|
|
8393
|
-
function
|
|
8387
|
+
function hd(e, {
|
|
8394
8388
|
progress: t = new kr(),
|
|
8395
8389
|
semaphore: r = new Ks({ concurrency: 3 }),
|
|
8396
8390
|
onStepCompleted: n = () => {
|
|
@@ -8398,9 +8392,9 @@ function md(e, {
|
|
|
8398
8392
|
} = {}) {
|
|
8399
8393
|
e = {
|
|
8400
8394
|
...e,
|
|
8401
|
-
steps: (e.steps || []).filter(
|
|
8395
|
+
steps: (e.steps || []).filter(vd)
|
|
8402
8396
|
};
|
|
8403
|
-
const { valid: s, errors: i } =
|
|
8397
|
+
const { valid: s, errors: i } = yd(e);
|
|
8404
8398
|
if (!s) {
|
|
8405
8399
|
const u = new Error(
|
|
8406
8400
|
`Invalid blueprint: ${i[0].message} at ${i[0].instancePath}`
|
|
@@ -8411,7 +8405,7 @@ function md(e, {
|
|
|
8411
8405
|
(u, d) => u + (d.progress?.weight || 1),
|
|
8412
8406
|
0
|
|
8413
8407
|
), p = o.map(
|
|
8414
|
-
(u) =>
|
|
8408
|
+
(u) => _d(u, {
|
|
8415
8409
|
semaphore: r,
|
|
8416
8410
|
rootProgressTracker: t,
|
|
8417
8411
|
totalProgressWeight: l
|
|
@@ -8419,14 +8413,14 @@ function md(e, {
|
|
|
8419
8413
|
);
|
|
8420
8414
|
return {
|
|
8421
8415
|
versions: {
|
|
8422
|
-
php:
|
|
8416
|
+
php: gd(
|
|
8423
8417
|
e.preferredVersions?.php,
|
|
8424
8418
|
nn,
|
|
8425
|
-
|
|
8419
|
+
xo
|
|
8426
8420
|
),
|
|
8427
8421
|
wp: e.preferredVersions?.wp || "latest"
|
|
8428
8422
|
},
|
|
8429
|
-
phpExtensions:
|
|
8423
|
+
phpExtensions: $d(
|
|
8430
8424
|
[],
|
|
8431
8425
|
e.phpExtensionBundles || []
|
|
8432
8426
|
),
|
|
@@ -8451,10 +8445,10 @@ function md(e, {
|
|
|
8451
8445
|
}
|
|
8452
8446
|
};
|
|
8453
8447
|
}
|
|
8454
|
-
const
|
|
8448
|
+
const md = new ld({ discriminator: !0 });
|
|
8455
8449
|
let hr;
|
|
8456
|
-
function
|
|
8457
|
-
hr =
|
|
8450
|
+
function yd(e) {
|
|
8451
|
+
hr = md.compile(pd);
|
|
8458
8452
|
const t = hr(e);
|
|
8459
8453
|
if (t)
|
|
8460
8454
|
return { valid: t };
|
|
@@ -8469,21 +8463,21 @@ function gd(e) {
|
|
|
8469
8463
|
errors: n
|
|
8470
8464
|
};
|
|
8471
8465
|
}
|
|
8472
|
-
function
|
|
8466
|
+
function gd(e, t, r) {
|
|
8473
8467
|
return e && t.includes(e) ? e : r;
|
|
8474
8468
|
}
|
|
8475
|
-
function
|
|
8476
|
-
const r =
|
|
8469
|
+
function $d(e, t) {
|
|
8470
|
+
const r = Js.filter(
|
|
8477
8471
|
(s) => e.includes(s)
|
|
8478
8472
|
), n = t.flatMap(
|
|
8479
|
-
(s) => s in
|
|
8473
|
+
(s) => s in ps ? ps[s] : []
|
|
8480
8474
|
);
|
|
8481
8475
|
return Array.from(/* @__PURE__ */ new Set([...r, ...n]));
|
|
8482
8476
|
}
|
|
8483
|
-
function
|
|
8477
|
+
function vd(e) {
|
|
8484
8478
|
return !!(typeof e == "object" && e);
|
|
8485
8479
|
}
|
|
8486
|
-
function
|
|
8480
|
+
function _d(e, {
|
|
8487
8481
|
semaphore: t,
|
|
8488
8482
|
rootProgressTracker: r,
|
|
8489
8483
|
totalProgressWeight: n
|
|
@@ -8493,15 +8487,15 @@ function wd(e, {
|
|
|
8493
8487
|
), i = {};
|
|
8494
8488
|
for (const d of Object.keys(e)) {
|
|
8495
8489
|
let g = e[d];
|
|
8496
|
-
|
|
8490
|
+
aa(g) && (g = ft.create(g, {
|
|
8497
8491
|
semaphore: t
|
|
8498
8492
|
})), i[d] = g;
|
|
8499
8493
|
}
|
|
8500
8494
|
const o = async (d) => {
|
|
8501
8495
|
try {
|
|
8502
|
-
return s.fillSlowly(), await
|
|
8496
|
+
return s.fillSlowly(), await Io[e.step](
|
|
8503
8497
|
d,
|
|
8504
|
-
await
|
|
8498
|
+
await wd(i),
|
|
8505
8499
|
{
|
|
8506
8500
|
tracker: s,
|
|
8507
8501
|
initialCaption: e.progress?.caption
|
|
@@ -8510,14 +8504,14 @@ function wd(e, {
|
|
|
8510
8504
|
} finally {
|
|
8511
8505
|
s.finish();
|
|
8512
8506
|
}
|
|
8513
|
-
}, l =
|
|
8507
|
+
}, l = Fs(i), p = Fs(i).filter(
|
|
8514
8508
|
(d) => d.isAsync
|
|
8515
8509
|
), u = 1 / (p.length + 1);
|
|
8516
8510
|
for (const d of p)
|
|
8517
8511
|
d.progress = s.stage(u);
|
|
8518
8512
|
return { run: o, step: e, resources: l };
|
|
8519
8513
|
}
|
|
8520
|
-
function
|
|
8514
|
+
function Fs(e) {
|
|
8521
8515
|
const t = [];
|
|
8522
8516
|
for (const r in e) {
|
|
8523
8517
|
const n = e[r];
|
|
@@ -8525,7 +8519,7 @@ function qs(e) {
|
|
|
8525
8519
|
}
|
|
8526
8520
|
return t;
|
|
8527
8521
|
}
|
|
8528
|
-
async function
|
|
8522
|
+
async function wd(e) {
|
|
8529
8523
|
const t = {};
|
|
8530
8524
|
for (const r in e) {
|
|
8531
8525
|
const n = e[r];
|
|
@@ -8533,25 +8527,27 @@ async function bd(e) {
|
|
|
8533
8527
|
}
|
|
8534
8528
|
return t;
|
|
8535
8529
|
}
|
|
8536
|
-
async function
|
|
8530
|
+
async function bd(e, t) {
|
|
8537
8531
|
await e.run(t);
|
|
8538
8532
|
}
|
|
8533
|
+
function Hd() {
|
|
8534
|
+
}
|
|
8539
8535
|
/**
|
|
8540
8536
|
* @license
|
|
8541
8537
|
* Copyright 2019 Google LLC
|
|
8542
8538
|
* SPDX-License-Identifier: Apache-2.0
|
|
8543
8539
|
*/
|
|
8544
|
-
const
|
|
8545
|
-
canHandle: (e) =>
|
|
8540
|
+
const Ai = Symbol("Comlink.proxy"), Pd = Symbol("Comlink.endpoint"), Ed = Symbol("Comlink.releaseProxy"), zr = Symbol("Comlink.finalizer"), _r = Symbol("Comlink.thrown"), Di = (e) => typeof e == "object" && e !== null || typeof e == "function", Sd = {
|
|
8541
|
+
canHandle: (e) => Di(e) && e[Ai],
|
|
8546
8542
|
serialize(e) {
|
|
8547
8543
|
const { port1: t, port2: r } = new MessageChannel();
|
|
8548
|
-
return
|
|
8544
|
+
return Wn(e, t), [r, [r]];
|
|
8549
8545
|
},
|
|
8550
8546
|
deserialize(e) {
|
|
8551
8547
|
return e.start(), Kn(e);
|
|
8552
8548
|
}
|
|
8553
|
-
},
|
|
8554
|
-
canHandle: (e) =>
|
|
8549
|
+
}, Td = {
|
|
8550
|
+
canHandle: (e) => Di(e) && _r in e,
|
|
8555
8551
|
serialize({ value: e }) {
|
|
8556
8552
|
let t;
|
|
8557
8553
|
return e instanceof Error ? t = {
|
|
@@ -8567,20 +8563,20 @@ const Di = Symbol("Comlink.proxy"), Ed = Symbol("Comlink.endpoint"), Sd = Symbol
|
|
|
8567
8563
|
throw e.isError ? Object.assign(new Error(e.value.message), e.value) : e.value;
|
|
8568
8564
|
}
|
|
8569
8565
|
}, Xt = /* @__PURE__ */ new Map([
|
|
8570
|
-
["proxy",
|
|
8571
|
-
["throw",
|
|
8566
|
+
["proxy", Sd],
|
|
8567
|
+
["throw", Td]
|
|
8572
8568
|
]);
|
|
8573
|
-
function
|
|
8569
|
+
function Rd(e, t) {
|
|
8574
8570
|
for (const r of e)
|
|
8575
8571
|
if (t === r || r === "*" || r instanceof RegExp && r.test(t))
|
|
8576
8572
|
return !0;
|
|
8577
8573
|
return !1;
|
|
8578
8574
|
}
|
|
8579
|
-
function
|
|
8575
|
+
function Wn(e, t = globalThis, r = ["*"]) {
|
|
8580
8576
|
t.addEventListener("message", function n(s) {
|
|
8581
8577
|
if (!s || !s.data)
|
|
8582
8578
|
return;
|
|
8583
|
-
if (!
|
|
8579
|
+
if (!Rd(r, s.origin)) {
|
|
8584
8580
|
console.warn(`Invalid origin '${s.origin}' for comlink proxy`);
|
|
8585
8581
|
return;
|
|
8586
8582
|
}
|
|
@@ -8601,13 +8597,13 @@ function xn(e, t = globalThis, r = ["*"]) {
|
|
|
8601
8597
|
case "CONSTRUCT":
|
|
8602
8598
|
{
|
|
8603
8599
|
const C = new g(...p);
|
|
8604
|
-
u =
|
|
8600
|
+
u = Ui(C);
|
|
8605
8601
|
}
|
|
8606
8602
|
break;
|
|
8607
8603
|
case "ENDPOINT":
|
|
8608
8604
|
{
|
|
8609
8605
|
const { port1: C, port2: k } = new MessageChannel();
|
|
8610
|
-
|
|
8606
|
+
Wn(e, k), u = jd(C, [C]);
|
|
8611
8607
|
}
|
|
8612
8608
|
break;
|
|
8613
8609
|
case "RELEASE":
|
|
@@ -8621,7 +8617,7 @@ function xn(e, t = globalThis, r = ["*"]) {
|
|
|
8621
8617
|
}
|
|
8622
8618
|
Promise.resolve(u).catch((d) => ({ value: d, [_r]: 0 })).then((d) => {
|
|
8623
8619
|
const [g, C] = Nr(d);
|
|
8624
|
-
t.postMessage(Object.assign(Object.assign({}, g), { id: i }), C), o === "RELEASE" && (t.removeEventListener("message", n),
|
|
8620
|
+
t.postMessage(Object.assign(Object.assign({}, g), { id: i }), C), o === "RELEASE" && (t.removeEventListener("message", n), Fi(t), zr in e && typeof e[zr] == "function" && e[zr]());
|
|
8625
8621
|
}).catch((d) => {
|
|
8626
8622
|
const [g, C] = Nr({
|
|
8627
8623
|
value: new TypeError("Unserializable return value"),
|
|
@@ -8631,11 +8627,11 @@ function xn(e, t = globalThis, r = ["*"]) {
|
|
|
8631
8627
|
});
|
|
8632
8628
|
}), t.start && t.start();
|
|
8633
8629
|
}
|
|
8634
|
-
function
|
|
8630
|
+
function Od(e) {
|
|
8635
8631
|
return e.constructor.name === "MessagePort";
|
|
8636
8632
|
}
|
|
8637
|
-
function
|
|
8638
|
-
|
|
8633
|
+
function Fi(e) {
|
|
8634
|
+
Od(e) && e.close();
|
|
8639
8635
|
}
|
|
8640
8636
|
function Kn(e, t) {
|
|
8641
8637
|
return Xr(e, [], t);
|
|
@@ -8644,22 +8640,22 @@ function mr(e) {
|
|
|
8644
8640
|
if (e)
|
|
8645
8641
|
throw new Error("Proxy has been released and is not useable");
|
|
8646
8642
|
}
|
|
8647
|
-
function
|
|
8643
|
+
function qi(e) {
|
|
8648
8644
|
return Tt(e, {
|
|
8649
8645
|
type: "RELEASE"
|
|
8650
8646
|
}).then(() => {
|
|
8651
|
-
|
|
8647
|
+
Fi(e);
|
|
8652
8648
|
});
|
|
8653
8649
|
}
|
|
8654
8650
|
const Rr = /* @__PURE__ */ new WeakMap(), Or = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
|
|
8655
8651
|
const t = (Rr.get(e) || 0) - 1;
|
|
8656
|
-
Rr.set(e, t), t === 0 &&
|
|
8652
|
+
Rr.set(e, t), t === 0 && qi(e);
|
|
8657
8653
|
});
|
|
8658
|
-
function
|
|
8654
|
+
function Nd(e, t) {
|
|
8659
8655
|
const r = (Rr.get(t) || 0) + 1;
|
|
8660
8656
|
Rr.set(t, r), Or && Or.register(e, t, e);
|
|
8661
8657
|
}
|
|
8662
|
-
function
|
|
8658
|
+
function Cd(e) {
|
|
8663
8659
|
Or && Or.unregister(e);
|
|
8664
8660
|
}
|
|
8665
8661
|
function Xr(e, t = [], r = function() {
|
|
@@ -8667,9 +8663,9 @@ function Xr(e, t = [], r = function() {
|
|
|
8667
8663
|
let n = !1;
|
|
8668
8664
|
const s = new Proxy(r, {
|
|
8669
8665
|
get(i, o) {
|
|
8670
|
-
if (mr(n), o ===
|
|
8666
|
+
if (mr(n), o === Ed)
|
|
8671
8667
|
return () => {
|
|
8672
|
-
|
|
8668
|
+
Cd(s), qi(e), n = !0;
|
|
8673
8669
|
};
|
|
8674
8670
|
if (o === "then") {
|
|
8675
8671
|
if (t.length === 0)
|
|
@@ -8694,13 +8690,13 @@ function Xr(e, t = [], r = function() {
|
|
|
8694
8690
|
apply(i, o, l) {
|
|
8695
8691
|
mr(n);
|
|
8696
8692
|
const p = t[t.length - 1];
|
|
8697
|
-
if (p ===
|
|
8693
|
+
if (p === Pd)
|
|
8698
8694
|
return Tt(e, {
|
|
8699
8695
|
type: "ENDPOINT"
|
|
8700
8696
|
}).then(at);
|
|
8701
8697
|
if (p === "bind")
|
|
8702
8698
|
return Xr(e, t.slice(0, -1));
|
|
8703
|
-
const [u, d] =
|
|
8699
|
+
const [u, d] = qs(l);
|
|
8704
8700
|
return Tt(e, {
|
|
8705
8701
|
type: "APPLY",
|
|
8706
8702
|
path: t.map((g) => g.toString()),
|
|
@@ -8709,7 +8705,7 @@ function Xr(e, t = [], r = function() {
|
|
|
8709
8705
|
},
|
|
8710
8706
|
construct(i, o) {
|
|
8711
8707
|
mr(n);
|
|
8712
|
-
const [l, p] =
|
|
8708
|
+
const [l, p] = qs(o);
|
|
8713
8709
|
return Tt(e, {
|
|
8714
8710
|
type: "CONSTRUCT",
|
|
8715
8711
|
path: t.map((u) => u.toString()),
|
|
@@ -8717,23 +8713,23 @@ function Xr(e, t = [], r = function() {
|
|
|
8717
8713
|
}, p).then(at);
|
|
8718
8714
|
}
|
|
8719
8715
|
});
|
|
8720
|
-
return
|
|
8716
|
+
return Nd(s, e), s;
|
|
8721
8717
|
}
|
|
8722
|
-
function
|
|
8718
|
+
function kd(e) {
|
|
8723
8719
|
return Array.prototype.concat.apply([], e);
|
|
8724
8720
|
}
|
|
8725
|
-
function
|
|
8721
|
+
function qs(e) {
|
|
8726
8722
|
const t = e.map(Nr);
|
|
8727
|
-
return [t.map((r) => r[0]),
|
|
8723
|
+
return [t.map((r) => r[0]), kd(t.map((r) => r[1]))];
|
|
8728
8724
|
}
|
|
8729
|
-
const
|
|
8730
|
-
function
|
|
8731
|
-
return
|
|
8725
|
+
const Mi = /* @__PURE__ */ new WeakMap();
|
|
8726
|
+
function jd(e, t) {
|
|
8727
|
+
return Mi.set(e, t), e;
|
|
8732
8728
|
}
|
|
8733
|
-
function
|
|
8734
|
-
return Object.assign(e, { [
|
|
8729
|
+
function Ui(e) {
|
|
8730
|
+
return Object.assign(e, { [Ai]: !0 });
|
|
8735
8731
|
}
|
|
8736
|
-
function
|
|
8732
|
+
function Id(e, t = globalThis, r = "*") {
|
|
8737
8733
|
return {
|
|
8738
8734
|
postMessage: (n, s) => e.postMessage(n, r, s),
|
|
8739
8735
|
addEventListener: t.addEventListener.bind(t),
|
|
@@ -8758,7 +8754,7 @@ function Nr(e) {
|
|
|
8758
8754
|
type: "RAW",
|
|
8759
8755
|
value: e
|
|
8760
8756
|
},
|
|
8761
|
-
|
|
8757
|
+
Mi.get(e) || []
|
|
8762
8758
|
];
|
|
8763
8759
|
}
|
|
8764
8760
|
function at(e) {
|
|
@@ -8771,37 +8767,37 @@ function at(e) {
|
|
|
8771
8767
|
}
|
|
8772
8768
|
function Tt(e, t, r) {
|
|
8773
8769
|
return new Promise((n) => {
|
|
8774
|
-
const s =
|
|
8770
|
+
const s = Ad();
|
|
8775
8771
|
e.addEventListener("message", function i(o) {
|
|
8776
8772
|
!o.data || !o.data.id || o.data.id !== s || (e.removeEventListener("message", i), n(o.data));
|
|
8777
8773
|
}), e.start && e.start(), e.postMessage(Object.assign({ id: s }, t), r);
|
|
8778
8774
|
});
|
|
8779
8775
|
}
|
|
8780
|
-
function
|
|
8776
|
+
function Ad() {
|
|
8781
8777
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
8782
8778
|
}
|
|
8783
|
-
function
|
|
8784
|
-
|
|
8785
|
-
const t = e instanceof Worker ? e :
|
|
8779
|
+
function Li(e) {
|
|
8780
|
+
Fd();
|
|
8781
|
+
const t = e instanceof Worker ? e : Id(e), r = Kn(t), n = Hi(r);
|
|
8786
8782
|
return new Proxy(n, {
|
|
8787
8783
|
get: (s, i) => i === "isConnected" ? async () => {
|
|
8788
8784
|
for (let o = 0; o < 10; o++)
|
|
8789
8785
|
try {
|
|
8790
|
-
await
|
|
8786
|
+
await Dd(r.isConnected(), 200);
|
|
8791
8787
|
break;
|
|
8792
8788
|
} catch {
|
|
8793
8789
|
}
|
|
8794
8790
|
} : r[i]
|
|
8795
8791
|
});
|
|
8796
8792
|
}
|
|
8797
|
-
async function
|
|
8793
|
+
async function Dd(e, t) {
|
|
8798
8794
|
return new Promise((r, n) => {
|
|
8799
8795
|
setTimeout(n, t), e.then(r);
|
|
8800
8796
|
});
|
|
8801
8797
|
}
|
|
8802
|
-
let
|
|
8803
|
-
function
|
|
8804
|
-
|
|
8798
|
+
let Ms = !1;
|
|
8799
|
+
function Fd() {
|
|
8800
|
+
Ms || (Ms = !0, Xt.set("EVENT", {
|
|
8805
8801
|
canHandle: (e) => e instanceof CustomEvent,
|
|
8806
8802
|
serialize: (e) => [
|
|
8807
8803
|
{
|
|
@@ -8815,7 +8811,7 @@ function qd() {
|
|
|
8815
8811
|
serialize(e) {
|
|
8816
8812
|
console.debug("[Comlink][Performance] Proxying a function");
|
|
8817
8813
|
const { port1: t, port2: r } = new MessageChannel();
|
|
8818
|
-
return
|
|
8814
|
+
return Wn(e, t), [r, [r]];
|
|
8819
8815
|
},
|
|
8820
8816
|
deserialize(e) {
|
|
8821
8817
|
return e.start(), Kn(e);
|
|
@@ -8830,25 +8826,25 @@ function qd() {
|
|
|
8830
8826
|
}
|
|
8831
8827
|
}));
|
|
8832
8828
|
}
|
|
8833
|
-
function
|
|
8829
|
+
function Hi(e) {
|
|
8834
8830
|
return new Proxy(e, {
|
|
8835
8831
|
get(t, r) {
|
|
8836
8832
|
switch (typeof t[r]) {
|
|
8837
8833
|
case "function":
|
|
8838
8834
|
return (...n) => t[r](...n);
|
|
8839
8835
|
case "object":
|
|
8840
|
-
return t[r] === null ? t[r] :
|
|
8836
|
+
return t[r] === null ? t[r] : Hi(t[r]);
|
|
8841
8837
|
case "undefined":
|
|
8842
8838
|
case "number":
|
|
8843
8839
|
case "string":
|
|
8844
8840
|
return t[r];
|
|
8845
8841
|
default:
|
|
8846
|
-
return
|
|
8842
|
+
return Ui(t[r]);
|
|
8847
8843
|
}
|
|
8848
8844
|
}
|
|
8849
8845
|
});
|
|
8850
8846
|
}
|
|
8851
|
-
async function
|
|
8847
|
+
async function qd({
|
|
8852
8848
|
iframe: e,
|
|
8853
8849
|
blueprint: t,
|
|
8854
8850
|
remoteUrl: r,
|
|
@@ -8856,32 +8852,32 @@ async function Md({
|
|
|
8856
8852
|
disableProgressBar: s,
|
|
8857
8853
|
onBlueprintStepCompleted: i
|
|
8858
8854
|
}) {
|
|
8859
|
-
if (
|
|
8855
|
+
if (Ud(r), Md(e), r = Ls(r, {
|
|
8860
8856
|
progressbar: !s
|
|
8861
8857
|
}), n.setCaption("Preparing WordPress"), !t)
|
|
8862
|
-
return
|
|
8863
|
-
const o =
|
|
8858
|
+
return Us(e, r, n);
|
|
8859
|
+
const o = hd(t, {
|
|
8864
8860
|
progress: n.stage(0.5),
|
|
8865
8861
|
onStepCompleted: i
|
|
8866
|
-
}), l = await
|
|
8862
|
+
}), l = await Us(
|
|
8867
8863
|
e,
|
|
8868
|
-
|
|
8864
|
+
Ls(r, {
|
|
8869
8865
|
php: o.versions.php,
|
|
8870
8866
|
wp: o.versions.wp,
|
|
8871
8867
|
["php-extension"]: o.phpExtensions
|
|
8872
8868
|
}),
|
|
8873
8869
|
n
|
|
8874
8870
|
);
|
|
8875
|
-
return await
|
|
8871
|
+
return await bd(o, l), n.finish(), l;
|
|
8876
8872
|
}
|
|
8877
|
-
function
|
|
8873
|
+
function Md(e) {
|
|
8878
8874
|
e.sandbox?.length && !e.sandbox?.contains("allow-storage-access-by-user-activation") && e.sandbox.add("allow-storage-access-by-user-activation");
|
|
8879
8875
|
}
|
|
8880
|
-
async function
|
|
8876
|
+
async function Us(e, t, r) {
|
|
8881
8877
|
await new Promise((i) => {
|
|
8882
8878
|
e.src = t, e.addEventListener("load", i, !1);
|
|
8883
8879
|
});
|
|
8884
|
-
const n =
|
|
8880
|
+
const n = Li(
|
|
8885
8881
|
e.contentWindow
|
|
8886
8882
|
);
|
|
8887
8883
|
await n.isConnected(), r.pipe(n);
|
|
@@ -8889,14 +8885,14 @@ async function Ls(e, t, r) {
|
|
|
8889
8885
|
return await n.onDownloadProgress(s.loadingListener), await n.isReady(), s.finish(), n;
|
|
8890
8886
|
}
|
|
8891
8887
|
const wr = "https://playground.wordpress.net";
|
|
8892
|
-
function
|
|
8888
|
+
function Ud(e) {
|
|
8893
8889
|
const t = new URL(e, wr);
|
|
8894
8890
|
if ((t.origin === wr || t.hostname === "localhost") && t.pathname !== "/remote.html")
|
|
8895
8891
|
throw new Error(
|
|
8896
8892
|
`Invalid remote URL: ${t}. Expected origin to be ${wr}/remote.html.`
|
|
8897
8893
|
);
|
|
8898
8894
|
}
|
|
8899
|
-
function
|
|
8895
|
+
function Ls(e, t) {
|
|
8900
8896
|
const r = new URL(e, wr), n = new URLSearchParams(r.search);
|
|
8901
8897
|
for (const [s, i] of Object.entries(t))
|
|
8902
8898
|
if (i != null && i !== !1)
|
|
@@ -8907,53 +8903,53 @@ function Hs(e, t) {
|
|
|
8907
8903
|
n.set(s, i.toString());
|
|
8908
8904
|
return r.search = n.toString(), r.toString();
|
|
8909
8905
|
}
|
|
8910
|
-
async function
|
|
8906
|
+
async function Vd(e, t) {
|
|
8911
8907
|
if (console.warn(
|
|
8912
8908
|
"`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."
|
|
8913
8909
|
), t?.loadRemote)
|
|
8914
|
-
return
|
|
8910
|
+
return qd({
|
|
8915
8911
|
iframe: e,
|
|
8916
8912
|
remoteUrl: t.loadRemote
|
|
8917
8913
|
});
|
|
8918
|
-
const r =
|
|
8914
|
+
const r = Li(
|
|
8919
8915
|
e.contentWindow
|
|
8920
8916
|
);
|
|
8921
8917
|
return await r.isConnected(), r;
|
|
8922
8918
|
}
|
|
8923
8919
|
export {
|
|
8924
|
-
|
|
8920
|
+
xo as LatestSupportedPHPVersion,
|
|
8925
8921
|
nn as SupportedPHPVersions,
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8922
|
+
Ld as SupportedPHPVersionsList,
|
|
8923
|
+
Hs as activatePlugin,
|
|
8924
|
+
Vs as activateTheme,
|
|
8925
|
+
ao as applyWordPressPatches,
|
|
8926
|
+
hd as compileBlueprint,
|
|
8927
|
+
Vd as connectPlayground,
|
|
8928
|
+
ho as cp,
|
|
8929
|
+
vo as defineSiteUrl,
|
|
8930
|
+
xt as defineWpConfigConsts,
|
|
8931
|
+
Po as importFile,
|
|
8932
|
+
To as installPlugin,
|
|
8933
|
+
Oo as installTheme,
|
|
8934
|
+
No as login,
|
|
8935
|
+
go as mkdir,
|
|
8936
|
+
mo as mv,
|
|
8941
8937
|
Ot as phpVar,
|
|
8942
8938
|
en as phpVars,
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8939
|
+
bo as replaceSite,
|
|
8940
|
+
po as request,
|
|
8941
|
+
yo as rm,
|
|
8942
|
+
$o as rmdir,
|
|
8943
|
+
bd as runBlueprintSteps,
|
|
8944
|
+
lo as runPHP,
|
|
8945
|
+
uo as runPHPWithOptions,
|
|
8946
|
+
Co as runWpInstallationWizard,
|
|
8947
|
+
fo as setPhpIniEntry,
|
|
8948
|
+
Hd as setPluginProxyURL,
|
|
8949
|
+
ko as setSiteOptions,
|
|
8950
|
+
qd as startPlaygroundWeb,
|
|
8955
8951
|
tn as unzip,
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8952
|
+
jo as updateUserMeta,
|
|
8953
|
+
Ws as writeFile,
|
|
8954
|
+
wo as zipEntireSite
|
|
8959
8955
|
};
|