@reformer/renderer-json 7.0.0 → 9.0.0-beta.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/README.md +87 -0
- package/dist/converter/json-to-render-schema.test.d.ts +1 -0
- package/dist/index-Bu5XPCQ7.js +41 -0
- package/dist/index.js +102 -88
- package/dist/schema/form-schema.schema.json.d.ts +8 -5
- package/dist/schema/index.d.ts +7 -3
- package/dist/validate.js +665 -648
- package/llms.txt +1929 -0
- package/package.json +3 -2
- package/dist/index-BZLcW0SX.js +0 -42
package/dist/validate.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
function
|
|
1
|
+
import { g as on, d as un, f as cn, p as ln, i as dn } from "./index-Bu5XPCQ7.js";
|
|
2
|
+
function fn(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
-
var Oe = { exports: {} }, bt = {}, he = {}, ge = {}, Et = {}, St = {}, Pt = {},
|
|
5
|
+
var Oe = { exports: {} }, bt = {}, he = {}, ge = {}, Et = {}, St = {}, Pt = {}, Ut;
|
|
6
6
|
function ht() {
|
|
7
|
-
return
|
|
7
|
+
return Ut || (Ut = 1, (function(e) {
|
|
8
8
|
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;
|
|
9
9
|
class r {
|
|
10
10
|
}
|
|
@@ -41,93 +41,93 @@ function ht() {
|
|
|
41
41
|
}
|
|
42
42
|
get str() {
|
|
43
43
|
var t;
|
|
44
|
-
return (t = this._str) !== null && t !== void 0 ? t : this._str = this._items.reduce((
|
|
44
|
+
return (t = this._str) !== null && t !== void 0 ? t : this._str = this._items.reduce((i, h) => `${i}${h}`, "");
|
|
45
45
|
}
|
|
46
46
|
get names() {
|
|
47
47
|
var t;
|
|
48
|
-
return (t = this._names) !== null && t !== void 0 ? t : this._names = this._items.reduce((
|
|
48
|
+
return (t = this._names) !== null && t !== void 0 ? t : this._names = this._items.reduce((i, h) => (h instanceof S && (i[h.str] = (i[h.str] || 0) + 1), i), {});
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
e._Code = d, e.nil = new d("");
|
|
52
|
-
function g(
|
|
53
|
-
const
|
|
52
|
+
function g(o, ...t) {
|
|
53
|
+
const i = [o[0]];
|
|
54
54
|
let h = 0;
|
|
55
55
|
for (; h < t.length; )
|
|
56
|
-
c(
|
|
57
|
-
return new d(
|
|
56
|
+
c(i, t[h]), i.push(o[++h]);
|
|
57
|
+
return new d(i);
|
|
58
58
|
}
|
|
59
59
|
e._ = g;
|
|
60
60
|
const s = new d("+");
|
|
61
|
-
function f(
|
|
62
|
-
const
|
|
61
|
+
function f(o, ...t) {
|
|
62
|
+
const i = [y(o[0])];
|
|
63
63
|
let h = 0;
|
|
64
64
|
for (; h < t.length; )
|
|
65
|
-
|
|
66
|
-
return m(
|
|
65
|
+
i.push(s), c(i, t[h]), i.push(s, y(o[++h]));
|
|
66
|
+
return m(i), new d(i);
|
|
67
67
|
}
|
|
68
68
|
e.str = f;
|
|
69
|
-
function c(
|
|
70
|
-
t instanceof d ?
|
|
69
|
+
function c(o, t) {
|
|
70
|
+
t instanceof d ? o.push(...t._items) : t instanceof S ? o.push(t) : o.push(P(t));
|
|
71
71
|
}
|
|
72
72
|
e.addCodeArg = c;
|
|
73
|
-
function m(
|
|
73
|
+
function m(o) {
|
|
74
74
|
let t = 1;
|
|
75
|
-
for (; t <
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
|
|
75
|
+
for (; t < o.length - 1; ) {
|
|
76
|
+
if (o[t] === s) {
|
|
77
|
+
const i = w(o[t - 1], o[t + 1]);
|
|
78
|
+
if (i !== void 0) {
|
|
79
|
+
o.splice(t - 1, 3, i);
|
|
80
80
|
continue;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
o[t++] = "+";
|
|
83
83
|
}
|
|
84
84
|
t++;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function w(
|
|
87
|
+
function w(o, t) {
|
|
88
88
|
if (t === '""')
|
|
89
|
-
return
|
|
90
|
-
if (
|
|
89
|
+
return o;
|
|
90
|
+
if (o === '""')
|
|
91
91
|
return t;
|
|
92
|
-
if (typeof
|
|
93
|
-
return t instanceof S ||
|
|
94
|
-
if (typeof t == "string" && t[0] === '"' && !(
|
|
95
|
-
return `"${
|
|
92
|
+
if (typeof o == "string")
|
|
93
|
+
return t instanceof S || o[o.length - 1] !== '"' ? void 0 : typeof t != "string" ? `${o.slice(0, -1)}${t}"` : t[0] === '"' ? o.slice(0, -1) + t.slice(1) : void 0;
|
|
94
|
+
if (typeof t == "string" && t[0] === '"' && !(o instanceof S))
|
|
95
|
+
return `"${o}${t.slice(1)}`;
|
|
96
96
|
}
|
|
97
|
-
function v(
|
|
98
|
-
return t.emptyStr() ?
|
|
97
|
+
function v(o, t) {
|
|
98
|
+
return t.emptyStr() ? o : o.emptyStr() ? t : f`${o}${t}`;
|
|
99
99
|
}
|
|
100
100
|
e.strConcat = v;
|
|
101
|
-
function P(
|
|
102
|
-
return typeof
|
|
101
|
+
function P(o) {
|
|
102
|
+
return typeof o == "number" || typeof o == "boolean" || o === null ? o : y(Array.isArray(o) ? o.join(",") : o);
|
|
103
103
|
}
|
|
104
|
-
function _(
|
|
105
|
-
return new d(y(
|
|
104
|
+
function _(o) {
|
|
105
|
+
return new d(y(o));
|
|
106
106
|
}
|
|
107
107
|
e.stringify = _;
|
|
108
|
-
function y(
|
|
109
|
-
return JSON.stringify(
|
|
108
|
+
function y(o) {
|
|
109
|
+
return JSON.stringify(o).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
110
110
|
}
|
|
111
111
|
e.safeStringify = y;
|
|
112
|
-
function p(
|
|
113
|
-
return typeof
|
|
112
|
+
function p(o) {
|
|
113
|
+
return typeof o == "string" && e.IDENTIFIER.test(o) ? new d(`.${o}`) : g`[${o}]`;
|
|
114
114
|
}
|
|
115
115
|
e.getProperty = p;
|
|
116
|
-
function b(
|
|
117
|
-
if (typeof
|
|
118
|
-
return new d(`${
|
|
119
|
-
throw new Error(`CodeGen: invalid export name: ${
|
|
116
|
+
function b(o) {
|
|
117
|
+
if (typeof o == "string" && e.IDENTIFIER.test(o))
|
|
118
|
+
return new d(`${o}`);
|
|
119
|
+
throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`);
|
|
120
120
|
}
|
|
121
121
|
e.getEsmExportName = b;
|
|
122
|
-
function a(
|
|
123
|
-
return new d(
|
|
122
|
+
function a(o) {
|
|
123
|
+
return new d(o.toString());
|
|
124
124
|
}
|
|
125
125
|
e.regexpCode = a;
|
|
126
126
|
})(Pt)), Pt;
|
|
127
127
|
}
|
|
128
|
-
var Nt = {},
|
|
129
|
-
function
|
|
130
|
-
return
|
|
128
|
+
var Nt = {}, zt;
|
|
129
|
+
function Ft() {
|
|
130
|
+
return zt || (zt = 1, (function(e) {
|
|
131
131
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
132
132
|
const r = ht();
|
|
133
133
|
class S extends Error {
|
|
@@ -198,8 +198,8 @@ function zt() {
|
|
|
198
198
|
} else
|
|
199
199
|
b = this._values[y] = /* @__PURE__ */ new Map();
|
|
200
200
|
b.set(p, _);
|
|
201
|
-
const a = this._scope[y] || (this._scope[y] = []),
|
|
202
|
-
return a[
|
|
201
|
+
const a = this._scope[y] || (this._scope[y] = []), o = a.length;
|
|
202
|
+
return a[o] = v.ref, _.setValue(v, { property: y, itemIndex: o }), _;
|
|
203
203
|
}
|
|
204
204
|
getValue(w, v) {
|
|
205
205
|
const P = this._values[w];
|
|
@@ -227,19 +227,19 @@ function zt() {
|
|
|
227
227
|
if (!b)
|
|
228
228
|
continue;
|
|
229
229
|
const a = P[p] = P[p] || /* @__PURE__ */ new Map();
|
|
230
|
-
b.forEach((
|
|
231
|
-
if (a.has(
|
|
230
|
+
b.forEach((o) => {
|
|
231
|
+
if (a.has(o))
|
|
232
232
|
return;
|
|
233
|
-
a.set(
|
|
234
|
-
let t = v(
|
|
233
|
+
a.set(o, d.Started);
|
|
234
|
+
let t = v(o);
|
|
235
235
|
if (t) {
|
|
236
|
-
const
|
|
237
|
-
y = (0, r._)`${y}${
|
|
238
|
-
} else if (t = _?.(
|
|
236
|
+
const i = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
|
|
237
|
+
y = (0, r._)`${y}${i} ${o} = ${t};${this.opts._n}`;
|
|
238
|
+
} else if (t = _?.(o))
|
|
239
239
|
y = (0, r._)`${y}${t}${this.opts._n}`;
|
|
240
240
|
else
|
|
241
|
-
throw new S(
|
|
242
|
-
a.set(
|
|
241
|
+
throw new S(o);
|
|
242
|
+
a.set(o, d.Completed);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
return y;
|
|
@@ -248,11 +248,11 @@ function zt() {
|
|
|
248
248
|
e.ValueScope = c;
|
|
249
249
|
})(Nt)), Nt;
|
|
250
250
|
}
|
|
251
|
-
var
|
|
251
|
+
var Kt;
|
|
252
252
|
function J() {
|
|
253
|
-
return
|
|
253
|
+
return Kt || (Kt = 1, (function(e) {
|
|
254
254
|
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;
|
|
255
|
-
const r = ht(), S =
|
|
255
|
+
const r = ht(), S = Ft();
|
|
256
256
|
var d = ht();
|
|
257
257
|
Object.defineProperty(e, "_", { enumerable: !0, get: function() {
|
|
258
258
|
return d._;
|
|
@@ -271,7 +271,7 @@ function J() {
|
|
|
271
271
|
} }), Object.defineProperty(e, "Name", { enumerable: !0, get: function() {
|
|
272
272
|
return d.Name;
|
|
273
273
|
} });
|
|
274
|
-
var g =
|
|
274
|
+
var g = Ft();
|
|
275
275
|
Object.defineProperty(e, "Scope", { enumerable: !0, get: function() {
|
|
276
276
|
return g.Scope;
|
|
277
277
|
} }), Object.defineProperty(e, "ValueScope", { enumerable: !0, get: function() {
|
|
@@ -423,7 +423,7 @@ function J() {
|
|
|
423
423
|
class a extends p {
|
|
424
424
|
}
|
|
425
425
|
a.kind = "else";
|
|
426
|
-
class
|
|
426
|
+
class o extends p {
|
|
427
427
|
constructor(u, E) {
|
|
428
428
|
super(E), this.condition = u;
|
|
429
429
|
}
|
|
@@ -442,7 +442,7 @@ function J() {
|
|
|
442
442
|
E = this.else = Array.isArray(I) ? new a(I) : I;
|
|
443
443
|
}
|
|
444
444
|
if (E)
|
|
445
|
-
return u === !1 ? E instanceof
|
|
445
|
+
return u === !1 ? E instanceof o ? E : E.nodes : this.nodes.length ? this : new o(de(u), E instanceof o ? [E] : E.nodes);
|
|
446
446
|
if (!(u === !1 || !this.nodes.length))
|
|
447
447
|
return this;
|
|
448
448
|
}
|
|
@@ -456,11 +456,11 @@ function J() {
|
|
|
456
456
|
return K(u, this.condition), this.else && L(u, this.else.names), u;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
|
|
459
|
+
o.kind = "if";
|
|
460
460
|
class t extends p {
|
|
461
461
|
}
|
|
462
462
|
t.kind = "for";
|
|
463
|
-
class
|
|
463
|
+
class i extends t {
|
|
464
464
|
constructor(u) {
|
|
465
465
|
super(), this.iteration = u;
|
|
466
466
|
}
|
|
@@ -620,7 +620,7 @@ function J() {
|
|
|
620
620
|
}
|
|
621
621
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
622
622
|
if(u, E, I) {
|
|
623
|
-
if (this._blockNode(new
|
|
623
|
+
if (this._blockNode(new o(u)), E && I)
|
|
624
624
|
this.code(E).else().code(I).endIf();
|
|
625
625
|
else if (E)
|
|
626
626
|
this.code(E).endIf();
|
|
@@ -630,7 +630,7 @@ function J() {
|
|
|
630
630
|
}
|
|
631
631
|
// `else if` clause - invalid without `if` or after `else` clauses
|
|
632
632
|
elseIf(u) {
|
|
633
|
-
return this._elseNode(new
|
|
633
|
+
return this._elseNode(new o(u));
|
|
634
634
|
}
|
|
635
635
|
// `else` clause - only valid after `if` or `else if` clauses
|
|
636
636
|
else() {
|
|
@@ -638,14 +638,14 @@ function J() {
|
|
|
638
638
|
}
|
|
639
639
|
// end `if` statement (needed if gen.if was used only with condition)
|
|
640
640
|
endIf() {
|
|
641
|
-
return this._endBlockNode(
|
|
641
|
+
return this._endBlockNode(o, a);
|
|
642
642
|
}
|
|
643
643
|
_for(u, E) {
|
|
644
644
|
return this._blockNode(u), E && this.code(E).endFor(), this;
|
|
645
645
|
}
|
|
646
646
|
// a generic `for` clause (or statement if `forBody` is passed)
|
|
647
647
|
for(u, E) {
|
|
648
|
-
return this._for(new
|
|
648
|
+
return this._for(new i(u), E);
|
|
649
649
|
}
|
|
650
650
|
// `for` statement for a range of values
|
|
651
651
|
forRange(u, E, I, U, F = this.opts.es5 ? S.varKinds.var : S.varKinds.let) {
|
|
@@ -745,7 +745,7 @@ function J() {
|
|
|
745
745
|
}
|
|
746
746
|
_elseNode(u) {
|
|
747
747
|
const E = this._currNode;
|
|
748
|
-
if (!(E instanceof
|
|
748
|
+
if (!(E instanceof o))
|
|
749
749
|
throw new Error('CodeGen: "else" without "if"');
|
|
750
750
|
return this._currNode = E.else = u, this;
|
|
751
751
|
}
|
|
@@ -810,10 +810,10 @@ function J() {
|
|
|
810
810
|
}
|
|
811
811
|
})(St)), St;
|
|
812
812
|
}
|
|
813
|
-
var H = {},
|
|
813
|
+
var H = {}, Lt;
|
|
814
814
|
function Q() {
|
|
815
|
-
if (
|
|
816
|
-
|
|
815
|
+
if (Lt) return H;
|
|
816
|
+
Lt = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.checkStrictMode = H.getErrorPath = H.Type = H.useFunc = H.setEvaluated = H.evaluatedPropsToName = H.mergeEvaluated = H.eachItem = H.unescapeJsonPointer = H.escapeJsonPointer = H.escapeFragment = H.unescapeFragment = H.schemaRefOrVal = H.schemaHasRulesButRef = H.schemaHasRules = H.checkUnknownRules = H.alwaysValidSchema = H.toHash = void 0;
|
|
817
817
|
const e = J(), r = ht();
|
|
818
818
|
function S(n) {
|
|
819
819
|
const l = {};
|
|
@@ -923,25 +923,25 @@ function Q() {
|
|
|
923
923
|
}
|
|
924
924
|
H.setEvaluated = b;
|
|
925
925
|
const a = {};
|
|
926
|
-
function
|
|
926
|
+
function o(n, l) {
|
|
927
927
|
return n.scopeValue("func", {
|
|
928
928
|
ref: l,
|
|
929
929
|
code: a[l.code] || (a[l.code] = new r._Code(l.code))
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
|
-
H.useFunc =
|
|
932
|
+
H.useFunc = o;
|
|
933
933
|
var t;
|
|
934
934
|
(function(n) {
|
|
935
935
|
n[n.Num = 0] = "Num", n[n.Str = 1] = "Str";
|
|
936
936
|
})(t || (H.Type = t = {}));
|
|
937
|
-
function
|
|
937
|
+
function i(n, l, $) {
|
|
938
938
|
if (n instanceof e.Name) {
|
|
939
939
|
const j = l === t.Num;
|
|
940
940
|
return $ ? j ? (0, e._)`"[" + ${n} + "]"` : (0, e._)`"['" + ${n} + "']"` : j ? (0, e._)`"/" + ${n}` : (0, e._)`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
941
941
|
}
|
|
942
942
|
return $ ? (0, e.getProperty)(n).toString() : "/" + v(n);
|
|
943
943
|
}
|
|
944
|
-
H.getErrorPath =
|
|
944
|
+
H.getErrorPath = i;
|
|
945
945
|
function h(n, l, $ = n.opts.strictSchema) {
|
|
946
946
|
if ($) {
|
|
947
947
|
if (l = `strict mode: ${l}`, $ === !0)
|
|
@@ -951,10 +951,10 @@ function Q() {
|
|
|
951
951
|
}
|
|
952
952
|
return H.checkStrictMode = h, H;
|
|
953
953
|
}
|
|
954
|
-
var je = {},
|
|
954
|
+
var je = {}, Ht;
|
|
955
955
|
function _e() {
|
|
956
|
-
if (
|
|
957
|
-
|
|
956
|
+
if (Ht) return je;
|
|
957
|
+
Ht = 1, Object.defineProperty(je, "__esModule", { value: !0 });
|
|
958
958
|
const e = J(), r = {
|
|
959
959
|
// validation function arguments
|
|
960
960
|
data: new e.Name("data"),
|
|
@@ -986,46 +986,46 @@ function _e() {
|
|
|
986
986
|
};
|
|
987
987
|
return je.default = r, je;
|
|
988
988
|
}
|
|
989
|
-
var
|
|
989
|
+
var Gt;
|
|
990
990
|
function pt() {
|
|
991
|
-
return
|
|
991
|
+
return Gt || (Gt = 1, (function(e) {
|
|
992
992
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
993
993
|
const r = J(), S = Q(), d = _e();
|
|
994
994
|
e.keywordError = {
|
|
995
995
|
message: ({ keyword: a }) => (0, r.str)`must pass "${a}" keyword validation`
|
|
996
996
|
}, e.keyword$DataError = {
|
|
997
|
-
message: ({ keyword: a, schemaType:
|
|
997
|
+
message: ({ keyword: a, schemaType: o }) => o ? (0, r.str)`"${a}" keyword must be ${o} ($data)` : (0, r.str)`"${a}" keyword is invalid ($data)`
|
|
998
998
|
};
|
|
999
|
-
function g(a,
|
|
1000
|
-
const { it: h } = a, { gen: n, compositeRule: l, allErrors: $ } = h, j = P(a,
|
|
1001
|
-
|
|
999
|
+
function g(a, o = e.keywordError, t, i) {
|
|
1000
|
+
const { it: h } = a, { gen: n, compositeRule: l, allErrors: $ } = h, j = P(a, o, t);
|
|
1001
|
+
i ?? (l || $) ? m(n, j) : w(h, (0, r._)`[${j}]`);
|
|
1002
1002
|
}
|
|
1003
1003
|
e.reportError = g;
|
|
1004
|
-
function s(a,
|
|
1005
|
-
const { it:
|
|
1006
|
-
m(h, $), n || l || w(
|
|
1004
|
+
function s(a, o = e.keywordError, t) {
|
|
1005
|
+
const { it: i } = a, { gen: h, compositeRule: n, allErrors: l } = i, $ = P(a, o, t);
|
|
1006
|
+
m(h, $), n || l || w(i, d.default.vErrors);
|
|
1007
1007
|
}
|
|
1008
1008
|
e.reportExtraError = s;
|
|
1009
|
-
function f(a,
|
|
1010
|
-
a.assign(d.default.errors,
|
|
1009
|
+
function f(a, o) {
|
|
1010
|
+
a.assign(d.default.errors, o), a.if((0, r._)`${d.default.vErrors} !== null`, () => a.if(o, () => a.assign((0, r._)`${d.default.vErrors}.length`, o), () => a.assign(d.default.vErrors, null)));
|
|
1011
1011
|
}
|
|
1012
1012
|
e.resetErrorsCount = f;
|
|
1013
|
-
function c({ gen: a, keyword:
|
|
1013
|
+
function c({ gen: a, keyword: o, schemaValue: t, data: i, errsCount: h, it: n }) {
|
|
1014
1014
|
if (h === void 0)
|
|
1015
1015
|
throw new Error("ajv implementation error");
|
|
1016
1016
|
const l = a.name("err");
|
|
1017
1017
|
a.forRange("i", h, d.default.errors, ($) => {
|
|
1018
|
-
a.const(l, (0, r._)`${d.default.vErrors}[${$}]`), a.if((0, r._)`${l}.instancePath === undefined`, () => a.assign((0, r._)`${l}.instancePath`, (0, r.strConcat)(d.default.instancePath, n.errorPath))), a.assign((0, r._)`${l}.schemaPath`, (0, r.str)`${n.errSchemaPath}/${
|
|
1018
|
+
a.const(l, (0, r._)`${d.default.vErrors}[${$}]`), a.if((0, r._)`${l}.instancePath === undefined`, () => a.assign((0, r._)`${l}.instancePath`, (0, r.strConcat)(d.default.instancePath, n.errorPath))), a.assign((0, r._)`${l}.schemaPath`, (0, r.str)`${n.errSchemaPath}/${o}`), n.opts.verbose && (a.assign((0, r._)`${l}.schema`, t), a.assign((0, r._)`${l}.data`, i));
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
e.extendErrors = c;
|
|
1022
|
-
function m(a,
|
|
1023
|
-
const t = a.const("err",
|
|
1022
|
+
function m(a, o) {
|
|
1023
|
+
const t = a.const("err", o);
|
|
1024
1024
|
a.if((0, r._)`${d.default.vErrors} === null`, () => a.assign(d.default.vErrors, (0, r._)`[${t}]`), (0, r._)`${d.default.vErrors}.push(${t})`), a.code((0, r._)`${d.default.errors}++`);
|
|
1025
1025
|
}
|
|
1026
|
-
function w(a,
|
|
1027
|
-
const { gen: t, validateName:
|
|
1028
|
-
h.$async ? t.throw((0, r._)`new ${a.ValidationError}(${
|
|
1026
|
+
function w(a, o) {
|
|
1027
|
+
const { gen: t, validateName: i, schemaEnv: h } = a;
|
|
1028
|
+
h.$async ? t.throw((0, r._)`new ${a.ValidationError}(${o})`) : (t.assign((0, r._)`${i}.errors`, o), t.return(!1));
|
|
1029
1029
|
}
|
|
1030
1030
|
const v = {
|
|
1031
1031
|
keyword: new r.Name("keyword"),
|
|
@@ -1037,35 +1037,35 @@ function pt() {
|
|
|
1037
1037
|
schema: new r.Name("schema"),
|
|
1038
1038
|
parentSchema: new r.Name("parentSchema")
|
|
1039
1039
|
};
|
|
1040
|
-
function P(a,
|
|
1041
|
-
const { createErrors:
|
|
1042
|
-
return
|
|
1040
|
+
function P(a, o, t) {
|
|
1041
|
+
const { createErrors: i } = a.it;
|
|
1042
|
+
return i === !1 ? (0, r._)`{}` : _(a, o, t);
|
|
1043
1043
|
}
|
|
1044
|
-
function _(a,
|
|
1045
|
-
const { gen:
|
|
1044
|
+
function _(a, o, t = {}) {
|
|
1045
|
+
const { gen: i, it: h } = a, n = [
|
|
1046
1046
|
y(h, t),
|
|
1047
1047
|
p(a, t)
|
|
1048
1048
|
];
|
|
1049
|
-
return b(a,
|
|
1049
|
+
return b(a, o, n), i.object(...n);
|
|
1050
1050
|
}
|
|
1051
|
-
function y({ errorPath: a }, { instancePath:
|
|
1052
|
-
const t =
|
|
1051
|
+
function y({ errorPath: a }, { instancePath: o }) {
|
|
1052
|
+
const t = o ? (0, r.str)`${a}${(0, S.getErrorPath)(o, S.Type.Str)}` : a;
|
|
1053
1053
|
return [d.default.instancePath, (0, r.strConcat)(d.default.instancePath, t)];
|
|
1054
1054
|
}
|
|
1055
|
-
function p({ keyword: a, it: { errSchemaPath:
|
|
1056
|
-
let h =
|
|
1055
|
+
function p({ keyword: a, it: { errSchemaPath: o } }, { schemaPath: t, parentSchema: i }) {
|
|
1056
|
+
let h = i ? o : (0, r.str)`${o}/${a}`;
|
|
1057
1057
|
return t && (h = (0, r.str)`${h}${(0, S.getErrorPath)(t, S.Type.Str)}`), [v.schemaPath, h];
|
|
1058
1058
|
}
|
|
1059
|
-
function b(a, { params:
|
|
1059
|
+
function b(a, { params: o, message: t }, i) {
|
|
1060
1060
|
const { keyword: h, data: n, schemaValue: l, it: $ } = a, { opts: j, propertyName: C, topSchemaRef: D, schemaPath: V } = $;
|
|
1061
|
-
|
|
1061
|
+
i.push([v.keyword, h], [v.params, typeof o == "function" ? o(a) : o || (0, r._)`{}`]), j.messages && i.push([v.message, typeof t == "function" ? t(a) : t]), j.verbose && i.push([v.schema, l], [v.parentSchema, (0, r._)`${D}${V}`], [d.default.data, n]), C && i.push([v.propertyName, C]);
|
|
1062
1062
|
}
|
|
1063
1063
|
})(Et)), Et;
|
|
1064
1064
|
}
|
|
1065
|
-
var
|
|
1066
|
-
function
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
1065
|
+
var Jt;
|
|
1066
|
+
function hn() {
|
|
1067
|
+
if (Jt) return ge;
|
|
1068
|
+
Jt = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.boolOrEmptySchema = ge.topBoolOrEmptySchema = void 0;
|
|
1069
1069
|
const e = pt(), r = J(), S = _e(), d = {
|
|
1070
1070
|
message: "boolean schema is false"
|
|
1071
1071
|
};
|
|
@@ -1094,10 +1094,10 @@ function dn() {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return ge;
|
|
1096
1096
|
}
|
|
1097
|
-
var re = {}, $e = {},
|
|
1098
|
-
function
|
|
1099
|
-
if (
|
|
1100
|
-
|
|
1097
|
+
var re = {}, $e = {}, Wt;
|
|
1098
|
+
function Zr() {
|
|
1099
|
+
if (Wt) return $e;
|
|
1100
|
+
Wt = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.getRules = $e.isJSONType = void 0;
|
|
1101
1101
|
const e = ["string", "number", "integer", "boolean", "null", "object", "array"], r = new Set(e);
|
|
1102
1102
|
function S(g) {
|
|
1103
1103
|
return typeof g == "string" && r.has(g);
|
|
@@ -1120,10 +1120,10 @@ function Yr() {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
return $e.getRules = d, $e;
|
|
1122
1122
|
}
|
|
1123
|
-
var me = {},
|
|
1124
|
-
function
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1123
|
+
var me = {}, Bt;
|
|
1124
|
+
function xr() {
|
|
1125
|
+
if (Bt) return me;
|
|
1126
|
+
Bt = 1, Object.defineProperty(me, "__esModule", { value: !0 }), me.shouldUseRule = me.shouldUseGroup = me.schemaHasRulesForType = void 0;
|
|
1127
1127
|
function e({ schema: d, self: g }, s) {
|
|
1128
1128
|
const f = g.RULES.types[s];
|
|
1129
1129
|
return f && f !== !0 && r(d, f);
|
|
@@ -1139,53 +1139,53 @@ function Zr() {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
return me.shouldUseRule = S, me;
|
|
1141
1141
|
}
|
|
1142
|
-
var
|
|
1142
|
+
var Qt;
|
|
1143
1143
|
function mt() {
|
|
1144
|
-
if (
|
|
1145
|
-
|
|
1146
|
-
const e =
|
|
1144
|
+
if (Qt) return re;
|
|
1145
|
+
Qt = 1, Object.defineProperty(re, "__esModule", { value: !0 }), re.reportTypeError = re.checkDataTypes = re.checkDataType = re.coerceAndCheckDataType = re.getJSONTypes = re.getSchemaTypes = re.DataType = void 0;
|
|
1146
|
+
const e = Zr(), r = xr(), S = pt(), d = J(), g = Q();
|
|
1147
1147
|
var s;
|
|
1148
1148
|
(function(t) {
|
|
1149
1149
|
t[t.Correct = 0] = "Correct", t[t.Wrong = 1] = "Wrong";
|
|
1150
1150
|
})(s || (re.DataType = s = {}));
|
|
1151
1151
|
function f(t) {
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1152
|
+
const i = c(t.type);
|
|
1153
|
+
if (i.includes("null")) {
|
|
1154
1154
|
if (t.nullable === !1)
|
|
1155
1155
|
throw new Error("type: null contradicts nullable: false");
|
|
1156
1156
|
} else {
|
|
1157
|
-
if (!
|
|
1157
|
+
if (!i.length && t.nullable !== void 0)
|
|
1158
1158
|
throw new Error('"nullable" cannot be used without "type"');
|
|
1159
|
-
t.nullable === !0 &&
|
|
1159
|
+
t.nullable === !0 && i.push("null");
|
|
1160
1160
|
}
|
|
1161
|
-
return
|
|
1161
|
+
return i;
|
|
1162
1162
|
}
|
|
1163
1163
|
re.getSchemaTypes = f;
|
|
1164
1164
|
function c(t) {
|
|
1165
|
-
const
|
|
1166
|
-
if (
|
|
1167
|
-
return
|
|
1168
|
-
throw new Error("type must be JSONType or JSONType[]: " +
|
|
1165
|
+
const i = Array.isArray(t) ? t : t ? [t] : [];
|
|
1166
|
+
if (i.every(e.isJSONType))
|
|
1167
|
+
return i;
|
|
1168
|
+
throw new Error("type must be JSONType or JSONType[]: " + i.join(","));
|
|
1169
1169
|
}
|
|
1170
1170
|
re.getJSONTypes = c;
|
|
1171
|
-
function m(t,
|
|
1172
|
-
const { gen: h, data: n, opts: l } = t, $ = v(
|
|
1171
|
+
function m(t, i) {
|
|
1172
|
+
const { gen: h, data: n, opts: l } = t, $ = v(i, l.coerceTypes), j = i.length > 0 && !($.length === 0 && i.length === 1 && (0, r.schemaHasRulesForType)(t, i[0]));
|
|
1173
1173
|
if (j) {
|
|
1174
|
-
const C = p(
|
|
1174
|
+
const C = p(i, n, l.strictNumbers, s.Wrong);
|
|
1175
1175
|
h.if(C, () => {
|
|
1176
|
-
$.length ? P(t,
|
|
1176
|
+
$.length ? P(t, i, $) : a(t);
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
1179
|
return j;
|
|
1180
1180
|
}
|
|
1181
1181
|
re.coerceAndCheckDataType = m;
|
|
1182
1182
|
const w = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
1183
|
-
function v(t,
|
|
1184
|
-
return
|
|
1183
|
+
function v(t, i) {
|
|
1184
|
+
return i ? t.filter((h) => w.has(h) || i === "array" && h === "array") : [];
|
|
1185
1185
|
}
|
|
1186
|
-
function P(t,
|
|
1186
|
+
function P(t, i, h) {
|
|
1187
1187
|
const { gen: n, data: l, opts: $ } = t, j = n.let("dataType", (0, d._)`typeof ${l}`), C = n.let("coerced", (0, d._)`undefined`);
|
|
1188
|
-
$.coerceTypes === "array" && n.if((0, d._)`${j} == 'object' && Array.isArray(${l}) && ${l}.length == 1`, () => n.assign(l, (0, d._)`${l}[0]`).assign(j, (0, d._)`typeof ${l}`).if(p(
|
|
1188
|
+
$.coerceTypes === "array" && n.if((0, d._)`${j} == 'object' && Array.isArray(${l}) && ${l}.length == 1`, () => n.assign(l, (0, d._)`${l}[0]`).assign(j, (0, d._)`typeof ${l}`).if(p(i, l, $.strictNumbers), () => n.assign(C, l))), n.if((0, d._)`${C} !== undefined`);
|
|
1189
1189
|
for (const V of h)
|
|
1190
1190
|
(w.has(V) || V === "array" && $.coerceTypes === "array") && D(V);
|
|
1191
1191
|
n.else(), a(t), n.endIf(), n.if((0, d._)`${C} !== undefined`, () => {
|
|
@@ -1216,65 +1216,65 @@ function mt() {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
function _({ gen: t, parentData:
|
|
1220
|
-
t.if((0, d._)`${
|
|
1219
|
+
function _({ gen: t, parentData: i, parentDataProperty: h }, n) {
|
|
1220
|
+
t.if((0, d._)`${i} !== undefined`, () => t.assign((0, d._)`${i}[${h}]`, n));
|
|
1221
1221
|
}
|
|
1222
|
-
function y(t,
|
|
1222
|
+
function y(t, i, h, n = s.Correct) {
|
|
1223
1223
|
const l = n === s.Correct ? d.operators.EQ : d.operators.NEQ;
|
|
1224
1224
|
let $;
|
|
1225
1225
|
switch (t) {
|
|
1226
1226
|
case "null":
|
|
1227
|
-
return (0, d._)`${
|
|
1227
|
+
return (0, d._)`${i} ${l} null`;
|
|
1228
1228
|
case "array":
|
|
1229
|
-
$ = (0, d._)`Array.isArray(${
|
|
1229
|
+
$ = (0, d._)`Array.isArray(${i})`;
|
|
1230
1230
|
break;
|
|
1231
1231
|
case "object":
|
|
1232
|
-
$ = (0, d._)`${
|
|
1232
|
+
$ = (0, d._)`${i} && typeof ${i} == "object" && !Array.isArray(${i})`;
|
|
1233
1233
|
break;
|
|
1234
1234
|
case "integer":
|
|
1235
|
-
$ = j((0, d._)`!(${
|
|
1235
|
+
$ = j((0, d._)`!(${i} % 1) && !isNaN(${i})`);
|
|
1236
1236
|
break;
|
|
1237
1237
|
case "number":
|
|
1238
1238
|
$ = j();
|
|
1239
1239
|
break;
|
|
1240
1240
|
default:
|
|
1241
|
-
return (0, d._)`typeof ${
|
|
1241
|
+
return (0, d._)`typeof ${i} ${l} ${t}`;
|
|
1242
1242
|
}
|
|
1243
1243
|
return n === s.Correct ? $ : (0, d.not)($);
|
|
1244
1244
|
function j(C = d.nil) {
|
|
1245
|
-
return (0, d.and)((0, d._)`typeof ${
|
|
1245
|
+
return (0, d.and)((0, d._)`typeof ${i} == "number"`, C, h ? (0, d._)`isFinite(${i})` : d.nil);
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
1248
|
re.checkDataType = y;
|
|
1249
|
-
function p(t,
|
|
1249
|
+
function p(t, i, h, n) {
|
|
1250
1250
|
if (t.length === 1)
|
|
1251
|
-
return y(t[0],
|
|
1251
|
+
return y(t[0], i, h, n);
|
|
1252
1252
|
let l;
|
|
1253
1253
|
const $ = (0, g.toHash)(t);
|
|
1254
1254
|
if ($.array && $.object) {
|
|
1255
|
-
const j = (0, d._)`typeof ${
|
|
1256
|
-
l = $.null ? j : (0, d._)`!${
|
|
1255
|
+
const j = (0, d._)`typeof ${i} != "object"`;
|
|
1256
|
+
l = $.null ? j : (0, d._)`!${i} || ${j}`, delete $.null, delete $.array, delete $.object;
|
|
1257
1257
|
} else
|
|
1258
1258
|
l = d.nil;
|
|
1259
1259
|
$.number && delete $.integer;
|
|
1260
1260
|
for (const j in $)
|
|
1261
|
-
l = (0, d.and)(l, y(j,
|
|
1261
|
+
l = (0, d.and)(l, y(j, i, h, n));
|
|
1262
1262
|
return l;
|
|
1263
1263
|
}
|
|
1264
1264
|
re.checkDataTypes = p;
|
|
1265
1265
|
const b = {
|
|
1266
1266
|
message: ({ schema: t }) => `must be ${t}`,
|
|
1267
|
-
params: ({ schema: t, schemaValue:
|
|
1267
|
+
params: ({ schema: t, schemaValue: i }) => typeof t == "string" ? (0, d._)`{type: ${t}}` : (0, d._)`{type: ${i}}`
|
|
1268
1268
|
};
|
|
1269
1269
|
function a(t) {
|
|
1270
|
-
const
|
|
1271
|
-
(0, S.reportError)(
|
|
1270
|
+
const i = o(t);
|
|
1271
|
+
(0, S.reportError)(i, b);
|
|
1272
1272
|
}
|
|
1273
1273
|
re.reportTypeError = a;
|
|
1274
|
-
function
|
|
1275
|
-
const { gen:
|
|
1274
|
+
function o(t) {
|
|
1275
|
+
const { gen: i, data: h, schema: n } = t, l = (0, g.schemaRefOrVal)(t, n, "type");
|
|
1276
1276
|
return {
|
|
1277
|
-
gen:
|
|
1277
|
+
gen: i,
|
|
1278
1278
|
keyword: "type",
|
|
1279
1279
|
data: h,
|
|
1280
1280
|
schema: n.type,
|
|
@@ -1287,10 +1287,10 @@ function mt() {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
return re;
|
|
1289
1289
|
}
|
|
1290
|
-
var Ne = {},
|
|
1291
|
-
function
|
|
1292
|
-
if (
|
|
1293
|
-
|
|
1290
|
+
var Ne = {}, Xt;
|
|
1291
|
+
function mn() {
|
|
1292
|
+
if (Xt) return Ne;
|
|
1293
|
+
Xt = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assignDefaults = void 0;
|
|
1294
1294
|
const e = J(), r = Q();
|
|
1295
1295
|
function S(g, s) {
|
|
1296
1296
|
const { properties: f, items: c } = g.schema;
|
|
@@ -1314,24 +1314,24 @@ function fn() {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
return Ne;
|
|
1316
1316
|
}
|
|
1317
|
-
var ce = {}, Y = {},
|
|
1317
|
+
var ce = {}, Y = {}, Yt;
|
|
1318
1318
|
function le() {
|
|
1319
|
-
if (
|
|
1320
|
-
|
|
1319
|
+
if (Yt) return Y;
|
|
1320
|
+
Yt = 1, Object.defineProperty(Y, "__esModule", { value: !0 }), Y.validateUnion = Y.validateArray = Y.usePattern = Y.callValidateCode = Y.schemaProperties = Y.allSchemaProperties = Y.noPropertyInData = Y.propertyInData = Y.isOwnProperty = Y.hasPropFunc = Y.reportMissingProp = Y.checkMissingProp = Y.checkReportMissingProp = void 0;
|
|
1321
1321
|
const e = J(), r = Q(), S = _e(), d = Q();
|
|
1322
|
-
function g(t,
|
|
1322
|
+
function g(t, i) {
|
|
1323
1323
|
const { gen: h, data: n, it: l } = t;
|
|
1324
|
-
h.if(v(h, n,
|
|
1325
|
-
t.setParams({ missingProperty: (0, e._)`${
|
|
1324
|
+
h.if(v(h, n, i, l.opts.ownProperties), () => {
|
|
1325
|
+
t.setParams({ missingProperty: (0, e._)`${i}` }, !0), t.error();
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
1328
|
Y.checkReportMissingProp = g;
|
|
1329
|
-
function s({ gen: t, data:
|
|
1330
|
-
return (0, e.or)(...n.map(($) => (0, e.and)(v(t,
|
|
1329
|
+
function s({ gen: t, data: i, it: { opts: h } }, n, l) {
|
|
1330
|
+
return (0, e.or)(...n.map(($) => (0, e.and)(v(t, i, $, h.ownProperties), (0, e._)`${l} = ${$}`)));
|
|
1331
1331
|
}
|
|
1332
1332
|
Y.checkMissingProp = s;
|
|
1333
|
-
function f(t,
|
|
1334
|
-
t.setParams({ missingProperty:
|
|
1333
|
+
function f(t, i) {
|
|
1334
|
+
t.setParams({ missingProperty: i }, !0), t.error();
|
|
1335
1335
|
}
|
|
1336
1336
|
Y.reportMissingProp = f;
|
|
1337
1337
|
function c(t) {
|
|
@@ -1342,30 +1342,30 @@ function le() {
|
|
|
1342
1342
|
});
|
|
1343
1343
|
}
|
|
1344
1344
|
Y.hasPropFunc = c;
|
|
1345
|
-
function m(t,
|
|
1346
|
-
return (0, e._)`${c(t)}.call(${
|
|
1345
|
+
function m(t, i, h) {
|
|
1346
|
+
return (0, e._)`${c(t)}.call(${i}, ${h})`;
|
|
1347
1347
|
}
|
|
1348
1348
|
Y.isOwnProperty = m;
|
|
1349
|
-
function w(t,
|
|
1350
|
-
const l = (0, e._)`${
|
|
1351
|
-
return n ? (0, e._)`${l} && ${m(t,
|
|
1349
|
+
function w(t, i, h, n) {
|
|
1350
|
+
const l = (0, e._)`${i}${(0, e.getProperty)(h)} !== undefined`;
|
|
1351
|
+
return n ? (0, e._)`${l} && ${m(t, i, h)}` : l;
|
|
1352
1352
|
}
|
|
1353
1353
|
Y.propertyInData = w;
|
|
1354
|
-
function v(t,
|
|
1355
|
-
const l = (0, e._)`${
|
|
1356
|
-
return n ? (0, e.or)(l, (0, e.not)(m(t,
|
|
1354
|
+
function v(t, i, h, n) {
|
|
1355
|
+
const l = (0, e._)`${i}${(0, e.getProperty)(h)} === undefined`;
|
|
1356
|
+
return n ? (0, e.or)(l, (0, e.not)(m(t, i, h))) : l;
|
|
1357
1357
|
}
|
|
1358
1358
|
Y.noPropertyInData = v;
|
|
1359
1359
|
function P(t) {
|
|
1360
|
-
return t ? Object.keys(t).filter((
|
|
1360
|
+
return t ? Object.keys(t).filter((i) => i !== "__proto__") : [];
|
|
1361
1361
|
}
|
|
1362
1362
|
Y.allSchemaProperties = P;
|
|
1363
|
-
function _(t,
|
|
1364
|
-
return P(
|
|
1363
|
+
function _(t, i) {
|
|
1364
|
+
return P(i).filter((h) => !(0, r.alwaysValidSchema)(t, i[h]));
|
|
1365
1365
|
}
|
|
1366
1366
|
Y.schemaProperties = _;
|
|
1367
|
-
function y({ schemaCode: t, data:
|
|
1368
|
-
const L = V ? (0, e._)`${t}, ${
|
|
1367
|
+
function y({ schemaCode: t, data: i, it: { gen: h, topSchemaRef: n, schemaPath: l, errorPath: $ }, it: j }, C, D, V) {
|
|
1368
|
+
const L = V ? (0, e._)`${t}, ${i}, ${n}${l}` : i, K = [
|
|
1369
1369
|
[S.default.instancePath, (0, e.strConcat)(S.default.instancePath, $)],
|
|
1370
1370
|
[S.default.parentData, j.parentData],
|
|
1371
1371
|
[S.default.parentDataProperty, j.parentDataProperty],
|
|
@@ -1377,8 +1377,8 @@ function le() {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
Y.callValidateCode = y;
|
|
1379
1379
|
const p = (0, e._)`new RegExp`;
|
|
1380
|
-
function b({ gen: t, it: { opts:
|
|
1381
|
-
const n =
|
|
1380
|
+
function b({ gen: t, it: { opts: i } }, h) {
|
|
1381
|
+
const n = i.unicodeRegExp ? "u" : "", { regExp: l } = i.code, $ = l(h, n);
|
|
1382
1382
|
return t.scopeValue("pattern", {
|
|
1383
1383
|
key: $.toString(),
|
|
1384
1384
|
ref: $,
|
|
@@ -1387,53 +1387,53 @@ function le() {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
Y.usePattern = b;
|
|
1389
1389
|
function a(t) {
|
|
1390
|
-
const { gen:
|
|
1390
|
+
const { gen: i, data: h, keyword: n, it: l } = t, $ = i.name("valid");
|
|
1391
1391
|
if (l.allErrors) {
|
|
1392
|
-
const C =
|
|
1393
|
-
return j(() =>
|
|
1392
|
+
const C = i.let("valid", !0);
|
|
1393
|
+
return j(() => i.assign(C, !1)), C;
|
|
1394
1394
|
}
|
|
1395
|
-
return
|
|
1395
|
+
return i.var($, !0), j(() => i.break()), $;
|
|
1396
1396
|
function j(C) {
|
|
1397
|
-
const D =
|
|
1398
|
-
|
|
1397
|
+
const D = i.const("len", (0, e._)`${h}.length`);
|
|
1398
|
+
i.forRange("i", 0, D, (V) => {
|
|
1399
1399
|
t.subschema({
|
|
1400
1400
|
keyword: n,
|
|
1401
1401
|
dataProp: V,
|
|
1402
1402
|
dataPropType: r.Type.Num
|
|
1403
|
-
}, $),
|
|
1403
|
+
}, $), i.if((0, e.not)($), C);
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
Y.validateArray = a;
|
|
1408
|
-
function
|
|
1409
|
-
const { gen:
|
|
1408
|
+
function o(t) {
|
|
1409
|
+
const { gen: i, schema: h, keyword: n, it: l } = t;
|
|
1410
1410
|
if (!Array.isArray(h))
|
|
1411
1411
|
throw new Error("ajv implementation error");
|
|
1412
1412
|
if (h.some((D) => (0, r.alwaysValidSchema)(l, D)) && !l.opts.unevaluated)
|
|
1413
1413
|
return;
|
|
1414
|
-
const j =
|
|
1415
|
-
|
|
1414
|
+
const j = i.let("valid", !1), C = i.name("_valid");
|
|
1415
|
+
i.block(() => h.forEach((D, V) => {
|
|
1416
1416
|
const L = t.subschema({
|
|
1417
1417
|
keyword: n,
|
|
1418
1418
|
schemaProp: V,
|
|
1419
1419
|
compositeRule: !0
|
|
1420
1420
|
}, C);
|
|
1421
|
-
|
|
1421
|
+
i.assign(j, (0, e._)`${j} || ${C}`), t.mergeValidEvaluated(L, C) || i.if((0, e.not)(j));
|
|
1422
1422
|
})), t.result(j, () => t.reset(), () => t.error(!0));
|
|
1423
1423
|
}
|
|
1424
|
-
return Y.validateUnion =
|
|
1424
|
+
return Y.validateUnion = o, Y;
|
|
1425
1425
|
}
|
|
1426
|
-
var
|
|
1427
|
-
function
|
|
1428
|
-
if (
|
|
1429
|
-
|
|
1426
|
+
var Zt;
|
|
1427
|
+
function pn() {
|
|
1428
|
+
if (Zt) return ce;
|
|
1429
|
+
Zt = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.validateKeywordUsage = ce.validSchemaType = ce.funcKeywordCode = ce.macroKeywordCode = void 0;
|
|
1430
1430
|
const e = J(), r = _e(), S = le(), d = pt();
|
|
1431
1431
|
function g(_, y) {
|
|
1432
|
-
const { gen: p, keyword: b, schema: a, parentSchema:
|
|
1433
|
-
t.opts.validateSchema !== !1 && t.self.validateSchema(
|
|
1432
|
+
const { gen: p, keyword: b, schema: a, parentSchema: o, it: t } = _, i = y.macro.call(t.self, a, o, t), h = w(p, b, i);
|
|
1433
|
+
t.opts.validateSchema !== !1 && t.self.validateSchema(i, !0);
|
|
1434
1434
|
const n = p.name("valid");
|
|
1435
1435
|
_.subschema({
|
|
1436
|
-
schema:
|
|
1436
|
+
schema: i,
|
|
1437
1437
|
schemaPath: e.nil,
|
|
1438
1438
|
errSchemaPath: `${t.errSchemaPath}/${b}`,
|
|
1439
1439
|
topSchemaRef: h,
|
|
@@ -1443,9 +1443,9 @@ function hn() {
|
|
|
1443
1443
|
ce.macroKeywordCode = g;
|
|
1444
1444
|
function s(_, y) {
|
|
1445
1445
|
var p;
|
|
1446
|
-
const { gen: b, keyword: a, schema:
|
|
1446
|
+
const { gen: b, keyword: a, schema: o, parentSchema: t, $data: i, it: h } = _;
|
|
1447
1447
|
m(h, y);
|
|
1448
|
-
const n = !
|
|
1448
|
+
const n = !i && y.compile ? y.compile.call(h.self, o, t, h) : y.validate, l = w(b, a, n), $ = b.let("valid");
|
|
1449
1449
|
_.block$data($, j), _.ok((p = y.valid) !== null && p !== void 0 ? p : $);
|
|
1450
1450
|
function j() {
|
|
1451
1451
|
if (y.errors === !1)
|
|
@@ -1464,7 +1464,7 @@ function hn() {
|
|
|
1464
1464
|
return b.assign(K, null), V(e.nil), K;
|
|
1465
1465
|
}
|
|
1466
1466
|
function V(K = y.async ? (0, e._)`await ` : e.nil) {
|
|
1467
|
-
const B = h.opts.passContext ? r.default.this : r.default.self, x = !("compile" in y && !
|
|
1467
|
+
const B = h.opts.passContext ? r.default.this : r.default.self, x = !("compile" in y && !i || y.schema === !1);
|
|
1468
1468
|
b.assign($, (0, e._)`${K}${(0, S.callValidateCode)(_, l, B, x)}`, y.modifying);
|
|
1469
1469
|
}
|
|
1470
1470
|
function L(K) {
|
|
@@ -1496,14 +1496,14 @@ function hn() {
|
|
|
1496
1496
|
return !y.length || y.some((b) => b === "array" ? Array.isArray(_) : b === "object" ? _ && typeof _ == "object" && !Array.isArray(_) : typeof _ == b || p && typeof _ > "u");
|
|
1497
1497
|
}
|
|
1498
1498
|
ce.validSchemaType = v;
|
|
1499
|
-
function P({ schema: _, opts: y, self: p, errSchemaPath: b }, a,
|
|
1500
|
-
if (Array.isArray(a.keyword) ? !a.keyword.includes(
|
|
1499
|
+
function P({ schema: _, opts: y, self: p, errSchemaPath: b }, a, o) {
|
|
1500
|
+
if (Array.isArray(a.keyword) ? !a.keyword.includes(o) : a.keyword !== o)
|
|
1501
1501
|
throw new Error("ajv implementation error");
|
|
1502
1502
|
const t = a.dependencies;
|
|
1503
|
-
if (t?.some((
|
|
1504
|
-
throw new Error(`parent schema must have dependencies of ${
|
|
1505
|
-
if (a.validateSchema && !a.validateSchema(_[
|
|
1506
|
-
const h = `keyword "${
|
|
1503
|
+
if (t?.some((i) => !Object.prototype.hasOwnProperty.call(_, i)))
|
|
1504
|
+
throw new Error(`parent schema must have dependencies of ${o}: ${t.join(",")}`);
|
|
1505
|
+
if (a.validateSchema && !a.validateSchema(_[o])) {
|
|
1506
|
+
const h = `keyword "${o}" value is invalid at path "${b}": ` + p.errorsText(a.validateSchema.errors);
|
|
1507
1507
|
if (y.validateSchema === "log")
|
|
1508
1508
|
p.logger.error(h);
|
|
1509
1509
|
else
|
|
@@ -1512,10 +1512,10 @@ function hn() {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
return ce.validateKeywordUsage = P, ce;
|
|
1514
1514
|
}
|
|
1515
|
-
var pe = {},
|
|
1516
|
-
function
|
|
1517
|
-
if (
|
|
1518
|
-
|
|
1515
|
+
var pe = {}, xt;
|
|
1516
|
+
function yn() {
|
|
1517
|
+
if (xt) return pe;
|
|
1518
|
+
xt = 1, Object.defineProperty(pe, "__esModule", { value: !0 }), pe.extendSubschemaMode = pe.extendSubschemaData = pe.getSubschema = void 0;
|
|
1519
1519
|
const e = J(), r = Q();
|
|
1520
1520
|
function S(s, { keyword: f, schemaProp: c, schema: m, schemaPath: w, errSchemaPath: v, topSchemaRef: P }) {
|
|
1521
1521
|
if (f !== void 0 && m !== void 0)
|
|
@@ -1550,8 +1550,8 @@ function mn() {
|
|
|
1550
1550
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
1551
1551
|
const { gen: _ } = f;
|
|
1552
1552
|
if (c !== void 0) {
|
|
1553
|
-
const { errorPath: p, dataPathArr: b, opts: a } = f,
|
|
1554
|
-
y(
|
|
1553
|
+
const { errorPath: p, dataPathArr: b, opts: a } = f, o = _.let("data", (0, e._)`${f.data}${(0, e.getProperty)(c)}`, !0);
|
|
1554
|
+
y(o), s.errorPath = (0, e.str)`${p}${(0, r.getErrorPath)(c, m, a.jsPropertySyntax)}`, s.parentDataProperty = (0, e._)`${c}`, s.dataPathArr = [...b, s.parentDataProperty];
|
|
1555
1555
|
}
|
|
1556
1556
|
if (w !== void 0) {
|
|
1557
1557
|
const p = w instanceof e.Name ? w : _.let("data", w, !0);
|
|
@@ -1568,9 +1568,9 @@ function mn() {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
return pe.extendSubschemaMode = g, pe;
|
|
1570
1570
|
}
|
|
1571
|
-
var ne = {}, Rt,
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
1571
|
+
var ne = {}, Rt, er;
|
|
1572
|
+
function en() {
|
|
1573
|
+
return er || (er = 1, Rt = function e(r, S) {
|
|
1574
1574
|
if (r === S) return !0;
|
|
1575
1575
|
if (r && S && typeof r == "object" && typeof S == "object") {
|
|
1576
1576
|
if (r.constructor !== S.constructor) return !1;
|
|
@@ -1596,10 +1596,10 @@ function xr() {
|
|
|
1596
1596
|
return r !== r && S !== S;
|
|
1597
1597
|
}), Rt;
|
|
1598
1598
|
}
|
|
1599
|
-
var kt = { exports: {} },
|
|
1600
|
-
function
|
|
1601
|
-
if (
|
|
1602
|
-
|
|
1599
|
+
var kt = { exports: {} }, tr;
|
|
1600
|
+
function vn() {
|
|
1601
|
+
if (tr) return kt.exports;
|
|
1602
|
+
tr = 1;
|
|
1603
1603
|
var e = kt.exports = function(d, g, s) {
|
|
1604
1604
|
typeof g == "function" && (s = g, g = {}), s = g.cb || s;
|
|
1605
1605
|
var f = typeof s == "function" ? s : s.pre || function() {
|
|
@@ -1671,11 +1671,11 @@ function pn() {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
return kt.exports;
|
|
1673
1673
|
}
|
|
1674
|
-
var
|
|
1674
|
+
var rr;
|
|
1675
1675
|
function yt() {
|
|
1676
|
-
if (
|
|
1677
|
-
|
|
1678
|
-
const e = Q(), r =
|
|
1676
|
+
if (rr) return ne;
|
|
1677
|
+
rr = 1, Object.defineProperty(ne, "__esModule", { value: !0 }), ne.getSchemaRefs = ne.resolveUrl = ne.normalizeId = ne._getFullPath = ne.getFullPath = ne.inlineRef = void 0;
|
|
1678
|
+
const e = Q(), r = en(), S = vn(), d = /* @__PURE__ */ new Set([
|
|
1679
1679
|
"type",
|
|
1680
1680
|
"format",
|
|
1681
1681
|
"pattern",
|
|
@@ -1708,24 +1708,24 @@ function yt() {
|
|
|
1708
1708
|
for (const a in b) {
|
|
1709
1709
|
if (s.has(a))
|
|
1710
1710
|
return !0;
|
|
1711
|
-
const
|
|
1712
|
-
if (Array.isArray(
|
|
1711
|
+
const o = b[a];
|
|
1712
|
+
if (Array.isArray(o) && o.some(f) || typeof o == "object" && f(o))
|
|
1713
1713
|
return !0;
|
|
1714
1714
|
}
|
|
1715
1715
|
return !1;
|
|
1716
1716
|
}
|
|
1717
1717
|
function c(b) {
|
|
1718
1718
|
let a = 0;
|
|
1719
|
-
for (const
|
|
1720
|
-
if (
|
|
1719
|
+
for (const o in b) {
|
|
1720
|
+
if (o === "$ref")
|
|
1721
1721
|
return 1 / 0;
|
|
1722
|
-
if (a++, !d.has(
|
|
1722
|
+
if (a++, !d.has(o) && (typeof b[o] == "object" && (0, e.eachItem)(b[o], (t) => a += c(t)), a === 1 / 0))
|
|
1723
1723
|
return 1 / 0;
|
|
1724
1724
|
}
|
|
1725
1725
|
return a;
|
|
1726
1726
|
}
|
|
1727
|
-
function m(b, a = "",
|
|
1728
|
-
|
|
1727
|
+
function m(b, a = "", o) {
|
|
1728
|
+
o !== !1 && (a = P(a));
|
|
1729
1729
|
const t = b.parse(a);
|
|
1730
1730
|
return w(b, t);
|
|
1731
1731
|
}
|
|
@@ -1739,21 +1739,21 @@ function yt() {
|
|
|
1739
1739
|
return b ? b.replace(v, "") : "";
|
|
1740
1740
|
}
|
|
1741
1741
|
ne.normalizeId = P;
|
|
1742
|
-
function _(b, a,
|
|
1743
|
-
return
|
|
1742
|
+
function _(b, a, o) {
|
|
1743
|
+
return o = P(o), b.resolve(a, o);
|
|
1744
1744
|
}
|
|
1745
1745
|
ne.resolveUrl = _;
|
|
1746
1746
|
const y = /^[a-z_][-a-z0-9._]*$/i;
|
|
1747
1747
|
function p(b, a) {
|
|
1748
1748
|
if (typeof b == "boolean")
|
|
1749
1749
|
return {};
|
|
1750
|
-
const { schemaId:
|
|
1750
|
+
const { schemaId: o, uriResolver: t } = this.opts, i = P(b[o] || a), h = { "": i }, n = m(t, i, !1), l = {}, $ = /* @__PURE__ */ new Set();
|
|
1751
1751
|
return S(b, { allKeys: !0 }, (D, V, L, K) => {
|
|
1752
1752
|
if (K === void 0)
|
|
1753
1753
|
return;
|
|
1754
1754
|
const B = n + V;
|
|
1755
1755
|
let x = h[K];
|
|
1756
|
-
typeof D[
|
|
1756
|
+
typeof D[o] == "string" && (x = de.call(this, D[o])), fe.call(this, D.$anchor), fe.call(this, D.$dynamicAnchor), h[V] = x;
|
|
1757
1757
|
function de(Z) {
|
|
1758
1758
|
const ye = this.opts.uriResolver.resolve;
|
|
1759
1759
|
if (Z = P(x ? ye(x, Z) : Z), $.has(Z))
|
|
@@ -1780,11 +1780,11 @@ function yt() {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
return ne.getSchemaRefs = p, ne;
|
|
1782
1782
|
}
|
|
1783
|
-
var
|
|
1783
|
+
var nr;
|
|
1784
1784
|
function vt() {
|
|
1785
|
-
if (
|
|
1786
|
-
|
|
1787
|
-
const e =
|
|
1785
|
+
if (nr) return he;
|
|
1786
|
+
nr = 1, Object.defineProperty(he, "__esModule", { value: !0 }), he.getData = he.KeywordCxt = he.validateFunctionCode = void 0;
|
|
1787
|
+
const e = hn(), r = mt(), S = xr(), d = mt(), g = mn(), s = pn(), f = yn(), c = J(), m = _e(), w = yt(), v = Q(), P = pt();
|
|
1788
1788
|
function _(N) {
|
|
1789
1789
|
if (n(N) && ($(N), h(N))) {
|
|
1790
1790
|
a(N);
|
|
@@ -1811,10 +1811,10 @@ function vt() {
|
|
|
1811
1811
|
function a(N) {
|
|
1812
1812
|
const { schema: k, opts: q, gen: M } = N;
|
|
1813
1813
|
y(N, () => {
|
|
1814
|
-
q.$comment && k.$comment && K(N), D(N), M.let(m.default.vErrors, null), M.let(m.default.errors, 0), q.unevaluated &&
|
|
1814
|
+
q.$comment && k.$comment && K(N), D(N), M.let(m.default.vErrors, null), M.let(m.default.errors, 0), q.unevaluated && o(N), j(N), B(N);
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function o(N) {
|
|
1818
1818
|
const { gen: k, validateName: q } = N;
|
|
1819
1819
|
N.evaluated = k.const("evaluated", (0, c._)`${q}.evaluated`), k.if((0, c._)`${N.evaluated}.dynamicProps`, () => k.assign((0, c._)`${N.evaluated}.props`, (0, c._)`undefined`)), k.if((0, c._)`${N.evaluated}.dynamicItems`, () => k.assign((0, c._)`${N.evaluated}.items`, (0, c._)`undefined`));
|
|
1820
1820
|
}
|
|
@@ -1822,7 +1822,7 @@ function vt() {
|
|
|
1822
1822
|
const q = typeof N == "object" && N[k.schemaId];
|
|
1823
1823
|
return q && (k.code.source || k.code.process) ? (0, c._)`/*# sourceURL=${q} */` : c.nil;
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function i(N, k) {
|
|
1826
1826
|
if (n(N) && ($(N), h(N))) {
|
|
1827
1827
|
l(N, k);
|
|
1828
1828
|
return;
|
|
@@ -1894,12 +1894,12 @@ function vt() {
|
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
1896
|
se.jtd || Z(N, k), z.block(() => {
|
|
1897
|
-
for (const
|
|
1898
|
-
be(
|
|
1897
|
+
for (const oe of te.rules)
|
|
1898
|
+
be(oe);
|
|
1899
1899
|
be(te.post);
|
|
1900
1900
|
});
|
|
1901
|
-
function be(
|
|
1902
|
-
(0, S.shouldUseGroup)(G,
|
|
1901
|
+
function be(oe) {
|
|
1902
|
+
(0, S.shouldUseGroup)(G, oe) && (oe.type ? (z.if((0, d.checkDataType)(oe.type, ee, se.strictNumbers)), fe(N, oe), k.length === 1 && k[0] === oe.type && q && (z.else(), (0, d.reportTypeError)(N)), z.endIf()) : fe(N, oe), ue || z.if((0, c._)`${m.default.errors} === ${M || 0}`));
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
function fe(N, k) {
|
|
@@ -2041,7 +2041,7 @@ function vt() {
|
|
|
2041
2041
|
const M = (0, f.getSubschema)(this.it, k);
|
|
2042
2042
|
(0, f.extendSubschemaData)(M, this.it, k), (0, f.extendSubschemaMode)(M, k);
|
|
2043
2043
|
const z = { ...this.it, ...M, items: void 0, props: void 0 };
|
|
2044
|
-
return
|
|
2044
|
+
return i(z, q), z;
|
|
2045
2045
|
}
|
|
2046
2046
|
mergeEvaluated(k, q) {
|
|
2047
2047
|
const { it: M, gen: z } = this;
|
|
@@ -2093,10 +2093,10 @@ function vt() {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
return he.getData = W, he;
|
|
2095
2095
|
}
|
|
2096
|
-
var Ie = {},
|
|
2097
|
-
function
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2096
|
+
var Ie = {}, sr;
|
|
2097
|
+
function Ct() {
|
|
2098
|
+
if (sr) return Ie;
|
|
2099
|
+
sr = 1, Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
2100
2100
|
class e extends Error {
|
|
2101
2101
|
constructor(S) {
|
|
2102
2102
|
super("validation failed"), this.errors = S, this.ajv = this.validation = !0;
|
|
@@ -2104,10 +2104,10 @@ function Tt() {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
return Ie.default = e, Ie;
|
|
2106
2106
|
}
|
|
2107
|
-
var qe = {},
|
|
2107
|
+
var qe = {}, ar;
|
|
2108
2108
|
function _t() {
|
|
2109
|
-
if (
|
|
2110
|
-
|
|
2109
|
+
if (ar) return qe;
|
|
2110
|
+
ar = 1, Object.defineProperty(qe, "__esModule", { value: !0 });
|
|
2111
2111
|
const e = yt();
|
|
2112
2112
|
class r extends Error {
|
|
2113
2113
|
constructor(d, g, s, f) {
|
|
@@ -2116,25 +2116,25 @@ function _t() {
|
|
|
2116
2116
|
}
|
|
2117
2117
|
return qe.default = r, qe;
|
|
2118
2118
|
}
|
|
2119
|
-
var
|
|
2120
|
-
function
|
|
2121
|
-
if (
|
|
2122
|
-
|
|
2123
|
-
const e = J(), r =
|
|
2119
|
+
var ie = {}, ir;
|
|
2120
|
+
function At() {
|
|
2121
|
+
if (ir) return ie;
|
|
2122
|
+
ir = 1, Object.defineProperty(ie, "__esModule", { value: !0 }), ie.resolveSchema = ie.getCompilingSchema = ie.resolveRef = ie.compileSchema = ie.SchemaEnv = void 0;
|
|
2123
|
+
const e = J(), r = Ct(), S = _e(), d = yt(), g = Q(), s = vt();
|
|
2124
2124
|
class f {
|
|
2125
|
-
constructor(
|
|
2125
|
+
constructor(o) {
|
|
2126
2126
|
var t;
|
|
2127
2127
|
this.refs = {}, this.dynamicAnchors = {};
|
|
2128
|
-
let
|
|
2129
|
-
typeof
|
|
2128
|
+
let i;
|
|
2129
|
+
typeof o.schema == "object" && (i = o.schema), this.schema = o.schema, this.schemaId = o.schemaId, this.root = o.root || this, this.baseId = (t = o.baseId) !== null && t !== void 0 ? t : (0, d.normalizeId)(i?.[o.schemaId || "$id"]), this.schemaPath = o.schemaPath, this.localRefs = o.localRefs, this.meta = o.meta, this.$async = i?.$async, this.refs = {};
|
|
2130
2130
|
}
|
|
2131
2131
|
}
|
|
2132
|
-
|
|
2132
|
+
ie.SchemaEnv = f;
|
|
2133
2133
|
function c(a) {
|
|
2134
|
-
const
|
|
2135
|
-
if (
|
|
2136
|
-
return
|
|
2137
|
-
const t = (0, d.getFullPath)(this.opts.uriResolver, a.root.baseId), { es5:
|
|
2134
|
+
const o = v.call(this, a);
|
|
2135
|
+
if (o)
|
|
2136
|
+
return o;
|
|
2137
|
+
const t = (0, d.getFullPath)(this.opts.uriResolver, a.root.baseId), { es5: i, lines: h } = this.opts.code, { ownProperties: n } = this.opts, l = new e.CodeGen(this.scope, { es5: i, lines: h, ownProperties: n });
|
|
2138
2138
|
let $;
|
|
2139
2139
|
a.$async && ($ = l.scopeValue("Error", {
|
|
2140
2140
|
ref: r.default,
|
|
@@ -2189,59 +2189,59 @@ function Ct() {
|
|
|
2189
2189
|
this._compilations.delete(a);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
|
|
2193
|
-
function m(a,
|
|
2194
|
-
var
|
|
2195
|
-
t = (0, d.resolveUrl)(this.opts.uriResolver,
|
|
2192
|
+
ie.compileSchema = c;
|
|
2193
|
+
function m(a, o, t) {
|
|
2194
|
+
var i;
|
|
2195
|
+
t = (0, d.resolveUrl)(this.opts.uriResolver, o, t);
|
|
2196
2196
|
const h = a.refs[t];
|
|
2197
2197
|
if (h)
|
|
2198
2198
|
return h;
|
|
2199
2199
|
let n = _.call(this, a, t);
|
|
2200
2200
|
if (n === void 0) {
|
|
2201
|
-
const l = (
|
|
2202
|
-
l && (n = new f({ schema: l, schemaId: $, root: a, baseId:
|
|
2201
|
+
const l = (i = a.localRefs) === null || i === void 0 ? void 0 : i[t], { schemaId: $ } = this.opts;
|
|
2202
|
+
l && (n = new f({ schema: l, schemaId: $, root: a, baseId: o }));
|
|
2203
2203
|
}
|
|
2204
2204
|
if (n !== void 0)
|
|
2205
2205
|
return a.refs[t] = w.call(this, n);
|
|
2206
2206
|
}
|
|
2207
|
-
|
|
2207
|
+
ie.resolveRef = m;
|
|
2208
2208
|
function w(a) {
|
|
2209
2209
|
return (0, d.inlineRef)(a.schema, this.opts.inlineRefs) ? a.schema : a.validate ? a : c.call(this, a);
|
|
2210
2210
|
}
|
|
2211
2211
|
function v(a) {
|
|
2212
|
-
for (const
|
|
2213
|
-
if (P(
|
|
2214
|
-
return
|
|
2212
|
+
for (const o of this._compilations)
|
|
2213
|
+
if (P(o, a))
|
|
2214
|
+
return o;
|
|
2215
2215
|
}
|
|
2216
|
-
|
|
2217
|
-
function P(a,
|
|
2218
|
-
return a.schema ===
|
|
2216
|
+
ie.getCompilingSchema = v;
|
|
2217
|
+
function P(a, o) {
|
|
2218
|
+
return a.schema === o.schema && a.root === o.root && a.baseId === o.baseId;
|
|
2219
2219
|
}
|
|
2220
|
-
function _(a,
|
|
2220
|
+
function _(a, o) {
|
|
2221
2221
|
let t;
|
|
2222
|
-
for (; typeof (t = this.refs[
|
|
2223
|
-
|
|
2224
|
-
return t || this.schemas[
|
|
2222
|
+
for (; typeof (t = this.refs[o]) == "string"; )
|
|
2223
|
+
o = t;
|
|
2224
|
+
return t || this.schemas[o] || y.call(this, a, o);
|
|
2225
2225
|
}
|
|
2226
|
-
function y(a,
|
|
2227
|
-
const t = this.opts.uriResolver.parse(
|
|
2226
|
+
function y(a, o) {
|
|
2227
|
+
const t = this.opts.uriResolver.parse(o), i = (0, d._getFullPath)(this.opts.uriResolver, t);
|
|
2228
2228
|
let h = (0, d.getFullPath)(this.opts.uriResolver, a.baseId, void 0);
|
|
2229
|
-
if (Object.keys(a.schema).length > 0 &&
|
|
2229
|
+
if (Object.keys(a.schema).length > 0 && i === h)
|
|
2230
2230
|
return b.call(this, t, a);
|
|
2231
|
-
const n = (0, d.normalizeId)(
|
|
2231
|
+
const n = (0, d.normalizeId)(i), l = this.refs[n] || this.schemas[n];
|
|
2232
2232
|
if (typeof l == "string") {
|
|
2233
2233
|
const $ = y.call(this, a, l);
|
|
2234
2234
|
return typeof $?.schema != "object" ? void 0 : b.call(this, t, $);
|
|
2235
2235
|
}
|
|
2236
2236
|
if (typeof l?.schema == "object") {
|
|
2237
|
-
if (l.validate || c.call(this, l), n === (0, d.normalizeId)(
|
|
2237
|
+
if (l.validate || c.call(this, l), n === (0, d.normalizeId)(o)) {
|
|
2238
2238
|
const { schema: $ } = l, { schemaId: j } = this.opts, C = $[j];
|
|
2239
2239
|
return C && (h = (0, d.resolveUrl)(this.opts.uriResolver, h, C)), new f({ schema: $, schemaId: j, root: a, baseId: h });
|
|
2240
2240
|
}
|
|
2241
2241
|
return b.call(this, t, l);
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
|
-
|
|
2244
|
+
ie.resolveSchema = y;
|
|
2245
2245
|
const p = /* @__PURE__ */ new Set([
|
|
2246
2246
|
"properties",
|
|
2247
2247
|
"patternProperties",
|
|
@@ -2249,7 +2249,7 @@ function Ct() {
|
|
|
2249
2249
|
"dependencies",
|
|
2250
2250
|
"definitions"
|
|
2251
2251
|
]);
|
|
2252
|
-
function b(a, { baseId:
|
|
2252
|
+
function b(a, { baseId: o, schema: t, root: i }) {
|
|
2253
2253
|
var h;
|
|
2254
2254
|
if (((h = a.fragment) === null || h === void 0 ? void 0 : h[0]) !== "/")
|
|
2255
2255
|
return;
|
|
@@ -2261,29 +2261,29 @@ function Ct() {
|
|
|
2261
2261
|
return;
|
|
2262
2262
|
t = j;
|
|
2263
2263
|
const C = typeof t == "object" && t[this.opts.schemaId];
|
|
2264
|
-
!p.has($) && C && (
|
|
2264
|
+
!p.has($) && C && (o = (0, d.resolveUrl)(this.opts.uriResolver, o, C));
|
|
2265
2265
|
}
|
|
2266
2266
|
let n;
|
|
2267
2267
|
if (typeof t != "boolean" && t.$ref && !(0, g.schemaHasRulesButRef)(t, this.RULES)) {
|
|
2268
|
-
const $ = (0, d.resolveUrl)(this.opts.uriResolver,
|
|
2269
|
-
n = y.call(this,
|
|
2268
|
+
const $ = (0, d.resolveUrl)(this.opts.uriResolver, o, t.$ref);
|
|
2269
|
+
n = y.call(this, i, $);
|
|
2270
2270
|
}
|
|
2271
2271
|
const { schemaId: l } = this.opts;
|
|
2272
|
-
if (n = n || new f({ schema: t, schemaId: l, root:
|
|
2272
|
+
if (n = n || new f({ schema: t, schemaId: l, root: i, baseId: o }), n.schema !== n.root.schema)
|
|
2273
2273
|
return n;
|
|
2274
2274
|
}
|
|
2275
|
-
return
|
|
2275
|
+
return ie;
|
|
2276
2276
|
}
|
|
2277
|
-
const
|
|
2278
|
-
$id:
|
|
2279
|
-
description:
|
|
2280
|
-
type:
|
|
2281
|
-
required:
|
|
2282
|
-
properties:
|
|
2283
|
-
additionalProperties:
|
|
2277
|
+
const _n = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", gn = "Meta-schema for $data reference (JSON AnySchema extension proposal)", $n = "object", wn = ["$data"], bn = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, En = !1, Sn = {
|
|
2278
|
+
$id: _n,
|
|
2279
|
+
description: gn,
|
|
2280
|
+
type: $n,
|
|
2281
|
+
required: wn,
|
|
2282
|
+
properties: bn,
|
|
2283
|
+
additionalProperties: En
|
|
2284
2284
|
};
|
|
2285
2285
|
var Te = {}, Re = { exports: {} }, Ot, or;
|
|
2286
|
-
function
|
|
2286
|
+
function tn() {
|
|
2287
2287
|
if (or) return Ot;
|
|
2288
2288
|
or = 1;
|
|
2289
2289
|
const e = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), r = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -2321,29 +2321,29 @@ function en() {
|
|
|
2321
2321
|
function f(_) {
|
|
2322
2322
|
let y = 0;
|
|
2323
2323
|
const p = { error: !1, address: "", zone: "" }, b = [], a = [];
|
|
2324
|
-
let
|
|
2324
|
+
let o = !1, t = !1, i = s;
|
|
2325
2325
|
for (let h = 0; h < _.length; h++) {
|
|
2326
2326
|
const n = _[h];
|
|
2327
2327
|
if (!(n === "[" || n === "]"))
|
|
2328
2328
|
if (n === ":") {
|
|
2329
|
-
if (
|
|
2329
|
+
if (o === !0 && (t = !0), !i(a, b, p))
|
|
2330
2330
|
break;
|
|
2331
2331
|
if (++y > 7) {
|
|
2332
2332
|
p.error = !0;
|
|
2333
2333
|
break;
|
|
2334
2334
|
}
|
|
2335
|
-
h > 0 && _[h - 1] === ":" && (
|
|
2335
|
+
h > 0 && _[h - 1] === ":" && (o = !0), b.push(":");
|
|
2336
2336
|
continue;
|
|
2337
2337
|
} else if (n === "%") {
|
|
2338
|
-
if (!
|
|
2338
|
+
if (!i(a, b, p))
|
|
2339
2339
|
break;
|
|
2340
|
-
|
|
2340
|
+
i = g;
|
|
2341
2341
|
} else {
|
|
2342
2342
|
a.push(n);
|
|
2343
2343
|
continue;
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
|
-
return a.length && (
|
|
2346
|
+
return a.length && (i === g ? p.zone = a.join("") : t ? b.push(a.join("")) : b.push(S(a))), p.address = b.join(""), p;
|
|
2347
2347
|
}
|
|
2348
2348
|
function c(_) {
|
|
2349
2349
|
if (m(_, ":") < 2)
|
|
@@ -2447,11 +2447,11 @@ function en() {
|
|
|
2447
2447
|
stringArrayToHexStripped: S
|
|
2448
2448
|
}, Ot;
|
|
2449
2449
|
}
|
|
2450
|
-
var jt,
|
|
2451
|
-
function
|
|
2452
|
-
if (
|
|
2453
|
-
|
|
2454
|
-
const { isUUID: e } =
|
|
2450
|
+
var jt, ur;
|
|
2451
|
+
function Pn() {
|
|
2452
|
+
if (ur) return jt;
|
|
2453
|
+
ur = 1;
|
|
2454
|
+
const { isUUID: e } = tn(), r = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, S = (
|
|
2455
2455
|
/** @type {const} */
|
|
2456
2456
|
[
|
|
2457
2457
|
"http",
|
|
@@ -2549,7 +2549,7 @@ function En() {
|
|
|
2549
2549
|
parse: b.parse,
|
|
2550
2550
|
serialize: b.serialize
|
|
2551
2551
|
}
|
|
2552
|
-
),
|
|
2552
|
+
), i = (
|
|
2553
2553
|
/** @type {Record<SchemeName, SchemeHandler>} */
|
|
2554
2554
|
{
|
|
2555
2555
|
http: y,
|
|
@@ -2576,45 +2576,45 @@ function En() {
|
|
|
2576
2576
|
)
|
|
2577
2577
|
}
|
|
2578
2578
|
);
|
|
2579
|
-
Object.setPrototypeOf(
|
|
2579
|
+
Object.setPrototypeOf(i, null);
|
|
2580
2580
|
function h(n) {
|
|
2581
|
-
return n && (
|
|
2581
|
+
return n && (i[
|
|
2582
2582
|
/** @type {SchemeName} */
|
|
2583
2583
|
n
|
|
2584
|
-
] ||
|
|
2584
|
+
] || i[
|
|
2585
2585
|
/** @type {SchemeName} */
|
|
2586
2586
|
n.toLowerCase()
|
|
2587
2587
|
]) || void 0;
|
|
2588
2588
|
}
|
|
2589
2589
|
return jt = {
|
|
2590
2590
|
wsIsSecure: g,
|
|
2591
|
-
SCHEMES:
|
|
2591
|
+
SCHEMES: i,
|
|
2592
2592
|
isValidSchemeName: d,
|
|
2593
2593
|
getSchemeHandler: h
|
|
2594
2594
|
}, jt;
|
|
2595
2595
|
}
|
|
2596
|
-
var
|
|
2597
|
-
function
|
|
2598
|
-
if (
|
|
2599
|
-
|
|
2600
|
-
const { normalizeIPv6: e, removeDotSegments: r, recomposeAuthority: S, normalizeComponentEncoding: d, isIPv4: g, nonSimpleDomain: s } =
|
|
2601
|
-
function m(a,
|
|
2596
|
+
var cr;
|
|
2597
|
+
function Nn() {
|
|
2598
|
+
if (cr) return Re.exports;
|
|
2599
|
+
cr = 1;
|
|
2600
|
+
const { normalizeIPv6: e, removeDotSegments: r, recomposeAuthority: S, normalizeComponentEncoding: d, isIPv4: g, nonSimpleDomain: s } = tn(), { SCHEMES: f, getSchemeHandler: c } = Pn();
|
|
2601
|
+
function m(a, o) {
|
|
2602
2602
|
return typeof a == "string" ? a = /** @type {T} */
|
|
2603
|
-
_(p(a,
|
|
2604
|
-
p(_(a,
|
|
2603
|
+
_(p(a, o), o) : typeof a == "object" && (a = /** @type {T} */
|
|
2604
|
+
p(_(a, o), o)), a;
|
|
2605
2605
|
}
|
|
2606
|
-
function w(a,
|
|
2607
|
-
const
|
|
2608
|
-
return
|
|
2606
|
+
function w(a, o, t) {
|
|
2607
|
+
const i = t ? Object.assign({ scheme: "null" }, t) : { scheme: "null" }, h = v(p(a, i), p(o, i), i, !0);
|
|
2608
|
+
return i.skipEscape = !0, _(h, i);
|
|
2609
2609
|
}
|
|
2610
|
-
function v(a,
|
|
2610
|
+
function v(a, o, t, i) {
|
|
2611
2611
|
const h = {};
|
|
2612
|
-
return
|
|
2612
|
+
return i || (a = p(_(a, t), t), o = p(_(o, t), t)), t = t || {}, !t.tolerant && o.scheme ? (h.scheme = o.scheme, h.userinfo = o.userinfo, h.host = o.host, h.port = o.port, h.path = r(o.path || ""), h.query = o.query) : (o.userinfo !== void 0 || o.host !== void 0 || o.port !== void 0 ? (h.userinfo = o.userinfo, h.host = o.host, h.port = o.port, h.path = r(o.path || ""), h.query = o.query) : (o.path ? (o.path[0] === "/" ? h.path = r(o.path) : ((a.userinfo !== void 0 || a.host !== void 0 || a.port !== void 0) && !a.path ? h.path = "/" + o.path : a.path ? h.path = a.path.slice(0, a.path.lastIndexOf("/") + 1) + o.path : h.path = o.path, h.path = r(h.path)), h.query = o.query) : (h.path = a.path, o.query !== void 0 ? h.query = o.query : h.query = a.query), h.userinfo = a.userinfo, h.host = a.host, h.port = a.port), h.scheme = a.scheme), h.fragment = o.fragment, h;
|
|
2613
2613
|
}
|
|
2614
|
-
function P(a,
|
|
2615
|
-
return typeof a == "string" ? (a = unescape(a), a = _(d(p(a, t), !0), { ...t, skipEscape: !0 })) : typeof a == "object" && (a = _(d(a, !0), { ...t, skipEscape: !0 })), typeof
|
|
2614
|
+
function P(a, o, t) {
|
|
2615
|
+
return typeof a == "string" ? (a = unescape(a), a = _(d(p(a, t), !0), { ...t, skipEscape: !0 })) : typeof a == "object" && (a = _(d(a, !0), { ...t, skipEscape: !0 })), typeof o == "string" ? (o = unescape(o), o = _(d(p(o, t), !0), { ...t, skipEscape: !0 })) : typeof o == "object" && (o = _(d(o, !0), { ...t, skipEscape: !0 })), a.toLowerCase() === o.toLowerCase();
|
|
2616
2616
|
}
|
|
2617
|
-
function _(a,
|
|
2617
|
+
function _(a, o) {
|
|
2618
2618
|
const t = {
|
|
2619
2619
|
host: a.host,
|
|
2620
2620
|
scheme: a.scheme,
|
|
@@ -2630,18 +2630,18 @@ function Sn() {
|
|
|
2630
2630
|
resourceName: a.resourceName,
|
|
2631
2631
|
secure: a.secure,
|
|
2632
2632
|
error: ""
|
|
2633
|
-
},
|
|
2634
|
-
n && n.serialize && n.serialize(t,
|
|
2633
|
+
}, i = Object.assign({}, o), h = [], n = c(i.scheme || t.scheme);
|
|
2634
|
+
n && n.serialize && n.serialize(t, i), t.path !== void 0 && (i.skipEscape ? t.path = unescape(t.path) : (t.path = escape(t.path), t.scheme !== void 0 && (t.path = t.path.split("%3A").join(":")))), i.reference !== "suffix" && t.scheme && h.push(t.scheme, ":");
|
|
2635
2635
|
const l = S(t);
|
|
2636
|
-
if (l !== void 0 && (
|
|
2636
|
+
if (l !== void 0 && (i.reference !== "suffix" && h.push("//"), h.push(l), t.path && t.path[0] !== "/" && h.push("/")), t.path !== void 0) {
|
|
2637
2637
|
let $ = t.path;
|
|
2638
|
-
!
|
|
2638
|
+
!i.absolutePath && (!n || !n.absolutePath) && ($ = r($)), l === void 0 && $[0] === "/" && $[1] === "/" && ($ = "/%2F" + $.slice(2)), h.push($);
|
|
2639
2639
|
}
|
|
2640
2640
|
return t.query !== void 0 && h.push("?", t.query), t.fragment !== void 0 && h.push("#", t.fragment), h.join("");
|
|
2641
2641
|
}
|
|
2642
2642
|
const y = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
2643
|
-
function p(a,
|
|
2644
|
-
const t = Object.assign({},
|
|
2643
|
+
function p(a, o) {
|
|
2644
|
+
const t = Object.assign({}, o), i = {
|
|
2645
2645
|
scheme: void 0,
|
|
2646
2646
|
userinfo: void 0,
|
|
2647
2647
|
host: "",
|
|
@@ -2654,24 +2654,24 @@ function Sn() {
|
|
|
2654
2654
|
t.reference === "suffix" && (t.scheme ? a = t.scheme + ":" + a : a = "//" + a);
|
|
2655
2655
|
const n = a.match(y);
|
|
2656
2656
|
if (n) {
|
|
2657
|
-
if (
|
|
2658
|
-
if (g(
|
|
2659
|
-
const j = e(
|
|
2660
|
-
|
|
2657
|
+
if (i.scheme = n[1], i.userinfo = n[3], i.host = n[4], i.port = parseInt(n[5], 10), i.path = n[6] || "", i.query = n[7], i.fragment = n[8], isNaN(i.port) && (i.port = n[5]), i.host)
|
|
2658
|
+
if (g(i.host) === !1) {
|
|
2659
|
+
const j = e(i.host);
|
|
2660
|
+
i.host = j.host.toLowerCase(), h = j.isIPV6;
|
|
2661
2661
|
} else
|
|
2662
2662
|
h = !0;
|
|
2663
|
-
|
|
2664
|
-
const l = c(t.scheme ||
|
|
2665
|
-
if (!t.unicodeSupport && (!l || !l.unicodeSupport) &&
|
|
2663
|
+
i.scheme === void 0 && i.userinfo === void 0 && i.host === void 0 && i.port === void 0 && i.query === void 0 && !i.path ? i.reference = "same-document" : i.scheme === void 0 ? i.reference = "relative" : i.fragment === void 0 ? i.reference = "absolute" : i.reference = "uri", t.reference && t.reference !== "suffix" && t.reference !== i.reference && (i.error = i.error || "URI is not a " + t.reference + " reference.");
|
|
2664
|
+
const l = c(t.scheme || i.scheme);
|
|
2665
|
+
if (!t.unicodeSupport && (!l || !l.unicodeSupport) && i.host && (t.domainHost || l && l.domainHost) && h === !1 && s(i.host))
|
|
2666
2666
|
try {
|
|
2667
|
-
|
|
2667
|
+
i.host = URL.domainToASCII(i.host.toLowerCase());
|
|
2668
2668
|
} catch ($) {
|
|
2669
|
-
|
|
2669
|
+
i.error = i.error || "Host's domain name can not be converted to ASCII: " + $;
|
|
2670
2670
|
}
|
|
2671
|
-
(!l || l && !l.skipNormalize) && (a.indexOf("%") !== -1 && (
|
|
2671
|
+
(!l || l && !l.skipNormalize) && (a.indexOf("%") !== -1 && (i.scheme !== void 0 && (i.scheme = unescape(i.scheme)), i.host !== void 0 && (i.host = unescape(i.host))), i.path && (i.path = escape(unescape(i.path))), i.fragment && (i.fragment = encodeURI(decodeURIComponent(i.fragment)))), l && l.parse && l.parse(i, t);
|
|
2672
2672
|
} else
|
|
2673
|
-
|
|
2674
|
-
return
|
|
2673
|
+
i.error = i.error || "URI can not be parsed.";
|
|
2674
|
+
return i;
|
|
2675
2675
|
}
|
|
2676
2676
|
const b = {
|
|
2677
2677
|
SCHEMES: f,
|
|
@@ -2684,16 +2684,16 @@ function Sn() {
|
|
|
2684
2684
|
};
|
|
2685
2685
|
return Re.exports = b, Re.exports.default = b, Re.exports.fastUri = b, Re.exports;
|
|
2686
2686
|
}
|
|
2687
|
-
var
|
|
2688
|
-
function
|
|
2689
|
-
if (
|
|
2690
|
-
|
|
2691
|
-
const e =
|
|
2687
|
+
var lr;
|
|
2688
|
+
function Rn() {
|
|
2689
|
+
if (lr) return Te;
|
|
2690
|
+
lr = 1, Object.defineProperty(Te, "__esModule", { value: !0 });
|
|
2691
|
+
const e = Nn();
|
|
2692
2692
|
return e.code = 'require("ajv/dist/runtime/uri").default', Te.default = e, Te;
|
|
2693
2693
|
}
|
|
2694
|
-
var
|
|
2695
|
-
function
|
|
2696
|
-
return
|
|
2694
|
+
var dr;
|
|
2695
|
+
function kn() {
|
|
2696
|
+
return dr || (dr = 1, (function(e) {
|
|
2697
2697
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
2698
2698
|
var r = vt();
|
|
2699
2699
|
Object.defineProperty(e, "KeywordCxt", { enumerable: !0, get: function() {
|
|
@@ -2713,7 +2713,7 @@ function Nn() {
|
|
|
2713
2713
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
2714
2714
|
return S.CodeGen;
|
|
2715
2715
|
} });
|
|
2716
|
-
const d =
|
|
2716
|
+
const d = Ct(), g = _t(), s = Zr(), f = At(), c = J(), m = yt(), w = mt(), v = Q(), P = Sn, _ = Rn(), y = (A, R) => new RegExp(A, R);
|
|
2717
2717
|
y.code = "new RegExp";
|
|
2718
2718
|
const p = ["removeAdditional", "useDefaults", "coerceTypes"], b = /* @__PURE__ */ new Set([
|
|
2719
2719
|
"validate",
|
|
@@ -2745,21 +2745,21 @@ function Nn() {
|
|
|
2745
2745
|
cache: "Map is used as cache, schema object as key.",
|
|
2746
2746
|
serialize: "Map is used as cache, schema object as key.",
|
|
2747
2747
|
ajvErrors: "It is default now."
|
|
2748
|
-
},
|
|
2748
|
+
}, o = {
|
|
2749
2749
|
ignoreKeywordsWithRef: "",
|
|
2750
2750
|
jsPropertySyntax: "",
|
|
2751
2751
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
2752
2752
|
}, t = 200;
|
|
2753
|
-
function
|
|
2754
|
-
var R, T, O, u, E, I, U, F, X, W, N, k, q, M, z, G, ee, ue, se, ae, te, be,
|
|
2755
|
-
const Pe = A.strict, wt = (R = A.code) === null || R === void 0 ? void 0 : R.optimize,
|
|
2753
|
+
function i(A) {
|
|
2754
|
+
var R, T, O, u, E, I, U, F, X, W, N, k, q, M, z, G, ee, ue, se, ae, te, be, oe, gt, $t;
|
|
2755
|
+
const Pe = A.strict, wt = (R = A.code) === null || R === void 0 ? void 0 : R.optimize, Dt = wt === !0 || wt === void 0 ? 1 : wt || 0, Vt = (O = (T = A.code) === null || T === void 0 ? void 0 : T.regExp) !== null && O !== void 0 ? O : y, an = (u = A.uriResolver) !== null && u !== void 0 ? u : _.default;
|
|
2756
2756
|
return {
|
|
2757
2757
|
strictSchema: (I = (E = A.strictSchema) !== null && E !== void 0 ? E : Pe) !== null && I !== void 0 ? I : !0,
|
|
2758
2758
|
strictNumbers: (F = (U = A.strictNumbers) !== null && U !== void 0 ? U : Pe) !== null && F !== void 0 ? F : !0,
|
|
2759
2759
|
strictTypes: (W = (X = A.strictTypes) !== null && X !== void 0 ? X : Pe) !== null && W !== void 0 ? W : "log",
|
|
2760
2760
|
strictTuples: (k = (N = A.strictTuples) !== null && N !== void 0 ? N : Pe) !== null && k !== void 0 ? k : "log",
|
|
2761
2761
|
strictRequired: (M = (q = A.strictRequired) !== null && q !== void 0 ? q : Pe) !== null && M !== void 0 ? M : !1,
|
|
2762
|
-
code: A.code ? { ...A.code, optimize:
|
|
2762
|
+
code: A.code ? { ...A.code, optimize: Dt, regExp: Vt } : { optimize: Dt, regExp: Vt },
|
|
2763
2763
|
loopRequired: (z = A.loopRequired) !== null && z !== void 0 ? z : t,
|
|
2764
2764
|
loopEnum: (G = A.loopEnum) !== null && G !== void 0 ? G : t,
|
|
2765
2765
|
meta: (ee = A.meta) !== null && ee !== void 0 ? ee : !0,
|
|
@@ -2768,19 +2768,19 @@ function Nn() {
|
|
|
2768
2768
|
schemaId: (ae = A.schemaId) !== null && ae !== void 0 ? ae : "$id",
|
|
2769
2769
|
addUsedSchema: (te = A.addUsedSchema) !== null && te !== void 0 ? te : !0,
|
|
2770
2770
|
validateSchema: (be = A.validateSchema) !== null && be !== void 0 ? be : !0,
|
|
2771
|
-
validateFormats: (
|
|
2771
|
+
validateFormats: (oe = A.validateFormats) !== null && oe !== void 0 ? oe : !0,
|
|
2772
2772
|
unicodeRegExp: (gt = A.unicodeRegExp) !== null && gt !== void 0 ? gt : !0,
|
|
2773
2773
|
int32range: ($t = A.int32range) !== null && $t !== void 0 ? $t : !0,
|
|
2774
|
-
uriResolver:
|
|
2774
|
+
uriResolver: an
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
2777
2777
|
class h {
|
|
2778
2778
|
constructor(R = {}) {
|
|
2779
|
-
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), R = this.opts = { ...R, ...
|
|
2779
|
+
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), R = this.opts = { ...R, ...i(R) };
|
|
2780
2780
|
const { es5: T, lines: O } = this.opts.code;
|
|
2781
2781
|
this.scope = new c.ValueScope({ scope: {}, prefixes: b, es5: T, lines: O }), this.logger = L(R.logger);
|
|
2782
2782
|
const u = R.validateFormats;
|
|
2783
|
-
R.validateFormats = !1, this.RULES = (0, s.getRules)(), n.call(this, a, R, "NOT SUPPORTED"), n.call(this,
|
|
2783
|
+
R.validateFormats = !1, this.RULES = (0, s.getRules)(), n.call(this, a, R, "NOT SUPPORTED"), n.call(this, o, R, "DEPRECATED", "warn"), this._metaOpts = D.call(this), R.formats && j.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), R.keywords && C.call(this, R.keywords), typeof R.meta == "object" && this.addMetaSchema(R.meta), $.call(this), R.validateFormats = u;
|
|
2784
2784
|
}
|
|
2785
2785
|
_addVocabularies() {
|
|
2786
2786
|
this.addKeyword("$async");
|
|
@@ -3134,10 +3134,10 @@ function Nn() {
|
|
|
3134
3134
|
}
|
|
3135
3135
|
})(bt)), bt;
|
|
3136
3136
|
}
|
|
3137
|
-
var Ce = {}, Ae = {}, Me = {},
|
|
3138
|
-
function
|
|
3139
|
-
if (
|
|
3140
|
-
|
|
3137
|
+
var Ce = {}, Ae = {}, Me = {}, fr;
|
|
3138
|
+
function On() {
|
|
3139
|
+
if (fr) return Me;
|
|
3140
|
+
fr = 1, Object.defineProperty(Me, "__esModule", { value: !0 });
|
|
3141
3141
|
const e = {
|
|
3142
3142
|
keyword: "id",
|
|
3143
3143
|
code() {
|
|
@@ -3146,23 +3146,23 @@ function Rn() {
|
|
|
3146
3146
|
};
|
|
3147
3147
|
return Me.default = e, Me;
|
|
3148
3148
|
}
|
|
3149
|
-
var ve = {},
|
|
3150
|
-
function
|
|
3151
|
-
if (
|
|
3152
|
-
|
|
3153
|
-
const e = _t(), r = le(), S = J(), d = _e(), g =
|
|
3149
|
+
var ve = {}, hr;
|
|
3150
|
+
function jn() {
|
|
3151
|
+
if (hr) return ve;
|
|
3152
|
+
hr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.callRef = ve.getValidate = void 0;
|
|
3153
|
+
const e = _t(), r = le(), S = J(), d = _e(), g = At(), s = Q(), f = {
|
|
3154
3154
|
keyword: "$ref",
|
|
3155
3155
|
schemaType: "string",
|
|
3156
3156
|
code(w) {
|
|
3157
|
-
const { gen: v, schema: P, it: _ } = w, { baseId: y, schemaEnv: p, validateName: b, opts: a, self:
|
|
3157
|
+
const { gen: v, schema: P, it: _ } = w, { baseId: y, schemaEnv: p, validateName: b, opts: a, self: o } = _, { root: t } = p;
|
|
3158
3158
|
if ((P === "#" || P === "#/") && y === t.baseId)
|
|
3159
3159
|
return h();
|
|
3160
|
-
const
|
|
3161
|
-
if (
|
|
3160
|
+
const i = g.resolveRef.call(o, t, y, P);
|
|
3161
|
+
if (i === void 0)
|
|
3162
3162
|
throw new e.default(_.opts.uriResolver, y, P);
|
|
3163
|
-
if (
|
|
3164
|
-
return n(
|
|
3165
|
-
return l(
|
|
3163
|
+
if (i instanceof g.SchemaEnv)
|
|
3164
|
+
return n(i);
|
|
3165
|
+
return l(i);
|
|
3166
3166
|
function h() {
|
|
3167
3167
|
if (p === t)
|
|
3168
3168
|
return m(w, b, p, p.$async);
|
|
@@ -3191,9 +3191,9 @@ function kn() {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
ve.getValidate = c;
|
|
3193
3193
|
function m(w, v, P, _) {
|
|
3194
|
-
const { gen: y, it: p } = w, { allErrors: b, schemaEnv: a, opts:
|
|
3195
|
-
_ ?
|
|
3196
|
-
function
|
|
3194
|
+
const { gen: y, it: p } = w, { allErrors: b, schemaEnv: a, opts: o } = p, t = o.passContext ? d.default.this : S.nil;
|
|
3195
|
+
_ ? i() : h();
|
|
3196
|
+
function i() {
|
|
3197
3197
|
if (!a.$async)
|
|
3198
3198
|
throw new Error("async schema referenced by sync schema");
|
|
3199
3199
|
const $ = y.let("valid");
|
|
@@ -3233,11 +3233,11 @@ function kn() {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
return ve.callRef = m, ve.default = f, ve;
|
|
3235
3235
|
}
|
|
3236
|
-
var
|
|
3237
|
-
function
|
|
3238
|
-
if (
|
|
3239
|
-
|
|
3240
|
-
const e =
|
|
3236
|
+
var mr;
|
|
3237
|
+
function In() {
|
|
3238
|
+
if (mr) return Ae;
|
|
3239
|
+
mr = 1, Object.defineProperty(Ae, "__esModule", { value: !0 });
|
|
3240
|
+
const e = On(), r = jn(), S = [
|
|
3241
3241
|
"$schema",
|
|
3242
3242
|
"$id",
|
|
3243
3243
|
"$defs",
|
|
@@ -3249,10 +3249,10 @@ function On() {
|
|
|
3249
3249
|
];
|
|
3250
3250
|
return Ae.default = S, Ae;
|
|
3251
3251
|
}
|
|
3252
|
-
var De = {}, Ve = {},
|
|
3253
|
-
function
|
|
3254
|
-
if (
|
|
3255
|
-
|
|
3252
|
+
var De = {}, Ve = {}, pr;
|
|
3253
|
+
function qn() {
|
|
3254
|
+
if (pr) return Ve;
|
|
3255
|
+
pr = 1, Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
3256
3256
|
const e = J(), r = e.operators, S = {
|
|
3257
3257
|
maximum: { okStr: "<=", ok: r.LTE, fail: r.GT },
|
|
3258
3258
|
minimum: { okStr: ">=", ok: r.GTE, fail: r.LT },
|
|
@@ -3274,10 +3274,10 @@ function jn() {
|
|
|
3274
3274
|
};
|
|
3275
3275
|
return Ve.default = g, Ve;
|
|
3276
3276
|
}
|
|
3277
|
-
var Ue = {},
|
|
3278
|
-
function
|
|
3279
|
-
if (
|
|
3280
|
-
|
|
3277
|
+
var Ue = {}, yr;
|
|
3278
|
+
function Tn() {
|
|
3279
|
+
if (yr) return Ue;
|
|
3280
|
+
yr = 1, Object.defineProperty(Ue, "__esModule", { value: !0 });
|
|
3281
3281
|
const e = J(), S = {
|
|
3282
3282
|
keyword: "multipleOf",
|
|
3283
3283
|
type: "number",
|
|
@@ -3294,10 +3294,10 @@ function In() {
|
|
|
3294
3294
|
};
|
|
3295
3295
|
return Ue.default = S, Ue;
|
|
3296
3296
|
}
|
|
3297
|
-
var ze = {}, Fe = {},
|
|
3298
|
-
function
|
|
3299
|
-
if (
|
|
3300
|
-
|
|
3297
|
+
var ze = {}, Fe = {}, vr;
|
|
3298
|
+
function Cn() {
|
|
3299
|
+
if (vr) return Fe;
|
|
3300
|
+
vr = 1, Object.defineProperty(Fe, "__esModule", { value: !0 });
|
|
3301
3301
|
function e(r) {
|
|
3302
3302
|
const S = r.length;
|
|
3303
3303
|
let d = 0, g = 0, s;
|
|
@@ -3307,11 +3307,11 @@ function qn() {
|
|
|
3307
3307
|
}
|
|
3308
3308
|
return Fe.default = e, e.code = 'require("ajv/dist/runtime/ucs2length").default', Fe;
|
|
3309
3309
|
}
|
|
3310
|
-
var
|
|
3311
|
-
function
|
|
3312
|
-
if (
|
|
3313
|
-
|
|
3314
|
-
const e = J(), r = Q(), S =
|
|
3310
|
+
var _r;
|
|
3311
|
+
function An() {
|
|
3312
|
+
if (_r) return ze;
|
|
3313
|
+
_r = 1, Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
3314
|
+
const e = J(), r = Q(), S = Cn(), g = {
|
|
3315
3315
|
keyword: ["maxLength", "minLength"],
|
|
3316
3316
|
type: "string",
|
|
3317
3317
|
schemaType: "number",
|
|
@@ -3330,10 +3330,10 @@ function Tn() {
|
|
|
3330
3330
|
};
|
|
3331
3331
|
return ze.default = g, ze;
|
|
3332
3332
|
}
|
|
3333
|
-
var Ke = {},
|
|
3334
|
-
function
|
|
3335
|
-
if (
|
|
3336
|
-
|
|
3333
|
+
var Ke = {}, gr;
|
|
3334
|
+
function Mn() {
|
|
3335
|
+
if (gr) return Ke;
|
|
3336
|
+
gr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 });
|
|
3337
3337
|
const e = le(), r = J(), d = {
|
|
3338
3338
|
keyword: "pattern",
|
|
3339
3339
|
type: "string",
|
|
@@ -3350,10 +3350,10 @@ function Cn() {
|
|
|
3350
3350
|
};
|
|
3351
3351
|
return Ke.default = d, Ke;
|
|
3352
3352
|
}
|
|
3353
|
-
var Le = {},
|
|
3354
|
-
function
|
|
3355
|
-
if (
|
|
3356
|
-
|
|
3353
|
+
var Le = {}, $r;
|
|
3354
|
+
function Dn() {
|
|
3355
|
+
if ($r) return Le;
|
|
3356
|
+
$r = 1, Object.defineProperty(Le, "__esModule", { value: !0 });
|
|
3357
3357
|
const e = J(), S = {
|
|
3358
3358
|
keyword: ["maxProperties", "minProperties"],
|
|
3359
3359
|
type: "object",
|
|
@@ -3373,10 +3373,10 @@ function An() {
|
|
|
3373
3373
|
};
|
|
3374
3374
|
return Le.default = S, Le;
|
|
3375
3375
|
}
|
|
3376
|
-
var He = {},
|
|
3377
|
-
function
|
|
3378
|
-
if (
|
|
3379
|
-
|
|
3376
|
+
var He = {}, wr;
|
|
3377
|
+
function Vn() {
|
|
3378
|
+
if (wr) return He;
|
|
3379
|
+
wr = 1, Object.defineProperty(He, "__esModule", { value: !0 });
|
|
3380
3380
|
const e = le(), r = J(), S = Q(), g = {
|
|
3381
3381
|
keyword: "required",
|
|
3382
3382
|
type: "object",
|
|
@@ -3392,9 +3392,9 @@ function Mn() {
|
|
|
3392
3392
|
return;
|
|
3393
3393
|
const y = c.length >= _.loopRequired;
|
|
3394
3394
|
if (P.allErrors ? p() : b(), _.strictRequired) {
|
|
3395
|
-
const t = s.parentSchema.properties, { definedProperties:
|
|
3395
|
+
const t = s.parentSchema.properties, { definedProperties: i } = s.it;
|
|
3396
3396
|
for (const h of c)
|
|
3397
|
-
if (t?.[h] === void 0 && !
|
|
3397
|
+
if (t?.[h] === void 0 && !i.has(h)) {
|
|
3398
3398
|
const n = P.schemaEnv.baseId + P.errSchemaPath, l = `required property "${h}" is not defined at "${n}" (strictRequired)`;
|
|
3399
3399
|
(0, S.checkStrictMode)(P, l, P.opts.strictRequired);
|
|
3400
3400
|
}
|
|
@@ -3409,8 +3409,8 @@ function Mn() {
|
|
|
3409
3409
|
function b() {
|
|
3410
3410
|
const t = f.let("missing");
|
|
3411
3411
|
if (y || v) {
|
|
3412
|
-
const
|
|
3413
|
-
s.block$data(
|
|
3412
|
+
const i = f.let("valid", !0);
|
|
3413
|
+
s.block$data(i, () => o(t, i)), s.ok(i);
|
|
3414
3414
|
} else
|
|
3415
3415
|
f.if((0, e.checkMissingProp)(s, c, t)), (0, e.reportMissingProp)(s, t), f.else();
|
|
3416
3416
|
}
|
|
@@ -3419,9 +3419,9 @@ function Mn() {
|
|
|
3419
3419
|
s.setParams({ missingProperty: t }), f.if((0, e.noPropertyInData)(f, w, t, _.ownProperties), () => s.error());
|
|
3420
3420
|
});
|
|
3421
3421
|
}
|
|
3422
|
-
function
|
|
3422
|
+
function o(t, i) {
|
|
3423
3423
|
s.setParams({ missingProperty: t }), f.forOf(t, m, () => {
|
|
3424
|
-
f.assign(
|
|
3424
|
+
f.assign(i, (0, e.propertyInData)(f, w, t, _.ownProperties)), f.if((0, r.not)(i), () => {
|
|
3425
3425
|
s.error(), f.break();
|
|
3426
3426
|
});
|
|
3427
3427
|
}, r.nil);
|
|
@@ -3430,10 +3430,10 @@ function Mn() {
|
|
|
3430
3430
|
};
|
|
3431
3431
|
return He.default = g, He;
|
|
3432
3432
|
}
|
|
3433
|
-
var Ge = {},
|
|
3434
|
-
function
|
|
3435
|
-
if (
|
|
3436
|
-
|
|
3433
|
+
var Ge = {}, br;
|
|
3434
|
+
function Un() {
|
|
3435
|
+
if (br) return Ge;
|
|
3436
|
+
br = 1, Object.defineProperty(Ge, "__esModule", { value: !0 });
|
|
3437
3437
|
const e = J(), S = {
|
|
3438
3438
|
keyword: ["maxItems", "minItems"],
|
|
3439
3439
|
type: "array",
|
|
@@ -3453,18 +3453,18 @@ function Dn() {
|
|
|
3453
3453
|
};
|
|
3454
3454
|
return Ge.default = S, Ge;
|
|
3455
3455
|
}
|
|
3456
|
-
var Je = {}, We = {},
|
|
3457
|
-
function
|
|
3458
|
-
if (
|
|
3459
|
-
|
|
3460
|
-
const e =
|
|
3456
|
+
var Je = {}, We = {}, Er;
|
|
3457
|
+
function Mt() {
|
|
3458
|
+
if (Er) return We;
|
|
3459
|
+
Er = 1, Object.defineProperty(We, "__esModule", { value: !0 });
|
|
3460
|
+
const e = en();
|
|
3461
3461
|
return e.code = 'require("ajv/dist/runtime/equal").default', We.default = e, We;
|
|
3462
3462
|
}
|
|
3463
|
-
var
|
|
3464
|
-
function
|
|
3465
|
-
if (
|
|
3466
|
-
|
|
3467
|
-
const e = mt(), r = J(), S = Q(), d =
|
|
3463
|
+
var Sr;
|
|
3464
|
+
function zn() {
|
|
3465
|
+
if (Sr) return Je;
|
|
3466
|
+
Sr = 1, Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
3467
|
+
const e = mt(), r = J(), S = Q(), d = Mt(), s = {
|
|
3468
3468
|
keyword: "uniqueItems",
|
|
3469
3469
|
type: "array",
|
|
3470
3470
|
schemaType: "boolean",
|
|
@@ -3481,9 +3481,9 @@ function Vn() {
|
|
|
3481
3481
|
f.block$data(p, a, (0, r._)`${_} === false`), f.ok(p);
|
|
3482
3482
|
function a() {
|
|
3483
3483
|
const h = c.let("i", (0, r._)`${m}.length`), n = c.let("j");
|
|
3484
|
-
f.setParams({ i: h, j: n }), c.assign(p, !0), c.if((0, r._)`${h} > 1`, () => (
|
|
3484
|
+
f.setParams({ i: h, j: n }), c.assign(p, !0), c.if((0, r._)`${h} > 1`, () => (o() ? t : i)(h, n));
|
|
3485
3485
|
}
|
|
3486
|
-
function
|
|
3486
|
+
function o() {
|
|
3487
3487
|
return b.length > 0 && !b.some((h) => h === "object" || h === "array");
|
|
3488
3488
|
}
|
|
3489
3489
|
function t(h, n) {
|
|
@@ -3494,7 +3494,7 @@ function Vn() {
|
|
|
3494
3494
|
}).code((0, r._)`${j}[${l}] = ${h}`);
|
|
3495
3495
|
});
|
|
3496
3496
|
}
|
|
3497
|
-
function
|
|
3497
|
+
function i(h, n) {
|
|
3498
3498
|
const l = (0, S.useFunc)(c, d.default), $ = c.name("outer");
|
|
3499
3499
|
c.label($).for((0, r._)`;${h}--;`, () => c.for((0, r._)`${n} = ${h}; ${n}--;`, () => c.if((0, r._)`${l}(${m}[${h}], ${m}[${n}])`, () => {
|
|
3500
3500
|
f.error(), c.assign(p, !1).break($);
|
|
@@ -3504,11 +3504,11 @@ function Vn() {
|
|
|
3504
3504
|
};
|
|
3505
3505
|
return Je.default = s, Je;
|
|
3506
3506
|
}
|
|
3507
|
-
var Be = {},
|
|
3508
|
-
function
|
|
3509
|
-
if (
|
|
3510
|
-
|
|
3511
|
-
const e = J(), r = Q(), S =
|
|
3507
|
+
var Be = {}, Pr;
|
|
3508
|
+
function Fn() {
|
|
3509
|
+
if (Pr) return Be;
|
|
3510
|
+
Pr = 1, Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
3511
|
+
const e = J(), r = Q(), S = Mt(), g = {
|
|
3512
3512
|
keyword: "const",
|
|
3513
3513
|
$data: !0,
|
|
3514
3514
|
error: {
|
|
@@ -3522,11 +3522,11 @@ function Un() {
|
|
|
3522
3522
|
};
|
|
3523
3523
|
return Be.default = g, Be;
|
|
3524
3524
|
}
|
|
3525
|
-
var Qe = {},
|
|
3526
|
-
function
|
|
3527
|
-
if (
|
|
3528
|
-
|
|
3529
|
-
const e = J(), r = Q(), S =
|
|
3525
|
+
var Qe = {}, Nr;
|
|
3526
|
+
function Kn() {
|
|
3527
|
+
if (Nr) return Qe;
|
|
3528
|
+
Nr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
3529
|
+
const e = J(), r = Q(), S = Mt(), g = {
|
|
3530
3530
|
keyword: "enum",
|
|
3531
3531
|
schemaType: "array",
|
|
3532
3532
|
$data: !0,
|
|
@@ -3548,25 +3548,25 @@ function zn() {
|
|
|
3548
3548
|
if (!Array.isArray(w))
|
|
3549
3549
|
throw new Error("ajv implementation error");
|
|
3550
3550
|
const t = f.const("vSchema", v);
|
|
3551
|
-
b = (0, e.or)(...w.map((
|
|
3551
|
+
b = (0, e.or)(...w.map((i, h) => o(t, h)));
|
|
3552
3552
|
}
|
|
3553
3553
|
s.pass(b);
|
|
3554
3554
|
function a() {
|
|
3555
3555
|
f.assign(b, !1), f.forOf("v", v, (t) => f.if((0, e._)`${p()}(${c}, ${t})`, () => f.assign(b, !0).break()));
|
|
3556
3556
|
}
|
|
3557
|
-
function
|
|
3558
|
-
const h = w[
|
|
3559
|
-
return typeof h == "object" && h !== null ? (0, e._)`${p()}(${c}, ${t}[${
|
|
3557
|
+
function o(t, i) {
|
|
3558
|
+
const h = w[i];
|
|
3559
|
+
return typeof h == "object" && h !== null ? (0, e._)`${p()}(${c}, ${t}[${i}])` : (0, e._)`${c} === ${h}`;
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
3562
3562
|
};
|
|
3563
3563
|
return Qe.default = g, Qe;
|
|
3564
3564
|
}
|
|
3565
|
-
var
|
|
3566
|
-
function
|
|
3567
|
-
if (
|
|
3568
|
-
|
|
3569
|
-
const e =
|
|
3565
|
+
var Rr;
|
|
3566
|
+
function Ln() {
|
|
3567
|
+
if (Rr) return De;
|
|
3568
|
+
Rr = 1, Object.defineProperty(De, "__esModule", { value: !0 });
|
|
3569
|
+
const e = qn(), r = Tn(), S = An(), d = Mn(), g = Dn(), s = Vn(), f = Un(), c = zn(), m = Fn(), w = Kn(), v = [
|
|
3570
3570
|
// number
|
|
3571
3571
|
e.default,
|
|
3572
3572
|
r.default,
|
|
@@ -3587,10 +3587,10 @@ function Fn() {
|
|
|
3587
3587
|
];
|
|
3588
3588
|
return De.default = v, De;
|
|
3589
3589
|
}
|
|
3590
|
-
var Xe = {}, Ee = {},
|
|
3591
|
-
function
|
|
3592
|
-
if (
|
|
3593
|
-
|
|
3590
|
+
var Xe = {}, Ee = {}, kr;
|
|
3591
|
+
function rn() {
|
|
3592
|
+
if (kr) return Ee;
|
|
3593
|
+
kr = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.validateAdditionalItems = void 0;
|
|
3594
3594
|
const e = J(), r = Q(), d = {
|
|
3595
3595
|
keyword: "additionalItems",
|
|
3596
3596
|
type: "array",
|
|
@@ -3627,10 +3627,10 @@ function tn() {
|
|
|
3627
3627
|
}
|
|
3628
3628
|
return Ee.validateAdditionalItems = g, Ee.default = d, Ee;
|
|
3629
3629
|
}
|
|
3630
|
-
var Ye = {}, Se = {},
|
|
3631
|
-
function
|
|
3632
|
-
if (
|
|
3633
|
-
|
|
3630
|
+
var Ye = {}, Se = {}, Or;
|
|
3631
|
+
function nn() {
|
|
3632
|
+
if (Or) return Se;
|
|
3633
|
+
Or = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.validateTuple = void 0;
|
|
3634
3634
|
const e = J(), r = Q(), S = le(), d = {
|
|
3635
3635
|
keyword: "items",
|
|
3636
3636
|
type: "array",
|
|
@@ -3647,28 +3647,28 @@ function rn() {
|
|
|
3647
3647
|
const { gen: m, parentSchema: w, data: v, keyword: P, it: _ } = s;
|
|
3648
3648
|
b(w), _.opts.unevaluated && c.length && _.items !== !0 && (_.items = r.mergeEvaluated.items(m, c.length, _.items));
|
|
3649
3649
|
const y = m.name("valid"), p = m.const("len", (0, e._)`${v}.length`);
|
|
3650
|
-
c.forEach((a,
|
|
3651
|
-
(0, r.alwaysValidSchema)(_, a) || (m.if((0, e._)`${p} > ${
|
|
3650
|
+
c.forEach((a, o) => {
|
|
3651
|
+
(0, r.alwaysValidSchema)(_, a) || (m.if((0, e._)`${p} > ${o}`, () => s.subschema({
|
|
3652
3652
|
keyword: P,
|
|
3653
|
-
schemaProp:
|
|
3654
|
-
dataProp:
|
|
3653
|
+
schemaProp: o,
|
|
3654
|
+
dataProp: o
|
|
3655
3655
|
}, y)), s.ok(y));
|
|
3656
3656
|
});
|
|
3657
3657
|
function b(a) {
|
|
3658
|
-
const { opts:
|
|
3659
|
-
if (
|
|
3660
|
-
const n = `"${P}" is ${
|
|
3661
|
-
(0, r.checkStrictMode)(_, n,
|
|
3658
|
+
const { opts: o, errSchemaPath: t } = _, i = c.length, h = i === a.minItems && (i === a.maxItems || a[f] === !1);
|
|
3659
|
+
if (o.strictTuples && !h) {
|
|
3660
|
+
const n = `"${P}" is ${i}-tuple, but minItems or maxItems/${f} are not specified or different at path "${t}"`;
|
|
3661
|
+
(0, r.checkStrictMode)(_, n, o.strictTuples);
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
3665
|
return Se.validateTuple = g, Se.default = d, Se;
|
|
3666
3666
|
}
|
|
3667
|
-
var
|
|
3668
|
-
function
|
|
3669
|
-
if (
|
|
3670
|
-
|
|
3671
|
-
const e =
|
|
3667
|
+
var jr;
|
|
3668
|
+
function Hn() {
|
|
3669
|
+
if (jr) return Ye;
|
|
3670
|
+
jr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 });
|
|
3671
|
+
const e = nn(), r = {
|
|
3672
3672
|
keyword: "prefixItems",
|
|
3673
3673
|
type: "array",
|
|
3674
3674
|
schemaType: ["array"],
|
|
@@ -3677,11 +3677,11 @@ function Kn() {
|
|
|
3677
3677
|
};
|
|
3678
3678
|
return Ye.default = r, Ye;
|
|
3679
3679
|
}
|
|
3680
|
-
var Ze = {},
|
|
3681
|
-
function
|
|
3682
|
-
if (
|
|
3683
|
-
|
|
3684
|
-
const e = J(), r = Q(), S = le(), d =
|
|
3680
|
+
var Ze = {}, Ir;
|
|
3681
|
+
function Gn() {
|
|
3682
|
+
if (Ir) return Ze;
|
|
3683
|
+
Ir = 1, Object.defineProperty(Ze, "__esModule", { value: !0 });
|
|
3684
|
+
const e = J(), r = Q(), S = le(), d = rn(), s = {
|
|
3685
3685
|
keyword: "items",
|
|
3686
3686
|
type: "array",
|
|
3687
3687
|
schemaType: ["object", "boolean"],
|
|
@@ -3697,10 +3697,10 @@ function Ln() {
|
|
|
3697
3697
|
};
|
|
3698
3698
|
return Ze.default = s, Ze;
|
|
3699
3699
|
}
|
|
3700
|
-
var xe = {},
|
|
3701
|
-
function
|
|
3702
|
-
if (
|
|
3703
|
-
|
|
3700
|
+
var xe = {}, qr;
|
|
3701
|
+
function Jn() {
|
|
3702
|
+
if (qr) return xe;
|
|
3703
|
+
qr = 1, Object.defineProperty(xe, "__esModule", { value: !0 });
|
|
3704
3704
|
const e = J(), r = Q(), d = {
|
|
3705
3705
|
keyword: "contains",
|
|
3706
3706
|
type: "array",
|
|
@@ -3726,37 +3726,37 @@ function Hn() {
|
|
|
3726
3726
|
return;
|
|
3727
3727
|
}
|
|
3728
3728
|
if ((0, r.alwaysValidSchema)(w, f)) {
|
|
3729
|
-
let
|
|
3730
|
-
P !== void 0 && (
|
|
3729
|
+
let i = (0, e._)`${p} >= ${v}`;
|
|
3730
|
+
P !== void 0 && (i = (0, e._)`${i} && ${p} <= ${P}`), g.pass(i);
|
|
3731
3731
|
return;
|
|
3732
3732
|
}
|
|
3733
3733
|
w.items = !0;
|
|
3734
3734
|
const b = s.name("valid");
|
|
3735
|
-
P === void 0 && v === 1 ?
|
|
3735
|
+
P === void 0 && v === 1 ? o(b, () => s.if(b, () => s.break())) : v === 0 ? (s.let(b, !0), P !== void 0 && s.if((0, e._)`${m}.length > 0`, a)) : (s.let(b, !1), a()), g.result(b, () => g.reset());
|
|
3736
3736
|
function a() {
|
|
3737
|
-
const
|
|
3738
|
-
i
|
|
3737
|
+
const i = s.name("_valid"), h = s.let("count", 0);
|
|
3738
|
+
o(i, () => s.if(i, () => t(h)));
|
|
3739
3739
|
}
|
|
3740
|
-
function i
|
|
3740
|
+
function o(i, h) {
|
|
3741
3741
|
s.forRange("i", 0, p, (n) => {
|
|
3742
3742
|
g.subschema({
|
|
3743
3743
|
keyword: "contains",
|
|
3744
3744
|
dataProp: n,
|
|
3745
3745
|
dataPropType: r.Type.Num,
|
|
3746
3746
|
compositeRule: !0
|
|
3747
|
-
},
|
|
3747
|
+
}, i), h();
|
|
3748
3748
|
});
|
|
3749
3749
|
}
|
|
3750
|
-
function t(
|
|
3751
|
-
s.code((0, e._)`${
|
|
3750
|
+
function t(i) {
|
|
3751
|
+
s.code((0, e._)`${i}++`), P === void 0 ? s.if((0, e._)`${i} >= ${v}`, () => s.assign(b, !0).break()) : (s.if((0, e._)`${i} > ${P}`, () => s.assign(b, !1).break()), v === 1 ? s.assign(b, !0) : s.if((0, e._)`${i} >= ${v}`, () => s.assign(b, !0)));
|
|
3752
3752
|
}
|
|
3753
3753
|
}
|
|
3754
3754
|
};
|
|
3755
3755
|
return xe.default = d, xe;
|
|
3756
3756
|
}
|
|
3757
|
-
var It = {},
|
|
3758
|
-
function
|
|
3759
|
-
return
|
|
3757
|
+
var It = {}, Tr;
|
|
3758
|
+
function Wn() {
|
|
3759
|
+
return Tr || (Tr = 1, (function(e) {
|
|
3760
3760
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
3761
3761
|
const r = J(), S = Q(), d = le();
|
|
3762
3762
|
e.error = {
|
|
@@ -3805,8 +3805,8 @@ function Gn() {
|
|
|
3805
3805
|
depsCount: b.length,
|
|
3806
3806
|
deps: b.join(", ")
|
|
3807
3807
|
}), _.allErrors ? v.if(a, () => {
|
|
3808
|
-
for (const
|
|
3809
|
-
(0, d.checkReportMissingProp)(m,
|
|
3808
|
+
for (const o of b)
|
|
3809
|
+
(0, d.checkReportMissingProp)(m, o);
|
|
3810
3810
|
}) : (v.if((0, r._)`${a} && (${(0, d.checkMissingProp)(m, b, y)})`), (0, d.reportMissingProp)(m, y), v.else());
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
@@ -3827,10 +3827,10 @@ function Gn() {
|
|
|
3827
3827
|
e.validateSchemaDeps = c, e.default = g;
|
|
3828
3828
|
})(It)), It;
|
|
3829
3829
|
}
|
|
3830
|
-
var et = {},
|
|
3831
|
-
function
|
|
3832
|
-
if (
|
|
3833
|
-
|
|
3830
|
+
var et = {}, Cr;
|
|
3831
|
+
function Bn() {
|
|
3832
|
+
if (Cr) return et;
|
|
3833
|
+
Cr = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3834
3834
|
const e = J(), r = Q(), d = {
|
|
3835
3835
|
keyword: "propertyNames",
|
|
3836
3836
|
type: "object",
|
|
@@ -3859,10 +3859,10 @@ function Jn() {
|
|
|
3859
3859
|
};
|
|
3860
3860
|
return et.default = d, et;
|
|
3861
3861
|
}
|
|
3862
|
-
var tt = {},
|
|
3863
|
-
function
|
|
3864
|
-
if (
|
|
3865
|
-
|
|
3862
|
+
var tt = {}, Ar;
|
|
3863
|
+
function sn() {
|
|
3864
|
+
if (Ar) return tt;
|
|
3865
|
+
Ar = 1, Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
3866
3866
|
const e = le(), r = J(), S = _e(), d = Q(), s = {
|
|
3867
3867
|
keyword: "additionalProperties",
|
|
3868
3868
|
type: ["object"],
|
|
@@ -3881,8 +3881,8 @@ function nn() {
|
|
|
3881
3881
|
if (_.props = !0, p.removeAdditional !== "all" && (0, d.alwaysValidSchema)(_, m))
|
|
3882
3882
|
return;
|
|
3883
3883
|
const b = (0, e.allSchemaProperties)(w.properties), a = (0, e.allSchemaProperties)(w.patternProperties);
|
|
3884
|
-
|
|
3885
|
-
function
|
|
3884
|
+
o(), f.ok((0, r._)`${P} === ${S.default.errors}`);
|
|
3885
|
+
function o() {
|
|
3886
3886
|
c.forIn("key", v, (l) => {
|
|
3887
3887
|
!b.length && !a.length ? h(l) : c.if(t(l), () => h(l));
|
|
3888
3888
|
});
|
|
@@ -3895,12 +3895,12 @@ function nn() {
|
|
|
3895
3895
|
} else b.length ? $ = (0, r.or)(...b.map((j) => (0, r._)`${l} === ${j}`)) : $ = r.nil;
|
|
3896
3896
|
return a.length && ($ = (0, r.or)($, ...a.map((j) => (0, r._)`${(0, e.usePattern)(f, j)}.test(${l})`))), (0, r.not)($);
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function i(l) {
|
|
3899
3899
|
c.code((0, r._)`delete ${v}[${l}]`);
|
|
3900
3900
|
}
|
|
3901
3901
|
function h(l) {
|
|
3902
3902
|
if (p.removeAdditional === "all" || p.removeAdditional && m === !1) {
|
|
3903
|
-
|
|
3903
|
+
i(l);
|
|
3904
3904
|
return;
|
|
3905
3905
|
}
|
|
3906
3906
|
if (m === !1) {
|
|
@@ -3910,7 +3910,7 @@ function nn() {
|
|
|
3910
3910
|
if (typeof m == "object" && !(0, d.alwaysValidSchema)(_, m)) {
|
|
3911
3911
|
const $ = c.name("valid");
|
|
3912
3912
|
p.removeAdditional === "failing" ? (n(l, $, !1), c.if((0, r.not)($), () => {
|
|
3913
|
-
f.reset(),
|
|
3913
|
+
f.reset(), i(l);
|
|
3914
3914
|
})) : (n(l, $), y || c.if((0, r.not)($), () => c.break()));
|
|
3915
3915
|
}
|
|
3916
3916
|
}
|
|
@@ -3930,11 +3930,11 @@ function nn() {
|
|
|
3930
3930
|
};
|
|
3931
3931
|
return tt.default = s, tt;
|
|
3932
3932
|
}
|
|
3933
|
-
var rt = {},
|
|
3934
|
-
function
|
|
3935
|
-
if (
|
|
3936
|
-
|
|
3937
|
-
const e = vt(), r = le(), S = Q(), d =
|
|
3933
|
+
var rt = {}, Mr;
|
|
3934
|
+
function Qn() {
|
|
3935
|
+
if (Mr) return rt;
|
|
3936
|
+
Mr = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
3937
|
+
const e = vt(), r = le(), S = Q(), d = sn(), g = {
|
|
3938
3938
|
keyword: "properties",
|
|
3939
3939
|
type: "object",
|
|
3940
3940
|
schemaType: "object",
|
|
@@ -3965,10 +3965,10 @@ function Wn() {
|
|
|
3965
3965
|
};
|
|
3966
3966
|
return rt.default = g, rt;
|
|
3967
3967
|
}
|
|
3968
|
-
var nt = {},
|
|
3969
|
-
function
|
|
3970
|
-
if (
|
|
3971
|
-
|
|
3968
|
+
var nt = {}, Dr;
|
|
3969
|
+
function Xn() {
|
|
3970
|
+
if (Dr) return nt;
|
|
3971
|
+
Dr = 1, Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
3972
3972
|
const e = le(), r = J(), S = Q(), d = Q(), g = {
|
|
3973
3973
|
keyword: "patternProperties",
|
|
3974
3974
|
type: "object",
|
|
@@ -3980,16 +3980,16 @@ function Bn() {
|
|
|
3980
3980
|
const p = P.strictSchema && !P.allowMatchingProperties && w.properties, b = f.name("valid");
|
|
3981
3981
|
v.props !== !0 && !(v.props instanceof r.Name) && (v.props = (0, d.evaluatedPropsToName)(f, v.props));
|
|
3982
3982
|
const { props: a } = v;
|
|
3983
|
-
|
|
3984
|
-
function
|
|
3983
|
+
o();
|
|
3984
|
+
function o() {
|
|
3985
3985
|
for (const h of _)
|
|
3986
|
-
p && t(h), v.allErrors ?
|
|
3986
|
+
p && t(h), v.allErrors ? i(h) : (f.var(b, !0), i(h), f.if(b));
|
|
3987
3987
|
}
|
|
3988
3988
|
function t(h) {
|
|
3989
3989
|
for (const n in p)
|
|
3990
3990
|
new RegExp(h).test(n) && (0, S.checkStrictMode)(v, `property ${n} matches pattern ${h} (use allowMatchingProperties)`);
|
|
3991
3991
|
}
|
|
3992
|
-
function
|
|
3992
|
+
function i(h) {
|
|
3993
3993
|
f.forIn("key", m, (n) => {
|
|
3994
3994
|
f.if((0, r._)`${(0, e.usePattern)(s, h)}.test(${n})`, () => {
|
|
3995
3995
|
const l = y.includes(h);
|
|
@@ -4006,10 +4006,10 @@ function Bn() {
|
|
|
4006
4006
|
};
|
|
4007
4007
|
return nt.default = g, nt;
|
|
4008
4008
|
}
|
|
4009
|
-
var st = {},
|
|
4010
|
-
function
|
|
4011
|
-
if (
|
|
4012
|
-
|
|
4009
|
+
var st = {}, Vr;
|
|
4010
|
+
function Yn() {
|
|
4011
|
+
if (Vr) return st;
|
|
4012
|
+
Vr = 1, Object.defineProperty(st, "__esModule", { value: !0 });
|
|
4013
4013
|
const e = Q(), r = {
|
|
4014
4014
|
keyword: "not",
|
|
4015
4015
|
schemaType: ["object", "boolean"],
|
|
@@ -4032,10 +4032,10 @@ function Qn() {
|
|
|
4032
4032
|
};
|
|
4033
4033
|
return st.default = r, st;
|
|
4034
4034
|
}
|
|
4035
|
-
var at = {},
|
|
4036
|
-
function
|
|
4037
|
-
if (
|
|
4038
|
-
|
|
4035
|
+
var at = {}, Ur;
|
|
4036
|
+
function Zn() {
|
|
4037
|
+
if (Ur) return at;
|
|
4038
|
+
Ur = 1, Object.defineProperty(at, "__esModule", { value: !0 });
|
|
4039
4039
|
const r = {
|
|
4040
4040
|
keyword: "anyOf",
|
|
4041
4041
|
schemaType: "array",
|
|
@@ -4045,10 +4045,10 @@ function Xn() {
|
|
|
4045
4045
|
};
|
|
4046
4046
|
return at.default = r, at;
|
|
4047
4047
|
}
|
|
4048
|
-
var
|
|
4049
|
-
function
|
|
4050
|
-
if (
|
|
4051
|
-
|
|
4048
|
+
var it = {}, zr;
|
|
4049
|
+
function xn() {
|
|
4050
|
+
if (zr) return it;
|
|
4051
|
+
zr = 1, Object.defineProperty(it, "__esModule", { value: !0 });
|
|
4052
4052
|
const e = J(), r = Q(), d = {
|
|
4053
4053
|
keyword: "oneOf",
|
|
4054
4054
|
schemaType: "array",
|
|
@@ -4079,12 +4079,12 @@ function Yn() {
|
|
|
4079
4079
|
}
|
|
4080
4080
|
}
|
|
4081
4081
|
};
|
|
4082
|
-
return
|
|
4082
|
+
return it.default = d, it;
|
|
4083
4083
|
}
|
|
4084
|
-
var
|
|
4085
|
-
function
|
|
4086
|
-
if (
|
|
4087
|
-
|
|
4084
|
+
var ot = {}, Fr;
|
|
4085
|
+
function es() {
|
|
4086
|
+
if (Fr) return ot;
|
|
4087
|
+
Fr = 1, Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
4088
4088
|
const e = Q(), r = {
|
|
4089
4089
|
keyword: "allOf",
|
|
4090
4090
|
schemaType: "array",
|
|
@@ -4101,12 +4101,12 @@ function Zn() {
|
|
|
4101
4101
|
});
|
|
4102
4102
|
}
|
|
4103
4103
|
};
|
|
4104
|
-
return
|
|
4104
|
+
return ot.default = r, ot;
|
|
4105
4105
|
}
|
|
4106
|
-
var ut = {},
|
|
4107
|
-
function
|
|
4108
|
-
if (
|
|
4109
|
-
|
|
4106
|
+
var ut = {}, Kr;
|
|
4107
|
+
function ts() {
|
|
4108
|
+
if (Kr) return ut;
|
|
4109
|
+
Kr = 1, Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
4110
4110
|
const e = J(), r = Q(), d = {
|
|
4111
4111
|
keyword: "if",
|
|
4112
4112
|
schemaType: ["object", "boolean"],
|
|
@@ -4138,8 +4138,8 @@ function xn() {
|
|
|
4138
4138
|
}
|
|
4139
4139
|
function p(b, a) {
|
|
4140
4140
|
return () => {
|
|
4141
|
-
const
|
|
4142
|
-
f.assign(P, _), s.mergeValidEvaluated(
|
|
4141
|
+
const o = s.subschema({ keyword: b }, _);
|
|
4142
|
+
f.assign(P, _), s.mergeValidEvaluated(o, P), a ? f.assign(a, (0, e._)`${b}`) : s.setParams({ ifClause: b });
|
|
4143
4143
|
};
|
|
4144
4144
|
}
|
|
4145
4145
|
}
|
|
@@ -4150,10 +4150,10 @@ function xn() {
|
|
|
4150
4150
|
}
|
|
4151
4151
|
return ut.default = d, ut;
|
|
4152
4152
|
}
|
|
4153
|
-
var ct = {},
|
|
4154
|
-
function
|
|
4155
|
-
if (
|
|
4156
|
-
|
|
4153
|
+
var ct = {}, Lr;
|
|
4154
|
+
function rs() {
|
|
4155
|
+
if (Lr) return ct;
|
|
4156
|
+
Lr = 1, Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
4157
4157
|
const e = Q(), r = {
|
|
4158
4158
|
keyword: ["then", "else"],
|
|
4159
4159
|
schemaType: ["object", "boolean"],
|
|
@@ -4163,12 +4163,12 @@ function es() {
|
|
|
4163
4163
|
};
|
|
4164
4164
|
return ct.default = r, ct;
|
|
4165
4165
|
}
|
|
4166
|
-
var
|
|
4167
|
-
function
|
|
4168
|
-
if (
|
|
4169
|
-
|
|
4170
|
-
const e =
|
|
4171
|
-
function a(
|
|
4166
|
+
var Hr;
|
|
4167
|
+
function ns() {
|
|
4168
|
+
if (Hr) return Xe;
|
|
4169
|
+
Hr = 1, Object.defineProperty(Xe, "__esModule", { value: !0 });
|
|
4170
|
+
const e = rn(), r = Hn(), S = nn(), d = Gn(), g = Jn(), s = Wn(), f = Bn(), c = sn(), m = Qn(), w = Xn(), v = Yn(), P = Zn(), _ = xn(), y = es(), p = ts(), b = rs();
|
|
4171
|
+
function a(o = !1) {
|
|
4172
4172
|
const t = [
|
|
4173
4173
|
// any
|
|
4174
4174
|
v.default,
|
|
@@ -4184,14 +4184,14 @@ function ts() {
|
|
|
4184
4184
|
m.default,
|
|
4185
4185
|
w.default
|
|
4186
4186
|
];
|
|
4187
|
-
return
|
|
4187
|
+
return o ? t.push(r.default, d.default) : t.push(e.default, S.default), t.push(g.default), t;
|
|
4188
4188
|
}
|
|
4189
4189
|
return Xe.default = a, Xe;
|
|
4190
4190
|
}
|
|
4191
|
-
var lt = {}, dt = {},
|
|
4192
|
-
function
|
|
4193
|
-
if (
|
|
4194
|
-
|
|
4191
|
+
var lt = {}, dt = {}, Gr;
|
|
4192
|
+
function ss() {
|
|
4193
|
+
if (Gr) return dt;
|
|
4194
|
+
Gr = 1, Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
4195
4195
|
const e = J(), S = {
|
|
4196
4196
|
keyword: "format",
|
|
4197
4197
|
type: ["number", "string"],
|
|
@@ -4207,28 +4207,28 @@ function rs() {
|
|
|
4207
4207
|
return;
|
|
4208
4208
|
c ? b() : a();
|
|
4209
4209
|
function b() {
|
|
4210
|
-
const
|
|
4210
|
+
const o = s.scopeValue("formats", {
|
|
4211
4211
|
ref: p.formats,
|
|
4212
4212
|
code: P.code.formats
|
|
4213
|
-
}), t = s.const("fDef", (0, e._)`${
|
|
4214
|
-
s.if((0, e._)`typeof ${t} == "object" && !(${t} instanceof RegExp)`, () => s.assign(
|
|
4213
|
+
}), t = s.const("fDef", (0, e._)`${o}[${w}]`), i = s.let("fType"), h = s.let("format");
|
|
4214
|
+
s.if((0, e._)`typeof ${t} == "object" && !(${t} instanceof RegExp)`, () => s.assign(i, (0, e._)`${t}.type || "string"`).assign(h, (0, e._)`${t}.validate`), () => s.assign(i, (0, e._)`"string"`).assign(h, t)), d.fail$data((0, e.or)(n(), l()));
|
|
4215
4215
|
function n() {
|
|
4216
4216
|
return P.strictSchema === !1 ? e.nil : (0, e._)`${w} && !${h}`;
|
|
4217
4217
|
}
|
|
4218
4218
|
function l() {
|
|
4219
4219
|
const $ = y.$async ? (0, e._)`(${t}.async ? await ${h}(${f}) : ${h}(${f}))` : (0, e._)`${h}(${f})`, j = (0, e._)`(typeof ${h} == "function" ? ${$} : ${h}.test(${f}))`;
|
|
4220
|
-
return (0, e._)`${h} && ${h} !== true && ${
|
|
4220
|
+
return (0, e._)`${h} && ${h} !== true && ${i} === ${g} && !${j}`;
|
|
4221
4221
|
}
|
|
4222
4222
|
}
|
|
4223
4223
|
function a() {
|
|
4224
|
-
const
|
|
4225
|
-
if (!
|
|
4224
|
+
const o = p.formats[m];
|
|
4225
|
+
if (!o) {
|
|
4226
4226
|
n();
|
|
4227
4227
|
return;
|
|
4228
4228
|
}
|
|
4229
|
-
if (
|
|
4229
|
+
if (o === !0)
|
|
4230
4230
|
return;
|
|
4231
|
-
const [t,
|
|
4231
|
+
const [t, i, h] = l(o);
|
|
4232
4232
|
t === g && d.pass($());
|
|
4233
4233
|
function n() {
|
|
4234
4234
|
if (P.strictSchema === !1) {
|
|
@@ -4245,28 +4245,28 @@ function rs() {
|
|
|
4245
4245
|
return typeof j == "object" && !(j instanceof RegExp) ? [j.type || "string", j.validate, (0, e._)`${D}.validate`] : ["string", j, D];
|
|
4246
4246
|
}
|
|
4247
4247
|
function $() {
|
|
4248
|
-
if (typeof
|
|
4248
|
+
if (typeof o == "object" && !(o instanceof RegExp) && o.async) {
|
|
4249
4249
|
if (!y.$async)
|
|
4250
4250
|
throw new Error("async format in sync schema");
|
|
4251
4251
|
return (0, e._)`await ${h}(${f})`;
|
|
4252
4252
|
}
|
|
4253
|
-
return typeof
|
|
4253
|
+
return typeof i == "function" ? (0, e._)`${h}(${f})` : (0, e._)`${h}.test(${f})`;
|
|
4254
4254
|
}
|
|
4255
4255
|
}
|
|
4256
4256
|
}
|
|
4257
4257
|
};
|
|
4258
4258
|
return dt.default = S, dt;
|
|
4259
4259
|
}
|
|
4260
|
-
var
|
|
4261
|
-
function
|
|
4262
|
-
if (
|
|
4263
|
-
|
|
4264
|
-
const r = [
|
|
4260
|
+
var Jr;
|
|
4261
|
+
function as() {
|
|
4262
|
+
if (Jr) return lt;
|
|
4263
|
+
Jr = 1, Object.defineProperty(lt, "__esModule", { value: !0 });
|
|
4264
|
+
const r = [ss().default];
|
|
4265
4265
|
return lt.default = r, lt;
|
|
4266
4266
|
}
|
|
4267
|
-
var we = {},
|
|
4268
|
-
function
|
|
4269
|
-
return
|
|
4267
|
+
var we = {}, Wr;
|
|
4268
|
+
function is() {
|
|
4269
|
+
return Wr || (Wr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.contentVocabulary = we.metadataVocabulary = void 0, we.metadataVocabulary = [
|
|
4270
4270
|
"title",
|
|
4271
4271
|
"description",
|
|
4272
4272
|
"default",
|
|
@@ -4280,11 +4280,11 @@ function ss() {
|
|
|
4280
4280
|
"contentSchema"
|
|
4281
4281
|
]), we;
|
|
4282
4282
|
}
|
|
4283
|
-
var
|
|
4284
|
-
function
|
|
4285
|
-
if (
|
|
4286
|
-
|
|
4287
|
-
const e =
|
|
4283
|
+
var Br;
|
|
4284
|
+
function os() {
|
|
4285
|
+
if (Br) return Ce;
|
|
4286
|
+
Br = 1, Object.defineProperty(Ce, "__esModule", { value: !0 });
|
|
4287
|
+
const e = In(), r = Ln(), S = ns(), d = as(), g = is(), s = [
|
|
4288
4288
|
e.default,
|
|
4289
4289
|
r.default,
|
|
4290
4290
|
(0, S.default)(),
|
|
@@ -4294,20 +4294,20 @@ function as() {
|
|
|
4294
4294
|
];
|
|
4295
4295
|
return Ce.default = s, Ce;
|
|
4296
4296
|
}
|
|
4297
|
-
var ft = {}, ke = {},
|
|
4298
|
-
function
|
|
4299
|
-
if (
|
|
4300
|
-
|
|
4297
|
+
var ft = {}, ke = {}, Qr;
|
|
4298
|
+
function us() {
|
|
4299
|
+
if (Qr) return ke;
|
|
4300
|
+
Qr = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.DiscrError = void 0;
|
|
4301
4301
|
var e;
|
|
4302
4302
|
return (function(r) {
|
|
4303
4303
|
r.Tag = "tag", r.Mapping = "mapping";
|
|
4304
4304
|
})(e || (ke.DiscrError = e = {})), ke;
|
|
4305
4305
|
}
|
|
4306
|
-
var
|
|
4307
|
-
function
|
|
4308
|
-
if (
|
|
4309
|
-
|
|
4310
|
-
const e = J(), r =
|
|
4306
|
+
var Xr;
|
|
4307
|
+
function cs() {
|
|
4308
|
+
if (Xr) return ft;
|
|
4309
|
+
Xr = 1, Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
4310
|
+
const e = J(), r = us(), S = At(), d = _t(), g = Q(), f = {
|
|
4311
4311
|
keyword: "discriminator",
|
|
4312
4312
|
type: "object",
|
|
4313
4313
|
schemaType: "object",
|
|
@@ -4327,9 +4327,9 @@ function is() {
|
|
|
4327
4327
|
if (!y)
|
|
4328
4328
|
throw new Error("discriminator: requires oneOf keyword");
|
|
4329
4329
|
const b = m.let("valid", !1), a = m.const("tag", (0, e._)`${w}${(0, e.getProperty)(p)}`);
|
|
4330
|
-
m.if((0, e._)`typeof ${a} == "string"`, () =>
|
|
4331
|
-
function
|
|
4332
|
-
const h =
|
|
4330
|
+
m.if((0, e._)`typeof ${a} == "string"`, () => o(), () => c.error(!1, { discrError: r.DiscrError.Tag, tag: a, tagName: p })), c.ok(b);
|
|
4331
|
+
function o() {
|
|
4332
|
+
const h = i();
|
|
4333
4333
|
m.if(!1);
|
|
4334
4334
|
for (const n in h)
|
|
4335
4335
|
m.elseIf((0, e._)`${a} === ${n}`), m.assign(b, t(h[n]));
|
|
@@ -4339,7 +4339,7 @@ function is() {
|
|
|
4339
4339
|
const n = m.name("valid"), l = c.subschema({ keyword: "oneOf", schemaProp: h }, n);
|
|
4340
4340
|
return c.mergeEvaluated(l, e.Name), n;
|
|
4341
4341
|
}
|
|
4342
|
-
function
|
|
4342
|
+
function i() {
|
|
4343
4343
|
var h;
|
|
4344
4344
|
const n = {}, l = j(P);
|
|
4345
4345
|
let $ = !0;
|
|
@@ -4380,20 +4380,20 @@ function is() {
|
|
|
4380
4380
|
};
|
|
4381
4381
|
return ft.default = f, ft;
|
|
4382
4382
|
}
|
|
4383
|
-
const
|
|
4384
|
-
$schema:
|
|
4385
|
-
$id:
|
|
4386
|
-
title:
|
|
4387
|
-
definitions:
|
|
4388
|
-
type:
|
|
4389
|
-
properties:
|
|
4383
|
+
const ls = "http://json-schema.org/draft-07/schema#", ds = "http://json-schema.org/draft-07/schema#", fs = "Core schema meta-schema", hs = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, ms = ["object", "boolean"], ps = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, ys = {
|
|
4384
|
+
$schema: ls,
|
|
4385
|
+
$id: ds,
|
|
4386
|
+
title: fs,
|
|
4387
|
+
definitions: hs,
|
|
4388
|
+
type: ms,
|
|
4389
|
+
properties: ps,
|
|
4390
4390
|
default: !0
|
|
4391
4391
|
};
|
|
4392
|
-
var
|
|
4393
|
-
function
|
|
4394
|
-
return
|
|
4392
|
+
var Yr;
|
|
4393
|
+
function vs() {
|
|
4394
|
+
return Yr || (Yr = 1, (function(e, r) {
|
|
4395
4395
|
Object.defineProperty(r, "__esModule", { value: !0 }), r.MissingRefError = r.ValidationError = r.CodeGen = r.Name = r.nil = r.stringify = r.str = r._ = r.KeywordCxt = r.Ajv = void 0;
|
|
4396
|
-
const S =
|
|
4396
|
+
const S = kn(), d = os(), g = cs(), s = ys, f = ["/properties"], c = "http://json-schema.org/draft-07/schema";
|
|
4397
4397
|
class m extends S.default {
|
|
4398
4398
|
_addVocabularies() {
|
|
4399
4399
|
super._addVocabularies(), d.default.forEach((p) => this.addVocabulary(p)), this.opts.discriminator && this.addKeyword(g.default);
|
|
@@ -4427,7 +4427,7 @@ function ps() {
|
|
|
4427
4427
|
} }), Object.defineProperty(r, "CodeGen", { enumerable: !0, get: function() {
|
|
4428
4428
|
return v.CodeGen;
|
|
4429
4429
|
} });
|
|
4430
|
-
var P =
|
|
4430
|
+
var P = Ct();
|
|
4431
4431
|
Object.defineProperty(r, "ValidationError", { enumerable: !0, get: function() {
|
|
4432
4432
|
return P.default;
|
|
4433
4433
|
} });
|
|
@@ -4437,11 +4437,11 @@ function ps() {
|
|
|
4437
4437
|
} });
|
|
4438
4438
|
})(Oe, Oe.exports)), Oe.exports;
|
|
4439
4439
|
}
|
|
4440
|
-
var
|
|
4441
|
-
const
|
|
4440
|
+
var _s = vs();
|
|
4441
|
+
const gs = /* @__PURE__ */ fn(_s);
|
|
4442
4442
|
function qt(e, r, S, d, g) {
|
|
4443
4443
|
if (typeof e == "string") {
|
|
4444
|
-
const s =
|
|
4444
|
+
const s = ln(e);
|
|
4445
4445
|
s?.op === "component" && S && !S.includes(s.arg) ? g.push(`${r || "/"}: unknown component "${s.arg}"`) : s?.op === "dataSource" && d && !d.includes(s.arg) && g.push(`${r || "/"}: unknown dataSource "${s.arg}"`);
|
|
4446
4446
|
return;
|
|
4447
4447
|
}
|
|
@@ -4455,13 +4455,30 @@ function qt(e, r, S, d, g) {
|
|
|
4455
4455
|
for (const [s, f] of Object.entries(e))
|
|
4456
4456
|
qt(f, r ? `${r}.${s}` : s, S, d, g);
|
|
4457
4457
|
}
|
|
4458
|
-
function
|
|
4459
|
-
|
|
4458
|
+
function $s(e) {
|
|
4459
|
+
return dn(e.array) && typeof e.item == "object" && e.item !== null && "$template" in e.item;
|
|
4460
|
+
}
|
|
4461
|
+
function Tt(e, r, S) {
|
|
4462
|
+
if (Array.isArray(e)) {
|
|
4463
|
+
e.forEach((d, g) => Tt(d, `${r}[${g}]`, S));
|
|
4464
|
+
return;
|
|
4465
|
+
}
|
|
4466
|
+
if (e !== null && typeof e == "object") {
|
|
4467
|
+
const d = e;
|
|
4468
|
+
$s(d) && d.initialValue === void 0 && S.push(
|
|
4469
|
+
`${r || "/"}: array node is missing "initialValue" — the "Add" button would create an empty element and its "$model(...)" template leaves would render nothing. Provide an "initialValue" literal with the element's keys.`
|
|
4470
|
+
);
|
|
4471
|
+
for (const [g, s] of Object.entries(d))
|
|
4472
|
+
Tt(s, r ? `${r}.${g}` : g, S);
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4475
|
+
function bs(e, r = {}) {
|
|
4476
|
+
const S = r.componentNames ?? (r.registry ? on(r.registry) : void 0), d = r.dataSourceNames ?? (r.registry ? un(r.registry) : void 0), g = [], f = new gs({ allErrors: !0 }).compile(cn);
|
|
4460
4477
|
if (!f(e))
|
|
4461
4478
|
for (const c of f.errors ?? [])
|
|
4462
|
-
g.push(`${c.instancePath || "/"} ${c.message ?? "invalid"}`.trim());
|
|
4463
|
-
return qt(e, "", S, d, g), { valid: g.length === 0, errors: g };
|
|
4479
|
+
c.keyword !== "if" && g.push(`${c.instancePath || "/"} ${c.message ?? "invalid"}`.trim());
|
|
4480
|
+
return qt(e, "", S, d, g), Tt(e, "", g), { valid: g.length === 0, errors: g };
|
|
4464
4481
|
}
|
|
4465
4482
|
export {
|
|
4466
|
-
|
|
4483
|
+
bs as validateFormSchema
|
|
4467
4484
|
};
|