UNPKG

160 kBJavaScriptView Raw
1!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("arcgoose",[],r):"object"==typeof exports?exports.arcgoose=r():e.arcgoose=r()}("undefined"!=typeof self?self:this,function(){return function(e){var r={};function t(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(a,o,function(r){return e[r]}.bind(null,o));return a},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=71)}([function(e,r,t){e.exports=t(29)},function(e,r){e.exports=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}},function(e,r){function t(e,r,t,a,o,s,n){try{var i=e[s](n),u=i.value}catch(e){return void t(e)}i.done?r(u):Promise.resolve(u).then(a,o)}e.exports=function(e){return function(){var r=this,a=arguments;return new Promise(function(o,s){var n=e.apply(r,a);function i(e){t(n,o,s,i,u,"next",e)}function u(e){t(n,o,s,i,u,"throw",e)}i(void 0)})}}},function(e,r,t){var a=t(66),o=t(67),s=t(68);e.exports=function(e){return a(e)||o(e)||s()}},function(e,r){e.exports=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}},function(e,r){function t(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}e.exports=function(e,r,a){return r&&t(e.prototype,r),a&&t(e,a),e}},function(e,r,t){"use strict";function a(e,r,t){var a=t?" !== ":" === ",o=t?" || ":" && ",s=t?"!":"",n=t?"":"!";switch(e){case"null":return r+a+"null";case"array":return s+"Array.isArray("+r+")";case"object":return"("+s+r+o+"typeof "+r+a+'"object"'+o+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+a+'"number"'+o+n+"("+r+" % 1)"+o+r+a+r+")";default:return"typeof "+r+a+'"'+e+'"'}}e.exports={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:a,checkDataTypes:function(e,r){switch(e.length){case 1:return a(e[0],r,!0);default:var t="",o=s(e);for(var n in o.array&&o.object&&(t=o.null?"(":"(!"+r+" || ",t+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)t+=(t?" && ":"")+a(n,r,!0);return t}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];o[s]?t[t.length]=s:"array"===e&&"array"===s&&(t[t.length]=s)}if(t.length)return t}else{if(o[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:s,getProperty:u,escapeQuotes:c,equal:t(10),ucs2length:t(35),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},cleanUpCode:function(e){return e.replace(l,"").replace(h,"").replace(f,"if (!($1))")},finalCleanUpCode:function(e,r){var t=e.match(p);t&&2==t.length&&(e=r?e.replace(m,"").replace(g,P):e.replace(d,"").replace(v,y));return(t=e.match(b))&&3===t.length?e.replace(E,""):e},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:w,getPathExpr:function(e,r,t,a){return x(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=w(t?"/"+j(r):u(r));return x(e,a)},getData:function(e,r,t){var a,o,s,n;if(""===e)return"rootData";if("/"==e[0]){if(!S.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,s="rootData"}else{if(!(n=e.match(O)))throw new Error("Invalid JSON-pointer: "+e);if(a=+n[1],"#"==(o=n[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(s="data"+(r-a||""),!o)return s}for(var i=s,c=o.split("/"),l=0;l<c.length;l++){var h=c[l];h&&(s+=u(R(h)),i+=" && "+s)}return i},unescapeFragment:function(e){return R(decodeURIComponent(e))},unescapeJsonPointer:R,escapeFragment:function(e){return encodeURIComponent(j(e))},escapeJsonPointer:j};var o=s(["string","number","integer","boolean","null"]);function s(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var n=/^[a-z$_][a-z$_0-9]*$/i,i=/'|\\/g;function u(e){return"number"==typeof e?"["+e+"]":n.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(i,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}var l=/else\s*{\s*}/g,h=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,f=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var p=/[^v.]errors/g,d=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,m=/var errors = 0;|var vErrors = null;/g,v="return errors === 0;",y="validate.errors = null; return true;",g=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,P="return data;",b=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,E=/if \(rootData === undefined\) rootData = data;/;function w(e){return"'"+c(e)+"'"}var S=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x(e,r){return'""'==e?r:(e+" + "+r).replace(/' \+ '/g,"")}function j(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function R(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},function(e,r,t){var a=t(30);e.exports=function(e,r){if(null==e)return{};var t,o,s=a(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}},function(e,r){function t(r,a){return e.exports=t=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},t(r,a)}e.exports=t},function(e,r,t){"use strict";var a=t(34),o=t(10),s=t(6),n=t(16),i=t(36);function u(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return u.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof n)return p(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var o,s,i,l=c.call(this,r,t);return l&&(o=l.schema,r=l.root,i=l.baseId),o instanceof n?s=o.validate||e.call(this,o.schema,r,void 0,i):void 0!==o&&(s=p(o,this._opts.inlineRefs)?o:e.call(this,o,r,void 0,i)),s}function c(e,r){var t=a.parse(r),o=m(t),s=d(this._getId(e.schema));if(0===Object.keys(e.schema).length||o!==s){var i=y(o),u=this._refs[i];if("string"==typeof u)return function(e,r,t){var a=c.call(this,e,r);if(a){var o=a.schema,s=a.baseId;e=a.root;var n=this._getId(o);return n&&(s=g(s,n)),h.call(this,t,s,o,e)}}.call(this,e,u,t);if(u instanceof n)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[i])instanceof n))return;if(u.validate||this._compile(u),i==y(r))return{schema:u,root:e,baseId:s};e=u}if(!e.schema)return;s=d(this._getId(e.schema))}return h.call(this,t,s,e.schema,e)}e.exports=u,u.normalizeId=y,u.fullPath=d,u.url=g,u.ids=function(e){var r=y(this._getId(e)),t={"":r},n={"":d(r,!1)},u={},c=this;return i(e,{allKeys:!0},function(e,r,i,l,h,f,p){if(""!==r){var d=c._getId(e),m=t[l],v=n[l]+"/"+h;if(void 0!==p&&(v+="/"+("number"==typeof p?p:s.escapeFragment(p))),"string"==typeof d){d=m=y(m?a.resolve(m,d):d);var g=c._refs[d];if("string"==typeof g&&(g=c._refs[g]),g&&g.schema){if(!o(e,g.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=y(v))if("#"==d[0]){if(u[d]&&!o(e,u[d]))throw new Error('id "'+d+'" resolves to more than one schema');u[d]=e}else c._refs[d]=v}t[r]=m,n[r]=v}}),u},u.inlineRef=p,u.schema=c;var l=s.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),n=1;n<o.length;n++){var i=o[n];if(i){if(void 0===(t=t[i=s.unescapeFragment(i)]))break;var u;if(!l[i]&&((u=this._getId(t))&&(r=g(r,u)),t.$ref)){var h=g(r,t.$ref),f=c.call(this,a,h);f&&(t=f.schema,a=f.root,r=f.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var f=s.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function p(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var o in r){if("$ref"==o)return!1;if("object"==typeof(t=r[o])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if("object"==typeof(t=r[o])&&(a+=e(t)),a==1/0)return 1/0}else for(var s in r){if("$ref"==s)return 1/0;if(f[s])a++;else if("object"==typeof(t=r[s])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function d(e,r){return!1!==r&&(e=y(e)),m(a.parse(e))}function m(e){return a.serialize(e).split("#")[0]+"#"}var v=/#\/?$/;function y(e){return e?e.replace(v,""):""}function g(e,r){return r=y(r),a.resolve(e,r)}},function(e,r,t){"use strict";var a=Array.isArray,o=Object.keys,s=Object.prototype.hasOwnProperty;e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){var n,i,u,c=a(r),l=a(t);if(c&&l){if((i=r.length)!=t.length)return!1;for(n=i;0!=n--;)if(!e(r[n],t[n]))return!1;return!0}if(c!=l)return!1;var h=r instanceof Date,f=t instanceof Date;if(h!=f)return!1;if(h&&f)return r.getTime()==t.getTime();var p=r instanceof RegExp,d=t instanceof RegExp;if(p!=d)return!1;if(p&&d)return r.toString()==t.toString();var m=o(r);if((i=m.length)!==o(t).length)return!1;for(n=i;0!=n--;)if(!s.call(t,m[n]))return!1;for(n=i;0!=n--;)if(!e(r[u=m[n]],t[u]))return!1;return!0}return r!=r&&t!=t}},function(e,r,t){"use strict";var a=t(9);function o(e,r,t){this.message=t||o.message(e,r),this.missingRef=a.url(e,r),this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function s(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:s(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:s(o)},o.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},function(e,r){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=a=function(e){return t(e)}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},a(r)}e.exports=a},function(e,r){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,r){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t},,function(e,r,t){"use strict";var a=t(6);e.exports=function(e){a.copy(e,this)}},function(e,r,t){"use strict";e.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,o=r.cmp&&(t=r.cmp,function(e){return function(r,a){var o={key:r,value:e[r]},s={key:a,value:e[a]};return t(o,s)}}),s=[];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 t,n;if(Array.isArray(r)){for(n="[",t=0;t<r.length;t++)t&&(n+=","),n+=e(r[t])||"null";return n+"]"}if(null===r)return"null";if(-1!==s.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var i=s.push(r)-1,u=Object.keys(r).sort(o&&o(r));for(n="",t=0;t<u.length;t++){var c=u[t],l=e(r[c]);l&&(n&&(n+=","),n+=JSON.stringify(c)+":"+l)}return s.splice(i,1),"{"+n+"}"}}(e)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a="",o=!0===e.schema.$async,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var i=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(i){var u="unknown keyword: "+i;if("log"!==e.opts.strictKeywords)throw new Error(u);e.logger.warn(u)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!s&&!e.schema.$ref){var c=e.level,l=e.dataLevel,h=e.schema["false schema"],f=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",d=!e.opts.allErrors,m="data"+(l||""),v="valid"+c;if(!1===e.schema){e.isTop?d=!0:a+=" var "+v+" = false; ",(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";var y=a;a=W.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?a+=o?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var g=e.isTop;c=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var P="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{c=e.level,m="data"+((l=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),o&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}v="valid"+c,d=!e.opts.allErrors;var b="",E="",w=e.schema.type,S=Array.isArray(w);if(w&&e.opts.nullable&&!0===e.schema.nullable&&(S?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],S=!0)),S&&1==w.length&&(w=w[0],S=!1),e.schema.$ref&&s){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(s=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),w){if(e.opts.coerceTypes)var O=e.util.coerceToTypes(e.opts.coerceTypes,w);var x=e.RULES.types[w];if(O||S||!0===x||x&&!Y(x)){f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";var j=S?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[j](w,m,!0)+") { ",O){var R="dataType"+c,_="coerced"+c;a+=" var "+R+" = typeof "+m+"; ","array"==e.opts.coerceTypes&&(a+=" if ("+R+" == 'object' && Array.isArray("+m+")) "+R+" = 'array'; "),a+=" var "+_+" = undefined; ";var F="",D=O;if(D)for(var k,$=-1,I=D.length-1;$<I;)k=D[$+=1],$&&(a+=" if ("+_+" === undefined) { ",F+="}"),"array"==e.opts.coerceTypes&&"array"!=k&&(a+=" if ("+R+" == 'array' && "+m+".length == 1) { "+_+" = "+m+" = "+m+"[0]; "+R+" = typeof "+m+"; } "),"string"==k?a+=" if ("+R+" == 'number' || "+R+" == 'boolean') "+_+" = '' + "+m+"; else if ("+m+" === null) "+_+" = ''; ":"number"==k||"integer"==k?(a+=" if ("+R+" == 'boolean' || "+m+" === null || ("+R+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==k&&(a+=" && !("+m+" % 1)"),a+=")) "+_+" = +"+m+"; "):"boolean"==k?a+=" if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+_+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+_+" = true; ":"null"==k?a+=" if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+_+" = null; ":"array"==e.opts.coerceTypes&&"array"==k&&(a+=" if ("+R+" == 'string' || "+R+" == 'number' || "+R+" == 'boolean' || "+m+" == null) "+_+" = ["+m+"]; ");a+=" "+F+" if ("+_+" === undefined) { ",(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";y=a;a=W.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ";var A=l?"data"+(l-1||""):"parentData";a+=" "+m+" = "+_+"; ",l||(a+="if ("+A+" !== undefined)"),a+=" "+A+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+_+"; } "}else{(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";y=a;a=W.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!s)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(a+=" } if (errors === ",a+=g?"0":"errs_"+c,a+=") { ",E+="}");else{var C=e.RULES;if(C)for(var N=-1,L=C.length-1;N<L;)if(Y(x=C[N+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,m)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){h=e.schema.properties;var T=Object.keys(h);if(T)for(var q,U=-1,z=T.length-1;U<z;){if(void 0!==(M=h[q=T[U+=1]]).default){var Q=m+e.util.getProperty(q);if(e.compositeRule){if(e.opts.strictDefaults){P="default is ignored for: "+Q;if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}}else a+=" if ("+Q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+Q+" === null || "+Q+" === '' "),a+=" ) "+Q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var V=e.schema.items;if(V){$=-1;for(var M,H=V.length-1;$<H;)if(void 0!==(M=V[$+=1]).default){Q=m+"["+$+"]";if(e.compositeRule){if(e.opts.strictDefaults){P="default is ignored for: "+Q;if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}}else a+=" if ("+Q+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+Q+" === null || "+Q+" === '' "),a+=" ) "+Q+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(M.default)+" ":a+=" "+JSON.stringify(M.default)+" ",a+="; "}}}var K=x.rules;if(K)for(var G,J=-1,B=K.length-1;J<B;)if(X(G=K[J+=1])){var Z=G.code(e,G.keyword,x.type);Z&&(a+=" "+Z+" ",d&&(b+="}"))}if(d&&(a+=" "+b+" ",b=""),x.type&&(a+=" } ",w&&w===x.type&&!O)){a+=" else { ";var W;f=e.schemaPath+".type",p=e.errSchemaPath+"/type";(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=S?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=S?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";y=a;a=W.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}d&&(a+=" if (errors === ",a+=g?"0":"errs_"+c,a+=") { ",E+="}")}}function Y(e){for(var r=e.rules,t=0;t<r.length;t++)if(X(r[t]))return!0}function X(r){return void 0!==e.schema[r.keyword]||r.implements&&function(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return d&&(a+=" "+E+" "),g?(o?(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 "+v+" = errors === errs_"+c+";",a=e.util.cleanUpCode(a),g&&(a=e.util.finalCleanUpCode(a,o)),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i;var p="maximum"==r,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],v=e.opts.$data&&m&&m.$data,y=p?"<":">",g=p?">":"<",P=void 0;if(v){var b=e.util.getData(m.$data,n,e.dataPathArr),E="exclusive"+s,w="exclType"+s,S="exclIsNumber"+s,O="' + "+(R="op"+s)+" + '";o+=" var schemaExcl"+s+" = "+b+"; ",o+=" var "+E+"; var "+w+" = typeof "+(b="schemaExcl"+s)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var x;P=d;(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var j=o;o=x.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+j+"]); ":o+=" validate.errors = ["+j+"]; return false; ":o+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+b+" "+y+"= "+a+") ? "+h+" "+g+"= "+b+" : "+h+" "+g+" "+a+" ) : ( ("+E+" = "+b+" === true) ? "+h+" "+g+"= "+a+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { var op"+s+" = "+E+" ? '"+y+"' : '"+y+"='; ",void 0===i&&(P=d,c=e.errSchemaPath+"/"+d,a=b,f=v)}else{O=y;if((S="number"==typeof m)&&f){var R="'"+O+"'";o+=" if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" ( "+a+" === undefined || "+m+" "+y+"= "+a+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+a+" ) || "+h+" !== "+h+") { "}else{S&&void 0===i?(E=!0,P=d,c=e.errSchemaPath+"/"+d,a=m,g+="="):(S&&(a=Math[p?"min":"max"](m,i)),m===(!S||a)?(E=!0,P=d,c=e.errSchemaPath+"/"+d,g+="="):(E=!1,O+="="));R="'"+O+"'";o+=" if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+" "+g+" "+a+" || "+h+" !== "+h+") { "}}P=P||r,(x=x||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+R+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+O+" ",o+=f?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";j=o;return o=x.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+j+"]); ":o+=" validate.errors = ["+j+"]; return false; ":o+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",l&&(o+=" else { "),o}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i,o+="if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,d=d||[];d.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==r?"more":"fewer",o+=" than ",o+=f?"' + "+a+" + '":""+i,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=d.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",l&&(o+=" else { "),o}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i;var p="maxLength"==r?">":"<";o+="if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?o+=" "+h+".length ":o+=" ucs2length("+h+") ",o+=" "+p+" "+a+") { ";var d=r,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==r?"longer":"shorter",o+=" than ",o+=f?"' + "+a+" + '":""+i,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var v=o;return o=m.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",l&&(o+=" else { "),o}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i,o+="if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),o+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,d=d||[];d.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==r?"more":"fewer",o+=" than ",o+=f?"' + "+a+" + '":""+i,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;return o=d.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",l&&(o+=" else { "),o}},function(e){e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},function(e,r,t){var a=t(12),o=t(13);e.exports=function(e,r){return!r||"object"!==a(r)&&"function"!=typeof r?o(e):r}},function(e,r,t){var a=t(8);e.exports=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&a(e,r)}},function(e,r,t){var a=t(14),o=t(8),s=t(31),n=t(32);function i(r){var t="function"==typeof Map?new Map:void 0;return e.exports=i=function(e){if(null===e||!s(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return n(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)},i(r)}e.exports=i},function(e,r,t){"use strict";var a=t(33),o=t(9),s=t(37),n=t(16),i=t(17),u=t(38),c=t(39),l=t(60),h=t(6);e.exports=y,y.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);!0!==t.$async&&(this.errors=t.errors);return o},y.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},y.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var s=0;s<e.length;s++)this.addSchema(e[s],void 0,t,a);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return S(this,r=o.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,t,a,!0),this},y.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},y.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(d)?d:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return a},y.prototype.getSchema=function(e){var r=g(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 t=o.schema.call(e,{schema:{}},r);if(t){var s=t.schema,i=t.root,u=t.baseId,c=a.call(e,s,i,void 0,u);return e._fragments[r]=new n({ref:r,fragment:!0,schema:s,root:i,baseId:u,validate:c}),c}}(this,e)}},y.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=g(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var s=this._getId(e);s&&(s=o.normalizeId(s),delete this._schemas[s],delete this._refs[s])}return this},y.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},y.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,o="",s=0;s<e.length;s++){var n=e[s];n&&(o+=a+n.dataPath+" "+n.message+t)}return o.slice(0,-t.length)},y.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var s=this._opts.serialize,i=s?s(e):e,u=this._cache.get(i);if(u)return u;a=a||!1!==this._opts.addUsedSchema;var c=o.normalizeId(this._getId(e));c&&a&&S(this,c);var l,h=!1!==this._opts.validateSchema&&!r;h&&!(l=c&&c==o.normalizeId(e.$schema))&&this.validateSchema(e,!0);var f=o.ids.call(this,e),p=new n({id:c,schema:e,localRefs:f,cacheKey:i,meta:t});"#"!=c[0]&&a&&(this._refs[c]=p);this._cache.put(i,p),h&&l&&this.validateSchema(e,!0);return p},y.prototype._compile=function(e,r){if(e.compiling)return e.validate=s,s.schema=e.schema,s.errors=null,s.root=r||s,!0===e.schema.$async&&(s.$async=!0),s;var t,o;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{o=a.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=o,e.refs=o.refs,e.refVal=o.refVal,e.root=o.root,o;function s(){var r=e.validate,t=r.apply(this,arguments);return s.errors=r.errors,t}},y.prototype.compileAsync=t(61);var f=t(62);y.prototype.addKeyword=f.add,y.prototype.getKeyword=f.get,y.prototype.removeKeyword=f.remove,y.prototype.validateKeyword=f.validate;var p=t(11);y.ValidationError=p.Validation,y.MissingRefError=p.MissingRef,y.$dataMetaSchema=l;var d="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function y(e){if(!(this instanceof y))return new y(e);e=this._opts=h.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:O,warn:O,error:O};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=u(e.format),this._cache=e.cache||new s,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(e){switch(e.schemaId){case"auto":return w;case"id":return b;default:return E}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=i),this._metaOpts=function(e){for(var r=h.copy(e._opts),t=0;t<m.length;t++)delete r[m[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),function(e){var r;e._opts.$data&&(r=t(65),e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var a=t(23);e._opts.$data&&(a=l(a,v));e.addMetaSchema(a,d,!0),e._refs["http://json-schema.org/schema"]=d}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function g(e,r){return r=o.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function P(e,r,t){for(var a in r){var o=r[a];o.meta||t&&!t.test(a)||(e._cache.del(o.cacheKey),delete r[a])}}function b(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function E(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function w(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 S(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function O(){}},function(e,r,t){var a=t(69),o=t(70);e.exports=function(e,r,t){var s=r&&t||0;"string"==typeof e&&(r="binary"===e?new Array(16):null,e=null);var n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,r)for(var i=0;i<16;++i)r[s+i]=n[i];return r||o(n)}},function(e,r,t){var a=function(e){"use strict";var r,t=Object.prototype,a=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",n=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function u(e,r,t,a){var o=r&&r.prototype instanceof m?r:m,s=Object.create(o.prototype),n=new R(a||[]);return s._invoke=function(e,r,t){var a=l;return function(o,s){if(a===f)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw s;return F()}for(t.method=o,t.arg=s;;){var n=t.delegate;if(n){var i=O(n,t);if(i){if(i===d)continue;return i}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if(a===l)throw a=p,t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);a=f;var u=c(e,r,t);if("normal"===u.type){if(a=t.done?p:h,u.arg===d)continue;return{value:u.arg,done:t.done}}"throw"===u.type&&(a=p,t.method="throw",t.arg=u.arg)}}}(e,t,n),s}function c(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",h="suspendedYield",f="executing",p="completed",d={};function m(){}function v(){}function y(){}var g={};g[s]=function(){return this};var P=Object.getPrototypeOf,b=P&&P(P(_([])));b&&b!==t&&a.call(b,s)&&(g=b);var E=y.prototype=m.prototype=Object.create(g);function w(e){["next","throw","return"].forEach(function(r){e[r]=function(e){return this._invoke(r,e)}})}function S(e){var r;this._invoke=function(t,o){function s(){return new Promise(function(r,s){!function r(t,o,s,n){var i=c(e[t],e,o);if("throw"!==i.type){var u=i.arg,l=u.value;return l&&"object"==typeof l&&a.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,s,n)},function(e){r("throw",e,s,n)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},function(e){return r("throw",e,s,n)})}n(i.arg)}(t,o,r,s)})}return r=r?r.then(s,s):s()}}function O(e,t){var a=e.iterator[t.method];if(a===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,O(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=c(a,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var s=o.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,d):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function x(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function j(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function _(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,n=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return n.next=n}}return{next:F}}function F(){return{value:r,done:!0}}return v.prototype=E.constructor=y,y.constructor=v,y[i]=v.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,i in e||(e[i]="GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},w(S.prototype),S.prototype[n]=function(){return this},e.AsyncIterator=S,e.async=function(r,t,a,o){var s=new S(u(r,t,a,o));return e.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},w(E),E[i]="Generator",E[s]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var r=[];for(var t in e)r.push(t);return r.reverse(),function t(){for(;r.length;){var a=r.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(a,o){return i.type="throw",i.arg=e,t.next=a,o&&(t.method="next",t.arg=r),!!o}for(var s=this.tryEntries.length-1;s>=0;--s){var n=this.tryEntries[s],i=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var u=a.call(n,"catchLoc"),c=a.call(n,"finallyLoc");if(u&&c){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(u){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=r&&r<=s.finallyLoc&&(s=null);var n=s?s.completion:{};return n.type=e,n.arg=r,s?(this.method="next",this.next=s.finallyLoc,d):this.complete(n)},complete:function(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),d},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),j(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var a=t.completion;if("throw"===a.type){var o=a.arg;j(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:_(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=r),d}},e}(e.exports);try{regeneratorRuntime=a}catch(e){Function("r","regeneratorRuntime = r")(a)}},function(e,r){e.exports=function(e,r){if(null==e)return{};var t,a,o={},s=Object.keys(e);for(a=0;a<s.length;a++)t=s[a],r.indexOf(t)>=0||(o[t]=e[t]);return o}},function(e,r){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,r,t){var a=t(8);function o(r,t,s){return!function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?e.exports=o=function(e,r,t){var o=[null];o.push.apply(o,r);var s=new(Function.bind.apply(e,o));return t&&a(s,t.prototype),s}:e.exports=o=Reflect.construct,o.apply(null,arguments)}e.exports=o},function(e,r,t){"use strict";var a=t(9),o=t(6),s=t(11),n=t(17),i=t(18),u=o.ucs2length,c=t(10),l=s.Validation;function h(e,r,t){for(var a=0;a<this._compilations.length;a++){var o=this._compilations[a];if(o.schema==e&&o.root==r&&o.baseId==t)return a}return-1}function f(e,r){return"var pattern"+e+" = new RegExp("+o.toQuotedString(r[e])+");"}function p(e){return"var default"+e+" = defaults["+e+"];"}function d(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function m(e){return"var customRule"+e+" = customRules["+e+"];"}function v(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}e.exports=function e(r,t,y,g){var P=this,b=this._opts,E=[void 0],w={},S=[],O={},x=[],j={},R=[];t=t||{schema:r,refVal:E,refs:w};var _=function(e,r,t){var a=h.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,r,t,g);var F=this._compilations[_.index];if(_.compiling)return F.callValidate=function e(){var r=F.validate;var t=r.apply(this,arguments);e.errors=r.errors;return t};var D=this._formats;var k=this.RULES;try{var $=A(r,t,y,g);F.validate=$;var I=F.callValidate;return I&&(I.schema=$.schema,I.errors=null,I.refs=$.refs,I.refVal=$.refVal,I.root=$.root,I.$async=$.$async,b.sourceCode&&(I.source=$.source)),$}finally{(function(e,r,t){var a=h.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,r,t,g)}function A(r,n,h,y){var g=!n||n&&n.schema==r;if(n.schema!=t.schema)return e.call(P,r,n,h,y);var O,j=!0===r.$async,_=i({isTop:!0,schema:r,isRoot:g,baseId:y,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:s.MissingRef,RULES:k,validate:i,util:o,resolve:a,resolveRef:C,usePattern:T,useDefault:q,useCustomRule:U,opts:b,formats:D,logger:P.logger,self:P});_=v(E,d)+v(S,f)+v(x,p)+v(R,m)+_,b.processCode&&(_=b.processCode(_));try{var F=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",_);O=F(P,k,D,t,E,x,R,c,u,l),E[0]=O}catch(e){throw P.logger.error("Error compiling schema, function code:",_),e}return O.schema=r,O.errors=null,O.refs=w,O.refVal=E,O.root=g?O:n,j&&(O.$async=!0),!0===b.sourceCode&&(O.source={code:_,patterns:S,defaults:x}),O}function C(r,o,s){o=a.url(r,o);var n,i,u=w[o];if(void 0!==u)return L(n=E[u],i="refVal["+u+"]");if(!s&&t.refs){var c=t.refs[o];if(void 0!==c)return n=t.refVal[c],i=N(o,n),L(n,i)}i=N(o);var l=a.call(P,A,t,o);if(void 0===l){var h=y&&y[o];h&&(l=a.inlineRef(h,b.inlineRefs)?h:e.call(P,h,t,y,r))}if(void 0!==l)return function(e,r){var t=w[e];E[t]=r}(o,l),L(l,i);!function(e){delete w[e]}(o)}function N(e,r){var t=E.length;return E[t]=r,w[e]=t,"refVal"+t}function L(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function T(e){var r=O[e];return void 0===r&&(r=O[e]=S.length,S[r]=e),"pattern"+r}function q(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return o.toQuotedString(e);case"object":if(null===e)return"null";var r=n(e),t=j[r];return void 0===t&&(t=j[r]=x.length,x[t]=e),"default"+t}}function U(e,r,t,a){if(!1!==P._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+o.join(","));var s=e.definition.validateSchema;if(s){var n=s(r);if(!n){var i="keyword schema is invalid: "+P.errorsText(s.errors);if("log"!=P._opts.validateSchema)throw new Error(i);P.logger.error(i)}}}var u,c=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(c)u=c.call(P,r,t,a);else if(h)u=h.call(P,r,t,a),!1!==b.validateSchema&&P.validateSchema(u,!0);else if(l)u=l.call(P,a,e.keyword,r,t);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var f=R.length;return R[f]=u,{code:"customRule"+f,validate:u}}}},function(e,r,t){
2/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
3!function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,o=1;o<a;++o)r[o]=r[o].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function s(e){var a=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",n=r("[\\:\\/\\?\\#\\[\\]\\@]",s),i=e?"[\\uE000-\\uF8FF]":"[]",u=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),c=t("[A-Za-z]"+r("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),l=t(t(o+"|"+r(u,s,"[\\:]"))+"*"),h=(t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("[1-9][0-9]")+"|[0-9]"),t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("0?[1-9][0-9]")+"|0?0?[0-9]")),f=t(h+"\\."+h+"\\."+h+"\\."+h),p=t(a+"{1,4}"),d=t(t(p+"\\:"+p)+"|"+f),m=t(t(p+"\\:")+"{6}"+d),v=t("\\:\\:"+t(p+"\\:")+"{5}"+d),y=t(t(p)+"?\\:\\:"+t(p+"\\:")+"{4}"+d),g=t(t(t(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+t(p+"\\:")+"{3}"+d),P=t(t(t(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+t(p+"\\:")+"{2}"+d),b=t(t(t(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),E=t(t(t(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),w=t(t(t(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),S=t(t(t(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),O=t([m,v,y,g,P,b,E,w,S].join("|")),x=t(t(u+"|"+o)+"+"),j=(t(O+"\\%25"+x),t(O+t("\\%25|\\%(?!"+a+"{2})")+x)),R=t("[vV]"+a+"+\\."+r(u,s,"[\\:]")+"+"),_=t("\\["+t(j+"|"+O+"|"+R)+"\\]"),F=t(t(o+"|"+r(u,s))+"*"),D=t(_+"|"+f+"(?!"+F+")|"+F),k=t("[0-9]*"),$=t(t(l+"@")+"?"+D+t("\\:"+k)+"?"),I=t(o+"|"+r(u,s,"[\\:\\@]")),A=t(I+"*"),C=t(I+"+"),N=t(t(o+"|"+r(u,s,"[\\@]"))+"+"),L=t(t("\\/"+A)+"*"),T=t("\\/"+t(C+L)+"?"),q=t(N+L),U=t(C+L),z="(?!"+I+")",Q=(t(L+"|"+T+"|"+q+"|"+U+"|"+z),t(t(I+"|"+r("[\\/\\?]",i))+"*")),V=t(t(I+"|[\\/\\?]")+"*"),M=t(t("\\/\\/"+$+L)+"|"+T+"|"+U+"|"+z),H=t(c+"\\:"+M+t("\\?"+Q)+"?"+t("\\#"+V)+"?"),K=t(t("\\/\\/"+$+L)+"|"+T+"|"+q+"|"+z),G=t(K+t("\\?"+Q)+"?"+t("\\#"+V)+"?");return t(H+"|"+G),t(c+"\\:"+M+t("\\?"+Q)+"?"),t(t("\\/\\/("+t("("+l+")@")+"?("+D+")"+t("\\:("+k+")")+"?)")+"?("+L+"|"+T+"|"+U+"|"+z+")"),t("\\?("+Q+")"),t("\\#("+V+")"),t(t("\\/\\/("+t("("+l+")@")+"?("+D+")"+t("\\:("+k+")")+"?)")+"?("+L+"|"+T+"|"+q+"|"+z+")"),t("\\?("+Q+")"),t("\\#("+V+")"),t(t("\\/\\/("+t("("+l+")@")+"?("+D+")"+t("\\:("+k+")")+"?)")+"?("+L+"|"+T+"|"+U+"|"+z+")"),t("\\?("+Q+")"),t("\\#("+V+")"),t("("+l+")@"),t("\\:("+k+")"),{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",u,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",u,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",u,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",u,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",u,s,"[\\:\\@\\/\\?]",i),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",u,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",u,s),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",u,n),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+x+")")+"?\\]?$")}}var n=s(!1),i=s(!0),u=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,o=!1,s=void 0;try{for(var n,i=e[Symbol.iterator]();!(a=(n=i.next()).done)&&(t.push(n.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{!a&&i.return&&i.return()}finally{if(o)throw s}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=/^xn--/,h=/[^\0-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,m=String.fromCharCode;function v(e){throw new RangeError(p[e])}function y(e,r){var t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);var o=function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(f,".")).split("."),r).join(".");return a+o}function g(e){for(var r=[],t=0,a=e.length;t<a;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<a){var s=e.charCodeAt(t++);56320==(64512&s)?r.push(((1023&o)<<10)+(1023&s)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},b=function(e,r,t){var a=0;for(e=t?d(e/700):e>>1,e+=d(e/r);e>455;a+=36)e=d(e/35);return d(a+36*e/(e+38))},E=function(e){var r,t=[],a=e.length,o=0,s=128,n=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u<i;++u)e.charCodeAt(u)>=128&&v("not-basic"),t.push(e.charCodeAt(u));for(var l=i>0?i+1:0;l<a;){for(var h=o,f=1,p=36;;p+=36){l>=a&&v("invalid-input");var m=(r=e.charCodeAt(l++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(m>=36||m>d((c-o)/f))&&v("overflow"),o+=m*f;var y=p<=n?1:p>=n+26?26:p-n;if(m<y)break;var g=36-y;f>d(c/g)&&v("overflow"),f*=g}var P=t.length+1;n=b(o-h,P,0==h),d(o/P)>c-s&&v("overflow"),s+=d(o/P),o%=P,t.splice(o++,0,s)}return String.fromCodePoint.apply(String,t)},w=function(e){var r=[],t=(e=g(e)).length,a=128,o=0,s=72,n=!0,i=!1,u=void 0;try{for(var l,h=e[Symbol.iterator]();!(n=(l=h.next()).done);n=!0){var f=l.value;f<128&&r.push(m(f))}}catch(e){i=!0,u=e}finally{try{!n&&h.return&&h.return()}finally{if(i)throw u}}var p=r.length,y=p;for(p&&r.push("-");y<t;){var E=c,w=!0,S=!1,O=void 0;try{for(var x,j=e[Symbol.iterator]();!(w=(x=j.next()).done);w=!0){var R=x.value;R>=a&&R<E&&(E=R)}}catch(e){S=!0,O=e}finally{try{!w&&j.return&&j.return()}finally{if(S)throw O}}var _=y+1;E-a>d((c-o)/_)&&v("overflow"),o+=(E-a)*_,a=E;var F=!0,D=!1,k=void 0;try{for(var $,I=e[Symbol.iterator]();!(F=($=I.next()).done);F=!0){var A=$.value;if(A<a&&++o>c&&v("overflow"),A==a){for(var C=o,N=36;;N+=36){var L=N<=s?1:N>=s+26?26:N-s;if(C<L)break;var T=C-L,q=36-L;r.push(m(P(L+T%q,0))),C=d(T/q)}r.push(m(P(C,0))),s=b(o,_,y==p),o=0,++y}}}catch(e){D=!0,k=e}finally{try{!F&&I.return&&I.return()}finally{if(D)throw k}}++o,++a}return r.join("")},S={version:"2.1.0",ucs2:{decode:g,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}(e))}},decode:E,encode:w,toASCII:function(e){return y(e,function(e){return h.test(e)?"xn--"+w(e):e})},toUnicode:function(e){return y(e,function(e){return l.test(e)?E(e.slice(4).toLowerCase()):e})}},O={};function x(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 j(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(a-t>=6){var s=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&s)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(a-t>=9){var n=parseInt(e.substr(t+4,2),16),i=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&i)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function R(e,r){function t(e){var t=j(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,x).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,x).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,x).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,x).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,x).replace(r.PCT_ENCODED,o)),e}function _(e){return e.replace(/^0*(.*)/,"$1")||"0"}function F(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=u(t,2)[1];return a?a.split(".").map(_).join("."):e}function D(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=u(t,3),o=a[1],s=a[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),i=u(n,2),c=i[0],l=i[1],h=l?l.split(":").map(_):[],f=c.split(":").map(_),p=r.IPV4ADDRESS.test(f[f.length-1]),d=p?7:8,m=f.length-d,v=Array(d),y=0;y<d;++y)v[y]=h[y]||f[m+y]||"";p&&(v[d-1]=F(v[d-1],r));var g=v.reduce(function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e},[]).sort(function(e,r){return r.length-e.length})[0],P=void 0;if(g&&g.length>1){var b=v.slice(0,g.index),E=v.slice(g.index+g.length);P=b.join(":")+"::"+E.join(":")}else P=v.join(":");return s&&(P+="%"+s),P}return e}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,$=void 0==="".match(/(){0}/)[1];function I(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?i:n;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(k);if(o){$?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=D(F(t.host,a),a)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var s=O[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||s&&s.unicodeSupport)R(t,a);else{if(t.host&&(r.domainHost||s&&s.domainHost))try{t.host=S.toASCII(t.host.replace(a.PCT_ENCODED,j).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}R(t,n)}s&&s.parse&&s.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}var A=/^\.\.?\//,C=/^\/\.(\/|$)/,N=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function T(e){for(var r=[];e.length;)if(e.match(A))e=e.replace(A,"");else if(e.match(C))e=e.replace(C,"/");else if(e.match(N))e=e.replace(N,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(L);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function q(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?i:n,a=[],o=O[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?S.toUnicode(e.host):S.toASCII(e.host.replace(t.PCT_ENCODED,j).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}R(e,t),"suffix"!==r.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var s=function(e,r){var t=!1!==r.iri?i:n,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(D(F(String(e.host),t),t).replace(t.IPV6ADDRESS,function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"})),"number"==typeof e.port&&(a.push(":"),a.push(e.port.toString(10))),a.length?a.join(""):void 0}(e,r);if(void 0!==s&&("suffix"!==r.reference&&a.push("//"),a.push(s),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var u=e.path;r.absolutePath||o&&o.absolutePath||(u=T(u)),void 0===s&&(u=u.replace(/^\/\//,"/%2F")),a.push(u)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function U(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={};return arguments[3]||(e=I(q(e,t),t),r=I(q(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(a.scheme=r.scheme,a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=T(r.path||""),a.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=T(r.path||""),a.query=r.query):(r.path?("/"===r.path.charAt(0)?a.path=T(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:a.path=r.path:a.path="/"+r.path,a.path=T(a.path)),a.query=r.query):(a.path=e.path,void 0!==r.query?a.query=r.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=r.fragment,a}function z(e,r){return e&&e.toString().replace(r&&r.iri?i.PCT_ENCODED:n.PCT_ENCODED,j)}var Q={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}},V={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize},M={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",G=t(t("%[EFef][0-9A-Fa-f]%"+K+K+"%"+K+K)+"|"+t("%[89A-Fa-f][0-9A-Fa-f]%"+K+K)+"|"+t("%"+K+K)),J=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),B=new RegExp(H,"g"),Z=new RegExp(G,"g"),W=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',J),"g"),Y=new RegExp(r("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),X=Y;function ee(e){var r=j(e);return r.match(B)?r:e}var re={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,s={},n=t.query.split("&"),i=0,u=n.length;i<u;++i){var c=n[i].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),h=0,f=l.length;h<f;++h)a.push(l[h]);break;case"subject":t.subject=z(c[1],r);break;case"body":t.body=z(c[1],r);break;default:o=!0,s[z(c[0],r)]=z(c[1],r)}}o&&(t.headers=s)}t.query=void 0;for(var p=0,d=a.length;p<d;++p){var m=a[p].split("@");if(m[0]=z(m[0]),r.unicodeSupport)m[1]=z(m[1],r).toLowerCase();else try{m[1]=S.toASCII(z(m[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=m.join("@")}return t},serialize:function(e,r){var t,a=e,s=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(s){for(var n=0,i=s.length;n<i;++n){var u=String(s[n]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(Z,ee).replace(Z,o).replace(W,x),h=u.slice(c+1);try{h=r.iri?S.toUnicode(h):S.toASCII(z(h,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}s[n]=l+"@"+h}a.path=s.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var p=[];for(var d in f)f[d]!==M[d]&&p.push(d.replace(Z,ee).replace(Z,o).replace(Y,x)+"="+f[d].replace(Z,ee).replace(Z,o).replace(X,x));return p.length&&(a.query=p.join("&")),a}},te=/^([^\:]+)\:(.*)/,ae={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(te),a=e;if(t){var o=r.scheme||a.scheme||"urn",s=t[1].toLowerCase(),n=t[2],i=o+":"+(r.nid||s),u=O[i];a.nid=s,a.nss=n,a.path=void 0,u&&(a=u.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,o=t+":"+(r.nid||a),s=O[o];s&&(e=s.serialize(e,r));var n=e,i=e.nss;return n.path=(a||r.nid)+":"+i,n}},oe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,se={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(oe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};O[Q.scheme]=Q,O[V.scheme]=V,O[re.scheme]=re,O[ae.scheme]=ae,O[se.scheme]=se,e.SCHEMES=O,e.pctEncChar=x,e.pctDecChars=j,e.parse=I,e.removeDotSegments=T,e.serialize=q,e.resolveComponents=U,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return q(U(I(e,a),I(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=q(I(e,r),r):"object"===a(e)&&(e=I(q(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=q(I(e,t),t):"object"===a(e)&&(e=q(e,t)),"string"==typeof r?r=q(I(r,t),t):"object"===a(r)&&(r=q(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?i.ESCAPE:n.ESCAPE,x)},e.unescapeComponent=z,Object.defineProperty(e,"__esModule",{value:!0})}(r)},function(e,r,t){"use strict";e.exports=function(e){for(var r,t=0,a=e.length,o=0;o<a;)t++,(r=e.charCodeAt(o++))>=55296&&r<=56319&&o<a&&56320==(64512&(r=e.charCodeAt(o)))&&o++;return t}},function(e,r,t){"use strict";var a=e.exports=function(e,r,t){"function"==typeof r&&(t=r,r={}),function e(r,t,o,s,n,i,u,c,l,h){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var f in t(s,n,i,u,c,l,h),s){var p=s[f];if(Array.isArray(p)){if(f in a.arrayKeywords)for(var d=0;d<p.length;d++)e(r,t,o,p[d],n+"/"+f+"/"+d,i,n,f,s,d)}else if(f in a.propsKeywords){if(p&&"object"==typeof p)for(var m in p)e(r,t,o,p[m],n+"/"+f+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),i,n,f,s,m)}else(f in a.keywords||r.allKeys&&!(f in a.skipKeywords))&&e(r,t,o,p,n+"/"+f,i,n,f,s)}o(s,n,i,u,c,l,h)}}(r,"function"==typeof(t=r.cb||t)?t:t.pre||function(){},t.post||function(){},e,"",e)};a.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},a.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},a.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},a.skipKeywords={default:!0,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}},function(e,r,t){"use strict";var a=e.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},function(e,r,t){"use strict";var a=t(6),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[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,i=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,u=/^(?:[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,l=/^(?:(?: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,f=/^(?:\/(?:[^~\/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,d=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",a.copy(m[e])}function v(e){var r=e.match(o);if(!r)return!1;var t=+r[1],a=+r[2],n=+r[3];return a>=1&&a<=12&&n>=1&&n<=(2==a&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:s[a])}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],o=t[2],s=t[3],i=t[5];return(a<=23&&o<=59&&s<=59||23==a&&59==o&&60==s)&&(!r||i)}e.exports=m,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:l,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:i,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:E,uuid:h,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":d},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&u.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:l,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&&i.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:E,uuid:h,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":d};var g=/t|\s/i;var P=/\/|:/;var b=/[^\\]\\Z/;function E(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,r,t){"use strict";var a=t(40),o=t(6).toHash;e.exports=function(){var e=[{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"]}],r=["type","$comment"];return e.all=o(r),e.types=o(["number","integer","string","array","object","boolean","null"]),e.forEach(function(t){t.rules=t.rules.map(function(t){var o;if("object"==typeof t){var s=Object.keys(t)[0];o=t[s],t=s,o.forEach(function(t){r.push(t),e.all[t]=!0})}return r.push(t),e.all[t]={keyword:t,code:a[t],implements:o}}),e.all.$comment={keyword:"$comment",code:a.$comment},t.type&&(e.types[t.type]=t)}),e.keywords=o(r.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},function(e,r,t){"use strict";e.exports={$ref:t(41),allOf:t(42),anyOf:t(43),$comment:t(44),const:t(45),contains:t(46),dependencies:t(47),enum:t(48),format:t(49),if:t(50),items:t(51),maximum:t(19),minimum:t(19),maxItems:t(20),minItems:t(20),maxLength:t(21),minLength:t(21),maxProperties:t(22),minProperties:t(22),multipleOf:t(52),not:t(53),oneOf:t(54),pattern:t(55),properties:t(56),propertyNames:t(57),required:t(58),uniqueItems:t(59),validate:t(18)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o,s=" ",n=e.level,i=e.dataLevel,u=e.schema[r],c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(i||""),f="valid"+n;if("#"==u||"#/"==u)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,u,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,u);if("fail"==e.opts.missingRefs){e.logger.error(d),(g=g||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(u)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(u)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(u)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;s=g.pop(),!e.compositeRule&&l?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,u,d);e.logger.warn(d),l&&(s+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var y="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=u,s+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",l&&(s+=" if ("+y+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var g;(g=g||[]).push(s),s="",e.opts.passContext?s+=" "+o+".call(this, ":s+=" "+o+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var P=s+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";if(s=g.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(s+=" var "+f+"; "),s+=" try { await "+P+"; ",l&&(s+=" "+f+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(s+=" "+f+" = false; "),s+=" } ",l&&(s+=" if ("+f+") { ")}else s+=" if (!"+P+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",l&&(s+=" else { ")}return s}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var l="valid"+u.level,h=u.baseId,f=!0,p=o;if(p)for(var d,m=-1,v=p.length-1;m<v;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0:e.util.schemaHasRules(d,e.RULES.all))&&(f=!1,u.schema=d,u.schemaPath=s+"["+m+"]",u.errSchemaPath=n+"/"+m,a+=" "+e.validate(u)+" ",u.baseId=h,i&&(a+=" if ("+l+") { ",c+="}"));return i&&(a+=f?" if (true) { ":" "+c.slice(0,-1)+" "),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level;if(n.every(function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0:e.util.schemaHasRules(r,e.RULES.all)})){var v=p.baseId;a+=" var "+f+" = errors; var "+h+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var g=n;if(g)for(var P,b=-1,E=g.length-1;b<E;)P=g[b+=1],p.schema=P,p.schemaPath=i+"["+b+"]",p.errSchemaPath=u+"/"+b,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+h+" = "+h+" || "+m+"; if (!"+h+") { ",d+="}";e.compositeRule=p.compositeRule=y,a+=" "+d+" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.errSchemaPath+"/"+r,n=(e.opts.allErrors,e.util.toQuotedString(o));return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(s)+", validate.root.schema);"),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f=e.opts.$data&&n&&n.$data;f&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,s,e.dataPathArr)+"; "),f||(a+=" var schema"+o+" = validate.schema"+i+";"),a+="var "+h+" = equal("+l+", schema"+o+"); if (!"+h+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var d=a;return a=p.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+d+"]); ":a+=" validate.errors = ["+d+"]; return false; ":a+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f="errs__"+o,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+o,v=p.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId,P=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+f+" = errors;var "+h+";",P){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=n,p.schemaPath=i,p.errSchemaPath=u,a+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var E=l+"["+m+"]";p.dataPathArr[v]=m;var w=e.validate(p);p.baseId=g,e.util.varOccurences(w,y)<2?a+=" "+e.util.varReplace(w,y,E)+" ":a+=" var "+y+" = "+E+"; "+w+" ",a+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=b,a+=" if (!"+d+") {"}else a+=" if ("+l+".length == 0) {";var S=S||[];S.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;return a=S.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",P&&(a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="errs__"+o,f=e.util.copy(e),p="";f.level++;var d="valid"+f.level,m={},v={},y=e.opts.ownProperties;for(E in n){var g=n[E],P=Array.isArray(g)?v:m;P[E]=g}a+="var "+h+" = errors;";var b=e.errorPath;for(var E in a+="var missing"+o+";",v)if((P=v[E]).length){if(a+=" if ( "+l+e.util.getProperty(E)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(E)+"') "),c){a+=" && ( ";var w=P;if(w)for(var S=-1,O=w.length-1;S<O;){D=w[S+=1],S&&(a+=" || "),a+=" ( ( "+(A=l+(I=e.util.getProperty(D)))+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:I)+") ) "}a+=")) { ";var x="missing"+o,j="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,x,!0):b+" + "+x);var R=R||[];R.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+j+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==P.length?a+="property "+e.util.escapeQuotes(P[0]):a+="properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var _=a;a=R.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var F=P;if(F)for(var D,k=-1,$=F.length-1;k<$;){D=F[k+=1];var I=e.util.getProperty(D),A=(j=e.util.escapeQuotes(D),l+I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,D,e.opts.jsonPointers)),a+=" if ( "+A+" === undefined ",y&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+j+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==P.length?a+="property "+e.util.escapeQuotes(P[0]):a+="properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(p+="}",a+=" else { ")}e.errorPath=b;var C=f.baseId;for(var E in m){g=m[E];(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0:e.util.schemaHasRules(g,e.RULES.all))&&(a+=" "+d+" = true; if ( "+l+e.util.getProperty(E)+" !== undefined ",y&&(a+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(E)+"') "),a+=") { ",f.schema=g,f.schemaPath=i+e.util.getProperty(E),f.errSchemaPath=u+"/"+e.util.escapeFragment(E),a+=" "+e.validate(f)+" ",f.baseId=C,a+=" } ",c&&(a+=" if ("+d+") { ",p+="}"))}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f=e.opts.$data&&n&&n.$data;f&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,s,e.dataPathArr)+"; ");var p="i"+o,d="schema"+o;f||(a+=" var "+d+" = validate.schema"+i+";"),a+="var "+h+";",f&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=h+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+h+" = true; break; }",f&&(a+=" } "),a+=" if (!"+h+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var v=a;return a=m.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var h,f=e.opts.$data&&n&&n.$data;f?(a+=" var schema"+o+" = "+e.util.getData(n.$data,s,e.dataPathArr)+"; ",h="schema"+o):h=n;var p=e.opts.unknownFormats,d=Array.isArray(p);if(f){a+=" var "+(m="format"+o)+" = formats["+h+"]; var "+(v="isObject"+o)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+o)+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+m+".async; "),a+=" "+m+" = "+m+".validate; } if ( ",f&&(a+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+h+" && !"+m+" ",d&&(a+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),a+=") || "),a+=" ("+m+" && "+y+" == '"+t+"' && !(typeof "+m+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+m+"("+l+") : "+m+"("+l+")) ":a+=" "+m+"("+l+") ",a+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[n])){if("ignore"==p)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(d&&p.indexOf(n)>=0)return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return c&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(P="formats"+e.util.getProperty(n)+".validate")+"("+l+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(n);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+l+") ":" "+P+".test("+l+") ",a+=") { "}}var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",a+=f?""+h:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=f?"' + "+h+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+i:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var E=a;return a=b.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f="errs__"+o,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,v=e.schema.else,y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all)),g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0:e.util.schemaHasRules(v,e.RULES.all)),P=p.baseId;if(y||g){var b;p.createErrors=!1,p.schema=n,p.schemaPath=i,p.errSchemaPath=u,a+=" var "+f+" = errors; var "+h+" = true; ";var E=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=P,p.createErrors=!0,a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=E,y?(a+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=P,a+=" "+h+" = "+d+"; ",y&&g?a+=" var "+(b="ifClause"+o)+" = 'then'; ":b="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+d+") { ",g&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=P,a+=" "+h+" = "+d+"; ",y&&g?a+=" var "+(b="ifClause"+o)+" = 'else'; ":b="'else'",a+=" } "),a+=" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",c&&(a+=" else { "),a=e.util.cleanUpCode(a)}else c&&(a+=" if (true) { ");return a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,v="i"+o,y=p.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+f+" = errors;var "+h+";",Array.isArray(n)){var b=e.schema.additionalItems;if(!1===b){a+=" "+h+" = "+l+".length <= "+n.length+"; ";var E=u;u=e.errSchemaPath+"/additionalItems",a+=" if (!"+h+") { ";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var S=a;a=w.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u=E,c&&(d+="}",a+=" else { ")}var O=n;if(O)for(var x,j=-1,R=O.length-1;j<R;)if(x=O[j+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+m+" = true; if ("+l+".length > "+j+") { ";var _=l+"["+j+"]";p.schema=x,p.schemaPath=i+"["+j+"]",p.errSchemaPath=u+"/"+j,p.errorPath=e.util.getPathExpr(e.errorPath,j,e.opts.jsonPointers,!0),p.dataPathArr[y]=j;var F=e.validate(p);p.baseId=P,e.util.varOccurences(F,g)<2?a+=" "+e.util.varReplace(F,g,_)+" ":a+=" var "+g+" = "+_+"; "+F+" ",a+=" } ",c&&(a+=" if ("+m+") { ",d+="}")}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all))){p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+l+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+l+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);_=l+"["+v+"]";p.dataPathArr[y]=v;F=e.validate(p);p.baseId=P,e.util.varOccurences(F,g)<2?a+=" "+e.util.varReplace(F,g,_)+" ":a+=" var "+g+" = "+_+"; "+F+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=i,p.errSchemaPath=u,a+=" for (var "+v+" = 0; "+v+" < "+l+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);_=l+"["+v+"]";p.dataPathArr[y]=v;F=e.validate(p);p.baseId=P,e.util.varOccurences(F,g)<2?a+=" "+e.util.varReplace(F,g,_)+" ":a+=" var "+g+" = "+_+"; "+F+" ",c&&(a+=" if (!"+m+") break; "),a+=" }"}return c&&(a+=" "+d+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i,o+="var division"+s+";if (",f&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+s+" = "+h+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+s+" !== parseInt(division"+s+") ",o+=" ) ",f&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=f?"' + "+a:a+"'"),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var d=o;return o=p.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+d+"]); ":o+=" validate.errors = ["+d+"]; return false; ":o+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",l&&(o+=" else { "),o}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="errs__"+o,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){f.schema=n,f.schemaPath=i,f.errSchemaPath=u,a+=" var "+h+" = errors; ";var d,m=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.opts.allErrors&&(d=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+e.validate(f)+" ",f.createErrors=!0,d&&(f.opts.allErrors=d),e.compositeRule=f.compositeRule=m,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,v=p.baseId,y="prevValid"+o,g="passingSchemas"+o;a+="var "+f+" = errors , "+y+" = false , "+h+" = false , "+g+" = null; ";var P=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=n;if(b)for(var E,w=-1,S=b.length-1;w<S;)E=b[w+=1],(e.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0:e.util.schemaHasRules(E,e.RULES.all))?(p.schema=E,p.schemaPath=i+"["+w+"]",p.errSchemaPath=u+"/"+w,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+m+" = true; ",w&&(a+=" if ("+m+" && "+y+") { "+h+" = false; "+g+" = ["+g+", "+w+"]; } else { ",d+="}"),a+=" if ("+m+") { "+h+" = "+y+" = true; "+g+" = "+w+"; }";return e.compositeRule=p.compositeRule=P,a+=d+"if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f=e.opts.$data&&i&&i.$data;f?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i,o+="if ( ",f&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+(f?"(new RegExp("+a+"))":e.usePattern(i))+".test("+h+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=f?""+a:""+e.util.toQuotedString(i),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=f?"' + "+a+" + '":""+e.util.escapeQuotes(i),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=f?"validate.schema"+u:""+e.util.toQuotedString(i),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var d=o;return o=p.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+d+"]); ":o+=" validate.errors = ["+d+"]; return false; ":o+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",l&&(o+=" else { "),o}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="errs__"+o,f=e.util.copy(e),p="";f.level++;var d="valid"+f.level,m="key"+o,v="idx"+o,y=f.dataLevel=e.dataLevel+1,g="data"+y,P="dataProperties"+o,b=Object.keys(n||{}),E=e.schema.patternProperties||{},w=Object.keys(E),S=e.schema.additionalProperties,O=b.length||w.length,x=!1===S,j="object"==typeof S&&Object.keys(S).length,R=e.opts.removeAdditional,_=x||j||R,F=e.opts.ownProperties,D=e.baseId,k=e.schema.required;if(k&&(!e.opts.$data||!k.$data)&&k.length<e.opts.loopRequired)var $=e.util.toHash(k);if(a+="var "+h+" = errors;var "+d+" = true;",F&&(a+=" var "+P+" = undefined;"),_){if(a+=F?" "+P+" = "+P+" || Object.keys("+l+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+m+" = "+P+"["+v+"]; ":" for (var "+m+" in "+l+") { ",O){if(a+=" var isAdditional"+o+" = !(false ",b.length)if(b.length>8)a+=" || validate.schema"+i+".hasOwnProperty("+m+") ";else{var I=b;if(I)for(var A=-1,C=I.length-1;A<C;)J=I[A+=1],a+=" || "+m+" == "+e.util.toQuotedString(J)+" "}if(w.length){var N=w;if(N)for(var L=-1,T=N.length-1;L<T;)oe=N[L+=1],a+=" || "+e.usePattern(oe)+".test("+m+") "}a+=" ); if (isAdditional"+o+") { "}if("all"==R)a+=" delete "+l+"["+m+"]; ";else{var q=e.errorPath,U="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),x)if(R)a+=" delete "+l+"["+m+"]; ";else{a+=" "+d+" = false; ";var z=u;u=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+U+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var Q=a;a=re.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+Q+"]); ":a+=" validate.errors = ["+Q+"]; return false; ":a+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=z,c&&(a+=" break; ")}else if(j)if("failing"==R){a+=" var "+h+" = errors; ";var V=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=S,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var M=l+"["+m+"]";f.dataPathArr[y]=m;var H=e.validate(f);f.baseId=D,e.util.varOccurences(H,g)<2?a+=" "+e.util.varReplace(H,g,M)+" ":a+=" var "+g+" = "+M+"; "+H+" ",a+=" if (!"+d+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=f.compositeRule=V}else{f.schema=S,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);M=l+"["+m+"]";f.dataPathArr[y]=m;H=e.validate(f);f.baseId=D,e.util.varOccurences(H,g)<2?a+=" "+e.util.varReplace(H,g,M)+" ":a+=" var "+g+" = "+M+"; "+H+" ",c&&(a+=" if (!"+d+") break; ")}e.errorPath=q}O&&(a+=" } "),a+=" } ",c&&(a+=" if ("+d+") { ",p+="}")}var K=e.opts.useDefaults&&!e.compositeRule;if(b.length){var G=b;if(G)for(var J,B=-1,Z=G.length-1;B<Z;){var W=n[J=G[B+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0:e.util.schemaHasRules(W,e.RULES.all)){var Y=e.util.getProperty(J),X=(M=l+Y,K&&void 0!==W.default);f.schema=W,f.schemaPath=i+Y,f.errSchemaPath=u+"/"+e.util.escapeFragment(J),f.errorPath=e.util.getPath(e.errorPath,J,e.opts.jsonPointers),f.dataPathArr[y]=e.util.toQuotedString(J);H=e.validate(f);if(f.baseId=D,e.util.varOccurences(H,g)<2){H=e.util.varReplace(H,g,M);var ee=M}else{ee=g;a+=" var "+g+" = "+M+"; "}if(X)a+=" "+H+" ";else{if($&&$[J]){a+=" if ( "+ee+" === undefined ",F&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+d+" = false; ";q=e.errorPath,z=u;var re,te=e.util.escapeQuotes(J);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(q,J,e.opts.jsonPointers)),u=e.errSchemaPath+"/required",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+te+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+te+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";Q=a;a=re.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+Q+"]); ":a+=" validate.errors = ["+Q+"]; return false; ":a+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=z,e.errorPath=q,a+=" } else { "}else c?(a+=" if ( "+ee+" === undefined ",F&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+d+" = true; } else { "):(a+=" if ("+ee+" !== undefined ",F&&(a+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(J)+"') "),a+=" ) { ");a+=" "+H+" } "}}c&&(a+=" if ("+d+") { ",p+="}")}}if(w.length){var ae=w;if(ae)for(var oe,se=-1,ne=ae.length-1;se<ne;){W=E[oe=ae[se+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0:e.util.schemaHasRules(W,e.RULES.all)){f.schema=W,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),a+=F?" "+P+" = "+P+" || Object.keys("+l+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+m+" = "+P+"["+v+"]; ":" for (var "+m+" in "+l+") { ",a+=" if ("+e.usePattern(oe)+".test("+m+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);M=l+"["+m+"]";f.dataPathArr[y]=m;H=e.validate(f);f.baseId=D,e.util.varOccurences(H,g)<2?a+=" "+e.util.varReplace(H,g,M)+" ":a+=" var "+g+" = "+M+"; "+H+" ",c&&(a+=" if (!"+d+") break; "),a+=" } ",c&&(a+=" else "+d+" = true; "),a+=" } ",c&&(a+=" if ("+d+") { ",p+="}")}}}return c&&(a+=" "+p+" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="errs__"+o,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(a+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){f.schema=n,f.schemaPath=i,f.errSchemaPath=u;var d="key"+o,m="idx"+o,v="i"+o,y="' + "+d+" + '",g="data"+(f.dataLevel=e.dataLevel+1),P="dataProperties"+o,b=e.opts.ownProperties,E=e.baseId;b&&(a+=" var "+P+" = undefined; "),a+=b?" "+P+" = "+P+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+d+" = "+P+"["+m+"]; ":" for (var "+d+" in "+l+") { ",a+=" var startErrs"+o+" = errors; ";var w=d,S=e.compositeRule;e.compositeRule=f.compositeRule=!0;var O=e.validate(f);f.baseId=E,e.util.varOccurences(O,g)<2?a+=" "+e.util.varReplace(O,g,w)+" ":a+=" var "+g+" = "+w+"; "+O+" ",e.compositeRule=f.compositeRule=S,a+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+y+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+y+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),c&&(a+=" break; "),a+=" } }"}return c&&(a+=" if ("+h+" == errors) {"),a=e.util.cleanUpCode(a)}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,n=e.schema[r],i=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,l="data"+(s||""),h="valid"+o,f=e.opts.$data&&n&&n.$data;f&&(a+=" var schema"+o+" = "+e.util.getData(n.$data,s,e.dataPathArr)+"; ");var p="schema"+o;if(!f)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=n;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1];var P=e.schema.properties[v];P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0:e.util.schemaHasRules(P,e.RULES.all))||(d[d.length]=v)}}else d=n;if(f||d.length){var b=e.errorPath,E=f||d.length>=e.opts.loopRequired,w=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",E){f||(a+=" var "+p+" = validate.schema"+i+"; ");var S="' + "+(F="schema"+o+"["+(j="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,F,e.opts.jsonPointers)),a+=" var "+h+" = true; ",f&&(a+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),a+=" for (var "+j+" = 0; "+j+" < "+p+".length; "+j+"++) { "+h+" = "+l+"["+p+"["+j+"]] !== undefined ",w&&(a+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+j+"]) "),a+="; if (!"+h+") break; } ",f&&(a+=" } "),a+=" if (!"+h+") { ",(_=_||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var O=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var x=d;if(x)for(var j=-1,R=x.length-1;j<R;){k=x[j+=1],j&&(a+=" || "),a+=" ( ( "+(C=l+(A=e.util.getProperty(k)))+" === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(k)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:A)+") ) "}a+=") { ";var _;S="' + "+(F="missing"+o)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,F,!0):b+" + "+F),(_=_||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";O=a;a=_.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(E){f||(a+=" var "+p+" = validate.schema"+i+"; ");var F;S="' + "+(F="schema"+o+"["+(j="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,F,e.opts.jsonPointers)),f&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+j+" = 0; "+j+" < "+p+".length; "+j+"++) { if ("+l+"["+p+"["+j+"]] === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+j+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",f&&(a+=" } ")}else{var D=d;if(D)for(var k,$=-1,I=D.length-1;$<I;){k=D[$+=1];var A=e.util.getProperty(k),C=(S=e.util.escapeQuotes(k),l+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,k,e.opts.jsonPointers)),a+=" if ( "+C+" === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(k)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else c&&(a+=" if (true) {");return a}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,n=e.dataLevel,i=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,h="data"+(n||""),f="valid"+s,p=e.opts.$data&&i&&i.$data;if(p?(o+=" var schema"+s+" = "+e.util.getData(i.$data,n,e.dataPathArr)+"; ",a="schema"+s):a=i,(i||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+f+"; if ("+a+" === false || "+a+" === undefined) "+f+" = true; else if (typeof "+a+" != 'boolean') "+f+" = false; else { "),o+=" var i = "+h+".length , "+f+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+f+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var v="checkDataType"+(m?"s":"");o+=" if ("+e.util[v](d,"item",!0)+") continue; ",m&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+f+") { ";var y=y||[];y.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+u:""+i,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var g=o;o=y.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+g+"]); ":o+=" validate.errors = ["+g+"]; return false; ":o+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",l&&(o+=" else { ")}else l&&(o+=" if (true) { ");return o}},function(e,r,t){"use strict";var a=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));var o,s=r[t].split("/"),n=e;for(o=1;o<s.length;o++)n=n[s[o]];for(o=0;o<a.length;o++){var i=a[o],u=n[i];u&&(n[i]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]})}}return e}},function(e,r,t){"use strict";var a=t(11).MissingRef;e.exports=function e(r,t,o){var s=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(o=t,t=void 0);var n=i(r).then(function(){var e=s._addSchema(r,void 0,t);return e.validate||function e(r){try{return s._compile(r)}catch(e){if(e instanceof a)return function o(e){var o=e.missingSchema;if(c(o))throw new Error("Schema "+o+" is loaded but "+e.missingRef+" cannot be resolved");var n=s._loadingSchemas[o];n||(n=s._loadingSchemas[o]=s._opts.loadSchema(o)).then(u,u);return n.then(function(e){if(!c(o))return i(e).then(function(){c(o)||s.addSchema(e,o,void 0,t)})}).then(function(){return function e(r){try{return s._compile(r)}catch(e){if(e instanceof a)return o(e);throw e}function o(a){var o=a.missingSchema;if(c(o))throw new Error("Schema "+o+" is loaded but "+a.missingRef+" cannot be resolved");var n=s._loadingSchemas[o];return n||(n=s._loadingSchemas[o]=s._opts.loadSchema(o)).then(u,u),n.then(function(e){if(!c(o))return i(e).then(function(){c(o)||s.addSchema(e,o,void 0,t)})}).then(function(){return e(r)});function u(){delete s._loadingSchemas[o]}function c(e){return s._refs[e]||s._schemas[e]}}}(r)});function u(){delete s._loadingSchemas[o]}function c(e){return s._refs[e]||s._schemas[e]}}(e);throw e}function o(a){var o=a.missingSchema;if(c(o))throw new Error("Schema "+o+" is loaded but "+a.missingRef+" cannot be resolved");var n=s._loadingSchemas[o];return n||(n=s._loadingSchemas[o]=s._opts.loadSchema(o)).then(u,u),n.then(function(e){if(!c(o))return i(e).then(function(){c(o)||s.addSchema(e,o,void 0,t)})}).then(function(){return e(r)});function u(){delete s._loadingSchemas[o]}function c(e){return s._refs[e]||s._schemas[e]}}}(e)});o&&n.then(function(e){o(null,e)},o);return n;function i(r){var t=r.$schema;return t&&!s.getSchema(t)?e.call(s,{$ref:t},!0):Promise.resolve()}}},function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,o=t(63),s=t(64);e.exports={add:function(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!a.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var s=r.type;if(Array.isArray(s))for(var n=0;n<s.length;n++)u(e,s[n],r);else u(e,s,r);var i=r.metaSchema;i&&(r.$data&&this._opts.$data&&(i={anyOf:[i,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(i,!0))}function u(e,r,a){for(var s,n=0;n<t.length;n++){var i=t[n];if(i.type==r){s=i;break}}s||(s={type:r,rules:[]},t.push(s));var u={keyword:e,definition:a,custom:!0,code:o,implements:a.implements};s.rules.push(u),t.custom[e]=u}return t.keywords[e]=t.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 t=0;t<r.length;t++)for(var a=r[t].rules,o=0;o<a.length;o++)if(a[o].keyword==e){a.splice(o,1);break}return this},validate:function e(r,t){e.errors=null;var a=this._validateKeyword=this._validateKeyword||this.compile(s,!0);if(a(r))return!0;e.errors=a.errors;if(t)throw new Error("custom keyword definition is invalid: "+this.errorsText(a.errors));return!1}}},function(e,r,t){"use strict";e.exports=function(e,r,t){var a,o,s=" ",n=e.level,i=e.dataLevel,u=e.schema[r],c=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,f="data"+(i||""),p="valid"+n,d="errs__"+n,m=e.opts.$data&&u&&u.$data;m?(s+=" var schema"+n+" = "+e.util.getData(u.$data,i,e.dataPathArr)+"; ",o="schema"+n):o=u;var v,y,g,P,b,E="definition"+n,w=this.definition,S="";if(m&&w.$data){b="keywordValidate"+n;var O=w.validateSchema;s+=" var "+E+" = RULES.custom['"+r+"'].definition; var "+b+" = "+E+".validate;"}else{if(!(P=e.useCustomRule(this,u,e.schema,e)))return;o="validate.schema"+c,b=P.code,v=w.compile,y=w.inline,g=w.macro}var x=b+".errors",j="i"+n,R="ruleErr"+n,_=w.async;if(_&&!e.async)throw new Error("async keyword in sync schema");if(y||g||(s+=x+" = null;"),s+="var "+d+" = errors;var "+p+";",m&&w.$data&&(S+="}",s+=" if ("+o+" === undefined) { "+p+" = true; } else { ",O&&(S+="}",s+=" "+p+" = "+E+".validateSchema("+o+"); if ("+p+") { ")),y)w.statements?s+=" "+P.validate+" ":s+=" "+p+" = "+P.validate+"; ";else if(g){var F=e.util.copy(e);S="";F.level++;var D="valid"+F.level;F.schema=P.validate,F.schemaPath="";var k=e.compositeRule;e.compositeRule=F.compositeRule=!0;var $=e.validate(F).replace(/validate\.schema/g,b);e.compositeRule=F.compositeRule=k,s+=" "+$}else{(N=N||[]).push(s),s="",s+=" "+b+".call( ",e.opts.passContext?s+="this":s+="self",v||!1===w.schema?s+=" , "+f+" ":s+=" , "+o+" , "+f+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var I=i?"data"+(i-1||""):"parentData",A=i?e.dataPathArr[i]:"parentDataProperty",C=s+=" , "+I+" , "+A+" , rootData ) ";s=N.pop(),!1===w.errors?(s+=" "+p+" = ",_&&(s+="await "),s+=C+"; "):s+=_?" var "+(x="customErrors"+n)+" = null; try { "+p+" = await "+C+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+x+" = e.errors; else throw e; } ":" "+x+" = null; "+p+" = "+C+"; "}if(w.modifying&&(s+=" if ("+I+") "+f+" = "+I+"["+A+"];"),s+=""+S,w.valid)h&&(s+=" if (true) { ");else{var N;s+=" if ( ",void 0===w.valid?(s+=" !",s+=g?""+D:""+p):s+=" "+!w.valid+" ",s+=") { ",a=this.keyword,(N=N||[]).push(s),s="",(N=N||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),s+=" } "):s+=" {} ";var L=s;s=N.pop(),!e.compositeRule&&h?e.async?s+=" throw new ValidationError(["+L+"]); ":s+=" validate.errors = ["+L+"]; return false; ":s+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=s;s=N.pop(),y?w.errors?"full"!=w.errors&&(s+=" for (var "+j+"="+d+"; "+j+"<errors; "+j+"++) { var "+R+" = vErrors["+j+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(s+=" "+R+".schema = "+o+"; "+R+".data = "+f+"; "),s+=" } "):!1===w.errors?s+=" "+T+" ":(s+=" if ("+d+" == errors) { "+T+" } else { for (var "+j+"="+d+"; "+j+"<errors; "+j+"++) { var "+R+" = vErrors["+j+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(s+=" "+R+".schema = "+o+"; "+R+".data = "+f+"; "),s+=" } } "):g?(s+=" var err = ",!1!==e.createErrors?(s+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(e.async?s+=" throw new ValidationError(vErrors); ":s+=" validate.errors = vErrors; return false; ")):!1===w.errors?s+=" "+T+" ":(s+=" if (Array.isArray("+x+")) { if (vErrors === null) vErrors = "+x+"; else vErrors = vErrors.concat("+x+"); errors = vErrors.length; for (var "+j+"="+d+"; "+j+"<errors; "+j+"++) { var "+R+" = vErrors["+j+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+e.errorPath+"; "+R+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(s+=" "+R+".schema = "+o+"; "+R+".data = "+f+"; "),s+=" } } else { "+T+" } "),s+=" } ",h&&(s+=" else { ")}return s}},function(e,r,t){"use strict";var a=t(23);e.exports={$id:"https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:a.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:a.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},function(e){e.exports=JSON.parse('{"$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":false}')},function(e,r){e.exports=function(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}},function(e,r){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,r){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,r){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var a=new Uint8Array(16);e.exports=function(){return t(a),a}}else{var o=new Array(16);e.exports=function(){for(var e,r=0;r<16;r++)0==(3&r)&&(e=4294967296*Math.random()),o[r]=e>>>((3&r)<<3)&255;return o}}},function(e,r){for(var t=[],a=0;a<256;++a)t[a]=(a+256).toString(16).substr(1);e.exports=function(e,r){var a=r||0,o=t;return[o[e[a++]],o[e[a++]],o[e[a++]],o[e[a++]],"-",o[e[a++]],o[e[a++]],"-",o[e[a++]],o[e[a++]],"-",o[e[a++]],o[e[a++]],"-",o[e[a++]],o[e[a++]],o[e[a++]],o[e[a++]],o[e[a++]],o[e[a++]]].join("")}},function(e,r,t){"use strict";t.r(r);var a=t(0),o=t.n(a),s=t(1),n=t.n(s),i=t(2),u=t.n(i),c=function(e,r){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])})(e,r)};var l=function(){return(l=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function h(e){return Object.keys(e).some(function(r){var t=e[r];if(!t)return!1;switch(t&&t.toParam&&(t=t.toParam()),t.constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}})}function f(e){var r={};return Object.keys(e).forEach(function(t){var a=e[t];if(a&&a.toParam&&(a=a.toParam()),a||0===a||"boolean"==typeof a||"string"==typeof a){var o;switch(a.constructor.name){case"Array":o=a[0]&&a[0].constructor&&"Object"===a[0].constructor.name?JSON.stringify(a):a.join(",");break;case"Object":o=JSON.stringify(a);break;case"Date":o=a.valueOf();break;case"Function":o=null;break;case"Boolean":o=a+"";break;default:o=a}(o||0===o||"string"==typeof o)&&(r[t]=o)}}),r}function p(e){var r=f(e);return Object.keys(r).map(function(e){return function(e,r){return encodeURIComponent(e)+"="+encodeURIComponent(r)}(e,r[e])}).join("&")}var d=function(e,r,t,a,o){e=e||"UNKNOWN_ERROR",r=r||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message="UNKNOWN_ERROR_CODE"===r?e:r+": "+e,this.originalMessage=e,this.code=r,this.response=t,this.url=a,this.options=o};d.prototype=Object.create(Error.prototype),d.prototype.constructor=d;var m="@esri/arcgis-rest-js",v={httpMethod:"POST",params:{f:"json"}};var y=function(e){function r(r,t,a,o,s){void 0===r&&(r="AUTHENTICATION_ERROR"),void 0===t&&(t="AUTHENTICATION_ERROR_CODE");var n=e.call(this,r,t,a,o,s)||this;return n.name="ArcGISAuthError",n.message="AUTHENTICATION_ERROR_CODE"===t?r:t+": "+r,n}return function(e,r){function t(){this.constructor=e}c(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}(r,e),r.prototype.retry=function(e,r){var t=this;void 0===r&&(r=3);var a=0,o=function(s,n){e(t.url,t.options).then(function(e){var r=l({},t.options,{authentication:e});return a+=1,g(t.url,r)}).then(function(e){s(e)}).catch(function(e){"ArcGISAuthError"===e.name&&a<r?o(s,n):"ArcGISAuthError"===e.name&&a>=r?n(t):n(e)})};return new Promise(function(e,r){o(e,r)})},r}(d);function g(e,r){void 0===r&&(r={params:{f:"json"}});var t=l({httpMethod:"POST"},v,r,{params:l({},v.params,r.params),headers:l({},v.headers,r.headers)}),a=[],o=[];if(t.fetch||"undefined"==typeof fetch?(a.push("`fetch`"),o.push("`node-fetch`")):t.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(a.push("`Promise`"),o.push("`es6-promise`")),"undefined"==typeof FormData&&(a.push("`FormData`"),o.push("`isomorphic-form-data`")),!t.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing "+a.join(", ")+". We recommend installing the "+o.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var s=t.httpMethod,n=t.authentication,i=t.rawResponse,u=l({f:"json"},t.params),c=null,g={method:s,credentials:"same-origin"};return(n?n.getToken(e,{fetch:t.fetch}).catch(function(r){return r.url=e,r.options=t,c=r,Promise.resolve("")}):Promise.resolve("")).then(function(r){if(r.length&&(u.token=r),"GET"===g.method){var a=""===p(u)?e:e+"?"+p(u);t.maxUrlLength&&a.length>t.maxUrlLength?g.method="POST":e=a}var o=new RegExp("/items/.+/updateResources").test(e);return"POST"===g.method&&(g.body=function(e,r){var t=h(e)||r,a=f(e);if(t){var o=new FormData;return Object.keys(a).forEach(function(e){if("undefined"!=typeof Blob&&a[e]instanceof Blob){var r=a.fileName||a[e].name||e;o.append(e,a[e],r)}else o.append(e,a[e])}),o}return p(e)}(u,o)),g.headers=l({},t.headers),"undefined"!=typeof window||g.headers.referer||(g.headers.referer=m),h(u)||o||(g.headers["Content-Type"]="application/x-www-form-urlencoded"),t.fetch(e,g)}).then(function(r){if(!r.ok){var a=r.status,o=r.statusText;throw new d(o,"HTTP "+a,r,e,t)}if(i)return r;switch(u.f){case"json":case"geojson":return r.json();case"html":case"text":return r.text();default:return r.blob()}}).then(function(r){if("json"!==u.f&&"geojson"!==u.f||i)return r;var a=function(e,r,t,a,o){if(e.code>=400){var s=e.message,n=e.code;throw new d(s,n,e,r,a)}if(e.error){var i=e.error,u=(s=i.message,n=i.code,i.messageCode),c=u||n||"UNKNOWN_ERROR_CODE";if(498===n||499===n||"GWM_0003"===u||400===n&&"Unable to generate token."===s)throw o||new y(s,c,e,r,a);throw new d(s,c,e,r,a)}if("failed"===e.status||"failure"===e.status){s=void 0,n="UNKNOWN_ERROR_CODE";try{s=JSON.parse(e.statusMessage).message,n=JSON.parse(e.statusMessage).code}catch(r){s=e.statusMessage||e.message}throw new d(s,n,e,r,a)}return e}(r,e,0,t,c);if(c){var o=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];t.authentication.trustedServers[o]={token:[],expires:new Date(Date.now()+864e5)},c=null}return a})}function P(e){return void 0===e&&(e={}),e.portal?("/"===(r=(r=e.portal).trim())[r.length-1]&&(r=r.slice(0,-1)),r):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest";var r}var b=[408,502,503,504],E=["Failed to fetch","Timeout exceeded"],w=function(e){return new Promise(function(r){setTimeout(function(){r()},e)})},S=function(){var e=u()(o.a.mark(function e(r,t,a,s){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=s?s+1:1,e.prev=1,e.next=4,g(r,{params:a,authentication:t});case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),console.log(e.t0),!(n>15)){e.next=12;break}throw e.t0;case 12:if(!E.includes(e.t0.message)&&!b.includes(e.t0.code)){e.next=17;break}return console.log("ArcGoose: waiting ".concat(Math.pow(2,n)," ms before retrying query...")),e.next=16,w(Math.pow(2,n));case 16:return e.abrupt("return",S(r,t,a,n));case 17:throw e.t0;case 18:case"end":return e.stop()}},e,null,[[1,7]])}));return function(r,t,a,o){return e.apply(this,arguments)}}(),O=S;function x(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?x(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var R=function(){var e=u()(o.a.mark(function e(r){var t,a,s,n,i,u,c;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.url,a=r.portal,s=r.portalItemId,n=r.authentication,!t){e.next=5;break}e.t0={url:t},e.next=8;break;case 5:return e.next=7,o=s,g(P(h={portal:a,authentication:n})+"/content/items/"+o,l({httpMethod:"GET"},h));case 7:e.t0=e.sent;case 8:return i=e.t0,e.next=11,O(i.url,n);case 11:if(!(u=e.sent).error){e.next=14;break}throw new Error(u.error);case 14:return c=j({},u,{authentication:n,type:"Feature Service",url:i.url,access:i.access,capabilities:{create:u.capabilities.includes("Create"),query:u.capabilities.includes("Query"),update:u.capabilities.includes("Update"),delete:u.capabilities.includes("Delete"),editing:u.capabilities.includes("Editing")},layers:{},tables:{}}),u.layers.forEach(function(e){return c.layers[e.name]=j({},e,{authentication:n,url:"".concat(i.url,"/").concat(e.id),serviceUrl:i.url,type:"Feature Layer"})}),u.tables.forEach(function(e){return c.tables[e.name]=j({},e,{authentication:n,url:"".concat(i.url,"/").concat(e.id),serviceUrl:i.url,type:"Table"})}),e.abrupt("return",c);case 18:case"end":return e.stop()}var o,h},e)}));return function(r){return e.apply(this,arguments)}}(),_=t(7),F=t.n(_),D=t(4),k=t.n(D),$=t(5),I=t.n($),A=t(12),C=t.n(A),N=function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).forEach(function(a){r.properties[a].alias&&void 0!==e[r.properties[a].alias]?t[a]=e[r.properties[a].alias]:void 0!==e[a]&&(t[a]=e[a])}),t},L=function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).filter(function(r){return void 0!==e[r]}).forEach(function(a){null===e[a]&&r.properties[a].default?t[a]=r.properties[a].default:t[a]=e[a]}),t},T=function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).filter(function(r){return void 0!==e[r]}).forEach(function(a){try{r.properties[a].date?t[a]=e[a].getTime():t[a]=e[a]}catch(r){t[a]=e[a]}}),t},q=t(24),U=t.n(q),z=t(14),Q=t.n(z),V=t(13),M=t.n(V),H=t(25),K=t.n(H),G=t(26),J=t.n(G),B=t(27);function Z(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}var W=new(t.n(B).a)({$data:!0,allErrors:!0}),Y=function(e,r,t){var a=r.split("/"),o=a[2],s=t.properties[o]&&t.properties[o].alias;return s?(a.splice(2,1,s),{dataPath:".".concat(s).concat(e.slice(o.length+1)),schemaPath:a.join("/")}):{dataPath:e,schemaPath:r}},X=function(e){function r(){var e,t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;k()(this,r);for(var i=arguments.length,u=new Array(i>3?i-3:0),c=3;c<i;c++)u[c-3]=arguments[c];return t=U()(this,(e=Q()(r)).call.apply(e,[this].concat(u))),Error.captureStackTrace&&Error.captureStackTrace(M()(t),r),console.warn({errors:a,data:o,schema:s}),t.name="ValidationError",t.errors=a.map(function(e){var r=e.dataPath,t=e.schemaPath;return function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Z(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}({},F()(e,["dataPath","schemaPath"]),{},Y(r,t,s))}),t.data=o,t.schema=s,t}return K()(r,e),r}(J()(Error)),ee=function(e,r){if(!r)return null;W.addSchema(r);var t=function(e){return W.compile(e)}(r),a=t(e);return W.removeSchema(r),a?null:new X(t.errors,e,r)};function re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}var te=function(e,r){if(!r||1===r.length&&"*"===r[0])return e;var t=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?re(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}({},e,{required:e.required?e.required.filter(function(e){return r.includes(e)}):[],properties:{}});return r.filter(function(r){return e.properties[r]}).forEach(function(r){return t.properties[r]=e.properties[r]}),t};function ae(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}var oe=function(e,r,t,a){if(!r)return e;var o,s=function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).forEach(function(a){try{var o=r.properties[a].type;"object"===o||"array"===o||o.includes("object")||o.includes("array")?t[a]=JSON.parse(e[a]):t[a]="boolean"===o?1===e[a]:e[a]}catch(e){t[a]=null}}),t}(e,r);if(t){var i=te(r,a);o=ee(s,i)}return function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ae(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}({attributes:function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).filter(function(r){return void 0!==e[r]}).forEach(function(a){r.properties[a].alias?t[r.properties[a].alias]=e[a]:t[a]=e[a]}),t}(L(function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).filter(function(r){return void 0!==e[r]}).forEach(function(a){try{r.properties[a].date?t[a]=new Date(e[a]):t[a]=e[a]}catch(r){t[a]=e[a]}}),t}(s,r),r),r)},t?{validation:o}:null)},se=t(3),ne=t.n(se),ie=function(){var e=u()(o.a.mark(function e(r,t,a,s){var n,i,u,c,l,h,f,p;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,i=[],u=null,c=null,l=a.resultRecordCount,h=a.resultOffset;case 6:if(!n){e.next=26;break}return e.next=9,S(r,t,a,s);case 9:if(f=e.sent,i.push.apply(i,ne()(f.features)),u=f.spatialReference,c=f.objectIdFieldName,!(n=!0===f.exceededTransferLimit)){e.next=24;break}if(p=f.features.length,!(l>0)){e.next=20;break}if(!((l-=p)<=0)){e.next=20;break}return e.abrupt("break",26);case 20:isNaN(h)&&(h=0),h+=p,a.resultRecordCount=l,a.resultOffset=h;case 24:e.next=6;break;case 26:return e.abrupt("return",{features:i,spatialReference:u,objectIdFieldName:c});case 27:case"end":return e.stop()}},e)}));return function(r,t,a,o){return e.apply(this,arguments)}}();function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function ce(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var le=function(e,r){return r&&Object.keys(r.properties).find(function(t){return r.properties[t]&&r.properties[t].alias===e})||e},he=function(){function e(r,t,a){var o=t.findOne,s=F()(t,["findOne"]);k()(this,e),this.featureLayer=r,this.query=ce({},s,{returnGeometry:!1,returnCentroid:!1,inSR:4326,outSR:4326}),this.findOne=!!o,this.schema=a,this.validation=!1}var r;return I()(e,[{key:"where",value:function(e){return this.query.filters.push(e),this}},{key:"filter",value:function(e){return this.query.filters.push(e),this}},{key:"populate",value:function(e){var r=this;return this.query.outFields=e.map(function(e){return le(e,r.schema)}),this}},{key:"geometry",value:function(e,r){return this.query.geometry=e,this.query.inSR=e.spatialReference.wkid,this.query.geometryType=r,this}},{key:"intersects",value:function(){return this.query.spatialRel="esriSpatialRelIntersects",this}},{key:"contains",value:function(){return this.query.spatialRel="esriSpatialRelContains",this}},{key:"returnGeometry",value:function(){return this.query.returnGeometry=!0,this}},{key:"returnZ",value:function(){return this.query.returnZ=!0,this}},{key:"returnCentroid",value:function(){return this.query.returnCentroid=!0,this}},{key:"outSpatialReference",value:function(e){return this.query.outSR=e,this}},{key:"sort",value:function(e){var r=this;return e&&"object"===C()(e)&&(this.query.orderByFields=Object.keys(e).map(function(t){return"".concat(le(t,r.schema)," ").concat(e[t]<0?"DESC":"ASC")}).join(", ")),this}},{key:"offset",value:function(e){return e&&e>0&&(this.query.resultOffset=e),this}},{key:"limit",value:function(e){return e&&e>0&&(this.query.resultRecordCount=e),this}},{key:"outStatistics",value:function(e,r){return this.query.outStatistics=e,this.query.groupByFieldsForStatistics=r,this}},{key:"returnCountOnly",value:function(){return this.query.returnCountOnly=!0,this}},{key:"validate",value:function(){return this.validation=!0,this}},{key:"exec",value:(r=u()(o.a.mark(function e(){var r,t,a,s,i,u,c=this;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r={where:this.query.filters.map(function(e){return"(".concat(e,")")}).join(" AND ")||"1=1",geometry:JSON.stringify(this.query.geometry),geometryType:this.query.geometryType,outFields:this.query.outFields.join(","),returnGeometry:this.query.returnGeometry,returnZ:this.query.returnZ,returnCentroid:this.query.returnCentroid,outSR:this.query.outSR,inSR:this.query.inSR,spatialRel:this.query.spatialRel,orderByFields:this.query.orderByFields,resultOffset:this.query.resultOffset,resultRecordCount:this.query.resultRecordCount,outStatistics:JSON.stringify(this.query.outStatistics),returnCountOnly:this.query.returnCountOnly,groupByFieldsForStatistics:this.query.groupByFieldsForStatistics},t="".concat(this.featureLayer.url,"/query"),!this.query.returnCountOnly){e.next=7;break}return e.next=5,S(t,this.query.authentication,r);case 5:return a=e.sent,e.abrupt("return",a);case 7:return e.next=9,ie(t,this.query.authentication,r);case 9:if(s=e.sent,i=s.objectIdFieldName,u=s.features.map(function(e){var r=e.attributes,t=e.geometry,a=e.centroid;return ce({},c.query.outStatistics?{attributes:r}:oe(r,ce({},c.schema,{properties:ce(n()({},i,{type:"integer",alias:"esriObjectId"}),c.schema.properties)}),c.validation,c.query.outFields),{geometry:c.query.returnGeometry?ce({},t,{spatialReference:ce({},s.spatialReference)}):null,centroid:c.query.returnCentroid?ce({},a,{spatialReference:s.spatialReference}):null})}),!this.findOne){e.next=16;break}if(1===u.length){e.next=15;break}throw new Error("Not sure what to throw!");case 15:return e.abrupt("return",u[0]);case 16:return e.abrupt("return",u);case 17:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})}]),e}(),fe=t(28),pe=t.n(fe),de=function(e,r,t){if(!r)return e;var a=T(N(e,r),r),o=t?te(r,Object.keys(a)):r,s=ee(a,o);if(s)throw s;return function(e,r){if(!r)return e;var t={};return Object.keys(r.properties).forEach(function(a){try{var o=r.properties[a].type;if(void 0===e[a])return;null===e[a]?t[a]=null:o?"object"===o||"array"===o||o.includes("object")||o.includes("array")?t[a]=JSON.stringify(e[a]):t[a]="boolean"===o?e[a]?1:0:e[a]:t[a]=e[a]}catch(e){t[a]=null}}),t}(a,r)};function me(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function ve(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?me(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):me(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var ye=function(e,r){return function(e){return Array.isArray(e)?e:[e]}(e).map(function(e){var t=e.geometry,a=e.attributes;return{attributes:ve({},de(a,r,!1),{GlobalID:a.GlobalID||pe()()}),geometry:t&&t.toJSON&&t.toJSON()||t}})},ge=function(e,r){return function(e){return Array.isArray(e)?e:[e]}(e).map(function(e){var t=e.geometry,a=e.attributes;return{attributes:de(a,r,!0),geometry:t&&t.toJSON&&t.toJSON()||t}})},Pe=function(e,r){var t=function(e){return Array.isArray(e)?e:[e]}(e),a=r||"";return t[0]&&t[0].attributes?t.map(function(e){return"".concat(a).concat(e.attributes.GlobalID).concat(a)}):t.map(function(e){return"".concat(a).concat(e).concat(a)})},be=function(e){return e?e.filter(function(e){return e.success}).map(function(e){return e.globalId}):[]},Ee=function(e){return e?e.filter(function(e){return e.success}).map(function(e){return e.objectId}):[]},we=function(){var e,r;function t(e,r,a){k()(this,t),this.featureLayer=e,this.schema=r,this.adds=[],this.deletes=[],this.updates=[],this.shouldUseGlobalIds=!0,this.authentication=a}return I()(t,null,[{key:"deleteWhere",value:(e=u()(o.a.mark(function e(r,t,a){var s;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S("".concat(r.url,"/deleteFeatures"),a,{where:t,rollbackOnFailure:!0});case 2:return s=e.sent,e.abrupt("return",{layerId:r.id,deletedFeatures:be(s.deleteResults)});case 4:case"end":return e.stop()}},e)})),function(r,t,a){return e.apply(this,arguments)})}]),I()(t,[{key:"add",value:function(e){var r;return(r=this.adds).push.apply(r,ne()(ye(e,this.schema))),this}},{key:"update",value:function(e){var r;return(r=this.updates).push.apply(r,ne()(ge(e,this.schema))),this}},{key:"delete",value:function(e){var r;return(r=this.deletes).push.apply(r,ne()(Pe(e))),this}},{key:"useGlobalIds",value:function(){return this.shouldUseGlobalIds=!0,this}},{key:"useObjectIds",value:function(){return this.shouldUseGlobalIds=!1,this}},{key:"handle",value:function(){return{serviceUrl:this.featureLayer.serviceUrl,name:this.featureLayer.name,authentication:this.authentication,payload:{id:this.featureLayer.id,adds:this.adds.length?this.adds:null,updates:this.updates.length?this.updates:null,deletes:this.deletes.length?this.deletes:null}}}},{key:"exec",value:(r=u()(o.a.mark(function e(){var r,t,a;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=null,this.deletes.length&&(r=this.shouldUseGlobalIds?this.deletes.map(function(e){return'"'.concat(e,'"')}).join(","):this.deletes.map(function(e){return"".concat(e)}).join(",")),t={authentication:this.authentication,useGlobalIds:this.shouldUseGlobalIds,rollbackOnFailure:!1,adds:this.adds.length?JSON.stringify(this.adds):null,updates:this.updates.length?JSON.stringify(this.updates):null,deletes:r},e.next=5,S("".concat(this.featureLayer.url,"/applyEdits"),this.authentication,t);case 5:return a=e.sent,e.abrupt("return",{layerId:this.featureLayer.id,addedFeatures:be(a.addResults),updatedFeatures:be(a.updateResults),deletedFeatures:be(a.deleteResults),addedOIDs:Ee(a.addResults)});case 7:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})}]),t}(),Se=function(e){return Object.keys(e).map(function(r){return"".concat(r," = ").concat("string"==typeof(t=e[r])?"'".concat(t,"'"):"".concat(t));var t}).join(" AND ")},Oe=function(){function e(r){var t=r.url,a=r.serviceUrl,o=r.id,s=r.name,n=r.schema,i=r.authentication;k()(this,e),this.type="layer",this.url=t,this.serviceUrl=a,this.id=o,this.name=s,this.schema=n,this.authentication=i}return I()(e,[{key:"find",value:function(e){var r={filters:e?[Se(e)]:[],outFields:["*"],authentication:this.authentication};return new he(this,r,this.schema)}},{key:"findOne",value:function(e){var r={filters:e?[Se(e)]:[],outFields:["*"],findOne:!0,authentication:this.authentication};return new he(this,r,this.schema)}},{key:"applyEdits",value:function(){return new we(this,this.schema,this.authentication)}},{key:"deleteWhere",value:function(e){return we.deleteWhere(this,e,this.authentication)}}]),e}(),xe=function(e){return Object.keys(e).map(function(r){return"".concat(r," = ").concat("string"==typeof(t=e[r])?"'".concat(t,"'"):"".concat(t));var t}).join(" AND ")},je=function(){function e(r){var t=r.url,a=r.serviceUrl,o=r.id,s=r.name,n=r.schema,i=r.authentication;k()(this,e),this.type="table",this.url=t,this.serviceUrl=a,this.id=o,this.name=s,this.schema=n,this.authentication=i}return I()(e,[{key:"find",value:function(e){var r={filters:e?[xe(e)]:[],outFields:["*"],authentication:this.authentication};return new he(this,r,this.schema)}},{key:"findOne",value:function(e){var r={filters:e?[xe(e)]:[],outFields:["*"],findOne:!0,authentication:this.authentication};return new he(this,r,this.schema)}},{key:"applyEdits",value:function(){return new we(this,this.schema,this.authentication)}},{key:"deleteWhere",value:function(e){return we.deleteWhere(this,e,this.authentication)}}]),e}();function Re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function _e(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(t,!0).forEach(function(r){n()(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var Fe=function(e){var r=[];return e.forEach(function(e){r.push.apply(r,ne()((e.payload.adds||[]).map(function(r){return{id:e.payload.id,type:"adds",payload:r}}))),r.push.apply(r,ne()((e.payload.deletes||[]).map(function(r){return{id:e.payload.id,type:"deletes",payload:r}}))),r.push.apply(r,ne()((e.payload.updates||[]).map(function(r){return{id:e.payload.id,type:"updates",payload:r}})))}),r},De=function(e,r){var t=e.filter(function(e){return e.type===r}).map(function(e){return e.payload});return t.length>0?t:null},ke=function(e){var r=[];return new Set(e.map(function(e){return e.id})).forEach(function(t){return r.push(function(e,r){return{id:e,adds:De(r,"adds"),deletes:De(r,"deletes"),updates:De(r,"updates")}}(t,e.filter(function(e){return e.id===t})))}),r},$e=function(e){for(var r=[],t=0,a=e.length;t<a;)r.push(e.slice(t,t+=500));return r},Ie=function(){var e=u()(o.a.mark(function e(r,t){var a,s,n,i,u,c,l,h,f,p;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r.length<1)){e.next=2;break}return e.abrupt("return",null);case 2:a=r[0].serviceUrl,s=r[0].authentication,n=Fe(r),i=$e(n),u=[],c=0;case 8:if(!(c<i.length)){e.next=19;break}return l=ke(i[c]),h={useGlobalIds:!0,rollbackOnFailure:!1,edits:JSON.stringify(l)},e.next=13,S("".concat(a,"/applyEdits"),s,h);case 13:f=e.sent,u.push(f),t&&t((c+1)/i.length);case 16:c+=1,e.next=8;break;case 19:return p=[],u.forEach(function(e){return p.push.apply(p,ne()(e.map(function(e){return{layerId:e.id,layerName:(r.find(function(r){return r.payload.id===e.id})||{}).name,addedFeatures:be(e.addResults),updatedFeatures:be(e.updateResults),deletedFeatures:be(e.deleteResults),addedOIDs:Ee(e.addResults)}})))}),e.abrupt("return",p);case 22:case"end":return e.stop()}},e)}));return function(r,t){return e.apply(this,arguments)}}();r.default={connect:R,model:function(e,r){var t=e.type,a=F()(e,["type"]);return"Feature Layer"===t?new Oe(_e({},a,{schema:r})):"Table"===t?new je(_e({},a,{schema:r})):null},execAll:Ie,validateAttributes:function(e,r,t){if(!r)return e;var a=T(N(e,r),r),o=t?te(r,Object.keys(a)):r;return ee(a,o)}}}])});
\No newline at end of file