@dicebear/core 10.4.0-rc.2 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Error/ValidationError.d.ts +4 -0
- package/lib/Options.d.ts +2 -1
- package/lib/Options.js +3 -0
- package/lib/OptionsDescriptor.js +5 -0
- package/lib/Resolver.d.ts +2 -1
- package/lib/Resolver.js +30 -7
- package/lib/StyleOptions.d.ts +5 -0
- package/lib/StyleOptions.js +2 -1
- package/lib/Validator/OptionsValidator.js +1268 -2109
- package/lib/Validator/StyleValidator.js +4016 -5396
- package/package.json +3 -3
|
@@ -1,2239 +1,1398 @@
|
|
|
1
1
|
import { OptionsValidationError } from '../Error/OptionsValidationError.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const schema11 = { "$id": "https://cdn.hopjs.net/npm/@dicebear/schema@1.3.0/dist/options.min.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "DiceBear options schema", "type": "object", "definitions": { "flip": { "type": "string", "enum": ["none", "horizontal", "vertical", "both"] }, "rotate": { "type": "number", "minimum": -360, "maximum": 360 }, "scale": { "type": "number", "minimum": 0, "maximum": 10 }, "translate": { "type": "number", "minimum": -1000, "maximum": 1000 }, "borderRadius": { "type": "number", "minimum": 0, "maximum": 50 }, "color": { "type": "string", "pattern": "^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$" }, "colorFill": { "type": "string", "enum": ["solid", "linear", "radial"] }, "colorFillStops": { "type": "integer", "minimum": 2 }, "fontFamilyName": { "type": "string", "pattern": "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$", "maxLength": 256 }, "fontWeight": { "type": "integer", "minimum": 1, "maximum": 1000 }, "variantName": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]*$", "maxLength": 64 }, "tagFilter": { "type": "string", "pattern": "^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$", "maxLength": 130 }, "rotateOption": { "anyOf": [{ "$ref": "#/definitions/rotate" }, { "type": "array", "items": { "$ref": "#/definitions/rotate" }, "minItems": 0, "maxItems": 2 }] }, "translateOption": { "anyOf": [{ "$ref": "#/definitions/translate" }, { "type": "array", "items": { "$ref": "#/definitions/translate" }, "minItems": 0, "maxItems": 2 }] }, "scaleOption": { "anyOf": [{ "$ref": "#/definitions/scale" }, { "type": "array", "items": { "$ref": "#/definitions/scale" }, "minItems": 0, "maxItems": 2 }] } }, "properties": { "seed": { "type": "string", "description": "The starting value for the pseudorandom number generator (PRNG) used in the avatar generation process. This option is essential for creating unique and consistent avatars. By setting a specific seed, you ensure that the same sequence of random characteristics is applied, allowing identical avatars to be reproduced. This is especially valuable for maintaining consistency across sessions and allowing users to share or recreate their personalized avatars.", "maxLength": 1024 }, "size": { "type": "integer", "description": "Specifies the dimensions of the avatar in pixels. If no size is specified, the avatar defaults to a responsive design or scales to 100% of its container. This flexibility allows the avatar to seamlessly adapt to different screen sizes and layouts, ensuring optimal display across devices and environments.", "minimum": 1, "maximum": 4096 }, "idRandomization": { "type": "boolean", "description": "Generates random values for all IDs present in the SVG. This process ensures that while the avatar appears visually identical, the underlying code remains unique. This is particularly useful for embedding the same avatar multiple times in a document without running into duplicate ID conflicts that can interfere with styles and scripts." }, "title": { "type": "string", "description": "Specifies an accessible title for the avatar. When set, the SVG will include a <title> element and an aria-label attribute, allowing screen readers and other assistive technologies to describe the avatar to users.", "maxLength": 256 }, "flip": { "description": "Specifies how the avatar will be flipped. Options include `none` for no flip, `horizontal` for a left-to-right flip, `vertical` for an upside-down flip, and `both` for a complete flip. If specified as an array, the PRNG will choose from the available options.", "anyOf": [{ "$ref": "#/definitions/flip" }, { "type": "array", "items": { "$ref": "#/definitions/flip" }, "minItems": 0, "maxItems": 4 }] }, "fontFamily": { "description": "Specifies the font family used for text rendering. If specified as an array, the PRNG will choose from the available options.", "anyOf": [{ "$ref": "#/definitions/fontFamilyName" }, { "type": "array", "items": { "$ref": "#/definitions/fontFamilyName" }, "minItems": 0, "maxItems": 128 }] }, "fontWeight": { "description": "Specifies the font weight used for text rendering. The value must be an integer between 1 and 1000. If specified as an array, the PRNG will choose from the available options.", "anyOf": [{ "$ref": "#/definitions/fontWeight" }, { "type": "array", "items": { "$ref": "#/definitions/fontWeight" }, "minItems": 0, "maxItems": 128 }] }, "scale": { "description": "Sets the scaling of the avatar. A value of `1` corresponds to the original size of the avatar. This setting affects the size of the avatar itself, but not the size of the avatar container; any excess content will be clipped. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "allOf": [{ "$ref": "#/definitions/scaleOption" }] }, "borderRadius": { "description": "This is the radius of the corners of the avatar. This value can be a float or an integer. A value of 0 means that the avatar has sharp corners, while larger values result in more rounded corners. The maximum value is 50, which turns the avatar into a complete circle. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "anyOf": [{ "$ref": "#/definitions/borderRadius" }, { "type": "array", "items": { "$ref": "#/definitions/borderRadius" }, "minItems": 0, "maxItems": 2 }] }, "tags": { "description": "Uses tags to filter which variants of the avatar's components the PRNG may select. Each token is `category` or `category:value` (e.g. `hairLength:long`), optionally prefixed with `!` to exclude. An include affects only its own category: it drops variants that carry a different value in that category and keeps variants that carry no tag there. An exclude removes variants carrying the named tag. Unknown tags are ignored. A `*Variant` option for the same component takes precedence: when set, it determines that component's variants and the tag filter does not apply to it. Can be a single string or an array of strings.", "anyOf": [{ "$ref": "#/definitions/tagFilter" }, { "type": "array", "items": { "$ref": "#/definitions/tagFilter" }, "minItems": 0, "maxItems": 128 }] } }, "patternProperties": { "^[a-z][a-zA-Z0-9]*Probability$": { "type": "number", "description": "Represents the probability that a component of the avatar will be displayed. The value can be either a float or an integer, but is interpreted as a percentage. For example, a value of 0 means the part will never be displayed, while a value of 100 means it will always be displayed.", "minimum": 0, "maximum": 100 }, "^[a-z][a-zA-Z0-9]*Variant$": { "description": "Specifies which variants of the avatar part can be selected by the PRNG and their relative weights. A string or array of strings filters which variants the PRNG can choose from. An object maps variant names to non-negative weights, simultaneously filtering and weighting selection. Variant names must be camelCase identifiers.", "anyOf": [{ "$ref": "#/definitions/variantName" }, { "type": "array", "items": { "$ref": "#/definitions/variantName" }, "minItems": 0, "maxItems": 128 }, { "type": "object", "propertyNames": { "$ref": "#/definitions/variantName" }, "additionalProperties": { "type": "number", "minimum": 0 }, "minProperties": 1, "maxProperties": 512 }] }, "^[a-z][a-zA-Z0-9]*Color$": { "description": "Specifies which colors for the avatar component can be selected by the PRNG. If specified as a string or array with only one value, the value is fixed. However, if specified as an array with multiple values, the PRNG will choose from the available options. The color must be specified as a hex value.", "anyOf": [{ "$ref": "#/definitions/color" }, { "type": "array", "items": { "$ref": "#/definitions/color" }, "minItems": 0, "maxItems": 128 }] }, "^[a-z][a-zA-Z0-9]*ColorFill$": { "description": "Specifies the color fill method for the avatar component. Options include `solid` for a flat color, `linear` for a linear gradient, and `radial` for a radial gradient. If specified as a string or array with only one value, the value is fixed. However, if specified as an array with multiple values, the PRNG will choose from the available options.", "anyOf": [{ "$ref": "#/definitions/colorFill" }, { "type": "array", "items": { "$ref": "#/definitions/colorFill" }, "minItems": 0, "maxItems": 128 }] }, "^[a-z][a-zA-Z0-9]*ColorFillStops$": { "description": "Specifies the number of color stops for gradient fills. This value is only relevant when the color fill method is set to `linear` or `radial`. The minimum value is 2. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "anyOf": [{ "$ref": "#/definitions/colorFillStops" }, { "type": "array", "items": { "$ref": "#/definitions/colorFillStops" }, "minItems": 0, "maxItems": 2 }] }, "^[a-z][a-zA-Z0-9]*ColorAngle$": { "description": "Specifies the angle for the color gradient. This value can be an integer or a float. A value of 0 results in no rotation, while values between -360 and 360 define the degree of rotation. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "allOf": [{ "$ref": "#/definitions/rotateOption" }] }, "^rotate$": { "description": "This is the rotation angle for the entire avatar. This value can be an integer or a float. A value of 0 results in no rotation, while values between -360 and 360 define the degree of rotation in both directions. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "allOf": [{ "$ref": "#/definitions/rotateOption" }] }, "^translateY$": { "description": "This is the vertical translation of the entire avatar. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the avatar down and negative values move it up. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "allOf": [{ "$ref": "#/definitions/translateOption" }] }, "^translateX$": { "description": "This is the horizontal translation of the entire avatar. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the avatar to the right and negative values move it to the left. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.", "allOf": [{ "$ref": "#/definitions/translateOption" }] } }, "propertyNames": { "maxLength": 128 }, "additionalProperties": false, "maxProperties": 512 };
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const pattern5 = new RegExp("^[a-z][a-zA-Z0-9]*ColorAngle$", "u");
|
|
23
|
-
const pattern6 = new RegExp("^rotate$", "u");
|
|
24
|
-
const pattern7 = new RegExp("^translateY$", "u");
|
|
25
|
-
const pattern8 = new RegExp("^translateX$", "u");
|
|
26
|
-
const pattern9 = new RegExp("^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$", "u");
|
|
27
|
-
const pattern11 = new RegExp("^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$", "u");
|
|
28
|
-
const pattern15 = new RegExp("^[a-z][a-zA-Z0-9]*$", "u");
|
|
29
|
-
const pattern19 = new RegExp("^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$", "u");
|
|
30
|
-
const schema18 = { "anyOf": [{ "$ref": "#/definitions/scale" }, { "type": "array", "items": { "$ref": "#/definitions/scale" }, "minItems": 0, "maxItems": 2 }] };
|
|
31
|
-
const schema19 = { "type": "number", "minimum": 0, "maximum": 10 };
|
|
32
|
-
function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; const _errs0 = errors; let valid0 = false; const _errs1 = errors; const _errs2 = errors; if (errors === _errs2) {
|
|
33
|
-
if ((typeof data == "number") && (isFinite(data))) {
|
|
34
|
-
if (data > 10 || isNaN(data)) {
|
|
35
|
-
const err0 = { instancePath, schemaPath: "#/definitions/scale/maximum", keyword: "maximum", params: { comparison: "<=", limit: 10 }, message: "must be <= 10" };
|
|
36
|
-
if (vErrors === null) {
|
|
37
|
-
vErrors = [err0];
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
vErrors.push(err0);
|
|
2
|
+
const validate = (function () {
|
|
3
|
+
'use strict';
|
|
4
|
+
const stringLength = (string) => /[\uD800-\uDFFF]/.test(string) ? [...string].length : string.length;
|
|
5
|
+
const pointerPart = (s) => (/~\//.test(s) ? `${s}`.replace(/~/g, '~0').replace(/\//g, '~1') : s);
|
|
6
|
+
const hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
7
|
+
const ref1 = function validate(data) {
|
|
8
|
+
validate.errors = null;
|
|
9
|
+
let errorCount = 0;
|
|
10
|
+
if (!(typeof data === "string")) {
|
|
11
|
+
if (validate.errors === null)
|
|
12
|
+
validate.errors = [];
|
|
13
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
14
|
+
errorCount++;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
if (!(data === "none" || data === "horizontal" || data === "vertical" || data === "both")) {
|
|
18
|
+
if (validate.errors === null)
|
|
19
|
+
validate.errors = [];
|
|
20
|
+
validate.errors.push({ keywordLocation: "#/enum", instanceLocation: "#" });
|
|
21
|
+
errorCount++;
|
|
41
22
|
}
|
|
42
|
-
|
|
23
|
+
}
|
|
24
|
+
return errorCount === 0;
|
|
25
|
+
};
|
|
26
|
+
const errorMerge = ({ keywordLocation, instanceLocation }, schemaBase, dataBase) => ({
|
|
27
|
+
keywordLocation: `${schemaBase}${keywordLocation.slice(1)}`,
|
|
28
|
+
instanceLocation: `${dataBase}${instanceLocation.slice(1)}`,
|
|
29
|
+
});
|
|
30
|
+
const pattern0 = new RegExp("^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$", "u");
|
|
31
|
+
const ref2 = function validate(data) {
|
|
32
|
+
validate.errors = null;
|
|
33
|
+
let errorCount = 0;
|
|
34
|
+
if (!(typeof data === "string")) {
|
|
35
|
+
if (validate.errors === null)
|
|
36
|
+
validate.errors = [];
|
|
37
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
38
|
+
errorCount++;
|
|
43
39
|
}
|
|
44
40
|
else {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
const prev1 = errorCount;
|
|
42
|
+
if (data.length > 256 && stringLength(data) > 256) {
|
|
43
|
+
if (validate.errors === null)
|
|
44
|
+
validate.errors = [];
|
|
45
|
+
validate.errors.push({ keywordLocation: "#/maxLength", instanceLocation: "#" });
|
|
46
|
+
errorCount++;
|
|
47
|
+
}
|
|
48
|
+
if (errorCount === prev1) {
|
|
49
|
+
if (!pattern0.test(data)) {
|
|
50
|
+
if (validate.errors === null)
|
|
51
|
+
validate.errors = [];
|
|
52
|
+
validate.errors.push({ keywordLocation: "#/pattern", instanceLocation: "#" });
|
|
53
|
+
errorCount++;
|
|
52
54
|
}
|
|
53
|
-
errors++;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
return errorCount === 0;
|
|
58
|
+
};
|
|
59
|
+
const ref3 = function validate(data) {
|
|
60
|
+
validate.errors = null;
|
|
61
|
+
let errorCount = 0;
|
|
62
|
+
if (!Number.isInteger(data)) {
|
|
63
|
+
if (validate.errors === null)
|
|
64
|
+
validate.errors = [];
|
|
65
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
66
|
+
errorCount++;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
if (!(1 <= data)) {
|
|
70
|
+
if (validate.errors === null)
|
|
71
|
+
validate.errors = [];
|
|
72
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
73
|
+
errorCount++;
|
|
74
|
+
}
|
|
75
|
+
if (!(1000 >= data)) {
|
|
76
|
+
if (validate.errors === null)
|
|
77
|
+
validate.errors = [];
|
|
78
|
+
validate.errors.push({ keywordLocation: "#/maximum", instanceLocation: "#" });
|
|
79
|
+
errorCount++;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return errorCount === 0;
|
|
83
|
+
};
|
|
84
|
+
const ref5 = function validate(data) {
|
|
85
|
+
validate.errors = null;
|
|
86
|
+
let errorCount = 0;
|
|
87
|
+
if (!(typeof data === "number")) {
|
|
88
|
+
if (validate.errors === null)
|
|
89
|
+
validate.errors = [];
|
|
90
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
91
|
+
errorCount++;
|
|
61
92
|
}
|
|
62
93
|
else {
|
|
63
|
-
|
|
94
|
+
if (!(0 <= data)) {
|
|
95
|
+
if (validate.errors === null)
|
|
96
|
+
validate.errors = [];
|
|
97
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
98
|
+
errorCount++;
|
|
99
|
+
}
|
|
100
|
+
if (!(10 >= data)) {
|
|
101
|
+
if (validate.errors === null)
|
|
102
|
+
validate.errors = [];
|
|
103
|
+
validate.errors.push({ keywordLocation: "#/maximum", instanceLocation: "#" });
|
|
104
|
+
errorCount++;
|
|
105
|
+
}
|
|
64
106
|
}
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
107
|
+
return errorCount === 0;
|
|
108
|
+
};
|
|
109
|
+
const ref4 = function validate(data) {
|
|
110
|
+
validate.errors = null;
|
|
111
|
+
let errorCount = 0;
|
|
112
|
+
let suberr9 = null;
|
|
113
|
+
const sub6 = (() => {
|
|
114
|
+
let errorCount = 0;
|
|
115
|
+
const err6 = validate.errors;
|
|
116
|
+
const res6 = ref5(data);
|
|
117
|
+
const suberr10 = ref5.errors;
|
|
118
|
+
validate.errors = err6;
|
|
119
|
+
if (!res6) {
|
|
120
|
+
if (validate.errors === null)
|
|
121
|
+
validate.errors = [];
|
|
122
|
+
validate.errors.push(...suberr10.map(e => errorMerge(e, "#/anyOf/0/$ref", "#")));
|
|
123
|
+
errorCount++;
|
|
124
|
+
}
|
|
125
|
+
return errorCount === 0;
|
|
126
|
+
})();
|
|
127
|
+
if (!sub6) {
|
|
128
|
+
const sub7 = (() => {
|
|
129
|
+
let errorCount = 0;
|
|
130
|
+
if (!Array.isArray(data)) {
|
|
131
|
+
if (suberr9 === null)
|
|
132
|
+
suberr9 = [];
|
|
133
|
+
suberr9.push({ keywordLocation: "#/anyOf/1/type", instanceLocation: "#" });
|
|
134
|
+
errorCount++;
|
|
75
135
|
}
|
|
76
136
|
else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (data.length < 0) {
|
|
83
|
-
const err4 = { instancePath, schemaPath: "#/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
84
|
-
if (vErrors === null) {
|
|
85
|
-
vErrors = [err4];
|
|
137
|
+
if (data.length > 2) {
|
|
138
|
+
if (suberr9 === null)
|
|
139
|
+
suberr9 = [];
|
|
140
|
+
suberr9.push({ keywordLocation: "#/anyOf/1/maxItems", instanceLocation: "#" });
|
|
141
|
+
errorCount++;
|
|
86
142
|
}
|
|
87
|
-
|
|
88
|
-
|
|
143
|
+
if (data.length < 0) {
|
|
144
|
+
if (suberr9 === null)
|
|
145
|
+
suberr9 = [];
|
|
146
|
+
suberr9.push({ keywordLocation: "#/anyOf/1/minItems", instanceLocation: "#" });
|
|
147
|
+
errorCount++;
|
|
89
148
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (data0 > 10 || isNaN(data0)) {
|
|
102
|
-
const err5 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/scale/maximum", keyword: "maximum", params: { comparison: "<=", limit: 10 }, message: "must be <= 10" };
|
|
103
|
-
if (vErrors === null) {
|
|
104
|
-
vErrors = [err5];
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
vErrors.push(err5);
|
|
108
|
-
}
|
|
109
|
-
errors++;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
if (data0 < 0 || isNaN(data0)) {
|
|
113
|
-
const err6 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/scale/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
114
|
-
if (vErrors === null) {
|
|
115
|
-
vErrors = [err6];
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
vErrors.push(err6);
|
|
119
|
-
}
|
|
120
|
-
errors++;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const err7 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/scale/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
126
|
-
if (vErrors === null) {
|
|
127
|
-
vErrors = [err7];
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
vErrors.push(err7);
|
|
131
|
-
}
|
|
132
|
-
errors++;
|
|
149
|
+
for (let l = 0; l < data.length; l++) {
|
|
150
|
+
if (data[l] !== undefined && hasOwn(data, l)) {
|
|
151
|
+
const err7 = validate.errors;
|
|
152
|
+
const res7 = ref5(data[l]);
|
|
153
|
+
const suberr11 = ref5.errors;
|
|
154
|
+
validate.errors = err7;
|
|
155
|
+
if (!res7) {
|
|
156
|
+
if (validate.errors === null)
|
|
157
|
+
validate.errors = [];
|
|
158
|
+
validate.errors.push(...suberr11.map(e => errorMerge(e, "#/anyOf/1/items/$ref", "#/" + l)));
|
|
159
|
+
errorCount++;
|
|
133
160
|
}
|
|
134
161
|
}
|
|
135
|
-
var valid2 = _errs6 === errors;
|
|
136
|
-
if (!valid2) {
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
162
|
}
|
|
140
163
|
}
|
|
164
|
+
return errorCount === 0;
|
|
165
|
+
})();
|
|
166
|
+
if (!sub7) {
|
|
167
|
+
if (validate.errors === null)
|
|
168
|
+
validate.errors = [];
|
|
169
|
+
validate.errors.push({ keywordLocation: "#/anyOf", instanceLocation: "#" });
|
|
170
|
+
if (suberr9)
|
|
171
|
+
validate.errors.push(...suberr9);
|
|
172
|
+
errorCount++;
|
|
141
173
|
}
|
|
142
174
|
}
|
|
175
|
+
return errorCount === 0;
|
|
176
|
+
};
|
|
177
|
+
const ref6 = function validate(data) {
|
|
178
|
+
validate.errors = null;
|
|
179
|
+
let errorCount = 0;
|
|
180
|
+
if (!(typeof data === "number")) {
|
|
181
|
+
if (validate.errors === null)
|
|
182
|
+
validate.errors = [];
|
|
183
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
184
|
+
errorCount++;
|
|
185
|
+
}
|
|
143
186
|
else {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
187
|
+
if (!(0 <= data)) {
|
|
188
|
+
if (validate.errors === null)
|
|
189
|
+
validate.errors = [];
|
|
190
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
191
|
+
errorCount++;
|
|
147
192
|
}
|
|
148
|
-
|
|
149
|
-
|
|
193
|
+
if (!(50 >= data)) {
|
|
194
|
+
if (validate.errors === null)
|
|
195
|
+
validate.errors = [];
|
|
196
|
+
validate.errors.push({ keywordLocation: "#/maximum", instanceLocation: "#" });
|
|
197
|
+
errorCount++;
|
|
150
198
|
}
|
|
151
|
-
errors++;
|
|
152
199
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
errors++;
|
|
165
|
-
validate11.errors = vErrors;
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
errors = _errs0;
|
|
170
|
-
if (vErrors !== null) {
|
|
171
|
-
if (_errs0) {
|
|
172
|
-
vErrors.length = _errs0;
|
|
200
|
+
return errorCount === 0;
|
|
201
|
+
};
|
|
202
|
+
const pattern1 = new RegExp("^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$", "u");
|
|
203
|
+
const ref7 = function validate(data) {
|
|
204
|
+
validate.errors = null;
|
|
205
|
+
let errorCount = 0;
|
|
206
|
+
if (!(typeof data === "string")) {
|
|
207
|
+
if (validate.errors === null)
|
|
208
|
+
validate.errors = [];
|
|
209
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
210
|
+
errorCount++;
|
|
173
211
|
}
|
|
174
212
|
else {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; const _errs0 = errors; let valid0 = false; const _errs1 = errors; const _errs2 = errors; if (errors === _errs2) {
|
|
182
|
-
if ((typeof data == "number") && (isFinite(data))) {
|
|
183
|
-
if (data > 360 || isNaN(data)) {
|
|
184
|
-
const err0 = { instancePath, schemaPath: "#/definitions/rotate/maximum", keyword: "maximum", params: { comparison: "<=", limit: 360 }, message: "must be <= 360" };
|
|
185
|
-
if (vErrors === null) {
|
|
186
|
-
vErrors = [err0];
|
|
213
|
+
const prev2 = errorCount;
|
|
214
|
+
if (data.length > 130 && stringLength(data) > 130) {
|
|
215
|
+
if (validate.errors === null)
|
|
216
|
+
validate.errors = [];
|
|
217
|
+
validate.errors.push({ keywordLocation: "#/maxLength", instanceLocation: "#" });
|
|
218
|
+
errorCount++;
|
|
187
219
|
}
|
|
188
|
-
|
|
189
|
-
|
|
220
|
+
if (errorCount === prev2) {
|
|
221
|
+
if (!pattern1.test(data)) {
|
|
222
|
+
if (validate.errors === null)
|
|
223
|
+
validate.errors = [];
|
|
224
|
+
validate.errors.push({ keywordLocation: "#/pattern", instanceLocation: "#" });
|
|
225
|
+
errorCount++;
|
|
226
|
+
}
|
|
190
227
|
}
|
|
191
|
-
|
|
228
|
+
}
|
|
229
|
+
return errorCount === 0;
|
|
230
|
+
};
|
|
231
|
+
const pattern2 = new RegExp("^[a-z][a-zA-Z0-9]*Probability$", "u");
|
|
232
|
+
const pattern3 = new RegExp("^[a-z][a-zA-Z0-9]*Variant$", "u");
|
|
233
|
+
const pattern4 = new RegExp("^[a-z][a-zA-Z0-9]*$", "u");
|
|
234
|
+
const ref8 = function validate(data) {
|
|
235
|
+
validate.errors = null;
|
|
236
|
+
let errorCount = 0;
|
|
237
|
+
if (!(typeof data === "string")) {
|
|
238
|
+
if (validate.errors === null)
|
|
239
|
+
validate.errors = [];
|
|
240
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
241
|
+
errorCount++;
|
|
192
242
|
}
|
|
193
243
|
else {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if (
|
|
197
|
-
|
|
244
|
+
const prev3 = errorCount;
|
|
245
|
+
if (data.length > 64 && stringLength(data) > 64) {
|
|
246
|
+
if (validate.errors === null)
|
|
247
|
+
validate.errors = [];
|
|
248
|
+
validate.errors.push({ keywordLocation: "#/maxLength", instanceLocation: "#" });
|
|
249
|
+
errorCount++;
|
|
250
|
+
}
|
|
251
|
+
if (errorCount === prev3) {
|
|
252
|
+
if (!pattern4.test(data)) {
|
|
253
|
+
if (validate.errors === null)
|
|
254
|
+
validate.errors = [];
|
|
255
|
+
validate.errors.push({ keywordLocation: "#/pattern", instanceLocation: "#" });
|
|
256
|
+
errorCount++;
|
|
198
257
|
}
|
|
199
|
-
|
|
200
|
-
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return errorCount === 0;
|
|
261
|
+
};
|
|
262
|
+
const pattern5 = new RegExp("^[a-z][a-zA-Z0-9]*Color$", "u");
|
|
263
|
+
const pattern6 = new RegExp("^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$", "u");
|
|
264
|
+
const ref9 = function validate(data) {
|
|
265
|
+
validate.errors = null;
|
|
266
|
+
let errorCount = 0;
|
|
267
|
+
if (!(typeof data === "string")) {
|
|
268
|
+
if (validate.errors === null)
|
|
269
|
+
validate.errors = [];
|
|
270
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
271
|
+
errorCount++;
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
const prev4 = errorCount;
|
|
275
|
+
if (errorCount === prev4) {
|
|
276
|
+
if (!pattern6.test(data)) {
|
|
277
|
+
if (validate.errors === null)
|
|
278
|
+
validate.errors = [];
|
|
279
|
+
validate.errors.push({ keywordLocation: "#/pattern", instanceLocation: "#" });
|
|
280
|
+
errorCount++;
|
|
201
281
|
}
|
|
202
|
-
errors++;
|
|
203
282
|
}
|
|
204
283
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
284
|
+
return errorCount === 0;
|
|
285
|
+
};
|
|
286
|
+
const pattern7 = new RegExp("^[a-z][a-zA-Z0-9]*ColorFill$", "u");
|
|
287
|
+
const ref10 = function validate(data) {
|
|
288
|
+
validate.errors = null;
|
|
289
|
+
let errorCount = 0;
|
|
290
|
+
if (!(typeof data === "string")) {
|
|
291
|
+
if (validate.errors === null)
|
|
292
|
+
validate.errors = [];
|
|
293
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
294
|
+
errorCount++;
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
if (!(data === "solid" || data === "linear" || data === "radial")) {
|
|
298
|
+
if (validate.errors === null)
|
|
299
|
+
validate.errors = [];
|
|
300
|
+
validate.errors.push({ keywordLocation: "#/enum", instanceLocation: "#" });
|
|
301
|
+
errorCount++;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return errorCount === 0;
|
|
305
|
+
};
|
|
306
|
+
const pattern8 = new RegExp("^[a-z][a-zA-Z0-9]*ColorFillStops$", "u");
|
|
307
|
+
const ref11 = function validate(data) {
|
|
308
|
+
validate.errors = null;
|
|
309
|
+
let errorCount = 0;
|
|
310
|
+
if (!Number.isInteger(data)) {
|
|
311
|
+
if (validate.errors === null)
|
|
312
|
+
validate.errors = [];
|
|
313
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
314
|
+
errorCount++;
|
|
210
315
|
}
|
|
211
316
|
else {
|
|
212
|
-
|
|
317
|
+
if (!(2 <= data)) {
|
|
318
|
+
if (validate.errors === null)
|
|
319
|
+
validate.errors = [];
|
|
320
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
321
|
+
errorCount++;
|
|
322
|
+
}
|
|
213
323
|
}
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
324
|
+
return errorCount === 0;
|
|
325
|
+
};
|
|
326
|
+
const pattern9 = new RegExp("^[a-z][a-zA-Z0-9]*ColorAngle$", "u");
|
|
327
|
+
const ref13 = function validate(data) {
|
|
328
|
+
validate.errors = null;
|
|
329
|
+
let errorCount = 0;
|
|
330
|
+
if (!(typeof data === "number")) {
|
|
331
|
+
if (validate.errors === null)
|
|
332
|
+
validate.errors = [];
|
|
333
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
334
|
+
errorCount++;
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
if (!(-360 <= data)) {
|
|
338
|
+
if (validate.errors === null)
|
|
339
|
+
validate.errors = [];
|
|
340
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
341
|
+
errorCount++;
|
|
342
|
+
}
|
|
343
|
+
if (!(360 >= data)) {
|
|
344
|
+
if (validate.errors === null)
|
|
345
|
+
validate.errors = [];
|
|
346
|
+
validate.errors.push({ keywordLocation: "#/maximum", instanceLocation: "#" });
|
|
347
|
+
errorCount++;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return errorCount === 0;
|
|
351
|
+
};
|
|
352
|
+
const ref12 = function validate(data) {
|
|
353
|
+
validate.errors = null;
|
|
354
|
+
let errorCount = 0;
|
|
355
|
+
let suberr32 = null;
|
|
356
|
+
const sub21 = (() => {
|
|
357
|
+
let errorCount = 0;
|
|
358
|
+
const err22 = validate.errors;
|
|
359
|
+
const res22 = ref13(data);
|
|
360
|
+
const suberr33 = ref13.errors;
|
|
361
|
+
validate.errors = err22;
|
|
362
|
+
if (!res22) {
|
|
363
|
+
if (validate.errors === null)
|
|
364
|
+
validate.errors = [];
|
|
365
|
+
validate.errors.push(...suberr33.map(e => errorMerge(e, "#/anyOf/0/$ref", "#")));
|
|
366
|
+
errorCount++;
|
|
367
|
+
}
|
|
368
|
+
return errorCount === 0;
|
|
369
|
+
})();
|
|
370
|
+
if (!sub21) {
|
|
371
|
+
const sub22 = (() => {
|
|
372
|
+
let errorCount = 0;
|
|
373
|
+
if (!Array.isArray(data)) {
|
|
374
|
+
if (suberr32 === null)
|
|
375
|
+
suberr32 = [];
|
|
376
|
+
suberr32.push({ keywordLocation: "#/anyOf/1/type", instanceLocation: "#" });
|
|
377
|
+
errorCount++;
|
|
224
378
|
}
|
|
225
379
|
else {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (data.length < 0) {
|
|
232
|
-
const err4 = { instancePath, schemaPath: "#/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
233
|
-
if (vErrors === null) {
|
|
234
|
-
vErrors = [err4];
|
|
380
|
+
if (data.length > 2) {
|
|
381
|
+
if (suberr32 === null)
|
|
382
|
+
suberr32 = [];
|
|
383
|
+
suberr32.push({ keywordLocation: "#/anyOf/1/maxItems", instanceLocation: "#" });
|
|
384
|
+
errorCount++;
|
|
235
385
|
}
|
|
236
|
-
|
|
237
|
-
|
|
386
|
+
if (data.length < 0) {
|
|
387
|
+
if (suberr32 === null)
|
|
388
|
+
suberr32 = [];
|
|
389
|
+
suberr32.push({ keywordLocation: "#/anyOf/1/minItems", instanceLocation: "#" });
|
|
390
|
+
errorCount++;
|
|
238
391
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (data0 > 360 || isNaN(data0)) {
|
|
251
|
-
const err5 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/rotate/maximum", keyword: "maximum", params: { comparison: "<=", limit: 360 }, message: "must be <= 360" };
|
|
252
|
-
if (vErrors === null) {
|
|
253
|
-
vErrors = [err5];
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
vErrors.push(err5);
|
|
257
|
-
}
|
|
258
|
-
errors++;
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
if (data0 < -360 || isNaN(data0)) {
|
|
262
|
-
const err6 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/rotate/minimum", keyword: "minimum", params: { comparison: ">=", limit: -360 }, message: "must be >= -360" };
|
|
263
|
-
if (vErrors === null) {
|
|
264
|
-
vErrors = [err6];
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
vErrors.push(err6);
|
|
268
|
-
}
|
|
269
|
-
errors++;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
const err7 = { instancePath: instancePath + "/" + i0, schemaPath: "#/definitions/rotate/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
275
|
-
if (vErrors === null) {
|
|
276
|
-
vErrors = [err7];
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
vErrors.push(err7);
|
|
280
|
-
}
|
|
281
|
-
errors++;
|
|
392
|
+
for (let s = 0; s < data.length; s++) {
|
|
393
|
+
if (data[s] !== undefined && hasOwn(data, s)) {
|
|
394
|
+
const err23 = validate.errors;
|
|
395
|
+
const res23 = ref13(data[s]);
|
|
396
|
+
const suberr34 = ref13.errors;
|
|
397
|
+
validate.errors = err23;
|
|
398
|
+
if (!res23) {
|
|
399
|
+
if (validate.errors === null)
|
|
400
|
+
validate.errors = [];
|
|
401
|
+
validate.errors.push(...suberr34.map(e => errorMerge(e, "#/anyOf/1/items/$ref", "#/" + s)));
|
|
402
|
+
errorCount++;
|
|
282
403
|
}
|
|
283
404
|
}
|
|
284
|
-
var valid2 = _errs6 === errors;
|
|
285
|
-
if (!valid2) {
|
|
286
|
-
break;
|
|
287
|
-
}
|
|
288
405
|
}
|
|
289
406
|
}
|
|
407
|
+
return errorCount === 0;
|
|
408
|
+
})();
|
|
409
|
+
if (!sub22) {
|
|
410
|
+
if (validate.errors === null)
|
|
411
|
+
validate.errors = [];
|
|
412
|
+
validate.errors.push({ keywordLocation: "#/anyOf", instanceLocation: "#" });
|
|
413
|
+
if (suberr32)
|
|
414
|
+
validate.errors.push(...suberr32);
|
|
415
|
+
errorCount++;
|
|
290
416
|
}
|
|
291
417
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
var _valid0 = _errs4 === errors;
|
|
304
|
-
valid0 = valid0 || _valid0;
|
|
305
|
-
} if (!valid0) {
|
|
306
|
-
const err9 = { instancePath, schemaPath: "#/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
307
|
-
if (vErrors === null) {
|
|
308
|
-
vErrors = [err9];
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
vErrors.push(err9);
|
|
312
|
-
}
|
|
313
|
-
errors++;
|
|
314
|
-
validate13.errors = vErrors;
|
|
315
|
-
return false;
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
errors = _errs0;
|
|
319
|
-
if (vErrors !== null) {
|
|
320
|
-
if (_errs0) {
|
|
321
|
-
vErrors.length = _errs0;
|
|
418
|
+
return errorCount === 0;
|
|
419
|
+
};
|
|
420
|
+
const pattern10 = new RegExp("^[a-z][a-zA-Z0-9]*ColorOrder$", "u");
|
|
421
|
+
const ref15 = function validate(data) {
|
|
422
|
+
validate.errors = null;
|
|
423
|
+
let errorCount = 0;
|
|
424
|
+
if (!(typeof data === "number")) {
|
|
425
|
+
if (validate.errors === null)
|
|
426
|
+
validate.errors = [];
|
|
427
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
428
|
+
errorCount++;
|
|
322
429
|
}
|
|
323
430
|
else {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const schema38 = { "type": "number", "minimum": -1000, "maximum": 1000 };
|
|
330
|
-
function validate16(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; const _errs0 = errors; let valid0 = false; const _errs1 = errors; const _errs2 = errors; if (errors === _errs2) {
|
|
331
|
-
if ((typeof data == "number") && (isFinite(data))) {
|
|
332
|
-
if (data > 1000 || isNaN(data)) {
|
|
333
|
-
const err0 = { instancePath, schemaPath: "#/definitions/translate/maximum", keyword: "maximum", params: { comparison: "<=", limit: 1000 }, message: "must be <= 1000" };
|
|
334
|
-
if (vErrors === null) {
|
|
335
|
-
vErrors = [err0];
|
|
431
|
+
if (!(-1000 <= data)) {
|
|
432
|
+
if (validate.errors === null)
|
|
433
|
+
validate.errors = [];
|
|
434
|
+
validate.errors.push({ keywordLocation: "#/minimum", instanceLocation: "#" });
|
|
435
|
+
errorCount++;
|
|
336
436
|
}
|
|
337
|
-
|
|
338
|
-
|
|
437
|
+
if (!(1000 >= data)) {
|
|
438
|
+
if (validate.errors === null)
|
|
439
|
+
validate.errors = [];
|
|
440
|
+
validate.errors.push({ keywordLocation: "#/maximum", instanceLocation: "#" });
|
|
441
|
+
errorCount++;
|
|
339
442
|
}
|
|
340
|
-
errors++;
|
|
341
443
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
444
|
+
return errorCount === 0;
|
|
445
|
+
};
|
|
446
|
+
const ref14 = function validate(data) {
|
|
447
|
+
validate.errors = null;
|
|
448
|
+
let errorCount = 0;
|
|
449
|
+
let suberr37 = null;
|
|
450
|
+
const sub23 = (() => {
|
|
451
|
+
let errorCount = 0;
|
|
452
|
+
const err26 = validate.errors;
|
|
453
|
+
const res26 = ref15(data);
|
|
454
|
+
const suberr38 = ref15.errors;
|
|
455
|
+
validate.errors = err26;
|
|
456
|
+
if (!res26) {
|
|
457
|
+
if (validate.errors === null)
|
|
458
|
+
validate.errors = [];
|
|
459
|
+
validate.errors.push(...suberr38.map(e => errorMerge(e, "#/anyOf/0/$ref", "#")));
|
|
460
|
+
errorCount++;
|
|
461
|
+
}
|
|
462
|
+
return errorCount === 0;
|
|
463
|
+
})();
|
|
464
|
+
if (!sub23) {
|
|
465
|
+
const sub24 = (() => {
|
|
466
|
+
let errorCount = 0;
|
|
467
|
+
if (!Array.isArray(data)) {
|
|
468
|
+
if (suberr37 === null)
|
|
469
|
+
suberr37 = [];
|
|
470
|
+
suberr37.push({ keywordLocation: "#/anyOf/1/type", instanceLocation: "#" });
|
|
471
|
+
errorCount++;
|
|
347
472
|
}
|
|
348
473
|
else {
|
|
349
|
-
|
|
474
|
+
if (data.length > 2) {
|
|
475
|
+
if (suberr37 === null)
|
|
476
|
+
suberr37 = [];
|
|
477
|
+
suberr37.push({ keywordLocation: "#/anyOf/1/maxItems", instanceLocation: "#" });
|
|
478
|
+
errorCount++;
|
|
479
|
+
}
|
|
480
|
+
if (data.length < 0) {
|
|
481
|
+
if (suberr37 === null)
|
|
482
|
+
suberr37 = [];
|
|
483
|
+
suberr37.push({ keywordLocation: "#/anyOf/1/minItems", instanceLocation: "#" });
|
|
484
|
+
errorCount++;
|
|
485
|
+
}
|
|
486
|
+
for (let t = 0; t < data.length; t++) {
|
|
487
|
+
if (data[t] !== undefined && hasOwn(data, t)) {
|
|
488
|
+
const err27 = validate.errors;
|
|
489
|
+
const res27 = ref15(data[t]);
|
|
490
|
+
const suberr39 = ref15.errors;
|
|
491
|
+
validate.errors = err27;
|
|
492
|
+
if (!res27) {
|
|
493
|
+
if (validate.errors === null)
|
|
494
|
+
validate.errors = [];
|
|
495
|
+
validate.errors.push(...suberr39.map(e => errorMerge(e, "#/anyOf/1/items/$ref", "#/" + t)));
|
|
496
|
+
errorCount++;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
350
500
|
}
|
|
351
|
-
|
|
501
|
+
return errorCount === 0;
|
|
502
|
+
})();
|
|
503
|
+
if (!sub24) {
|
|
504
|
+
if (validate.errors === null)
|
|
505
|
+
validate.errors = [];
|
|
506
|
+
validate.errors.push({ keywordLocation: "#/anyOf", instanceLocation: "#" });
|
|
507
|
+
if (suberr37)
|
|
508
|
+
validate.errors.push(...suberr37);
|
|
509
|
+
errorCount++;
|
|
352
510
|
}
|
|
353
511
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
512
|
+
return errorCount === 0;
|
|
513
|
+
};
|
|
514
|
+
const ref0 = function validate(data) {
|
|
515
|
+
validate.errors = null;
|
|
516
|
+
let errorCount = 0;
|
|
517
|
+
if (!(typeof data === "object" && data && !Array.isArray(data))) {
|
|
518
|
+
if (validate.errors === null)
|
|
519
|
+
validate.errors = [];
|
|
520
|
+
validate.errors.push({ keywordLocation: "#/type", instanceLocation: "#" });
|
|
521
|
+
errorCount++;
|
|
359
522
|
}
|
|
360
523
|
else {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
524
|
+
const prev0 = errorCount;
|
|
525
|
+
if (Object.keys(data).length > 512) {
|
|
526
|
+
if (validate.errors === null)
|
|
527
|
+
validate.errors = [];
|
|
528
|
+
validate.errors.push({ keywordLocation: "#/maxProperties", instanceLocation: "#" });
|
|
529
|
+
errorCount++;
|
|
530
|
+
}
|
|
531
|
+
for (const key0 of Object.keys(data)) {
|
|
532
|
+
if (key0.length > 128 && stringLength(key0) > 128) {
|
|
533
|
+
if (validate.errors === null)
|
|
534
|
+
validate.errors = [];
|
|
535
|
+
validate.errors.push({ keywordLocation: "#/propertyNames/maxLength", instanceLocation: "#/" + pointerPart(key0) });
|
|
536
|
+
errorCount++;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (data.seed !== undefined && hasOwn(data, "seed")) {
|
|
540
|
+
if (!(typeof data.seed === "string")) {
|
|
541
|
+
if (validate.errors === null)
|
|
542
|
+
validate.errors = [];
|
|
543
|
+
validate.errors.push({ keywordLocation: "#/properties/seed/type", instanceLocation: "#/seed" });
|
|
544
|
+
errorCount++;
|
|
373
545
|
}
|
|
374
546
|
else {
|
|
375
|
-
|
|
547
|
+
if (data.seed.length > 1024 && stringLength(data.seed) > 1024) {
|
|
548
|
+
if (validate.errors === null)
|
|
549
|
+
validate.errors = [];
|
|
550
|
+
validate.errors.push({ keywordLocation: "#/properties/seed/maxLength", instanceLocation: "#/seed" });
|
|
551
|
+
errorCount++;
|
|
552
|
+
}
|
|
376
553
|
}
|
|
377
|
-
errors++;
|
|
378
554
|
}
|
|
379
|
-
|
|
380
|
-
if (data.
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
555
|
+
if (data.size !== undefined && hasOwn(data, "size")) {
|
|
556
|
+
if (!Number.isInteger(data.size)) {
|
|
557
|
+
if (validate.errors === null)
|
|
558
|
+
validate.errors = [];
|
|
559
|
+
validate.errors.push({ keywordLocation: "#/properties/size/type", instanceLocation: "#/size" });
|
|
560
|
+
errorCount++;
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
if (!(1 <= data.size)) {
|
|
564
|
+
if (validate.errors === null)
|
|
565
|
+
validate.errors = [];
|
|
566
|
+
validate.errors.push({ keywordLocation: "#/properties/size/minimum", instanceLocation: "#/size" });
|
|
567
|
+
errorCount++;
|
|
384
568
|
}
|
|
385
|
-
|
|
386
|
-
|
|
569
|
+
if (!(4096 >= data.size)) {
|
|
570
|
+
if (validate.errors === null)
|
|
571
|
+
validate.errors = [];
|
|
572
|
+
validate.errors.push({ keywordLocation: "#/properties/size/maximum", instanceLocation: "#/size" });
|
|
573
|
+
errorCount++;
|
|
387
574
|
}
|
|
388
|
-
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (data.idRandomization !== undefined && hasOwn(data, "idRandomization")) {
|
|
578
|
+
if (!(typeof data.idRandomization === "boolean")) {
|
|
579
|
+
if (validate.errors === null)
|
|
580
|
+
validate.errors = [];
|
|
581
|
+
validate.errors.push({ keywordLocation: "#/properties/idRandomization/type", instanceLocation: "#/idRandomization" });
|
|
582
|
+
errorCount++;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
if (data.title !== undefined && hasOwn(data, "title")) {
|
|
586
|
+
if (!(typeof data.title === "string")) {
|
|
587
|
+
if (validate.errors === null)
|
|
588
|
+
validate.errors = [];
|
|
589
|
+
validate.errors.push({ keywordLocation: "#/properties/title/type", instanceLocation: "#/title" });
|
|
590
|
+
errorCount++;
|
|
389
591
|
}
|
|
390
592
|
else {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
593
|
+
if (data.title.length > 256 && stringLength(data.title) > 256) {
|
|
594
|
+
if (validate.errors === null)
|
|
595
|
+
validate.errors = [];
|
|
596
|
+
validate.errors.push({ keywordLocation: "#/properties/title/maxLength", instanceLocation: "#/title" });
|
|
597
|
+
errorCount++;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (data.flip !== undefined && hasOwn(data, "flip")) {
|
|
602
|
+
let suberr0 = null;
|
|
603
|
+
const sub0 = (() => {
|
|
604
|
+
let errorCount = 0;
|
|
605
|
+
const err0 = validate.errors;
|
|
606
|
+
const res0 = ref1(data.flip);
|
|
607
|
+
const suberr1 = ref1.errors;
|
|
608
|
+
validate.errors = err0;
|
|
609
|
+
if (!res0) {
|
|
610
|
+
if (validate.errors === null)
|
|
611
|
+
validate.errors = [];
|
|
612
|
+
validate.errors.push(...suberr1.map(e => errorMerge(e, "#/properties/flip/anyOf/0/$ref", "#/flip")));
|
|
613
|
+
errorCount++;
|
|
614
|
+
}
|
|
615
|
+
return errorCount === 0;
|
|
616
|
+
})();
|
|
617
|
+
if (!sub0) {
|
|
618
|
+
const sub1 = (() => {
|
|
619
|
+
let errorCount = 0;
|
|
620
|
+
if (!Array.isArray(data.flip)) {
|
|
621
|
+
if (suberr0 === null)
|
|
622
|
+
suberr0 = [];
|
|
623
|
+
suberr0.push({ keywordLocation: "#/properties/flip/anyOf/1/type", instanceLocation: "#/flip" });
|
|
624
|
+
errorCount++;
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
if (data.flip.length > 4) {
|
|
628
|
+
if (suberr0 === null)
|
|
629
|
+
suberr0 = [];
|
|
630
|
+
suberr0.push({ keywordLocation: "#/properties/flip/anyOf/1/maxItems", instanceLocation: "#/flip" });
|
|
631
|
+
errorCount++;
|
|
421
632
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
633
|
+
if (data.flip.length < 0) {
|
|
634
|
+
if (suberr0 === null)
|
|
635
|
+
suberr0 = [];
|
|
636
|
+
suberr0.push({ keywordLocation: "#/properties/flip/anyOf/1/minItems", instanceLocation: "#/flip" });
|
|
637
|
+
errorCount++;
|
|
638
|
+
}
|
|
639
|
+
for (let i = 0; i < data.flip.length; i++) {
|
|
640
|
+
if (data.flip[i] !== undefined && hasOwn(data.flip, i)) {
|
|
641
|
+
const err1 = validate.errors;
|
|
642
|
+
const res1 = ref1(data.flip[i]);
|
|
643
|
+
const suberr2 = ref1.errors;
|
|
644
|
+
validate.errors = err1;
|
|
645
|
+
if (!res1) {
|
|
646
|
+
if (validate.errors === null)
|
|
647
|
+
validate.errors = [];
|
|
648
|
+
validate.errors.push(...suberr2.map(e => errorMerge(e, "#/properties/flip/anyOf/1/items/$ref", "#/flip/" + i)));
|
|
649
|
+
errorCount++;
|
|
650
|
+
}
|
|
429
651
|
}
|
|
430
|
-
errors++;
|
|
431
652
|
}
|
|
432
653
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
654
|
+
return errorCount === 0;
|
|
655
|
+
})();
|
|
656
|
+
if (!sub1) {
|
|
657
|
+
if (validate.errors === null)
|
|
658
|
+
validate.errors = [];
|
|
659
|
+
validate.errors.push({ keywordLocation: "#/properties/flip/anyOf", instanceLocation: "#/flip" });
|
|
660
|
+
if (suberr0)
|
|
661
|
+
validate.errors.push(...suberr0);
|
|
662
|
+
errorCount++;
|
|
437
663
|
}
|
|
438
664
|
}
|
|
439
665
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
return false;
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
errors = _errs0;
|
|
468
|
-
if (vErrors !== null) {
|
|
469
|
-
if (_errs0) {
|
|
470
|
-
vErrors.length = _errs0;
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
vErrors = null;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
} validate16.errors = vErrors; return errors === 0; }
|
|
477
|
-
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { /*# sourceURL="https://cdn.hopjs.net/npm/@dicebear/schema@1.3.0/dist/options.min.json" */ ; let vErrors = null; let errors = 0; if (errors === 0) {
|
|
478
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
479
|
-
if (Object.keys(data).length > 512) {
|
|
480
|
-
validate10.errors = [{ instancePath, schemaPath: "#/maxProperties", keyword: "maxProperties", params: { limit: 512 }, message: "must NOT have more than 512 properties" }];
|
|
481
|
-
return false;
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
for (const key0 in data) {
|
|
485
|
-
const _errs1 = errors;
|
|
486
|
-
if (typeof key0 === "string") {
|
|
487
|
-
if (func2(key0) > 128) {
|
|
488
|
-
const err0 = { instancePath, schemaPath: "#/propertyNames/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters", propertyName: key0 };
|
|
489
|
-
if (vErrors === null) {
|
|
490
|
-
vErrors = [err0];
|
|
666
|
+
if (data.fontFamily !== undefined && hasOwn(data, "fontFamily")) {
|
|
667
|
+
let suberr3 = null;
|
|
668
|
+
const sub2 = (() => {
|
|
669
|
+
let errorCount = 0;
|
|
670
|
+
const err2 = validate.errors;
|
|
671
|
+
const res2 = ref2(data.fontFamily);
|
|
672
|
+
const suberr4 = ref2.errors;
|
|
673
|
+
validate.errors = err2;
|
|
674
|
+
if (!res2) {
|
|
675
|
+
if (validate.errors === null)
|
|
676
|
+
validate.errors = [];
|
|
677
|
+
validate.errors.push(...suberr4.map(e => errorMerge(e, "#/properties/fontFamily/anyOf/0/$ref", "#/fontFamily")));
|
|
678
|
+
errorCount++;
|
|
679
|
+
}
|
|
680
|
+
return errorCount === 0;
|
|
681
|
+
})();
|
|
682
|
+
if (!sub2) {
|
|
683
|
+
const sub3 = (() => {
|
|
684
|
+
let errorCount = 0;
|
|
685
|
+
if (!Array.isArray(data.fontFamily)) {
|
|
686
|
+
if (suberr3 === null)
|
|
687
|
+
suberr3 = [];
|
|
688
|
+
suberr3.push({ keywordLocation: "#/properties/fontFamily/anyOf/1/type", instanceLocation: "#/fontFamily" });
|
|
689
|
+
errorCount++;
|
|
491
690
|
}
|
|
492
691
|
else {
|
|
493
|
-
|
|
692
|
+
if (data.fontFamily.length > 128) {
|
|
693
|
+
if (suberr3 === null)
|
|
694
|
+
suberr3 = [];
|
|
695
|
+
suberr3.push({ keywordLocation: "#/properties/fontFamily/anyOf/1/maxItems", instanceLocation: "#/fontFamily" });
|
|
696
|
+
errorCount++;
|
|
697
|
+
}
|
|
698
|
+
if (data.fontFamily.length < 0) {
|
|
699
|
+
if (suberr3 === null)
|
|
700
|
+
suberr3 = [];
|
|
701
|
+
suberr3.push({ keywordLocation: "#/properties/fontFamily/anyOf/1/minItems", instanceLocation: "#/fontFamily" });
|
|
702
|
+
errorCount++;
|
|
703
|
+
}
|
|
704
|
+
for (let j = 0; j < data.fontFamily.length; j++) {
|
|
705
|
+
if (data.fontFamily[j] !== undefined && hasOwn(data.fontFamily, j)) {
|
|
706
|
+
const err3 = validate.errors;
|
|
707
|
+
const res3 = ref2(data.fontFamily[j]);
|
|
708
|
+
const suberr5 = ref2.errors;
|
|
709
|
+
validate.errors = err3;
|
|
710
|
+
if (!res3) {
|
|
711
|
+
if (validate.errors === null)
|
|
712
|
+
validate.errors = [];
|
|
713
|
+
validate.errors.push(...suberr5.map(e => errorMerge(e, "#/properties/fontFamily/anyOf/1/items/$ref", "#/fontFamily/" + j)));
|
|
714
|
+
errorCount++;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
494
718
|
}
|
|
495
|
-
|
|
719
|
+
return errorCount === 0;
|
|
720
|
+
})();
|
|
721
|
+
if (!sub3) {
|
|
722
|
+
if (validate.errors === null)
|
|
723
|
+
validate.errors = [];
|
|
724
|
+
validate.errors.push({ keywordLocation: "#/properties/fontFamily/anyOf", instanceLocation: "#/fontFamily" });
|
|
725
|
+
if (suberr3)
|
|
726
|
+
validate.errors.push(...suberr3);
|
|
727
|
+
errorCount++;
|
|
496
728
|
}
|
|
497
729
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
730
|
+
}
|
|
731
|
+
if (data.fontWeight !== undefined && hasOwn(data, "fontWeight")) {
|
|
732
|
+
let suberr6 = null;
|
|
733
|
+
const sub4 = (() => {
|
|
734
|
+
let errorCount = 0;
|
|
735
|
+
const err4 = validate.errors;
|
|
736
|
+
const res4 = ref3(data.fontWeight);
|
|
737
|
+
const suberr7 = ref3.errors;
|
|
738
|
+
validate.errors = err4;
|
|
739
|
+
if (!res4) {
|
|
740
|
+
if (validate.errors === null)
|
|
741
|
+
validate.errors = [];
|
|
742
|
+
validate.errors.push(...suberr7.map(e => errorMerge(e, "#/properties/fontWeight/anyOf/0/$ref", "#/fontWeight")));
|
|
743
|
+
errorCount++;
|
|
503
744
|
}
|
|
504
|
-
|
|
505
|
-
|
|
745
|
+
return errorCount === 0;
|
|
746
|
+
})();
|
|
747
|
+
if (!sub4) {
|
|
748
|
+
const sub5 = (() => {
|
|
749
|
+
let errorCount = 0;
|
|
750
|
+
if (!Array.isArray(data.fontWeight)) {
|
|
751
|
+
if (suberr6 === null)
|
|
752
|
+
suberr6 = [];
|
|
753
|
+
suberr6.push({ keywordLocation: "#/properties/fontWeight/anyOf/1/type", instanceLocation: "#/fontWeight" });
|
|
754
|
+
errorCount++;
|
|
755
|
+
}
|
|
756
|
+
else {
|
|
757
|
+
if (data.fontWeight.length > 128) {
|
|
758
|
+
if (suberr6 === null)
|
|
759
|
+
suberr6 = [];
|
|
760
|
+
suberr6.push({ keywordLocation: "#/properties/fontWeight/anyOf/1/maxItems", instanceLocation: "#/fontWeight" });
|
|
761
|
+
errorCount++;
|
|
762
|
+
}
|
|
763
|
+
if (data.fontWeight.length < 0) {
|
|
764
|
+
if (suberr6 === null)
|
|
765
|
+
suberr6 = [];
|
|
766
|
+
suberr6.push({ keywordLocation: "#/properties/fontWeight/anyOf/1/minItems", instanceLocation: "#/fontWeight" });
|
|
767
|
+
errorCount++;
|
|
768
|
+
}
|
|
769
|
+
for (let k = 0; k < data.fontWeight.length; k++) {
|
|
770
|
+
if (data.fontWeight[k] !== undefined && hasOwn(data.fontWeight, k)) {
|
|
771
|
+
const err5 = validate.errors;
|
|
772
|
+
const res5 = ref3(data.fontWeight[k]);
|
|
773
|
+
const suberr8 = ref3.errors;
|
|
774
|
+
validate.errors = err5;
|
|
775
|
+
if (!res5) {
|
|
776
|
+
if (validate.errors === null)
|
|
777
|
+
validate.errors = [];
|
|
778
|
+
validate.errors.push(...suberr8.map(e => errorMerge(e, "#/properties/fontWeight/anyOf/1/items/$ref", "#/fontWeight/" + k)));
|
|
779
|
+
errorCount++;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
return errorCount === 0;
|
|
785
|
+
})();
|
|
786
|
+
if (!sub5) {
|
|
787
|
+
if (validate.errors === null)
|
|
788
|
+
validate.errors = [];
|
|
789
|
+
validate.errors.push({ keywordLocation: "#/properties/fontWeight/anyOf", instanceLocation: "#/fontWeight" });
|
|
790
|
+
if (suberr6)
|
|
791
|
+
validate.errors.push(...suberr6);
|
|
792
|
+
errorCount++;
|
|
506
793
|
}
|
|
507
|
-
errors++;
|
|
508
|
-
validate10.errors = vErrors;
|
|
509
|
-
return false;
|
|
510
|
-
break;
|
|
511
794
|
}
|
|
512
795
|
}
|
|
513
|
-
if (
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
796
|
+
if (data.scale !== undefined && hasOwn(data, "scale")) {
|
|
797
|
+
const err8 = validate.errors;
|
|
798
|
+
const res8 = ref4(data.scale);
|
|
799
|
+
const suberr12 = ref4.errors;
|
|
800
|
+
validate.errors = err8;
|
|
801
|
+
if (!res8) {
|
|
802
|
+
if (validate.errors === null)
|
|
803
|
+
validate.errors = [];
|
|
804
|
+
validate.errors.push(...suberr12.map(e => errorMerge(e, "#/properties/scale/allOf/0/$ref", "#/scale")));
|
|
805
|
+
errorCount++;
|
|
521
806
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
807
|
+
}
|
|
808
|
+
if (data.borderRadius !== undefined && hasOwn(data, "borderRadius")) {
|
|
809
|
+
let suberr13 = null;
|
|
810
|
+
const sub8 = (() => {
|
|
811
|
+
let errorCount = 0;
|
|
812
|
+
const err9 = validate.errors;
|
|
813
|
+
const res9 = ref6(data.borderRadius);
|
|
814
|
+
const suberr14 = ref6.errors;
|
|
815
|
+
validate.errors = err9;
|
|
816
|
+
if (!res9) {
|
|
817
|
+
if (validate.errors === null)
|
|
818
|
+
validate.errors = [];
|
|
819
|
+
validate.errors.push(...suberr14.map(e => errorMerge(e, "#/properties/borderRadius/anyOf/0/$ref", "#/borderRadius")));
|
|
820
|
+
errorCount++;
|
|
821
|
+
}
|
|
822
|
+
return errorCount === 0;
|
|
823
|
+
})();
|
|
824
|
+
if (!sub8) {
|
|
825
|
+
const sub9 = (() => {
|
|
826
|
+
let errorCount = 0;
|
|
827
|
+
if (!Array.isArray(data.borderRadius)) {
|
|
828
|
+
if (suberr13 === null)
|
|
829
|
+
suberr13 = [];
|
|
830
|
+
suberr13.push({ keywordLocation: "#/properties/borderRadius/anyOf/1/type", instanceLocation: "#/borderRadius" });
|
|
831
|
+
errorCount++;
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
834
|
+
if (data.borderRadius.length > 2) {
|
|
835
|
+
if (suberr13 === null)
|
|
836
|
+
suberr13 = [];
|
|
837
|
+
suberr13.push({ keywordLocation: "#/properties/borderRadius/anyOf/1/maxItems", instanceLocation: "#/borderRadius" });
|
|
838
|
+
errorCount++;
|
|
532
839
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
840
|
+
if (data.borderRadius.length < 0) {
|
|
841
|
+
if (suberr13 === null)
|
|
842
|
+
suberr13 = [];
|
|
843
|
+
suberr13.push({ keywordLocation: "#/properties/borderRadius/anyOf/1/minItems", instanceLocation: "#/borderRadius" });
|
|
844
|
+
errorCount++;
|
|
845
|
+
}
|
|
846
|
+
for (let m = 0; m < data.borderRadius.length; m++) {
|
|
847
|
+
if (data.borderRadius[m] !== undefined && hasOwn(data.borderRadius, m)) {
|
|
848
|
+
const err10 = validate.errors;
|
|
849
|
+
const res10 = ref6(data.borderRadius[m]);
|
|
850
|
+
const suberr15 = ref6.errors;
|
|
851
|
+
validate.errors = err10;
|
|
852
|
+
if (!res10) {
|
|
853
|
+
if (validate.errors === null)
|
|
854
|
+
validate.errors = [];
|
|
855
|
+
validate.errors.push(...suberr15.map(e => errorMerge(e, "#/properties/borderRadius/anyOf/1/items/$ref", "#/borderRadius/" + m)));
|
|
856
|
+
errorCount++;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
536
859
|
}
|
|
537
860
|
}
|
|
538
|
-
|
|
861
|
+
return errorCount === 0;
|
|
862
|
+
})();
|
|
863
|
+
if (!sub9) {
|
|
864
|
+
if (validate.errors === null)
|
|
865
|
+
validate.errors = [];
|
|
866
|
+
validate.errors.push({ keywordLocation: "#/properties/borderRadius/anyOf", instanceLocation: "#/borderRadius" });
|
|
867
|
+
if (suberr13)
|
|
868
|
+
validate.errors.push(...suberr13);
|
|
869
|
+
errorCount++;
|
|
539
870
|
}
|
|
540
|
-
|
|
541
|
-
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
if (data.tags !== undefined && hasOwn(data, "tags")) {
|
|
874
|
+
let suberr16 = null;
|
|
875
|
+
const sub10 = (() => {
|
|
876
|
+
let errorCount = 0;
|
|
877
|
+
const err11 = validate.errors;
|
|
878
|
+
const res11 = ref7(data.tags);
|
|
879
|
+
const suberr17 = ref7.errors;
|
|
880
|
+
validate.errors = err11;
|
|
881
|
+
if (!res11) {
|
|
882
|
+
if (validate.errors === null)
|
|
883
|
+
validate.errors = [];
|
|
884
|
+
validate.errors.push(...suberr17.map(e => errorMerge(e, "#/properties/tags/anyOf/0/$ref", "#/tags")));
|
|
885
|
+
errorCount++;
|
|
542
886
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
887
|
+
return errorCount === 0;
|
|
888
|
+
})();
|
|
889
|
+
if (!sub10) {
|
|
890
|
+
const sub11 = (() => {
|
|
891
|
+
let errorCount = 0;
|
|
892
|
+
if (!Array.isArray(data.tags)) {
|
|
893
|
+
if (suberr16 === null)
|
|
894
|
+
suberr16 = [];
|
|
895
|
+
suberr16.push({ keywordLocation: "#/properties/tags/anyOf/1/type", instanceLocation: "#/tags" });
|
|
896
|
+
errorCount++;
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
if (data.tags.length > 128) {
|
|
900
|
+
if (suberr16 === null)
|
|
901
|
+
suberr16 = [];
|
|
902
|
+
suberr16.push({ keywordLocation: "#/properties/tags/anyOf/1/maxItems", instanceLocation: "#/tags" });
|
|
903
|
+
errorCount++;
|
|
550
904
|
}
|
|
551
|
-
if (
|
|
552
|
-
if (
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
905
|
+
if (data.tags.length < 0) {
|
|
906
|
+
if (suberr16 === null)
|
|
907
|
+
suberr16 = [];
|
|
908
|
+
suberr16.push({ keywordLocation: "#/properties/tags/anyOf/1/minItems", instanceLocation: "#/tags" });
|
|
909
|
+
errorCount++;
|
|
910
|
+
}
|
|
911
|
+
for (let n = 0; n < data.tags.length; n++) {
|
|
912
|
+
if (data.tags[n] !== undefined && hasOwn(data.tags, n)) {
|
|
913
|
+
const err12 = validate.errors;
|
|
914
|
+
const res12 = ref7(data.tags[n]);
|
|
915
|
+
const suberr18 = ref7.errors;
|
|
916
|
+
validate.errors = err12;
|
|
917
|
+
if (!res12) {
|
|
918
|
+
if (validate.errors === null)
|
|
919
|
+
validate.errors = [];
|
|
920
|
+
validate.errors.push(...suberr18.map(e => errorMerge(e, "#/properties/tags/anyOf/1/items/$ref", "#/tags/" + n)));
|
|
921
|
+
errorCount++;
|
|
562
922
|
}
|
|
563
923
|
}
|
|
564
924
|
}
|
|
565
|
-
var valid1 = _errs5 === errors;
|
|
566
925
|
}
|
|
567
|
-
|
|
568
|
-
|
|
926
|
+
return errorCount === 0;
|
|
927
|
+
})();
|
|
928
|
+
if (!sub11) {
|
|
929
|
+
if (validate.errors === null)
|
|
930
|
+
validate.errors = [];
|
|
931
|
+
validate.errors.push({ keywordLocation: "#/properties/tags/anyOf", instanceLocation: "#/tags" });
|
|
932
|
+
if (suberr16)
|
|
933
|
+
validate.errors.push(...suberr16);
|
|
934
|
+
errorCount++;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
if (errorCount === prev0) {
|
|
939
|
+
for (const key1 of Object.keys(data)) {
|
|
940
|
+
if (pattern2.test(key1)) {
|
|
941
|
+
if (!(typeof data[key1] === "number")) {
|
|
942
|
+
if (validate.errors === null)
|
|
943
|
+
validate.errors = [];
|
|
944
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Probability$/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
945
|
+
errorCount++;
|
|
569
946
|
}
|
|
570
|
-
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
}
|
|
577
|
-
var valid1 = _errs7 === errors;
|
|
947
|
+
else {
|
|
948
|
+
if (!(0 <= data[key1])) {
|
|
949
|
+
if (validate.errors === null)
|
|
950
|
+
validate.errors = [];
|
|
951
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Probability$/minimum", instanceLocation: "#/" + pointerPart(key1) });
|
|
952
|
+
errorCount++;
|
|
578
953
|
}
|
|
579
|
-
|
|
580
|
-
|
|
954
|
+
if (!(100 >= data[key1])) {
|
|
955
|
+
if (validate.errors === null)
|
|
956
|
+
validate.errors = [];
|
|
957
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Probability$/maximum", instanceLocation: "#/" + pointerPart(key1) });
|
|
958
|
+
errorCount++;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (pattern3.test(key1)) {
|
|
963
|
+
let suberr19 = null;
|
|
964
|
+
const sub12 = (() => {
|
|
965
|
+
let errorCount = 0;
|
|
966
|
+
const err13 = validate.errors;
|
|
967
|
+
const res13 = ref8(data[key1]);
|
|
968
|
+
const suberr20 = ref8.errors;
|
|
969
|
+
validate.errors = err13;
|
|
970
|
+
if (!res13) {
|
|
971
|
+
if (validate.errors === null)
|
|
972
|
+
validate.errors = [];
|
|
973
|
+
validate.errors.push(...suberr20.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/0/$ref", "#/" + pointerPart(key1))));
|
|
974
|
+
errorCount++;
|
|
581
975
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
976
|
+
return errorCount === 0;
|
|
977
|
+
})();
|
|
978
|
+
if (!sub12) {
|
|
979
|
+
const sub13 = (() => {
|
|
980
|
+
let errorCount = 0;
|
|
981
|
+
if (!(Array.isArray(data[key1]))) {
|
|
982
|
+
if (suberr19 === null)
|
|
983
|
+
suberr19 = [];
|
|
984
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/1/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
985
|
+
errorCount++;
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
if (data[key1].length > 128) {
|
|
989
|
+
if (suberr19 === null)
|
|
990
|
+
suberr19 = [];
|
|
991
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/1/maxItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
992
|
+
errorCount++;
|
|
993
|
+
}
|
|
994
|
+
if (data[key1].length < 0) {
|
|
995
|
+
if (suberr19 === null)
|
|
996
|
+
suberr19 = [];
|
|
997
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/1/minItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
998
|
+
errorCount++;
|
|
999
|
+
}
|
|
1000
|
+
for (let o = 0; o < data[key1].length; o++) {
|
|
1001
|
+
if (data[key1][o] !== undefined && hasOwn(data[key1], o)) {
|
|
1002
|
+
const err14 = validate.errors;
|
|
1003
|
+
const res14 = ref8(data[key1][o]);
|
|
1004
|
+
const suberr21 = ref8.errors;
|
|
1005
|
+
validate.errors = err14;
|
|
1006
|
+
if (!res14) {
|
|
1007
|
+
if (validate.errors === null)
|
|
1008
|
+
validate.errors = [];
|
|
1009
|
+
validate.errors.push(...suberr21.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/1/items/$ref", "#/" + pointerPart(key1) + "/" + o)));
|
|
1010
|
+
errorCount++;
|
|
591
1011
|
}
|
|
592
1012
|
}
|
|
593
|
-
else {
|
|
594
|
-
validate10.errors = [{ instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
595
|
-
return false;
|
|
596
|
-
}
|
|
597
1013
|
}
|
|
598
|
-
var valid1 = _errs9 === errors;
|
|
599
1014
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
errors++;
|
|
1015
|
+
return errorCount === 0;
|
|
1016
|
+
})();
|
|
1017
|
+
if (!sub13) {
|
|
1018
|
+
const sub14 = (() => {
|
|
1019
|
+
let errorCount = 0;
|
|
1020
|
+
if (!(typeof data[key1] === "object" && data[key1] && !Array.isArray(data[key1]))) {
|
|
1021
|
+
if (suberr19 === null)
|
|
1022
|
+
suberr19 = [];
|
|
1023
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
1024
|
+
errorCount++;
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
if (Object.keys(data[key1]).length > 512) {
|
|
1028
|
+
if (suberr19 === null)
|
|
1029
|
+
suberr19 = [];
|
|
1030
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/maxProperties", instanceLocation: "#/" + pointerPart(key1) });
|
|
1031
|
+
errorCount++;
|
|
619
1032
|
}
|
|
620
|
-
if (
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
else {
|
|
626
|
-
vErrors.push(err3);
|
|
627
|
-
}
|
|
628
|
-
errors++;
|
|
1033
|
+
if (Object.keys(data[key1]).length < 1) {
|
|
1034
|
+
if (suberr19 === null)
|
|
1035
|
+
suberr19 = [];
|
|
1036
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/minProperties", instanceLocation: "#/" + pointerPart(key1) });
|
|
1037
|
+
errorCount++;
|
|
629
1038
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
else {
|
|
642
|
-
vErrors.push(err4);
|
|
643
|
-
}
|
|
644
|
-
errors++;
|
|
645
|
-
}
|
|
646
|
-
else {
|
|
647
|
-
if (data4.length < 0) {
|
|
648
|
-
const err5 = { instancePath: instancePath + "/flip", schemaPath: "#/properties/flip/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
649
|
-
if (vErrors === null) {
|
|
650
|
-
vErrors = [err5];
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
vErrors.push(err5);
|
|
654
|
-
}
|
|
655
|
-
errors++;
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
var valid4 = true;
|
|
659
|
-
const len0 = data4.length;
|
|
660
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
661
|
-
let data5 = data4[i0];
|
|
662
|
-
const _errs18 = errors;
|
|
663
|
-
if (typeof data5 !== "string") {
|
|
664
|
-
const err6 = { instancePath: instancePath + "/flip/" + i0, schemaPath: "#/definitions/flip/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
665
|
-
if (vErrors === null) {
|
|
666
|
-
vErrors = [err6];
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
vErrors.push(err6);
|
|
670
|
-
}
|
|
671
|
-
errors++;
|
|
672
|
-
}
|
|
673
|
-
if (!((((data5 === "none") || (data5 === "horizontal")) || (data5 === "vertical")) || (data5 === "both"))) {
|
|
674
|
-
const err7 = { instancePath: instancePath + "/flip/" + i0, schemaPath: "#/definitions/flip/enum", keyword: "enum", params: { allowedValues: schema12.enum }, message: "must be equal to one of the allowed values" };
|
|
675
|
-
if (vErrors === null) {
|
|
676
|
-
vErrors = [err7];
|
|
677
|
-
}
|
|
678
|
-
else {
|
|
679
|
-
vErrors.push(err7);
|
|
680
|
-
}
|
|
681
|
-
errors++;
|
|
682
|
-
}
|
|
683
|
-
var valid4 = _errs18 === errors;
|
|
684
|
-
if (!valid4) {
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
else {
|
|
692
|
-
const err8 = { instancePath: instancePath + "/flip", schemaPath: "#/properties/flip/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
693
|
-
if (vErrors === null) {
|
|
694
|
-
vErrors = [err8];
|
|
695
|
-
}
|
|
696
|
-
else {
|
|
697
|
-
vErrors.push(err8);
|
|
698
|
-
}
|
|
699
|
-
errors++;
|
|
700
|
-
}
|
|
1039
|
+
for (const key2 of Object.keys(data[key1])) {
|
|
1040
|
+
const err15 = validate.errors;
|
|
1041
|
+
const res15 = ref8(key2);
|
|
1042
|
+
const suberr22 = ref8.errors;
|
|
1043
|
+
validate.errors = err15;
|
|
1044
|
+
if (!res15) {
|
|
1045
|
+
if (validate.errors === null)
|
|
1046
|
+
validate.errors = [];
|
|
1047
|
+
validate.errors.push(...suberr22.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/propertyNames/$ref", "#/" + pointerPart(key1) + "/" + pointerPart(key2))));
|
|
1048
|
+
errorCount++;
|
|
701
1049
|
}
|
|
702
|
-
var _valid0 = _errs16 === errors;
|
|
703
|
-
valid2 = valid2 || _valid0;
|
|
704
1050
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1051
|
+
for (const key3 of Object.keys(data[key1])) {
|
|
1052
|
+
if (!(typeof data[key1][key3] === "number")) {
|
|
1053
|
+
if (suberr19 === null)
|
|
1054
|
+
suberr19 = [];
|
|
1055
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/additionalProperties/type", instanceLocation: "#/" + pointerPart(key1) + "/" + pointerPart(key3) });
|
|
1056
|
+
errorCount++;
|
|
709
1057
|
}
|
|
710
1058
|
else {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
else {
|
|
718
|
-
errors = _errs12;
|
|
719
|
-
if (vErrors !== null) {
|
|
720
|
-
if (_errs12) {
|
|
721
|
-
vErrors.length = _errs12;
|
|
722
|
-
}
|
|
723
|
-
else {
|
|
724
|
-
vErrors = null;
|
|
1059
|
+
if (!(0 <= data[key1][key3])) {
|
|
1060
|
+
if (suberr19 === null)
|
|
1061
|
+
suberr19 = [];
|
|
1062
|
+
suberr19.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf/2/additionalProperties/minimum", instanceLocation: "#/" + pointerPart(key1) + "/" + pointerPart(key3) });
|
|
1063
|
+
errorCount++;
|
|
725
1064
|
}
|
|
726
1065
|
}
|
|
727
1066
|
}
|
|
728
|
-
var valid1 = _errs11 === errors;
|
|
729
1067
|
}
|
|
730
|
-
|
|
731
|
-
|
|
1068
|
+
return errorCount === 0;
|
|
1069
|
+
})();
|
|
1070
|
+
if (!sub14) {
|
|
1071
|
+
if (validate.errors === null)
|
|
1072
|
+
validate.errors = [];
|
|
1073
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Variant$/anyOf", instanceLocation: "#/" + pointerPart(key1) });
|
|
1074
|
+
if (suberr19)
|
|
1075
|
+
validate.errors.push(...suberr19);
|
|
1076
|
+
errorCount++;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
if (pattern5.test(key1)) {
|
|
1082
|
+
let suberr23 = null;
|
|
1083
|
+
const sub15 = (() => {
|
|
1084
|
+
let errorCount = 0;
|
|
1085
|
+
const err16 = validate.errors;
|
|
1086
|
+
const res16 = ref9(data[key1]);
|
|
1087
|
+
const suberr24 = ref9.errors;
|
|
1088
|
+
validate.errors = err16;
|
|
1089
|
+
if (!res16) {
|
|
1090
|
+
if (validate.errors === null)
|
|
1091
|
+
validate.errors = [];
|
|
1092
|
+
validate.errors.push(...suberr24.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1093
|
+
errorCount++;
|
|
1094
|
+
}
|
|
1095
|
+
return errorCount === 0;
|
|
1096
|
+
})();
|
|
1097
|
+
if (!sub15) {
|
|
1098
|
+
const sub16 = (() => {
|
|
1099
|
+
let errorCount = 0;
|
|
1100
|
+
if (!(Array.isArray(data[key1]))) {
|
|
1101
|
+
if (suberr23 === null)
|
|
1102
|
+
suberr23 = [];
|
|
1103
|
+
suberr23.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf/1/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
1104
|
+
errorCount++;
|
|
1105
|
+
}
|
|
1106
|
+
else {
|
|
1107
|
+
if (data[key1].length > 128) {
|
|
1108
|
+
if (suberr23 === null)
|
|
1109
|
+
suberr23 = [];
|
|
1110
|
+
suberr23.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf/1/maxItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1111
|
+
errorCount++;
|
|
732
1112
|
}
|
|
733
|
-
if (
|
|
734
|
-
if (
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
}
|
|
751
|
-
errors++;
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
if (!pattern9.test(data6)) {
|
|
755
|
-
const err11 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/definitions/fontFamilyName/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$" }, message: "must match pattern \"" + "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$" + "\"" };
|
|
756
|
-
if (vErrors === null) {
|
|
757
|
-
vErrors = [err11];
|
|
758
|
-
}
|
|
759
|
-
else {
|
|
760
|
-
vErrors.push(err11);
|
|
761
|
-
}
|
|
762
|
-
errors++;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
else {
|
|
767
|
-
const err12 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/definitions/fontFamilyName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
768
|
-
if (vErrors === null) {
|
|
769
|
-
vErrors = [err12];
|
|
770
|
-
}
|
|
771
|
-
else {
|
|
772
|
-
vErrors.push(err12);
|
|
773
|
-
}
|
|
774
|
-
errors++;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
var _valid1 = _errs23 === errors;
|
|
778
|
-
valid6 = valid6 || _valid1;
|
|
779
|
-
if (!valid6) {
|
|
780
|
-
const _errs26 = errors;
|
|
781
|
-
if (errors === _errs26) {
|
|
782
|
-
if (Array.isArray(data6)) {
|
|
783
|
-
if (data6.length > 128) {
|
|
784
|
-
const err13 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/properties/fontFamily/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 128 }, message: "must NOT have more than 128 items" };
|
|
785
|
-
if (vErrors === null) {
|
|
786
|
-
vErrors = [err13];
|
|
787
|
-
}
|
|
788
|
-
else {
|
|
789
|
-
vErrors.push(err13);
|
|
790
|
-
}
|
|
791
|
-
errors++;
|
|
792
|
-
}
|
|
793
|
-
else {
|
|
794
|
-
if (data6.length < 0) {
|
|
795
|
-
const err14 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/properties/fontFamily/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
796
|
-
if (vErrors === null) {
|
|
797
|
-
vErrors = [err14];
|
|
798
|
-
}
|
|
799
|
-
else {
|
|
800
|
-
vErrors.push(err14);
|
|
801
|
-
}
|
|
802
|
-
errors++;
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
var valid8 = true;
|
|
806
|
-
const len1 = data6.length;
|
|
807
|
-
for (let i1 = 0; i1 < len1; i1++) {
|
|
808
|
-
let data7 = data6[i1];
|
|
809
|
-
const _errs28 = errors;
|
|
810
|
-
const _errs29 = errors;
|
|
811
|
-
if (errors === _errs29) {
|
|
812
|
-
if (typeof data7 === "string") {
|
|
813
|
-
if (func2(data7) > 256) {
|
|
814
|
-
const err15 = { instancePath: instancePath + "/fontFamily/" + i1, schemaPath: "#/definitions/fontFamilyName/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" };
|
|
815
|
-
if (vErrors === null) {
|
|
816
|
-
vErrors = [err15];
|
|
817
|
-
}
|
|
818
|
-
else {
|
|
819
|
-
vErrors.push(err15);
|
|
820
|
-
}
|
|
821
|
-
errors++;
|
|
822
|
-
}
|
|
823
|
-
else {
|
|
824
|
-
if (!pattern9.test(data7)) {
|
|
825
|
-
const err16 = { instancePath: instancePath + "/fontFamily/" + i1, schemaPath: "#/definitions/fontFamilyName/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$" }, message: "must match pattern \"" + "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$" + "\"" };
|
|
826
|
-
if (vErrors === null) {
|
|
827
|
-
vErrors = [err16];
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
830
|
-
vErrors.push(err16);
|
|
831
|
-
}
|
|
832
|
-
errors++;
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
else {
|
|
837
|
-
const err17 = { instancePath: instancePath + "/fontFamily/" + i1, schemaPath: "#/definitions/fontFamilyName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
838
|
-
if (vErrors === null) {
|
|
839
|
-
vErrors = [err17];
|
|
840
|
-
}
|
|
841
|
-
else {
|
|
842
|
-
vErrors.push(err17);
|
|
843
|
-
}
|
|
844
|
-
errors++;
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
var valid8 = _errs28 === errors;
|
|
848
|
-
if (!valid8) {
|
|
849
|
-
break;
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
else {
|
|
856
|
-
const err18 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/properties/fontFamily/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
857
|
-
if (vErrors === null) {
|
|
858
|
-
vErrors = [err18];
|
|
859
|
-
}
|
|
860
|
-
else {
|
|
861
|
-
vErrors.push(err18);
|
|
862
|
-
}
|
|
863
|
-
errors++;
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
var _valid1 = _errs26 === errors;
|
|
867
|
-
valid6 = valid6 || _valid1;
|
|
868
|
-
}
|
|
869
|
-
if (!valid6) {
|
|
870
|
-
const err19 = { instancePath: instancePath + "/fontFamily", schemaPath: "#/properties/fontFamily/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
871
|
-
if (vErrors === null) {
|
|
872
|
-
vErrors = [err19];
|
|
873
|
-
}
|
|
874
|
-
else {
|
|
875
|
-
vErrors.push(err19);
|
|
876
|
-
}
|
|
877
|
-
errors++;
|
|
878
|
-
validate10.errors = vErrors;
|
|
879
|
-
return false;
|
|
880
|
-
}
|
|
881
|
-
else {
|
|
882
|
-
errors = _errs22;
|
|
883
|
-
if (vErrors !== null) {
|
|
884
|
-
if (_errs22) {
|
|
885
|
-
vErrors.length = _errs22;
|
|
886
|
-
}
|
|
887
|
-
else {
|
|
888
|
-
vErrors = null;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
1113
|
+
if (data[key1].length < 0) {
|
|
1114
|
+
if (suberr23 === null)
|
|
1115
|
+
suberr23 = [];
|
|
1116
|
+
suberr23.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf/1/minItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1117
|
+
errorCount++;
|
|
1118
|
+
}
|
|
1119
|
+
for (let p = 0; p < data[key1].length; p++) {
|
|
1120
|
+
if (data[key1][p] !== undefined && hasOwn(data[key1], p)) {
|
|
1121
|
+
const err17 = validate.errors;
|
|
1122
|
+
const res17 = ref9(data[key1][p]);
|
|
1123
|
+
const suberr25 = ref9.errors;
|
|
1124
|
+
validate.errors = err17;
|
|
1125
|
+
if (!res17) {
|
|
1126
|
+
if (validate.errors === null)
|
|
1127
|
+
validate.errors = [];
|
|
1128
|
+
validate.errors.push(...suberr25.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf/1/items/$ref", "#/" + pointerPart(key1) + "/" + p)));
|
|
1129
|
+
errorCount++;
|
|
891
1130
|
}
|
|
892
|
-
var valid1 = _errs21 === errors;
|
|
893
|
-
}
|
|
894
|
-
else {
|
|
895
|
-
var valid1 = true;
|
|
896
1131
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
if (vErrors === null) {
|
|
961
|
-
vErrors = [err24];
|
|
962
|
-
}
|
|
963
|
-
else {
|
|
964
|
-
vErrors.push(err24);
|
|
965
|
-
}
|
|
966
|
-
errors++;
|
|
967
|
-
}
|
|
968
|
-
else {
|
|
969
|
-
var valid12 = true;
|
|
970
|
-
const len2 = data8.length;
|
|
971
|
-
for (let i2 = 0; i2 < len2; i2++) {
|
|
972
|
-
let data9 = data8[i2];
|
|
973
|
-
const _errs38 = errors;
|
|
974
|
-
const _errs39 = errors;
|
|
975
|
-
if (!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))) {
|
|
976
|
-
const err25 = { instancePath: instancePath + "/fontWeight/" + i2, schemaPath: "#/definitions/fontWeight/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
977
|
-
if (vErrors === null) {
|
|
978
|
-
vErrors = [err25];
|
|
979
|
-
}
|
|
980
|
-
else {
|
|
981
|
-
vErrors.push(err25);
|
|
982
|
-
}
|
|
983
|
-
errors++;
|
|
984
|
-
}
|
|
985
|
-
if (errors === _errs39) {
|
|
986
|
-
if ((typeof data9 == "number") && (isFinite(data9))) {
|
|
987
|
-
if (data9 > 1000 || isNaN(data9)) {
|
|
988
|
-
const err26 = { instancePath: instancePath + "/fontWeight/" + i2, schemaPath: "#/definitions/fontWeight/maximum", keyword: "maximum", params: { comparison: "<=", limit: 1000 }, message: "must be <= 1000" };
|
|
989
|
-
if (vErrors === null) {
|
|
990
|
-
vErrors = [err26];
|
|
991
|
-
}
|
|
992
|
-
else {
|
|
993
|
-
vErrors.push(err26);
|
|
994
|
-
}
|
|
995
|
-
errors++;
|
|
996
|
-
}
|
|
997
|
-
else {
|
|
998
|
-
if (data9 < 1 || isNaN(data9)) {
|
|
999
|
-
const err27 = { instancePath: instancePath + "/fontWeight/" + i2, schemaPath: "#/definitions/fontWeight/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
|
|
1000
|
-
if (vErrors === null) {
|
|
1001
|
-
vErrors = [err27];
|
|
1002
|
-
}
|
|
1003
|
-
else {
|
|
1004
|
-
vErrors.push(err27);
|
|
1005
|
-
}
|
|
1006
|
-
errors++;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
var valid12 = _errs38 === errors;
|
|
1012
|
-
if (!valid12) {
|
|
1013
|
-
break;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
else {
|
|
1020
|
-
const err28 = { instancePath: instancePath + "/fontWeight", schemaPath: "#/properties/fontWeight/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1021
|
-
if (vErrors === null) {
|
|
1022
|
-
vErrors = [err28];
|
|
1023
|
-
}
|
|
1024
|
-
else {
|
|
1025
|
-
vErrors.push(err28);
|
|
1026
|
-
}
|
|
1027
|
-
errors++;
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
var _valid2 = _errs36 === errors;
|
|
1031
|
-
valid10 = valid10 || _valid2;
|
|
1032
|
-
}
|
|
1033
|
-
if (!valid10) {
|
|
1034
|
-
const err29 = { instancePath: instancePath + "/fontWeight", schemaPath: "#/properties/fontWeight/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1035
|
-
if (vErrors === null) {
|
|
1036
|
-
vErrors = [err29];
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
vErrors.push(err29);
|
|
1040
|
-
}
|
|
1041
|
-
errors++;
|
|
1042
|
-
validate10.errors = vErrors;
|
|
1043
|
-
return false;
|
|
1044
|
-
}
|
|
1045
|
-
else {
|
|
1046
|
-
errors = _errs32;
|
|
1047
|
-
if (vErrors !== null) {
|
|
1048
|
-
if (_errs32) {
|
|
1049
|
-
vErrors.length = _errs32;
|
|
1050
|
-
}
|
|
1051
|
-
else {
|
|
1052
|
-
vErrors = null;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
var valid1 = _errs31 === errors;
|
|
1057
|
-
}
|
|
1058
|
-
else {
|
|
1059
|
-
var valid1 = true;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return errorCount === 0;
|
|
1135
|
+
})();
|
|
1136
|
+
if (!sub16) {
|
|
1137
|
+
if (validate.errors === null)
|
|
1138
|
+
validate.errors = [];
|
|
1139
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*Color$/anyOf", instanceLocation: "#/" + pointerPart(key1) });
|
|
1140
|
+
if (suberr23)
|
|
1141
|
+
validate.errors.push(...suberr23);
|
|
1142
|
+
errorCount++;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
if (pattern7.test(key1)) {
|
|
1147
|
+
let suberr26 = null;
|
|
1148
|
+
const sub17 = (() => {
|
|
1149
|
+
let errorCount = 0;
|
|
1150
|
+
const err18 = validate.errors;
|
|
1151
|
+
const res18 = ref10(data[key1]);
|
|
1152
|
+
const suberr27 = ref10.errors;
|
|
1153
|
+
validate.errors = err18;
|
|
1154
|
+
if (!res18) {
|
|
1155
|
+
if (validate.errors === null)
|
|
1156
|
+
validate.errors = [];
|
|
1157
|
+
validate.errors.push(...suberr27.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1158
|
+
errorCount++;
|
|
1159
|
+
}
|
|
1160
|
+
return errorCount === 0;
|
|
1161
|
+
})();
|
|
1162
|
+
if (!sub17) {
|
|
1163
|
+
const sub18 = (() => {
|
|
1164
|
+
let errorCount = 0;
|
|
1165
|
+
if (!(Array.isArray(data[key1]))) {
|
|
1166
|
+
if (suberr26 === null)
|
|
1167
|
+
suberr26 = [];
|
|
1168
|
+
suberr26.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf/1/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
1169
|
+
errorCount++;
|
|
1170
|
+
}
|
|
1171
|
+
else {
|
|
1172
|
+
if (data[key1].length > 128) {
|
|
1173
|
+
if (suberr26 === null)
|
|
1174
|
+
suberr26 = [];
|
|
1175
|
+
suberr26.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf/1/maxItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1176
|
+
errorCount++;
|
|
1177
|
+
}
|
|
1178
|
+
if (data[key1].length < 0) {
|
|
1179
|
+
if (suberr26 === null)
|
|
1180
|
+
suberr26 = [];
|
|
1181
|
+
suberr26.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf/1/minItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1182
|
+
errorCount++;
|
|
1183
|
+
}
|
|
1184
|
+
for (let q = 0; q < data[key1].length; q++) {
|
|
1185
|
+
if (data[key1][q] !== undefined && hasOwn(data[key1], q)) {
|
|
1186
|
+
const err19 = validate.errors;
|
|
1187
|
+
const res19 = ref10(data[key1][q]);
|
|
1188
|
+
const suberr28 = ref10.errors;
|
|
1189
|
+
validate.errors = err19;
|
|
1190
|
+
if (!res19) {
|
|
1191
|
+
if (validate.errors === null)
|
|
1192
|
+
validate.errors = [];
|
|
1193
|
+
validate.errors.push(...suberr28.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf/1/items/$ref", "#/" + pointerPart(key1) + "/" + q)));
|
|
1194
|
+
errorCount++;
|
|
1060
1195
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
if (vErrors === null) {
|
|
1126
|
-
vErrors = [err33];
|
|
1127
|
-
}
|
|
1128
|
-
else {
|
|
1129
|
-
vErrors.push(err33);
|
|
1130
|
-
}
|
|
1131
|
-
errors++;
|
|
1132
|
-
}
|
|
1133
|
-
else {
|
|
1134
|
-
if (data11.length < 0) {
|
|
1135
|
-
const err34 = { instancePath: instancePath + "/borderRadius", schemaPath: "#/properties/borderRadius/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
1136
|
-
if (vErrors === null) {
|
|
1137
|
-
vErrors = [err34];
|
|
1138
|
-
}
|
|
1139
|
-
else {
|
|
1140
|
-
vErrors.push(err34);
|
|
1141
|
-
}
|
|
1142
|
-
errors++;
|
|
1143
|
-
}
|
|
1144
|
-
else {
|
|
1145
|
-
var valid17 = true;
|
|
1146
|
-
const len3 = data11.length;
|
|
1147
|
-
for (let i3 = 0; i3 < len3; i3++) {
|
|
1148
|
-
let data12 = data11[i3];
|
|
1149
|
-
const _errs50 = errors;
|
|
1150
|
-
const _errs51 = errors;
|
|
1151
|
-
if (errors === _errs51) {
|
|
1152
|
-
if ((typeof data12 == "number") && (isFinite(data12))) {
|
|
1153
|
-
if (data12 > 50 || isNaN(data12)) {
|
|
1154
|
-
const err35 = { instancePath: instancePath + "/borderRadius/" + i3, schemaPath: "#/definitions/borderRadius/maximum", keyword: "maximum", params: { comparison: "<=", limit: 50 }, message: "must be <= 50" };
|
|
1155
|
-
if (vErrors === null) {
|
|
1156
|
-
vErrors = [err35];
|
|
1157
|
-
}
|
|
1158
|
-
else {
|
|
1159
|
-
vErrors.push(err35);
|
|
1160
|
-
}
|
|
1161
|
-
errors++;
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
if (data12 < 0 || isNaN(data12)) {
|
|
1165
|
-
const err36 = { instancePath: instancePath + "/borderRadius/" + i3, schemaPath: "#/definitions/borderRadius/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
1166
|
-
if (vErrors === null) {
|
|
1167
|
-
vErrors = [err36];
|
|
1168
|
-
}
|
|
1169
|
-
else {
|
|
1170
|
-
vErrors.push(err36);
|
|
1171
|
-
}
|
|
1172
|
-
errors++;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
else {
|
|
1177
|
-
const err37 = { instancePath: instancePath + "/borderRadius/" + i3, schemaPath: "#/definitions/borderRadius/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
1178
|
-
if (vErrors === null) {
|
|
1179
|
-
vErrors = [err37];
|
|
1180
|
-
}
|
|
1181
|
-
else {
|
|
1182
|
-
vErrors.push(err37);
|
|
1183
|
-
}
|
|
1184
|
-
errors++;
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
var valid17 = _errs50 === errors;
|
|
1188
|
-
if (!valid17) {
|
|
1189
|
-
break;
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
else {
|
|
1196
|
-
const err38 = { instancePath: instancePath + "/borderRadius", schemaPath: "#/properties/borderRadius/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1197
|
-
if (vErrors === null) {
|
|
1198
|
-
vErrors = [err38];
|
|
1199
|
-
}
|
|
1200
|
-
else {
|
|
1201
|
-
vErrors.push(err38);
|
|
1202
|
-
}
|
|
1203
|
-
errors++;
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
var _valid3 = _errs48 === errors;
|
|
1207
|
-
valid15 = valid15 || _valid3;
|
|
1208
|
-
}
|
|
1209
|
-
if (!valid15) {
|
|
1210
|
-
const err39 = { instancePath: instancePath + "/borderRadius", schemaPath: "#/properties/borderRadius/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1211
|
-
if (vErrors === null) {
|
|
1212
|
-
vErrors = [err39];
|
|
1213
|
-
}
|
|
1214
|
-
else {
|
|
1215
|
-
vErrors.push(err39);
|
|
1216
|
-
}
|
|
1217
|
-
errors++;
|
|
1218
|
-
validate10.errors = vErrors;
|
|
1219
|
-
return false;
|
|
1220
|
-
}
|
|
1221
|
-
else {
|
|
1222
|
-
errors = _errs44;
|
|
1223
|
-
if (vErrors !== null) {
|
|
1224
|
-
if (_errs44) {
|
|
1225
|
-
vErrors.length = _errs44;
|
|
1226
|
-
}
|
|
1227
|
-
else {
|
|
1228
|
-
vErrors = null;
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
var valid1 = _errs43 === errors;
|
|
1233
|
-
}
|
|
1234
|
-
else {
|
|
1235
|
-
var valid1 = true;
|
|
1236
|
-
}
|
|
1237
|
-
if (valid1) {
|
|
1238
|
-
if (data.tags !== undefined) {
|
|
1239
|
-
let data13 = data.tags;
|
|
1240
|
-
const _errs53 = errors;
|
|
1241
|
-
const _errs54 = errors;
|
|
1242
|
-
let valid19 = false;
|
|
1243
|
-
const _errs55 = errors;
|
|
1244
|
-
const _errs56 = errors;
|
|
1245
|
-
if (errors === _errs56) {
|
|
1246
|
-
if (typeof data13 === "string") {
|
|
1247
|
-
if (func2(data13) > 130) {
|
|
1248
|
-
const err40 = { instancePath: instancePath + "/tags", schemaPath: "#/definitions/tagFilter/maxLength", keyword: "maxLength", params: { limit: 130 }, message: "must NOT have more than 130 characters" };
|
|
1249
|
-
if (vErrors === null) {
|
|
1250
|
-
vErrors = [err40];
|
|
1251
|
-
}
|
|
1252
|
-
else {
|
|
1253
|
-
vErrors.push(err40);
|
|
1254
|
-
}
|
|
1255
|
-
errors++;
|
|
1256
|
-
}
|
|
1257
|
-
else {
|
|
1258
|
-
if (!pattern11.test(data13)) {
|
|
1259
|
-
const err41 = { instancePath: instancePath + "/tags", schemaPath: "#/definitions/tagFilter/pattern", keyword: "pattern", params: { pattern: "^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$" }, message: "must match pattern \"" + "^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$" + "\"" };
|
|
1260
|
-
if (vErrors === null) {
|
|
1261
|
-
vErrors = [err41];
|
|
1262
|
-
}
|
|
1263
|
-
else {
|
|
1264
|
-
vErrors.push(err41);
|
|
1265
|
-
}
|
|
1266
|
-
errors++;
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
else {
|
|
1271
|
-
const err42 = { instancePath: instancePath + "/tags", schemaPath: "#/definitions/tagFilter/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1272
|
-
if (vErrors === null) {
|
|
1273
|
-
vErrors = [err42];
|
|
1274
|
-
}
|
|
1275
|
-
else {
|
|
1276
|
-
vErrors.push(err42);
|
|
1277
|
-
}
|
|
1278
|
-
errors++;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
var _valid4 = _errs55 === errors;
|
|
1282
|
-
valid19 = valid19 || _valid4;
|
|
1283
|
-
if (!valid19) {
|
|
1284
|
-
const _errs58 = errors;
|
|
1285
|
-
if (errors === _errs58) {
|
|
1286
|
-
if (Array.isArray(data13)) {
|
|
1287
|
-
if (data13.length > 128) {
|
|
1288
|
-
const err43 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 128 }, message: "must NOT have more than 128 items" };
|
|
1289
|
-
if (vErrors === null) {
|
|
1290
|
-
vErrors = [err43];
|
|
1291
|
-
}
|
|
1292
|
-
else {
|
|
1293
|
-
vErrors.push(err43);
|
|
1294
|
-
}
|
|
1295
|
-
errors++;
|
|
1296
|
-
}
|
|
1297
|
-
else {
|
|
1298
|
-
if (data13.length < 0) {
|
|
1299
|
-
const err44 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
1300
|
-
if (vErrors === null) {
|
|
1301
|
-
vErrors = [err44];
|
|
1302
|
-
}
|
|
1303
|
-
else {
|
|
1304
|
-
vErrors.push(err44);
|
|
1305
|
-
}
|
|
1306
|
-
errors++;
|
|
1307
|
-
}
|
|
1308
|
-
else {
|
|
1309
|
-
var valid21 = true;
|
|
1310
|
-
const len4 = data13.length;
|
|
1311
|
-
for (let i4 = 0; i4 < len4; i4++) {
|
|
1312
|
-
let data14 = data13[i4];
|
|
1313
|
-
const _errs60 = errors;
|
|
1314
|
-
const _errs61 = errors;
|
|
1315
|
-
if (errors === _errs61) {
|
|
1316
|
-
if (typeof data14 === "string") {
|
|
1317
|
-
if (func2(data14) > 130) {
|
|
1318
|
-
const err45 = { instancePath: instancePath + "/tags/" + i4, schemaPath: "#/definitions/tagFilter/maxLength", keyword: "maxLength", params: { limit: 130 }, message: "must NOT have more than 130 characters" };
|
|
1319
|
-
if (vErrors === null) {
|
|
1320
|
-
vErrors = [err45];
|
|
1321
|
-
}
|
|
1322
|
-
else {
|
|
1323
|
-
vErrors.push(err45);
|
|
1324
|
-
}
|
|
1325
|
-
errors++;
|
|
1326
|
-
}
|
|
1327
|
-
else {
|
|
1328
|
-
if (!pattern11.test(data14)) {
|
|
1329
|
-
const err46 = { instancePath: instancePath + "/tags/" + i4, schemaPath: "#/definitions/tagFilter/pattern", keyword: "pattern", params: { pattern: "^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$" }, message: "must match pattern \"" + "^!?[a-z][a-zA-Z0-9]*(:[a-z][a-zA-Z0-9]*)?$" + "\"" };
|
|
1330
|
-
if (vErrors === null) {
|
|
1331
|
-
vErrors = [err46];
|
|
1332
|
-
}
|
|
1333
|
-
else {
|
|
1334
|
-
vErrors.push(err46);
|
|
1335
|
-
}
|
|
1336
|
-
errors++;
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
else {
|
|
1341
|
-
const err47 = { instancePath: instancePath + "/tags/" + i4, schemaPath: "#/definitions/tagFilter/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1342
|
-
if (vErrors === null) {
|
|
1343
|
-
vErrors = [err47];
|
|
1344
|
-
}
|
|
1345
|
-
else {
|
|
1346
|
-
vErrors.push(err47);
|
|
1347
|
-
}
|
|
1348
|
-
errors++;
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
var valid21 = _errs60 === errors;
|
|
1352
|
-
if (!valid21) {
|
|
1353
|
-
break;
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
else {
|
|
1360
|
-
const err48 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1361
|
-
if (vErrors === null) {
|
|
1362
|
-
vErrors = [err48];
|
|
1363
|
-
}
|
|
1364
|
-
else {
|
|
1365
|
-
vErrors.push(err48);
|
|
1366
|
-
}
|
|
1367
|
-
errors++;
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
var _valid4 = _errs58 === errors;
|
|
1371
|
-
valid19 = valid19 || _valid4;
|
|
1372
|
-
}
|
|
1373
|
-
if (!valid19) {
|
|
1374
|
-
const err49 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1375
|
-
if (vErrors === null) {
|
|
1376
|
-
vErrors = [err49];
|
|
1377
|
-
}
|
|
1378
|
-
else {
|
|
1379
|
-
vErrors.push(err49);
|
|
1380
|
-
}
|
|
1381
|
-
errors++;
|
|
1382
|
-
validate10.errors = vErrors;
|
|
1383
|
-
return false;
|
|
1384
|
-
}
|
|
1385
|
-
else {
|
|
1386
|
-
errors = _errs54;
|
|
1387
|
-
if (vErrors !== null) {
|
|
1388
|
-
if (_errs54) {
|
|
1389
|
-
vErrors.length = _errs54;
|
|
1390
|
-
}
|
|
1391
|
-
else {
|
|
1392
|
-
vErrors = null;
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
var valid1 = _errs53 === errors;
|
|
1397
|
-
}
|
|
1398
|
-
else {
|
|
1399
|
-
var valid1 = true;
|
|
1400
|
-
}
|
|
1401
|
-
if (valid1) {
|
|
1402
|
-
var valid23 = true;
|
|
1403
|
-
for (const key2 in data) {
|
|
1404
|
-
if (pattern0.test(key2)) {
|
|
1405
|
-
let data15 = data[key2];
|
|
1406
|
-
const _errs63 = errors;
|
|
1407
|
-
if (errors === _errs63) {
|
|
1408
|
-
if ((typeof data15 == "number") && (isFinite(data15))) {
|
|
1409
|
-
if (data15 > 100 || isNaN(data15)) {
|
|
1410
|
-
validate10.errors = [{ instancePath: instancePath + "/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Probability%24/maximum", keyword: "maximum", params: { comparison: "<=", limit: 100 }, message: "must be <= 100" }];
|
|
1411
|
-
return false;
|
|
1412
|
-
}
|
|
1413
|
-
else {
|
|
1414
|
-
if (data15 < 0 || isNaN(data15)) {
|
|
1415
|
-
validate10.errors = [{ instancePath: instancePath + "/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Probability%24/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
1416
|
-
return false;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
else {
|
|
1421
|
-
validate10.errors = [{ instancePath: instancePath + "/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Probability%24/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
1422
|
-
return false;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
var valid23 = _errs63 === errors;
|
|
1426
|
-
if (!valid23) {
|
|
1427
|
-
break;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
1431
|
-
if (valid23) {
|
|
1432
|
-
var valid23 = true;
|
|
1433
|
-
for (const key3 in data) {
|
|
1434
|
-
if (pattern1.test(key3)) {
|
|
1435
|
-
let data16 = data[key3];
|
|
1436
|
-
const _errs65 = errors;
|
|
1437
|
-
const _errs66 = errors;
|
|
1438
|
-
let valid24 = false;
|
|
1439
|
-
const _errs67 = errors;
|
|
1440
|
-
const _errs68 = errors;
|
|
1441
|
-
if (errors === _errs68) {
|
|
1442
|
-
if (typeof data16 === "string") {
|
|
1443
|
-
if (func2(data16) > 64) {
|
|
1444
|
-
const err50 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" };
|
|
1445
|
-
if (vErrors === null) {
|
|
1446
|
-
vErrors = [err50];
|
|
1447
|
-
}
|
|
1448
|
-
else {
|
|
1449
|
-
vErrors.push(err50);
|
|
1450
|
-
}
|
|
1451
|
-
errors++;
|
|
1452
|
-
}
|
|
1453
|
-
else {
|
|
1454
|
-
if (!pattern15.test(data16)) {
|
|
1455
|
-
const err51 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-zA-Z0-9]*$" }, message: "must match pattern \"" + "^[a-z][a-zA-Z0-9]*$" + "\"" };
|
|
1456
|
-
if (vErrors === null) {
|
|
1457
|
-
vErrors = [err51];
|
|
1458
|
-
}
|
|
1459
|
-
else {
|
|
1460
|
-
vErrors.push(err51);
|
|
1461
|
-
}
|
|
1462
|
-
errors++;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
else {
|
|
1467
|
-
const err52 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1468
|
-
if (vErrors === null) {
|
|
1469
|
-
vErrors = [err52];
|
|
1470
|
-
}
|
|
1471
|
-
else {
|
|
1472
|
-
vErrors.push(err52);
|
|
1473
|
-
}
|
|
1474
|
-
errors++;
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
var _valid5 = _errs67 === errors;
|
|
1478
|
-
valid24 = valid24 || _valid5;
|
|
1479
|
-
if (!valid24) {
|
|
1480
|
-
const _errs70 = errors;
|
|
1481
|
-
if (errors === _errs70) {
|
|
1482
|
-
if (Array.isArray(data16)) {
|
|
1483
|
-
if (data16.length > 128) {
|
|
1484
|
-
const err53 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 128 }, message: "must NOT have more than 128 items" };
|
|
1485
|
-
if (vErrors === null) {
|
|
1486
|
-
vErrors = [err53];
|
|
1487
|
-
}
|
|
1488
|
-
else {
|
|
1489
|
-
vErrors.push(err53);
|
|
1490
|
-
}
|
|
1491
|
-
errors++;
|
|
1492
|
-
}
|
|
1493
|
-
else {
|
|
1494
|
-
if (data16.length < 0) {
|
|
1495
|
-
const err54 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
1496
|
-
if (vErrors === null) {
|
|
1497
|
-
vErrors = [err54];
|
|
1498
|
-
}
|
|
1499
|
-
else {
|
|
1500
|
-
vErrors.push(err54);
|
|
1501
|
-
}
|
|
1502
|
-
errors++;
|
|
1503
|
-
}
|
|
1504
|
-
else {
|
|
1505
|
-
var valid26 = true;
|
|
1506
|
-
const len5 = data16.length;
|
|
1507
|
-
for (let i5 = 0; i5 < len5; i5++) {
|
|
1508
|
-
let data17 = data16[i5];
|
|
1509
|
-
const _errs72 = errors;
|
|
1510
|
-
const _errs73 = errors;
|
|
1511
|
-
if (errors === _errs73) {
|
|
1512
|
-
if (typeof data17 === "string") {
|
|
1513
|
-
if (func2(data17) > 64) {
|
|
1514
|
-
const err55 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i5, schemaPath: "#/definitions/variantName/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" };
|
|
1515
|
-
if (vErrors === null) {
|
|
1516
|
-
vErrors = [err55];
|
|
1517
|
-
}
|
|
1518
|
-
else {
|
|
1519
|
-
vErrors.push(err55);
|
|
1520
|
-
}
|
|
1521
|
-
errors++;
|
|
1522
|
-
}
|
|
1523
|
-
else {
|
|
1524
|
-
if (!pattern15.test(data17)) {
|
|
1525
|
-
const err56 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i5, schemaPath: "#/definitions/variantName/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-zA-Z0-9]*$" }, message: "must match pattern \"" + "^[a-z][a-zA-Z0-9]*$" + "\"" };
|
|
1526
|
-
if (vErrors === null) {
|
|
1527
|
-
vErrors = [err56];
|
|
1528
|
-
}
|
|
1529
|
-
else {
|
|
1530
|
-
vErrors.push(err56);
|
|
1531
|
-
}
|
|
1532
|
-
errors++;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
else {
|
|
1537
|
-
const err57 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i5, schemaPath: "#/definitions/variantName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1538
|
-
if (vErrors === null) {
|
|
1539
|
-
vErrors = [err57];
|
|
1540
|
-
}
|
|
1541
|
-
else {
|
|
1542
|
-
vErrors.push(err57);
|
|
1543
|
-
}
|
|
1544
|
-
errors++;
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
var valid26 = _errs72 === errors;
|
|
1548
|
-
if (!valid26) {
|
|
1549
|
-
break;
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
else {
|
|
1556
|
-
const err58 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1557
|
-
if (vErrors === null) {
|
|
1558
|
-
vErrors = [err58];
|
|
1559
|
-
}
|
|
1560
|
-
else {
|
|
1561
|
-
vErrors.push(err58);
|
|
1562
|
-
}
|
|
1563
|
-
errors++;
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
var _valid5 = _errs70 === errors;
|
|
1567
|
-
valid24 = valid24 || _valid5;
|
|
1568
|
-
if (!valid24) {
|
|
1569
|
-
const _errs75 = errors;
|
|
1570
|
-
if (errors === _errs75) {
|
|
1571
|
-
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1572
|
-
if (Object.keys(data16).length > 512) {
|
|
1573
|
-
const err59 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/maxProperties", keyword: "maxProperties", params: { limit: 512 }, message: "must NOT have more than 512 properties" };
|
|
1574
|
-
if (vErrors === null) {
|
|
1575
|
-
vErrors = [err59];
|
|
1576
|
-
}
|
|
1577
|
-
else {
|
|
1578
|
-
vErrors.push(err59);
|
|
1579
|
-
}
|
|
1580
|
-
errors++;
|
|
1581
|
-
}
|
|
1582
|
-
else {
|
|
1583
|
-
if (Object.keys(data16).length < 1) {
|
|
1584
|
-
const err60 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" };
|
|
1585
|
-
if (vErrors === null) {
|
|
1586
|
-
vErrors = [err60];
|
|
1587
|
-
}
|
|
1588
|
-
else {
|
|
1589
|
-
vErrors.push(err60);
|
|
1590
|
-
}
|
|
1591
|
-
errors++;
|
|
1592
|
-
}
|
|
1593
|
-
else {
|
|
1594
|
-
for (const key4 in data16) {
|
|
1595
|
-
const _errs77 = errors;
|
|
1596
|
-
const _errs78 = errors;
|
|
1597
|
-
if (errors === _errs78) {
|
|
1598
|
-
if (typeof key4 === "string") {
|
|
1599
|
-
if (func2(key4) > 64) {
|
|
1600
|
-
const err61 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters", propertyName: key4 };
|
|
1601
|
-
if (vErrors === null) {
|
|
1602
|
-
vErrors = [err61];
|
|
1603
|
-
}
|
|
1604
|
-
else {
|
|
1605
|
-
vErrors.push(err61);
|
|
1606
|
-
}
|
|
1607
|
-
errors++;
|
|
1608
|
-
}
|
|
1609
|
-
else {
|
|
1610
|
-
if (!pattern15.test(key4)) {
|
|
1611
|
-
const err62 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-zA-Z0-9]*$" }, message: "must match pattern \"" + "^[a-z][a-zA-Z0-9]*$" + "\"", propertyName: key4 };
|
|
1612
|
-
if (vErrors === null) {
|
|
1613
|
-
vErrors = [err62];
|
|
1614
|
-
}
|
|
1615
|
-
else {
|
|
1616
|
-
vErrors.push(err62);
|
|
1617
|
-
}
|
|
1618
|
-
errors++;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
else {
|
|
1623
|
-
const err63 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/variantName/type", keyword: "type", params: { type: "string" }, message: "must be string", propertyName: key4 };
|
|
1624
|
-
if (vErrors === null) {
|
|
1625
|
-
vErrors = [err63];
|
|
1626
|
-
}
|
|
1627
|
-
else {
|
|
1628
|
-
vErrors.push(err63);
|
|
1629
|
-
}
|
|
1630
|
-
errors++;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
var valid28 = _errs77 === errors;
|
|
1634
|
-
if (!valid28) {
|
|
1635
|
-
const err64 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/propertyNames", keyword: "propertyNames", params: { propertyName: key4 }, message: "property name must be valid" };
|
|
1636
|
-
if (vErrors === null) {
|
|
1637
|
-
vErrors = [err64];
|
|
1638
|
-
}
|
|
1639
|
-
else {
|
|
1640
|
-
vErrors.push(err64);
|
|
1641
|
-
}
|
|
1642
|
-
errors++;
|
|
1643
|
-
break;
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
if (valid28) {
|
|
1647
|
-
for (const key5 in data16) {
|
|
1648
|
-
let data18 = data16[key5];
|
|
1649
|
-
const _errs81 = errors;
|
|
1650
|
-
if (errors === _errs81) {
|
|
1651
|
-
if ((typeof data18 == "number") && (isFinite(data18))) {
|
|
1652
|
-
if (data18 < 0 || isNaN(data18)) {
|
|
1653
|
-
const err65 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/additionalProperties/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
|
|
1654
|
-
if (vErrors === null) {
|
|
1655
|
-
vErrors = [err65];
|
|
1656
|
-
}
|
|
1657
|
-
else {
|
|
1658
|
-
vErrors.push(err65);
|
|
1659
|
-
}
|
|
1660
|
-
errors++;
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
else {
|
|
1664
|
-
const err66 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/additionalProperties/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
1665
|
-
if (vErrors === null) {
|
|
1666
|
-
vErrors = [err66];
|
|
1667
|
-
}
|
|
1668
|
-
else {
|
|
1669
|
-
vErrors.push(err66);
|
|
1670
|
-
}
|
|
1671
|
-
errors++;
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
var valid30 = _errs81 === errors;
|
|
1675
|
-
if (!valid30) {
|
|
1676
|
-
break;
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
else {
|
|
1684
|
-
const err67 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1685
|
-
if (vErrors === null) {
|
|
1686
|
-
vErrors = [err67];
|
|
1687
|
-
}
|
|
1688
|
-
else {
|
|
1689
|
-
vErrors.push(err67);
|
|
1690
|
-
}
|
|
1691
|
-
errors++;
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
var _valid5 = _errs75 === errors;
|
|
1695
|
-
valid24 = valid24 || _valid5;
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
if (!valid24) {
|
|
1699
|
-
const err68 = { instancePath: instancePath + "/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Variant%24/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1700
|
-
if (vErrors === null) {
|
|
1701
|
-
vErrors = [err68];
|
|
1702
|
-
}
|
|
1703
|
-
else {
|
|
1704
|
-
vErrors.push(err68);
|
|
1705
|
-
}
|
|
1706
|
-
errors++;
|
|
1707
|
-
validate10.errors = vErrors;
|
|
1708
|
-
return false;
|
|
1709
|
-
}
|
|
1710
|
-
else {
|
|
1711
|
-
errors = _errs66;
|
|
1712
|
-
if (vErrors !== null) {
|
|
1713
|
-
if (_errs66) {
|
|
1714
|
-
vErrors.length = _errs66;
|
|
1715
|
-
}
|
|
1716
|
-
else {
|
|
1717
|
-
vErrors = null;
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
var valid23 = _errs65 === errors;
|
|
1722
|
-
if (!valid23) {
|
|
1723
|
-
break;
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
if (valid23) {
|
|
1728
|
-
var valid23 = true;
|
|
1729
|
-
for (const key6 in data) {
|
|
1730
|
-
if (pattern2.test(key6)) {
|
|
1731
|
-
let data19 = data[key6];
|
|
1732
|
-
const _errs83 = errors;
|
|
1733
|
-
const _errs84 = errors;
|
|
1734
|
-
let valid31 = false;
|
|
1735
|
-
const _errs85 = errors;
|
|
1736
|
-
const _errs86 = errors;
|
|
1737
|
-
if (errors === _errs86) {
|
|
1738
|
-
if (typeof data19 === "string") {
|
|
1739
|
-
if (!pattern19.test(data19)) {
|
|
1740
|
-
const err69 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/color/pattern", keyword: "pattern", params: { pattern: "^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$" }, message: "must match pattern \"" + "^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$" + "\"" };
|
|
1741
|
-
if (vErrors === null) {
|
|
1742
|
-
vErrors = [err69];
|
|
1743
|
-
}
|
|
1744
|
-
else {
|
|
1745
|
-
vErrors.push(err69);
|
|
1746
|
-
}
|
|
1747
|
-
errors++;
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
else {
|
|
1751
|
-
const err70 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/color/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1752
|
-
if (vErrors === null) {
|
|
1753
|
-
vErrors = [err70];
|
|
1754
|
-
}
|
|
1755
|
-
else {
|
|
1756
|
-
vErrors.push(err70);
|
|
1757
|
-
}
|
|
1758
|
-
errors++;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
var _valid6 = _errs85 === errors;
|
|
1762
|
-
valid31 = valid31 || _valid6;
|
|
1763
|
-
if (!valid31) {
|
|
1764
|
-
const _errs88 = errors;
|
|
1765
|
-
if (errors === _errs88) {
|
|
1766
|
-
if (Array.isArray(data19)) {
|
|
1767
|
-
if (data19.length > 128) {
|
|
1768
|
-
const err71 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Color%24/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 128 }, message: "must NOT have more than 128 items" };
|
|
1769
|
-
if (vErrors === null) {
|
|
1770
|
-
vErrors = [err71];
|
|
1771
|
-
}
|
|
1772
|
-
else {
|
|
1773
|
-
vErrors.push(err71);
|
|
1774
|
-
}
|
|
1775
|
-
errors++;
|
|
1776
|
-
}
|
|
1777
|
-
else {
|
|
1778
|
-
if (data19.length < 0) {
|
|
1779
|
-
const err72 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Color%24/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
1780
|
-
if (vErrors === null) {
|
|
1781
|
-
vErrors = [err72];
|
|
1782
|
-
}
|
|
1783
|
-
else {
|
|
1784
|
-
vErrors.push(err72);
|
|
1785
|
-
}
|
|
1786
|
-
errors++;
|
|
1787
|
-
}
|
|
1788
|
-
else {
|
|
1789
|
-
var valid33 = true;
|
|
1790
|
-
const len6 = data19.length;
|
|
1791
|
-
for (let i6 = 0; i6 < len6; i6++) {
|
|
1792
|
-
let data20 = data19[i6];
|
|
1793
|
-
const _errs90 = errors;
|
|
1794
|
-
const _errs91 = errors;
|
|
1795
|
-
if (errors === _errs91) {
|
|
1796
|
-
if (typeof data20 === "string") {
|
|
1797
|
-
if (!pattern19.test(data20)) {
|
|
1798
|
-
const err73 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i6, schemaPath: "#/definitions/color/pattern", keyword: "pattern", params: { pattern: "^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$" }, message: "must match pattern \"" + "^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$" + "\"" };
|
|
1799
|
-
if (vErrors === null) {
|
|
1800
|
-
vErrors = [err73];
|
|
1801
|
-
}
|
|
1802
|
-
else {
|
|
1803
|
-
vErrors.push(err73);
|
|
1804
|
-
}
|
|
1805
|
-
errors++;
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
else {
|
|
1809
|
-
const err74 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i6, schemaPath: "#/definitions/color/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1810
|
-
if (vErrors === null) {
|
|
1811
|
-
vErrors = [err74];
|
|
1812
|
-
}
|
|
1813
|
-
else {
|
|
1814
|
-
vErrors.push(err74);
|
|
1815
|
-
}
|
|
1816
|
-
errors++;
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
var valid33 = _errs90 === errors;
|
|
1820
|
-
if (!valid33) {
|
|
1821
|
-
break;
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
else {
|
|
1828
|
-
const err75 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Color%24/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1829
|
-
if (vErrors === null) {
|
|
1830
|
-
vErrors = [err75];
|
|
1831
|
-
}
|
|
1832
|
-
else {
|
|
1833
|
-
vErrors.push(err75);
|
|
1834
|
-
}
|
|
1835
|
-
errors++;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
var _valid6 = _errs88 === errors;
|
|
1839
|
-
valid31 = valid31 || _valid6;
|
|
1840
|
-
}
|
|
1841
|
-
if (!valid31) {
|
|
1842
|
-
const err76 = { instancePath: instancePath + "/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*Color%24/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1843
|
-
if (vErrors === null) {
|
|
1844
|
-
vErrors = [err76];
|
|
1845
|
-
}
|
|
1846
|
-
else {
|
|
1847
|
-
vErrors.push(err76);
|
|
1848
|
-
}
|
|
1849
|
-
errors++;
|
|
1850
|
-
validate10.errors = vErrors;
|
|
1851
|
-
return false;
|
|
1852
|
-
}
|
|
1853
|
-
else {
|
|
1854
|
-
errors = _errs84;
|
|
1855
|
-
if (vErrors !== null) {
|
|
1856
|
-
if (_errs84) {
|
|
1857
|
-
vErrors.length = _errs84;
|
|
1858
|
-
}
|
|
1859
|
-
else {
|
|
1860
|
-
vErrors = null;
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
var valid23 = _errs83 === errors;
|
|
1865
|
-
if (!valid23) {
|
|
1866
|
-
break;
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
if (valid23) {
|
|
1871
|
-
var valid23 = true;
|
|
1872
|
-
for (const key7 in data) {
|
|
1873
|
-
if (pattern3.test(key7)) {
|
|
1874
|
-
let data21 = data[key7];
|
|
1875
|
-
const _errs93 = errors;
|
|
1876
|
-
const _errs94 = errors;
|
|
1877
|
-
let valid35 = false;
|
|
1878
|
-
const _errs95 = errors;
|
|
1879
|
-
if (typeof data21 !== "string") {
|
|
1880
|
-
const err77 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/colorFill/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1881
|
-
if (vErrors === null) {
|
|
1882
|
-
vErrors = [err77];
|
|
1883
|
-
}
|
|
1884
|
-
else {
|
|
1885
|
-
vErrors.push(err77);
|
|
1886
|
-
}
|
|
1887
|
-
errors++;
|
|
1888
|
-
}
|
|
1889
|
-
if (!(((data21 === "solid") || (data21 === "linear")) || (data21 === "radial"))) {
|
|
1890
|
-
const err78 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/colorFill/enum", keyword: "enum", params: { allowedValues: schema30.enum }, message: "must be equal to one of the allowed values" };
|
|
1891
|
-
if (vErrors === null) {
|
|
1892
|
-
vErrors = [err78];
|
|
1893
|
-
}
|
|
1894
|
-
else {
|
|
1895
|
-
vErrors.push(err78);
|
|
1896
|
-
}
|
|
1897
|
-
errors++;
|
|
1898
|
-
}
|
|
1899
|
-
var _valid7 = _errs95 === errors;
|
|
1900
|
-
valid35 = valid35 || _valid7;
|
|
1901
|
-
if (!valid35) {
|
|
1902
|
-
const _errs98 = errors;
|
|
1903
|
-
if (errors === _errs98) {
|
|
1904
|
-
if (Array.isArray(data21)) {
|
|
1905
|
-
if (data21.length > 128) {
|
|
1906
|
-
const err79 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFill%24/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 128 }, message: "must NOT have more than 128 items" };
|
|
1907
|
-
if (vErrors === null) {
|
|
1908
|
-
vErrors = [err79];
|
|
1909
|
-
}
|
|
1910
|
-
else {
|
|
1911
|
-
vErrors.push(err79);
|
|
1912
|
-
}
|
|
1913
|
-
errors++;
|
|
1914
|
-
}
|
|
1915
|
-
else {
|
|
1916
|
-
if (data21.length < 0) {
|
|
1917
|
-
const err80 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFill%24/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
1918
|
-
if (vErrors === null) {
|
|
1919
|
-
vErrors = [err80];
|
|
1920
|
-
}
|
|
1921
|
-
else {
|
|
1922
|
-
vErrors.push(err80);
|
|
1923
|
-
}
|
|
1924
|
-
errors++;
|
|
1925
|
-
}
|
|
1926
|
-
else {
|
|
1927
|
-
var valid37 = true;
|
|
1928
|
-
const len7 = data21.length;
|
|
1929
|
-
for (let i7 = 0; i7 < len7; i7++) {
|
|
1930
|
-
let data22 = data21[i7];
|
|
1931
|
-
const _errs100 = errors;
|
|
1932
|
-
if (typeof data22 !== "string") {
|
|
1933
|
-
const err81 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i7, schemaPath: "#/definitions/colorFill/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1934
|
-
if (vErrors === null) {
|
|
1935
|
-
vErrors = [err81];
|
|
1936
|
-
}
|
|
1937
|
-
else {
|
|
1938
|
-
vErrors.push(err81);
|
|
1939
|
-
}
|
|
1940
|
-
errors++;
|
|
1941
|
-
}
|
|
1942
|
-
if (!(((data22 === "solid") || (data22 === "linear")) || (data22 === "radial"))) {
|
|
1943
|
-
const err82 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i7, schemaPath: "#/definitions/colorFill/enum", keyword: "enum", params: { allowedValues: schema30.enum }, message: "must be equal to one of the allowed values" };
|
|
1944
|
-
if (vErrors === null) {
|
|
1945
|
-
vErrors = [err82];
|
|
1946
|
-
}
|
|
1947
|
-
else {
|
|
1948
|
-
vErrors.push(err82);
|
|
1949
|
-
}
|
|
1950
|
-
errors++;
|
|
1951
|
-
}
|
|
1952
|
-
var valid37 = _errs100 === errors;
|
|
1953
|
-
if (!valid37) {
|
|
1954
|
-
break;
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
else {
|
|
1961
|
-
const err83 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFill%24/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1962
|
-
if (vErrors === null) {
|
|
1963
|
-
vErrors = [err83];
|
|
1964
|
-
}
|
|
1965
|
-
else {
|
|
1966
|
-
vErrors.push(err83);
|
|
1967
|
-
}
|
|
1968
|
-
errors++;
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
var _valid7 = _errs98 === errors;
|
|
1972
|
-
valid35 = valid35 || _valid7;
|
|
1973
|
-
}
|
|
1974
|
-
if (!valid35) {
|
|
1975
|
-
const err84 = { instancePath: instancePath + "/" + key7.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFill%24/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1976
|
-
if (vErrors === null) {
|
|
1977
|
-
vErrors = [err84];
|
|
1978
|
-
}
|
|
1979
|
-
else {
|
|
1980
|
-
vErrors.push(err84);
|
|
1981
|
-
}
|
|
1982
|
-
errors++;
|
|
1983
|
-
validate10.errors = vErrors;
|
|
1984
|
-
return false;
|
|
1985
|
-
}
|
|
1986
|
-
else {
|
|
1987
|
-
errors = _errs94;
|
|
1988
|
-
if (vErrors !== null) {
|
|
1989
|
-
if (_errs94) {
|
|
1990
|
-
vErrors.length = _errs94;
|
|
1991
|
-
}
|
|
1992
|
-
else {
|
|
1993
|
-
vErrors = null;
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
var valid23 = _errs93 === errors;
|
|
1998
|
-
if (!valid23) {
|
|
1999
|
-
break;
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
if (valid23) {
|
|
2004
|
-
var valid23 = true;
|
|
2005
|
-
for (const key8 in data) {
|
|
2006
|
-
if (pattern4.test(key8)) {
|
|
2007
|
-
let data23 = data[key8];
|
|
2008
|
-
const _errs103 = errors;
|
|
2009
|
-
const _errs104 = errors;
|
|
2010
|
-
let valid39 = false;
|
|
2011
|
-
const _errs105 = errors;
|
|
2012
|
-
const _errs106 = errors;
|
|
2013
|
-
if (!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))) {
|
|
2014
|
-
const err85 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/colorFillStops/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
2015
|
-
if (vErrors === null) {
|
|
2016
|
-
vErrors = [err85];
|
|
2017
|
-
}
|
|
2018
|
-
else {
|
|
2019
|
-
vErrors.push(err85);
|
|
2020
|
-
}
|
|
2021
|
-
errors++;
|
|
2022
|
-
}
|
|
2023
|
-
if (errors === _errs106) {
|
|
2024
|
-
if ((typeof data23 == "number") && (isFinite(data23))) {
|
|
2025
|
-
if (data23 < 2 || isNaN(data23)) {
|
|
2026
|
-
const err86 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/definitions/colorFillStops/minimum", keyword: "minimum", params: { comparison: ">=", limit: 2 }, message: "must be >= 2" };
|
|
2027
|
-
if (vErrors === null) {
|
|
2028
|
-
vErrors = [err86];
|
|
2029
|
-
}
|
|
2030
|
-
else {
|
|
2031
|
-
vErrors.push(err86);
|
|
2032
|
-
}
|
|
2033
|
-
errors++;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
var _valid8 = _errs105 === errors;
|
|
2038
|
-
valid39 = valid39 || _valid8;
|
|
2039
|
-
if (!valid39) {
|
|
2040
|
-
const _errs108 = errors;
|
|
2041
|
-
if (errors === _errs108) {
|
|
2042
|
-
if (Array.isArray(data23)) {
|
|
2043
|
-
if (data23.length > 2) {
|
|
2044
|
-
const err87 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFillStops%24/anyOf/1/maxItems", keyword: "maxItems", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
2045
|
-
if (vErrors === null) {
|
|
2046
|
-
vErrors = [err87];
|
|
2047
|
-
}
|
|
2048
|
-
else {
|
|
2049
|
-
vErrors.push(err87);
|
|
2050
|
-
}
|
|
2051
|
-
errors++;
|
|
2052
|
-
}
|
|
2053
|
-
else {
|
|
2054
|
-
if (data23.length < 0) {
|
|
2055
|
-
const err88 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFillStops%24/anyOf/1/minItems", keyword: "minItems", params: { limit: 0 }, message: "must NOT have fewer than 0 items" };
|
|
2056
|
-
if (vErrors === null) {
|
|
2057
|
-
vErrors = [err88];
|
|
2058
|
-
}
|
|
2059
|
-
else {
|
|
2060
|
-
vErrors.push(err88);
|
|
2061
|
-
}
|
|
2062
|
-
errors++;
|
|
2063
|
-
}
|
|
2064
|
-
else {
|
|
2065
|
-
var valid41 = true;
|
|
2066
|
-
const len8 = data23.length;
|
|
2067
|
-
for (let i8 = 0; i8 < len8; i8++) {
|
|
2068
|
-
let data24 = data23[i8];
|
|
2069
|
-
const _errs110 = errors;
|
|
2070
|
-
const _errs111 = errors;
|
|
2071
|
-
if (!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))) {
|
|
2072
|
-
const err89 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8, schemaPath: "#/definitions/colorFillStops/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
|
|
2073
|
-
if (vErrors === null) {
|
|
2074
|
-
vErrors = [err89];
|
|
2075
|
-
}
|
|
2076
|
-
else {
|
|
2077
|
-
vErrors.push(err89);
|
|
2078
|
-
}
|
|
2079
|
-
errors++;
|
|
2080
|
-
}
|
|
2081
|
-
if (errors === _errs111) {
|
|
2082
|
-
if ((typeof data24 == "number") && (isFinite(data24))) {
|
|
2083
|
-
if (data24 < 2 || isNaN(data24)) {
|
|
2084
|
-
const err90 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i8, schemaPath: "#/definitions/colorFillStops/minimum", keyword: "minimum", params: { comparison: ">=", limit: 2 }, message: "must be >= 2" };
|
|
2085
|
-
if (vErrors === null) {
|
|
2086
|
-
vErrors = [err90];
|
|
2087
|
-
}
|
|
2088
|
-
else {
|
|
2089
|
-
vErrors.push(err90);
|
|
2090
|
-
}
|
|
2091
|
-
errors++;
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
var valid41 = _errs110 === errors;
|
|
2096
|
-
if (!valid41) {
|
|
2097
|
-
break;
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
else {
|
|
2104
|
-
const err91 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFillStops%24/anyOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2105
|
-
if (vErrors === null) {
|
|
2106
|
-
vErrors = [err91];
|
|
2107
|
-
}
|
|
2108
|
-
else {
|
|
2109
|
-
vErrors.push(err91);
|
|
2110
|
-
}
|
|
2111
|
-
errors++;
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
var _valid8 = _errs108 === errors;
|
|
2115
|
-
valid39 = valid39 || _valid8;
|
|
2116
|
-
}
|
|
2117
|
-
if (!valid39) {
|
|
2118
|
-
const err92 = { instancePath: instancePath + "/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/patternProperties/%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D*ColorFillStops%24/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
2119
|
-
if (vErrors === null) {
|
|
2120
|
-
vErrors = [err92];
|
|
2121
|
-
}
|
|
2122
|
-
else {
|
|
2123
|
-
vErrors.push(err92);
|
|
2124
|
-
}
|
|
2125
|
-
errors++;
|
|
2126
|
-
validate10.errors = vErrors;
|
|
2127
|
-
return false;
|
|
2128
|
-
}
|
|
2129
|
-
else {
|
|
2130
|
-
errors = _errs104;
|
|
2131
|
-
if (vErrors !== null) {
|
|
2132
|
-
if (_errs104) {
|
|
2133
|
-
vErrors.length = _errs104;
|
|
2134
|
-
}
|
|
2135
|
-
else {
|
|
2136
|
-
vErrors = null;
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
var valid23 = _errs103 === errors;
|
|
2141
|
-
if (!valid23) {
|
|
2142
|
-
break;
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
if (valid23) {
|
|
2147
|
-
var valid23 = true;
|
|
2148
|
-
for (const key9 in data) {
|
|
2149
|
-
if (pattern5.test(key9)) {
|
|
2150
|
-
const _errs113 = errors;
|
|
2151
|
-
if (!(validate13(data[key9], { instancePath: instancePath + "/" + key9.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key9, rootData }))) {
|
|
2152
|
-
vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
|
|
2153
|
-
errors = vErrors.length;
|
|
2154
|
-
}
|
|
2155
|
-
var valid23 = _errs113 === errors;
|
|
2156
|
-
if (!valid23) {
|
|
2157
|
-
break;
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
if (valid23) {
|
|
2162
|
-
var valid23 = true;
|
|
2163
|
-
for (const key10 in data) {
|
|
2164
|
-
if (pattern6.test(key10)) {
|
|
2165
|
-
const _errs115 = errors;
|
|
2166
|
-
if (!(validate13(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData }))) {
|
|
2167
|
-
vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
|
|
2168
|
-
errors = vErrors.length;
|
|
2169
|
-
}
|
|
2170
|
-
var valid23 = _errs115 === errors;
|
|
2171
|
-
if (!valid23) {
|
|
2172
|
-
break;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
if (valid23) {
|
|
2177
|
-
var valid23 = true;
|
|
2178
|
-
for (const key11 in data) {
|
|
2179
|
-
if (pattern7.test(key11)) {
|
|
2180
|
-
const _errs117 = errors;
|
|
2181
|
-
if (!(validate16(data[key11], { instancePath: instancePath + "/" + key11.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key11, rootData }))) {
|
|
2182
|
-
vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
|
|
2183
|
-
errors = vErrors.length;
|
|
2184
|
-
}
|
|
2185
|
-
var valid23 = _errs117 === errors;
|
|
2186
|
-
if (!valid23) {
|
|
2187
|
-
break;
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
if (valid23) {
|
|
2192
|
-
var valid23 = true;
|
|
2193
|
-
for (const key12 in data) {
|
|
2194
|
-
if (pattern8.test(key12)) {
|
|
2195
|
-
const _errs119 = errors;
|
|
2196
|
-
if (!(validate16(data[key12], { instancePath: instancePath + "/" + key12.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key12, rootData }))) {
|
|
2197
|
-
vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
|
|
2198
|
-
errors = vErrors.length;
|
|
2199
|
-
}
|
|
2200
|
-
var valid23 = _errs119 === errors;
|
|
2201
|
-
if (!valid23) {
|
|
2202
|
-
break;
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
return errorCount === 0;
|
|
1200
|
+
})();
|
|
1201
|
+
if (!sub18) {
|
|
1202
|
+
if (validate.errors === null)
|
|
1203
|
+
validate.errors = [];
|
|
1204
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFill$/anyOf", instanceLocation: "#/" + pointerPart(key1) });
|
|
1205
|
+
if (suberr26)
|
|
1206
|
+
validate.errors.push(...suberr26);
|
|
1207
|
+
errorCount++;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
if (pattern8.test(key1)) {
|
|
1212
|
+
let suberr29 = null;
|
|
1213
|
+
const sub19 = (() => {
|
|
1214
|
+
let errorCount = 0;
|
|
1215
|
+
const err20 = validate.errors;
|
|
1216
|
+
const res20 = ref11(data[key1]);
|
|
1217
|
+
const suberr30 = ref11.errors;
|
|
1218
|
+
validate.errors = err20;
|
|
1219
|
+
if (!res20) {
|
|
1220
|
+
if (validate.errors === null)
|
|
1221
|
+
validate.errors = [];
|
|
1222
|
+
validate.errors.push(...suberr30.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1223
|
+
errorCount++;
|
|
1224
|
+
}
|
|
1225
|
+
return errorCount === 0;
|
|
1226
|
+
})();
|
|
1227
|
+
if (!sub19) {
|
|
1228
|
+
const sub20 = (() => {
|
|
1229
|
+
let errorCount = 0;
|
|
1230
|
+
if (!(Array.isArray(data[key1]))) {
|
|
1231
|
+
if (suberr29 === null)
|
|
1232
|
+
suberr29 = [];
|
|
1233
|
+
suberr29.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf/1/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
1234
|
+
errorCount++;
|
|
1235
|
+
}
|
|
1236
|
+
else {
|
|
1237
|
+
if (data[key1].length > 2) {
|
|
1238
|
+
if (suberr29 === null)
|
|
1239
|
+
suberr29 = [];
|
|
1240
|
+
suberr29.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf/1/maxItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1241
|
+
errorCount++;
|
|
1242
|
+
}
|
|
1243
|
+
if (data[key1].length < 0) {
|
|
1244
|
+
if (suberr29 === null)
|
|
1245
|
+
suberr29 = [];
|
|
1246
|
+
suberr29.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf/1/minItems", instanceLocation: "#/" + pointerPart(key1) });
|
|
1247
|
+
errorCount++;
|
|
1248
|
+
}
|
|
1249
|
+
for (let r = 0; r < data[key1].length; r++) {
|
|
1250
|
+
if (data[key1][r] !== undefined && hasOwn(data[key1], r)) {
|
|
1251
|
+
const err21 = validate.errors;
|
|
1252
|
+
const res21 = ref11(data[key1][r]);
|
|
1253
|
+
const suberr31 = ref11.errors;
|
|
1254
|
+
validate.errors = err21;
|
|
1255
|
+
if (!res21) {
|
|
1256
|
+
if (validate.errors === null)
|
|
1257
|
+
validate.errors = [];
|
|
1258
|
+
validate.errors.push(...suberr31.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf/1/items/$ref", "#/" + pointerPart(key1) + "/" + r)));
|
|
1259
|
+
errorCount++;
|
|
2217
1260
|
}
|
|
2218
1261
|
}
|
|
2219
1262
|
}
|
|
2220
1263
|
}
|
|
1264
|
+
return errorCount === 0;
|
|
1265
|
+
})();
|
|
1266
|
+
if (!sub20) {
|
|
1267
|
+
if (validate.errors === null)
|
|
1268
|
+
validate.errors = [];
|
|
1269
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorFillStops$/anyOf", instanceLocation: "#/" + pointerPart(key1) });
|
|
1270
|
+
if (suberr29)
|
|
1271
|
+
validate.errors.push(...suberr29);
|
|
1272
|
+
errorCount++;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
if (pattern9.test(key1)) {
|
|
1277
|
+
const err24 = validate.errors;
|
|
1278
|
+
const res24 = ref12(data[key1]);
|
|
1279
|
+
const suberr35 = ref12.errors;
|
|
1280
|
+
validate.errors = err24;
|
|
1281
|
+
if (!res24) {
|
|
1282
|
+
if (validate.errors === null)
|
|
1283
|
+
validate.errors = [];
|
|
1284
|
+
validate.errors.push(...suberr35.map(e => errorMerge(e, "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorAngle$/allOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1285
|
+
errorCount++;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
if (pattern10.test(key1)) {
|
|
1289
|
+
if (!(typeof data[key1] === "string")) {
|
|
1290
|
+
if (validate.errors === null)
|
|
1291
|
+
validate.errors = [];
|
|
1292
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorOrder$/type", instanceLocation: "#/" + pointerPart(key1) });
|
|
1293
|
+
errorCount++;
|
|
1294
|
+
}
|
|
1295
|
+
else {
|
|
1296
|
+
if (!(data[key1] === "random" || data[key1] === "fixed")) {
|
|
1297
|
+
if (validate.errors === null)
|
|
1298
|
+
validate.errors = [];
|
|
1299
|
+
validate.errors.push({ keywordLocation: "#/patternProperties/^[a-z][a-zA-Z0-9]*ColorOrder$/enum", instanceLocation: "#/" + pointerPart(key1) });
|
|
1300
|
+
errorCount++;
|
|
2221
1301
|
}
|
|
2222
1302
|
}
|
|
2223
1303
|
}
|
|
1304
|
+
if ((key1 === "rotate")) {
|
|
1305
|
+
const err25 = validate.errors;
|
|
1306
|
+
const res25 = ref12(data[key1]);
|
|
1307
|
+
const suberr36 = ref12.errors;
|
|
1308
|
+
validate.errors = err25;
|
|
1309
|
+
if (!res25) {
|
|
1310
|
+
if (validate.errors === null)
|
|
1311
|
+
validate.errors = [];
|
|
1312
|
+
validate.errors.push(...suberr36.map(e => errorMerge(e, "#/patternProperties/^rotate$/allOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1313
|
+
errorCount++;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
if ((key1 === "translateY")) {
|
|
1317
|
+
const err28 = validate.errors;
|
|
1318
|
+
const res28 = ref14(data[key1]);
|
|
1319
|
+
const suberr40 = ref14.errors;
|
|
1320
|
+
validate.errors = err28;
|
|
1321
|
+
if (!res28) {
|
|
1322
|
+
if (validate.errors === null)
|
|
1323
|
+
validate.errors = [];
|
|
1324
|
+
validate.errors.push(...suberr40.map(e => errorMerge(e, "#/patternProperties/^translateY$/allOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1325
|
+
errorCount++;
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
if ((key1 === "translateX")) {
|
|
1329
|
+
const err29 = validate.errors;
|
|
1330
|
+
const res29 = ref14(data[key1]);
|
|
1331
|
+
const suberr41 = ref14.errors;
|
|
1332
|
+
validate.errors = err29;
|
|
1333
|
+
if (!res29) {
|
|
1334
|
+
if (validate.errors === null)
|
|
1335
|
+
validate.errors = [];
|
|
1336
|
+
validate.errors.push(...suberr41.map(e => errorMerge(e, "#/patternProperties/^translateX$/allOf/0/$ref", "#/" + pointerPart(key1))));
|
|
1337
|
+
errorCount++;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
for (const key4 of Object.keys(data)) {
|
|
1342
|
+
if (key4 !== "seed" && key4 !== "size" && key4 !== "idRandomization" && key4 !== "title" && key4 !== "flip" && key4 !== "fontFamily" && key4 !== "fontWeight" && key4 !== "scale" && key4 !== "borderRadius" && key4 !== "tags" && !pattern2.test(key4) && !pattern3.test(key4) && !pattern5.test(key4) && !pattern7.test(key4) && !pattern8.test(key4) && !pattern9.test(key4) && !pattern10.test(key4) && !(key4 === "rotate") && !(key4 === "translateY") && !(key4 === "translateX")) {
|
|
1343
|
+
if (validate.errors === null)
|
|
1344
|
+
validate.errors = [];
|
|
1345
|
+
validate.errors.push({ keywordLocation: "#/additionalProperties", instanceLocation: "#/" + pointerPart(key4) });
|
|
1346
|
+
errorCount++;
|
|
1347
|
+
}
|
|
2224
1348
|
}
|
|
2225
1349
|
}
|
|
2226
1350
|
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
1351
|
+
return errorCount === 0;
|
|
1352
|
+
};
|
|
1353
|
+
return ref0;
|
|
1354
|
+
})();
|
|
1355
|
+
// schemasafe reports errors as JSON pointers only (instanceLocation into the
|
|
1356
|
+
// data, keywordLocation into the schema) without prose. Derive a short message
|
|
1357
|
+
// from the failing keyword; the detail keeps keywordLocation as schemaPath for
|
|
1358
|
+
// anyone who needs the exact schema rule.
|
|
1359
|
+
const KEYWORD_MESSAGES = {
|
|
1360
|
+
type: 'has an invalid type',
|
|
1361
|
+
enum: 'must be one of the allowed values',
|
|
1362
|
+
const: 'must equal the expected value',
|
|
1363
|
+
pattern: 'does not match the required pattern',
|
|
1364
|
+
required: 'is required but missing',
|
|
1365
|
+
additionalProperties: 'has an unexpected property',
|
|
1366
|
+
propertyNames: 'has an invalid property name',
|
|
1367
|
+
minimum: 'is smaller than allowed',
|
|
1368
|
+
maximum: 'is larger than allowed',
|
|
1369
|
+
exclusiveMinimum: 'is smaller than allowed',
|
|
1370
|
+
exclusiveMaximum: 'is larger than allowed',
|
|
1371
|
+
minLength: 'is too short',
|
|
1372
|
+
maxLength: 'is too long',
|
|
1373
|
+
minItems: 'has too few items',
|
|
1374
|
+
maxItems: 'has too many items',
|
|
1375
|
+
uniqueItems: 'has duplicate items',
|
|
1376
|
+
minProperties: 'has too few properties',
|
|
1377
|
+
maxProperties: 'has too many properties',
|
|
1378
|
+
anyOf: 'does not match any allowed variant',
|
|
1379
|
+
oneOf: 'does not match exactly one allowed variant',
|
|
1380
|
+
allOf: 'does not match all required schemas',
|
|
1381
|
+
not: 'matches a disallowed schema',
|
|
1382
|
+
};
|
|
1383
|
+
function toDetail(error) {
|
|
1384
|
+
const keyword = error.keywordLocation.slice(error.keywordLocation.lastIndexOf('/') + 1);
|
|
1385
|
+
return {
|
|
1386
|
+
instancePath: error.instanceLocation.slice(1),
|
|
1387
|
+
schemaPath: error.keywordLocation,
|
|
1388
|
+
keyword,
|
|
1389
|
+
message: KEYWORD_MESSAGES[keyword] ?? `must satisfy '${keyword}'`,
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
2233
1392
|
export class OptionsValidator {
|
|
2234
1393
|
static validate(data) {
|
|
2235
|
-
if (!
|
|
2236
|
-
throw new OptionsValidationError(
|
|
1394
|
+
if (!validate(data)) {
|
|
1395
|
+
throw new OptionsValidationError((validate.errors ?? []).map(toDetail));
|
|
2237
1396
|
}
|
|
2238
1397
|
}
|
|
2239
1398
|
}
|