@hyperjump/json-schema 0.22.0 → 0.23.2

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.
@@ -3,7 +3,7 @@ var JsonSchema = (function (exports) {
3
3
 
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
 
6
- var justCurryIt = curry$a;
6
+ var justCurryIt$1 = curry$b;
7
7
 
8
8
  /*
9
9
  function add(a, b, c) {
@@ -28,7 +28,7 @@ var JsonSchema = (function (exports) {
28
28
  milesToKm(10); // 16.2
29
29
  */
30
30
 
31
- function curry$a(fn, arity) {
31
+ function curry$b(fn, arity) {
32
32
  return function curried() {
33
33
  if (arity == null) {
34
34
  arity = fn.length;
@@ -1899,12 +1899,12 @@ var JsonSchema = (function (exports) {
1899
1899
 
1900
1900
  var common$1 = { jsonTypeOf: jsonTypeOf$2, resolveUrl: resolveUrl$3, urlFragment: urlFragment$1, pathRelative: pathRelative$1 };
1901
1901
 
1902
- const curry$9 = justCurryIt;
1902
+ const curry$a = justCurryIt$1;
1903
1903
 
1904
1904
 
1905
1905
  const nil$2 = "";
1906
1906
 
1907
- const compile$P = (pointer) => {
1907
+ const compile$N = (pointer) => {
1908
1908
  if (pointer.length > 0 && pointer[0] !== "/") {
1909
1909
  throw Error("Invalid JSON Pointer");
1910
1910
  }
@@ -1912,8 +1912,8 @@ var JsonSchema = (function (exports) {
1912
1912
  return pointer.split("/").slice(1).map(unescape);
1913
1913
  };
1914
1914
 
1915
- const get$1 = (pointer, value = undefined) => {
1916
- const ptr = compile$P(pointer);
1915
+ const get$2 = (pointer, value = undefined) => {
1916
+ const ptr = compile$N(pointer);
1917
1917
 
1918
1918
  const fn = (value) => ptr.reduce(([value, pointer], segment) => {
1919
1919
  return [applySegment(value, segment, pointer), append(segment, pointer)];
@@ -1923,8 +1923,8 @@ var JsonSchema = (function (exports) {
1923
1923
  };
1924
1924
 
1925
1925
  const set = (pointer, subject = undefined, value = undefined) => {
1926
- const ptr = compile$P(pointer);
1927
- const fn = curry$9((subject, value) => _set(ptr, subject, value, nil$2));
1926
+ const ptr = compile$N(pointer);
1927
+ const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
1928
1928
  return subject === undefined ? fn : fn(subject, value);
1929
1929
  };
1930
1930
 
@@ -1932,8 +1932,15 @@ var JsonSchema = (function (exports) {
1932
1932
  if (pointer.length === 0) {
1933
1933
  return value;
1934
1934
  } else if (pointer.length > 1) {
1935
- const segment = pointer.shift();
1936
- return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1935
+ if (Array.isArray(subject)) {
1936
+ const index = pointer.shift();
1937
+ const clonedSubject = [...subject];
1938
+ clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
1939
+ return clonedSubject;
1940
+ } else {
1941
+ const segment = pointer.shift();
1942
+ return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1943
+ }
1937
1944
  } else if (Array.isArray(subject)) {
1938
1945
  const clonedSubject = [...subject];
1939
1946
  const segment = computeSegment(subject, pointer[0]);
@@ -1947,8 +1954,8 @@ var JsonSchema = (function (exports) {
1947
1954
  };
1948
1955
 
1949
1956
  const assign = (pointer, subject = undefined, value = undefined) => {
1950
- const ptr = compile$P(pointer);
1951
- const fn = curry$9((subject, value) => _assign(ptr, subject, value, nil$2));
1957
+ const ptr = compile$N(pointer);
1958
+ const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
1952
1959
  return subject === undefined ? fn : fn(subject, value);
1953
1960
  };
1954
1961
 
@@ -1965,7 +1972,7 @@ var JsonSchema = (function (exports) {
1965
1972
  };
1966
1973
 
1967
1974
  const unset = (pointer, subject = undefined) => {
1968
- const ptr = compile$P(pointer);
1975
+ const ptr = compile$N(pointer);
1969
1976
  const fn = (subject) => _unset(ptr, subject, nil$2);
1970
1977
  return subject === undefined ? fn : fn(subject);
1971
1978
  };
@@ -1989,7 +1996,7 @@ var JsonSchema = (function (exports) {
1989
1996
  };
1990
1997
 
1991
1998
  const remove = (pointer, subject = undefined) => {
1992
- const ptr = compile$P(pointer);
1999
+ const ptr = compile$N(pointer);
1993
2000
  const fn = (subject) => _remove(ptr, subject, nil$2);
1994
2001
  return subject === undefined ? fn : fn(subject);
1995
2002
  };
@@ -2010,7 +2017,7 @@ var JsonSchema = (function (exports) {
2010
2017
  }
2011
2018
  };
2012
2019
 
2013
- const append = curry$9((segment, pointer) => pointer + "/" + escape(segment));
2020
+ const append = curry$a((segment, pointer) => pointer + "/" + escape(segment));
2014
2021
 
2015
2022
  const escape = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
2016
2023
  const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
@@ -2031,7 +2038,7 @@ var JsonSchema = (function (exports) {
2031
2038
 
2032
2039
  const isScalar = (value) => value === null || typeof value !== "object";
2033
2040
 
2034
- var lib$3 = { nil: nil$2, append, get: get$1, set, assign, unset, remove };
2041
+ var lib$3 = { nil: nil$2, append, get: get$2, set, assign, unset, remove };
2035
2042
 
2036
2043
  const $__value = Symbol("$__value");
2037
2044
  const $__href = Symbol("$__href");
@@ -2048,17 +2055,26 @@ var JsonSchema = (function (exports) {
2048
2055
  var reference = { cons: cons$1, isReference, href, value: value$2 };
2049
2056
 
2050
2057
  const JsonPointer$1 = lib$3;
2051
- const curry$8 = justCurryIt;
2058
+ const curry$9 = justCurryIt$1;
2052
2059
  const { resolveUrl: resolveUrl$2, jsonTypeOf: jsonTypeOf$1 } = common$1;
2053
2060
  const Reference$2 = reference;
2054
2061
 
2055
2062
 
2056
2063
  const nil$1 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
2057
2064
  const cons = (instance, id = "") => Object.freeze({ ...nil$1, id: resolveUrl$2(id, ""), instance, value: instance });
2065
+
2066
+ const get$1 = (url, instance = nil$1) => {
2067
+ if (!url.startsWith("#")) {
2068
+ throw Error(`No JSON document found at '${url.split("#")[0]}'`);
2069
+ }
2070
+
2071
+ return Object.freeze({ ...instance, pointer: url.substr(1) });
2072
+ };
2073
+
2058
2074
  const uri$1 = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`;
2059
2075
  const value$1 = (doc) => Reference$2.isReference(doc.value) ? Reference$2.value(doc.value) : doc.value;
2060
2076
  const has$1 = (key, doc) => key in value$1(doc);
2061
- const typeOf$1 = curry$8((doc, type) => jsonTypeOf$1(value$1(doc), type));
2077
+ const typeOf$1 = curry$9((doc, type) => jsonTypeOf$1(value$1(doc), type));
2062
2078
 
2063
2079
  const step$1 = (key, doc) => Object.freeze({
2064
2080
  ...doc,
@@ -2071,28 +2087,75 @@ var JsonSchema = (function (exports) {
2071
2087
 
2072
2088
  const keys$1 = (doc) => Object.keys(value$1(doc));
2073
2089
 
2074
- const map$4 = curry$8((fn, doc) => value$1(doc)
2090
+ const map$4 = curry$9((fn, doc) => value$1(doc)
2075
2091
  .map((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2076
2092
 
2077
- const filter$1 = curry$8((fn, doc) => value$1(doc)
2093
+ const forEach = curry$9((fn, doc) => value$1(doc)
2094
+ .forEach((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2095
+
2096
+ const filter$1 = curry$9((fn, doc) => value$1(doc)
2078
2097
  .map((item, ndx, array, thisArg) => step$1(ndx, doc))
2079
2098
  .filter((item, ndx, array, thisArg) => fn(item, ndx, array, thisArg)));
2080
2099
 
2081
- const reduce$3 = curry$8((fn, acc, doc) => value$1(doc)
2100
+ const reduce$3 = curry$9((fn, acc, doc) => value$1(doc)
2082
2101
  .reduce((acc, item, ndx) => fn(acc, step$1(ndx, doc), ndx), acc));
2083
2102
 
2084
- const every$1 = curry$8((fn, doc) => value$1(doc)
2103
+ const every$1 = curry$9((fn, doc) => value$1(doc)
2085
2104
  .every((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2086
2105
 
2087
- const some$1 = curry$8((fn, doc) => value$1(doc)
2106
+ const some$1 = curry$9((fn, doc) => value$1(doc)
2088
2107
  .some((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2089
2108
 
2090
2109
  const length$1 = (doc) => value$1(doc).length;
2091
2110
 
2092
- var instance = { nil: nil$1, cons, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, step: step$1, entries: entries$3, keys: keys$1, map: map$4, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1, length: length$1 };
2111
+ var instance = {
2112
+ nil: nil$1, cons, get: get$1, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
2113
+ 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
2114
+ };
2093
2115
 
2094
2116
  var entries$2 = async (doc) => Object.entries(await doc);
2095
2117
 
2118
+ var justCurryIt = curry$8;
2119
+
2120
+ /*
2121
+ function add(a, b, c) {
2122
+ return a + b + c;
2123
+ }
2124
+ curry(add)(1)(2)(3); // 6
2125
+ curry(add)(1)(2)(2); // 5
2126
+ curry(add)(2)(4, 3); // 9
2127
+
2128
+ function add(...args) {
2129
+ return args.reduce((sum, n) => sum + n, 0)
2130
+ }
2131
+ var curryAdd4 = curry(add, 4)
2132
+ curryAdd4(1)(2, 3)(4); // 10
2133
+
2134
+ function converter(ratio, input) {
2135
+ return (input*ratio).toFixed(1);
2136
+ }
2137
+ const curriedConverter = curry(converter)
2138
+ const milesToKm = curriedConverter(1.62);
2139
+ milesToKm(35); // 56.7
2140
+ milesToKm(10); // 16.2
2141
+ */
2142
+
2143
+ function curry$8(fn, arity) {
2144
+ return function curried() {
2145
+ if (arity == null) {
2146
+ arity = fn.length;
2147
+ }
2148
+ var args = [].slice.call(arguments);
2149
+ if (args.length >= arity) {
2150
+ return fn.apply(this, args);
2151
+ } else {
2152
+ return function() {
2153
+ return curried.apply(this, args.concat([].slice.call(arguments)));
2154
+ };
2155
+ }
2156
+ };
2157
+ }
2158
+
2096
2159
  const curry$7 = justCurryIt;
2097
2160
 
2098
2161
 
@@ -2406,11 +2469,11 @@ var JsonSchema = (function (exports) {
2406
2469
  };
2407
2470
 
2408
2471
  const parse = (response) => {
2409
- const contentType = contentTypeParser.parse(response.headers.get("content-type")).type;
2410
- if (!(contentType in mediaTypePlugins)) {
2411
- throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType}`);
2472
+ const contentType = contentTypeParser.parse(response.headers.get("content-type"));
2473
+ if (!(contentType.type in mediaTypePlugins)) {
2474
+ throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType.type}`);
2412
2475
  }
2413
- return mediaTypePlugins[contentType].parse(response);
2476
+ return mediaTypePlugins[contentType.type].parse(response, contentType.parameters);
2414
2477
  };
2415
2478
 
2416
2479
  const getContentType = (path) => {
@@ -2425,7 +2488,7 @@ var JsonSchema = (function (exports) {
2425
2488
 
2426
2489
  var mediaTypes = { addPlugin, parse, getContentType };
2427
2490
 
2428
- const curry$1 = justCurryIt;
2491
+ const curry$1 = justCurryIt$1;
2429
2492
  const Pact$a = lib$2;
2430
2493
  const JsonPointer = lib$3;
2431
2494
  const { jsonTypeOf, resolveUrl: resolveUrl$1, urlFragment, pathRelative } = common$1;
@@ -2442,6 +2505,8 @@ var JsonSchema = (function (exports) {
2442
2505
  const dialectJsonSchemaVersion = {};
2443
2506
 
2444
2507
  const setConfig = (jsonSchemaVersion, key, value) => {
2508
+ dialectJsonSchemaVersion[jsonSchemaVersion] = jsonSchemaVersion;
2509
+
2445
2510
  if (!config[jsonSchemaVersion]) {
2446
2511
  config[jsonSchemaVersion] = {};
2447
2512
  }
@@ -2468,23 +2533,25 @@ var JsonSchema = (function (exports) {
2468
2533
  }
2469
2534
  delete schema["$schema"];
2470
2535
 
2471
- // JSON Schema version
2536
+ // Determine JSON Schema version
2472
2537
  if (!(dialectId in dialectJsonSchemaVersion)) {
2473
2538
  if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) {
2539
+ // Self describing 2019-09 meta-schema
2474
2540
  dialectJsonSchemaVersion[dialectId] = core201909Id;
2475
2541
  } else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) {
2542
+ // Self describing 2020-12 meta-schema
2476
2543
  dialectJsonSchemaVersion[dialectId] = core202012Id;
2477
- } else if (dialectId === getSchemaIdentifier(schema, externalId, dialectId)[0]) {
2478
- dialectJsonSchemaVersion[dialectId] = dialectId;
2479
- } else if (!(dialectId in schemaStore)) {
2480
- throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
2481
2544
  } else {
2545
+ // Need to look at meta-schema to determine version
2482
2546
  const metaSchema = schemaStore[dialectId];
2483
- if (metaSchema.vocabulary[core201909Id] === true) {
2547
+ if (!metaSchema) {
2548
+ throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
2549
+ } else if (metaSchema.vocabulary[core201909Id] === true) {
2484
2550
  dialectJsonSchemaVersion[dialectId] = core201909Id;
2485
2551
  } else if (metaSchema.vocabulary[core202012Id] === true) {
2486
2552
  dialectJsonSchemaVersion[dialectId] = core202012Id;
2487
2553
  } else {
2554
+ // Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
2488
2555
  dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
2489
2556
  }
2490
2557
  }
@@ -2623,7 +2690,23 @@ var JsonSchema = (function (exports) {
2623
2690
  throw Error(`Failed to retrieve schema with id: ${id}`);
2624
2691
  }
2625
2692
 
2626
- add$1(await MediaTypes$1.parse(response), id);
2693
+ const [schema, defaultDialectId] = await MediaTypes$1.parse(response);
2694
+
2695
+ let dialectId;
2696
+ if (schema.$schema) {
2697
+ dialectId = resolveUrl$1(schema.$schema, "");
2698
+ } else if (defaultDialectId) {
2699
+ dialectId = resolveUrl$1(id, defaultDialectId);
2700
+ } else {
2701
+ dialectId = "";
2702
+ }
2703
+
2704
+ // Make sure the meta-schema is loaded if this isn't a known dialect
2705
+ if (dialectId && id !== dialectId && !(dialectId in dialectJsonSchemaVersion)) {
2706
+ await get(dialectId);
2707
+ }
2708
+
2709
+ add$1(schema, id, dialectId);
2627
2710
  }
2628
2711
 
2629
2712
  const storedSchema = getStoredSchema(id);
@@ -2707,21 +2790,16 @@ var JsonSchema = (function (exports) {
2707
2790
  const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
2708
2791
  Object.entries(schemaDoc.dynamicAnchors)
2709
2792
  .forEach(([anchor, uri]) => {
2710
- const pointer = urlFragment(uri);
2711
- JsonPointer.assign(pointer, schema, {
2712
- [dynamicAnchorToken]: anchor,
2713
- ...JsonPointer.get(pointer, schema)
2714
- });
2793
+ const pointer = JsonPointer.append(dynamicAnchorToken, urlFragment(uri));
2794
+ JsonPointer.assign(pointer, schema, anchor);
2715
2795
  });
2716
2796
 
2717
2797
  const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
2718
2798
  Object.entries(schemaDoc.anchors)
2719
- .filter(([anchor]) => anchor !== "")
2799
+ .filter(([anchor]) => anchor !== "" && !(anchor in schemaDoc.dynamicAnchors))
2720
2800
  .forEach(([anchor, pointer]) => {
2721
- JsonPointer.assign(pointer, schema, {
2722
- [anchorToken]: anchor,
2723
- ...JsonPointer.get(pointer, schema)
2724
- });
2801
+ const anchorPointer = JsonPointer.append(anchorToken, pointer);
2802
+ JsonPointer.assign(anchorPointer, schema, anchor);
2725
2803
  });
2726
2804
 
2727
2805
  const baseToken = getConfig(schemaDoc.dialectId, "baseToken");
@@ -2760,19 +2838,19 @@ var JsonSchema = (function (exports) {
2760
2838
 
2761
2839
  var invalidSchemaError = InvalidSchemaError$3;
2762
2840
 
2763
- const Schema$R = schema$5;
2841
+ const Schema$P = schema$5;
2764
2842
 
2765
2843
 
2766
- const compile$O = (schema) => Schema$R.value(schema);
2767
- const interpret$O = () => true;
2844
+ const compile$M = (schema) => Schema$P.value(schema);
2845
+ const interpret$M = () => true;
2768
2846
 
2769
- var metaData$4 = { compile: compile$O, interpret: interpret$O };
2847
+ var metaData$4 = { compile: compile$M, interpret: interpret$M };
2770
2848
 
2771
- const curry = justCurryIt;
2849
+ const curry = justCurryIt$1;
2772
2850
  const PubSub$1 = pubsub.exports;
2773
2851
  const { resolveUrl } = common$1;
2774
- const Instance$E = instance;
2775
- const Schema$Q = schema$5;
2852
+ const Instance$C = instance;
2853
+ const Schema$O = schema$5;
2776
2854
  const InvalidSchemaError$2 = invalidSchemaError;
2777
2855
  const MediaTypes = mediaTypes;
2778
2856
  const metaData$3 = metaData$4;
@@ -2784,24 +2862,27 @@ var JsonSchema = (function (exports) {
2784
2862
  let shouldMetaValidate = true;
2785
2863
 
2786
2864
  MediaTypes.addPlugin("application/schema+json", {
2787
- parse: async (response) => await response.json(),
2865
+ parse: async (response, contentTypeParameters) => [
2866
+ await response.json(),
2867
+ contentTypeParameters.schema || contentTypeParameters.profile
2868
+ ],
2788
2869
  matcher: (path) => path.endsWith(".schema.json")
2789
2870
  });
2790
2871
 
2791
2872
  const validate$2 = async (schema, value = undefined, outputFormat = undefined) => {
2792
- const compiled = await compile$N(schema);
2793
- const interpretAst = (value, outputFormat) => interpret$N(compiled, Instance$E.cons(value), outputFormat);
2873
+ const compiled = await compile$L(schema);
2874
+ const interpretAst = (value, outputFormat) => interpret$L(compiled, Instance$C.cons(value), outputFormat);
2794
2875
 
2795
2876
  return value === undefined ? interpretAst : interpretAst(value, outputFormat);
2796
2877
  };
2797
2878
 
2798
- const compile$N = async (schema) => {
2879
+ const compile$L = async (schema) => {
2799
2880
  const ast = { metaData: {} };
2800
2881
  const schemaUri = await compileSchema(schema, ast);
2801
2882
  return { ast, schemaUri };
2802
2883
  };
2803
2884
 
2804
- const interpret$N = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
2885
+ const interpret$L = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
2805
2886
  if (![FLAG, BASIC, DETAILED, VERBOSE].includes(outputFormat)) {
2806
2887
  throw Error(`The '${outputFormat}' error format is not supported`);
2807
2888
  }
@@ -2876,10 +2957,10 @@ var JsonSchema = (function (exports) {
2876
2957
 
2877
2958
  // Vocabularies
2878
2959
  if (!hasKeyword(`${schema.dialectId}#validate`)) {
2879
- const metaSchema = await Schema$Q.get(schema.dialectId);
2960
+ const metaSchema = await Schema$O.get(schema.dialectId);
2880
2961
 
2881
2962
  // Check for mandatory vocabularies
2882
- const mandatoryVocabularies = Schema$Q.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
2963
+ const mandatoryVocabularies = Schema$O.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
2883
2964
  mandatoryVocabularies.forEach((vocabularyId) => {
2884
2965
  if (!metaSchema.vocabulary[vocabularyId]) {
2885
2966
  throw Error(`Vocabulary '${vocabularyId}' must be explicitly declared and required`);
@@ -2902,17 +2983,17 @@ var JsonSchema = (function (exports) {
2902
2983
 
2903
2984
  // Meta validation
2904
2985
  if (shouldMetaValidate && !schema.validated) {
2905
- Schema$Q.markValidated(schema.id);
2986
+ Schema$O.markValidated(schema.id);
2906
2987
 
2907
2988
  // Compile
2908
2989
  if (!(schema.dialectId in metaValidators)) {
2909
- const metaSchema = await Schema$Q.get(schema.dialectId);
2910
- const compiledSchema = await compile$N(metaSchema);
2911
- metaValidators[metaSchema.id] = interpret$N(compiledSchema);
2990
+ const metaSchema = await Schema$O.get(schema.dialectId);
2991
+ const compiledSchema = await compile$L(metaSchema);
2992
+ metaValidators[metaSchema.id] = interpret$L(compiledSchema);
2912
2993
  }
2913
2994
 
2914
2995
  // Interpret
2915
- const schemaInstance = Instance$E.cons(schema.schema, schema.id);
2996
+ const schemaInstance = Instance$C.cons(schema.schema, schema.id);
2916
2997
  const metaResults = metaValidators[schema.dialectId](schemaInstance, metaOutputFormat);
2917
2998
  if (!metaResults.valid) {
2918
2999
  throw new InvalidSchemaError$2(metaResults);
@@ -2931,7 +3012,7 @@ var JsonSchema = (function (exports) {
2931
3012
  };
2932
3013
 
2933
3014
  const followReferences = async (doc) => {
2934
- return Schema$Q.typeOf(doc, "string") ? followReferences(await Schema$Q.get(Schema$Q.value(doc), doc)) : doc;
3015
+ return Schema$O.typeOf(doc, "string") ? followReferences(await Schema$O.get(Schema$O.value(doc), doc)) : doc;
2935
3016
  };
2936
3017
 
2937
3018
  const interpretSchema = (schemaUri, instance, ast, dynamicAnchors) => {
@@ -2959,12 +3040,12 @@ var JsonSchema = (function (exports) {
2959
3040
  };
2960
3041
 
2961
3042
  const add = (schema, url = "", defaultSchemaVersion = "") => {
2962
- const id = Schema$Q.add(schema, url, defaultSchemaVersion);
3043
+ const id = Schema$O.add(schema, url, defaultSchemaVersion);
2963
3044
  delete metaValidators[id];
2964
3045
  };
2965
3046
 
2966
3047
  var core$2 = {
2967
- validate: validate$2, compile: compile$N, interpret: interpret$N,
3048
+ validate: validate$2, compile: compile$L, interpret: interpret$L,
2968
3049
  setMetaOutputFormat, setShouldMetaValidate, FLAG, BASIC, DETAILED, VERBOSE,
2969
3050
  add, getKeyword, hasKeyword, defineVocabulary,
2970
3051
  compileSchema, interpretSchema, collectEvaluatedProperties: collectEvaluatedProperties$e, collectEvaluatedItems: collectEvaluatedItems$f,
@@ -2974,30 +3055,30 @@ var JsonSchema = (function (exports) {
2974
3055
  const Pact$9 = lib$2;
2975
3056
  const PubSub = pubsub.exports;
2976
3057
  const Core$x = core$2;
2977
- const Instance$D = instance;
2978
- const Schema$P = schema$5;
3058
+ const Instance$B = instance;
3059
+ const Schema$N = schema$5;
2979
3060
 
2980
3061
 
2981
- const compile$M = async (schema, ast) => {
2982
- const url = Schema$P.uri(schema);
3062
+ const compile$K = async (schema, ast) => {
3063
+ const url = Schema$N.uri(schema);
2983
3064
  if (!(url in ast)) {
2984
3065
  ast[url] = false; // Place dummy entry in ast to avoid recursive loops
2985
3066
 
2986
- const schemaValue = Schema$P.value(schema);
3067
+ const schemaValue = Schema$N.value(schema);
2987
3068
  if (!["object", "boolean"].includes(typeof schemaValue)) {
2988
- throw Error(`No schema found at '${Schema$P.uri(schema)}'`);
3069
+ throw Error(`No schema found at '${Schema$N.uri(schema)}'`);
2989
3070
  }
2990
3071
 
2991
3072
  ast[url] = [
2992
3073
  `${schema.dialectId}#validate`,
2993
- Schema$P.uri(schema),
3074
+ Schema$N.uri(schema),
2994
3075
  typeof schemaValue === "boolean" ? schemaValue : await Pact$9.pipeline([
2995
- Schema$P.entries,
3076
+ Schema$N.entries,
2996
3077
  Pact$9.map(([keyword, keywordSchema]) => [`${schema.dialectId}#${keyword}`, keywordSchema]),
2997
3078
  Pact$9.filter(([keywordId]) => keywordId !== `${schema.dialectId}#validate`),
2998
3079
  Pact$9.map(async ([keywordId, keywordSchema]) => {
2999
3080
  const keywordAst = await Core$x.getKeyword(keywordId).compile(keywordSchema, ast, schema);
3000
- return [keywordId, Schema$P.uri(keywordSchema), keywordAst];
3081
+ return [keywordId, Schema$N.uri(keywordSchema), keywordAst];
3001
3082
  }),
3002
3083
  Pact$9.all
3003
3084
  ], schema)
@@ -3007,7 +3088,7 @@ var JsonSchema = (function (exports) {
3007
3088
  return url;
3008
3089
  };
3009
3090
 
3010
- const interpret$M = (uri, instance, ast, dynamicAnchors) => {
3091
+ const interpret$K = (uri, instance, ast, dynamicAnchors) => {
3011
3092
  const [keywordId, schemaUrl, nodes] = ast[uri];
3012
3093
 
3013
3094
  PubSub.publishSync("result.start");
@@ -3019,7 +3100,7 @@ var JsonSchema = (function (exports) {
3019
3100
  PubSub.publishSync("result", {
3020
3101
  keyword: keywordId,
3021
3102
  absoluteKeywordLocation: schemaUrl,
3022
- instanceLocation: Instance$D.uri(instance),
3103
+ instanceLocation: Instance$B.uri(instance),
3023
3104
  valid: isValid,
3024
3105
  ast: keywordValue
3025
3106
  });
@@ -3030,7 +3111,7 @@ var JsonSchema = (function (exports) {
3030
3111
  PubSub.publishSync("result", {
3031
3112
  keyword: keywordId,
3032
3113
  absoluteKeywordLocation: schemaUrl,
3033
- instanceLocation: Instance$D.uri(instance),
3114
+ instanceLocation: Instance$B.uri(instance),
3034
3115
  valid: isValid,
3035
3116
  ast: uri
3036
3117
  });
@@ -3068,7 +3149,7 @@ var JsonSchema = (function (exports) {
3068
3149
  }, new Set());
3069
3150
  };
3070
3151
 
3071
- var validate$1 = { compile: compile$M, interpret: interpret$M, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
3152
+ var validate$1 = { compile: compile$K, interpret: interpret$K, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
3072
3153
 
3073
3154
  const metaData$2 = metaData$4;
3074
3155
  const validate = validate$1;
@@ -3077,90 +3158,90 @@ var JsonSchema = (function (exports) {
3077
3158
  var keywords$6 = { metaData: metaData$2, validate };
3078
3159
 
3079
3160
  const Core$w = core$2;
3080
- const Schema$O = schema$5;
3081
- const Instance$C = instance;
3161
+ const Schema$M = schema$5;
3162
+ const Instance$A = instance;
3082
3163
  const Reference = reference;
3083
3164
  const Keywords$2 = keywords$6;
3084
3165
  const InvalidSchemaError$1 = invalidSchemaError;
3085
3166
 
3086
3167
 
3087
- var lib$1 = { Core: Core$w, Schema: Schema$O, Instance: Instance$C, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
3168
+ var lib$1 = { Core: Core$w, Schema: Schema$M, Instance: Instance$A, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
3088
3169
 
3089
- const { Core: Core$v, Schema: Schema$N, Instance: Instance$B } = lib$1;
3170
+ const { Core: Core$v, Schema: Schema$L, Instance: Instance$z } = lib$1;
3090
3171
 
3091
3172
 
3092
- const compile$L = async (schema, ast, parentSchema) => {
3093
- const items = await Schema$N.step("items", parentSchema);
3094
- const numberOfItems = Schema$N.typeOf(items, "array") ? Schema$N.length(items) : Number.MAX_SAFE_INTEGER;
3173
+ const compile$J = async (schema, ast, parentSchema) => {
3174
+ const items = await Schema$L.step("items", parentSchema);
3175
+ const numberOfItems = Schema$L.typeOf(items, "array") ? Schema$L.length(items) : Number.MAX_SAFE_INTEGER;
3095
3176
 
3096
- if (Schema$N.typeOf(schema, "boolean")) {
3097
- return [numberOfItems, Schema$N.value(schema)];
3177
+ if (Schema$L.typeOf(schema, "boolean")) {
3178
+ return [numberOfItems, Schema$L.value(schema)];
3098
3179
  } else {
3099
3180
  return [numberOfItems, await Core$v.compileSchema(schema, ast)];
3100
3181
  }
3101
3182
  };
3102
3183
 
3103
- const interpret$L = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3104
- if (!Instance$B.typeOf(instance, "array")) {
3184
+ const interpret$J = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3185
+ if (!Instance$z.typeOf(instance, "array")) {
3105
3186
  return true;
3106
3187
  }
3107
3188
 
3108
3189
  if (typeof additionalItems === "string") {
3109
- return Instance$B.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3190
+ return Instance$z.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3110
3191
  } else {
3111
- return Instance$B.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
3192
+ return Instance$z.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
3112
3193
  }
3113
3194
  };
3114
3195
 
3115
- var additionalItems = { compile: compile$L, interpret: interpret$L };
3196
+ var additionalItems = { compile: compile$J, interpret: interpret$J };
3116
3197
 
3117
- const { Core: Core$u, Schema: Schema$M, Instance: Instance$A } = lib$1;
3198
+ const { Core: Core$u, Schema: Schema$K, Instance: Instance$y } = lib$1;
3118
3199
 
3119
3200
 
3120
- const compile$K = async (schema, ast, parentSchema) => {
3121
- const items = await Schema$M.step("items", parentSchema);
3122
- const numberOfItems = Schema$M.typeOf(items, "array") ? Schema$M.length(items) : Number.MAX_SAFE_INTEGER;
3201
+ const compile$I = async (schema, ast, parentSchema) => {
3202
+ const items = await Schema$K.step("items", parentSchema);
3203
+ const numberOfItems = Schema$K.typeOf(items, "array") ? Schema$K.length(items) : Number.MAX_SAFE_INTEGER;
3123
3204
 
3124
3205
  return [numberOfItems, await Core$u.compileSchema(schema, ast)];
3125
3206
  };
3126
3207
 
3127
- const interpret$K = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3128
- if (!Instance$A.typeOf(instance, "array")) {
3208
+ const interpret$I = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3209
+ if (!Instance$y.typeOf(instance, "array")) {
3129
3210
  return true;
3130
3211
  }
3131
3212
 
3132
- return Instance$A.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3213
+ return Instance$y.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3133
3214
  };
3134
3215
 
3135
3216
  const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
3136
- return interpret$K(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$A.map((item, ndx) => ndx, instance));
3217
+ return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
3137
3218
  };
3138
3219
 
3139
- var additionalItems6 = { compile: compile$K, interpret: interpret$K, collectEvaluatedItems: collectEvaluatedItems$d };
3220
+ var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
3140
3221
 
3141
- const { Core: Core$t, Schema: Schema$L, Instance: Instance$z } = lib$1;
3222
+ const { Core: Core$t, Schema: Schema$J, Instance: Instance$x } = lib$1;
3142
3223
 
3143
3224
 
3144
- const compile$J = async (schema, ast, parentSchema) => {
3145
- const properties = await Schema$L.step("properties", parentSchema);
3146
- const propertyNames = Schema$L.typeOf(properties, "object") ? Schema$L.keys(properties) : [];
3225
+ const compile$H = async (schema, ast, parentSchema) => {
3226
+ const properties = await Schema$J.step("properties", parentSchema);
3227
+ const propertyNames = Schema$J.typeOf(properties, "object") ? Schema$J.keys(properties) : [];
3147
3228
 
3148
- const patternProperties = await Schema$L.step("patternProperties", parentSchema);
3149
- const propertyNamePatterns = Schema$L.typeOf(patternProperties, "object") ? Schema$L.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3229
+ const patternProperties = await Schema$J.step("patternProperties", parentSchema);
3230
+ const propertyNamePatterns = Schema$J.typeOf(patternProperties, "object") ? Schema$J.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3150
3231
 
3151
- if (Schema$L.typeOf(schema, "boolean")) {
3152
- return [propertyNames, propertyNamePatterns, Schema$L.value(schema)];
3232
+ if (Schema$J.typeOf(schema, "boolean")) {
3233
+ return [propertyNames, propertyNamePatterns, Schema$J.value(schema)];
3153
3234
  } else {
3154
3235
  return [propertyNames, propertyNamePatterns, await Core$t.compileSchema(schema, ast)];
3155
3236
  }
3156
3237
  };
3157
3238
 
3158
- const interpret$J = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3159
- if (!Instance$z.typeOf(instance, "object")) {
3239
+ const interpret$H = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3240
+ if (!Instance$x.typeOf(instance, "object")) {
3160
3241
  return true;
3161
3242
  }
3162
3243
 
3163
- const properties = Instance$z.entries(instance)
3244
+ const properties = Instance$x.entries(instance)
3164
3245
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)));
3165
3246
 
3166
3247
  if (typeof additionalProperties === "string") {
@@ -3170,47 +3251,47 @@ var JsonSchema = (function (exports) {
3170
3251
  }
3171
3252
  };
3172
3253
 
3173
- var additionalProperties = { compile: compile$J, interpret: interpret$J };
3254
+ var additionalProperties = { compile: compile$H, interpret: interpret$H };
3174
3255
 
3175
- const { Core: Core$s, Schema: Schema$K, Instance: Instance$y } = lib$1;
3256
+ const { Core: Core$s, Schema: Schema$I, Instance: Instance$w } = lib$1;
3176
3257
 
3177
3258
 
3178
- const compile$I = async (schema, ast, parentSchema) => {
3179
- const propertiesSchema = await Schema$K.step("properties", parentSchema);
3180
- const propertyNames = Schema$K.typeOf(propertiesSchema, "object") ? Schema$K.keys(propertiesSchema) : [];
3259
+ const compile$G = async (schema, ast, parentSchema) => {
3260
+ const propertiesSchema = await Schema$I.step("properties", parentSchema);
3261
+ const propertyNames = Schema$I.typeOf(propertiesSchema, "object") ? Schema$I.keys(propertiesSchema) : [];
3181
3262
 
3182
- const patternProperties = await Schema$K.step("patternProperties", parentSchema);
3183
- const propertyNamePatterns = Schema$K.typeOf(patternProperties, "object") ? Schema$K.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3263
+ const patternProperties = await Schema$I.step("patternProperties", parentSchema);
3264
+ const propertyNamePatterns = Schema$I.typeOf(patternProperties, "object") ? Schema$I.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3184
3265
 
3185
3266
  return [propertyNames, propertyNamePatterns, await Core$s.compileSchema(schema, ast)];
3186
3267
  };
3187
3268
 
3188
- const interpret$I = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3189
- if (!Instance$y.typeOf(instance, "object")) {
3269
+ const interpret$G = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3270
+ if (!Instance$w.typeOf(instance, "object")) {
3190
3271
  return true;
3191
3272
  }
3192
3273
 
3193
- return Instance$y.entries(instance)
3274
+ return Instance$w.entries(instance)
3194
3275
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)))
3195
3276
  .every(([, property]) => Core$s.interpretSchema(additionalProperties, property, ast, dynamicAnchors));
3196
3277
  };
3197
3278
 
3198
3279
  const collectEvaluatedProperties$c = (keywordValue, instance, ast, dynamicAnchors) => {
3199
- return interpret$I(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
3280
+ return interpret$G(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
3200
3281
  };
3201
3282
 
3202
- var additionalProperties6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedProperties: collectEvaluatedProperties$c };
3283
+ var additionalProperties6 = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$c };
3203
3284
 
3204
- const { Core: Core$r, Schema: Schema$J } = lib$1;
3285
+ const { Core: Core$r, Schema: Schema$H } = lib$1;
3205
3286
  const Pact$8 = lib$2;
3206
3287
 
3207
3288
 
3208
- const compile$H = (schema, ast) => Pact$8.pipeline([
3209
- Schema$J.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
3289
+ const compile$F = (schema, ast) => Pact$8.pipeline([
3290
+ Schema$H.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
3210
3291
  Pact$8.all
3211
3292
  ], schema);
3212
3293
 
3213
- const interpret$H = (allOf, instance, ast, dynamicAnchors) => {
3294
+ const interpret$F = (allOf, instance, ast, dynamicAnchors) => {
3214
3295
  return allOf.every((schemaUrl) => Core$r.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
3215
3296
  };
3216
3297
 
@@ -3228,18 +3309,18 @@ var JsonSchema = (function (exports) {
3228
3309
  }, new Set());
3229
3310
  };
3230
3311
 
3231
- var allOf = { compile: compile$H, interpret: interpret$H, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
3312
+ var allOf = { compile: compile$F, interpret: interpret$F, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
3232
3313
 
3233
- const { Core: Core$q, Schema: Schema$I } = lib$1;
3314
+ const { Core: Core$q, Schema: Schema$G } = lib$1;
3234
3315
  const Pact$7 = lib$2;
3235
3316
 
3236
3317
 
3237
- const compile$G = (schema, ast) => Pact$7.pipeline([
3238
- Schema$I.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
3318
+ const compile$E = (schema, ast) => Pact$7.pipeline([
3319
+ Schema$G.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
3239
3320
  Pact$7.all
3240
3321
  ], schema);
3241
3322
 
3242
- const interpret$G = (anyOf, instance, ast, dynamicAnchors) => {
3323
+ const interpret$E = (anyOf, instance, ast, dynamicAnchors) => {
3243
3324
  const matches = anyOf.filter((schemaUrl) => Core$q.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
3244
3325
  return matches.length > 0;
3245
3326
  };
@@ -3258,7 +3339,7 @@ var JsonSchema = (function (exports) {
3258
3339
  }, false);
3259
3340
  };
3260
3341
 
3261
- var anyOf = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
3342
+ var anyOf = { compile: compile$E, interpret: interpret$E, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
3262
3343
 
3263
3344
  var keyList = Object.keys;
3264
3345
  var native_stringify = JSON.stringify;
@@ -3319,92 +3400,92 @@ var JsonSchema = (function (exports) {
3319
3400
 
3320
3401
  var fastestStableStringify = function(obj) { return '' + stringify(obj, false); };
3321
3402
 
3322
- const { Schema: Schema$H, Instance: Instance$x } = lib$1;
3403
+ const { Schema: Schema$F, Instance: Instance$v } = lib$1;
3323
3404
  const jsonStringify$2 = fastestStableStringify;
3324
3405
 
3325
3406
 
3326
- const compile$F = (schema) => jsonStringify$2(Schema$H.value(schema));
3327
- const interpret$F = (const_, instance) => jsonStringify$2(Instance$x.value(instance)) === const_;
3407
+ const compile$D = (schema) => jsonStringify$2(Schema$F.value(schema));
3408
+ const interpret$D = (const_, instance) => jsonStringify$2(Instance$v.value(instance)) === const_;
3328
3409
 
3329
- var _const = { compile: compile$F, interpret: interpret$F };
3410
+ var _const = { compile: compile$D, interpret: interpret$D };
3330
3411
 
3331
- const { Core: Core$p, Instance: Instance$w } = lib$1;
3412
+ const { Core: Core$p, Instance: Instance$u } = lib$1;
3332
3413
 
3333
3414
 
3334
- const compile$E = (schema, ast) => Core$p.compileSchema(schema, ast);
3415
+ const compile$C = (schema, ast) => Core$p.compileSchema(schema, ast);
3335
3416
 
3336
- const interpret$E = (contains, instance, ast, dynamicAnchors) => {
3337
- return !Instance$w.typeOf(instance, "array") || Instance$w.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
3417
+ const interpret$C = (contains, instance, ast, dynamicAnchors) => {
3418
+ return !Instance$u.typeOf(instance, "array") || Instance$u.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
3338
3419
  };
3339
3420
 
3340
- var contains = { compile: compile$E, interpret: interpret$E };
3421
+ var contains = { compile: compile$C, interpret: interpret$C };
3341
3422
 
3342
- const { Core: Core$o, Schema: Schema$G, Instance: Instance$v } = lib$1;
3423
+ const { Core: Core$o, Schema: Schema$E, Instance: Instance$t } = lib$1;
3343
3424
 
3344
3425
 
3345
- const compile$D = async (schema, ast, parentSchema) => {
3426
+ const compile$B = async (schema, ast, parentSchema) => {
3346
3427
  const contains = await Core$o.compileSchema(schema, ast);
3347
3428
 
3348
- const minContainsSchema = await Schema$G.step("minContains", parentSchema);
3349
- const minContains = Schema$G.typeOf(minContainsSchema, "number") ? Schema$G.value(minContainsSchema) : 1;
3429
+ const minContainsSchema = await Schema$E.step("minContains", parentSchema);
3430
+ const minContains = Schema$E.typeOf(minContainsSchema, "number") ? Schema$E.value(minContainsSchema) : 1;
3350
3431
 
3351
- const maxContainsSchema = await Schema$G.step("maxContains", parentSchema);
3352
- const maxContains = Schema$G.typeOf(maxContainsSchema, "number") ? Schema$G.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
3432
+ const maxContainsSchema = await Schema$E.step("maxContains", parentSchema);
3433
+ const maxContains = Schema$E.typeOf(maxContainsSchema, "number") ? Schema$E.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
3353
3434
 
3354
3435
  return { contains, minContains, maxContains };
3355
3436
  };
3356
3437
 
3357
- const interpret$D = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
3358
- if (!Instance$v.typeOf(instance, "array")) {
3438
+ const interpret$B = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
3439
+ if (!Instance$t.typeOf(instance, "array")) {
3359
3440
  return true;
3360
3441
  }
3361
3442
 
3362
- const matches = Instance$v.reduce((matches, item) => {
3443
+ const matches = Instance$t.reduce((matches, item) => {
3363
3444
  return Core$o.interpretSchema(contains, item, ast, dynamicAnchors) ? matches + 1 : matches;
3364
3445
  }, 0, instance);
3365
3446
  return matches >= minContains && matches <= maxContains;
3366
3447
  };
3367
3448
 
3368
3449
  const collectEvaluatedItems$a = (keywordValue, instance, ast, dynamicAnchors) => {
3369
- return interpret$D(keywordValue, instance, ast, dynamicAnchors) && Instance$v.reduce((matchedIndexes, item, itemIndex) => {
3450
+ return interpret$B(keywordValue, instance, ast, dynamicAnchors) && Instance$t.reduce((matchedIndexes, item, itemIndex) => {
3370
3451
  return Core$o.interpretSchema(keywordValue.contains, item, ast, dynamicAnchors) ? matchedIndexes.add(itemIndex) : matchedIndexes;
3371
3452
  }, new Set(), instance);
3372
3453
  };
3373
3454
 
3374
- var containsMinContainsMaxContains = { compile: compile$D, interpret: interpret$D, collectEvaluatedItems: collectEvaluatedItems$a };
3455
+ var containsMinContainsMaxContains = { compile: compile$B, interpret: interpret$B, collectEvaluatedItems: collectEvaluatedItems$a };
3375
3456
 
3376
- const { Core: Core$n, Schema: Schema$F } = lib$1;
3457
+ const { Core: Core$n, Schema: Schema$D } = lib$1;
3377
3458
  const Pact$6 = lib$2;
3378
3459
 
3379
3460
 
3380
- const compile$C = async (schema, ast) => {
3461
+ const compile$A = async (schema, ast) => {
3381
3462
  await Pact$6.pipeline([
3382
- Schema$F.entries,
3463
+ Schema$D.entries,
3383
3464
  Pact$6.map(([, definitionSchema]) => Core$n.compileSchema(definitionSchema, ast)),
3384
3465
  Pact$6.all
3385
3466
  ], schema);
3386
3467
  };
3387
3468
 
3388
- const interpret$C = () => true;
3469
+ const interpret$A = () => true;
3389
3470
 
3390
- var definitions = { compile: compile$C, interpret: interpret$C };
3471
+ var definitions = { compile: compile$A, interpret: interpret$A };
3391
3472
 
3392
- const { Core: Core$m, Schema: Schema$E, Instance: Instance$u } = lib$1;
3473
+ const { Core: Core$m, Schema: Schema$C, Instance: Instance$s } = lib$1;
3393
3474
  const Pact$5 = lib$2;
3394
3475
 
3395
3476
 
3396
- const compile$B = (schema, ast) => Pact$5.pipeline([
3397
- Schema$E.entries,
3477
+ const compile$z = (schema, ast) => Pact$5.pipeline([
3478
+ Schema$C.entries,
3398
3479
  Pact$5.map(async ([key, dependency]) => {
3399
- return [key, Schema$E.typeOf(dependency, "array") ? Schema$E.value(dependency) : await Core$m.compileSchema(dependency, ast)];
3480
+ return [key, Schema$C.typeOf(dependency, "array") ? Schema$C.value(dependency) : await Core$m.compileSchema(dependency, ast)];
3400
3481
  }),
3401
3482
  Pact$5.all
3402
3483
  ], schema);
3403
3484
 
3404
- const interpret$B = (dependencies, instance, ast, dynamicAnchors) => {
3405
- const value = Instance$u.value(instance);
3485
+ const interpret$z = (dependencies, instance, ast, dynamicAnchors) => {
3486
+ const value = Instance$s.value(instance);
3406
3487
 
3407
- return !Instance$u.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
3488
+ return !Instance$s.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
3408
3489
  if (!(propertyName in value)) {
3409
3490
  return true;
3410
3491
  }
@@ -3417,49 +3498,49 @@ var JsonSchema = (function (exports) {
3417
3498
  });
3418
3499
  };
3419
3500
 
3420
- var dependencies = { compile: compile$B, interpret: interpret$B };
3501
+ var dependencies = { compile: compile$z, interpret: interpret$z };
3421
3502
 
3422
- const { Schema: Schema$D, Instance: Instance$t } = lib$1;
3503
+ const { Schema: Schema$B, Instance: Instance$r } = lib$1;
3423
3504
  const Pact$4 = lib$2;
3424
3505
 
3425
3506
 
3426
- const compile$A = (schema) => Pact$4.pipeline([
3427
- Schema$D.entries,
3428
- Pact$4.map(([key, dependentRequired]) => [key, Schema$D.value(dependentRequired)]),
3507
+ const compile$y = (schema) => Pact$4.pipeline([
3508
+ Schema$B.entries,
3509
+ Pact$4.map(([key, dependentRequired]) => [key, Schema$B.value(dependentRequired)]),
3429
3510
  Pact$4.all
3430
3511
  ], schema);
3431
3512
 
3432
- const interpret$A = (dependentRequired, instance) => {
3433
- const value = Instance$t.value(instance);
3513
+ const interpret$y = (dependentRequired, instance) => {
3514
+ const value = Instance$r.value(instance);
3434
3515
 
3435
- return !Instance$t.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
3516
+ return !Instance$r.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
3436
3517
  return !(propertyName in value) || required.every((key) => key in value);
3437
3518
  });
3438
3519
  };
3439
3520
 
3440
- var dependentRequired = { compile: compile$A, interpret: interpret$A };
3521
+ var dependentRequired = { compile: compile$y, interpret: interpret$y };
3441
3522
 
3442
- const { Core: Core$l, Schema: Schema$C, Instance: Instance$s } = lib$1;
3523
+ const { Core: Core$l, Schema: Schema$A, Instance: Instance$q } = lib$1;
3443
3524
  const Pact$3 = lib$2;
3444
3525
 
3445
3526
 
3446
- const compile$z = (schema, ast) => Pact$3.pipeline([
3447
- Schema$C.entries,
3527
+ const compile$x = (schema, ast) => Pact$3.pipeline([
3528
+ Schema$A.entries,
3448
3529
  Pact$3.map(async ([key, dependentSchema]) => [key, await Core$l.compileSchema(dependentSchema, ast)]),
3449
3530
  Pact$3.all
3450
3531
  ], schema);
3451
3532
 
3452
- const interpret$z = (dependentSchemas, instance, ast, dynamicAnchors) => {
3453
- const value = Instance$s.value(instance);
3533
+ const interpret$x = (dependentSchemas, instance, ast, dynamicAnchors) => {
3534
+ const value = Instance$q.value(instance);
3454
3535
 
3455
- return !Instance$s.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
3536
+ return !Instance$q.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
3456
3537
  return !(propertyName in value) || Core$l.interpretSchema(dependentSchema, instance, ast, dynamicAnchors);
3457
3538
  });
3458
3539
  };
3459
3540
 
3460
3541
  const collectEvaluatedProperties$9 = (dependentSchemas, instance, ast, dynamicAnchors) => {
3461
3542
  return dependentSchemas.reduce((acc, [propertyName, dependentSchema]) => {
3462
- if (!acc || !Instance$s.has(propertyName, instance)) {
3543
+ if (!acc || !Instance$q.has(propertyName, instance)) {
3463
3544
  return acc;
3464
3545
  }
3465
3546
 
@@ -3468,39 +3549,39 @@ var JsonSchema = (function (exports) {
3468
3549
  }, []);
3469
3550
  };
3470
3551
 
3471
- var dependentSchemas = { compile: compile$z, interpret: interpret$z, collectEvaluatedProperties: collectEvaluatedProperties$9 };
3552
+ var dependentSchemas = { compile: compile$x, interpret: interpret$x, collectEvaluatedProperties: collectEvaluatedProperties$9 };
3472
3553
 
3473
- const { Schema: Schema$B, Instance: Instance$r } = lib$1;
3554
+ const { Schema: Schema$z, Instance: Instance$p } = lib$1;
3474
3555
  const jsonStringify$1 = fastestStableStringify;
3475
3556
 
3476
3557
 
3477
- const compile$y = (schema) => Schema$B.value(schema).map(jsonStringify$1);
3478
- const interpret$y = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$r.value(instance)) === enumValue);
3558
+ const compile$w = (schema) => Schema$z.value(schema).map(jsonStringify$1);
3559
+ const interpret$w = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$p.value(instance)) === enumValue);
3479
3560
 
3480
- var _enum = { compile: compile$y, interpret: interpret$y };
3561
+ var _enum = { compile: compile$w, interpret: interpret$w };
3481
3562
 
3482
- const { Schema: Schema$A, Instance: Instance$q } = lib$1;
3563
+ const { Schema: Schema$y, Instance: Instance$o } = lib$1;
3483
3564
 
3484
3565
 
3485
- const compile$x = async (schema) => Schema$A.value(schema);
3486
- const interpret$x = (exclusiveMaximum, instance) => !Instance$q.typeOf(instance, "number") || Instance$q.value(instance) < exclusiveMaximum;
3566
+ const compile$v = async (schema) => Schema$y.value(schema);
3567
+ const interpret$v = (exclusiveMaximum, instance) => !Instance$o.typeOf(instance, "number") || Instance$o.value(instance) < exclusiveMaximum;
3487
3568
 
3488
- var exclusiveMaximum = { compile: compile$x, interpret: interpret$x };
3569
+ var exclusiveMaximum = { compile: compile$v, interpret: interpret$v };
3489
3570
 
3490
- const { Schema: Schema$z, Instance: Instance$p } = lib$1;
3571
+ const { Schema: Schema$x, Instance: Instance$n } = lib$1;
3491
3572
 
3492
3573
 
3493
- const compile$w = async (schema) => Schema$z.value(schema);
3494
- const interpret$w = (exclusiveMinimum, instance) => !Instance$p.typeOf(instance, "number") || Instance$p.value(instance) > exclusiveMinimum;
3574
+ const compile$u = async (schema) => Schema$x.value(schema);
3575
+ const interpret$u = (exclusiveMinimum, instance) => !Instance$n.typeOf(instance, "number") || Instance$n.value(instance) > exclusiveMinimum;
3495
3576
 
3496
- var exclusiveMinimum = { compile: compile$w, interpret: interpret$w };
3577
+ var exclusiveMinimum = { compile: compile$u, interpret: interpret$u };
3497
3578
 
3498
3579
  const { Core: Core$k } = lib$1;
3499
3580
 
3500
3581
 
3501
- const compile$v = (schema, ast) => Core$k.compileSchema(schema, ast);
3582
+ const compile$t = (schema, ast) => Core$k.compileSchema(schema, ast);
3502
3583
 
3503
- const interpret$v = (ifSchema, instance, ast, dynamicAnchors) => {
3584
+ const interpret$t = (ifSchema, instance, ast, dynamicAnchors) => {
3504
3585
  Core$k.interpretSchema(ifSchema, instance, ast, dynamicAnchors);
3505
3586
  return true;
3506
3587
  };
@@ -3513,21 +3594,21 @@ var JsonSchema = (function (exports) {
3513
3594
  return Core$k.collectEvaluatedItems(ifSchema, instance, ast, dynamicAnchors) || new Set();
3514
3595
  };
3515
3596
 
3516
- var _if = { compile: compile$v, interpret: interpret$v, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
3597
+ var _if = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
3517
3598
 
3518
- const { Core: Core$j, Schema: Schema$y } = lib$1;
3599
+ const { Core: Core$j, Schema: Schema$w } = lib$1;
3519
3600
 
3520
3601
 
3521
- const compile$u = async (schema, ast, parentSchema) => {
3522
- if (Schema$y.has("if", parentSchema)) {
3523
- const ifSchema = await Schema$y.step("if", parentSchema);
3602
+ const compile$s = async (schema, ast, parentSchema) => {
3603
+ if (Schema$w.has("if", parentSchema)) {
3604
+ const ifSchema = await Schema$w.step("if", parentSchema);
3524
3605
  return [await Core$j.compileSchema(ifSchema, ast), await Core$j.compileSchema(schema, ast)];
3525
3606
  } else {
3526
3607
  return [];
3527
3608
  }
3528
3609
  };
3529
3610
 
3530
- const interpret$u = ([guard, block], instance, ast, dynamicAnchors) => {
3611
+ const interpret$s = ([guard, block], instance, ast, dynamicAnchors) => {
3531
3612
  return guard === undefined || !quietInterpretSchema$1(guard, instance, ast, dynamicAnchors) || Core$j.interpretSchema(block, instance, ast, dynamicAnchors);
3532
3613
  };
3533
3614
 
@@ -3557,21 +3638,21 @@ var JsonSchema = (function (exports) {
3557
3638
  return Core$j.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
3558
3639
  };
3559
3640
 
3560
- var then = { compile: compile$u, interpret: interpret$u, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
3641
+ var then = { compile: compile$s, interpret: interpret$s, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
3561
3642
 
3562
- const { Core: Core$i, Schema: Schema$x } = lib$1;
3643
+ const { Core: Core$i, Schema: Schema$v } = lib$1;
3563
3644
 
3564
3645
 
3565
- const compile$t = async (schema, ast, parentSchema) => {
3566
- if (Schema$x.has("if", parentSchema)) {
3567
- const ifSchema = await Schema$x.step("if", parentSchema);
3646
+ const compile$r = async (schema, ast, parentSchema) => {
3647
+ if (Schema$v.has("if", parentSchema)) {
3648
+ const ifSchema = await Schema$v.step("if", parentSchema);
3568
3649
  return [await Core$i.compileSchema(ifSchema, ast), await Core$i.compileSchema(schema, ast)];
3569
3650
  } else {
3570
3651
  return [];
3571
3652
  }
3572
3653
  };
3573
3654
 
3574
- const interpret$t = ([guard, block], instance, ast, dynamicAnchors) => {
3655
+ const interpret$r = ([guard, block], instance, ast, dynamicAnchors) => {
3575
3656
  return guard === undefined || quietInterpretSchema(guard, instance, ast, dynamicAnchors) || Core$i.interpretSchema(block, instance, ast, dynamicAnchors);
3576
3657
  };
3577
3658
 
@@ -3601,140 +3682,124 @@ var JsonSchema = (function (exports) {
3601
3682
  return Core$i.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
3602
3683
  };
3603
3684
 
3604
- var _else = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
3685
+ var _else = { compile: compile$r, interpret: interpret$r, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
3605
3686
 
3606
- const { Core: Core$h, Schema: Schema$w, Instance: Instance$o } = lib$1;
3687
+ const { Core: Core$h, Schema: Schema$u, Instance: Instance$m } = lib$1;
3607
3688
 
3608
3689
 
3609
- const compile$s = async (schema, ast) => {
3610
- if (Schema$w.typeOf(schema, "array")) {
3611
- const tupleItems = await Schema$w.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
3690
+ const compile$q = async (schema, ast) => {
3691
+ if (Schema$u.typeOf(schema, "array")) {
3692
+ const tupleItems = await Schema$u.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
3612
3693
  return Promise.all(tupleItems);
3613
3694
  } else {
3614
3695
  return Core$h.compileSchema(schema, ast);
3615
3696
  }
3616
3697
  };
3617
3698
 
3618
- const interpret$s = (items, instance, ast, dynamicAnchors) => {
3619
- if (!Instance$o.typeOf(instance, "array")) {
3699
+ const interpret$q = (items, instance, ast, dynamicAnchors) => {
3700
+ if (!Instance$m.typeOf(instance, "array")) {
3620
3701
  return true;
3621
3702
  }
3622
3703
 
3623
3704
  if (typeof items === "string") {
3624
- return Instance$o.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
3705
+ return Instance$m.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
3625
3706
  } else {
3626
- return Instance$o.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
3707
+ return Instance$m.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
3627
3708
  }
3628
3709
  };
3629
3710
 
3630
3711
  const collectEvaluatedItems$6 = (items, instance, ast, dynamicAnchors) => {
3631
- return interpret$s(items, instance, ast, dynamicAnchors) && (typeof items === "string"
3632
- ? new Set(Instance$o.map((item, itemIndex) => itemIndex, instance))
3712
+ return interpret$q(items, instance, ast, dynamicAnchors) && (typeof items === "string"
3713
+ ? new Set(Instance$m.map((item, itemIndex) => itemIndex, instance))
3633
3714
  : new Set(items.map((item, itemIndex) => itemIndex)));
3634
3715
  };
3635
3716
 
3636
- var items = { compile: compile$s, interpret: interpret$s, collectEvaluatedItems: collectEvaluatedItems$6 };
3717
+ var items = { compile: compile$q, interpret: interpret$q, collectEvaluatedItems: collectEvaluatedItems$6 };
3637
3718
 
3638
- const { Core: Core$g, Schema: Schema$v, Instance: Instance$n } = lib$1;
3719
+ const { Core: Core$g, Schema: Schema$t, Instance: Instance$l } = lib$1;
3639
3720
 
3640
3721
 
3641
- const compile$r = async (schema, ast, parentSchema) => {
3642
- const items = await Schema$v.step("prefixItems", parentSchema);
3643
- const numberOfPrefixItems = Schema$v.typeOf(items, "array") ? Schema$v.length(items) : 0;
3722
+ const compile$p = async (schema, ast, parentSchema) => {
3723
+ const items = await Schema$t.step("prefixItems", parentSchema);
3724
+ const numberOfPrefixItems = Schema$t.typeOf(items, "array") ? Schema$t.length(items) : 0;
3644
3725
 
3645
3726
  return [numberOfPrefixItems, await Core$g.compileSchema(schema, ast)];
3646
3727
  };
3647
3728
 
3648
- const interpret$r = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
3649
- if (!Instance$n.typeOf(instance, "array")) {
3729
+ const interpret$p = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
3730
+ if (!Instance$l.typeOf(instance, "array")) {
3650
3731
  return true;
3651
3732
  }
3652
3733
 
3653
- return Instance$n.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
3734
+ return Instance$l.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
3654
3735
  };
3655
3736
 
3656
3737
  const collectEvaluatedItems$5 = (keywordValue, instance, ast, dynamicAnchors) => {
3657
- return interpret$r(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$n.map((item, ndx) => ndx, instance));
3738
+ return interpret$p(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$l.map((item, ndx) => ndx, instance));
3658
3739
  };
3659
3740
 
3660
- var items202012 = { compile: compile$r, interpret: interpret$r, collectEvaluatedItems: collectEvaluatedItems$5 };
3661
-
3662
- const { Schema: Schema$u, Instance: Instance$m } = lib$1;
3663
-
3664
-
3665
- const compile$q = (schema) => Schema$u.value(schema);
3666
- const interpret$q = (maxItems, instance) => !Instance$m.typeOf(instance, "array") || Instance$m.length(instance) <= maxItems;
3667
-
3668
- var maxItems = { compile: compile$q, interpret: interpret$q };
3669
-
3670
- const { Schema: Schema$t, Instance: Instance$l } = lib$1;
3671
-
3672
-
3673
- const compile$p = (schema) => Schema$t.value(schema);
3674
- const interpret$p = (maxLength, instance) => !Instance$l.typeOf(instance, "string") || Instance$l.length(instance) <= maxLength;
3675
-
3676
- var maxLength = { compile: compile$p, interpret: interpret$p };
3741
+ var items202012 = { compile: compile$p, interpret: interpret$p, collectEvaluatedItems: collectEvaluatedItems$5 };
3677
3742
 
3678
3743
  const { Schema: Schema$s, Instance: Instance$k } = lib$1;
3679
3744
 
3680
3745
 
3681
3746
  const compile$o = (schema) => Schema$s.value(schema);
3682
- const interpret$o = (maxLength, instance) => !Instance$k.typeOf(instance, "string") || [...Instance$k.value(instance)].length <= maxLength;
3747
+ const interpret$o = (maxItems, instance) => !Instance$k.typeOf(instance, "array") || Instance$k.length(instance) <= maxItems;
3683
3748
 
3684
- var maxLength6 = { compile: compile$o, interpret: interpret$o };
3749
+ var maxItems = { compile: compile$o, interpret: interpret$o };
3685
3750
 
3686
3751
  const { Schema: Schema$r, Instance: Instance$j } = lib$1;
3687
3752
 
3688
3753
 
3689
3754
  const compile$n = (schema) => Schema$r.value(schema);
3690
- const interpret$n = (maxProperties, instance) => !Instance$j.typeOf(instance, "object") || Instance$j.keys(instance).length <= maxProperties;
3755
+ const interpret$n = (maxLength, instance) => !Instance$j.typeOf(instance, "string") || [...Instance$j.value(instance)].length <= maxLength;
3691
3756
 
3692
- var maxProperties = { compile: compile$n, interpret: interpret$n };
3757
+ var maxLength = { compile: compile$n, interpret: interpret$n };
3693
3758
 
3694
3759
  const { Schema: Schema$q, Instance: Instance$i } = lib$1;
3695
3760
 
3696
3761
 
3697
- const compile$m = async (schema, ast, parentSchema) => {
3698
- const exclusiveMaximum = await Schema$q.step("exclusiveMaximum", parentSchema);
3699
- const isExclusive = Schema$q.value(exclusiveMaximum);
3762
+ const compile$m = (schema) => Schema$q.value(schema);
3763
+ const interpret$m = (maxProperties, instance) => !Instance$i.typeOf(instance, "object") || Instance$i.keys(instance).length <= maxProperties;
3764
+
3765
+ var maxProperties = { compile: compile$m, interpret: interpret$m };
3766
+
3767
+ const { Schema: Schema$p, Instance: Instance$h } = lib$1;
3768
+
3769
+
3770
+ const compile$l = async (schema, ast, parentSchema) => {
3771
+ const exclusiveMaximum = await Schema$p.step("exclusiveMaximum", parentSchema);
3772
+ const isExclusive = Schema$p.value(exclusiveMaximum);
3700
3773
 
3701
- return [Schema$q.value(schema), isExclusive];
3774
+ return [Schema$p.value(schema), isExclusive];
3702
3775
  };
3703
3776
 
3704
- const interpret$m = ([maximum, isExclusive], instance) => {
3705
- if (!Instance$i.typeOf(instance, "number")) {
3777
+ const interpret$l = ([maximum, isExclusive], instance) => {
3778
+ if (!Instance$h.typeOf(instance, "number")) {
3706
3779
  return true;
3707
3780
  }
3708
3781
 
3709
- const value = Instance$i.value(instance);
3782
+ const value = Instance$h.value(instance);
3710
3783
  return isExclusive ? value < maximum : value <= maximum;
3711
3784
  };
3712
3785
 
3713
- var maximumExclusiveMaximum = { compile: compile$m, interpret: interpret$m };
3714
-
3715
- const { Schema: Schema$p, Instance: Instance$h } = lib$1;
3716
-
3717
-
3718
- const compile$l = async (schema) => Schema$p.value(schema);
3719
- const interpret$l = (maximum, instance) => !Instance$h.typeOf(instance, "number") || Instance$h.value(instance) <= maximum;
3720
-
3721
- var maximum = { compile: compile$l, interpret: interpret$l };
3786
+ var maximumExclusiveMaximum = { compile: compile$l, interpret: interpret$l };
3722
3787
 
3723
3788
  const { Schema: Schema$o, Instance: Instance$g } = lib$1;
3724
3789
 
3725
3790
 
3726
- const compile$k = (schema) => Schema$o.value(schema);
3727
- const interpret$k = (minItems, instance) => !Instance$g.typeOf(instance, "array") || Instance$g.length(instance) >= minItems;
3791
+ const compile$k = async (schema) => Schema$o.value(schema);
3792
+ const interpret$k = (maximum, instance) => !Instance$g.typeOf(instance, "number") || Instance$g.value(instance) <= maximum;
3728
3793
 
3729
- var minItems = { compile: compile$k, interpret: interpret$k };
3794
+ var maximum = { compile: compile$k, interpret: interpret$k };
3730
3795
 
3731
3796
  const { Schema: Schema$n, Instance: Instance$f } = lib$1;
3732
3797
 
3733
3798
 
3734
3799
  const compile$j = (schema) => Schema$n.value(schema);
3735
- const interpret$j = (minLength, instance) => !Instance$f.typeOf(instance, "string") || Instance$f.length(instance) >= minLength;
3800
+ const interpret$j = (minItems, instance) => !Instance$f.typeOf(instance, "array") || Instance$f.length(instance) >= minItems;
3736
3801
 
3737
- var minLength = { compile: compile$j, interpret: interpret$j };
3802
+ var minItems = { compile: compile$j, interpret: interpret$j };
3738
3803
 
3739
3804
  const { Schema: Schema$m, Instance: Instance$e } = lib$1;
3740
3805
 
@@ -3742,7 +3807,7 @@ var JsonSchema = (function (exports) {
3742
3807
  const compile$i = (schema) => Schema$m.value(schema);
3743
3808
  const interpret$i = (minLength, instance) => !Instance$e.typeOf(instance, "string") || [...Instance$e.value(instance)].length >= minLength;
3744
3809
 
3745
- var minLength6 = { compile: compile$i, interpret: interpret$i };
3810
+ var minLength = { compile: compile$i, interpret: interpret$i };
3746
3811
 
3747
3812
  const { Schema: Schema$l, Instance: Instance$d } = lib$1;
3748
3813
 
@@ -4116,14 +4181,12 @@ var JsonSchema = (function (exports) {
4116
4181
  items202012: items202012,
4117
4182
  maxItems: maxItems,
4118
4183
  maxLength: maxLength,
4119
- maxLength6: maxLength6,
4120
4184
  maxProperties: maxProperties,
4121
4185
  maximumExclusiveMaximum: maximumExclusiveMaximum,
4122
4186
  maximum: maximum,
4123
4187
  metaData: Keywords$1.metaData,
4124
4188
  minItems: minItems,
4125
4189
  minLength: minLength,
4126
- minLength6: minLength6,
4127
4190
  minProperties: minProperties,
4128
4191
  minimumExclusiveMinimum: minimumExclusiveMinimum,
4129
4192
  minimum: minimum,
@@ -4529,11 +4592,11 @@ var JsonSchema = (function (exports) {
4529
4592
  "format": keywords$3.metaData,
4530
4593
  "items": keywords$3.items,
4531
4594
  "maxItems": keywords$3.maxItems,
4532
- "maxLength": keywords$3.maxLength6,
4595
+ "maxLength": keywords$3.maxLength,
4533
4596
  "maxProperties": keywords$3.maxProperties,
4534
4597
  "maximum": keywords$3.maximum,
4535
4598
  "minItems": keywords$3.minItems,
4536
- "minLength": keywords$3.minLength6,
4599
+ "minLength": keywords$3.minLength,
4537
4600
  "minProperties": keywords$3.minProperties,
4538
4601
  "minimum": keywords$3.minimum,
4539
4602
  "multipleOf": keywords$3.multipleOf,
@@ -4756,11 +4819,11 @@ var JsonSchema = (function (exports) {
4756
4819
  "else": keywords$2.else,
4757
4820
  "items": keywords$2.items,
4758
4821
  "maxItems": keywords$2.maxItems,
4759
- "maxLength": keywords$2.maxLength6,
4822
+ "maxLength": keywords$2.maxLength,
4760
4823
  "maxProperties": keywords$2.maxProperties,
4761
4824
  "maximum": keywords$2.maximum,
4762
4825
  "minItems": keywords$2.minItems,
4763
- "minLength": keywords$2.minLength6,
4826
+ "minLength": keywords$2.minLength,
4764
4827
  "minProperties": keywords$2.minProperties,
4765
4828
  "minimum": keywords$2.minimum,
4766
4829
  "multipleOf": keywords$2.multipleOf,
@@ -5164,11 +5227,11 @@ var JsonSchema = (function (exports) {
5164
5227
  "exclusiveMaximum": keywords$1.exclusiveMaximum,
5165
5228
  "exclusiveMinimum": keywords$1.exclusiveMinimum,
5166
5229
  "maxItems": keywords$1.maxItems,
5167
- "maxLength": keywords$1.maxLength6,
5230
+ "maxLength": keywords$1.maxLength,
5168
5231
  "maxProperties": keywords$1.maxProperties,
5169
5232
  "maximum": keywords$1.maximum,
5170
5233
  "minItems": keywords$1.minItems,
5171
- "minLength": keywords$1.minLength6,
5234
+ "minLength": keywords$1.minLength,
5172
5235
  "minProperties": keywords$1.minProperties,
5173
5236
  "minimum": keywords$1.minimum,
5174
5237
  "multipleOf": keywords$1.multipleOf,
@@ -5611,11 +5674,11 @@ var JsonSchema = (function (exports) {
5611
5674
  "exclusiveMaximum": keywords.exclusiveMaximum,
5612
5675
  "exclusiveMinimum": keywords.exclusiveMinimum,
5613
5676
  "maxItems": keywords.maxItems,
5614
- "maxLength": keywords.maxLength6,
5677
+ "maxLength": keywords.maxLength,
5615
5678
  "maxProperties": keywords.maxProperties,
5616
5679
  "maximum": keywords.maximum,
5617
5680
  "minItems": keywords.minItems,
5618
- "minLength": keywords.minLength6,
5681
+ "minLength": keywords.minLength,
5619
5682
  "minProperties": keywords.minProperties,
5620
5683
  "minimum": keywords.minimum,
5621
5684
  "multipleOf": keywords.multipleOf,