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