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