@aiquants/html-to-markdown 0.5.2 → 0.7.0
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/core-ChRwTJHy.js +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -18
- package/dist/main.js +1 -105
- package/dist/mcp-server-CvLGX0Fe.js +1 -0
- package/dist/{mcp-server-Dn3EHzcf.cjs → mcp-server-eznfa4gh.cjs} +1 -1
- package/dist/mcp-server-streamable-CjY9xfH0.js +1 -0
- package/dist/mcp-server-streamable-DJ-R_Z_E.cjs +1 -0
- package/dist/mcp-streamable.cjs +1 -1
- package/dist/mcp-streamable.js +1 -5
- package/dist/mcp.cjs +1 -1
- package/dist/mcp.js +1 -12
- package/dist/src/mcp-server.d.ts +18 -0
- package/dist/version-D8gIcbbb.cjs +7 -0
- package/dist/version-DEqf1gI6.js +7 -0
- package/package.json +17 -13
- package/dist/core-DhxxOcPm.js +0 -21155
- package/dist/mcp-server-DOe8W9IZ.js +0 -267
- package/dist/mcp-server-streamable-DUB_ixZe.cjs +0 -1
- package/dist/mcp-server-streamable-pcpU_lDl.js +0 -7714
- package/dist/version-BNwQMbri.js +0 -11539
- package/dist/version-BsWiDlbg.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=new(require("happy-dom").Window);Object.assign(global,{document:e.document,window:e,self:e});const t=require("./core--XIBQvpW.cjs"),r=require("fs"),a=require("path"),s=require("node:fs"),i=require("node:path"),n=require("node:url");var o,l,d,c="undefined"!=typeof document?document.currentScript:null;(l=o||(o={})).assertEqual=e=>{},l.assertIs=function(e){},l.assertNever=function(e){throw new Error},l.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},l.getValidEnumValues=e=>{const t=l.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(const a of t)r[a]=e[a];return l.objectValues(r)},l.objectValues=e=>l.objectKeys(e).map(function(t){return e[t]}),l.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},l.find=(e,t)=>{for(const r of e)if(t(r))return r},l.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,l.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},l.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(d||(d={})).mergeShapes=(e,t)=>({...e,...t});const u=o.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),h=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(e)?u.array:null===e?u.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?u.promise:"undefined"!=typeof Map&&e instanceof Map?u.map:"undefined"!=typeof Set&&e instanceof Set?u.set:"undefined"!=typeof Date&&e instanceof Date?u.date:u.object;default:return u.unknown}},p=o.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class m extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},a=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(a);else if("invalid_return_type"===s.code)a(s.returnTypeError);else if("invalid_arguments"===s.code)a(s.argumentsError);else if(0===s.path.length)r._errors.push(t(s));else{let e=r,a=0;for(;a<s.path.length;){const r=s.path[a];a===s.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(s))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(this),r}static assert(e){if(!(e instanceof m))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,o.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const r=a.path[0];t[r]=t[r]||[],t[r].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}m.create=e=>new m(e);const f=(e,t)=>{let r;switch(e.code){case p.invalid_type:r=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,o.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${o.joinValues(e.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${o.joinValues(e.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${o.joinValues(e.options)}, received '${e.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:o.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case p.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case p.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=t.defaultError,o.assertNever(e)}return{message:r}};let v=f;function g(e,t){const r=v,a=(e=>{const{data:t,path:r,errorMaps:a,issueData:s}=e,i=[...r,...s.path||[]],n={...s,path:i};if(void 0!==s.message)return{...s,path:i,message:s.message};let o="";const l=a.filter(e=>!!e).slice().reverse();for(const d of l)o=d(n,{data:t,defaultError:o}).message;return{...s,path:i,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===f?void 0:f].filter(e=>!!e)});e.common.issues.push(a)}class y{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if("aborted"===a.status)return _;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const e=await a.key,t=await a.value;r.push({key:e,value:t})}return y.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:t,value:s}=a;if("aborted"===t.status)return _;if("aborted"===s.status)return _;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!a.alwaysSet||(r[t.value]=s.value)}return{status:e.value,value:r}}}const _=Object.freeze({status:"aborted"}),b=e=>({status:"dirty",value:e}),w=e=>({status:"valid",value:e}),P=e=>"aborted"===e.status,E=e=>"dirty"===e.status,x=e=>"valid"===e.status,S=e=>"undefined"!=typeof Promise&&e instanceof Promise;var k,R;(R=k||(k={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},R.toString=e=>"string"==typeof e?e:e?.message;class O{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const j=(e,t)=>{if(x(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new m(e.common.issues);return this._error=t,this._error}}};function $(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:a,description:s}=e;if(t&&(r||a))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(t,s)=>{const{message:i}=e;return"invalid_enum_value"===t.code?{message:i??s.defaultError}:void 0===s.data?{message:i??a??s.defaultError}:"invalid_type"!==t.code?{message:s.defaultError}:{message:i??r??s.defaultError}},description:s}}class C{get description(){return this._def.description}_getType(e){return h(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:h(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new y,ctx:{common:e.parent.common,data:e.data,parsedType:h(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(S(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h(e)},a=this._parseSync({data:e,path:r.path,parent:r});return j(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return x(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>x(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h(e)},a=this._parse({data:e,path:r.path,parent:r}),s=await(S(a)?a:Promise.resolve(a));return j(r,s)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,a)=>{const s=e(t),i=()=>a.addIssue({code:p.custom,...r(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then(e=>!!e||(i(),!1)):!!s||(i(),!1)})}refinement(e,t){return this._refinement((r,a)=>!!e(r)||(a.addIssue("function"==typeof t?t(r,a):t),!1))}_refinement(e){return new Fe({schema:this,typeName:ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Te.create(this,this._def)}nullable(){return Ie.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return me.create(this)}promise(){return Ce.create(this,this._def)}or(e){return ge.create([this,e],this._def)}and(e){return we.create(this,e,this._def)}transform(e){return new Fe({...$(this._def),schema:this,typeName:ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ae({...$(this._def),innerType:this,defaultValue:t,typeName:ze.ZodDefault})}brand(){return new qe({typeName:ze.ZodBranded,type:this,...$(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new De({...$(this._def),innerType:this,catchValue:t,typeName:ze.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Ze.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const F=/^c[^\s-]{8,}$/i,T=/^[0-9a-z]+$/,I=/^[0-9A-HJKMNP-TV-Z]{26}$/i,A=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,D=/^[a-z0-9_-]{21}$/i,N=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,q=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,L=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Z;const z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,M=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,U=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Q=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,K="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",B=new RegExp(`^${K}$`);function J(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function W(e){return new RegExp(`^${J(e)}$`)}function G(e){let t=`${K}T${J(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Y(e,t){return!("v4"!==t&&t||!z.test(e))||!("v6"!==t&&t||!U.test(e))}function X(e,t){if(!N.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(a));return"object"==typeof s&&null!==s&&((!("typ"in s)||"JWT"===s?.typ)&&(!!s.alg&&(!t||s.alg===t)))}catch{return!1}}function ee(e,t){return!("v4"!==t&&t||!M.test(e))||!("v6"!==t&&t||!V.test(e))}class te extends C{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==u.string){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.string,received:t.parsedType}),_}const t=new y;let r;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(r=this._getOrReturnCtx(e,r),g(r,{code:p.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(r=this._getOrReturnCtx(e,r),g(r,{code:p.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const s=e.data.length>a.value,i=e.data.length<a.value;(s||i)&&(r=this._getOrReturnCtx(e,r),s?g(r,{code:p.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):i&&g(r,{code:p.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)L.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"email",code:p.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)Z||(Z=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Z.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"emoji",code:p.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)A.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"uuid",code:p.invalid_string,message:a.message}),t.dirty());else if("nanoid"===a.kind)D.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"nanoid",code:p.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)F.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"cuid",code:p.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)T.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"cuid2",code:p.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)I.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"ulid",code:p.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),g(r,{validation:"url",code:p.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"regex",code:p.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){G(a).test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else if("date"===a.kind){B.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:"date",message:a.message}),t.dirty())}else if("time"===a.kind){W(a).test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{code:p.invalid_string,validation:"time",message:a.message}),t.dirty())}else"duration"===a.kind?q.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"duration",code:p.invalid_string,message:a.message}),t.dirty()):"ip"===a.kind?Y(e.data,a.version)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"ip",code:p.invalid_string,message:a.message}),t.dirty()):"jwt"===a.kind?X(e.data,a.alg)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"jwt",code:p.invalid_string,message:a.message}),t.dirty()):"cidr"===a.kind?ee(e.data,a.version)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"cidr",code:p.invalid_string,message:a.message}),t.dirty()):"base64"===a.kind?H.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"base64",code:p.invalid_string,message:a.message}),t.dirty()):"base64url"===a.kind?Q.test(e.data)||(r=this._getOrReturnCtx(e,r),g(r,{validation:"base64url",code:p.invalid_string,message:a.message}),t.dirty()):o.assertNever(a);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:p.invalid_string,...k.errToObj(r)})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...k.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...k.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...k.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new te({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new te({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new te({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function re(e,t){const r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=r>a?r:a;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s}te.create=e=>new te({checks:[],typeName:ze.ZodString,coerce:e?.coerce??!1,...$(e)});class ae extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==u.number){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.number,received:t.parsedType}),_}let t;const r=new y;for(const a of this._def.checks)if("int"===a.kind)o.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:p.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty());else if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty())}else"multipleOf"===a.kind?0!==re(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),g(t,{code:p.not_finite,message:a.message}),r.dirty()):o.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&o.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ae.create=e=>new ae({checks:[],typeName:ze.ZodNumber,coerce:e?.coerce||!1,...$(e)});class se extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let t;const r=new y;for(const a of this._def.checks)if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty())}else"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),g(t,{code:p.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):o.assertNever(a);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.bigint,received:t.parsedType}),_}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new se({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new se({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}se.create=e=>new se({checks:[],typeName:ze.ZodBigInt,coerce:e?.coerce??!1,...$(e)});class ie extends C{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==u.boolean){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.boolean,received:t.parsedType}),_}return w(e.data)}}ie.create=e=>new ie({typeName:ze.ZodBoolean,coerce:e?.coerce||!1,...$(e)});class ne extends C{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==u.date){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.date,received:t.parsedType}),_}if(Number.isNaN(e.data.getTime())){return g(this._getOrReturnCtx(e),{code:p.invalid_date}),_}const t=new y;let r;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),g(r,{code:p.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),g(r,{code:p.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):o.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ne.create=e=>new ne({checks:[],coerce:e?.coerce||!1,typeName:ze.ZodDate,...$(e)});class oe extends C{_parse(e){if(this._getType(e)!==u.symbol){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.symbol,received:t.parsedType}),_}return w(e.data)}}oe.create=e=>new oe({typeName:ze.ZodSymbol,...$(e)});class le extends C{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.undefined,received:t.parsedType}),_}return w(e.data)}}le.create=e=>new le({typeName:ze.ZodUndefined,...$(e)});class de extends C{_parse(e){if(this._getType(e)!==u.null){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.null,received:t.parsedType}),_}return w(e.data)}}de.create=e=>new de({typeName:ze.ZodNull,...$(e)});class ce extends C{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}ce.create=e=>new ce({typeName:ze.ZodAny,...$(e)});class ue extends C{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}ue.create=e=>new ue({typeName:ze.ZodUnknown,...$(e)});class he extends C{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.never,received:t.parsedType}),_}}he.create=e=>new he({typeName:ze.ZodNever,...$(e)});class pe extends C{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.void,received:t.parsedType}),_}return w(e.data)}}pe.create=e=>new pe({typeName:ze.ZodVoid,...$(e)});class me extends C{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return g(t,{code:p.invalid_type,expected:u.array,received:t.parsedType}),_;if(null!==a.exactLength){const e=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(e||s)&&(g(t,{code:e?p.too_big:p.too_small,minimum:s?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(null!==a.minLength&&t.data.length<a.minLength.value&&(g(t,{code:p.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),null!==a.maxLength&&t.data.length>a.maxLength.value&&(g(t,{code:p.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>a.type._parseAsync(new O(t,e,t.path,r)))).then(e=>y.mergeArray(r,e));const s=[...t.data].map((e,r)=>a.type._parseSync(new O(t,e,t.path,r)));return y.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new me({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new me({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new me({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}}function fe(e){if(e instanceof ve){const t={};for(const r in e.shape){const a=e.shape[r];t[r]=Te.create(fe(a))}return new ve({...e._def,shape:()=>t})}return e instanceof me?new me({...e._def,type:fe(e.element)}):e instanceof Te?Te.create(fe(e.unwrap())):e instanceof Ie?Ie.create(fe(e.unwrap())):e instanceof Pe?Pe.create(e.items.map(e=>fe(e))):e}me.create=(e,t)=>new me({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ze.ZodArray,...$(t)});class ve extends C{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=o.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.object,received:t.parsedType}),_}const{status:t,ctx:r}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof he&&"strip"===this._def.unknownKeys))for(const o in r.data)s.includes(o)||i.push(o);const n=[];for(const o of s){const e=a[o],t=r.data[o];n.push({key:{status:"valid",value:o},value:e._parse(new O(r,t,r.path,o)),alwaysSet:o in r.data})}if(this._def.catchall instanceof he){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)n.push({key:{status:"valid",value:t},value:{status:"valid",value:r.data[t]}});else if("strict"===e)i.length>0&&(g(r,{code:p.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const a=r.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new O(r,a,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of n){const r=await t.key,a=await t.value;e.push({key:r,value:a,alwaysSet:t.alwaysSet})}return e}).then(e=>y.mergeObjectSync(t,e)):y.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new ve({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new ve({...this._def,unknownKeys:"strip"})}passthrough(){return new ve({...this._def,unknownKeys:"passthrough"})}extend(e){return new ve({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ve({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ve({...this._def,catchall:e})}pick(e){const t={};for(const r of o.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ve({...this._def,shape:()=>t})}omit(e){const t={};for(const r of o.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ve({...this._def,shape:()=>t})}deepPartial(){return fe(this)}partial(e){const t={};for(const r of o.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new ve({...this._def,shape:()=>t})}required(e){const t={};for(const r of o.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof Te;)e=e._def.innerType;t[r]=e}return new ve({...this._def,shape:()=>t})}keyof(){return Oe(o.objectKeys(this.shape))}}ve.create=(e,t)=>new ve({shape:()=>e,unknownKeys:"strip",catchall:he.create(),typeName:ze.ZodObject,...$(t)}),ve.strictCreate=(e,t)=>new ve({shape:()=>e,unknownKeys:"strict",catchall:he.create(),typeName:ze.ZodObject,...$(t)}),ve.lazycreate=(e,t)=>new ve({shape:e,unknownKeys:"strip",catchall:he.create(),typeName:ze.ZodObject,...$(t)});class ge extends C{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const r=e.map(e=>new m(e.ctx.common.issues));return g(t,{code:p.invalid_union,unionErrors:r}),_});{let e;const a=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=a.map(e=>new m(e));return g(t,{code:p.invalid_union,unionErrors:s}),_}}get options(){return this._def.options}}ge.create=(e,t)=>new ge({options:e,typeName:ze.ZodUnion,...$(t)});const ye=e=>e instanceof ke?ye(e.schema):e instanceof Fe?ye(e.innerType()):e instanceof Re?[e.value]:e instanceof je?e.options:e instanceof $e?o.objectValues(e.enum):e instanceof Ae?ye(e._def.innerType):e instanceof le?[void 0]:e instanceof de?[null]:e instanceof Te?[void 0,...ye(e.unwrap())]:e instanceof Ie?[null,...ye(e.unwrap())]:e instanceof qe||e instanceof Ze?ye(e.unwrap()):e instanceof De?ye(e._def.innerType):[];class _e extends C{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return g(t,{code:p.invalid_type,expected:u.object,received:t.parsedType}),_;const r=this.discriminator,a=t.data[r],s=this.optionsMap.get(a);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(g(t,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const s of t){const t=ye(s.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(a.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);a.set(r,s)}}return new _e({typeName:ze.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...$(r)})}}function be(e,t){const r=h(e),a=h(t);if(e===t)return{valid:!0,data:e};if(r===u.object&&a===u.object){const r=o.objectKeys(t),a=o.objectKeys(e).filter(e=>-1!==r.indexOf(e)),s={...e,...t};for(const i of a){const r=be(e[i],t[i]);if(!r.valid)return{valid:!1};s[i]=r.data}return{valid:!0,data:s}}if(r===u.array&&a===u.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const s=be(e[a],t[a]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}return r===u.date&&a===u.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class we extends C{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(e,a)=>{if(P(e)||P(a))return _;const s=be(e.value,a.value);return s.valid?((E(e)||E(a))&&t.dirty(),{status:t.value,value:s.data}):(g(r,{code:p.invalid_intersection_types}),_)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}we.create=(e,t,r)=>new we({left:e,right:t,typeName:ze.ZodIntersection,...$(r)});class Pe extends C{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return g(r,{code:p.invalid_type,expected:u.array,received:r.parsedType}),_;if(r.data.length<this._def.items.length)return g(r,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&r.data.length>this._def.items.length&&(g(r,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((e,t)=>{const a=this._def.items[t]||this._def.rest;return a?a._parse(new O(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(a).then(e=>y.mergeArray(t,e)):y.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Pe({...this._def,rest:e})}}Pe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pe({items:e,typeName:ze.ZodTuple,rest:null,...$(t)})};class Ee extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return g(r,{code:p.invalid_type,expected:u.object,received:r.parsedType}),_;const a=[],s=this._def.keyType,i=this._def.valueType;for(const n in r.data)a.push({key:s._parse(new O(r,n,r.path,n)),value:i._parse(new O(r,r.data[n],r.path,n)),alwaysSet:n in r.data});return r.common.async?y.mergeObjectAsync(t,a):y.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return new Ee(t instanceof C?{keyType:e,valueType:t,typeName:ze.ZodRecord,...$(r)}:{keyType:te.create(),valueType:e,typeName:ze.ZodRecord,...$(t)})}}class xe extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return g(r,{code:p.invalid_type,expected:u.map,received:r.parsedType}),_;const a=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([e,t],i)=>({key:a._parse(new O(r,e,r.path,[i,"key"])),value:s._parse(new O(r,t,r.path,[i,"value"]))}));if(r.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const r of i){const a=await r.key,s=await r.value;if("aborted"===a.status||"aborted"===s.status)return _;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}})}{const e=new Map;for(const r of i){const a=r.key,s=r.value;if("aborted"===a.status||"aborted"===s.status)return _;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}}}}xe.create=(e,t,r)=>new xe({valueType:t,keyType:e,typeName:ze.ZodMap,...$(r)});class Se extends C{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return g(r,{code:p.invalid_type,expected:u.set,received:r.parsedType}),_;const a=this._def;null!==a.minSize&&r.data.size<a.minSize.value&&(g(r,{code:p.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),null!==a.maxSize&&r.data.size>a.maxSize.value&&(g(r,{code:p.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const s=this._def.valueType;function i(e){const r=new Set;for(const a of e){if("aborted"===a.status)return _;"dirty"===a.status&&t.dirty(),r.add(a.value)}return{status:t.value,value:r}}const n=[...r.data.values()].map((e,t)=>s._parse(new O(r,e,r.path,t)));return r.common.async?Promise.all(n).then(e=>i(e)):i(n)}min(e,t){return new Se({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Se({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Se.create=(e,t)=>new Se({valueType:e,minSize:null,maxSize:null,typeName:ze.ZodSet,...$(t)});class ke extends C{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ke.create=(e,t)=>new ke({getter:e,typeName:ze.ZodLazy,...$(t)});class Re extends C{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:p.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Oe(e,t){return new je({values:e,typeName:ze.ZodEnum,...$(t)})}Re.create=(e,t)=>new Re({value:e,typeName:ze.ZodLiteral,...$(t)});class je extends C{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return g(t,{expected:o.joinValues(r),received:t.parsedType,code:p.invalid_type}),_}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return g(t,{received:t.data,code:p.invalid_enum_value,options:r}),_}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return je.create(e,{...this._def,...t})}exclude(e,t=this._def){return je.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}je.create=Oe;class $e extends C{_parse(e){const t=o.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const e=o.objectValues(t);return g(r,{expected:o.joinValues(e),received:r.parsedType,code:p.invalid_type}),_}if(this._cache||(this._cache=new Set(o.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=o.objectValues(t);return g(r,{received:r.data,code:p.invalid_enum_value,options:e}),_}return w(e.data)}get enum(){return this._def.values}}$e.create=(e,t)=>new $e({values:e,typeName:ze.ZodNativeEnum,...$(t)});class Ce extends C{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&!1===t.common.async)return g(t,{code:p.invalid_type,expected:u.promise,received:t.parsedType}),_;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return w(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ce.create=(e,t)=>new Ce({type:e,typeName:ze.ZodPromise,...$(t)});class Fe extends C{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:e=>{g(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(r.data,s);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return _;const a=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===a.status?_:"dirty"===a.status||"dirty"===t.value?b(a.value):a});{if("aborted"===t.value)return _;const a=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===a.status?_:"dirty"===a.status||"dirty"===t.value?b(a.value):a}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===a.status?_:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?_:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))))}if("transform"===a.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!x(e))return _;const i=a.transform(e.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>x(e)?Promise.resolve(a.transform(e.value,s)).then(e=>({status:t.value,value:e})):_)}o.assertNever(a)}}Fe.create=(e,t,r)=>new Fe({schema:e,typeName:ze.ZodEffects,effect:t,...$(r)}),Fe.createWithPreprocess=(e,t,r)=>new Fe({schema:t,effect:{type:"preprocess",transform:e},typeName:ze.ZodEffects,...$(r)});class Te extends C{_parse(e){return this._getType(e)===u.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(e,t)=>new Te({innerType:e,typeName:ze.ZodOptional,...$(t)});class Ie extends C{_parse(e){return this._getType(e)===u.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:ze.ZodNullable,...$(t)});class Ae extends C{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:ze.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...$(t)});class De extends C{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return S(a)?a.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new m(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new m(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}De.create=(e,t)=>new De({innerType:e,typeName:ze.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...$(t)});class Ne extends C{_parse(e){if(this._getType(e)!==u.nan){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:u.nan,received:t.parsedType}),_}return{status:"valid",value:e.data}}}Ne.create=e=>new Ne({typeName:ze.ZodNaN,...$(e)});class qe extends C{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Le extends C{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?_:"dirty"===e.status?(t.dirty(),b(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?_:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new Le({in:e,out:t,typeName:ze.ZodPipeline})}}class Ze extends C{_parse(e){const t=this._def.innerType._parse(e),r=e=>(x(e)&&(e.value=Object.freeze(e.value)),e);return S(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}var ze,Me;Ze.create=(e,t)=>new Ze({innerType:e,typeName:ze.ZodReadonly,...$(t)}),(Me=ze||(ze={})).ZodString="ZodString",Me.ZodNumber="ZodNumber",Me.ZodNaN="ZodNaN",Me.ZodBigInt="ZodBigInt",Me.ZodBoolean="ZodBoolean",Me.ZodDate="ZodDate",Me.ZodSymbol="ZodSymbol",Me.ZodUndefined="ZodUndefined",Me.ZodNull="ZodNull",Me.ZodAny="ZodAny",Me.ZodUnknown="ZodUnknown",Me.ZodNever="ZodNever",Me.ZodVoid="ZodVoid",Me.ZodArray="ZodArray",Me.ZodObject="ZodObject",Me.ZodUnion="ZodUnion",Me.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Me.ZodIntersection="ZodIntersection",Me.ZodTuple="ZodTuple",Me.ZodRecord="ZodRecord",Me.ZodMap="ZodMap",Me.ZodSet="ZodSet",Me.ZodFunction="ZodFunction",Me.ZodLazy="ZodLazy",Me.ZodLiteral="ZodLiteral",Me.ZodEnum="ZodEnum",Me.ZodEffects="ZodEffects",Me.ZodNativeEnum="ZodNativeEnum",Me.ZodOptional="ZodOptional",Me.ZodNullable="ZodNullable",Me.ZodDefault="ZodDefault",Me.ZodCatch="ZodCatch",Me.ZodPromise="ZodPromise",Me.ZodBranded="ZodBranded",Me.ZodPipeline="ZodPipeline",Me.ZodReadonly="ZodReadonly";const Ue=te.create,Ve=ae.create,He=ie.create,Qe=ue.create;he.create;const Ke=me.create,Be=ve.create,Je=ge.create,We=_e.create;we.create,Pe.create;const Ge=Ee.create,Ye=Re.create,Xe=je.create;Ce.create;const et=Te.create;Ie.create;const tt="2025-06-18",rt=[tt,"2025-03-26","2024-11-05","2024-10-07"],at="2.0",st=Je([Ue(),Ve().int()]),it=Ue(),nt=Be({progressToken:et(st)}).passthrough(),ot=Be({_meta:et(nt)}).passthrough(),lt=Be({method:Ue(),params:et(ot)}),dt=Be({_meta:et(Be({}).passthrough())}).passthrough(),ct=Be({method:Ue(),params:et(dt)}),ut=Be({_meta:et(Be({}).passthrough())}).passthrough(),ht=Je([Ue(),Ve().int()]),pt=Be({jsonrpc:Ye(at),id:ht}).merge(lt).strict(),mt=e=>pt.safeParse(e).success,ft=Be({jsonrpc:Ye(at)}).merge(ct).strict(),vt=Be({jsonrpc:Ye(at),id:ht,result:ut}).strict(),gt=e=>vt.safeParse(e).success;var yt,_t;(_t=yt||(yt={}))[_t.ConnectionClosed=-32e3]="ConnectionClosed",_t[_t.RequestTimeout=-32001]="RequestTimeout",_t[_t.ParseError=-32700]="ParseError",_t[_t.InvalidRequest=-32600]="InvalidRequest",_t[_t.MethodNotFound=-32601]="MethodNotFound",_t[_t.InvalidParams=-32602]="InvalidParams",_t[_t.InternalError=-32603]="InternalError";const bt=Be({jsonrpc:Ye(at),id:ht,error:Be({code:Ve().int(),message:Ue(),data:et(Qe())})}).strict(),wt=e=>bt.safeParse(e).success,Pt=Je([pt,ft,vt,bt]),Et=ut.strict(),xt=ct.extend({method:Ye("notifications/cancelled"),params:dt.extend({requestId:ht,reason:Ue().optional()})}),St=Be({name:Ue(),title:et(Ue())}).passthrough(),kt=St.extend({version:Ue()}),Rt=Be({experimental:et(Be({}).passthrough()),sampling:et(Be({}).passthrough()),elicitation:et(Be({}).passthrough()),roots:et(Be({listChanged:et(He())}).passthrough())}).passthrough(),Ot=lt.extend({method:Ye("initialize"),params:ot.extend({protocolVersion:Ue(),capabilities:Rt,clientInfo:kt})}),jt=Be({experimental:et(Be({}).passthrough()),logging:et(Be({}).passthrough()),completions:et(Be({}).passthrough()),prompts:et(Be({listChanged:et(He())}).passthrough()),resources:et(Be({subscribe:et(He()),listChanged:et(He())}).passthrough()),tools:et(Be({listChanged:et(He())}).passthrough())}).passthrough(),$t=ut.extend({protocolVersion:Ue(),capabilities:jt,serverInfo:kt,instructions:et(Ue())}),Ct=ct.extend({method:Ye("notifications/initialized")}),Ft=lt.extend({method:Ye("ping")}),Tt=Be({progress:Ve(),total:et(Ve()),message:et(Ue())}).passthrough(),It=ct.extend({method:Ye("notifications/progress"),params:dt.merge(Tt).extend({progressToken:st})}),At=lt.extend({params:ot.extend({cursor:et(it)}).optional()}),Dt=ut.extend({nextCursor:et(it)}),Nt=Be({uri:Ue(),mimeType:et(Ue()),_meta:et(Be({}).passthrough())}).passthrough(),qt=Nt.extend({text:Ue()}),Lt=Ue().refine(e=>{try{return atob(e),!0}catch(t){return!1}},{message:"Invalid Base64 string"}),Zt=Nt.extend({blob:Lt}),zt=St.extend({uri:Ue(),description:et(Ue()),mimeType:et(Ue()),_meta:et(Be({}).passthrough())}),Mt=St.extend({uriTemplate:Ue(),description:et(Ue()),mimeType:et(Ue()),_meta:et(Be({}).passthrough())}),Ut=At.extend({method:Ye("resources/list")}),Vt=Dt.extend({resources:Ke(zt)}),Ht=At.extend({method:Ye("resources/templates/list")}),Qt=Dt.extend({resourceTemplates:Ke(Mt)}),Kt=lt.extend({method:Ye("resources/read"),params:ot.extend({uri:Ue()})}),Bt=ut.extend({contents:Ke(Je([qt,Zt]))}),Jt=ct.extend({method:Ye("notifications/resources/list_changed")}),Wt=lt.extend({method:Ye("resources/subscribe"),params:ot.extend({uri:Ue()})}),Gt=lt.extend({method:Ye("resources/unsubscribe"),params:ot.extend({uri:Ue()})}),Yt=ct.extend({method:Ye("notifications/resources/updated"),params:dt.extend({uri:Ue()})}),Xt=Be({name:Ue(),description:et(Ue()),required:et(He())}).passthrough(),er=St.extend({description:et(Ue()),arguments:et(Ke(Xt)),_meta:et(Be({}).passthrough())}),tr=At.extend({method:Ye("prompts/list")}),rr=Dt.extend({prompts:Ke(er)}),ar=lt.extend({method:Ye("prompts/get"),params:ot.extend({name:Ue(),arguments:et(Ge(Ue()))})}),sr=Be({type:Ye("text"),text:Ue(),_meta:et(Be({}).passthrough())}).passthrough(),ir=Be({type:Ye("image"),data:Lt,mimeType:Ue(),_meta:et(Be({}).passthrough())}).passthrough(),nr=Be({type:Ye("audio"),data:Lt,mimeType:Ue(),_meta:et(Be({}).passthrough())}).passthrough(),or=Be({type:Ye("resource"),resource:Je([qt,Zt]),_meta:et(Be({}).passthrough())}).passthrough(),lr=Je([sr,ir,nr,zt.extend({type:Ye("resource_link")}),or]),dr=Be({role:Xe(["user","assistant"]),content:lr}).passthrough(),cr=ut.extend({description:et(Ue()),messages:Ke(dr)}),ur=ct.extend({method:Ye("notifications/prompts/list_changed")}),hr=Be({title:et(Ue()),readOnlyHint:et(He()),destructiveHint:et(He()),idempotentHint:et(He()),openWorldHint:et(He())}).passthrough(),pr=St.extend({description:et(Ue()),inputSchema:Be({type:Ye("object"),properties:et(Be({}).passthrough()),required:et(Ke(Ue()))}).passthrough(),outputSchema:et(Be({type:Ye("object"),properties:et(Be({}).passthrough()),required:et(Ke(Ue()))}).passthrough()),annotations:et(hr),_meta:et(Be({}).passthrough())}),mr=At.extend({method:Ye("tools/list")}),fr=Dt.extend({tools:Ke(pr)}),vr=ut.extend({content:Ke(lr).default([]),structuredContent:Be({}).passthrough().optional(),isError:et(He())});vr.or(ut.extend({toolResult:Qe()}));const gr=lt.extend({method:Ye("tools/call"),params:ot.extend({name:Ue(),arguments:et(Ge(Qe()))})}),yr=ct.extend({method:Ye("notifications/tools/list_changed")}),_r=Xe(["debug","info","notice","warning","error","critical","alert","emergency"]),br=lt.extend({method:Ye("logging/setLevel"),params:ot.extend({level:_r})}),wr=ct.extend({method:Ye("notifications/message"),params:dt.extend({level:_r,logger:et(Ue()),data:Qe()})}),Pr=Be({name:Ue().optional()}).passthrough(),Er=Be({hints:et(Ke(Pr)),costPriority:et(Ve().min(0).max(1)),speedPriority:et(Ve().min(0).max(1)),intelligencePriority:et(Ve().min(0).max(1))}).passthrough(),xr=Be({role:Xe(["user","assistant"]),content:Je([sr,ir,nr])}).passthrough(),Sr=lt.extend({method:Ye("sampling/createMessage"),params:ot.extend({messages:Ke(xr),systemPrompt:et(Ue()),includeContext:et(Xe(["none","thisServer","allServers"])),temperature:et(Ve()),maxTokens:Ve().int(),stopSequences:et(Ke(Ue())),metadata:et(Be({}).passthrough()),modelPreferences:et(Er)})}),kr=ut.extend({model:Ue(),stopReason:et(Xe(["endTurn","stopSequence","maxTokens"]).or(Ue())),role:Xe(["user","assistant"]),content:We("type",[sr,ir,nr])}),Rr=Je([Be({type:Ye("boolean"),title:et(Ue()),description:et(Ue()),default:et(He())}).passthrough(),Be({type:Ye("string"),title:et(Ue()),description:et(Ue()),minLength:et(Ve()),maxLength:et(Ve()),format:et(Xe(["email","uri","date","date-time"]))}).passthrough(),Be({type:Xe(["number","integer"]),title:et(Ue()),description:et(Ue()),minimum:et(Ve()),maximum:et(Ve())}).passthrough(),Be({type:Ye("string"),title:et(Ue()),description:et(Ue()),enum:Ke(Ue()),enumNames:et(Ke(Ue()))}).passthrough()]),Or=lt.extend({method:Ye("elicitation/create"),params:ot.extend({message:Ue(),requestedSchema:Be({type:Ye("object"),properties:Ge(Ue(),Rr),required:et(Ke(Ue()))}).passthrough()})}),jr=ut.extend({action:Xe(["accept","decline","cancel"]),content:et(Ge(Ue(),Qe()))}),$r=Be({type:Ye("ref/resource"),uri:Ue()}).passthrough(),Cr=Be({type:Ye("ref/prompt"),name:Ue()}).passthrough(),Fr=lt.extend({method:Ye("completion/complete"),params:ot.extend({ref:Je([Cr,$r]),argument:Be({name:Ue(),value:Ue()}).passthrough(),context:et(Be({arguments:et(Ge(Ue(),Ue()))}))})}),Tr=ut.extend({completion:Be({values:Ke(Ue()).max(100),total:et(Ve().int()),hasMore:et(He())}).passthrough()}),Ir=Be({uri:Ue().startsWith("file://"),name:et(Ue()),_meta:et(Be({}).passthrough())}).passthrough(),Ar=lt.extend({method:Ye("roots/list")}),Dr=ut.extend({roots:Ke(Ir)}),Nr=ct.extend({method:Ye("notifications/roots/list_changed")});Je([Ft,Ot,Fr,br,ar,tr,Ut,Ht,Kt,Wt,Gt,gr,mr]),Je([xt,It,Ct,Nr]),Je([Et,kr,jr,Dr]),Je([Ft,Sr,Or,Ar]),Je([xt,It,wr,Yt,Jt,yr,ur]),Je([Et,$t,Tr,cr,rr,Vt,Qt,Bt,vr,fr]);class qr extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`),this.code=e,this.data=r,this.name="McpError"}}class Lr{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(xt,e=>{const t=this._requestHandlerAbortControllers.get(e.params.requestId);null==t||t.abort(e.params.reason)}),this.setNotificationHandler(It,e=>{this._onprogress(e)}),this.setRequestHandler(Ft,e=>({}))}_setupTimeout(e,t,r,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new qr(yt.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var t,r,a;this._transport=e;const s=null===(t=this.transport)||void 0===t?void 0:t.onclose;this._transport.onclose=()=>{null==s||s(),this._onclose()};const i=null===(r=this.transport)||void 0===r?void 0:r.onerror;this._transport.onerror=e=>{null==i||i(e),this._onerror(e)};const n=null===(a=this._transport)||void 0===a?void 0:a.onmessage;this._transport.onmessage=(e,t)=>{var r;null==n||n(e,t),gt(e)||wt(e)?this._onresponse(e):mt(e)?this._onrequest(e,t):(r=e,ft.safeParse(r).success?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`)))},await this._transport.start()}_onclose(){var e;const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,null===(e=this.onclose)||void 0===e||e.call(this);const r=new qr(yt.ConnectionClosed,"Connection closed");for(const a of t.values())a(r)}_onerror(e){var t;null===(t=this.onerror)||void 0===t||t.call(this,e)}_onnotification(e){var t;const r=null!==(t=this._notificationHandlers.get(e.method))&&void 0!==t?t:this.fallbackNotificationHandler;void 0!==r&&Promise.resolve().then(()=>r(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r,a;const s=null!==(r=this._requestHandlers.get(e.method))&&void 0!==r?r:this.fallbackRequestHandler,i=this._transport;if(void 0===s)return void(null==i||i.send({jsonrpc:"2.0",id:e.id,error:{code:yt.MethodNotFound,message:"Method not found"}}).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))));const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const o={signal:n.signal,sessionId:null==i?void 0:i.sessionId,_meta:null===(a=e.params)||void 0===a?void 0:a._meta,sendNotification:t=>this.notification(t,{relatedRequestId:e.id}),sendRequest:(t,r,a)=>this.request(t,r,{...a,relatedRequestId:e.id}),authInfo:null==t?void 0:t.authInfo,requestId:e.id,requestInfo:null==t?void 0:t.requestInfo};Promise.resolve().then(()=>s(e,o)).then(t=>{if(!n.signal.aborted)return null==i?void 0:i.send({result:t,jsonrpc:"2.0",id:e.id})},t=>{var r;if(!n.signal.aborted)return null==i?void 0:i.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:yt.InternalError,message:null!==(r=t.message)&&void 0!==r?r:"Internal error"}})}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...r}=e.params,a=Number(t),s=this._progressHandlers.get(a);if(!s)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const i=this._responseHandlers.get(a),n=this._timeoutInfo.get(a);if(n&&i&&n.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(o){return void i(o)}s(r)}_onresponse(e){const t=Number(e.id),r=this._responseHandlers.get(t);if(void 0!==r)if(this._responseHandlers.delete(t),this._progressHandlers.delete(t),this._cleanupTimeout(t),gt(e))r(e);else{r(new qr(e.error.code,e.error.message,e.error.data))}else this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`))}get transport(){return this._transport}async close(){var e;await(null===(e=this._transport)||void 0===e?void 0:e.close())}request(e,t,r){const{relatedRequestId:a,resumptionToken:s,onresumptiontoken:i}=null!=r?r:{};return new Promise((n,o)=>{var l,d,c,u,h,p;if(!this._transport)return void o(new Error("Not connected"));!0===(null===(l=this._options)||void 0===l?void 0:l.enforceStrictCapabilities)&&this.assertCapabilityForMethod(e.method),null===(d=null==r?void 0:r.signal)||void 0===d||d.throwIfAborted();const m=this._requestMessageId++,f={...e,jsonrpc:"2.0",id:m};(null==r?void 0:r.onprogress)&&(this._progressHandlers.set(m,r.onprogress),f.params={...e.params,_meta:{...(null===(c=e.params)||void 0===c?void 0:c._meta)||{},progressToken:m}});const v=e=>{var t;this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),null===(t=this._transport)||void 0===t||t.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(e)}},{relatedRequestId:a,resumptionToken:s,onresumptiontoken:i}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`))),o(e)};this._responseHandlers.set(m,e=>{var a;if(!(null===(a=null==r?void 0:r.signal)||void 0===a?void 0:a.aborted)){if(e instanceof Error)return o(e);try{const r=t.parse(e.result);n(r)}catch(s){o(s)}}}),null===(u=null==r?void 0:r.signal)||void 0===u||u.addEventListener("abort",()=>{var e;v(null===(e=null==r?void 0:r.signal)||void 0===e?void 0:e.reason)});const g=null!==(h=null==r?void 0:r.timeout)&&void 0!==h?h:6e4;this._setupTimeout(m,g,null==r?void 0:r.maxTotalTimeout,()=>v(new qr(yt.RequestTimeout,"Request timed out",{timeout:g})),null!==(p=null==r?void 0:r.resetTimeoutOnProgress)&&void 0!==p&&p),this._transport.send(f,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(m),o(e)})})}async notification(e,t){var r,a;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);if((null!==(a=null===(r=this._options)||void 0===r?void 0:r.debouncedNotificationMethods)&&void 0!==a?a:[]).includes(e.method)&&!e.params&&!(null==t?void 0:t.relatedRequestId)){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{var r;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const a={...e,jsonrpc:"2.0"};null===(r=this._transport)||void 0===r||r.send(a,t).catch(e=>this._onerror(e))})}const s={...e,jsonrpc:"2.0"};await this._transport.send(s,t)}setRequestHandler(e,t){const r=e.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(r,a)=>Promise.resolve(t(e.parse(r),a)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){this._notificationHandlers.set(e.shape.method.value,r=>Promise.resolve(t(e.parse(r))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}var Zr,zr,Mr,Ur,Vr,Hr,Qr,Kr,Br,Jr={exports:{}};function Wr(){return Zr||(Zr=1,function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var a=t.length-1,s=1;s<a;++s)t[s]=t[s].slice(1,-1);return t[a]=t[a].slice(1),t.join("")}return t[0]}function r(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 s(e){return e.toUpperCase()}function i(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function n(e,t){var r=e;if(t)for(var a in t)r[a]=t[a];return r}function o(e){var a="[A-Za-z]",s="[0-9]",i=t(s,"[A-Fa-f]"),n=r(r("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+r("%[89A-Fa-f]"+i+"%"+i+i)+"|"+r("%"+i+i)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=t("[\\:\\/\\?\\#\\[\\]\\@]",o),d=e?"[\\uE000-\\uF8FF]":"[]",c=t(a,s,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(a+t(a,s,"[\\+\\-\\.]")+"*"),r(r(n+"|"+t(c,o,"[\\:]"))+"*");var u=r(r("25[0-5]")+"|"+r("2[0-4]"+s)+"|"+r("1"+s+s)+"|"+r("0?[1-9]"+s)+"|0?0?"+s),h=r(u+"\\."+u+"\\."+u+"\\."+u),p=r(i+"{1,4}"),m=r(r(p+"\\:"+p)+"|"+h),f=r(r(p+"\\:")+"{6}"+m),v=r("\\:\\:"+r(p+"\\:")+"{5}"+m),g=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+m),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+m),_=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+m),b=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+m),w=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+m),P=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),E=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),x=r([f,v,g,y,_,b,w,P,E].join("|")),S=r(r(c+"|"+n)+"+");r("[vV]"+i+"+\\."+t(c,o,"[\\:]")+"+"),r(r(n+"|"+t(c,o))+"*");var k=r(n+"|"+t(c,o,"[\\:\\@]"));return r(r(n+"|"+t(c,o,"[\\@]"))+"+"),r(r(k+"|"+t("[\\/\\?]",d))+"*"),{NOT_SCHEME:new RegExp(t("[^]",a,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",c,o),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",c,o),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",c,o),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",c,o),"g"),NOT_QUERY:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]",d),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",c,o),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",c,l),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+x+")"+r(r("\\%25|\\%(?!"+i+"{2})")+"("+S+")")+"?\\]?$")}}var l=o(!1),d=o(!0),c=function(){function e(e,t){var r=[],a=!0,s=!1,i=void 0;try{for(var n,o=e[Symbol.iterator]();!(a=(n=o.next()).done)&&(r.push(n.value),!t||r.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{!a&&o.return&&o.return()}finally{if(s)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,m=1,f=26,v=38,g=700,y=72,_=128,b="-",w=/^xn--/,P=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=p-m,k=Math.floor,R=String.fromCharCode;function O(e){throw new RangeError(x[e])}function j(e,t){for(var r=[],a=e.length;a--;)r[a]=t(e[a]);return r}function $(e,t){var r=e.split("@"),a="";return r.length>1&&(a=r[0]+"@",e=r[1]),a+j((e=e.replace(E,".")).split("."),t).join(".")}function C(e){for(var t=[],r=0,a=e.length;r<a;){var s=e.charCodeAt(r++);if(s>=55296&&s<=56319&&r<a){var i=e.charCodeAt(r++);56320==(64512&i)?t.push(((1023&s)<<10)+(1023&i)+65536):(t.push(s),r--)}else t.push(s)}return t}var F=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},T=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},I=function(e,t,r){var a=0;for(e=r?k(e/g):e>>1,e+=k(e/t);e>S*f>>1;a+=p)e=k(e/S);return k(a+(S+1)*e/(e+v))},A=function(e){var t=[],r=e.length,a=0,s=_,i=y,n=e.lastIndexOf(b);n<0&&(n=0);for(var o=0;o<n;++o)e.charCodeAt(o)>=128&&O("not-basic"),t.push(e.charCodeAt(o));for(var l=n>0?n+1:0;l<r;){for(var d=a,c=1,u=p;;u+=p){l>=r&&O("invalid-input");var v=F(e.charCodeAt(l++));(v>=p||v>k((h-a)/c))&&O("overflow"),a+=v*c;var g=u<=i?m:u>=i+f?f:u-i;if(v<g)break;var w=p-g;c>k(h/w)&&O("overflow"),c*=w}var P=t.length+1;i=I(a-d,P,0==d),k(a/P)>h-s&&O("overflow"),s+=k(a/P),a%=P,t.splice(a++,0,s)}return String.fromCodePoint.apply(String,t)},D=function(e){var t=[],r=(e=C(e)).length,a=_,s=0,i=y,n=!0,o=!1,l=void 0;try{for(var d,c=e[Symbol.iterator]();!(n=(d=c.next()).done);n=!0){var u=d.value;u<128&&t.push(R(u))}}catch(Q){o=!0,l=Q}finally{try{!n&&c.return&&c.return()}finally{if(o)throw l}}var v=t.length,g=v;for(v&&t.push(b);g<r;){var w=h,P=!0,E=!1,x=void 0;try{for(var S,j=e[Symbol.iterator]();!(P=(S=j.next()).done);P=!0){var $=S.value;$>=a&&$<w&&(w=$)}}catch(Q){E=!0,x=Q}finally{try{!P&&j.return&&j.return()}finally{if(E)throw x}}var F=g+1;w-a>k((h-s)/F)&&O("overflow"),s+=(w-a)*F,a=w;var A=!0,D=!1,N=void 0;try{for(var q,L=e[Symbol.iterator]();!(A=(q=L.next()).done);A=!0){var Z=q.value;if(Z<a&&++s>h&&O("overflow"),Z==a){for(var z=s,M=p;;M+=p){var U=M<=i?m:M>=i+f?f:M-i;if(z<U)break;var V=z-U,H=p-U;t.push(R(T(U+V%H,0))),z=k(V/H)}t.push(R(T(z,0))),i=I(s,F,g==v),s=0,++g}}}catch(Q){D=!0,N=Q}finally{try{!A&&L.return&&L.return()}finally{if(D)throw N}}++s,++a}return t.join("")},N=function(e){return $(e,function(e){return w.test(e)?A(e.slice(4).toLowerCase()):e})},q=function(e){return $(e,function(e){return P.test(e)?"xn--"+D(e):e})},L={version:"2.1.0",ucs2:{decode:C,encode:function(e){return String.fromCodePoint.apply(String,u(e))}},decode:A,encode:D,toASCII:q,toUnicode:N},Z={};function z(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function M(e){for(var t="",r=0,a=e.length;r<a;){var s=parseInt(e.substr(r+1,2),16);if(s<128)t+=String.fromCharCode(s),r+=3;else if(s>=194&&s<224){if(a-r>=6){var i=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&s)<<6|63&i)}else t+=e.substr(r,6);r+=6}else if(s>=224){if(a-r>=9){var n=parseInt(e.substr(r+4,2),16),o=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&s)<<12|(63&n)<<6|63&o)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=M(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,z).replace(t.PCT_ENCODED,s)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,z).replace(t.PCT_ENCODED,s)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,z).replace(t.PCT_ENCODED,s)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,z).replace(t.PCT_ENCODED,s)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,z).replace(t.PCT_ENCODED,s)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],a=c(r,2)[1];return a?a.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],a=c(r,3),s=a[1],i=a[2];if(s){for(var n=s.toLowerCase().split("::").reverse(),o=c(n,2),l=o[0],d=o[1],u=d?d.split(":").map(V):[],h=l.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),m=p?7:8,f=h.length-m,v=Array(m),g=0;g<m;++g)v[g]=u[g]||h[f+g]||"";p&&(v[m-1]=H(v[m-1],t));var y=v.reduce(function(e,t,r){if(!t||"0"===t){var a=e[e.length-1];a&&a.index+a.length===r?a.length++:e.push({index:r,length:1})}return e},[]).sort(function(e,t){return t.length-e.length})[0],_=void 0;if(y&&y.length>1){var b=v.slice(0,y.index),w=v.slice(y.index+y.length);_=b.join(":")+"::"+w.join(":")}else _=v.join(":");return i&&(_+="%"+i),_}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},a=!1!==t.iri?d:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var s=e.match(K);if(s){B?(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5])):(r.scheme=s[1]||void 0,r.userinfo=-1!==e.indexOf("@")?s[3]:void 0,r.host=-1!==e.indexOf("//")?s[4]:void 0,r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=-1!==e.indexOf("?")?s[7]:void 0,r.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),r.host&&(r.host=Q(H(r.host,a),a)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var i=Z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||i&&i.unicodeSupport)U(r,a);else{if(r.host&&(t.domainHost||i&&i.domainHost))try{r.host=L.toASCII(r.host.replace(a.PCT_ENCODED,M).toLowerCase())}catch(n){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+n}U(r,l)}i&&i.parse&&i.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?d:l,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var G=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(G))e=e.replace(G,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var a=r[0];e=e.slice(a.length),t.push(a)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?d:l,a=[],s=Z[(t.scheme||e.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||s&&s.domainHost)try{e.host=t.iri?L.toUnicode(e.host):L.toASCII(e.host.replace(r.PCT_ENCODED,M).toLowerCase())}catch(o){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+o}U(e,r),"suffix"!==t.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var i=W(e,t);if(void 0!==i&&("suffix"!==t.reference&&a.push("//"),a.push(i),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var n=e.path;t.absolutePath||s&&s.absolutePath||(n=te(n)),void 0===i&&(n=n.replace(/^\/\//,"/%2F")),a.push(n)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function ae(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={};return arguments[3]||(e=J(re(e,r),r),t=J(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=te(t.path||""),a.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=te(t.path||""),a.query=t.query):(t.path?("/"===t.path.charAt(0)?a.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path:a.path="/"+t.path,a.path=te(a.path)),a.query=t.query):(a.path=e.path,void 0!==t.query?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function se(e,t,r){var a=n({scheme:"null"},r);return re(ae(J(e,a),J(t,a),a,!0),a)}function ie(e,t){return"string"==typeof e?e=re(J(e,t),t):"object"===a(e)&&(e=J(re(e,t),t)),e}function ne(e,t,r){return"string"==typeof e?e=re(J(e,r),r):"object"===a(e)&&(e=re(e,r)),"string"==typeof t?t=re(J(t,r),r):"object"===a(t)&&(t=re(t,r)),e===t}function oe(e,t){return e&&e.toString().replace(t&&t.iri?d.ESCAPE:l.ESCAPE,z)}function le(e,t){return e&&e.toString().replace(t&&t.iri?d.PCT_ENCODED:l.PCT_ENCODED,M)}var de={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ce={scheme:"https",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize};function ue(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=ue(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(ue(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 r=e.resourceName.split("?"),a=c(r,2),s=a[0],i=a[1];e.path=s&&"/"!==s?s:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},me={},fe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ve="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ve+"%"+ve+ve+"%"+ve+ve)+"|"+r("%[89A-Fa-f]"+ve+"%"+ve+ve)+"|"+r("%"+ve+ve)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",_e=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),be="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",we=new RegExp(fe,"g"),Pe=new RegExp(ge,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',_e),"g"),xe=new RegExp(t("[^]",fe,be),"g"),Se=xe;function ke(e){var t=M(e);return t.match(we)?t:e}var Re={scheme:"mailto",parse:function(e,t){var r=e,a=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var s=!1,i={},n=r.query.split("&"),o=0,l=n.length;o<l;++o){var d=n[o].split("=");switch(d[0]){case"to":for(var c=d[1].split(","),u=0,h=c.length;u<h;++u)a.push(c[u]);break;case"subject":r.subject=le(d[1],t);break;case"body":r.body=le(d[1],t);break;default:s=!0,i[le(d[0],t)]=le(d[1],t)}}s&&(r.headers=i)}r.query=void 0;for(var p=0,m=a.length;p<m;++p){var f=a[p].split("@");if(f[0]=le(f[0]),t.unicodeSupport)f[1]=le(f[1],t).toLowerCase();else try{f[1]=L.toASCII(le(f[1],t).toLowerCase())}catch(v){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+v}a[p]=f.join("@")}return r},serialize:function(e,t){var r=e,a=i(e.to);if(a){for(var n=0,o=a.length;n<o;++n){var l=String(a[n]),d=l.lastIndexOf("@"),c=l.slice(0,d).replace(Pe,ke).replace(Pe,s).replace(Ee,z),u=l.slice(d+1);try{u=t.iri?L.toUnicode(u):L.toASCII(le(u,t).toLowerCase())}catch(f){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+f}a[n]=c+"@"+u}r.path=a.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var m in h)h[m]!==me[m]&&p.push(m.replace(Pe,ke).replace(Pe,s).replace(xe,z)+"="+h[m].replace(Pe,ke).replace(Pe,s).replace(Se,z));return p.length&&(r.query=p.join("&")),r}},Oe=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Oe),a=e;if(r){var s=t.scheme||a.scheme||"urn",i=r[1].toLowerCase(),n=r[2],o=s+":"+(t.nid||i),l=Z[o];a.nid=i,a.nss=n,a.path=void 0,l&&(a=l.parse(a,t))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",a=e.nid,s=r+":"+(t.nid||a),i=Z[s];i&&(e=i.serialize(e,t));var n=e,o=e.nss;return n.path=(a||t.nid)+":"+o,n}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match($e)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};Z[de.scheme]=de,Z[ce.scheme]=ce,Z[he.scheme]=he,Z[pe.scheme]=pe,Z[Re.scheme]=Re,Z[je.scheme]=je,Z[Ce.scheme]=Ce,e.SCHEMES=Z,e.pctEncChar=z,e.pctDecChars=M,e.parse=J,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ae,e.resolve=se,e.normalize=ie,e.equal=ne,e.escapeComponent=oe,e.unescapeComponent=le,Object.defineProperty(e,"__esModule",{value:!0})}(Jr.exports)),Jr.exports}function Gr(){return Mr?zr:(Mr=1,zr=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var a,s,i;if(Array.isArray(t)){if((a=t.length)!=r.length)return!1;for(s=a;0!==s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((a=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=a;0!==s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=a;0!==s--;){var n=i[s];if(!e(t[n],r[n]))return!1}return!0}return t!=t&&r!=r})}function Yr(){if(Qr)return Hr;function e(e,t,r,a){var s=a?" !== ":" === ",i=a?" || ":" && ",n=a?"!":"",o=a?"":"!";switch(e){case"null":return t+s+"null";case"array":return n+"Array.isArray("+t+")";case"object":return"("+n+t+i+"typeof "+t+s+'"object"'+i+o+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+s+'"number"'+i+o+"("+t+" % 1)"+i+t+s+t+(r?i+n+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+s+'"'+e+'"'+(r?i+n+"isFinite("+t+")":"")+")";default:return"typeof "+t+s+'"'+e+'"'}}Qr=1,Hr={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:e,checkDataTypes:function(t,a,s){if(1===t.length)return e(t[0],a,s,!0);var i="",n=r(t);for(var o in n.array&&n.object&&(i=n.null?"(":"(!"+a+" || ",i+="typeof "+a+' !== "object")',delete n.null,delete n.array,delete n.object),n.number&&delete n.integer,n)i+=(i?" && ":"")+e(o,a,s,!0);return i},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var a=[],s=0;s<r.length;s++){var i=r[s];(t[i]||"array"===e&&"array"===i)&&(a[a.length]=i)}if(a.length)return a}else{if(t[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:r,getProperty:i,escapeQuotes:n,equal:Gr(),ucs2length:Vr?Ur:(Vr=1,Ur=function(e){for(var t,r=0,a=e.length,s=0;s<a;)r++,(t=e.charCodeAt(s++))>=55296&&t<=56319&&s<a&&56320==(64512&(t=e.charCodeAt(s)))&&s++;return r}),varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var a in e)if(a!=r&&t[a])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:o,getPathExpr:function(e,t,r,a){return c(e,r?"'/' + "+t+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,r){var a=o(r?"/"+u(t):i(t));return c(e,a)},getData:function(e,t,r){var a,s,n,o;if(""===e)return"rootData";if("/"==e[0]){if(!l.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,n="rootData"}else{if(!(o=e.match(d)))throw new Error("Invalid JSON-pointer: "+e);if(a=+o[1],"#"==(s=o[2])){if(a>=t)throw new Error("Cannot access property/index "+a+" levels up, current level is "+t);return r[t-a]}if(a>t)throw new Error("Cannot access data "+a+" levels up, current level is "+t);if(n="data"+(t-a||""),!s)return n}for(var c=n,u=s.split("/"),p=0;p<u.length;p++){var m=u[p];m&&(c+=" && "+(n+=i(h(m))))}return c},unescapeFragment:function(e){return h(decodeURIComponent(e))},unescapeJsonPointer:h,escapeFragment:function(e){return encodeURIComponent(u(e))},escapeJsonPointer:u};var t=r(["string","number","integer","boolean","null"]);function r(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var a=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function i(e){return"number"==typeof e?"["+e+"]":a.test(e)?"."+e:"['"+n(e)+"']"}function n(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function o(e){return"'"+n(e)+"'"}var l=/^\/(?:[^~]|~0|~1)*$/,d=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function c(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function u(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function h(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}return Hr}function Xr(){if(Br)return Kr;Br=1;var e=Yr();return Kr=function(t){e.copy(t,this)}}var ea,ta,ra,aa,sa,ia,na,oa,la,da,ca,ua={exports:{}};function ha(){if(ea)return ua.exports;ea=1;var e=ua.exports=function(e,r,a){"function"==typeof r&&(a=r,r={}),t(r,"function"==typeof(a=r.cb||a)?a:a.pre||function(){},a.post||function(){},e,"",e)};function t(a,s,i,n,o,l,d,c,u,h){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var p in s(n,o,l,d,c,u,h),n){var m=n[p];if(Array.isArray(m)){if(p in e.arrayKeywords)for(var f=0;f<m.length;f++)t(a,s,i,m[f],o+"/"+p+"/"+f,l,o,p,n,f)}else if(p in e.propsKeywords){if(m&&"object"==typeof m)for(var v in m)t(a,s,i,m[v],o+"/"+p+"/"+r(v),l,o,p,n,v)}else(p in e.keywords||a.allKeys&&!(p in e.skipKeywords))&&t(a,s,i,m,o+"/"+p,l,o,p,n)}i(n,o,l,d,c,u,h)}}function r(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}return e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.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},ua.exports}function pa(){if(ra)return ta;ra=1;var e=Wr(),t=Gr(),r=Yr(),a=Xr(),s=ha();function i(e,t,r){var s=this._refs[r];if("string"==typeof s){if(!this._refs[s])return i.call(this,e,t,s);s=this._refs[s]}if((s=s||this._schemas[r])instanceof a)return u(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s);var o,l,d,c=n.call(this,t,r);return c&&(o=c.schema,t=c.root,d=c.baseId),o instanceof a?l=o.validate||e.call(this,o.schema,t,void 0,d):void 0!==o&&(l=u(o,this._opts.inlineRefs)?o:e.call(this,o,t,void 0,d)),l}function n(t,r){var s=e.parse(r),i=f(s),n=m(this._getId(t.schema));if(0===Object.keys(t.schema).length||i!==n){var l=g(i),c=this._refs[l];if("string"==typeof c)return o.call(this,t,c,s);if(c instanceof a)c.validate||this._compile(c),t=c;else{if(!((c=this._schemas[l])instanceof a))return;if(c.validate||this._compile(c),l==g(r))return{schema:c,root:t,baseId:n};t=c}if(!t.schema)return;n=m(this._getId(t.schema))}return d.call(this,s,n,t.schema,t)}function o(e,t,r){var a=n.call(this,e,t);if(a){var s=a.schema,i=a.baseId;e=a.root;var o=this._getId(s);return o&&(i=y(i,o)),d.call(this,r,i,s,e)}}ta=i,i.normalizeId=g,i.fullPath=m,i.url=y,i.ids=function(a){var i=g(this._getId(a)),n={"":i},o={"":m(i,!1)},l={},d=this;return s(a,{allKeys:!0},function(a,s,i,c,u,h,p){if(""!==s){var m=d._getId(a),f=n[c],v=o[c]+"/"+u;if(void 0!==p&&(v+="/"+("number"==typeof p?p:r.escapeFragment(p))),"string"==typeof m){m=f=g(f?e.resolve(f,m):m);var y=d._refs[m];if("string"==typeof y&&(y=d._refs[y]),y&&y.schema){if(!t(a,y.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=g(v))if("#"==m[0]){if(l[m]&&!t(a,l[m]))throw new Error('id "'+m+'" resolves to more than one schema');l[m]=a}else d._refs[m]=v}n[s]=f,o[s]=v}}),l},i.inlineRef=u,i.schema=n;var l=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,a,s){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var d=i[o];if(d){if(void 0===(a=a[d=r.unescapeFragment(d)]))break;var c;if(!l[d]&&((c=this._getId(a))&&(t=y(t,c)),a.$ref)){var u=y(t,a.$ref),h=n.call(this,s,u);h&&(a=h.schema,s=h.root,t=h.baseId)}}}return void 0!==a&&a!==s.schema?{schema:a,root:s,baseId:t}:void 0}}var c=r.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function u(e,t){return!1!==t&&(void 0===t||!0===t?h(e):t?p(e)<=t:void 0)}function h(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!h(t))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(t=e[a])&&!h(t))return!1}return!0}function p(e){var t,r=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if("object"==typeof(t=e[a])&&(r+=p(t)),r==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(c[s])r++;else if("object"==typeof(t=e[s])&&(r+=p(t)+1),r==1/0)return 1/0}return r}function m(t,r){return!1!==r&&(t=g(t)),f(e.parse(t))}function f(t){return e.serialize(t).split("#")[0]+"#"}var v=/#\/?$/;function g(e){return e?e.replace(v,""):""}function y(t,r){return r=g(r),e.resolve(t,r)}return ta}function ma(){if(sa)return aa;sa=1;var e=pa();function t(r,a,s){this.message=s||t.message(r,a),this.missingRef=e.url(r,a),this.missingSchema=e.normalizeId(e.fullPath(this.missingRef))}function r(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}return aa={Validation:r(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:r(t)},t.message=function(e,t){return"can't resolve reference "+t+" from id "+e},aa}function fa(){return na?ia:(na=1,ia=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,a=t.cmp&&function(e){return function(t){return function(r,a){var s={key:r,value:t[r]},i={key:a,value:t[a]};return e(s,i)}}}(t.cmp),s=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,n;if(Array.isArray(t)){for(n="[",i=0;i<t.length;i++)i&&(n+=","),n+=e(t[i])||"null";return n+"]"}if(null===t)return"null";if(-1!==s.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var o=s.push(t)-1,l=Object.keys(t).sort(a&&a(t));for(n="",i=0;i<l.length;i++){var d=l[i],c=e(t[d]);c&&(n&&(n+=","),n+=JSON.stringify(d)+":"+c)}return s.splice(o,1),"{"+n+"}"}}(e)})}function va(){return la?oa:(la=1,oa=function(e,t,r){var a="",s=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),n=e.self._getId(e.schema);if(e.opts.strictKeywords){var o=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(o){var l="unknown keyword: "+o;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",n&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+n+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){t="false schema";var d=e.level,c=e.dataLevel,u=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,m=!e.opts.allErrors,f="data"+(c||""),v="valid"+d;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=W.pop(),!e.compositeRule&&m?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++; "}else e.isTop?a+=s?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;d=e.level=0,c=e.dataLevel=0,f="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)throw new Error(_);e.logger.warn(_)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{d=e.level,f="data"+((c=e.dataLevel)||"");if(n&&(e.baseId=e.resolve.url(e.baseId,n)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+d+" = errors;"}v="valid"+d,m=!e.opts.allErrors;var b="",w="",P=e.schema.type,E=Array.isArray(P);if(P&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==P.indexOf("null")&&(P=P.concat("null")):"null"!=P&&(P=[P,"null"],E=!0)),E&&1==P.length&&(P=P[0],E=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!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")),P){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,P);var S=e.RULES.types[P];if(x||E||!0===S||S&&!G(S)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var k=E?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[k](P,f,e.opts.strictNumbers,!0)+") { ",x){var R="dataType"+d,O="coerced"+d;a+=" var "+R+" = typeof "+f+"; var "+O+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+R+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+R+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+O+" = "+f+"; } "),a+=" if ("+O+" !== undefined) ; ";var j=x;if(j)for(var $,C=-1,F=j.length-1;C<F;)"string"==($=j[C+=1])?a+=" else if ("+R+" == 'number' || "+R+" == 'boolean') "+O+" = '' + "+f+"; else if ("+f+" === null) "+O+" = ''; ":"number"==$||"integer"==$?(a+=" else if ("+R+" == 'boolean' || "+f+" === null || ("+R+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==$&&(a+=" && !("+f+" % 1)"),a+=")) "+O+" = +"+f+"; "):"boolean"==$?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+O+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+O+" = true; ":"null"==$?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+O+" = null; ":"array"==e.opts.coerceTypes&&"array"==$&&(a+=" else if ("+R+" == 'string' || "+R+" == 'number' || "+R+" == 'boolean' || "+f+" == null) "+O+" = ["+f+"]; ");a+=" else { ",(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=W.pop(),!e.compositeRule&&m?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+=" } if ("+O+" !== undefined) { ";var T=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+O+"; ",c||(a+="if ("+T+" !== undefined)"),a+=" "+T+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+O+"; } "}else{(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=W.pop(),!e.compositeRule&&m?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+=" } "}}if(e.schema.$ref&&!i)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+d,a+=") { ",w+="}");else{var I=e.RULES;if(I)for(var A=-1,D=I.length-1;A<D;)if(G(S=I[A+=1])){if(S.type&&(a+=" if ("+e.util.checkDataType(S.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==S.type&&e.schema.properties){u=e.schema.properties;var N=Object.keys(u);if(N)for(var q,L=-1,Z=N.length-1;L<Z;){if(void 0!==(U=u[q=N[L+=1]]).default){var z=f+e.util.getProperty(q);if(e.compositeRule){if(e.opts.strictDefaults){_="default is ignored for: "+z;if("log"!==e.opts.strictDefaults)throw new Error(_);e.logger.warn(_)}}else a+=" if ("+z+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+z+" === null || "+z+" === '' "),a+=" ) "+z+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}else if("array"==S.type&&Array.isArray(e.schema.items)){var M=e.schema.items;if(M){C=-1;for(var U,V=M.length-1;C<V;)if(void 0!==(U=M[C+=1]).default){z=f+"["+C+"]";if(e.compositeRule){if(e.opts.strictDefaults){_="default is ignored for: "+z;if("log"!==e.opts.strictDefaults)throw new Error(_);e.logger.warn(_)}}else a+=" if ("+z+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+z+" === null || "+z+" === '' "),a+=" ) "+z+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(U.default)+" ":a+=" "+JSON.stringify(U.default)+" ",a+="; "}}}var H=S.rules;if(H)for(var Q,K=-1,B=H.length-1;K<B;)if(Y(Q=H[K+=1])){var J=Q.code(e,Q.keyword,S.type);J&&(a+=" "+J+" ",m&&(b+="}"))}if(m&&(a+=" "+b+" ",b=""),S.type&&(a+=" } ",P&&P===S.type&&!x)){a+=" else { ";var W;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(W=W||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=E?""+P.join(","):""+P,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=E?""+P.join(","):""+P,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=W.pop(),!e.compositeRule&&m?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+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+d,a+=") { ",w+="}")}}function G(e){for(var t=e.rules,r=0;r<t.length;r++)if(Y(t[r]))return!0}function Y(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,a=0;a<r.length;a++)if(void 0!==e.schema[r[a]])return!0}(t)}return m&&(a+=" "+w+" "),y?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+d+";",a})}function ga(){if(ca)return da;ca=1;var e=pa(),t=Yr(),r=ma(),a=fa(),s=va(),i=t.ucs2length,n=Gr(),o=r.Validation;function l(e,t,r){var a=c.call(this,e,t,r);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:t,baseId:r},{index:a,compiling:!1})}function d(e,t,r){var a=c.call(this,e,t,r);a>=0&&this._compilations.splice(a,1)}function c(e,t,r){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==t&&s.baseId==r)return a}return-1}function u(e,r){return"var pattern"+e+" = new RegExp("+t.toQuotedString(r[e])+");"}function h(e){return"var default"+e+" = defaults["+e+"];"}function p(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function m(e){return"var customRule"+e+" = customRules["+e+"];"}function f(e,t){if(!e.length)return"";for(var r="",a=0;a<e.length;a++)r+=t(a,e);return r}return da=function c(v,g,y,_){var b=this,w=this._opts,P=[void 0],E={},x=[],S={},k=[],R={},O=[];g=g||{schema:v,refVal:P,refs:E};var j=l.call(this,v,g,_),$=this._compilations[j.index];if(j.compiling)return $.callValidate=function e(){var t=$.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var C=this._formats,F=this.RULES;try{var T=A(v,g,y,_);$.validate=T;var I=$.callValidate;return I&&(I.schema=T.schema,I.errors=null,I.refs=T.refs,I.refVal=T.refVal,I.root=T.root,I.$async=T.$async,w.sourceCode&&(I.source=T.source)),T}finally{d.call(this,v,g,_)}function A(a,l,d,v){var y=!l||l&&l.schema==a;if(l.schema!=g.schema)return c.call(b,a,l,d,v);var _,S=!0===a.$async,R=s({isTop:!0,schema:a,isRoot:y,baseId:v,root:l,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:r.MissingRef,RULES:F,validate:s,util:t,resolve:e,resolveRef:D,usePattern:L,useDefault:Z,useCustomRule:z,opts:w,formats:C,logger:b.logger,self:b});R=f(P,p)+f(x,u)+f(k,h)+f(O,m)+R,w.processCode&&(R=w.processCode(R,a));try{_=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",R)(b,F,C,g,P,k,O,n,i,o),P[0]=_}catch(j){throw b.logger.error("Error compiling schema, function code:",R),j}return _.schema=a,_.errors=null,_.refs=E,_.refVal=P,_.root=y?_:l,S&&(_.$async=!0),!0===w.sourceCode&&(_.source={code:R,patterns:x,defaults:k}),_}function D(t,r,a){r=e.url(t,r);var s,i,n=E[r];if(void 0!==n)return q(s=P[n],i="refVal["+n+"]");if(!a&&g.refs){var o=g.refs[r];if(void 0!==o)return q(s=g.refVal[o],i=N(r,s))}i=N(r);var l=e.call(b,A,g,r);if(void 0===l){var d=y&&y[r];d&&(l=e.inlineRef(d,w.inlineRefs)?d:c.call(b,d,g,y,t))}if(void 0!==l)return function(e,t){var r=E[e];P[r]=t}(r,l),q(l,i);!function(e){delete E[e]}(r)}function N(e,t){var r=P.length;return P[r]=t,E[e]=r,"refVal"+r}function q(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function L(e){var t=S[e];return void 0===t&&(t=S[e]=x.length,x[t]=e),"pattern"+t}function Z(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return t.toQuotedString(e);case"object":if(null===e)return"null";var r=a(e),s=R[r];return void 0===s&&(s=R[r]=k.length,k[s]=e),"default"+s}}function z(e,t,r,a){if(!1!==b._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(r,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var i=e.definition.validateSchema;if(i)if(!i(t)){var n="keyword schema is invalid: "+b.errorsText(i.errors);if("log"!=b._opts.validateSchema)throw new Error(n);b.logger.error(n)}}var o,l=e.definition.compile,d=e.definition.inline,c=e.definition.macro;if(l)o=l.call(b,t,r,a);else if(c)o=c.call(b,t,r,a),!1!==w.validateSchema&&b.validateSchema(o,!0);else if(d)o=d.call(b,a,e.keyword,t,r);else if(!(o=e.definition.validate))return;if(void 0===o)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=O.length;return O[u]=o,{code:"customRule"+u,validate:o}}},da}var ya,_a,ba,wa,Pa,Ea,xa,Sa,ka,Ra,Oa,ja,$a,Ca,Fa,Ta,Ia,Aa,Da,Na,qa,La,Za,za,Ma,Ua,Va,Ha,Qa,Ka,Ba,Ja,Wa,Ga,Ya,Xa,es,ts,rs,as,ss,is,ns,os,ls,ds,cs,us,hs,ps,ms,fs,vs,gs,ys,_s,bs,ws,Ps,Es={exports:{}};function xs(){return Va?Ua:(Va=1,Ua=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o;var p="maximum"==t,m=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",_=void 0;if(!h&&"number"!=typeof o&&void 0!==o)throw new Error(t+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var b=e.util.getData(f.$data,n,e.dataPathArr),w="exclusive"+i,P="exclType"+i,E="exclIsNumber"+i,x="' + "+(R="op"+i)+" + '";s+=" var schemaExcl"+i+" = "+b+"; ",s+=" var "+w+"; var "+P+" = typeof "+(b="schemaExcl"+i)+"; if ("+P+" != 'boolean' && "+P+" != 'undefined' && "+P+" != 'number') { ";var S;_=m;(S=S||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(_||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var k=s;s=S.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+k+"]); ":s+=" validate.errors = ["+k+"]; return false; ":s+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+P+" == 'number' ? ( ("+w+" = "+a+" === undefined || "+b+" "+g+"= "+a+") ? "+u+" "+y+"= "+b+" : "+u+" "+y+" "+a+" ) : ( ("+w+" = "+b+" === true) ? "+u+" "+y+"= "+a+" : "+u+" "+y+" "+a+" ) || "+u+" !== "+u+") { var op"+i+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===o&&(_=m,d=e.errSchemaPath+"/"+m,a=b,h=v)}else{x=g;if((E="number"==typeof f)&&h){var R="'"+x+"'";s+=" if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+u+" "+y+"= "+f+" : "+u+" "+y+" "+a+" ) || "+u+" !== "+u+") { "}else{E&&void 0===o?(w=!0,_=m,d=e.errSchemaPath+"/"+m,a=f,y+="="):(E&&(a=Math[p?"min":"max"](f,o)),f===(!E||a)?(w=!0,_=m,d=e.errSchemaPath+"/"+m,y+="="):(w=!1,x+="="));R="'"+x+"'";s+=" if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+" "+y+" "+a+" || "+u+" !== "+u+") { "}}_=_||t,(S=S||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(_||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { comparison: "+R+", limit: "+a+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+x+" ",s+=h?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";k=s;return s=S.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+k+"]); ":s+=" validate.errors = ["+k+"]; return false; ":s+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { "),s})}function Ss(){return Qa?Ha:(Qa=1,Ha=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+".length "+("maxItems"==t?">":"<")+" "+a+") { ";var p=t,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==t?"more":"fewer",s+=" than ",s+=h?"' + "+a+" + '":""+o,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var f=s;return s=m.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s})}function ks(){return Ba?Ka:(Ba=1,Ka=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";s+="if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?s+=" "+u+".length ":s+=" ucs2length("+u+") ",s+=" "+p+" "+a+") { ";var m=t,f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==t?"longer":"shorter",s+=" than ",s+=h?"' + "+a+" + '":""+o,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var v=s;return s=f.pop(),!e.compositeRule&&c?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+="} ",c&&(s+=" else { "),s})}function Rs(){return Wa?Ja:(Wa=1,Ja=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+u+").length "+("maxProperties"==t?">":"<")+" "+a+") { ";var p=t,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==t?"more":"fewer",s+=" than ",s+=h?"' + "+a+" + '":""+o,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var f=s;return s=m.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s})}function Os(){if(vs)return fs;vs=1;var e=ms?ps:(ms=1,ps={$ref:Pa?wa:(Pa=1,wa=function(e,t,r){var a,s,i=" ",n=e.level,o=e.dataLevel,l=e.schema[t],d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+n;if("#"==l||"#/"==l)e.isRoot?(a=e.async,s="validate"):(a=!0===e.root.schema.$async,s="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var f=i;i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),c&&(i+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,i+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(i+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,s=p.code}if(s){var y;(y=y||[]).push(i),i="",e.opts.passContext?i+=" "+s+".call(this, ":i+=" "+s+"( ",i+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var _=i+=" , "+(o?"data"+(o-1||""):"parentData")+" , "+(o?e.dataPathArr[o]:"parentDataProperty")+", rootData) ";if(i=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(i+=" var "+h+"; "),i+=" try { await "+_+"; ",c&&(i+=" "+h+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(i+=" "+h+" = false; "),i+=" } ",c&&(i+=" if ("+h+") { ")}else i+=" if (!"+_+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",c&&(i+=" else { ")}return i}),allOf:xa?Ea:(xa=1,Ea=function(e,t,r){var a=" ",s=e.schema[t],i=e.schemaPath+e.util.getProperty(t),n=e.errSchemaPath+"/"+t,o=!e.opts.allErrors,l=e.util.copy(e),d="";l.level++;var c="valid"+l.level,u=l.baseId,h=!0,p=s;if(p)for(var m,f=-1,v=p.length-1;f<v;)m=p[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(h=!1,l.schema=m,l.schemaPath=i+"["+f+"]",l.errSchemaPath=n+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=u,o&&(a+=" if ("+c+") { ",d+="}"));return o&&(a+=h?" if (true) { ":" "+d.slice(0,-1)+" "),a}),anyOf:ka?Sa:(ka=1,Sa=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level;if(n.every(function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)})){var v=p.baseId;a+=" var "+h+" = errors; var "+u+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=n;if(y)for(var _,b=-1,w=y.length-1;b<w;)_=y[b+=1],p.schema=_,p.schemaPath=o+"["+b+"]",p.errSchemaPath=l+"/"+b,a+=" "+e.validate(p)+" ",p.baseId=v,a+=" "+u+" = "+u+" || "+f+"; if (!"+u+") { ",m+="}";e.compositeRule=p.compositeRule=g,a+=" "+m+" 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"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else d&&(a+=" if (true) { ");return a}),$comment:Oa?Ra:(Oa=1,Ra=function(e,t,r){var a=" ",s=e.schema[t],i=e.errSchemaPath+"/"+t;e.opts.allErrors;var n=e.util.toQuotedString(s);return!0===e.opts.$comment?a+=" console.log("+n+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+n+", "+e.util.toQuotedString(i)+", validate.root.schema);"),a}),const:$a?ja:($a=1,ja=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h=e.opts.$data&&n&&n.$data;h&&(a+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; "),h||(a+=" var schema"+s+" = validate.schema"+o+";"),a+="var "+u+" = equal("+c+", schema"+s+"); if (!"+u+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),!e.compositeRule&&d?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++; ",a+=" }",d&&(a+=" else { "),a}),contains:Fa?Ca:(Fa=1,Ca=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e);p.level++;var m="valid"+p.level,f="i"+s,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,_=e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all);if(a+="var "+h+" = errors;var "+u+";",_){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=n,p.schemaPath=o,p.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var w=c+"["+f+"]";p.dataPathArr[v]=f;var P=e.validate(p);p.baseId=y,e.util.varOccurences(P,g)<2?a+=" "+e.util.varReplace(P,g,w)+" ":a+=" var "+g+" = "+w+"; "+P+" ",a+=" if ("+m+") break; } ",e.compositeRule=p.compositeRule=b,a+=" if (!"+m+") {"}else a+=" if ("+c+".length == 0) {";var E=E||[];E.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"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;return a=E.pop(),!e.compositeRule&&d?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 { ",_&&(a+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}),dependencies:Ia?Ta:(Ia=1,Ta=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="errs__"+s,h=e.util.copy(e),p="";h.level++;var m="valid"+h.level,f={},v={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],_=Array.isArray(y)?v:f;_[w]=y}a+="var "+u+" = errors;";var b=e.errorPath;for(var w in a+="var missing"+s+";",v)if((_=v[w]).length){if(a+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),d){a+=" && ( ";var P=_;if(P)for(var E=-1,x=P.length-1;E<x;)$=P[E+=1],E&&(a+=" || "),a+=" ( ( "+(I=c+(T=e.util.getProperty($)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes($)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?$:T)+") ) ";a+=")) { ";var S="missing"+s,k="' + "+S+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,S,!0):b+" + "+S);var R=R||[];R.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+k+"', depsCount: "+_.length+", deps: '"+e.util.escapeQuotes(1==_.length?_[0]:_.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==_.length?a+="property "+e.util.escapeQuotes(_[0]):a+="properties "+e.util.escapeQuotes(_.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var O=a;a=R.pop(),!e.compositeRule&&d?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 j=_;if(j)for(var $,C=-1,F=j.length-1;C<F;){$=j[C+=1];var T=e.util.getProperty($),I=(k=e.util.escapeQuotes($),c+T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,$,e.opts.jsonPointers)),a+=" if ( "+I+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes($)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+k+"', depsCount: "+_.length+", deps: '"+e.util.escapeQuotes(1==_.length?_[0]:_.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==_.length?a+="property "+e.util.escapeQuotes(_[0]):a+="properties "+e.util.escapeQuotes(_.join(", ")),a+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",d&&(p+="}",a+=" else { ")}e.errorPath=b;var A=h.baseId;for(var w in f)y=f[w],(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),a+=") { ",h.schema=y,h.schemaPath=o+e.util.getProperty(w),h.errSchemaPath=l+"/"+e.util.escapeFragment(w),a+=" "+e.validate(h)+" ",h.baseId=A,a+=" } ",d&&(a+=" if ("+m+") { ",p+="}"));return d&&(a+=" "+p+" if ("+u+" == errors) {"),a}),enum:Da?Aa:(Da=1,Aa=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h=e.opts.$data&&n&&n.$data;h&&(a+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var p="i"+s,m="schema"+s;h||(a+=" var "+m+" = validate.schema"+o+";"),a+="var "+u+";",h&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=u+" = false;for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) if (equal("+c+", "+m+"["+p+"])) { "+u+" = true; break; }",h&&(a+=" } "),a+=" if (!"+u+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&d?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+=" }",d&&(a+=" else { "),a}),format:qa?Na:(qa=1,Na=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||"");if(!1===e.opts.format)return d&&(a+=" if (true) { "),a;var u,h=e.opts.$data&&n&&n.$data;h?(a+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",u="schema"+s):u=n;var p=e.opts.unknownFormats,m=Array.isArray(p);if(h)a+=" var "+(f="format"+s)+" = formats["+u+"]; var "+(v="isObject"+s)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+s)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+s+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",h&&(a+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+u+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+u+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+r+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {";else{var f;if(!(f=e.formats[n])){if("ignore"==p)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),d&&(a+=" if (true) { "),a;if(m&&p.indexOf(n)>=0)return d&&(a+=" if (true) { "),a;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=r)return d&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(_="formats"+e.util.getProperty(n)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var _="formats"+e.util.getProperty(n);v&&(_+=".validate"),a+="function"==typeof f?" "+_+"("+c+") ":" "+_+".test("+c+") ",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: ",a+=h?""+u:""+e.util.toQuotedString(n),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=h?"' + "+u+" + '":""+e.util.escapeQuotes(n),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=h?"validate.schema"+o:""+e.util.toQuotedString(n),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=b.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",d&&(a+=" else { "),a}),if:Za?La:(Za=1,La=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e);p.level++;var m="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),_=p.baseId;if(g||y){var b;p.createErrors=!1,p.schema=n,p.schemaPath=o,p.errSchemaPath=l,a+=" var "+h+" = errors; var "+u+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=_,p.createErrors=!0,a+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(a+=" if ("+m+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=_,a+=" "+u+" = "+m+"; ",g&&y?a+=" var "+(b="ifClause"+s)+" = 'then'; ":b="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=_,a+=" "+u+" = "+m+"; ",g&&y?a+=" var "+(b="ifClause"+s)+" = 'else'; ":b="'else'",a+=" } "),a+=" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",d&&(a+=" else { ")}else d&&(a+=" if (true) { ");return a}),items:Ma?za:(Ma=1,za=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v="i"+s,g=p.dataLevel=e.dataLevel+1,y="data"+g,_=e.baseId;if(a+="var "+h+" = errors;var "+u+";",Array.isArray(n)){var b=e.schema.additionalItems;if(!1===b){a+=" "+u+" = "+c+".length <= "+n.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+u+") { ";var P=P||[];P.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var E=a;a=P.pop(),!e.compositeRule&&d?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+=" } ",l=w,d&&(m+="}",a+=" else { ")}var x=n;if(x)for(var S,k=-1,R=x.length-1;k<R;)if(S=x[k+=1],e.opts.strictKeywords?"object"==typeof S&&Object.keys(S).length>0||!1===S:e.util.schemaHasRules(S,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+k+") { ";var O=c+"["+k+"]";p.schema=S,p.schemaPath=o+"["+k+"]",p.errSchemaPath=l+"/"+k,p.errorPath=e.util.getPathExpr(e.errorPath,k,e.opts.jsonPointers,!0),p.dataPathArr[g]=k;var j=e.validate(p);p.baseId=_,e.util.varOccurences(j,y)<2?a+=" "+e.util.varReplace(j,y,O)+" ":a+=" var "+y+" = "+O+"; "+j+" ",a+=" } ",d&&(a+=" if ("+f+") { ",m+="}")}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))&&(p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+n.length+") { for (var "+v+" = "+n.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0),O=c+"["+v+"]",p.dataPathArr[g]=v,j=e.validate(p),p.baseId=_,e.util.varOccurences(j,y)<2?a+=" "+e.util.varReplace(j,y,O)+" ":a+=" var "+y+" = "+O+"; "+j+" ",d&&(a+=" if (!"+f+") break; "),a+=" } } ",d&&(a+=" if ("+f+") { ",m+="}"))}else(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all))&&(p.schema=n,p.schemaPath=o,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0),O=c+"["+v+"]",p.dataPathArr[g]=v,j=e.validate(p),p.baseId=_,e.util.varOccurences(j,y)<2?a+=" "+e.util.varReplace(j,y,O)+" ":a+=" var "+y+" = "+O+"; "+j+" ",d&&(a+=" if (!"+f+") break; "),a+=" }");return d&&(a+=" "+m+" if ("+h+" == errors) {"),a}),maximum:xs(),minimum:xs(),maxItems:Ss(),minItems:Ss(),maxLength:ks(),minLength:ks(),maxProperties:Rs(),minProperties:Rs(),multipleOf:Ya?Ga:(Ya=1,Ga=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="var division"+i+";if (",h&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+i+" = "+u+" / "+a+", ",e.opts.multipleOfPrecision?s+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":s+=" division"+i+" !== parseInt(division"+i+") ",s+=" ) ",h&&(s+=" ) "),s+=" ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=h?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}),not:es?Xa:(es=1,Xa=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="errs__"+s,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=o,h.errSchemaPath=l,a+=" var "+u+" = errors; ";var m,f=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(m=h.opts.allErrors,h.opts.allErrors=!1),a+=" "+e.validate(h)+" ",h.createErrors=!0,m&&(h.opts.allErrors=m),e.compositeRule=h.compositeRule=f,a+=" if ("+p+") { ";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"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&d?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 = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; 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"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(a+=" if (false) { ");return a}),oneOf:rs?ts:(rs=1,ts=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+s,y="passingSchemas"+s;a+="var "+h+" = errors , "+g+" = false , "+u+" = false , "+y+" = null; ";var _=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=n;if(b)for(var w,P=-1,E=b.length-1;P<E;)w=b[P+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=o+"["+P+"]",p.errSchemaPath=l+"/"+P,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",P&&(a+=" if ("+f+" && "+g+") { "+u+" = false; "+y+" = ["+y+", "+P+"]; } else { ",m+="}"),a+=" if ("+f+") { "+u+" = "+g+" = true; "+y+" = "+P+"; }";return e.compositeRule=p.compositeRule=_,a+=m+"if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}),pattern:ss?as:(ss=1,as=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;h?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,s+="if ( ",h&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),s+=" !"+(h?"(new RegExp("+a+"))":e.usePattern(o))+".test("+u+") ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { pattern: ",s+=h?""+a:""+e.util.toQuotedString(o),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=h?"' + "+a+" + '":""+e.util.escapeQuotes(o),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+l:""+e.util.toQuotedString(o),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}),properties:ns?is:(ns=1,is=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="errs__"+s,h=e.util.copy(e),p="";h.level++;var m="valid"+h.level,f="key"+s,v="idx"+s,g=h.dataLevel=e.dataLevel+1,y="data"+g,_="dataProperties"+s,b=Object.keys(n||{}).filter(T),w=e.schema.patternProperties||{},P=Object.keys(w).filter(T),E=e.schema.additionalProperties,x=b.length||P.length,S=!1===E,k="object"==typeof E&&Object.keys(E).length,R=e.opts.removeAdditional,O=S||k||R,j=e.opts.ownProperties,$=e.baseId,C=e.schema.required;if(C&&(!e.opts.$data||!C.$data)&&C.length<e.opts.loopRequired)var F=e.util.toHash(C);function T(e){return"__proto__"!==e}if(a+="var "+u+" = errors;var "+m+" = true;",j&&(a+=" var "+_+" = undefined;"),O){if(a+=j?" "+_+" = "+_+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+_+".length; "+v+"++) { var "+f+" = "+_+"["+v+"]; ":" for (var "+f+" in "+c+") { ",x){if(a+=" var isAdditional"+s+" = !(false ",b.length)if(b.length>8)a+=" || validate.schema"+o+".hasOwnProperty("+f+") ";else{var I=b;if(I)for(var A=-1,D=I.length-1;A<D;)J=I[A+=1],a+=" || "+f+" == "+e.util.toQuotedString(J)+" "}if(P.length){var N=P;if(N)for(var q=-1,L=N.length-1;q<L;)ie=N[q+=1],a+=" || "+e.usePattern(ie)+".test("+f+") "}a+=" ); if (isAdditional"+s+") { "}if("all"==R)a+=" delete "+c+"["+f+"]; ";else{var Z=e.errorPath,z="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),S)if(R)a+=" delete "+c+"["+f+"]; ";else{a+=" "+m+" = false; ";var M=l;l=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+z+"' } ",!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: "+c+" "),a+=" } "):a+=" {} ";var U=a;a=re.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,d&&(a+=" break; ")}else if(k)if("failing"==R){a+=" var "+u+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var H=c+"["+f+"]";h.dataPathArr[g]=f;var Q=e.validate(h);h.baseId=$,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,H)+" ":a+=" var "+y+" = "+H+"; "+Q+" ",a+=" if (!"+m+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=h.compositeRule=V}else h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers),H=c+"["+f+"]",h.dataPathArr[g]=f,Q=e.validate(h),h.baseId=$,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,H)+" ":a+=" var "+y+" = "+H+"; "+Q+" ",d&&(a+=" if (!"+m+") break; ");e.errorPath=Z}x&&(a+=" } "),a+=" } ",d&&(a+=" if ("+m+") { ",p+="}")}var K=e.opts.useDefaults&&!e.compositeRule;if(b.length){var B=b;if(B)for(var J,W=-1,G=B.length-1;W<G;){var Y=n[J=B[W+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var X=e.util.getProperty(J),ee=(H=c+X,K&&void 0!==Y.default);if(h.schema=Y,h.schemaPath=o+X,h.errSchemaPath=l+"/"+e.util.escapeFragment(J),h.errorPath=e.util.getPath(e.errorPath,J,e.opts.jsonPointers),h.dataPathArr[g]=e.util.toQuotedString(J),Q=e.validate(h),h.baseId=$,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else te=y,a+=" var "+y+" = "+H+"; ";if(ee)a+=" "+Q+" ";else{if(F&&F[J]){a+=" if ( "+te+" === undefined ",j&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+m+" = false; ",Z=e.errorPath,M=l;var re,ae=e.util.escapeQuotes(J);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(Z,J,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+ae+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",U=a,a=re.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=M,e.errorPath=Z,a+=" } else { "}else d?(a+=" if ( "+te+" === undefined ",j&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(J)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+te+" !== undefined ",j&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(J)+"') "),a+=" ) { ");a+=" "+Q+" } "}}d&&(a+=" if ("+m+") { ",p+="}")}}if(P.length){var se=P;if(se)for(var ie,ne=-1,oe=se.length-1;ne<oe;)Y=w[ie=se[ne+=1]],(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all))&&(h.schema=Y,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),a+=j?" "+_+" = "+_+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+_+".length; "+v+"++) { var "+f+" = "+_+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(ie)+".test("+f+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers),H=c+"["+f+"]",h.dataPathArr[g]=f,Q=e.validate(h),h.baseId=$,e.util.varOccurences(Q,y)<2?a+=" "+e.util.varReplace(Q,y,H)+" ":a+=" var "+y+" = "+H+"; "+Q+" ",d&&(a+=" if (!"+m+") break; "),a+=" } ",d&&(a+=" else "+m+" = true; "),a+=" } ",d&&(a+=" if ("+m+") { ",p+="}"))}return d&&(a+=" "+p+" if ("+u+" == errors) {"),a}),propertyNames:ls?os:(ls=1,os=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="errs__"+s,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(a+="var "+u+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0||!1===n:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=o,h.errSchemaPath=l;var m="key"+s,f="idx"+s,v="i"+s,g="' + "+m+" + '",y="data"+(h.dataLevel=e.dataLevel+1),_="dataProperties"+s,b=e.opts.ownProperties,w=e.baseId;b&&(a+=" var "+_+" = undefined; "),a+=b?" "+_+" = "+_+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+_+".length; "+f+"++) { var "+m+" = "+_+"["+f+"]; ":" for (var "+m+" in "+c+") { ",a+=" var startErrs"+s+" = errors; ";var P=m,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var x=e.validate(h);h.baseId=w,e.util.varOccurences(x,y)<2?a+=" "+e.util.varReplace(x,y,P)+" ":a+=" var "+y+" = "+P+"; "+x+" ",e.compositeRule=h.compositeRule=E,a+=" if (!"+p+") { for (var "+v+"=startErrs"+s+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } 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"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),d&&(a+=" break; "),a+=" } }"}return d&&(a+=" if ("+u+" == errors) {"),a}),required:cs?ds:(cs=1,ds=function(e,t,r){var a=" ",s=e.level,i=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,c="data"+(i||""),u="valid"+s,h=e.opts.$data&&n&&n.$data;h&&(a+=" var schema"+s+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ");var p="schema"+s;if(!h)if(n.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=n;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var _=e.schema.properties[v];_&&(e.opts.strictKeywords?"object"==typeof _&&Object.keys(_).length>0||!1===_:e.util.schemaHasRules(_,e.RULES.all))||(m[m.length]=v)}}else m=n;if(h||m.length){var b=e.errorPath,w=h||m.length>=e.opts.loopRequired,P=e.opts.ownProperties;if(d)if(a+=" var missing"+s+"; ",w){h||(a+=" var "+p+" = validate.schema"+o+"; ");var E="' + "+(j="schema"+s+"["+(R="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),a+=" var "+u+" = true; ",h&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=" for (var "+R+" = 0; "+R+" < "+p+".length; "+R+"++) { "+u+" = "+c+"["+p+"["+R+"]] !== undefined ",P&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+R+"]) "),a+="; if (!"+u+") break; } ",h&&(a+=" } "),a+=" if (!"+u+") { ",(S=S||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+E+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var x=a;a=S.pop(),!e.compositeRule&&d?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 S,k=m;if(k)for(var R=-1,O=k.length-1;R<O;)C=k[R+=1],R&&(a+=" || "),a+=" ( ( "+(A=c+(I=e.util.getProperty(C)))+" === undefined ",P&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(C)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?C:I)+") ) ";a+=") { ",E="' + "+(j="missing"+s)+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,j,!0):b+" + "+j),(S=S||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+E+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",x=a,a=S.pop(),!e.compositeRule&&d?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(w){var j;h||(a+=" var "+p+" = validate.schema"+o+"; "),E="' + "+(j="schema"+s+"["+(R="i"+s)+"]")+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),h&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+E+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+R+" = 0; "+R+" < "+p+".length; "+R+"++) { if ("+c+"["+p+"["+R+"]] === undefined ",P&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+R+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+E+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(a+=" } ")}else{var $=m;if($)for(var C,F=-1,T=$.length-1;F<T;){C=$[F+=1];var I=e.util.getProperty(C),A=(E=e.util.escapeQuotes(C),c+I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,C,e.opts.jsonPointers)),a+=" if ( "+A+" === undefined ",P&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(C)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+E+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else d&&(a+=" if (true) {");return a}),uniqueItems:hs?us:(hs=1,us=function(e,t,r){var a,s=" ",i=e.level,n=e.dataLevel,o=e.schema[t],l=e.schemaPath+e.util.getProperty(t),d=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(n||""),h="valid"+i,p=e.opts.$data&&o&&o.$data;if(p?(s+=" var schema"+i+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",a="schema"+i):a=o,(o||p)&&!1!==e.opts.uniqueItems){p&&(s+=" var "+h+"; if ("+a+" === false || "+a+" === undefined) "+h+" = true; else if (typeof "+a+" != 'boolean') "+h+" = false; else { "),s+=" var i = "+u+".length , "+h+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+h+" = false; break outer; } } } ";else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ";var v="checkDataType"+(f?"s":"");s+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ",p&&(s+=" } "),s+=" if (!"+h+") { ";var g=g||[];g.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=p?"validate.schema"+l:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var y=s;s=g.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+y+"]); ":s+=" validate.errors = ["+y+"]; return false; ":s+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { ")}else c&&(s+=" if (true) { ");return s}),validate:va()}),t=Yr().toHash;return fs=function(){var r=[{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"]}],a=["type","$comment"];return r.all=t(a),r.types=t(["number","integer","string","array","object","boolean","null"]),r.forEach(function(t){t.rules=t.rules.map(function(t){var s;if("object"==typeof t){var i=Object.keys(t)[0];s=t[i],t=i,s.forEach(function(e){a.push(e),r.all[e]=!0})}return a.push(t),r.all[t]={keyword:t,code:e[t],implements:s}}),r.all.$comment={keyword:"$comment",code:e.$comment},t.type&&(r.types[t.type]=t)}),r.keywords=t(a.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),r.custom={},r}}function js(){if(bs)return _s;bs=1;var e=ma().MissingRef;return _s=function t(r,a,s){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof a&&(s=a,a=void 0);var n=o(r).then(function(){var e=i._addSchema(r,void 0,a);return e.validate||l(e)});s&&n.then(function(e){s(null,e)},s);return n;function o(e){var r=e.$schema;return r&&!i.getSchema(r)?t.call(i,{$ref:r},!0):Promise.resolve()}function l(t){try{return i._compile(t)}catch(r){if(r instanceof e)return function(e){var r=e.missingSchema;if(d(r))throw new Error("Schema "+r+" is loaded but "+e.missingRef+" cannot be resolved");var s=i._loadingSchemas[r];s||(s=i._loadingSchemas[r]=i._opts.loadSchema(r)).then(n,n);return s.then(function(e){if(!d(r))return o(e).then(function(){d(r)||i.addSchema(e,r,void 0,a)})}).then(function(){return l(t)});function n(){delete i._loadingSchemas[r]}function d(e){return i._refs[e]||i._schemas[e]}}(r);throw r}}},_s}const $s={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Cs,Fs,Ts,Is;function As(){if(Is)return Ts;Is=1;var e=/^[a-z_$][a-z0-9_$-]*$/i,t=Ps?ws:(Ps=1,ws=function(e,t,r){var a,s,i=" ",n=e.level,o=e.dataLevel,l=e.schema[t],d=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),p="valid"+n,m="errs__"+n,f=e.opts.$data&&l&&l.$data;f?(i+=" var schema"+n+" = "+e.util.getData(l.$data,o,e.dataPathArr)+"; ",s="schema"+n):s=l;var v,g,y,_,b,w=this,P="definition"+n,E=w.definition,x="";if(f&&E.$data){b="keywordValidate"+n;var S=E.validateSchema;i+=" var "+P+" = RULES.custom['"+t+"'].definition; var "+b+" = "+P+".validate;"}else{if(!(_=e.useCustomRule(w,l,e.schema,e)))return;s="validate.schema"+d,b=_.code,v=E.compile,g=E.inline,y=E.macro}var k=b+".errors",R="i"+n,O="ruleErr"+n,j=E.async;if(j&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(i+=k+" = null;"),i+="var "+m+" = errors;var "+p+";",f&&E.$data&&(x+="}",i+=" if ("+s+" === undefined) { "+p+" = true; } else { ",S&&(x+="}",i+=" "+p+" = "+P+".validateSchema("+s+"); if ("+p+") { ")),g)E.statements?i+=" "+_.validate+" ":i+=" "+p+" = "+_.validate+"; ";else if(y){var $=e.util.copy(e);x="",$.level++;var C="valid"+$.level;$.schema=_.validate,$.schemaPath="";var F=e.compositeRule;e.compositeRule=$.compositeRule=!0;var T=e.validate($).replace(/validate\.schema/g,b);e.compositeRule=$.compositeRule=F,i+=" "+T}else{(N=N||[]).push(i),i="",i+=" "+b+".call( ",e.opts.passContext?i+="this":i+="self",v||!1===E.schema?i+=" , "+h+" ":i+=" , "+s+" , "+h+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);var I=o?"data"+(o-1||""):"parentData",A=o?e.dataPathArr[o]:"parentDataProperty",D=i+=" , "+I+" , "+A+" , rootData ) ";i=N.pop(),!1===E.errors?(i+=" "+p+" = ",j&&(i+="await "),i+=D+"; "):i+=j?" var "+(k="customErrors"+n)+" = null; try { "+p+" = await "+D+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+k+" = e.errors; else throw e; } ":" "+k+" = null; "+p+" = "+D+"; "}if(E.modifying&&(i+=" if ("+I+") "+h+" = "+I+"["+A+"];"),i+=""+x,E.valid)u&&(i+=" if (true) { ");else{var N;i+=" if ( ",void 0===E.valid?(i+=" !",i+=y?""+C:""+p):i+=" "+!E.valid+" ",i+=") { ",a=w.keyword,(N=N||[]).push(i),i="",(N=N||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+w.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+w.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var q=i;i=N.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var L=i;i=N.pop(),g?E.errors?"full"!=E.errors&&(i+=" for (var "+R+"="+m+"; "+R+"<errors; "+R+"++) { var "+O+" = vErrors["+R+"]; if ("+O+".dataPath === undefined) "+O+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+O+".schemaPath === undefined) { "+O+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(i+=" "+O+".schema = "+s+"; "+O+".data = "+h+"; "),i+=" } "):!1===E.errors?i+=" "+L+" ":(i+=" if ("+m+" == errors) { "+L+" } else { for (var "+R+"="+m+"; "+R+"<errors; "+R+"++) { var "+O+" = vErrors["+R+"]; if ("+O+".dataPath === undefined) "+O+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+O+".schemaPath === undefined) { "+O+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(i+=" "+O+".schema = "+s+"; "+O+".data = "+h+"; "),i+=" } } "):y?(i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+w.keyword+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should pass \""+w.keyword+"\" keyword validation' "),e.opts.verbose&&(i+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===E.errors?i+=" "+L+" ":(i+=" if (Array.isArray("+k+")) { if (vErrors === null) vErrors = "+k+"; else vErrors = vErrors.concat("+k+"); errors = vErrors.length; for (var "+R+"="+m+"; "+R+"<errors; "+R+"++) { var "+O+" = vErrors["+R+"]; if ("+O+".dataPath === undefined) "+O+".dataPath = (dataPath || '') + "+e.errorPath+"; "+O+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(i+=" "+O+".schema = "+s+"; "+O+".data = "+h+"; "),i+=" } } else { "+L+" } "),i+=" } ",u&&(i+=" else { ")}return i}),r=function(){if(Fs)return Cs;Fs=1;var e=$s;return Cs={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:e.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:e.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"}]}}}}();return Ts={add:function(r,a){var s=this.RULES;if(s.keywords[r])throw new Error("Keyword "+r+" is already defined");if(!e.test(r))throw new Error("Keyword "+r+" is not a valid identifier");if(a){this.validateKeyword(a,!0);var i=a.type;if(Array.isArray(i))for(var n=0;n<i.length;n++)l(r,i[n],a);else l(r,i,a);var o=a.metaSchema;o&&(a.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),a.validateSchema=this.compile(o,!0))}function l(e,r,a){for(var i,n=0;n<s.length;n++){var o=s[n];if(o.type==r){i=o;break}}i||(i={type:r,rules:[]},s.push(i));var l={keyword:e,definition:a,custom:!0,code:t,implements:a.implements};i.rules.push(l),s.custom[e]=l}return s.keywords[r]=s.all[r]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var a=t[r].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}return this},validate:function e(t,a){e.errors=null;var s=this._validateKeyword=this._validateKeyword||this.compile(r,!0);if(s(t))return!0;if(e.errors=s.errors,a)throw new Error("custom keyword definition is invalid: "+this.errorsText(s.errors));return!1}},Ts}const Ds={$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:!1};var Ns,qs;var Ls=function(){if(qs)return Ns;qs=1;var e=ga(),t=pa(),r=function(){if(ya)return Es.exports;ya=1;var e=Es.exports=function(){this._cache={}};return e.prototype.put=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.del=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}},Es.exports}(),a=Xr(),s=fa(),i=function(){if(ba)return _a;ba=1;var e=Yr(),t=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,s=/^(?=.{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,i=/^(?:[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,n=/^(?:(?:[^\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,o=/^(?:(?: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,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,c=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,u=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function h(t){return t="full"==t?"full":"fast",e.copy(h[t])}function p(e){var a=e.match(t);if(!a)return!1;var s=+a[1],i=+a[2],n=+a[3];return i>=1&&i<=12&&n>=1&&n<=(2==i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(s)?29:r[i])}function m(e,t){var r=e.match(a);if(!r)return!1;var s=r[1],i=r[2],n=r[3],o=r[5];return(s<=23&&i<=59&&n<=59||23==s&&59==i&&60==n)&&(!t||o)}_a=h,h.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":n,url:o,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:y,uuid:l,"json-pointer":d,"json-pointer-uri-fragment":c,"relative-json-pointer":u},h.full={date:p,time:m,"date-time":function(e){var t=e.split(f);return 2==t.length&&p(t[0])&&m(t[1],!0)},uri:function(e){return v.test(e)&&i.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":n,url:o,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:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:y,uuid:l,"json-pointer":d,"json-pointer-uri-fragment":c,"relative-json-pointer":u};var f=/t|\s/i,v=/\/|:/,g=/[^\\]\\Z/;function y(e){if(g.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}return _a}(),n=Os(),o=function(){if(ys)return gs;ys=1;var e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return gs=function(t,r){for(var a=0;a<r.length;a++){t=JSON.parse(JSON.stringify(t));var s,i=r[a].split("/"),n=t;for(s=1;s<i.length;s++)n=n[i[s]];for(s=0;s<e.length;s++){var o=e[s],l=n[o];l&&(n[o]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}}(),l=Yr();Ns=m,m.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);r=a.validate||this._compile(a)}var s=r(t);!0!==r.$async&&(this.errors=r.errors);return s},m.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},m.prototype.addSchema=function(e,r,a,s){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,a,s);return this}var n=this._getId(e);if(void 0!==n&&"string"!=typeof n)throw new Error("schema id must be string");return b(this,r=t.normalizeId(r||n)),this._schemas[r]=this._addSchema(e,a,s,!0),this},m.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},m.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(u)?u:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(r,e);if(!a&&t){var s="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(s);this.logger.error(s)}return a},m.prototype.getSchema=function(r){var s=f(this,r);switch(typeof s){case"object":return s.validate||this._compile(s);case"string":return this.getSchema(s);case"undefined":return function(r,s){var i=t.schema.call(r,{schema:{}},s);if(i){var n=i.schema,o=i.root,l=i.baseId,d=e.call(r,n,o,void 0,l);return r._fragments[s]=new a({ref:s,fragment:!0,schema:n,root:o,baseId:l,validate:d}),d}}(this,r)}},m.prototype.removeSchema=function(e){if(e instanceof RegExp)return v(this,this._schemas,e),v(this,this._refs,e),this;switch(typeof e){case"undefined":return v(this,this._schemas),v(this,this._refs),this._cache.clear(),this;case"string":var r=f(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var a=this._opts.serialize,s=a?a(e):e;this._cache.del(s);var i=this._getId(e);i&&(i=t.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},m.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},m.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,a=void 0===t.dataVar?"data":t.dataVar,s="",i=0;i<e.length;i++){var n=e[i];n&&(s+=a+n.dataPath+" "+n.message+r)}return s.slice(0,-r.length)},m.prototype._addSchema=function(e,r,s,i){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var n=this._opts.serialize,o=n?n(e):e,l=this._cache.get(o);if(l)return l;i=i||!1!==this._opts.addUsedSchema;var d=t.normalizeId(this._getId(e));d&&i&&b(this,d);var c,u=!1!==this._opts.validateSchema&&!r;u&&!(c=d&&d==t.normalizeId(e.$schema))&&this.validateSchema(e,!0);var h=t.ids.call(this,e),p=new a({id:d,schema:e,localRefs:h,cacheKey:o,meta:s});"#"!=d[0]&&i&&(this._refs[d]=p);this._cache.put(o,p),u&&c&&this.validateSchema(e,!0);return p},m.prototype._compile=function(t,r){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=r||i,!0===t.schema.$async&&(i.$async=!0),i;var a,s;t.compiling=!0,t.meta&&(a=this._opts,this._opts=this._metaOpts);try{s=e.call(this,t.schema,r,t.localRefs)}catch(n){throw delete t.validate,n}finally{t.compiling=!1,t.meta&&(this._opts=a)}return t.validate=s,t.refs=s.refs,t.refVal=s.refVal,t.root=s.root,s;function i(){var e=t.validate,r=e.apply(this,arguments);return i.errors=e.errors,r}},m.prototype.compileAsync=js();var d=As();m.prototype.addKeyword=d.add,m.prototype.getKeyword=d.get,m.prototype.removeKeyword=d.remove,m.prototype.validateKeyword=d.validate;var c=ma();m.ValidationError=c.Validation,m.MissingRefError=c.MissingRef,m.$dataMetaSchema=o;var u="http://json-schema.org/draft-07/schema",h=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],p=["/properties"];function m(e){if(!(this instanceof m))return new m(e);e=this._opts=l.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:w,warn:w,error:w};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=i(e.format),this._cache=e.cache||new r,this._loadingSchemas={},this._compilations=[],this.RULES=n(),this._getId=function(e){switch(e.schemaId){case"auto":return _;case"id":return g;default:return y}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=s),this._metaOpts=function(e){for(var t=l.copy(e._opts),r=0;r<h.length;r++)delete t[h[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=Ds,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=$s;e._opts.$data&&(r=o(r,p));e.addMetaSchema(r,u,!0),e._refs["http://json-schema.org/schema"]=u}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function f(e,r){return r=t.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function v(e,t,r){for(var a in t){var s=t[a];s.meta||r&&!r.test(a)||(e._cache.del(s.cacheKey),delete t[a])}}function g(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function y(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function _(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function b(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function w(){}return Ns}();const Zs=t.getDefaultExportFromCjs(Ls);exports.CallToolRequestSchema=gr,exports.DEFAULT_NEGOTIATED_PROTOCOL_VERSION="2025-03-26",exports.InitializeRequestSchema=Ot,exports.JSONRPCMessageSchema=Pt,exports.ListToolsRequestSchema=mr,exports.MCP_TOOL_SCHEMAS={htmlToMarkdown:{type:"object",properties:{url:{type:"string",description:"URL of the web page to convert (e.g., https://example.com). Handles JavaScript-rendered dynamic content effectively."},html_content:{type:"string",description:"HTML string to convert directly. Use instead of URL for local files or API response HTML content."},locale:{type:"string",description:"Browser locale setting. Use 'ja-JP' for Japanese sites, 'en-US' for English sites. Affects content rendering and language detection.",enum:["en-US","ja-JP"],default:"en-US"}},anyOf:[{required:["url"]},{required:["html_content"]}]},saveContentToFile:{type:"object",properties:{content:{type:"string",description:"Text content to save to file. Will be saved as Markdown format."},save_path:{type:"string",description:"Complete file path including filename to save content (e.g., '/home/user/output.md'). Cannot be used with save_directory."},save_directory:{type:"string",description:"Directory path to save content with auto-generated filename (e.g., '/home/user/downloads'). Cannot be used with save_path."},filename:{type:"string",description:"Base filename to use when save_directory is specified (e.g., 'my-document'). Extension .md will be added automatically."}},required:["content"],anyOf:[{required:["save_path"]},{required:["save_directory"]}]},urlToMarkdownFile:{type:"object",properties:{url:{type:"string",description:"URL of the web page to convert and save as Markdown file (e.g., https://example.com). Handles JavaScript-rendered dynamic content effectively."},html_content:{type:"string",description:"HTML string to convert directly and save as Markdown file. Use instead of URL for local files or API response HTML content."},locale:{type:"string",description:"Browser locale setting. Use 'ja-JP' for Japanese sites, 'en-US' for English sites. Affects content rendering and language detection.",enum:["en-US","ja-JP"],default:"en-US"},save_path:{type:"string",description:"Complete file path including filename to save the converted Markdown content (e.g., '/home/user/output.md'). Cannot be used with save_directory."},save_directory:{type:"string",description:"Directory path to save the converted Markdown content with auto-generated filename (e.g., '/home/user/downloads'). Cannot be used with save_path."},filename:{type:"string",description:"Base filename to use when save_directory is specified (e.g., 'my-document'). Extension .md will be added automatically."}},anyOf:[{required:["url","save_path"]},{required:["url","save_directory"]},{required:["html_content","save_path"]},{required:["html_content","save_directory"]}]}},exports.SUPPORTED_PROTOCOL_VERSIONS=rt,exports.Server=class extends Lr{constructor(e,t){var r;super(t),this._serverInfo=e,this._capabilities=null!==(r=null==t?void 0:t.capabilities)&&void 0!==r?r:{},this._instructions=null==t?void 0:t.instructions,this.setRequestHandler(Ot,e=>this._oninitialize(e)),this.setNotificationHandler(Ct,()=>{var e;return null===(e=this.oninitialized)||void 0===e?void 0:e.call(this)})}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");var t,r;this._capabilities=(t=this._capabilities,r=e,Object.entries(r).reduce((e,[t,r])=>(e[t]=r&&"object"==typeof r&&e[t]?{...e[t],...r}:r,e),{...t}))}assertCapabilityForMethod(e){var t,r,a;switch(e){case"sampling/createMessage":if(!(null===(t=this._clientCapabilities)||void 0===t?void 0:t.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!(null===(r=this._clientCapabilities)||void 0===r?void 0:r.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!(null===(a=this._clientCapabilities)||void 0===a?void 0:a.roots))throw new Error(`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Server does not support sampling (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`)}}async _oninitialize(e){const t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;return{protocolVersion:rt.includes(t)?t:tt,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Et)}async createMessage(e,t){return this.request({method:"sampling/createMessage",params:e},kr,t)}async elicitInput(e,t){const r=await this.request({method:"elicitation/create",params:e},jr,t);if("accept"===r.action&&r.content)try{const t=new Zs,a=t.compile(e.requestedSchema);if(!a(r.content))throw new qr(yt.InvalidParams,`Elicitation response content does not match requested schema: ${t.errorsText(a.errors)}`)}catch(a){if(a instanceof qr)throw a;throw new qr(yt.InternalError,`Error validating elicitation response: ${a}`)}return r}async listRoots(e,t){return this.request({method:"roots/list",params:e},Dr,t)}async sendLoggingMessage(e){return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},exports.createErrorResult=function(e){return{content:[{type:"text",text:`Error: ${e instanceof Error?e.message:String(e)}`}],isError:!0}},exports.createSuccessResult=function(e){return{content:[{type:"text",text:e}],isError:!1}},exports.getPackageVersion=()=>{try{const e=n.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(e).href:c&&"SCRIPT"===c.tagName.toUpperCase()&&c.src||new URL("version-BsWiDlbg.cjs",document.baseURI).href),t=i.dirname(e),r=i.resolve(t,"../package.json");return JSON.parse(s.readFileSync(r,"utf-8")).version||"0.0.0"}catch(e){return"0.0.0"}},exports.isInitializeRequest=e=>Ot.safeParse(e).success,exports.isJSONRPCError=wt,exports.isJSONRPCRequest=mt,exports.isJSONRPCResponse=gt,exports.parseHtmlToMarkdownArgs=function(e){if(!e||"object"!=typeof e)throw new Error("Arguments are required");const{url:t,html_content:r,locale:a="en-US"}=e;if(!t&&!r)throw new Error("Either 'url' or 'html_content' is required");if(t&&"string"!=typeof t)throw new Error("'url' must be a string");if(r&&"string"!=typeof r)throw new Error("'html_content' must be a string");if(a&&!["en-US","ja-JP"].includes(a))throw new Error("'locale' must be 'en-US' or 'ja-JP'");return{url:t,html_content:r,locale:a}},exports.parseSaveContentArgs=function(e){if(!e||"object"!=typeof e)throw new Error("Arguments are required");const{content:t,save_path:r,save_directory:a,filename:s}=e;if(!t||"string"!=typeof t)throw new Error("'content' is required and must be a string");if(!r&&!a)throw new Error("Either 'save_path' or 'save_directory' is required");if(r&&"string"!=typeof r)throw new Error("'save_path' must be a string");if(a&&"string"!=typeof a)throw new Error("'save_directory' must be a string");if(s&&"string"!=typeof s)throw new Error("'filename' must be a string");if(r&&a)throw new Error("Cannot specify both 'save_path' and 'save_directory'");return{content:t,save_path:r,save_directory:a,filename:s}},exports.parseUrlToMarkdownFileArgs=function(e){if(!e||"object"!=typeof e)throw new Error("Arguments are required");const{url:t,html_content:r,locale:a="en-US",save_path:s,save_directory:i,filename:n}=e;if(!t&&!r)throw new Error("Either 'url' or 'html_content' is required");if(t&&"string"!=typeof t)throw new Error("'url' must be a string");if(r&&"string"!=typeof r)throw new Error("'html_content' must be a string");if(a&&!["en-US","ja-JP"].includes(a))throw new Error("'locale' must be 'en-US' or 'ja-JP'");if(!s&&!i)throw new Error("Either 'save_path' or 'save_directory' is required");if(s&&"string"!=typeof s)throw new Error("'save_path' must be a string");if(i&&"string"!=typeof i)throw new Error("'save_directory' must be a string");if(n&&"string"!=typeof n)throw new Error("'filename' must be a string");if(s&&i)throw new Error("Cannot specify both 'save_path' and 'save_directory'");return{url:t,html_content:r,locale:a,save_path:s,save_directory:i,filename:n}},exports.saveContentToFile=async function(e,t,s,i){let n;if(t)n=a.resolve(t);else{if(!s)throw new Error("Either save_path or save_directory must be specified");{const e=i||"page",t=".md";n=a.resolve(s,`${e}${t}`)}}return await r.promises.mkdir(a.dirname(n),{recursive:!0}),await r.promises.writeFile(n,e,"utf-8"),n};
|