@hyperjump/json-schema 0.23.1 → 0.23.3
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/dist/json-schema-amd.js +495 -762
- package/dist/json-schema-amd.js.map +1 -1
- package/dist/json-schema-amd.min.js +1 -1
- package/dist/json-schema-amd.min.js.map +1 -1
- package/dist/json-schema-cjs.js +495 -762
- package/dist/json-schema-cjs.js.map +1 -1
- package/dist/json-schema-cjs.min.js +1 -1
- package/dist/json-schema-cjs.min.js.map +1 -1
- package/dist/json-schema-esm.js +495 -762
- package/dist/json-schema-esm.js.map +1 -1
- package/dist/json-schema-esm.min.js +1 -1
- package/dist/json-schema-esm.min.js.map +1 -1
- package/dist/json-schema-iife.js +495 -762
- package/dist/json-schema-iife.js.map +1 -1
- package/dist/json-schema-iife.min.js +1 -1
- package/dist/json-schema-iife.min.js.map +1 -1
- package/dist/json-schema-system.js +495 -762
- package/dist/json-schema-system.js.map +1 -1
- package/dist/json-schema-system.min.js +1 -1
- package/dist/json-schema-system.min.js.map +1 -1
- package/dist/json-schema-umd.js +495 -762
- package/dist/json-schema-umd.js.map +1 -1
- package/dist/json-schema-umd.min.js +1 -1
- package/dist/json-schema-umd.min.js.map +1 -1
- package/lib/common.d.ts +1 -0
- package/lib/draft-04.d.ts +3 -2
- package/lib/draft-06.d.ts +3 -2
- package/lib/draft-06.js +2 -2
- package/lib/draft-07.d.ts +3 -2
- package/lib/draft-07.js +2 -2
- package/lib/draft-2019-09.d.ts +3 -2
- package/lib/draft-2019-09.js +2 -2
- package/lib/draft-2020-12.d.ts +3 -2
- package/lib/draft-2020-12.js +2 -2
- package/lib/keywords/index.js +0 -2
- package/lib/keywords/maxLength.js +1 -1
- package/lib/keywords/minLength.js +1 -1
- package/package.json +1 -1
- package/lib/keywords/maxLength6.js +0 -7
- package/lib/keywords/minLength6.js +0 -7
package/dist/json-schema-amd.js
CHANGED
|
@@ -2,7 +2,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2
2
|
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
|
|
5
|
-
var justCurryIt$
|
|
5
|
+
var justCurryIt$1 = curry$b;
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
function add(a, b, c) {
|
|
@@ -27,7 +27,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
27
27
|
milesToKm(10); // 16.2
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
function curry$
|
|
30
|
+
function curry$b(fn, arity) {
|
|
31
31
|
return function curried() {
|
|
32
32
|
if (arity == null) {
|
|
33
33
|
arity = fn.length;
|
|
@@ -1898,84 +1898,91 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1898
1898
|
|
|
1899
1899
|
var common$1 = { jsonTypeOf: jsonTypeOf$2, resolveUrl: resolveUrl$3, urlFragment: urlFragment$1, pathRelative: pathRelative$1 };
|
|
1900
1900
|
|
|
1901
|
-
const curry$
|
|
1901
|
+
const curry$a = justCurryIt$1;
|
|
1902
1902
|
|
|
1903
1903
|
|
|
1904
|
-
const nil$
|
|
1904
|
+
const nil$2 = "";
|
|
1905
1905
|
|
|
1906
|
-
const compile$
|
|
1906
|
+
const compile$N = (pointer) => {
|
|
1907
1907
|
if (pointer.length > 0 && pointer[0] !== "/") {
|
|
1908
1908
|
throw Error("Invalid JSON Pointer");
|
|
1909
1909
|
}
|
|
1910
1910
|
|
|
1911
|
-
return pointer.split("/").slice(1).map(unescape
|
|
1911
|
+
return pointer.split("/").slice(1).map(unescape);
|
|
1912
1912
|
};
|
|
1913
1913
|
|
|
1914
|
-
const get$
|
|
1915
|
-
const ptr = compile$
|
|
1914
|
+
const get$2 = (pointer, value = undefined) => {
|
|
1915
|
+
const ptr = compile$N(pointer);
|
|
1916
1916
|
|
|
1917
1917
|
const fn = (value) => ptr.reduce(([value, pointer], segment) => {
|
|
1918
|
-
return [applySegment
|
|
1918
|
+
return [applySegment(value, segment, pointer), append(segment, pointer)];
|
|
1919
1919
|
}, [value, ""])[0];
|
|
1920
1920
|
|
|
1921
1921
|
return value === undefined ? fn : fn(value);
|
|
1922
1922
|
};
|
|
1923
1923
|
|
|
1924
|
-
const set
|
|
1925
|
-
const ptr = compile$
|
|
1926
|
-
const fn = curry$
|
|
1924
|
+
const set = (pointer, subject = undefined, value = undefined) => {
|
|
1925
|
+
const ptr = compile$N(pointer);
|
|
1926
|
+
const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
|
|
1927
1927
|
return subject === undefined ? fn : fn(subject, value);
|
|
1928
1928
|
};
|
|
1929
1929
|
|
|
1930
|
-
const _set
|
|
1930
|
+
const _set = (pointer, subject, value, cursor) => {
|
|
1931
1931
|
if (pointer.length === 0) {
|
|
1932
1932
|
return value;
|
|
1933
1933
|
} else if (pointer.length > 1) {
|
|
1934
|
-
|
|
1935
|
-
|
|
1934
|
+
if (Array.isArray(subject)) {
|
|
1935
|
+
const index = pointer.shift();
|
|
1936
|
+
const clonedSubject = [...subject];
|
|
1937
|
+
clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
|
|
1938
|
+
return clonedSubject;
|
|
1939
|
+
} else {
|
|
1940
|
+
const segment = pointer.shift();
|
|
1941
|
+
return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
|
|
1942
|
+
}
|
|
1936
1943
|
} else if (Array.isArray(subject)) {
|
|
1937
1944
|
const clonedSubject = [...subject];
|
|
1938
|
-
const segment = computeSegment
|
|
1945
|
+
const segment = computeSegment(subject, pointer[0]);
|
|
1939
1946
|
clonedSubject[segment] = value;
|
|
1940
1947
|
return clonedSubject;
|
|
1941
1948
|
} else if (typeof subject === "object" && subject !== null) {
|
|
1942
1949
|
return { ...subject, [pointer[0]]: value };
|
|
1943
1950
|
} else {
|
|
1944
|
-
return applySegment
|
|
1951
|
+
return applySegment(subject, pointer[0], cursor);
|
|
1945
1952
|
}
|
|
1946
1953
|
};
|
|
1947
1954
|
|
|
1948
|
-
const assign
|
|
1949
|
-
const ptr = compile$
|
|
1950
|
-
const fn = curry$
|
|
1955
|
+
const assign = (pointer, subject = undefined, value = undefined) => {
|
|
1956
|
+
const ptr = compile$N(pointer);
|
|
1957
|
+
const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
|
|
1951
1958
|
return subject === undefined ? fn : fn(subject, value);
|
|
1952
1959
|
};
|
|
1953
1960
|
|
|
1954
|
-
const _assign
|
|
1961
|
+
const _assign = (pointer, subject, value, cursor) => {
|
|
1955
1962
|
if (pointer.length === 0) {
|
|
1956
1963
|
return;
|
|
1957
|
-
} else if (pointer.length === 1 && !isScalar
|
|
1958
|
-
const segment = computeSegment
|
|
1964
|
+
} else if (pointer.length === 1 && !isScalar(subject)) {
|
|
1965
|
+
const segment = computeSegment(subject, pointer[0]);
|
|
1959
1966
|
subject[segment] = value;
|
|
1960
1967
|
} else {
|
|
1961
1968
|
const segment = pointer.shift();
|
|
1962
|
-
_assign
|
|
1969
|
+
_assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
|
|
1963
1970
|
}
|
|
1964
1971
|
};
|
|
1965
1972
|
|
|
1966
|
-
const unset
|
|
1967
|
-
const ptr = compile$
|
|
1968
|
-
const fn = (subject) => _unset
|
|
1973
|
+
const unset = (pointer, subject = undefined) => {
|
|
1974
|
+
const ptr = compile$N(pointer);
|
|
1975
|
+
const fn = (subject) => _unset(ptr, subject, nil$2);
|
|
1969
1976
|
return subject === undefined ? fn : fn(subject);
|
|
1970
1977
|
};
|
|
1971
1978
|
|
|
1972
|
-
const _unset
|
|
1979
|
+
const _unset = (pointer, subject, cursor) => {
|
|
1973
1980
|
if (pointer.length == 0) {
|
|
1974
1981
|
return undefined;
|
|
1975
1982
|
} else if (pointer.length > 1) {
|
|
1976
1983
|
const segment = pointer.shift();
|
|
1977
|
-
const value = applySegment
|
|
1978
|
-
return { ...subject, [segment]: _unset
|
|
1984
|
+
const value = applySegment(subject, segment, cursor);
|
|
1985
|
+
return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
|
|
1979
1986
|
} else if (Array.isArray(subject)) {
|
|
1980
1987
|
return subject.filter((_, ndx) => ndx != pointer[0]);
|
|
1981
1988
|
} else if (typeof subject === "object" && subject !== null) {
|
|
@@ -1983,54 +1990,54 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1983
1990
|
const { [pointer[0]]: _, ...result } = subject;
|
|
1984
1991
|
return result;
|
|
1985
1992
|
} else {
|
|
1986
|
-
return applySegment
|
|
1993
|
+
return applySegment(subject, pointer[0], cursor);
|
|
1987
1994
|
}
|
|
1988
1995
|
};
|
|
1989
1996
|
|
|
1990
|
-
const remove
|
|
1991
|
-
const ptr = compile$
|
|
1992
|
-
const fn = (subject) => _remove
|
|
1997
|
+
const remove = (pointer, subject = undefined) => {
|
|
1998
|
+
const ptr = compile$N(pointer);
|
|
1999
|
+
const fn = (subject) => _remove(ptr, subject, nil$2);
|
|
1993
2000
|
return subject === undefined ? fn : fn(subject);
|
|
1994
2001
|
};
|
|
1995
2002
|
|
|
1996
|
-
const _remove
|
|
2003
|
+
const _remove = (pointer, subject, cursor) => {
|
|
1997
2004
|
if (pointer.length === 0) {
|
|
1998
2005
|
return;
|
|
1999
2006
|
} else if (pointer.length > 1) {
|
|
2000
2007
|
const segment = pointer.shift();
|
|
2001
|
-
const value = applySegment
|
|
2002
|
-
_remove
|
|
2008
|
+
const value = applySegment(subject, segment, cursor);
|
|
2009
|
+
_remove(pointer, value, append(segment, cursor));
|
|
2003
2010
|
} else if (Array.isArray(subject)) {
|
|
2004
2011
|
subject.splice(pointer[0], 1);
|
|
2005
2012
|
} else if (typeof subject === "object" && subject !== null) {
|
|
2006
2013
|
delete subject[pointer[0]];
|
|
2007
2014
|
} else {
|
|
2008
|
-
applySegment
|
|
2015
|
+
applySegment(subject, pointer[0], cursor);
|
|
2009
2016
|
}
|
|
2010
2017
|
};
|
|
2011
2018
|
|
|
2012
|
-
const append
|
|
2019
|
+
const append = curry$a((segment, pointer) => pointer + "/" + escape$1(segment));
|
|
2013
2020
|
|
|
2014
|
-
const escape$
|
|
2015
|
-
const unescape
|
|
2016
|
-
const computeSegment
|
|
2021
|
+
const escape$1 = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2022
|
+
const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
|
|
2023
|
+
const computeSegment = (value, segment) => Array.isArray(value) && segment === "-" ? value.length : segment;
|
|
2017
2024
|
|
|
2018
|
-
const applySegment
|
|
2025
|
+
const applySegment = (value, segment, cursor = "") => {
|
|
2019
2026
|
if (value === undefined) {
|
|
2020
2027
|
throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
|
|
2021
2028
|
} else if (value === null) {
|
|
2022
2029
|
throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
|
|
2023
|
-
} else if (isScalar
|
|
2030
|
+
} else if (isScalar(value)) {
|
|
2024
2031
|
throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
|
|
2025
2032
|
} else {
|
|
2026
|
-
const computedSegment = computeSegment
|
|
2033
|
+
const computedSegment = computeSegment(value, segment);
|
|
2027
2034
|
return value[computedSegment];
|
|
2028
2035
|
}
|
|
2029
2036
|
};
|
|
2030
2037
|
|
|
2031
|
-
const isScalar
|
|
2038
|
+
const isScalar = (value) => value === null || typeof value !== "object";
|
|
2032
2039
|
|
|
2033
|
-
var lib$
|
|
2040
|
+
var lib$4 = { nil: nil$2, append, get: get$2, set, assign, unset, remove };
|
|
2034
2041
|
|
|
2035
2042
|
const $__value = Symbol("$__value");
|
|
2036
2043
|
const $__href = Symbol("$__href");
|
|
@@ -2046,16 +2053,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2046
2053
|
|
|
2047
2054
|
var reference = { cons: cons$1, isReference, href, value: value$2 };
|
|
2048
2055
|
|
|
2049
|
-
const JsonPointer$3 = lib$
|
|
2050
|
-
const curry$
|
|
2056
|
+
const JsonPointer$3 = lib$4;
|
|
2057
|
+
const curry$9 = justCurryIt$1;
|
|
2051
2058
|
const { resolveUrl: resolveUrl$2, jsonTypeOf: jsonTypeOf$1 } = common$1;
|
|
2052
2059
|
const Reference$2 = reference;
|
|
2053
2060
|
|
|
2054
2061
|
|
|
2055
|
-
const nil$
|
|
2056
|
-
const cons = (instance, id = "") => Object.freeze({ ...nil$
|
|
2062
|
+
const nil$1 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
|
|
2063
|
+
const cons = (instance, id = "") => Object.freeze({ ...nil$1, id: resolveUrl$2(id, ""), instance, value: instance });
|
|
2057
2064
|
|
|
2058
|
-
const get$
|
|
2065
|
+
const get$1 = (url, instance = nil$1) => {
|
|
2059
2066
|
if (!url.startsWith("#")) {
|
|
2060
2067
|
throw Error(`No JSON document found at '${url.split("#")[0]}'`);
|
|
2061
2068
|
}
|
|
@@ -2066,7 +2073,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2066
2073
|
const uri$1 = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`;
|
|
2067
2074
|
const value$1 = (doc) => Reference$2.isReference(doc.value) ? Reference$2.value(doc.value) : doc.value;
|
|
2068
2075
|
const has$1 = (key, doc) => key in value$1(doc);
|
|
2069
|
-
const typeOf$1 = curry$
|
|
2076
|
+
const typeOf$1 = curry$9((doc, type) => jsonTypeOf$1(value$1(doc), type));
|
|
2070
2077
|
|
|
2071
2078
|
const step$1 = (key, doc) => Object.freeze({
|
|
2072
2079
|
...doc,
|
|
@@ -2074,118 +2081,40 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2074
2081
|
value: value$1(doc)[key]
|
|
2075
2082
|
});
|
|
2076
2083
|
|
|
2077
|
-
const entries$
|
|
2084
|
+
const entries$3 = (doc) => Object.keys(value$1(doc))
|
|
2078
2085
|
.map((key) => [key, step$1(key, doc)]);
|
|
2079
2086
|
|
|
2080
2087
|
const keys$1 = (doc) => Object.keys(value$1(doc));
|
|
2081
2088
|
|
|
2082
|
-
const map$
|
|
2089
|
+
const map$4 = curry$9((fn, doc) => value$1(doc)
|
|
2083
2090
|
.map((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2084
2091
|
|
|
2085
|
-
const forEach = curry$
|
|
2092
|
+
const forEach = curry$9((fn, doc) => value$1(doc)
|
|
2086
2093
|
.forEach((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2087
2094
|
|
|
2088
|
-
const filter$
|
|
2095
|
+
const filter$1 = curry$9((fn, doc) => value$1(doc)
|
|
2089
2096
|
.map((item, ndx, array, thisArg) => step$1(ndx, doc))
|
|
2090
2097
|
.filter((item, ndx, array, thisArg) => fn(item, ndx, array, thisArg)));
|
|
2091
2098
|
|
|
2092
|
-
const reduce$
|
|
2099
|
+
const reduce$3 = curry$9((fn, acc, doc) => value$1(doc)
|
|
2093
2100
|
.reduce((acc, item, ndx) => fn(acc, step$1(ndx, doc), ndx), acc));
|
|
2094
2101
|
|
|
2095
|
-
const every$
|
|
2102
|
+
const every$1 = curry$9((fn, doc) => value$1(doc)
|
|
2096
2103
|
.every((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2097
2104
|
|
|
2098
|
-
const some$
|
|
2105
|
+
const some$1 = curry$9((fn, doc) => value$1(doc)
|
|
2099
2106
|
.some((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2100
2107
|
|
|
2101
2108
|
const length$1 = (doc) => value$1(doc).length;
|
|
2102
2109
|
|
|
2103
2110
|
var instance = {
|
|
2104
|
-
nil: nil$
|
|
2105
|
-
step: step$1, entries: entries$
|
|
2111
|
+
nil: nil$1, cons, get: get$1, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
|
|
2112
|
+
step: step$1, entries: entries$3, keys: keys$1, map: map$4, forEach, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1
|
|
2106
2113
|
};
|
|
2107
2114
|
|
|
2108
|
-
var entries$
|
|
2109
|
-
|
|
2110
|
-
const curry$g = justCurryIt$2;
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
var map$6 = curry$g(async (fn, doc) => (await doc).map(fn));
|
|
2115
|
+
var entries$2 = async (doc) => Object.entries(await doc);
|
|
2114
2116
|
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
var reduce$5 = curry$f(async (fn, acc, doc) => {
|
|
2119
|
-
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
2120
|
-
});
|
|
2121
|
-
|
|
2122
|
-
const curry$e = justCurryIt$2;
|
|
2123
|
-
const reduce$4 = reduce$5;
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
var filter$1 = curry$e(async (fn, doc, options = {}) => {
|
|
2127
|
-
return reduce$4(async (acc, item) => {
|
|
2128
|
-
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
2129
|
-
}, [], doc, options);
|
|
2130
|
-
});
|
|
2131
|
-
|
|
2132
|
-
const curry$d = justCurryIt$2;
|
|
2133
|
-
const map$5 = map$6;
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
var some$1 = curry$d(async (fn, doc) => {
|
|
2137
|
-
const results = await map$5(fn, doc);
|
|
2138
|
-
return (await Promise.all(results))
|
|
2139
|
-
.some((a) => a);
|
|
2140
|
-
});
|
|
2141
|
-
|
|
2142
|
-
const curry$c = justCurryIt$2;
|
|
2143
|
-
const map$4 = map$6;
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
var every$1 = curry$c(async (fn, doc) => {
|
|
2147
|
-
const results = await map$4(fn, doc);
|
|
2148
|
-
return (await Promise.all(results))
|
|
2149
|
-
.every((a) => a);
|
|
2150
|
-
});
|
|
2151
|
-
|
|
2152
|
-
const curry$b = justCurryIt$2;
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
var pipeline$3 = curry$b((fns, doc) => {
|
|
2156
|
-
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
2157
|
-
});
|
|
2158
|
-
|
|
2159
|
-
var all$1 = (doc) => Promise.all(doc);
|
|
2160
|
-
|
|
2161
|
-
const pipeline$2 = pipeline$3;
|
|
2162
|
-
const entries$3 = entries$4;
|
|
2163
|
-
const reduce$3 = reduce$5;
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
var allValues$1 = (doc) => {
|
|
2167
|
-
return pipeline$2([
|
|
2168
|
-
entries$3,
|
|
2169
|
-
reduce$3(async (acc, [propertyName, propertyValue]) => {
|
|
2170
|
-
acc[propertyName] = await propertyValue;
|
|
2171
|
-
return acc;
|
|
2172
|
-
}, {})
|
|
2173
|
-
], doc);
|
|
2174
|
-
};
|
|
2175
|
-
|
|
2176
|
-
var lib$5 = {
|
|
2177
|
-
entries: entries$4,
|
|
2178
|
-
map: map$6,
|
|
2179
|
-
filter: filter$1,
|
|
2180
|
-
reduce: reduce$5,
|
|
2181
|
-
some: some$1,
|
|
2182
|
-
every: every$1,
|
|
2183
|
-
pipeline: pipeline$3,
|
|
2184
|
-
all: all$1,
|
|
2185
|
-
allValues: allValues$1
|
|
2186
|
-
};
|
|
2187
|
-
|
|
2188
|
-
var justCurryIt$1 = curry$a;
|
|
2117
|
+
var justCurryIt = curry$8;
|
|
2189
2118
|
|
|
2190
2119
|
/*
|
|
2191
2120
|
function add(a, b, c) {
|
|
@@ -2210,7 +2139,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2210
2139
|
milesToKm(10); // 16.2
|
|
2211
2140
|
*/
|
|
2212
2141
|
|
|
2213
|
-
function curry$
|
|
2142
|
+
function curry$8(fn, arity) {
|
|
2214
2143
|
return function curried() {
|
|
2215
2144
|
if (arity == null) {
|
|
2216
2145
|
arity = fn.length;
|
|
@@ -2226,146 +2155,83 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2226
2155
|
};
|
|
2227
2156
|
}
|
|
2228
2157
|
|
|
2229
|
-
const curry$
|
|
2158
|
+
const curry$7 = justCurryIt;
|
|
2230
2159
|
|
|
2231
2160
|
|
|
2232
|
-
|
|
2161
|
+
var map$3 = curry$7(async (fn, doc) => (await doc).map(fn));
|
|
2233
2162
|
|
|
2234
|
-
const
|
|
2235
|
-
if (pointer.length > 0 && pointer[0] !== "/") {
|
|
2236
|
-
throw Error("Invalid JSON Pointer");
|
|
2237
|
-
}
|
|
2163
|
+
const curry$6 = justCurryIt;
|
|
2238
2164
|
|
|
2239
|
-
return pointer.split("/").slice(1).map(unescape);
|
|
2240
|
-
};
|
|
2241
2165
|
|
|
2242
|
-
|
|
2243
|
-
|
|
2166
|
+
var reduce$2 = curry$6(async (fn, acc, doc) => {
|
|
2167
|
+
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
2168
|
+
});
|
|
2244
2169
|
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
}, [value, ""])[0];
|
|
2170
|
+
const curry$5 = justCurryIt;
|
|
2171
|
+
const reduce$1 = reduce$2;
|
|
2248
2172
|
|
|
2249
|
-
return value === undefined ? fn : fn(value);
|
|
2250
|
-
};
|
|
2251
2173
|
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
};
|
|
2174
|
+
var filter = curry$5(async (fn, doc, options = {}) => {
|
|
2175
|
+
return reduce$1(async (acc, item) => {
|
|
2176
|
+
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
2177
|
+
}, [], doc, options);
|
|
2178
|
+
});
|
|
2257
2179
|
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
return value;
|
|
2261
|
-
} else if (pointer.length > 1) {
|
|
2262
|
-
if (Array.isArray(subject)) {
|
|
2263
|
-
const index = pointer.shift();
|
|
2264
|
-
const clonedSubject = [...subject];
|
|
2265
|
-
clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
|
|
2266
|
-
return clonedSubject;
|
|
2267
|
-
} else {
|
|
2268
|
-
const segment = pointer.shift();
|
|
2269
|
-
return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
|
|
2270
|
-
}
|
|
2271
|
-
} else if (Array.isArray(subject)) {
|
|
2272
|
-
const clonedSubject = [...subject];
|
|
2273
|
-
const segment = computeSegment(subject, pointer[0]);
|
|
2274
|
-
clonedSubject[segment] = value;
|
|
2275
|
-
return clonedSubject;
|
|
2276
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2277
|
-
return { ...subject, [pointer[0]]: value };
|
|
2278
|
-
} else {
|
|
2279
|
-
return applySegment(subject, pointer[0], cursor);
|
|
2280
|
-
}
|
|
2281
|
-
};
|
|
2180
|
+
const curry$4 = justCurryIt;
|
|
2181
|
+
const map$2 = map$3;
|
|
2282
2182
|
|
|
2283
|
-
const assign = (pointer, subject = undefined, value = undefined) => {
|
|
2284
|
-
const ptr = compile$P(pointer);
|
|
2285
|
-
const fn = curry$9((subject, value) => _assign(ptr, subject, value, nil$1));
|
|
2286
|
-
return subject === undefined ? fn : fn(subject, value);
|
|
2287
|
-
};
|
|
2288
2183
|
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
subject[segment] = value;
|
|
2295
|
-
} else {
|
|
2296
|
-
const segment = pointer.shift();
|
|
2297
|
-
_assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
|
|
2298
|
-
}
|
|
2299
|
-
};
|
|
2184
|
+
var some = curry$4(async (fn, doc) => {
|
|
2185
|
+
const results = await map$2(fn, doc);
|
|
2186
|
+
return (await Promise.all(results))
|
|
2187
|
+
.some((a) => a);
|
|
2188
|
+
});
|
|
2300
2189
|
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2303
|
-
const fn = (subject) => _unset(ptr, subject, nil$1);
|
|
2304
|
-
return subject === undefined ? fn : fn(subject);
|
|
2305
|
-
};
|
|
2190
|
+
const curry$3 = justCurryIt;
|
|
2191
|
+
const map$1 = map$3;
|
|
2306
2192
|
|
|
2307
|
-
const _unset = (pointer, subject, cursor) => {
|
|
2308
|
-
if (pointer.length == 0) {
|
|
2309
|
-
return undefined;
|
|
2310
|
-
} else if (pointer.length > 1) {
|
|
2311
|
-
const segment = pointer.shift();
|
|
2312
|
-
const value = applySegment(subject, segment, cursor);
|
|
2313
|
-
return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
|
|
2314
|
-
} else if (Array.isArray(subject)) {
|
|
2315
|
-
return subject.filter((_, ndx) => ndx != pointer[0]);
|
|
2316
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2317
|
-
// eslint-disable-next-line no-unused-vars
|
|
2318
|
-
const { [pointer[0]]: _, ...result } = subject;
|
|
2319
|
-
return result;
|
|
2320
|
-
} else {
|
|
2321
|
-
return applySegment(subject, pointer[0], cursor);
|
|
2322
|
-
}
|
|
2323
|
-
};
|
|
2324
2193
|
|
|
2325
|
-
|
|
2326
|
-
const
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
};
|
|
2194
|
+
var every = curry$3(async (fn, doc) => {
|
|
2195
|
+
const results = await map$1(fn, doc);
|
|
2196
|
+
return (await Promise.all(results))
|
|
2197
|
+
.every((a) => a);
|
|
2198
|
+
});
|
|
2330
2199
|
|
|
2331
|
-
const
|
|
2332
|
-
if (pointer.length === 0) {
|
|
2333
|
-
return;
|
|
2334
|
-
} else if (pointer.length > 1) {
|
|
2335
|
-
const segment = pointer.shift();
|
|
2336
|
-
const value = applySegment(subject, segment, cursor);
|
|
2337
|
-
_remove(pointer, value, append(segment, cursor));
|
|
2338
|
-
} else if (Array.isArray(subject)) {
|
|
2339
|
-
subject.splice(pointer[0], 1);
|
|
2340
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2341
|
-
delete subject[pointer[0]];
|
|
2342
|
-
} else {
|
|
2343
|
-
applySegment(subject, pointer[0], cursor);
|
|
2344
|
-
}
|
|
2345
|
-
};
|
|
2200
|
+
const curry$2 = justCurryIt;
|
|
2346
2201
|
|
|
2347
|
-
const append = curry$9((segment, pointer) => pointer + "/" + escape$1(segment));
|
|
2348
2202
|
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2203
|
+
var pipeline$1 = curry$2((fns, doc) => {
|
|
2204
|
+
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
2205
|
+
});
|
|
2352
2206
|
|
|
2353
|
-
|
|
2354
|
-
if (value === undefined) {
|
|
2355
|
-
throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
|
|
2356
|
-
} else if (value === null) {
|
|
2357
|
-
throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
|
|
2358
|
-
} else if (isScalar(value)) {
|
|
2359
|
-
throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
|
|
2360
|
-
} else {
|
|
2361
|
-
const computedSegment = computeSegment(value, segment);
|
|
2362
|
-
return value[computedSegment];
|
|
2363
|
-
}
|
|
2364
|
-
};
|
|
2207
|
+
var all = (doc) => Promise.all(doc);
|
|
2365
2208
|
|
|
2366
|
-
const
|
|
2209
|
+
const pipeline = pipeline$1;
|
|
2210
|
+
const entries$1 = entries$2;
|
|
2211
|
+
const reduce = reduce$2;
|
|
2367
2212
|
|
|
2368
|
-
|
|
2213
|
+
|
|
2214
|
+
var allValues = (doc) => {
|
|
2215
|
+
return pipeline([
|
|
2216
|
+
entries$1,
|
|
2217
|
+
reduce(async (acc, [propertyName, propertyValue]) => {
|
|
2218
|
+
acc[propertyName] = await propertyValue;
|
|
2219
|
+
return acc;
|
|
2220
|
+
}, {})
|
|
2221
|
+
], doc);
|
|
2222
|
+
};
|
|
2223
|
+
|
|
2224
|
+
var lib$3 = {
|
|
2225
|
+
entries: entries$2,
|
|
2226
|
+
map: map$3,
|
|
2227
|
+
filter: filter,
|
|
2228
|
+
reduce: reduce$2,
|
|
2229
|
+
some: some,
|
|
2230
|
+
every: every,
|
|
2231
|
+
pipeline: pipeline$1,
|
|
2232
|
+
all: all,
|
|
2233
|
+
allValues: allValues
|
|
2234
|
+
};
|
|
2369
2235
|
|
|
2370
2236
|
var moo$1 = {exports: {}};
|
|
2371
2237
|
|
|
@@ -3206,7 +3072,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3206
3072
|
const stringify$1 = stringify_1;
|
|
3207
3073
|
|
|
3208
3074
|
|
|
3209
|
-
var lib$
|
|
3075
|
+
var lib$2 = { parse: parse$2, stringify: stringify$1 };
|
|
3210
3076
|
|
|
3211
3077
|
var fetch_browser = fetch;
|
|
3212
3078
|
|
|
@@ -3462,10 +3328,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3462
3328
|
|
|
3463
3329
|
var mediaTypes = { addPlugin, parse, getContentType };
|
|
3464
3330
|
|
|
3465
|
-
const curry$
|
|
3466
|
-
const Pact$a = lib$
|
|
3467
|
-
const Json = lib$
|
|
3468
|
-
const JsonPointer = lib$
|
|
3331
|
+
const curry$1 = justCurryIt$1;
|
|
3332
|
+
const Pact$a = lib$3;
|
|
3333
|
+
const Json = lib$2;
|
|
3334
|
+
const JsonPointer = lib$4;
|
|
3469
3335
|
const { jsonTypeOf, resolveUrl: resolveUrl$1, urlFragment, pathRelative } = common$1;
|
|
3470
3336
|
const fetch$1 = fetch_browser;
|
|
3471
3337
|
const Reference$1 = reference;
|
|
@@ -3496,61 +3362,64 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3496
3362
|
// Schema Management
|
|
3497
3363
|
const schemaStore = {};
|
|
3498
3364
|
const schemaStoreAlias = {};
|
|
3499
|
-
const add$1 = (schema, retrievalUri = "", defaultDialectId = "") => {
|
|
3500
|
-
const dialectId = getDialectId(schema, retrievalUri, defaultDialectId);
|
|
3501
|
-
|
|
3502
|
-
const id = getBaseUri(schema, retrievalUri, dialectJsonSchemaVersion[dialectId]);
|
|
3503
|
-
|
|
3504
|
-
// Extract embedded schemas and collect anchors
|
|
3505
|
-
const embeddedToken = getConfig(dialectId, "embeddedToken");
|
|
3506
|
-
const baseToken = getConfig(dialectId, "baseToken");
|
|
3507
|
-
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3508
|
-
const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
|
|
3509
|
-
const jrefToken = getConfig(dialectId, "jrefToken");
|
|
3510
|
-
|
|
3511
|
-
const dynamicAnchors = {};
|
|
3512
|
-
const anchors = { "": "" };
|
|
3513
|
-
|
|
3514
|
-
schema = Json.parse(JSON.stringify(schema), (key, value, pointer) => {
|
|
3515
|
-
if (jsonTypeOf(value, "object")) {
|
|
3516
|
-
// Embedded Schema
|
|
3517
|
-
const embeddedSchemaDialectId = typeof value.$schema === "string" ? resolveUrl$1(value.$schema, "") : dialectId;
|
|
3518
|
-
const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
|
|
3519
|
-
const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
|
|
3520
|
-
if (typeof value[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || value[embeddedEmbeddedToken][0] !== "#") && pointer !== "") {
|
|
3521
|
-
const embeddedRetrievalUri = resolveUrl$1(id, value[embeddedEmbeddedToken]);
|
|
3522
|
-
add$1(value, embeddedRetrievalUri, dialectId);
|
|
3523
|
-
return Reference$1.cons(value[embeddedEmbeddedToken], value);
|
|
3524
|
-
}
|
|
3525
3365
|
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3366
|
+
const add$1 = (schema, url = "", defaultSchemaVersion = "") => {
|
|
3367
|
+
schema = JSON.parse(JSON.stringify(schema));
|
|
3368
|
+
const externalId = resolveUrl$1(url, "");
|
|
3529
3369
|
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3370
|
+
// Dialect / JSON Schema Version
|
|
3371
|
+
const dialectId = resolveUrl$1(schema["$schema"] || defaultSchemaVersion, "");
|
|
3372
|
+
if (!dialectId) {
|
|
3373
|
+
throw Error("Couldn't determine schema dialect");
|
|
3374
|
+
}
|
|
3375
|
+
delete schema["$schema"];
|
|
3535
3376
|
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3377
|
+
// Determine JSON Schema version
|
|
3378
|
+
if (!(dialectId in dialectJsonSchemaVersion)) {
|
|
3379
|
+
if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) {
|
|
3380
|
+
// Self describing 2019-09 meta-schema
|
|
3381
|
+
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3382
|
+
} else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) {
|
|
3383
|
+
// Self describing 2020-12 meta-schema
|
|
3384
|
+
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3385
|
+
} else {
|
|
3386
|
+
// Need to look at meta-schema to determine version
|
|
3387
|
+
const metaSchema = schemaStore[dialectId];
|
|
3388
|
+
if (!metaSchema) {
|
|
3389
|
+
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
|
|
3390
|
+
} else if (metaSchema.vocabulary[core201909Id] === true) {
|
|
3391
|
+
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3392
|
+
} else if (metaSchema.vocabulary[core202012Id] === true) {
|
|
3393
|
+
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3394
|
+
} else {
|
|
3395
|
+
// Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
|
|
3396
|
+
dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
|
|
3540
3397
|
}
|
|
3541
3398
|
}
|
|
3399
|
+
}
|
|
3542
3400
|
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3401
|
+
// Internal Identifier
|
|
3402
|
+
const [id, fragment] = getSchemaIdentifier(schema, externalId, dialectJsonSchemaVersion[dialectId]);
|
|
3403
|
+
if (!id) {
|
|
3404
|
+
throw Error("Couldn't determine an identifier for the schema");
|
|
3405
|
+
}
|
|
3406
|
+
const baseToken = getConfig(dialectId, "baseToken");
|
|
3548
3407
|
delete schema[baseToken];
|
|
3408
|
+
if (externalId) {
|
|
3409
|
+
schemaStoreAlias[externalId] = id;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3413
|
+
if (fragment && baseToken === anchorToken) {
|
|
3414
|
+
schema[anchorToken] = anchorToken !== baseToken ? encodeURI(fragment) : `#${encodeURI(fragment)}`;
|
|
3415
|
+
}
|
|
3549
3416
|
|
|
3550
3417
|
// recursiveAnchor
|
|
3418
|
+
const dynamicAnchors = {};
|
|
3551
3419
|
const recursiveAnchorToken = getConfig(dialectId, "recursiveAnchorToken");
|
|
3552
3420
|
if (schema[recursiveAnchorToken] === true) {
|
|
3553
3421
|
dynamicAnchors[""] = `${id}#`;
|
|
3422
|
+
schema[anchorToken] = "";
|
|
3554
3423
|
delete schema[recursiveAnchorToken];
|
|
3555
3424
|
}
|
|
3556
3425
|
|
|
@@ -3565,66 +3434,69 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3565
3434
|
}
|
|
3566
3435
|
|
|
3567
3436
|
// Store Schema
|
|
3437
|
+
const anchors = { "": "" };
|
|
3568
3438
|
schemaStore[id] = {
|
|
3569
|
-
id,
|
|
3570
|
-
dialectId,
|
|
3571
|
-
schema,
|
|
3572
|
-
anchors,
|
|
3573
|
-
dynamicAnchors,
|
|
3574
|
-
vocabulary,
|
|
3439
|
+
id: id,
|
|
3440
|
+
dialectId: dialectId,
|
|
3441
|
+
schema: processSchema(schema, id, dialectId, JsonPointer.nil, anchors, dynamicAnchors),
|
|
3442
|
+
anchors: anchors,
|
|
3443
|
+
dynamicAnchors: dynamicAnchors,
|
|
3444
|
+
vocabulary: vocabulary,
|
|
3575
3445
|
validated: false
|
|
3576
3446
|
};
|
|
3577
|
-
if (id === "https://example.com/schema/root") {
|
|
3578
|
-
console.log(Object.keys(schemaStore).filter((id) => !/json-schema\.org/.test(id)));
|
|
3579
|
-
}
|
|
3580
3447
|
|
|
3581
|
-
|
|
3582
|
-
schemaStoreAlias[resolveUrl$1(retrievalUri, "")] = id;
|
|
3583
|
-
}
|
|
3448
|
+
return id;
|
|
3584
3449
|
};
|
|
3585
3450
|
|
|
3586
|
-
const
|
|
3587
|
-
const
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3451
|
+
const getSchemaIdentifier = (schema, externalId, jsonSchemaVersion) => {
|
|
3452
|
+
const baseToken = config[jsonSchemaVersion]?.["baseToken"];
|
|
3453
|
+
const internalUrl = resolveUrl$1(externalId, schema[baseToken] || "");
|
|
3454
|
+
return [resolveUrl$1(internalUrl, ""), urlFragment(internalUrl)];
|
|
3455
|
+
};
|
|
3456
|
+
|
|
3457
|
+
const processSchema = (subject, id, dialectId, pointer, anchors, dynamicAnchors) => {
|
|
3458
|
+
if (jsonTypeOf(subject, "object")) {
|
|
3459
|
+
const embeddedSchemaDialectId = typeof subject.$schema === "string" ? resolveUrl$1(subject.$schema, "") : dialectId;
|
|
3460
|
+
const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
|
|
3461
|
+
const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
|
|
3462
|
+
if (typeof subject[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || subject[embeddedEmbeddedToken][0] !== "#")) {
|
|
3463
|
+
const ref = resolveUrl$1(id, subject[embeddedEmbeddedToken]);
|
|
3464
|
+
const embeddedBaseToken = getConfig(embeddedSchemaDialectId, "baseToken");
|
|
3465
|
+
subject[embeddedBaseToken] = ref;
|
|
3466
|
+
add$1(subject, ref, dialectId);
|
|
3467
|
+
return Reference$1.cons(subject[embeddedEmbeddedToken], subject);
|
|
3468
|
+
}
|
|
3591
3469
|
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
if (
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
// Self describing 2020-12 meta-schema
|
|
3599
|
-
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3600
|
-
} else {
|
|
3601
|
-
// Need to look at meta-schema to determine version
|
|
3602
|
-
const metaSchema = schemaStore[dialectId];
|
|
3603
|
-
if (!metaSchema) {
|
|
3604
|
-
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
|
|
3605
|
-
} else if (metaSchema.vocabulary[core201909Id] === true) {
|
|
3606
|
-
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3607
|
-
} else if (metaSchema.vocabulary[core202012Id] === true) {
|
|
3608
|
-
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3609
|
-
} else {
|
|
3610
|
-
// Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
|
|
3611
|
-
dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
|
|
3612
|
-
}
|
|
3470
|
+
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3471
|
+
const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
|
|
3472
|
+
if (typeof subject[dynamicAnchorToken] === "string") {
|
|
3473
|
+
dynamicAnchors[subject[dynamicAnchorToken]] = `${id}#${encodeURI(pointer)}`;
|
|
3474
|
+
anchors[subject[dynamicAnchorToken]] = pointer;
|
|
3475
|
+
delete subject[dynamicAnchorToken];
|
|
3613
3476
|
}
|
|
3614
|
-
}
|
|
3615
3477
|
|
|
3616
|
-
|
|
3617
|
-
|
|
3478
|
+
const embeddedToken = getConfig(dialectId, "embeddedToken");
|
|
3479
|
+
if (typeof subject[anchorToken] === "string") {
|
|
3480
|
+
const anchor = anchorToken !== embeddedToken ? subject[anchorToken] : subject[anchorToken].slice(1);
|
|
3481
|
+
anchors[anchor] = pointer;
|
|
3482
|
+
delete subject[anchorToken];
|
|
3483
|
+
}
|
|
3618
3484
|
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
if (!baseUri) {
|
|
3624
|
-
throw Error("Couldn't determine an identifier for the schema");
|
|
3625
|
-
}
|
|
3485
|
+
const jrefToken = getConfig(dialectId, "jrefToken");
|
|
3486
|
+
if (typeof subject[jrefToken] === "string") {
|
|
3487
|
+
return Reference$1.cons(subject[jrefToken], subject);
|
|
3488
|
+
}
|
|
3626
3489
|
|
|
3627
|
-
|
|
3490
|
+
for (const key in subject) {
|
|
3491
|
+
subject[key] = processSchema(subject[key], id, dialectId, JsonPointer.append(key, pointer), anchors, dynamicAnchors);
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
return subject;
|
|
3495
|
+
} else if (Array.isArray(subject)) {
|
|
3496
|
+
return subject.map((item, ndx) => processSchema(item, id, dialectId, JsonPointer.append(ndx, pointer), anchors, dynamicAnchors));
|
|
3497
|
+
} else {
|
|
3498
|
+
return subject;
|
|
3499
|
+
}
|
|
3628
3500
|
};
|
|
3629
3501
|
|
|
3630
3502
|
const hasStoredSchema = (id) => id in schemaStore || id in schemaStoreAlias;
|
|
@@ -3718,14 +3590,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3718
3590
|
|
|
3719
3591
|
const keys = (doc) => Object.keys(value(doc));
|
|
3720
3592
|
|
|
3721
|
-
const entries
|
|
3593
|
+
const entries = (doc) => Pact$a.pipeline([
|
|
3722
3594
|
value,
|
|
3723
3595
|
Object.keys,
|
|
3724
3596
|
Pact$a.map(async (key) => [key, await step(key, doc)]),
|
|
3725
3597
|
Pact$a.all
|
|
3726
3598
|
], doc);
|
|
3727
3599
|
|
|
3728
|
-
const map
|
|
3600
|
+
const map = curry$1((fn, doc) => Pact$a.pipeline([
|
|
3729
3601
|
value,
|
|
3730
3602
|
Pact$a.map(async (item, ndx) => fn(await step(ndx, doc), ndx)),
|
|
3731
3603
|
Pact$a.all
|
|
@@ -3800,7 +3672,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3800
3672
|
var schema$5 = {
|
|
3801
3673
|
setConfig, getConfig,
|
|
3802
3674
|
add: add$1, get, markValidated,
|
|
3803
|
-
uri, value, getAnchorPointer, typeOf, has, step, keys, entries
|
|
3675
|
+
uri, value, getAnchorPointer, typeOf, has, step, keys, entries, map, length,
|
|
3804
3676
|
toSchema
|
|
3805
3677
|
};
|
|
3806
3678
|
|
|
@@ -3814,19 +3686,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3814
3686
|
|
|
3815
3687
|
var invalidSchemaError = InvalidSchemaError$3;
|
|
3816
3688
|
|
|
3817
|
-
const Schema$
|
|
3689
|
+
const Schema$P = schema$5;
|
|
3818
3690
|
|
|
3819
3691
|
|
|
3820
|
-
const compile$
|
|
3821
|
-
const interpret$
|
|
3692
|
+
const compile$M = (schema) => Schema$P.value(schema);
|
|
3693
|
+
const interpret$M = () => true;
|
|
3822
3694
|
|
|
3823
|
-
var metaData$4 = { compile: compile$
|
|
3695
|
+
var metaData$4 = { compile: compile$M, interpret: interpret$M };
|
|
3824
3696
|
|
|
3825
|
-
const curry
|
|
3697
|
+
const curry = justCurryIt$1;
|
|
3826
3698
|
const PubSub$1 = pubsub.exports;
|
|
3827
3699
|
const { resolveUrl } = common$1;
|
|
3828
|
-
const Instance$
|
|
3829
|
-
const Schema$
|
|
3700
|
+
const Instance$C = instance;
|
|
3701
|
+
const Schema$O = schema$5;
|
|
3830
3702
|
const InvalidSchemaError$2 = invalidSchemaError;
|
|
3831
3703
|
const MediaTypes = mediaTypes;
|
|
3832
3704
|
const metaData$3 = metaData$4;
|
|
@@ -3846,19 +3718,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3846
3718
|
});
|
|
3847
3719
|
|
|
3848
3720
|
const validate$2 = async (schema, value = undefined, outputFormat = undefined) => {
|
|
3849
|
-
const compiled = await compile$
|
|
3850
|
-
const interpretAst = (value, outputFormat) => interpret$
|
|
3721
|
+
const compiled = await compile$L(schema);
|
|
3722
|
+
const interpretAst = (value, outputFormat) => interpret$L(compiled, Instance$C.cons(value), outputFormat);
|
|
3851
3723
|
|
|
3852
3724
|
return value === undefined ? interpretAst : interpretAst(value, outputFormat);
|
|
3853
3725
|
};
|
|
3854
3726
|
|
|
3855
|
-
const compile$
|
|
3727
|
+
const compile$L = async (schema) => {
|
|
3856
3728
|
const ast = { metaData: {} };
|
|
3857
3729
|
const schemaUri = await compileSchema(schema, ast);
|
|
3858
3730
|
return { ast, schemaUri };
|
|
3859
3731
|
};
|
|
3860
3732
|
|
|
3861
|
-
const interpret$
|
|
3733
|
+
const interpret$L = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
|
|
3862
3734
|
if (![FLAG, BASIC, DETAILED, VERBOSE].includes(outputFormat)) {
|
|
3863
3735
|
throw Error(`The '${outputFormat}' error format is not supported`);
|
|
3864
3736
|
}
|
|
@@ -3933,10 +3805,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3933
3805
|
|
|
3934
3806
|
// Vocabularies
|
|
3935
3807
|
if (!hasKeyword(`${schema.dialectId}#validate`)) {
|
|
3936
|
-
const metaSchema = await Schema$
|
|
3808
|
+
const metaSchema = await Schema$O.get(schema.dialectId);
|
|
3937
3809
|
|
|
3938
3810
|
// Check for mandatory vocabularies
|
|
3939
|
-
const mandatoryVocabularies = Schema$
|
|
3811
|
+
const mandatoryVocabularies = Schema$O.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
|
|
3940
3812
|
mandatoryVocabularies.forEach((vocabularyId) => {
|
|
3941
3813
|
if (!metaSchema.vocabulary[vocabularyId]) {
|
|
3942
3814
|
throw Error(`Vocabulary '${vocabularyId}' must be explicitly declared and required`);
|
|
@@ -3959,17 +3831,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3959
3831
|
|
|
3960
3832
|
// Meta validation
|
|
3961
3833
|
if (shouldMetaValidate && !schema.validated) {
|
|
3962
|
-
Schema$
|
|
3834
|
+
Schema$O.markValidated(schema.id);
|
|
3963
3835
|
|
|
3964
3836
|
// Compile
|
|
3965
3837
|
if (!(schema.dialectId in metaValidators)) {
|
|
3966
|
-
const metaSchema = await Schema$
|
|
3967
|
-
const compiledSchema = await compile$
|
|
3968
|
-
metaValidators[metaSchema.id] = interpret$
|
|
3838
|
+
const metaSchema = await Schema$O.get(schema.dialectId);
|
|
3839
|
+
const compiledSchema = await compile$L(metaSchema);
|
|
3840
|
+
metaValidators[metaSchema.id] = interpret$L(compiledSchema);
|
|
3969
3841
|
}
|
|
3970
3842
|
|
|
3971
3843
|
// Interpret
|
|
3972
|
-
const schemaInstance = Instance$
|
|
3844
|
+
const schemaInstance = Instance$C.cons(schema.schema, schema.id);
|
|
3973
3845
|
const metaResults = metaValidators[schema.dialectId](schemaInstance, metaOutputFormat);
|
|
3974
3846
|
if (!metaResults.valid) {
|
|
3975
3847
|
throw new InvalidSchemaError$2(metaResults);
|
|
@@ -3988,7 +3860,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3988
3860
|
};
|
|
3989
3861
|
|
|
3990
3862
|
const followReferences = async (doc) => {
|
|
3991
|
-
return Schema$
|
|
3863
|
+
return Schema$O.typeOf(doc, "string") ? followReferences(await Schema$O.get(Schema$O.value(doc), doc)) : doc;
|
|
3992
3864
|
};
|
|
3993
3865
|
|
|
3994
3866
|
const interpretSchema = (schemaUri, instance, ast, dynamicAnchors) => {
|
|
@@ -4016,45 +3888,45 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4016
3888
|
};
|
|
4017
3889
|
|
|
4018
3890
|
const add = (schema, url = "", defaultSchemaVersion = "") => {
|
|
4019
|
-
const id = Schema$
|
|
3891
|
+
const id = Schema$O.add(schema, url, defaultSchemaVersion);
|
|
4020
3892
|
delete metaValidators[id];
|
|
4021
3893
|
};
|
|
4022
3894
|
|
|
4023
3895
|
var core$2 = {
|
|
4024
|
-
validate: validate$2, compile: compile$
|
|
3896
|
+
validate: validate$2, compile: compile$L, interpret: interpret$L,
|
|
4025
3897
|
setMetaOutputFormat, setShouldMetaValidate, FLAG, BASIC, DETAILED, VERBOSE,
|
|
4026
3898
|
add, getKeyword, hasKeyword, defineVocabulary,
|
|
4027
3899
|
compileSchema, interpretSchema, collectEvaluatedProperties: collectEvaluatedProperties$e, collectEvaluatedItems: collectEvaluatedItems$f,
|
|
4028
3900
|
addMediaTypePlugin: MediaTypes.addPlugin
|
|
4029
3901
|
};
|
|
4030
3902
|
|
|
4031
|
-
const Pact$9 = lib$
|
|
3903
|
+
const Pact$9 = lib$3;
|
|
4032
3904
|
const PubSub = pubsub.exports;
|
|
4033
3905
|
const Core$x = core$2;
|
|
4034
|
-
const Instance$
|
|
4035
|
-
const Schema$
|
|
3906
|
+
const Instance$B = instance;
|
|
3907
|
+
const Schema$N = schema$5;
|
|
4036
3908
|
|
|
4037
3909
|
|
|
4038
|
-
const compile$
|
|
4039
|
-
const url = Schema$
|
|
3910
|
+
const compile$K = async (schema, ast) => {
|
|
3911
|
+
const url = Schema$N.uri(schema);
|
|
4040
3912
|
if (!(url in ast)) {
|
|
4041
3913
|
ast[url] = false; // Place dummy entry in ast to avoid recursive loops
|
|
4042
3914
|
|
|
4043
|
-
const schemaValue = Schema$
|
|
3915
|
+
const schemaValue = Schema$N.value(schema);
|
|
4044
3916
|
if (!["object", "boolean"].includes(typeof schemaValue)) {
|
|
4045
|
-
throw Error(`No schema found at '${Schema$
|
|
3917
|
+
throw Error(`No schema found at '${Schema$N.uri(schema)}'`);
|
|
4046
3918
|
}
|
|
4047
3919
|
|
|
4048
3920
|
ast[url] = [
|
|
4049
3921
|
`${schema.dialectId}#validate`,
|
|
4050
|
-
Schema$
|
|
3922
|
+
Schema$N.uri(schema),
|
|
4051
3923
|
typeof schemaValue === "boolean" ? schemaValue : await Pact$9.pipeline([
|
|
4052
|
-
Schema$
|
|
3924
|
+
Schema$N.entries,
|
|
4053
3925
|
Pact$9.map(([keyword, keywordSchema]) => [`${schema.dialectId}#${keyword}`, keywordSchema]),
|
|
4054
3926
|
Pact$9.filter(([keywordId]) => keywordId !== `${schema.dialectId}#validate`),
|
|
4055
3927
|
Pact$9.map(async ([keywordId, keywordSchema]) => {
|
|
4056
3928
|
const keywordAst = await Core$x.getKeyword(keywordId).compile(keywordSchema, ast, schema);
|
|
4057
|
-
return [keywordId, Schema$
|
|
3929
|
+
return [keywordId, Schema$N.uri(keywordSchema), keywordAst];
|
|
4058
3930
|
}),
|
|
4059
3931
|
Pact$9.all
|
|
4060
3932
|
], schema)
|
|
@@ -4064,7 +3936,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4064
3936
|
return url;
|
|
4065
3937
|
};
|
|
4066
3938
|
|
|
4067
|
-
const interpret$
|
|
3939
|
+
const interpret$K = (uri, instance, ast, dynamicAnchors) => {
|
|
4068
3940
|
const [keywordId, schemaUrl, nodes] = ast[uri];
|
|
4069
3941
|
|
|
4070
3942
|
PubSub.publishSync("result.start");
|
|
@@ -4076,7 +3948,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4076
3948
|
PubSub.publishSync("result", {
|
|
4077
3949
|
keyword: keywordId,
|
|
4078
3950
|
absoluteKeywordLocation: schemaUrl,
|
|
4079
|
-
instanceLocation: Instance$
|
|
3951
|
+
instanceLocation: Instance$B.uri(instance),
|
|
4080
3952
|
valid: isValid,
|
|
4081
3953
|
ast: keywordValue
|
|
4082
3954
|
});
|
|
@@ -4087,7 +3959,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4087
3959
|
PubSub.publishSync("result", {
|
|
4088
3960
|
keyword: keywordId,
|
|
4089
3961
|
absoluteKeywordLocation: schemaUrl,
|
|
4090
|
-
instanceLocation: Instance$
|
|
3962
|
+
instanceLocation: Instance$B.uri(instance),
|
|
4091
3963
|
valid: isValid,
|
|
4092
3964
|
ast: uri
|
|
4093
3965
|
});
|
|
@@ -4125,7 +3997,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4125
3997
|
}, new Set());
|
|
4126
3998
|
};
|
|
4127
3999
|
|
|
4128
|
-
var validate$1 = { compile: compile$
|
|
4000
|
+
var validate$1 = { compile: compile$K, interpret: interpret$K, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
|
|
4129
4001
|
|
|
4130
4002
|
const metaData$2 = metaData$4;
|
|
4131
4003
|
const validate = validate$1;
|
|
@@ -4134,90 +4006,90 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4134
4006
|
var keywords$6 = { metaData: metaData$2, validate };
|
|
4135
4007
|
|
|
4136
4008
|
const Core$w = core$2;
|
|
4137
|
-
const Schema$
|
|
4138
|
-
const Instance$
|
|
4009
|
+
const Schema$M = schema$5;
|
|
4010
|
+
const Instance$A = instance;
|
|
4139
4011
|
const Reference = reference;
|
|
4140
4012
|
const Keywords$2 = keywords$6;
|
|
4141
4013
|
const InvalidSchemaError$1 = invalidSchemaError;
|
|
4142
4014
|
|
|
4143
4015
|
|
|
4144
|
-
var lib$
|
|
4016
|
+
var lib$1 = { Core: Core$w, Schema: Schema$M, Instance: Instance$A, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
|
|
4145
4017
|
|
|
4146
|
-
const { Core: Core$v, Schema: Schema$
|
|
4018
|
+
const { Core: Core$v, Schema: Schema$L, Instance: Instance$z } = lib$1;
|
|
4147
4019
|
|
|
4148
4020
|
|
|
4149
|
-
const compile$
|
|
4150
|
-
const items = await Schema$
|
|
4151
|
-
const numberOfItems = Schema$
|
|
4021
|
+
const compile$J = async (schema, ast, parentSchema) => {
|
|
4022
|
+
const items = await Schema$L.step("items", parentSchema);
|
|
4023
|
+
const numberOfItems = Schema$L.typeOf(items, "array") ? Schema$L.length(items) : Number.MAX_SAFE_INTEGER;
|
|
4152
4024
|
|
|
4153
|
-
if (Schema$
|
|
4154
|
-
return [numberOfItems, Schema$
|
|
4025
|
+
if (Schema$L.typeOf(schema, "boolean")) {
|
|
4026
|
+
return [numberOfItems, Schema$L.value(schema)];
|
|
4155
4027
|
} else {
|
|
4156
4028
|
return [numberOfItems, await Core$v.compileSchema(schema, ast)];
|
|
4157
4029
|
}
|
|
4158
4030
|
};
|
|
4159
4031
|
|
|
4160
|
-
const interpret$
|
|
4161
|
-
if (!Instance$
|
|
4032
|
+
const interpret$J = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
|
|
4033
|
+
if (!Instance$z.typeOf(instance, "array")) {
|
|
4162
4034
|
return true;
|
|
4163
4035
|
}
|
|
4164
4036
|
|
|
4165
4037
|
if (typeof additionalItems === "string") {
|
|
4166
|
-
return Instance$
|
|
4038
|
+
return Instance$z.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
|
|
4167
4039
|
} else {
|
|
4168
|
-
return Instance$
|
|
4040
|
+
return Instance$z.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
|
|
4169
4041
|
}
|
|
4170
4042
|
};
|
|
4171
4043
|
|
|
4172
|
-
var additionalItems = { compile: compile$
|
|
4044
|
+
var additionalItems = { compile: compile$J, interpret: interpret$J };
|
|
4173
4045
|
|
|
4174
|
-
const { Core: Core$u, Schema: Schema$
|
|
4046
|
+
const { Core: Core$u, Schema: Schema$K, Instance: Instance$y } = lib$1;
|
|
4175
4047
|
|
|
4176
4048
|
|
|
4177
|
-
const compile$
|
|
4178
|
-
const items = await Schema$
|
|
4179
|
-
const numberOfItems = Schema$
|
|
4049
|
+
const compile$I = async (schema, ast, parentSchema) => {
|
|
4050
|
+
const items = await Schema$K.step("items", parentSchema);
|
|
4051
|
+
const numberOfItems = Schema$K.typeOf(items, "array") ? Schema$K.length(items) : Number.MAX_SAFE_INTEGER;
|
|
4180
4052
|
|
|
4181
4053
|
return [numberOfItems, await Core$u.compileSchema(schema, ast)];
|
|
4182
4054
|
};
|
|
4183
4055
|
|
|
4184
|
-
const interpret$
|
|
4185
|
-
if (!Instance$
|
|
4056
|
+
const interpret$I = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
|
|
4057
|
+
if (!Instance$y.typeOf(instance, "array")) {
|
|
4186
4058
|
return true;
|
|
4187
4059
|
}
|
|
4188
4060
|
|
|
4189
|
-
return Instance$
|
|
4061
|
+
return Instance$y.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
|
|
4190
4062
|
};
|
|
4191
4063
|
|
|
4192
4064
|
const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4193
|
-
return interpret$
|
|
4065
|
+
return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
|
|
4194
4066
|
};
|
|
4195
4067
|
|
|
4196
|
-
var additionalItems6 = { compile: compile$
|
|
4068
|
+
var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
|
|
4197
4069
|
|
|
4198
|
-
const { Core: Core$t, Schema: Schema$
|
|
4070
|
+
const { Core: Core$t, Schema: Schema$J, Instance: Instance$x } = lib$1;
|
|
4199
4071
|
|
|
4200
4072
|
|
|
4201
|
-
const compile$
|
|
4202
|
-
const properties = await Schema$
|
|
4203
|
-
const propertyNames = Schema$
|
|
4073
|
+
const compile$H = async (schema, ast, parentSchema) => {
|
|
4074
|
+
const properties = await Schema$J.step("properties", parentSchema);
|
|
4075
|
+
const propertyNames = Schema$J.typeOf(properties, "object") ? Schema$J.keys(properties) : [];
|
|
4204
4076
|
|
|
4205
|
-
const patternProperties = await Schema$
|
|
4206
|
-
const propertyNamePatterns = Schema$
|
|
4077
|
+
const patternProperties = await Schema$J.step("patternProperties", parentSchema);
|
|
4078
|
+
const propertyNamePatterns = Schema$J.typeOf(patternProperties, "object") ? Schema$J.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
|
|
4207
4079
|
|
|
4208
|
-
if (Schema$
|
|
4209
|
-
return [propertyNames, propertyNamePatterns, Schema$
|
|
4080
|
+
if (Schema$J.typeOf(schema, "boolean")) {
|
|
4081
|
+
return [propertyNames, propertyNamePatterns, Schema$J.value(schema)];
|
|
4210
4082
|
} else {
|
|
4211
4083
|
return [propertyNames, propertyNamePatterns, await Core$t.compileSchema(schema, ast)];
|
|
4212
4084
|
}
|
|
4213
4085
|
};
|
|
4214
4086
|
|
|
4215
|
-
const interpret$
|
|
4216
|
-
if (!Instance$
|
|
4087
|
+
const interpret$H = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
|
|
4088
|
+
if (!Instance$x.typeOf(instance, "object")) {
|
|
4217
4089
|
return true;
|
|
4218
4090
|
}
|
|
4219
4091
|
|
|
4220
|
-
const properties = Instance$
|
|
4092
|
+
const properties = Instance$x.entries(instance)
|
|
4221
4093
|
.filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)));
|
|
4222
4094
|
|
|
4223
4095
|
if (typeof additionalProperties === "string") {
|
|
@@ -4227,168 +4099,47 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4227
4099
|
}
|
|
4228
4100
|
};
|
|
4229
4101
|
|
|
4230
|
-
var additionalProperties = { compile: compile$
|
|
4102
|
+
var additionalProperties = { compile: compile$H, interpret: interpret$H };
|
|
4231
4103
|
|
|
4232
|
-
const { Core: Core$s, Schema: Schema$
|
|
4104
|
+
const { Core: Core$s, Schema: Schema$I, Instance: Instance$w } = lib$1;
|
|
4233
4105
|
|
|
4234
4106
|
|
|
4235
|
-
const compile$
|
|
4236
|
-
const propertiesSchema = await Schema$
|
|
4237
|
-
const propertyNames = Schema$
|
|
4107
|
+
const compile$G = async (schema, ast, parentSchema) => {
|
|
4108
|
+
const propertiesSchema = await Schema$I.step("properties", parentSchema);
|
|
4109
|
+
const propertyNames = Schema$I.typeOf(propertiesSchema, "object") ? Schema$I.keys(propertiesSchema) : [];
|
|
4238
4110
|
|
|
4239
|
-
const patternProperties = await Schema$
|
|
4240
|
-
const propertyNamePatterns = Schema$
|
|
4111
|
+
const patternProperties = await Schema$I.step("patternProperties", parentSchema);
|
|
4112
|
+
const propertyNamePatterns = Schema$I.typeOf(patternProperties, "object") ? Schema$I.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
|
|
4241
4113
|
|
|
4242
4114
|
return [propertyNames, propertyNamePatterns, await Core$s.compileSchema(schema, ast)];
|
|
4243
4115
|
};
|
|
4244
4116
|
|
|
4245
|
-
const interpret$
|
|
4246
|
-
if (!Instance$
|
|
4117
|
+
const interpret$G = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
|
|
4118
|
+
if (!Instance$w.typeOf(instance, "object")) {
|
|
4247
4119
|
return true;
|
|
4248
4120
|
}
|
|
4249
4121
|
|
|
4250
|
-
return Instance$
|
|
4122
|
+
return Instance$w.entries(instance)
|
|
4251
4123
|
.filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)))
|
|
4252
4124
|
.every(([, property]) => Core$s.interpretSchema(additionalProperties, property, ast, dynamicAnchors));
|
|
4253
4125
|
};
|
|
4254
4126
|
|
|
4255
4127
|
const collectEvaluatedProperties$c = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4256
|
-
return interpret$
|
|
4128
|
+
return interpret$G(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
|
|
4257
4129
|
};
|
|
4258
4130
|
|
|
4259
|
-
var additionalProperties6 = { compile: compile$
|
|
4131
|
+
var additionalProperties6 = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$c };
|
|
4260
4132
|
|
|
4261
|
-
|
|
4133
|
+
const { Core: Core$r, Schema: Schema$H } = lib$1;
|
|
4134
|
+
const Pact$8 = lib$3;
|
|
4262
4135
|
|
|
4263
|
-
var justCurryIt = curry$6;
|
|
4264
4136
|
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
return a + b + c;
|
|
4268
|
-
}
|
|
4269
|
-
curry(add)(1)(2)(3); // 6
|
|
4270
|
-
curry(add)(1)(2)(2); // 5
|
|
4271
|
-
curry(add)(2)(4, 3); // 9
|
|
4272
|
-
|
|
4273
|
-
function add(...args) {
|
|
4274
|
-
return args.reduce((sum, n) => sum + n, 0)
|
|
4275
|
-
}
|
|
4276
|
-
var curryAdd4 = curry(add, 4)
|
|
4277
|
-
curryAdd4(1)(2, 3)(4); // 10
|
|
4278
|
-
|
|
4279
|
-
function converter(ratio, input) {
|
|
4280
|
-
return (input*ratio).toFixed(1);
|
|
4281
|
-
}
|
|
4282
|
-
const curriedConverter = curry(converter)
|
|
4283
|
-
const milesToKm = curriedConverter(1.62);
|
|
4284
|
-
milesToKm(35); // 56.7
|
|
4285
|
-
milesToKm(10); // 16.2
|
|
4286
|
-
*/
|
|
4287
|
-
|
|
4288
|
-
function curry$6(fn, arity) {
|
|
4289
|
-
return function curried() {
|
|
4290
|
-
if (arity == null) {
|
|
4291
|
-
arity = fn.length;
|
|
4292
|
-
}
|
|
4293
|
-
var args = [].slice.call(arguments);
|
|
4294
|
-
if (args.length >= arity) {
|
|
4295
|
-
return fn.apply(this, args);
|
|
4296
|
-
} else {
|
|
4297
|
-
return function() {
|
|
4298
|
-
return curried.apply(this, args.concat([].slice.call(arguments)));
|
|
4299
|
-
};
|
|
4300
|
-
}
|
|
4301
|
-
};
|
|
4302
|
-
}
|
|
4303
|
-
|
|
4304
|
-
const curry$5 = justCurryIt;
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
var map$2 = curry$5(async (fn, doc) => (await doc).map(fn));
|
|
4308
|
-
|
|
4309
|
-
const curry$4 = justCurryIt;
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
var reduce$2 = curry$4(async (fn, acc, doc) => {
|
|
4313
|
-
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
4314
|
-
});
|
|
4315
|
-
|
|
4316
|
-
const curry$3 = justCurryIt;
|
|
4317
|
-
const reduce$1 = reduce$2;
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
var filter = curry$3(async (fn, doc, options = {}) => {
|
|
4321
|
-
return reduce$1(async (acc, item) => {
|
|
4322
|
-
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
4323
|
-
}, [], doc, options);
|
|
4324
|
-
});
|
|
4325
|
-
|
|
4326
|
-
const curry$2 = justCurryIt;
|
|
4327
|
-
const map$1 = map$2;
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
var some = curry$2(async (fn, doc) => {
|
|
4331
|
-
const results = await map$1(fn, doc);
|
|
4332
|
-
return (await Promise.all(results))
|
|
4333
|
-
.some((a) => a);
|
|
4334
|
-
});
|
|
4335
|
-
|
|
4336
|
-
const curry$1 = justCurryIt;
|
|
4337
|
-
const map = map$2;
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
var every = curry$1(async (fn, doc) => {
|
|
4341
|
-
const results = await map(fn, doc);
|
|
4342
|
-
return (await Promise.all(results))
|
|
4343
|
-
.every((a) => a);
|
|
4344
|
-
});
|
|
4345
|
-
|
|
4346
|
-
const curry = justCurryIt;
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
var pipeline$1 = curry((fns, doc) => {
|
|
4350
|
-
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
4351
|
-
});
|
|
4352
|
-
|
|
4353
|
-
var all = (doc) => Promise.all(doc);
|
|
4354
|
-
|
|
4355
|
-
const pipeline = pipeline$1;
|
|
4356
|
-
const entries = entries$1;
|
|
4357
|
-
const reduce = reduce$2;
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
var allValues = (doc) => {
|
|
4361
|
-
return pipeline([
|
|
4362
|
-
entries,
|
|
4363
|
-
reduce(async (acc, [propertyName, propertyValue]) => {
|
|
4364
|
-
acc[propertyName] = await propertyValue;
|
|
4365
|
-
return acc;
|
|
4366
|
-
}, {})
|
|
4367
|
-
], doc);
|
|
4368
|
-
};
|
|
4369
|
-
|
|
4370
|
-
var lib$1 = {
|
|
4371
|
-
entries: entries$1,
|
|
4372
|
-
map: map$2,
|
|
4373
|
-
filter: filter,
|
|
4374
|
-
reduce: reduce$2,
|
|
4375
|
-
some: some,
|
|
4376
|
-
every: every,
|
|
4377
|
-
pipeline: pipeline$1,
|
|
4378
|
-
all: all,
|
|
4379
|
-
allValues: allValues
|
|
4380
|
-
};
|
|
4381
|
-
|
|
4382
|
-
const { Core: Core$r, Schema: Schema$J } = lib$2;
|
|
4383
|
-
const Pact$8 = lib$1;
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
const compile$H = (schema, ast) => Pact$8.pipeline([
|
|
4387
|
-
Schema$J.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
|
|
4137
|
+
const compile$F = (schema, ast) => Pact$8.pipeline([
|
|
4138
|
+
Schema$H.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
|
|
4388
4139
|
Pact$8.all
|
|
4389
4140
|
], schema);
|
|
4390
4141
|
|
|
4391
|
-
const interpret$
|
|
4142
|
+
const interpret$F = (allOf, instance, ast, dynamicAnchors) => {
|
|
4392
4143
|
return allOf.every((schemaUrl) => Core$r.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
|
|
4393
4144
|
};
|
|
4394
4145
|
|
|
@@ -4406,18 +4157,18 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4406
4157
|
}, new Set());
|
|
4407
4158
|
};
|
|
4408
4159
|
|
|
4409
|
-
var allOf = { compile: compile$
|
|
4160
|
+
var allOf = { compile: compile$F, interpret: interpret$F, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
|
|
4410
4161
|
|
|
4411
|
-
const { Core: Core$q, Schema: Schema$
|
|
4412
|
-
const Pact$7 = lib$
|
|
4162
|
+
const { Core: Core$q, Schema: Schema$G } = lib$1;
|
|
4163
|
+
const Pact$7 = lib$3;
|
|
4413
4164
|
|
|
4414
4165
|
|
|
4415
|
-
const compile$
|
|
4416
|
-
Schema$
|
|
4166
|
+
const compile$E = (schema, ast) => Pact$7.pipeline([
|
|
4167
|
+
Schema$G.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
|
|
4417
4168
|
Pact$7.all
|
|
4418
4169
|
], schema);
|
|
4419
4170
|
|
|
4420
|
-
const interpret$
|
|
4171
|
+
const interpret$E = (anyOf, instance, ast, dynamicAnchors) => {
|
|
4421
4172
|
const matches = anyOf.filter((schemaUrl) => Core$q.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
|
|
4422
4173
|
return matches.length > 0;
|
|
4423
4174
|
};
|
|
@@ -4436,7 +4187,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4436
4187
|
}, false);
|
|
4437
4188
|
};
|
|
4438
4189
|
|
|
4439
|
-
var anyOf = { compile: compile$
|
|
4190
|
+
var anyOf = { compile: compile$E, interpret: interpret$E, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
|
|
4440
4191
|
|
|
4441
4192
|
var keyList = Object.keys;
|
|
4442
4193
|
var native_stringify = JSON.stringify;
|
|
@@ -4497,92 +4248,92 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4497
4248
|
|
|
4498
4249
|
var fastestStableStringify = function(obj) { return '' + stringify(obj, false); };
|
|
4499
4250
|
|
|
4500
|
-
const { Schema: Schema$
|
|
4251
|
+
const { Schema: Schema$F, Instance: Instance$v } = lib$1;
|
|
4501
4252
|
const jsonStringify$2 = fastestStableStringify;
|
|
4502
4253
|
|
|
4503
4254
|
|
|
4504
|
-
const compile$
|
|
4505
|
-
const interpret$
|
|
4255
|
+
const compile$D = (schema) => jsonStringify$2(Schema$F.value(schema));
|
|
4256
|
+
const interpret$D = (const_, instance) => jsonStringify$2(Instance$v.value(instance)) === const_;
|
|
4506
4257
|
|
|
4507
|
-
var _const = { compile: compile$
|
|
4258
|
+
var _const = { compile: compile$D, interpret: interpret$D };
|
|
4508
4259
|
|
|
4509
|
-
const { Core: Core$p, Instance: Instance$
|
|
4260
|
+
const { Core: Core$p, Instance: Instance$u } = lib$1;
|
|
4510
4261
|
|
|
4511
4262
|
|
|
4512
|
-
const compile$
|
|
4263
|
+
const compile$C = (schema, ast) => Core$p.compileSchema(schema, ast);
|
|
4513
4264
|
|
|
4514
|
-
const interpret$
|
|
4515
|
-
return !Instance$
|
|
4265
|
+
const interpret$C = (contains, instance, ast, dynamicAnchors) => {
|
|
4266
|
+
return !Instance$u.typeOf(instance, "array") || Instance$u.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
|
|
4516
4267
|
};
|
|
4517
4268
|
|
|
4518
|
-
var contains = { compile: compile$
|
|
4269
|
+
var contains = { compile: compile$C, interpret: interpret$C };
|
|
4519
4270
|
|
|
4520
|
-
const { Core: Core$o, Schema: Schema$
|
|
4271
|
+
const { Core: Core$o, Schema: Schema$E, Instance: Instance$t } = lib$1;
|
|
4521
4272
|
|
|
4522
4273
|
|
|
4523
|
-
const compile$
|
|
4274
|
+
const compile$B = async (schema, ast, parentSchema) => {
|
|
4524
4275
|
const contains = await Core$o.compileSchema(schema, ast);
|
|
4525
4276
|
|
|
4526
|
-
const minContainsSchema = await Schema$
|
|
4527
|
-
const minContains = Schema$
|
|
4277
|
+
const minContainsSchema = await Schema$E.step("minContains", parentSchema);
|
|
4278
|
+
const minContains = Schema$E.typeOf(minContainsSchema, "number") ? Schema$E.value(minContainsSchema) : 1;
|
|
4528
4279
|
|
|
4529
|
-
const maxContainsSchema = await Schema$
|
|
4530
|
-
const maxContains = Schema$
|
|
4280
|
+
const maxContainsSchema = await Schema$E.step("maxContains", parentSchema);
|
|
4281
|
+
const maxContains = Schema$E.typeOf(maxContainsSchema, "number") ? Schema$E.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
|
|
4531
4282
|
|
|
4532
4283
|
return { contains, minContains, maxContains };
|
|
4533
4284
|
};
|
|
4534
4285
|
|
|
4535
|
-
const interpret$
|
|
4536
|
-
if (!Instance$
|
|
4286
|
+
const interpret$B = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
|
|
4287
|
+
if (!Instance$t.typeOf(instance, "array")) {
|
|
4537
4288
|
return true;
|
|
4538
4289
|
}
|
|
4539
4290
|
|
|
4540
|
-
const matches = Instance$
|
|
4291
|
+
const matches = Instance$t.reduce((matches, item) => {
|
|
4541
4292
|
return Core$o.interpretSchema(contains, item, ast, dynamicAnchors) ? matches + 1 : matches;
|
|
4542
4293
|
}, 0, instance);
|
|
4543
4294
|
return matches >= minContains && matches <= maxContains;
|
|
4544
4295
|
};
|
|
4545
4296
|
|
|
4546
4297
|
const collectEvaluatedItems$a = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4547
|
-
return interpret$
|
|
4298
|
+
return interpret$B(keywordValue, instance, ast, dynamicAnchors) && Instance$t.reduce((matchedIndexes, item, itemIndex) => {
|
|
4548
4299
|
return Core$o.interpretSchema(keywordValue.contains, item, ast, dynamicAnchors) ? matchedIndexes.add(itemIndex) : matchedIndexes;
|
|
4549
4300
|
}, new Set(), instance);
|
|
4550
4301
|
};
|
|
4551
4302
|
|
|
4552
|
-
var containsMinContainsMaxContains = { compile: compile$
|
|
4303
|
+
var containsMinContainsMaxContains = { compile: compile$B, interpret: interpret$B, collectEvaluatedItems: collectEvaluatedItems$a };
|
|
4553
4304
|
|
|
4554
|
-
const { Core: Core$n, Schema: Schema$
|
|
4555
|
-
const Pact$6 = lib$
|
|
4305
|
+
const { Core: Core$n, Schema: Schema$D } = lib$1;
|
|
4306
|
+
const Pact$6 = lib$3;
|
|
4556
4307
|
|
|
4557
4308
|
|
|
4558
|
-
const compile$
|
|
4309
|
+
const compile$A = async (schema, ast) => {
|
|
4559
4310
|
await Pact$6.pipeline([
|
|
4560
|
-
Schema$
|
|
4311
|
+
Schema$D.entries,
|
|
4561
4312
|
Pact$6.map(([, definitionSchema]) => Core$n.compileSchema(definitionSchema, ast)),
|
|
4562
4313
|
Pact$6.all
|
|
4563
4314
|
], schema);
|
|
4564
4315
|
};
|
|
4565
4316
|
|
|
4566
|
-
const interpret$
|
|
4317
|
+
const interpret$A = () => true;
|
|
4567
4318
|
|
|
4568
|
-
var definitions = { compile: compile$
|
|
4319
|
+
var definitions = { compile: compile$A, interpret: interpret$A };
|
|
4569
4320
|
|
|
4570
|
-
const { Core: Core$m, Schema: Schema$
|
|
4571
|
-
const Pact$5 = lib$
|
|
4321
|
+
const { Core: Core$m, Schema: Schema$C, Instance: Instance$s } = lib$1;
|
|
4322
|
+
const Pact$5 = lib$3;
|
|
4572
4323
|
|
|
4573
4324
|
|
|
4574
|
-
const compile$
|
|
4575
|
-
Schema$
|
|
4325
|
+
const compile$z = (schema, ast) => Pact$5.pipeline([
|
|
4326
|
+
Schema$C.entries,
|
|
4576
4327
|
Pact$5.map(async ([key, dependency]) => {
|
|
4577
|
-
return [key, Schema$
|
|
4328
|
+
return [key, Schema$C.typeOf(dependency, "array") ? Schema$C.value(dependency) : await Core$m.compileSchema(dependency, ast)];
|
|
4578
4329
|
}),
|
|
4579
4330
|
Pact$5.all
|
|
4580
4331
|
], schema);
|
|
4581
4332
|
|
|
4582
|
-
const interpret$
|
|
4583
|
-
const value = Instance$
|
|
4333
|
+
const interpret$z = (dependencies, instance, ast, dynamicAnchors) => {
|
|
4334
|
+
const value = Instance$s.value(instance);
|
|
4584
4335
|
|
|
4585
|
-
return !Instance$
|
|
4336
|
+
return !Instance$s.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
|
|
4586
4337
|
if (!(propertyName in value)) {
|
|
4587
4338
|
return true;
|
|
4588
4339
|
}
|
|
@@ -4595,49 +4346,49 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4595
4346
|
});
|
|
4596
4347
|
};
|
|
4597
4348
|
|
|
4598
|
-
var dependencies = { compile: compile$
|
|
4349
|
+
var dependencies = { compile: compile$z, interpret: interpret$z };
|
|
4599
4350
|
|
|
4600
|
-
const { Schema: Schema$
|
|
4601
|
-
const Pact$4 = lib$
|
|
4351
|
+
const { Schema: Schema$B, Instance: Instance$r } = lib$1;
|
|
4352
|
+
const Pact$4 = lib$3;
|
|
4602
4353
|
|
|
4603
4354
|
|
|
4604
|
-
const compile$
|
|
4605
|
-
Schema$
|
|
4606
|
-
Pact$4.map(([key, dependentRequired]) => [key, Schema$
|
|
4355
|
+
const compile$y = (schema) => Pact$4.pipeline([
|
|
4356
|
+
Schema$B.entries,
|
|
4357
|
+
Pact$4.map(([key, dependentRequired]) => [key, Schema$B.value(dependentRequired)]),
|
|
4607
4358
|
Pact$4.all
|
|
4608
4359
|
], schema);
|
|
4609
4360
|
|
|
4610
|
-
const interpret$
|
|
4611
|
-
const value = Instance$
|
|
4361
|
+
const interpret$y = (dependentRequired, instance) => {
|
|
4362
|
+
const value = Instance$r.value(instance);
|
|
4612
4363
|
|
|
4613
|
-
return !Instance$
|
|
4364
|
+
return !Instance$r.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
|
|
4614
4365
|
return !(propertyName in value) || required.every((key) => key in value);
|
|
4615
4366
|
});
|
|
4616
4367
|
};
|
|
4617
4368
|
|
|
4618
|
-
var dependentRequired = { compile: compile$
|
|
4369
|
+
var dependentRequired = { compile: compile$y, interpret: interpret$y };
|
|
4619
4370
|
|
|
4620
|
-
const { Core: Core$l, Schema: Schema$
|
|
4621
|
-
const Pact$3 = lib$
|
|
4371
|
+
const { Core: Core$l, Schema: Schema$A, Instance: Instance$q } = lib$1;
|
|
4372
|
+
const Pact$3 = lib$3;
|
|
4622
4373
|
|
|
4623
4374
|
|
|
4624
|
-
const compile$
|
|
4625
|
-
Schema$
|
|
4375
|
+
const compile$x = (schema, ast) => Pact$3.pipeline([
|
|
4376
|
+
Schema$A.entries,
|
|
4626
4377
|
Pact$3.map(async ([key, dependentSchema]) => [key, await Core$l.compileSchema(dependentSchema, ast)]),
|
|
4627
4378
|
Pact$3.all
|
|
4628
4379
|
], schema);
|
|
4629
4380
|
|
|
4630
|
-
const interpret$
|
|
4631
|
-
const value = Instance$
|
|
4381
|
+
const interpret$x = (dependentSchemas, instance, ast, dynamicAnchors) => {
|
|
4382
|
+
const value = Instance$q.value(instance);
|
|
4632
4383
|
|
|
4633
|
-
return !Instance$
|
|
4384
|
+
return !Instance$q.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
|
|
4634
4385
|
return !(propertyName in value) || Core$l.interpretSchema(dependentSchema, instance, ast, dynamicAnchors);
|
|
4635
4386
|
});
|
|
4636
4387
|
};
|
|
4637
4388
|
|
|
4638
4389
|
const collectEvaluatedProperties$9 = (dependentSchemas, instance, ast, dynamicAnchors) => {
|
|
4639
4390
|
return dependentSchemas.reduce((acc, [propertyName, dependentSchema]) => {
|
|
4640
|
-
if (!acc || !Instance$
|
|
4391
|
+
if (!acc || !Instance$q.has(propertyName, instance)) {
|
|
4641
4392
|
return acc;
|
|
4642
4393
|
}
|
|
4643
4394
|
|
|
@@ -4646,39 +4397,39 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4646
4397
|
}, []);
|
|
4647
4398
|
};
|
|
4648
4399
|
|
|
4649
|
-
var dependentSchemas = { compile: compile$
|
|
4400
|
+
var dependentSchemas = { compile: compile$x, interpret: interpret$x, collectEvaluatedProperties: collectEvaluatedProperties$9 };
|
|
4650
4401
|
|
|
4651
|
-
const { Schema: Schema$
|
|
4402
|
+
const { Schema: Schema$z, Instance: Instance$p } = lib$1;
|
|
4652
4403
|
const jsonStringify$1 = fastestStableStringify;
|
|
4653
4404
|
|
|
4654
4405
|
|
|
4655
|
-
const compile$
|
|
4656
|
-
const interpret$
|
|
4406
|
+
const compile$w = (schema) => Schema$z.value(schema).map(jsonStringify$1);
|
|
4407
|
+
const interpret$w = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$p.value(instance)) === enumValue);
|
|
4657
4408
|
|
|
4658
|
-
var _enum = { compile: compile$
|
|
4409
|
+
var _enum = { compile: compile$w, interpret: interpret$w };
|
|
4659
4410
|
|
|
4660
|
-
const { Schema: Schema$
|
|
4411
|
+
const { Schema: Schema$y, Instance: Instance$o } = lib$1;
|
|
4661
4412
|
|
|
4662
4413
|
|
|
4663
|
-
const compile$
|
|
4664
|
-
const interpret$
|
|
4414
|
+
const compile$v = async (schema) => Schema$y.value(schema);
|
|
4415
|
+
const interpret$v = (exclusiveMaximum, instance) => !Instance$o.typeOf(instance, "number") || Instance$o.value(instance) < exclusiveMaximum;
|
|
4665
4416
|
|
|
4666
|
-
var exclusiveMaximum = { compile: compile$
|
|
4417
|
+
var exclusiveMaximum = { compile: compile$v, interpret: interpret$v };
|
|
4667
4418
|
|
|
4668
|
-
const { Schema: Schema$
|
|
4419
|
+
const { Schema: Schema$x, Instance: Instance$n } = lib$1;
|
|
4669
4420
|
|
|
4670
4421
|
|
|
4671
|
-
const compile$
|
|
4672
|
-
const interpret$
|
|
4422
|
+
const compile$u = async (schema) => Schema$x.value(schema);
|
|
4423
|
+
const interpret$u = (exclusiveMinimum, instance) => !Instance$n.typeOf(instance, "number") || Instance$n.value(instance) > exclusiveMinimum;
|
|
4673
4424
|
|
|
4674
|
-
var exclusiveMinimum = { compile: compile$
|
|
4425
|
+
var exclusiveMinimum = { compile: compile$u, interpret: interpret$u };
|
|
4675
4426
|
|
|
4676
|
-
const { Core: Core$k } = lib$
|
|
4427
|
+
const { Core: Core$k } = lib$1;
|
|
4677
4428
|
|
|
4678
4429
|
|
|
4679
|
-
const compile$
|
|
4430
|
+
const compile$t = (schema, ast) => Core$k.compileSchema(schema, ast);
|
|
4680
4431
|
|
|
4681
|
-
const interpret$
|
|
4432
|
+
const interpret$t = (ifSchema, instance, ast, dynamicAnchors) => {
|
|
4682
4433
|
Core$k.interpretSchema(ifSchema, instance, ast, dynamicAnchors);
|
|
4683
4434
|
return true;
|
|
4684
4435
|
};
|
|
@@ -4691,21 +4442,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4691
4442
|
return Core$k.collectEvaluatedItems(ifSchema, instance, ast, dynamicAnchors) || new Set();
|
|
4692
4443
|
};
|
|
4693
4444
|
|
|
4694
|
-
var _if = { compile: compile$
|
|
4445
|
+
var _if = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
|
|
4695
4446
|
|
|
4696
|
-
const { Core: Core$j, Schema: Schema$
|
|
4447
|
+
const { Core: Core$j, Schema: Schema$w } = lib$1;
|
|
4697
4448
|
|
|
4698
4449
|
|
|
4699
|
-
const compile$
|
|
4700
|
-
if (Schema$
|
|
4701
|
-
const ifSchema = await Schema$
|
|
4450
|
+
const compile$s = async (schema, ast, parentSchema) => {
|
|
4451
|
+
if (Schema$w.has("if", parentSchema)) {
|
|
4452
|
+
const ifSchema = await Schema$w.step("if", parentSchema);
|
|
4702
4453
|
return [await Core$j.compileSchema(ifSchema, ast), await Core$j.compileSchema(schema, ast)];
|
|
4703
4454
|
} else {
|
|
4704
4455
|
return [];
|
|
4705
4456
|
}
|
|
4706
4457
|
};
|
|
4707
4458
|
|
|
4708
|
-
const interpret$
|
|
4459
|
+
const interpret$s = ([guard, block], instance, ast, dynamicAnchors) => {
|
|
4709
4460
|
return guard === undefined || !quietInterpretSchema$1(guard, instance, ast, dynamicAnchors) || Core$j.interpretSchema(block, instance, ast, dynamicAnchors);
|
|
4710
4461
|
};
|
|
4711
4462
|
|
|
@@ -4735,21 +4486,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4735
4486
|
return Core$j.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
|
|
4736
4487
|
};
|
|
4737
4488
|
|
|
4738
|
-
var then = { compile: compile$
|
|
4489
|
+
var then = { compile: compile$s, interpret: interpret$s, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
|
|
4739
4490
|
|
|
4740
|
-
const { Core: Core$i, Schema: Schema$
|
|
4491
|
+
const { Core: Core$i, Schema: Schema$v } = lib$1;
|
|
4741
4492
|
|
|
4742
4493
|
|
|
4743
|
-
const compile$
|
|
4744
|
-
if (Schema$
|
|
4745
|
-
const ifSchema = await Schema$
|
|
4494
|
+
const compile$r = async (schema, ast, parentSchema) => {
|
|
4495
|
+
if (Schema$v.has("if", parentSchema)) {
|
|
4496
|
+
const ifSchema = await Schema$v.step("if", parentSchema);
|
|
4746
4497
|
return [await Core$i.compileSchema(ifSchema, ast), await Core$i.compileSchema(schema, ast)];
|
|
4747
4498
|
} else {
|
|
4748
4499
|
return [];
|
|
4749
4500
|
}
|
|
4750
4501
|
};
|
|
4751
4502
|
|
|
4752
|
-
const interpret$
|
|
4503
|
+
const interpret$r = ([guard, block], instance, ast, dynamicAnchors) => {
|
|
4753
4504
|
return guard === undefined || quietInterpretSchema(guard, instance, ast, dynamicAnchors) || Core$i.interpretSchema(block, instance, ast, dynamicAnchors);
|
|
4754
4505
|
};
|
|
4755
4506
|
|
|
@@ -4779,150 +4530,134 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4779
4530
|
return Core$i.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
|
|
4780
4531
|
};
|
|
4781
4532
|
|
|
4782
|
-
var _else = { compile: compile$
|
|
4533
|
+
var _else = { compile: compile$r, interpret: interpret$r, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
|
|
4783
4534
|
|
|
4784
|
-
const { Core: Core$h, Schema: Schema$
|
|
4535
|
+
const { Core: Core$h, Schema: Schema$u, Instance: Instance$m } = lib$1;
|
|
4785
4536
|
|
|
4786
4537
|
|
|
4787
|
-
const compile$
|
|
4788
|
-
if (Schema$
|
|
4789
|
-
const tupleItems = await Schema$
|
|
4538
|
+
const compile$q = async (schema, ast) => {
|
|
4539
|
+
if (Schema$u.typeOf(schema, "array")) {
|
|
4540
|
+
const tupleItems = await Schema$u.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
|
|
4790
4541
|
return Promise.all(tupleItems);
|
|
4791
4542
|
} else {
|
|
4792
4543
|
return Core$h.compileSchema(schema, ast);
|
|
4793
4544
|
}
|
|
4794
4545
|
};
|
|
4795
4546
|
|
|
4796
|
-
const interpret$
|
|
4797
|
-
if (!Instance$
|
|
4547
|
+
const interpret$q = (items, instance, ast, dynamicAnchors) => {
|
|
4548
|
+
if (!Instance$m.typeOf(instance, "array")) {
|
|
4798
4549
|
return true;
|
|
4799
4550
|
}
|
|
4800
4551
|
|
|
4801
4552
|
if (typeof items === "string") {
|
|
4802
|
-
return Instance$
|
|
4553
|
+
return Instance$m.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
|
|
4803
4554
|
} else {
|
|
4804
|
-
return Instance$
|
|
4555
|
+
return Instance$m.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
|
|
4805
4556
|
}
|
|
4806
4557
|
};
|
|
4807
4558
|
|
|
4808
4559
|
const collectEvaluatedItems$6 = (items, instance, ast, dynamicAnchors) => {
|
|
4809
|
-
return interpret$
|
|
4810
|
-
? new Set(Instance$
|
|
4560
|
+
return interpret$q(items, instance, ast, dynamicAnchors) && (typeof items === "string"
|
|
4561
|
+
? new Set(Instance$m.map((item, itemIndex) => itemIndex, instance))
|
|
4811
4562
|
: new Set(items.map((item, itemIndex) => itemIndex)));
|
|
4812
4563
|
};
|
|
4813
4564
|
|
|
4814
|
-
var items = { compile: compile$
|
|
4565
|
+
var items = { compile: compile$q, interpret: interpret$q, collectEvaluatedItems: collectEvaluatedItems$6 };
|
|
4815
4566
|
|
|
4816
|
-
const { Core: Core$g, Schema: Schema$
|
|
4567
|
+
const { Core: Core$g, Schema: Schema$t, Instance: Instance$l } = lib$1;
|
|
4817
4568
|
|
|
4818
4569
|
|
|
4819
|
-
const compile$
|
|
4820
|
-
const items = await Schema$
|
|
4821
|
-
const numberOfPrefixItems = Schema$
|
|
4570
|
+
const compile$p = async (schema, ast, parentSchema) => {
|
|
4571
|
+
const items = await Schema$t.step("prefixItems", parentSchema);
|
|
4572
|
+
const numberOfPrefixItems = Schema$t.typeOf(items, "array") ? Schema$t.length(items) : 0;
|
|
4822
4573
|
|
|
4823
4574
|
return [numberOfPrefixItems, await Core$g.compileSchema(schema, ast)];
|
|
4824
4575
|
};
|
|
4825
4576
|
|
|
4826
|
-
const interpret$
|
|
4827
|
-
if (!Instance$
|
|
4577
|
+
const interpret$p = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
|
|
4578
|
+
if (!Instance$l.typeOf(instance, "array")) {
|
|
4828
4579
|
return true;
|
|
4829
4580
|
}
|
|
4830
4581
|
|
|
4831
|
-
return Instance$
|
|
4582
|
+
return Instance$l.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
|
|
4832
4583
|
};
|
|
4833
4584
|
|
|
4834
4585
|
const collectEvaluatedItems$5 = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4835
|
-
return interpret$
|
|
4586
|
+
return interpret$p(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$l.map((item, ndx) => ndx, instance));
|
|
4836
4587
|
};
|
|
4837
4588
|
|
|
4838
|
-
var items202012 = { compile: compile$
|
|
4839
|
-
|
|
4840
|
-
const { Schema: Schema$u, Instance: Instance$m } = lib$2;
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
const compile$q = (schema) => Schema$u.value(schema);
|
|
4844
|
-
const interpret$q = (maxItems, instance) => !Instance$m.typeOf(instance, "array") || Instance$m.length(instance) <= maxItems;
|
|
4589
|
+
var items202012 = { compile: compile$p, interpret: interpret$p, collectEvaluatedItems: collectEvaluatedItems$5 };
|
|
4845
4590
|
|
|
4846
|
-
|
|
4591
|
+
const { Schema: Schema$s, Instance: Instance$k } = lib$1;
|
|
4847
4592
|
|
|
4848
|
-
const { Schema: Schema$t, Instance: Instance$l } = lib$2;
|
|
4849
4593
|
|
|
4594
|
+
const compile$o = (schema) => Schema$s.value(schema);
|
|
4595
|
+
const interpret$o = (maxItems, instance) => !Instance$k.typeOf(instance, "array") || Instance$k.length(instance) <= maxItems;
|
|
4850
4596
|
|
|
4851
|
-
|
|
4852
|
-
const interpret$p = (maxLength, instance) => !Instance$l.typeOf(instance, "string") || Instance$l.length(instance) <= maxLength;
|
|
4853
|
-
|
|
4854
|
-
var maxLength = { compile: compile$p, interpret: interpret$p };
|
|
4597
|
+
var maxItems = { compile: compile$o, interpret: interpret$o };
|
|
4855
4598
|
|
|
4856
|
-
const { Schema: Schema$
|
|
4599
|
+
const { Schema: Schema$r, Instance: Instance$j } = lib$1;
|
|
4857
4600
|
|
|
4858
4601
|
|
|
4859
|
-
const compile$
|
|
4860
|
-
const interpret$
|
|
4602
|
+
const compile$n = (schema) => Schema$r.value(schema);
|
|
4603
|
+
const interpret$n = (maxLength, instance) => !Instance$j.typeOf(instance, "string") || [...Instance$j.value(instance)].length <= maxLength;
|
|
4861
4604
|
|
|
4862
|
-
var
|
|
4605
|
+
var maxLength = { compile: compile$n, interpret: interpret$n };
|
|
4863
4606
|
|
|
4864
|
-
const { Schema: Schema$
|
|
4607
|
+
const { Schema: Schema$q, Instance: Instance$i } = lib$1;
|
|
4865
4608
|
|
|
4866
4609
|
|
|
4867
|
-
const compile$
|
|
4868
|
-
const interpret$
|
|
4610
|
+
const compile$m = (schema) => Schema$q.value(schema);
|
|
4611
|
+
const interpret$m = (maxProperties, instance) => !Instance$i.typeOf(instance, "object") || Instance$i.keys(instance).length <= maxProperties;
|
|
4869
4612
|
|
|
4870
|
-
var maxProperties = { compile: compile$
|
|
4613
|
+
var maxProperties = { compile: compile$m, interpret: interpret$m };
|
|
4871
4614
|
|
|
4872
|
-
const { Schema: Schema$
|
|
4615
|
+
const { Schema: Schema$p, Instance: Instance$h } = lib$1;
|
|
4873
4616
|
|
|
4874
4617
|
|
|
4875
|
-
const compile$
|
|
4876
|
-
const exclusiveMaximum = await Schema$
|
|
4877
|
-
const isExclusive = Schema$
|
|
4618
|
+
const compile$l = async (schema, ast, parentSchema) => {
|
|
4619
|
+
const exclusiveMaximum = await Schema$p.step("exclusiveMaximum", parentSchema);
|
|
4620
|
+
const isExclusive = Schema$p.value(exclusiveMaximum);
|
|
4878
4621
|
|
|
4879
|
-
return [Schema$
|
|
4622
|
+
return [Schema$p.value(schema), isExclusive];
|
|
4880
4623
|
};
|
|
4881
4624
|
|
|
4882
|
-
const interpret$
|
|
4883
|
-
if (!Instance$
|
|
4625
|
+
const interpret$l = ([maximum, isExclusive], instance) => {
|
|
4626
|
+
if (!Instance$h.typeOf(instance, "number")) {
|
|
4884
4627
|
return true;
|
|
4885
4628
|
}
|
|
4886
4629
|
|
|
4887
|
-
const value = Instance$
|
|
4630
|
+
const value = Instance$h.value(instance);
|
|
4888
4631
|
return isExclusive ? value < maximum : value <= maximum;
|
|
4889
4632
|
};
|
|
4890
4633
|
|
|
4891
|
-
var maximumExclusiveMaximum = { compile: compile$
|
|
4892
|
-
|
|
4893
|
-
const { Schema: Schema$p, Instance: Instance$h } = lib$2;
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
const compile$l = async (schema) => Schema$p.value(schema);
|
|
4897
|
-
const interpret$l = (maximum, instance) => !Instance$h.typeOf(instance, "number") || Instance$h.value(instance) <= maximum;
|
|
4898
|
-
|
|
4899
|
-
var maximum = { compile: compile$l, interpret: interpret$l };
|
|
4634
|
+
var maximumExclusiveMaximum = { compile: compile$l, interpret: interpret$l };
|
|
4900
4635
|
|
|
4901
|
-
const { Schema: Schema$o, Instance: Instance$g } = lib$
|
|
4636
|
+
const { Schema: Schema$o, Instance: Instance$g } = lib$1;
|
|
4902
4637
|
|
|
4903
4638
|
|
|
4904
|
-
const compile$k = (schema) => Schema$o.value(schema);
|
|
4905
|
-
const interpret$k = (
|
|
4639
|
+
const compile$k = async (schema) => Schema$o.value(schema);
|
|
4640
|
+
const interpret$k = (maximum, instance) => !Instance$g.typeOf(instance, "number") || Instance$g.value(instance) <= maximum;
|
|
4906
4641
|
|
|
4907
|
-
var
|
|
4642
|
+
var maximum = { compile: compile$k, interpret: interpret$k };
|
|
4908
4643
|
|
|
4909
|
-
const { Schema: Schema$n, Instance: Instance$f } = lib$
|
|
4644
|
+
const { Schema: Schema$n, Instance: Instance$f } = lib$1;
|
|
4910
4645
|
|
|
4911
4646
|
|
|
4912
4647
|
const compile$j = (schema) => Schema$n.value(schema);
|
|
4913
|
-
const interpret$j = (
|
|
4648
|
+
const interpret$j = (minItems, instance) => !Instance$f.typeOf(instance, "array") || Instance$f.length(instance) >= minItems;
|
|
4914
4649
|
|
|
4915
|
-
var
|
|
4650
|
+
var minItems = { compile: compile$j, interpret: interpret$j };
|
|
4916
4651
|
|
|
4917
|
-
const { Schema: Schema$m, Instance: Instance$e } = lib$
|
|
4652
|
+
const { Schema: Schema$m, Instance: Instance$e } = lib$1;
|
|
4918
4653
|
|
|
4919
4654
|
|
|
4920
4655
|
const compile$i = (schema) => Schema$m.value(schema);
|
|
4921
4656
|
const interpret$i = (minLength, instance) => !Instance$e.typeOf(instance, "string") || [...Instance$e.value(instance)].length >= minLength;
|
|
4922
4657
|
|
|
4923
|
-
var
|
|
4658
|
+
var minLength = { compile: compile$i, interpret: interpret$i };
|
|
4924
4659
|
|
|
4925
|
-
const { Schema: Schema$l, Instance: Instance$d } = lib$
|
|
4660
|
+
const { Schema: Schema$l, Instance: Instance$d } = lib$1;
|
|
4926
4661
|
|
|
4927
4662
|
|
|
4928
4663
|
const compile$h = (schema) => Schema$l.value(schema);
|
|
@@ -4930,7 +4665,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4930
4665
|
|
|
4931
4666
|
var minProperties = { compile: compile$h, interpret: interpret$h };
|
|
4932
4667
|
|
|
4933
|
-
const { Schema: Schema$k, Instance: Instance$c } = lib$
|
|
4668
|
+
const { Schema: Schema$k, Instance: Instance$c } = lib$1;
|
|
4934
4669
|
|
|
4935
4670
|
|
|
4936
4671
|
const compile$g = async (schema, ast, parentSchema) => {
|
|
@@ -4951,7 +4686,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4951
4686
|
|
|
4952
4687
|
var minimumExclusiveMinimum = { compile: compile$g, interpret: interpret$g };
|
|
4953
4688
|
|
|
4954
|
-
const { Schema: Schema$j, Instance: Instance$b } = lib$
|
|
4689
|
+
const { Schema: Schema$j, Instance: Instance$b } = lib$1;
|
|
4955
4690
|
|
|
4956
4691
|
|
|
4957
4692
|
const compile$f = async (schema) => Schema$j.value(schema);
|
|
@@ -4959,7 +4694,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4959
4694
|
|
|
4960
4695
|
var minimum = { compile: compile$f, interpret: interpret$f };
|
|
4961
4696
|
|
|
4962
|
-
const { Schema: Schema$i, Instance: Instance$a } = lib$
|
|
4697
|
+
const { Schema: Schema$i, Instance: Instance$a } = lib$1;
|
|
4963
4698
|
|
|
4964
4699
|
|
|
4965
4700
|
const compile$e = (schema) => Schema$i.value(schema);
|
|
@@ -4977,7 +4712,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4977
4712
|
|
|
4978
4713
|
var multipleOf = { compile: compile$e, interpret: interpret$e };
|
|
4979
4714
|
|
|
4980
|
-
const { Core: Core$f } = lib$
|
|
4715
|
+
const { Core: Core$f } = lib$1;
|
|
4981
4716
|
|
|
4982
4717
|
|
|
4983
4718
|
const compile$d = Core$f.compileSchema;
|
|
@@ -4985,7 +4720,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4985
4720
|
|
|
4986
4721
|
var not = { compile: compile$d, interpret: interpret$d };
|
|
4987
4722
|
|
|
4988
|
-
const { Core: Core$e, Schema: Schema$h } = lib$
|
|
4723
|
+
const { Core: Core$e, Schema: Schema$h } = lib$1;
|
|
4989
4724
|
|
|
4990
4725
|
|
|
4991
4726
|
const compile$c = async (schema, ast) => {
|
|
@@ -5034,7 +4769,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5034
4769
|
|
|
5035
4770
|
var oneOf = { compile: compile$c, interpret: interpret$c, collectEvaluatedProperties: collectEvaluatedProperties$5, collectEvaluatedItems: collectEvaluatedItems$4 };
|
|
5036
4771
|
|
|
5037
|
-
const { Schema: Schema$g, Instance: Instance$9 } = lib$
|
|
4772
|
+
const { Schema: Schema$g, Instance: Instance$9 } = lib$1;
|
|
5038
4773
|
|
|
5039
4774
|
|
|
5040
4775
|
const compile$b = (schema) => new RegExp(Schema$g.value(schema), "u");
|
|
@@ -5042,8 +4777,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5042
4777
|
|
|
5043
4778
|
var pattern = { compile: compile$b, interpret: interpret$b };
|
|
5044
4779
|
|
|
5045
|
-
const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$
|
|
5046
|
-
const Pact$2 = lib$
|
|
4780
|
+
const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$1;
|
|
4781
|
+
const Pact$2 = lib$3;
|
|
5047
4782
|
|
|
5048
4783
|
|
|
5049
4784
|
const compile$a = (schema, ast) => Pact$2.pipeline([
|
|
@@ -5080,8 +4815,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5080
4815
|
|
|
5081
4816
|
var common = { isObject, escapeRegExp: escapeRegExp$1, splitUrl: splitUrl$1 };
|
|
5082
4817
|
|
|
5083
|
-
const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$
|
|
5084
|
-
const Pact$1 = lib$
|
|
4818
|
+
const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$1;
|
|
4819
|
+
const Pact$1 = lib$3;
|
|
5085
4820
|
const { escapeRegExp } = common;
|
|
5086
4821
|
|
|
5087
4822
|
|
|
@@ -5106,7 +4841,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5106
4841
|
|
|
5107
4842
|
var properties = { compile: compile$9, interpret: interpret$9, collectEvaluatedProperties: collectEvaluatedProperties$3 };
|
|
5108
4843
|
|
|
5109
|
-
const { Core: Core$b, Instance: Instance$6 } = lib$
|
|
4844
|
+
const { Core: Core$b, Instance: Instance$6 } = lib$1;
|
|
5110
4845
|
|
|
5111
4846
|
|
|
5112
4847
|
const compile$8 = (schema, ast) => Core$b.compileSchema(schema, ast);
|
|
@@ -5118,7 +4853,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5118
4853
|
|
|
5119
4854
|
var propertyNames = { compile: compile$8, interpret: interpret$8 };
|
|
5120
4855
|
|
|
5121
|
-
const { Core: Core$a, Schema: Schema$d } = lib$
|
|
4856
|
+
const { Core: Core$a, Schema: Schema$d } = lib$1;
|
|
5122
4857
|
const { splitUrl } = common;
|
|
5123
4858
|
|
|
5124
4859
|
|
|
@@ -5143,7 +4878,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5143
4878
|
|
|
5144
4879
|
var dynamicRef = { compile: compile$7, interpret: interpret$7, collectEvaluatedProperties: collectEvaluatedProperties$2, collectEvaluatedItems: collectEvaluatedItems$3 };
|
|
5145
4880
|
|
|
5146
|
-
const { Core: Core$9, Schema: Schema$c } = lib$
|
|
4881
|
+
const { Core: Core$9, Schema: Schema$c } = lib$1;
|
|
5147
4882
|
|
|
5148
4883
|
|
|
5149
4884
|
const compile$6 = async (ref, ast) => {
|
|
@@ -5157,7 +4892,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5157
4892
|
|
|
5158
4893
|
var ref = { compile: compile$6, interpret: interpret$6, collectEvaluatedProperties: collectEvaluatedProperties$1, collectEvaluatedItems: collectEvaluatedItems$2 };
|
|
5159
4894
|
|
|
5160
|
-
const { Schema: Schema$b, Instance: Instance$5 } = lib$
|
|
4895
|
+
const { Schema: Schema$b, Instance: Instance$5 } = lib$1;
|
|
5161
4896
|
|
|
5162
4897
|
|
|
5163
4898
|
const compile$5 = (schema) => Schema$b.value(schema);
|
|
@@ -5168,8 +4903,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5168
4903
|
|
|
5169
4904
|
var required = { compile: compile$5, interpret: interpret$5 };
|
|
5170
4905
|
|
|
5171
|
-
const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$
|
|
5172
|
-
const Pact = lib$
|
|
4906
|
+
const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$1;
|
|
4907
|
+
const Pact = lib$3;
|
|
5173
4908
|
|
|
5174
4909
|
|
|
5175
4910
|
const compile$4 = (schema, ast) => {
|
|
@@ -5193,7 +4928,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5193
4928
|
|
|
5194
4929
|
var tupleItems = { compile: compile$4, interpret: interpret$4, collectEvaluatedItems: collectEvaluatedItems$1 };
|
|
5195
4930
|
|
|
5196
|
-
const { Schema: Schema$9, Instance: Instance$3 } = lib$
|
|
4931
|
+
const { Schema: Schema$9, Instance: Instance$3 } = lib$1;
|
|
5197
4932
|
|
|
5198
4933
|
|
|
5199
4934
|
const compile$3 = (schema) => Schema$9.value(schema);
|
|
@@ -5201,7 +4936,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5201
4936
|
|
|
5202
4937
|
var type = { compile: compile$3, interpret: interpret$3 };
|
|
5203
4938
|
|
|
5204
|
-
const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$
|
|
4939
|
+
const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$1;
|
|
5205
4940
|
|
|
5206
4941
|
|
|
5207
4942
|
const compile$2 = async (schema, ast, parentSchema) => {
|
|
@@ -5225,7 +4960,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5225
4960
|
|
|
5226
4961
|
var unevaluatedItems = { compile: compile$2, interpret: interpret$2, collectEvaluatedItems };
|
|
5227
4962
|
|
|
5228
|
-
const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$
|
|
4963
|
+
const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$1;
|
|
5229
4964
|
|
|
5230
4965
|
|
|
5231
4966
|
const compile$1 = async (schema, ast, parentSchema) => {
|
|
@@ -5250,7 +4985,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5250
4985
|
|
|
5251
4986
|
var unevaluatedProperties = { compile: compile$1, interpret: interpret$1, collectEvaluatedProperties };
|
|
5252
4987
|
|
|
5253
|
-
const { Schema: Schema$6, Instance } = lib$
|
|
4988
|
+
const { Schema: Schema$6, Instance } = lib$1;
|
|
5254
4989
|
const jsonStringify = fastestStableStringify;
|
|
5255
4990
|
|
|
5256
4991
|
|
|
@@ -5267,7 +5002,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5267
5002
|
|
|
5268
5003
|
var uniqueItems = { compile, interpret };
|
|
5269
5004
|
|
|
5270
|
-
const { Keywords: Keywords$1 } = lib$
|
|
5005
|
+
const { Keywords: Keywords$1 } = lib$1;
|
|
5271
5006
|
|
|
5272
5007
|
|
|
5273
5008
|
var keywords$5 = {
|
|
@@ -5294,14 +5029,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5294
5029
|
items202012: items202012,
|
|
5295
5030
|
maxItems: maxItems,
|
|
5296
5031
|
maxLength: maxLength,
|
|
5297
|
-
maxLength6: maxLength6,
|
|
5298
5032
|
maxProperties: maxProperties,
|
|
5299
5033
|
maximumExclusiveMaximum: maximumExclusiveMaximum,
|
|
5300
5034
|
maximum: maximum,
|
|
5301
5035
|
metaData: Keywords$1.metaData,
|
|
5302
5036
|
minItems: minItems,
|
|
5303
5037
|
minLength: minLength,
|
|
5304
|
-
minLength6: minLength6,
|
|
5305
5038
|
minProperties: minProperties,
|
|
5306
5039
|
minimumExclusiveMinimum: minimumExclusiveMinimum,
|
|
5307
5040
|
minimum: minimum,
|
|
@@ -5473,7 +5206,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5473
5206
|
"default": {}
|
|
5474
5207
|
}`;
|
|
5475
5208
|
|
|
5476
|
-
const { Core: Core$5, Schema: Schema$5 } = lib$
|
|
5209
|
+
const { Core: Core$5, Schema: Schema$5 } = lib$1;
|
|
5477
5210
|
const keywords$4 = keywords$5;
|
|
5478
5211
|
const metaSchema$4 = schema$4;
|
|
5479
5212
|
|
|
@@ -5675,7 +5408,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5675
5408
|
"default": {}
|
|
5676
5409
|
}`;
|
|
5677
5410
|
|
|
5678
|
-
const { Core: Core$4, Schema: Schema$4 } = lib$
|
|
5411
|
+
const { Core: Core$4, Schema: Schema$4 } = lib$1;
|
|
5679
5412
|
const keywords$3 = keywords$5;
|
|
5680
5413
|
const metaSchema$3 = schema$3;
|
|
5681
5414
|
|
|
@@ -5707,11 +5440,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5707
5440
|
"format": keywords$3.metaData,
|
|
5708
5441
|
"items": keywords$3.items,
|
|
5709
5442
|
"maxItems": keywords$3.maxItems,
|
|
5710
|
-
"maxLength": keywords$3.
|
|
5443
|
+
"maxLength": keywords$3.maxLength,
|
|
5711
5444
|
"maxProperties": keywords$3.maxProperties,
|
|
5712
5445
|
"maximum": keywords$3.maximum,
|
|
5713
5446
|
"minItems": keywords$3.minItems,
|
|
5714
|
-
"minLength": keywords$3.
|
|
5447
|
+
"minLength": keywords$3.minLength,
|
|
5715
5448
|
"minProperties": keywords$3.minProperties,
|
|
5716
5449
|
"minimum": keywords$3.minimum,
|
|
5717
5450
|
"multipleOf": keywords$3.multipleOf,
|
|
@@ -5900,7 +5633,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5900
5633
|
"default": true
|
|
5901
5634
|
}`;
|
|
5902
5635
|
|
|
5903
|
-
const { Core: Core$3, Schema: Schema$3 } = lib$
|
|
5636
|
+
const { Core: Core$3, Schema: Schema$3 } = lib$1;
|
|
5904
5637
|
const keywords$2 = keywords$5;
|
|
5905
5638
|
const metaSchema$2 = schema$2;
|
|
5906
5639
|
|
|
@@ -5934,11 +5667,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5934
5667
|
"else": keywords$2.else,
|
|
5935
5668
|
"items": keywords$2.items,
|
|
5936
5669
|
"maxItems": keywords$2.maxItems,
|
|
5937
|
-
"maxLength": keywords$2.
|
|
5670
|
+
"maxLength": keywords$2.maxLength,
|
|
5938
5671
|
"maxProperties": keywords$2.maxProperties,
|
|
5939
5672
|
"maximum": keywords$2.maximum,
|
|
5940
5673
|
"minItems": keywords$2.minItems,
|
|
5941
|
-
"minLength": keywords$2.
|
|
5674
|
+
"minLength": keywords$2.minLength,
|
|
5942
5675
|
"minProperties": keywords$2.minProperties,
|
|
5943
5676
|
"minimum": keywords$2.minimum,
|
|
5944
5677
|
"multipleOf": keywords$2.multipleOf,
|
|
@@ -6283,7 +6016,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6283
6016
|
}
|
|
6284
6017
|
}`;
|
|
6285
6018
|
|
|
6286
|
-
const { Core: Core$2, Schema: Schema$2 } = lib$
|
|
6019
|
+
const { Core: Core$2, Schema: Schema$2 } = lib$1;
|
|
6287
6020
|
const keywords$1 = keywords$5;
|
|
6288
6021
|
const metaSchema$1 = schema$1;
|
|
6289
6022
|
const coreMetaSchema$1 = core$1;
|
|
@@ -6342,11 +6075,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6342
6075
|
"exclusiveMaximum": keywords$1.exclusiveMaximum,
|
|
6343
6076
|
"exclusiveMinimum": keywords$1.exclusiveMinimum,
|
|
6344
6077
|
"maxItems": keywords$1.maxItems,
|
|
6345
|
-
"maxLength": keywords$1.
|
|
6078
|
+
"maxLength": keywords$1.maxLength,
|
|
6346
6079
|
"maxProperties": keywords$1.maxProperties,
|
|
6347
6080
|
"maximum": keywords$1.maximum,
|
|
6348
6081
|
"minItems": keywords$1.minItems,
|
|
6349
|
-
"minLength": keywords$1.
|
|
6082
|
+
"minLength": keywords$1.minLength,
|
|
6350
6083
|
"minProperties": keywords$1.minProperties,
|
|
6351
6084
|
"minimum": keywords$1.minimum,
|
|
6352
6085
|
"multipleOf": keywords$1.multipleOf,
|
|
@@ -6730,7 +6463,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6730
6463
|
}
|
|
6731
6464
|
}`;
|
|
6732
6465
|
|
|
6733
|
-
const { Core: Core$1, Schema: Schema$1 } = lib$
|
|
6466
|
+
const { Core: Core$1, Schema: Schema$1 } = lib$1;
|
|
6734
6467
|
const keywords = keywords$5;
|
|
6735
6468
|
const metaSchema = schema;
|
|
6736
6469
|
const coreMetaSchema = core;
|
|
@@ -6789,11 +6522,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6789
6522
|
"exclusiveMaximum": keywords.exclusiveMaximum,
|
|
6790
6523
|
"exclusiveMinimum": keywords.exclusiveMinimum,
|
|
6791
6524
|
"maxItems": keywords.maxItems,
|
|
6792
|
-
"maxLength": keywords.
|
|
6525
|
+
"maxLength": keywords.maxLength,
|
|
6793
6526
|
"maxProperties": keywords.maxProperties,
|
|
6794
6527
|
"maximum": keywords.maximum,
|
|
6795
6528
|
"minItems": keywords.minItems,
|
|
6796
|
-
"minLength": keywords.
|
|
6529
|
+
"minLength": keywords.minLength,
|
|
6797
6530
|
"minProperties": keywords.minProperties,
|
|
6798
6531
|
"minimum": keywords.minimum,
|
|
6799
6532
|
"multipleOf": keywords.multipleOf,
|
|
@@ -6834,7 +6567,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6834
6567
|
"unevaluatedProperties": keywords.unevaluatedProperties
|
|
6835
6568
|
});
|
|
6836
6569
|
|
|
6837
|
-
const { Core, Schema, InvalidSchemaError } = lib$
|
|
6570
|
+
const { Core, Schema, InvalidSchemaError } = lib$1;
|
|
6838
6571
|
const Keywords = keywords$5;
|
|
6839
6572
|
|
|
6840
6573
|
|