apiuikit 1.5.2 → 1.5.3

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.
@@ -0,0 +1,139 @@
1
+ "use strict";var Ml=Object.defineProperty;var ql=(t,e,r)=>e in t?Ml(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var We=(t,e,r)=>ql(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Mn=require("./index-Ck1kBVJJ.cjs");function qn(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function pt(t,e,r=[]){const n={};for(const[s,i]of Object.entries(t)){const o=[...r,s];if(Array.isArray(i)){n[s]=i.map((a,f)=>typeof a=="object"&&!Array.isArray(a)&&a!==null?pt(a,e,[...o,f.toString()]):a);continue}if(typeof i=="object"&&i!==null){n[s]=pt(i,e,o);continue}n[s]=i}return e(n,r)}const Ye="application/json";function Ca(t){const e=t["x-example"],r=t["x-examples"];return delete t["x-example"],delete t["x-examples"],{xExample:e,xExamples:r}}function mt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length>0}function Dl(t){return mt(t)&&Object.values(t).every(e=>typeof e=="object"&&e!==null&&!Array.isArray(e))}function Ll(t){if(typeof t!="object"||t===null)return!0;const e=t,r=["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"];return!(e.allOf||e.oneOf||e.anyOf||e.items||e.$ref||"additionalProperties"in e||r.some(n=>n in e)||typeof e.properties=="object"&&e.properties!==null&&Object.keys(e.properties).length>0)}function Ro(t){const e=Object.keys(t);if(e.some(n=>{const s=t[n];return(s==null?void 0:s.example)!==void 0||(s==null?void 0:s.examples)!==void 0}))for(const n of e){const s=t[n];if(!s)continue;const i=s.example!==void 0||s.examples!==void 0;s.schema!==void 0&&!i&&Object.keys(s).length===1&&Ll(s.schema)&&delete t[n]}}const Vl=new Set(["summary","description","value","externalValue"]);function Ma(t){if(typeof t!="object"||t===null)return!1;const e=t,r="value"in e||"externalValue"in e,n=Object.keys(e).every(s=>Vl.has(s));return r&&n}function Dt(t){return Ma(t)?t:{value:t}}const Ul=/^[a-zA-Z0-9*+.-]+\/[a-zA-Z0-9*+.+-]+$/;function As(t){return Ul.test(t)}function Fl(t){return Object.entries(t).reduce((e,[r,n])=>(e[r]={value:n},e),{})}const zl=t=>{switch(t){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return t}};function qa(t){var r,n,s;let e=t;if(e!==null&&typeof e=="object"&&typeof e.swagger=="string"&&((r=e.swagger)!=null&&r.startsWith("2.0")))e.openapi="3.0.4",delete e.swagger;else return e;if(e.host){const i=Array.isArray(e.schemes)&&((n=e.schemes)!=null&&n.length)?e.schemes:["http"];e.servers=i.map(o=>({url:`${o}://${e.host}${e.basePath??""}`})),delete e.basePath,delete e.schemes,delete e.host}else e.basePath&&(e.servers=[{url:e.basePath}],delete e.basePath);if(e.definitions&&(e.components=Object.assign({},e.components,{schemas:e.definitions}),delete e.definitions,e=pt(e,i=>(typeof i.$ref=="string"&&i.$ref.startsWith("#/definitions/")&&(i.$ref=i.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),i))),e=pt(e,i=>(i.type==="file"&&(i.type="string",i.format="binary"),i)),Object.hasOwn(e,"parameters")){e=pt(e,f=>{if(typeof f.$ref=="string"&&f.$ref.startsWith("#/parameters/")){const c=f.$ref.split("/")[2];if(!c)return f;const u=e.parameters&&typeof e.parameters=="object"&&c in e.parameters?e.parameters[c]:void 0;u&&typeof u=="object"&&"in"in u&&(u.in==="body"||u.in==="formData")?f.$ref=f.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):f.$ref=f.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return f}),e.components??(e.components={});const i={},o={},a=e.parameters&&typeof e.parameters=="object"?e.parameters:{};for(const[f,c]of Object.entries(a))if(c&&typeof c=="object"){if("$ref"in c){const u=Ts(c);i[f]=u}else if("in"in c)if(c.in==="body")o[f]=La(c,e.consumes??[Ye]);else if(c.in==="formData")o[f]=Va([c],e.consumes);else{const u=Ts(c);i[f]=u}}Object.keys(i).length>0&&(e.components.parameters=i),Object.keys(o).length>0&&(e.components.requestBodies=o),delete e.parameters}if(Object.hasOwn(e,"responses")&&typeof e.responses=="object"&&e.responses!==null){e=pt(e,a=>(typeof a.$ref=="string"&&a.$ref.startsWith("#/responses/")&&(a.$ref=a.$ref.replace(/^#\/responses\//,"#/components/responses/")),a)),e.components??(e.components={});const i={},o=e.responses;for(const[a,f]of Object.entries(o))if(f&&typeof f=="object")if("$ref"in f)i[a]=f;else{const c=f,u=e.produces??[Ye];if(c.schema){typeof c.content!="object"&&(c.content={});for(const l of u)c.content[l]={schema:c.schema};delete c.schema}if(c.examples&&typeof c.examples=="object"){typeof c.content!="object"&&(c.content={});const l=u[0]??Ye;for(const[d,p]of Object.entries(c.examples))if(As(d))typeof c.content[d]!="object"&&(c.content[d]={}),c.content[d].example=p;else{typeof c.content[l]!="object"&&(c.content[l]={});const h=c.content[l];typeof h.examples!="object"&&(h.examples={}),h.examples[d]=Dt(p)}delete c.examples}c.content&&typeof c.content=="object"&&Ro(c.content),c.headers&&typeof c.headers=="object"&&(c.headers=Object.entries(c.headers).reduce((l,[d,p])=>p&&typeof p=="object"?{[d]:xo(p),...l}:l,{})),i[a]=c}Object.keys(i).length>0&&(e.components.responses=i),delete e.responses}if(typeof e.paths=="object"){for(const i in e.paths)if(Object.hasOwn(e.paths,i)){const o=e.paths&&typeof e.paths=="object"&&i in e.paths?e.paths[i]:void 0;if(!o||typeof o!="object")continue;let a;for(const f in o)if(f==="parameters"&&Object.hasOwn(o,f)){const c=Mo(o.parameters,e.consumes??[Ye]);o.parameters=c.parameters,a=c.requestBody}else if(Object.hasOwn(o,f)){const c=o[f];if(a&&(c.requestBody=a),c.parameters){const u=Mo(c.parameters,c.consumes??e.consumes??[Ye]);c.parameters=u.parameters,u.requestBody&&(c.requestBody=u.requestBody)}if(delete c.consumes,c.responses){for(const u in c.responses)if(Object.hasOwn(c.responses,u)){const l=c.responses[u];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((d,[p,h])=>h&&typeof h=="object"?{[p]:xo(h),...d}:d,{})),l.schema){const d=e.produces??c.produces??[Ye];typeof l.content!="object"&&(l.content={});for(const p of d)l.content[p]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});const p=(e.produces??c.produces??[Ye])[0]??Ye;for(const[h,g]of Object.entries(l.examples))if(As(h))typeof l.content[h]!="object"&&(l.content[h]={}),l.content[h].example=g;else{typeof l.content[p]!="object"&&(l.content[p]={});const m=l.content[p];typeof m.examples!="object"&&(m.examples={}),m.examples[h]=Dt(g)}delete l.examples}l.content&&typeof l.content=="object"&&Ro(l.content)}}delete c.produces,((s=c.parameters)==null?void 0:s.length)===0&&delete c.parameters}}}if(e.securityDefinitions){(typeof e.components!="object"||e.components===null)&&(e.components={}),e.components&&typeof e.components=="object"&&Object.assign(e.components,{securitySchemes:{}});for(const[i,o]of Object.entries(e.securityDefinitions))if(typeof o=="object")if("type"in o&&o.type==="oauth2"){const{flow:a,authorizationUrl:f,tokenUrl:c,scopes:u}=o;e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:{type:"oauth2",flows:{[zl(a||"implicit")]:Object.assign({},f&&{authorizationUrl:f},c&&{tokenUrl:c},u&&{scopes:u})}}})}else"type"in o&&o.type==="basic"?e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:{type:"http",scheme:"basic"}}):e.components&&typeof e.components=="object"&&"securitySchemes"in e.components&&e.components.securitySchemes&&Object.assign(e.components.securitySchemes,{[i]:o});delete e.securityDefinitions}return delete e.consumes,delete e.produces,e}function Da(t){return["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf"].reduce((r,n)=>(Object.hasOwn(t,n)&&(r[n]=t[n],delete t[n]),r),{})}function Kl(t){if(t==="formData")throw new Error("Encountered a formData parameter which should have been filtered out by the caller");if(t==="body")throw new Error("Encountered a body parameter which should have been filtered out by the caller");return t}function Ts(t){if(Object.hasOwn(t,"$ref")&&typeof t.$ref=="string")return{$ref:t.$ref};const e=Hl(t),r=Da(t),{xExample:n,xExamples:s}=Ca(t);if(mt(n)?t.examples=Fl(n):mt(s)&&(t.examples=Object.entries(s).reduce((i,[o,a])=>(i[o]=Dt(a),i),{})),delete t.collectionFormat,delete t.default,!t.in)throw new Error('Parameter object must have an "in" property');return{schema:r,...e,...t,in:Kl(t.in)}}function xo(t){if(Object.hasOwn(t,"$ref")&&typeof t.$ref=="string")return{$ref:t.$ref};const e=Da(t);return{...t,schema:e}}const Bl={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Co={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},ms={header:Co,query:Bl,path:Co};function Hl(t){if(t.type!=="array"||!(t.in==="query"||t.in==="path"||t.in==="header"))return{};const e=t.collectionFormat??"csv";return t.in in ms&&e in ms[t.in]?ms[t.in][e]:{}}function La(t,e){const{xExample:r,xExamples:n}=Ca(t);delete t.name,delete t.in;const{schema:s,...i}=t,o={content:{},...i};if(o.content)for(const a of e){if(o.content[a]={schema:s},mt(n)&&a in n){const f=n[a];mt(f)&&Object.values(f).every(u=>Ma(u))?o.content[a].examples=f:Dl(f)?o.content[a].examples=Object.entries(f).reduce((u,[l,d])=>(u[l]=Dt(d),u),{}):o.content[a].examples={default:Dt(f)}}else mt(n)&&!Object.keys(n).some(As)&&(o.content[a].examples=Object.entries(n).reduce((f,[c,u])=>(f[c]=Dt(u),f),{}));!o.content[a].examples&&mt(r)&&a in r&&(o.content[a].example=r[a])}return o}function Va(t,e=["multipart/form-data"]){var i;const r={content:{}},n=e.filter(o=>o==="multipart/form-data"||o==="application/x-www-form-urlencoded"),s=n.length>0?n:["multipart/form-data"];if(r.content)for(const o of s){r.content[o]={schema:{type:"object",properties:{},required:[]}};const a=(i=r.content)==null?void 0:i[o];if(a!=null&&a.schema&&typeof a.schema=="object"&&"properties"in a.schema)for(const f of t)f.name&&a.schema.properties&&(a.schema.properties[f.name]={type:f.type,description:f.description,...f.format?{format:f.format}:{}},f.required&&Array.isArray(a.schema.required)&&a.schema.required.push(f.name))}return r}function Mo(t,e){const r={parameters:t.filter(i=>!(i.in==="body"||i.in==="formData")).map(i=>Ts(i))},n=structuredClone(t.find(i=>i.in==="body")??{});n&&Object.keys(n).length&&(r.requestBody=La(n,e));const s=t.filter(i=>i.in==="formData");if(s.length>0){const i=Va(s,e);typeof r.requestBody!="object"?r.requestBody=i:r.requestBody={...r.requestBody,content:{...r.requestBody.content,...i.content}},typeof r.requestBody!="object"&&(r.requestBody={content:{}})}return r}const Jl=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema"]);function Gl(t){return t?!!(t.some(e=>Jl.has(e))||t.some(e=>e.endsWith("Schema"))||t.length>=2&&t[0]==="components"&&t[1]==="schemas"):!1}function Ua(t){let e=t;return e===null||typeof e.openapi!="string"||!e.openapi.startsWith("3.0")||(e.openapi="3.1.1",e=pt(e,Wl)),e}const Wl=(t,e)=>{t.type!==void 0&&t.nullable===!0&&(t.type=[t.type,"null"],delete t.nullable),t.exclusiveMinimum===!0?(t.exclusiveMinimum=t.minimum,delete t.minimum):t.exclusiveMinimum===!1&&delete t.exclusiveMinimum,t.exclusiveMaximum===!0?(t.exclusiveMaximum=t.maximum,delete t.maximum):t.exclusiveMaximum===!1&&delete t.exclusiveMaximum;const r=e==null?void 0:e.some((i,o)=>i==="examples"&&o>0?e[o-1]!=="properties":!1);if(t.example!==void 0&&!r&&(Gl(e)?t.examples=[t.example]:t.examples={default:{value:t.example}},delete t.example),t.type==="object"&&t.properties!==void 0){const i=e==null?void 0:e.slice(0,-1);if((i==null?void 0:i.some((a,f)=>a==="content"&&(e==null?void 0:e[f+1])==="multipart/form-data"))&&t.properties!==null)for(const a of Object.values(t.properties))typeof a=="object"&&a!==null&&"type"in a&&"format"in a&&a.type==="string"&&a.format==="binary"&&(a.contentMediaType="application/octet-stream",delete a.format)}if(e!=null&&e.includes("content")&&(e!=null&&e.includes("application/octet-stream")))return{};const{format:n,...s}=t;if(t.type==="string"){if(t.format==="binary")return{...s,type:"string",contentMediaType:"application/octet-stream"};if(t.format==="base64")return{...s,type:"string",contentEncoding:"base64"};if(t.format==="byte"){const i=e==null?void 0:e.slice(0,-1),o=i==null?void 0:i.find((a,f)=>(e==null?void 0:e[f-1])==="content");return{...s,type:"string",contentEncoding:"base64",contentMediaType:o}}}return t["x-webhooks"]!==void 0&&(t.webhooks=t["x-webhooks"],delete t["x-webhooks"]),t},Gt=t=>{if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},Yl={title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:!0},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},termsOfService:{type:"string",description:"The terms of service for the API."},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:!1,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:!1,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},paths:{type:"object",description:"Relative paths to the individual endpoints. They must be relative to the 'basePath'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^/":{oneOf:[{$ref:"#/definitions/pathItem"},{$ref:"#/definitions/jsonReference"}]}},additionalProperties:!1},definitions:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"One or more JSON objects describing the schemas being consumed and produced by the API."},parameterDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"One or more JSON representations for parameters"},responseDefinitions:{type:"object",additionalProperties:{$ref:"#/definitions/response"},description:"One or more JSON representations for responses"},externalDocs:{type:"object",additionalProperties:!1,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},examples:{type:"object",additionalProperties:!0},mimeType:{type:"string",description:"The MIME type of the HTTP message."},operation:{type:"object",required:["responses"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{tags:{type:"array",items:{type:"string"},uniqueItems:!0},summary:{type:"string",description:"A brief summary of the operation."},description:{type:"string",description:"A longer description of the operation, GitHub Flavored Markdown is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string",description:"A unique identifier of the operation."},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},consumes:{description:"A list of MIME types the API can consume.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},parameters:{$ref:"#/definitions/parametersList"},responses:{$ref:"#/definitions/responses"},schemes:{$ref:"#/definitions/schemesList"},deprecated:{type:"boolean",default:!1},security:{$ref:"#/definitions/security"}}},pathItem:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},get:{$ref:"#/definitions/operation"},put:{$ref:"#/definitions/operation"},post:{$ref:"#/definitions/operation"},delete:{$ref:"#/definitions/operation"},options:{$ref:"#/definitions/operation"},head:{$ref:"#/definitions/operation"},patch:{$ref:"#/definitions/operation"},parameters:{$ref:"#/definitions/parametersList"}}},responses:{type:"object",description:"Response objects names can either be any valid HTTP status code or 'default'.",minProperties:1,additionalProperties:!1,patternProperties:{"^([0-9]{3})$|^(default)$":{$ref:"#/definitions/responseValue"},"^x-":{$ref:"#/definitions/vendorExtension"}},not:{type:"object",additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}}},responseValue:{oneOf:[{$ref:"#/definitions/response"},{$ref:"#/definitions/jsonReference"}]},response:{type:"object",required:["description"],properties:{description:{type:"string"},schema:{oneOf:[{$ref:"#/definitions/schema"},{$ref:"#/definitions/fileSchema"}]},headers:{$ref:"#/definitions/headers"},examples:{$ref:"#/definitions/examples"}},additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},headers:{type:"object",additionalProperties:{$ref:"#/definitions/header"}},header:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:!0,additionalItems:!0},bodyParameter:{type:"object",required:["name","in","schema"],patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},in:{type:"string",description:"Determines the location of the parameter.",enum:["body"]},required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},schema:{$ref:"#/definitions/schema"}},additionalProperties:!1},headerParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["header"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},queryParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["query"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},formDataParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{required:{type:"boolean",description:"Determines whether or not this parameter is required or optional.",default:!1},in:{type:"string",description:"Determines the location of the parameter.",enum:["formData"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},allowEmptyValue:{type:"boolean",default:!1,description:"allows sending a parameter by name only or with an empty value."},type:{type:"string",enum:["string","number","boolean","integer","array","file"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormatWithMulti"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},pathParameterSubSchema:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["required"],properties:{required:{type:"boolean",enum:[!0],description:"Determines whether or not this parameter is required or optional."},in:{type:"string",description:"Determines the location of the parameter.",enum:["path"]},description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},type:{type:"string",enum:["string","number","boolean","integer","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}}},nonBodyParameter:{type:"object",required:["name","in","type"],oneOf:[{$ref:"#/definitions/headerParameterSubSchema"},{$ref:"#/definitions/formDataParameterSubSchema"},{$ref:"#/definitions/queryParameterSubSchema"},{$ref:"#/definitions/pathParameterSubSchema"}]},parameter:{oneOf:[{$ref:"#/definitions/bodyParameter"},{$ref:"#/definitions/nonBodyParameter"}]},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:!1},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},fileSchema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},required:["type"],properties:{format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},type:{type:"string",enum:["file"]},readOnly:{type:"boolean",default:!1},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:!1},primitivesItems:{type:"object",additionalProperties:!1,properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:{$ref:"#/definitions/primitivesItems"},collectionFormat:{$ref:"#/definitions/collectionFormat"},default:{$ref:"#/definitions/default"},maximum:{$ref:"#/definitions/maximum"},exclusiveMaximum:{$ref:"#/definitions/exclusiveMaximum"},minimum:{$ref:"#/definitions/minimum"},exclusiveMinimum:{$ref:"#/definitions/exclusiveMinimum"},maxLength:{$ref:"#/definitions/maxLength"},minLength:{$ref:"#/definitions/minLength"},pattern:{$ref:"#/definitions/pattern"},maxItems:{$ref:"#/definitions/maxItems"},minItems:{$ref:"#/definitions/minItems"},uniqueItems:{$ref:"#/definitions/uniqueItems"},enum:{$ref:"#/definitions/enum"},multipleOf:{$ref:"#/definitions/multipleOf"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},security:{type:"array",items:{$ref:"#/definitions/securityRequirement"},uniqueItems:!0},securityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:!0}},xml:{type:"object",additionalProperties:!1,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},tag:{type:"object",additionalProperties:!1,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},securityDefinitions:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/basicAuthenticationSecurity"},{$ref:"#/definitions/apiKeySecurity"},{$ref:"#/definitions/oauth2ImplicitSecurity"},{$ref:"#/definitions/oauth2PasswordSecurity"},{$ref:"#/definitions/oauth2ApplicationSecurity"},{$ref:"#/definitions/oauth2AccessCodeSecurity"}]}},basicAuthenticationSecurity:{type:"object",additionalProperties:!1,required:["type"],properties:{type:{type:"string",enum:["basic"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},apiKeySecurity:{type:"object",additionalProperties:!1,required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query"]},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ImplicitSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["implicit"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2PasswordSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["password"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2ApplicationSecurity:{type:"object",additionalProperties:!1,required:["type","flow","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["application"]},scopes:{$ref:"#/definitions/oauth2Scopes"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2AccessCodeSecurity:{type:"object",additionalProperties:!1,required:["type","flow","authorizationUrl","tokenUrl"],properties:{type:{type:"string",enum:["oauth2"]},flow:{type:"string",enum:["accessCode"]},scopes:{$ref:"#/definitions/oauth2Scopes"},authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},description:{type:"string"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},mediaTypeList:{type:"array",items:{$ref:"#/definitions/mimeType"},uniqueItems:!0},parametersList:{type:"array",description:"The parameters needed to send a valid API call.",additionalItems:!1,items:{oneOf:[{$ref:"#/definitions/parameter"},{$ref:"#/definitions/jsonReference"}]},uniqueItems:!0},schemesList:{type:"array",description:"The transfer protocol of the API.",items:{type:"string",enum:["http","https","ws","wss"]},uniqueItems:!0},collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes"],default:"csv"},collectionFormatWithMulti:{type:"string",enum:["csv","ssv","tsv","pipes","multi"],default:"csv"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},jsonReference:{type:"object",required:["$ref"],additionalProperties:!1,properties:{$ref:{type:"string"}}}}},Xl={id:"https://spec.openapis.org/oas/3.0/schema/2021-09-28",$schema:"http://json-schema.org/draft-04/schema#",description:"The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3",type:"object",required:["openapi","info","paths"],properties:{openapi:{type:"string",pattern:"^3\\.0\\.\\d(-.+)?$"},info:{$ref:"#/definitions/Info"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},tags:{type:"array",items:{$ref:"#/definitions/Tag"},uniqueItems:!0},paths:{$ref:"#/definitions/Paths"},components:{$ref:"#/definitions/Components"}},patternProperties:{"^x-":{}},additionalProperties:!1,definitions:{Reference:{type:"object",required:["$ref"],patternProperties:{"^\\$ref$":{type:"string",format:"uri-reference"}}},Info:{type:"object",required:["title","version"],properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/definitions/Contact"},license:{$ref:"#/definitions/License"},version:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Contact:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},patternProperties:{"^x-":{}},additionalProperties:!1},License:{type:"object",required:["name"],properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Server:{type:"object",required:["url"],properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/definitions/ServerVariable"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ServerVariable:{type:"object",required:["default"],properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},Components:{type:"object",properties:{schemas:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}}},responses:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Response"}]}}},parameters:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Parameter"}]}}},examples:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Example"}]}}},requestBodies:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/RequestBody"}]}}},headers:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Header"}]}}},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},links:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Link"}]}}},callbacks:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/Callback"}]}}}},patternProperties:{"^x-":{}},additionalProperties:!1},Schema:{type:"object",properties:{title:{type:"string"},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0,default:0},pattern:{type:"string",format:"regex"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0,default:0},uniqueItems:{type:"boolean",default:!1},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0,default:0},required:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0},enum:{type:"array",items:{},minItems:1,uniqueItems:!1},type:{type:"string",enum:["array","boolean","integer","number","object","string"]},not:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},allOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},oneOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},anyOf:{type:"array",items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},items:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},properties:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]}},additionalProperties:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"},{type:"boolean"}],default:!0},description:{type:"string"},format:{type:"string"},default:{},nullable:{type:"boolean",default:!1},discriminator:{$ref:"#/definitions/Discriminator"},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},example:{},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},deprecated:{type:"boolean",default:!1},xml:{$ref:"#/definitions/XML"}},patternProperties:{"^x-":{}},additionalProperties:!1},Discriminator:{type:"object",required:["propertyName"],properties:{propertyName:{type:"string"},mapping:{type:"object",additionalProperties:{type:"string"}}}},XML:{type:"object",properties:{name:{type:"string"},namespace:{type:"string",format:"uri"},prefix:{type:"string"},attribute:{type:"boolean",default:!1},wrapped:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},Response:{type:"object",required:["description"],properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},links:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Link"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1},MediaType:{type:"object",properties:{schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}},encoding:{type:"object",additionalProperties:{$ref:"#/definitions/Encoding"}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"}]},Example:{type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:{},externalValue:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},Header:{type:"object",properties:{description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string",enum:["simple"],default:"simple"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"}]},Paths:{type:"object",patternProperties:{"^\\/":{$ref:"#/definitions/PathItemOrReference"},"^x-":{}},additionalProperties:!1},PathItem:{type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0}},patternProperties:{"^(get|put|post|delete|options|head|patch|trace)$":{$ref:"#/definitions/Operation"},"^x-":{}},additionalProperties:!1},PathItemOrReference:{oneOf:[{$ref:"#/definitions/PathItem"},{$ref:"#/definitions/Reference"}]},Operation:{type:"object",required:["responses"],properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},operationId:{type:"string"},parameters:{type:"array",items:{oneOf:[{$ref:"#/definitions/Parameter"},{$ref:"#/definitions/Reference"}]},uniqueItems:!0},requestBody:{oneOf:[{$ref:"#/definitions/RequestBody"},{$ref:"#/definitions/Reference"}]},responses:{$ref:"#/definitions/Responses"},callbacks:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Callback"},{$ref:"#/definitions/Reference"}]}},deprecated:{type:"boolean",default:!1},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},servers:{type:"array",items:{$ref:"#/definitions/Server"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Responses:{type:"object",properties:{default:{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]}},patternProperties:{"^[1-5](?:\\d{2}|XX)$":{oneOf:[{$ref:"#/definitions/Response"},{$ref:"#/definitions/Reference"}]},"^x-":{}},minProperties:1,additionalProperties:!1},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},Tag:{type:"object",required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExternalDocumentation:{type:"object",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},patternProperties:{"^x-":{}},additionalProperties:!1},ExampleXORExamples:{description:"Example and examples are mutually exclusive",not:{required:["example","examples"]}},SchemaXORContent:{description:"Schema and content are mutually exclusive, at least one is required",not:{required:["schema","content"]},oneOf:[{required:["schema"]},{required:["content"],description:"Some properties are not allowed if content is present",allOf:[{not:{required:["style"]}},{not:{required:["explode"]}},{not:{required:["allowReserved"]}},{not:{required:["example"]}},{not:{required:["examples"]}}]}]},Parameter:{type:"object",properties:{name:{type:"string"},in:{type:"string"},description:{type:"string"},required:{type:"boolean",default:!1},deprecated:{type:"boolean",default:!1},allowEmptyValue:{type:"boolean",default:!1},style:{type:"string"},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1},schema:{oneOf:[{$ref:"#/definitions/Schema"},{$ref:"#/definitions/Reference"}]},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"},minProperties:1,maxProperties:1},example:{},examples:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Example"},{$ref:"#/definitions/Reference"}]}}},patternProperties:{"^x-":{}},additionalProperties:!1,required:["name","in"],allOf:[{$ref:"#/definitions/ExampleXORExamples"},{$ref:"#/definitions/SchemaXORContent"},{$ref:"#/definitions/ParameterLocation"}]},ParameterLocation:{description:"Parameter location",oneOf:[{description:"Parameter in path",required:["required"],properties:{in:{enum:["path"]},style:{enum:["matrix","label","simple"],default:"simple"},required:{enum:[!0]}}},{description:"Parameter in query",properties:{in:{enum:["query"]},style:{enum:["form","spaceDelimited","pipeDelimited","deepObject"],default:"form"}}},{description:"Parameter in header",properties:{in:{enum:["header"]},style:{enum:["simple"],default:"simple"}}},{description:"Parameter in cookie",properties:{in:{enum:["cookie"]},style:{enum:["form"],default:"form"}}}]},RequestBody:{type:"object",required:["content"],properties:{description:{type:"string"},content:{type:"object",additionalProperties:{$ref:"#/definitions/MediaType"}},required:{type:"boolean",default:!1}},patternProperties:{"^x-":{}},additionalProperties:!1},SecurityScheme:{oneOf:[{$ref:"#/definitions/APIKeySecurityScheme"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/OAuth2SecurityScheme"},{$ref:"#/definitions/OpenIdConnectSecurityScheme"}],discriminator:{propertyName:"type"}},APIKeySecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["apiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},HTTPSecurityScheme:{type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},bearerFormat:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:!1,oneOf:[{description:"Bearer",properties:{scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}},{description:"Non Bearer",not:{required:["bearerFormat"]},properties:{scheme:{not:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}}}}]},OAuth2SecurityScheme:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},flows:{$ref:"#/definitions/OAuthFlows"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OpenIdConnectSecurityScheme:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},openIdConnectUrl:{type:"string",format:"uri-reference"},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:!1},OAuthFlows:{type:"object",properties:{implicit:{$ref:"#/definitions/ImplicitOAuthFlow"},password:{$ref:"#/definitions/PasswordOAuthFlow"},clientCredentials:{$ref:"#/definitions/ClientCredentialsFlow"},authorizationCode:{$ref:"#/definitions/AuthorizationCodeOAuthFlow"}},patternProperties:{"^x-":{}},additionalProperties:!1},ImplicitOAuthFlow:{type:"object",required:["authorizationUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},PasswordOAuthFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},ClientCredentialsFlow:{type:"object",required:["tokenUrl","scopes"],properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},AuthorizationCodeOAuthFlow:{type:"object",required:["authorizationUrl","tokenUrl","scopes"],properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{type:"object",additionalProperties:{type:"string"}}},patternProperties:{"^x-":{}},additionalProperties:!1},Link:{type:"object",properties:{operationId:{type:"string"},operationRef:{type:"string",format:"uri-reference"},parameters:{type:"object",additionalProperties:{}},requestBody:{},description:{type:"string"},server:{$ref:"#/definitions/Server"}},patternProperties:{"^x-":{}},additionalProperties:!1,not:{description:"Operation Id and Operation Ref are mutually exclusive",required:["operationId","operationRef"]}},Callback:{type:"object",additionalProperties:{$ref:"#/definitions/PathItem"},patternProperties:{"^x-":{}}},Encoding:{type:"object",properties:{contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Header"},{$ref:"#/definitions/Reference"}]}},style:{type:"string",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean",default:!1}},additionalProperties:!1}}},Ql={$id:"https://spec.openapis.org/oas/3.1/schema/2022-10-07",$schema:"https://json-schema.org/draft/2020-12/schema",description:"The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri-reference",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{info:{$comment:"https://spec.openapis.org/oas/v3.1.0#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.1.0#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.1.0#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.1.0#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.1.0#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.1.0#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}}},patternProperties:{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.1.0#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item-or-reference"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.1.0#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.1.0#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.1.0#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameter:{$comment:"https://spec.openapis.org/oas/v3.1.0#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}},dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}},required:["in"]},then:{properties:{name:{pattern:"[^/#?]+$"},style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}},required:["in"]},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},allowReserved:{default:!1,type:"boolean"}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}},required:["in"]},then:{properties:{style:{default:"form",const:"form"}}}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.1.0#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.1.0#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.1.0#media-type-object",type:"object",properties:{schema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/examples"}],unevaluatedProperties:!1},encoding:{$comment:"https://spec.openapis.org/oas/v3.1.0#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/encoding/$defs/explode-default"}],unevaluatedProperties:!1,$defs:{"explode-default":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},responses:{$comment:"https://spec.openapis.org/oas/v3.1.0#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},response:{$comment:"https://spec.openapis.org/oas/v3.1.0#response-object",type:"object",properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},required:["description"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.1.0#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.1.0#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:!0,externalValue:{type:"string",format:"uri-reference"}},not:{required:["value","externalValue"]},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.1.0#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},body:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.1.0#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"}},$ref:"#/$defs/examples"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.1.0#tag-object",type:"object",properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.1.0#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}},unevaluatedProperties:!1},schema:{$comment:"https://spec.openapis.org/oas/v3.1.0#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}},required:["type"]},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}},required:["type"]},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}},required:["type"]},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}},required:["type"]},then:{properties:{openIdConnectUrl:{type:"string",format:"uri-reference"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.1.0#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}}}},Zl={$id:"https://spec.openapis.org/oas/3.2/schema/2025-09-17",$schema:"https://json-schema.org/draft/2020-12/schema",description:"The description of OpenAPI v3.2.x Documents without Schema Object validation",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.2\\.\\d+(-.+)?$"},$self:{type:"string",format:"uri-reference",$comment:"MUST NOT contain a fragment",pattern:"^[^#]*$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri-reference",default:"https://spec.openapis.org/oas/3.2/dialect/2025-09-17"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{info:{$comment:"https://spec.openapis.org/oas/v3.2#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri-reference"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.2#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri-reference"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.2#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.2#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},name:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.2#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.2#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},mediaTypes:{type:"object",additionalProperties:{$ref:"#/$defs/media-type-or-reference"}}},patternProperties:{"^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.2#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item-or-reference"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.2#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{$ref:"#/$defs/parameters"},additionalOperations:{type:"object",additionalProperties:{$ref:"#/$defs/operation"},propertyNames:{$comment:'RFC9110 restricts methods to "1*tchar" in ABNF',pattern:"^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$",not:{enum:["GET","PUT","POST","DELETE","OPTIONS","HEAD","PATCH","TRACE","QUERY"]}}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"},query:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.2#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{$ref:"#/$defs/parameters"},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.2#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri-reference"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"},not:{allOf:[{contains:{type:"object",properties:{in:{const:"query"}},required:["in"]}},{contains:{type:"object",properties:{in:{const:"querystring"}},required:["in"]}}]},contains:{type:"object",properties:{in:{const:"querystring"}},required:["in"]},minContains:0,maxContains:1},parameter:{$comment:"https://spec.openapis.org/oas/v3.2#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","querystring","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"},{if:{properties:{in:{const:"query"}}},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}}},{if:{properties:{in:{const:"querystring"}}},then:{required:["content"]}}],dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}}},then:{properties:{style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}}},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}}},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}}},then:{properties:{style:{default:"form",enum:["form","cookie"]}}}}}}},unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.2#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.2#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type-or-reference"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.2#media-type-object",type:"object",properties:{description:{type:"string"},schema:{$ref:"#/$defs/schema"},itemSchema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}},prefixEncoding:{type:"array",items:{$ref:"#/$defs/encoding"}},itemEncoding:{$ref:"#/$defs/encoding"}},dependentSchemas:{encoding:{properties:{prefixEncoding:!1,itemEncoding:!1}}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"}],unevaluatedProperties:!1},"media-type-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/media-type"}},encoding:{$comment:"https://spec.openapis.org/oas/v3.2#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}},prefixEncoding:{type:"array",items:{$ref:"#/$defs/encoding"}},itemEncoding:{$ref:"#/$defs/encoding"}},dependentSchemas:{encoding:{properties:{prefixEncoding:!1,itemEncoding:!1}},style:{properties:{allowReserved:{default:!1}}},explode:{properties:{style:{default:"form"},allowReserved:{default:!1}}},allowReserved:{properties:{style:{default:"form"}}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/styles-for-form"}],unevaluatedProperties:!1},responses:{$comment:"https://spec.openapis.org/oas/v3.2#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,if:{$comment:"either default, or at least one response code property must exist",patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":!1}},then:{required:["default"]}},response:{$comment:"https://spec.openapis.org/oas/v3.2#response-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.2#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.2#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},dataValue:!0,serializedValue:{type:"string"},value:!0,externalValue:{type:"string",format:"uri-reference"}},allOf:[{not:{required:["value","externalValue"]}},{not:{required:["value","dataValue"]}},{not:{required:["value","serializedValue"]}},{not:{required:["serializedValue","externalValue"]}}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.2#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},server:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.2#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"},allowReserved:{default:!1,type:"boolean"}}}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/specification-extensions"}],unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.2#tag-object",type:"object",properties:{name:{type:"string"},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},parent:{type:"string"},kind:{type:"string"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.2#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}}},schema:{$comment:"https://spec.openapis.org/oas/v3.2#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.2#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"},deprecated:{default:!1,type:"boolean"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}}},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}}},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}}},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"},oauth2MetadataUrl:{type:"string",format:"uri-reference"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}}},then:{properties:{openIdConnectUrl:{type:"string",format:"uri-reference"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"},deviceAuthorization:{$ref:"#/$defs/oauth-flows/$defs/device-authorization"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"device-authorization":{type:"object",properties:{deviceAuthorizationUrl:{type:"string",format:"uri-reference"},tokenUrl:{type:"string",format:"uri-reference"},refreshUrl:{type:"string",format:"uri-reference"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["deviceAuthorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.2#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.2#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}},not:{required:["example","examples"]}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},Fa={"2.0":Yl,"3.0":Xl,"3.1":Ql,"3.2":Zl},za=Object.keys(Fa),$e={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function oi(t){if(t===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(Gt(t))for(const e of new Set(za)){const r=e==="2.0"?"swagger":"openapi",n=t[r];if(typeof n=="string"&&n.startsWith(e))return{version:e,specificationType:r,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function qe(t){return t==null?void 0:t.find(e=>e.isEntrypoint)}function Nr(t,e,r=[]){const n={};for(const[s,i]of Object.entries(t)){const o=[...r,s];if(Array.isArray(i)){n[s]=i.map((a,f)=>typeof a=="object"&&!Array.isArray(a)&&a!==null?Nr(a,e,[...o,f.toString()]):a);continue}if(typeof i=="object"&&i!==null){n[s]=Nr(i,e,o);continue}n[s]=i}return e(n,r)}function Ka(t){const e=[];return!t||typeof t!="object"?e:(Nr(t,r=>(r.$ref&&typeof r.$ref=="string"&&!r.$ref.startsWith("#")&&e.push(r.$ref.split("#")[0]),r)),[...new Set(e)])}function ai(t){return typeof t<"u"&&Array.isArray(t)&&t.length>0&&t.some(e=>e.isEntrypoint===!0)}const ci=Symbol.for("yaml.alias"),Rs=Symbol.for("yaml.document"),st=Symbol.for("yaml.map"),Ba=Symbol.for("yaml.pair"),Fe=Symbol.for("yaml.scalar"),Wt=Symbol.for("yaml.seq"),Ae=Symbol.for("yaml.node.type"),Yt=t=>!!t&&typeof t=="object"&&t[Ae]===ci,Cr=t=>!!t&&typeof t=="object"&&t[Ae]===Rs,Mr=t=>!!t&&typeof t=="object"&&t[Ae]===st,le=t=>!!t&&typeof t=="object"&&t[Ae]===Ba,ne=t=>!!t&&typeof t=="object"&&t[Ae]===Fe,qr=t=>!!t&&typeof t=="object"&&t[Ae]===Wt;function ce(t){if(t&&typeof t=="object")switch(t[Ae]){case st:case Wt:return!0}return!1}function fe(t){if(t&&typeof t=="object")switch(t[Ae]){case ci:case st:case Fe:case Wt:return!0}return!1}const Ha=t=>(ne(t)||ce(t))&&!!t.anchor,ct=Symbol("break visit"),eu=Symbol("skip children"),Pr=Symbol("remove node");function Xt(t,e){const r=tu(e);Cr(t)?xt(null,t.contents,r,Object.freeze([t]))===Pr&&(t.contents=null):xt(null,t,r,Object.freeze([]))}Xt.BREAK=ct;Xt.SKIP=eu;Xt.REMOVE=Pr;function xt(t,e,r,n){const s=ru(t,e,r,n);if(fe(s)||le(s))return nu(t,n,s),xt(t,s,r,n);if(typeof s!="symbol"){if(ce(e)){n=Object.freeze(n.concat(e));for(let i=0;i<e.items.length;++i){const o=xt(i,e.items[i],r,n);if(typeof o=="number")i=o-1;else{if(o===ct)return ct;o===Pr&&(e.items.splice(i,1),i-=1)}}}else if(le(e)){n=Object.freeze(n.concat(e));const i=xt("key",e.key,r,n);if(i===ct)return ct;i===Pr&&(e.key=null);const o=xt("value",e.value,r,n);if(o===ct)return ct;o===Pr&&(e.value=null)}}return s}function tu(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function ru(t,e,r,n){var s,i,o,a,f;if(typeof r=="function")return r(t,e,n);if(Mr(e))return(s=r.Map)==null?void 0:s.call(r,t,e,n);if(qr(e))return(i=r.Seq)==null?void 0:i.call(r,t,e,n);if(le(e))return(o=r.Pair)==null?void 0:o.call(r,t,e,n);if(ne(e))return(a=r.Scalar)==null?void 0:a.call(r,t,e,n);if(Yt(e))return(f=r.Alias)==null?void 0:f.call(r,t,e,n)}function nu(t,e,r){const n=e[e.length-1];if(ce(n))n.items[t]=r;else if(le(n))t==="key"?n.key=r:n.value=r;else if(Cr(n))n.contents=r;else{const s=Yt(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const su={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},iu=t=>t.replace(/[!,[\]{}]/g,e=>su[e]);class ve{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ve.defaultYaml,e),this.tags=Object.assign({},ve.defaultTags,r)}clone(){const e=new ve(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ve(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ve.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ve.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:ve.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ve.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[i,o]=n;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const o=/^\d+\.\d+$/.test(i);return r(6,`Unsupported YAML version ${i}`,o),!1}}default:return r(0,`Unknown directive ${s}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),o)}const[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||r(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(s)}catch(o){return r(String(o)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+iu(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let s;if(e&&n.length>0&&fe(e.contents)){const i={};Xt(e.contents,(o,a)=>{fe(a)&&a.tag&&(i[a.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,o]of n)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(o)))&&r.push(`%TAG ${i} ${o}`);return r.join(`
2
+ `)}}ve.defaultYaml={explicit:!1,version:"1.2"};ve.defaultTags={"!!":"tag:yaml.org,2002:"};function Ja(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function Ga(t){const e=new Set;return Xt(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function Wa(t,e){for(let r=1;;++r){const n=`${t}${r}`;if(!e.has(n))return n}}function ou(t,e){const r=[],n=new Map;let s=null;return{onAnchor:i=>{r.push(i),s??(s=Ga(t));const o=Wa(e,s);return s.add(o),o},setAnchors:()=>{for(const i of r){const o=n.get(i);if(typeof o=="object"&&o.anchor&&(ne(o.node)||ce(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:n}}function Ct(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let s=0,i=n.length;s<i;++s){const o=n[s],a=Ct(t,n,String(s),o);a===void 0?delete n[s]:a!==o&&(n[s]=a)}else if(n instanceof Map)for(const s of Array.from(n.keys())){const i=n.get(s),o=Ct(t,n,s,i);o===void 0?n.delete(s):o!==i&&n.set(s,o)}else if(n instanceof Set)for(const s of Array.from(n)){const i=Ct(t,n,s,s);i===void 0?n.delete(s):i!==s&&(n.delete(s),n.add(i))}else for(const[s,i]of Object.entries(n)){const o=Ct(t,n,s,i);o===void 0?delete n[s]:o!==i&&(n[s]=o)}return t.call(e,r,n)}function Ie(t,e,r){if(Array.isArray(t))return t.map((n,s)=>Ie(n,String(s),r));if(t&&typeof t.toJSON=="function"){if(!r||!Ha(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=i=>{n.res=i,delete r.onCreate};const s=t.toJSON(e,r);return r.onCreate&&r.onCreate(s),s}return typeof t=="bigint"&&!(r!=null&&r.keep)?Number(t):t}class fi{constructor(e){Object.defineProperty(this,Ae,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:i}={}){if(!Cr(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Ie(this,"",o);if(typeof s=="function")for(const{count:f,res:c}of o.anchors.values())s(c,f);return typeof i=="function"?Ct(i,{"":a},"",a):a}}class li extends fi{constructor(e){super(ci),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if((r==null?void 0:r.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let n;r!=null&&r.aliasResolveCache?n=r.aliasResolveCache:(n=[],Xt(e,{Node:(i,o)=>{(Yt(o)||Ha(o))&&n.push(o)}}),r&&(r.aliasResolveCache=n));let s;for(const i of n){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(e,r){if(!r)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:i}=r,o=this.resolve(s,r);if(!o){const f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let a=n.get(o);if(a||(Ie(o,null,r),a=n.get(o)),(a==null?void 0:a.res)===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=gn(s,o,n)),a.count*a.aliasCount>i)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return a.res}toString(e,r,n){const s=`*${this.source}`;if(e){if(Ja(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}}function gn(t,e,r){if(Yt(e)){const n=e.resolve(t),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}else if(ce(e)){let n=0;for(const s of e.items){const i=gn(t,s,r);i>n&&(n=i)}return n}else if(le(e)){const n=gn(t,e.key,r),s=gn(t,e.value,r);return Math.max(n,s)}return 1}const Ya=t=>!t||typeof t!="function"&&typeof t!="object";class G extends fi{constructor(e){super(Fe),this.value=e}toJSON(e,r){return r!=null&&r.keep?this.value:Ie(this.value,e,r)}toString(){return String(this.value)}}G.BLOCK_FOLDED="BLOCK_FOLDED";G.BLOCK_LITERAL="BLOCK_LITERAL";G.PLAIN="PLAIN";G.QUOTE_DOUBLE="QUOTE_DOUBLE";G.QUOTE_SINGLE="QUOTE_SINGLE";const au="tag:yaml.org,2002:";function cu(t,e,r){if(e){const n=r.filter(i=>i.tag===e),s=n.find(i=>!i.format)??n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return r.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,t))&&!n.format})}function Ar(t,e,r){var l,d,p;if(Cr(t)&&(t=t.contents),fe(t))return t;if(le(t)){const h=(d=(l=r.schema[st]).createNode)==null?void 0:d.call(l,r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:n,onAnchor:s,onTagObj:i,schema:o,sourceObjects:a}=r;let f;if(n&&t&&typeof t=="object"){if(f=a.get(t),f)return f.anchor??(f.anchor=s(t)),new li(f.anchor);f={anchor:null,node:null},a.set(t,f)}e!=null&&e.startsWith("!!")&&(e=au+e.slice(2));let c=cu(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const h=new G(t);return f&&(f.node=h),h}c=t instanceof Map?o[st]:Symbol.iterator in Object(t)?o[Wt]:o[st]}i&&(i(c),delete r.onTagObj);const u=c!=null&&c.createNode?c.createNode(r.schema,t,r):typeof((p=c==null?void 0:c.nodeClass)==null?void 0:p.from)=="function"?c.nodeClass.from(r.schema,t,r):new G(t);return e?u.tag=e:c.default||(u.tag=c.tag),f&&(f.node=u),u}function jn(t,e,r){let n=r;for(let s=e.length-1;s>=0;--s){const i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const o=[];o[i]=n,n=o}else n=new Map([[i,n]])}return Ar(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const br=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Xa extends fi{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>fe(n)||le(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(br(e))this.add(r);else{const[n,...s]=e,i=this.get(n,!0);if(ce(i))i.addIn(s,r);else if(i===void 0&&this.schema)this.set(n,jn(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const s=this.get(r,!0);if(ce(s))return s.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...s]=e,i=this.get(n,!0);return s.length===0?!r&&ne(i)?i.value:i:ce(i)?i.getIn(s,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!le(r))return!1;const n=r.value;return n==null||e&&ne(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const s=this.get(r,!0);return ce(s)?s.hasIn(n):!1}setIn(e,r){const[n,...s]=e;if(s.length===0)this.set(n,r);else{const i=this.get(n,!0);if(ce(i))i.setIn(s,r);else if(i===void 0&&this.schema)this.set(n,jn(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}}const fu=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ke(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const ht=(t,e,r)=>t.endsWith(`
3
+ `)?Ke(r,e):r.includes(`
4
+ `)?`
5
+ `+Ke(r,e):(t.endsWith(" ")?"":" ")+r,Qa="flow",xs="block",$n="quoted";function Dn(t,e,r="flow",{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return t;s<i&&(i=0);const f=Math.max(1+i,1+s-e.length);if(t.length<=f)return t;const c=[],u={};let l=s-e.length;typeof n=="number"&&(n>s-Math.max(2,i)?c.push(0):l=s-n);let d,p,h=!1,g=-1,m=-1,$=-1;r===xs&&(g=qo(t,g,e.length),g!==-1&&(l=g+f));for(let w;w=t[g+=1];){if(r===$n&&w==="\\"){switch(m=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}$=g}if(w===`
6
+ `)r===xs&&(g=qo(t,g,e.length)),l=g+e.length+f,d=void 0;else{if(w===" "&&p&&p!==" "&&p!==`
7
+ `&&p!==" "){const E=t[g+1];E&&E!==" "&&E!==`
8
+ `&&E!==" "&&(d=g)}if(g>=l)if(d)c.push(d),l=d+f,d=void 0;else if(r===$n){for(;p===" "||p===" ";)p=w,w=t[g+=1],h=!0;const E=g>$+1?g-2:m-1;if(u[E])return t;c.push(E),u[E]=!0,l=E+f,d=void 0}else h=!0}p=w}if(h&&a&&a(),c.length===0)return t;o&&o();let v=t.slice(0,c[0]);for(let w=0;w<c.length;++w){const E=c[w],O=c[w+1]||t.length;E===0?v=`
9
+ ${e}${t.slice(0,O)}`:(r===$n&&u[E]&&(v+=`${t[E]}\\`),v+=`
10
+ ${e}${t.slice(E+1,O)}`)}return v}function qo(t,e,r){let n=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+r)i=t[++e];else{do i=t[++e];while(i&&i!==`
11
+ `);n=e,s=e+1,i=t[s]}return n}const Ln=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Vn=t=>/^(%|---|\.\.\.)/m.test(t);function lu(t,e,r){if(!e||e<0)return!1;const n=e-r,s=t.length;if(s<=n)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
12
+ `){if(i-o>n)return!0;if(o=i+1,s-o<=n)return!1}return!0}function Er(t,e){const r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Vn(t)?" ":"");let o="",a=0;for(let f=0,c=r[f];c;c=r[++f])if(c===" "&&r[f+1]==="\\"&&r[f+2]==="n"&&(o+=r.slice(a,f)+"\\ ",f+=1,a=f,c="\\"),c==="\\")switch(r[f+1]){case"u":{o+=r.slice(a,f);const u=r.substr(f+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=r.substr(f,6)}f+=5,a=f+1}break;case"n":if(n||r[f+2]==='"'||r.length<s)f+=1;else{for(o+=r.slice(a,f)+`
13
+
14
+ `;r[f+2]==="\\"&&r[f+3]==="n"&&r[f+4]!=='"';)o+=`
15
+ `,f+=2;o+=i,r[f+2]===" "&&(o+="\\"),f+=1,a=f+1}break;default:f+=1}return o=a?o+r.slice(a):r,n?o:Dn(o,i,$n,Ln(e,!1))}function Cs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test(t))return Er(t,e);const r=e.indent||(Vn(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${r}`)+"'";return e.implicitKey?n:Dn(n,r,Qa,Ln(e,!1))}function Mt(t,e){const{singleQuote:r}=e.options;let n;if(r===!1)n=Er;else{const s=t.includes('"'),i=t.includes("'");s&&!i?n=Cs:i&&!s?n=Er:n=r?Cs:Er}return n(t,e)}let Ms;try{Ms=new RegExp(`(^|(?<!
18
+ ))
19
+ +(?!
20
+ |$)`,"g")}catch{Ms=/\n+(?!\n|$)/g}function bn({comment:t,type:e,value:r},n,s,i){const{blockQuote:o,commentString:a,lineWidth:f}=n.options;if(!o||/\n[\t ]+$/.test(r))return Mt(r,n);const c=n.indent||(n.forceBlockIndent||Vn(r)?" ":""),u=o==="literal"?!0:o==="folded"||e===G.BLOCK_FOLDED?!1:e===G.BLOCK_LITERAL?!0:!lu(r,f,c.length);if(!r)return u?`|
21
+ `:`>
22
+ `;let l,d;for(d=r.length;d>0;--d){const O=r[d-1];if(O!==`
23
+ `&&O!==" "&&O!==" ")break}let p=r.substring(d);const h=p.indexOf(`
24
+ `);h===-1?l="-":r===p||h!==p.length-1?(l="+",i&&i()):l="",p&&(r=r.slice(0,-p.length),p[p.length-1]===`
25
+ `&&(p=p.slice(0,-1)),p=p.replace(Ms,`$&${c}`));let g=!1,m,$=-1;for(m=0;m<r.length;++m){const O=r[m];if(O===" ")g=!0;else if(O===`
26
+ `)$=m;else break}let v=r.substring(0,$<m?$+1:m);v&&(r=r.substring(v.length),v=v.replace(/\n+/g,`$&${c}`));let E=(g?c?"2":"1":"")+l;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!u){const O=r.replace(/\n+/g,`
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let M=!1;const C=Ln(n,!0);o!=="folded"&&e!==G.BLOCK_FOLDED&&(C.onOverflow=()=>{M=!0});const A=Dn(`${v}${O}${p}`,c,xs,C);if(!M)return`>${E}
28
+ ${c}${A}`}return r=r.replace(/\n+/g,`$&${c}`),`|${E}
29
+ ${c}${v}${r}${p}`}function uu(t,e,r,n){const{type:s,value:i}=t,{actualString:o,implicitKey:a,indent:f,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
30
+ `)||u&&/[[\]{},]/.test(i))return Mt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
31
+ `)?Mt(i,e):bn(t,e,r,n);if(!a&&!u&&s!==G.PLAIN&&i.includes(`
32
+ `))return bn(t,e,r,n);if(Vn(i)){if(f==="")return e.forceBlockIndent=!0,bn(t,e,r,n);if(a&&f===c)return Mt(i,e)}const l=i.replace(/\n+/g,`$&
33
+ ${f}`);if(o){const d=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(l))},{compat:p,tags:h}=e.doc.schema;if(h.some(d)||p!=null&&p.some(d))return Mt(i,e)}return a?l:Dn(l,f,Qa,Ln(e,!1))}function ui(t,e,r,n){const{implicitKey:s,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==G.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=G.QUOTE_DOUBLE);const f=u=>{switch(u){case G.BLOCK_FOLDED:case G.BLOCK_LITERAL:return s||i?Mt(o.value,e):bn(o,e,r,n);case G.QUOTE_DOUBLE:return Er(o.value,e);case G.QUOTE_SINGLE:return Cs(o.value,e);case G.PLAIN:return uu(o,e,r,n);default:return null}};let c=f(a);if(c===null){const{defaultKeyType:u,defaultStringType:l}=e.options,d=s&&u||l;if(c=f(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Za(t,e){const r=Object.assign({blockQuote:!0,commentString:fu,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function du(t,e){var s;if(e.tag){const i=t.filter(o=>o.tag===e.tag);if(i.length>0)return i.find(o=>o.format===e.format)??i[0]}let r,n;if(ne(e)){n=e.value;let i=t.filter(o=>{var a;return(a=o.identify)==null?void 0:a.call(o,n)});if(i.length>1){const o=i.filter(a=>a.test);o.length>0&&(i=o)}r=i.find(o=>o.format===e.format)??i.find(o=>!o.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){const i=((s=n==null?void 0:n.constructor)==null?void 0:s.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function pu(t,e,{anchors:r,doc:n}){if(!n.directives)return"";const s=[],i=(ne(t)||ce(t))&&t.anchor;i&&Ja(i)&&(r.add(i),s.push(`&${i}`));const o=t.tag??(e.default?null:e.tag);return o&&s.push(n.directives.tagString(o)),s.join(" ")}function zt(t,e,r,n){var f;if(le(t))return t.toString(e,r,n);if(Yt(t)){if(e.doc.directives)return t.toString(e);if((f=e.resolvedAliases)!=null&&f.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s;const i=fe(t)?t:e.doc.createNode(t,{onTagObj:c=>s=c});s??(s=du(e.doc.schema.tags,i));const o=pu(i,s,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof s.stringify=="function"?s.stringify(i,e,r,n):ne(i)?ui(i,e,r,n):i.toString(e,r,n);return o?ne(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
34
+ ${e.indent}${a}`:a}function mu({key:t,value:e},r,n,s){const{allNullValues:i,doc:o,indent:a,indentStep:f,options:{commentString:c,indentSeq:u,simpleKeys:l}}=r;let d=fe(t)&&t.comment||null;if(l){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(ce(t)||!fe(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!l&&(!t||d&&e==null&&!r.inFlow||ce(t)||(ne(t)?t.type===G.BLOCK_FOLDED||t.type===G.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(l||!i),indent:a+f});let h=!1,g=!1,m=zt(t,r,()=>h=!0,()=>g=!0);if(!p&&!r.inFlow&&m.length>1024){if(l)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||e==null)return h&&n&&n(),m===""?"?":p?`? ${m}`:m}else if(i&&!l||e==null&&p)return m=`? ${m}`,d&&!h?m+=ht(m,r.indent,c(d)):g&&s&&s(),m;h&&(d=null),p?(d&&(m+=ht(m,r.indent,c(d))),m=`? ${m}
35
+ ${a}:`):(m=`${m}:`,d&&(m+=ht(m,r.indent,c(d))));let $,v,w;fe(e)?($=!!e.spaceBefore,v=e.commentBefore,w=e.comment):($=!1,v=null,w=null,e&&typeof e=="object"&&(e=o.createNode(e))),r.implicitKey=!1,!p&&!d&&ne(e)&&(r.indentAtStart=m.length+1),g=!1,!u&&f.length>=2&&!r.inFlow&&!p&&qr(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let E=!1;const O=zt(e,r,()=>E=!0,()=>g=!0);let M=" ";if(d||$||v){if(M=$?`
36
+ `:"",v){const C=c(v);M+=`
37
+ ${Ke(C,r.indent)}`}O===""&&!r.inFlow?M===`
38
+ `&&w&&(M=`
39
+
40
+ `):M+=`
41
+ ${r.indent}`}else if(!p&&ce(e)){const C=O[0],A=O.indexOf(`
42
+ `),z=A!==-1,X=r.inFlow??e.flow??e.items.length===0;if(z||!X){let R=!1;if(z&&(C==="&"||C==="!")){let L=O.indexOf(" ");C==="&"&&L!==-1&&L<A&&O[L+1]==="!"&&(L=O.indexOf(" ",L+1)),(L===-1||A<L)&&(R=!0)}R||(M=`
43
+ ${r.indent}`)}}else(O===""||O[0]===`
44
+ `)&&(M="");return m+=M+O,r.inFlow?E&&n&&n():w&&!E?m+=ht(m,r.indent,c(w)):g&&s&&s(),m}function ec(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const rn="<<",Be={identify:t=>t===rn||typeof t=="symbol"&&t.description===rn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new G(Symbol(rn)),{addToJSMap:tc}),stringify:()=>rn},hu=(t,e)=>(Be.identify(e)||ne(e)&&(!e.type||e.type===G.PLAIN)&&Be.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(r=>r.tag===Be.tag&&r.default));function tc(t,e,r){const n=rc(t,r);if(qr(n))for(const s of n.items)hs(t,e,s);else if(Array.isArray(n))for(const s of n)hs(t,e,s);else hs(t,e,n)}function hs(t,e,r){const n=rc(t,r);if(!Mr(n))throw new Error("Merge sources must be maps or map aliases");const s=n.toJSON(null,t,Map);for(const[i,o]of s)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function rc(t,e){return t&&Yt(e)?e.resolve(t.doc,t):e}function nc(t,e,{key:r,value:n}){if(fe(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(hu(t,r))tc(t,e,n);else{const s=Ie(r,"",t);if(e instanceof Map)e.set(s,Ie(n,s,t));else if(e instanceof Set)e.add(s);else{const i=yu(r,s,t),o=Ie(n,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function yu(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(fe(t)&&(r!=null&&r.doc)){const n=Za(r.doc,{});n.anchors=new Set;for(const i of r.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;const s=t.toString(n);if(!r.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),ec(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return s}return JSON.stringify(e)}function di(t,e,r){const n=Ar(t,void 0,r),s=Ar(e,void 0,r);return new _e(n,s)}class _e{constructor(e,r=null){Object.defineProperty(this,Ae,{value:Ba}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return fe(r)&&(r=r.clone(e)),fe(n)&&(n=n.clone(e)),new _e(r,n)}toJSON(e,r){const n=r!=null&&r.mapAsMap?new Map:{};return nc(r,n,this)}toString(e,r,n){return e!=null&&e.doc?mu(this,e,r,n):JSON.stringify(this)}}function sc(t,e,r){return(e.inFlow??t.flow?$u:gu)(t,e,r)}function gu({comment:t,items:e},r,{blockItemPrefix:n,flowChars:s,itemIndent:i,onChompKeep:o,onComment:a}){const{indent:f,options:{commentString:c}}=r,u=Object.assign({},r,{indent:i,type:null});let l=!1;const d=[];for(let h=0;h<e.length;++h){const g=e[h];let m=null;if(fe(g))!l&&g.spaceBefore&&d.push(""),On(r,d,g.commentBefore,l),g.comment&&(m=g.comment);else if(le(g)){const v=fe(g.key)?g.key:null;v&&(!l&&v.spaceBefore&&d.push(""),On(r,d,v.commentBefore,l))}l=!1;let $=zt(g,u,()=>m=null,()=>l=!0);m&&($+=ht($,i,c(m))),l&&m&&(l=!1),d.push(n+$)}let p;if(d.length===0)p=s.start+s.end;else{p=d[0];for(let h=1;h<d.length;++h){const g=d[h];p+=g?`
45
+ ${f}${g}`:`
46
+ `}}return t?(p+=`
47
+ `+Ke(c(t),f),a&&a()):l&&o&&o(),p}function $u({items:t},e,{flowChars:r,itemIndent:n}){const{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;n+=i;const f=Object.assign({},e,{indent:n,inFlow:!0,type:null});let c=!1,u=0;const l=[];for(let h=0;h<t.length;++h){const g=t[h];let m=null;if(fe(g))g.spaceBefore&&l.push(""),On(e,l,g.commentBefore,!1),g.comment&&(m=g.comment);else if(le(g)){const v=fe(g.key)?g.key:null;v&&(v.spaceBefore&&l.push(""),On(e,l,v.commentBefore,!1),v.comment&&(c=!0));const w=fe(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(c=!0)):g.value==null&&(v!=null&&v.comment)&&(m=v.comment)}m&&(c=!0);let $=zt(g,f,()=>m=null);c||(c=l.length>u||$.includes(`
48
+ `)),h<t.length-1?$+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=l.reduce((v,w)=>v+w.length+2,2)+($.length+2)>e.options.lineWidth)),c&&($+=",")),m&&($+=ht($,n,a(m))),l.push($),u=l.length}const{start:d,end:p}=r;if(l.length===0)return d+p;if(!c){const h=l.reduce((g,m)=>g+m.length+2,2);c=e.options.lineWidth>0&&h>e.options.lineWidth}if(c){let h=d;for(const g of l)h+=g?`
49
+ ${i}${s}${g}`:`
50
+ `;return`${h}
51
+ ${s}${p}`}else return`${d}${o}${l.join(" ")}${o}${p}`}function On({indent:t,options:{commentString:e}},r,n,s){if(n&&s&&(n=n.replace(/^\n+/,"")),n){const i=Ke(e(n),t);r.push(i.trimStart())}}function yt(t,e){const r=ne(e)?e.value:e;for(const n of t)if(le(n)&&(n.key===e||n.key===r||ne(n.key)&&n.key.value===r))return n}class ke extends Xa{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(st,e),this.items=[]}static from(e,r,n){const{keepUndefined:s,replacer:i}=n,o=new this(e),a=(f,c)=>{if(typeof i=="function")c=i.call(r,f,c);else if(Array.isArray(i)&&!i.includes(f))return;(c!==void 0||s)&&o.items.push(di(f,c,n))};if(r instanceof Map)for(const[f,c]of r)a(f,c);else if(r&&typeof r=="object")for(const f of Object.keys(r))a(f,r[f]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,r){var o;let n;le(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new _e(e,e==null?void 0:e.value):n=new _e(e.key,e.value);const s=yt(this.items,n.key),i=(o=this.schema)==null?void 0:o.sortMapEntries;if(s){if(!r)throw new Error(`Key ${n.key} already set`);ne(s.value)&&Ya(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const a=this.items.findIndex(f=>i(n,f)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){const r=yt(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){const n=yt(this.items,e),s=n==null?void 0:n.value;return(!r&&ne(s)?s.value:s)??void 0}has(e){return!!yt(this.items,e)}set(e,r){this.add(new _e(e,r),!0)}toJSON(e,r,n){const s=n?new n:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(s);for(const i of this.items)nc(r,s,i);return s}toString(e,r,n){if(!e)return JSON.stringify(this);for(const s of this.items)if(!le(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),sc(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}}const Qt={collection:"map",default:!0,nodeClass:ke,tag:"tag:yaml.org,2002:map",resolve(t,e){return Mr(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>ke.from(t,e,r)};class $t extends Xa{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Wt,e),this.items=[]}add(e){this.items.push(e)}delete(e){const r=nn(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){const n=nn(e);if(typeof n!="number")return;const s=this.items[n];return!r&&ne(s)?s.value:s}has(e){const r=nn(e);return typeof r=="number"&&r<this.items.length}set(e,r){const n=nn(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[n];ne(s)&&Ya(r)?s.value=r:this.items[n]=r}toJSON(e,r){const n=[];r!=null&&r.onCreate&&r.onCreate(n);let s=0;for(const i of this.items)n.push(Ie(i,String(s++),r));return n}toString(e,r,n){return e?sc(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){const{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r)){let o=0;for(let a of r){if(typeof s=="function"){const f=r instanceof Set?a:String(o++);a=s.call(r,f,a)}i.items.push(Ar(a,void 0,n))}}return i}}function nn(t){let e=ne(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Zt={collection:"seq",default:!0,nodeClass:$t,tag:"tag:yaml.org,2002:seq",resolve(t,e){return qr(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>$t.from(t,e,r)},Un={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),ui(t,e,r,n)}},Fn={identify:t=>t==null,createNode:()=>new G(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new G(null),stringify:({source:t},e)=>typeof t=="string"&&Fn.test.test(t)?t:e.options.nullStr},pi={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new G(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&pi.test.test(t)){const n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};function De({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);const s=typeof n=="number"?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}const ic={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:De},oc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():De(t)}},ac={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new G(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:De},zn=t=>typeof t=="bigint"||Number.isInteger(t),mi=(t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r);function cc(t,e,r){const{value:n}=t;return zn(n)&&n>=0?r+n.toString(e):De(t)}const fc={identify:t=>zn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>mi(t,2,8,r),stringify:t=>cc(t,8,"0o")},lc={identify:zn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>mi(t,0,10,r),stringify:De},uc={identify:t=>zn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>mi(t,2,16,r),stringify:t=>cc(t,16,"0x")},bu=[Qt,Zt,Un,Fn,pi,fc,lc,uc,ic,oc,ac];function Do(t){return typeof t=="bigint"||Number.isInteger(t)}const sn=({value:t})=>JSON.stringify(t),vu=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:sn},{identify:t=>t==null,createNode:()=>new G(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:sn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:sn},{identify:Do,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>Do(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:sn}],wu={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},_u=[Qt,Zt].concat(vu,wu),hi={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let s=0;s<r.length;++s)n[s]=r.charCodeAt(s);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},n,s,i){if(!r)return"";const o=r;let a;if(typeof btoa=="function"){let f="";for(let c=0;c<o.length;++c)f+=String.fromCharCode(o[c]);a=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=G.BLOCK_LITERAL),e!==G.QUOTE_DOUBLE){const f=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/f),u=new Array(c);for(let l=0,d=0;l<c;++l,d+=f)u[l]=a.substr(d,f);a=u.join(e===G.BLOCK_LITERAL?`
52
+ `:" ")}return ui({comment:t,type:e,value:a},n,s,i)}};function dc(t,e){if(qr(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!le(n)){if(Mr(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const s=n.items[0]||new _e(new G(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
53
+ ${s.key.commentBefore}`:n.commentBefore),n.comment){const i=s.value??s.key;i.comment=i.comment?`${n.comment}
54
+ ${i.comment}`:n.comment}n=s}t.items[r]=le(n)?n:new _e(n)}}else e("Expected a sequence for this tag");return t}function pc(t,e,r){const{replacer:n}=r,s=new $t(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(i++),o));let a,f;if(Array.isArray(o))if(o.length===2)a=o[0],f=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],f=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;s.items.push(di(a,f,r))}return s}const yi={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:dc,createNode:pc};class Lt extends $t{constructor(){super(),this.add=ke.prototype.add.bind(this),this.delete=ke.prototype.delete.bind(this),this.get=ke.prototype.get.bind(this),this.has=ke.prototype.has.bind(this),this.set=ke.prototype.set.bind(this),this.tag=Lt.tag}toJSON(e,r){if(!r)return super.toJSON(e);const n=new Map;r!=null&&r.onCreate&&r.onCreate(n);for(const s of this.items){let i,o;if(le(s)?(i=Ie(s.key,"",r),o=Ie(s.value,i,r)):i=Ie(s,"",r),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,o)}return n}static from(e,r,n){const s=pc(e,r,n),i=new this;return i.items=s.items,i}}Lt.tag="tag:yaml.org,2002:omap";const gi={collection:"seq",identify:t=>t instanceof Map,nodeClass:Lt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const r=dc(t,e),n=[];for(const{key:s}of r.items)ne(s)&&(n.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):n.push(s.value));return Object.assign(new Lt,r)},createNode:(t,e,r)=>Lt.from(t,e,r)};function mc({value:t,source:e},r){return e&&(t?hc:yc).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}const hc={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new G(!0),stringify:mc},yc={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new G(!1),stringify:mc},Pu={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:De},Eu={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():De(t)}},Su={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new G(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){const n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:De},Dr=t=>typeof t=="bigint"||Number.isInteger(t);function Kn(t,e,r,{intAsBigInt:n}){const s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return s==="-"?BigInt(-1)*o:o}const i=parseInt(t,r);return s==="-"?-1*i:i}function $i(t,e,r){const{value:n}=t;if(Dr(n)){const s=n.toString(e);return n<0?"-"+r+s.substr(1):r+s}return De(t)}const ju={identify:Dr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Kn(t,2,2,r),stringify:t=>$i(t,2,"0b")},Ou={identify:Dr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Kn(t,1,8,r),stringify:t=>$i(t,8,"0")},ku={identify:Dr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Kn(t,0,10,r),stringify:De},Iu={identify:Dr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Kn(t,2,16,r),stringify:t=>$i(t,16,"0x")};class Vt extends ke{constructor(e){super(e),this.tag=Vt.tag}add(e){let r;le(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new _e(e.key,null):r=new _e(e,null),yt(this.items,r.key)||this.items.push(r)}get(e,r){const n=yt(this.items,e);return!r&&le(n)?ne(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const n=yt(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new _e(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){const{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r))for(let o of r)typeof s=="function"&&(o=s.call(r,o,o)),i.items.push(di(o,null,n));return i}}Vt.tag="tag:yaml.org,2002:set";const bi={collection:"map",identify:t=>t instanceof Set,nodeClass:Vt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Vt.from(t,e,r),resolve(t,e){if(Mr(t)){if(t.hasAllNullValues(!0))return Object.assign(new Vt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function vi(t,e){const r=t[0],n=r==="-"||r==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),i=n.replace(/_/g,"").split(":").reduce((o,a)=>o*s(60)+s(a),s(0));return r==="-"?s(-1)*i:i}function gc(t){let{value:e}=t,r=o=>o;if(typeof e=="bigint")r=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return De(t);let n="";e<0&&(n="-",e*=r(-1));const s=r(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),n+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const $c={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>vi(t,r),stringify:gc},bc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>vi(t,!1),stringify:gc},Bn={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Bn.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,i,o,a]=e.map(Number),f=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,s,i||0,o||0,a||0,f);const u=e[8];if(u&&u!=="Z"){let l=vi(u,!1);Math.abs(l)<30&&(l*=60),c-=6e4*l}return new Date(c)},stringify:({value:t})=>(t==null?void 0:t.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Lo=[Qt,Zt,Un,Fn,hc,yc,ju,Ou,ku,Iu,Pu,Eu,Su,hi,Be,gi,yi,bi,$c,bc,Bn],Vo=new Map([["core",bu],["failsafe",[Qt,Zt,Un]],["json",_u],["yaml11",Lo],["yaml-1.1",Lo]]),Uo={binary:hi,bool:pi,float:ac,floatExp:oc,floatNaN:ic,floatTime:bc,int:lc,intHex:uc,intOct:fc,intTime:$c,map:Qt,merge:Be,null:Fn,omap:gi,pairs:yi,seq:Zt,set:bi,timestamp:Bn},Nu={"tag:yaml.org,2002:binary":hi,"tag:yaml.org,2002:merge":Be,"tag:yaml.org,2002:omap":gi,"tag:yaml.org,2002:pairs":yi,"tag:yaml.org,2002:set":bi,"tag:yaml.org,2002:timestamp":Bn};function ys(t,e,r){const n=Vo.get(e);if(n&&!t)return r&&!n.includes(Be)?n.concat(Be):n.slice();let s=n;if(!s)if(Array.isArray(t))s=[];else{const i=Array.from(Vo.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(const i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return r&&(s=s.concat(Be)),s.reduce((i,o)=>{const a=typeof o=="string"?Uo[o]:o;if(!a){const f=JSON.stringify(o),c=Object.keys(Uo).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${c}`)}return i.includes(a)||i.push(a),i},[])}const Au=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class wi{constructor({compat:e,customTags:r,merge:n,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?ys(e,"compat"):e?ys(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?Nu:{},this.tags=ys(r,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,st,{value:Qt}),Object.defineProperty(this,Fe,{value:Un}),Object.defineProperty(this,Wt,{value:Zt}),this.sortMapEntries=typeof o=="function"?o:o===!0?Au:null}clone(){const e=Object.create(wi.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Tu(t,e){var f;const r=[];let n=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(r.push(c),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");const s=Za(t,e),{commentString:i}=s.options;if(t.commentBefore){r.length!==1&&r.unshift("");const c=i(t.commentBefore);r.unshift(Ke(c,""))}let o=!1,a=null;if(t.contents){if(fe(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){const l=i(t.contents.commentBefore);r.push(Ke(l,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=zt(t.contents,s,()=>a=null,c);a&&(u+=ht(u,"",i(a))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(zt(t.contents,s));if((f=t.directives)!=null&&f.docEnd)if(t.comment){const c=i(t.comment);c.includes(`
55
+ `)?(r.push("..."),r.push(Ke(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&r[r.length-1]!==""&&r.push(""),r.push(Ke(i(c),"")))}return r.join(`
56
+ `)+`
57
+ `}class Lr{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ae,{value:Rs});let s=null;typeof r=="function"||Array.isArray(r)?s=r:n===void 0&&r&&(n=r,r=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new ve({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,s,n)}clone(){const e=Object.create(Lr.prototype,{[Ae]:{value:Rs}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=fe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){It(this.contents)&&this.contents.add(e)}addIn(e,r){It(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){const n=Ga(this);e.anchor=!r||n.has(r)?Wa(r||"a",n):r}return new li(e.anchor)}createNode(e,r,n){let s;if(typeof r=="function")e=r.call({"":e},"",e),s=r;else if(Array.isArray(r)){const m=v=>typeof v=="number"||v instanceof String||v instanceof Number,$=r.filter(m).map(String);$.length>0&&(r=r.concat($)),s=r}else n===void 0&&r&&(n=r,r=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:f,onTagObj:c,tag:u}=n??{},{onAnchor:l,setAnchors:d,sourceObjects:p}=ou(this,o||"a"),h={aliasDuplicateObjects:i??!0,keepUndefined:f??!1,onAnchor:l,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:p},g=Ar(e,u,h);return a&&ce(g)&&(g.flow=!0),d(),g}createPair(e,r,n={}){const s=this.createNode(e,null,n),i=this.createNode(r,null,n);return new _e(s,i)}delete(e){return It(this.contents)?this.contents.delete(e):!1}deleteIn(e){return br(e)?this.contents==null?!1:(this.contents=null,!0):It(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ce(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return br(e)?!r&&ne(this.contents)?this.contents.value:this.contents:ce(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ce(this.contents)?this.contents.has(e):!1}hasIn(e){return br(e)?this.contents!==void 0:ce(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=jn(this.schema,[e],r):It(this.contents)&&this.contents.set(e,r)}setIn(e,r){br(e)?this.contents=r:this.contents==null?this.contents=jn(this.schema,Array.from(e),r):It(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ve({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ve({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new wi(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Ie(this.contents,r??"",a);if(typeof i=="function")for(const{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?Ct(o,{"":f},"",f):f}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Tu(this,e)}}function It(t){if(ce(t))return!0;throw new Error("Expected a YAML collection as document contents")}class vc extends Error{constructor(e,r,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=r}}class vr extends vc{constructor(e,r,n){super("YAMLParseError",e,r,n)}}class Ru extends vc{constructor(e,r,n){super("YAMLWarning",e,r,n)}}const Fo=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>e.linePos(a));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const a=Math.min(i-39,o.length-79);o="…"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`…
58
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1;const f=r.linePos[1];(f==null?void 0:f.line)===n&&f.col>s&&(a=Math.max(1,Math.min(f.col-s,80-i)));const c=" ".repeat(i)+"^".repeat(a);r.message+=`:
59
+
60
+ ${o}
61
+ ${c}
62
+ `}};function Kt(t,{flow:e,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let f=!1,c=a,u=a,l="",d="",p=!1,h=!1,g=null,m=null,$=null,v=null,w=null,E=null,O=null;for(const A of t)switch(h&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&i(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),g&&(c&&A.type!=="comment"&&A.type!=="newline"&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),A.type){case"space":!e&&(r!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&A.source.includes(" ")&&(g=A),u=!0;break;case"comment":{u||i(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const z=A.source.substring(1)||" ";l?l+=d+z:l=z,d="",c=!1;break}case"newline":c?l?l+=A.source:(!E||r!=="seq-item-ind")&&(f=!0):d+=A.source,c=!0,p=!0,(m||$)&&(v=A),u=!0;break;case"anchor":m&&i(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&i(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=A,O??(O=A.offset),c=!1,u=!1,h=!0;break;case"tag":{$&&i(A,"MULTIPLE_TAGS","A node can have at most one tag"),$=A,O??(O=A.offset),c=!1,u=!1,h=!0;break}case r:(m||$)&&i(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),E&&i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),E=A,c=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&i(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=A,c=!1,u=!1;break}default:i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}const M=t[t.length-1],C=M?M.offset+M.source.length:s;return h&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=o||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:E,spaceBefore:f,comment:l,hasNewline:p,anchor:m,tag:$,newlineAfterProp:v,end:C,start:O??C}}function Tr(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
63
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const r of e.start)if(r.type==="newline")return!0;if(e.sep){for(const r of e.sep)if(r.type==="newline")return!0}if(Tr(e.key)||Tr(e.value))return!0}return!1;default:return!0}}function qs(t,e,r){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Tr(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function wc(t,e,r){const{uniqueKeys:n}=t.options;if(n===!1)return!1;const s=typeof n=="function"?n:(i,o)=>i===o||ne(i)&&ne(o)&&i.value===o.value;return e.some(i=>s(i.key,r))}const zo="All mapping items must start at the same column";function xu({composeNode:t,composeEmptyNode:e},r,n,s,i){var u;const o=(i==null?void 0:i.nodeClass)??ke,a=new o(r.schema);r.atRoot&&(r.atRoot=!1);let f=n.offset,c=null;for(const l of n.items){const{start:d,key:p,sep:h,value:g}=l,m=Kt(d,{indicator:"explicit-key-ind",next:p??(h==null?void 0:h[0]),offset:f,onError:s,parentIndent:n.indent,startOnNewline:!0}),$=!m.found;if($){if(p&&(p.type==="block-seq"?s(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&s(f,"BAD_INDENT",zo)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
64
+ `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||Tr(p))&&s(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=m.found)==null?void 0:u.indent)!==n.indent&&s(f,"BAD_INDENT",zo);r.atKey=!0;const v=m.end,w=p?t(r,p,m,s):e(r,v,d,null,m,s);r.schema.compat&&qs(n.indent,p,s),r.atKey=!1,wc(r,a.items,w)&&s(v,"DUPLICATE_KEY","Map keys must be unique");const E=Kt(h??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:s,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(f=E.end,E.found){$&&((g==null?void 0:g.type)==="block-map"&&!E.hasNewline&&s(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<E.found.offset-1024&&s(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const O=g?t(r,g,E,s):e(r,f,h,null,E,s);r.schema.compat&&qs(n.indent,g,s),f=O.range[2];const M=new _e(w,O);r.options.keepSourceTokens&&(M.srcToken=l),a.items.push(M)}else{$&&s(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(w.comment?w.comment+=`
65
+ `+E.comment:w.comment=E.comment);const O=new _e(w);r.options.keepSourceTokens&&(O.srcToken=l),a.items.push(O)}}return c&&c<f&&s(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,f,c??f],a}function Cu({composeNode:t,composeEmptyNode:e},r,n,s,i){const o=(i==null?void 0:i.nodeClass)??$t,a=new o(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let f=n.offset,c=null;for(const{start:u,value:l}of n.items){const d=Kt(u,{indicator:"seq-item-ind",next:l,offset:f,onError:s,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||l)(l==null?void 0:l.type)==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(f,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}const p=l?t(r,l,d,s):e(r,d.end,u,null,d,s);r.schema.compat&&qs(n.indent,l,s),f=p.range[2],a.items.push(p)}return a.range=[n.offset,f,c??f],a}function Vr(t,e,r,n){let s="";if(t){let i=!1,o="";for(const a of t){const{source:f,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{r&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=f.substring(1)||" ";s?s+=o+u:s=u,o="";break}case"newline":s&&(o+=f),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=f.length}}return{comment:s,offset:e}}const gs="Block collections are not allowed within flow collections",$s=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Mu({composeNode:t,composeEmptyNode:e},r,n,s,i){var m;const o=n.start.source==="{",a=o?"flow map":"flow sequence",f=(i==null?void 0:i.nodeClass)??(o?ke:$t),c=new f(r.schema);c.flow=!0;const u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let l=n.offset+n.start.source.length;for(let $=0;$<n.items.length;++$){const v=n.items[$],{start:w,key:E,sep:O,value:M}=v,C=Kt(w,{flow:a,indicator:"explicit-key-ind",next:E??(O==null?void 0:O[0]),offset:l,onError:s,parentIndent:n.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!O&&!M){$===0&&C.comma?s(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):$<n.items.length-1&&s(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(c.comment?c.comment+=`
66
+ `+C.comment:c.comment=C.comment),l=C.end;continue}!o&&r.options.strict&&Tr(E)&&s(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if($===0)C.comma&&s(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||s(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let A="";e:for(const z of w)switch(z.type){case"comma":case"space":break;case"comment":A=z.source.substring(1);break e;default:break e}if(A){let z=c.items[c.items.length-1];le(z)&&(z=z.value??z.key),z.comment?z.comment+=`
67
+ `+A:z.comment=A,C.comment=C.comment.substring(A.length+1)}}if(!o&&!O&&!C.found){const A=M?t(r,M,C,s):e(r,C.end,O,null,C,s);c.items.push(A),l=A.range[2],$s(M)&&s(A.range,"BLOCK_IN_FLOW",gs)}else{r.atKey=!0;const A=C.end,z=E?t(r,E,C,s):e(r,A,w,null,C,s);$s(E)&&s(z.range,"BLOCK_IN_FLOW",gs),r.atKey=!1;const X=Kt(O??[],{flow:a,indicator:"map-value-ind",next:M,offset:z.range[2],onError:s,parentIndent:n.indent,startOnNewline:!1});if(X.found){if(!o&&!C.found&&r.options.strict){if(O)for(const H of O){if(H===X.found)break;if(H.type==="newline"){s(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.start<X.found.offset-1024&&s(X.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((m=M.source)==null?void 0:m[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${a}`):s(X.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const R=M?t(r,M,X,s):X.found?e(r,X.end,O,null,X,s):null;R?$s(M)&&s(R.range,"BLOCK_IN_FLOW",gs):X.comment&&(z.comment?z.comment+=`
68
+ `+X.comment:z.comment=X.comment);const L=new _e(z,R);if(r.options.keepSourceTokens&&(L.srcToken=v),o){const H=c;wc(r,H.items,z)&&s(A,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(L)}else{const H=new ke(r.schema);H.flow=!0,H.items.push(L);const F=(R??z).range;H.range=[z.range[0],F[1],F[2]],c.items.push(H)}l=R?R.range[2]:X.end}}const d=o?"}":"]",[p,...h]=n.end;let g=l;if((p==null?void 0:p.source)===d)g=p.offset+p.source.length;else{const $=a[0].toUpperCase()+a.substring(1),v=u?`${$} must end with a ${d}`:`${$} in block collection must be sufficiently indented and end with a ${d}`;s(l,u?"MISSING_CHAR":"BAD_INDENT",v),p&&p.source.length!==1&&h.unshift(p)}if(h.length>0){const $=Vr(h,g,r.options.strict,s);$.comment&&(c.comment?c.comment+=`
69
+ `+$.comment:c.comment=$.comment),c.range=[n.offset,g,$.offset]}else c.range=[n.offset,g,g];return c}function bs(t,e,r,n,s,i){const o=r.type==="block-map"?xu(t,e,r,n,i):r.type==="block-seq"?Cu(t,e,r,n,i):Mu(t,e,r,n,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function qu(t,e,r,n,s){var d;const i=n.tag,o=i?e.directives.tagName(i.source,p=>s(i,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){const{anchor:p,newlineAfterProp:h}=n,g=p&&i?p.offset>i.offset?p:i:p??i;g&&(!h||h.offset<g.offset)&&s(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===ke.tagName&&a==="map"||o===$t.tagName&&a==="seq")return bs(t,e,r,s,o);let f=e.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!f){const p=e.schema.knownTags[o];if((p==null?void 0:p.collection)===a)e.schema.tags.push(Object.assign({},p,{default:!1})),f=p;else return p?s(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),bs(t,e,r,s,o)}const c=bs(t,e,r,s,o,f),u=((d=f.resolve)==null?void 0:d.call(f,c,p=>s(i,"TAG_RESOLVE_FAILED",p),e.options))??c,l=fe(u)?u:new G(u);return l.range=c.range,l.tag=o,f!=null&&f.format&&(l.format=f.format),l}function Du(t,e,r){const n=e.offset,s=Lu(e,t.options.strict,r);if(!s)return{value:"",type:null,comment:"",range:[n,n,n]};const i=s.mode===">"?G.BLOCK_FOLDED:G.BLOCK_LITERAL,o=e.source?Vu(e.source):[];let a=o.length;for(let g=o.length-1;g>=0;--g){const m=o[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){const g=s.chomp==="+"&&o.length>0?`
70
+ `.repeat(Math.max(1,o.length-1)):"";let m=n+s.length;return e.source&&(m+=e.source.length),{value:g,type:i,comment:s.comment,range:[n,m,m]}}let f=e.indent+s.indent,c=e.offset+s.length,u=0;for(let g=0;g<a;++g){const[m,$]=o[g];if($===""||$==="\r")s.indent===0&&m.length>f&&(f=m.length);else{m.length<f&&r(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(f=m.length),u=g,f===0&&!t.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+$.length+1}for(let g=o.length-1;g>=a;--g)o[g][0].length>f&&(a=g+1);let l="",d="",p=!1;for(let g=0;g<u;++g)l+=o[g][0].slice(f)+`
71
+ `;for(let g=u;g<a;++g){let[m,$]=o[g];c+=m.length+$.length+1;const v=$[$.length-1]==="\r";if(v&&($=$.slice(0,-1)),$&&m.length<f){const E=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;r(c-$.length-(v?2:1),"BAD_INDENT",E),m=""}i===G.BLOCK_LITERAL?(l+=d+m.slice(f)+$,d=`
72
+ `):m.length>f||$[0]===" "?(d===" "?d=`
73
+ `:!p&&d===`
74
+ `&&(d=`
75
+
76
+ `),l+=d+m.slice(f)+$,d=`
77
+ `,p=!0):$===""?d===`
78
+ `?l+=`
79
+ `:d=`
80
+ `:(l+=d+$,d=" ",p=!1)}switch(s.chomp){case"-":break;case"+":for(let g=a;g<o.length;++g)l+=`
81
+ `+o[g][0].slice(f);l[l.length-1]!==`
82
+ `&&(l+=`
83
+ `);break;default:l+=`
84
+ `}const h=n+s.length+e.source.length;return{value:l,type:i,comment:s.comment,range:[n,h,h]}}function Lu({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=e[0],i=s[0];let o=0,a="",f=-1;for(let d=1;d<s.length;++d){const p=s[d];if(!a&&(p==="-"||p==="+"))a=p;else{const h=Number(p);!o&&h?o=h:f===-1&&(f=t+d)}}f!==-1&&n(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",l=s.length;for(let d=1;d<e.length;++d){const p=e[d];switch(p.type){case"space":c=!0;case"newline":l+=p.source.length;break;case"comment":r&&!c&&n(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),l+=p.source.length,u=p.source.substring(1);break;case"error":n(p,"UNEXPECTED_TOKEN",p.message),l+=p.source.length;break;default:{const h=`Unexpected token in block scalar header: ${p.type}`;n(p,"UNEXPECTED_TOKEN",h);const g=p.source;g&&typeof g=="string"&&(l+=g.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:l}}function Vu(t){const e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),i=[n!=null&&n[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function Uu(t,e,r){const{offset:n,type:s,source:i,end:o}=t;let a,f;const c=(d,p,h)=>r(n+d,p,h);switch(s){case"scalar":a=G.PLAIN,f=Fu(i,c);break;case"single-quoted-scalar":a=G.QUOTE_SINGLE,f=zu(i,c);break;case"double-quoted-scalar":a=G.QUOTE_DOUBLE,f=Ku(i,c);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const u=n+i.length,l=Vr(o,u,e,r);return{value:f,type:a,comment:l.comment,range:[n,u,l.offset]}}function Fu(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),_c(t)}function zu(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),_c(t.slice(1,-1)).replace(/''/g,"'")}function _c(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
+ `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(t);if(!n)return t;let s=n[1],i=" ",o=e.lastIndex;for(r.lastIndex=o;n=r.exec(t);)n[1]===""?i===`
87
+ `?s+=i:i=`
88
+ `:(s+=i+n[1],i=" "),o=r.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(t),s+i+((n==null?void 0:n[1])??"")}function Ku(t,e){let r="";for(let n=1;n<t.length-1;++n){const s=t[n];if(!(s==="\r"&&t[n+1]===`
89
+ `))if(s===`
90
+ `){const{fold:i,offset:o}=Bu(t,n);r+=i,n=o}else if(s==="\\"){let i=t[++n];const o=Hu[i];if(o)r+=o;else if(i===`
91
+ `)for(i=t[n+1];i===" "||i===" ";)i=t[++n+1];else if(i==="\r"&&t[n+1]===`
92
+ `)for(i=t[++n+1];i===" "||i===" ";)i=t[++n+1];else if(i==="x"||i==="u"||i==="U"){const a=i==="x"?2:i==="u"?4:8;r+=Ju(t,n+1,a,e),n+=a}else{const a=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(s===" "||s===" "){const i=n;let o=t[n+1];for(;o===" "||o===" ";)o=t[++n+1];o!==`
93
+ `&&!(o==="\r"&&t[n+2]===`
94
+ `)&&(r+=n>i?t.slice(i,n+1):s)}else r+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Bu(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
95
+ `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
96
+ `);)n===`
97
+ `&&(r+=`
98
+ `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}const Hu={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ju(t,e,r,n){const s=t.substr(e,r),o=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(o)}catch{const a=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Pc(t,e,r,n){const{value:s,type:i,comment:o,range:a}=e.type==="block-scalar"?Du(t,e,n):Uu(e,t.options.strict,n),f=r?t.directives.tagName(r.source,l=>n(r,"TAG_RESOLVE_FAILED",l)):null;let c;t.options.stringKeys&&t.atKey?c=t.schema[Fe]:f?c=Gu(t.schema,s,f,r,n):e.type==="scalar"?c=Wu(t,s,e,n):c=t.schema[Fe];let u;try{const l=c.resolve(s,d=>n(r??e,"TAG_RESOLVE_FAILED",d),t.options);u=ne(l)?l:new G(l)}catch(l){const d=l instanceof Error?l.message:String(l);n(r??e,"TAG_RESOLVE_FAILED",d),u=new G(s)}return u.range=a,u.source=s,i&&(u.type=i),f&&(u.tag=f),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Gu(t,e,r,n,s){var a;if(r==="!")return t[Fe];const i=[];for(const f of t.tags)if(!f.collection&&f.tag===r)if(f.default&&f.test)i.push(f);else return f;for(const f of i)if((a=f.test)!=null&&a.test(e))return f;const o=t.knownTags[r];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Fe])}function Wu({atKey:t,directives:e,schema:r},n,s,i){const o=r.tags.find(a=>{var f;return(a.default===!0||t&&a.default==="key")&&((f=a.test)==null?void 0:f.test(n))})||r[Fe];if(r.compat){const a=r.compat.find(f=>{var c;return f.default&&((c=f.test)==null?void 0:c.test(n))})??r[Fe];if(o.tag!==a.tag){const f=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${f} or ${c}`;i(s,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Yu(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let s=e[n];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++n];(s==null?void 0:s.type)==="space";)t+=s.source.length,s=e[++n];break}}return t}const Xu={composeNode:Ec,composeEmptyNode:_i};function Ec(t,e,r,n){const s=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:f}=r;let c,u=!0;switch(e.type){case"alias":c=Qu(t,e,n),(a||f)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Pc(t,e,f,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=qu(Xu,t,e,r,n),a&&(c.anchor=a.source.substring(1))}catch(l){const d=l instanceof Error?l.message:String(l);n(e,"RESOURCE_EXHAUSTION",d)}break;default:{const l=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",l),u=!1}}return c??(c=_i(t,e.offset,void 0,null,r,n)),a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!ne(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(f??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function _i(t,e,r,n,{spaceBefore:s,comment:i,anchor:o,tag:a,end:f},c){const u={type:"scalar",offset:Yu(e,r,n),indent:-1,source:""},l=Pc(t,u,a,c);return o&&(l.anchor=o.source.substring(1),l.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(l.spaceBefore=!0),i&&(l.comment=i,l.range[2]=f),l}function Qu({options:t},{offset:e,source:r,end:n},s){const i=new li(r.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+r.length,a=Vr(n,o,t.strict,s);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Zu(t,e,{offset:r,start:n,value:s,end:i},o){const a=Object.assign({_directives:e},t),f=new Lr(void 0,a),c={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},u=Kt(n,{indicator:"doc-start",next:s??(i==null?void 0:i[0]),offset:r,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(f.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=s?Ec(c,s,u,o):_i(c,u.end,n,null,u,o);const l=f.contents.range[2],d=Vr(i,l,!1,o);return d.comment&&(f.comment=d.comment),f.range=[r,l,d.offset],f}function yr(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function Ko(t){var s;let e="",r=!1,n=!1;for(let i=0;i<t.length;++i){const o=t[i];switch(o[0]){case"#":e+=(e===""?"":n?`
100
+
101
+ `:`
102
+ `)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":((s=t[i+1])==null?void 0:s[0])!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}class ed{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,s,i)=>{const o=yr(r);i?this.warnings.push(new Ru(o,n,s)):this.errors.push(new vr(o,n,s))},this.directives=new ve({version:e.version||"1.2"}),this.options=e}decorate(e,r){const{comment:n,afterEmptyLine:s}=Ko(this.prelude);if(n){const i=e.contents;if(r)e.comment=e.comment?`${e.comment}
103
+ ${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(ce(i)&&!i.flow&&i.items.length>0){let o=i.items[0];le(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${n}
104
+ ${a}`:n}else{const o=i.commentBefore;i.commentBefore=o?`${n}
105
+ ${o}`:n}}if(r){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ko(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(const s of e)yield*this.next(s);yield*this.end(r,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(r,n,s)=>{const i=yr(e);i[0]+=r,this.onError(i,"BAD_DIRECTIVE",n,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const r=Zu(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new vr(yr(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new vr(yr(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const r=Vr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
106
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new vr(yr(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),s=new Lr(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,r,r],this.decorate(s,!1),yield s}}}const Sc="\uFEFF",jc="",Oc="",Ds="";function td(t){switch(t){case Sc:return"byte-order-mark";case jc:return"doc-mode";case Oc:return"flow-error-end";case Ds:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
107
+ `:case`\r
108
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Re(t){switch(t){case void 0:case" ":case`
109
+ `:case"\r":case" ":return!0;default:return!1}}const Bo=new Set("0123456789ABCDEFabcdef"),rd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),on=new Set(",[]{}"),nd=new Set(` ,[]{}
110
+ \r `),vs=t=>!t||nd.has(t);class sd{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
111
+ `?!0:r==="\r"?this.buffer[e+1]===`
112
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){const s=this.buffer[n+e+1];if(s===`
113
+ `||!s&&!this.atEnd)return e+n+1}return r===`
114
+ `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Re(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
115
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Sc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){const i=e[n-1];if(i===" "||i===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const i=e[r-1];if(i===" "||i===" ")r-=1;else break}const s=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield jc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&Re(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Re(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Re(r)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(vs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&s[0]!=="#"||n===0&&(s.startsWith("---")||s.startsWith("..."))&&Re(s[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Oc,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(vs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||Re(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let i=0;for(;this.buffer[r-1-i]==="\\";)i+=1;if(i%2===0)break;r=this.buffer.indexOf('"',r+1)}const n=this.buffer.substring(0,r);let s=n.indexOf(`
116
+ `,this.pos);if(s!==-1){for(;s!==-1;){const i=this.continueScalar(s+1);if(i===-1)break;s=n.indexOf(`
117
+ `,i)}s!==-1&&(r=s-(n[s-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Re(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":r+=1;break;case`
118
+ `:e=i,r=0;break;case"\r":{const o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
119
+ `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
120
+ `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(n=this.buffer[s];n===" ";)n=this.buffer[++s];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
121
+ `;)n=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);const a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
122
+ `&&i>=this.pos&&i+1+r>a)e=i;else break}while(!0);return yield Ds,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let r=this.pos-1,n=this.pos-1,s;for(;s=this.buffer[++n];)if(s===":"){const i=this.buffer[n+1];if(Re(i)||e&&on.has(i))break;r=n}else if(Re(s)){let i=this.buffer[n+1];if(s==="\r"&&(i===`
123
+ `?(n+=1,s=`
124
+ `,i=this.buffer[n+1]):r=n),i==="#"||e&&on.has(i))break;if(s===`
125
+ `){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&on.has(s))break;r=n}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Ds,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(vs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const r=this.flowLevel>0,n=this.charAt(1);if(Re(n)||r&&on.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Re(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(rd.has(r))r=this.buffer[++e];else if(r==="%"&&Bo.has(this.buffer[e+1])&&Bo.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
126
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
127
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");const s=r-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=r),s}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class id{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){const i=r+n>>1;this.lineStarts[i]<e?r=i+1:n=i}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};const s=this.lineStarts[r-1];return{line:r,col:e-s+1}}}}function tt(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function Ho(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function kc(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function an(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Nt(t){var r;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((r=t[++e])==null?void 0:r.type)==="space";);return t.splice(e,t.length)}function kn(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function Jo(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!tt(e.start,"explicit-key-ind")&&!tt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,kc(e.value)?e.value.end?kn(e.value.end,e.sep):e.value.end=e.sep:kn(e.start,e.sep),delete e.sep)}class od{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new sd,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const r=td(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&Jo(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{const s=n.items[n.items.length-1];if(s.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=r;else{Object.assign(s,{key:r,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=n.items[n.items.length-1];s.value?n.items.push({start:[],value:r}):s.value=r;break}case"flow-collection":{const s=n.items[n.items.length-1];!s||s.value?n.items.push({start:[],key:r,sep:[]}):s.sep?s.value=r:Object.assign(s,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const s=r.items[r.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Ho(s.start)===-1&&(r.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<r.indent))&&(n.type==="document"?n.end=s.start:n.items.push({start:s.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Ho(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const r=an(this.peek(2)),n=Nt(r);let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
128
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
129
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const s="end"in r.value?r.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){const s=e.items[e.items.length-2],i=(n=s==null?void 0:s.value)==null?void 0:n.end;if(Array.isArray(i)){kn(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(i&&r.sep&&!r.value){const a=[];for(let f=0;f<r.sep.length;++f){const c=r.sep[f];switch(c.type){case"newline":a.push(f);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(tt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(kc(r.key)&&!tt(r.sep,"newline")){const a=Nt(r.start),f=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:f,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(tt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const a=Nt(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):tt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);i||r.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!tt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){const s="end"in r.value?r.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){const s=e.items[e.items.length-2],i=(n=s==null?void 0:s.value)==null?void 0:n.end;if(Array.isArray(i)){kn(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||tt(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){const s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:s,sep:[]}):r.sep?this.stack.push(s):Object.assign(r,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const s=an(n),i=Nt(s);Jo(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
130
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
131
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=an(e),n=Nt(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=an(e),n=Nt(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ad(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new id||null,prettyErrors:e}}function cd(t,e={}){const{lineCounter:r,prettyErrors:n}=ad(e),s=new od(r==null?void 0:r.addNewLine),i=new ed(e);let o=null;for(const a of i.compose(s.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new vr(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(Fo(t,r)),o.warnings.forEach(Fo(t,r))),o}function Ic(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);const s=cd(t,r);if(!s)return null;if(s.warnings.forEach(i=>ec(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}function fd(t,e,r){let n=null;if(Array.isArray(e)&&(n=e),t===void 0){const{keepUndefined:s}={};if(!s)return}return Cr(t)&&!n?t.toString(r):new Lr(t,n,r).toString(r)}function Rr(t){if(t!==null){if(typeof t=="string"){if(t.trim()==="")return;try{return JSON.parse(t)}catch{const e=/^[^:]+:/.test(t),r=t.slice(0,50).trimStart().startsWith("{");return!e||r?void 0:Ic(t,{maxAliasCount:1e4,merge:!0})}}return ai(t),t}}function Ur(t,e={}){if(ai(t))return t;const r=Rr(t);return Array.isArray(r)?r:[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:Ka(r),...e}]}function Nc(t){return decodeURI(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function ld(t){return t.split("/").slice(1).map(Nc)}function Ac(t,e,r,n=[]){const s=structuredClone(t),i=Ur(s),o=qe(i),a=(r==null?void 0:r.specification)??o.specification;if(!Gt(a)){if(e!=null&&e.throwOnError)throw new Error($e.NO_CONTENT);return{valid:!1,errors:n,schema:a}}return Ls(a,i,o,new WeakSet,n,e),n=n.filter((f,c,u)=>c===u.findIndex(l=>l.message===f.message&&l.code===f.code)),{valid:n.length===0,errors:n,schema:a}}function Ls(t,e,r,n,s,i){var f;if(t===null||n.has(t))return;n.add(t);function o(c){return Ls(c.specification,e,c,n,s,i),c}const a=new Set;for(;t.$ref!==void 0;){if(a.has(t.$ref)){s.push({code:"SELF_REFERENCE",message:$e.SELF_REFERENCE.replace("%s",t.$ref)}),delete t.$ref;break}a.add(t.$ref);const u=Tc(t.$ref,i,r,e,o,s);if(typeof u!="object"||u===null)break;const l=t.$ref;delete t.$ref;for(const d of Object.keys(u))t[d]===void 0&&(t[d]=u[d]);l&&((f=i==null?void 0:i.onDereference)==null||f.call(i,{schema:t,ref:l,resolved:u}))}for(const c of Object.values(t))typeof c=="object"&&c!==null&&Ls(c,e,r,n,s,i)}function Tc(t,e,r,n,s,i){if(typeof t!="string"){if(e!=null&&e.throwOnError)throw new Error($e.INVALID_REFERENCE.replace("%s",t));i.push({code:"INVALID_REFERENCE",message:$e.INVALID_REFERENCE.replace("%s",t)});return}const[o,a]=t.split("#",2),f=o!==r.filename;if(o&&f){const u=n.find(l=>l.filename===o);if(!u){if(e!=null&&e.throwOnError)throw new Error($e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o));i.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:$e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o)});return}return a===void 0?u.specification:Tc(`#${a}`,e,s(u),n,s,i)}const c=ld(a);try{return c.reduce((u,l)=>{if(typeof u!="object"||u===null||!(l in u))throw new Error($e.INVALID_REFERENCE.replace("%s",t));return u[l]},r.specification)}catch{if(e!=null&&e.throwOnError)throw new Error($e.INVALID_REFERENCE.replace("%s",t));i.push({code:"INVALID_REFERENCE",message:$e.INVALID_REFERENCE.replace("%s",t)})}}function Rc(t,e){const r=Ur(t),n=qe(r),s=Ac(r,e);return{specification:n.specification,errors:s.errors,schema:s.schema,...oi(n.specification)}}function xc(t,e){const r=Ur(t);return{specification:Nr(qe(r).specification,n=>e(n)?n:void 0)}}function ud(t){try{return JSON.parse(t),!0}catch{return!1}}function dd(t){if(!t.includes(`
132
+ `))return!1;try{return Ic(t,{maxAliasCount:1e4}),!0}catch{return!1}}const pd=(t,e,r)=>{const[n,s]=t.split("#",2);if(n)return r.has(n)?s?s.startsWith("/")?`${r.get(n)}${s}`:r.get(`${n}#${s}`):r.get(n):void 0;if(s)return s.startsWith("/")?s.slice(1):r.get(`${e}#${s}`)},In=t=>{if(t&&typeof t=="object"&&t.$id&&typeof t.$id=="string")return t.$id},Go=t=>t.join("/"),Cc=(t,e="",r=[],n=new Map,s=new WeakSet)=>{if(typeof t!="object"||t===null||s.has(t))return n;s.add(t);const i=In(t);i&&n.set(i,Go(r));const o=i??e;t.$anchor&&typeof t.$anchor=="string"&&n.set(`${o}#${t.$anchor}`,Go(r));for(const a in t)typeof t[a]=="object"&&t[a]!==null&&Cc(t[a],o,[...r,a],n,s);return n};function Vs(t,e){return e.reduce((r,n)=>{var i;return r.value===void 0?{context:"",value:void 0}:typeof r.value!="object"||r.value===null?{context:"",value:void 0}:{context:In(r.value)??r.context,value:(i=r.value)==null?void 0:i[n]}},{context:"",value:t})}function rt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function md(t){if(!/^\s*(\{)/.test(t.slice(0,500)))return!1;try{const e=JSON.parse(t);return Gt(e)}catch{return!1}}function hd(t){return/^\s*(?:-\s*)?[\w\-]+\s*:\s*.+\n.*/.test(t)}function yd(t){return!rt(t)&&!hd(t)&&!md(t)}let Wo=()=>{var t=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(j,I)=>{for(var x in I)e(j,x,{get:I[x],enumerable:!0})},o=(j,I,x,U)=>{if(I&&typeof I=="object"||typeof I=="function")for(let J of n(I))!s.call(j,J)&&J!==x&&e(j,J,{get:()=>I[J],enumerable:!(U=r(I,J))||U.enumerable});return j},a=j=>o(e({},"__esModule",{value:!0}),j),f={};i(f,{default:()=>xl});var c=j=>Array.isArray(j),u=j=>typeof j=="function",l=j=>j.length===0,d=j=>typeof j=="number",p=j=>typeof j=="object"&&j!==null,h=j=>j instanceof RegExp,g=j=>typeof j=="string",m=j=>j===void 0,$=j=>{const I=new Map;return x=>{const U=I.get(x);if(U)return U;const J=j(x);return I.set(x,J),J}},v=(j,I,x={})=>{const U={cache:{},input:j,index:0,indexMax:0,options:x,output:[]};if(ie(I)(U)&&U.index===j.length)return U.output;throw new Error(`Failed to parse at index ${U.indexMax}`)},w=(j,I)=>c(j)?E(j,I):g(j)?M(j,I):O(j,I),E=(j,I)=>{const x={};for(const U of j){if(U.length!==1)throw new Error(`Invalid character: "${U}"`);const J=U.charCodeAt(0);x[J]=!0}return U=>{const J=U.index,ee=U.input;for(;U.index<ee.length&&ee.charCodeAt(U.index)in x;)U.index+=1;const oe=U.index;if(oe>J){if(!m(I)&&!U.options.silent){const Te=U.input.slice(J,oe),Le=u(I)?I(Te,ee,String(J)):I;m(Le)||U.output.push(Le)}U.indexMax=Math.max(U.indexMax,U.index)}return!0}},O=(j,I)=>{const x=j.source,U=j.flags.replace(/y|$/,"y"),J=new RegExp(x,U);return F(ee=>{J.lastIndex=ee.index;const oe=J.exec(ee.input);if(oe){if(!m(I)&&!ee.options.silent){const Te=u(I)?I(...oe,ee.input,String(ee.index)):I;m(Te)||ee.output.push(Te)}return ee.index+=oe[0].length,ee.indexMax=Math.max(ee.indexMax,ee.index),!0}else return!1})},M=(j,I)=>x=>{if(x.input.startsWith(j,x.index)){if(!m(I)&&!x.options.silent){const U=u(I)?I(j,x.input,String(x.index)):I;m(U)||x.output.push(U)}return x.index+=j.length,x.indexMax=Math.max(x.indexMax,x.index),!0}else return!1},C=(j,I,x,U)=>{const J=ie(j);return F(H(L(ee=>{let oe=0;for(;oe<x;){const Te=ee.index;if(!J(ee)||(oe+=1,ee.index===Te))break}return oe>=I})))},A=(j,I)=>C(j,0,1),z=(j,I)=>C(j,0,1/0),X=(j,I)=>{const x=j.map(ie);return F(H(L(U=>{for(let J=0,ee=x.length;J<ee;J++)if(!x[J](U))return!1;return!0})))},R=(j,I)=>{const x=j.map(ie);return F(H(U=>{for(let J=0,ee=x.length;J<ee;J++)if(x[J](U))return!0;return!1}))},L=(j,I=!1)=>{const x=ie(j);return U=>{const J=U.index,ee=U.output.length,oe=x(U);return(!oe||I)&&(U.index=J,U.output.length!==ee&&(U.output.length=ee)),oe}},H=(j,I)=>ie(j),F=(()=>{let j=0;return I=>{const x=ie(I),U=j+=1;return J=>{var Io;var ee;if(J.options.memoization===!1)return x(J);const oe=J.index,Te=(ee=J.cache)[U]||(ee[U]=new Map),Le=Te.get(oe);if(Le===!1)return!1;if(d(Le))return J.index=Le,!0;if(Le)return J.index=Le.index,(Io=Le.output)!=null&&Io.length&&J.output.push(...Le.output),!0;{const No=J.output.length;if(x(J)){const Ao=J.index,To=J.output.length;if(To>No){const Cl=J.output.slice(No,To);Te.set(oe,{index:Ao,output:Cl})}else Te.set(oe,Ao);return!0}else return Te.set(oe,!1),!1}}}})(),te=j=>{let I;return x=>(I||(I=ie(j())),I(x))},ie=$(j=>{if(u(j))return l(j)?te(j):j;if(g(j)||h(j))return w(j);if(c(j))return X(j);if(p(j))return R(Object.values(j));throw new Error("Invalid rule")}),pe="abcdefghijklmnopqrstuvwxyz",Se=j=>{let I="";for(;j>0;){const x=(j-1)%26;I=pe[x]+I,j=Math.floor((j-1)/26)}return I},je=j=>{let I=0;for(let x=0,U=j.length;x<U;x++)I=I*26+pe.indexOf(j[x])+1;return I},N=(j,I)=>{if(I<j)return N(I,j);const x=[];for(;j<=I;)x.push(j++);return x},_=(j,I,x)=>N(j,I).map(U=>String(U).padStart(x,"0")),k=(j,I)=>N(je(j),je(I)).map(Se),P=j=>j,y=j=>b(I=>v(I,j,{memoization:!1}).join("")),b=j=>{const I={};return x=>I[x]??(I[x]=j(x))},S=w(/^\*\*\/\*$/,".*"),q=w(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(j,I,x)=>`.*${I?"":"(?:^|/)"}${x.replaceAll(".","\\.")}`),V=w(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(j,I,x,U)=>`.*${I?"":"(?:^|/)"}${x.replaceAll(".","\\.")}(?:${U.replaceAll(",","|").replaceAll(".","\\.")})`),Q=w(/\\./,P),Z=w(/[$.*+?^(){}[\]\|]/,j=>`\\${j}`),ue=w(/./,P),Ge=w(/^(?:!!)*!(.*)$/,(j,I)=>`(?!^${ko(I)}$).*?`),ir=w(/^(!!)+/,""),or=R([Ge,ir]),ar=w(/\/(\*\*\/)+/,"(?:/.+/|/)"),cr=w(/^(\*\*\/)+/,"(?:^|.*/)"),fr=w(/\/(\*\*)$/,"(?:/.*|$)"),lr=w(/\*\*/,".*"),jt=R([ar,cr,fr,lr]),ur=w(/\*\/(?!\*\*\/)/,"[^/]*/"),dr=w(/\*/,"[^/]*"),Ot=R([ur,dr]),kt=w("?","[^/]"),pr=w("[",P),mr=w("]",P),ot=w(/[!^]/,"^/"),hr=w(/[a-z]-[a-z]|[0-9]-[0-9]/i,P),en=w(/[$.*+?^(){}[\|]/,j=>`\\${j}`),tn=w(/[^\]]/,P),ds=R([Q,en,hr,tn]),So=X([pr,A(ot),z(ds),mr]),fl=w("{","(?:"),ll=w("}",")"),ul=w(/(\d+)\.\.(\d+)/,(j,I,x)=>_(+I,+x,Math.min(I.length,x.length)).join("|")),dl=w(/([a-z]+)\.\.([a-z]+)/,(j,I,x)=>k(I,x).join("|")),pl=w(/([A-Z]+)\.\.([A-Z]+)/,(j,I,x)=>k(I.toLowerCase(),x.toLowerCase()).join("|").toUpperCase()),ml=R([ul,dl,pl]),jo=X([fl,ml,ll]),hl=w("{","(?:"),yl=w("}",")"),gl=w(",","|"),$l=w(/[$.*+?^(){[\]\|]/,j=>`\\${j}`),bl=w(/[^}]/,P),vl=te(()=>Oo),wl=R([jt,Ot,kt,So,jo,vl,Q,$l,gl,bl]),Oo=X([hl,z(wl),yl]),_l=z(R([S,q,V,or,jt,Ot,kt,So,jo,Oo,Q,Z,ue])),Pl=_l,El=y(Pl),ko=El,Sl=w(/\\./,P),jl=w(/./,P),Ol=w(/\*\*\*+/,"*"),kl=w(/([^/{[(!])\*\*/,(j,I)=>`${I}*`),Il=w(/(^|.)\*\*(?=[^*/)\]}])/,(j,I)=>`${I}*`),Nl=z(R([Sl,Ol,kl,Il,jl])),Al=Nl,Tl=y(Al),Rl=Tl,ps=(j,I)=>{const x=Array.isArray(j)?j:[j];if(!x.length)return!1;const U=x.map(ps.compile),J=x.every(oe=>/(\/(?:\*\*)?|\[\/\])$/.test(oe)),ee=I.replace(/[\\\/]+/g,"/").replace(/\/$/,J?"/":"");return U.some(oe=>oe.test(ee))};ps.compile=j=>new RegExp(`^${ko(Rl(j))}$`,"s");var xl=ps;return a(f)})();return t.default||t},ws;const gd=(t,e)=>(ws||(ws=Wo(),Wo=null),ws(t,e)),$d=/^[A-Za-z]:\//;function _t(t=""){return t&&t.replace(/\\/g,"/").replace($d,e=>e.toUpperCase())}const bd=/^[/\\]{2}/,vd=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Mc=/^[A-Za-z]:$/,Yo=/^\/([A-Za-z]:)?$/,wd=/.(\.[^./]+|\.)$/,_d=/^[/\\]|^[a-zA-Z]:[/\\]/,Pd="/",Pi=function(t){if(t.length===0)return".";t=_t(t);const e=t.match(bd),r=Bt(t),n=t[t.length-1]==="/";return t=Ei(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),Mc.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!Bt(t)?`/${t}`:t)},Ed=function(...t){let e="";for(const r of t)if(r)if(e.length>0){const n=e[e.length-1]==="/",s=r[0]==="/";n&&s?e+=r.slice(1):e+=n||s?r:`/${r}`}else e+=r;return Pi(e)};function Sd(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const Nn=function(...t){t=t.map(n=>_t(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const s=n>=0?t[n]:Sd();!s||s.length===0||(e=`${s}/${e}`,r=Bt(s))}return e=Ei(e,!r),r&&!Bt(e)?`/${e}`:e.length>0?e:"."};function Ei(t,e){let r="",n=0,s=-1,i=0,o=null;for(let a=0;a<=t.length;++a){if(a<t.length)o=t[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(s===a-1||i===1))if(i===2){if(r.length<2||n!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const f=r.lastIndexOf("/");f===-1?(r="",n=0):(r=r.slice(0,f),n=r.length-1-r.lastIndexOf("/")),s=a,i=0;continue}else if(r.length>0){r="",n=0,s=a,i=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(s+1,a)}`:r=t.slice(s+1,a),n=a-s-1;s=a,i=0}else o==="."&&i!==-1?++i:i=-1}return r}const Bt=function(t){return vd.test(t)},jd=function(t){return _t(t)},qc=function(t){if(t==="..")return"";const e=wd.exec(_t(t));return e&&e[1]||""},Od=function(t,e){const r=Nn(t).replace(Yo,"$1").split("/"),n=Nn(e).replace(Yo,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const s=[...r];for(const i of s){if(n[0]!==i)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},Dc=function(t){const e=_t(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Mc.test(e[0])&&(e[0]+="/"),e.join("/")||(Bt(t)?"/":".")},kd=function(t){const e=t.ext?t.ext.startsWith(".")?t.ext:`.${t.ext}`:"",r=[t.root,t.dir,t.base??(t.name??"")+e].filter(Boolean);return _t(t.root?Nn(...r):r.join("/"))},Lc=function(t,e){const r=_t(t).split("/");let n="";for(let s=r.length-1;s>=0;s--){const i=r[s];if(i){n=i;break}}return e&&n.endsWith(e)?n.slice(0,-e.length):n},Id=function(t){var s,i;const e=((i=(s=_d.exec(t))==null?void 0:s[0])==null?void 0:i.replace(/\\/g,"/"))||"",r=Lc(t),n=qc(r);return{root:e,dir:Dc(t),base:r,ext:n,name:r.slice(0,r.length-n.length)}},Nd=(t,e)=>gd(e,Pi(t)),Xo={__proto__:null,basename:Lc,dirname:Dc,extname:qc,format:kd,isAbsolute:Bt,join:Ed,matchesGlob:Nd,normalize:Pi,normalizeString:Ei,parse:Id,relative:Od,resolve:Nn,sep:Pd,toNamespacedPath:jd},Ad=(()=>{var t;return((t=globalThis.process)==null?void 0:t.platform)==="win32"?";":":"})(),Td={posix:void 0,win32:void 0},Vc=(t=Ad)=>new Proxy(Xo,{get(e,r){return r==="delimiter"?t:r==="posix"?he:r==="win32"?Rd:Td[r]||Xo[r]}}),he=Vc(":"),Rd=Vc(";"),xd=(t,e)=>{if(rt(e))return e;if(rt(t)){const r=new URL(t);return r.pathname=he.posix.resolve("/",he.dirname(r.pathname),e),r.toString()}return he.resolve(he.dirname(t),e)},Cd=new Set(["__proto__","prototype","constructor"]),Md=(t,e)=>{if(Cd.has(t)){const r=`Prototype pollution key detected: "${t}"`;throw new Error(r)}};function qd(t){return decodeURI(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function Si(t){return t.split("/").slice(1).map(qd)}function Us(t,e,r){if(e==="")throw new Error("Cannot set value at root ('') pointer");const n=Si(e);n.forEach(i=>Md(i));let s=t;for(let i=0;i<n.length;i++){const o=n[i],a=i===n.length-1,f=n[i+1],c=/^\d+$/.test(f??"");a?s[o]=r:((!(o in s)||typeof s[o]!="object")&&(s[o]=c?[]:{}),s=s[o])}}const Dd=(t,e)=>{if(rt(t)&&rt(e)){const s=new URL(t),i=new URL(e);if(s.origin!==i.origin)return t;const o=he.dirname(he.posix.resolve("/",i.pathname)),a=he.posix.resolve("/",s.pathname);return he.posix.relative(o,a)}if(rt(e)){const s=new URL(e),i=he.dirname(he.posix.resolve("/",s.pathname));return s.pathname=he.posix.relative(i,he.posix.resolve("/",t)),s.toString()}if(rt(t))return t;const r=he.dirname(he.resolve(e)),n=he.resolve(t);return he.relative(r,n)},Ld=t=>{let r=0,n=0;const s=t.length,i=s&15,o=s-i,a=2277735313,f=1291169091,c=1390208809,u=944331445;for(let l=0;l<o;l+=16){let d=t.charCodeAt(l)&255|(t.charCodeAt(l+1)&255)<<8|(t.charCodeAt(l+2)&255)<<16|(t.charCodeAt(l+3)&255)<<24,p=t.charCodeAt(l+4)&255|(t.charCodeAt(l+5)&255)<<8|(t.charCodeAt(l+6)&255)<<16|(t.charCodeAt(l+7)&255)<<24,h=t.charCodeAt(l+8)&255|(t.charCodeAt(l+9)&255)<<8|(t.charCodeAt(l+10)&255)<<16|(t.charCodeAt(l+11)&255)<<24,g=t.charCodeAt(l+12)&255|(t.charCodeAt(l+13)&255)<<8|(t.charCodeAt(l+14)&255)<<16|(t.charCodeAt(l+15)&255)<<24;d=Math.imul(d,a),d=d<<15|d>>>17,d=Math.imul(d,f),r^=d,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,p=Math.imul(p,f),p=p<<16|p>>>16,p=Math.imul(p,c),n^=p,n=n<<17|n>>>15,n=Math.imul(n,5)+461845907,h=Math.imul(h,c),h=h<<17|h>>>15,h=Math.imul(h,u),r^=h,r=r<<15|r>>>17,r=Math.imul(r,5)+1390208809,g=Math.imul(g,u),g=g<<18|g>>>14,g=Math.imul(g,a),n^=g,n=n<<13|n>>>19,n=Math.imul(n,5)+944331445}if(i>0){let l=0,d=0,p=0,h=0;i>=15&&(h^=(t.charCodeAt(o+14)&255)<<16),i>=14&&(h^=(t.charCodeAt(o+13)&255)<<8),i>=13&&(h^=t.charCodeAt(o+12)&255,h=Math.imul(h,u),h=h<<18|h>>>14,h=Math.imul(h,a),n^=h),i>=12&&(p^=(t.charCodeAt(o+11)&255)<<24),i>=11&&(p^=(t.charCodeAt(o+10)&255)<<16),i>=10&&(p^=(t.charCodeAt(o+9)&255)<<8),i>=9&&(p^=t.charCodeAt(o+8)&255,p=Math.imul(p,c),p=p<<17|p>>>15,p=Math.imul(p,u),r^=p),i>=8&&(d^=(t.charCodeAt(o+7)&255)<<24),i>=7&&(d^=(t.charCodeAt(o+6)&255)<<16),i>=6&&(d^=(t.charCodeAt(o+5)&255)<<8),i>=5&&(d^=t.charCodeAt(o+4)&255,d=Math.imul(d,f),d=d<<16|d>>>16,d=Math.imul(d,c),n^=d),i>=4&&(l^=(t.charCodeAt(o+3)&255)<<24),i>=3&&(l^=(t.charCodeAt(o+2)&255)<<16),i>=2&&(l^=(t.charCodeAt(o+1)&255)<<8),i>=1&&(l^=t.charCodeAt(o)&255,l=Math.imul(l,a),l=l<<15|l>>>17,l=Math.imul(l,f),r^=l)}return r^=s,n^=s,r+=n,n+=r,r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,n^=n>>>16,n=Math.imul(n,2246822507),n^=n>>>13,n=Math.imul(n,3266489909),n^=n>>>16,r+=n,n+=r,(r>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")};function Vd(t){const r=Ld(t).substring(0,7);return r.match(/^\d+$/)?"a"+r.substring(1):r}async function Uc(t,e,r,n,s=0){if(s>=100)throw"Can not generate unique compressed values";const o=await t(n??e);return r[o]!==void 0&&r[o]!==e?Uc(t,e,r,o,s+1):(r[o]=e,o)}const Ud=(t,e)=>{const r=Object.fromEntries(Object.entries(e).map(([n,s])=>[s,n]));return{generate:async n=>{const s=r[n];if(s)return s;const i=await Uc(t,n,e),o=i.match(/^\d+$/)?`a${i}`:i;return r[n]=o,o}}},Fd=t=>Gt(t)&&"$ref"in t&&typeof t.$ref=="string";function Fc(t){return t.startsWith("#")}function Qo(t,e){const r=e.find(n=>n.validate(t));return r?r.exec(t):Promise.resolve({ok:!1})}function Fs(t,e){if(!Fc(t))throw"Please provide an internal ref";return`#/${e.map(qn).join("/")}${t.substring(1)}`}function zs(t,e){if(Array.isArray(t)){t.forEach(r=>zs(r,e));return}if(Gt(t)&&(Object.values(t).forEach(r=>zs(r,e)),typeof t=="object"&&"$ref"in t&&typeof t.$ref=="string")){const r=t.$ref;if(!Fc(r))return;t.$ref=Fs(r,e)}}const Ks=(t,e,r,n,s,i=!1,o=new Set)=>{const a=Vs(e,Si(r)).value;if(o.has(a))return;o.add(a),Us(t,r,a);const f=c=>{if(!(!c||typeof c!="object")){"$ref"in c&&typeof c.$ref=="string"&&(c.$ref.startsWith(`#/${n}/${qn(s)}`)||i)&&Ks(t,e,c.$ref.substring(1),n,s,i,o);for(const u of Object.values(c))f(u)}};f(a)},_s={externalDocuments:"x-ext",externalDocumentsMappings:"x-ext-urls"};async function zd(t,e){e.externalDocumentsKey=e.externalDocumentsKey??_s.externalDocuments,e.externalDocumentsMappingsKey=e.externalDocumentsMappingsKey??_s.externalDocumentsMappings;const r=e.cache??new Map,n=e.plugins.filter(m=>m.type==="loader"),s=e.plugins.filter(m=>m.type==="lifecycle"),o=await(async()=>{if(typeof t!="string")return t;const m=await Qo(t,n);if(m.ok&&typeof m.data=="object")return m.data;throw new Error("Failed to resolve input: Please provide a valid string value or pass a loader to process the input")})(),a=e.root??o,f=Cc(a),c=e.root!==void 0&&e.root!==o||e.depth!==void 0,u=e.visitedNodes??new Set,d=(()=>{const m=In(a);return m||(e.origin?e.origin:typeof t!="string"?"/":rt(t)||yd(t)?t:"/")})();a[e.externalDocumentsMappingsKey]===void 0&&(a[e.externalDocumentsMappingsKey]={});const{generate:p}=Ud(e.compress??Vd,a[e.externalDocumentsMappingsKey]),h=async(m,...$)=>{var w;const v=(w=e.hooks)==null?void 0:w[m];v&&await v(...$);for(const E of s){const O=E[m];O&&await O(...$)}},g=async(m,$=d,v=!1,w=0,E=[],O=null)=>{if(e.depth!==void 0&&w>e.depth||!Gt(m)&&!Array.isArray(m)||u.has(m))return;u.add(m);const M={path:E,resolutionCache:r,parentNode:O,rootNode:a,loaders:n};await h("onBeforeNodeProcess",m,M);const C=In(m);if(Fd(m)){const A=m.$ref,z="$global"in m&&typeof m.$global=="boolean"&&m.$global,X=pd(A,C??$,f);if(X!==void 0){if(c){const Se=Si(`/${X}`),je=Se.length>0?Vs(a,Se.slice(0,-1)).value:void 0,N=Vs(a,Se);await g(N.value,N.context,v,w+1,Se,je)}await h("onAfterNodeProcess",m,M);return}const[R,L=""]=A.split("#",2),H=xd(C??$,R),F=Dd(H,d),te=await p(F),ie=r.has(F);ie||r.set(F,Qo(H,n)),await h("onResolveStart",m);const pe=await r.get(F);if(pe.ok){ie||(z||zs(pe.data,[_s.externalDocuments,te]),await g(pe.data,z?$:H,z,w+1,[e.externalDocumentsKey,te,a[e.externalDocumentsMappingsKey]]),Us(a,`/${e.externalDocumentsMappingsKey}/${qn(te)}`,F)),e.treeShake===!0?Ks(a,{[e.externalDocumentsKey]:{[te]:pe.data}},Fs(`#${L}`,[e.externalDocumentsKey,te]).substring(1),e.externalDocumentsKey,te):ie||Us(a,`/${e.externalDocumentsKey}/${te}`,pe.data),m.$ref=Fs(`#${L}`,[e.externalDocumentsKey,te]),await h("onResolveSuccess",m),await h("onAfterNodeProcess",m,M);return}return await h("onResolveError",m),await h("onAfterNodeProcess",m,M),console.warn(`Failed to resolve external reference "${H}". The reference may be invalid, inaccessible, or missing a loader for this type of reference.`)}for(const A in m)A===e.externalDocumentsKey||A===e.externalDocumentsMappingsKey||await g(m[A],C??$,v,w+1,[...E,A],m);await h("onAfterNodeProcess",m,M)};return await g(o),!e.urlMap&&!c&&delete a[e.externalDocumentsMappingsKey],o}const zc=(t,e)=>{for(const r in e)if(!(r in t))t[r]=e[r];else{const n=t[r],s=e[r];typeof n=="object"&&n!==null&&typeof s=="object"&&s!==null?zc(n,s):t[r]=s}return t};function Kd(t,e){const r=qa(t);return Ua(r)}function ji(t){return t?{specification:Kd(ai(t)?qe(t).specification:Rr(t)),version:"3.1"}:{specification:null,version:"3.1"}}const Bd=(t,e)=>{const r=[];for(const n of t)e.has(n)&&r.push(n);return r},cn=(t,e)=>Array.isArray(t)?t.length?t:e:typeof t=="object"&&t!==null?Object.keys(t).length?t:e:t??e,Zo=t=>{const e={},r=[];for(const n of t)if(typeof n=="object")for(const[s,i]of Object.entries(n)){if(!e[s]){e[s]=i;continue}const o=Bd(new Set(Object.keys(e[s])),new Set(Object.keys(i)));e[s]={...e[s],...i},o.forEach(a=>r.push({method:a,path:s}))}return{paths:e,conflicts:r}},Hd=t=>{const e=new Set,r=[];for(const n of t)for(const s of n)e.has(s.name)||r.push(s),e.add(s.name);return r},Jd=t=>{const e=new Set,r=[];for(const n of t)for(const s of n)e.has(s.url)||r.push(s),e.add(s.url);return r},Gd=t=>{const e={},r=[];for(const n of t)if(typeof n=="object")for(const[s,i]of Object.entries(n))for(const[o,a]of Object.entries(i))e[s]||(e[s]={}),e[s][o]?r.push({componentType:s,name:o}):e[s][o]=a;return{components:e,conflicts:r}},Wd=async(t,e)=>{for(const r of t.keys())await zd(t[r],{treeShake:!1,urlMap:!1,plugins:[{type:"lifecycle",onBeforeNodeProcess:n=>{const s=n.$ref;if(typeof s!="string"||!s.startsWith("#/components/"))return;const i=s.split("/");i.length<4||(i[3]=`${e[r]??""}${i[3]}`,n.$ref=i.join("/"))}},{type:"lifecycle",onBeforeNodeProcess:(n,s)=>{if(s.path.length===2&&s.path[0]==="components"){const i=e[r];Object.keys(n).forEach(o=>{const a=`${i??""}${o}`,f=n[o];delete n[o],n[a]=f})}}}]})},Yd=t=>t,Xd=async(t,e)=>{const r=t.map(h=>ji(h).specification);e!=null&&e.prefixComponents&&await Wd(r,e.prefixComponents),r.reverse();const n=r.reduce((h,g)=>g.info&&typeof g.info=="object"?zc(h,g.info):h,{}),{paths:s,conflicts:i}=Zo(r.map(h=>h.paths??{})),{paths:o,conflicts:a}=Zo(r.map(h=>h.webhooks??{})),f=Hd(r.map(h=>h.tags??[])),c=Jd(r.map(h=>h.servers??[])),{components:u,conflicts:l}=Gd(r.map(h=>h.components??{})),d=r.reduce((h,g)=>({...h,...g}),{}),p=[...i.map(h=>({type:"path",...h})),...a.map(h=>({type:"webhook",...h})),...l.map(h=>({type:"component",...h}))];return p.length?{ok:!1,conflicts:p}:{ok:!0,document:Yd({...d,info:n,paths:s,webhooks:cn(o,void 0),tags:cn(f,void 0),servers:cn(c,void 0),components:cn(u,void 0)})}};async function Oi(t,e){var f,c,u,l,d,p;const r=[];if((f=e==null?void 0:e.filesystem)!=null&&f.find(h=>h.filename===t))return{specification:(c=qe(e.filesystem))==null?void 0:c.specification,filesystem:e.filesystem,errors:r};const n=(u=e==null?void 0:e.plugins)==null?void 0:u.find(h=>h.check(t));let s=Rr(t);if(n)try{s=Rr(await n.get(t))}catch{if(e!=null&&e.throwOnError)throw new Error($e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",t));return r.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:$e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",t)}),{specification:null,filesystem:[],errors:r}}if(s===void 0){if(e!=null&&e.throwOnError)throw new Error("No content to load");return r.push({code:"NO_CONTENT",message:$e.NO_CONTENT}),{specification:null,filesystem:[],errors:r}}let i=Ur(s,{filename:(e==null?void 0:e.filename)??null});const a=(e!=null&&e.filename?i.find(h=>h.filename===(e==null?void 0:e.filename)):qe(i)).references??Ka(s);if(a.length===0)return{specification:(l=qe(i))==null?void 0:l.specification,filesystem:i,errors:r};for(const h of a){const g=(d=e==null?void 0:e.plugins)==null?void 0:d.find(w=>w.check(h));if(!g)continue;const m=g.check(h)&&g.resolvePath?g.resolvePath(t,h):h;if(i.find(w=>w.filename===h))continue;const{filesystem:$,errors:v}=await Oi(m,{...e,filename:h});r.push(...v),i=[...i,...$.map(w=>({...w,isEntrypoint:!1}))]}return{specification:(p=qe(i))==null?void 0:p.specification,filesystem:i,errors:r}}var Bs={exports:{}},gt={},Ne={},Ht={},Fr={},B={},xr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(v){if(super(),!t.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((w,E)=>`${w}${E}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((w,E)=>(E instanceof r&&(w[E.str]=(w[E.str]||0)+1),w),{})}}t._Code=n,t.nil=new n("");function s($,...v){const w=[$[0]];let E=0;for(;E<v.length;)a(w,v[E]),w.push($[++E]);return new n(w)}t._=s;const i=new n("+");function o($,...v){const w=[p($[0])];let E=0;for(;E<v.length;)w.push(i),a(w,v[E]),w.push(i,p($[++E]));return f(w),new n(w)}t.str=o;function a($,v){v instanceof n?$.push(...v._items):v instanceof r?$.push(v):$.push(l(v))}t.addCodeArg=a;function f($){let v=1;for(;v<$.length-1;){if($[v]===i){const w=c($[v-1],$[v+1]);if(w!==void 0){$.splice(v-1,3,w);continue}$[v++]="+"}v++}}function c($,v){if(v==='""')return $;if($==='""')return v;if(typeof $=="string")return v instanceof r||$[$.length-1]!=='"'?void 0:typeof v!="string"?`${$.slice(0,-1)}${v}"`:v[0]==='"'?$.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!($ instanceof r))return`"${$}${v.slice(1)}`}function u($,v){return v.emptyStr()?$:$.emptyStr()?v:o`${$}${v}`}t.strConcat=u;function l($){return typeof $=="number"||typeof $=="boolean"||$===null?$:p(Array.isArray($)?$.join(","):$)}function d($){return new n(p($))}t.stringify=d;function p($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=p;function h($){return typeof $=="string"&&t.IDENTIFIER.test($)?new n(`.${$}`):s`[${$}]`}t.getProperty=h;function g($){if(typeof $=="string"&&t.IDENTIFIER.test($))return new n(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}t.getEsmExportName=g;function m($){return new n($.toString())}t.regexpCode=m})(xr);var Hs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=xr;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,l;if(!((l=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||l===void 0)&&l.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=s;class i extends e.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:l}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(u)}[${l}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class a extends s{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?o:e.nil}}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,u){var l;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(c),{prefix:p}=d,h=(l=u.key)!==null&&l!==void 0?l:u.ref;let g=this._values[p];if(g){const v=g.get(h);if(v)return v}else g=this._values[p]=new Map;g.set(h,d);const m=this._scope[p]||(this._scope[p]=[]),$=m.length;return m[$]=u.ref,d.setValue(u,{property:p,itemIndex:$}),d}getValue(c,u){const l=this._values[c];if(l)return l.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return(0,e._)`${c}${l.scopePath}`})}scopeCode(c=this._values,u,l){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},u,l)}_reduceValues(c,u,l={},d){let p=e.nil;for(const h in c){const g=c[h];if(!g)continue;const m=l[h]=l[h]||new Map;g.forEach($=>{if(m.has($))return;m.set($,n.Started);let v=u($);if(v){const w=this.opts.es5?t.varKinds.var:t.varKinds.const;p=(0,e._)`${p}${w} ${$} = ${v};${this.opts._n}`}else if(v=d==null?void 0:d($))p=(0,e._)`${p}${v}${this.opts._n}`;else throw new r($);m.set($,n.Completed)})}return p}}t.ValueScope=a})(Hs);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=xr,r=Hs;var n=xr;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Hs;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(y,b){return this}}class o extends i{constructor(y,b,S){super(),this.varKind=y,this.name=b,this.rhs=S}render({es5:y,_n:b}){const S=y?r.varKinds.var:this.varKind,q=this.rhs===void 0?"":` = ${this.rhs}`;return`${S} ${this.name}${q};`+b}optimizeNames(y,b){if(y[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,y,b)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(y,b,S){super(),this.lhs=y,this.rhs=b,this.sideEffects=S}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,b){if(!(this.lhs instanceof e.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,y,b),this}get names(){const y=this.lhs instanceof e.Name?{}:{...this.lhs.names};return H(y,this.rhs)}}class f extends a{constructor(y,b,S,q){super(y,S,q),this.op=b}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class c extends i{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class u extends i{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class l extends i{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class d extends i{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,b){return this.code=F(this.code,y,b),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends i{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((b,S)=>b+S.render(y),"")}optimizeNodes(){const{nodes:y}=this;let b=y.length;for(;b--;){const S=y[b].optimizeNodes();Array.isArray(S)?y.splice(b,1,...S):S?y[b]=S:y.splice(b,1)}return y.length>0?this:void 0}optimizeNames(y,b){const{nodes:S}=this;let q=S.length;for(;q--;){const V=S[q];V.optimizeNames(y,b)||(te(y,V.names),S.splice(q,1))}return S.length>0?this:void 0}get names(){return this.nodes.reduce((y,b)=>L(y,b.names),{})}}class h extends p{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class g extends p{}class m extends h{}m.kind="else";class $ extends h{constructor(y,b){super(b),this.condition=y}render(y){let b=`if(${this.condition})`+super.render(y);return this.else&&(b+="else "+this.else.render(y)),b}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let b=this.else;if(b){const S=b.optimizeNodes();b=this.else=Array.isArray(S)?new m(S):S}if(b)return y===!1?b instanceof $?b:b.nodes:this.nodes.length?this:new $(ie(y),b instanceof $?[b]:b.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,b){var S;if(this.else=(S=this.else)===null||S===void 0?void 0:S.optimizeNames(y,b),!!(super.optimizeNames(y,b)||this.else))return this.condition=F(this.condition,y,b),this}get names(){const y=super.names;return H(y,this.condition),this.else&&L(y,this.else.names),y}}$.kind="if";class v extends h{}v.kind="for";class w extends v{constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,b){if(super.optimizeNames(y,b))return this.iteration=F(this.iteration,y,b),this}get names(){return L(super.names,this.iteration.names)}}class E extends v{constructor(y,b,S,q){super(),this.varKind=y,this.name=b,this.from=S,this.to=q}render(y){const b=y.es5?r.varKinds.var:this.varKind,{name:S,from:q,to:V}=this;return`for(${b} ${S}=${q}; ${S}<${V}; ${S}++)`+super.render(y)}get names(){const y=H(super.names,this.from);return H(y,this.to)}}class O extends v{constructor(y,b,S,q){super(),this.loop=y,this.varKind=b,this.name=S,this.iterable=q}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,b){if(super.optimizeNames(y,b))return this.iterable=F(this.iterable,y,b),this}get names(){return L(super.names,this.iterable.names)}}class M extends h{constructor(y,b,S){super(),this.name=y,this.args=b,this.async=S}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}M.kind="func";class C extends p{render(y){return"return "+super.render(y)}}C.kind="return";class A extends h{render(y){let b="try"+super.render(y);return this.catch&&(b+=this.catch.render(y)),this.finally&&(b+=this.finally.render(y)),b}optimizeNodes(){var y,b;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(y,b){var S,q;return super.optimizeNames(y,b),(S=this.catch)===null||S===void 0||S.optimizeNames(y,b),(q=this.finally)===null||q===void 0||q.optimizeNames(y,b),this}get names(){const y=super.names;return this.catch&&L(y,this.catch.names),this.finally&&L(y,this.finally.names),y}}class z extends h{constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}z.kind="catch";class X extends h{render(y){return"finally"+super.render(y)}}X.kind="finally";class R{constructor(y,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
133
+ `:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,b){const S=this._extScope.value(y,b);return(this._values[S.prefix]||(this._values[S.prefix]=new Set)).add(S),S}getScopeValue(y,b){return this._extScope.getValue(y,b)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,b,S,q){const V=this._scope.toName(b);return S!==void 0&&q&&(this._constants[V.str]=S),this._leafNode(new o(y,V,S)),V}const(y,b,S){return this._def(r.varKinds.const,y,b,S)}let(y,b,S){return this._def(r.varKinds.let,y,b,S)}var(y,b,S){return this._def(r.varKinds.var,y,b,S)}assign(y,b,S){return this._leafNode(new a(y,b,S))}add(y,b){return this._leafNode(new f(y,t.operators.ADD,b))}code(y){return typeof y=="function"?y():y!==e.nil&&this._leafNode(new d(y)),this}object(...y){const b=["{"];for(const[S,q]of y)b.length>1&&b.push(","),b.push(S),(S!==q||this.opts.es5)&&(b.push(":"),(0,e.addCodeArg)(b,q));return b.push("}"),new e._Code(b)}if(y,b,S){if(this._blockNode(new $(y)),b&&S)this.code(b).else().code(S).endIf();else if(b)this.code(b).endIf();else if(S)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new $(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(y,b){return this._blockNode(y),b&&this.code(b).endFor(),this}for(y,b){return this._for(new w(y),b)}forRange(y,b,S,q,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const Q=this._scope.toName(y);return this._for(new E(V,Q,b,S),()=>q(Q))}forOf(y,b,S,q=r.varKinds.const){const V=this._scope.toName(y);if(this.opts.es5){const Q=b instanceof e.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,e._)`${Q}.length`,Z=>{this.var(V,(0,e._)`${Q}[${Z}]`),S(V)})}return this._for(new O("of",q,V,b),()=>S(V))}forIn(y,b,S,q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${b})`,S);const V=this._scope.toName(y);return this._for(new O("in",q,V,b),()=>S(V))}endFor(){return this._endBlockNode(v)}label(y){return this._leafNode(new c(y))}break(y){return this._leafNode(new u(y))}return(y){const b=new C;if(this._blockNode(b),this.code(y),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(y,b,S){if(!b&&!S)throw new Error('CodeGen: "try" without "catch" and "finally"');const q=new A;if(this._blockNode(q),this.code(y),b){const V=this.name("e");this._currNode=q.catch=new z(V),b(V)}return S&&(this._currNode=q.finally=new X,this.code(S)),this._endBlockNode(z,X)}throw(y){return this._leafNode(new l(y))}block(y,b){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(b),this}endBlock(y){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const S=this._nodes.length-b;if(S<0||y!==void 0&&S!==y)throw new Error(`CodeGen: wrong number of nodes: ${S} vs ${y} expected`);return this._nodes.length=b,this}func(y,b=e.nil,S,q){return this._blockNode(new M(y,b,S)),q&&this.code(q).endFunc(),this}endFunc(){return this._endBlockNode(M)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,b){const S=this._currNode;if(S instanceof y||b&&S instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${y.kind}/${b.kind}`:y.kind}"`)}_elseNode(y){const b=this._currNode;if(!(b instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const b=this._nodes;b[b.length-1]=y}}t.CodeGen=R;function L(P,y){for(const b in y)P[b]=(P[b]||0)+(y[b]||0);return P}function H(P,y){return y instanceof e._CodeOrName?L(P,y.names):P}function F(P,y,b){if(P instanceof e.Name)return S(P);if(!q(P))return P;return new e._Code(P._items.reduce((V,Q)=>(Q instanceof e.Name&&(Q=S(Q)),Q instanceof e._Code?V.push(...Q._items):V.push(Q),V),[]));function S(V){const Q=b[V.str];return Q===void 0||y[V.str]!==1?V:(delete y[V.str],Q)}function q(V){return V instanceof e._Code&&V._items.some(Q=>Q instanceof e.Name&&y[Q.str]===1&&b[Q.str]!==void 0)}}function te(P,y){for(const b in y)P[b]=(P[b]||0)-(y[b]||0)}function ie(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,e._)`!${k(P)}`}t.not=ie;const pe=_(t.operators.AND);function Se(...P){return P.reduce(pe)}t.and=Se;const je=_(t.operators.OR);function N(...P){return P.reduce(je)}t.or=N;function _(P){return(y,b)=>y===e.nil?b:b===e.nil?y:(0,e._)`${k(y)} ${P} ${k(b)}`}function k(P){return P instanceof e.Name?P:(0,e._)`(${P})`}})(B);var T={};Object.defineProperty(T,"__esModule",{value:!0});T.checkStrictMode=T.getErrorPath=T.Type=T.useFunc=T.setEvaluated=T.evaluatedPropsToName=T.mergeEvaluated=T.eachItem=T.unescapeJsonPointer=T.escapeJsonPointer=T.escapeFragment=T.unescapeFragment=T.schemaRefOrVal=T.schemaHasRulesButRef=T.schemaHasRules=T.checkUnknownRules=T.alwaysValidSchema=T.toHash=void 0;const re=B,Qd=xr;function Zd(t){const e={};for(const r of t)e[r]=!0;return e}T.toHash=Zd;function ep(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Kc(t,e),!Bc(e,t.self.RULES.all))}T.alwaysValidSchema=ep;function Kc(t,e=t.schema){const{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;const s=n.RULES.keywords;for(const i in e)s[i]||Gc(t,`unknown keyword: "${i}"`)}T.checkUnknownRules=Kc;function Bc(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}T.schemaHasRules=Bc;function tp(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}T.schemaHasRulesButRef=tp;function rp({topSchemaRef:t,schemaPath:e},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,re._)`${r}`}return(0,re._)`${t}${e}${(0,re.getProperty)(n)}`}T.schemaRefOrVal=rp;function np(t){return Hc(decodeURIComponent(t))}T.unescapeFragment=np;function sp(t){return encodeURIComponent(ki(t))}T.escapeFragment=sp;function ki(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}T.escapeJsonPointer=ki;function Hc(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}T.unescapeJsonPointer=Hc;function ip(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}T.eachItem=ip;function ea({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(s,i,o,a)=>{const f=o===void 0?i:o instanceof re.Name?(i instanceof re.Name?t(s,i,o):e(s,i,o),o):i instanceof re.Name?(e(s,o,i),i):r(i,o);return a===re.Name&&!(f instanceof re.Name)?n(s,f):f}}T.mergeEvaluated={props:ea({mergeNames:(t,e,r)=>t.if((0,re._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,re._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,re._)`${r} || {}`).code((0,re._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,re._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,re._)`${r} || {}`),Ii(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Jc}),items:ea({mergeNames:(t,e,r)=>t.if((0,re._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,re._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,re._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,re._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Jc(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,re._)`{}`);return e!==void 0&&Ii(t,r,e),r}T.evaluatedPropsToName=Jc;function Ii(t,e,r){Object.keys(r).forEach(n=>t.assign((0,re._)`${e}${(0,re.getProperty)(n)}`,!0))}T.setEvaluated=Ii;const ta={};function op(t,e){return t.scopeValue("func",{ref:e,code:ta[e.code]||(ta[e.code]=new Qd._Code(e.code))})}T.useFunc=op;var Js;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Js||(T.Type=Js={}));function ap(t,e,r){if(t instanceof re.Name){const n=e===Js.Num;return r?n?(0,re._)`"[" + ${t} + "]"`:(0,re._)`"['" + ${t} + "']"`:n?(0,re._)`"/" + ${t}`:(0,re._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,re.getProperty)(t).toString():"/"+ki(t)}T.getErrorPath=ap;function Gc(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}T.checkStrictMode=Gc;var Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});const ge=B,cp={data:new ge.Name("data"),valCxt:new ge.Name("valCxt"),instancePath:new ge.Name("instancePath"),parentData:new ge.Name("parentData"),parentDataProperty:new ge.Name("parentDataProperty"),rootData:new ge.Name("rootData"),dynamicAnchors:new ge.Name("dynamicAnchors"),vErrors:new ge.Name("vErrors"),errors:new ge.Name("errors"),this:new ge.Name("this"),self:new ge.Name("self"),scope:new ge.Name("scope"),json:new ge.Name("json"),jsonPos:new ge.Name("jsonPos"),jsonLen:new ge.Name("jsonLen"),jsonPart:new ge.Name("jsonPart")};Ee.default=cp;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=B,r=T,n=Ee;t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,e.str)`"${m}" keyword must be ${$} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,$=t.keywordError,v,w){const{it:E}=m,{gen:O,compositeRule:M,allErrors:C}=E,A=l(m,$,v);w??(M||C)?f(O,A):c(E,(0,e._)`[${A}]`)}t.reportError=s;function i(m,$=t.keywordError,v){const{it:w}=m,{gen:E,compositeRule:O,allErrors:M}=w,C=l(m,$,v);f(E,C),O||M||c(w,n.default.vErrors)}t.reportExtraError=i;function o(m,$){m.assign(n.default.errors,$),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,e._)`${n.default.vErrors}.length`,$),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:m,keyword:$,schemaValue:v,data:w,errsCount:E,it:O}){if(E===void 0)throw new Error("ajv implementation error");const M=m.name("err");m.forRange("i",E,n.default.errors,C=>{m.const(M,(0,e._)`${n.default.vErrors}[${C}]`),m.if((0,e._)`${M}.instancePath === undefined`,()=>m.assign((0,e._)`${M}.instancePath`,(0,e.strConcat)(n.default.instancePath,O.errorPath))),m.assign((0,e._)`${M}.schemaPath`,(0,e.str)`${O.errSchemaPath}/${$}`),O.opts.verbose&&(m.assign((0,e._)`${M}.schema`,v),m.assign((0,e._)`${M}.data`,w))})}t.extendErrors=a;function f(m,$){const v=m.const("err",$);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${v}]`),(0,e._)`${n.default.vErrors}.push(${v})`),m.code((0,e._)`${n.default.errors}++`)}function c(m,$){const{gen:v,validateName:w,schemaEnv:E}=m;E.$async?v.throw((0,e._)`new ${m.ValidationError}(${$})`):(v.assign((0,e._)`${w}.errors`,$),v.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function l(m,$,v){const{createErrors:w}=m.it;return w===!1?(0,e._)`{}`:d(m,$,v)}function d(m,$,v={}){const{gen:w,it:E}=m,O=[p(E,v),h(m,v)];return g(m,$,O),w.object(...O)}function p({errorPath:m},{instancePath:$}){const v=$?(0,e.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,v)]}function h({keyword:m,it:{errSchemaPath:$}},{schemaPath:v,parentSchema:w}){let E=w?$:(0,e.str)`${$}/${m}`;return v&&(E=(0,e.str)`${E}${(0,r.getErrorPath)(v,r.Type.Str)}`),[u.schemaPath,E]}function g(m,{params:$,message:v},w){const{keyword:E,data:O,schemaValue:M,it:C}=m,{opts:A,propertyName:z,topSchemaRef:X,schemaPath:R}=C;w.push([u.keyword,E],[u.params,typeof $=="function"?$(m):$||(0,e._)`{}`]),A.messages&&w.push([u.message,typeof v=="function"?v(m):v]),A.verbose&&w.push([u.schema,M],[u.parentSchema,(0,e._)`${X}${R}`],[n.default.data,O]),z&&w.push([u.propertyName,z])}})(Fr);Object.defineProperty(Ht,"__esModule",{value:!0});Ht.boolOrEmptySchema=Ht.topBoolOrEmptySchema=void 0;const fp=Fr,lp=B,up=Ee,dp={message:"boolean schema is false"};function pp(t){const{gen:e,schema:r,validateName:n}=t;r===!1?Wc(t,!1):typeof r=="object"&&r.$async===!0?e.return(up.default.data):(e.assign((0,lp._)`${n}.errors`,null),e.return(!0))}Ht.topBoolOrEmptySchema=pp;function mp(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Wc(t)):r.var(e,!0)}Ht.boolOrEmptySchema=mp;function Wc(t,e){const{gen:r,data:n}=t,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,fp.reportError)(s,dp,void 0,e)}var de={},bt={};Object.defineProperty(bt,"__esModule",{value:!0});bt.getRules=bt.isJSONType=void 0;const hp=["string","number","integer","boolean","null","object","array"],yp=new Set(hp);function gp(t){return typeof t=="string"&&yp.has(t)}bt.isJSONType=gp;function $p(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}bt.getRules=$p;var He={};Object.defineProperty(He,"__esModule",{value:!0});He.shouldUseRule=He.shouldUseGroup=He.schemaHasRulesForType=void 0;function bp({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&Yc(t,n)}He.schemaHasRulesForType=bp;function Yc(t,e){return e.rules.some(r=>Xc(t,r))}He.shouldUseGroup=Yc;function Xc(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}He.shouldUseRule=Xc;Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;const vp=bt,wp=He,_p=Fr,W=B,Qc=T;var Ut;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ut||(de.DataType=Ut={}));function Pp(t){const e=Zc(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Pp;function Zc(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(vp.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=Zc;function Ep(t,e){const{gen:r,data:n,opts:s}=t,i=Sp(e,s.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,wp.schemaHasRulesForType)(t,e[0]));if(o){const a=Ni(e,n,s.strictNumbers,Ut.Wrong);r.if(a,()=>{i.length?jp(t,e,i):Ai(t)})}return o}de.coerceAndCheckDataType=Ep;const ef=new Set(["string","number","integer","boolean","null"]);function Sp(t,e){return e?t.filter(r=>ef.has(r)||e==="array"&&r==="array"):[]}function jp(t,e,r){const{gen:n,data:s,opts:i}=t,o=n.let("dataType",(0,W._)`typeof ${s}`),a=n.let("coerced",(0,W._)`undefined`);i.coerceTypes==="array"&&n.if((0,W._)`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,W._)`${s}[0]`).assign(o,(0,W._)`typeof ${s}`).if(Ni(e,s,i.strictNumbers),()=>n.assign(a,s))),n.if((0,W._)`${a} !== undefined`);for(const c of r)(ef.has(c)||c==="array"&&i.coerceTypes==="array")&&f(c);n.else(),Ai(t),n.endIf(),n.if((0,W._)`${a} !== undefined`,()=>{n.assign(s,a),Op(t,a)});function f(c){switch(c){case"string":n.elseIf((0,W._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,W._)`"" + ${s}`).elseIf((0,W._)`${s} === null`).assign(a,(0,W._)`""`);return;case"number":n.elseIf((0,W._)`${o} == "boolean" || ${s} === null
134
+ || (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,(0,W._)`+${s}`);return;case"integer":n.elseIf((0,W._)`${o} === "boolean" || ${s} === null
135
+ || (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,(0,W._)`+${s}`);return;case"boolean":n.elseIf((0,W._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf((0,W._)`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf((0,W._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf((0,W._)`${o} === "string" || ${o} === "number"
136
+ || ${o} === "boolean" || ${s} === null`).assign(a,(0,W._)`[${s}]`)}}}function Op({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,W._)`${e} !== undefined`,()=>t.assign((0,W._)`${e}[${r}]`,n))}function Gs(t,e,r,n=Ut.Correct){const s=n===Ut.Correct?W.operators.EQ:W.operators.NEQ;let i;switch(t){case"null":return(0,W._)`${e} ${s} null`;case"array":i=(0,W._)`Array.isArray(${e})`;break;case"object":i=(0,W._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=o((0,W._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=o();break;default:return(0,W._)`typeof ${e} ${s} ${t}`}return n===Ut.Correct?i:(0,W.not)(i);function o(a=W.nil){return(0,W.and)((0,W._)`typeof ${e} == "number"`,a,r?(0,W._)`isFinite(${e})`:W.nil)}}de.checkDataType=Gs;function Ni(t,e,r,n){if(t.length===1)return Gs(t[0],e,r,n);let s;const i=(0,Qc.toHash)(t);if(i.array&&i.object){const o=(0,W._)`typeof ${e} != "object"`;s=i.null?o:(0,W._)`!${e} || ${o}`,delete i.null,delete i.array,delete i.object}else s=W.nil;i.number&&delete i.integer;for(const o in i)s=(0,W.and)(s,Gs(o,e,r,n));return s}de.checkDataTypes=Ni;const kp={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,W._)`{type: ${t}}`:(0,W._)`{type: ${e}}`};function Ai(t){const e=Ip(t);(0,_p.reportError)(e,kp)}de.reportTypeError=Ai;function Ip(t){const{gen:e,data:r,schema:n}=t,s=(0,Qc.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:t}}var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.assignDefaults=void 0;const At=B,Np=T;function Ap(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const s in r)ra(t,s,r[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>ra(t,i,s.default))}Hn.assignDefaults=Ap;function ra(t,e,r){const{gen:n,compositeRule:s,data:i,opts:o}=t;if(r===void 0)return;const a=(0,At._)`${i}${(0,At.getProperty)(e)}`;if(s){(0,Np.checkStrictMode)(t,`default is ignored for: ${a}`);return}let f=(0,At._)`${a} === undefined`;o.useDefaults==="empty"&&(f=(0,At._)`${f} || ${a} === null || ${a} === ""`),n.if(f,(0,At._)`${a} = ${(0,At.stringify)(r)}`)}var Ue={},Y={};Object.defineProperty(Y,"__esModule",{value:!0});Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const se=B,Ti=T,Xe=Ee,Tp=T;function Rp(t,e){const{gen:r,data:n,it:s}=t;r.if(xi(r,n,e,s.opts.ownProperties),()=>{t.setParams({missingProperty:(0,se._)`${e}`},!0),t.error()})}Y.checkReportMissingProp=Rp;function xp({gen:t,data:e,it:{opts:r}},n,s){return(0,se.or)(...n.map(i=>(0,se.and)(xi(t,e,i,r.ownProperties),(0,se._)`${s} = ${i}`)))}Y.checkMissingProp=xp;function Cp(t,e){t.setParams({missingProperty:e},!0),t.error()}Y.reportMissingProp=Cp;function tf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,se._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=tf;function Ri(t,e,r){return(0,se._)`${tf(t)}.call(${e}, ${r})`}Y.isOwnProperty=Ri;function Mp(t,e,r,n){const s=(0,se._)`${e}${(0,se.getProperty)(r)} !== undefined`;return n?(0,se._)`${s} && ${Ri(t,e,r)}`:s}Y.propertyInData=Mp;function xi(t,e,r,n){const s=(0,se._)`${e}${(0,se.getProperty)(r)} === undefined`;return n?(0,se.or)(s,(0,se.not)(Ri(t,e,r))):s}Y.noPropertyInData=xi;function rf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Y.allSchemaProperties=rf;function qp(t,e){return rf(e).filter(r=>!(0,Ti.alwaysValidSchema)(t,e[r]))}Y.schemaProperties=qp;function Dp({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},a,f,c){const u=c?(0,se._)`${t}, ${e}, ${n}${s}`:e,l=[[Xe.default.instancePath,(0,se.strConcat)(Xe.default.instancePath,i)],[Xe.default.parentData,o.parentData],[Xe.default.parentDataProperty,o.parentDataProperty],[Xe.default.rootData,Xe.default.rootData]];o.opts.dynamicRef&&l.push([Xe.default.dynamicAnchors,Xe.default.dynamicAnchors]);const d=(0,se._)`${u}, ${r.object(...l)}`;return f!==se.nil?(0,se._)`${a}.call(${f}, ${d})`:(0,se._)`${a}(${d})`}Y.callValidateCode=Dp;const Lp=(0,se._)`new RegExp`;function Vp({gen:t,it:{opts:e}},r){const n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(r,n);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,se._)`${s.code==="new RegExp"?Lp:(0,Tp.useFunc)(t,s)}(${r}, ${n})`})}Y.usePattern=Vp;function Up(t){const{gen:e,data:r,keyword:n,it:s}=t,i=e.name("valid");if(s.allErrors){const a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(i,!0),o(()=>e.break()),i;function o(a){const f=e.const("len",(0,se._)`${r}.length`);e.forRange("i",0,f,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:Ti.Type.Num},i),e.if((0,se.not)(i),a)})}}Y.validateArray=Up;function Fp(t){const{gen:e,schema:r,keyword:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(f=>(0,Ti.alwaysValidSchema)(s,f))&&!s.opts.unevaluated)return;const o=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((f,c)=>{const u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(o,(0,se._)`${o} || ${a}`),t.mergeValidEvaluated(u,a)||e.if((0,se.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Y.validateUnion=Fp;Object.defineProperty(Ue,"__esModule",{value:!0});Ue.validateKeywordUsage=Ue.validSchemaType=Ue.funcKeywordCode=Ue.macroKeywordCode=void 0;const be=B,ft=Ee,zp=Y,Kp=Fr;function Bp(t,e){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=t,a=e.macro.call(o.self,s,i,o),f=nf(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");t.subschema({schema:a,schemaPath:be.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Ue.macroKeywordCode=Bp;function Hp(t,e){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:a,it:f}=t;Gp(f,e);const c=!a&&e.compile?e.compile.call(f.self,i,o,f):e.validate,u=nf(n,s,c),l=n.let("valid");t.block$data(l,d),t.ok((r=e.valid)!==null&&r!==void 0?r:l);function d(){if(e.errors===!1)g(),e.modifying&&na(t),m(()=>t.error());else{const $=e.async?p():h();e.modifying&&na(t),m(()=>Jp(t,$))}}function p(){const $=n.let("ruleErrs",null);return n.try(()=>g((0,be._)`await `),v=>n.assign(l,!1).if((0,be._)`${v} instanceof ${f.ValidationError}`,()=>n.assign($,(0,be._)`${v}.errors`),()=>n.throw(v))),$}function h(){const $=(0,be._)`${u}.errors`;return n.assign($,null),g(be.nil),$}function g($=e.async?(0,be._)`await `:be.nil){const v=f.opts.passContext?ft.default.this:ft.default.self,w=!("compile"in e&&!a||e.schema===!1);n.assign(l,(0,be._)`${$}${(0,zp.callValidateCode)(t,u,v,w)}`,e.modifying)}function m($){var v;n.if((0,be.not)((v=e.valid)!==null&&v!==void 0?v:l),$)}}Ue.funcKeywordCode=Hp;function na(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,be._)`${n.parentData}[${n.parentDataProperty}]`))}function Jp(t,e){const{gen:r}=t;r.if((0,be._)`Array.isArray(${e})`,()=>{r.assign(ft.default.vErrors,(0,be._)`${ft.default.vErrors} === null ? ${e} : ${ft.default.vErrors}.concat(${e})`).assign(ft.default.errors,(0,be._)`${ft.default.vErrors}.length`),(0,Kp.extendErrors)(t)},()=>t.error())}function Gp({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function nf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,be.stringify)(r)})}function Wp(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Ue.validSchemaType=Wp;function Yp({schema:t,opts:e,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(t[i])){const f=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(f);else throw new Error(f)}}Ue.validateKeywordUsage=Yp;var it={};Object.defineProperty(it,"__esModule",{value:!0});it.extendSubschemaMode=it.extendSubschemaData=it.getSubschema=void 0;const Ve=B,sf=T;function Xp(t,{keyword:e,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,Ve._)`${t.schemaPath}${(0,Ve.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Ve._)`${t.schemaPath}${(0,Ve.getProperty)(e)}${(0,Ve.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,sf.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}it.getSubschema=Xp;function Qp(t,e,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=e;if(r!==void 0){const{errorPath:c,dataPathArr:u,opts:l}=e,d=a.let("data",(0,Ve._)`${e.data}${(0,Ve.getProperty)(r)}`,!0);f(d),t.errorPath=(0,Ve.str)`${c}${(0,sf.getErrorPath)(r,n,l.jsPropertySyntax)}`,t.parentDataProperty=(0,Ve._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(s!==void 0){const c=s instanceof Ve.Name?s:a.let("data",s,!0);f(c),o!==void 0&&(t.propertyName=o)}i&&(t.dataTypes=i);function f(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}it.extendSubschemaData=Qp;function Zp(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(t.compositeRule=n),s!==void 0&&(t.createErrors=s),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}it.extendSubschemaMode=Zp;var ye={},of=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r},af={exports:{}},nt=af.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};vn(e,n,s,t,"",t)};nt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function vn(t,e,r,n,s,i,o,a,f,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,o,a,f,c);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in nt.arrayKeywords)for(var d=0;d<l.length;d++)vn(t,e,r,l[d],s+"/"+u+"/"+d,i,s,u,n,d)}else if(u in nt.propsKeywords){if(l&&typeof l=="object")for(var p in l)vn(t,e,r,l[p],s+"/"+u+"/"+em(p),i,s,u,n,p)}else(u in nt.keywords||t.allKeys&&!(u in nt.skipKeywords))&&vn(t,e,r,l,s+"/"+u,i,s,u,n)}r(n,s,i,o,a,f,c)}}function em(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var tm=af.exports;Object.defineProperty(ye,"__esModule",{value:!0});ye.getSchemaRefs=ye.resolveUrl=ye.normalizeId=ye._getFullPath=ye.getFullPath=ye.inlineRef=void 0;const rm=T,nm=of,sm=tm,im=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function om(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Ws(t):e?cf(t)<=e:!1}ye.inlineRef=om;const am=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ws(t){for(const e in t){if(am.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(Ws)||typeof r=="object"&&Ws(r))return!0}return!1}function cf(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!im.has(r)&&(typeof t[r]=="object"&&(0,rm.eachItem)(t[r],n=>e+=cf(n)),e===1/0))return 1/0}return e}function ff(t,e="",r){r!==!1&&(e=Ft(e));const n=t.parse(e);return lf(t,n)}ye.getFullPath=ff;function lf(t,e){return t.serialize(e).split("#")[0]+"#"}ye._getFullPath=lf;const cm=/#\/?$/;function Ft(t){return t?t.replace(cm,""):""}ye.normalizeId=Ft;function fm(t,e,r){return r=Ft(r),t.resolve(e,r)}ye.resolveUrl=fm;const lm=/^[a-z_][-a-z0-9._]*$/i;function um(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Ft(t[r]||e),i={"":s},o=ff(n,s,!1),a={},f=new Set;return sm(t,{allKeys:!0},(l,d,p,h)=>{if(h===void 0)return;const g=o+d;let m=i[h];typeof l[r]=="string"&&(m=$.call(this,l[r])),v.call(this,l.$anchor),v.call(this,l.$dynamicAnchor),i[d]=m;function $(w){const E=this.opts.uriResolver.resolve;if(w=Ft(m?E(m,w):w),f.has(w))throw u(w);f.add(w);let O=this.refs[w];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?c(l,O.schema,w):w!==Ft(g)&&(w[0]==="#"?(c(l,a[w],w),a[w]=l):this.refs[w]=g),w}function v(w){if(typeof w=="string"){if(!lm.test(w))throw new Error(`invalid anchor "${w}"`);$.call(this,`#${w}`)}}}),a;function c(l,d,p){if(d!==void 0&&!nm(l,d))throw u(p)}function u(l){return new Error(`reference "${l}" resolves to more than one schema`)}}ye.getSchemaRefs=um;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getData=Ne.KeywordCxt=Ne.validateFunctionCode=void 0;const uf=Ht,sa=de,Ci=He,An=de,dm=Hn,Sr=Ue,Ps=it,D=B,K=Ee,pm=ye,Je=T,gr=Fr;function mm(t){if(mf(t)&&(hf(t),pf(t))){gm(t);return}df(t,()=>(0,uf.topBoolOrEmptySchema)(t))}Ne.validateFunctionCode=mm;function df({gen:t,validateName:e,schema:r,schemaEnv:n,opts:s},i){s.code.es5?t.func(e,(0,D._)`${K.default.data}, ${K.default.valCxt}`,n.$async,()=>{t.code((0,D._)`"use strict"; ${ia(r,s)}`),ym(t,s),t.code(i)}):t.func(e,(0,D._)`${K.default.data}, ${hm(s)}`,n.$async,()=>t.code(ia(r,s)).code(i))}function hm(t){return(0,D._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${t.dynamicRef?(0,D._)`, ${K.default.dynamicAnchors}={}`:D.nil}}={}`}function ym(t,e){t.if(K.default.valCxt,()=>{t.var(K.default.instancePath,(0,D._)`${K.default.valCxt}.${K.default.instancePath}`),t.var(K.default.parentData,(0,D._)`${K.default.valCxt}.${K.default.parentData}`),t.var(K.default.parentDataProperty,(0,D._)`${K.default.valCxt}.${K.default.parentDataProperty}`),t.var(K.default.rootData,(0,D._)`${K.default.valCxt}.${K.default.rootData}`),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,D._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{t.var(K.default.instancePath,(0,D._)`""`),t.var(K.default.parentData,(0,D._)`undefined`),t.var(K.default.parentDataProperty,(0,D._)`undefined`),t.var(K.default.rootData,K.default.data),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,D._)`{}`)})}function gm(t){const{schema:e,opts:r,gen:n}=t;df(t,()=>{r.$comment&&e.$comment&&gf(t),_m(t),n.let(K.default.vErrors,null),n.let(K.default.errors,0),r.unevaluated&&$m(t),yf(t),Sm(t)})}function $m(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,D._)`${r}.evaluated`),e.if((0,D._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,D._)`${t.evaluated}.props`,(0,D._)`undefined`)),e.if((0,D._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,D._)`${t.evaluated}.items`,(0,D._)`undefined`))}function ia(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,D._)`/*# sourceURL=${r} */`:D.nil}function bm(t,e){if(mf(t)&&(hf(t),pf(t))){vm(t,e);return}(0,uf.boolOrEmptySchema)(t,e)}function pf({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function mf(t){return typeof t.schema!="boolean"}function vm(t,e){const{schema:r,gen:n,opts:s}=t;s.$comment&&r.$comment&&gf(t),Pm(t),Em(t);const i=n.const("_errs",K.default.errors);yf(t,i),n.var(e,(0,D._)`${i} === ${K.default.errors}`)}function hf(t){(0,Je.checkUnknownRules)(t),wm(t)}function yf(t,e){if(t.opts.jtd)return oa(t,[],!1,e);const r=(0,sa.getSchemaTypes)(t.schema),n=(0,sa.coerceAndCheckDataType)(t,r);oa(t,r,!n,e)}function wm(t){const{schema:e,errSchemaPath:r,opts:n,self:s}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Je.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function _m(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Je.checkStrictMode)(t,"default is ignored in the schema root")}function Pm(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,pm.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Em(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function gf({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(s.$comment===!0)t.code((0,D._)`${K.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){const o=(0,D.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,D._)`${K.default.self}.opts.$comment(${i}, ${o}, ${a}.schema)`)}}function Sm(t){const{gen:e,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=t;r.$async?e.if((0,D._)`${K.default.errors} === 0`,()=>e.return(K.default.data),()=>e.throw((0,D._)`new ${s}(${K.default.vErrors})`)):(e.assign((0,D._)`${n}.errors`,K.default.vErrors),i.unevaluated&&jm(t),e.return((0,D._)`${K.default.errors} === 0`))}function jm({gen:t,evaluated:e,props:r,items:n}){r instanceof D.Name&&t.assign((0,D._)`${e}.props`,r),n instanceof D.Name&&t.assign((0,D._)`${e}.items`,n)}function oa(t,e,r,n){const{gen:s,schema:i,data:o,allErrors:a,opts:f,self:c}=t,{RULES:u}=c;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,Je.schemaHasRulesButRef)(i,u))){s.block(()=>vf(t,"$ref",u.all.$ref.definition));return}f.jtd||Om(t,e),s.block(()=>{for(const d of u.rules)l(d);l(u.post)});function l(d){(0,Ci.shouldUseGroup)(i,d)&&(d.type?(s.if((0,An.checkDataType)(d.type,o,f.strictNumbers)),aa(t,d),e.length===1&&e[0]===d.type&&r&&(s.else(),(0,An.reportTypeError)(t)),s.endIf()):aa(t,d),a||s.if((0,D._)`${K.default.errors} === ${n||0}`))}}function aa(t,e){const{gen:r,schema:n,opts:{useDefaults:s}}=t;s&&(0,dm.assignDefaults)(t,e.type),r.block(()=>{for(const i of e.rules)(0,Ci.shouldUseRule)(n,i)&&vf(t,i.keyword,i.definition,e.type)})}function Om(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(km(t,e),t.opts.allowUnionTypes||Im(t,e),Nm(t,t.dataTypes))}function km(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{$f(t.dataTypes,r)||Mi(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Tm(t,e)}}function Im(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Mi(t,"use allowUnionTypes to allow union type keyword")}function Nm(t,e){const r=t.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,Ci.shouldUseRule)(t.schema,s)){const{type:i}=s.definition;i.length&&!i.some(o=>Am(e,o))&&Mi(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Am(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function $f(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Tm(t,e){const r=[];for(const n of t.dataTypes)$f(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Mi(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Je.checkStrictMode)(t,e,t.opts.strictTypes)}class bf{constructor(e,r,n){if((0,Sr.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Je.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",wf(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Sr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",K.default.errors))}result(e,r,n){this.failResult((0,D.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,D.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,D._)`${r} !== undefined && (${(0,D.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?gr.reportExtraError:gr.reportError)(this,this.def.error,r)}$dataError(){(0,gr.reportError)(this,this.def.$dataError||gr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,gr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=D.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=D.nil,r=D.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,D.or)((0,D._)`${s} === undefined`,r)),e!==D.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==D.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:n,def:s,it:i}=this;return(0,D.or)(o(),a());function o(){if(n.length){if(!(r instanceof D.Name))throw new Error("ajv implementation error");const f=Array.isArray(n)?n:[n];return(0,D._)`${(0,An.checkDataTypes)(f,r,i.opts.strictNumbers,An.DataType.Wrong)}`}return D.nil}function a(){if(s.validateSchema){const f=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,D._)`!${f}(${r})`}return D.nil}}subschema(e,r){const n=(0,Ps.getSubschema)(this.it,e);(0,Ps.extendSubschemaData)(n,this.it,e),(0,Ps.extendSubschemaMode)(n,e);const s={...this.it,...n,items:void 0,props:void 0};return bm(s,r),s}mergeEvaluated(e,r){const{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Je.mergeEvaluated.props(s,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Je.mergeEvaluated.items(s,e.items,n.items,r)))}mergeValidEvaluated(e,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(e,D.Name)),!0}}Ne.KeywordCxt=bf;function vf(t,e,r,n){const s=new bf(t,r,e);"code"in r?r.code(s,n):s.$data&&r.validate?(0,Sr.funcKeywordCode)(s,r):"macro"in r?(0,Sr.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,Sr.funcKeywordCode)(s,r)}const Rm=/^\/(?:[^~]|~0|~1)*$/,xm=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function wf(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let s,i;if(t==="")return K.default.rootData;if(t[0]==="/"){if(!Rm.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);s=t,i=K.default.rootData}else{const c=xm.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const u=+c[1];if(s=c[2],s==="#"){if(u>=e)throw new Error(f("property/index",u));return n[e-u]}if(u>e)throw new Error(f("data",u));if(i=r[e-u],!s)return i}let o=i;const a=s.split("/");for(const c of a)c&&(i=(0,D._)`${i}${(0,D.getProperty)((0,Je.unescapeJsonPointer)(c))}`,o=(0,D._)`${o} && ${i}`);return o;function f(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}Ne.getData=wf;var er={};Object.defineProperty(er,"__esModule",{value:!0});class Cm extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}er.default=Cm;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});const Es=ye;class Mm extends Error{constructor(e,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Es.resolveUrl)(e,r,n),this.missingSchema=(0,Es.normalizeId)((0,Es.getFullPath)(e,this.missingRef))}}Pt.default=Mm;var we={};Object.defineProperty(we,"__esModule",{value:!0});we.resolveSchema=we.getCompilingSchema=we.resolveRef=we.compileSchema=we.SchemaEnv=void 0;const xe=B,qm=er,at=Ee,Me=ye,ca=T,Dm=Ne;class Jn{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Me.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}we.SchemaEnv=Jn;function qi(t){const e=_f.call(this,t);if(e)return e;const r=(0,Me.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new xe.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let a;t.$async&&(a=o.scopeValue("Error",{ref:qm.default,code:(0,xe._)`require("ajv/dist/runtime/validation_error").default`}));const f=o.scopeName("validate");t.validateName=f;const c={gen:o,allErrors:this.opts.allErrors,data:at.default.data,parentData:at.default.parentData,parentDataProperty:at.default.parentDataProperty,dataNames:[at.default.data],dataPathArr:[xe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xe.stringify)(t.schema)}:{ref:t.schema}),validateName:f,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xe.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xe._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(t),(0,Dm.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const l=o.toString();u=`${o.scopeRefs(at.default.scope)}return ${l}`,this.opts.code.process&&(u=this.opts.code.process(u,t));const p=new Function(`${at.default.self}`,`${at.default.scope}`,u)(this,this.scope.get());if(this.scope.value(f,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:f,validateCode:l,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:g}=c;p.evaluated={props:h instanceof xe.Name?void 0:h,items:g instanceof xe.Name?void 0:g,dynamicProps:h instanceof xe.Name,dynamicItems:g instanceof xe.Name},p.source&&(p.source.evaluated=(0,xe.stringify)(p.evaluated))}return t.validate=p,t}catch(l){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),l}finally{this._compilations.delete(t)}}we.compileSchema=qi;function Lm(t,e,r){var n;r=(0,Me.resolveUrl)(this.opts.uriResolver,e,r);const s=t.refs[r];if(s)return s;let i=Fm.call(this,t,r);if(i===void 0){const o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(i=new Jn({schema:o,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=Vm.call(this,i)}we.resolveRef=Lm;function Vm(t){return(0,Me.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:qi.call(this,t)}function _f(t){for(const e of this._compilations)if(Um(e,t))return e}we.getCompilingSchema=_f;function Um(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Fm(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Gn.call(this,t,e)}function Gn(t,e){const r=this.opts.uriResolver.parse(e),n=(0,Me._getFullPath)(this.opts.uriResolver,r);let s=(0,Me.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===s)return Ss.call(this,r,t);const i=(0,Me.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){const a=Gn.call(this,t,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:Ss.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||qi.call(this,o),i===(0,Me.normalizeId)(e)){const{schema:a}=o,{schemaId:f}=this.opts,c=a[f];return c&&(s=(0,Me.resolveUrl)(this.opts.uriResolver,s,c)),new Jn({schema:a,schemaId:f,root:t,baseId:s})}return Ss.call(this,r,o)}}we.resolveSchema=Gn;const zm=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ss(t,{baseId:e,schema:r,root:n}){var s;if(((s=t.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const f=r[(0,ca.unescapeFragment)(a)];if(f===void 0)return;r=f;const c=typeof r=="object"&&r[this.opts.schemaId];!zm.has(a)&&c&&(e=(0,Me.resolveUrl)(this.opts.uriResolver,e,c))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,ca.schemaHasRulesButRef)(r,this.RULES)){const a=(0,Me.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=Gn.call(this,n,a)}const{schemaId:o}=this.opts;if(i=i||new Jn({schema:r,schemaId:o,root:n,baseId:e}),i.schema!==i.root.schema)return i}const Km="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Bm="Meta-schema for $data reference (JSON AnySchema extension proposal)",Hm="object",Jm=["$data"],Gm={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Wm=!1,Ym={$id:Km,description:Bm,type:Hm,required:Jm,properties:Gm,additionalProperties:Wm};var Di={},Wn={exports:{}};const Xm=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Pf=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Li=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ef=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Qm=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Sf(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}const Zm=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function fa(t){return t.length=0,!0}function eh(t,e,r){if(t.length){const n=Sf(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function th(t){let e=0;const r={error:!1,address:"",zone:""},n=[],s=[];let i=!1,o=!1,a=eh;for(let f=0;f<t.length;f++){const c=t[f];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!a(s,n,r))break;if(++e>7){r.error=!0;break}f>0&&t[f-1]===":"&&(i=!0),n.push(":");continue}else if(c==="%"){if(!a(s,n,r))break;a=fa}else{s.push(c);continue}}return s.length&&(a===fa?r.zone=s.join(""):o?n.push(s.join("")):n.push(Sf(s))),r.address=n.join(""),r}function jf(t){if(rh(t,":")<2)return{host:t,isIPV6:!1};const e=th(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function rh(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function nh(t){let e=t;const r=[];let n=-1,s=0;for(;s=e.length;){if(s===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(s===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(s===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}const sh={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},ih=/[@/?#:]/g,oh=/[@/?#]/g;function Of(t,e){const r=e?oh:ih;return r.lastIndex=0,t.replace(r,n=>sh[n])}function ah(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){const s=t.slice(n+1,n+3);if(Li(s)){const i=s.toUpperCase(),o=String.fromCharCode(parseInt(i,16));e&&Ef(o)?r+=o:r+="%"+i,n+=2;continue}}r+=t[n]}return r}function ch(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){const n=t.slice(r+1,r+3);if(Li(n)){const s=n.toUpperCase(),i=String.fromCharCode(parseInt(s,16));i!=="."&&Ef(i)?e+=i:e+="%"+s,r+=2;continue}}Qm(t[r])?e+=t[r]:e+=escape(t[r])}return e}function fh(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){const n=t.slice(r+1,r+3);if(Li(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function lh(t){const e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Pf(r)){const n=jf(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Of(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}var kf={nonSimpleDomain:Zm,recomposeAuthority:lh,reescapeHostDelimiters:Of,normalizePercentEncoding:ah,normalizePathEncoding:ch,escapePreservingEscapes:fh,removeDotSegments:nh,isIPv4:Pf,isUUID:Xm,normalizeIPv6:jf};const{isUUID:uh}=kf,dh=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function If(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Nf(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Af(t){const e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function ph(t){return t.secure=If(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function mh(t){if((t.port===(If(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function hh(t,e){if(!t.path)return t.error="URN can not be parsed",t;const r=t.path.match(dh);if(r){const n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];const s=`${n}:${e.nid||t.nid}`,i=Vi(s);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function yh(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");const r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),s=`${r}:${e.nid||n}`,i=Vi(s);i&&(t=i.serialize(t,e));const o=t,a=t.nss;return o.path=`${n||e.nid}:${a}`,e.skipEscape=!0,o}function gh(t,e){const r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!uh(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function $h(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e}const Tf={scheme:"http",domainHost:!0,parse:Nf,serialize:Af},bh={scheme:"https",domainHost:Tf.domainHost,parse:Nf,serialize:Af},wn={scheme:"ws",domainHost:!0,parse:ph,serialize:mh},vh={scheme:"wss",domainHost:wn.domainHost,parse:wn.parse,serialize:wn.serialize},wh={scheme:"urn",parse:hh,serialize:yh,skipNormalize:!0},_h={scheme:"urn:uuid",parse:gh,serialize:$h,skipNormalize:!0},Tn={http:Tf,https:bh,ws:wn,wss:vh,urn:wh,"urn:uuid":_h};Object.setPrototypeOf(Tn,null);function Vi(t){return t&&(Tn[t]||Tn[t.toLowerCase()])||void 0}var Ph={SCHEMES:Tn,getSchemeHandler:Vi};const{normalizeIPv6:Eh,removeDotSegments:wr,recomposeAuthority:Sh,normalizePercentEncoding:jh,normalizePathEncoding:Oh,escapePreservingEscapes:kh,reescapeHostDelimiters:Ih,isIPv4:Nh,nonSimpleDomain:Ah}=kf,{SCHEMES:Th,getSchemeHandler:Rf}=Ph;function Rh(t,e){return typeof t=="string"?t=Dh(t,e):typeof t=="object"&&(t=Jt(vt(t,e),e)),t}function xh(t,e,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},s=xf(Jt(t,n),Jt(e,n),n,!0);return n.skipEscape=!0,vt(s,n)}function xf(t,e,r,n){const s={};return n||(t=Jt(vt(t,r),r),e=Jt(vt(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=wr(e.path||""),s.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=wr(e.path||""),s.query=e.query):(e.path?(e.path[0]==="/"?s.path=wr(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?s.path="/"+e.path:t.path?s.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:s.path=e.path,s.path=wr(s.path)),s.query=e.query):(s.path=t.path,e.query!==void 0?s.query=e.query:s.query=t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function Ch(t,e,r){const n=la(t,r),s=la(e,r);return n!==void 0&&s!==void 0&&n.toLowerCase()===s.toLowerCase()}function vt(t,e){const r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),s=[],i=Rf(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=jh(r.path):(r.path=kh(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&s.push(r.scheme,":");const o=Sh(r);if(o!==void 0&&(n.reference!=="suffix"&&s.push("//"),s.push(o),r.path&&r.path[0]!=="/"&&s.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=wr(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),s.push(a)}return r.query!==void 0&&s.push("?",r.query),r.fragment!==void 0&&s.push("#",r.fragment),s.join("")}const Mh=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function qh(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Cf(t,e){const r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1,i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);const o=t.match(Mh);if(o){n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]);const a=qh(n,o);if(a!==void 0&&(n.error=n.error||a,s=!0),n.host)if(Nh(n.host)===!1){const u=Eh(n.host);n.host=u.host.toLowerCase(),i=u.isIPV6}else i=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const f=Rf(r.scheme||n.scheme);if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&n.host&&(r.domainHost||f&&f.domainHost)&&i===!1&&Ah(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(c){n.error=n.error||"Host's domain name can not be converted to ASCII: "+c}if((!f||f&&!f.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=Ih(unescape(n.host),i))),n.path&&(n.path=Oh(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}f&&f.parse&&f.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:s}}function Jt(t,e){return Cf(t,e).parsed}function Dh(t,e){return Mf(t,e).normalized}function Mf(t,e){const{parsed:r,malformedAuthorityOrPort:n}=Cf(t,e);return{normalized:n?t:vt(r,e),malformedAuthorityOrPort:n}}function la(t,e){if(typeof t=="string"){const{normalized:r,malformedAuthorityOrPort:n}=Mf(t,e);return n?void 0:r}if(typeof t=="object")return vt(t,e)}const Ui={SCHEMES:Th,normalize:Rh,resolve:xh,resolveComponent:xf,equal:Ch,serialize:vt,parse:Jt};Wn.exports=Ui;Wn.exports.default=Ui;Wn.exports.fastUri=Ui;var Lh=Wn.exports;Object.defineProperty(Di,"__esModule",{value:!0});const qf=Lh;qf.code='require("ajv/dist/runtime/uri").default';Di.default=qf;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Ne;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=er,s=Pt,i=bt,o=we,a=B,f=ye,c=de,u=T,l=Ym,d=Di,p=(N,_)=>new RegExp(N,_);p.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function w(N){var _,k,P,y,b,S,q,V,Q,Z,ue,Ge,ir,or,ar,cr,fr,lr,jt,ur,dr,Ot,kt,pr,mr;const ot=N.strict,hr=(_=N.code)===null||_===void 0?void 0:_.optimize,en=hr===!0||hr===void 0?1:hr||0,tn=(P=(k=N.code)===null||k===void 0?void 0:k.regExp)!==null&&P!==void 0?P:p,ds=(y=N.uriResolver)!==null&&y!==void 0?y:d.default;return{strictSchema:(S=(b=N.strictSchema)!==null&&b!==void 0?b:ot)!==null&&S!==void 0?S:!0,strictNumbers:(V=(q=N.strictNumbers)!==null&&q!==void 0?q:ot)!==null&&V!==void 0?V:!0,strictTypes:(Z=(Q=N.strictTypes)!==null&&Q!==void 0?Q:ot)!==null&&Z!==void 0?Z:"log",strictTuples:(Ge=(ue=N.strictTuples)!==null&&ue!==void 0?ue:ot)!==null&&Ge!==void 0?Ge:"log",strictRequired:(or=(ir=N.strictRequired)!==null&&ir!==void 0?ir:ot)!==null&&or!==void 0?or:!1,code:N.code?{...N.code,optimize:en,regExp:tn}:{optimize:en,regExp:tn},loopRequired:(ar=N.loopRequired)!==null&&ar!==void 0?ar:v,loopEnum:(cr=N.loopEnum)!==null&&cr!==void 0?cr:v,meta:(fr=N.meta)!==null&&fr!==void 0?fr:!0,messages:(lr=N.messages)!==null&&lr!==void 0?lr:!0,inlineRefs:(jt=N.inlineRefs)!==null&&jt!==void 0?jt:!0,schemaId:(ur=N.schemaId)!==null&&ur!==void 0?ur:"$id",addUsedSchema:(dr=N.addUsedSchema)!==null&&dr!==void 0?dr:!0,validateSchema:(Ot=N.validateSchema)!==null&&Ot!==void 0?Ot:!0,validateFormats:(kt=N.validateFormats)!==null&&kt!==void 0?kt:!0,unicodeRegExp:(pr=N.unicodeRegExp)!==null&&pr!==void 0?pr:!0,int32range:(mr=N.int32range)!==null&&mr!==void 0?mr:!0,uriResolver:ds}}class E{constructor(_={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,_=this.opts={..._,...w(_)};const{es5:k,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:k,lines:P}),this.logger=L(_.logger);const y=_.validateFormats;_.validateFormats=!1,this.RULES=(0,i.getRules)(),O.call(this,m,_,"NOT SUPPORTED"),O.call(this,$,_,"DEPRECATED","warn"),this._metaOpts=X.call(this),_.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),_.keywords&&z.call(this,_.keywords),typeof _.meta=="object"&&this.addMetaSchema(_.meta),C.call(this),_.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:_,meta:k,schemaId:P}=this.opts;let y=l;P==="id"&&(y={...l},y.id=y.$id,delete y.$id),k&&_&&this.addMetaSchema(y,y[P],!1)}defaultMeta(){const{meta:_,schemaId:k}=this.opts;return this.opts.defaultMeta=typeof _=="object"?_[k]||_:void 0}validate(_,k){let P;if(typeof _=="string"){if(P=this.getSchema(_),!P)throw new Error(`no schema with key or ref "${_}"`)}else P=this.compile(_);const y=P(k);return"$async"in P||(this.errors=P.errors),y}compile(_,k){const P=this._addSchema(_,k);return P.validate||this._compileSchemaEnv(P)}compileAsync(_,k){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return y.call(this,_,k);async function y(Z,ue){await b.call(this,Z.$schema);const Ge=this._addSchema(Z,ue);return Ge.validate||S.call(this,Ge)}async function b(Z){Z&&!this.getSchema(Z)&&await y.call(this,{$ref:Z},!0)}async function S(Z){try{return this._compileSchemaEnv(Z)}catch(ue){if(!(ue instanceof s.default))throw ue;return q.call(this,ue),await V.call(this,ue.missingSchema),S.call(this,Z)}}function q({missingSchema:Z,missingRef:ue}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${ue} cannot be resolved`)}async function V(Z){const ue=await Q.call(this,Z);this.refs[Z]||await b.call(this,ue.$schema),this.refs[Z]||this.addSchema(ue,Z,k)}async function Q(Z){const ue=this._loading[Z];if(ue)return ue;try{return await(this._loading[Z]=P(Z))}finally{delete this._loading[Z]}}}addSchema(_,k,P,y=this.opts.validateSchema){if(Array.isArray(_)){for(const S of _)this.addSchema(S,void 0,P,y);return this}let b;if(typeof _=="object"){const{schemaId:S}=this.opts;if(b=_[S],b!==void 0&&typeof b!="string")throw new Error(`schema ${S} must be string`)}return k=(0,f.normalizeId)(k||b),this._checkUnique(k),this.schemas[k]=this._addSchema(_,P,k,y,!0),this}addMetaSchema(_,k,P=this.opts.validateSchema){return this.addSchema(_,k,!0,P),this}validateSchema(_,k){if(typeof _=="boolean")return!0;let P;if(P=_.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(P,_);if(!y&&k){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return y}getSchema(_){let k;for(;typeof(k=M.call(this,_))=="string";)_=k;if(k===void 0){const{schemaId:P}=this.opts,y=new o.SchemaEnv({schema:{},schemaId:P});if(k=o.resolveSchema.call(this,y,_),!k)return;this.refs[_]=k}return k.validate||this._compileSchemaEnv(k)}removeSchema(_){if(_ instanceof RegExp)return this._removeAllSchemas(this.schemas,_),this._removeAllSchemas(this.refs,_),this;switch(typeof _){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const k=M.call(this,_);return typeof k=="object"&&this._cache.delete(k.schema),delete this.schemas[_],delete this.refs[_],this}case"object":{const k=_;this._cache.delete(k);let P=_[this.opts.schemaId];return P&&(P=(0,f.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(_){for(const k of _)this.addKeyword(k);return this}addKeyword(_,k){let P;if(typeof _=="string")P=_,typeof k=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),k.keyword=P);else if(typeof _=="object"&&k===void 0){if(k=_,P=k.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,P,k),!k)return(0,u.eachItem)(P,b=>te.call(this,b)),this;pe.call(this,k);const y={...k,type:(0,c.getJSONTypes)(k.type),schemaType:(0,c.getJSONTypes)(k.schemaType)};return(0,u.eachItem)(P,y.type.length===0?b=>te.call(this,b,y):b=>y.type.forEach(S=>te.call(this,b,y,S))),this}getKeyword(_){const k=this.RULES.all[_];return typeof k=="object"?k.definition:!!k}removeKeyword(_){const{RULES:k}=this;delete k.keywords[_],delete k.all[_];for(const P of k.rules){const y=P.rules.findIndex(b=>b.keyword===_);y>=0&&P.rules.splice(y,1)}return this}addFormat(_,k){return typeof k=="string"&&(k=new RegExp(k)),this.formats[_]=k,this}errorsText(_=this.errors,{separator:k=", ",dataVar:P="data"}={}){return!_||_.length===0?"No errors":_.map(y=>`${P}${y.instancePath} ${y.message}`).reduce((y,b)=>y+k+b)}$dataMetaSchema(_,k){const P=this.RULES.all;_=JSON.parse(JSON.stringify(_));for(const y of k){const b=y.split("/").slice(1);let S=_;for(const q of b)S=S[q];for(const q in P){const V=P[q];if(typeof V!="object")continue;const{$data:Q}=V.definition,Z=S[q];Q&&Z&&(S[q]=je(Z))}}return _}_removeAllSchemas(_,k){for(const P in _){const y=_[P];(!k||k.test(P))&&(typeof y=="string"?delete _[P]:y&&!y.meta&&(this._cache.delete(y.schema),delete _[P]))}}_addSchema(_,k,P,y=this.opts.validateSchema,b=this.opts.addUsedSchema){let S;const{schemaId:q}=this.opts;if(typeof _=="object")S=_[q];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof _!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(_);if(V!==void 0)return V;P=(0,f.normalizeId)(S||P);const Q=f.getSchemaRefs.call(this,_,P);return V=new o.SchemaEnv({schema:_,schemaId:q,meta:k,baseId:P,localRefs:Q}),this._cache.set(V.schema,V),b&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=V),y&&this.validateSchema(_,!0),V}_checkUnique(_){if(this.schemas[_]||this.refs[_])throw new Error(`schema with key or id "${_}" already exists`)}_compileSchemaEnv(_){if(_.meta?this._compileMetaSchema(_):o.compileSchema.call(this,_),!_.validate)throw new Error("ajv implementation error");return _.validate}_compileMetaSchema(_){const k=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,_)}finally{this.opts=k}}}E.ValidationError=n.default,E.MissingRefError=s.default,t.default=E;function O(N,_,k,P="error"){for(const y in N){const b=y;b in _&&this.logger[P](`${k}: option ${y}. ${N[b]}`)}}function M(N){return N=(0,f.normalizeId)(N),this.schemas[N]||this.refs[N]}function C(){const N=this.opts.schemas;if(N)if(Array.isArray(N))this.addSchema(N);else for(const _ in N)this.addSchema(N[_],_)}function A(){for(const N in this.opts.formats){const _=this.opts.formats[N];_&&this.addFormat(N,_)}}function z(N){if(Array.isArray(N)){this.addVocabulary(N);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const _ in N){const k=N[_];k.keyword||(k.keyword=_),this.addKeyword(k)}}function X(){const N={...this.opts};for(const _ of h)delete N[_];return N}const R={log(){},warn(){},error(){}};function L(N){if(N===!1)return R;if(N===void 0)return console;if(N.log&&N.warn&&N.error)return N;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function F(N,_){const{RULES:k}=this;if((0,u.eachItem)(N,P=>{if(k.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!H.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!_&&_.$data&&!("code"in _||"validate"in _))throw new Error('$data keyword must have "code" or "validate" function')}function te(N,_,k){var P;const y=_==null?void 0:_.post;if(k&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let S=y?b.post:b.rules.find(({type:V})=>V===k);if(S||(S={type:k,rules:[]},b.rules.push(S)),b.keywords[N]=!0,!_)return;const q={keyword:N,definition:{..._,type:(0,c.getJSONTypes)(_.type),schemaType:(0,c.getJSONTypes)(_.schemaType)}};_.before?ie.call(this,S,q,_.before):S.rules.push(q),b.all[N]=q,(P=_.implements)===null||P===void 0||P.forEach(V=>this.addKeyword(V))}function ie(N,_,k){const P=N.rules.findIndex(y=>y.keyword===k);P>=0?N.rules.splice(P,0,_):(N.rules.push(_),this.logger.warn(`rule ${k} is not defined`))}function pe(N){let{metaSchema:_}=N;_!==void 0&&(N.$data&&this.opts.$data&&(_=je(_)),N.validateSchema=this.compile(_,!0))}const Se={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function je(N){return{anyOf:[N,Se]}}})(gt);var Fi={},Yn={},zi={};Object.defineProperty(zi,"__esModule",{value:!0});const Vh={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};zi.default=Vh;var ze={};Object.defineProperty(ze,"__esModule",{value:!0});ze.callRef=ze.getValidate=void 0;const Uh=Pt,ua=Y,Pe=B,Tt=Ee,da=we,fn=T,Fh={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:n}=t,{baseId:s,schemaEnv:i,validateName:o,opts:a,self:f}=n,{root:c}=i;if((r==="#"||r==="#/")&&s===c.baseId)return l();const u=da.resolveRef.call(f,c,s,r);if(u===void 0)throw new Uh.default(n.opts.uriResolver,s,r);if(u instanceof da.SchemaEnv)return d(u);return p(u);function l(){if(i===c)return _n(t,o,i,i.$async);const h=e.scopeValue("root",{ref:c});return _n(t,(0,Pe._)`${h}.validate`,c,c.$async)}function d(h){const g=Df(t,h);_n(t,g,h,h.$async)}function p(h){const g=e.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,Pe.stringify)(h)}:{ref:h}),m=e.name("valid"),$=t.subschema({schema:h,dataTypes:[],schemaPath:Pe.nil,topSchemaRef:g,errSchemaPath:r},m);t.mergeEvaluated($),t.ok(m)}}};function Df(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Pe._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ze.getValidate=Df;function _n(t,e,r,n){const{gen:s,it:i}=t,{allErrors:o,schemaEnv:a,opts:f}=i,c=f.passContext?Tt.default.this:Pe.nil;n?u():l();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=s.let("valid");s.try(()=>{s.code((0,Pe._)`await ${(0,ua.callValidateCode)(t,e,c)}`),p(e),o||s.assign(h,!0)},g=>{s.if((0,Pe._)`!(${g} instanceof ${i.ValidationError})`,()=>s.throw(g)),d(g),o||s.assign(h,!1)}),t.ok(h)}function l(){t.result((0,ua.callValidateCode)(t,e,c),()=>p(e),()=>d(e))}function d(h){const g=(0,Pe._)`${h}.errors`;s.assign(Tt.default.vErrors,(0,Pe._)`${Tt.default.vErrors} === null ? ${g} : ${Tt.default.vErrors}.concat(${g})`),s.assign(Tt.default.errors,(0,Pe._)`${Tt.default.vErrors}.length`)}function p(h){var g;if(!i.opts.unevaluated)return;const m=(g=r==null?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(m&&!m.dynamicProps)m.props!==void 0&&(i.props=fn.mergeEvaluated.props(s,m.props,i.props));else{const $=s.var("props",(0,Pe._)`${h}.evaluated.props`);i.props=fn.mergeEvaluated.props(s,$,i.props,Pe.Name)}if(i.items!==!0)if(m&&!m.dynamicItems)m.items!==void 0&&(i.items=fn.mergeEvaluated.items(s,m.items,i.items));else{const $=s.var("items",(0,Pe._)`${h}.evaluated.items`);i.items=fn.mergeEvaluated.items(s,$,i.items,Pe.Name)}}}ze.callRef=_n;ze.default=Fh;Object.defineProperty(Yn,"__esModule",{value:!0});const zh=zi,Kh=ze,Bh=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zh.default,Kh.default];Yn.default=Bh;var Xn={},Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});const Rn=B,Qe=Rn.operators,xn={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},Hh={message:({keyword:t,schemaCode:e})=>(0,Rn.str)`must be ${xn[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Rn._)`{comparison: ${xn[t].okStr}, limit: ${e}}`},Jh={keyword:Object.keys(xn),type:"number",schemaType:"number",$data:!0,error:Hh,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Rn._)`${r} ${xn[e].fail} ${n} || isNaN(${r})`)}};Ki.default=Jh;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const jr=B,Gh={message:({schemaCode:t})=>(0,jr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,jr._)`{multipleOf: ${t}}`},Wh={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Gh,code(t){const{gen:e,data:r,schemaCode:n,it:s}=t,i=s.opts.multipleOfPrecision,o=e.let("res"),a=i?(0,jr._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,jr._)`${o} !== parseInt(${o})`;t.fail$data((0,jr._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};Qn.default=Wh;var Zn={},Bi={};Object.defineProperty(Bi,"__esModule",{value:!0});function Lf(t){const e=t.length;let r=0,n=0,s;for(;n<e;)r++,s=t.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=t.charCodeAt(n),(s&64512)===56320&&n++);return r}Bi.default=Lf;Lf.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(Zn,"__esModule",{value:!0});const lt=B,Yh=T,Xh=Bi,Qh={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,lt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,lt._)`{limit: ${t}}`},Zh={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Qh,code(t){const{keyword:e,data:r,schemaCode:n,it:s}=t,i=e==="maxLength"?lt.operators.GT:lt.operators.LT,o=s.opts.unicode===!1?(0,lt._)`${r}.length`:(0,lt._)`${(0,Yh.useFunc)(t.gen,Xh.default)}(${r})`;t.fail$data((0,lt._)`${o} ${i} ${n}`)}};Zn.default=Zh;var es={};Object.defineProperty(es,"__esModule",{value:!0});const ey=Y,ty=T,qt=B,ry={message:({schemaCode:t})=>(0,qt.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,qt._)`{pattern: ${t}}`},ny={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ry,code(t){const{gen:e,data:r,$data:n,schema:s,schemaCode:i,it:o}=t,a=o.opts.unicodeRegExp?"u":"";if(n){const{regExp:f}=o.opts.code,c=f.code==="new RegExp"?(0,qt._)`new RegExp`:(0,ty.useFunc)(e,f),u=e.let("valid");e.try(()=>e.assign(u,(0,qt._)`${c}(${i}, ${a}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,qt._)`!${u}`)}else{const f=(0,ey.usePattern)(t,s);t.fail$data((0,qt._)`!${f}.test(${r})`)}}};es.default=ny;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});const Or=B,sy={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Or.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Or._)`{limit: ${t}}`},iy={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:sy,code(t){const{keyword:e,data:r,schemaCode:n}=t,s=e==="maxProperties"?Or.operators.GT:Or.operators.LT;t.fail$data((0,Or._)`Object.keys(${r}).length ${s} ${n}`)}};ts.default=iy;var rs={};Object.defineProperty(rs,"__esModule",{value:!0});const $r=Y,kr=B,oy=T,ay={message:({params:{missingProperty:t}})=>(0,kr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,kr._)`{missingProperty: ${t}}`},cy={keyword:"required",type:"object",schemaType:"array",$data:!0,error:ay,code(t){const{gen:e,schema:r,schemaCode:n,data:s,$data:i,it:o}=t,{opts:a}=o;if(!i&&r.length===0)return;const f=r.length>=a.loopRequired;if(o.allErrors?c():u(),a.strictRequired){const p=t.parentSchema.properties,{definedProperties:h}=t.it;for(const g of r)if((p==null?void 0:p[g])===void 0&&!h.has(g)){const m=o.schemaEnv.baseId+o.errSchemaPath,$=`required property "${g}" is not defined at "${m}" (strictRequired)`;(0,oy.checkStrictMode)(o,$,o.opts.strictRequired)}}function c(){if(f||i)t.block$data(kr.nil,l);else for(const p of r)(0,$r.checkReportMissingProp)(t,p)}function u(){const p=e.let("missing");if(f||i){const h=e.let("valid",!0);t.block$data(h,()=>d(p,h)),t.ok(h)}else e.if((0,$r.checkMissingProp)(t,r,p)),(0,$r.reportMissingProp)(t,p),e.else()}function l(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,$r.noPropertyInData)(e,s,p,a.ownProperties),()=>t.error())})}function d(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,$r.propertyInData)(e,s,p,a.ownProperties)),e.if((0,kr.not)(h),()=>{t.error(),e.break()})},kr.nil)}}};rs.default=cy;var ns={};Object.defineProperty(ns,"__esModule",{value:!0});const Ir=B,fy={message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Ir.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Ir._)`{limit: ${t}}`},ly={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:fy,code(t){const{keyword:e,data:r,schemaCode:n}=t,s=e==="maxItems"?Ir.operators.GT:Ir.operators.LT;t.fail$data((0,Ir._)`${r}.length ${s} ${n}`)}};ns.default=ly;var ss={},zr={};Object.defineProperty(zr,"__esModule",{value:!0});const Vf=of;Vf.code='require("ajv/dist/runtime/equal").default';zr.default=Vf;Object.defineProperty(ss,"__esModule",{value:!0});const js=de,me=B,uy=T,dy=zr,py={message:({params:{i:t,j:e}})=>(0,me.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,me._)`{i: ${t}, j: ${e}}`},my={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:py,code(t){const{gen:e,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:a}=t;if(!n&&!s)return;const f=e.let("valid"),c=i.items?(0,js.getSchemaTypes)(i.items):[];t.block$data(f,u,(0,me._)`${o} === false`),t.ok(f);function u(){const h=e.let("i",(0,me._)`${r}.length`),g=e.let("j");t.setParams({i:h,j:g}),e.assign(f,!0),e.if((0,me._)`${h} > 1`,()=>(l()?d:p)(h,g))}function l(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function d(h,g){const m=e.name("item"),$=(0,js.checkDataTypes)(c,m,a.opts.strictNumbers,js.DataType.Wrong),v=e.const("indices",(0,me._)`{}`);e.for((0,me._)`;${h}--;`,()=>{e.let(m,(0,me._)`${r}[${h}]`),e.if($,(0,me._)`continue`),c.length>1&&e.if((0,me._)`typeof ${m} == "string"`,(0,me._)`${m} += "_"`),e.if((0,me._)`typeof ${v}[${m}] == "number"`,()=>{e.assign(g,(0,me._)`${v}[${m}]`),t.error(),e.assign(f,!1).break()}).code((0,me._)`${v}[${m}] = ${h}`)})}function p(h,g){const m=(0,uy.useFunc)(e,dy.default),$=e.name("outer");e.label($).for((0,me._)`;${h}--;`,()=>e.for((0,me._)`${g} = ${h}; ${g}--;`,()=>e.if((0,me._)`${m}(${r}[${h}], ${r}[${g}])`,()=>{t.error(),e.assign(f,!1).break($)})))}}};ss.default=my;var is={};Object.defineProperty(is,"__esModule",{value:!0});const Ys=B,hy=T,yy=zr,gy={message:"must be equal to constant",params:({schemaCode:t})=>(0,Ys._)`{allowedValue: ${t}}`},$y={keyword:"const",$data:!0,error:gy,code(t){const{gen:e,data:r,$data:n,schemaCode:s,schema:i}=t;n||i&&typeof i=="object"?t.fail$data((0,Ys._)`!${(0,hy.useFunc)(e,yy.default)}(${r}, ${s})`):t.fail((0,Ys._)`${i} !== ${r}`)}};is.default=$y;var os={};Object.defineProperty(os,"__esModule",{value:!0});const _r=B,by=T,vy=zr,wy={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,_r._)`{allowedValues: ${t}}`},_y={keyword:"enum",schemaType:"array",$data:!0,error:wy,code(t){const{gen:e,data:r,$data:n,schema:s,schemaCode:i,it:o}=t;if(!n&&s.length===0)throw new Error("enum must have non-empty array");const a=s.length>=o.opts.loopEnum;let f;const c=()=>f??(f=(0,by.useFunc)(e,vy.default));let u;if(a||n)u=e.let("valid"),t.block$data(u,l);else{if(!Array.isArray(s))throw new Error("ajv implementation error");const p=e.const("vSchema",i);u=(0,_r.or)(...s.map((h,g)=>d(p,g)))}t.pass(u);function l(){e.assign(u,!1),e.forOf("v",i,p=>e.if((0,_r._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function d(p,h){const g=s[h];return typeof g=="object"&&g!==null?(0,_r._)`${c()}(${r}, ${p}[${h}])`:(0,_r._)`${r} === ${g}`}}};os.default=_y;Object.defineProperty(Xn,"__esModule",{value:!0});const Py=Ki,Ey=Qn,Sy=Zn,jy=es,Oy=ts,ky=rs,Iy=ns,Ny=ss,Ay=is,Ty=os,Ry=[Py.default,Ey.default,Sy.default,jy.default,Oy.default,ky.default,Iy.default,Ny.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Ay.default,Ty.default];Xn.default=Ry;var Kr={},tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.validateAdditionalItems=void 0;const ut=B,Xs=T,xy={message:({params:{len:t}})=>(0,ut.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ut._)`{limit: ${t}}`},Cy={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:xy,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Xs.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Uf(t,n)}};function Uf(t,e){const{gen:r,schema:n,data:s,keyword:i,it:o}=t;o.items=!0;const a=r.const("len",(0,ut._)`${s}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ut._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Xs.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,ut._)`${a} <= ${e.length}`);r.if((0,ut.not)(c),()=>f(c)),t.ok(c)}function f(c){r.forRange("i",e.length,a,u=>{t.subschema({keyword:i,dataProp:u,dataPropType:Xs.Type.Num},c),o.allErrors||r.if((0,ut.not)(c),()=>r.break())})}}tr.validateAdditionalItems=Uf;tr.default=Cy;var Hi={},rr={};Object.defineProperty(rr,"__esModule",{value:!0});rr.validateTuple=void 0;const pa=B,Pn=T,My=Y,qy={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return Ff(t,"additionalItems",e);r.items=!0,!(0,Pn.alwaysValidSchema)(r,e)&&t.ok((0,My.validateArray)(t))}};function Ff(t,e,r=t.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:a}=t;u(s),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Pn.mergeEvaluated.items(n,r.length,a.items));const f=n.name("valid"),c=n.const("len",(0,pa._)`${i}.length`);r.forEach((l,d)=>{(0,Pn.alwaysValidSchema)(a,l)||(n.if((0,pa._)`${c} > ${d}`,()=>t.subschema({keyword:o,schemaProp:d,dataProp:d},f)),t.ok(f))});function u(l){const{opts:d,errSchemaPath:p}=a,h=r.length,g=h===l.minItems&&(h===l.maxItems||l[e]===!1);if(d.strictTuples&&!g){const m=`"${o}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Pn.checkStrictMode)(a,m,d.strictTuples)}}}rr.validateTuple=Ff;rr.default=qy;Object.defineProperty(Hi,"__esModule",{value:!0});const Dy=rr,Ly={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Dy.validateTuple)(t,"items")};Hi.default=Ly;var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});const ma=B,Vy=T,Uy=Y,Fy=tr,zy={message:({params:{len:t}})=>(0,ma.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ma._)`{limit: ${t}}`},Ky={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:zy,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:s}=r;n.items=!0,!(0,Vy.alwaysValidSchema)(n,e)&&(s?(0,Fy.validateAdditionalItems)(t,s):t.ok((0,Uy.validateArray)(t)))}};Ji.default=Ky;var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});const Oe=B,ln=T,By={message:({params:{min:t,max:e}})=>e===void 0?(0,Oe.str)`must contain at least ${t} valid item(s)`:(0,Oe.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Oe._)`{minContains: ${t}}`:(0,Oe._)`{minContains: ${t}, maxContains: ${e}}`},Hy={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:By,code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;let o,a;const{minContains:f,maxContains:c}=n;i.opts.next?(o=f===void 0?1:f,a=c):o=1;const u=e.const("len",(0,Oe._)`${s}.length`);if(t.setParams({min:o,max:a}),a===void 0&&o===0){(0,ln.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,ln.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ln.alwaysValidSchema)(i,r)){let g=(0,Oe._)`${u} >= ${o}`;a!==void 0&&(g=(0,Oe._)`${g} && ${u} <= ${a}`),t.pass(g);return}i.items=!0;const l=e.name("valid");a===void 0&&o===1?p(l,()=>e.if(l,()=>e.break())):o===0?(e.let(l,!0),a!==void 0&&e.if((0,Oe._)`${s}.length > 0`,d)):(e.let(l,!1),d()),t.result(l,()=>t.reset());function d(){const g=e.name("_valid"),m=e.let("count",0);p(g,()=>e.if(g,()=>h(m)))}function p(g,m){e.forRange("i",0,u,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:ln.Type.Num,compositeRule:!0},g),m()})}function h(g){e.code((0,Oe._)`${g}++`),a===void 0?e.if((0,Oe._)`${g} >= ${o}`,()=>e.assign(l,!0).break()):(e.if((0,Oe._)`${g} > ${a}`,()=>e.assign(l,!1).break()),o===1?e.assign(l,!0):e.if((0,Oe._)`${g} >= ${o}`,()=>e.assign(l,!0)))}}};Gi.default=Hy;var as={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=B,r=T,n=Y;t.error={message:({params:{property:f,depsCount:c,deps:u}})=>{const l=c===1?"property":"properties";return(0,e.str)`must have ${l} ${u} when property ${f} is present`},params:({params:{property:f,depsCount:c,deps:u,missingProperty:l}})=>(0,e._)`{property: ${f},
137
+ missingProperty: ${l},
138
+ depsCount: ${c},
139
+ deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(f){const[c,u]=i(f);o(f,c),a(f,u)}};function i({schema:f}){const c={},u={};for(const l in f){if(l==="__proto__")continue;const d=Array.isArray(f[l])?c:u;d[l]=f[l]}return[c,u]}function o(f,c=f.schema){const{gen:u,data:l,it:d}=f;if(Object.keys(c).length===0)return;const p=u.let("missing");for(const h in c){const g=c[h];if(g.length===0)continue;const m=(0,n.propertyInData)(u,l,h,d.opts.ownProperties);f.setParams({property:h,depsCount:g.length,deps:g.join(", ")}),d.allErrors?u.if(m,()=>{for(const $ of g)(0,n.checkReportMissingProp)(f,$)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(f,g,p)})`),(0,n.reportMissingProp)(f,p),u.else())}}t.validatePropertyDeps=o;function a(f,c=f.schema){const{gen:u,data:l,keyword:d,it:p}=f,h=u.name("valid");for(const g in c)(0,r.alwaysValidSchema)(p,c[g])||(u.if((0,n.propertyInData)(u,l,g,p.opts.ownProperties),()=>{const m=f.subschema({keyword:d,schemaProp:g},h);f.mergeValidEvaluated(m,h)},()=>u.var(h,!0)),f.ok(h))}t.validateSchemaDeps=a,t.default=s})(as);var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});const zf=B,Jy=T,Gy={message:"property name must be valid",params:({params:t})=>(0,zf._)`{propertyName: ${t.propertyName}}`},Wy={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Gy,code(t){const{gen:e,schema:r,data:n,it:s}=t;if((0,Jy.alwaysValidSchema)(s,r))return;const i=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),e.if((0,zf.not)(i),()=>{t.error(!0),s.allErrors||e.break()})}),t.ok(i)}};Wi.default=Wy;var cs={};Object.defineProperty(cs,"__esModule",{value:!0});const un=Y,Ce=B,Yy=Ee,dn=T,Xy={message:"must NOT have additional properties",params:({params:t})=>(0,Ce._)`{additionalProperty: ${t.additionalProperty}}`},Qy={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Xy,code(t){const{gen:e,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:f}=o;if(o.props=!0,f.removeAdditional!=="all"&&(0,dn.alwaysValidSchema)(o,r))return;const c=(0,un.allSchemaProperties)(n.properties),u=(0,un.allSchemaProperties)(n.patternProperties);l(),t.ok((0,Ce._)`${i} === ${Yy.default.errors}`);function l(){e.forIn("key",s,m=>{!c.length&&!u.length?h(m):e.if(d(m),()=>h(m))})}function d(m){let $;if(c.length>8){const v=(0,dn.schemaRefOrVal)(o,n.properties,"properties");$=(0,un.isOwnProperty)(e,v,m)}else c.length?$=(0,Ce.or)(...c.map(v=>(0,Ce._)`${m} === ${v}`)):$=Ce.nil;return u.length&&($=(0,Ce.or)($,...u.map(v=>(0,Ce._)`${(0,un.usePattern)(t,v)}.test(${m})`))),(0,Ce.not)($)}function p(m){e.code((0,Ce._)`delete ${s}[${m}]`)}function h(m){if(f.removeAdditional==="all"||f.removeAdditional&&r===!1){p(m);return}if(r===!1){t.setParams({additionalProperty:m}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,dn.alwaysValidSchema)(o,r)){const $=e.name("valid");f.removeAdditional==="failing"?(g(m,$,!1),e.if((0,Ce.not)($),()=>{t.reset(),p(m)})):(g(m,$),a||e.if((0,Ce.not)($),()=>e.break()))}}function g(m,$,v){const w={keyword:"additionalProperties",dataProp:m,dataPropType:dn.Type.Str};v===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,$)}}};cs.default=Qy;var Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});const Zy=Ne,ha=Y,Os=T,ya=cs,eg={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:s,it:i}=t;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ya.default.code(new Zy.KeywordCxt(i,ya.default,"additionalProperties"));const o=(0,ha.allSchemaProperties)(r);for(const l of o)i.definedProperties.add(l);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Os.mergeEvaluated.props(e,(0,Os.toHash)(o),i.props));const a=o.filter(l=>!(0,Os.alwaysValidSchema)(i,r[l]));if(a.length===0)return;const f=e.name("valid");for(const l of a)c(l)?u(l):(e.if((0,ha.propertyInData)(e,s,l,i.opts.ownProperties)),u(l),i.allErrors||e.else().var(f,!0),e.endIf()),t.it.definedProperties.add(l),t.ok(f);function c(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function u(l){t.subschema({keyword:"properties",schemaProp:l,dataProp:l},f)}}};Yi.default=eg;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});const ga=Y,pn=B,$a=T,ba=T,tg={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:s,it:i}=t,{opts:o}=i,a=(0,ga.allSchemaProperties)(r),f=a.filter(g=>(0,$a.alwaysValidSchema)(i,r[g]));if(a.length===0||f.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&s.properties,u=e.name("valid");i.props!==!0&&!(i.props instanceof pn.Name)&&(i.props=(0,ba.evaluatedPropsToName)(e,i.props));const{props:l}=i;d();function d(){for(const g of a)c&&p(g),i.allErrors?h(g):(e.var(u,!0),h(g),e.if(u))}function p(g){for(const m in c)new RegExp(g).test(m)&&(0,$a.checkStrictMode)(i,`property ${m} matches pattern ${g} (use allowMatchingProperties)`)}function h(g){e.forIn("key",n,m=>{e.if((0,pn._)`${(0,ga.usePattern)(t,g)}.test(${m})`,()=>{const $=f.includes(g);$||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:m,dataPropType:ba.Type.Str},u),i.opts.unevaluated&&l!==!0?e.assign((0,pn._)`${l}[${m}]`,!0):!$&&!i.allErrors&&e.if((0,pn.not)(u),()=>e.break())})})}}};Xi.default=tg;var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});const rg=T,ng={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,rg.alwaysValidSchema)(n,r)){t.fail();return}const s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Qi.default=ng;var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});const sg=Y,ig={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sg.validateUnion,error:{message:"must match a schema in anyOf"}};Zi.default=ig;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});const En=B,og=T,ag={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,En._)`{passingSchemas: ${t.passing}}`},cg={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:ag,code(t){const{gen:e,schema:r,parentSchema:n,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=e.let("valid",!1),a=e.let("passing",null),f=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(o,()=>t.reset(),()=>t.error(!0));function c(){i.forEach((u,l)=>{let d;(0,og.alwaysValidSchema)(s,u)?e.var(f,!0):d=t.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},f),l>0&&e.if((0,En._)`${f} && ${o}`).assign(o,!1).assign(a,(0,En._)`[${a}, ${l}]`).else(),e.if(f,()=>{e.assign(o,!0),e.assign(a,l),d&&t.mergeEvaluated(d,En.Name)})})}}};eo.default=cg;var to={};Object.defineProperty(to,"__esModule",{value:!0});const fg=T,lg={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=e.name("valid");r.forEach((i,o)=>{if((0,fg.alwaysValidSchema)(n,i))return;const a=t.subschema({keyword:"allOf",schemaProp:o},s);t.ok(s),t.mergeEvaluated(a)})}};to.default=lg;var ro={};Object.defineProperty(ro,"__esModule",{value:!0});const Cn=B,Kf=T,ug={message:({params:t})=>(0,Cn.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Cn._)`{failingKeyword: ${t.ifClause}}`},dg={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ug,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Kf.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=va(n,"then"),i=va(n,"else");if(!s&&!i)return;const o=e.let("valid",!0),a=e.name("_valid");if(f(),t.reset(),s&&i){const u=e.let("ifClause");t.setParams({ifClause:u}),e.if(a,c("then",u),c("else",u))}else s?e.if(a,c("then")):e.if((0,Cn.not)(a),c("else"));t.pass(o,()=>t.error(!0));function f(){const u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(u)}function c(u,l){return()=>{const d=t.subschema({keyword:u},a);e.assign(o,a),t.mergeValidEvaluated(d,o),l?e.assign(l,(0,Cn._)`${u}`):t.setParams({ifClause:u})}}}};function va(t,e){const r=t.schema[e];return r!==void 0&&!(0,Kf.alwaysValidSchema)(t,r)}ro.default=dg;var no={};Object.defineProperty(no,"__esModule",{value:!0});const pg=T,mg={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,pg.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};no.default=mg;Object.defineProperty(Kr,"__esModule",{value:!0});const hg=tr,yg=Hi,gg=rr,$g=Ji,bg=Gi,vg=as,wg=Wi,_g=cs,Pg=Yi,Eg=Xi,Sg=Qi,jg=Zi,Og=eo,kg=to,Ig=ro,Ng=no;function Ag(t=!1){const e=[Sg.default,jg.default,Og.default,kg.default,Ig.default,Ng.default,wg.default,_g.default,vg.default,Pg.default,Eg.default];return t?e.push(yg.default,$g.default):e.push(hg.default,gg.default),e.push(bg.default),e}Kr.default=Ag;var Br={},so={};Object.defineProperty(so,"__esModule",{value:!0});const ae=B,Tg={message:({schemaCode:t})=>(0,ae.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ae._)`{format: ${t}}`},Rg={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Tg,code(t,e){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:a}=t,{opts:f,errSchemaPath:c,schemaEnv:u,self:l}=a;if(!f.validateFormats)return;s?d():p();function d(){const h=r.scopeValue("formats",{ref:l.formats,code:f.code.formats}),g=r.const("fDef",(0,ae._)`${h}[${o}]`),m=r.let("fType"),$=r.let("format");r.if((0,ae._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(m,(0,ae._)`${g}.type || "string"`).assign($,(0,ae._)`${g}.validate`),()=>r.assign(m,(0,ae._)`"string"`).assign($,g)),t.fail$data((0,ae.or)(v(),w()));function v(){return f.strictSchema===!1?ae.nil:(0,ae._)`${o} && !${$}`}function w(){const E=u.$async?(0,ae._)`(${g}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,ae._)`${$}(${n})`,O=(0,ae._)`(typeof ${$} == "function" ? ${E} : ${$}.test(${n}))`;return(0,ae._)`${$} && ${$} !== true && ${m} === ${e} && !${O}`}}function p(){const h=l.formats[i];if(!h){v();return}if(h===!0)return;const[g,m,$]=w(h);g===e&&t.pass(E());function v(){if(f.strictSchema===!1){l.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function w(O){const M=O instanceof RegExp?(0,ae.regexpCode)(O):f.code.formats?(0,ae._)`${f.code.formats}${(0,ae.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:O,code:M});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,ae._)`${C}.validate`]:["string",O,C]}function E(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,ae._)`await ${$}(${n})`}return typeof m=="function"?(0,ae._)`${$}(${n})`:(0,ae._)`${$}.test(${n})`}}}};so.default=Rg;Object.defineProperty(Br,"__esModule",{value:!0});const xg=so,Cg=[xg.default];Br.default=Cg;var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.contentVocabulary=wt.metadataVocabulary=void 0;wt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Fi,"__esModule",{value:!0});const Mg=Yn,qg=Xn,Dg=Kr,Lg=Br,wa=wt,Vg=[Mg.default,qg.default,(0,Dg.default)(),Lg.default,wa.metadataVocabulary,wa.contentVocabulary];Fi.default=Vg;var Hr={},fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.DiscrError=void 0;var _a;(function(t){t.Tag="tag",t.Mapping="mapping"})(_a||(fs.DiscrError=_a={}));Object.defineProperty(Hr,"__esModule",{value:!0});const Rt=B,Qs=fs,Pa=we,Ug=Pt,Fg=T,zg={message:({params:{discrError:t,tagName:e}})=>t===Qs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Rt._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Kg={keyword:"discriminator",type:"object",schemaType:"object",error:zg,code(t){const{gen:e,data:r,schema:n,parentSchema:s,it:i}=t,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const f=e.let("valid",!1),c=e.const("tag",(0,Rt._)`${r}${(0,Rt.getProperty)(a)}`);e.if((0,Rt._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:Qs.DiscrError.Tag,tag:c,tagName:a})),t.ok(f);function u(){const p=d();e.if(!1);for(const h in p)e.elseIf((0,Rt._)`${c} === ${h}`),e.assign(f,l(p[h]));e.else(),t.error(!1,{discrError:Qs.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function l(p){const h=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(g,Rt.Name),h}function d(){var p;const h={},g=$(s);let m=!0;for(let E=0;E<o.length;E++){let O=o[E];if(O!=null&&O.$ref&&!(0,Fg.schemaHasRulesButRef)(O,i.self.RULES)){const C=O.$ref;if(O=Pa.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C),O instanceof Pa.SchemaEnv&&(O=O.schema),O===void 0)throw new Ug.default(i.opts.uriResolver,i.baseId,C)}const M=(p=O==null?void 0:O.properties)===null||p===void 0?void 0:p[a];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);m=m&&(g||$(O)),v(M,E)}if(!m)throw new Error(`discriminator: "${a}" must be required`);return h;function $({required:E}){return Array.isArray(E)&&E.includes(a)}function v(E,O){if(E.const)w(E.const,O);else if(E.enum)for(const M of E.enum)w(M,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(E,O){if(typeof E!="string"||E in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[E]=O}}}};Hr.default=Kg;const Bg="http://json-schema.org/draft-07/schema#",Hg="http://json-schema.org/draft-07/schema#",Jg="Core schema meta-schema",Gg={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:[]}},Wg=["object","boolean"],Yg={$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:"#"}},Xg={$schema:Bg,$id:Hg,title:Jg,definitions:Gg,type:Wg,properties:Yg,default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=gt,n=Fi,s=Hr,i=Xg,o=["/properties"],a="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=f,t.exports=e=f,t.exports.Ajv=f,Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var c=Ne;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=er;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=Pt;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Bs,Bs.exports);var Bf=Bs.exports;const Qg=Mn.getDefaultExportFromCjs(Bf);var Zs={exports:{}},io={},oo={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.dynamicAnchor=void 0;const ks=B,Zg=Ee,Ea=we,e$=ze,t$={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Hf(t,t.schema)};function Hf(t,e){const{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;const s=(0,ks._)`${Zg.default.dynamicAnchors}${(0,ks.getProperty)(e)}`,i=n.errSchemaPath==="#"?n.validateName:r$(t);r.if((0,ks._)`!${s}`,()=>r.assign(s,i))}nr.dynamicAnchor=Hf;function r$(t){const{schemaEnv:e,schema:r,self:n}=t.it,{root:s,baseId:i,localRefs:o,meta:a}=e.root,{schemaId:f}=n.opts,c=new Ea.SchemaEnv({schema:r,schemaId:f,root:s,baseId:i,localRefs:o,meta:a});return Ea.compileSchema.call(n,c),(0,e$.getValidate)(t,c)}nr.default=t$;var sr={};Object.defineProperty(sr,"__esModule",{value:!0});sr.dynamicRef=void 0;const Sa=B,n$=Ee,ja=ze,s$={keyword:"$dynamicRef",schemaType:"string",code:t=>Jf(t,t.schema)};function Jf(t,e){const{gen:r,keyword:n,it:s}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const i=e.slice(1);if(s.allErrors)o();else{const f=r.let("valid",!1);o(f),t.ok(f)}function o(f){if(s.schemaEnv.root.dynamicAnchors[i]){const c=r.let("_v",(0,Sa._)`${n$.default.dynamicAnchors}${(0,Sa.getProperty)(i)}`);r.if(c,a(c,f),a(s.validateName,f))}else a(s.validateName,f)()}function a(f,c){return c?()=>r.block(()=>{(0,ja.callRef)(t,f),r.let(c,!0)}):()=>(0,ja.callRef)(t,f)}}sr.dynamicRef=Jf;sr.default=s$;var ao={};Object.defineProperty(ao,"__esModule",{value:!0});const i$=nr,o$=T,a$={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,i$.dynamicAnchor)(t,""):(0,o$.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};ao.default=a$;var co={};Object.defineProperty(co,"__esModule",{value:!0});const c$=sr,f$={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,c$.dynamicRef)(t,t.schema)};co.default=f$;Object.defineProperty(oo,"__esModule",{value:!0});const l$=nr,u$=sr,d$=ao,p$=co,m$=[l$.default,u$.default,d$.default,p$.default];oo.default=m$;var fo={},lo={};Object.defineProperty(lo,"__esModule",{value:!0});const Oa=as,h$={keyword:"dependentRequired",type:"object",schemaType:"object",error:Oa.error,code:t=>(0,Oa.validatePropertyDeps)(t)};lo.default=h$;var uo={};Object.defineProperty(uo,"__esModule",{value:!0});const y$=as,g$={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,y$.validateSchemaDeps)(t)};uo.default=g$;var po={};Object.defineProperty(po,"__esModule",{value:!0});const $$=T,b$={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,$$.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};po.default=b$;Object.defineProperty(fo,"__esModule",{value:!0});const v$=lo,w$=uo,_$=po,P$=[v$.default,w$.default,_$.default];fo.default=P$;var mo={},ho={};Object.defineProperty(ho,"__esModule",{value:!0});const et=B,ka=T,E$=Ee,S$={message:"must NOT have unevaluated properties",params:({params:t})=>(0,et._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},j$={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:S$,code(t){const{gen:e,schema:r,data:n,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");const{allErrors:o,props:a}=i;a instanceof et.Name?e.if((0,et._)`${a} !== true`,()=>e.forIn("key",n,l=>e.if(c(a,l),()=>f(l)))):a!==!0&&e.forIn("key",n,l=>a===void 0?f(l):e.if(u(a,l),()=>f(l))),i.props=!0,t.ok((0,et._)`${s} === ${E$.default.errors}`);function f(l){if(r===!1){t.setParams({unevaluatedProperty:l}),t.error(),o||e.break();return}if(!(0,ka.alwaysValidSchema)(i,r)){const d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:l,dataPropType:ka.Type.Str},d),o||e.if((0,et.not)(d),()=>e.break())}}function c(l,d){return(0,et._)`!${l} || !${l}[${d}]`}function u(l,d){const p=[];for(const h in l)l[h]===!0&&p.push((0,et._)`${d} !== ${h}`);return(0,et.and)(...p)}}};ho.default=j$;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});const dt=B,Ia=T,O$={message:({params:{len:t}})=>(0,dt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dt._)`{limit: ${t}}`},k$={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:O$,code(t){const{gen:e,schema:r,data:n,it:s}=t,i=s.items||0;if(i===!0)return;const o=e.const("len",(0,dt._)`${n}.length`);if(r===!1)t.setParams({len:i}),t.fail((0,dt._)`${o} > ${i}`);else if(typeof r=="object"&&!(0,Ia.alwaysValidSchema)(s,r)){const f=e.var("valid",(0,dt._)`${o} <= ${i}`);e.if((0,dt.not)(f),()=>a(f,i)),t.ok(f)}s.items=!0;function a(f,c){e.forRange("i",c,o,u=>{t.subschema({keyword:"unevaluatedItems",dataProp:u,dataPropType:Ia.Type.Num},f),s.allErrors||e.if((0,dt.not)(f),()=>e.break())})}}};yo.default=k$;Object.defineProperty(mo,"__esModule",{value:!0});const I$=ho,N$=yo,A$=[I$.default,N$.default];mo.default=A$;Object.defineProperty(io,"__esModule",{value:!0});const T$=Yn,R$=Xn,x$=Kr,C$=oo,M$=fo,q$=mo,D$=Br,Na=wt,L$=[C$.default,T$.default,R$.default,(0,x$.default)(!0),D$.default,Na.metadataVocabulary,Na.contentVocabulary,M$.default,q$.default];io.default=L$;var go={};const V$="https://json-schema.org/draft/2020-12/schema",U$="https://json-schema.org/draft/2020-12/schema",F$={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},z$="meta",K$="Core and Validation specifications meta-schema",B$=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],H$=["object","boolean"],J$="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",G$={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},W$={$schema:V$,$id:U$,$vocabulary:F$,$dynamicAnchor:z$,title:K$,allOf:B$,type:H$,$comment:J$,properties:G$},Y$="https://json-schema.org/draft/2020-12/schema",X$="https://json-schema.org/draft/2020-12/meta/applicator",Q$={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},Z$="meta",eb="Applicator vocabulary meta-schema",tb=["object","boolean"],rb={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},nb={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},sb={$schema:Y$,$id:X$,$vocabulary:Q$,$dynamicAnchor:Z$,title:eb,type:tb,properties:rb,$defs:nb},ib="https://json-schema.org/draft/2020-12/schema",ob="https://json-schema.org/draft/2020-12/meta/unevaluated",ab={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},cb="meta",fb="Unevaluated applicator vocabulary meta-schema",lb=["object","boolean"],ub={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},db={$schema:ib,$id:ob,$vocabulary:ab,$dynamicAnchor:cb,title:fb,type:lb,properties:ub},pb="https://json-schema.org/draft/2020-12/schema",mb="https://json-schema.org/draft/2020-12/meta/content",hb={"https://json-schema.org/draft/2020-12/vocab/content":!0},yb="meta",gb="Content vocabulary meta-schema",$b=["object","boolean"],bb={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},vb={$schema:pb,$id:mb,$vocabulary:hb,$dynamicAnchor:yb,title:gb,type:$b,properties:bb},wb="https://json-schema.org/draft/2020-12/schema",_b="https://json-schema.org/draft/2020-12/meta/core",Pb={"https://json-schema.org/draft/2020-12/vocab/core":!0},Eb="meta",Sb="Core vocabulary meta-schema",jb=["object","boolean"],Ob={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},kb={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},Ib={$schema:wb,$id:_b,$vocabulary:Pb,$dynamicAnchor:Eb,title:Sb,type:jb,properties:Ob,$defs:kb},Nb="https://json-schema.org/draft/2020-12/schema",Ab="https://json-schema.org/draft/2020-12/meta/format-annotation",Tb={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Rb="meta",xb="Format vocabulary meta-schema for annotation results",Cb=["object","boolean"],Mb={format:{type:"string"}},qb={$schema:Nb,$id:Ab,$vocabulary:Tb,$dynamicAnchor:Rb,title:xb,type:Cb,properties:Mb},Db="https://json-schema.org/draft/2020-12/schema",Lb="https://json-schema.org/draft/2020-12/meta/meta-data",Vb={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Ub="meta",Fb="Meta-data vocabulary meta-schema",zb=["object","boolean"],Kb={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Bb={$schema:Db,$id:Lb,$vocabulary:Vb,$dynamicAnchor:Ub,title:Fb,type:zb,properties:Kb},Hb="https://json-schema.org/draft/2020-12/schema",Jb="https://json-schema.org/draft/2020-12/meta/validation",Gb={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Wb="meta",Yb="Validation vocabulary meta-schema",Xb=["object","boolean"],Qb={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Zb={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},e0={$schema:Hb,$id:Jb,$vocabulary:Gb,$dynamicAnchor:Wb,title:Yb,type:Xb,properties:Qb,$defs:Zb};Object.defineProperty(go,"__esModule",{value:!0});const t0=W$,r0=sb,n0=db,s0=vb,i0=Ib,o0=qb,a0=Bb,c0=e0,f0=["/properties"];function l0(t){return[t0,r0,n0,s0,i0,e(this,o0),a0,e(this,c0)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,f0):n}}go.default=l0;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const r=gt,n=io,s=Hr,i=go,o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(p={}){super({...p,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:p,meta:h}=this.opts;h&&(i.default.call(this,p),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var f=Ne;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var c=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var u=er;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var l=Pt;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return l.default}})})(Zs,Zs.exports);var u0=Zs.exports;const d0=Mn.getDefaultExportFromCjs(u0);var ei={exports:{}},$o={},bo={};Object.defineProperty(bo,"__esModule",{value:!0});const p0=ze,m0=["$schema","id","$defs",{keyword:"$comment"},"definitions",p0.default];bo.default=m0;var vo={},wo={};Object.defineProperty(wo,"__esModule",{value:!0});const ti=gt,h0=B,Ze=h0.operators,ri={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Ze.LTE,fail:Ze.GT},{okStr:"<",ok:Ze.LT,fail:Ze.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Ze.GTE,fail:Ze.LT},{okStr:">",ok:Ze.GT,fail:Ze.LTE}]}},y0={message:t=>ti.str`must be ${ni(t).okStr} ${t.schemaCode}`,params:t=>ti._`{comparison: ${ni(t).okStr}, limit: ${t.schemaCode}}`},g0={keyword:Object.keys(ri),type:"number",schemaType:"number",$data:!0,error:y0,code(t){const{data:e,schemaCode:r}=t;t.fail$data(ti._`${e} ${ni(t).fail} ${r} || isNaN(${e})`)}};function ni(t){var e;const r=t.keyword,n=!((e=t.parentSchema)===null||e===void 0)&&e[ri[r].exclusive]?1:0;return ri[r].ops[n]}wo.default=g0;var _o={};Object.defineProperty(_o,"__esModule",{value:!0});const Aa={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},$0={keyword:Object.keys(Aa),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:e}){const r=Aa[t];if(e[r]===void 0)throw new Error(`${t} can only be used with ${r}`)}};_o.default=$0;Object.defineProperty(vo,"__esModule",{value:!0});const b0=wo,v0=_o,w0=Qn,_0=Zn,P0=es,E0=ts,S0=rs,j0=ns,O0=ss,k0=is,I0=os,N0=[b0.default,v0.default,w0.default,_0.default,P0.default,E0.default,S0.default,j0.default,O0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},k0.default,I0.default];vo.default=N0;Object.defineProperty($o,"__esModule",{value:!0});const A0=bo,T0=vo,R0=Kr,x0=Br,C0=["title","description","default"],M0=[A0.default,T0.default,R0.default(),x0.default,C0];$o.default=M0;const q0="http://json-schema.org/draft-04/schema#",D0="http://json-schema.org/draft-04/schema#",L0="Core schema meta-schema",V0={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},U0="object",F0={id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},z0={exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},K0={id:q0,$schema:D0,description:L0,definitions:V0,type:U0,properties:F0,dependencies:z0,default:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=gt,n=$o,s=Hr,i=K0,o=["/properties"],a="http://json-schema.org/draft-04/schema";class f extends r.default{constructor(d={}){super({...d,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const d=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(d,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.exports=e=f,Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var c=gt;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=gt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(ei,ei.exports);var B0=ei.exports;const H0=Mn.getDefaultExportFromCjs(B0);var si={exports:{}},Gf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(R,L){return{validate:R,compare:L}}t.fullFormats={date:e(i,o),time:e(f(!0),c),"date-time":e(d(!0),p),"iso-time":e(f(),u),"iso-date-time":e(d(),h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$,"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":/^(?:(?:[^\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,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,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:/^(?=.{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,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([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}))|:)))$/i,regex:X,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:w,int32:{type:"number",validate:M},int64:{type:"number",validate:C},float:{type:"number",validate:A},double:{type:"number",validate:A},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\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,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,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},t.formatNames=Object.keys(t.fullFormats);function r(R){return R%4===0&&(R%100!==0||R%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(R){const L=n.exec(R);if(!L)return!1;const H=+L[1],F=+L[2],te=+L[3];return F>=1&&F<=12&&te>=1&&te<=(F===2&&r(H)?29:s[F])}function o(R,L){if(R&&L)return R>L?1:R<L?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function f(R){return function(H){const F=a.exec(H);if(!F)return!1;const te=+F[1],ie=+F[2],pe=+F[3],Se=F[4],je=F[5]==="-"?-1:1,N=+(F[6]||0),_=+(F[7]||0);if(N>23||_>59||R&&!Se)return!1;if(te<=23&&ie<=59&&pe<60)return!0;const k=ie-_*je,P=te-N*je-(k<0?1:0);return(P===23||P===-1)&&(k===59||k===-1)&&pe<61}}function c(R,L){if(!(R&&L))return;const H=new Date("2020-01-01T"+R).valueOf(),F=new Date("2020-01-01T"+L).valueOf();if(H&&F)return H-F}function u(R,L){if(!(R&&L))return;const H=a.exec(R),F=a.exec(L);if(H&&F)return R=H[1]+H[2]+H[3],L=F[1]+F[2]+F[3],R>L?1:R<L?-1:0}const l=/t|\s/i;function d(R){const L=f(R);return function(F){const te=F.split(l);return te.length===2&&i(te[0])&&L(te[1])}}function p(R,L){if(!(R&&L))return;const H=new Date(R).valueOf(),F=new Date(L).valueOf();if(H&&F)return H-F}function h(R,L){if(!(R&&L))return;const[H,F]=R.split(l),[te,ie]=L.split(l),pe=o(H,te);if(pe!==void 0)return pe||c(F,ie)}const g=/\/|:/,m=/^(?:[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;function $(R){return g.test(R)&&m.test(R)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(R){return v.lastIndex=0,v.test(R)}const E=-2147483648,O=2**31-1;function M(R){return Number.isInteger(R)&&R<=O&&R>=E}function C(R){return Number.isInteger(R)}function A(){return!0}const z=/[^\\]\\Z/;function X(R){if(z.test(R))return!1;try{return new RegExp(R),!0}catch{return!1}}})(Gf);var Wf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Bf,r=B,n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},i={message:({keyword:a,schemaCode:f})=>(0,r.str)`should be ${s[a].okStr} ${f}`,params:({keyword:a,schemaCode:f})=>(0,r._)`{comparison: ${s[a].okStr}, limit: ${f}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:f,data:c,schemaCode:u,keyword:l,it:d}=a,{opts:p,self:h}=d;if(!p.validateFormats)return;const g=new e.KeywordCxt(d,h.RULES.all.format.definition,"format");g.$data?m():$();function m(){const w=f.scopeValue("formats",{ref:h.formats,code:p.code.formats}),E=f.const("fmt",(0,r._)`${w}[${g.schemaCode}]`);a.fail$data((0,r.or)((0,r._)`typeof ${E} != "object"`,(0,r._)`${E} instanceof RegExp`,(0,r._)`typeof ${E}.compare != "function"`,v(E)))}function $(){const w=g.schema,E=h.formats[w];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${l}": format "${w}" does not define "compare" function`);const O=f.scopeValue("formats",{key:w,ref:E,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(w)}`:void 0});a.fail$data(v(O))}function v(w){return(0,r._)`${w}.compare(${c}, ${u}) ${s[l].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Wf);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Gf,n=Wf,s=B,i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(c,u={keywords:!0})=>{if(Array.isArray(u))return f(c,u,r.fullFormats,i),c;const[l,d]=u.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,i],p=u.formats||r.formatNames;return f(c,p,l,d),u.keywords&&(0,n.default)(c),c};a.get=(c,u="full")=>{const d=(u==="fast"?r.fastFormats:r.fullFormats)[c];if(!d)throw new Error(`Unknown format "${c}"`);return d};function f(c,u,l,d){var p,h;(p=(h=c.opts.code).formats)!==null&&p!==void 0||(h.formats=(0,s._)`require("ajv-formats/dist/formats").${d}`);for(const g of u)c.addFormat(g,l[g])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(si,si.exports);var J0=si.exports;const G0=Mn.getDefaultExportFromCjs(J0),W0=t=>e=>t===e,Y0=t=>e=>!t(e),X0=t=>Object.values(t),Q0=t=>t!==void 0,Et=t=>e=>e.keyword===t,Is=Et("required"),Z0=Et("anyOf"),mn=Et("oneOf"),Ta=Et("if"),Yf=Et("enum"),ev=Et("additionalProperties"),tv=Et("unevaluatedProperties"),Sn=t=>(t==null?void 0:t.errors)||[],Xf=t=>t&&X0(t.children)||[],rv=t=>e=>Xf(t).filter(Y0(W0(e))),Ra=t=>e=>e.reduce((r,n)=>r.concat(n),t);class St{constructor(e={isIdentifierLocation:!1},{data:r,schema:n,jsonAst:s,jsonRaw:i}){this.options=e,this.data=r,this.schema=n,this.jsonAst=s,this.jsonRaw=i}get instancePath(){return typeof this.options.instancePath<"u"?this.options.instancePath:this.options.dataPath}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class nv extends St{constructor(...e){super(...e),this.name="AdditionalPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.additionalProperty} is not expected to be here`,path:this.instancePath}}}class sv extends St{constructor(...e){super(...e),this.name="DefaultValidationError",this.options.isSkipEndLocation=!0}getError(){const{keyword:e,message:r}=this.options;return{message:`${e} ${r}`,path:this.instancePath}}}var ls={},iv=/~/,ov=/~[01]/g;function av(t){switch(t){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+t)}function Qf(t){return iv.test(t)?t.replace(ov,av):t}function cv(t,e,r){for(var n,s,i=1,o=e.length;i<o;){if(e[i]==="constructor"||e[i]==="prototype"||e[i]==="__proto__")return t;if(n=Qf(e[i++]),s=o>i,typeof t[n]>"u"&&(Array.isArray(t)&&n==="-"&&(n=t.length),s&&(e[i]!==""&&e[i]<1/0||e[i]==="-"?t[n]=[]:t[n]={})),!s)break;t=t[n]}var a=t[n];return r===void 0?delete t[n]:t[n]=r,a}function Po(t){if(typeof t=="string"){if(t=t.split("/"),t[0]==="")return t;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(t)){for(const e of t)if(typeof e!="string"&&typeof e!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return t}throw new Error("Invalid JSON pointer.")}function Zf(t,e){if(typeof t!="object")throw new Error("Invalid input object.");e=Po(e);var r=e.length;if(r===1)return t;for(var n=1;n<r;){if(t=t[Qf(e[n++])],r===n)return t;if(typeof t!="object"||t===null)return}}function el(t,e,r){if(typeof t!="object")throw new Error("Invalid input object.");if(e=Po(e),e.length===0)throw new Error("Invalid JSON pointer for set.");return cv(t,e,r)}function fv(t){var e=Po(t);return{get:function(r){return Zf(r,e)},set:function(r,n){return el(r,e,n)}}}ls.get=Zf;ls.set=el;ls.compile=fv;const hn=[],Ns=[];function lv(t,e,r){if(t===e)return 0;const n=r==null?void 0:r.maxDistance,s=t;t.length>e.length&&(t=e,e=s);let i=t.length,o=e.length;for(;i>0&&t.charCodeAt(~-i)===e.charCodeAt(~-o);)i--,o--;let a=0;for(;a<i&&t.charCodeAt(a)===e.charCodeAt(a);)a++;if(i-=a,o-=a,i===0)return n!==void 0&&o>n?n:o;let f,c,u,l,d=0,p=0;for(;d<i;)Ns[d]=t.charCodeAt(a+d),hn[d]=++d;for(;p<o;)for(f=e.charCodeAt(a+p),u=p++,c=p,d=0;d<i;d++)l=f===Ns[d]?u:u+1,u=hn[d],c=hn[d]=u>c?l>c?c+1:l:l>u?u+1:l;return hn.length=i,Ns.length=i,n!==void 0&&c>n?n:c}class uv extends St{constructor(...e){super(...e),this.name="EnumValidationError"}getError(){const{message:e,params:r}=this.options,n=this.findBestMatch(),s=r.allowedValues.join(", "),i={message:`${e}: ${s}`,path:this.instancePath};return n!==null&&(i.suggestion=`Did you mean ${n}?`),i}findBestMatch(){const{params:{allowedValues:e}}=this.options,r=this.instancePath===""?this.data:ls.get(this.data,this.instancePath);if(!r)return null;const n=e.map(s=>({value:s,weight:lv(s,r.toString())})).sort((s,i)=>s.weight>i.weight?1:s.weight<i.weight?-1:0)[0];return e.length===1||n.weight<n.value.length?n.value:null}}class dv extends St{constructor(...e){super(...e),this.name="FormatValidationError",this.options.isSkipEndLocation=!0}getError(){const{keyword:e,message:r,params:n,instancePath:s}=this.options,i=this.instancePath;return(n==null?void 0:n.format)==="uri-reference"&&(i!=null&&i.endsWith("/$ref"))?{message:this._getUriReferenceMessage(),path:i}:{message:`${e} ${r}`,path:i}}_getUriReferenceMessage(){const e=this._extractRefValue();return e&&/[^\x00-\x7F]/.test(e)?`$ref "${e}" contains non-ASCII characters`:e?`$ref "${e}" is not a valid URI reference`:"$ref is not a valid URI reference"}_extractRefValue(){const e=this.schema;if(!e||typeof e!="object")return null;const r=this.instancePath;if(!r)return null;const n=r.split("/").filter(Boolean).map(i=>i.replace(/~1/g,"/").replace(/~0/g,"~"));let s=e;for(const i of n){if(s==null||typeof s!="object")return null;s=s[i]}return typeof s=="string"?s:null}}class pv extends St{constructor(...e){super(...e),this.name="PatternValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e,propertyName:r}=this.options;return{message:`Property "${r}" must match pattern ${e.pattern}`,path:this.instancePath}}}class mv extends St{constructor(...e){super(...e),this.name="RequiredValidationError"}getError(){const{message:e}=this.options;return{message:`${e}`,path:this.instancePath}}}class hv extends St{constructor(...e){super(...e),this.name="UnevaluatedPropValidationError",this.options.isIdentifierLocation=!0}getError(){const{params:e}=this.options;return{message:`Property ${e.unevaluatedProperty} is not expected to be here`,path:this.instancePath}}}const yv=/\/[\w$_-]+(\/\d+)?/g;function gv(t=[]){const e={children:{}};return t.forEach(r=>{const n=typeof r.instancePath<"u"?r.instancePath:r.dataPath,s=n===""?[""]:n.match(yv);s&&s.reduce((i,o,a)=>(i.children[o]=i.children[o]||{children:{},errors:[]},a===s.length-1&&i.children[o].errors.push(r),i.children[o]),e)}),e}function tl(t,e,r){var l;const n=Sn(t),s=n.some(mn),i=n.some(Z0),o=n.some(Is),a=n.some(Ta),f=n.some(ev),c=n.some(tv),u=Object.keys(t.children||{}).length>0;if(a&&(f||c)&&(t.errors=n.filter(d=>!Ta(d))),s&&o)f||c?t.errors=n.filter(d=>!Is(d)&&!mn(d)):u?delete t.errors:t.errors=n.filter(d=>mn(d));else if(s&&!o&&u)delete t.errors;else if(s&&!o&&!u){const d=n.filter(mn);d.length>1&&(t.errors=[d[0]])}else o&&!s&&(t.errors=n.filter(Is),t.children={});i&&Object.keys(t.children).length>0&&delete t.errors,(l=t.errors)!=null&&l.length&&Sn(t).every(Yf)&&rv(e)(t).filter(Q0).some(Sn)&&delete e.children[r],Object.entries(t.children).forEach(([d,p])=>tl(p,t,d))}function rl(t,e){const r=Sn(t);if(r.length&&r.every(Yf)){const s=[...new Set(Ra([])(r.map(o=>o.params.allowedValues)))],i=r[0];return[new uv({...i,params:{allowedValues:s}},e)]}return Ra(r.reduce((n,s)=>{switch(s.keyword){case"additionalProperties":return n.concat(new nv(s,e));case"pattern":return n.concat(new pv(s,e));case"format":return n.concat(new dv(s,e));case"required":return n.concat(new mv(s,e));case"unevaluatedProperties":return n.concat(new hv(s,e));default:return n.concat(new sv(s,e))}},[]))(Xf(t).map(n=>rl(n,e)))}function $v(t,e){const r=gv(t||[]);return tl(r),rl(r,e)}function bv(t,e,r,n={}){const{indent:s=null,json:i=null}=n,o=i||JSON.stringify(e,null,s),a=c=>c.getError();return $v(r,{data:e,schema:t,jsonRaw:o}).map(a)}function yn(t,e){if(typeof e=="string")return[{message:e}];if(!t||typeof t!="object")return[{message:"Invalid specification"}];let r;try{r=bv(t,null,e,{indent:2}).map(s=>(s.message=s.message.trim(),s))}catch(s){return console.error(s),Array.isArray(e)?e.map(i=>{var a;let o=i.message||"Validation error";return i.keyword==="additionalProperties"&&((a=i.params)!=null&&a.additionalProperty)&&(o=`Property ${i.params.additionalProperty} is not expected to be here`),{message:o,path:i.dataPath||i.instancePath}}):[{message:"Validation failed"}]}const n=new Set;return r.filter(s=>{const i=`${s.message}||${s.path}`;return n.has(i)?!1:(n.add(i),!0)})}const vv=new Set(["get","put","post","delete","options","head","patch","trace"]),wv=/{([^}]+)}/g;function _v(t){const e=t==null?void 0:t.paths;if(!e||typeof e!="object")return[];const r=[];for(const[n,s]of Object.entries(e)){if(!ii(s))continue;const i=Object.entries(s).filter(([f,c])=>vv.has(f)&&ii(c));if(i.length===0)continue;const o=new Set(Pv(n)),a=xa(s.parameters,["paths",n,"parameters"]);for(const f of a)o.has(f.name)||r.push({path:f.path,message:`Path parameter "${f.name}" must have the corresponding {${f.name}} segment in the "${n}" path`});for(const[f,c]of i){const u=xa(c.parameters,["paths",n,f,"parameters"]);for(const d of u)o.has(d.name)||r.push({path:d.path,message:`Path parameter "${d.name}" must have the corresponding {${d.name}} segment in the "${n}" path`});const l=new Set([...a,...u].map(d=>d.name));for(const d of o)l.has(d)||r.push({path:["paths",n,f],message:`Declared path parameter "${d}" needs to be defined as a path parameter at either the path or operation level`})}}return Sv(r)}function Pv(t){return[...t.matchAll(wv)].map(e=>Ev(e[1]))}function Ev(t){return t.endsWith("+")?t.slice(0,-1):t}function xa(t,e){return Array.isArray(t)?t.flatMap((r,n)=>!ii(r)||r.in!=="path"||typeof r.name!="string"?[]:[{name:r.name,path:[...e,String(n),"name"]}]):[]}function Sv(t){const e=new Set;return t.filter(r=>{var s;const n=`${r.message}||${((s=r.path)==null?void 0:s.join("."))??""}`;return e.has(n)?!1:(e.add(n),!0)})}function ii(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const jv={"http://json-schema.org/draft-04/schema#":H0,"http://json-schema.org/draft-07/schema#":Qg,"https://json-schema.org/draft/2020-12/schema":d0};class nl{constructor(){We(this,"version");We(this,"ajvValidators",{});We(this,"errors");We(this,"specificationVersion");We(this,"specificationType");We(this,"specification")}isMutableRecord(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}validate(e,r){const n=e.find(i=>i.isEntrypoint),s=n==null?void 0:n.specification;this.specification=s,this.isMutableRecord(this.specification)&&this.isMutableRecord(this.specification.info)&&typeof this.specification.info.version!="string"&&(this.specification.info.version="0.0.1");try{if(s==null){if(r!=null&&r.throwOnError)throw new Error($e.EMPTY_OR_INVALID);return{valid:!1,errors:yn(s,$e.EMPTY_OR_INVALID)}}const{version:i,specificationType:o,specificationVersion:a}=oi(s);if(this.version=i,this.specificationVersion=a,this.specificationType=o,!i){if(r!=null&&r.throwOnError)throw new Error($e.OPENAPI_VERSION_NOT_SUPPORTED);return{valid:!1,errors:yn(s,$e.OPENAPI_VERSION_NOT_SUPPORTED)}}const f=this.getAjvValidator(i),c=f(s);if(f.errors&&f.errors.length>0){if(r!=null&&r.throwOnError)throw new Error(f.errors[0].message);return{valid:!1,errors:yn(s,f.errors)}}const u=Ac(e,r),l=_v(u.schema),d=[...u.errors,...l];return c&&u.valid&&l.length===0?{valid:!0,errors:d,schema:u.schema}:{valid:!1,errors:d,schema:u.schema}}catch(i){if(r!=null&&r.throwOnError)throw i;return{valid:!1,errors:yn(s,i.message??i)}}}getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const r=Fa[e],n=jv[r.$schema],s=new n({strict:!1,discriminator:!0,allErrors:!0});return G0(s),(e==="3.1"||e==="3.2")&&s.addFormat("media-range",!0),this.ajvValidators[e]=s.compile(r)}}We(nl,"supportedVersions",za);const Ov=(t,e)=>{if(!(!t||typeof t!="object")&&(e==="2.0"&&t.swagger==="2.0"||(e==="3.0"||e==="3.1"||e==="3.2")&&typeof t.openapi=="string"))return t};function sl(t,e){try{const r=Ur(t),n=new nl,s=n.validate(r,e);if(s.valid){const i=Ov(n.specification,n.version);return i?Promise.resolve({...s,specification:i,version:n.version}):Promise.resolve({valid:!1,errors:[{message:`Validated OpenAPI ${n.version} document is missing required top-level version field.`}],schema:s.schema,specification:n.specification,version:n.version})}return Promise.resolve({valid:!1,errors:s.errors,schema:s.schema,specification:n.specification,version:n.version})}catch(r){return Promise.reject(r)}}async function Jr(t){const{input:e}={...t};let r={};for(const n of t.tasks){const s=n.name,i="options"in n?n.options:void 0,o=r.specification?r.specification:typeof e=="object"?structuredClone(e):e;s==="load"?r={...r,...await Oi(e,i)}:s==="filter"?r={...r,...xc(o,i)}:s==="dereference"?r={...r,...Rc(o,i)}:s==="upgrade"?r={...r,...ji(o)}:s==="validate"&&(r={...r,...await sl(o,i)})}return r}async function Gr(t){const{filesystem:e}=await Jr(t);return oi(qe(e).specification)}async function Wr(t){const{filesystem:e}=await Jr(t);return e}async function Yr(t){return{filesystem:[],...await Jr(t)}}const il=t=>JSON.stringify(t,null,2);async function Xr(t){const{filesystem:e}=await Jr(t);return il(qe(e).specification)}const ol=t=>fd(t);async function Qr(t){const{filesystem:e}=await Jr(t);return ol(qe(e).specification)}function Zr(t,e){return{...t,tasks:[...t.tasks,e]}}function us(t,e){var s;const r={name:"dereference",options:{throwOnError:(s=t.options)==null?void 0:s.throwOnError,...e??{}}},n=Zr(t,r);return{details:()=>Gr(n),files:()=>Wr(n),get:()=>Yr(n),toJson:()=>Xr(n),toYaml:()=>Qr(n)}}function Eo(t,e){const n=Zr(t,{name:"filter",options:e});return{dereference:s=>us(n,s),details:()=>Gr(n),files:()=>Wr(n),get:()=>Yr(n),toJson:()=>Xr(n),toYaml:()=>Qr(n)}}function al(t,e){var s;const r={name:"validate",options:{throwOnError:(s=t.options)==null?void 0:s.throwOnError,...e??{}}},n=Zr(t,r);return{dereference:i=>us(n,i),details:()=>Gr(n),files:()=>Wr(n),filter:i=>Eo(n,i),get:()=>Yr(n),toJson:()=>Xr(n),toYaml:()=>Qr(n),upgrade:()=>cl(n)}}function cl(t){const r=Zr(t,{name:"upgrade"});return{dereference:n=>us(r,n),details:()=>Gr(r),files:()=>Wr(r),filter:n=>Eo(r,n),get:()=>Yr(r),toJson:()=>Xr(r),toYaml:()=>Qr(r),validate:n=>al(r,n)}}function kv(t,e,r){var i;const n={name:"load",options:{throwOnError:(i=t.options)==null?void 0:i.throwOnError,...r}},s={...Zr(t,n),input:e};return{dereference:o=>us(s,o),details:()=>Gr(s),files:()=>Wr(s),filter:o=>Eo(s,o),get:()=>Yr(s),upgrade:()=>cl(s),toJson:()=>Xr(s),toYaml:()=>Qr(s),validate:o=>al(s,o)}}function Iv(t){const e={input:null,options:t,tasks:[]};return{load:(r,n)=>kv(e,r,n)}}const Nv="API",Av="1.0",Tv=t=>{var e,r;return{...t,info:{...t.info,title:((e=t.info)==null?void 0:e.title)??Nv,version:((r=t.info)==null?void 0:r.version)??Av}}},Rv="3.1.1",xv=t=>({openapi:t.openapi??Rv,...t}),Cv=t=>{if(!t.paths)return t;const e=new Set;for(const s of Object.values(t.paths))if(typeof s=="object"&&s!==null){for(const i of Object.values(s))if(typeof i=="object"&&i!==null&&"tags"in i){const o=i.tags;Array.isArray(o)&&o.forEach(a=>e.add(String(a)))}}const r=new Set((Array.isArray(t.tags)?t.tags:[]).map(s=>typeof s=="object"&&s!==null?String(s.name):null).filter(Boolean)),n=[...e].filter(s=>!r.has(s)).map(s=>({name:s}));return{...t,tags:[...Array.isArray(t.tags)?t.tags:[],...n]}},Mv=t=>{var r;if(!((r=t.components)!=null&&r.securitySchemes))return t;const e={...t.components.securitySchemes};for(const n of Object.values(e))if(typeof n=="object"&&n!==null&&"type"in n){const s=String(n.type).toLowerCase();n.type={apikey:"apiKey",oauth2:"oauth2",http:"http",mutualtls:"mutualTLS",openidconnect:"openIdConnect"}[s]??s}for(const n of Object.values(e))if(typeof n=="object"&&n!==null&&"type"in n&&n.type==="oauth2"&&"flows"in n){const s=n.flows;for(const i of Object.values(s))typeof i=="object"&&i!==null&&"scopes"in i&&Array.isArray(i.scopes)&&(i.scopes=i.scopes.reduce((o,a)=>(o[a]="",o),{}))}return{...t,components:{...t.components,securitySchemes:e}}},qv=t=>{if("swagger"in t)throw new Error("Swagger 2.0 documents are not supported. Please upgrade to OpenAPI 3.x.");return t};function Dv(t){return[qv,xv,Tv,Cv,Mv].reduce((r,n)=>n(r),t)}exports.dereference=Rc;exports.escapeJsonPointer=qn;exports.filter=xc;exports.isJson=ud;exports.isYaml=dd;exports.join=Xd;exports.load=Oi;exports.normalize=Rr;exports.openapi=Iv;exports.sanitize=Dv;exports.toJson=il;exports.toYaml=ol;exports.traverse=Nr;exports.unescapeJsonPointer=Nc;exports.upgrade=ji;exports.upgradeFromThreeToThreeOne=Ua;exports.upgradeFromTwoToThree=qa;exports.validate=sl;