xmcp 0.5.2-canary.2 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("zod"));else if("function"==typeof define&&define.amd)define(["zod"],r);else{var t="object"==typeof exports?r(require("zod")):r(e.zod);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}(this,e=>(()=>{var r,t,a={3084:function(e,r,t){"use strict";var a=t(2853),o=t(985),s=t(8565),i=t(812),n=t(6039),l=t(6885),c=t(698),u=t(6079),p=t(9717);e.exports=g,g.prototype.validate=function(e,r){if("string"==typeof e){if(!(t=this.getSchema(e)))throw Error('no schema with key or ref "'+e+'"')}else{var t,a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);return!0!==t.$async&&(this.errors=t.errors),o},g.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},g.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 i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw Error("schema id must be string");return P(this,r=o.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},g.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},g.prototype.validateSchema=function(e,r){var t,a,o=e.$schema;if(void 0!==o&&"string"!=typeof o)throw Error("$schema must be a string");if(!(o=o||this._opts.defaultMeta||(t=this,a=t._opts.meta,t._opts.defaultMeta="object"==typeof a?t._getId(a)||a:t.getSchema(f)?f:void 0,t._opts.defaultMeta)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var s=this.validate(o,e);if(!s&&r){var i="schema is invalid: "+this.errorsText();if("log"==this._opts.validateSchema)this.logger.error(i);else throw Error(i)}return s},g.prototype.getSchema=function(e){var r=y(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=o.schema.call(e,{schema:{}},r);if(t){var s=t.schema,n=t.root,l=t.baseId,c=a.call(e,s,n,void 0,l);return e._fragments[r]=new i({ref:r,fragment:!0,schema:s,root:n,baseId:l,validate:c}),c}}(this,e)}},g.prototype.removeSchema=function(e){if(e instanceof RegExp)return E(this,this._schemas,e),E(this,this._refs,e),this;switch(typeof e){case"undefined":E(this,this._schemas),E(this,this._refs),this._cache.clear();break;case"string":var r=y(this,e);r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e];break;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},g.prototype.addFormat=function(e,r){return"string"==typeof r&&(r=new RegExp(r)),this._formats[e]=r,this},g.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 i=e[s];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},g.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw Error("schema should be object or boolean");var s,n=this._opts.serialize,l=n?n(e):e,c=this._cache.get(l);if(c)return c;a=a||!1!==this._opts.addUsedSchema;var u=o.normalizeId(this._getId(e));u&&a&&P(this,u);var p=!1!==this._opts.validateSchema&&!r;!p||(s=u&&u==o.normalizeId(e.$schema))||this.validateSchema(e,!0);var h=o.ids.call(this,e),d=new i({id:u,schema:e,localRefs:h,cacheKey:l,meta:t});return"#"!=u[0]&&a&&(this._refs[u]=d),this._cache.put(l,d),p&&s&&this.validateSchema(e,!0),d},g.prototype._compile=function(e,r){var t,o;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;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}},g.prototype.compileAsync=t(6069);var h=t(3528);g.prototype.addKeyword=h.add,g.prototype.getKeyword=h.get,g.prototype.removeKeyword=h.remove,g.prototype.validateKeyword=h.validate;var d=t(2916);g.ValidationError=d.Validation,g.MissingRefError=d.MissingRef,g.$dataMetaSchema=u;var f="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function g(e){if(!(this instanceof g))return new g(e);e=this._opts=p.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:S,warn:S,error:S};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=l(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.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=n),this._metaOpts=function(e){for(var r=p.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),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){if(e._opts.$data&&(r=t(3215),e.addMetaSchema(r,r.$id,!0)),!1!==e._opts.meta){var r,a=t(2269);e._opts.$data&&(a=u(a,v)),e.addMetaSchema(a,f,!0),e._refs["http://json-schema.org/schema"]=f}}(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)if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function y(e,r){return r=o.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function E(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){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 Error("schema $id is different from id");return e.$id||e.id}function P(e,r){if(e._schemas[r]||e._refs[r])throw Error('schema with key or id "'+r+'" already exists')}function S(){}},8565:function(e){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}},6069:function(e,r,t){"use strict";var a=t(2916).MissingRef;e.exports=function e(r,t,o){var s=this;if("function"!=typeof this._opts.loadSchema)throw Error("options.loadSchema should be a function");"function"==typeof t&&(o=t,t=void 0);var i=n(r).then(function(){var e=s._addSchema(r,void 0,t);return e.validate||function e(r){try{return s._compile(r)}catch(p){if(p instanceof a){var o=p,i=o.missingSchema;if(u(i))throw Error("Schema "+i+" is loaded but "+o.missingRef+" cannot be resolved");var l=s._loadingSchemas[i];return l||(l=s._loadingSchemas[i]=s._opts.loadSchema(i)).then(c,c),l.then(function(e){if(!u(i))return n(e).then(function(){u(i)||s.addSchema(e,i,void 0,t)})}).then(function(){return e(r)});function c(){delete s._loadingSchemas[i]}function u(e){return s._refs[e]||s._schemas[e]}}throw p}}(e)});return o&&i.then(function(e){o(null,e)},o),i;function n(r){var t=r.$schema;return t&&!s.getSchema(t)?e.call(s,{$ref:t},!0):Promise.resolve()}}},2916:function(e,r,t){"use strict";var a=t(985);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}},6885:function(e,r,t){"use strict";var a=t(9717),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-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,p=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?: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,t=e.match(o);if(!t)return!1;var a=+t[1],i=+t[2],n=+t[3];return i>=1&&i<=12&&n>=1&&n<=(2==i&&(r=a)%4==0&&(r%100!=0||r%400==0)?29:s[i])}function g(e,r){var t=e.match(i);if(!t)return!1;var a=t[1],o=t[2],s=t[3],n=t[5];return(a<=23&&o<=59&&s<=59||23==a&&59==o&&60==s)&&(!r||n)}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:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:n,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:_,uuid:p,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":f},m.full={date:v,time:g,"date-time":function(e){var r=e.split(y);return 2==r.length&&v(r[0])&&g(r[1],!0)},uri:function(e){return E.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,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:_,uuid:p,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":f};var y=/t|\s/i,E=/\/|:/,b=/[^\\]\\Z/;function _(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},2853:function(e,r,t){"use strict";var a=t(985),o=t(9717),s=t(2916),i=t(6039),n=t(5572),l=o.ucs2length,c=t(7371),u=s.Validation;function p(e,r,t){var a=d.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})}function h(e,r,t){var a=d.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function d(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 m(e){return"var default"+e+" = defaults["+e+"];"}function v(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function g(e){return"var customRule"+e+" = customRules["+e+"];"}function y(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,d,E){var b=this,_=this._opts,w=[void 0],P={},S=[],z={},x=[],$={},R=[];t=t||{schema:r,refVal:w,refs:P};var j=p.call(this,r,t,E),I=this._compilations[j.index];if(j.compiling)return I.callValidate=k;var O=this._formats,A=this.RULES;try{var T=C(r,t,d,E);I.validate=T;var D=I.callValidate;return D&&(D.schema=T.schema,D.errors=null,D.refs=T.refs,D.refVal=T.refVal,D.root=T.root,D.$async=T.$async,_.sourceCode&&(D.source=T.source)),T}finally{h.call(this,r,t,E)}function k(){var e=I.validate,r=e.apply(this,arguments);return k.errors=e.errors,r}function C(r,i,p,h){var d,E=!i||i&&i.schema==r;if(i.schema!=t.schema)return e.call(b,r,i,p,h);var z=!0===r.$async,$=n({isTop:!0,schema:r,isRoot:E,baseId:h,root:i,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:s.MissingRef,RULES:A,validate:n,util:o,resolve:a,resolveRef:N,usePattern:q,useDefault:U,useCustomRule:V,opts:_,formats:O,logger:b.logger,self:b});$=y(w,v)+y(S,f)+y(x,m)+y(R,g)+$,_.processCode&&($=_.processCode($,r));try{d=Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",$)(b,A,O,t,w,x,R,c,l,u),w[0]=d}catch(e){throw b.logger.error("Error compiling schema, function code:",$),e}return d.schema=r,d.errors=null,d.refs=P,d.refVal=w,d.root=E?d:i,z&&(d.$async=!0),!0===_.sourceCode&&(d.source={code:$,patterns:S,defaults:x}),d}function N(r,o,s){var i,n,l,c,u,p=P[o=a.url(r,o)];if(void 0!==p)return L(c=w[p],u="refVal["+p+"]");if(!s&&t.refs){var h=t.refs[o];if(void 0!==h)return u=F(o,c=t.refVal[h]),L(c,u)}u=F(o);var f=a.call(b,C,t,o);if(void 0===f){var m=d&&d[o];m&&(f=a.inlineRef(m,_.inlineRefs)?m:e.call(b,m,t,d,r))}if(void 0!==f){return i=o,n=f,w[P[i]]=n,L(f,u)}l=o,delete P[l]}function F(e,r){var t=w.length;return w[t]=r,P[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 q(e){var r=z[e];return void 0===r&&(r=z[e]=S.length,S[r]=e),"pattern"+r}function U(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=i(e),t=$[r];return void 0===t&&(t=$[r]=x.length,x[t]=e),"default"+t}}function V(e,r,t,a){if(!1!==b._opts.validateSchema){var o,s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw Error("parent schema must have all required keywords: "+s.join(","));var i=e.definition.validateSchema;if(i&&!i(r)){var n="keyword schema is invalid: "+b.errorsText(i.errors);if("log"==b._opts.validateSchema)b.logger.error(n);else throw Error(n)}}var l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)o=l.call(b,r,t,a);else if(u)o=u.call(b,r,t,a),!1!==_.validateSchema&&b.validateSchema(o,!0);else if(c)o=c.call(b,a,e.keyword,r,t);else if(!(o=e.definition.validate))return;if(void 0===o)throw Error('custom keyword "'+e.keyword+'"failed to compile');var p=R.length;return R[p]=o,{code:"customRule"+p,validate:o}}}},985:function(e,r,t){"use strict";var a=t(3749),o=t(7371),s=t(9717),i=t(812),n=t(7713);function l(e,r,t){var a,o,s,n=this._refs[t];if("string"==typeof n)if(!this._refs[n])return l.call(this,e,r,n);else n=this._refs[n];if((n=n||this._schemas[t])instanceof i)return f(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var u=c.call(this,r,t);return u&&(a=u.schema,r=u.root,s=u.baseId),a instanceof i?o=a.validate||e.call(this,a.schema,r,void 0,s):void 0!==a&&(o=f(a,this._opts.inlineRefs)?a:e.call(this,a,r,void 0,s)),o}function c(e,r){var t=a.parse(r),o=v(t),s=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||o!==s){var n=y(o),l=this._refs[n];if("string"==typeof l)return u.call(this,e,l,t);if(l instanceof i)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof i))return;if(l.validate||this._compile(l),n==y(r))return{schema:l,root:e,baseId:s};e=l}if(!e.schema)return;s=m(this._getId(e.schema))}return h.call(this,t,s,e.schema,e)}function u(e,r,t){var a=c.call(this,e,r);if(a){var o=a.schema,s=a.baseId;e=a.root;var i=this._getId(o);return i&&(s=E(s,i)),h.call(this,t,s,o,e)}}e.exports=l,l.normalizeId=y,l.fullPath=m,l.url=E,l.ids=function(e){var r=y(this._getId(e)),t={"":r},i={"":m(r,!1)},l={},c=this;return n(e,{allKeys:!0},function(e,r,n,u,p,h,d){if(""!==r){var f=c._getId(e),m=t[u],v=i[u]+"/"+p;if(void 0!==d&&(v+="/"+("number"==typeof d?d:s.escapeFragment(d))),"string"==typeof f){f=m=y(m?a.resolve(m,f):f);var g=c._refs[f];if("string"==typeof g&&(g=c._refs[g]),g&&g.schema){if(!o(e,g.schema))throw Error('id "'+f+'" resolves to more than one schema')}else if(f!=y(v))if("#"==f[0]){if(l[f]&&!o(e,l[f]))throw Error('id "'+f+'" resolves to more than one schema');l[f]=e}else c._refs[f]=v}t[r]=m,i[r]=v}}),l},l.inlineRef=f,l.schema=c;var p=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("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=s.unescapeFragment(n)]))break;if(!p[n]&&((l=this._getId(t))&&(r=E(r,l)),t.$ref)){var l,u=E(r,t.$ref),h=c.call(this,a,u);h&&(t=h.schema,a=h.root,r=h.baseId)}}}if(void 0!==t&&t!==a.schema)return{schema:t,root:a,baseId:r}}}var d=s.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function f(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||"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(d[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 m(e,r){return!1!==r&&(e=y(e)),v(a.parse(e))}function v(e){return a.serialize(e).split("#")[0]+"#"}var g=/#\/?$/;function y(e){return e?e.replace(g,""):""}function E(e,r){return r=y(r),a.resolve(e,r)}},698:function(e,r,t){"use strict";var a=t(2004),o=t(9717).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){if("object"==typeof t){var o,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}},812:function(e,r,t){"use strict";var a=t(9717);e.exports=function(e){a.copy(e,this)}},1812:function(e){"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&&(64512&(r=e.charCodeAt(o)))==56320&&o++;return t}},9717:function(e,r,t){"use strict";function a(e,r,t,a){var o=a?" !== ":" === ",s=a?" || ":" && ",i=a?"!":"",n=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+s+"typeof "+r+o+'"object"'+s+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+s+n+"("+r+" % 1)"+s+r+o+r+(t?s+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?s+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+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,t){if(1===e.length)return a(e[0],r,t,!0);var o="",i=s(e);for(var n in i.array&&i.object&&(o=(i.null?"(":"(!"+r+" || ")+("typeof "+r)+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+a(n,r,t,!0);return o},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];else if("array"===e&&"array"===r)return["array"]},toHash:s,getProperty:l,escapeQuotes:c,equal:t(7371),ucs2length:t(1812),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(RegExp(r,"g"),t+"$1")},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){for(var t in e)if(!r[t])return t}},toQuotedString:u,getPathExpr:function(e,r,t,a){return d(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){return d(e,t?u("/"+f(r)):u(l(r)))},getData:function(e,r,t){if(""===e)return"rootData";if("/"==e[0]){if(!p.test(e))throw Error("Invalid JSON-pointer: "+e);o=e,s="rootData"}else{if(!(i=e.match(h)))throw Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw Error("Cannot access data "+a+" levels up, current level is "+r);if(s="data"+(r-a||""),!o)return s}for(var a,o,s,i,n=s,c=o.split("/"),u=0;u<c.length;u++){var d=c[u];d&&(s+=l(m(d)),n+=" && "+s)}return n},unescapeFragment:function(e){return m(decodeURIComponent(e))},unescapeJsonPointer:m,escapeFragment:function(e){return encodeURIComponent(f(e))},escapeJsonPointer:f};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 i=/^[a-z$_][a-z$_0-9]*$/i,n=/'|\\/g;function l(e){return"number"==typeof e?"["+e+"]":i.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(n,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function u(e){return"'"+c(e)+"'"}var p=/^\/(?:[^~]|~0|~1)*$/,h=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function d(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function f(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function m(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},6079:function(e){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var a=0;a<t.length;a++){e=JSON.parse(JSON.stringify(e));var o,s=t[a].split("/"),i=e;for(o=1;o<s.length;o++)i=i[s[o]];for(o=0;o<r.length;o++){var n=r[o],l=i[n];l&&(i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},6150:function(e,r,t){"use strict";var a=t(2269);e.exports={$id:"https://github.com/ajv-validator/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"}]}}}},1346:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l;var f="maximum"==r,m=f?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],g=e.opts.$data&&v&&v.$data,y=f?"<":">",E=f?">":"<",a=void 0;if(!(d||"number"==typeof l||void 0===l))throw Error(r+" must be number");if(!(g||void 0===v||"number"==typeof v||"boolean"==typeof v))throw Error(m+" must be number or boolean");if(g){var b=e.util.getData(v.$data,n,e.dataPathArr),_="exclusive"+i,w="exclType"+i,P="exclIsNumber"+i,S="op"+i,z="' + "+S+" + '";s+=" var schemaExcl"+i+" = "+b+"; ",s+=" var "+_+"; var "+w+" = typeof "+(b="schemaExcl"+i)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var a=m,x=x||[];x.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var $=s;s=x.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+$+"]); ":s+=" validate.errors = ["+$+"]; return false; ":s+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+_+" = "+o+" === undefined || "+b+" "+y+"= "+o+") ? "+h+" "+E+"= "+b+" : "+h+" "+E+" "+o+" ) : ( ("+_+" = "+b+" === true) ? "+h+" "+E+"= "+o+" : "+h+" "+E+" "+o+" ) || "+h+" !== "+h+") { var op"+i+" = "+_+" ? '"+y+"' : '"+y+"='; ",void 0===l&&(a=m,u=e.errSchemaPath+"/"+m,o=b,d=g)}else{var P="number"==typeof v,z=y;if(P&&d){var S="'"+z+"'";s+=" if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" ( "+o+" === undefined || "+v+" "+y+"= "+o+" ? "+h+" "+E+"= "+v+" : "+h+" "+E+" "+o+" ) || "+h+" !== "+h+") { "}else{P&&void 0===l?(_=!0,a=m,u=e.errSchemaPath+"/"+m,o=v,E+="="):(P&&(o=Math[f?"min":"max"](v,l)),v===(!P||o)?(_=!0,a=m,u=e.errSchemaPath+"/"+m,E+="="):(_=!1,z+="="));var S="'"+z+"'";s+=" if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+h+" "+E+" "+o+" || "+h+" !== "+h+") { "}}a=a||r;var x=x||[];x.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+S+", limit: "+o+", exclusive: "+_+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+z+" ",d?s+="' + "+o:s+=""+o+"'"),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var $=s;return s=x.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+$+"]); ":s+=" validate.errors = ["+$+"]; return false; ":s+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",p&&(s+=" else { "),s}},536:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxItems"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+h+".length "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ","maxItems"==r?s+="more":s+="fewer",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},3010:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxLength"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),!1===e.opts.unicode?s+=" "+h+".length ":s+=" ucs2length("+h+") ",s+=" "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ","maxLength"==r?s+="longer":s+="shorter",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},6111:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxProperties"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" Object.keys("+h+").length "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ","maxProperties"==r?s+="more":s+="fewer",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},7578:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,p=l.baseId,h=!0;if(o)for(var d,f=-1,m=o.length-1;f<m;)d=o[f+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,l.schema=d,l.schemaPath=s+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=p,n&&(a+=" if ("+u+") { ",c+="}"));return n&&(h?a+=" if (true) { ":a+=" "+c.slice(0,-1)+" "),a}},4547:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level;if(i.every(function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)})){var m=h.baseId;a+=" var "+p+" = errors; var "+u+" = false; ";var v=e.compositeRule;if(e.compositeRule=h.compositeRule=!0,i)for(var g=-1,y=i.length-1;g<y;)h.schema=i[g+=1],h.schemaPath=n+"["+g+"]",h.errSchemaPath=l+"/"+g,a+=" "+e.validate(h)+" ",h.baseId=m,a+=" "+u+" = "+u+" || "+f+"; if (!"+u+") { ",d+="}";e.compositeRule=h.compositeRule=v,a+=" "+d+" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a}},4413:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(s)+", validate.root.schema);"),a}},9087:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; "),h||(a+=" var schema"+o+" = validate.schema"+n+";"),a+="var "+p+" = equal("+u+", schema"+o+"); if (!"+p+") { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var f=a;return a=d.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+f+"]); ":a+=" validate.errors = ["+f+"]; return false; ":a+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a}},4235:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level,f="i"+o,m=h.dataLevel=e.dataLevel+1,v="data"+m,g=e.baseId,y=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+p+" = errors;var valid"+o+";",y){var E=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+d+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var b=u+"["+f+"]";h.dataPathArr[m]=f;var _=e.validate(h);h.baseId=g,2>e.util.varOccurences(_,v)?a+=" "+e.util.varReplace(_,v,b)+" ":a+=" var "+v+" = "+b+"; "+_+" ",a+=" if ("+d+") break; } ",e.compositeRule=h.compositeRule=E,a+=" if (!"+d+") {"}else a+=" if ("+u+".length == 0) {";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var P=a;return a=w.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",y&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}},1021:function(e){"use strict";e.exports=function(e,r,t){var a,o,s,i,n,l,c,u=" ",p=e.level,h=e.dataLevel,d=e.schema[r],f=e.schemaPath+e.util.getProperty(r),m=e.errSchemaPath+"/"+r,v=!e.opts.allErrors,g="data"+(h||""),y="valid"+p,E="errs__"+p,b=e.opts.$data&&d&&d.$data;b?(u+=" var schema"+p+" = "+e.util.getData(d.$data,h,e.dataPathArr)+"; ",c="schema"+p):c=d;var _="definition"+p,w=this.definition,P="";if(b&&w.$data){n="keywordValidate"+p;var S=w.validateSchema;u+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+n+" = "+_+".validate;"}else{if(!(i=e.useCustomRule(this,d,e.schema,e)))return;c="validate.schema"+f,n=i.code,a=w.compile,o=w.inline,s=w.macro}var z=n+".errors",x="i"+p,$="ruleErr"+p,R=w.async;if(R&&!e.async)throw Error("async keyword in sync schema");if(o||s||(u+=""+z+" = null;"),u+="var "+E+" = errors;var "+y+";",b&&w.$data&&(P+="}",u+=" if ("+c+" === undefined) { "+y+" = true; } else { ",S&&(P+="}",u+=" "+y+" = "+_+".validateSchema("+c+"); if ("+y+") { ")),o)w.statements?u+=" "+i.validate+" ":u+=" "+y+" = "+i.validate+"; ";else if(s){var j=e.util.copy(e),P="";j.level++;var I="valid"+j.level;j.schema=i.validate,j.schemaPath="";var O=e.compositeRule;e.compositeRule=j.compositeRule=!0;var A=e.validate(j).replace(/validate\.schema/g,n);e.compositeRule=j.compositeRule=O,u+=" "+A}else{var T=T||[];T.push(u),u=" "+n+".call( ",e.opts.passContext?u+="this":u+="self",a||!1===w.schema?u+=" , "+g+" ":u+=" , "+c+" , "+g+" , validate.schema"+e.schemaPath+" ",u+=" , (dataPath || '')",'""'!=e.errorPath&&(u+=" + "+e.errorPath);var D=h?"data"+(h-1||""):"parentData",k=h?e.dataPathArr[h]:"parentDataProperty",C=u+=" , "+D+" , "+k+" , rootData ) ";u=T.pop(),!1===w.errors?(u+=" "+y+" = ",R&&(u+="await "),u+=""+C+"; "):R?u+=" var "+(z="customErrors"+p)+" = null; try { "+y+" = await "+C+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+z+" = e.errors; else throw e; } ":u+=" "+z+" = null; "+y+" = "+C+"; "}if(w.modifying&&(u+=" if ("+D+") "+g+" = "+D+"["+k+"];"),u+=""+P,w.valid)v&&(u+=" if (true) { ");else{u+=" if ( ",void 0===w.valid?(u+=" !",s?u+=""+I:u+=""+y):u+=" "+!w.valid+" ",u+=") { ",l=this.keyword;var T=T||[];T.push(u),u="";var T=T||[];T.push(u),u="",!1!==e.createErrors?(u+=" { keyword: '"+(l||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(m)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(u+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(u+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),u+=" } "):u+=" {} ";var N=u;u=T.pop(),!e.compositeRule&&v?e.async?u+=" throw new ValidationError(["+N+"]); ":u+=" validate.errors = ["+N+"]; return false; ":u+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var F=u;u=T.pop(),o?w.errors?"full"!=w.errors&&(u+=" for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+m+'"; } ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } "):!1===w.errors?u+=" "+F+" ":(u+=" if ("+E+" == errors) { "+F+" } else { for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+m+'"; } ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } } "):s?(u+=" var err = ",!1!==e.createErrors?(u+=" { keyword: '"+(l||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(m)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(u+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(u+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),u+=" } "):u+=" {} ",u+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&v&&(e.async?u+=" throw new ValidationError(vErrors); ":u+=" validate.errors = vErrors; return false; ")):!1===w.errors?u+=" "+F+" ":(u+=" if (Array.isArray("+z+")) { if (vErrors === null) vErrors = "+z+"; else vErrors = vErrors.concat("+z+"); errors = vErrors.length; for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; "+$+'.schemaPath = "'+m+'"; ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } } else { "+F+" } "),u+=" } ",v&&(u+=" else { ")}return u}},83:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m={},v={},g=e.opts.ownProperties;for(_ in i)if("__proto__"!=_){var y=i[_],E=Array.isArray(y)?v:m;E[_]=y}a+="var "+p+" = errors;";var b=e.errorPath;for(var _ in a+="var missing"+o+";",v)if((E=v[_]).length){if(a+=" if ( "+u+e.util.getProperty(_)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),c){a+=" && ( ";var w=E;if(w)for(var P,S=-1,z=w.length-1;S<z;){P=w[S+=1],S&&(a+=" || ");var x=e.util.getProperty(P),$=u+x;a+=" ( ( "+$+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:x)+") ) "}a+=")) { ";var R="missing"+o,j="' + "+R+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,R,!0):b+" + "+R);var I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(_)+"', missingProperty: '"+j+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==E.length?a+="property "+e.util.escapeQuotes(E[0]):a+="properties "+e.util.escapeQuotes(E.join(", ")),a+=" when property "+e.util.escapeQuotes(_)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;a=I.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++; "}else{a+=" ) { ";var A=E;if(A)for(var P,T=-1,D=A.length-1;T<D;){P=A[T+=1];var x=e.util.getProperty(P),j=e.util.escapeQuotes(P),$=u+x;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,P,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(_)+"', missingProperty: '"+j+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==E.length?a+="property "+e.util.escapeQuotes(E[0]):a+="properties "+e.util.escapeQuotes(E.join(", ")),a+=" when property "+e.util.escapeQuotes(_)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(d+="}",a+=" else { ")}e.errorPath=b;var k=h.baseId;for(var _ in m){var y=m[_];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+f+" = true; if ( "+u+e.util.getProperty(_)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),a+=") { ",h.schema=y,h.schemaPath=n+e.util.getProperty(_),h.errSchemaPath=l+"/"+e.util.escapeFragment(_),a+=" "+e.validate(h)+" ",h.baseId=k,a+=" } ",c&&(a+=" if ("+f+") { ",d+="}"))}return c&&(a+=" "+d+" if ("+p+" == errors) {"),a}},8307:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var d="i"+o,f="schema"+o;h||(a+=" var "+f+" = validate.schema"+n+";"),a+="var "+p+";",h&&(a+=" if (schema"+o+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+o+")) "+p+" = false; else {"),a+=""+p+" = false;for (var "+d+"=0; "+d+"<"+f+".length; "+d+"++) if (equal("+u+", "+f+"["+d+"])) { "+p+" = true; break; }",h&&(a+=" } "),a+=" if (!"+p+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),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}},5545:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var p,h=e.opts.$data&&i&&i.$data;h?(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ",p="schema"+o):p=i;var d=e.opts.unknownFormats,f=Array.isArray(d);if(h){var m="format"+o,v="isObject"+o,g="formatType"+o;a+=" var "+m+" = formats["+p+"]; var "+v+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+g+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+m+".async; "),a+=" "+m+" = "+m+".validate; } if ( ",h&&(a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),a+=" (","ignore"!=d&&(a+=" ("+p+" && !"+m+" ",f&&(a+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),a+=") || "),a+=" ("+m+" && "+g+" == '"+t+"' && !(typeof "+m+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+m+"("+u+") : "+m+"("+u+")) ":a+=" "+m+"("+u+") ",a+=" : "+m+".test("+u+"))))) {"}else{var m=e.formats[i];if(!m)if("ignore"==d)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;else if(f&&d.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;else throw Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"');var v="object"==typeof m&&!(m instanceof RegExp)&&m.validate,g=v&&m.type||"string";if(v){var y=!0===m.async;m=m.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw Error("async format in sync schema");var E="formats"+e.util.getProperty(i)+".validate";a+=" if (!(await "+E+"("+u+"))) { "}else{a+=" if (! ";var E="formats"+e.util.getProperty(i);v&&(E+=".validate"),"function"==typeof m?a+=" "+E+"("+u+") ":a+=" "+E+".test("+u+") ",a+=") { "}}var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",h?a+=""+p:a+=""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",h?a+="' + "+p+" + '":a+=""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",h?a+="validate.schema"+n:a+=""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var _=a;return a=b.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++; ",a+=" } ",c&&(a+=" else { "),a}},2917:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level,f=e.schema.then,m=e.schema.else,v=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),g=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=h.baseId;if(v||g){h.createErrors=!1,h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+u+" = true; ";var E,b=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=y,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=b,v?(a+=" if ("+d+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=y,a+=" "+u+" = "+d+"; ",v&&g?a+=" var "+(E="ifClause"+o)+" = 'then'; ":E="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+d+") { ",g&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=y,a+=" "+u+" = "+d+"; ",v&&g?a+=" var "+(E="ifClause"+o)+" = 'else'; ":E="'else'",a+=" } "),a+=" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+E+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+E+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 { ")}else c&&(a+=" if (true) { ");return a}},2004:function(e,r,t){"use strict";e.exports={$ref:t(2857),allOf:t(7578),anyOf:t(4547),$comment:t(4413),const:t(9087),contains:t(4235),dependencies:t(83),enum:t(8307),format:t(5545),if:t(2917),items:t(3728),maximum:t(1346),minimum:t(1346),maxItems:t(536),minItems:t(536),maxLength:t(3010),minLength:t(3010),maxProperties:t(6111),minProperties:t(6111),multipleOf:t(8047),not:t(3441),oneOf:t(6137),pattern:t(6774),properties:t(6343),propertyNames:t(9931),required:t(1939),uniqueItems:t(7817),validate:t(5572)}},3728:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h="errs__"+o,d=e.util.copy(e),f="";d.level++;var m="valid"+d.level,v="i"+o,g=d.dataLevel=e.dataLevel+1,y="data"+g,E=e.baseId;if(a+="var "+h+" = errors;var "+p+";",Array.isArray(i)){var b=e.schema.additionalItems;if(!1===b){a+=" "+p+" = "+u+".length <= "+i.length+"; ";var _=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+p+") { ";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var P=a;a=w.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=_,c&&(f+="}",a+=" else { ")}if(i){for(var S,z=-1,x=i.length-1;z<x;)if(S=i[z+=1],e.opts.strictKeywords?"object"==typeof S&&Object.keys(S).length>0||!1===S:e.util.schemaHasRules(S,e.RULES.all)){a+=" "+m+" = true; if ("+u+".length > "+z+") { ";var $=u+"["+z+"]";d.schema=S,d.schemaPath=n+"["+z+"]",d.errSchemaPath=l+"/"+z,d.errorPath=e.util.getPathExpr(e.errorPath,z,e.opts.jsonPointers,!0),d.dataPathArr[g]=z;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",a+=" } ",c&&(a+=" if ("+m+") { ",f+="}")}}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))){d.schema=b,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";d.dataPathArr[g]=v;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",f+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";d.dataPathArr[g]=v;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",c&&(a+=" if (!"+m+") break; "),a+=" }"}return c&&(a+=" "+f+" if ("+h+" == errors) {"),a}},8047:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h=e.opts.$data&&n&&n.$data;if(h?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,!(h||"number"==typeof n))throw Error(r+" must be number");o+="var division"+s+";if (",h&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+s+" = "+p+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+s+" !== parseInt(division"+s+") ",o+=" ) ",h&&(o+=" ) "),o+=" ) { ";var d=d||[];d.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 ",h?o+="' + "+a:o+=""+a+"'"),e.opts.verbose&&(o+=" , schema: ",h?o+="validate.schema"+l:o+=""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var f=o;return o=d.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o}},3441:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+p+" = errors; ";var f,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(f=h.opts.allErrors,h.opts.allErrors=!1),a+=" "+e.validate(h)+" ",h.createErrors=!0,f&&(h.opts.allErrors=f),e.compositeRule=h.compositeRule=m,a+=" if ("+d+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; 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(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a}},6137:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m=h.baseId,v="prevValid"+o,g="passingSchemas"+o;a+="var "+p+" = errors , "+v+" = false , "+u+" = false , "+g+" = null; ";var y=e.compositeRule;if(e.compositeRule=h.compositeRule=!0,i)for(var E,b=-1,_=i.length-1;b<_;)E=i[b+=1],(e.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(h.schema=E,h.schemaPath=n+"["+b+"]",h.errSchemaPath=l+"/"+b,a+=" "+e.validate(h)+" ",h.baseId=m):a+=" var "+f+" = true; ",b&&(a+=" if ("+f+" && "+v+") { "+u+" = false; "+g+" = ["+g+", "+b+"]; } else { ",d+="}"),a+=" if ("+f+") { "+u+" = "+v+" = true; "+g+" = "+b+"; }";return e.compositeRule=h.compositeRule=y,a+=""+d+"if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},6774:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h=e.opts.$data&&n&&n.$data;h?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var d=h?"(new RegExp("+a+"))":e.usePattern(n);o+="if ( ",h&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+d+".test("+p+") ) { ";var f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",h?o+=""+a:o+=""+e.util.toQuotedString(n),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",h?o+="' + "+a+" + '":o+=""+e.util.escapeQuotes(n),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",h?o+="validate.schema"+l:o+=""+e.util.toQuotedString(n),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var m=o;return o=f.pop(),!e.compositeRule&&u?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+="} ",u&&(o+=" else { "),o}},6343:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m="key"+o,v="idx"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,E="dataProperties"+o,b=Object.keys(i||{}).filter(A),_=e.schema.patternProperties||{},w=Object.keys(_).filter(A),P=e.schema.additionalProperties,S=b.length||w.length,z=!1===P,x="object"==typeof P&&Object.keys(P).length,$=e.opts.removeAdditional,R=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&!(e.opts.$data&&I.$data)&&I.length<e.opts.loopRequired)var O=e.util.toHash(I);function A(e){return"__proto__"!==e}if(a+="var "+p+" = errors;var "+f+" = true;",R&&(a+=" var "+E+" = undefined;"),z||x||$){if(R?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":a+=" for (var "+m+" in "+u+") { ",S){if(a+=" var isAdditional"+o+" = !(false ",b.length){if(b.length>8)a+=" || validate.schema"+n+".hasOwnProperty("+m+") ";else if(b)for(var T,D=-1,k=b.length-1;D<k;)T=b[D+=1],a+=" || "+m+" == "+e.util.toQuotedString(T)+" "}if(w.length&&w)for(var C,N=-1,F=w.length-1;N<F;)C=w[N+=1],a+=" || "+e.usePattern(C)+".test("+m+") ";a+=" ); if (isAdditional"+o+") { "}if("all"==$)a+=" delete "+u+"["+m+"]; ";else{var L=e.errorPath,q="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),z)if($)a+=" delete "+u+"["+m+"]; ";else{a+=" "+f+" = false; ";var U=l;l=e.errSchemaPath+"/additionalProperties";var V=V||[];V.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!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: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=V.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,c&&(a+=" break; ")}else if(x)if("failing"==$){a+=" var "+p+" = errors; ";var H=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=P,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",a+=" if (!"+f+") { errors = "+p+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+m+"]; } ",e.compositeRule=h.compositeRule=H}else{h.schema=P,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",c&&(a+=" if (!"+f+") break; ")}e.errorPath=L}S&&(a+=" } "),a+=" } ",c&&(a+=" if ("+f+") { ",d+="}")}var Q=e.opts.useDefaults&&!e.compositeRule;if(b.length&&b)for(var T,G=-1,J=b.length-1;G<J;){var W=i[T=b[G+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all)){var X=e.util.getProperty(T),K=u+X,Y=Q&&void 0!==W.default;h.schema=W,h.schemaPath=n+X,h.errSchemaPath=l+"/"+e.util.escapeFragment(T),h.errorPath=e.util.getPath(e.errorPath,T,e.opts.jsonPointers),h.dataPathArr[g]=e.util.toQuotedString(T);var B=e.validate(h);if(h.baseId=j,2>e.util.varOccurences(B,y)){B=e.util.varReplace(B,y,K);var Z=K}else{var Z=y;a+=" var "+y+" = "+K+"; "}if(Y)a+=" "+B+" ";else{if(O&&O[T]){a+=" if ( "+Z+" === undefined ",R&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=") { "+f+" = false; ";var L=e.errorPath,U=l,ee=e.util.escapeQuotes(T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(L,T,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";var V=V||[];V.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ee+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ee+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=V.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,e.errorPath=L,a+=" } else { "}else c?(a+=" if ( "+Z+" === undefined ",R&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=") { "+f+" = true; } else { "):(a+=" if ("+Z+" !== undefined ",R&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=" ) { ");a+=" "+B+" } "}}c&&(a+=" if ("+f+") { ",d+="}")}if(w.length&&w)for(var C,er=-1,et=w.length-1;er<et;){var W=_[C=w[er+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all)){h.schema=W,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(C),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(C),R?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":a+=" for (var "+m+" in "+u+") { ",a+=" if ("+e.usePattern(C)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",c&&(a+=" if (!"+f+") break; "),a+=" } ",c&&(a+=" else "+f+" = true; "),a+=" } ",c&&(a+=" if ("+f+") { ",d+="}")}}return c&&(a+=" "+d+" if ("+p+" == errors) {"),a}},9931:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(a+="var "+p+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=n,h.errSchemaPath=l;var f="key"+o,m="idx"+o,v="i"+o,g="' + "+f+" + '",y="data"+(h.dataLevel=e.dataLevel+1),E="dataProperties"+o,b=e.opts.ownProperties,_=e.baseId;b&&(a+=" var "+E+" = undefined; "),b?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+E+".length; "+m+"++) { var "+f+" = "+E+"["+m+"]; ":a+=" for (var "+f+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=e.validate(h);h.baseId=_,2>e.util.varOccurences(P,y)?a+=" "+e.util.varReplace(P,y,f)+" ":a+=" var "+y+" = "+f+"; "+P+" ",e.compositeRule=h.compositeRule=w,a+=" if (!"+d+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+f+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),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 ("+p+" == errors) {"),a}},2857:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(n||""),h="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var d=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===d){var f=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(f);var m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ";var v=s;s=m.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else if("ignore"==e.opts.missingRefs)e.logger.warn(f),u&&(s+=" if (true) { ");else throw new e.MissingRefError(e.baseId,l,f)}else if(d.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=d.schema,g.schemaPath="",g.errSchemaPath=l,s+=" "+e.validate(g).replace(/validate\.schema/g,d.code)+" ",u&&(s+=" if ("+y+") { ")}else a=!0===d.$async||e.async&&!1!==d.$async,o=d.code}if(o){var m=m||[];m.push(s),s="",e.opts.passContext?s+=" "+o+".call(this, ":s+=" "+o+"( ",s+=" "+p+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var E=n?e.dataPathArr[n]:"parentDataProperty",b=s+=" , "+(n?"data"+(n-1||""):"parentData")+" , "+E+", rootData) ";if(s=m.pop(),a){if(!e.async)throw Error("async schema referenced by sync schema");u&&(s+=" var "+h+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+h+" = 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; ",u&&(s+=" "+h+" = false; "),s+=" } ",u&&(s+=" if ("+h+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s}},1939:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var d="schema"+o;if(!h)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var f=[];if(i)for(var m,v=-1,g=i.length-1;v<g;){m=i[v+=1];var y=e.schema.properties[m];y&&(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))||(f[f.length]=m)}}else var f=i;if(h||f.length){var E=e.errorPath,b=h||f.length>=e.opts.loopRequired,_=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",b){h||(a+=" var "+d+" = validate.schema"+n+"; ");var w="i"+o,P="schema"+o+"["+w+"]",S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,P,e.opts.jsonPointers)),a+=" var "+p+" = true; ",h&&(a+=" if (schema"+o+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+o+")) "+p+" = false; else {"),a+=" for (var "+w+" = 0; "+w+" < "+d+".length; "+w+"++) { "+p+" = "+u+"["+d+"["+w+"]] !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+d+"["+w+"]) "),a+="; if (!"+p+") break; } ",h&&(a+=" } "),a+=" if (!"+p+") { ";var z=z||[];z.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=z.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var $=f;if($)for(var R,w=-1,j=$.length-1;w<j;){R=$[w+=1],w&&(a+=" || ");var I=e.util.getProperty(R),O=u+I;a+=" ( ( "+O+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(R)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?R:I)+") ) "}a+=") { ";var P="missing"+o,S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,P,!0):E+" + "+P);var z=z||[];z.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=z.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(b){h||(a+=" var "+d+" = validate.schema"+n+"; ");var w="i"+o,P="schema"+o+"["+w+"]",S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,P,e.opts.jsonPointers)),h&&(a+=" if ("+d+" && !Array.isArray("+d+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+d+" !== undefined) { "),a+=" for (var "+w+" = 0; "+w+" < "+d+".length; "+w+"++) { if ("+u+"["+d+"["+w+"]] === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+d+"["+w+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(a+=" } ")}else{var A=f;if(A)for(var R,T=-1,D=A.length-1;T<D;){R=A[T+=1];var I=e.util.getProperty(R),S=e.util.escapeQuotes(R),O=u+I;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,R,e.opts.jsonPointers)),a+=" if ( "+O+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(R)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else c&&(a+=" if (true) {");return a}},7817:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h="valid"+s,d=e.opts.$data&&n&&n.$data;if(d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,(n||d)&&!1!==e.opts.uniqueItems){d&&(o+=" var "+h+"; if ("+a+" === false || "+a+" === undefined) "+h+" = true; else if (typeof "+a+" != 'boolean') "+h+" = false; else { "),o+=" var i = "+p+".length , "+h+" = true , j; if (i > 1) { ";var f=e.schema.items&&e.schema.items.type,m=Array.isArray(f);!f||"object"==f||"array"==f||m&&(f.indexOf("object")>=0||f.indexOf("array")>=0)?o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+h+" = false; break outer; } } } ":(o+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",o+=" if ("+e.util["checkDataType"+(m?"s":"")](f,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),o+=" } ",d&&(o+=" } "),o+=" if (!"+h+") { ";var v=v||[];v.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: ",d?o+="validate.schema"+l:o+=""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var g=o;o=v.pop(),!e.compositeRule&&u?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+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o}},5572:function(e){"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"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var n=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"===e.opts.strictKeywords)e.logger.warn(l);else throw Error(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!(s||e.schema.$ref)){var c,r="false schema",u=e.level,p=e.dataLevel,h=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,v="data"+(p||""),g="valid"+u;if(!1===e.schema){e.isTop?m=!0:a+=" var "+g+" = false; ";var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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++; "}else e.isTop?o?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+g+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var b=e.isTop,u=e.level=0,p=e.dataLevel=0,v="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!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var _="default is ignored in the schema root";if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var u=e.level,p=e.dataLevel,v="data"+(p||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}var g="valid"+u,m=!e.opts.allErrors,w="",P="",S=e.schema.type,z=Array.isArray(S);if(S&&e.opts.nullable&&!0===e.schema.nullable&&(z?-1==S.indexOf("null")&&(S=S.concat("null")):"null"!=S&&(S=[S,"null"],z=!0)),z&&1==S.length&&(S=S[0],z=!1),e.schema.$ref&&s)if("fail"==e.opts.extendRefs)throw Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');else!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")),S){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,S);var $=e.RULES.types[S];if(x||z||!0===$||$&&!Z($)){var d=e.schemaPath+".type",f=e.errSchemaPath+"/type",d=e.schemaPath+".type",f=e.errSchemaPath+"/type",R=z?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[R](S,v,e.opts.strictNumbers,!0)+") { ",x){var j="dataType"+u,I="coerced"+u;a+=" var "+j+" = typeof "+v+"; var "+I+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+j+" == 'object' && Array.isArray("+v+") && "+v+".length == 1) { "+v+" = "+v+"[0]; "+j+" = typeof "+v+"; if ("+e.util.checkDataType(e.schema.type,v,e.opts.strictNumbers)+") "+I+" = "+v+"; } "),a+=" if ("+I+" !== undefined) ; ";var O=x;if(O)for(var c,A,T=-1,D=O.length-1;T<D;)"string"==(A=O[T+=1])?a+=" else if ("+j+" == 'number' || "+j+" == 'boolean') "+I+" = '' + "+v+"; else if ("+v+" === null) "+I+" = ''; ":"number"==A||"integer"==A?(a+=" else if ("+j+" == 'boolean' || "+v+" === null || ("+j+" == 'string' && "+v+" && "+v+" == +"+v+" ","integer"==A&&(a+=" && !("+v+" % 1)"),a+=")) "+I+" = +"+v+"; "):"boolean"==A?a+=" else if ("+v+" === 'false' || "+v+" === 0 || "+v+" === null) "+I+" = false; else if ("+v+" === 'true' || "+v+" === 1) "+I+" = true; ":"null"==A?a+=" else if ("+v+" === '' || "+v+" === 0 || "+v+" === false) "+I+" = null; ":"array"==e.opts.coerceTypes&&"array"==A&&(a+=" else if ("+j+" == 'string' || "+j+" == 'number' || "+j+" == 'boolean' || "+v+" == null) "+I+" = ["+v+"]; ");a+=" else { ";var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } if ("+I+" !== undefined) { ";var k=p?"data"+(p-1||""):"parentData",C=p?e.dataPathArr[p]:"parentDataProperty";a+=" "+v+" = "+I+"; ",p||(a+="if ("+k+" !== undefined)"),a+=" "+k+"["+C+"] = "+I+"; } "}else{var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } "}}if(e.schema.$ref&&!s)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",b?a+="0":a+="errs_"+u,a+=") { ",P+="}");else{var N=e.RULES;if(N){for(var $,F=-1,L=N.length-1;F<L;)if(Z($=N[F+=1])){if($.type&&(a+=" if ("+e.util.checkDataType($.type,v,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if("object"==$.type&&e.schema.properties){var h=e.schema.properties,q=Object.keys(h);if(q)for(var U,V=-1,M=q.length-1;V<M;){var H=h[U=q[V+=1]];if(void 0!==H.default){var K=v+e.util.getProperty(U);if(e.compositeRule){if(e.opts.strictDefaults){var _="default is ignored for: "+K;if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}}else a+=" if ("+K+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+K+" === null || "+K+" === '' "),a+=" ) "+K+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}else if("array"==$.type&&Array.isArray(e.schema.items)){var B=e.schema.items;if(B){for(var H,T=-1,Q=B.length-1;T<Q;)if(void 0!==(H=B[T+=1]).default){var K=v+"["+T+"]";if(e.compositeRule){if(e.opts.strictDefaults){var _="default is ignored for: "+K;if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}}else a+=" if ("+K+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+K+" === null || "+K+" === '' "),a+=" ) "+K+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}}var G=$.rules;if(G){for(var J,W=-1,X=G.length-1;W<X;)if(ee(J=G[W+=1])){var Y=J.code(e,J.keyword,$.type);Y&&(a+=" "+Y+" ",m&&(w+="}"))}}if(m&&(a+=" "+w+" ",w=""),$.type&&(a+=" } ",S&&S===$.type&&!x)){a+=" else { ";var d=e.schemaPath+".type",f=e.errSchemaPath+"/type",y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } "}m&&(a+=" if (errors === ",b?a+="0":a+="errs_"+u,a+=") { ",P+="}")}}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(ee(r[t]))return!0}function ee(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 m&&(a+=" "+P+" "),b?(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 "+g+" = errors === errs_"+u+";",a}},3528:function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,o=t(1021),s=t(6150);function i(e,r){i.errors=null;var t=this._validateKeyword=this._validateKeyword||this.compile(s,!0);if(t(e))return!0;if(i.errors=t.errors,!r)return!1;throw Error("custom keyword definition is invalid: "+this.errorsText(t.errors))}e.exports={add:function(e,r){var t=this.RULES;if(t.keywords[e])throw Error("Keyword "+e+" is already defined");if(!a.test(e))throw Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var s=r.type;if(Array.isArray(s))for(var i=0;i<s.length;i++)l(e,s[i],r);else l(e,s,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function l(e,r,a){for(var s,i=0;i<t.length;i++){var n=t[i];if(n.type==r){s=n;break}}s||(s={type:r,rules:[]},t.push(s));var l={keyword:e,definition:a,custom:!0,code:o,implements:a.implements};s.rules.push(l),t.custom[e]=l}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:i}},9454:function(e,r,t){"use strict";var a=t(181).Buffer,o=t(181).SlowBuffer;function s(e,r){if(!a.isBuffer(e)||!a.isBuffer(r)||e.length!==r.length)return!1;for(var t=0,o=0;o<e.length;o++)t|=e[o]^r[o];return 0===t}e.exports=s,s.install=function(){a.prototype.equal=o.prototype.equal=function(e){return s(this,e)}};var i=a.prototype.equal,n=o.prototype.equal;s.restore=function(){a.prototype.equal=i,o.prototype.equal=n}},8583:function(e,r,t){let a=t(9896),o=t(6928),s=t(857),i=t(6982),n=t(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function c(e){console.log(`[dotenv@${n}][DEBUG] ${e}`)}function u(e){console.log(`[dotenv@${n}] ${e}`)}function p(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function h(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)a.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=o.resolve(process.cwd(),".env.vault");return a.existsSync(r)?r:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}let f={configDotenv:function(e){let r,t=o.resolve(process.cwd(),".env"),s="utf8",i=!!(e&&e.debug),n=!e||!("quiet"in e)||e.quiet;e&&e.encoding?s=e.encoding:i&&c("No encoding is specified. UTF-8 is used by default");let l=[t];if(e&&e.path)if(Array.isArray(e.path))for(let r of(l=[],e.path))l.push(d(r));else l=[d(e.path)];let p={};for(let t of l)try{let r=f.parse(a.readFileSync(t,{encoding:s}));f.populate(p,r,e)}catch(e){i&&c(`Failed to load ${t} ${e.message}`),r=e}let h=process.env;if(e&&null!=e.processEnv&&(h=e.processEnv),f.populate(h,p,e),i||!n){let e=Object.keys(p).length,t=[];for(let e of l)try{let r=o.relative(process.cwd(),e);t.push(r)}catch(t){i&&c(`Failed to load ${e} ${t.message}`),r=t}u(`injecting env (${e}) from ${t.join(",")}`)}return r?{parsed:p,error:r}:{parsed:p}},_configVault:function(e){let r=!!(e&&e.debug),t=!e||!("quiet"in e)||e.quiet;(r||!t)&&u("Loading env from encrypted .env.vault");let a=f._parseVault(e),o=process.env;return e&&null!=e.processEnv&&(o=e.processEnv),f.populate(o,a,e),{parsed:a}},_parseVault:function(e){let r,t=h(e=e||{});e.path=t;let a=f.configDotenv(e);if(!a.parsed){let e=Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}let o=p(e).split(","),s=o.length;for(let e=0;e<s;e++)try{let t=o[e].trim(),s=function(e,r){let t;try{t=new URL(r)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let a=t.password;if(!a){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let o=t.searchParams.get("environment");if(!o){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:a}}(a,t);r=f.decrypt(s.ciphertext,s.key);break}catch(r){if(e+1>=s)throw r}return f.parse(r)},config:function(e){if(0===p(e).length)return f.configDotenv(e);let r=h(e);if(!r){var t;return t=`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`,console.log(`[dotenv@${n}][WARN] ${t}`),f.configDotenv(e)}return f._configVault(e)},decrypt:function(e,r){let t=Buffer.from(r.slice(-64),"hex"),a=Buffer.from(e,"base64"),o=a.subarray(0,12),s=a.subarray(-16);a=a.subarray(12,-16);try{let e=i.createDecipheriv("aes-256-gcm",t,o);return e.setAuthTag(s),`${e.update(a)}${e.final()}`}catch(a){let e=a instanceof RangeError,r="Invalid key length"===a.message,t="Unsupported state or unable to authenticate data"===a.message;if(e||r){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(t){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw a}},parse:function(e){let r,t={},a=e.toString();for(a=a.replace(/\r\n?/mg,"\n");null!=(r=l.exec(a));){let e=r[1],a=r[2]||"",o=(a=a.trim())[0];a=a.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===o&&(a=(a=a.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),t[e]=a}return t},populate:function(e,r,t={}){let a=!!(t&&t.debug),o=!!(t&&t.override);if("object"!=typeof r){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let t of Object.keys(r))Object.prototype.hasOwnProperty.call(e,t)?(!0===o&&(e[t]=r[t]),a&&(!0===o?c(`"${t}" is already defined and WAS overwritten`):c(`"${t}" is already defined and was NOT overwritten`))):e[t]=r[t]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f},9053:function(e,r,t){"use strict";var a=t(6608).Buffer,o=t(2188);function s(e){if(a.isBuffer(e))return e;if("string"==typeof e)return a.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function i(e,r,t){for(var a=0;r+a<t&&0===e[r+a];)++a;return e[r+a]>=128&&--a,a}e.exports={derToJose:function(e,r){e=s(e);var t=o(r),i=t+1,n=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var c=e[l++];if(129===c&&(c=e[l++]),n-l<c)throw Error('"seq" specified length of "'+c+'", only "'+(n-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var u=e[l++];if(n-l-2<u)throw Error('"r" specified length of "'+u+'", only "'+(n-l-2)+'" available');if(i<u)throw Error('"r" specified length of "'+u+'", max of "'+i+'" is acceptable');var p=l;if(l+=u,2!==e[l++])throw Error('Could not find expected "int" for "s"');var h=e[l++];if(n-l!==h)throw Error('"s" specified length of "'+h+'", expected "'+(n-l)+'"');if(i<h)throw Error('"s" specified length of "'+h+'", max of "'+i+'" is acceptable');var d=l;if((l+=h)!==n)throw Error('Expected to consume entire buffer, but "'+(n-l)+'" bytes remain');var f=t-u,m=t-h,v=a.allocUnsafe(f+u+m+h);for(l=0;l<f;++l)v[l]=0;e.copy(v,l,p+Math.max(-f,0),p+u),l=t;for(var g=l;l<g+m;++l)v[l]=0;return e.copy(v,l,d+Math.max(-m,0),d+h),v=(v=v.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,r){e=s(e);var t=o(r),n=e.length;if(n!==2*t)throw TypeError('"'+r+'" signatures must be "'+2*t+'" bytes, saw "'+n+'"');var l=i(e,0,t),c=i(e,t,e.length),u=t-l,p=t-c,h=2+u+1+1+p,d=h<128,f=a.allocUnsafe((d?2:3)+h),m=0;return f[m++]=48,d?f[m++]=h:(f[m++]=129,f[m++]=255&h),f[m++]=2,f[m++]=u,l<0?(f[m++]=0,m+=e.copy(f,m,0,t)):m+=e.copy(f,m,l,t),f[m++]=2,f[m++]=p,c<0?(f[m++]=0,e.copy(f,m,t)):e.copy(f,m,t+c),f}}},2188:function(e){"use strict";function r(e){return(e/8|0)+ +(e%8!=0)}var t={ES256:r(256),ES384:r(384),ES512:r(521)};e.exports=function(e){var r=t[e];if(r)return r;throw Error('Unknown algorithm "'+e+'"')}},7371:function(e){"use strict";e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((a=(s=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!=o--;){var a,o,s,i=s[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}},6039:function(e){"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){return t({key:r,value:e[r]},{key:a,value:e[a]})}}),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);if(Array.isArray(r)){for(t=0,i="[";t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==s.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw TypeError("Converting circular structure to JSON")}var t,i,n=s.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(t=0,i="";t<l.length;t++){var c=l[t],u=e(r[c]);u&&(i&&(i+=","),i+=JSON.stringify(c)+":"+u)}return s.splice(n,1),"{"+i+"}"}}(e)}},7713:function(e){"use strict";var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={});var o="function"==typeof(a=t.cb||a)?a:a.pre||function(){};!function e(t,a,o,s,i,n,l,c,u,p){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var h in a(s,i,n,l,c,u,p),s){var d=s[h];if(Array.isArray(d)){if(h in r.arrayKeywords)for(var f=0;f<d.length;f++)e(t,a,o,d[f],i+"/"+h+"/"+f,n,i,h,s,f)}else if(h in r.propsKeywords){if(d&&"object"==typeof d)for(var m in d)e(t,a,o,d[m],i+"/"+h+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),n,i,h,s,m)}else(h in r.keywords||t.allKeys&&!(h in r.skipKeywords))&&e(t,a,o,d,i+"/"+h,n,i,h,s)}o(s,i,n,l,c,u,p)}}(t,o,a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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}},7661:function(e,r,t){var a=t(1525);e.exports=function(e,r){r=r||{};var t=a.decode(e,r);if(!t)return null;var o=t.payload;if("string"==typeof o)try{var s=JSON.parse(o);null!==s&&"object"==typeof s&&(o=s)}catch(e){}return!0===r.complete?{header:t.header,payload:o,signature:t.signature}:o}},7619:function(e,r,t){e.exports={decode:t(7661),verify:t(7014),sign:t(3418),JsonWebTokenError:t(6430),NotBeforeError:t(9387),TokenExpiredError:t(7147)}},6430:function(e){var r=function(e,r){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,r&&(this.inner=r)};r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},9387:function(e,r,t){var a=t(6430),o=function(e,r){a.call(this,e),this.name="NotBeforeError",this.date=r};o.prototype=Object.create(a.prototype),o.prototype.constructor=o,e.exports=o},7147:function(e,r,t){var a=t(6430),o=function(e,r){a.call(this,e),this.name="TokenExpiredError",this.expiredAt=r};o.prototype=Object.create(a.prototype),o.prototype.constructor=o,e.exports=o},8050:function(e,r,t){e.exports=t(3895).satisfies(process.version,">=15.7.0")},5582:function(e,r,t){e.exports=t(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},5612:function(e,r,t){e.exports=t(3895).satisfies(process.version,">=16.9.0")},3742:function(e,r,t){var a=t(3866);e.exports=function(e,r){var t=r||Math.floor(Date.now()/1e3);if("string"==typeof e){var o=a(e);if(void 0===o)return;return Math.floor(t+o/1e3)}if("number"==typeof e)return t+e}},9572:function(e,r,t){let a=t(8050),o=t(5612),s={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},i={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,r){if(!e||!r)return;let t=r.asymmetricKeyType;if(!t)return;let n=s[t];if(!n)throw Error(`Unknown key type "${t}".`);if(!n.includes(e))throw Error(`"alg" parameter for "${t}" key type must be one of: ${n.join(", ")}.`);if(a)switch(t){case"ec":let l=r.asymmetricKeyDetails.namedCurve,c=i[e];if(l!==c)throw Error(`"alg" parameter "${e}" requires curve "${c}".`);break;case"rsa-pss":if(o){let t=parseInt(e.slice(-3),10),{hashAlgorithm:a,mgf1HashAlgorithm:o,saltLength:s}=r.asymmetricKeyDetails;if(a!==`sha${t}`||o!==a)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==s&&s>t>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},3418:function(e,r,t){let a=t(3742),o=t(5582),s=t(9572),i=t(1525),n=t(5357),l=t(6782),c=t(5250),u=t(8094),p=t(6052),h=t(1251),d=t(8430),{KeyObject:f,createSecretKey:m,createPrivateKey:v}=t(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];o&&g.splice(3,0,"PS256","PS384","PS512");let y={expiresIn:{isValid:function(e){return c(e)||h(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return c(e)||h(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return h(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:n.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:p,message:'"header" must be an object'},encoding:{isValid:h,message:'"encoding" must be a string'},issuer:{isValid:h,message:'"issuer" must be a string'},subject:{isValid:h,message:'"subject" must be a string'},jwtid:{isValid:h,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:h,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},E={iat:{isValid:u,message:'"iat" should be a number of seconds'},exp:{isValid:u,message:'"exp" should be a number of seconds'},nbf:{isValid:u,message:'"nbf" should be a number of seconds'}};function b(e,r,t,a){if(!p(t))throw Error('Expected "'+a+'" to be a plain object.');Object.keys(t).forEach(function(o){let s=e[o];if(!s){if(!r)throw Error('"'+o+'" is not allowed in "'+a+'"');return}if(!s.isValid(t[o]))throw Error(s.message)})}let _={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},w=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,r,t,o){var n,l;"function"==typeof t?(o=t,t={}):t=t||{};let c="object"==typeof e&&!Buffer.isBuffer(e),u=Object.assign({alg:t.algorithm||"HS256",typ:c?"JWT":void 0,kid:t.keyid},t.header);function p(e){if(o)return o(e);throw e}if(!r&&"none"!==t.algorithm)return p(Error("secretOrPrivateKey must have a value"));if(null!=r&&!(r instanceof f))try{r=v(r)}catch(e){try{r=m("string"==typeof r?Buffer.from(r):r)}catch(e){return p(Error("secretOrPrivateKey is not valid key material"))}}if(u.alg.startsWith("HS")&&"secret"!==r.type)return p(Error(`secretOrPrivateKey must be a symmetric key when using ${u.alg}`));if(/^(?:RS|PS|ES)/.test(u.alg)){if("private"!==r.type)return p(Error(`secretOrPrivateKey must be an asymmetric key when using ${u.alg}`));if(!t.allowInsecureKeySizes&&!u.alg.startsWith("ES")&&void 0!==r.asymmetricKeyDetails&&r.asymmetricKeyDetails.modulusLength<2048)return p(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`))}if(void 0===e)return p(Error("payload is required"));if(c){try{n=e,b(E,!0,n,"payload")}catch(e){return p(e)}t.mutatePayload||(e=Object.assign({},e))}else{let r=w.filter(function(e){return void 0!==t[e]});if(r.length>0)return p(Error("invalid "+r.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==t.expiresIn)return p(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==t.notBefore)return p(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=t,b(y,!1,l,"options")}catch(e){return p(e)}if(!t.allowInvalidAsymmetricKeyTypes)try{s(u.alg,r)}catch(e){return p(e)}let h=e.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp?delete e.iat:c&&(e.iat=h),void 0!==t.notBefore){try{e.nbf=a(t.notBefore,h)}catch(e){return p(e)}if(void 0===e.nbf)return p(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==t.expiresIn&&"object"==typeof e){try{e.exp=a(t.expiresIn,h)}catch(e){return p(e)}if(void 0===e.exp)return p(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(_).forEach(function(r){let a=_[r];if(void 0!==t[r]){if(void 0!==e[a])return p(Error('Bad "options.'+r+'" option. The payload already has an "'+a+'" property.'));e[a]=t[r]}});let g=t.encoding||"utf8";if("function"==typeof o)o=o&&d(o),i.createSign({header:u,privateKey:r,payload:e,encoding:g}).once("error",o).once("done",function(e){if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(u.alg)&&e.length<256)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`));o(null,e)});else{let a=i.sign({header:u,payload:e,secret:r,encoding:g});if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(u.alg)&&a.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`);return a}}},7014:function(e,r,t){let a=t(6430),o=t(9387),s=t(7147),i=t(7661),n=t(3742),l=t(9572),c=t(5582),u=t(1525),{KeyObject:p,createSecretKey:h,createPublicKey:d}=t(6982),f=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],v=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];c&&(f.splice(f.length,0,"PS256","PS384","PS512"),v.splice(v.length,0,"PS256","PS384","PS512")),e.exports=function(e,r,t,c){let y,E,b;if("function"!=typeof t||c||(c=t,t={}),t||(t={}),t=Object.assign({},t),y=c||function(e,r){if(e)throw e;return r},t.clockTimestamp&&"number"!=typeof t.clockTimestamp)return y(new a("clockTimestamp must be a number"));if(void 0!==t.nonce&&("string"!=typeof t.nonce||""===t.nonce.trim()))return y(new a("nonce must be a non-empty string"));if(void 0!==t.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof t.allowInvalidAsymmetricKeyTypes)return y(new a("allowInvalidAsymmetricKeyTypes must be a boolean"));let _=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return y(new a("jwt must be provided"));if("string"!=typeof e)return y(new a("jwt must be a string"));let w=e.split(".");if(3!==w.length)return y(new a("jwt malformed"));try{E=i(e,{complete:!0})}catch(e){return y(e)}if(!E)return y(new a("invalid token"));let P=E.header;if("function"==typeof r){if(!c)return y(new a("verify must be called asynchronous if secret or public key is provided as a callback"));b=r}else b=function(e,t){return t(null,r)};return b(P,function(r,i){let c;if(r)return y(new a("error in secret or public key callback: "+r.message));let b=""!==w[2].trim();if(!b&&i)return y(new a("jwt signature is required"));if(b&&!i)return y(new a("secret or public key must be provided"));if(!b&&!t.algorithms)return y(new a('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=i&&!(i instanceof p))try{i=d(i)}catch(e){try{i=h("string"==typeof i?Buffer.from(i):i)}catch(e){return y(new a("secretOrPublicKey is not valid key material"))}}if(t.algorithms||("secret"===i.type?t.algorithms=g:["rsa","rsa-pss"].includes(i.asymmetricKeyType)?t.algorithms=v:"ec"===i.asymmetricKeyType?t.algorithms=m:t.algorithms=f),-1===t.algorithms.indexOf(E.header.alg))return y(new a("invalid algorithm"));if(P.alg.startsWith("HS")&&"secret"!==i.type)return y(new a(`secretOrPublicKey must be a symmetric key when using ${P.alg}`));if(/^(?:RS|PS|ES)/.test(P.alg)&&"public"!==i.type)return y(new a(`secretOrPublicKey must be an asymmetric key when using ${P.alg}`));if(!t.allowInvalidAsymmetricKeyTypes)try{l(P.alg,i)}catch(e){return y(e)}try{c=u.verify(e,E.header.alg,i)}catch(e){return y(e)}if(!c)return y(new a("invalid signature"));let S=E.payload;if(void 0!==S.nbf&&!t.ignoreNotBefore){if("number"!=typeof S.nbf)return y(new a("invalid nbf value"));if(S.nbf>_+(t.clockTolerance||0))return y(new o("jwt not active",new Date(1e3*S.nbf)))}if(void 0!==S.exp&&!t.ignoreExpiration){if("number"!=typeof S.exp)return y(new a("invalid exp value"));if(_>=S.exp+(t.clockTolerance||0))return y(new s("jwt expired",new Date(1e3*S.exp)))}if(t.audience){let e=Array.isArray(t.audience)?t.audience:[t.audience];if(!(Array.isArray(S.aud)?S.aud:[S.aud]).some(function(r){return e.some(function(e){return e instanceof RegExp?e.test(r):e===r})}))return y(new a("jwt audience invalid. expected: "+e.join(" or ")))}if(t.issuer&&("string"==typeof t.issuer&&S.iss!==t.issuer||Array.isArray(t.issuer)&&-1===t.issuer.indexOf(S.iss)))return y(new a("jwt issuer invalid. expected: "+t.issuer));if(t.subject&&S.sub!==t.subject)return y(new a("jwt subject invalid. expected: "+t.subject));if(t.jwtid&&S.jti!==t.jwtid)return y(new a("jwt jwtid invalid. expected: "+t.jwtid));if(t.nonce&&S.nonce!==t.nonce)return y(new a("jwt nonce invalid. expected: "+t.nonce));if(t.maxAge){if("number"!=typeof S.iat)return y(new a("iat required when maxAge is specified"));let e=n(t.maxAge,S.iat);if(void 0===e)return y(new a('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(_>=e+(t.clockTolerance||0))return y(new s("maxAge exceeded",new Date(1e3*e)))}return!0===t.complete?y(null,{header:P,payload:S,signature:E.signature}):y(null,S)})}},3569:function(e,r,t){var a,o=t(6608).Buffer,s=t(6982),i=t(9053),n=t(9023),l="secret must be a string or buffer",c="key must be a string or a buffer",u="function"==typeof s.createPublicKey;function p(e){if(!o.isBuffer(e)&&"string"!=typeof e&&(!u||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(c)}function h(e){if(!o.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function d(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function f(e){var r=4-(e=e.toString()).length%4;if(4!==r)for(var t=0;t<r;++t)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var r=[].slice.call(arguments,1);return TypeError(n.format.bind(n,e).apply(null,r))}function v(e){var r;return r=e,o.isBuffer(r)||"string"==typeof r||(e=JSON.stringify(e)),e}function g(e){return function(r,t){!function(e){if(!o.isBuffer(e)){if("string"!=typeof e){if(!u||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(t),r=v(r);var a=s.createHmac("sha"+e,t);return d((a.update(r),a.digest("base64")))}}u&&(c+=" or a KeyObject",l+="or a KeyObject");var y="timingSafeEqual"in s?function(e,r){return e.byteLength===r.byteLength&&s.timingSafeEqual(e,r)}:function(e,r){return a||(a=t(9454)),a(e,r)};function E(e){return function(r,t,a){var s=g(e)(r,a);return y(o.from(t),o.from(s))}}function b(e){return function(r,t){h(t),r=v(r);var a=s.createSign("RSA-SHA"+e);return d((a.update(r),a.sign(t,"base64")))}}function _(e){return function(r,t,a){p(a),r=v(r),t=f(t);var o=s.createVerify("RSA-SHA"+e);return o.update(r),o.verify(a,t,"base64")}}function w(e){return function(r,t){h(t),r=v(r);var a=s.createSign("RSA-SHA"+e);return d((a.update(r),a.sign({key:t,padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function P(e){return function(r,t,a){p(a),r=v(r),t=f(t);var o=s.createVerify("RSA-SHA"+e);return o.update(r),o.verify({key:a,padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST},t,"base64")}}function S(e){var r=b(e);return function(){var t=r.apply(null,arguments);return i.derToJose(t,"ES"+e)}}function z(e){var r=_(e);return function(t,a,o){return r(t,a=i.joseToDer(a,"ES"+e).toString("base64"),o)}}function x(){return function(){return""}}function $(){return function(e,r){return""===r}}e.exports=function(e){var r=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!r)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var t=(r[1]||r[3]).toLowerCase(),a=r[2];return{sign:({hs:g,rs:b,ps:w,es:S,none:x})[t](a),verify:({hs:E,rs:_,ps:P,es:z,none:$})[t](a)}}},1525:function(e,r,t){var a=t(4397),o=t(169);r.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],r.sign=a.sign,r.verify=o.verify,r.decode=o.decode,r.isValid=o.isValid,r.createSign=function(e){return new a(e)},r.createVerify=function(e){return new o(e)}},1882:function(e,r,t){var a=t(6608).Buffer,o=t(2203);function s(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=a.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=a.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}t(9023).inherits(s,o),s.prototype.write=function(e){this.buffer=a.concat([this.buffer,a.from(e)]),this.emit("data",e)},s.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=s},4397:function(e,r,t){var a=t(6608).Buffer,o=t(1882),s=t(3569),i=t(2203),n=t(7265),l=t(9023);function c(e,r){return a.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function u(e){var r,t,a,o=e.header,i=e.payload,u=e.secret||e.privateKey,p=e.encoding,h=s(o.alg),d=(r=(r=p)||"utf8",t=c(n(o),"binary"),a=c(n(i),r),l.format("%s.%s",t,a)),f=h.sign(d,u);return l.format("%s.%s",d,f)}function p(e){var r=new o(e.secret||e.privateKey||e.key);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new o(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(p,i),p.prototype.sign=function(){try{var e=u({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},p.sign=u,e.exports=p},7265:function(e,r,t){var a=t(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||a.isBuffer(e)?e.toString():JSON.stringify(e)}},169:function(e,r,t){var a=t(6608).Buffer,o=t(1882),s=t(3569),i=t(2203),n=t(7265),l=t(9023),c=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function u(e){var r=e.split(".",1)[0],t=a.from(r,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(t))return t;try{return JSON.parse(t)}catch(e){return}}function p(e){return e.split(".")[2]}function h(e){return c.test(e)&&!!u(e)}function d(e,r,t){if(!r){var a=Error("Missing algorithm parameter for jws.verify");throw a.code="MISSING_ALGORITHM",a}var o=p(e=n(e)),i=e.split(".",2).join(".");return s(r).verify(i,o,t)}function f(e,r){if(r=r||{},!h(e=n(e)))return null;var t,o,s=u(e);if(!s)return null;var i=(t=t||"utf8",o=e.split(".")[1],a.from(o,"base64").toString(t));return("JWT"===s.typ||r.json)&&(i=JSON.parse(i,r.encoding)),{header:s,payload:i,signature:p(e)}}function m(e){var r=new o((e=e||{}).secret||e.publicKey||e.key);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new o(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,i),m.prototype.verify=function(){try{var e=d(this.signature.buffer,this.algorithm,this.key.buffer),r=f(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=f,m.isValid=h,m.verify=d,e.exports=m},5357:function(e){var r,t,a=1/0,o=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=/^(?:0|[1-9]\d*)$/,u=parseInt;function p(e){return e!=e}var h=Object.prototype,d=h.hasOwnProperty,f=h.toString,m=h.propertyIsEnumerable,v=(r=Object.keys,t=Object,function(e){return r(t(e))}),g=Math.max,y=Array.isArray;function E(e){var r,t,a;return null!=e&&"number"==typeof(r=e.length)&&r>-1&&r%1==0&&r<=0x1fffffffffffff&&"[object Function]"!=(a=b(t=e)?f.call(t):"")&&"[object GeneratorFunction]"!=a}function b(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}function _(e){return!!e&&"object"==typeof e}e.exports=function(e,r,t,w){e=E(e)?e:function(e){return e?function(e,r){for(var t=-1,a=e?e.length:0,o=Array(a);++t<a;)o[t]=r(e[t],t,e);return o}(E(e)?function(e,r){var t,a,o,s,i=y(e)||_(a=t=e)&&E(a)&&d.call(t,"callee")&&(!m.call(t,"callee")||"[object Arguments]"==f.call(t))?function(e,r){for(var t=-1,a=Array(e);++t<e;)a[t]=r(t);return a}(e.length,String):[],n=i.length,l=!!n;for(var u in e){d.call(e,u)&&!(l&&("length"==u||(o=u,(s=null==(s=n)?0x1fffffffffffff:s)&&("number"==typeof o||c.test(o))&&o>-1&&o%1==0&&o<s)))&&i.push(u)}return i}(e):function(e){if(t=(r=e)&&r.constructor,r!==("function"==typeof t&&t.prototype||h))return v(e);var r,t,a=[];for(var o in Object(e))d.call(e,o)&&"constructor"!=o&&a.push(o);return a}(e),function(r){return e[r]}):[]}(e),t=t&&!w?(z=(S=(P=t)?(P=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||_(r)&&"[object Symbol]"==f.call(r))return o;if(b(e)){var r,t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var a=n.test(e);return a||l.test(e)?u(e.slice(2),a?2:8):i.test(e)?o:+e}(P))===a||P===-a?(P<0?-1:1)*17976931348623157e292:P==P?P:0:0===P?P:0)%1,S==S?z?S-z:S:0):0;var P,S,z,x,$=e.length;return t<0&&(t=g($+t,0)),"string"==typeof(x=e)||!y(x)&&_(x)&&"[object String]"==f.call(x)?t<=$&&e.indexOf(r,t)>-1:!!$&&function(e,r,t){if(r!=r){for(var a=e.length,o=t+-1;++o<a;)if(p(e[o],o,e))return o;return -1}for(var s=t-1,i=e.length;++s<i;)if(e[s]===r)return s;return -1}(e,r,t)>-1}},6782:function(e){var r=Object.prototype.toString;e.exports=function(e){var t;return!0===e||!1===e||!!(t=e)&&"object"==typeof t&&"[object Boolean]"==r.call(e)}},5250:function(e){var r=1/0,t=0/0,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,n=parseInt,l=Object.prototype.toString;function c(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=function(e){var u,p,h;return"number"==typeof e&&e==(h=(p=(u=e)?(u=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||r&&"object"==typeof r&&"[object Symbol]"==l.call(r))return t;if(c(e)){var r,u="function"==typeof e.valueOf?e.valueOf():e;e=c(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var p=s.test(e);return p||i.test(e)?n(e.slice(2),p?2:8):o.test(e)?t:+e}(u))===r||u===-r?(u<0?-1:1)*17976931348623157e292:u==u?u:0:0===u?u:0)%1,p==p?h?p-h:p:0)}},8094:function(e){var r=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==r.call(e)}},6052:function(e){var r,t,a=Object.prototype,o=Function.prototype.toString,s=a.hasOwnProperty,i=o.call(Object),n=a.toString,l=(r=Object.getPrototypeOf,t=Object,function(e){return r(t(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=n.call(e)||function(e){var r=!1;if(null!=e&&"function"!=typeof e.toString)try{r=!!(e+"")}catch(e){}return r}(e))return!1;var r=l(e);if(null===r)return!0;var t=s.call(r,"constructor")&&r.constructor;return"function"==typeof t&&t instanceof t&&o.call(t)==i}},1251:function(e){var r=Object.prototype.toString,t=Array.isArray;e.exports=function(e){var a;return"string"==typeof e||!t(e)&&!!(a=e)&&"object"==typeof a&&"[object String]"==r.call(e)}},8430:function(e){var r=1/0,t=0/0,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,n=parseInt,l=Object.prototype.toString;function c(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=function(e){var u,p,h,d,f=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return h=(p=(u=f)?(u=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||r&&"object"==typeof r&&"[object Symbol]"==l.call(r))return t;if(c(e)){var r,u="function"==typeof e.valueOf?e.valueOf():e;e=c(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var p=s.test(e);return p||i.test(e)?n(e.slice(2),p?2:8):o.test(e)?t:+e}(u))===r||u===-r?(u<0?-1:1)*17976931348623157e292:u==u?u:0:0===u?u:0)%1,f=p==p?h?p-h:p:0,function(){return--f>0&&(d=m.apply(this,arguments)),f<=1&&(m=void 0),d}}},3866:function(e){function r(e,r,t,a){return Math.round(e/t)+" "+a+(r>=1.5*t?"s":"")}e.exports=function(e,t){t=t||{};var a,o,s,i,n=typeof e;if("string"===n&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(c){var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:break}}}return}if("number"===n&&isFinite(e)){return t.long?(o=Math.abs(a=e))>=864e5?r(a,o,864e5,"day"):o>=36e5?r(a,o,36e5,"hour"):o>=6e4?r(a,o,6e4,"minute"):o>=1e3?r(a,o,1e3,"second"):a+" ms":(i=Math.abs(s=e))>=864e5?Math.round(s/864e5)+"d":i>=36e5?Math.round(s/36e5)+"h":i>=6e4?Math.round(s/6e4)+"m":i>=1e3?Math.round(s/1e3)+"s":s+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6608:function(e,r,t){var a=t(181),o=a.Buffer;function s(e,r){for(var t in e)r[t]=e[t]}function i(e,r,t){return o(e,r,t)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=a:(s(a,r),r.Buffer=i),i.prototype=Object.create(o.prototype),s(o,i),i.from=function(e,r,t){if("number"==typeof e)throw TypeError("Argument must not be a number");return o(e,r,t)},i.alloc=function(e,r,t){if("number"!=typeof e)throw TypeError("Argument must be a number");var a=o(e);return void 0!==r?"string"==typeof t?a.fill(r,t):a.fill(r):a.fill(0),a},i.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return a.SlowBuffer(e)}},8610:function(e,r,t){"use strict";let a=Symbol("SemVer ANY");class o{static get ANY(){return a}constructor(e,r){if(r=s(r),e instanceof o)if(!!r.loose===e.loose)return e;else e=e.value;c("comparator",e=e.trim().split(/\s+/).join(" "),r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===a?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){let r=this.options.loose?i[n.COMPARATORLOOSE]:i[n.COMPARATOR],t=e.match(r);if(!t)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),t[2]?this.semver=new u(t[2],this.options.loose):this.semver=a}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,r).test(this.value):""===e.operator?""===e.value||new p(this.value,r).test(e.semver):!((r=s(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let s=t(4621),{safeRe:i,t:n}=t(152),l=t(5461),c=t(674),u=t(2398),p=t(2069)},2069:function(e,r,t){"use strict";let a=/\s+/g;class o{constructor(e,r){if(r=i(r),e instanceof o)if(!!r.loose===e.loose&&!!r.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,r);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(a," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let e=0;e<r.length;e++)e>0&&(this.formatted+=" "),this.formatted+=r[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&m)|(this.options.loose&&v))+":"+e,t=s.get(r);if(t)return t;let a=this.options.loose,o=a?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];l("hyphen replace",e=e.replace(o,I(this.options.includePrerelease))),l("comparator trim",e=e.replace(u[p.COMPARATORTRIM],h)),l("tilde trim",e=e.replace(u[p.TILDETRIM],d)),l("caret trim",e=e.replace(u[p.CARETTRIM],f));let i=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>j(e,this.options));a&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE])))),l("range list",i);let c=new Map;for(let e of i.map(e=>new n(e,this.options))){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");let y=[...c.values()];return s.set(r,y),y}intersects(e,r){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(t=>E(t,r)&&e.set.some(e=>E(e,r)&&t.every(t=>e.every(e=>t.intersects(e,r)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let r=0;r<this.set.length;r++)if(O(this.set[r],e,this.options))return!0;return!1}}e.exports=o;let s=new(t(2044)),i=t(4621),n=t(8610),l=t(674),c=t(2398),{safeRe:u,t:p,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:f}=t(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:v}=t(5076),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,E=(e,r)=>{let t=!0,a=e.slice(),o=a.pop();for(;t&&a.length;)t=a.every(e=>o.intersects(e,r)),o=a.pop();return t},b=(e,r)=>(l("comp",e=e.replace(u[p.BUILD],""),r),l("caret",e=S(e,r)),l("tildes",e=w(e,r)),l("xrange",e=x(e,r)),l("stars",e=R(e,r)),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,r)=>e.trim().split(/\s+/).map(e=>P(e,r)).join(" "),P=(e,r)=>{let t=r.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(t,(r,t,a,o,s)=>{let i;return l("tilde",e,r,t,a,o,s),_(t)?i="":_(a)?i=`>=${t}.0.0 <${+t+1}.0.0-0`:_(o)?i=`>=${t}.${a}.0 <${t}.${+a+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${t}.${a}.${o}-${s} <${t}.${+a+1}.0-0`):i=`>=${t}.${a}.${o} <${t}.${+a+1}.0-0`,l("tilde return",i),i})},S=(e,r)=>e.trim().split(/\s+/).map(e=>z(e,r)).join(" "),z=(e,r)=>{l("caret",e,r);let t=r.loose?u[p.CARETLOOSE]:u[p.CARET],a=r.includePrerelease?"-0":"";return e.replace(t,(r,t,o,s,i)=>{let n;return l("caret",e,r,t,o,s,i),_(t)?n="":_(o)?n=`>=${t}.0.0${a} <${+t+1}.0.0-0`:_(s)?n="0"===t?`>=${t}.${o}.0${a} <${t}.${+o+1}.0-0`:`>=${t}.${o}.0${a} <${+t+1}.0.0-0`:i?(l("replaceCaret pr",i),n="0"===t?"0"===o?`>=${t}.${o}.${s}-${i} <${t}.${o}.${+s+1}-0`:`>=${t}.${o}.${s}-${i} <${t}.${+o+1}.0-0`:`>=${t}.${o}.${s}-${i} <${+t+1}.0.0-0`):(l("no pr"),n="0"===t?"0"===o?`>=${t}.${o}.${s}${a} <${t}.${o}.${+s+1}-0`:`>=${t}.${o}.${s}${a} <${t}.${+o+1}.0-0`:`>=${t}.${o}.${s} <${+t+1}.0.0-0`),l("caret return",n),n})},x=(e,r)=>(l("replaceXRanges",e,r),e.split(/\s+/).map(e=>$(e,r)).join(" ")),$=(e,r)=>{e=e.trim();let t=r.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(t,(t,a,o,s,i,n)=>{l("xRange",e,t,a,o,s,i,n);let c=_(o),u=c||_(s),p=u||_(i);return"="===a&&p&&(a=""),n=r.includePrerelease?"-0":"",c?t=">"===a||"<"===a?"<0.0.0-0":"*":a&&p?(u&&(s=0),i=0,">"===a?(a=">=",u?(o=+o+1,s=0):s=+s+1,i=0):"<="===a&&(a="<",u?o=+o+1:s=+s+1),"<"===a&&(n="-0"),t=`${a+o}.${s}.${i}${n}`):u?t=`>=${o}.0.0${n} <${+o+1}.0.0-0`:p&&(t=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`),l("xRange return",t),t})},R=(e,r)=>(l("replaceStars",e,r),e.trim().replace(u[p.STAR],"")),j=(e,r)=>(l("replaceGTE0",e,r),e.trim().replace(u[r.includePrerelease?p.GTE0PRE:p.GTE0],"")),I=e=>(r,t,a,o,s,i,n,l,c,u,p,h)=>(t=_(a)?"":_(o)?`>=${a}.0.0${e?"-0":""}`:_(s)?`>=${a}.${o}.0${e?"-0":""}`:i?`>=${t}`:`>=${t}${e?"-0":""}`,l=_(c)?"":_(u)?`<${+c+1}.0.0-0`:_(p)?`<${c}.${+u+1}.0-0`:h?`<=${c}.${u}.${p}-${h}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`,`${t} ${l}`.trim()),O=(e,r,t)=>{for(let t=0;t<e.length;t++)if(!e[t].test(r))return!1;if(r.prerelease.length&&!t.includePrerelease){for(let t=0;t<e.length;t++)if(l(e[t].semver),e[t].semver!==n.ANY&&e[t].semver.prerelease.length>0){let a=e[t].semver;if(a.major===r.major&&a.minor===r.minor&&a.patch===r.patch)return!0}return!1}return!0}},2398:function(e,r,t){"use strict";let a=t(674),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=t(5076),{safeRe:i,t:n}=t(152),l=t(4621),{compareIdentifiers:c}=t(9101);class u{constructor(e,r){if(r=l(r),e instanceof u)if(!!r.loose===e.loose&&!!r.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);a("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const t=e.trim().match(r.loose?i[n.LOOSE]:i[n.FULL]);if(!t)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>s||this.major<0)throw TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let r=+e;if(r>=0&&r<s)return r}return e}):this.prerelease=[],this.build=t[5]?t[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(a("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof u||(e=new u(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let t=this.prerelease[r],o=e.prerelease[r];if(a("prerelease compare",r,t,o),void 0===t&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===t)return -1;else if(t===o)continue;else return c(t,o)}while(++r)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let r=0;do{let t=this.build[r],o=e.build[r];if(a("build compare",r,t,o),void 0===t&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===t)return -1;else if(t===o)continue;else return c(t,o)}while(++r)}inc(e,r,t){if(e.startsWith("pre")){if(!r&&!1===t)throw Error("invalid increment argument: identifier is empty");if(r){let e=`-${r}`.match(this.options.loose?i[n.PRERELEASELOOSE]:i[n.PRERELEASE]);if(!e||e[1]!==r)throw Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,t),this.inc("pre",r,t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",r,t),this.inc("pre",r,t);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(t);if(0===this.prerelease.length)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)"number"==typeof this.prerelease[a]&&(this.prerelease[a]++,a=-2);if(-1===a){if(r===this.prerelease.join(".")&&!1===t)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(r){let a=[r,e];!1===t&&(a=[r]),0===c(this.prerelease[0],r)?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},5608:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}},5461:function(e,r,t){"use strict";let a=t(8271),o=t(733),s=t(1686),i=t(6479),n=t(7257),l=t(5850);e.exports=(e,r,t,c)=>{switch(r){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return a(e,t,c);case"!=":return o(e,t,c);case">":return s(e,t,c);case">=":return i(e,t,c);case"<":return n(e,t,c);case"<=":return l(e,t,c);default:throw TypeError(`Invalid operator: ${r}`)}}},7771:function(e,r,t){"use strict";let a=t(2398),o=t(6802),{safeRe:s,t:i}=t(152);e.exports=(e,r)=>{if(e instanceof a)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let t=null;if((r=r||{}).rtl){let a,o=r.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];for(;(a=o.exec(e))&&(!t||t.index+t[0].length!==e.length);)t&&a.index+a[0].length===t.index+t[0].length||(t=a),o.lastIndex=a.index+a[1].length+a[2].length;o.lastIndex=-1}else t=e.match(r.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===t)return null;let n=t[2],l=t[3]||"0",c=t[4]||"0",u=r.includePrerelease&&t[5]?`-${t[5]}`:"",p=r.includePrerelease&&t[6]?`+${t[6]}`:"";return o(`${n}.${l}.${c}${u}${p}`,r)}},8767:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t)=>{let o=new a(e,t),s=new a(r,t);return o.compare(s)||o.compareBuild(s)}},6293:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r)=>a(e,r,!0)},6958:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t)=>new a(e,t).compare(new a(r,t))},3086:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,null,!0),o=a(r,null,!0),s=t.compare(o);if(0===s)return null;let i=s>0,n=i?t:o,l=i?o:t,c=!!n.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(n))return l.minor&&!l.patch?"minor":"patch"}let u=c?"pre":"";return t.major!==o.major?u+"major":t.minor!==o.minor?u+"minor":t.patch!==o.patch?u+"patch":"prerelease"}},8271:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0===a(e,r,t)},1686:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(e,r,t)>0},6479:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(e,r,t)>=0},3625:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t,o,s)=>{"string"==typeof t&&(s=o,o=t,t=void 0);try{return new a(e instanceof a?e.version:e,t).inc(r,o,s).version}catch(e){return null}}},7257:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0>a(e,r,t)},5850:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0>=a(e,r,t)},7744:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).major},4812:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).minor},733:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0!==a(e,r,t)},6802:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t=!1)=>{if(e instanceof a)return e;try{return new a(e,r)}catch(e){if(!t)return null;throw e}}},8643:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).patch},9283:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,r);return t&&t.prerelease.length?t.prerelease:null}},7032:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(r,e,t)},9839:function(e,r,t){"use strict";let a=t(8767);e.exports=(e,r)=>e.sort((e,t)=>a(t,e,r))},4056:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r,t)=>{try{r=new a(r,t)}catch(e){return!1}return r.test(e)}},7697:function(e,r,t){"use strict";let a=t(8767);e.exports=(e,r)=>e.sort((e,t)=>a(e,t,r))},6807:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,r);return t?t.version:null}},3895:function(e,r,t){"use strict";let a=t(152),o=t(5076),s=t(2398),i=t(9101),n=t(6802),l=t(6807),c=t(5608),u=t(3625),p=t(3086),h=t(7744),d=t(4812),f=t(8643),m=t(9283),v=t(6958),g=t(7032),y=t(6293),E=t(8767),b=t(7697),_=t(9839),w=t(1686),P=t(7257),S=t(8271),z=t(733),x=t(6479),$=t(5850),R=t(5461),j=t(7771),I=t(8610),O=t(2069),A=t(4056),T=t(6613),D=t(7114),k=t(1008),C=t(203),N=t(5372),F=t(4713),L=t(4497),q=t(9272),U=t(3490);e.exports={parse:n,valid:l,clean:c,inc:u,diff:p,major:h,minor:d,patch:f,prerelease:m,compare:v,rcompare:g,compareLoose:y,compareBuild:E,sort:b,rsort:_,gt:w,lt:P,eq:S,neq:z,gte:x,lte:$,cmp:R,coerce:j,Comparator:I,Range:O,satisfies:A,toComparators:T,maxSatisfying:D,minSatisfying:k,minVersion:C,validRange:N,outside:F,gtr:L,ltr:q,intersects:U,simplifyRange:t(4039),subset:t(22),SemVer:s,re:a.re,src:a.src,tokens:a.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},5076:function(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674:function(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101:function(e){"use strict";let r=/^[0-9]+$/,t=(e,t)=>{if("number"==typeof e&&"number"==typeof t)return e===t?0:e<t?-1:1;let a=r.test(e),o=r.test(t);return a&&o&&(e*=1,t*=1),e===t?0:a&&!o?-1:o&&!a?1:e<t?-1:1};e.exports={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}},2044:function(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(void 0!==r)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&void 0!==r){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,r)}return this}}},4621:function(e){"use strict";let r=Object.freeze({loose:!0}),t=Object.freeze({});e.exports=e=>e?"object"!=typeof e?r:e:t},152:function(e,r,t){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=t(5076),i=t(674),n=(r=e.exports={}).re=[],l=r.safeRe=[],c=r.src=[],u=r.safeSrc=[],p=r.t={},h=0,d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,o]],m=(e,r,t)=>{let a=(e=>{for(let[r,t]of f)e=e.split(`${r}*`).join(`${r}{0,${t}}`).split(`${r}+`).join(`${r}{1,${t}}`);return e})(r),o=h++;i(e,o,r),p[e]=o,c[o]=r,u[o]=a,n[o]=new RegExp(r,t?"g":void 0),l[o]=new RegExp(a,t?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),m("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${d}+`),m("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),m("FULL",`^${c[p.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),m("LOOSE",`^${c[p.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),m("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),m("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",c[p.COERCE],!0),m("COERCERTLFULL",c[p.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",m("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",m("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497:function(e,r,t){"use strict";let a=t(4713);e.exports=(e,r,t)=>a(e,r,">",t)},3490:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r,t)=>(e=new a(e,t),r=new a(r,t),e.intersects(r,t))},9272:function(e,r,t){"use strict";let a=t(4713);e.exports=(e,r,t)=>a(e,r,"<",t)},7114:function(e,r,t){"use strict";let a=t(2398),o=t(2069);e.exports=(e,r,t)=>{let s=null,i=null,n=null;try{n=new o(r,t)}catch(e){return null}return e.forEach(e=>{n.test(e)&&(!s||-1===i.compare(e))&&(i=new a(s=e,t))}),s}},1008:function(e,r,t){"use strict";let a=t(2398),o=t(2069);e.exports=(e,r,t)=>{let s=null,i=null,n=null;try{n=new o(r,t)}catch(e){return null}return e.forEach(e=>{n.test(e)&&(!s||1===i.compare(e))&&(i=new a(s=e,t))}),s}},203:function(e,r,t){"use strict";let a=t(2398),o=t(2069),s=t(1686);e.exports=(e,r)=>{e=new o(e,r);let t=new a("0.0.0");if(e.test(t)||(t=new a("0.0.0-0"),e.test(t)))return t;t=null;for(let r=0;r<e.set.length;++r){let o=e.set[r],i=null;o.forEach(e=>{let r=new a(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!i||s(r,i))&&(i=r);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),i&&(!t||s(t,i))&&(t=i)}return t&&e.test(t)?t:null}},4713:function(e,r,t){"use strict";let a=t(2398),o=t(8610),{ANY:s}=o,i=t(2069),n=t(4056),l=t(1686),c=t(7257),u=t(5850),p=t(6479);e.exports=(e,r,t,h)=>{let d,f,m,v,g;switch(e=new a(e,h),r=new i(r,h),t){case">":d=l,f=u,m=c,v=">",g=">=";break;case"<":d=c,f=p,m=l,v="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(n(e,r,h))return!1;for(let t=0;t<r.set.length;++t){let a=r.set[t],i=null,n=null;if(a.forEach(e=>{e.semver===s&&(e=new o(">=0.0.0")),i=i||e,n=n||e,d(e.semver,i.semver,h)?i=e:m(e.semver,n.semver,h)&&(n=e)}),i.operator===v||i.operator===g||(!n.operator||n.operator===v)&&f(e,n.semver)||n.operator===g&&m(e,n.semver))return!1}return!0}},4039:function(e,r,t){"use strict";let a=t(4056),o=t(6958);e.exports=(e,r,t)=>{let s=[],i=null,n=null,l=e.sort((e,r)=>o(e,r,t));for(let e of l)a(e,r,t)?(n=e,i||(i=e)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let c=[];for(let[e,r]of s)e===r?c.push(e):r||e!==l[0]?r?e===l[0]?c.push(`<=${r}`):c.push(`${e} - ${r}`):c.push(`>=${e}`):c.push("*");let u=c.join(" || "),p="string"==typeof r.raw?r.raw:String(r);return u.length<p.length?u:r}},22:function(e,r,t){"use strict";let a=t(2069),o=t(8610),{ANY:s}=o,i=t(4056),n=t(6958),l=[new o(">=0.0.0-0")],c=[new o(">=0.0.0")],u=(e,r,t)=>{let a,o,u,d,f,m,v;if(e===r)return!0;if(1===e.length&&e[0].semver===s)if(1===r.length&&r[0].semver===s)return!0;else e=t.includePrerelease?l:c;if(1===r.length&&r[0].semver===s)if(t.includePrerelease)return!0;else r=c;let g=new Set;for(let r of e)">"===r.operator||">="===r.operator?a=p(a,r,t):"<"===r.operator||"<="===r.operator?o=h(o,r,t):g.add(r.semver);if(g.size>1)return null;if(a&&o&&((u=n(a.semver,o.semver,t))>0||0===u&&(">="!==a.operator||"<="!==o.operator)))return null;for(let e of g){if(a&&!i(e,String(a),t)||o&&!i(e,String(o),t))return null;for(let a of r)if(!i(e,String(a),t))return!1;return!0}let y=!!o&&!t.includePrerelease&&!!o.semver.prerelease.length&&o.semver,E=!!a&&!t.includePrerelease&&!!a.semver.prerelease.length&&a.semver;for(let e of(y&&1===y.prerelease.length&&"<"===o.operator&&0===y.prerelease[0]&&(y=!1),r)){if(v=v||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,a){if(E&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===E.major&&e.semver.minor===E.minor&&e.semver.patch===E.patch&&(E=!1),">"===e.operator||">="===e.operator){if((d=p(a,e,t))===e&&d!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),t))return!1}if(o){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if((f=h(o,e,t))===e&&f!==o)return!1}else if("<="===o.operator&&!i(o.semver,String(e),t))return!1}if(!e.operator&&(o||a)&&0!==u)return!1}return(!a||!m||!!o||0===u)&&(!o||!v||!!a||0===u)&&!E&&!y&&!0},p=(e,r,t)=>{if(!e)return r;let a=n(e.semver,r.semver,t);return a>0?e:a<0||">"===r.operator&&">="===e.operator?r:e},h=(e,r,t)=>{if(!e)return r;let a=n(e.semver,r.semver,t);return a<0?e:a>0||"<"===r.operator&&"<="===e.operator?r:e};e.exports=(e,r,t={})=>{if(e===r)return!0;e=new a(e,t),r=new a(r,t);let o=!1;e:for(let a of e.set){for(let e of r.set){let r=u(a,e,t);if(o=o||null!==r,r)continue e}if(o)return!1}return!0}},6613:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r)=>new a(e,r).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r)=>{try{return new a(e,r).range||"*"}catch(e){return null}}},3749:function(e,r){(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))return r[0];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("")}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="[A-Za-z]",o="[0-9]",s=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+t("%[89A-Fa-f]"+s+"%"+s+s)+"|"+t("%"+s+s)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=r("[\\:\\/\\?\\#\\[\\]\\@]",n),c=e?"[\\uE000-\\uF8FF]":"[]",u=r(a,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),p=t(a+r(a,o,"[\\+\\-\\.]")+"*"),h=t(t(i+"|"+r(u,n,"[\\:]"))+"*"),d=(t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("[1-9]"+o)+"|"+o),t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o)),f=t(d+"\\."+d+"\\."+d+"\\."+d),m=t(s+"{1,4}"),v=t(t(m+"\\:"+m)+"|"+f),g=t(t(m+"\\:")+"{6}"+v),y=t("\\:\\:"+t(m+"\\:")+"{5}"+v),E=t(t(m)+"?\\:\\:"+t(m+"\\:")+"{4}"+v),b=t(t(t(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+t(m+"\\:")+"{3}"+v),_=t(t(t(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+t(m+"\\:")+"{2}"+v),w=t(t(t(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+v),P=t(t(t(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+v),S=t(t(t(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),z=t(t(t(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),x=t([g,y,E,b,_,w,P,S,z].join("|")),$=t(t(u+"|"+i)+"+"),R=(t(x+"\\%25"+$),t(x+t("\\%25|\\%(?!"+s+"{2})")+$)),j=t("[vV]"+s+"+\\."+r(u,n,"[\\:]")+"+"),I=t("\\["+t(R+"|"+x+"|"+j)+"\\]"),O=t(t(i+"|"+r(u,n))+"*"),A=t(I+"|"+f+"(?!"+O+")|"+O),T=t(o+"*"),D=t(t(h+"@")+"?"+A+t("\\:"+T)+"?"),k=t(i+"|"+r(u,n,"[\\:\\@]")),C=t(k+"*"),N=t(k+"+"),F=t(t(i+"|"+r(u,n,"[\\@]"))+"+"),L=t(t("\\/"+C)+"*"),q=t("\\/"+t(N+L)+"?"),U=t(F+L),V=t(N+L),M="(?!"+k+")",H=(t(L+"|"+q+"|"+U+"|"+V+"|"+M),t(t(k+"|"+r("[\\/\\?]",c))+"*")),K=t(t(k+"|[\\/\\?]")+"*"),B=t(t("\\/\\/"+D+L)+"|"+q+"|"+V+"|"+M),Q=t(p+"\\:"+B+t("\\?"+H)+"?"+t("\\#"+K)+"?"),G=t(t("\\/\\/"+D+L)+"|"+q+"|"+U+"|"+M),J=t(G+t("\\?"+H)+"?"+t("\\#"+K)+"?");return t(Q+"|"+J),t(p+"\\:"+B+t("\\?"+H)+"?"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+V+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+U+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+V+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t("("+h+")@"),t("\\:("+T+")"),{NOT_SCHEME:RegExp(r("[^]",a,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:RegExp(r("[^\\%\\:]",u,n),"g"),NOT_HOST:RegExp(r("[^\\%\\[\\]\\:]",u,n),"g"),NOT_PATH:RegExp(r("[^\\%\\/\\:\\@]",u,n),"g"),NOT_PATH_NOSCHEME:RegExp(r("[^\\%\\/\\@]",u,n),"g"),NOT_QUERY:RegExp(r("[^\\%]",u,n,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:RegExp(r("[^\\%]",u,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:RegExp(r("[^]",u,n),"g"),UNRESERVED:RegExp(u,"g"),OTHER_CHARS:RegExp(r("[^\\%]",u,l),"g"),PCT_ENCODED:RegExp(i,"g"),IPV4ADDRESS:RegExp("^("+f+")$"),IPV6ADDRESS:RegExp("^\\[?("+x+")"+t(t("\\%25|\\%(?!"+s+"{2})")+"("+$+")")+"?\\]?$")}}var i=s(!1),n=s(!0),l=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 i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{!a&&n.return&&n.return()}finally{if(o)throw s}}return t}(e,r);throw TypeError("Invalid attempt to destructure non-iterable instance")},c=/^xn--/,u=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={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,f=String.fromCharCode;function m(e){throw RangeError(h[e])}function v(e,r){var t=e.split("@"),a="";return t.length>1&&(a=t[0]+"@",e=t[1]),a+(function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t})((e=e.replace(p,".")).split("."),r).join(".")}var g=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},y=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=e.length,a=0,o=128,s=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var n=0;n<i;++n)e.charCodeAt(n)>=128&&m("not-basic"),r.push(e.charCodeAt(n));for(var l=i>0?i+1:0;l<t;){for(var c=a,u=1,p=36;;p+=36){l>=t&&m("invalid-input");var h,f=(h=e.charCodeAt(l++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36;(f>=36||f>d((0x7fffffff-a)/u))&&m("overflow"),a+=f*u;var v=p<=s?1:p>=s+26?26:p-s;if(f<v)break;var g=36-v;u>d(0x7fffffff/g)&&m("overflow"),u*=g}var E=r.length+1;s=y(a-c,E,0==c),d(a/E)>0x7fffffff-o&&m("overflow"),o+=d(a/E),a%=E,r.splice(a++,0,o)}return String.fromCodePoint.apply(String,r)},b=function(e){var r=[],t=(e=function(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++);(64512&s)==56320?r.push(((1023&o)<<10)+(1023&s)+65536):(r.push(o),t--)}else r.push(o)}return r}(e)).length,a=128,o=0,s=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var p=c.value;p<128&&r.push(f(p))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var h=r.length,v=h;for(h&&r.push("-");v<t;){var E=0x7fffffff,b=!0,_=!1,w=void 0;try{for(var P,S=e[Symbol.iterator]();!(b=(P=S.next()).done);b=!0){var z=P.value;z>=a&&z<E&&(E=z)}}catch(e){_=!0,w=e}finally{try{!b&&S.return&&S.return()}finally{if(_)throw w}}var x=v+1;E-a>d((0x7fffffff-o)/x)&&m("overflow"),o+=(E-a)*x,a=E;var $=!0,R=!1,j=void 0;try{for(var I,O=e[Symbol.iterator]();!($=(I=O.next()).done);$=!0){var A=I.value;if(A<a&&++o>0x7fffffff&&m("overflow"),A==a){for(var T=o,D=36;;D+=36){var k=D<=s?1:D>=s+26?26:D-s;if(T<k)break;var C=T-k,N=36-k;r.push(f(g(k+C%N,0))),T=d(C/N)}r.push(f(g(T,0))),s=y(o,x,v==h),o=0,++v}}}catch(e){R=!0,j=e}finally{try{!$&&O.return&&O.return()}finally{if(R)throw j}}++o,++a}return r.join("")},_=function(e){return v(e,function(e){return u.test(e)?"xn--"+b(e):e})},w=function(e){return v(e,function(e){return c.test(e)?E(e.slice(4).toLowerCase()):e})},P={};function S(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 z(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);o<128?(r+=String.fromCharCode(o),t+=3):o>=194&&o<224?(a-t>=6?r+=String.fromCharCode((31&o)<<6|63&parseInt(e.substr(t+4,2),16)):r+=e.substr(t,6),t+=6):o>=224?(a-t>=9?r+=String.fromCharCode((15&o)<<12|(63&parseInt(e.substr(t+4,2),16))<<6|63&parseInt(e.substr(t+7,2),16)):r+=e.substr(t,9),t+=9):(r+=e.substr(t,3),t+=3)}return r}function x(e,r){function t(e){var t=z(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,S).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,S).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,S).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,S).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,S).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function R(e,r){var t=l(e.match(r.IPV4ADDRESS)||[],2)[1];return t?t.split(".").map($).join("."):e}function j(e,r){var t=l(e.match(r.IPV6ADDRESS)||[],3),a=t[1],o=t[2];if(!a)return e;for(var s=l(a.toLowerCase().split("::").reverse(),2),i=s[0],n=s[1],c=n?n.split(":").map($):[],u=i.split(":").map($),p=r.IPV4ADDRESS.test(u[u.length-1]),h=p?7:8,d=u.length-h,f=Array(h),m=0;m<h;++m)f[m]=c[m]||u[d+m]||"";p&&(f[h-1]=R(f[h-1],r));var v=f.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],g=void 0;if(v&&v.length>1){var y=f.slice(0,v.index),E=f.slice(v.index+v.length);g=y.join(":")+"::"+E.join(":")}else g=f.join(":");return o&&(g+="%"+o),g}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,O=void 0==="".match(/(){0}/)[1];function A(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?n:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){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=j(R(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=P[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||s&&s.unicodeSupport)x(t,a);else{if(t.host&&(r.domainHost||s&&s.domainHost))try{t.host=_(t.host.replace(a.PCT_ENCODED,z).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(t,i)}s&&s.parse&&s.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}var T=/^\.\.?\//,D=/^\/\.(\/|$)/,k=/^\/\.\.(\/|$)/,C=/^\/?(?:.|\n)*?(?=\/|$)/;function N(e){for(var r=[];e.length;)if(e.match(T))e=e.replace(T,"");else if(e.match(D))e=e.replace(D,"/");else if(e.match(k))e=e.replace(k,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(C);if(t){var a=t[0];e=e.slice(a.length),r.push(a)}else throw Error("Unexpected dot segment condition")}return r.join("")}function F(e){var r,t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.iri?n:i,s=[],l=P[(a.scheme||e.scheme||"").toLowerCase()];if(l&&l.serialize&&l.serialize(e,a),e.host){if(o.IPV6ADDRESS.test(e.host));else if(a.domainHost||l&&l.domainHost)try{e.host=a.iri?w(e.host):_(e.host.replace(o.PCT_ENCODED,z).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(a.iri?"Unicode":"ASCII")+" via punycode: "+r}}x(e,o),"suffix"!==a.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var c=(r=!1!==a.iri?n:i,t=[],void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host&&t.push(j(R(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"})),("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0);if(void 0!==c&&("suffix"!==a.reference&&s.push("//"),s.push(c),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var u=e.path;a.absolutePath||l&&l.absolutePath||(u=N(u)),void 0===c&&(u=u.replace(/^\/\//,"/%2F")),s.push(u)}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function L(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=A(F(e,t),t),r=A(F(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=N(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=N(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=N(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=N(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function q(e,r){return e&&e.toString().replace(r&&r.iri?n.PCT_ENCODED:i.PCT_ENCODED,z)}var U={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){var t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}},V={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function M(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){return e.secure=M(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e,r){if((e.port===(M(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=l(e.resourceName.split("?"),2),a=t[0],o=t[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},B={},Q="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",G="[0-9A-Fa-f]",J=t(t("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+t("%[89A-Fa-f]"+G+"%"+G+G)+"|"+t("%"+G+G)),W=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=RegExp(Q,"g"),Y=RegExp(J,"g"),Z=RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',W),"g"),ee=RegExp(r("[^]",Q,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g");function er(e){var r=z(e);return r.match(X)?r:e}var et={scheme:"mailto",parse:function(e,r){var t=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var a=!1,o={},s=e.query.split("&"),i=0,n=s.length;i<n;++i){var l=s[i].split("=");switch(l[0]){case"to":for(var c=l[1].split(","),u=0,p=c.length;u<p;++u)t.push(c[u]);break;case"subject":e.subject=q(l[1],r);break;case"body":e.body=q(l[1],r);break;default:a=!0,o[q(l[0],r)]=q(l[1],r)}}a&&(e.headers=o)}e.query=void 0;for(var h=0,d=t.length;h<d;++h){var f=t[h].split("@");if(f[0]=q(f[0]),r.unicodeSupport)f[1]=q(f[1],r).toLowerCase();else try{f[1]=_(q(f[1],r).toLowerCase())}catch(r){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+r}t[h]=f.join("@")}return e},serialize:function(e,r){var t,a=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(a){for(var s=0,i=a.length;s<i;++s){var n=String(a[s]),l=n.lastIndexOf("@"),c=n.slice(0,l).replace(Y,er).replace(Y,o).replace(Z,S),u=n.slice(l+1);try{u=r.iri?w(u):_(q(u,r).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}a[s]=c+"@"+u}e.path=a.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var d in p)p[d]!==B[d]&&h.push(d.replace(Y,er).replace(Y,o).replace(ee,S)+"="+p[d].replace(Y,er).replace(Y,o).replace(ee,S));return h.length&&(e.query=h.join("&")),e}},ea=/^([^\:]+)\:(.*)/,eo={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(ea),a=e;if(t){var o=r.scheme||a.scheme||"urn",s=t[1].toLowerCase(),i=t[2],n=P[o+":"+(r.nid||s)];a.nid=s,a.nss=i,a.path=void 0,n&&(a=n.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=P[t+":"+(r.nid||a)];o&&(e=o.serialize(e,r));var s=e,i=e.nss;return s.path=(a||r.nid)+":"+i,s}},es=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ei={scheme:"urn:uuid",parse:function(e,r){return e.uuid=e.nss,e.nss=void 0,r.tolerant||e.uuid&&e.uuid.match(es)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,r){return e.nss=(e.uuid||"").toLowerCase(),e}};P[U.scheme]=U,P[V.scheme]=V,P[H.scheme]=H,P[K.scheme]=K,P[et.scheme]=et,P[eo.scheme]=eo,P[ei.scheme]=ei,e.SCHEMES=P,e.pctEncChar=S,e.pctDecChars=z,e.parse=A,e.removeDotSegments=N,e.serialize=F,e.resolveComponents=L,e.resolve=function(e,r,t){var a=function(e,r){if(r)for(var t in r)e[t]=r[t];return e}({scheme:"null"},t);return F(L(A(e,a),A(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=F(A(e,r),r):"object"===a(e)&&(e=A(F(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=F(A(e,t),t):"object"===a(e)&&(e=F(e,t)),"string"==typeof r?r=F(A(r,t),t):"object"===a(r)&&(r=F(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?n.ESCAPE:i.ESCAPE,S)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})})(r)},181:function(e){"use strict";e.exports=require("buffer")},6982:function(e){"use strict";e.exports=require("crypto")},9896:function(e){"use strict";e.exports=require("fs")},7598:function(e){"use strict";e.exports=require("node:crypto")},857:function(e){"use strict";e.exports=require("os")},6928:function(e){"use strict";e.exports=require("path")},2203:function(e){"use strict";e.exports=require("stream")},9023:function(e){"use strict";e.exports=require("util")},2741:function(r){"use strict";r.exports=e},3215:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/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}')},2269:function(e){"use strict";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}')},4519:function(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330:function(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.5.2-canary.2","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"files":["dist"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.17.4","@rspack/core":"^1.6.3","ts-checker-rspack-plugin":"^1.2.0","typescript":"^5.8.3"},"devDependencies":{"@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.1","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.9","@types/node":"^22","@types/react":"^19.2.2","@types/react-dom":"^19.2.2","async-retry":"^1.3.3","chalk":"^5.3.0","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.0.0","dotenv":"^16.5.0","express":"^4.22.0","fs-extra":"^11.3.0","glob":"^11.0.2","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.2","memfs":"^4.17.2","raw-body":"^3.0.0","tsx":"^4.19.4"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.24.4"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return a[e].call(t.exports,t,t.exports,s),t.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,a){if(1&a&&(e=this(e)),8&a||"object"==typeof e&&e&&(4&a&&e.__esModule||16&a&&"function"==typeof e.then))return e;var o=Object.create(null);s.r(o);var i={};r=r||[null,t({}),t([]),t(t)];for(var n=2&a&&e;("object"==typeof n||"function"==typeof n)&&!~r.indexOf(n);n=t(n))Object.getOwnPropertyNames(n).forEach(r=>{i[r]=()=>e[r]});return i.default=()=>e,s.d(o,i),o},s.d=(e,r)=>{for(var t in r)s.o(r,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";let e;s.r(i),s.d(i,{createHTTPClient:()=>r4,createContext:()=>y,jwtAuthMiddleware:()=>f,apiKeyAuthMiddleware:()=>p,completable:()=>b});var r,t,a,o=s(8583),n=s.n(o),l=s(2741);let c=l.z.object({apiKey:l.z.string().optional(),headerName:l.z.string().optional(),validateApiKey:l.z.function().args(l.z.string()).returns(l.z.promise(l.z.boolean())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),u="Unauthorized: Missing or invalid API key";function p(e){let r=c.safeParse(e);if(!r.success){let t="apiKey"in e,a="validateApiKey"in e;if(t&&a)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(t||a)throw Error(`Invalid configuration: ${r.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let t=e.headerName??"x-api-key",a="apiKey"in e?e.apiKey:void 0,o="validateApiKey"in e?e.validateApiKey:void 0;return async(r,s,i)=>{let n=r.header(t);!n||"apiKey"in e&&n!==a||o&&!await o(n)?s.status(401).json({error:u}):i()}}var h=s(7619),d=s.n(h);function f(e){return(r,t,a)=>{let o=r.header("Authorization");if(!o||!o.startsWith("Bearer "))return void t.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let s=o.slice(7).trim();if(!s)return void t.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:t,...o}=e;r.user=d().verify(s,t,o),a()}catch(e){t.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let m=require("async_hooks"),v=(e,r)=>{globalThis[e]=r},g=e=>globalThis[e];function y({name:e}){let r=Symbol.for(`xmcp-context-${e}`),t=Symbol.for(`xmcp-context-${e}-fallback-store`);if(g(r))return g(r);let a=new m.AsyncLocalStorage,o=globalThis[t]??{current:null};v(t,o);let s={provider:(e,r)=>(o.current=e,a.run(e,r)),getContext:()=>{let r=a.getStore();if(r)return r;if(o.current)return o.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:r=>{let t=a.getStore()??o.current;if(!t)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(t,r)}};return v(r,s),s}(t||(t={})).Completable="McpCompletable";class E extends l.ZodType{_parse(e){let{ctx:r}=this._processInputParams(e),t=r.data;return this._def.type._parse({data:t,path:r.path,parent:r})}unwrap(){return this._def.type}}function b(e,r){return E.create(e,{...e._def,complete:r})}E.create=(e,r)=>new E({type:e,typeName:t.Completable,complete:r.complete,...function(e){if(!e)return{};let{errorMap:r,invalid_type_error:t,required_error:a,description:o}=e;if(r&&(t||a))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return r?{errorMap:r,description:o}:{errorMap:(r,o)=>{var s,i;let{message:n}=e;return"invalid_enum_value"===r.code?{message:null!=n?n:o.defaultError}:void 0===o.data?{message:null!=(s=null!=n?n:a)?s:o.defaultError}:"invalid_type"!==r.code?{message:o.defaultError}:{message:null!=(i=null!=n?n:t)?i:o.defaultError}},description:o}}(r)});let _="2025-06-18",w=[_,"2025-03-26","2024-11-05","2024-10-07"],P=l.z.union([l.z.string(),l.z.number().int()]),S=l.z.string(),z=l.z.object({progressToken:l.z.optional(P)}).passthrough(),x=l.z.object({_meta:l.z.optional(z)}).passthrough(),$=l.z.object({method:l.z.string(),params:l.z.optional(x)}),R=l.z.object({_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),j=l.z.object({method:l.z.string(),params:l.z.optional(R)}),I=l.z.object({_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),O=l.z.union([l.z.string(),l.z.number().int()]),A=l.z.object({jsonrpc:l.z.literal("2.0"),id:O}).merge($).strict(),T=l.z.object({jsonrpc:l.z.literal("2.0")}).merge(j).strict(),D=l.z.object({jsonrpc:l.z.literal("2.0"),id:O,result:I}).strict(),k=e=>D.safeParse(e).success;(r=a||(a={}))[r.ConnectionClosed=-32e3]="ConnectionClosed",r[r.RequestTimeout=-32001]="RequestTimeout",r[r.ParseError=-32700]="ParseError",r[r.InvalidRequest=-32600]="InvalidRequest",r[r.MethodNotFound=-32601]="MethodNotFound",r[r.InvalidParams=-32602]="InvalidParams",r[r.InternalError=-32603]="InternalError";let C=l.z.object({jsonrpc:l.z.literal("2.0"),id:O,error:l.z.object({code:l.z.number().int(),message:l.z.string(),data:l.z.optional(l.z.unknown())})}).strict(),N=l.z.union([A,T,D,C]),F=I.strict(),L=j.extend({method:l.z.literal("notifications/cancelled"),params:R.extend({requestId:O,reason:l.z.string().optional()})}),q=l.z.object({src:l.z.string(),mimeType:l.z.optional(l.z.string()),sizes:l.z.optional(l.z.array(l.z.string()))}).passthrough(),U=l.z.object({icons:l.z.array(q).optional()}).passthrough(),V=l.z.object({name:l.z.string(),title:l.z.optional(l.z.string())}).passthrough(),M=V.extend({version:l.z.string(),websiteUrl:l.z.optional(l.z.string())}).merge(U),H=l.z.object({experimental:l.z.optional(l.z.object({}).passthrough()),sampling:l.z.optional(l.z.object({}).passthrough()),elicitation:l.z.optional(l.z.object({}).passthrough()),roots:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough())}).passthrough(),K=$.extend({method:l.z.literal("initialize"),params:x.extend({protocolVersion:l.z.string(),capabilities:H,clientInfo:M})}),B=l.z.object({experimental:l.z.optional(l.z.object({}).passthrough()),logging:l.z.optional(l.z.object({}).passthrough()),completions:l.z.optional(l.z.object({}).passthrough()),prompts:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough()),resources:l.z.optional(l.z.object({subscribe:l.z.optional(l.z.boolean()),listChanged:l.z.optional(l.z.boolean())}).passthrough()),tools:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough())}).passthrough(),Q=I.extend({protocolVersion:l.z.string(),capabilities:B,serverInfo:M,instructions:l.z.optional(l.z.string())}),G=j.extend({method:l.z.literal("notifications/initialized")}),J=$.extend({method:l.z.literal("ping")}),W=l.z.object({progress:l.z.number(),total:l.z.optional(l.z.number()),message:l.z.optional(l.z.string())}).passthrough(),X=j.extend({method:l.z.literal("notifications/progress"),params:R.merge(W).extend({progressToken:P})}),Y=$.extend({params:x.extend({cursor:l.z.optional(S)}).optional()}),Z=I.extend({nextCursor:l.z.optional(S)}),ee=l.z.object({uri:l.z.string(),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),er=ee.extend({text:l.z.string()}),et=l.z.string().refine(e=>{try{return atob(e),!0}catch(e){return!1}},{message:"Invalid Base64 string"}),ea=ee.extend({blob:et}),eo=V.extend({uri:l.z.string(),description:l.z.optional(l.z.string()),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),es=V.extend({uriTemplate:l.z.string(),description:l.z.optional(l.z.string()),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),ei=Y.extend({method:l.z.literal("resources/list")}),en=Z.extend({resources:l.z.array(eo)}),el=Y.extend({method:l.z.literal("resources/templates/list")}),ec=Z.extend({resourceTemplates:l.z.array(es)}),eu=$.extend({method:l.z.literal("resources/read"),params:x.extend({uri:l.z.string()})}),ep=I.extend({contents:l.z.array(l.z.union([er,ea]))}),eh=j.extend({method:l.z.literal("notifications/resources/list_changed")}),ed=$.extend({method:l.z.literal("resources/subscribe"),params:x.extend({uri:l.z.string()})}),ef=$.extend({method:l.z.literal("resources/unsubscribe"),params:x.extend({uri:l.z.string()})}),em=j.extend({method:l.z.literal("notifications/resources/updated"),params:R.extend({uri:l.z.string()})}),ev=l.z.object({name:l.z.string(),description:l.z.optional(l.z.string()),required:l.z.optional(l.z.boolean())}).passthrough(),eg=V.extend({description:l.z.optional(l.z.string()),arguments:l.z.optional(l.z.array(ev)),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),ey=Y.extend({method:l.z.literal("prompts/list")}),eE=Z.extend({prompts:l.z.array(eg)}),eb=$.extend({method:l.z.literal("prompts/get"),params:x.extend({name:l.z.string(),arguments:l.z.optional(l.z.record(l.z.string()))})}),e_=l.z.object({type:l.z.literal("text"),text:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),ew=l.z.object({type:l.z.literal("image"),data:et,mimeType:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),eP=l.z.object({type:l.z.literal("audio"),data:et,mimeType:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),eS=l.z.object({type:l.z.literal("resource"),resource:l.z.union([er,ea]),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),ez=eo.extend({type:l.z.literal("resource_link")}),ex=l.z.union([e_,ew,eP,ez,eS]),e$=l.z.object({role:l.z.enum(["user","assistant"]),content:ex}).passthrough(),eR=I.extend({description:l.z.optional(l.z.string()),messages:l.z.array(e$)}),ej=j.extend({method:l.z.literal("notifications/prompts/list_changed")}),eI=l.z.object({title:l.z.optional(l.z.string()),readOnlyHint:l.z.optional(l.z.boolean()),destructiveHint:l.z.optional(l.z.boolean()),idempotentHint:l.z.optional(l.z.boolean()),openWorldHint:l.z.optional(l.z.boolean())}).passthrough(),eO=V.extend({description:l.z.optional(l.z.string()),inputSchema:l.z.object({type:l.z.literal("object"),properties:l.z.optional(l.z.object({}).passthrough()),required:l.z.optional(l.z.array(l.z.string()))}).passthrough(),outputSchema:l.z.optional(l.z.object({type:l.z.literal("object"),properties:l.z.optional(l.z.object({}).passthrough()),required:l.z.optional(l.z.array(l.z.string()))}).passthrough()),annotations:l.z.optional(eI),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),eA=Y.extend({method:l.z.literal("tools/list")}),eT=Z.extend({tools:l.z.array(eO)}),eD=I.extend({content:l.z.array(ex).default([]),structuredContent:l.z.object({}).passthrough().optional(),isError:l.z.optional(l.z.boolean())});eD.or(I.extend({toolResult:l.z.unknown()}));let ek=$.extend({method:l.z.literal("tools/call"),params:x.extend({name:l.z.string(),arguments:l.z.optional(l.z.record(l.z.unknown()))})}),eC=j.extend({method:l.z.literal("notifications/tools/list_changed")}),eN=l.z.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),eF=$.extend({method:l.z.literal("logging/setLevel"),params:x.extend({level:eN})}),eL=j.extend({method:l.z.literal("notifications/message"),params:R.extend({level:eN,logger:l.z.optional(l.z.string()),data:l.z.unknown()})}),eq=l.z.object({name:l.z.string().optional()}).passthrough(),eU=l.z.object({hints:l.z.optional(l.z.array(eq)),costPriority:l.z.optional(l.z.number().min(0).max(1)),speedPriority:l.z.optional(l.z.number().min(0).max(1)),intelligencePriority:l.z.optional(l.z.number().min(0).max(1))}).passthrough(),eV=l.z.object({role:l.z.enum(["user","assistant"]),content:l.z.union([e_,ew,eP])}).passthrough(),eM=$.extend({method:l.z.literal("sampling/createMessage"),params:x.extend({messages:l.z.array(eV),systemPrompt:l.z.optional(l.z.string()),includeContext:l.z.optional(l.z.enum(["none","thisServer","allServers"])),temperature:l.z.optional(l.z.number()),maxTokens:l.z.number().int(),stopSequences:l.z.optional(l.z.array(l.z.string())),metadata:l.z.optional(l.z.object({}).passthrough()),modelPreferences:l.z.optional(eU)})}),eH=I.extend({model:l.z.string(),stopReason:l.z.optional(l.z.enum(["endTurn","stopSequence","maxTokens"]).or(l.z.string())),role:l.z.enum(["user","assistant"]),content:l.z.discriminatedUnion("type",[e_,ew,eP])}),eK=l.z.object({type:l.z.literal("boolean"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),default:l.z.optional(l.z.boolean())}).passthrough(),eB=l.z.object({type:l.z.literal("string"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),minLength:l.z.optional(l.z.number()),maxLength:l.z.optional(l.z.number()),format:l.z.optional(l.z.enum(["email","uri","date","date-time"]))}).passthrough(),eQ=l.z.object({type:l.z.enum(["number","integer"]),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),minimum:l.z.optional(l.z.number()),maximum:l.z.optional(l.z.number())}).passthrough(),eG=l.z.object({type:l.z.literal("string"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),enum:l.z.array(l.z.string()),enumNames:l.z.optional(l.z.array(l.z.string()))}).passthrough(),eJ=l.z.union([eK,eB,eQ,eG]),eW=$.extend({method:l.z.literal("elicitation/create"),params:x.extend({message:l.z.string(),requestedSchema:l.z.object({type:l.z.literal("object"),properties:l.z.record(l.z.string(),eJ),required:l.z.optional(l.z.array(l.z.string()))}).passthrough()})}),eX=I.extend({action:l.z.enum(["accept","decline","cancel"]),content:l.z.optional(l.z.record(l.z.string(),l.z.unknown()))}),eY=l.z.object({type:l.z.literal("ref/resource"),uri:l.z.string()}).passthrough(),eZ=l.z.object({type:l.z.literal("ref/prompt"),name:l.z.string()}).passthrough(),e0=$.extend({method:l.z.literal("completion/complete"),params:x.extend({ref:l.z.union([eZ,eY]),argument:l.z.object({name:l.z.string(),value:l.z.string()}).passthrough(),context:l.z.optional(l.z.object({arguments:l.z.optional(l.z.record(l.z.string(),l.z.string()))}))})}),e1=I.extend({completion:l.z.object({values:l.z.array(l.z.string()).max(100),total:l.z.optional(l.z.number().int()),hasMore:l.z.optional(l.z.boolean())}).passthrough()}),e2=l.z.object({uri:l.z.string().startsWith("file://"),name:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),e9=$.extend({method:l.z.literal("roots/list")}),e5=I.extend({roots:l.z.array(e2)}),e4=j.extend({method:l.z.literal("notifications/roots/list_changed")});l.z.union([J,K,e0,eF,eb,ey,ei,el,eu,ed,ef,ek,eA]),l.z.union([L,X,G,e4]),l.z.union([F,eH,eX,e5]),l.z.union([J,eM,eW,e9]),l.z.union([L,X,eL,em,eh,eC,ej]),l.z.union([F,Q,e1,eR,eE,en,ec,ep,eD,eT]);class e6 extends Error{constructor(e,r,t){super(`MCP error ${e}: ${r}`),this.code=e,this.data=t,this.name="McpError"}}class e3{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(L,e=>{let r=this._requestHandlerAbortControllers.get(e.params.requestId);null==r||r.abort(e.params.reason)}),this.setNotificationHandler(X,e=>{this._onprogress(e)}),this.setRequestHandler(J,e=>({}))}_setupTimeout(e,r,t,a,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:t,resetTimeoutOnProgress:o,onTimeout:a})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let t=Date.now()-r.startTime;if(r.maxTotalTimeout&&t>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new e6(a.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:t});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,t,a;this._transport=e;let o=null==(r=this.transport)?void 0:r.onclose;this._transport.onclose=()=>{null==o||o(),this._onclose()};let s=null==(t=this.transport)?void 0:t.onerror;this._transport.onerror=e=>{null==s||s(e),this._onerror(e)};let i=null==(a=this._transport)?void 0:a.onmessage;this._transport.onmessage=(e,r)=>{if(null==i||i(e,r),k(e)||C.safeParse(e).success)this._onresponse(e);else if(A.safeParse(e).success)this._onrequest(e,r);else T.safeParse(e).success?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){var e;let r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,null==(e=this.onclose)||e.call(this);let t=new e6(a.ConnectionClosed,"Connection closed");for(let e of r.values())e(t)}_onerror(e){var r;null==(r=this.onerror)||r.call(this,e)}_onnotification(e){var r;let t=null!=(r=this._notificationHandlers.get(e.method))?r:this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,r){var t,o;let s=null!=(t=this._requestHandlers.get(e.method))?t:this.fallbackRequestHandler,i=this._transport;if(void 0===s){null==i||i.send({jsonrpc:"2.0",id:e.id,error:{code:a.MethodNotFound,message:"Method not found"}}).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);let l={signal:n.signal,sessionId:null==i?void 0:i.sessionId,_meta:null==(o=e.params)?void 0:o._meta,sendNotification:r=>this.notification(r,{relatedRequestId:e.id}),sendRequest:(r,t,a)=>this.request(r,t,{...a,relatedRequestId:e.id}),authInfo:null==r?void 0:r.authInfo,requestId:e.id,requestInfo:null==r?void 0:r.requestInfo};Promise.resolve().then(()=>s(e,l)).then(r=>{if(!n.signal.aborted)return null==i?void 0:i.send({result:r,jsonrpc:"2.0",id:e.id})},r=>{var t;if(!n.signal.aborted)return null==i?void 0:i.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(r.code)?r.code:a.InternalError,message:null!=(t=r.message)?t:"Internal error"}})}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...t}=e.params,a=Number(r),o=this._progressHandlers.get(a);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let s=this._responseHandlers.get(a),i=this._timeoutInfo.get(a);if(i&&s&&i.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(e){s(e);return}o(t)}_onresponse(e){let r=Number(e.id),t=this._responseHandlers.get(r);void 0===t?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),t(k(e)?e:new e6(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){var e;await (null==(e=this._transport)?void 0:e.close())}request(e,r,t){let{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}=null!=t?t:{};return new Promise((n,l)=>{var c,u,p,h,d,f;if(!this._transport)return void l(Error("Not connected"));(null==(c=this._options)?void 0:c.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),null==(u=null==t?void 0:t.signal)||u.throwIfAborted();let m=this._requestMessageId++,v={...e,jsonrpc:"2.0",id:m};(null==t?void 0:t.onprogress)&&(this._progressHandlers.set(m,t.onprogress),v.params={...e.params,_meta:{...(null==(p=e.params)?void 0:p._meta)||{},progressToken:m}});let g=e=>{var r;this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),null==(r=this._transport)||r.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(e)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e)};this._responseHandlers.set(m,e=>{var a;if(null==(a=null==t?void 0:t.signal)||!a.aborted){if(e instanceof Error)return l(e);try{let t=r.parse(e.result);n(t)}catch(e){l(e)}}}),null==(h=null==t?void 0:t.signal)||h.addEventListener("abort",()=>{var e;g(null==(e=null==t?void 0:t.signal)?void 0:e.reason)});let y=null!=(d=null==t?void 0:t.timeout)?d:6e4;this._setupTimeout(m,y,null==t?void 0:t.maxTotalTimeout,()=>g(new e6(a.RequestTimeout,"Request timed out",{timeout:y})),null!=(f=null==t?void 0:t.resetTimeoutOnProgress)&&f),this._transport.send(v,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(m),l(e)})})}async notification(e,r){var t,a;if(!this._transport)throw Error("Not connected");if(this.assertNotificationCapability(e.method),(null!=(a=null==(t=this._options)?void 0:t.debouncedNotificationMethods)?a:[]).includes(e.method)&&!e.params&&!(null==r?void 0:r.relatedRequestId)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var t;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let a={...e,jsonrpc:"2.0"};null==(t=this._transport)||t.send(a,r).catch(e=>this._onerror(e))});return}let o={...e,jsonrpc:"2.0"};await this._transport.send(o,r)}setRequestHandler(e,r){let t=e.shape.method.value;this.assertRequestHandlerCapability(t),this._requestHandlers.set(t,(t,a)=>Promise.resolve(r(e.parse(t),a)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,t=>Promise.resolve(r(e.parse(t))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}var e8=s(3084);class e7 extends e3{constructor(e,r){var t;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=null!=(t=null==r?void 0:r.capabilities)?t:{},this._ajv=new e8}registerCapabilities(e){var r;if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=(r=this._capabilities,Object.entries(e).reduce((e,[r,t])=>(t&&"object"==typeof t?e[r]=e[r]?{...e[r],...t}:t:e[r]=t,e),{...r}))}assertCapability(e,r){var t;if(!(null==(t=this._serverCapabilities)?void 0:t[e]))throw Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),void 0===e.sessionId)try{let t=await this.request({method:"initialize",params:{protocolVersion:_,capabilities:this._capabilities,clientInfo:this._clientInfo}},Q,r);if(void 0===t)throw Error(`Server sent invalid initialize result: ${t}`);if(!w.includes(t.protocolVersion))throw Error(`Server's protocol version is not supported: ${t.protocolVersion}`);this._serverCapabilities=t.capabilities,this._serverVersion=t.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(t.protocolVersion),this._instructions=t.instructions,await this.notification({method:"notifications/initialized"})}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,t,a,o,s;switch(e){case"logging/setLevel":if(!(null==(r=this._serverCapabilities)?void 0:r.logging))throw Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(null==(t=this._serverCapabilities)?void 0:t.prompts))throw Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(null==(a=this._serverCapabilities)?void 0:a.resources))throw Error(`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(null==(o=this._serverCapabilities)?void 0:o.tools))throw Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(null==(s=this._serverCapabilities)?void 0:s.completions))throw Error(`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){var r;if("notifications/roots/list_changed"===e&&!(null==(r=this._capabilities.roots)?void 0:r.listChanged))throw Error(`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},F,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},e1,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},F,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},eR,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},eE,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},en,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},ec,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},ep,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},F,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},F,r)}async callTool(e,r=eD,t){let o=await this.request({method:"tools/call",params:e},r,t),s=this.getToolOutputValidator(e.name);if(s){if(!o.structuredContent&&!o.isError)throw new e6(a.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{if(!s(o.structuredContent))throw new e6(a.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(e){if(e instanceof e6)throw e;throw new e6(a.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}cacheToolOutputSchemas(e){for(let r of(this._cachedToolOutputValidators.clear(),e))if(r.outputSchema)try{let e=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,e)}catch(e){}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let t=await this.request({method:"tools/list",params:e},eT,r);return this.cacheToolOutputSchemas(t.tools),t}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}async function re(r){return(await e).getRandomValues(new Uint8Array(r))}async function rr(e){let r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",t="",a=await re(e);for(let o=0;o<e;o++){let e=a[o]%r.length;t+=r[e]}return t}async function rt(e){return await rr(e)}async function ra(r){return btoa(String.fromCharCode(...new Uint8Array(await (await e).subtle.digest("SHA-256",new TextEncoder().encode(r))))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function ro(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let r=await rt(e),t=await ra(r);return{code_verifier:r,code_challenge:t}}e=globalThis.crypto?.webcrypto??globalThis.crypto??Promise.resolve().then(s.t.bind(s,7598,19)).then(e=>e.webcrypto);let rs=l.z.string().url().superRefine((e,r)=>{if(!URL.canParse(e))return r.addIssue({code:l.z.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),l.z.NEVER}).refine(e=>{let r=new URL(e);return"javascript:"!==r.protocol&&"data:"!==r.protocol&&"vbscript:"!==r.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),ri=l.z.object({resource:l.z.string().url(),authorization_servers:l.z.array(rs).optional(),jwks_uri:l.z.string().url().optional(),scopes_supported:l.z.array(l.z.string()).optional(),bearer_methods_supported:l.z.array(l.z.string()).optional(),resource_signing_alg_values_supported:l.z.array(l.z.string()).optional(),resource_name:l.z.string().optional(),resource_documentation:l.z.string().optional(),resource_policy_uri:l.z.string().url().optional(),resource_tos_uri:l.z.string().url().optional(),tls_client_certificate_bound_access_tokens:l.z.boolean().optional(),authorization_details_types_supported:l.z.array(l.z.string()).optional(),dpop_signing_alg_values_supported:l.z.array(l.z.string()).optional(),dpop_bound_access_tokens_required:l.z.boolean().optional()}).passthrough(),rn=l.z.object({issuer:l.z.string(),authorization_endpoint:rs,token_endpoint:rs,registration_endpoint:rs.optional(),scopes_supported:l.z.array(l.z.string()).optional(),response_types_supported:l.z.array(l.z.string()),response_modes_supported:l.z.array(l.z.string()).optional(),grant_types_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),service_documentation:rs.optional(),revocation_endpoint:rs.optional(),revocation_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),introspection_endpoint:l.z.string().optional(),introspection_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),code_challenge_methods_supported:l.z.array(l.z.string()).optional()}).passthrough(),rl=l.z.object({issuer:l.z.string(),authorization_endpoint:rs,token_endpoint:rs,userinfo_endpoint:rs.optional(),jwks_uri:rs,registration_endpoint:rs.optional(),scopes_supported:l.z.array(l.z.string()).optional(),response_types_supported:l.z.array(l.z.string()),response_modes_supported:l.z.array(l.z.string()).optional(),grant_types_supported:l.z.array(l.z.string()).optional(),acr_values_supported:l.z.array(l.z.string()).optional(),subject_types_supported:l.z.array(l.z.string()),id_token_signing_alg_values_supported:l.z.array(l.z.string()),id_token_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),id_token_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),userinfo_signing_alg_values_supported:l.z.array(l.z.string()).optional(),userinfo_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),userinfo_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),request_object_signing_alg_values_supported:l.z.array(l.z.string()).optional(),request_object_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),request_object_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),display_values_supported:l.z.array(l.z.string()).optional(),claim_types_supported:l.z.array(l.z.string()).optional(),claims_supported:l.z.array(l.z.string()).optional(),service_documentation:l.z.string().optional(),claims_locales_supported:l.z.array(l.z.string()).optional(),ui_locales_supported:l.z.array(l.z.string()).optional(),claims_parameter_supported:l.z.boolean().optional(),request_parameter_supported:l.z.boolean().optional(),request_uri_parameter_supported:l.z.boolean().optional(),require_request_uri_registration:l.z.boolean().optional(),op_policy_uri:rs.optional(),op_tos_uri:rs.optional()}).passthrough().merge(rn.pick({code_challenge_methods_supported:!0})),rc=l.z.object({access_token:l.z.string(),id_token:l.z.string().optional(),token_type:l.z.string(),expires_in:l.z.number().optional(),scope:l.z.string().optional(),refresh_token:l.z.string().optional()}).strip(),ru=l.z.object({error:l.z.string(),error_description:l.z.string().optional(),error_uri:l.z.string().optional()}),rp=rs.optional().or(l.z.literal("").transform(()=>void 0)),rh=l.z.object({redirect_uris:l.z.array(rs),token_endpoint_auth_method:l.z.string().optional(),grant_types:l.z.array(l.z.string()).optional(),response_types:l.z.array(l.z.string()).optional(),client_name:l.z.string().optional(),client_uri:rs.optional(),logo_uri:rp,scope:l.z.string().optional(),contacts:l.z.array(l.z.string()).optional(),tos_uri:rp,policy_uri:l.z.string().optional(),jwks_uri:rs.optional(),jwks:l.z.any().optional(),software_id:l.z.string().optional(),software_version:l.z.string().optional(),software_statement:l.z.string().optional()}).strip(),rd=l.z.object({client_id:l.z.string(),client_secret:l.z.string().optional(),client_id_issued_at:l.z.number().optional(),client_secret_expires_at:l.z.number().optional()}).strip(),rf=rh.merge(rd);l.z.object({error:l.z.string(),error_description:l.z.string().optional()}).strip(),l.z.object({token:l.z.string(),token_type_hint:l.z.string().optional()}).strip();class rm extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class rv extends rm{}rv.errorCode="invalid_request";class rg extends rm{}rg.errorCode="invalid_client";class ry extends rm{}ry.errorCode="invalid_grant";class rE extends rm{}rE.errorCode="unauthorized_client";class rb extends rm{}rb.errorCode="unsupported_grant_type";class r_ extends rm{}r_.errorCode="invalid_scope";class rw extends rm{}rw.errorCode="access_denied";class rP extends rm{}rP.errorCode="server_error";class rS extends rm{}rS.errorCode="temporarily_unavailable";class rz extends rm{}rz.errorCode="unsupported_response_type";class rx extends rm{}rx.errorCode="unsupported_token_type";class r$ extends rm{}r$.errorCode="invalid_token";class rR extends rm{}rR.errorCode="method_not_allowed";class rj extends rm{}rj.errorCode="too_many_requests";class rI extends rm{}rI.errorCode="invalid_client_metadata";class rO extends rm{}rO.errorCode="insufficient_scope";let rA={[rv.errorCode]:rv,[rg.errorCode]:rg,[ry.errorCode]:ry,[rE.errorCode]:rE,[rb.errorCode]:rb,[r_.errorCode]:r_,[rw.errorCode]:rw,[rP.errorCode]:rP,[rS.errorCode]:rS,[rz.errorCode]:rz,[rx.errorCode]:rx,[r$.errorCode]:r$,[rR.errorCode]:rR,[rj.errorCode]:rj,[rI.errorCode]:rI,[rO.errorCode]:rO};class rT extends Error{constructor(e){super(null!=e?e:"Unauthorized")}}let rD="code",rk="S256";function rC(e,r){let t=void 0!==e.client_secret;return 0===r.length?t?"client_secret_post":"none":t&&r.includes("client_secret_basic")?"client_secret_basic":t&&r.includes("client_secret_post")?"client_secret_post":r.includes("none")?"none":t?"client_secret_post":"none"}function rN(e,r,t,a){let{client_id:o,client_secret:s}=r;switch(e){case"client_secret_basic":var i,n,l,c,u=o,p=s,h=t;if(!p)throw Error("client_secret_basic authentication requires a client_secret");let d=btoa(`${u}:${p}`);h.set("Authorization",`Basic ${d}`);return;case"client_secret_post":i=o,n=s,(l=a).set("client_id",i),n&&l.set("client_secret",n);return;case"none":c=o,a.set("client_id",c);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}async function rF(e){let r=e instanceof Response?e.status:void 0,t=e instanceof Response?await e.text():e;try{let{error:e,error_description:r,error_uri:a}=ru.parse(JSON.parse(t));return new(rA[e]||rP)(r||"",a)}catch(e){return new rP(`${r?`HTTP ${r}: `:""}Invalid OAuth error response: ${e}. Raw body: ${t}`)}}async function rL(e,r){var t,a;try{return await rq(e,r)}catch(o){if(o instanceof rg||o instanceof rE)return await (null==(t=e.invalidateCredentials)?void 0:t.call(e,"all")),await rq(e,r);if(o instanceof ry)return await (null==(a=e.invalidateCredentials)?void 0:a.call(e,"tokens")),await rq(e,r);throw o}}async function rq(e,{serverUrl:r,authorizationCode:t,scope:a,resourceMetadataUrl:o,fetchFn:s}){let i,n;try{(i=await rV(r,{resourceMetadataUrl:o},s)).authorization_servers&&i.authorization_servers.length>0&&(n=i.authorization_servers[0])}catch(e){}n||(n=r);let l=await rU(r,e,i),c=await rB(n,{fetchFn:s}),u=await Promise.resolve(e.clientInformation());if(!u){if(void 0!==t)throw Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let r=await rW(n,{metadata:c,clientMetadata:e.clientMetadata,fetchFn:s});await e.saveClientInformation(r),u=r}if(void 0!==t){let r=await e.codeVerifier(),a=await rG(n,{metadata:c,clientInformation:u,authorizationCode:t,codeVerifier:r,redirectUri:e.redirectUrl,resource:l,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(a),"AUTHORIZED"}let p=await e.tokens();if(null==p?void 0:p.refresh_token)try{let r=await rJ(n,{metadata:c,clientInformation:u,refreshToken:p.refresh_token,resource:l,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(r),"AUTHORIZED"}catch(e){if(!(e instanceof rm)||e instanceof rP);else throw e}let h=e.state?await e.state():void 0,{authorizationUrl:d,codeVerifier:f}=await rQ(n,{metadata:c,clientInformation:u,state:h,redirectUrl:e.redirectUrl,scope:a||e.clientMetadata.scope,resource:l});return await e.saveCodeVerifier(f),await e.redirectToAuthorization(d),"REDIRECT"}async function rU(e,r,t){let a,o=((a=new URL("string"==typeof e?e:e.href)).hash="",a);if(r.validateResourceURL)return await r.validateResourceURL(o,null==t?void 0:t.resource);if(t){if(!function({requestedResource:e,configuredResource:r}){let t=new URL("string"==typeof e?e:e.href),a=new URL("string"==typeof r?r:r.href);if(t.origin!==a.origin||t.pathname.length<a.pathname.length)return!1;let o=t.pathname.endsWith("/")?t.pathname:t.pathname+"/",s=a.pathname.endsWith("/")?a.pathname:a.pathname+"/";return o.startsWith(s)}({requestedResource:o,configuredResource:t.resource}))throw Error(`Protected resource ${t.resource} does not match expected ${o} (or origin)`);return new URL(t.resource)}}async function rV(e,r,t=fetch){let a=await rK(e,"oauth-protected-resource",t,{protocolVersion:null==r?void 0:r.protocolVersion,metadataUrl:null==r?void 0:r.resourceMetadataUrl});if(!a||404===a.status)throw Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!a.ok)throw Error(`HTTP ${a.status} trying to load well-known OAuth protected resource metadata.`);return ri.parse(await a.json())}async function rM(e,r,t=fetch){try{return await t(e,{headers:r})}catch(a){if(a instanceof TypeError)if(r)return rM(e,void 0,t);else return;throw a}}async function rH(e,r,t=fetch){return await rM(e,{"MCP-Protocol-Version":r},t)}async function rK(e,r,t,a){var o,s,i,n;let l,c=new URL(e),u=null!=(o=null==a?void 0:a.protocolVersion)?o:_;(null==a?void 0:a.metadataUrl)?l=new URL(a.metadataUrl):(l=new URL(function(e,r="",t={}){return r.endsWith("/")&&(r=r.slice(0,-1)),t.prependPathname?`${r}/.well-known/${e}`:`/.well-known/${e}${r}`}(r,c.pathname),null!=(s=null==a?void 0:a.metadataServerUrl)?s:c)).search=c.search;let p=await rH(l,u,t);if(!(null==a?void 0:a.metadataUrl)&&(i=p,n=c.pathname,!i||i.status>=400&&i.status<500&&"/"!==n)){let e=new URL(`/.well-known/${r}`,c);p=await rH(e,u,t)}return p}async function rB(e,{fetchFn:r=fetch,protocolVersion:t=_}={}){let a={"MCP-Protocol-Version":t,Accept:"application/json"};for(let{url:t,type:o}of function(e){let r="string"==typeof e?new URL(e):e,t="/"!==r.pathname,a=[];if(!t)return a.push({url:new URL("/.well-known/oauth-authorization-server",r.origin),type:"oauth"}),a.push({url:new URL("/.well-known/openid-configuration",r.origin),type:"oidc"}),a;let o=r.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),a.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,r.origin),type:"oauth"}),a.push({url:new URL("/.well-known/oauth-authorization-server",r.origin),type:"oauth"}),a.push({url:new URL(`/.well-known/openid-configuration${o}`,r.origin),type:"oidc"}),a.push({url:new URL(`${o}/.well-known/openid-configuration`,r.origin),type:"oidc"}),a}(e)){let e=await rM(t,a,r);if(e){if(!e.ok){if(e.status>=400&&e.status<500)continue;throw Error(`HTTP ${e.status} trying to load ${"oauth"===o?"OAuth":"OpenID provider"} metadata from ${t}`)}if("oauth"===o)return rn.parse(await e.json());return rl.parse(await e.json())}}}async function rQ(e,{metadata:r,clientInformation:t,redirectUrl:a,scope:o,state:s,resource:i}){let n;if(r){if(n=new URL(r.authorization_endpoint),!r.response_types_supported.includes(rD))throw Error(`Incompatible auth server: does not support response type ${rD}`);if(r.code_challenge_methods_supported&&!r.code_challenge_methods_supported.includes(rk))throw Error(`Incompatible auth server: does not support code challenge method ${rk}`)}else n=new URL("/authorize",e);let l=await ro(),c=l.code_verifier,u=l.code_challenge;return n.searchParams.set("response_type",rD),n.searchParams.set("client_id",t.client_id),n.searchParams.set("code_challenge",u),n.searchParams.set("code_challenge_method",rk),n.searchParams.set("redirect_uri",String(a)),s&&n.searchParams.set("state",s),o&&n.searchParams.set("scope",o),(null==o?void 0:o.includes("offline_access"))&&n.searchParams.append("prompt","consent"),i&&n.searchParams.set("resource",i.href),{authorizationUrl:n,codeVerifier:c}}async function rG(e,{metadata:r,clientInformation:t,authorizationCode:a,codeVerifier:o,redirectUri:s,resource:i,addClientAuthentication:n,fetchFn:l}){var c;let u="authorization_code",p=(null==r?void 0:r.token_endpoint)?new URL(r.token_endpoint):new URL("/token",e);if((null==r?void 0:r.grant_types_supported)&&!r.grant_types_supported.includes(u))throw Error(`Incompatible auth server: does not support grant type ${u}`);let h=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),d=new URLSearchParams({grant_type:u,code:a,code_verifier:o,redirect_uri:String(s)});n?n(h,d,e,r):rN(rC(t,null!=(c=null==r?void 0:r.token_endpoint_auth_methods_supported)?c:[]),t,h,d),i&&d.set("resource",i.href);let f=await (null!=l?l:fetch)(p,{method:"POST",headers:h,body:d});if(!f.ok)throw await rF(f);return rc.parse(await f.json())}async function rJ(e,{metadata:r,clientInformation:t,refreshToken:a,resource:o,addClientAuthentication:s,fetchFn:i}){var n;let l,c="refresh_token";if(r){if(l=new URL(r.token_endpoint),r.grant_types_supported&&!r.grant_types_supported.includes(c))throw Error(`Incompatible auth server: does not support grant type ${c}`)}else l=new URL("/token",e);let u=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),p=new URLSearchParams({grant_type:c,refresh_token:a});s?s(u,p,e,r):rN(rC(t,null!=(n=null==r?void 0:r.token_endpoint_auth_methods_supported)?n:[]),t,u,p),o&&p.set("resource",o.href);let h=await (null!=i?i:fetch)(l,{method:"POST",headers:u,body:p});if(!h.ok)throw await rF(h);return rc.parse({refresh_token:a,...await h.json()})}async function rW(e,{metadata:r,clientMetadata:t,fetchFn:a}){let o;if(r){if(!r.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");o=new URL(r.registration_endpoint)}else o=new URL("/register",e);let s=await (null!=a?a:fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw await rF(s);return rf.parse(await s.json())}class rX extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function rY(e){}class rZ extends TransformStream{constructor({onError:e,onRetry:r,onComment:t}={}){let a;super({start(o){a=function(e){if("function"==typeof e)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:r=rY,onError:t=rY,onRetry:a=rY,onComment:o}=e,s="",i=!0,n,l="",c="";function u(e){if(""===e)return void(l.length>0&&r({id:n,event:c||void 0,data:l.endsWith(`
|
|
1
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("zod"));else if("function"==typeof define&&define.amd)define(["zod"],r);else{var t="object"==typeof exports?r(require("zod")):r(e.zod);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}(this,e=>(()=>{var r,t,a={3084:function(e,r,t){"use strict";var a=t(2853),o=t(985),s=t(8565),i=t(812),n=t(6039),l=t(6885),c=t(698),u=t(6079),p=t(9717);e.exports=g,g.prototype.validate=function(e,r){if("string"==typeof e){if(!(t=this.getSchema(e)))throw Error('no schema with key or ref "'+e+'"')}else{var t,a=this._addSchema(e);t=a.validate||this._compile(a)}var o=t(r);return!0!==t.$async&&(this.errors=t.errors),o},g.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},g.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 i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw Error("schema id must be string");return P(this,r=o.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},g.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},g.prototype.validateSchema=function(e,r){var t,a,o=e.$schema;if(void 0!==o&&"string"!=typeof o)throw Error("$schema must be a string");if(!(o=o||this._opts.defaultMeta||(t=this,a=t._opts.meta,t._opts.defaultMeta="object"==typeof a?t._getId(a)||a:t.getSchema(f)?f:void 0,t._opts.defaultMeta)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var s=this.validate(o,e);if(!s&&r){var i="schema is invalid: "+this.errorsText();if("log"==this._opts.validateSchema)this.logger.error(i);else throw Error(i)}return s},g.prototype.getSchema=function(e){var r=y(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=o.schema.call(e,{schema:{}},r);if(t){var s=t.schema,n=t.root,l=t.baseId,c=a.call(e,s,n,void 0,l);return e._fragments[r]=new i({ref:r,fragment:!0,schema:s,root:n,baseId:l,validate:c}),c}}(this,e)}},g.prototype.removeSchema=function(e){if(e instanceof RegExp)return E(this,this._schemas,e),E(this,this._refs,e),this;switch(typeof e){case"undefined":E(this,this._schemas),E(this,this._refs),this._cache.clear();break;case"string":var r=y(this,e);r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e];break;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},g.prototype.addFormat=function(e,r){return"string"==typeof r&&(r=new RegExp(r)),this._formats[e]=r,this},g.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 i=e[s];i&&(o+=a+i.dataPath+" "+i.message+t)}return o.slice(0,-t.length)},g.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw Error("schema should be object or boolean");var s,n=this._opts.serialize,l=n?n(e):e,c=this._cache.get(l);if(c)return c;a=a||!1!==this._opts.addUsedSchema;var u=o.normalizeId(this._getId(e));u&&a&&P(this,u);var p=!1!==this._opts.validateSchema&&!r;!p||(s=u&&u==o.normalizeId(e.$schema))||this.validateSchema(e,!0);var h=o.ids.call(this,e),d=new i({id:u,schema:e,localRefs:h,cacheKey:l,meta:t});return"#"!=u[0]&&a&&(this._refs[u]=d),this._cache.put(l,d),p&&s&&this.validateSchema(e,!0),d},g.prototype._compile=function(e,r){var t,o;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;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}},g.prototype.compileAsync=t(6069);var h=t(3528);g.prototype.addKeyword=h.add,g.prototype.getKeyword=h.get,g.prototype.removeKeyword=h.remove,g.prototype.validateKeyword=h.validate;var d=t(2916);g.ValidationError=d.Validation,g.MissingRefError=d.MissingRef,g.$dataMetaSchema=u;var f="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function g(e){if(!(this instanceof g))return new g(e);e=this._opts=p.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:S,warn:S,error:S};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=l(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.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=n),this._metaOpts=function(e){for(var r=p.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),e.keywords&&function(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function(e){if(e._opts.$data&&(r=t(3215),e.addMetaSchema(r,r.$id,!0)),!1!==e._opts.meta){var r,a=t(2269);e._opts.$data&&(a=u(a,v)),e.addMetaSchema(a,f,!0),e._refs["http://json-schema.org/schema"]=f}}(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)if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function y(e,r){return r=o.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function E(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){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 Error("schema $id is different from id");return e.$id||e.id}function P(e,r){if(e._schemas[r]||e._refs[r])throw Error('schema with key or id "'+r+'" already exists')}function S(){}},8565:function(e){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,r){this._cache[e]=r},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}},6069:function(e,r,t){"use strict";var a=t(2916).MissingRef;e.exports=function e(r,t,o){var s=this;if("function"!=typeof this._opts.loadSchema)throw Error("options.loadSchema should be a function");"function"==typeof t&&(o=t,t=void 0);var i=n(r).then(function(){var e=s._addSchema(r,void 0,t);return e.validate||function e(r){try{return s._compile(r)}catch(p){if(p instanceof a){var o=p,i=o.missingSchema;if(u(i))throw Error("Schema "+i+" is loaded but "+o.missingRef+" cannot be resolved");var l=s._loadingSchemas[i];return l||(l=s._loadingSchemas[i]=s._opts.loadSchema(i)).then(c,c),l.then(function(e){if(!u(i))return n(e).then(function(){u(i)||s.addSchema(e,i,void 0,t)})}).then(function(){return e(r)});function c(){delete s._loadingSchemas[i]}function u(e){return s._refs[e]||s._schemas[e]}}throw p}}(e)});return o&&i.then(function(e){o(null,e)},o),i;function n(r){var t=r.$schema;return t&&!s.getSchema(t)?e.call(s,{$ref:t},!0):Promise.resolve()}}},2916:function(e,r,t){"use strict";var a=t(985);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}},6885:function(e,r,t){"use strict";var a=t(9717),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-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,p=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?: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,t=e.match(o);if(!t)return!1;var a=+t[1],i=+t[2],n=+t[3];return i>=1&&i<=12&&n>=1&&n<=(2==i&&(r=a)%4==0&&(r%100!=0||r%400==0)?29:s[i])}function g(e,r){var t=e.match(i);if(!t)return!1;var a=t[1],o=t[2],s=t[3],n=t[5];return(a<=23&&o<=59&&s<=59||23==a&&59==o&&60==s)&&(!r||n)}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:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:n,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:_,uuid:p,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":f},m.full={date:v,time:g,"date-time":function(e){var r=e.split(y);return 2==r.length&&v(r[0])&&g(r[1],!0)},uri:function(e){return E.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,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:_,uuid:p,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":f};var y=/t|\s/i,E=/\/|:/,b=/[^\\]\\Z/;function _(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},2853:function(e,r,t){"use strict";var a=t(985),o=t(9717),s=t(2916),i=t(6039),n=t(5572),l=o.ucs2length,c=t(7371),u=s.Validation;function p(e,r,t){var a=d.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})}function h(e,r,t){var a=d.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function d(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 m(e){return"var default"+e+" = defaults["+e+"];"}function v(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function g(e){return"var customRule"+e+" = customRules["+e+"];"}function y(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,d,E){var b=this,_=this._opts,w=[void 0],P={},S=[],z={},x=[],$={},R=[];t=t||{schema:r,refVal:w,refs:P};var j=p.call(this,r,t,E),I=this._compilations[j.index];if(j.compiling)return I.callValidate=k;var O=this._formats,A=this.RULES;try{var T=C(r,t,d,E);I.validate=T;var D=I.callValidate;return D&&(D.schema=T.schema,D.errors=null,D.refs=T.refs,D.refVal=T.refVal,D.root=T.root,D.$async=T.$async,_.sourceCode&&(D.source=T.source)),T}finally{h.call(this,r,t,E)}function k(){var e=I.validate,r=e.apply(this,arguments);return k.errors=e.errors,r}function C(r,i,p,h){var d,E=!i||i&&i.schema==r;if(i.schema!=t.schema)return e.call(b,r,i,p,h);var z=!0===r.$async,$=n({isTop:!0,schema:r,isRoot:E,baseId:h,root:i,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:s.MissingRef,RULES:A,validate:n,util:o,resolve:a,resolveRef:N,usePattern:q,useDefault:U,useCustomRule:V,opts:_,formats:O,logger:b.logger,self:b});$=y(w,v)+y(S,f)+y(x,m)+y(R,g)+$,_.processCode&&($=_.processCode($,r));try{d=Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",$)(b,A,O,t,w,x,R,c,l,u),w[0]=d}catch(e){throw b.logger.error("Error compiling schema, function code:",$),e}return d.schema=r,d.errors=null,d.refs=P,d.refVal=w,d.root=E?d:i,z&&(d.$async=!0),!0===_.sourceCode&&(d.source={code:$,patterns:S,defaults:x}),d}function N(r,o,s){var i,n,l,c,u,p=P[o=a.url(r,o)];if(void 0!==p)return L(c=w[p],u="refVal["+p+"]");if(!s&&t.refs){var h=t.refs[o];if(void 0!==h)return u=F(o,c=t.refVal[h]),L(c,u)}u=F(o);var f=a.call(b,C,t,o);if(void 0===f){var m=d&&d[o];m&&(f=a.inlineRef(m,_.inlineRefs)?m:e.call(b,m,t,d,r))}if(void 0!==f){return i=o,n=f,w[P[i]]=n,L(f,u)}l=o,delete P[l]}function F(e,r){var t=w.length;return w[t]=r,P[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 q(e){var r=z[e];return void 0===r&&(r=z[e]=S.length,S[r]=e),"pattern"+r}function U(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=i(e),t=$[r];return void 0===t&&(t=$[r]=x.length,x[t]=e),"default"+t}}function V(e,r,t,a){if(!1!==b._opts.validateSchema){var o,s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw Error("parent schema must have all required keywords: "+s.join(","));var i=e.definition.validateSchema;if(i&&!i(r)){var n="keyword schema is invalid: "+b.errorsText(i.errors);if("log"==b._opts.validateSchema)b.logger.error(n);else throw Error(n)}}var l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)o=l.call(b,r,t,a);else if(u)o=u.call(b,r,t,a),!1!==_.validateSchema&&b.validateSchema(o,!0);else if(c)o=c.call(b,a,e.keyword,r,t);else if(!(o=e.definition.validate))return;if(void 0===o)throw Error('custom keyword "'+e.keyword+'"failed to compile');var p=R.length;return R[p]=o,{code:"customRule"+p,validate:o}}}},985:function(e,r,t){"use strict";var a=t(3749),o=t(7371),s=t(9717),i=t(812),n=t(7713);function l(e,r,t){var a,o,s,n=this._refs[t];if("string"==typeof n)if(!this._refs[n])return l.call(this,e,r,n);else n=this._refs[n];if((n=n||this._schemas[t])instanceof i)return f(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var u=c.call(this,r,t);return u&&(a=u.schema,r=u.root,s=u.baseId),a instanceof i?o=a.validate||e.call(this,a.schema,r,void 0,s):void 0!==a&&(o=f(a,this._opts.inlineRefs)?a:e.call(this,a,r,void 0,s)),o}function c(e,r){var t=a.parse(r),o=v(t),s=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||o!==s){var n=y(o),l=this._refs[n];if("string"==typeof l)return u.call(this,e,l,t);if(l instanceof i)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof i))return;if(l.validate||this._compile(l),n==y(r))return{schema:l,root:e,baseId:s};e=l}if(!e.schema)return;s=m(this._getId(e.schema))}return h.call(this,t,s,e.schema,e)}function u(e,r,t){var a=c.call(this,e,r);if(a){var o=a.schema,s=a.baseId;e=a.root;var i=this._getId(o);return i&&(s=E(s,i)),h.call(this,t,s,o,e)}}e.exports=l,l.normalizeId=y,l.fullPath=m,l.url=E,l.ids=function(e){var r=y(this._getId(e)),t={"":r},i={"":m(r,!1)},l={},c=this;return n(e,{allKeys:!0},function(e,r,n,u,p,h,d){if(""!==r){var f=c._getId(e),m=t[u],v=i[u]+"/"+p;if(void 0!==d&&(v+="/"+("number"==typeof d?d:s.escapeFragment(d))),"string"==typeof f){f=m=y(m?a.resolve(m,f):f);var g=c._refs[f];if("string"==typeof g&&(g=c._refs[g]),g&&g.schema){if(!o(e,g.schema))throw Error('id "'+f+'" resolves to more than one schema')}else if(f!=y(v))if("#"==f[0]){if(l[f]&&!o(e,l[f]))throw Error('id "'+f+'" resolves to more than one schema');l[f]=e}else c._refs[f]=v}t[r]=m,i[r]=v}}),l},l.inlineRef=f,l.schema=c;var p=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("/"),i=1;i<o.length;i++){var n=o[i];if(n){if(void 0===(t=t[n=s.unescapeFragment(n)]))break;if(!p[n]&&((l=this._getId(t))&&(r=E(r,l)),t.$ref)){var l,u=E(r,t.$ref),h=c.call(this,a,u);h&&(t=h.schema,a=h.root,r=h.baseId)}}}if(void 0!==t&&t!==a.schema)return{schema:t,root:a,baseId:r}}}var d=s.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function f(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||"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(d[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 m(e,r){return!1!==r&&(e=y(e)),v(a.parse(e))}function v(e){return a.serialize(e).split("#")[0]+"#"}var g=/#\/?$/;function y(e){return e?e.replace(g,""):""}function E(e,r){return r=y(r),a.resolve(e,r)}},698:function(e,r,t){"use strict";var a=t(2004),o=t(9717).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){if("object"==typeof t){var o,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}},812:function(e,r,t){"use strict";var a=t(9717);e.exports=function(e){a.copy(e,this)}},1812:function(e){"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&&(64512&(r=e.charCodeAt(o)))==56320&&o++;return t}},9717:function(e,r,t){"use strict";function a(e,r,t,a){var o=a?" !== ":" === ",s=a?" || ":" && ",i=a?"!":"",n=a?"":"!";switch(e){case"null":return r+o+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+s+"typeof "+r+o+'"object"'+s+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+o+'"number"'+s+n+"("+r+" % 1)"+s+r+o+r+(t?s+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+o+'"'+e+'"'+(t?s+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+o+'"'+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,t){if(1===e.length)return a(e[0],r,t,!0);var o="",i=s(e);for(var n in i.array&&i.object&&(o=(i.null?"(":"(!"+r+" || ")+("typeof "+r)+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+a(n,r,t,!0);return o},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];else if("array"===e&&"array"===r)return["array"]},toHash:s,getProperty:l,escapeQuotes:c,equal:t(7371),ucs2length:t(1812),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(RegExp(r,"g"),t+"$1")},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){for(var t in e)if(!r[t])return t}},toQuotedString:u,getPathExpr:function(e,r,t,a){return d(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){return d(e,t?u("/"+f(r)):u(l(r)))},getData:function(e,r,t){if(""===e)return"rootData";if("/"==e[0]){if(!p.test(e))throw Error("Invalid JSON-pointer: "+e);o=e,s="rootData"}else{if(!(i=e.match(h)))throw Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(o=i[2])){if(a>=r)throw Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw Error("Cannot access data "+a+" levels up, current level is "+r);if(s="data"+(r-a||""),!o)return s}for(var a,o,s,i,n=s,c=o.split("/"),u=0;u<c.length;u++){var d=c[u];d&&(s+=l(m(d)),n+=" && "+s)}return n},unescapeFragment:function(e){return m(decodeURIComponent(e))},unescapeJsonPointer:m,escapeFragment:function(e){return encodeURIComponent(f(e))},escapeJsonPointer:f};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 i=/^[a-z$_][a-z$_0-9]*$/i,n=/'|\\/g;function l(e){return"number"==typeof e?"["+e+"]":i.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(n,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function u(e){return"'"+c(e)+"'"}var p=/^\/(?:[^~]|~0|~1)*$/,h=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function d(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function f(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function m(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},6079:function(e){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var a=0;a<t.length;a++){e=JSON.parse(JSON.stringify(e));var o,s=t[a].split("/"),i=e;for(o=1;o<s.length;o++)i=i[s[o]];for(o=0;o<r.length;o++){var n=r[o],l=i[n];l&&(i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},6150:function(e,r,t){"use strict";var a=t(2269);e.exports={$id:"https://github.com/ajv-validator/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"}]}}}},1346:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l;var f="maximum"==r,m=f?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],g=e.opts.$data&&v&&v.$data,y=f?"<":">",E=f?">":"<",a=void 0;if(!(d||"number"==typeof l||void 0===l))throw Error(r+" must be number");if(!(g||void 0===v||"number"==typeof v||"boolean"==typeof v))throw Error(m+" must be number or boolean");if(g){var b=e.util.getData(v.$data,n,e.dataPathArr),_="exclusive"+i,w="exclType"+i,P="exclIsNumber"+i,S="op"+i,z="' + "+S+" + '";s+=" var schemaExcl"+i+" = "+b+"; ",s+=" var "+_+"; var "+w+" = typeof "+(b="schemaExcl"+i)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var a=m,x=x||[];x.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var $=s;s=x.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+$+"]); ":s+=" validate.errors = ["+$+"]; return false; ":s+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+_+" = "+o+" === undefined || "+b+" "+y+"= "+o+") ? "+h+" "+E+"= "+b+" : "+h+" "+E+" "+o+" ) : ( ("+_+" = "+b+" === true) ? "+h+" "+E+"= "+o+" : "+h+" "+E+" "+o+" ) || "+h+" !== "+h+") { var op"+i+" = "+_+" ? '"+y+"' : '"+y+"='; ",void 0===l&&(a=m,u=e.errSchemaPath+"/"+m,o=b,d=g)}else{var P="number"==typeof v,z=y;if(P&&d){var S="'"+z+"'";s+=" if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" ( "+o+" === undefined || "+v+" "+y+"= "+o+" ? "+h+" "+E+"= "+v+" : "+h+" "+E+" "+o+" ) || "+h+" !== "+h+") { "}else{P&&void 0===l?(_=!0,a=m,u=e.errSchemaPath+"/"+m,o=v,E+="="):(P&&(o=Math[f?"min":"max"](v,l)),v===(!P||o)?(_=!0,a=m,u=e.errSchemaPath+"/"+m,E+="="):(_=!1,z+="="));var S="'"+z+"'";s+=" if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+h+" "+E+" "+o+" || "+h+" !== "+h+") { "}}a=a||r;var x=x||[];x.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+S+", limit: "+o+", exclusive: "+_+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+z+" ",d?s+="' + "+o:s+=""+o+"'"),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var $=s;return s=x.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+$+"]); ":s+=" validate.errors = ["+$+"]; return false; ":s+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",p&&(s+=" else { "),s}},536:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxItems"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" "+h+".length "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ","maxItems"==r?s+="more":s+="fewer",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},3010:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxLength"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),!1===e.opts.unicode?s+=" "+h+".length ":s+=" ucs2length("+h+") ",s+=" "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ","maxLength"==r?s+="longer":s+="shorter",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},6111:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,h="data"+(n||""),d=e.opts.$data&&l&&l.$data;if(d?(s+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",o="schema"+i):o=l,!(d||"number"==typeof l))throw Error(r+" must be number");var f="maxProperties"==r?">":"<";s+="if ( ",d&&(s+=" ("+o+" !== undefined && typeof "+o+" != 'number') || "),s+=" Object.keys("+h+").length "+f+" "+o+") { ";var a=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ","maxProperties"==r?s+="more":s+="fewer",s+=" than ",d?s+="' + "+o+" + '":s+=""+l,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",d?s+="validate.schema"+c:s+=""+l,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&p?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",p&&(s+=" else { "),s}},7578:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,p=l.baseId,h=!0;if(o)for(var d,f=-1,m=o.length-1;f<m;)d=o[f+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,l.schema=d,l.schemaPath=s+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=p,n&&(a+=" if ("+u+") { ",c+="}"));return n&&(h?a+=" if (true) { ":a+=" "+c.slice(0,-1)+" "),a}},4547:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level;if(i.every(function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)})){var m=h.baseId;a+=" var "+p+" = errors; var "+u+" = false; ";var v=e.compositeRule;if(e.compositeRule=h.compositeRule=!0,i)for(var g=-1,y=i.length-1;g<y;)h.schema=i[g+=1],h.schemaPath=n+"["+g+"]",h.errSchemaPath=l+"/"+g,a+=" "+e.validate(h)+" ",h.baseId=m,a+=" "+u+" = "+u+" || "+f+"; if (!"+u+") { ",d+="}";e.compositeRule=h.compositeRule=v,a+=" "+d+" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else c&&(a+=" if (true) { ");return a}},4413:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.schema[r],s=e.errSchemaPath+"/"+r;e.opts.allErrors;var i=e.util.toQuotedString(o);return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(s)+", validate.root.schema);"),a}},9087:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; "),h||(a+=" var schema"+o+" = validate.schema"+n+";"),a+="var "+p+" = equal("+u+", schema"+o+"); if (!"+p+") { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var f=a;return a=d.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+f+"]); ":a+=" validate.errors = ["+f+"]; return false; ":a+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",c&&(a+=" else { "),a}},4235:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level,f="i"+o,m=h.dataLevel=e.dataLevel+1,v="data"+m,g=e.baseId,y=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+p+" = errors;var valid"+o+";",y){var E=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+d+" = false; for (var "+f+" = 0; "+f+" < "+u+".length; "+f+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var b=u+"["+f+"]";h.dataPathArr[m]=f;var _=e.validate(h);h.baseId=g,2>e.util.varOccurences(_,v)?a+=" "+e.util.varReplace(_,v,b)+" ":a+=" var "+v+" = "+b+"; "+_+" ",a+=" if ("+d+") break; } ",e.compositeRule=h.compositeRule=E,a+=" if (!"+d+") {"}else a+=" if ("+u+".length == 0) {";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var P=a;return a=w.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",y&&(a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}},1021:function(e){"use strict";e.exports=function(e,r,t){var a,o,s,i,n,l,c,u=" ",p=e.level,h=e.dataLevel,d=e.schema[r],f=e.schemaPath+e.util.getProperty(r),m=e.errSchemaPath+"/"+r,v=!e.opts.allErrors,g="data"+(h||""),y="valid"+p,E="errs__"+p,b=e.opts.$data&&d&&d.$data;b?(u+=" var schema"+p+" = "+e.util.getData(d.$data,h,e.dataPathArr)+"; ",c="schema"+p):c=d;var _="definition"+p,w=this.definition,P="";if(b&&w.$data){n="keywordValidate"+p;var S=w.validateSchema;u+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+n+" = "+_+".validate;"}else{if(!(i=e.useCustomRule(this,d,e.schema,e)))return;c="validate.schema"+f,n=i.code,a=w.compile,o=w.inline,s=w.macro}var z=n+".errors",x="i"+p,$="ruleErr"+p,R=w.async;if(R&&!e.async)throw Error("async keyword in sync schema");if(o||s||(u+=""+z+" = null;"),u+="var "+E+" = errors;var "+y+";",b&&w.$data&&(P+="}",u+=" if ("+c+" === undefined) { "+y+" = true; } else { ",S&&(P+="}",u+=" "+y+" = "+_+".validateSchema("+c+"); if ("+y+") { ")),o)w.statements?u+=" "+i.validate+" ":u+=" "+y+" = "+i.validate+"; ";else if(s){var j=e.util.copy(e),P="";j.level++;var I="valid"+j.level;j.schema=i.validate,j.schemaPath="";var O=e.compositeRule;e.compositeRule=j.compositeRule=!0;var A=e.validate(j).replace(/validate\.schema/g,n);e.compositeRule=j.compositeRule=O,u+=" "+A}else{var T=T||[];T.push(u),u=" "+n+".call( ",e.opts.passContext?u+="this":u+="self",a||!1===w.schema?u+=" , "+g+" ":u+=" , "+c+" , "+g+" , validate.schema"+e.schemaPath+" ",u+=" , (dataPath || '')",'""'!=e.errorPath&&(u+=" + "+e.errorPath);var D=h?"data"+(h-1||""):"parentData",k=h?e.dataPathArr[h]:"parentDataProperty",C=u+=" , "+D+" , "+k+" , rootData ) ";u=T.pop(),!1===w.errors?(u+=" "+y+" = ",R&&(u+="await "),u+=""+C+"; "):R?u+=" var "+(z="customErrors"+p)+" = null; try { "+y+" = await "+C+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+z+" = e.errors; else throw e; } ":u+=" "+z+" = null; "+y+" = "+C+"; "}if(w.modifying&&(u+=" if ("+D+") "+g+" = "+D+"["+k+"];"),u+=""+P,w.valid)v&&(u+=" if (true) { ");else{u+=" if ( ",void 0===w.valid?(u+=" !",s?u+=""+I:u+=""+y):u+=" "+!w.valid+" ",u+=") { ",l=this.keyword;var T=T||[];T.push(u),u="";var T=T||[];T.push(u),u="",!1!==e.createErrors?(u+=" { keyword: '"+(l||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(m)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(u+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(u+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),u+=" } "):u+=" {} ";var N=u;u=T.pop(),!e.compositeRule&&v?e.async?u+=" throw new ValidationError(["+N+"]); ":u+=" validate.errors = ["+N+"]; return false; ":u+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var F=u;u=T.pop(),o?w.errors?"full"!=w.errors&&(u+=" for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+m+'"; } ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } "):!1===w.errors?u+=" "+F+" ":(u+=" if ("+E+" == errors) { "+F+" } else { for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+m+'"; } ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } } "):s?(u+=" var err = ",!1!==e.createErrors?(u+=" { keyword: '"+(l||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(m)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(u+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(u+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),u+=" } "):u+=" {} ",u+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&v&&(e.async?u+=" throw new ValidationError(vErrors); ":u+=" validate.errors = vErrors; return false; ")):!1===w.errors?u+=" "+F+" ":(u+=" if (Array.isArray("+z+")) { if (vErrors === null) vErrors = "+z+"; else vErrors = vErrors.concat("+z+"); errors = vErrors.length; for (var "+x+"="+E+"; "+x+"<errors; "+x+"++) { var "+$+" = vErrors["+x+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; "+$+'.schemaPath = "'+m+'"; ',e.opts.verbose&&(u+=" "+$+".schema = "+c+"; "+$+".data = "+g+"; "),u+=" } } else { "+F+" } "),u+=" } ",v&&(u+=" else { ")}return u}},83:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m={},v={},g=e.opts.ownProperties;for(_ in i)if("__proto__"!=_){var y=i[_],E=Array.isArray(y)?v:m;E[_]=y}a+="var "+p+" = errors;";var b=e.errorPath;for(var _ in a+="var missing"+o+";",v)if((E=v[_]).length){if(a+=" if ( "+u+e.util.getProperty(_)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),c){a+=" && ( ";var w=E;if(w)for(var P,S=-1,z=w.length-1;S<z;){P=w[S+=1],S&&(a+=" || ");var x=e.util.getProperty(P),$=u+x;a+=" ( ( "+$+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:x)+") ) "}a+=")) { ";var R="missing"+o,j="' + "+R+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,R,!0):b+" + "+R);var I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(_)+"', missingProperty: '"+j+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==E.length?a+="property "+e.util.escapeQuotes(E[0]):a+="properties "+e.util.escapeQuotes(E.join(", ")),a+=" when property "+e.util.escapeQuotes(_)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var O=a;a=I.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++; "}else{a+=" ) { ";var A=E;if(A)for(var P,T=-1,D=A.length-1;T<D;){P=A[T+=1];var x=e.util.getProperty(P),j=e.util.escapeQuotes(P),$=u+x;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,P,e.opts.jsonPointers)),a+=" if ( "+$+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(_)+"', missingProperty: '"+j+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==E.length?a+="property "+e.util.escapeQuotes(E[0]):a+="properties "+e.util.escapeQuotes(E.join(", ")),a+=" when property "+e.util.escapeQuotes(_)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",c&&(d+="}",a+=" else { ")}e.errorPath=b;var k=h.baseId;for(var _ in m){var y=m[_];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+f+" = true; if ( "+u+e.util.getProperty(_)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),a+=") { ",h.schema=y,h.schemaPath=n+e.util.getProperty(_),h.errSchemaPath=l+"/"+e.util.escapeFragment(_),a+=" "+e.validate(h)+" ",h.baseId=k,a+=" } ",c&&(a+=" if ("+f+") { ",d+="}"))}return c&&(a+=" "+d+" if ("+p+" == errors) {"),a}},8307:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var d="i"+o,f="schema"+o;h||(a+=" var "+f+" = validate.schema"+n+";"),a+="var "+p+";",h&&(a+=" if (schema"+o+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+o+")) "+p+" = false; else {"),a+=""+p+" = false;for (var "+d+"=0; "+d+"<"+f+".length; "+d+"++) if (equal("+u+", "+f+"["+d+"])) { "+p+" = true; break; }",h&&(a+=" } "),a+=" if (!"+p+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),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}},5545:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var p,h=e.opts.$data&&i&&i.$data;h?(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ",p="schema"+o):p=i;var d=e.opts.unknownFormats,f=Array.isArray(d);if(h){var m="format"+o,v="isObject"+o,g="formatType"+o;a+=" var "+m+" = formats["+p+"]; var "+v+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+g+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+o+" = "+m+".async; "),a+=" "+m+" = "+m+".validate; } if ( ",h&&(a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),a+=" (","ignore"!=d&&(a+=" ("+p+" && !"+m+" ",f&&(a+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),a+=") || "),a+=" ("+m+" && "+g+" == '"+t+"' && !(typeof "+m+" == 'function' ? ",e.async?a+=" (async"+o+" ? await "+m+"("+u+") : "+m+"("+u+")) ":a+=" "+m+"("+u+") ",a+=" : "+m+".test("+u+"))))) {"}else{var m=e.formats[i];if(!m)if("ignore"==d)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;else if(f&&d.indexOf(i)>=0)return c&&(a+=" if (true) { "),a;else throw Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"');var v="object"==typeof m&&!(m instanceof RegExp)&&m.validate,g=v&&m.type||"string";if(v){var y=!0===m.async;m=m.validate}if(g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw Error("async format in sync schema");var E="formats"+e.util.getProperty(i)+".validate";a+=" if (!(await "+E+"("+u+"))) { "}else{a+=" if (! ";var E="formats"+e.util.getProperty(i);v&&(E+=".validate"),"function"==typeof m?a+=" "+E+"("+u+") ":a+=" "+E+".test("+u+") ",a+=") { "}}var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",h?a+=""+p:a+=""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",h?a+="' + "+p+" + '":a+=""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",h?a+="validate.schema"+n:a+=""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var _=a;return a=b.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++; ",a+=" } ",c&&(a+=" else { "),a}},2917:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level,f=e.schema.then,m=e.schema.else,v=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),g=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=h.baseId;if(v||g){h.createErrors=!1,h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+p+" = errors; var "+u+" = true; ";var E,b=e.compositeRule;e.compositeRule=h.compositeRule=!0,a+=" "+e.validate(h)+" ",h.baseId=y,h.createErrors=!0,a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=b,v?(a+=" if ("+d+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(h)+" ",h.baseId=y,a+=" "+u+" = "+d+"; ",v&&g?a+=" var "+(E="ifClause"+o)+" = 'then'; ":E="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+d+") { ",g&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(h)+" ",h.baseId=y,a+=" "+u+" = "+d+"; ",v&&g?a+=" var "+(E="ifClause"+o)+" = 'else'; ":E="'else'",a+=" } "),a+=" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+E+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+E+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 { ")}else c&&(a+=" if (true) { ");return a}},2004:function(e,r,t){"use strict";e.exports={$ref:t(2857),allOf:t(7578),anyOf:t(4547),$comment:t(4413),const:t(9087),contains:t(4235),dependencies:t(83),enum:t(8307),format:t(5545),if:t(2917),items:t(3728),maximum:t(1346),minimum:t(1346),maxItems:t(536),minItems:t(536),maxLength:t(3010),minLength:t(3010),maxProperties:t(6111),minProperties:t(6111),multipleOf:t(8047),not:t(3441),oneOf:t(6137),pattern:t(6774),properties:t(6343),propertyNames:t(9931),required:t(1939),uniqueItems:t(7817),validate:t(5572)}},3728:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h="errs__"+o,d=e.util.copy(e),f="";d.level++;var m="valid"+d.level,v="i"+o,g=d.dataLevel=e.dataLevel+1,y="data"+g,E=e.baseId;if(a+="var "+h+" = errors;var "+p+";",Array.isArray(i)){var b=e.schema.additionalItems;if(!1===b){a+=" "+p+" = "+u+".length <= "+i.length+"; ";var _=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+p+") { ";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var P=a;a=w.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+P+"]); ":a+=" validate.errors = ["+P+"]; return false; ":a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=_,c&&(f+="}",a+=" else { ")}if(i){for(var S,z=-1,x=i.length-1;z<x;)if(S=i[z+=1],e.opts.strictKeywords?"object"==typeof S&&Object.keys(S).length>0||!1===S:e.util.schemaHasRules(S,e.RULES.all)){a+=" "+m+" = true; if ("+u+".length > "+z+") { ";var $=u+"["+z+"]";d.schema=S,d.schemaPath=n+"["+z+"]",d.errSchemaPath=l+"/"+z,d.errorPath=e.util.getPathExpr(e.errorPath,z,e.opts.jsonPointers,!0),d.dataPathArr[g]=z;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",a+=" } ",c&&(a+=" if ("+m+") { ",f+="}")}}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))){d.schema=b,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";d.dataPathArr[g]=v;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",c&&(a+=" if (!"+m+") break; "),a+=" } } ",c&&(a+=" if ("+m+") { ",f+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";d.dataPathArr[g]=v;var R=e.validate(d);d.baseId=E,2>e.util.varOccurences(R,y)?a+=" "+e.util.varReplace(R,y,$)+" ":a+=" var "+y+" = "+$+"; "+R+" ",c&&(a+=" if (!"+m+") break; "),a+=" }"}return c&&(a+=" "+f+" if ("+h+" == errors) {"),a}},8047:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h=e.opts.$data&&n&&n.$data;if(h?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,!(h||"number"==typeof n))throw Error(r+" must be number");o+="var division"+s+";if (",h&&(o+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),o+=" (division"+s+" = "+p+" / "+a+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+s+" !== parseInt(division"+s+") ",o+=" ) ",h&&(o+=" ) "),o+=" ) { ";var d=d||[];d.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 ",h?o+="' + "+a:o+=""+a+"'"),e.opts.verbose&&(o+=" , schema: ",h?o+="validate.schema"+l:o+=""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var f=o;return o=d.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",u&&(o+=" else { "),o}},3441:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=n,h.errSchemaPath=l,a+=" var "+p+" = errors; ";var f,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(f=h.opts.allErrors,h.opts.allErrors=!1),a+=" "+e.validate(h)+" ",h.createErrors=!0,f&&(h.opts.allErrors=f),e.compositeRule=h.compositeRule=m,a+=" if ("+d+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; 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(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ");return a}},6137:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="valid"+o,p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m=h.baseId,v="prevValid"+o,g="passingSchemas"+o;a+="var "+p+" = errors , "+v+" = false , "+u+" = false , "+g+" = null; ";var y=e.compositeRule;if(e.compositeRule=h.compositeRule=!0,i)for(var E,b=-1,_=i.length-1;b<_;)E=i[b+=1],(e.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(h.schema=E,h.schemaPath=n+"["+b+"]",h.errSchemaPath=l+"/"+b,a+=" "+e.validate(h)+" ",h.baseId=m):a+=" var "+f+" = true; ",b&&(a+=" if ("+f+" && "+v+") { "+u+" = false; "+g+" = ["+g+", "+b+"]; } else { ",d+="}"),a+=" if ("+f+") { "+u+" = "+v+" = true; "+g+" = "+b+"; }";return e.compositeRule=h.compositeRule=y,a+=""+d+"if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: data"+(s||"")+" "),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 = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},6774:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h=e.opts.$data&&n&&n.$data;h?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n;var d=h?"(new RegExp("+a+"))":e.usePattern(n);o+="if ( ",h&&(o+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),o+=" !"+d+".test("+p+") ) { ";var f=f||[];f.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",h?o+=""+a:o+=""+e.util.toQuotedString(n),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",h?o+="' + "+a+" + '":o+=""+e.util.escapeQuotes(n),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",h?o+="validate.schema"+l:o+=""+e.util.toQuotedString(n),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var m=o;return o=f.pop(),!e.compositeRule&&u?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+="} ",u&&(o+=" else { "),o}},6343:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e),d="";h.level++;var f="valid"+h.level,m="key"+o,v="idx"+o,g=h.dataLevel=e.dataLevel+1,y="data"+g,E="dataProperties"+o,b=Object.keys(i||{}).filter(A),_=e.schema.patternProperties||{},w=Object.keys(_).filter(A),P=e.schema.additionalProperties,S=b.length||w.length,z=!1===P,x="object"==typeof P&&Object.keys(P).length,$=e.opts.removeAdditional,R=e.opts.ownProperties,j=e.baseId,I=e.schema.required;if(I&&!(e.opts.$data&&I.$data)&&I.length<e.opts.loopRequired)var O=e.util.toHash(I);function A(e){return"__proto__"!==e}if(a+="var "+p+" = errors;var "+f+" = true;",R&&(a+=" var "+E+" = undefined;"),z||x||$){if(R?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":a+=" for (var "+m+" in "+u+") { ",S){if(a+=" var isAdditional"+o+" = !(false ",b.length){if(b.length>8)a+=" || validate.schema"+n+".hasOwnProperty("+m+") ";else if(b)for(var T,D=-1,k=b.length-1;D<k;)T=b[D+=1],a+=" || "+m+" == "+e.util.toQuotedString(T)+" "}if(w.length&&w)for(var C,N=-1,F=w.length-1;N<F;)C=w[N+=1],a+=" || "+e.usePattern(C)+".test("+m+") ";a+=" ); if (isAdditional"+o+") { "}if("all"==$)a+=" delete "+u+"["+m+"]; ";else{var L=e.errorPath,q="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),z)if($)a+=" delete "+u+"["+m+"]; ";else{a+=" "+f+" = false; ";var U=l;l=e.errSchemaPath+"/additionalProperties";var V=V||[];V.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+q+"' } ",!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: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=V.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,c&&(a+=" break; ")}else if(x)if("failing"==$){a+=" var "+p+" = errors; ";var H=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=P,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",a+=" if (!"+f+") { errors = "+p+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+m+"]; } ",e.compositeRule=h.compositeRule=H}else{h.schema=P,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",c&&(a+=" if (!"+f+") break; ")}e.errorPath=L}S&&(a+=" } "),a+=" } ",c&&(a+=" if ("+f+") { ",d+="}")}var Q=e.opts.useDefaults&&!e.compositeRule;if(b.length&&b)for(var T,G=-1,J=b.length-1;G<J;){var W=i[T=b[G+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all)){var X=e.util.getProperty(T),K=u+X,Y=Q&&void 0!==W.default;h.schema=W,h.schemaPath=n+X,h.errSchemaPath=l+"/"+e.util.escapeFragment(T),h.errorPath=e.util.getPath(e.errorPath,T,e.opts.jsonPointers),h.dataPathArr[g]=e.util.toQuotedString(T);var B=e.validate(h);if(h.baseId=j,2>e.util.varOccurences(B,y)){B=e.util.varReplace(B,y,K);var Z=K}else{var Z=y;a+=" var "+y+" = "+K+"; "}if(Y)a+=" "+B+" ";else{if(O&&O[T]){a+=" if ( "+Z+" === undefined ",R&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=") { "+f+" = false; ";var L=e.errorPath,U=l,ee=e.util.escapeQuotes(T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(L,T,e.opts.jsonPointers)),l=e.errSchemaPath+"/required";var V=V||[];V.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ee+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ee+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var M=a;a=V.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+M+"]); ":a+=" validate.errors = ["+M+"]; return false; ":a+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=U,e.errorPath=L,a+=" } else { "}else c?(a+=" if ( "+Z+" === undefined ",R&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=") { "+f+" = true; } else { "):(a+=" if ("+Z+" !== undefined ",R&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),a+=" ) { ");a+=" "+B+" } "}}c&&(a+=" if ("+f+") { ",d+="}")}if(w.length&&w)for(var C,er=-1,et=w.length-1;er<et;){var W=_[C=w[er+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all)){h.schema=W,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(C),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(C),R?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":a+=" for (var "+m+" in "+u+") { ",a+=" if ("+e.usePattern(C)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=u+"["+m+"]";h.dataPathArr[g]=m;var B=e.validate(h);h.baseId=j,2>e.util.varOccurences(B,y)?a+=" "+e.util.varReplace(B,y,K)+" ":a+=" var "+y+" = "+K+"; "+B+" ",c&&(a+=" if (!"+f+") break; "),a+=" } ",c&&(a+=" else "+f+" = true; "),a+=" } ",c&&(a+=" if ("+f+") { ",d+="}")}}return c&&(a+=" "+d+" if ("+p+" == errors) {"),a}},9931:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="errs__"+o,h=e.util.copy(e);h.level++;var d="valid"+h.level;if(a+="var "+p+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=n,h.errSchemaPath=l;var f="key"+o,m="idx"+o,v="i"+o,g="' + "+f+" + '",y="data"+(h.dataLevel=e.dataLevel+1),E="dataProperties"+o,b=e.opts.ownProperties,_=e.baseId;b&&(a+=" var "+E+" = undefined; "),b?a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+E+".length; "+m+"++) { var "+f+" = "+E+"["+m+"]; ":a+=" for (var "+f+" in "+u+") { ",a+=" var startErrs"+o+" = errors; ";var w=e.compositeRule;e.compositeRule=h.compositeRule=!0;var P=e.validate(h);h.baseId=_,2>e.util.varOccurences(P,y)?a+=" "+e.util.varReplace(P,y,f)+" ":a+=" var "+y+" = "+f+"; "+P+" ",e.compositeRule=h.compositeRule=w,a+=" if (!"+d+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+f+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),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 ("+p+" == errors) {"),a}},2857:function(e){"use strict";e.exports=function(e,r,t){var a,o,s=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(n||""),h="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,o="validate"):(a=!0===e.root.schema.$async,o="root.refVal[0]");else{var d=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===d){var f=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(f);var m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ";var v=s;s=m.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ")}else if("ignore"==e.opts.missingRefs)e.logger.warn(f),u&&(s+=" if (true) { ");else throw new e.MissingRefError(e.baseId,l,f)}else if(d.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=d.schema,g.schemaPath="",g.errSchemaPath=l,s+=" "+e.validate(g).replace(/validate\.schema/g,d.code)+" ",u&&(s+=" if ("+y+") { ")}else a=!0===d.$async||e.async&&!1!==d.$async,o=d.code}if(o){var m=m||[];m.push(s),s="",e.opts.passContext?s+=" "+o+".call(this, ":s+=" "+o+"( ",s+=" "+p+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var E=n?e.dataPathArr[n]:"parentDataProperty",b=s+=" , "+(n?"data"+(n-1||""):"parentData")+" , "+E+", rootData) ";if(s=m.pop(),a){if(!e.async)throw Error("async schema referenced by sync schema");u&&(s+=" var "+h+"; "),s+=" try { await "+b+"; ",u&&(s+=" "+h+" = 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; ",u&&(s+=" "+h+" = false; "),s+=" } ",u&&(s+=" if ("+h+") { ")}else s+=" if (!"+b+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",u&&(s+=" else { ")}return s}},1939:function(e){"use strict";e.exports=function(e,r,t){var a=" ",o=e.level,s=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),p="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(a+=" var schema"+o+" = "+e.util.getData(i.$data,s,e.dataPathArr)+"; ");var d="schema"+o;if(!h)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var f=[];if(i)for(var m,v=-1,g=i.length-1;v<g;){m=i[v+=1];var y=e.schema.properties[m];y&&(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))||(f[f.length]=m)}}else var f=i;if(h||f.length){var E=e.errorPath,b=h||f.length>=e.opts.loopRequired,_=e.opts.ownProperties;if(c)if(a+=" var missing"+o+"; ",b){h||(a+=" var "+d+" = validate.schema"+n+"; ");var w="i"+o,P="schema"+o+"["+w+"]",S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,P,e.opts.jsonPointers)),a+=" var "+p+" = true; ",h&&(a+=" if (schema"+o+" === undefined) "+p+" = true; else if (!Array.isArray(schema"+o+")) "+p+" = false; else {"),a+=" for (var "+w+" = 0; "+w+" < "+d+".length; "+w+"++) { "+p+" = "+u+"["+d+"["+w+"]] !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+d+"["+w+"]) "),a+="; if (!"+p+") break; } ",h&&(a+=" } "),a+=" if (!"+p+") { ";var z=z||[];z.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=z.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var $=f;if($)for(var R,w=-1,j=$.length-1;w<j;){R=$[w+=1],w&&(a+=" || ");var I=e.util.getProperty(R),O=u+I;a+=" ( ( "+O+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(R)+"') "),a+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?R:I)+") ) "}a+=") { ";var P="missing"+o,S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,P,!0):E+" + "+P);var z=z||[];z.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var x=a;a=z.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+x+"]); ":a+=" validate.errors = ["+x+"]; return false; ":a+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(b){h||(a+=" var "+d+" = validate.schema"+n+"; ");var w="i"+o,P="schema"+o+"["+w+"]",S="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,P,e.opts.jsonPointers)),h&&(a+=" if ("+d+" && !Array.isArray("+d+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+d+" !== undefined) { "),a+=" for (var "+w+" = 0; "+w+" < "+d+".length; "+w+"++) { if ("+u+"["+d+"["+w+"]] === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+d+"["+w+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(a+=" } ")}else{var A=f;if(A)for(var R,T=-1,D=A.length-1;T<D;){R=A[T+=1];var I=e.util.getProperty(R),S=e.util.escapeQuotes(R),O=u+I;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(E,R,e.opts.jsonPointers)),a+=" if ( "+O+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(R)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , 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"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=E}else c&&(a+=" if (true) {");return a}},7817:function(e){"use strict";e.exports=function(e,r,t){var a,o=" ",s=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(i||""),h="valid"+s,d=e.opts.$data&&n&&n.$data;if(d?(o+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+s):a=n,(n||d)&&!1!==e.opts.uniqueItems){d&&(o+=" var "+h+"; if ("+a+" === false || "+a+" === undefined) "+h+" = true; else if (typeof "+a+" != 'boolean') "+h+" = false; else { "),o+=" var i = "+p+".length , "+h+" = true , j; if (i > 1) { ";var f=e.schema.items&&e.schema.items.type,m=Array.isArray(f);!f||"object"==f||"array"==f||m&&(f.indexOf("object")>=0||f.indexOf("array")>=0)?o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+h+" = false; break outer; } } } ":(o+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",o+=" if ("+e.util["checkDataType"+(m?"s":"")](f,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),o+=" } ",d&&(o+=" } "),o+=" if (!"+h+") { ";var v=v||[];v.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: ",d?o+="validate.schema"+l:o+=""+n,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var g=o;o=v.pop(),!e.compositeRule&&u?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+=" } ",u&&(o+=" else { ")}else u&&(o+=" if (true) { ");return o}},5572:function(e){"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"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var n=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"===e.opts.strictKeywords)e.logger.warn(l);else throw Error(l)}}if(e.isTop&&(a+=" var validate = ",o&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!(s||e.schema.$ref)){var c,r="false schema",u=e.level,p=e.dataLevel,h=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,v="data"+(p||""),g="valid"+u;if(!1===e.schema){e.isTop?m=!0:a+=" var "+g+" = false; ";var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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++; "}else e.isTop?o?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+g+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var b=e.isTop,u=e.level=0,p=e.dataLevel=0,v="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!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var _="default is ignored in the schema root";if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var u=e.level,p=e.dataLevel,v="data"+(p||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}var g="valid"+u,m=!e.opts.allErrors,w="",P="",S=e.schema.type,z=Array.isArray(S);if(S&&e.opts.nullable&&!0===e.schema.nullable&&(z?-1==S.indexOf("null")&&(S=S.concat("null")):"null"!=S&&(S=[S,"null"],z=!0)),z&&1==S.length&&(S=S[0],z=!1),e.schema.$ref&&s)if("fail"==e.opts.extendRefs)throw Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');else!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")),S){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,S);var $=e.RULES.types[S];if(x||z||!0===$||$&&!Z($)){var d=e.schemaPath+".type",f=e.errSchemaPath+"/type",d=e.schemaPath+".type",f=e.errSchemaPath+"/type",R=z?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[R](S,v,e.opts.strictNumbers,!0)+") { ",x){var j="dataType"+u,I="coerced"+u;a+=" var "+j+" = typeof "+v+"; var "+I+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+j+" == 'object' && Array.isArray("+v+") && "+v+".length == 1) { "+v+" = "+v+"[0]; "+j+" = typeof "+v+"; if ("+e.util.checkDataType(e.schema.type,v,e.opts.strictNumbers)+") "+I+" = "+v+"; } "),a+=" if ("+I+" !== undefined) ; ";var O=x;if(O)for(var c,A,T=-1,D=O.length-1;T<D;)"string"==(A=O[T+=1])?a+=" else if ("+j+" == 'number' || "+j+" == 'boolean') "+I+" = '' + "+v+"; else if ("+v+" === null) "+I+" = ''; ":"number"==A||"integer"==A?(a+=" else if ("+j+" == 'boolean' || "+v+" === null || ("+j+" == 'string' && "+v+" && "+v+" == +"+v+" ","integer"==A&&(a+=" && !("+v+" % 1)"),a+=")) "+I+" = +"+v+"; "):"boolean"==A?a+=" else if ("+v+" === 'false' || "+v+" === 0 || "+v+" === null) "+I+" = false; else if ("+v+" === 'true' || "+v+" === 1) "+I+" = true; ":"null"==A?a+=" else if ("+v+" === '' || "+v+" === 0 || "+v+" === false) "+I+" = null; ":"array"==e.opts.coerceTypes&&"array"==A&&(a+=" else if ("+j+" == 'string' || "+j+" == 'number' || "+j+" == 'boolean' || "+v+" == null) "+I+" = ["+v+"]; ");a+=" else { ";var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } if ("+I+" !== undefined) { ";var k=p?"data"+(p-1||""):"parentData",C=p?e.dataPathArr[p]:"parentDataProperty";a+=" "+v+" = "+I+"; ",p||(a+="if ("+k+" !== undefined)"),a+=" "+k+"["+C+"] = "+I+"; } "}else{var y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } "}}if(e.schema.$ref&&!s)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",b?a+="0":a+="errs_"+u,a+=") { ",P+="}");else{var N=e.RULES;if(N){for(var $,F=-1,L=N.length-1;F<L;)if(Z($=N[F+=1])){if($.type&&(a+=" if ("+e.util.checkDataType($.type,v,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if("object"==$.type&&e.schema.properties){var h=e.schema.properties,q=Object.keys(h);if(q)for(var U,V=-1,M=q.length-1;V<M;){var H=h[U=q[V+=1]];if(void 0!==H.default){var K=v+e.util.getProperty(U);if(e.compositeRule){if(e.opts.strictDefaults){var _="default is ignored for: "+K;if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}}else a+=" if ("+K+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+K+" === null || "+K+" === '' "),a+=" ) "+K+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}else if("array"==$.type&&Array.isArray(e.schema.items)){var B=e.schema.items;if(B){for(var H,T=-1,Q=B.length-1;T<Q;)if(void 0!==(H=B[T+=1]).default){var K=v+"["+T+"]";if(e.compositeRule){if(e.opts.strictDefaults){var _="default is ignored for: "+K;if("log"===e.opts.strictDefaults)e.logger.warn(_);else throw Error(_)}}else a+=" if ("+K+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+K+" === null || "+K+" === '' "),a+=" ) "+K+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}}var G=$.rules;if(G){for(var J,W=-1,X=G.length-1;W<X;)if(ee(J=G[W+=1])){var Y=J.code(e,J.keyword,$.type);Y&&(a+=" "+Y+" ",m&&(w+="}"))}}if(m&&(a+=" "+w+" ",w=""),$.type&&(a+=" } ",S&&S===$.type&&!x)){a+=" else { ";var d=e.schemaPath+".type",f=e.errSchemaPath+"/type",y=y||[];y.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(c||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { type: '",z?a+=""+S.join(","):a+=""+S,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",z?a+=""+S.join(","):a+=""+S,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var E=a;a=y.pop(),!e.compositeRule&&m?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+=" } "}m&&(a+=" if (errors === ",b?a+="0":a+="errs_"+u,a+=") { ",P+="}")}}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(ee(r[t]))return!0}function ee(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 m&&(a+=" "+P+" "),b?(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 "+g+" = errors === errs_"+u+";",a}},3528:function(e,r,t){"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,o=t(1021),s=t(6150);function i(e,r){i.errors=null;var t=this._validateKeyword=this._validateKeyword||this.compile(s,!0);if(t(e))return!0;if(i.errors=t.errors,!r)return!1;throw Error("custom keyword definition is invalid: "+this.errorsText(t.errors))}e.exports={add:function(e,r){var t=this.RULES;if(t.keywords[e])throw Error("Keyword "+e+" is already defined");if(!a.test(e))throw Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var s=r.type;if(Array.isArray(s))for(var i=0;i<s.length;i++)l(e,s[i],r);else l(e,s,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function l(e,r,a){for(var s,i=0;i<t.length;i++){var n=t[i];if(n.type==r){s=n;break}}s||(s={type:r,rules:[]},t.push(s));var l={keyword:e,definition:a,custom:!0,code:o,implements:a.implements};s.rules.push(l),t.custom[e]=l}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:i}},9454:function(e,r,t){"use strict";var a=t(181).Buffer,o=t(181).SlowBuffer;function s(e,r){if(!a.isBuffer(e)||!a.isBuffer(r)||e.length!==r.length)return!1;for(var t=0,o=0;o<e.length;o++)t|=e[o]^r[o];return 0===t}e.exports=s,s.install=function(){a.prototype.equal=o.prototype.equal=function(e){return s(this,e)}};var i=a.prototype.equal,n=o.prototype.equal;s.restore=function(){a.prototype.equal=i,o.prototype.equal=n}},8583:function(e,r,t){let a=t(9896),o=t(6928),s=t(857),i=t(6982),n=t(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function c(e){console.log(`[dotenv@${n}][DEBUG] ${e}`)}function u(e){console.log(`[dotenv@${n}] ${e}`)}function p(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function h(e){let r=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let t of e.path)a.existsSync(t)&&(r=t.endsWith(".vault")?t:`${t}.vault`);else r=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else r=o.resolve(process.cwd(),".env.vault");return a.existsSync(r)?r:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}let f={configDotenv:function(e){let r,t=o.resolve(process.cwd(),".env"),s="utf8",i=!!(e&&e.debug),n=!e||!("quiet"in e)||e.quiet;e&&e.encoding?s=e.encoding:i&&c("No encoding is specified. UTF-8 is used by default");let l=[t];if(e&&e.path)if(Array.isArray(e.path))for(let r of(l=[],e.path))l.push(d(r));else l=[d(e.path)];let p={};for(let t of l)try{let r=f.parse(a.readFileSync(t,{encoding:s}));f.populate(p,r,e)}catch(e){i&&c(`Failed to load ${t} ${e.message}`),r=e}let h=process.env;if(e&&null!=e.processEnv&&(h=e.processEnv),f.populate(h,p,e),i||!n){let e=Object.keys(p).length,t=[];for(let e of l)try{let r=o.relative(process.cwd(),e);t.push(r)}catch(t){i&&c(`Failed to load ${e} ${t.message}`),r=t}u(`injecting env (${e}) from ${t.join(",")}`)}return r?{parsed:p,error:r}:{parsed:p}},_configVault:function(e){let r=!!(e&&e.debug),t=!e||!("quiet"in e)||e.quiet;(r||!t)&&u("Loading env from encrypted .env.vault");let a=f._parseVault(e),o=process.env;return e&&null!=e.processEnv&&(o=e.processEnv),f.populate(o,a,e),{parsed:a}},_parseVault:function(e){let r,t=h(e=e||{});e.path=t;let a=f.configDotenv(e);if(!a.parsed){let e=Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}let o=p(e).split(","),s=o.length;for(let e=0;e<s;e++)try{let t=o[e].trim(),s=function(e,r){let t;try{t=new URL(r)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let a=t.password;if(!a){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let o=t.searchParams.get("environment");if(!o){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:a}}(a,t);r=f.decrypt(s.ciphertext,s.key);break}catch(r){if(e+1>=s)throw r}return f.parse(r)},config:function(e){if(0===p(e).length)return f.configDotenv(e);let r=h(e);if(!r){var t;return t=`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`,console.log(`[dotenv@${n}][WARN] ${t}`),f.configDotenv(e)}return f._configVault(e)},decrypt:function(e,r){let t=Buffer.from(r.slice(-64),"hex"),a=Buffer.from(e,"base64"),o=a.subarray(0,12),s=a.subarray(-16);a=a.subarray(12,-16);try{let e=i.createDecipheriv("aes-256-gcm",t,o);return e.setAuthTag(s),`${e.update(a)}${e.final()}`}catch(a){let e=a instanceof RangeError,r="Invalid key length"===a.message,t="Unsupported state or unable to authenticate data"===a.message;if(e||r){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(t){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw a}},parse:function(e){let r,t={},a=e.toString();for(a=a.replace(/\r\n?/mg,"\n");null!=(r=l.exec(a));){let e=r[1],a=r[2]||"",o=(a=a.trim())[0];a=a.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===o&&(a=(a=a.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),t[e]=a}return t},populate:function(e,r,t={}){let a=!!(t&&t.debug),o=!!(t&&t.override);if("object"!=typeof r){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let t of Object.keys(r))Object.prototype.hasOwnProperty.call(e,t)?(!0===o&&(e[t]=r[t]),a&&(!0===o?c(`"${t}" is already defined and WAS overwritten`):c(`"${t}" is already defined and was NOT overwritten`))):e[t]=r[t]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f},9053:function(e,r,t){"use strict";var a=t(6608).Buffer,o=t(2188);function s(e){if(a.isBuffer(e))return e;if("string"==typeof e)return a.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function i(e,r,t){for(var a=0;r+a<t&&0===e[r+a];)++a;return e[r+a]>=128&&--a,a}e.exports={derToJose:function(e,r){e=s(e);var t=o(r),i=t+1,n=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var c=e[l++];if(129===c&&(c=e[l++]),n-l<c)throw Error('"seq" specified length of "'+c+'", only "'+(n-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var u=e[l++];if(n-l-2<u)throw Error('"r" specified length of "'+u+'", only "'+(n-l-2)+'" available');if(i<u)throw Error('"r" specified length of "'+u+'", max of "'+i+'" is acceptable');var p=l;if(l+=u,2!==e[l++])throw Error('Could not find expected "int" for "s"');var h=e[l++];if(n-l!==h)throw Error('"s" specified length of "'+h+'", expected "'+(n-l)+'"');if(i<h)throw Error('"s" specified length of "'+h+'", max of "'+i+'" is acceptable');var d=l;if((l+=h)!==n)throw Error('Expected to consume entire buffer, but "'+(n-l)+'" bytes remain');var f=t-u,m=t-h,v=a.allocUnsafe(f+u+m+h);for(l=0;l<f;++l)v[l]=0;e.copy(v,l,p+Math.max(-f,0),p+u),l=t;for(var g=l;l<g+m;++l)v[l]=0;return e.copy(v,l,d+Math.max(-m,0),d+h),v=(v=v.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,r){e=s(e);var t=o(r),n=e.length;if(n!==2*t)throw TypeError('"'+r+'" signatures must be "'+2*t+'" bytes, saw "'+n+'"');var l=i(e,0,t),c=i(e,t,e.length),u=t-l,p=t-c,h=2+u+1+1+p,d=h<128,f=a.allocUnsafe((d?2:3)+h),m=0;return f[m++]=48,d?f[m++]=h:(f[m++]=129,f[m++]=255&h),f[m++]=2,f[m++]=u,l<0?(f[m++]=0,m+=e.copy(f,m,0,t)):m+=e.copy(f,m,l,t),f[m++]=2,f[m++]=p,c<0?(f[m++]=0,e.copy(f,m,t)):e.copy(f,m,t+c),f}}},2188:function(e){"use strict";function r(e){return(e/8|0)+ +(e%8!=0)}var t={ES256:r(256),ES384:r(384),ES512:r(521)};e.exports=function(e){var r=t[e];if(r)return r;throw Error('Unknown algorithm "'+e+'"')}},7371:function(e){"use strict";e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(o=a;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((a=(s=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!=o--;){var a,o,s,i=s[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}},6039:function(e){"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){return t({key:r,value:e[r]},{key:a,value:e[a]})}}),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);if(Array.isArray(r)){for(t=0,i="[";t<r.length;t++)t&&(i+=","),i+=e(r[t])||"null";return i+"]"}if(null===r)return"null";if(-1!==s.indexOf(r)){if(a)return JSON.stringify("__cycle__");throw TypeError("Converting circular structure to JSON")}var t,i,n=s.push(r)-1,l=Object.keys(r).sort(o&&o(r));for(t=0,i="";t<l.length;t++){var c=l[t],u=e(r[c]);u&&(i&&(i+=","),i+=JSON.stringify(c)+":"+u)}return s.splice(n,1),"{"+i+"}"}}(e)}},7713:function(e){"use strict";var r=e.exports=function(e,t,a){"function"==typeof t&&(a=t,t={});var o="function"==typeof(a=t.cb||a)?a:a.pre||function(){};!function e(t,a,o,s,i,n,l,c,u,p){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var h in a(s,i,n,l,c,u,p),s){var d=s[h];if(Array.isArray(d)){if(h in r.arrayKeywords)for(var f=0;f<d.length;f++)e(t,a,o,d[f],i+"/"+h+"/"+f,n,i,h,s,f)}else if(h in r.propsKeywords){if(d&&"object"==typeof d)for(var m in d)e(t,a,o,d[m],i+"/"+h+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),n,i,h,s,m)}else(h in r.keywords||t.allKeys&&!(h in r.skipKeywords))&&e(t,a,o,d,i+"/"+h,n,i,h,s)}o(s,i,n,l,c,u,p)}}(t,o,a.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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}},7661:function(e,r,t){var a=t(1525);e.exports=function(e,r){r=r||{};var t=a.decode(e,r);if(!t)return null;var o=t.payload;if("string"==typeof o)try{var s=JSON.parse(o);null!==s&&"object"==typeof s&&(o=s)}catch(e){}return!0===r.complete?{header:t.header,payload:o,signature:t.signature}:o}},7619:function(e,r,t){e.exports={decode:t(7661),verify:t(7014),sign:t(3418),JsonWebTokenError:t(6430),NotBeforeError:t(9387),TokenExpiredError:t(7147)}},6430:function(e){var r=function(e,r){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,r&&(this.inner=r)};r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,e.exports=r},9387:function(e,r,t){var a=t(6430),o=function(e,r){a.call(this,e),this.name="NotBeforeError",this.date=r};o.prototype=Object.create(a.prototype),o.prototype.constructor=o,e.exports=o},7147:function(e,r,t){var a=t(6430),o=function(e,r){a.call(this,e),this.name="TokenExpiredError",this.expiredAt=r};o.prototype=Object.create(a.prototype),o.prototype.constructor=o,e.exports=o},8050:function(e,r,t){e.exports=t(3895).satisfies(process.version,">=15.7.0")},5582:function(e,r,t){e.exports=t(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},5612:function(e,r,t){e.exports=t(3895).satisfies(process.version,">=16.9.0")},3742:function(e,r,t){var a=t(3866);e.exports=function(e,r){var t=r||Math.floor(Date.now()/1e3);if("string"==typeof e){var o=a(e);if(void 0===o)return;return Math.floor(t+o/1e3)}if("number"==typeof e)return t+e}},9572:function(e,r,t){let a=t(8050),o=t(5612),s={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},i={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,r){if(!e||!r)return;let t=r.asymmetricKeyType;if(!t)return;let n=s[t];if(!n)throw Error(`Unknown key type "${t}".`);if(!n.includes(e))throw Error(`"alg" parameter for "${t}" key type must be one of: ${n.join(", ")}.`);if(a)switch(t){case"ec":let l=r.asymmetricKeyDetails.namedCurve,c=i[e];if(l!==c)throw Error(`"alg" parameter "${e}" requires curve "${c}".`);break;case"rsa-pss":if(o){let t=parseInt(e.slice(-3),10),{hashAlgorithm:a,mgf1HashAlgorithm:o,saltLength:s}=r.asymmetricKeyDetails;if(a!==`sha${t}`||o!==a)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==s&&s>t>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},3418:function(e,r,t){let a=t(3742),o=t(5582),s=t(9572),i=t(1525),n=t(5357),l=t(6782),c=t(5250),u=t(8094),p=t(6052),h=t(1251),d=t(8430),{KeyObject:f,createSecretKey:m,createPrivateKey:v}=t(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];o&&g.splice(3,0,"PS256","PS384","PS512");let y={expiresIn:{isValid:function(e){return c(e)||h(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return c(e)||h(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return h(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:n.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:p,message:'"header" must be an object'},encoding:{isValid:h,message:'"encoding" must be a string'},issuer:{isValid:h,message:'"issuer" must be a string'},subject:{isValid:h,message:'"subject" must be a string'},jwtid:{isValid:h,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:h,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},E={iat:{isValid:u,message:'"iat" should be a number of seconds'},exp:{isValid:u,message:'"exp" should be a number of seconds'},nbf:{isValid:u,message:'"nbf" should be a number of seconds'}};function b(e,r,t,a){if(!p(t))throw Error('Expected "'+a+'" to be a plain object.');Object.keys(t).forEach(function(o){let s=e[o];if(!s){if(!r)throw Error('"'+o+'" is not allowed in "'+a+'"');return}if(!s.isValid(t[o]))throw Error(s.message)})}let _={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},w=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,r,t,o){var n,l;"function"==typeof t?(o=t,t={}):t=t||{};let c="object"==typeof e&&!Buffer.isBuffer(e),u=Object.assign({alg:t.algorithm||"HS256",typ:c?"JWT":void 0,kid:t.keyid},t.header);function p(e){if(o)return o(e);throw e}if(!r&&"none"!==t.algorithm)return p(Error("secretOrPrivateKey must have a value"));if(null!=r&&!(r instanceof f))try{r=v(r)}catch(e){try{r=m("string"==typeof r?Buffer.from(r):r)}catch(e){return p(Error("secretOrPrivateKey is not valid key material"))}}if(u.alg.startsWith("HS")&&"secret"!==r.type)return p(Error(`secretOrPrivateKey must be a symmetric key when using ${u.alg}`));if(/^(?:RS|PS|ES)/.test(u.alg)){if("private"!==r.type)return p(Error(`secretOrPrivateKey must be an asymmetric key when using ${u.alg}`));if(!t.allowInsecureKeySizes&&!u.alg.startsWith("ES")&&void 0!==r.asymmetricKeyDetails&&r.asymmetricKeyDetails.modulusLength<2048)return p(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`))}if(void 0===e)return p(Error("payload is required"));if(c){try{n=e,b(E,!0,n,"payload")}catch(e){return p(e)}t.mutatePayload||(e=Object.assign({},e))}else{let r=w.filter(function(e){return void 0!==t[e]});if(r.length>0)return p(Error("invalid "+r.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==t.expiresIn)return p(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==t.notBefore)return p(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=t,b(y,!1,l,"options")}catch(e){return p(e)}if(!t.allowInvalidAsymmetricKeyTypes)try{s(u.alg,r)}catch(e){return p(e)}let h=e.iat||Math.floor(Date.now()/1e3);if(t.noTimestamp?delete e.iat:c&&(e.iat=h),void 0!==t.notBefore){try{e.nbf=a(t.notBefore,h)}catch(e){return p(e)}if(void 0===e.nbf)return p(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==t.expiresIn&&"object"==typeof e){try{e.exp=a(t.expiresIn,h)}catch(e){return p(e)}if(void 0===e.exp)return p(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(_).forEach(function(r){let a=_[r];if(void 0!==t[r]){if(void 0!==e[a])return p(Error('Bad "options.'+r+'" option. The payload already has an "'+a+'" property.'));e[a]=t[r]}});let g=t.encoding||"utf8";if("function"==typeof o)o=o&&d(o),i.createSign({header:u,privateKey:r,payload:e,encoding:g}).once("error",o).once("done",function(e){if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(u.alg)&&e.length<256)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`));o(null,e)});else{let a=i.sign({header:u,payload:e,secret:r,encoding:g});if(!t.allowInsecureKeySizes&&/^(?:RS|PS)/.test(u.alg)&&a.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${u.alg}`);return a}}},7014:function(e,r,t){let a=t(6430),o=t(9387),s=t(7147),i=t(7661),n=t(3742),l=t(9572),c=t(5582),u=t(1525),{KeyObject:p,createSecretKey:h,createPublicKey:d}=t(6982),f=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],v=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];c&&(f.splice(f.length,0,"PS256","PS384","PS512"),v.splice(v.length,0,"PS256","PS384","PS512")),e.exports=function(e,r,t,c){let y,E,b;if("function"!=typeof t||c||(c=t,t={}),t||(t={}),t=Object.assign({},t),y=c||function(e,r){if(e)throw e;return r},t.clockTimestamp&&"number"!=typeof t.clockTimestamp)return y(new a("clockTimestamp must be a number"));if(void 0!==t.nonce&&("string"!=typeof t.nonce||""===t.nonce.trim()))return y(new a("nonce must be a non-empty string"));if(void 0!==t.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof t.allowInvalidAsymmetricKeyTypes)return y(new a("allowInvalidAsymmetricKeyTypes must be a boolean"));let _=t.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return y(new a("jwt must be provided"));if("string"!=typeof e)return y(new a("jwt must be a string"));let w=e.split(".");if(3!==w.length)return y(new a("jwt malformed"));try{E=i(e,{complete:!0})}catch(e){return y(e)}if(!E)return y(new a("invalid token"));let P=E.header;if("function"==typeof r){if(!c)return y(new a("verify must be called asynchronous if secret or public key is provided as a callback"));b=r}else b=function(e,t){return t(null,r)};return b(P,function(r,i){let c;if(r)return y(new a("error in secret or public key callback: "+r.message));let b=""!==w[2].trim();if(!b&&i)return y(new a("jwt signature is required"));if(b&&!i)return y(new a("secret or public key must be provided"));if(!b&&!t.algorithms)return y(new a('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=i&&!(i instanceof p))try{i=d(i)}catch(e){try{i=h("string"==typeof i?Buffer.from(i):i)}catch(e){return y(new a("secretOrPublicKey is not valid key material"))}}if(t.algorithms||("secret"===i.type?t.algorithms=g:["rsa","rsa-pss"].includes(i.asymmetricKeyType)?t.algorithms=v:"ec"===i.asymmetricKeyType?t.algorithms=m:t.algorithms=f),-1===t.algorithms.indexOf(E.header.alg))return y(new a("invalid algorithm"));if(P.alg.startsWith("HS")&&"secret"!==i.type)return y(new a(`secretOrPublicKey must be a symmetric key when using ${P.alg}`));if(/^(?:RS|PS|ES)/.test(P.alg)&&"public"!==i.type)return y(new a(`secretOrPublicKey must be an asymmetric key when using ${P.alg}`));if(!t.allowInvalidAsymmetricKeyTypes)try{l(P.alg,i)}catch(e){return y(e)}try{c=u.verify(e,E.header.alg,i)}catch(e){return y(e)}if(!c)return y(new a("invalid signature"));let S=E.payload;if(void 0!==S.nbf&&!t.ignoreNotBefore){if("number"!=typeof S.nbf)return y(new a("invalid nbf value"));if(S.nbf>_+(t.clockTolerance||0))return y(new o("jwt not active",new Date(1e3*S.nbf)))}if(void 0!==S.exp&&!t.ignoreExpiration){if("number"!=typeof S.exp)return y(new a("invalid exp value"));if(_>=S.exp+(t.clockTolerance||0))return y(new s("jwt expired",new Date(1e3*S.exp)))}if(t.audience){let e=Array.isArray(t.audience)?t.audience:[t.audience];if(!(Array.isArray(S.aud)?S.aud:[S.aud]).some(function(r){return e.some(function(e){return e instanceof RegExp?e.test(r):e===r})}))return y(new a("jwt audience invalid. expected: "+e.join(" or ")))}if(t.issuer&&("string"==typeof t.issuer&&S.iss!==t.issuer||Array.isArray(t.issuer)&&-1===t.issuer.indexOf(S.iss)))return y(new a("jwt issuer invalid. expected: "+t.issuer));if(t.subject&&S.sub!==t.subject)return y(new a("jwt subject invalid. expected: "+t.subject));if(t.jwtid&&S.jti!==t.jwtid)return y(new a("jwt jwtid invalid. expected: "+t.jwtid));if(t.nonce&&S.nonce!==t.nonce)return y(new a("jwt nonce invalid. expected: "+t.nonce));if(t.maxAge){if("number"!=typeof S.iat)return y(new a("iat required when maxAge is specified"));let e=n(t.maxAge,S.iat);if(void 0===e)return y(new a('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(_>=e+(t.clockTolerance||0))return y(new s("maxAge exceeded",new Date(1e3*e)))}return!0===t.complete?y(null,{header:P,payload:S,signature:E.signature}):y(null,S)})}},3569:function(e,r,t){var a,o=t(6608).Buffer,s=t(6982),i=t(9053),n=t(9023),l="secret must be a string or buffer",c="key must be a string or a buffer",u="function"==typeof s.createPublicKey;function p(e){if(!o.isBuffer(e)&&"string"!=typeof e&&(!u||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(c)}function h(e){if(!o.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function d(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function f(e){var r=4-(e=e.toString()).length%4;if(4!==r)for(var t=0;t<r;++t)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var r=[].slice.call(arguments,1);return TypeError(n.format.bind(n,e).apply(null,r))}function v(e){var r;return r=e,o.isBuffer(r)||"string"==typeof r||(e=JSON.stringify(e)),e}function g(e){return function(r,t){!function(e){if(!o.isBuffer(e)){if("string"!=typeof e){if(!u||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(t),r=v(r);var a=s.createHmac("sha"+e,t);return d((a.update(r),a.digest("base64")))}}u&&(c+=" or a KeyObject",l+="or a KeyObject");var y="timingSafeEqual"in s?function(e,r){return e.byteLength===r.byteLength&&s.timingSafeEqual(e,r)}:function(e,r){return a||(a=t(9454)),a(e,r)};function E(e){return function(r,t,a){var s=g(e)(r,a);return y(o.from(t),o.from(s))}}function b(e){return function(r,t){h(t),r=v(r);var a=s.createSign("RSA-SHA"+e);return d((a.update(r),a.sign(t,"base64")))}}function _(e){return function(r,t,a){p(a),r=v(r),t=f(t);var o=s.createVerify("RSA-SHA"+e);return o.update(r),o.verify(a,t,"base64")}}function w(e){return function(r,t){h(t),r=v(r);var a=s.createSign("RSA-SHA"+e);return d((a.update(r),a.sign({key:t,padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function P(e){return function(r,t,a){p(a),r=v(r),t=f(t);var o=s.createVerify("RSA-SHA"+e);return o.update(r),o.verify({key:a,padding:s.constants.RSA_PKCS1_PSS_PADDING,saltLength:s.constants.RSA_PSS_SALTLEN_DIGEST},t,"base64")}}function S(e){var r=b(e);return function(){var t=r.apply(null,arguments);return i.derToJose(t,"ES"+e)}}function z(e){var r=_(e);return function(t,a,o){return r(t,a=i.joseToDer(a,"ES"+e).toString("base64"),o)}}function x(){return function(){return""}}function $(){return function(e,r){return""===r}}e.exports=function(e){var r=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!r)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var t=(r[1]||r[3]).toLowerCase(),a=r[2];return{sign:({hs:g,rs:b,ps:w,es:S,none:x})[t](a),verify:({hs:E,rs:_,ps:P,es:z,none:$})[t](a)}}},1525:function(e,r,t){var a=t(4397),o=t(169);r.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],r.sign=a.sign,r.verify=o.verify,r.decode=o.decode,r.isValid=o.isValid,r.createSign=function(e){return new a(e)},r.createVerify=function(e){return new o(e)}},1882:function(e,r,t){var a=t(6608).Buffer,o=t(2203);function s(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=a.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=a.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}t(9023).inherits(s,o),s.prototype.write=function(e){this.buffer=a.concat([this.buffer,a.from(e)]),this.emit("data",e)},s.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=s},4397:function(e,r,t){var a=t(6608).Buffer,o=t(1882),s=t(3569),i=t(2203),n=t(7265),l=t(9023);function c(e,r){return a.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function u(e){var r,t,a,o=e.header,i=e.payload,u=e.secret||e.privateKey,p=e.encoding,h=s(o.alg),d=(r=(r=p)||"utf8",t=c(n(o),"binary"),a=c(n(i),r),l.format("%s.%s",t,a)),f=h.sign(d,u);return l.format("%s.%s",d,f)}function p(e){var r=new o(e.secret||e.privateKey||e.key);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new o(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(p,i),p.prototype.sign=function(){try{var e=u({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},p.sign=u,e.exports=p},7265:function(e,r,t){var a=t(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||a.isBuffer(e)?e.toString():JSON.stringify(e)}},169:function(e,r,t){var a=t(6608).Buffer,o=t(1882),s=t(3569),i=t(2203),n=t(7265),l=t(9023),c=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function u(e){var r=e.split(".",1)[0],t=a.from(r,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(t))return t;try{return JSON.parse(t)}catch(e){return}}function p(e){return e.split(".")[2]}function h(e){return c.test(e)&&!!u(e)}function d(e,r,t){if(!r){var a=Error("Missing algorithm parameter for jws.verify");throw a.code="MISSING_ALGORITHM",a}var o=p(e=n(e)),i=e.split(".",2).join(".");return s(r).verify(i,o,t)}function f(e,r){if(r=r||{},!h(e=n(e)))return null;var t,o,s=u(e);if(!s)return null;var i=(t=t||"utf8",o=e.split(".")[1],a.from(o,"base64").toString(t));return("JWT"===s.typ||r.json)&&(i=JSON.parse(i,r.encoding)),{header:s,payload:i,signature:p(e)}}function m(e){var r=new o((e=e||{}).secret||e.publicKey||e.key);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new o(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,i),m.prototype.verify=function(){try{var e=d(this.signature.buffer,this.algorithm,this.key.buffer),r=f(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=f,m.isValid=h,m.verify=d,e.exports=m},5357:function(e){var r,t,a=1/0,o=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=/^(?:0|[1-9]\d*)$/,u=parseInt;function p(e){return e!=e}var h=Object.prototype,d=h.hasOwnProperty,f=h.toString,m=h.propertyIsEnumerable,v=(r=Object.keys,t=Object,function(e){return r(t(e))}),g=Math.max,y=Array.isArray;function E(e){var r,t,a;return null!=e&&"number"==typeof(r=e.length)&&r>-1&&r%1==0&&r<=0x1fffffffffffff&&"[object Function]"!=(a=b(t=e)?f.call(t):"")&&"[object GeneratorFunction]"!=a}function b(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}function _(e){return!!e&&"object"==typeof e}e.exports=function(e,r,t,w){e=E(e)?e:function(e){return e?function(e,r){for(var t=-1,a=e?e.length:0,o=Array(a);++t<a;)o[t]=r(e[t],t,e);return o}(E(e)?function(e,r){var t,a,o,s,i=y(e)||_(a=t=e)&&E(a)&&d.call(t,"callee")&&(!m.call(t,"callee")||"[object Arguments]"==f.call(t))?function(e,r){for(var t=-1,a=Array(e);++t<e;)a[t]=r(t);return a}(e.length,String):[],n=i.length,l=!!n;for(var u in e){d.call(e,u)&&!(l&&("length"==u||(o=u,(s=null==(s=n)?0x1fffffffffffff:s)&&("number"==typeof o||c.test(o))&&o>-1&&o%1==0&&o<s)))&&i.push(u)}return i}(e):function(e){if(t=(r=e)&&r.constructor,r!==("function"==typeof t&&t.prototype||h))return v(e);var r,t,a=[];for(var o in Object(e))d.call(e,o)&&"constructor"!=o&&a.push(o);return a}(e),function(r){return e[r]}):[]}(e),t=t&&!w?(z=(S=(P=t)?(P=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||_(r)&&"[object Symbol]"==f.call(r))return o;if(b(e)){var r,t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var a=n.test(e);return a||l.test(e)?u(e.slice(2),a?2:8):i.test(e)?o:+e}(P))===a||P===-a?(P<0?-1:1)*17976931348623157e292:P==P?P:0:0===P?P:0)%1,S==S?z?S-z:S:0):0;var P,S,z,x,$=e.length;return t<0&&(t=g($+t,0)),"string"==typeof(x=e)||!y(x)&&_(x)&&"[object String]"==f.call(x)?t<=$&&e.indexOf(r,t)>-1:!!$&&function(e,r,t){if(r!=r){for(var a=e.length,o=t+-1;++o<a;)if(p(e[o],o,e))return o;return -1}for(var s=t-1,i=e.length;++s<i;)if(e[s]===r)return s;return -1}(e,r,t)>-1}},6782:function(e){var r=Object.prototype.toString;e.exports=function(e){var t;return!0===e||!1===e||!!(t=e)&&"object"==typeof t&&"[object Boolean]"==r.call(e)}},5250:function(e){var r=1/0,t=0/0,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,n=parseInt,l=Object.prototype.toString;function c(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=function(e){var u,p,h;return"number"==typeof e&&e==(h=(p=(u=e)?(u=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||r&&"object"==typeof r&&"[object Symbol]"==l.call(r))return t;if(c(e)){var r,u="function"==typeof e.valueOf?e.valueOf():e;e=c(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var p=s.test(e);return p||i.test(e)?n(e.slice(2),p?2:8):o.test(e)?t:+e}(u))===r||u===-r?(u<0?-1:1)*17976931348623157e292:u==u?u:0:0===u?u:0)%1,p==p?h?p-h:p:0)}},8094:function(e){var r=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==r.call(e)}},6052:function(e){var r,t,a=Object.prototype,o=Function.prototype.toString,s=a.hasOwnProperty,i=o.call(Object),n=a.toString,l=(r=Object.getPrototypeOf,t=Object,function(e){return r(t(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=n.call(e)||function(e){var r=!1;if(null!=e&&"function"!=typeof e.toString)try{r=!!(e+"")}catch(e){}return r}(e))return!1;var r=l(e);if(null===r)return!0;var t=s.call(r,"constructor")&&r.constructor;return"function"==typeof t&&t instanceof t&&o.call(t)==i}},1251:function(e){var r=Object.prototype.toString,t=Array.isArray;e.exports=function(e){var a;return"string"==typeof e||!t(e)&&!!(a=e)&&"object"==typeof a&&"[object String]"==r.call(e)}},8430:function(e){var r=1/0,t=0/0,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,n=parseInt,l=Object.prototype.toString;function c(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=function(e){var u,p,h,d,f=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return h=(p=(u=f)?(u=function(e){if("number"==typeof e)return e;if("symbol"==typeof(r=e)||r&&"object"==typeof r&&"[object Symbol]"==l.call(r))return t;if(c(e)){var r,u="function"==typeof e.valueOf?e.valueOf():e;e=c(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var p=s.test(e);return p||i.test(e)?n(e.slice(2),p?2:8):o.test(e)?t:+e}(u))===r||u===-r?(u<0?-1:1)*17976931348623157e292:u==u?u:0:0===u?u:0)%1,f=p==p?h?p-h:p:0,function(){return--f>0&&(d=m.apply(this,arguments)),f<=1&&(m=void 0),d}}},3866:function(e){function r(e,r,t,a){return Math.round(e/t)+" "+a+(r>=1.5*t?"s":"")}e.exports=function(e,t){t=t||{};var a,o,s,i,n=typeof e;if("string"===n&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(c){var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:break}}}return}if("number"===n&&isFinite(e)){return t.long?(o=Math.abs(a=e))>=864e5?r(a,o,864e5,"day"):o>=36e5?r(a,o,36e5,"hour"):o>=6e4?r(a,o,6e4,"minute"):o>=1e3?r(a,o,1e3,"second"):a+" ms":(i=Math.abs(s=e))>=864e5?Math.round(s/864e5)+"d":i>=36e5?Math.round(s/36e5)+"h":i>=6e4?Math.round(s/6e4)+"m":i>=1e3?Math.round(s/1e3)+"s":s+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6608:function(e,r,t){var a=t(181),o=a.Buffer;function s(e,r){for(var t in e)r[t]=e[t]}function i(e,r,t){return o(e,r,t)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=a:(s(a,r),r.Buffer=i),i.prototype=Object.create(o.prototype),s(o,i),i.from=function(e,r,t){if("number"==typeof e)throw TypeError("Argument must not be a number");return o(e,r,t)},i.alloc=function(e,r,t){if("number"!=typeof e)throw TypeError("Argument must be a number");var a=o(e);return void 0!==r?"string"==typeof t?a.fill(r,t):a.fill(r):a.fill(0),a},i.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return a.SlowBuffer(e)}},8610:function(e,r,t){"use strict";let a=Symbol("SemVer ANY");class o{static get ANY(){return a}constructor(e,r){if(r=s(r),e instanceof o)if(!!r.loose===e.loose)return e;else e=e.value;c("comparator",e=e.trim().split(/\s+/).join(" "),r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===a?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){let r=this.options.loose?i[n.COMPARATORLOOSE]:i[n.COMPARATOR],t=e.match(r);if(!t)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),t[2]?this.semver=new u(t[2],this.options.loose):this.semver=a}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof o))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,r).test(this.value):""===e.operator?""===e.value||new p(this.value,r).test(e.semver):!((r=s(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let s=t(4621),{safeRe:i,t:n}=t(152),l=t(5461),c=t(674),u=t(2398),p=t(2069)},2069:function(e,r,t){"use strict";let a=/\s+/g;class o{constructor(e,r){if(r=i(r),e instanceof o)if(!!r.loose===e.loose&&!!r.includePrerelease===e.includePrerelease)return e;else return new o(e.raw,r);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(a," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let e=0;e<r.length;e++)e>0&&(this.formatted+=" "),this.formatted+=r[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&m)|(this.options.loose&&v))+":"+e,t=s.get(r);if(t)return t;let a=this.options.loose,o=a?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];l("hyphen replace",e=e.replace(o,I(this.options.includePrerelease))),l("comparator trim",e=e.replace(u[p.COMPARATORTRIM],h)),l("tilde trim",e=e.replace(u[p.TILDETRIM],d)),l("caret trim",e=e.replace(u[p.CARETTRIM],f));let i=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>j(e,this.options));a&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(u[p.COMPARATORLOOSE])))),l("range list",i);let c=new Map;for(let e of i.map(e=>new n(e,this.options))){if(g(e))return[e];c.set(e.value,e)}c.size>1&&c.has("")&&c.delete("");let y=[...c.values()];return s.set(r,y),y}intersects(e,r){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(t=>E(t,r)&&e.set.some(e=>E(e,r)&&t.every(t=>e.every(e=>t.intersects(e,r)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let r=0;r<this.set.length;r++)if(O(this.set[r],e,this.options))return!0;return!1}}e.exports=o;let s=new(t(2044)),i=t(4621),n=t(8610),l=t(674),c=t(2398),{safeRe:u,t:p,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:f}=t(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:v}=t(5076),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,E=(e,r)=>{let t=!0,a=e.slice(),o=a.pop();for(;t&&a.length;)t=a.every(e=>o.intersects(e,r)),o=a.pop();return t},b=(e,r)=>(l("comp",e=e.replace(u[p.BUILD],""),r),l("caret",e=S(e,r)),l("tildes",e=w(e,r)),l("xrange",e=x(e,r)),l("stars",e=R(e,r)),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,r)=>e.trim().split(/\s+/).map(e=>P(e,r)).join(" "),P=(e,r)=>{let t=r.loose?u[p.TILDELOOSE]:u[p.TILDE];return e.replace(t,(r,t,a,o,s)=>{let i;return l("tilde",e,r,t,a,o,s),_(t)?i="":_(a)?i=`>=${t}.0.0 <${+t+1}.0.0-0`:_(o)?i=`>=${t}.${a}.0 <${t}.${+a+1}.0-0`:s?(l("replaceTilde pr",s),i=`>=${t}.${a}.${o}-${s} <${t}.${+a+1}.0-0`):i=`>=${t}.${a}.${o} <${t}.${+a+1}.0-0`,l("tilde return",i),i})},S=(e,r)=>e.trim().split(/\s+/).map(e=>z(e,r)).join(" "),z=(e,r)=>{l("caret",e,r);let t=r.loose?u[p.CARETLOOSE]:u[p.CARET],a=r.includePrerelease?"-0":"";return e.replace(t,(r,t,o,s,i)=>{let n;return l("caret",e,r,t,o,s,i),_(t)?n="":_(o)?n=`>=${t}.0.0${a} <${+t+1}.0.0-0`:_(s)?n="0"===t?`>=${t}.${o}.0${a} <${t}.${+o+1}.0-0`:`>=${t}.${o}.0${a} <${+t+1}.0.0-0`:i?(l("replaceCaret pr",i),n="0"===t?"0"===o?`>=${t}.${o}.${s}-${i} <${t}.${o}.${+s+1}-0`:`>=${t}.${o}.${s}-${i} <${t}.${+o+1}.0-0`:`>=${t}.${o}.${s}-${i} <${+t+1}.0.0-0`):(l("no pr"),n="0"===t?"0"===o?`>=${t}.${o}.${s}${a} <${t}.${o}.${+s+1}-0`:`>=${t}.${o}.${s}${a} <${t}.${+o+1}.0-0`:`>=${t}.${o}.${s} <${+t+1}.0.0-0`),l("caret return",n),n})},x=(e,r)=>(l("replaceXRanges",e,r),e.split(/\s+/).map(e=>$(e,r)).join(" ")),$=(e,r)=>{e=e.trim();let t=r.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return e.replace(t,(t,a,o,s,i,n)=>{l("xRange",e,t,a,o,s,i,n);let c=_(o),u=c||_(s),p=u||_(i);return"="===a&&p&&(a=""),n=r.includePrerelease?"-0":"",c?t=">"===a||"<"===a?"<0.0.0-0":"*":a&&p?(u&&(s=0),i=0,">"===a?(a=">=",u?(o=+o+1,s=0):s=+s+1,i=0):"<="===a&&(a="<",u?o=+o+1:s=+s+1),"<"===a&&(n="-0"),t=`${a+o}.${s}.${i}${n}`):u?t=`>=${o}.0.0${n} <${+o+1}.0.0-0`:p&&(t=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`),l("xRange return",t),t})},R=(e,r)=>(l("replaceStars",e,r),e.trim().replace(u[p.STAR],"")),j=(e,r)=>(l("replaceGTE0",e,r),e.trim().replace(u[r.includePrerelease?p.GTE0PRE:p.GTE0],"")),I=e=>(r,t,a,o,s,i,n,l,c,u,p,h)=>(t=_(a)?"":_(o)?`>=${a}.0.0${e?"-0":""}`:_(s)?`>=${a}.${o}.0${e?"-0":""}`:i?`>=${t}`:`>=${t}${e?"-0":""}`,l=_(c)?"":_(u)?`<${+c+1}.0.0-0`:_(p)?`<${c}.${+u+1}.0-0`:h?`<=${c}.${u}.${p}-${h}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`,`${t} ${l}`.trim()),O=(e,r,t)=>{for(let t=0;t<e.length;t++)if(!e[t].test(r))return!1;if(r.prerelease.length&&!t.includePrerelease){for(let t=0;t<e.length;t++)if(l(e[t].semver),e[t].semver!==n.ANY&&e[t].semver.prerelease.length>0){let a=e[t].semver;if(a.major===r.major&&a.minor===r.minor&&a.patch===r.patch)return!0}return!1}return!0}},2398:function(e,r,t){"use strict";let a=t(674),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=t(5076),{safeRe:i,t:n}=t(152),l=t(4621),{compareIdentifiers:c}=t(9101);class u{constructor(e,r){if(r=l(r),e instanceof u)if(!!r.loose===e.loose&&!!r.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw TypeError(`version is longer than ${o} characters`);a("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const t=e.trim().match(r.loose?i[n.LOOSE]:i[n.FULL]);if(!t)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>s||this.major<0)throw TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let r=+e;if(r>=0&&r<s)return r}return e}):this.prerelease=[],this.build=t[5]?t[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(a("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof u||(e=new u(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let t=this.prerelease[r],o=e.prerelease[r];if(a("prerelease compare",r,t,o),void 0===t&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===t)return -1;else if(t===o)continue;else return c(t,o)}while(++r)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let r=0;do{let t=this.build[r],o=e.build[r];if(a("build compare",r,t,o),void 0===t&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===t)return -1;else if(t===o)continue;else return c(t,o)}while(++r)}inc(e,r,t){if(e.startsWith("pre")){if(!r&&!1===t)throw Error("invalid increment argument: identifier is empty");if(r){let e=`-${r}`.match(this.options.loose?i[n.PRERELEASELOOSE]:i[n.PRERELEASE]);if(!e||e[1]!==r)throw Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,t),this.inc("pre",r,t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",r,t),this.inc("pre",r,t);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(t);if(0===this.prerelease.length)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)"number"==typeof this.prerelease[a]&&(this.prerelease[a]++,a=-2);if(-1===a){if(r===this.prerelease.join(".")&&!1===t)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(r){let a=[r,e];!1===t&&(a=[r]),0===c(this.prerelease[0],r)?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},5608:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}},5461:function(e,r,t){"use strict";let a=t(8271),o=t(733),s=t(1686),i=t(6479),n=t(7257),l=t(5850);e.exports=(e,r,t,c)=>{switch(r){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return a(e,t,c);case"!=":return o(e,t,c);case">":return s(e,t,c);case">=":return i(e,t,c);case"<":return n(e,t,c);case"<=":return l(e,t,c);default:throw TypeError(`Invalid operator: ${r}`)}}},7771:function(e,r,t){"use strict";let a=t(2398),o=t(6802),{safeRe:s,t:i}=t(152);e.exports=(e,r)=>{if(e instanceof a)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let t=null;if((r=r||{}).rtl){let a,o=r.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];for(;(a=o.exec(e))&&(!t||t.index+t[0].length!==e.length);)t&&a.index+a[0].length===t.index+t[0].length||(t=a),o.lastIndex=a.index+a[1].length+a[2].length;o.lastIndex=-1}else t=e.match(r.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===t)return null;let n=t[2],l=t[3]||"0",c=t[4]||"0",u=r.includePrerelease&&t[5]?`-${t[5]}`:"",p=r.includePrerelease&&t[6]?`+${t[6]}`:"";return o(`${n}.${l}.${c}${u}${p}`,r)}},8767:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t)=>{let o=new a(e,t),s=new a(r,t);return o.compare(s)||o.compareBuild(s)}},6293:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r)=>a(e,r,!0)},6958:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t)=>new a(e,t).compare(new a(r,t))},3086:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,null,!0),o=a(r,null,!0),s=t.compare(o);if(0===s)return null;let i=s>0,n=i?t:o,l=i?o:t,c=!!n.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(n))return l.minor&&!l.patch?"minor":"patch"}let u=c?"pre":"";return t.major!==o.major?u+"major":t.minor!==o.minor?u+"minor":t.patch!==o.patch?u+"patch":"prerelease"}},8271:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0===a(e,r,t)},1686:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(e,r,t)>0},6479:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(e,r,t)>=0},3625:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t,o,s)=>{"string"==typeof t&&(s=o,o=t,t=void 0);try{return new a(e instanceof a?e.version:e,t).inc(r,o,s).version}catch(e){return null}}},7257:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0>a(e,r,t)},5850:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0>=a(e,r,t)},7744:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).major},4812:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).minor},733:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>0!==a(e,r,t)},6802:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r,t=!1)=>{if(e instanceof a)return e;try{return new a(e,r)}catch(e){if(!t)return null;throw e}}},8643:function(e,r,t){"use strict";let a=t(2398);e.exports=(e,r)=>new a(e,r).patch},9283:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,r);return t&&t.prerelease.length?t.prerelease:null}},7032:function(e,r,t){"use strict";let a=t(6958);e.exports=(e,r,t)=>a(r,e,t)},9839:function(e,r,t){"use strict";let a=t(8767);e.exports=(e,r)=>e.sort((e,t)=>a(t,e,r))},4056:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r,t)=>{try{r=new a(r,t)}catch(e){return!1}return r.test(e)}},7697:function(e,r,t){"use strict";let a=t(8767);e.exports=(e,r)=>e.sort((e,t)=>a(e,t,r))},6807:function(e,r,t){"use strict";let a=t(6802);e.exports=(e,r)=>{let t=a(e,r);return t?t.version:null}},3895:function(e,r,t){"use strict";let a=t(152),o=t(5076),s=t(2398),i=t(9101),n=t(6802),l=t(6807),c=t(5608),u=t(3625),p=t(3086),h=t(7744),d=t(4812),f=t(8643),m=t(9283),v=t(6958),g=t(7032),y=t(6293),E=t(8767),b=t(7697),_=t(9839),w=t(1686),P=t(7257),S=t(8271),z=t(733),x=t(6479),$=t(5850),R=t(5461),j=t(7771),I=t(8610),O=t(2069),A=t(4056),T=t(6613),D=t(7114),k=t(1008),C=t(203),N=t(5372),F=t(4713),L=t(4497),q=t(9272),U=t(3490);e.exports={parse:n,valid:l,clean:c,inc:u,diff:p,major:h,minor:d,patch:f,prerelease:m,compare:v,rcompare:g,compareLoose:y,compareBuild:E,sort:b,rsort:_,gt:w,lt:P,eq:S,neq:z,gte:x,lte:$,cmp:R,coerce:j,Comparator:I,Range:O,satisfies:A,toComparators:T,maxSatisfying:D,minSatisfying:k,minVersion:C,validRange:N,outside:F,gtr:L,ltr:q,intersects:U,simplifyRange:t(4039),subset:t(22),SemVer:s,re:a.re,src:a.src,tokens:a.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},5076:function(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674:function(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101:function(e){"use strict";let r=/^[0-9]+$/,t=(e,t)=>{if("number"==typeof e&&"number"==typeof t)return e===t?0:e<t?-1:1;let a=r.test(e),o=r.test(t);return a&&o&&(e*=1,t*=1),e===t?0:a&&!o?-1:o&&!a?1:e<t?-1:1};e.exports={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}},2044:function(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(void 0!==r)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&void 0!==r){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,r)}return this}}},4621:function(e){"use strict";let r=Object.freeze({loose:!0}),t=Object.freeze({});e.exports=e=>e?"object"!=typeof e?r:e:t},152:function(e,r,t){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=t(5076),i=t(674),n=(r=e.exports={}).re=[],l=r.safeRe=[],c=r.src=[],u=r.safeSrc=[],p=r.t={},h=0,d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,o]],m=(e,r,t)=>{let a=(e=>{for(let[r,t]of f)e=e.split(`${r}*`).join(`${r}{0,${t}}`).split(`${r}+`).join(`${r}{1,${t}}`);return e})(r),o=h++;i(e,o,r),p[e]=o,c[o]=r,u[o]=a,n[o]=new RegExp(r,t?"g":void 0),l[o]=new RegExp(a,t?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),m("MAINVERSION",`(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})\\.(${c[p.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})\\.(${c[p.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[p.NONNUMERICIDENTIFIER]}|${c[p.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${c[p.PRERELEASEIDENTIFIER]}(?:\\.${c[p.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${c[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[p.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${d}+`),m("BUILD",`(?:\\+(${c[p.BUILDIDENTIFIER]}(?:\\.${c[p.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${c[p.MAINVERSION]}${c[p.PRERELEASE]}?${c[p.BUILD]}?`),m("FULL",`^${c[p.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${c[p.MAINVERSIONLOOSE]}${c[p.PRERELEASELOOSE]}?${c[p.BUILD]}?`),m("LOOSE",`^${c[p.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${c[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${c[p.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:\\.(${c[p.XRANGEIDENTIFIER]})(?:${c[p.PRERELEASE]})?${c[p.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[p.XRANGEIDENTIFIERLOOSE]})(?:${c[p.PRERELEASELOOSE]})?${c[p.BUILD]}?)?)?`),m("XRANGE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${c[p.GTLT]}\\s*${c[p.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),m("COERCE",`${c[p.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",c[p.COERCEPLAIN]+`(?:${c[p.PRERELEASE]})?`+`(?:${c[p.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",c[p.COERCE],!0),m("COERCERTLFULL",c[p.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${c[p.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",m("TILDE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${c[p.LONETILDE]}${c[p.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${c[p.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",m("CARET",`^${c[p.LONECARET]}${c[p.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${c[p.LONECARET]}${c[p.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${c[p.GTLT]}\\s*(${c[p.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${c[p.GTLT]}\\s*(${c[p.LOOSEPLAIN]}|${c[p.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${c[p.XRANGEPLAIN]})\\s+-\\s+(${c[p.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${c[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[p.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497:function(e,r,t){"use strict";let a=t(4713);e.exports=(e,r,t)=>a(e,r,">",t)},3490:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r,t)=>(e=new a(e,t),r=new a(r,t),e.intersects(r,t))},9272:function(e,r,t){"use strict";let a=t(4713);e.exports=(e,r,t)=>a(e,r,"<",t)},7114:function(e,r,t){"use strict";let a=t(2398),o=t(2069);e.exports=(e,r,t)=>{let s=null,i=null,n=null;try{n=new o(r,t)}catch(e){return null}return e.forEach(e=>{n.test(e)&&(!s||-1===i.compare(e))&&(i=new a(s=e,t))}),s}},1008:function(e,r,t){"use strict";let a=t(2398),o=t(2069);e.exports=(e,r,t)=>{let s=null,i=null,n=null;try{n=new o(r,t)}catch(e){return null}return e.forEach(e=>{n.test(e)&&(!s||1===i.compare(e))&&(i=new a(s=e,t))}),s}},203:function(e,r,t){"use strict";let a=t(2398),o=t(2069),s=t(1686);e.exports=(e,r)=>{e=new o(e,r);let t=new a("0.0.0");if(e.test(t)||(t=new a("0.0.0-0"),e.test(t)))return t;t=null;for(let r=0;r<e.set.length;++r){let o=e.set[r],i=null;o.forEach(e=>{let r=new a(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!i||s(r,i))&&(i=r);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),i&&(!t||s(t,i))&&(t=i)}return t&&e.test(t)?t:null}},4713:function(e,r,t){"use strict";let a=t(2398),o=t(8610),{ANY:s}=o,i=t(2069),n=t(4056),l=t(1686),c=t(7257),u=t(5850),p=t(6479);e.exports=(e,r,t,h)=>{let d,f,m,v,g;switch(e=new a(e,h),r=new i(r,h),t){case">":d=l,f=u,m=c,v=">",g=">=";break;case"<":d=c,f=p,m=l,v="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(n(e,r,h))return!1;for(let t=0;t<r.set.length;++t){let a=r.set[t],i=null,n=null;if(a.forEach(e=>{e.semver===s&&(e=new o(">=0.0.0")),i=i||e,n=n||e,d(e.semver,i.semver,h)?i=e:m(e.semver,n.semver,h)&&(n=e)}),i.operator===v||i.operator===g||(!n.operator||n.operator===v)&&f(e,n.semver)||n.operator===g&&m(e,n.semver))return!1}return!0}},4039:function(e,r,t){"use strict";let a=t(4056),o=t(6958);e.exports=(e,r,t)=>{let s=[],i=null,n=null,l=e.sort((e,r)=>o(e,r,t));for(let e of l)a(e,r,t)?(n=e,i||(i=e)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let c=[];for(let[e,r]of s)e===r?c.push(e):r||e!==l[0]?r?e===l[0]?c.push(`<=${r}`):c.push(`${e} - ${r}`):c.push(`>=${e}`):c.push("*");let u=c.join(" || "),p="string"==typeof r.raw?r.raw:String(r);return u.length<p.length?u:r}},22:function(e,r,t){"use strict";let a=t(2069),o=t(8610),{ANY:s}=o,i=t(4056),n=t(6958),l=[new o(">=0.0.0-0")],c=[new o(">=0.0.0")],u=(e,r,t)=>{let a,o,u,d,f,m,v;if(e===r)return!0;if(1===e.length&&e[0].semver===s)if(1===r.length&&r[0].semver===s)return!0;else e=t.includePrerelease?l:c;if(1===r.length&&r[0].semver===s)if(t.includePrerelease)return!0;else r=c;let g=new Set;for(let r of e)">"===r.operator||">="===r.operator?a=p(a,r,t):"<"===r.operator||"<="===r.operator?o=h(o,r,t):g.add(r.semver);if(g.size>1)return null;if(a&&o&&((u=n(a.semver,o.semver,t))>0||0===u&&(">="!==a.operator||"<="!==o.operator)))return null;for(let e of g){if(a&&!i(e,String(a),t)||o&&!i(e,String(o),t))return null;for(let a of r)if(!i(e,String(a),t))return!1;return!0}let y=!!o&&!t.includePrerelease&&!!o.semver.prerelease.length&&o.semver,E=!!a&&!t.includePrerelease&&!!a.semver.prerelease.length&&a.semver;for(let e of(y&&1===y.prerelease.length&&"<"===o.operator&&0===y.prerelease[0]&&(y=!1),r)){if(v=v||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,a){if(E&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===E.major&&e.semver.minor===E.minor&&e.semver.patch===E.patch&&(E=!1),">"===e.operator||">="===e.operator){if((d=p(a,e,t))===e&&d!==a)return!1}else if(">="===a.operator&&!i(a.semver,String(e),t))return!1}if(o){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if((f=h(o,e,t))===e&&f!==o)return!1}else if("<="===o.operator&&!i(o.semver,String(e),t))return!1}if(!e.operator&&(o||a)&&0!==u)return!1}return(!a||!m||!!o||0===u)&&(!o||!v||!!a||0===u)&&!E&&!y&&!0},p=(e,r,t)=>{if(!e)return r;let a=n(e.semver,r.semver,t);return a>0?e:a<0||">"===r.operator&&">="===e.operator?r:e},h=(e,r,t)=>{if(!e)return r;let a=n(e.semver,r.semver,t);return a<0?e:a>0||"<"===r.operator&&"<="===e.operator?r:e};e.exports=(e,r,t={})=>{if(e===r)return!0;e=new a(e,t),r=new a(r,t);let o=!1;e:for(let a of e.set){for(let e of r.set){let r=u(a,e,t);if(o=o||null!==r,r)continue e}if(o)return!1}return!0}},6613:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r)=>new a(e,r).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372:function(e,r,t){"use strict";let a=t(2069);e.exports=(e,r)=>{try{return new a(e,r).range||"*"}catch(e){return null}}},3749:function(e,r){(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))return r[0];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("")}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="[A-Za-z]",o="[0-9]",s=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+t("%[89A-Fa-f]"+s+"%"+s+s)+"|"+t("%"+s+s)),n="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=r("[\\:\\/\\?\\#\\[\\]\\@]",n),c=e?"[\\uE000-\\uF8FF]":"[]",u=r(a,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),p=t(a+r(a,o,"[\\+\\-\\.]")+"*"),h=t(t(i+"|"+r(u,n,"[\\:]"))+"*"),d=(t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("[1-9]"+o)+"|"+o),t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o)),f=t(d+"\\."+d+"\\."+d+"\\."+d),m=t(s+"{1,4}"),v=t(t(m+"\\:"+m)+"|"+f),g=t(t(m+"\\:")+"{6}"+v),y=t("\\:\\:"+t(m+"\\:")+"{5}"+v),E=t(t(m)+"?\\:\\:"+t(m+"\\:")+"{4}"+v),b=t(t(t(m+"\\:")+"{0,1}"+m)+"?\\:\\:"+t(m+"\\:")+"{3}"+v),_=t(t(t(m+"\\:")+"{0,2}"+m)+"?\\:\\:"+t(m+"\\:")+"{2}"+v),w=t(t(t(m+"\\:")+"{0,3}"+m)+"?\\:\\:"+m+"\\:"+v),P=t(t(t(m+"\\:")+"{0,4}"+m)+"?\\:\\:"+v),S=t(t(t(m+"\\:")+"{0,5}"+m)+"?\\:\\:"+m),z=t(t(t(m+"\\:")+"{0,6}"+m)+"?\\:\\:"),x=t([g,y,E,b,_,w,P,S,z].join("|")),$=t(t(u+"|"+i)+"+"),R=(t(x+"\\%25"+$),t(x+t("\\%25|\\%(?!"+s+"{2})")+$)),j=t("[vV]"+s+"+\\."+r(u,n,"[\\:]")+"+"),I=t("\\["+t(R+"|"+x+"|"+j)+"\\]"),O=t(t(i+"|"+r(u,n))+"*"),A=t(I+"|"+f+"(?!"+O+")|"+O),T=t(o+"*"),D=t(t(h+"@")+"?"+A+t("\\:"+T)+"?"),k=t(i+"|"+r(u,n,"[\\:\\@]")),C=t(k+"*"),N=t(k+"+"),F=t(t(i+"|"+r(u,n,"[\\@]"))+"+"),L=t(t("\\/"+C)+"*"),q=t("\\/"+t(N+L)+"?"),U=t(F+L),V=t(N+L),M="(?!"+k+")",H=(t(L+"|"+q+"|"+U+"|"+V+"|"+M),t(t(k+"|"+r("[\\/\\?]",c))+"*")),K=t(t(k+"|[\\/\\?]")+"*"),B=t(t("\\/\\/"+D+L)+"|"+q+"|"+V+"|"+M),Q=t(p+"\\:"+B+t("\\?"+H)+"?"+t("\\#"+K)+"?"),G=t(t("\\/\\/"+D+L)+"|"+q+"|"+U+"|"+M),J=t(G+t("\\?"+H)+"?"+t("\\#"+K)+"?");return t(Q+"|"+J),t(p+"\\:"+B+t("\\?"+H)+"?"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+V+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+U+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t(t("\\/\\/("+t("("+h+")@")+"?("+A+")"+t("\\:("+T+")")+"?)")+"?("+L+"|"+q+"|"+V+"|"+M+")"),t("\\?("+H+")"),t("\\#("+K+")"),t("("+h+")@"),t("\\:("+T+")"),{NOT_SCHEME:RegExp(r("[^]",a,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:RegExp(r("[^\\%\\:]",u,n),"g"),NOT_HOST:RegExp(r("[^\\%\\[\\]\\:]",u,n),"g"),NOT_PATH:RegExp(r("[^\\%\\/\\:\\@]",u,n),"g"),NOT_PATH_NOSCHEME:RegExp(r("[^\\%\\/\\@]",u,n),"g"),NOT_QUERY:RegExp(r("[^\\%]",u,n,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:RegExp(r("[^\\%]",u,n,"[\\:\\@\\/\\?]"),"g"),ESCAPE:RegExp(r("[^]",u,n),"g"),UNRESERVED:RegExp(u,"g"),OTHER_CHARS:RegExp(r("[^\\%]",u,l),"g"),PCT_ENCODED:RegExp(i,"g"),IPV4ADDRESS:RegExp("^("+f+")$"),IPV6ADDRESS:RegExp("^\\[?("+x+")"+t(t("\\%25|\\%(?!"+s+"{2})")+"("+$+")")+"?\\]?$")}}var i=s(!1),n=s(!0),l=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 i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){o=!0,s=e}finally{try{!a&&n.return&&n.return()}finally{if(o)throw s}}return t}(e,r);throw TypeError("Invalid attempt to destructure non-iterable instance")},c=/^xn--/,u=/[^\0-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={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,f=String.fromCharCode;function m(e){throw RangeError(h[e])}function v(e,r){var t=e.split("@"),a="";return t.length>1&&(a=t[0]+"@",e=t[1]),a+(function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t})((e=e.replace(p,".")).split("."),r).join(".")}var g=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},y=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=e.length,a=0,o=128,s=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var n=0;n<i;++n)e.charCodeAt(n)>=128&&m("not-basic"),r.push(e.charCodeAt(n));for(var l=i>0?i+1:0;l<t;){for(var c=a,u=1,p=36;;p+=36){l>=t&&m("invalid-input");var h,f=(h=e.charCodeAt(l++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36;(f>=36||f>d((0x7fffffff-a)/u))&&m("overflow"),a+=f*u;var v=p<=s?1:p>=s+26?26:p-s;if(f<v)break;var g=36-v;u>d(0x7fffffff/g)&&m("overflow"),u*=g}var E=r.length+1;s=y(a-c,E,0==c),d(a/E)>0x7fffffff-o&&m("overflow"),o+=d(a/E),a%=E,r.splice(a++,0,o)}return String.fromCodePoint.apply(String,r)},b=function(e){var r=[],t=(e=function(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++);(64512&s)==56320?r.push(((1023&o)<<10)+(1023&s)+65536):(r.push(o),t--)}else r.push(o)}return r}(e)).length,a=128,o=0,s=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var p=c.value;p<128&&r.push(f(p))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var h=r.length,v=h;for(h&&r.push("-");v<t;){var E=0x7fffffff,b=!0,_=!1,w=void 0;try{for(var P,S=e[Symbol.iterator]();!(b=(P=S.next()).done);b=!0){var z=P.value;z>=a&&z<E&&(E=z)}}catch(e){_=!0,w=e}finally{try{!b&&S.return&&S.return()}finally{if(_)throw w}}var x=v+1;E-a>d((0x7fffffff-o)/x)&&m("overflow"),o+=(E-a)*x,a=E;var $=!0,R=!1,j=void 0;try{for(var I,O=e[Symbol.iterator]();!($=(I=O.next()).done);$=!0){var A=I.value;if(A<a&&++o>0x7fffffff&&m("overflow"),A==a){for(var T=o,D=36;;D+=36){var k=D<=s?1:D>=s+26?26:D-s;if(T<k)break;var C=T-k,N=36-k;r.push(f(g(k+C%N,0))),T=d(C/N)}r.push(f(g(T,0))),s=y(o,x,v==h),o=0,++v}}}catch(e){R=!0,j=e}finally{try{!$&&O.return&&O.return()}finally{if(R)throw j}}++o,++a}return r.join("")},_=function(e){return v(e,function(e){return u.test(e)?"xn--"+b(e):e})},w=function(e){return v(e,function(e){return c.test(e)?E(e.slice(4).toLowerCase()):e})},P={};function S(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 z(e){for(var r="",t=0,a=e.length;t<a;){var o=parseInt(e.substr(t+1,2),16);o<128?(r+=String.fromCharCode(o),t+=3):o>=194&&o<224?(a-t>=6?r+=String.fromCharCode((31&o)<<6|63&parseInt(e.substr(t+4,2),16)):r+=e.substr(t,6),t+=6):o>=224?(a-t>=9?r+=String.fromCharCode((15&o)<<12|(63&parseInt(e.substr(t+4,2),16))<<6|63&parseInt(e.substr(t+7,2),16)):r+=e.substr(t,9),t+=9):(r+=e.substr(t,3),t+=3)}return r}function x(e,r){function t(e){var t=z(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,S).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,S).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,S).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,S).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,S).replace(r.PCT_ENCODED,o)),e}function $(e){return e.replace(/^0*(.*)/,"$1")||"0"}function R(e,r){var t=l(e.match(r.IPV4ADDRESS)||[],2)[1];return t?t.split(".").map($).join("."):e}function j(e,r){var t=l(e.match(r.IPV6ADDRESS)||[],3),a=t[1],o=t[2];if(!a)return e;for(var s=l(a.toLowerCase().split("::").reverse(),2),i=s[0],n=s[1],c=n?n.split(":").map($):[],u=i.split(":").map($),p=r.IPV4ADDRESS.test(u[u.length-1]),h=p?7:8,d=u.length-h,f=Array(h),m=0;m<h;++m)f[m]=c[m]||u[d+m]||"";p&&(f[h-1]=R(f[h-1],r));var v=f.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],g=void 0;if(v&&v.length>1){var y=f.slice(0,v.index),E=f.slice(v.index+v.length);g=y.join(":")+"::"+E.join(":")}else g=f.join(":");return o&&(g+="%"+o),g}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,O=void 0==="".match(/(){0}/)[1];function A(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?n:i;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(I);if(o){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=j(R(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=P[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||s&&s.unicodeSupport)x(t,a);else{if(t.host&&(r.domainHost||s&&s.domainHost))try{t.host=_(t.host.replace(a.PCT_ENCODED,z).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(t,i)}s&&s.parse&&s.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}var T=/^\.\.?\//,D=/^\/\.(\/|$)/,k=/^\/\.\.(\/|$)/,C=/^\/?(?:.|\n)*?(?=\/|$)/;function N(e){for(var r=[];e.length;)if(e.match(T))e=e.replace(T,"");else if(e.match(D))e=e.replace(D,"/");else if(e.match(k))e=e.replace(k,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(C);if(t){var a=t[0];e=e.slice(a.length),r.push(a)}else throw Error("Unexpected dot segment condition")}return r.join("")}function F(e){var r,t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.iri?n:i,s=[],l=P[(a.scheme||e.scheme||"").toLowerCase()];if(l&&l.serialize&&l.serialize(e,a),e.host){if(o.IPV6ADDRESS.test(e.host));else if(a.domainHost||l&&l.domainHost)try{e.host=a.iri?w(e.host):_(e.host.replace(o.PCT_ENCODED,z).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(a.iri?"Unicode":"ASCII")+" via punycode: "+r}}x(e,o),"suffix"!==a.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var c=(r=!1!==a.iri?n:i,t=[],void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host&&t.push(j(R(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"})),("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0);if(void 0!==c&&("suffix"!==a.reference&&s.push("//"),s.push(c),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var u=e.path;a.absolutePath||l&&l.absolutePath||(u=N(u)),void 0===c&&(u=u.replace(/^\/\//,"/%2F")),s.push(u)}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function L(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments[3],o={};return a||(e=A(F(e,t),t),r=A(F(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=N(r.path||""),o.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=N(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=N(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=N(o.path)),o.query=r.query):(o.path=e.path,void 0!==r.query?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function q(e,r){return e&&e.toString().replace(r&&r.iri?n.PCT_ENCODED:i.PCT_ENCODED,z)}var U={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){var t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}},V={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function M(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,r){return e.secure=M(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e,r){if((e.port===(M(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=l(e.resourceName.split("?"),2),a=t[0],o=t[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},B={},Q="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",G="[0-9A-Fa-f]",J=t(t("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+t("%[89A-Fa-f]"+G+"%"+G+G)+"|"+t("%"+G+G)),W=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=RegExp(Q,"g"),Y=RegExp(J,"g"),Z=RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',W),"g"),ee=RegExp(r("[^]",Q,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g");function er(e){var r=z(e);return r.match(X)?r:e}var et={scheme:"mailto",parse:function(e,r){var t=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var a=!1,o={},s=e.query.split("&"),i=0,n=s.length;i<n;++i){var l=s[i].split("=");switch(l[0]){case"to":for(var c=l[1].split(","),u=0,p=c.length;u<p;++u)t.push(c[u]);break;case"subject":e.subject=q(l[1],r);break;case"body":e.body=q(l[1],r);break;default:a=!0,o[q(l[0],r)]=q(l[1],r)}}a&&(e.headers=o)}e.query=void 0;for(var h=0,d=t.length;h<d;++h){var f=t[h].split("@");if(f[0]=q(f[0]),r.unicodeSupport)f[1]=q(f[1],r).toLowerCase();else try{f[1]=_(q(f[1],r).toLowerCase())}catch(r){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+r}t[h]=f.join("@")}return e},serialize:function(e,r){var t,a=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(a){for(var s=0,i=a.length;s<i;++s){var n=String(a[s]),l=n.lastIndexOf("@"),c=n.slice(0,l).replace(Y,er).replace(Y,o).replace(Z,S),u=n.slice(l+1);try{u=r.iri?w(u):_(q(u,r).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}a[s]=c+"@"+u}e.path=a.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var h=[];for(var d in p)p[d]!==B[d]&&h.push(d.replace(Y,er).replace(Y,o).replace(ee,S)+"="+p[d].replace(Y,er).replace(Y,o).replace(ee,S));return h.length&&(e.query=h.join("&")),e}},ea=/^([^\:]+)\:(.*)/,eo={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(ea),a=e;if(t){var o=r.scheme||a.scheme||"urn",s=t[1].toLowerCase(),i=t[2],n=P[o+":"+(r.nid||s)];a.nid=s,a.nss=i,a.path=void 0,n&&(a=n.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=P[t+":"+(r.nid||a)];o&&(e=o.serialize(e,r));var s=e,i=e.nss;return s.path=(a||r.nid)+":"+i,s}},es=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ei={scheme:"urn:uuid",parse:function(e,r){return e.uuid=e.nss,e.nss=void 0,r.tolerant||e.uuid&&e.uuid.match(es)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,r){return e.nss=(e.uuid||"").toLowerCase(),e}};P[U.scheme]=U,P[V.scheme]=V,P[H.scheme]=H,P[K.scheme]=K,P[et.scheme]=et,P[eo.scheme]=eo,P[ei.scheme]=ei,e.SCHEMES=P,e.pctEncChar=S,e.pctDecChars=z,e.parse=A,e.removeDotSegments=N,e.serialize=F,e.resolveComponents=L,e.resolve=function(e,r,t){var a=function(e,r){if(r)for(var t in r)e[t]=r[t];return e}({scheme:"null"},t);return F(L(A(e,a),A(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=F(A(e,r),r):"object"===a(e)&&(e=A(F(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=F(A(e,t),t):"object"===a(e)&&(e=F(e,t)),"string"==typeof r?r=F(A(r,t),t):"object"===a(r)&&(r=F(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?n.ESCAPE:i.ESCAPE,S)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})})(r)},181:function(e){"use strict";e.exports=require("buffer")},6982:function(e){"use strict";e.exports=require("crypto")},9896:function(e){"use strict";e.exports=require("fs")},7598:function(e){"use strict";e.exports=require("node:crypto")},857:function(e){"use strict";e.exports=require("os")},6928:function(e){"use strict";e.exports=require("path")},2203:function(e){"use strict";e.exports=require("stream")},9023:function(e){"use strict";e.exports=require("util")},2741:function(r){"use strict";r.exports=e},3215:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/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}')},2269:function(e){"use strict";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}')},4519:function(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330:function(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.5.2","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"files":["dist"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.17.4","@rspack/core":"^1.6.3","ts-checker-rspack-plugin":"^1.2.0","typescript":"^5.8.3"},"devDependencies":{"@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.1","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.9","@types/node":"^22","@types/react":"^19.2.2","@types/react-dom":"^19.2.2","async-retry":"^1.3.3","chalk":"^5.3.0","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.0.0","dotenv":"^16.5.0","express":"^4.22.0","fs-extra":"^11.3.0","glob":"^11.0.2","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.2","memfs":"^4.17.2","raw-body":"^3.0.0","tsx":"^4.19.4"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.24.4"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return a[e].call(t.exports,t,t.exports,s),t.exports}s.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return s.d(r,{a:r}),r},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,a){if(1&a&&(e=this(e)),8&a||"object"==typeof e&&e&&(4&a&&e.__esModule||16&a&&"function"==typeof e.then))return e;var o=Object.create(null);s.r(o);var i={};r=r||[null,t({}),t([]),t(t)];for(var n=2&a&&e;("object"==typeof n||"function"==typeof n)&&!~r.indexOf(n);n=t(n))Object.getOwnPropertyNames(n).forEach(r=>{i[r]=()=>e[r]});return i.default=()=>e,s.d(o,i),o},s.d=(e,r)=>{for(var t in r)s.o(r,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";let e;s.r(i),s.d(i,{createHTTPClient:()=>r4,createContext:()=>y,jwtAuthMiddleware:()=>f,apiKeyAuthMiddleware:()=>p,completable:()=>b});var r,t,a,o=s(8583),n=s.n(o),l=s(2741);let c=l.z.object({apiKey:l.z.string().optional(),headerName:l.z.string().optional(),validateApiKey:l.z.function().args(l.z.string()).returns(l.z.promise(l.z.boolean())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),u="Unauthorized: Missing or invalid API key";function p(e){let r=c.safeParse(e);if(!r.success){let t="apiKey"in e,a="validateApiKey"in e;if(t&&a)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(t||a)throw Error(`Invalid configuration: ${r.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let t=e.headerName??"x-api-key",a="apiKey"in e?e.apiKey:void 0,o="validateApiKey"in e?e.validateApiKey:void 0;return async(r,s,i)=>{let n=r.header(t);!n||"apiKey"in e&&n!==a||o&&!await o(n)?s.status(401).json({error:u}):i()}}var h=s(7619),d=s.n(h);function f(e){return(r,t,a)=>{let o=r.header("Authorization");if(!o||!o.startsWith("Bearer "))return void t.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let s=o.slice(7).trim();if(!s)return void t.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:t,...o}=e;r.user=d().verify(s,t,o),a()}catch(e){t.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let m=require("async_hooks"),v=(e,r)=>{globalThis[e]=r},g=e=>globalThis[e];function y({name:e}){let r=Symbol.for(`xmcp-context-${e}`),t=Symbol.for(`xmcp-context-${e}-fallback-store`);if(g(r))return g(r);let a=new m.AsyncLocalStorage,o=globalThis[t]??{current:null};v(t,o);let s={provider:(e,r)=>(o.current=e,a.run(e,r)),getContext:()=>{let r=a.getStore();if(r)return r;if(o.current)return o.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:r=>{let t=a.getStore()??o.current;if(!t)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(t,r)}};return v(r,s),s}(t||(t={})).Completable="McpCompletable";class E extends l.ZodType{_parse(e){let{ctx:r}=this._processInputParams(e),t=r.data;return this._def.type._parse({data:t,path:r.path,parent:r})}unwrap(){return this._def.type}}function b(e,r){return E.create(e,{...e._def,complete:r})}E.create=(e,r)=>new E({type:e,typeName:t.Completable,complete:r.complete,...function(e){if(!e)return{};let{errorMap:r,invalid_type_error:t,required_error:a,description:o}=e;if(r&&(t||a))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return r?{errorMap:r,description:o}:{errorMap:(r,o)=>{var s,i;let{message:n}=e;return"invalid_enum_value"===r.code?{message:null!=n?n:o.defaultError}:void 0===o.data?{message:null!=(s=null!=n?n:a)?s:o.defaultError}:"invalid_type"!==r.code?{message:o.defaultError}:{message:null!=(i=null!=n?n:t)?i:o.defaultError}},description:o}}(r)});let _="2025-06-18",w=[_,"2025-03-26","2024-11-05","2024-10-07"],P=l.z.union([l.z.string(),l.z.number().int()]),S=l.z.string(),z=l.z.object({progressToken:l.z.optional(P)}).passthrough(),x=l.z.object({_meta:l.z.optional(z)}).passthrough(),$=l.z.object({method:l.z.string(),params:l.z.optional(x)}),R=l.z.object({_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),j=l.z.object({method:l.z.string(),params:l.z.optional(R)}),I=l.z.object({_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),O=l.z.union([l.z.string(),l.z.number().int()]),A=l.z.object({jsonrpc:l.z.literal("2.0"),id:O}).merge($).strict(),T=l.z.object({jsonrpc:l.z.literal("2.0")}).merge(j).strict(),D=l.z.object({jsonrpc:l.z.literal("2.0"),id:O,result:I}).strict(),k=e=>D.safeParse(e).success;(r=a||(a={}))[r.ConnectionClosed=-32e3]="ConnectionClosed",r[r.RequestTimeout=-32001]="RequestTimeout",r[r.ParseError=-32700]="ParseError",r[r.InvalidRequest=-32600]="InvalidRequest",r[r.MethodNotFound=-32601]="MethodNotFound",r[r.InvalidParams=-32602]="InvalidParams",r[r.InternalError=-32603]="InternalError";let C=l.z.object({jsonrpc:l.z.literal("2.0"),id:O,error:l.z.object({code:l.z.number().int(),message:l.z.string(),data:l.z.optional(l.z.unknown())})}).strict(),N=l.z.union([A,T,D,C]),F=I.strict(),L=j.extend({method:l.z.literal("notifications/cancelled"),params:R.extend({requestId:O,reason:l.z.string().optional()})}),q=l.z.object({src:l.z.string(),mimeType:l.z.optional(l.z.string()),sizes:l.z.optional(l.z.array(l.z.string()))}).passthrough(),U=l.z.object({icons:l.z.array(q).optional()}).passthrough(),V=l.z.object({name:l.z.string(),title:l.z.optional(l.z.string())}).passthrough(),M=V.extend({version:l.z.string(),websiteUrl:l.z.optional(l.z.string())}).merge(U),H=l.z.object({experimental:l.z.optional(l.z.object({}).passthrough()),sampling:l.z.optional(l.z.object({}).passthrough()),elicitation:l.z.optional(l.z.object({}).passthrough()),roots:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough())}).passthrough(),K=$.extend({method:l.z.literal("initialize"),params:x.extend({protocolVersion:l.z.string(),capabilities:H,clientInfo:M})}),B=l.z.object({experimental:l.z.optional(l.z.object({}).passthrough()),logging:l.z.optional(l.z.object({}).passthrough()),completions:l.z.optional(l.z.object({}).passthrough()),prompts:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough()),resources:l.z.optional(l.z.object({subscribe:l.z.optional(l.z.boolean()),listChanged:l.z.optional(l.z.boolean())}).passthrough()),tools:l.z.optional(l.z.object({listChanged:l.z.optional(l.z.boolean())}).passthrough())}).passthrough(),Q=I.extend({protocolVersion:l.z.string(),capabilities:B,serverInfo:M,instructions:l.z.optional(l.z.string())}),G=j.extend({method:l.z.literal("notifications/initialized")}),J=$.extend({method:l.z.literal("ping")}),W=l.z.object({progress:l.z.number(),total:l.z.optional(l.z.number()),message:l.z.optional(l.z.string())}).passthrough(),X=j.extend({method:l.z.literal("notifications/progress"),params:R.merge(W).extend({progressToken:P})}),Y=$.extend({params:x.extend({cursor:l.z.optional(S)}).optional()}),Z=I.extend({nextCursor:l.z.optional(S)}),ee=l.z.object({uri:l.z.string(),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),er=ee.extend({text:l.z.string()}),et=l.z.string().refine(e=>{try{return atob(e),!0}catch(e){return!1}},{message:"Invalid Base64 string"}),ea=ee.extend({blob:et}),eo=V.extend({uri:l.z.string(),description:l.z.optional(l.z.string()),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),es=V.extend({uriTemplate:l.z.string(),description:l.z.optional(l.z.string()),mimeType:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),ei=Y.extend({method:l.z.literal("resources/list")}),en=Z.extend({resources:l.z.array(eo)}),el=Y.extend({method:l.z.literal("resources/templates/list")}),ec=Z.extend({resourceTemplates:l.z.array(es)}),eu=$.extend({method:l.z.literal("resources/read"),params:x.extend({uri:l.z.string()})}),ep=I.extend({contents:l.z.array(l.z.union([er,ea]))}),eh=j.extend({method:l.z.literal("notifications/resources/list_changed")}),ed=$.extend({method:l.z.literal("resources/subscribe"),params:x.extend({uri:l.z.string()})}),ef=$.extend({method:l.z.literal("resources/unsubscribe"),params:x.extend({uri:l.z.string()})}),em=j.extend({method:l.z.literal("notifications/resources/updated"),params:R.extend({uri:l.z.string()})}),ev=l.z.object({name:l.z.string(),description:l.z.optional(l.z.string()),required:l.z.optional(l.z.boolean())}).passthrough(),eg=V.extend({description:l.z.optional(l.z.string()),arguments:l.z.optional(l.z.array(ev)),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),ey=Y.extend({method:l.z.literal("prompts/list")}),eE=Z.extend({prompts:l.z.array(eg)}),eb=$.extend({method:l.z.literal("prompts/get"),params:x.extend({name:l.z.string(),arguments:l.z.optional(l.z.record(l.z.string()))})}),e_=l.z.object({type:l.z.literal("text"),text:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),ew=l.z.object({type:l.z.literal("image"),data:et,mimeType:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),eP=l.z.object({type:l.z.literal("audio"),data:et,mimeType:l.z.string(),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),eS=l.z.object({type:l.z.literal("resource"),resource:l.z.union([er,ea]),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),ez=eo.extend({type:l.z.literal("resource_link")}),ex=l.z.union([e_,ew,eP,ez,eS]),e$=l.z.object({role:l.z.enum(["user","assistant"]),content:ex}).passthrough(),eR=I.extend({description:l.z.optional(l.z.string()),messages:l.z.array(e$)}),ej=j.extend({method:l.z.literal("notifications/prompts/list_changed")}),eI=l.z.object({title:l.z.optional(l.z.string()),readOnlyHint:l.z.optional(l.z.boolean()),destructiveHint:l.z.optional(l.z.boolean()),idempotentHint:l.z.optional(l.z.boolean()),openWorldHint:l.z.optional(l.z.boolean())}).passthrough(),eO=V.extend({description:l.z.optional(l.z.string()),inputSchema:l.z.object({type:l.z.literal("object"),properties:l.z.optional(l.z.object({}).passthrough()),required:l.z.optional(l.z.array(l.z.string()))}).passthrough(),outputSchema:l.z.optional(l.z.object({type:l.z.literal("object"),properties:l.z.optional(l.z.object({}).passthrough()),required:l.z.optional(l.z.array(l.z.string()))}).passthrough()),annotations:l.z.optional(eI),_meta:l.z.optional(l.z.object({}).passthrough())}).merge(U),eA=Y.extend({method:l.z.literal("tools/list")}),eT=Z.extend({tools:l.z.array(eO)}),eD=I.extend({content:l.z.array(ex).default([]),structuredContent:l.z.object({}).passthrough().optional(),isError:l.z.optional(l.z.boolean())});eD.or(I.extend({toolResult:l.z.unknown()}));let ek=$.extend({method:l.z.literal("tools/call"),params:x.extend({name:l.z.string(),arguments:l.z.optional(l.z.record(l.z.unknown()))})}),eC=j.extend({method:l.z.literal("notifications/tools/list_changed")}),eN=l.z.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),eF=$.extend({method:l.z.literal("logging/setLevel"),params:x.extend({level:eN})}),eL=j.extend({method:l.z.literal("notifications/message"),params:R.extend({level:eN,logger:l.z.optional(l.z.string()),data:l.z.unknown()})}),eq=l.z.object({name:l.z.string().optional()}).passthrough(),eU=l.z.object({hints:l.z.optional(l.z.array(eq)),costPriority:l.z.optional(l.z.number().min(0).max(1)),speedPriority:l.z.optional(l.z.number().min(0).max(1)),intelligencePriority:l.z.optional(l.z.number().min(0).max(1))}).passthrough(),eV=l.z.object({role:l.z.enum(["user","assistant"]),content:l.z.union([e_,ew,eP])}).passthrough(),eM=$.extend({method:l.z.literal("sampling/createMessage"),params:x.extend({messages:l.z.array(eV),systemPrompt:l.z.optional(l.z.string()),includeContext:l.z.optional(l.z.enum(["none","thisServer","allServers"])),temperature:l.z.optional(l.z.number()),maxTokens:l.z.number().int(),stopSequences:l.z.optional(l.z.array(l.z.string())),metadata:l.z.optional(l.z.object({}).passthrough()),modelPreferences:l.z.optional(eU)})}),eH=I.extend({model:l.z.string(),stopReason:l.z.optional(l.z.enum(["endTurn","stopSequence","maxTokens"]).or(l.z.string())),role:l.z.enum(["user","assistant"]),content:l.z.discriminatedUnion("type",[e_,ew,eP])}),eK=l.z.object({type:l.z.literal("boolean"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),default:l.z.optional(l.z.boolean())}).passthrough(),eB=l.z.object({type:l.z.literal("string"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),minLength:l.z.optional(l.z.number()),maxLength:l.z.optional(l.z.number()),format:l.z.optional(l.z.enum(["email","uri","date","date-time"]))}).passthrough(),eQ=l.z.object({type:l.z.enum(["number","integer"]),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),minimum:l.z.optional(l.z.number()),maximum:l.z.optional(l.z.number())}).passthrough(),eG=l.z.object({type:l.z.literal("string"),title:l.z.optional(l.z.string()),description:l.z.optional(l.z.string()),enum:l.z.array(l.z.string()),enumNames:l.z.optional(l.z.array(l.z.string()))}).passthrough(),eJ=l.z.union([eK,eB,eQ,eG]),eW=$.extend({method:l.z.literal("elicitation/create"),params:x.extend({message:l.z.string(),requestedSchema:l.z.object({type:l.z.literal("object"),properties:l.z.record(l.z.string(),eJ),required:l.z.optional(l.z.array(l.z.string()))}).passthrough()})}),eX=I.extend({action:l.z.enum(["accept","decline","cancel"]),content:l.z.optional(l.z.record(l.z.string(),l.z.unknown()))}),eY=l.z.object({type:l.z.literal("ref/resource"),uri:l.z.string()}).passthrough(),eZ=l.z.object({type:l.z.literal("ref/prompt"),name:l.z.string()}).passthrough(),e0=$.extend({method:l.z.literal("completion/complete"),params:x.extend({ref:l.z.union([eZ,eY]),argument:l.z.object({name:l.z.string(),value:l.z.string()}).passthrough(),context:l.z.optional(l.z.object({arguments:l.z.optional(l.z.record(l.z.string(),l.z.string()))}))})}),e1=I.extend({completion:l.z.object({values:l.z.array(l.z.string()).max(100),total:l.z.optional(l.z.number().int()),hasMore:l.z.optional(l.z.boolean())}).passthrough()}),e2=l.z.object({uri:l.z.string().startsWith("file://"),name:l.z.optional(l.z.string()),_meta:l.z.optional(l.z.object({}).passthrough())}).passthrough(),e9=$.extend({method:l.z.literal("roots/list")}),e5=I.extend({roots:l.z.array(e2)}),e4=j.extend({method:l.z.literal("notifications/roots/list_changed")});l.z.union([J,K,e0,eF,eb,ey,ei,el,eu,ed,ef,ek,eA]),l.z.union([L,X,G,e4]),l.z.union([F,eH,eX,e5]),l.z.union([J,eM,eW,e9]),l.z.union([L,X,eL,em,eh,eC,ej]),l.z.union([F,Q,e1,eR,eE,en,ec,ep,eD,eT]);class e6 extends Error{constructor(e,r,t){super(`MCP error ${e}: ${r}`),this.code=e,this.data=t,this.name="McpError"}}class e3{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(L,e=>{let r=this._requestHandlerAbortControllers.get(e.params.requestId);null==r||r.abort(e.params.reason)}),this.setNotificationHandler(X,e=>{this._onprogress(e)}),this.setRequestHandler(J,e=>({}))}_setupTimeout(e,r,t,a,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:t,resetTimeoutOnProgress:o,onTimeout:a})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let t=Date.now()-r.startTime;if(r.maxTotalTimeout&&t>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new e6(a.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:t});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,t,a;this._transport=e;let o=null==(r=this.transport)?void 0:r.onclose;this._transport.onclose=()=>{null==o||o(),this._onclose()};let s=null==(t=this.transport)?void 0:t.onerror;this._transport.onerror=e=>{null==s||s(e),this._onerror(e)};let i=null==(a=this._transport)?void 0:a.onmessage;this._transport.onmessage=(e,r)=>{if(null==i||i(e,r),k(e)||C.safeParse(e).success)this._onresponse(e);else if(A.safeParse(e).success)this._onrequest(e,r);else T.safeParse(e).success?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){var e;let r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,null==(e=this.onclose)||e.call(this);let t=new e6(a.ConnectionClosed,"Connection closed");for(let e of r.values())e(t)}_onerror(e){var r;null==(r=this.onerror)||r.call(this,e)}_onnotification(e){var r;let t=null!=(r=this._notificationHandlers.get(e.method))?r:this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,r){var t,o;let s=null!=(t=this._requestHandlers.get(e.method))?t:this.fallbackRequestHandler,i=this._transport;if(void 0===s){null==i||i.send({jsonrpc:"2.0",id:e.id,error:{code:a.MethodNotFound,message:"Method not found"}}).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);let l={signal:n.signal,sessionId:null==i?void 0:i.sessionId,_meta:null==(o=e.params)?void 0:o._meta,sendNotification:r=>this.notification(r,{relatedRequestId:e.id}),sendRequest:(r,t,a)=>this.request(r,t,{...a,relatedRequestId:e.id}),authInfo:null==r?void 0:r.authInfo,requestId:e.id,requestInfo:null==r?void 0:r.requestInfo};Promise.resolve().then(()=>s(e,l)).then(r=>{if(!n.signal.aborted)return null==i?void 0:i.send({result:r,jsonrpc:"2.0",id:e.id})},r=>{var t;if(!n.signal.aborted)return null==i?void 0:i.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(r.code)?r.code:a.InternalError,message:null!=(t=r.message)?t:"Internal error"}})}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...t}=e.params,a=Number(r),o=this._progressHandlers.get(a);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let s=this._responseHandlers.get(a),i=this._timeoutInfo.get(a);if(i&&s&&i.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(e){s(e);return}o(t)}_onresponse(e){let r=Number(e.id),t=this._responseHandlers.get(r);void 0===t?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),t(k(e)?e:new e6(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){var e;await (null==(e=this._transport)?void 0:e.close())}request(e,r,t){let{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}=null!=t?t:{};return new Promise((n,l)=>{var c,u,p,h,d,f;if(!this._transport)return void l(Error("Not connected"));(null==(c=this._options)?void 0:c.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),null==(u=null==t?void 0:t.signal)||u.throwIfAborted();let m=this._requestMessageId++,v={...e,jsonrpc:"2.0",id:m};(null==t?void 0:t.onprogress)&&(this._progressHandlers.set(m,t.onprogress),v.params={...e.params,_meta:{...(null==(p=e.params)?void 0:p._meta)||{},progressToken:m}});let g=e=>{var r;this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),null==(r=this._transport)||r.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(e)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e)};this._responseHandlers.set(m,e=>{var a;if(null==(a=null==t?void 0:t.signal)||!a.aborted){if(e instanceof Error)return l(e);try{let t=r.parse(e.result);n(t)}catch(e){l(e)}}}),null==(h=null==t?void 0:t.signal)||h.addEventListener("abort",()=>{var e;g(null==(e=null==t?void 0:t.signal)?void 0:e.reason)});let y=null!=(d=null==t?void 0:t.timeout)?d:6e4;this._setupTimeout(m,y,null==t?void 0:t.maxTotalTimeout,()=>g(new e6(a.RequestTimeout,"Request timed out",{timeout:y})),null!=(f=null==t?void 0:t.resetTimeoutOnProgress)&&f),this._transport.send(v,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(m),l(e)})})}async notification(e,r){var t,a;if(!this._transport)throw Error("Not connected");if(this.assertNotificationCapability(e.method),(null!=(a=null==(t=this._options)?void 0:t.debouncedNotificationMethods)?a:[]).includes(e.method)&&!e.params&&!(null==r?void 0:r.relatedRequestId)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var t;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let a={...e,jsonrpc:"2.0"};null==(t=this._transport)||t.send(a,r).catch(e=>this._onerror(e))});return}let o={...e,jsonrpc:"2.0"};await this._transport.send(o,r)}setRequestHandler(e,r){let t=e.shape.method.value;this.assertRequestHandlerCapability(t),this._requestHandlers.set(t,(t,a)=>Promise.resolve(r(e.parse(t),a)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,t=>Promise.resolve(r(e.parse(t))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}var e8=s(3084);class e7 extends e3{constructor(e,r){var t;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=null!=(t=null==r?void 0:r.capabilities)?t:{},this._ajv=new e8}registerCapabilities(e){var r;if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=(r=this._capabilities,Object.entries(e).reduce((e,[r,t])=>(t&&"object"==typeof t?e[r]=e[r]?{...e[r],...t}:t:e[r]=t,e),{...r}))}assertCapability(e,r){var t;if(!(null==(t=this._serverCapabilities)?void 0:t[e]))throw Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),void 0===e.sessionId)try{let t=await this.request({method:"initialize",params:{protocolVersion:_,capabilities:this._capabilities,clientInfo:this._clientInfo}},Q,r);if(void 0===t)throw Error(`Server sent invalid initialize result: ${t}`);if(!w.includes(t.protocolVersion))throw Error(`Server's protocol version is not supported: ${t.protocolVersion}`);this._serverCapabilities=t.capabilities,this._serverVersion=t.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(t.protocolVersion),this._instructions=t.instructions,await this.notification({method:"notifications/initialized"})}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,t,a,o,s;switch(e){case"logging/setLevel":if(!(null==(r=this._serverCapabilities)?void 0:r.logging))throw Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(null==(t=this._serverCapabilities)?void 0:t.prompts))throw Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(null==(a=this._serverCapabilities)?void 0:a.resources))throw Error(`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(null==(o=this._serverCapabilities)?void 0:o.tools))throw Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(null==(s=this._serverCapabilities)?void 0:s.completions))throw Error(`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){var r;if("notifications/roots/list_changed"===e&&!(null==(r=this._capabilities.roots)?void 0:r.listChanged))throw Error(`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},F,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},e1,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},F,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},eR,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},eE,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},en,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},ec,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},ep,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},F,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},F,r)}async callTool(e,r=eD,t){let o=await this.request({method:"tools/call",params:e},r,t),s=this.getToolOutputValidator(e.name);if(s){if(!o.structuredContent&&!o.isError)throw new e6(a.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{if(!s(o.structuredContent))throw new e6(a.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(e){if(e instanceof e6)throw e;throw new e6(a.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}cacheToolOutputSchemas(e){for(let r of(this._cachedToolOutputValidators.clear(),e))if(r.outputSchema)try{let e=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,e)}catch(e){}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let t=await this.request({method:"tools/list",params:e},eT,r);return this.cacheToolOutputSchemas(t.tools),t}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}async function re(r){return(await e).getRandomValues(new Uint8Array(r))}async function rr(e){let r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",t="",a=await re(e);for(let o=0;o<e;o++){let e=a[o]%r.length;t+=r[e]}return t}async function rt(e){return await rr(e)}async function ra(r){return btoa(String.fromCharCode(...new Uint8Array(await (await e).subtle.digest("SHA-256",new TextEncoder().encode(r))))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function ro(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let r=await rt(e),t=await ra(r);return{code_verifier:r,code_challenge:t}}e=globalThis.crypto?.webcrypto??globalThis.crypto??Promise.resolve().then(s.t.bind(s,7598,19)).then(e=>e.webcrypto);let rs=l.z.string().url().superRefine((e,r)=>{if(!URL.canParse(e))return r.addIssue({code:l.z.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),l.z.NEVER}).refine(e=>{let r=new URL(e);return"javascript:"!==r.protocol&&"data:"!==r.protocol&&"vbscript:"!==r.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),ri=l.z.object({resource:l.z.string().url(),authorization_servers:l.z.array(rs).optional(),jwks_uri:l.z.string().url().optional(),scopes_supported:l.z.array(l.z.string()).optional(),bearer_methods_supported:l.z.array(l.z.string()).optional(),resource_signing_alg_values_supported:l.z.array(l.z.string()).optional(),resource_name:l.z.string().optional(),resource_documentation:l.z.string().optional(),resource_policy_uri:l.z.string().url().optional(),resource_tos_uri:l.z.string().url().optional(),tls_client_certificate_bound_access_tokens:l.z.boolean().optional(),authorization_details_types_supported:l.z.array(l.z.string()).optional(),dpop_signing_alg_values_supported:l.z.array(l.z.string()).optional(),dpop_bound_access_tokens_required:l.z.boolean().optional()}).passthrough(),rn=l.z.object({issuer:l.z.string(),authorization_endpoint:rs,token_endpoint:rs,registration_endpoint:rs.optional(),scopes_supported:l.z.array(l.z.string()).optional(),response_types_supported:l.z.array(l.z.string()),response_modes_supported:l.z.array(l.z.string()).optional(),grant_types_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),service_documentation:rs.optional(),revocation_endpoint:rs.optional(),revocation_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),introspection_endpoint:l.z.string().optional(),introspection_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),code_challenge_methods_supported:l.z.array(l.z.string()).optional()}).passthrough(),rl=l.z.object({issuer:l.z.string(),authorization_endpoint:rs,token_endpoint:rs,userinfo_endpoint:rs.optional(),jwks_uri:rs,registration_endpoint:rs.optional(),scopes_supported:l.z.array(l.z.string()).optional(),response_types_supported:l.z.array(l.z.string()),response_modes_supported:l.z.array(l.z.string()).optional(),grant_types_supported:l.z.array(l.z.string()).optional(),acr_values_supported:l.z.array(l.z.string()).optional(),subject_types_supported:l.z.array(l.z.string()),id_token_signing_alg_values_supported:l.z.array(l.z.string()),id_token_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),id_token_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),userinfo_signing_alg_values_supported:l.z.array(l.z.string()).optional(),userinfo_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),userinfo_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),request_object_signing_alg_values_supported:l.z.array(l.z.string()).optional(),request_object_encryption_alg_values_supported:l.z.array(l.z.string()).optional(),request_object_encryption_enc_values_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_methods_supported:l.z.array(l.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:l.z.array(l.z.string()).optional(),display_values_supported:l.z.array(l.z.string()).optional(),claim_types_supported:l.z.array(l.z.string()).optional(),claims_supported:l.z.array(l.z.string()).optional(),service_documentation:l.z.string().optional(),claims_locales_supported:l.z.array(l.z.string()).optional(),ui_locales_supported:l.z.array(l.z.string()).optional(),claims_parameter_supported:l.z.boolean().optional(),request_parameter_supported:l.z.boolean().optional(),request_uri_parameter_supported:l.z.boolean().optional(),require_request_uri_registration:l.z.boolean().optional(),op_policy_uri:rs.optional(),op_tos_uri:rs.optional()}).passthrough().merge(rn.pick({code_challenge_methods_supported:!0})),rc=l.z.object({access_token:l.z.string(),id_token:l.z.string().optional(),token_type:l.z.string(),expires_in:l.z.number().optional(),scope:l.z.string().optional(),refresh_token:l.z.string().optional()}).strip(),ru=l.z.object({error:l.z.string(),error_description:l.z.string().optional(),error_uri:l.z.string().optional()}),rp=rs.optional().or(l.z.literal("").transform(()=>void 0)),rh=l.z.object({redirect_uris:l.z.array(rs),token_endpoint_auth_method:l.z.string().optional(),grant_types:l.z.array(l.z.string()).optional(),response_types:l.z.array(l.z.string()).optional(),client_name:l.z.string().optional(),client_uri:rs.optional(),logo_uri:rp,scope:l.z.string().optional(),contacts:l.z.array(l.z.string()).optional(),tos_uri:rp,policy_uri:l.z.string().optional(),jwks_uri:rs.optional(),jwks:l.z.any().optional(),software_id:l.z.string().optional(),software_version:l.z.string().optional(),software_statement:l.z.string().optional()}).strip(),rd=l.z.object({client_id:l.z.string(),client_secret:l.z.string().optional(),client_id_issued_at:l.z.number().optional(),client_secret_expires_at:l.z.number().optional()}).strip(),rf=rh.merge(rd);l.z.object({error:l.z.string(),error_description:l.z.string().optional()}).strip(),l.z.object({token:l.z.string(),token_type_hint:l.z.string().optional()}).strip();class rm extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class rv extends rm{}rv.errorCode="invalid_request";class rg extends rm{}rg.errorCode="invalid_client";class ry extends rm{}ry.errorCode="invalid_grant";class rE extends rm{}rE.errorCode="unauthorized_client";class rb extends rm{}rb.errorCode="unsupported_grant_type";class r_ extends rm{}r_.errorCode="invalid_scope";class rw extends rm{}rw.errorCode="access_denied";class rP extends rm{}rP.errorCode="server_error";class rS extends rm{}rS.errorCode="temporarily_unavailable";class rz extends rm{}rz.errorCode="unsupported_response_type";class rx extends rm{}rx.errorCode="unsupported_token_type";class r$ extends rm{}r$.errorCode="invalid_token";class rR extends rm{}rR.errorCode="method_not_allowed";class rj extends rm{}rj.errorCode="too_many_requests";class rI extends rm{}rI.errorCode="invalid_client_metadata";class rO extends rm{}rO.errorCode="insufficient_scope";let rA={[rv.errorCode]:rv,[rg.errorCode]:rg,[ry.errorCode]:ry,[rE.errorCode]:rE,[rb.errorCode]:rb,[r_.errorCode]:r_,[rw.errorCode]:rw,[rP.errorCode]:rP,[rS.errorCode]:rS,[rz.errorCode]:rz,[rx.errorCode]:rx,[r$.errorCode]:r$,[rR.errorCode]:rR,[rj.errorCode]:rj,[rI.errorCode]:rI,[rO.errorCode]:rO};class rT extends Error{constructor(e){super(null!=e?e:"Unauthorized")}}let rD="code",rk="S256";function rC(e,r){let t=void 0!==e.client_secret;return 0===r.length?t?"client_secret_post":"none":t&&r.includes("client_secret_basic")?"client_secret_basic":t&&r.includes("client_secret_post")?"client_secret_post":r.includes("none")?"none":t?"client_secret_post":"none"}function rN(e,r,t,a){let{client_id:o,client_secret:s}=r;switch(e){case"client_secret_basic":var i,n,l,c,u=o,p=s,h=t;if(!p)throw Error("client_secret_basic authentication requires a client_secret");let d=btoa(`${u}:${p}`);h.set("Authorization",`Basic ${d}`);return;case"client_secret_post":i=o,n=s,(l=a).set("client_id",i),n&&l.set("client_secret",n);return;case"none":c=o,a.set("client_id",c);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}async function rF(e){let r=e instanceof Response?e.status:void 0,t=e instanceof Response?await e.text():e;try{let{error:e,error_description:r,error_uri:a}=ru.parse(JSON.parse(t));return new(rA[e]||rP)(r||"",a)}catch(e){return new rP(`${r?`HTTP ${r}: `:""}Invalid OAuth error response: ${e}. Raw body: ${t}`)}}async function rL(e,r){var t,a;try{return await rq(e,r)}catch(o){if(o instanceof rg||o instanceof rE)return await (null==(t=e.invalidateCredentials)?void 0:t.call(e,"all")),await rq(e,r);if(o instanceof ry)return await (null==(a=e.invalidateCredentials)?void 0:a.call(e,"tokens")),await rq(e,r);throw o}}async function rq(e,{serverUrl:r,authorizationCode:t,scope:a,resourceMetadataUrl:o,fetchFn:s}){let i,n;try{(i=await rV(r,{resourceMetadataUrl:o},s)).authorization_servers&&i.authorization_servers.length>0&&(n=i.authorization_servers[0])}catch(e){}n||(n=r);let l=await rU(r,e,i),c=await rB(n,{fetchFn:s}),u=await Promise.resolve(e.clientInformation());if(!u){if(void 0!==t)throw Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let r=await rW(n,{metadata:c,clientMetadata:e.clientMetadata,fetchFn:s});await e.saveClientInformation(r),u=r}if(void 0!==t){let r=await e.codeVerifier(),a=await rG(n,{metadata:c,clientInformation:u,authorizationCode:t,codeVerifier:r,redirectUri:e.redirectUrl,resource:l,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(a),"AUTHORIZED"}let p=await e.tokens();if(null==p?void 0:p.refresh_token)try{let r=await rJ(n,{metadata:c,clientInformation:u,refreshToken:p.refresh_token,resource:l,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(r),"AUTHORIZED"}catch(e){if(!(e instanceof rm)||e instanceof rP);else throw e}let h=e.state?await e.state():void 0,{authorizationUrl:d,codeVerifier:f}=await rQ(n,{metadata:c,clientInformation:u,state:h,redirectUrl:e.redirectUrl,scope:a||e.clientMetadata.scope,resource:l});return await e.saveCodeVerifier(f),await e.redirectToAuthorization(d),"REDIRECT"}async function rU(e,r,t){let a,o=((a=new URL("string"==typeof e?e:e.href)).hash="",a);if(r.validateResourceURL)return await r.validateResourceURL(o,null==t?void 0:t.resource);if(t){if(!function({requestedResource:e,configuredResource:r}){let t=new URL("string"==typeof e?e:e.href),a=new URL("string"==typeof r?r:r.href);if(t.origin!==a.origin||t.pathname.length<a.pathname.length)return!1;let o=t.pathname.endsWith("/")?t.pathname:t.pathname+"/",s=a.pathname.endsWith("/")?a.pathname:a.pathname+"/";return o.startsWith(s)}({requestedResource:o,configuredResource:t.resource}))throw Error(`Protected resource ${t.resource} does not match expected ${o} (or origin)`);return new URL(t.resource)}}async function rV(e,r,t=fetch){let a=await rK(e,"oauth-protected-resource",t,{protocolVersion:null==r?void 0:r.protocolVersion,metadataUrl:null==r?void 0:r.resourceMetadataUrl});if(!a||404===a.status)throw Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!a.ok)throw Error(`HTTP ${a.status} trying to load well-known OAuth protected resource metadata.`);return ri.parse(await a.json())}async function rM(e,r,t=fetch){try{return await t(e,{headers:r})}catch(a){if(a instanceof TypeError)if(r)return rM(e,void 0,t);else return;throw a}}async function rH(e,r,t=fetch){return await rM(e,{"MCP-Protocol-Version":r},t)}async function rK(e,r,t,a){var o,s,i,n;let l,c=new URL(e),u=null!=(o=null==a?void 0:a.protocolVersion)?o:_;(null==a?void 0:a.metadataUrl)?l=new URL(a.metadataUrl):(l=new URL(function(e,r="",t={}){return r.endsWith("/")&&(r=r.slice(0,-1)),t.prependPathname?`${r}/.well-known/${e}`:`/.well-known/${e}${r}`}(r,c.pathname),null!=(s=null==a?void 0:a.metadataServerUrl)?s:c)).search=c.search;let p=await rH(l,u,t);if(!(null==a?void 0:a.metadataUrl)&&(i=p,n=c.pathname,!i||i.status>=400&&i.status<500&&"/"!==n)){let e=new URL(`/.well-known/${r}`,c);p=await rH(e,u,t)}return p}async function rB(e,{fetchFn:r=fetch,protocolVersion:t=_}={}){let a={"MCP-Protocol-Version":t,Accept:"application/json"};for(let{url:t,type:o}of function(e){let r="string"==typeof e?new URL(e):e,t="/"!==r.pathname,a=[];if(!t)return a.push({url:new URL("/.well-known/oauth-authorization-server",r.origin),type:"oauth"}),a.push({url:new URL("/.well-known/openid-configuration",r.origin),type:"oidc"}),a;let o=r.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),a.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,r.origin),type:"oauth"}),a.push({url:new URL("/.well-known/oauth-authorization-server",r.origin),type:"oauth"}),a.push({url:new URL(`/.well-known/openid-configuration${o}`,r.origin),type:"oidc"}),a.push({url:new URL(`${o}/.well-known/openid-configuration`,r.origin),type:"oidc"}),a}(e)){let e=await rM(t,a,r);if(e){if(!e.ok){if(e.status>=400&&e.status<500)continue;throw Error(`HTTP ${e.status} trying to load ${"oauth"===o?"OAuth":"OpenID provider"} metadata from ${t}`)}if("oauth"===o)return rn.parse(await e.json());return rl.parse(await e.json())}}}async function rQ(e,{metadata:r,clientInformation:t,redirectUrl:a,scope:o,state:s,resource:i}){let n;if(r){if(n=new URL(r.authorization_endpoint),!r.response_types_supported.includes(rD))throw Error(`Incompatible auth server: does not support response type ${rD}`);if(r.code_challenge_methods_supported&&!r.code_challenge_methods_supported.includes(rk))throw Error(`Incompatible auth server: does not support code challenge method ${rk}`)}else n=new URL("/authorize",e);let l=await ro(),c=l.code_verifier,u=l.code_challenge;return n.searchParams.set("response_type",rD),n.searchParams.set("client_id",t.client_id),n.searchParams.set("code_challenge",u),n.searchParams.set("code_challenge_method",rk),n.searchParams.set("redirect_uri",String(a)),s&&n.searchParams.set("state",s),o&&n.searchParams.set("scope",o),(null==o?void 0:o.includes("offline_access"))&&n.searchParams.append("prompt","consent"),i&&n.searchParams.set("resource",i.href),{authorizationUrl:n,codeVerifier:c}}async function rG(e,{metadata:r,clientInformation:t,authorizationCode:a,codeVerifier:o,redirectUri:s,resource:i,addClientAuthentication:n,fetchFn:l}){var c;let u="authorization_code",p=(null==r?void 0:r.token_endpoint)?new URL(r.token_endpoint):new URL("/token",e);if((null==r?void 0:r.grant_types_supported)&&!r.grant_types_supported.includes(u))throw Error(`Incompatible auth server: does not support grant type ${u}`);let h=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),d=new URLSearchParams({grant_type:u,code:a,code_verifier:o,redirect_uri:String(s)});n?n(h,d,e,r):rN(rC(t,null!=(c=null==r?void 0:r.token_endpoint_auth_methods_supported)?c:[]),t,h,d),i&&d.set("resource",i.href);let f=await (null!=l?l:fetch)(p,{method:"POST",headers:h,body:d});if(!f.ok)throw await rF(f);return rc.parse(await f.json())}async function rJ(e,{metadata:r,clientInformation:t,refreshToken:a,resource:o,addClientAuthentication:s,fetchFn:i}){var n;let l,c="refresh_token";if(r){if(l=new URL(r.token_endpoint),r.grant_types_supported&&!r.grant_types_supported.includes(c))throw Error(`Incompatible auth server: does not support grant type ${c}`)}else l=new URL("/token",e);let u=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),p=new URLSearchParams({grant_type:c,refresh_token:a});s?s(u,p,e,r):rN(rC(t,null!=(n=null==r?void 0:r.token_endpoint_auth_methods_supported)?n:[]),t,u,p),o&&p.set("resource",o.href);let h=await (null!=i?i:fetch)(l,{method:"POST",headers:u,body:p});if(!h.ok)throw await rF(h);return rc.parse({refresh_token:a,...await h.json()})}async function rW(e,{metadata:r,clientMetadata:t,fetchFn:a}){let o;if(r){if(!r.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");o=new URL(r.registration_endpoint)}else o=new URL("/register",e);let s=await (null!=a?a:fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw await rF(s);return rf.parse(await s.json())}class rX extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function rY(e){}class rZ extends TransformStream{constructor({onError:e,onRetry:r,onComment:t}={}){let a;super({start(o){a=function(e){if("function"==typeof e)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:r=rY,onError:t=rY,onRetry:a=rY,onComment:o}=e,s="",i=!0,n,l="",c="";function u(e){if(""===e)return void(l.length>0&&r({id:n,event:c||void 0,data:l.endsWith(`
|
|
2
2
|
`)?l.slice(0,-1):l}),n=void 0,l="",c="");if(e.startsWith(":")){o&&o(e.slice(e.startsWith(": ")?2:1));return}let t=e.indexOf(":");if(-1!==t){let r=e.slice(0,t),a=" "===e[t+1]?2:1;p(r,e.slice(t+a),e);return}p(e,"",e)}function p(e,r,o){switch(e){case"event":c=r;break;case"data":l=`${l}${r}
|
|
3
3
|
`;break;case"id":n=r.includes("\0")?void 0:r;break;case"retry":/^\d+$/.test(r)?a(parseInt(r,10)):t(new rX(`Invalid \`retry\` value: "${r}"`,{type:"invalid-retry",value:r,line:o}));break;default:t(new rX(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:"unknown-field",field:e,value:r,line:o}))}}return{feed:function(e){let r=i?e.replace(/^\xEF\xBB\xBF/,""):e,[t,a]=function(e){let r=[],t="",a=0;for(;a<e.length;){let o=e.indexOf("\r",a),s=e.indexOf(`
|
|
4
4
|
`,a),i=-1;if(-1!==o&&-1!==s?i=Math.min(o,s):-1!==o?i=o===e.length-1?-1:o:-1!==s&&(i=s),-1===i){t=e.slice(a);break}{let t=e.slice(a,i);r.push(t),"\r"===e[(a=i+1)-1]&&e[a]===`
|