ajv.min.js 115 KB

123
  1. /* ajv 6.4.0: Another JSON Schema Validator */
  2. !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}}(function(){return function o(i,n,l){function c(a,e){if(!n[a]){if(!i[a]){var r="function"==typeof require&&require;if(!e&&r)return r(a,!0);if(u)return u(a,!0);var t=new Error("Cannot find module '"+a+"'");throw t.code="MODULE_NOT_FOUND",t}var s=n[a]={exports:{}};i[a][0].call(s.exports,function(e){var r=i[a][1][e];return c(r||e)},s,s.exports,o,i,n,l)}return n[a].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)c(l[e]);return c}({1:[function(e,r,a){"use strict";var t=r.exports=function(){this._cache={}};t.prototype.put=function(e,r){this._cache[e]=r},t.prototype.get=function(e){return this._cache[e]},t.prototype.del=function(e){delete this._cache[e]},t.prototype.clear=function(){this._cache={}}},{}],2:[function(e,r,a){"use strict";var s=e("./error_classes").MissingRef;r.exports=function a(r,i,t){var n=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof i&&(t=i,i=void 0);var e=l(r).then(function(){var e=n._addSchema(r,void 0,i);return e.validate||function(o){try{return n._compile(o)}catch(e){if(e instanceof s)return function(e){var r=e.missingSchema;if(s(r))throw new Error("Schema "+r+" is loaded but "+e.missingRef+" cannot be resolved");var a=n._loadingSchemas[r];a||(a=n._loadingSchemas[r]=n._opts.loadSchema(r)).then(t,t);return a.then(function(e){if(!s(r))return l(e).then(function(){s(r)||n.addSchema(e,r,void 0,i)})}).then(function(){return c(o)});function t(){delete n._loadingSchemas[r]}function s(e){return n._refs[e]||n._schemas[e]}}(e);throw e}}(e)});t&&e.then(function(e){t(null,e)},t);return e;function l(e){var r=e.$schema;return r&&!n.getSchema(r)?a.call(n,{$ref:r},!0):Promise.resolve()}function c(o){try{return n._compile(o)}catch(e){if(e instanceof s)return function(e){var r=e.missingSchema;if(s(r))throw new Error("Schema "+r+" is loaded but "+e.missingRef+" cannot be resolved");var a=n._loadingSchemas[r];a||(a=n._loadingSchemas[r]=n._opts.loadSchema(r)).then(t,t);return a.then(function(e){if(!s(r))return l(e).then(function(){s(r)||n.addSchema(e,r,void 0,i)})}).then(function(){return c(o)});function t(){delete n._loadingSchemas[r]}function s(e){return n._refs[e]||n._schemas[e]}}(e);throw e}}}},{"./error_classes":3}],3:[function(e,r,a){"use strict";var t=e("./resolve");function s(e,r,a){this.message=a||s.message(e,r),this.missingRef=t.url(e,r),this.missingSchema=t.normalizeId(t.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e}r.exports={Validation:o(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:o(s)},s.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},{"./resolve":6}],4:[function(e,r,a){"use strict";var t=e("./util"),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,s=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return t.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var a,t=+r[2],s=+r[3];return 1<=t&&t<=12&&1<=s&&s<=(2!=t||((a=+r[1])%4!=0||a%100==0&&a%400!=0)?i[t]:29)}function g(e,r){var a=e.match(n);if(!a)return!1;var t=a[1],s=a[2],o=a[3];return(t<=23&&s<=59&&o<=59||23==t&&59==s&&60==o)&&(!r||a[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p},m.full={date:v,time:g,"date-time":function(e){var r=e.split(y);return 2==r.length&&v(r[0])&&g(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&s.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p};var y=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,a){"use strict";var R=e("./resolve"),D=e("./util"),O=e("./error_classes"),l=e("fast-json-stable-stringify"),j=e("../dotjs/validate"),I=D.ucs2length,A=e("fast-deep-equal"),C=O.Validation;function k(e,r,a){for(var t=0;t<this._compilations.length;t++){var s=this._compilations[t];if(s.schema==e&&s.root==r&&s.baseId==a)return t}return-1}function z(e,r){return"var pattern"+e+" = new RegExp("+D.toQuotedString(r[e])+");"}function L(e){return"var default"+e+" = defaults["+e+"];"}function N(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function T(e){return"var customRule"+e+" = customRules["+e+"];"}function q(e,r){if(!e.length)return"";for(var a="",t=0;t<e.length;t++)a+=r(t,e);return a}r.exports=function c(e,u,h,r){var d=this,f=this._opts,p=[void 0],m={},v=[],a={},g=[],t={},y=[];u=u||{schema:e,refVal:p,refs:m};var s=function(e,r,a){var t=k.call(this,e,r,a);return 0<=t?{index:t,compiling:!0}:{index:t=this._compilations.length,compiling:(this._compilations[t]={schema:e,root:r,baseId:a},!1)}}.call(this,e,u,r);var o=this._compilations[s.index];if(s.compiling)return o.callValidate=function e(){var r=o.validate;var a=r.apply(null,arguments);e.errors=r.errors;return a};var P=this._formats;var E=this.RULES;try{var i=w(e,u,h,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,f.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,a){var t=k.call(this,e,r,a);0<=t&&this._compilations.splice(t,1)}).call(this,e,u,r)}function w(e,r,a,t){var s=!r||r&&r.schema==e;if(r.schema!=u.schema)return c.call(d,e,r,a,t);var o,i=!0===e.$async,n=j({isTop:!0,schema:e,isRoot:s,baseId:t,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:O.MissingRef,RULES:E,validate:j,util:D,resolve:R,resolveRef:S,usePattern:F,useDefault:x,useCustomRule:$,opts:f,formats:P,logger:d.logger,self:d});n=q(p,N)+q(v,z)+q(g,L)+q(y,T)+n,f.processCode&&(n=f.processCode(n));try{var l=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",n);o=l(d,E,P,u,p,g,y,A,I,C),p[0]=o}catch(e){throw d.logger.error("Error compiling schema, function code:",n),e}return o.schema=e,o.errors=null,o.refs=m,o.refVal=p,o.root=s?o:r,i&&(o.$async=!0),!0===f.sourceCode&&(o.source={code:n,patterns:v,defaults:g}),o}function S(e,r,a){r=R.url(e,r);var t,s,o=m[r];if(void 0!==o)return _(t=p[o],s="refVal["+o+"]");if(!a&&u.refs){var i=u.refs[r];if(void 0!==i)return s=b(r,t=u.refVal[i]),_(t,s)}s=b(r);var n=R.call(d,w,u,r);if(void 0===n){var l=h&&h[r];l&&(n=R.inlineRef(l,f.inlineRefs)?l:c.call(d,l,u,h,e))}if(void 0!==n)return p[m[r]]=n,_(n,s);delete m[r]}function b(e,r){var a=p.length;return p[a]=r,"refVal"+(m[e]=a)}function _(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=a[e];return void 0===r&&(r=a[e]=v.length,v[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return D.toQuotedString(e);case"object":if(null===e)return"null";var r=l(e),a=t[r];return void 0===a&&(a=t[r]=g.length,g[a]=e),"default"+a}}function $(e,r,a,t){var s=e.definition.validateSchema;if(s&&!1!==d._opts.validateSchema){var o=s(r);if(!o){var i="keyword schema is invalid: "+d.errorsText(s.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,a,t);else if(u)n=u.call(d,r,a,t),!1!==f.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,t,e.keyword,r,a);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=y.length;return{code:"customRule"+h,validate:y[h]=n}}}},{"../dotjs/validate":37,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":41,"fast-json-stable-stringify":42}],6:[function(e,r,a){"use strict";var m=e("uri-js"),v=e("fast-deep-equal"),g=e("./util"),l=e("./schema_obj"),t=e("json-schema-traverse");function c(e,r,a){var t=this._refs[a];if("string"==typeof t){if(!this._refs[t])return c.call(this,e,r,t);t=this._refs[t]}if((t=t||this._schemas[a])instanceof l)return d(t.schema,this._opts.inlineRefs)?t.schema:t.validate||this._compile(t);var s,o,i,n=u.call(this,r,a);return n&&(s=n.schema,r=n.root,i=n.baseId),s instanceof l?o=s.validate||e.call(this,s.schema,r,void 0,i):void 0!==s&&(o=d(s,this._opts.inlineRefs)?s:e.call(this,s,r,void 0,i)),o}function u(e,r){var a=m.parse(r),t=f(a),s=y(this._getId(e.schema));if(t!==s){var o=P(t),i=this._refs[o];if("string"==typeof i)return function(e,r,a){var t=u.call(this,e,r);if(t){var s=t.schema,o=t.baseId;e=t.root;var i=this._getId(s);return i&&(o=p(o,i)),n.call(this,a,o,s,e)}}.call(this,e,i,a);if(i instanceof l)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[o])instanceof l))return;if(i.validate||this._compile(i),o==P(r))return{schema:i,root:e,baseId:s};e=i}if(!e.schema)return;s=y(this._getId(e.schema))}return n.call(this,a,s,e.schema,e)}(r.exports=c).normalizeId=P,c.fullPath=y,c.url=p,c.ids=function(e){var r=P(this._getId(e)),h={"":r},d={"":y(r,!1)},f={},p=this;return t(e,{allKeys:!0},function(e,r,a,t,s,o,i){if(""!==r){var n=p._getId(e),l=h[t],c=d[t]+"/"+s;if(void 0!==i&&(c+="/"+("number"==typeof i?i:g.escapeFragment(i))),"string"==typeof n){n=l=P(l?m.resolve(l,n):n);var u=p._refs[n];if("string"==typeof u&&(u=p._refs[u]),u&&u.schema){if(!v(e,u.schema))throw new Error('id "'+n+'" resolves to more than one schema')}else if(n!=P(c))if("#"==n[0]){if(f[n]&&!v(e,f[n]))throw new Error('id "'+n+'" resolves to more than one schema');f[n]=e}else p._refs[n]=c}h[r]=l,d[r]=c}}),f},c.inlineRef=d,c.schema=u;var h=g.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function n(e,r,a,t){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var s=e.fragment.split("/"),o=1;o<s.length;o++){var i=s[o];if(i){if(void 0===(a=a[i=g.unescapeFragment(i)]))break;var n;if(!h[i]&&((n=this._getId(a))&&(r=p(r,n)),a.$ref)){var l=p(r,a.$ref),c=u.call(this,t,l);c&&(a=c.schema,t=c.root,r=c.baseId)}}}return void 0!==a&&a!==t.schema?{schema:a,root:t,baseId:r}:void 0}}var i=g.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var a;if(Array.isArray(r)){for(var t=0;t<r.length;t++)if("object"==typeof(a=r[t])&&!e(a))return!1}else for(var s in r){if("$ref"==s)return!1;if("object"==typeof(a=r[s])&&!e(a))return!1}return!0}(e):r?function e(r){var a,t=0;if(Array.isArray(r)){for(var s=0;s<r.length;s++)if("object"==typeof(a=r[s])&&(t+=e(a)),t==1/0)return 1/0}else for(var o in r){if("$ref"==o)return 1/0;if(i[o])t++;else if("object"==typeof(a=r[o])&&(t+=e(a)+1),t==1/0)return 1/0}return t}(e)<=r:void 0)}function y(e,r){return!1!==r&&(e=P(e)),f(m.parse(e))}function f(e){return m.serialize(e).split("#")[0]+"#"}var s=/#\/?$/;function P(e){return e?e.replace(s,""):""}function p(e,r){return r=P(r),m.resolve(e,r)}},{"./schema_obj":8,"./util":10,"fast-deep-equal":41,"json-schema-traverse":43,"uri-js":44}],7:[function(e,r,a){"use strict";var o=e("../dotjs"),i=e("./util").toHash;r.exports=function(){var t=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],s=["type","$comment"];return t.all=i(s),t.types=i(["number","integer","string","array","object","boolean","null"]),t.forEach(function(e){e.rules=e.rules.map(function(e){var r;if("object"==typeof e){var a=Object.keys(e)[0];r=e[a],e=a,r.forEach(function(e){s.push(e),t.all[e]=!0})}return s.push(e),t.all[e]={keyword:e,code:o[e],implements:r}}),t.all.$comment={keyword:"$comment",code:o.$comment},e.type&&(t.types[e.type]=e)}),t.keywords=i(s.concat(["$schema","$id","id","$data","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),t.custom={},t}},{"../dotjs":26,"./util":10}],8:[function(e,r,a){"use strict";var t=e("./util");r.exports=function(e){t.copy(e,this)}},{"./util":10}],9:[function(e,r,a){"use strict";r.exports=function(e){for(var r,a=0,t=e.length,s=0;s<t;)a++,55296<=(r=e.charCodeAt(s++))&&r<=56319&&s<t&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return a}},{}],10:[function(e,r,a){"use strict";function o(e,r,a){var t=a?" !== ":" === ",s=a?" || ":" && ",o=a?"!":"",i=a?"":"!";switch(e){case"null":return r+t+"null";case"array":return o+"Array.isArray("+r+")";case"object":return"("+o+r+s+"typeof "+r+t+'"object"'+s+i+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+t+'"number"'+s+i+"("+r+" % 1)"+s+r+t+r+")";default:return"typeof "+r+t+'"'+e+'"'}}r.exports={copy:function(e,r){for(var a in r=r||{},e)r[a]=e[a];return r},checkDataType:o,checkDataTypes:function(e,r){switch(e.length){case 1:return o(e[0],r,!0);default:var a="",t=n(e);for(var s in t.array&&t.object&&(a=t.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete t.null,delete t.array,delete t.object),t.number&&delete t.integer,t)a+=(a?" && ":"")+o(s,r,!0);return a}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var a=[],t=0;t<r.length;t++){var s=r[t];i[s]?a[a.length]=s:"array"===e&&"array"===s&&(a[a.length]=s)}if(a.length)return a}else{if(i[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:n,getProperty:h,escapeQuotes:l,equal:e("fast-deep-equal"),ucs2length:e("./ucs2length"),varOccurences:function(e,r){var a=e.match(new RegExp(r+="[^0-9]","g"));return a?a.length:0},varReplace:function(e,r,a){return r+="([^0-9])",a=a.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),a+"$1")},cleanUpCode:function(e){return e.replace(c,"").replace(u,"").replace(d,"if (!($1))")},finalCleanUpCode:function(e,r){var a=e.match(f);a&&2==a.length&&(e=r?e.replace(m,"").replace(y,P):e.replace(p,"").replace(v,g));return(a=e.match(E))&&3===a.length?e.replace(w,""):e},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var a in e)if(r[a])return!0},schemaHasRulesExcept:function(e,r,a){if("boolean"==typeof e)return!e&&"not"!=a;for(var t in e)if(t!=a&&r[t])return!0},toQuotedString:S,getPathExpr:function(e,r,a,t){return F(e,a?"'/' + "+r+(t?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):t?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,a){var t=S(a?"/"+x(r):h(r));return F(e,t)},getData:function(e,r,a){var t,s,o,i;if(""===e)return"rootData";if("/"==e[0]){if(!b.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(!(i=e.match(_)))throw new Error("Invalid JSON-pointer: "+e);if(t=+i[1],"#"==(s=i[2])){if(r<=t)throw new Error("Cannot access property/index "+t+" levels up, current level is "+r);return a[r-t]}if(r<t)throw new Error("Cannot access data "+t+" levels up, current level is "+r);if(o="data"+(r-t||""),!s)return o}for(var n=o,l=s.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(o+=h($(u)),n+=" && "+o)}return n},unescapeFragment:function(e){return $(decodeURIComponent(e))},unescapeJsonPointer:$,escapeFragment:function(e){return encodeURIComponent(x(e))},escapeJsonPointer:x};var i=n(["string","number","integer","boolean","null"]);function n(e){for(var r={},a=0;a<e.length;a++)r[e[a]]=!0;return r}var t=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function h(e){return"number"==typeof e?"["+e+"]":t.test(e)?"."+e:"['"+l(e)+"']"}function l(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}var c=/else\s*{\s*}/g,u=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,d=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var f=/[^v.]errors/g,p=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,m=/var errors = 0;|var vErrors = null;/g,v="return errors === 0;",g="validate.errors = null; return true;",y=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,P="return data;",E=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,w=/if \(rootData === undefined\) rootData = data;/;function S(e){return"'"+l(e)+"'"}var b=/^\/(?:[^~]|~0|~1)*$/,_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function F(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function x(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function $(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},{"./ucs2length":9,"fast-deep-equal":41}],11:[function(e,r,a){"use strict";var l=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];r.exports=function(e,r){for(var a=0;a<r.length;a++){e=JSON.parse(JSON.stringify(e));var t,s=r[a].split("/"),o=e;for(t=1;t<s.length;t++)o=o[s[t]];for(t=0;t<l.length;t++){var i=l[t],n=o[i];n&&(o[i]={anyOf:[n,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]})}}return e}},{}],12:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n;var f="maximum"==r,p=f?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.$data&&m&&m.$data,g=f?"<":">",y=f?">":"<",P=void 0;if(v){var E=e.util.getData(m.$data,i,e.dataPathArr),w="exclusive"+o,S="exclType"+o,b="exclIsNumber"+o,_="' + "+($="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+E+"; ";var F;P=p;(F=F||[]).push(s+=" var "+w+"; var "+S+" = typeof "+(E="schemaExcl"+o)+"; if ("+S+" != 'boolean' && "+S+" != 'undefined' && "+S+" != 'number') { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var x=s;s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || "),s+=" "+S+" == 'number' ? ( ("+w+" = "+t+" === undefined || "+E+" "+g+"= "+t+") ? "+h+" "+y+"= "+E+" : "+h+" "+y+" "+t+" ) : ( ("+w+" = "+E+" === true) ? "+h+" "+y+"= "+t+" : "+h+" "+y+" "+t+" ) || "+h+" !== "+h+") { var op"+o+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===n&&(c=e.errSchemaPath+"/"+(P=p),t=E,d=v)}else{_=g;if((b="number"==typeof m)&&d){var $="'"+_+"'";s+=" if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || "),s+=" ( "+t+" === undefined || "+m+" "+g+"= "+t+" ? "+h+" "+y+"= "+m+" : "+h+" "+y+" "+t+" ) || "+h+" !== "+h+") { "}else{b&&void 0===n?(w=!0,c=e.errSchemaPath+"/"+(P=p),t=m,y+="="):(b&&(t=Math[f?"min":"max"](m,n)),m===(!b||t)?(w=!0,c=e.errSchemaPath+"/"+(P=p),y+="="):(w=!1,_+="="));$="'"+_+"'";s+=" if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || "),s+=" "+h+" "+y+" "+t+" || "+h+" !== "+h+") { "}}P=P||r,(F=F||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+$+", limit: "+t+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+_+" ",s+=d?"' + "+t:t+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";x=s;return s=F.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],13:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n,s+="if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || ");var f=r,p=p||[];p.push(s+=" "+h+".length "+("maxItems"==r?">":"<")+" "+t+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+t+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+t+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],14:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n,s+="if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || "),s+=!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ";var f=r,p=p||[];p.push(s+=" "+("maxLength"==r?">":"<")+" "+t+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+t+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+t+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n,s+="if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'number') || ");var f=r,p=p||[];p.push(s+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+t+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+t+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+t+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m<v;)p=f[m+=1],e.util.schemaHasRules(p,e.RULES.all)&&(d=!1,l.schema=p,l.schemaPath=o+"["+m+"]",l.errSchemaPath=i+"/"+m,t+=" "+e.validate(l)+" ",l.baseId=h,n&&(t+=" if ("+u+") { ",c+="}"));return n&&(t+=d?" if (true) { ":" "+c.slice(0,-1)+" "),t=e.util.cleanUpCode(t)}},{}],17:[function(e,r,a){"use strict";r.exports=function(r,e,a){var t=" ",s=r.level,o=r.dataLevel,i=r.schema[e],n=r.schemaPath+r.util.getProperty(e),l=r.errSchemaPath+"/"+e,c=!r.opts.allErrors,u="data"+(o||""),h="valid"+s,d="errs__"+s,f=r.util.copy(r),p="";f.level++;var m="valid"+f.level;if(i.every(function(e){return r.util.schemaHasRules(e,r.RULES.all)})){var v=f.baseId;t+=" var "+d+" = errors; var "+h+" = false; ";var g=r.compositeRule;r.compositeRule=f.compositeRule=!0;var y=i;if(y)for(var P,E=-1,w=y.length-1;E<w;)P=y[E+=1],f.schema=P,f.schemaPath=n+"["+E+"]",f.errSchemaPath=l+"/"+E,t+=" "+r.validate(f)+" ",f.baseId=v,t+=" "+h+" = "+h+" || "+m+"; if (!"+h+") { ",p+="}";r.compositeRule=f.compositeRule=g,t+=" "+p+" if (!"+h+") { var err = ",!1!==r.createErrors?(t+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+r.errorPath+" , schemaPath: "+r.util.toQuotedString(l)+" , params: {} ",!1!==r.opts.messages&&(t+=" , message: 'should match some schema in anyOf' "),r.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+r.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!r.compositeRule&&c&&(t+=r.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",r.opts.allErrors&&(t+=" } "),t=r.util.cleanUpCode(t)}else c&&(t+=" if (true) { ");return t}},{}],18:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.errSchemaPath+"/"+r,o=e.util.toQuotedString(e.schema[r]);return!0===e.opts.$comment?t+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(t+=" self._opts.$comment("+o+", "+e.util.toQuotedString(s)+", validate.root.schema);"),t}},{}],19:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(t+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; "),d||(t+=" var schema"+s+" = validate.schema"+n+";");var f=f||[];f.push(t+="var "+h+" = equal("+u+", schema"+s+"); if (!"+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+s+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to constant' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var p=t;return t=f.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",c&&(t+=" else { "),t}},{}],20:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d="errs__"+s,f=e.util.copy(e);f.level++;var p="valid"+f.level,m="i"+s,v=f.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,P=e.util.schemaHasRules(i,e.RULES.all);if(t+="var "+d+" = errors;var "+h+";",P){var E=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=i,f.schemaPath=n,f.errSchemaPath=l,t+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=u+"["+m+"]";f.dataPathArr[v]=m;var S=e.validate(f);f.baseId=y,e.util.varOccurences(S,g)<2?t+=" "+e.util.varReplace(S,g,w)+" ":t+=" var "+g+" = "+w+"; "+S+" ",t+=" if ("+p+") break; } ",e.compositeRule=f.compositeRule=E,t+=" if (!"+p+") {"}else t+=" if ("+u+".length == 0) {";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should contain a valid item' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var _=t;return t=b.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { ",P&&(t+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(t+=" } "),t=e.util.cleanUpCode(t)}},{}],21:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,d="data"+(n||""),f="valid"+i,p="errs__"+i,m=e.opts.$data&&l&&l.$data;m?(o+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",s="schema"+i):s=l;var v,g,y,P,E,w=this,S="definition"+i,b=w.definition,_="";if(m&&b.$data){var F=b.validateSchema;o+=" var "+S+" = RULES.custom['"+r+"'].definition; var "+(E="keywordValidate"+i)+" = "+S+".validate;"}else{if(!(P=e.useCustomRule(w,l,e.schema,e)))return;s="validate.schema"+c,E=P.code,v=b.compile,g=b.inline,y=b.macro}var x=E+".errors",$="i"+i,R="ruleErr"+i,D=b.async;if(D&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(o+=x+" = null;"),o+="var "+p+" = errors;var "+f+";",m&&b.$data&&(_+="}",o+=" if ("+s+" === undefined) { "+f+" = true; } else { ",F&&(_+="}",o+=" "+f+" = "+S+".validateSchema("+s+"); if ("+f+") { ")),g)o+=b.statements?" "+P.validate+" ":" "+f+" = "+P.validate+"; ";else if(y){var O=e.util.copy(e);_="";O.level++;var j="valid"+O.level;O.schema=P.validate,O.schemaPath="";var I=e.compositeRule;e.compositeRule=O.compositeRule=!0;var A=e.validate(O).replace(/validate\.schema/g,E);e.compositeRule=O.compositeRule=I,o+=" "+A}else{(L=L||[]).push(o),o="",o+=" "+E+".call( ",o+=e.opts.passContext?"this":"self",o+=v||!1===b.schema?" , "+d+" ":" , "+s+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var C=n?"data"+(n-1||""):"parentData",k=n?e.dataPathArr[n]:"parentDataProperty",z=o+=" , "+C+" , "+k+" , rootData ) ";o=L.pop(),!1===b.errors?(o+=" "+f+" = ",D&&(o+="await "),o+=z+"; "):o+=D?" var "+(x="customErrors"+i)+" = null; try { "+f+" = await "+z+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+f+" = "+z+"; "}if(b.modifying&&(o+=" if ("+C+") "+d+" = "+C+"["+k+"];"),o+=""+_,b.valid)h&&(o+=" if (true) { ");else{var L;o+=" if ( ",void 0===b.valid?(o+=" !",o+=y?""+j:""+f):o+=" "+!b.valid+" ",t=w.keyword,(L=L||[]).push(o+=") { "),(L=L||[]).push(o=""),o="",!1!==e.createErrors?(o+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+w.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+w.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var N=o;o=L.pop();var T=o+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+N+"]); ":" validate.errors = ["+N+"]; return false; ":" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";o=L.pop(),g?b.errors?"full"!=b.errors&&(o+=" for (var "+$+"="+p+"; "+$+"<errors; "+$+"++) { var "+R+" = vErrors["+$+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+R+".schema = "+s+"; "+R+".data = "+d+"; "),o+=" } "):!1===b.errors?o+=" "+T+" ":(o+=" if ("+p+" == errors) { "+T+" } else { for (var "+$+"="+p+"; "+$+"<errors; "+$+"++) { var "+R+" = vErrors["+$+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+R+".schema = "+s+"; "+R+".data = "+d+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+w.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+w.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(o+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===b.errors?o+=" "+T+" ":(o+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+$+"="+p+"; "+$+"<errors; "+$+"++) { var "+R+" = vErrors["+$+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; "+R+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(o+=" "+R+".schema = "+s+"; "+R+".data = "+d+"; "),o+=" } } else { "+T+" } "),o+=" } ",h&&(o+=" else { ")}return o}},{}],22:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e),f="";d.level++;var p="valid"+d.level,m={},v={},g=e.opts.ownProperties;for(w in i){var y=i[w],P=Array.isArray(y)?v:m;P[w]=y}t+="var "+h+" = errors;";var E=e.errorPath;for(var w in t+="var missing"+s+";",v)if((P=v[w]).length){if(t+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(t+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){t+=" && ( ";var S=P;if(S)for(var b=-1,_=S.length-1;b<_;){O=S[b+=1],b&&(t+=" || "),t+=" ( ( "+(C=u+(A=e.util.getProperty(O)))+" === undefined ",g&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),t+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:A)+") ) "}t+=")) { ";var F="missing"+s,x="' + "+F+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,F,!0):E+" + "+F);var $=$||[];$.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),t+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var R=t;t=$.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+R+"]); ":" validate.errors = ["+R+"]; return false; ":" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{t+=" ) { ";var D=P;if(D)for(var O,j=-1,I=D.length-1;j<I;){O=D[j+=1];var A=e.util.getProperty(O),C=(x=e.util.escapeQuotes(O),u+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,O,e.opts.jsonPointers)),t+=" if ( "+C+" === undefined ",g&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(O)+"') "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+x+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==P.length?"property "+e.util.escapeQuotes(P[0]):"properties "+e.util.escapeQuotes(P.join(", ")),t+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t+=" } ",c&&(f+="}",t+=" else { ")}e.errorPath=E;var k=d.baseId;for(var w in m){e.util.schemaHasRules(y=m[w],e.RULES.all)&&(t+=" "+p+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",g&&(t+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),t+=") { ",d.schema=y,d.schemaPath=n+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),t+=" "+e.validate(d)+" ",d.baseId=k,t+=" } ",c&&(t+=" if ("+p+") { ",f+="}"))}return c&&(t+=" "+f+" if ("+h+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],23:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(t+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="i"+s,p="schema"+s;d||(t+=" var "+p+" = validate.schema"+n+";"),t+="var "+h+";",d&&(t+=" if (schema"+s+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+s+")) "+h+" = false; else {"),t+=h+" = false;for (var "+f+"=0; "+f+"<"+p+".length; "+f+"++) if (equal("+u+", "+p+"["+f+"])) { "+h+" = true; break; }",d&&(t+=" } ");var m=m||[];m.push(t+=" if (!"+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var v=t;return t=m.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",c&&(t+=" else { "),t}},{}],24:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return c&&(t+=" if (true) { "),t;var h,d=e.opts.$data&&i&&i.$data;d?(t+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",h="schema"+s):h=i;var f=e.opts.unknownFormats,p=Array.isArray(f);if(d){t+=" var "+(m="format"+s)+" = formats["+h+"]; var "+(v="isObject"+s)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(g="formatType"+s)+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(t+=" var async"+s+" = "+m+".async; "),t+=" "+m+" = "+m+".validate; } if ( ",d&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),t+=" (","ignore"!=f&&(t+=" ("+h+" && !"+m+" ",p&&(t+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),t+=") || "),t+=" ("+m+" && "+g+" == '"+a+"' && !(typeof "+m+" == 'function' ? ",t+=e.async?" (async"+s+" ? await "+m+"("+u+") : "+m+"("+u+")) ":" "+m+"("+u+") ",t+=" : "+m+".test("+u+"))))) {"}else{var m;if(!(m=e.formats[i])){if("ignore"==f)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(t+=" if (true) { "),t;if(p&&0<=f.indexOf(i))return c&&(t+=" if (true) { "),t;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var y=!0===m.async;m=m.validate}if(g!=a)return c&&(t+=" if (true) { "),t;if(y){if(!e.async)throw new Error("async format in sync schema");t+=" if (!(await "+(P="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{t+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),t+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",t+=") { "}}var E=E||[];E.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",t+=d?""+h:""+e.util.toQuotedString(i),t+=" } ",!1!==e.opts.messages&&(t+=" , message: 'should match format \"",t+=d?"' + "+h+" + '":""+e.util.escapeQuotes(i),t+="\"' "),e.opts.verbose&&(t+=" , schema: ",t+=d?"validate.schema"+n:""+e.util.toQuotedString(i),t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var w=t;return t=E.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",c&&(t+=" else { "),t}},{}],25:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d="errs__"+s,f=e.util.copy(e);f.level++;var p="valid"+f.level,m=e.schema.then,v=e.schema.else,g=void 0!==m&&e.util.schemaHasRules(m,e.RULES.all),y=void 0!==v&&e.util.schemaHasRules(v,e.RULES.all),P=f.baseId;if(g||y){var E;f.createErrors=!1,f.schema=i,f.schemaPath=n,f.errSchemaPath=l,t+=" var "+d+" = errors; var "+h+" = true; ";var w=e.compositeRule;e.compositeRule=f.compositeRule=!0,t+=" "+e.validate(f)+" ",f.baseId=P,f.createErrors=!0,t+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=f.compositeRule=w,g?(t+=" if ("+p+") { ",f.schema=e.schema.then,f.schemaPath=e.schemaPath+".then",f.errSchemaPath=e.errSchemaPath+"/then",t+=" "+e.validate(f)+" ",f.baseId=P,t+=" "+h+" = "+p+"; ",g&&y?t+=" var "+(E="ifClause"+s)+" = 'then'; ":E="'then'",t+=" } ",y&&(t+=" else { ")):t+=" if (!"+p+") { ",y&&(f.schema=e.schema.else,f.schemaPath=e.schemaPath+".else",f.errSchemaPath=e.errSchemaPath+"/else",t+=" "+e.validate(f)+" ",f.baseId=P,t+=" "+h+" = "+p+"; ",g&&y?t+=" var "+(E="ifClause"+s)+" = 'else'; ":E="'else'",t+=" } "),t+=" if (!"+h+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+E+" } ",!1!==e.opts.messages&&(t+=" , message: 'should match \"' + "+E+" + '\" schema' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+=" } ",c&&(t+=" else { "),t=e.util.cleanUpCode(t)}else c&&(t+=" if (true) { ");return t}},{}],26:[function(e,r,a){"use strict";r.exports={$ref:e("./ref"),allOf:e("./allOf"),anyOf:e("./anyOf"),$comment:e("./comment"),const:e("./const"),contains:e("./contains"),dependencies:e("./dependencies"),enum:e("./enum"),format:e("./format"),if:e("./if"),items:e("./items"),maximum:e("./_limit"),minimum:e("./_limit"),maxItems:e("./_limitItems"),minItems:e("./_limitItems"),maxLength:e("./_limitLength"),minLength:e("./_limitLength"),maxProperties:e("./_limitProperties"),minProperties:e("./_limitProperties"),multipleOf:e("./multipleOf"),not:e("./not"),oneOf:e("./oneOf"),pattern:e("./pattern"),properties:e("./properties"),propertyNames:e("./propertyNames"),required:e("./required"),uniqueItems:e("./uniqueItems"),validate:e("./validate")}},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,g=f.dataLevel=e.dataLevel+1,y="data"+g,P=e.baseId;if(t+="var "+d+" = errors;var "+h+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){t+=" "+h+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems";var S=S||[];S.push(t+=" if (!"+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var b=t;t=S.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+b+"]); ":" validate.errors = ["+b+"]; return false; ":" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",l=w,c&&(p+="}",t+=" else { ")}var _=i;if(_)for(var F,x=-1,$=_.length-1;x<$;)if(F=_[x+=1],e.util.schemaHasRules(F,e.RULES.all)){t+=" "+m+" = true; if ("+u+".length > "+x+") { ";var R=u+"["+x+"]";f.schema=F,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[g]=x;var D=e.validate(f);f.baseId=P,e.util.varOccurences(D,y)<2?t+=" "+e.util.varReplace(D,y,R)+" ":t+=" var "+y+" = "+R+"; "+D+" ",t+=" } ",c&&(t+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",t+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);R=u+"["+v+"]";f.dataPathArr[g]=v;D=e.validate(f);f.baseId=P,e.util.varOccurences(D,y)<2?t+=" "+e.util.varReplace(D,y,R)+" ":t+=" var "+y+" = "+R+"; "+D+" ",c&&(t+=" if (!"+m+") break; "),t+=" } } ",c&&(t+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,t+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);R=u+"["+v+"]";f.dataPathArr[g]=v;D=e.validate(f);f.baseId=P,e.util.varOccurences(D,y)<2?t+=" "+e.util.varReplace(D,y,R)+" ":t+=" var "+y+" = "+R+"; "+D+" ",c&&(t+=" if (!"+m+") break; "),t+=" }"}return c&&(t+=" "+p+" if ("+d+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],28:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n,s+="var division"+o+";if (",d&&(s+=" "+t+" !== undefined && ( typeof "+t+" != 'number' || "),s+=" (division"+o+" = "+h+" / "+t+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) ");var f=f||[];f.push(s+=" ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+t+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+t:t+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],29:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,t+=" var "+h+" = errors; ";var p,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(p=d.opts.allErrors,d.opts.allErrors=!1),t+=" "+e.validate(d)+" ",d.createErrors=!0,p&&(d.opts.allErrors=p),e.compositeRule=d.compositeRule=m;var v=v||[];v.push(t+=" if ("+f+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var g=t;t=v.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")}else t+=" var err = ",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(t+=" if (false) { ");return t}},{}],30:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v=f.baseId,g="prevValid"+s,y="passingSchemas"+s;t+="var "+d+" = errors , "+g+" = false , "+h+" = false , "+y+" = null; ";var P=e.compositeRule;e.compositeRule=f.compositeRule=!0;var E=i;if(E)for(var w,S=-1,b=E.length-1;S<b;)w=E[S+=1],e.util.schemaHasRules(w,e.RULES.all)?(f.schema=w,f.schemaPath=n+"["+S+"]",f.errSchemaPath=l+"/"+S,t+=" "+e.validate(f)+" ",f.baseId=v):t+=" var "+m+" = true; ",S&&(t+=" if ("+m+" && "+g+") { "+h+" = false; "+y+" = ["+y+", "+S+"]; } else { ",p+="}"),t+=" if ("+m+") { "+h+" = "+g+" = true; "+y+" = "+S+"; }";return e.compositeRule=f.compositeRule=P,t+=p+"if (!"+h+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(t+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(t+=" } "),t}},{}],31:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n;var f=d?"(new RegExp("+t+"))":e.usePattern(n);s+="if ( ",d&&(s+=" ("+t+" !== undefined && typeof "+t+" != 'string') || ");var p=p||[];p.push(s+=" !"+f+".test("+h+") ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",s+=d?""+t:""+e.util.toQuotedString(n),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=d?"' + "+t+" + '":""+e.util.escapeQuotes(n),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+e.util.toQuotedString(n),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],32:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e),f="";d.level++;var p="valid"+d.level,m="key"+s,v="idx"+s,g=d.dataLevel=e.dataLevel+1,y="data"+g,P="dataProperties"+s,E=Object.keys(i||{}),w=e.schema.patternProperties||{},S=Object.keys(w),b=e.schema.additionalProperties,_=E.length||S.length,F=!1===b,x="object"==typeof b&&Object.keys(b).length,$=e.opts.removeAdditional,R=F||x||$,D=e.opts.ownProperties,O=e.baseId,j=e.schema.required;if(j&&(!e.opts.$data||!j.$data)&&j.length<e.opts.loopRequired)var I=e.util.toHash(j);if(t+="var "+h+" = errors;var "+p+" = true;",D&&(t+=" var "+P+" = undefined;"),R){if(t+=D?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+m+" = "+P+"["+v+"]; ":" for (var "+m+" in "+u+") { ",_){if(t+=" var isAdditional"+s+" = !(false ",E.length)if(8<E.length)t+=" || validate.schema"+n+".hasOwnProperty("+m+") ";else{var A=E;if(A)for(var C=-1,k=A.length-1;C<k;)J=A[C+=1],t+=" || "+m+" == "+e.util.toQuotedString(J)+" "}if(S.length){var z=S;if(z)for(var L=-1,N=z.length-1;L<N;)te=z[L+=1],t+=" || "+e.usePattern(te)+".test("+m+") "}t+=" ); if (isAdditional"+s+") { "}if("all"==$)t+=" delete "+u+"["+m+"]; ";else{var T=e.errorPath,q="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),F)if($)t+=" delete "+u+"["+m+"]; ";else{var U=l;l=e.errSchemaPath+"/additionalProperties",(ee=ee||[]).push(t+=" "+p+" = false; "),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is an invalid additional property":"should NOT have additional properties",t+="' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var Q=t;t=ee.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,c&&(t+=" break; ")}else if(x)if("failing"==$){t+=" var "+h+" = errors; ";var V=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=u+"["+m+"]";d.dataPathArr[g]=m;var M=e.validate(d);d.baseId=O,e.util.varOccurences(M,y)<2?t+=" "+e.util.varReplace(M,y,H)+" ":t+=" var "+y+" = "+H+"; "+M+" ",t+=" if (!"+p+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+m+"]; } ",e.compositeRule=d.compositeRule=V}else{d.schema=b,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=u+"["+m+"]";d.dataPathArr[g]=m;M=e.validate(d);d.baseId=O,e.util.varOccurences(M,y)<2?t+=" "+e.util.varReplace(M,y,H)+" ":t+=" var "+y+" = "+H+"; "+M+" ",c&&(t+=" if (!"+p+") break; ")}e.errorPath=T}_&&(t+=" } "),t+=" } ",c&&(t+=" if ("+p+") { ",f+="}")}var B=e.opts.useDefaults&&!e.compositeRule;if(E.length){var K=E;if(K)for(var J,Z=-1,G=K.length-1;Z<G;){if(J=K[Z+=1],e.util.schemaHasRules(ie=i[J],e.RULES.all)){var Y=e.util.getProperty(J),W=(H=u+Y,B&&void 0!==ie.default);d.schema=ie,d.schemaPath=n+Y,d.errSchemaPath=l+"/"+e.util.escapeFragment(J),d.errorPath=e.util.getPath(e.errorPath,J,e.opts.jsonPointers),d.dataPathArr[g]=e.util.toQuotedString(J);M=e.validate(d);if(d.baseId=O,e.util.varOccurences(M,y)<2){M=e.util.varReplace(M,y,H);var X=H}else{X=y;t+=" var "+y+" = "+H+"; "}if(W)t+=" "+M+" ";else{if(I&&I[J]){t+=" if ( "+X+" === undefined ",D&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),t+=") { "+p+" = false; ";T=e.errorPath,U=l;var ee,re=e.util.escapeQuotes(J);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(T,J,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(ee=ee||[]).push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+re+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";Q=t;t=ee.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,e.errorPath=T,t+=" } else { "}else c?(t+=" if ( "+X+" === undefined ",D&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),t+=") { "+p+" = true; } else { "):(t+=" if ("+X+" !== undefined ",D&&(t+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(J)+"') "),t+=" ) { ");t+=" "+M+" } "}}c&&(t+=" if ("+p+") { ",f+="}")}}if(S.length){var ae=S;if(ae)for(var te,se=-1,oe=ae.length-1;se<oe;){var ie;if(te=ae[se+=1],e.util.schemaHasRules(ie=w[te],e.RULES.all)){d.schema=ie,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(te),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(te),t+=D?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+m+" = "+P+"["+v+"]; ":" for (var "+m+" in "+u+") { ",t+=" if ("+e.usePattern(te)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=u+"["+m+"]";d.dataPathArr[g]=m;M=e.validate(d);d.baseId=O,e.util.varOccurences(M,y)<2?t+=" "+e.util.varReplace(M,y,H)+" ":t+=" var "+y+" = "+H+"; "+M+" ",c&&(t+=" if (!"+p+") break; "),t+=" } ",c&&(t+=" else "+p+" = true; "),t+=" } ",c&&(t+=" if ("+p+") { ",f+="}")}}}return c&&(t+=" "+f+" if ("+h+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],33:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,g="' + "+p+" + '",y="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,w=e.baseId;t+=" var "+h+" = errors; ",E&&(t+=" var "+P+" = undefined; "),t+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",t+=" var startErrs"+s+" = errors; ";var S=p,b=e.compositeRule;e.compositeRule=d.compositeRule=!0;var _=e.validate(d);d.baseId=w,e.util.varOccurences(_,y)<2?t+=" "+e.util.varReplace(_,y,S)+" ":t+=" var "+y+" = "+S+"; "+_+" ",e.compositeRule=d.compositeRule=b,t+=" if (!"+f+") { for (var "+v+"=startErrs"+s+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+p+"; } var err = ",!1!==e.createErrors?(t+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(t+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),c&&(t+=" break; "),t+=" } }"}return c&&(t+=" if ("+h+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],34:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s,o=" ",i=e.dataLevel,n=e.schema[r],l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),h="valid"+e.level;if("#"==n||"#/"==n)e.isRoot?(t=e.async,s="validate"):(t=!0===e.root.schema.$async,s="root.refVal[0]");else{var d=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===d){var f=e.MissingRefError.message(e.baseId,n);if("fail"==e.opts.missingRefs){e.logger.error(f),(g=g||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),o+=" } "):o+=" {} ";var p=o;o=g.pop(),o+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,n,f);e.logger.warn(f),c&&(o+=" if (true) { ")}}else if(d.inline){var m=e.util.copy(e);m.level++;var v="valid"+m.level;m.schema=d.schema,m.schemaPath="",m.errSchemaPath=n,o+=" "+e.validate(m).replace(/validate\.schema/g,d.code)+" ",c&&(o+=" if ("+v+") { ")}else t=!0===d.$async||e.async&&!1!==d.$async,s=d.code}if(s){var g;(g=g||[]).push(o),o="",o+=e.opts.passContext?" "+s+".call(this, ":" "+s+"( ",o+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var y=o+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";if(o=g.pop(),t){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(o+=" var "+h+"; "),o+=" try { await "+y+"; ",c&&(o+=" "+h+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(o+=" "+h+" = false; "),o+=" } ",c&&(o+=" if ("+h+") { ")}else o+=" if (!"+y+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",c&&(o+=" else { ")}return o}},{}],35:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(t+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var f="schema"+s;if(!d)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],m=i;if(m)for(var v,g=-1,y=m.length-1;g<y;){v=m[g+=1];var P=e.schema.properties[v];P&&e.util.schemaHasRules(P,e.RULES.all)||(p[p.length]=v)}}else p=i;if(d||p.length){var E=e.errorPath,w=d||e.opts.loopRequired<=p.length,S=e.opts.ownProperties;if(c)if(t+=" var missing"+s+"; ",w){d||(t+=" var "+f+" = validate.schema"+n+"; ");var b="' + "+(D="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,D,e.opts.jsonPointers)),t+=" var "+h+" = true; ",d&&(t+=" if (schema"+s+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+s+")) "+h+" = false; else {"),t+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { "+h+" = "+u+"["+f+"["+x+"]] !== undefined ",S&&(t+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),t+="; if (!"+h+") break; } ",d&&(t+=" } "),(R=R||[]).push(t+=" if (!"+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";var _=t;t=R.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else{t+=" if ( ";var F=p;if(F)for(var x=-1,$=F.length-1;x<$;){j=F[x+=1],x&&(t+=" || "),t+=" ( ( "+(k=u+(C=e.util.getProperty(j)))+" === undefined ",S&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),t+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?j:C)+") ) "}t+=") { ";var R;b="' + "+(D="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,D,!0):E+" + "+D),(R=R||[]).push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ";_=t;t=R.pop(),t+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else if(w){d||(t+=" var "+f+" = validate.schema"+n+"; ");var D;b="' + "+(D="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,D,e.opts.jsonPointers)),d&&(t+=" if ("+f+" && !Array.isArray("+f+")) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+f+" !== undefined) { "),t+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { if ("+u+"["+f+"["+x+"]] === undefined ",S&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(t+=" } ")}else{var O=p;if(O)for(var j,I=-1,A=O.length-1;I<A;){j=O[I+=1];var C=e.util.getProperty(j),k=(b=e.util.escapeQuotes(j),u+C);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,j,e.opts.jsonPointers)),t+=" if ( "+k+" === undefined ",S&&(t+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else c&&(t+=" if (true) {");return t}},{}],36:[function(e,r,a){"use strict";r.exports=function(e,r,a){var t,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d="valid"+o,f=e.opts.$data&&n&&n.$data;if(f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",t="schema"+o):t=n,(n||f)&&!1!==e.opts.uniqueItems){f&&(s+=" var "+d+"; if ("+t+" === false || "+t+" === undefined) "+d+" = true; else if (typeof "+t+" != 'boolean') "+d+" = false; else { "),s+=" var i = "+h+".length , "+d+" = true , j; if (i > 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(0<=p.indexOf("object")||0<=p.indexOf("array")))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else s+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ",s+=" if ("+e.util["checkDataType"+(m?"s":"")](p,"item",!0)+") continue; ",m&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ";s+=" } ",f&&(s+=" } ");var v=v||[];v.push(s+=" if (!"+d+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var g=s;s=v.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],37:[function(e,r,a){"use strict";r.exports=function(t,e,r){var a="",s=!0===t.schema.$async,o=t.util.schemaHasRulesExcept(t.schema,t.RULES.all,"$ref"),i=t.self._getId(t.schema);if(t.isTop&&(a+=" var validate = ",s&&(t.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(t.opts.sourceCode||t.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof t.schema||!o&&!t.schema.$ref){var n=t.level,l=t.dataLevel,c=t.schema[e="false schema"],u=t.schemaPath+t.util.getProperty(e),h=t.errSchemaPath+"/"+e,d=!t.opts.allErrors,f="data"+(l||""),p="valid"+n;if(!1===t.schema){t.isTop?d=!0:a+=" var "+p+" = false; ",(K=K||[]).push(a),a="",!1!==t.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: {} ",!1!==t.opts.messages&&(a+=" , message: 'boolean schema is false' "),t.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var m=a;a=K.pop(),a+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else a+=t.isTop?s?" return data; ":" validate.errors = null; return true; ":" var "+p+" = true; ";return t.isTop&&(a+=" }; return validate; "),a}if(t.isTop){var v=t.isTop;n=t.level=0,l=t.dataLevel=0,f="data";t.rootId=t.resolve.fullPath(t.self._getId(t.root.schema)),t.baseId=t.baseId||t.rootId,delete t.isTop,t.dataPathArr=[void 0],a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{n=t.level,f="data"+((l=t.dataLevel)||"");if(i&&(t.baseId=t.resolve.url(t.baseId,i)),s&&!t.async)throw new Error("async schema in sync schema");a+=" var errs_"+n+" = errors;"}p="valid"+n,d=!t.opts.allErrors;var g="",y="",P=t.schema.type,E=Array.isArray(P);if(E&&1==P.length&&(P=P[0],E=!1),t.schema.$ref&&o){if("fail"==t.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+t.errSchemaPath+'" (see option extendRefs)');!0!==t.opts.extendRefs&&(o=!1,t.logger.warn('$ref: keywords ignored in schema at path "'+t.errSchemaPath+'"'))}if(t.schema.$comment&&t.opts.$comment&&(a+=" "+t.RULES.all.$comment.code(t,"$comment")),P){if(t.opts.coerceTypes)var w=t.util.coerceToTypes(t.opts.coerceTypes,P);var S=t.RULES.types[P];if(w||E||!0===S||S&&!J(S)){u=t.schemaPath+".type",h=t.errSchemaPath+"/type",u=t.schemaPath+".type",h=t.errSchemaPath+"/type";if(a+=" if ("+t.util[E?"checkDataTypes":"checkDataType"](P,f,!0)+") { ",w){var b="dataType"+n,_="coerced"+n;a+=" var "+b+" = typeof "+f+"; ","array"==t.opts.coerceTypes&&(a+=" if ("+b+" == 'object' && Array.isArray("+f+")) "+b+" = 'array'; "),a+=" var "+_+" = undefined; ";var F="",x=w;if(x)for(var $,R=-1,D=x.length-1;R<D;)$=x[R+=1],R&&(a+=" if ("+_+" === undefined) { ",F+="}"),"array"==t.opts.coerceTypes&&"array"!=$&&(a+=" if ("+b+" == 'array' && "+f+".length == 1) { "+_+" = "+f+" = "+f+"[0]; "+b+" = typeof "+f+"; } "),"string"==$?a+=" if ("+b+" == 'number' || "+b+" == 'boolean') "+_+" = '' + "+f+"; else if ("+f+" === null) "+_+" = ''; ":"number"==$||"integer"==$?(a+=" if ("+b+" == 'boolean' || "+f+" === null || ("+b+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==$&&(a+=" && !("+f+" % 1)"),a+=")) "+_+" = +"+f+"; "):"boolean"==$?a+=" if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+_+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+_+" = true; ":"null"==$?a+=" if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+_+" = null; ":"array"==t.opts.coerceTypes&&"array"==$&&(a+=" if ("+b+" == 'string' || "+b+" == 'number' || "+b+" == 'boolean' || "+f+" == null) "+_+" = ["+f+"]; ");(K=K||[]).push(a+=" "+F+" if ("+_+" === undefined) { "),a="",!1!==t.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==t.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),t.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";m=a;a=K.pop(),a+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ";var O=l?"data"+(l-1||""):"parentData";a+=" "+f+" = "+_+"; ",l||(a+="if ("+O+" !== undefined)"),a+=" "+O+"["+(l?t.dataPathArr[l]:"parentDataProperty")+"] = "+_+"; } "}else{(K=K||[]).push(a),a="",!1!==t.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==t.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),t.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";m=a;a=K.pop(),a+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(t.schema.$ref&&!o)a+=" "+t.RULES.all.$ref.code(t,"$ref")+" ",d&&(a+=" } if (errors === ",a+=v?"0":"errs_"+n,a+=") { ",y+="}");else{var j=t.RULES;if(j)for(var I=-1,A=j.length-1;I<A;)if(J(S=j[I+=1])){if(S.type&&(a+=" if ("+t.util.checkDataType(S.type,f)+") { "),t.opts.useDefaults&&!t.compositeRule)if("object"==S.type&&t.schema.properties){c=t.schema.properties;var C=Object.keys(c);if(C)for(var k,z=-1,L=C.length-1;z<L;){if(void 0!==(T=c[k=C[z+=1]]).default)a+=" if ("+(U=f+t.util.getProperty(k))+" === undefined) "+U+" = ",a+="shared"==t.opts.useDefaults?" "+t.useDefault(T.default)+" ":" "+JSON.stringify(T.default)+" ",a+="; "}}else if("array"==S.type&&Array.isArray(t.schema.items)){var N=t.schema.items;if(N){R=-1;for(var T,q=N.length-1;R<q;){var U;if(void 0!==(T=N[R+=1]).default)a+=" if ("+(U=f+"["+R+"]")+" === undefined) "+U+" = ",a+="shared"==t.opts.useDefaults?" "+t.useDefault(T.default)+" ":" "+JSON.stringify(T.default)+" ",a+="; "}}}var Q=S.rules;if(Q)for(var V,H=-1,M=Q.length-1;H<M;)if(Z(V=Q[H+=1])){var B=V.code(t,V.keyword,S.type);B&&(a+=" "+B+" ",d&&(g+="}"))}if(d&&(a+=" "+g+" ",g=""),S.type&&(a+=" } ",P&&P===S.type&&!w)){var K;u=t.schemaPath+".type",h=t.errSchemaPath+"/type";(K=K||[]).push(a+=" else { "),a="",!1!==t.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(h)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==t.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),t.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";m=a;a=K.pop(),a+=!t.compositeRule&&d?t.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}d&&(a+=" if (errors === ",a+=v?"0":"errs_"+n,a+=") { ",y+="}")}}function J(e){for(var r=e.rules,a=0;a<r.length;a++)if(Z(r[a]))return!0}function Z(e){return void 0!==t.schema[e.keyword]||e.implements&&function(e){for(var r=e.implements,a=0;a<r.length;a++)if(void 0!==t.schema[r[a]])return!0}(e)}return d&&(a+=" "+y+" "),v?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+p+" = errors === errs_"+n+";",a=t.util.cleanUpCode(a),v&&(a=t.util.finalCleanUpCode(a,s)),a}},{}],38:[function(e,r,a){"use strict";var u=/^[a-z_$][a-z0-9_$-]*$/i,h=e("./dotjs/custom");r.exports={add:function(e,r){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!u.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){if(r.macro&&void 0!==r.valid)throw new Error('"valid" option cannot be used with macro keywords');var a=r.type;if(Array.isArray(a)){var t,s=a.length;for(t=0;t<s;t++)c(a[t]);for(t=0;t<s;t++)l(e,a[t],r)}else a&&c(a),l(e,a,r);var o=!0===r.$data&&this._opts.$data;if(o&&!r.validate)throw new Error('$data support: "validate" function is not defined');var i=r.metaSchema;i&&(o&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function l(e,r,a){for(var t,s=0;s<n.length;s++){var o=n[s];if(o.type==r){t=o;break}}t||n.push(t={type:r,rules:[]});var i={keyword:e,definition:a,custom:!0,code:h,implements:a.implements};t.rules.push(i),n.custom[e]=i}function c(e){if(!n.types[e])throw new Error("Unknown type "+e)}return n.keywords[e]=n.all[e]=!0,this},get:function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},remove:function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var a=0;a<r.length;a++)for(var t=r[a].rules,s=0;s<t.length;s++)if(t[s].keyword==e){t.splice(s,1);break}return this}}},{"./dotjs/custom":21}],39:[function(e,r,a){r.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},{}],40:[function(e,r,a){r.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}},{}],41:[function(e,r,a){"use strict";var f=Array.isArray,p=Object.keys,m=Object.prototype.hasOwnProperty;r.exports=function e(r,a){if(r===a)return!0;var t,s,o,i=f(r),n=f(a);if(i&&n){if((s=r.length)!=a.length)return!1;for(t=0;t<s;t++)if(!e(r[t],a[t]))return!1;return!0}if(i!=n)return!1;var l=r instanceof Date,c=a instanceof Date;if(l!=c)return!1;if(l&&c)return r.getTime()==a.getTime();var u=r instanceof RegExp,h=a instanceof RegExp;if(u!=h)return!1;if(u&&h)return r.toString()==a.toString();if(r instanceof Object&&a instanceof Object){var d=p(r);if((s=d.length)!==p(a).length)return!1;for(t=0;t<s;t++)if(!m.call(a,d[t]))return!1;for(t=0;t<s;t++)if(!e(r[o=d[t]],a[o]))return!1;return!0}return!1}},{}],42:[function(e,r,a){"use strict";r.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,l="boolean"==typeof r.cycles&&r.cycles,c=r.cmp&&(t=r.cmp,function(a){return function(e,r){return t({key:e,value:a[e]},{key:r,value:a[r]})}}),u=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);var a,t;if(Array.isArray(r)){for(t="[",a=0;a<r.length;a++)a&&(t+=","),t+=e(r[a])||"null";return t+"]"}if(null===r)return"null";if(-1!==u.indexOf(r)){if(l)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=u.push(r)-1,o=Object.keys(r).sort(c&&c(r));for(t="",a=0;a<o.length;a++){var i=o[a],n=e(r[i]);n&&(t&&(t+=","),t+=JSON.stringify(i)+":"+n)}return u.splice(s,1),"{"+t+"}"}}(e)}},{}],43:[function(e,r,a){"use strict";var p=r.exports=function(e,r,a){"function"==typeof r&&(a=r,r={}),function e(r,a,t,s,o,i,n,l,c){if(t&&"object"==typeof t&&!Array.isArray(t))for(var u in a(t,s,o,i,n,l,c),t){var h=t[u];if(Array.isArray(h)){if(u in p.arrayKeywords)for(var d=0;d<h.length;d++)e(r,a,h[d],s+"/"+u+"/"+d,o,s,u,t,d)}else if(u in p.propsKeywords){if(h&&"object"==typeof h)for(var f in h)e(r,a,h[f],s+"/"+u+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),o,s,u,t,f)}else(u in p.keywords||r.allKeys&&!(u in p.skipKeywords))&&e(r,a,h,s+"/"+u,o,s,u,t)}}(r,a,e,"",e)};p.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},p.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},p.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},p.skipKeywords={enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},{}],44:[function(e,r,a){var t;t=this,function(e){"use strict";function A(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];if(1<r.length){r[0]=r[0].slice(0,-1);for(var t=r.length-1,s=1;s<t;++s)r[s]=r[s].slice(1,-1);return r[t]=r[t].slice(1),r.join("")}return r[0]}function C(e){return"(?:"+e+")"}function t(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function f(e){return e.toUpperCase()}function r(e){var r="[A-Za-z]",a="[0-9]",t=A(a,"[A-Fa-f]"),s=C(C("%[EFef]"+t+"%"+t+t+"%"+t+t)+"|"+C("%[89A-Fa-f]"+t+"%"+t+t)+"|"+C("%"+t+t)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=A("[\\:\\/\\?\\#\\[\\]\\@]",o),n=e?"[\\uE000-\\uF8FF]":"[]",l=A(r,a,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),c=C(r+A(r,a,"[\\+\\-\\.]")+"*"),u=C(C(s+"|"+A(l,o,"[\\:]"))+"*"),h=C(C("25[0-5]")+"|"+C("2[0-4]"+a)+"|"+C("1"+a+a)+"|"+C("[1-9]"+a)+"|"+a),d=C(h+"\\."+h+"\\."+h+"\\."+h),f=C(t+"{1,4}"),p=C(C(f+"\\:"+f)+"|"+d),m=C([C(C(f+"\\:")+"{6}"+p),C("\\:\\:"+C(f+"\\:")+"{5}"+p),C(C(f)+"?\\:\\:"+C(f+"\\:")+"{4}"+p),C(C(C(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+C(f+"\\:")+"{3}"+p),C(C(C(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+C(f+"\\:")+"{2}"+p),C(C(C(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),C(C(C(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),C(C(C(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),C(C(C(f+"\\:")+"{0,6}"+f)+"?\\:\\:")].join("|")),v=C("\\["+C(m+"|"+C("[vV]"+t+"+\\."+A(l,o,"[\\:]")+"+"))+"\\]"),g=C(C(s+"|"+A(l,o))+"*"),y=C(v+"|"+d+"(?!"+g+")|"+g),P=C(a+"*"),E=C(C(u+"@")+"?"+y+C("\\:"+P)+"?"),w=C(s+"|"+A(l,o,"[\\:\\@]")),S=C(w+"*"),b=C(w+"+"),_=C(C(s+"|"+A(l,o,"[\\@]"))+"+"),F=C(C("\\/"+S)+"*"),x=C("\\/"+C(b+F)+"?"),$=C(_+F),R=C(b+F),D="(?!"+w+")",O=(C(F+"|"+x+"|"+$+"|"+R+"|"+D),C(C(w+"|"+A("[\\/\\?]",n))+"*")),j=C(C(w+"|[\\/\\?]")+"*"),I=C(C("\\/\\/"+E+F)+"|"+x+"|"+R+"|"+D);C(C(c+"\\:"+I+C("\\?"+O)+"?"+C("\\#"+j)+"?")+"|"+C(C(C("\\/\\/"+E+F)+"|"+x+"|"+$+"|"+D)+C("\\?"+O)+"?"+C("\\#"+j)+"?")),C(c+"\\:"+I+C("\\?"+O)+"?"),C(C("\\/\\/("+C("("+u+")@")+"?("+y+")"+C("\\:("+P+")")+"?)")+"?("+F+"|"+x+"|"+R+"|"+D+")"),C("\\?("+O+")"),C("\\#("+j+")"),C(C("\\/\\/("+C("("+u+")@")+"?("+y+")"+C("\\:("+P+")")+"?)")+"?("+F+"|"+x+"|"+$+"|"+D+")"),C("\\?("+O+")"),C("\\#("+j+")"),C(C("\\/\\/("+C("("+u+")@")+"?("+y+")"+C("\\:("+P+")")+"?)")+"?("+F+"|"+x+"|"+R+"|"+D+")"),C("\\?("+O+")"),C("\\#("+j+")"),C("("+u+")@"),C("\\:("+P+")");return{NOT_SCHEME:new RegExp(A("[^]",r,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(A("[^\\%\\:]",l,o),"g"),NOT_HOST:new RegExp(A("[^\\%\\[\\]\\:]",l,o),"g"),NOT_PATH:new RegExp(A("[^\\%\\/\\:\\@]",l,o),"g"),NOT_PATH_NOSCHEME:new RegExp(A("[^\\%\\/\\@]",l,o),"g"),NOT_QUERY:new RegExp(A("[^\\%]",l,o,"[\\:\\@\\/\\?]",n),"g"),NOT_FRAGMENT:new RegExp(A("[^\\%]",l,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(A("[^]",l,o),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(A("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV6ADDRESS:new RegExp("\\[?("+m+")\\]?","g")}}var u=r(!1),h=r(!0),k=2147483647,a=/^xn--/,s=/[^\0-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode;function N(e){throw new RangeError(i[e])}function n(e,r){var a=e.split("@"),t="";return 1<a.length&&(t=a[0]+"@",e=a[1]),t+function(e,r){for(var a=[],t=e.length;t--;)a[t]=r(e[t]);return a}((e=e.replace(o,".")).split("."),r).join(".")}function T(e){for(var r=[],a=0,t=e.length;a<t;){var s=e.charCodeAt(a++);if(55296<=s&&s<=56319&&a<t){var o=e.charCodeAt(a++);56320==(64512&o)?r.push(((1023&s)<<10)+(1023&o)+65536):(r.push(s),a--)}else r.push(s)}return r}var q=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},U=function(e,r,a){var t=0;for(e=a?z(e/700):e>>1,e+=z(e/r);455<e;t+=36)e=z(e/35);return z(t+36*e/(e+38))},l=function(e){var r,a=[],t=e.length,s=0,o=128,i=72,n=e.lastIndexOf("-");n<0&&(n=0);for(var l=0;l<n;++l)128<=e.charCodeAt(l)&&N("not-basic"),a.push(e.charCodeAt(l));for(var c=0<n?n+1:0;c<t;){for(var u=s,h=1,d=36;;d+=36){t<=c&&N("invalid-input");var f=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(36<=f||f>z((k-s)/h))&&N("overflow"),s+=f*h;var p=d<=i?1:i+26<=d?26:d-i;if(f<p)break;var m=36-p;h>z(k/m)&&N("overflow"),h*=m}var v=a.length+1;i=U(s-u,v,0==u),z(s/v)>k-o&&N("overflow"),o+=z(s/v),s%=v,a.splice(s++,0,o)}return String.fromCodePoint.apply(String,a)},c=function(e){var r=[],a=(e=T(e)).length,t=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(L(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,f=d;for(d&&r.push("-");f<a;){var p=k,m=!0,v=!1,g=void 0;try{for(var y,P=e[Symbol.iterator]();!(m=(y=P.next()).done);m=!0){var E=y.value;t<=E&&E<p&&(p=E)}}catch(e){v=!0,g=e}finally{try{!m&&P.return&&P.return()}finally{if(v)throw g}}var w=f+1;p-t>z((k-s)/w)&&N("overflow"),s+=(p-t)*w,t=p;var S=!0,b=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(S=(F=x.next()).done);S=!0){var $=F.value;if($<t&&++s>k&&N("overflow"),$==t){for(var R=s,D=36;;D+=36){var O=D<=o?1:o+26<=D?26:D-o;if(R<O)break;var j=R-O,I=36-O;r.push(L(q(O+j%I,0))),R=z(j/I)}r.push(L(q(R,0))),o=U(s,w,f==d),s=0,++f}}}catch(e){b=!0,_=e}finally{try{!S&&x.return&&x.return()}finally{if(b)throw _}}++s,++t}return r.join("")},m={version:"2.1.0",ucs2:{decode:T,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var r=0,a=Array(e.length);r<e.length;r++)a[r]=e[r];return a}return Array.from(e)}(e))}},decode:l,encode:c,toASCII:function(e){return n(e,function(e){return s.test(e)?"xn--"+c(e):e})},toUnicode:function(e){return n(e,function(e){return a.test(e)?l(e.slice(4).toLowerCase()):e})}},d={};function p(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function v(e){for(var r="",a=0,t=e.length;a<t;){var s=parseInt(e.substr(a+1,2),16);if(s<128)r+=String.fromCharCode(s),a+=3;else if(194<=s&&s<224){if(6<=t-a){var o=parseInt(e.substr(a+4,2),16);r+=String.fromCharCode((31&s)<<6|63&o)}else r+=e.substr(a,6);a+=6}else if(224<=s){if(9<=t-a){var i=parseInt(e.substr(a+4,2),16),n=parseInt(e.substr(a+7,2),16);r+=String.fromCharCode((15&s)<<12|(63&i)<<6|63&n)}else r+=e.substr(a,9);a+=9}else r+=e.substr(a,3),a+=3}return r}function g(e,a){function r(e){var r=v(e);return r.match(a.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(a.PCT_ENCODED,r).toLowerCase().replace(a.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(a.PCT_ENCODED,r).replace(a.NOT_USERINFO,p).replace(a.PCT_ENCODED,f)),void 0!==e.host&&(e.host=String(e.host).replace(a.PCT_ENCODED,r).toLowerCase().replace(a.NOT_HOST,p).replace(a.PCT_ENCODED,f)),void 0!==e.path&&(e.path=String(e.path).replace(a.PCT_ENCODED,r).replace(e.scheme?a.NOT_PATH:a.NOT_PATH_NOSCHEME,p).replace(a.PCT_ENCODED,f)),void 0!==e.query&&(e.query=String(e.query).replace(a.PCT_ENCODED,r).replace(a.NOT_QUERY,p).replace(a.PCT_ENCODED,f)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(a.PCT_ENCODED,r).replace(a.NOT_FRAGMENT,p).replace(a.PCT_ENCODED,f)),e}var y=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,P=void 0==="".match(/(){0}/)[1];function E(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a={},t=!1!==r.iri?h:u;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var s=e.match(y);if(s){P?(a.scheme=s[1],a.userinfo=s[3],a.host=s[4],a.port=parseInt(s[5],10),a.path=s[6]||"",a.query=s[7],a.fragment=s[8],isNaN(a.port)&&(a.port=s[5])):(a.scheme=s[1]||void 0,a.userinfo=-1!==e.indexOf("@")?s[3]:void 0,a.host=-1!==e.indexOf("//")?s[4]:void 0,a.port=parseInt(s[5],10),a.path=s[6]||"",a.query=-1!==e.indexOf("?")?s[7]:void 0,a.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(a.port)&&(a.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),a.host&&(a.host=a.host.replace(t.IPV6ADDRESS,"$1")),a.reference=void 0!==a.scheme||void 0!==a.userinfo||void 0!==a.host||void 0!==a.port||a.path||void 0!==a.query?void 0===a.scheme?"relative":void 0===a.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==a.reference&&(a.error=a.error||"URI is not a "+r.reference+" reference.");var o=d[(r.scheme||a.scheme||"").toLowerCase()];if(r.unicodeSupport||o&&o.unicodeSupport)g(a,t);else{if(a.host&&(r.domainHost||o&&o.domainHost))try{a.host=m.toASCII(a.host.replace(t.PCT_ENCODED,v).toLowerCase())}catch(e){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+e}g(a,u)}o&&o.parse&&o.parse(a,r)}else a.error=a.error||"URI can not be parsed.";return a}var w=/^\.\.?\//,S=/^\/\.(\/|$)/,b=/^\/\.\.(\/|$)/,_=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var r=[];e.length;)if(e.match(w))e=e.replace(w,"");else if(e.match(S))e=e.replace(S,"/");else if(e.match(b))e=e.replace(b,"/"),r.pop();else if("."===e||".."===e)e="";else{var a=e.match(_);if(!a)throw new Error("Unexpected dot segment condition");var t=a[0];e=e.slice(t.length),r.push(t)}return r.join("")}function x(r){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=a.iri?h:u,t=[],s=d[(a.scheme||r.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(r,a),r.host)if(e.IPV6ADDRESS.test(r.host));else if(a.domainHost||s&&s.domainHost)try{r.host=a.iri?m.toUnicode(r.host):m.toASCII(r.host.replace(e.PCT_ENCODED,v).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to "+(a.iri?"Unicode":"ASCII")+" via punycode: "+e}g(r,e),"suffix"!==a.reference&&r.scheme&&(t.push(r.scheme),t.push(":"));var o,i,n,l=(i=!1!==a.iri?h:u,n=[],void 0!==(o=r).userinfo&&(n.push(o.userinfo),n.push("@")),void 0!==o.host&&n.push(String(o.host).replace(i.IPV6ADDRESS,"[$1]")),"number"==typeof o.port&&(n.push(":"),n.push(o.port.toString(10))),n.length?n.join(""):void 0);if(void 0!==l&&("suffix"!==a.reference&&t.push("//"),t.push(l),r.path&&"/"!==r.path.charAt(0)&&t.push("/")),void 0!==r.path){var c=r.path;a.absolutePath||s&&s.absolutePath||(c=F(c)),void 0===l&&(c=c.replace(/^\/\//,"/%2F")),t.push(c)}return void 0!==r.query&&(t.push("?"),t.push(r.query)),void 0!==r.fragment&&(t.push("#"),t.push(r.fragment)),t.join("")}function $(e,r){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},t={};return arguments[3]||(e=E(x(e,a),a),r=E(x(r,a),a)),!(a=a||{}).tolerant&&r.scheme?(t.scheme=r.scheme,t.userinfo=r.userinfo,t.host=r.host,t.port=r.port,t.path=F(r.path||""),t.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(t.userinfo=r.userinfo,t.host=r.host,t.port=r.port,t.path=F(r.path||""),t.query=r.query):(r.path?("/"===r.path.charAt(0)?t.path=F(r.path):(t.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:r.path:"/"+r.path,t.path=F(t.path)),t.query=r.query):(t.path=e.path,t.query=void 0!==r.query?r.query:e.query),t.userinfo=e.userinfo,t.host=e.host,t.port=e.port),t.scheme=e.scheme),t.fragment=r.fragment,t}function R(e,r){return e&&e.toString().replace(r&&r.iri?h.PCT_ENCODED:u.PCT_ENCODED,v)}var D={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},O={scheme:"https",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize},j={},I="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Q="[0-9A-Fa-f]",V=C(C("%[EFef]"+Q+"%"+Q+Q+"%"+Q+Q)+"|"+C("%[89A-Fa-f]"+Q+"%"+Q+Q)+"|"+C("%"+Q+Q)),H=A("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),M=new RegExp(I,"g"),B=new RegExp(V,"g"),K=new RegExp(A("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',H),"g"),J=new RegExp(A("[^]",I,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Z=J;function G(e){var r=v(e);return r.match(M)?r:e}var Y={scheme:"mailto",parse:function(r,e){var a=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var t=!1,s={},o=r.query.split("&"),i=0,n=o.length;i<n;++i){var l=o[i].split("=");switch(l[0]){case"to":for(var c=l[1].split(","),u=0,h=c.length;u<h;++u)a.push(c[u]);break;case"subject":r.subject=R(l[1],e);break;case"body":r.body=R(l[1],e);break;default:t=!0,s[R(l[0],e)]=R(l[1],e)}}t&&(r.headers=s)}r.query=void 0;for(var d=0,f=a.length;d<f;++d){var p=a[d].split("@");if(p[0]=R(p[0]),e.unicodeSupport)p[1]=R(p[1],e).toLowerCase();else try{p[1]=m.toASCII(R(p[1],e).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[d]=p.join("@")}return r},serialize:function(r,a){var e,t=null!=(e=r.to)?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[];if(t){for(var s=0,o=t.length;s<o;++s){var i=String(t[s]),n=i.lastIndexOf("@"),l=i.slice(0,n).replace(B,G).replace(B,f).replace(K,p),c=i.slice(n+1);try{c=a.iri?m.toUnicode(c):m.toASCII(R(c,a).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(a.iri?"Unicode":"ASCII")+" via punycode: "+e}t[s]=l+"@"+c}r.path=t.join(",")}var u=r.headers=r.headers||{};r.subject&&(u.subject=r.subject),r.body&&(u.body=r.body);var h=[];for(var d in u)u[d]!==j[d]&&h.push(d.replace(B,G).replace(B,f).replace(J,p)+"="+u[d].replace(B,G).replace(B,f).replace(Z,p));return h.length&&(r.query=h.join("&")),r}},W=new RegExp("^urn\\:((?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31}))$"),X=/^([^\:]+)\:(.*)/,ee=/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g,re={scheme:"urn",parse:function(e,r){var a=e.path&&e.path.match(X);if(a){var t="urn:"+a[1].toLowerCase(),s=d[t];s||(s=d[t]={scheme:t,parse:function(e,r){return e},serialize:d.urn.serialize}),e.scheme=t,e.path=a[2],e=s.parse(e,r)}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,r){var a=e.scheme||r.scheme;if(a&&"urn"!==a){var t=a.match(W)||["urn:"+a,a];e.scheme="urn",e.path=t[1]+":"+(e.path?e.path.replace(ee,p):"")}return e}},ae=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,te={scheme:"urn:uuid",parse:function(e,r){return r.tolerant||e.path&&e.path.match(ae)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,r){return r.tolerant||e.path&&e.path.match(ae)?e.path=(e.path||"").toLowerCase():e.scheme=void 0,d.urn.serialize(e,r)}};d.http=D,d.https=O,d.mailto=Y,d.urn=re,d["urn:uuid"]=te,e.SCHEMES=d,e.pctEncChar=p,e.pctDecChars=v,e.parse=E,e.removeDotSegments=F,e.serialize=x,e.resolveComponents=$,e.resolve=function(e,r,a){return x($(E(e,a),E(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=x(E(e,r),r):"object"===t(e)&&(e=E(x(e,r),r)),e},e.equal=function(e,r,a){return"string"==typeof e?e=x(E(e,a),a):"object"===t(e)&&(e=x(e,a)),"string"==typeof r?r=x(E(r,a),a):"object"===t(r)&&(r=x(r,a)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?h.ESCAPE:u.ESCAPE,p)},e.unescapeComponent=R,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof a&&void 0!==r?a:t.URI=t.URI||{})},{}],ajv:[function(t,e,r){"use strict";var n=t("./compile"),d=t("./compile/resolve"),a=t("./cache"),f=t("./compile/schema_obj"),s=t("fast-json-stable-stringify"),o=t("./compile/formats"),i=t("./compile/rules"),l=t("./data"),c=t("./compile/util");(e.exports=g).prototype.validate=function(e,r){var a;if("string"==typeof e){if(!(a=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var t=this._addSchema(e);a=t.validate||this._compile(t)}var s=a(r);!0!==a.$async&&(this.errors=a.errors);return s},g.prototype.compile=function(e,r){var a=this._addSchema(e,void 0,r);return a.validate||this._compile(a)},g.prototype.addSchema=function(e,r,a,t){if(Array.isArray(e)){for(var s=0;s<e.length;s++)this.addSchema(e[s],void 0,a,t);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return b(this,r=d.normalizeId(r||o)),this._schemas[r]=this._addSchema(e,a,t,!0),this},g.prototype.addMetaSchema=function(e,r,a){return this.addSchema(e,r,a,!0),this},g.prototype.validateSchema=function(e,r){var a=e.$schema;if(void 0!==a&&"string"!=typeof a)throw new Error("$schema must be a string");if(!(a=a||this._opts.defaultMeta||(t=this,s=t._opts.meta,t._opts.defaultMeta="object"==typeof s?t._getId(s)||s:t.getSchema(p)?p:void 0,t._opts.defaultMeta)))return this.logger.warn("meta-schema not available"),!(this.errors=null);var t,s;var o,i=this._formats.uri;this._formats.uri="function"==typeof i?this._schemaUriFormatFunc:this._schemaUriFormat;try{o=this.validate(a,e)}finally{this._formats.uri=i}if(!o&&r){var n="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(n);this.logger.error(n)}return o},g.prototype.getSchema=function(e){var r=y(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var a=d.schema.call(e,{schema:{}},r);if(a){var t=a.schema,s=a.root,o=a.baseId,i=n.call(e,t,s,void 0,o);return e._fragments[r]=new f({ref:r,fragment:!0,schema:t,root:s,baseId:o,validate:i}),i}}(this,e)}},g.prototype.removeSchema=function(e){if(e instanceof RegExp)return P(this,this._schemas,e),P(this,this._refs,e),this;switch(typeof e){case"undefined":return P(this,this._schemas),P(this,this._refs),this._cache.clear(),this;case"string":var r=y(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var a=this._opts.serialize,t=a?a(e):e;this._cache.del(t);var s=this._getId(e);s&&(s=d.normalizeId(s),delete this._schemas[s],delete this._refs[s])}return this},g.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},g.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var a=void 0===(r=r||{}).separator?", ":r.separator,t=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=t+i.dataPath+" "+i.message+a)}return s.slice(0,-a.length)},g.prototype._addSchema=function(e,r,a,t){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var s=this._opts.serialize,o=s?s(e):e,i=this._cache.get(o);if(i)return i;t=t||!1!==this._opts.addUsedSchema;var n=d.normalizeId(this._getId(e));n&&t&&b(this,n);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=n&&n==d.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=d.ids.call(this,e),h=new f({id:n,schema:e,localRefs:u,cacheKey:o,meta:a});"#"!=n[0]&&t&&(this._refs[n]=h);this._cache.put(o,h),c&&l&&this.validateSchema(e,!0);return h},g.prototype._compile=function(a,e){if(a.compiling)return(a.validate=s).schema=a.schema,s.errors=null,s.root=e||s,!0===a.schema.$async&&(s.$async=!0),s;var r,t;a.compiling=!0,a.meta&&(r=this._opts,this._opts=this._metaOpts);try{t=n.call(this,a.schema,e,a.localRefs)}finally{a.compiling=!1,a.meta&&(this._opts=r)}return a.validate=t,a.refs=t.refs,a.refVal=t.refVal,a.root=t.root,t;function s(){var e=a.validate,r=e.apply(null,arguments);return s.errors=e.errors,r}},g.prototype.compileAsync=t("./compile/async");var u=t("./keyword");g.prototype.addKeyword=u.add,g.prototype.getKeyword=u.get,g.prototype.removeKeyword=u.remove;var h=t("./compile/error_classes");g.ValidationError=h.Validation,g.MissingRefError=h.MissingRef,g.$dataMetaSchema=l;var p="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes"],v=["/properties"];function g(e){if(!(this instanceof g))return new g(e);e=this._opts=c.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:_,warn:_,error:_};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=o(e.format);var r=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return r.test(e)},this._cache=e.cache||new a,this._loadingSchemas={},this._compilations=[],this.RULES=i(),this._getId=function(e){switch(e.schemaId){case"auto":return S;case"id":return E;default:return w}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=s),this._metaOpts=function(e){for(var r=c.copy(e._opts),a=0;a<m.length;a++)delete r[m[a]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var a=e._opts.formats[r];e.addFormat(r,a)}}(this),function(e){var r;e._opts.$data&&(r=t("./refs/data.json"),e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var a=t("./refs/json-schema-draft-07.json");e._opts.$data&&(a=l(a,v));e.addMetaSchema(a,p,!0),e._refs["http://json-schema.org/schema"]=p}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var a in r)e.addSchema(r[a],a)}(this)}function y(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function P(e,r,a){for(var t in r){var s=r[t];s.meta||a&&!a.test(t)||(e._cache.del(s.cacheKey),delete r[t])}}function E(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function w(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function S(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function b(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function _(){}},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":38,"./refs/data.json":39,"./refs/json-schema-draft-07.json":40,"fast-json-stable-stringify":42}]},{},[])("ajv")});
  3. //# sourceMappingURL=ajv.min.js.map