"use strict";var e=Object.defineProperty,t=(t,r,n)=>((t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n)(t,"symbol"!=typeof r?r+"":r,n);const r=require("fastify-plugin"),n=require("node:fs"),s=require("node:path"),i=require("node:url");var o="undefined"!=typeof document?document.currentScript:null;const a={"2.0":{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"},"^/":{$ref:"#/definitions/pathItem"}},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"}}}}},"3.0":{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/PathItem"},"^x-":{}},additionalProperties:!1},PathItem:{type:"object",properties:{$ref:{type:"string"},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},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"}]},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}}},3.1:{$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"}},$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"}}}}},c=Object.keys(a),u={EMPTY_OR_INVALID:"Can’t find JSON, YAML or filename in data",OPENAPI_VERSION_NOT_SUPPORTED:"Can’t find supported Swagger/OpenAPI version in specification, version must be a string.",INVALID_REFERENCE:"Can’t resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can’t resolve external reference: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d={exports:{}},f={},p={},m={},h={},y={},g={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function s(e,...t){const r=[e[0]];let s=0;for(;s{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(s,i,o={},a){let c=t.nil;for(const u in s){const l=s[u];if(!l)continue;const d=o[u]=o[u]||new Map;l.forEach((s=>{if(d.has(s))return;d.set(s,n.Started);let o=i(s);if(o){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${s} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(s)))throw new r(s);c=t._`${c}${o}${this.opts._n}`}d.set(s,n.Completed)}))}return c}}}($),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=g,r=$;var n=g;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=$;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class o extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=j(this.rhs,e,r),this}get names(){return S(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(C(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class m extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class h extends p{}class y extends m{}y.kind="else";class v extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(O(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){const e=super.names;return S(e,this.condition),this.else&&A(e,this.else.names),e}}v.kind="if";class b extends m{}b.kind="for";class w extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class D extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){const e=S(super.names,this.from);return S(e,this.to)}}class E extends b{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class _ extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}_.kind="func";class k extends p{render(e){return"return "+super.render(e)}}k.kind="return";class P extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class x extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class F extends m{render(e){return"finally"+super.render(e)}}F.kind="finally";function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function S(e,r){return r instanceof t._CodeOrName?A(e,r.names):e}function j(e,r,n){return e instanceof t.Name?i(e):(s=e)instanceof t._Code&&s._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=i(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var s;function i(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function C(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function O(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${R(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new o(e,s,r)),s}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){const r=["{"];for(const[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,s));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new v(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(v,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,n,s,i=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new D(i,o,t,n),(()=>s(o)))}forOf(e,n,s,i=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(o,t._`${e}[${r}]`),s(o)}))}return this._for(new E("of",i,o,n),(()=>s(o)))}forIn(e,n,s,i=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,s);const o=this._scope.toName(e);return this._for(new E("in",i,o,n),(()=>s(o)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new x(e),t(e)}return r&&(this._currNode=n.finally=new F,this.code(r)),this._endBlockNode(x,F)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,s){return this._blockNode(new _(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=O;const N=T(e.operators.AND);e.and=function(...e){return e.reduce(N)};const I=T(e.operators.OR);function T(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${R(r)} ${e} ${R(n)}`}function R(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(I)}}(y);var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.checkStrictMode=v.getErrorPath=v.Type=v.useFunc=v.setEvaluated=v.evaluatedPropsToName=v.mergeEvaluated=v.eachItem=v.unescapeJsonPointer=v.escapeJsonPointer=v.escapeFragment=v.unescapeFragment=v.schemaRefOrVal=v.schemaHasRulesButRef=v.schemaHasRules=v.checkUnknownRules=v.alwaysValidSchema=v.toHash=void 0;const b=y,w=g;function D(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const i in t)s[i]||C(e,`unknown keyword: "${i}"`)}function E(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function _(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function k(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function P({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,i,o,a)=>{const c=void 0===o?i:o instanceof b.Name?(i instanceof b.Name?e(s,i,o):t(s,i,o),o):i instanceof b.Name?(t(s,o,i),i):r(i,o);return a!==b.Name||c instanceof b.Name?c:n(s,c)}}function x(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",b._`{}`);return void 0!==t&&F(e,r,t),r}function F(e,t,r){Object.keys(r).forEach((r=>e.assign(b._`${t}${(0,b.getProperty)(r)}`,!0)))}v.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},v.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(D(e,t),!E(t,e.self.RULES.all))},v.checkUnknownRules=D,v.schemaHasRules=E,v.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},v.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return b._`${r}`}return b._`${e}${t}${(0,b.getProperty)(n)}`},v.unescapeFragment=function(e){return k(decodeURIComponent(e))},v.escapeFragment=function(e){return encodeURIComponent(_(e))},v.escapeJsonPointer=_,v.unescapeJsonPointer=k,v.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},v.mergeEvaluated={props:P({mergeNames:(e,t,r)=>e.if(b._`${r} !== true && ${t} !== undefined`,(()=>{e.if(b._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,b._`${r} || {}`).code(b._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(b._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,b._`${r} || {}`),F(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:x}),items:P({mergeNames:(e,t,r)=>e.if(b._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,b._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(b._`${r} !== true`,(()=>e.assign(r,!0===t||b._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},v.evaluatedPropsToName=x,v.setEvaluated=F;const A={};var S,j;function C(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}v.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:A[t.code]||(A[t.code]=new w._Code(t.code))})},(j=S||(v.Type=S={}))[j.Num=0]="Num",j[j.Str=1]="Str",v.getErrorPath=function(e,t,r){if(e instanceof b.Name){const n=t===S.Num;return r?n?b._`"[" + ${e} + "]"`:b._`"['" + ${e} + "']"`:n?b._`"/" + ${e}`:b._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,b.getProperty)(e).toString():"/"+_(e)},v.checkStrictMode=C;var O={};Object.defineProperty(O,"__esModule",{value:!0});const N=y,I={data:new N.Name("data"),valCxt:new N.Name("valCxt"),instancePath:new N.Name("instancePath"),parentData:new N.Name("parentData"),parentDataProperty:new N.Name("parentDataProperty"),rootData:new N.Name("rootData"),dynamicAnchors:new N.Name("dynamicAnchors"),vErrors:new N.Name("vErrors"),errors:new N.Name("errors"),this:new N.Name("this"),self:new N.Name("self"),scope:new N.Name("scope"),json:new N.Name("json"),jsonPos:new N.Name("jsonPos"),jsonLen:new N.Name("jsonLen"),jsonPart:new N.Name("jsonPart")};O.default=I,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=y,r=v,n=O;function s(e,r){const s=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${s}]`)),t._`${n.default.vErrors}.push(${s})`),e.code(t._`${n.default.errors}++`)}function i(e,r){const{gen:n,validateName:s,schemaEnv:i}=e;i.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${s}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,o,c){const{it:u}=r,{gen:l,compositeRule:d,allErrors:f}=u,p=a(r,n,o);(null!=c?c:d||f)?s(l,p):i(u,t._`[${p}]`)},e.reportExtraError=function(t,r=e.keywordError,o){const{it:c}=t,{gen:u,compositeRule:l,allErrors:d}=c;s(u,a(t,r,o)),l||d||i(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:s,data:i,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,n.default.errors,(o=>{e.const(c,t._`${n.default.vErrors}[${o}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${c}.schema`,s),e.assign(t._`${c}.data`,i))}))};const o={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,s){const{createErrors:i}=e.it;return!1===i?t._`{}`:function(e,r,s={}){const{gen:i,it:a}=e,l=[c(a,s),u(e,s)];return function(e,{params:r,message:s},i){const{keyword:a,data:c,schemaValue:u,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;i.push([o.keyword,a],[o.params,"function"==typeof r?r(e):r||t._`{}`]),d.messages&&i.push([o.message,"function"==typeof s?s(e):s]);d.verbose&&i.push([o.schema,u],[o.parentSchema,t._`${p}${m}`],[n.default.data,c]);f&&i.push([o.propertyName,f])}(e,r,l),i.object(...l)}(e,r,s)}function c({errorPath:e},{instancePath:s}){const i=s?t.str`${e}${(0,r.getErrorPath)(s,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,i)]}function u({keyword:e,it:{errSchemaPath:n}},{schemaPath:s,parentSchema:i}){let a=i?n:t.str`${n}/${e}`;return s&&(a=t.str`${a}${(0,r.getErrorPath)(s,r.Type.Str)}`),[o.schemaPath,a]}}(h),Object.defineProperty(m,"__esModule",{value:!0}),m.boolOrEmptySchema=m.topBoolOrEmptySchema=void 0;const T=h,R=y,B=O,q={message:"boolean schema is false"};function M(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,T.reportError)(s,q,void 0,t)}m.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?M(e,!1):"object"==typeof r&&!0===r.$async?t.return(B.default.data):(t.assign(R._`${n}.errors`,null),t.return(!0))},m.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),M(e)):r.var(t,!0)};var L={},V={};Object.defineProperty(V,"__esModule",{value:!0}),V.getRules=V.isJSONType=void 0;const U=new Set(["string","number","integer","boolean","null","object","array"]);V.isJSONType=function(e){return"string"==typeof e&&U.has(e)},V.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var K={};function z(e,t){return t.rules.some((t=>G(e,t)))}function G(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(K,"__esModule",{value:!0}),K.shouldUseRule=K.shouldUseGroup=K.schemaHasRulesForType=void 0,K.schemaHasRulesForType=function({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&z(e,n)},K.shouldUseGroup=z,K.shouldUseRule=G,Object.defineProperty(L,"__esModule",{value:!0}),L.reportTypeError=L.checkDataTypes=L.checkDataType=L.coerceAndCheckDataType=L.getJSONTypes=L.getSchemaTypes=L.DataType=void 0;const J=V,H=K,W=h,Y=y,X=v;var Q,Z;function ee(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(J.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}(Z=Q||(L.DataType=Q={}))[Z.Correct=0]="Correct",Z[Z.Wrong=1]="Wrong",L.getSchemaTypes=function(e){const t=ee(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},L.getJSONTypes=ee,L.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:s}=e,i=function(e,t){return t?e.filter((e=>te.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),o=t.length>0&&!(0===i.length&&1===t.length&&(0,H.schemaHasRulesForType)(e,t[0]));if(o){const o=ne(t,n,s.strictNumbers,Q.Wrong);r.if(o,(()=>{i.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,o=n.let("dataType",Y._`typeof ${s}`),a=n.let("coerced",Y._`undefined`);"array"===i.coerceTypes&&n.if(Y._`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,Y._`${s}[0]`).assign(o,Y._`typeof ${s}`).if(ne(t,s,i.strictNumbers),(()=>n.assign(a,s)))));n.if(Y._`${a} !== undefined`);for(const u of r)(te.has(u)||"array"===u&&"array"===i.coerceTypes)&&c(u);function c(e){switch(e){case"string":return void n.elseIf(Y._`${o} == "number" || ${o} == "boolean"`).assign(a,Y._`"" + ${s}`).elseIf(Y._`${s} === null`).assign(a,Y._`""`);case"number":return void n.elseIf(Y._`${o} == "boolean" || ${s} === null || (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,Y._`+${s}`);case"integer":return void n.elseIf(Y._`${o} === "boolean" || ${s} === null || (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,Y._`+${s}`);case"boolean":return void n.elseIf(Y._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf(Y._`${s} === "true" || ${s} === 1`).assign(a,!0);case"null":return n.elseIf(Y._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(a,null);case"array":n.elseIf(Y._`${o} === "string" || ${o} === "number" || ${o} === "boolean" || ${s} === null`).assign(a,Y._`[${s}]`)}}n.else(),ie(e),n.endIf(),n.if(Y._`${a} !== undefined`,(()=>{n.assign(s,a),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(Y._`${t} !== undefined`,(()=>e.assign(Y._`${t}[${r}]`,n)))}(e,a)}))}(e,t,i):ie(e)}))}return o};const te=new Set(["string","number","integer","boolean","null"]);function re(e,t,r,n=Q.Correct){const s=n===Q.Correct?Y.operators.EQ:Y.operators.NEQ;let i;switch(e){case"null":return Y._`${t} ${s} null`;case"array":i=Y._`Array.isArray(${t})`;break;case"object":i=Y._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=o(Y._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=o();break;default:return Y._`typeof ${t} ${s} ${e}`}return n===Q.Correct?i:(0,Y.not)(i);function o(e=Y.nil){return(0,Y.and)(Y._`typeof ${t} == "number"`,e,r?Y._`isFinite(${t})`:Y.nil)}}function ne(e,t,r,n){if(1===e.length)return re(e[0],t,r,n);let s;const i=(0,X.toHash)(e);if(i.array&&i.object){const e=Y._`typeof ${t} != "object"`;s=i.null?e:Y._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=Y.nil;i.number&&delete i.integer;for(const o in i)s=(0,Y.and)(s,re(o,t,r,n));return s}L.checkDataType=re,L.checkDataTypes=ne;const se={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?Y._`{type: ${e}}`:Y._`{type: ${t}}`};function ie(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,X.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,W.reportError)(t,se)}L.reportTypeError=ie;var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.assignDefaults=void 0;const ae=y,ce=v;function ue(e,t,r){const{gen:n,compositeRule:s,data:i,opts:o}=e;if(void 0===r)return;const a=ae._`${i}${(0,ae.getProperty)(t)}`;if(s)return void(0,ce.checkStrictMode)(e,`default is ignored for: ${a}`);let c=ae._`${a} === undefined`;"empty"===o.useDefaults&&(c=ae._`${c} || ${a} === null || ${a} === ""`),n.if(c,ae._`${a} = ${(0,ae.stringify)(r)}`)}oe.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const s in r)ue(e,s,r[s].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>ue(e,r,t.default)))};var le={},de={};Object.defineProperty(de,"__esModule",{value:!0}),de.validateUnion=de.validateArray=de.usePattern=de.callValidateCode=de.schemaProperties=de.allSchemaProperties=de.noPropertyInData=de.propertyInData=de.isOwnProperty=de.hasPropFunc=de.reportMissingProp=de.checkMissingProp=de.checkReportMissingProp=void 0;const fe=y,pe=v,me=O,he=v;function ye(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:fe._`Object.prototype.hasOwnProperty`})}function ge(e,t,r){return fe._`${ye(e)}.call(${t}, ${r})`}function $e(e,t,r,n){const s=fe._`${t}${(0,fe.getProperty)(r)} === undefined`;return n?(0,fe.or)(s,(0,fe.not)(ge(e,t,r))):s}function ve(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}de.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:s}=e;r.if($e(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:fe._`${t}`},!0),e.error()}))},de.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,s){return(0,fe.or)(...n.map((n=>(0,fe.and)($e(e,t,n,r.ownProperties),fe._`${s} = ${n}`))))},de.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},de.hasPropFunc=ye,de.isOwnProperty=ge,de.propertyInData=function(e,t,r,n){const s=fe._`${t}${(0,fe.getProperty)(r)} !== undefined`;return n?fe._`${s} && ${ge(e,t,r)}`:s},de.noPropertyInData=$e,de.allSchemaProperties=ve,de.schemaProperties=function(e,t){return ve(t).filter((r=>!(0,pe.alwaysValidSchema)(e,t[r])))},de.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},a,c,u){const l=u?fe._`${e}, ${t}, ${n}${s}`:t,d=[[me.default.instancePath,(0,fe.strConcat)(me.default.instancePath,i)],[me.default.parentData,o.parentData],[me.default.parentDataProperty,o.parentDataProperty],[me.default.rootData,me.default.rootData]];o.opts.dynamicRef&&d.push([me.default.dynamicAnchors,me.default.dynamicAnchors]);const f=fe._`${l}, ${r.object(...d)}`;return c!==fe.nil?fe._`${a}.call(${c}, ${f})`:fe._`${a}(${f})`};const be=fe._`new RegExp`;de.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,i=s(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:fe._`${"new RegExp"===s.code?be:(0,he.useFunc)(e,s)}(${r}, ${n})`})},de.validateArray=function(e){const{gen:t,data:r,keyword:n,it:s}=e,i=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return o((()=>t.assign(e,!1))),e}return t.var(i,!0),o((()=>t.break())),i;function o(s){const o=t.const("len",fe._`${r}.length`);t.forRange("i",0,o,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:pe.Type.Num},i),t.if((0,fe.not)(i),s)}))}},de.validateUnion=function(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,pe.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const i=t.let("valid",!1),o=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const a=e.subschema({keyword:n,schemaProp:s,compositeRule:!0},o);t.assign(i,fe._`${i} || ${o}`);e.mergeValidEvaluated(a,o)||t.if((0,fe.not)(i))})))),e.result(i,(()=>e.reset()),(()=>e.error(!0)))},Object.defineProperty(le,"__esModule",{value:!0}),le.validateKeywordUsage=le.validSchemaType=le.funcKeywordCode=le.macroKeywordCode=void 0;const we=y,De=O,Ee=de,_e=h;function ke(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,we._`${n.parentData}[${n.parentDataProperty}]`)))}function Pe(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,we.stringify)(r)})}le.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=e,a=t.macro.call(o.self,s,i,o),c=Pe(r,n,a);!1!==o.opts.validateSchema&&o.self.validateSchema(a,!0);const u=r.name("valid");e.subschema({schema:a,schemaPath:we.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},le.funcKeywordCode=function(e,t){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:a,it:c}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(c,t);const u=!a&&t.compile?t.compile.call(c.self,i,o,c):t.validate,l=Pe(n,s,u),d=n.let("valid");function f(r=(t.async?we._`await `:we.nil)){const s=c.opts.passContext?De.default.this:De.default.self,i=!("compile"in t&&!a||!1===t.schema);n.assign(d,we._`${r}${(0,Ee.callValidateCode)(e,l,s,i)}`,t.modifying)}function p(e){var r;n.if((0,we.not)(null!==(r=t.valid)&&void 0!==r?r:d),e)}e.block$data(d,(function(){if(!1===t.errors)f(),t.modifying&&ke(e),p((()=>e.error()));else{const r=t.async?function(){const e=n.let("ruleErrs",null);return n.try((()=>f(we._`await `)),(t=>n.assign(d,!1).if(we._`${t} instanceof ${c.ValidationError}`,(()=>n.assign(e,we._`${t}.errors`)),(()=>n.throw(t))))),e}():function(){const e=we._`${l}.errors`;return n.assign(e,null),f(we.nil),e}();t.modifying&&ke(e),p((()=>function(e,t){const{gen:r}=e;r.if(we._`Array.isArray(${t})`,(()=>{r.assign(De.default.vErrors,we._`${De.default.vErrors} === null ? ${t} : ${De.default.vErrors}.concat(${t})`).assign(De.default.errors,we._`${De.default.vErrors}.length`),(0,_e.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:d)},le.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},le.validateKeywordUsage=function({schema:e,opts:t,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(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}};var xe={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.extendSubschemaMode=xe.extendSubschemaData=xe.getSubschema=void 0;const Fe=y,Ae=v;xe.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(void 0!==t&&void 0!==n)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const n=e.schema[t];return void 0===r?{schema:n,schemaPath:Fe._`${e.schemaPath}${(0,Fe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:Fe._`${e.schemaPath}${(0,Fe.getProperty)(t)}${(0,Fe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Ae.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===s||void 0===i||void 0===o)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')},xe.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(void 0!==r){const{errorPath:s,dataPathArr:i,opts:o}=t;c(a.let("data",Fe._`${t.data}${(0,Fe.getProperty)(r)}`,!0)),e.errorPath=Fe.str`${s}${(0,Ae.getErrorPath)(r,n,o.jsPropertySyntax)}`,e.parentDataProperty=Fe._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}if(void 0!==s){c(s instanceof Fe.Name?s:a.let("data",s,!0)),void 0!==o&&(e.propertyName=o)}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}i&&(e.dataTypes=i)},xe.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r};var Se={},je=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r},Ce={exports:{}},Oe=Ce.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Ne(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Ne(e,t,r,n,s,i,o,a,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,s,i,o,a,c,u),n){var d=n[l];if(Array.isArray(d)){if(l in Oe.arrayKeywords)for(var f=0;ft+=Ve(e))),t===1/0))return 1/0}return t}function Ue(e,t="",r){!1!==r&&(t=Ge(t));const n=e.parse(t);return Ke(e,n)}function Ke(e,t){return e.serialize(t).split("#")[0]+"#"}Se.getFullPath=Ue,Se._getFullPath=Ke;const ze=/#\/?$/;function Ge(e){return e?e.replace(ze,""):""}Se.normalizeId=Ge,Se.resolveUrl=function(e,t,r){return r=Ge(r),e.resolve(t,r)};const Je=/^[a-z_][-a-z0-9._]*$/i;Se.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=Ge(e[r]||t),i={"":s},o=Ue(n,s,!1),a={},c=new Set;return Be(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const d=o+t;let f=i[s];function p(t){const r=this.opts.uriResolver.resolve;if(t=Ge(f?r(f,t):t),c.has(t))throw l(t);c.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==Ge(d)&&("#"===t[0]?(u(e,a[t],t),a[t]=e):this.refs[t]=d),t}function m(e){if("string"==typeof e){if(!Je.test(e))throw new Error(`invalid anchor "${e}"`);p.call(this,`#${e}`)}}"string"==typeof e[r]&&(f=p.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),i[t]=f})),a;function u(e,t,r){if(void 0!==t&&!Re(e,t))throw l(r)}function l(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Object.defineProperty(p,"__esModule",{value:!0}),p.getData=p.KeywordCxt=p.validateFunctionCode=void 0;const He=m,We=L,Ye=K,Xe=L,Qe=oe,Ze=le,et=xe,tt=y,rt=O,nt=Se,st=v,it=h;function ot({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,tt._`${rt.default.data}, ${rt.default.valCxt}`,n.$async,(()=>{e.code(tt._`"use strict"; ${at(r,s)}`),function(e,t){e.if(rt.default.valCxt,(()=>{e.var(rt.default.instancePath,tt._`${rt.default.valCxt}.${rt.default.instancePath}`),e.var(rt.default.parentData,tt._`${rt.default.valCxt}.${rt.default.parentData}`),e.var(rt.default.parentDataProperty,tt._`${rt.default.valCxt}.${rt.default.parentDataProperty}`),e.var(rt.default.rootData,tt._`${rt.default.valCxt}.${rt.default.rootData}`),t.dynamicRef&&e.var(rt.default.dynamicAnchors,tt._`${rt.default.valCxt}.${rt.default.dynamicAnchors}`)}),(()=>{e.var(rt.default.instancePath,tt._`""`),e.var(rt.default.parentData,tt._`undefined`),e.var(rt.default.parentDataProperty,tt._`undefined`),e.var(rt.default.rootData,rt.default.data),t.dynamicRef&&e.var(rt.default.dynamicAnchors,tt._`{}`)}))}(e,s),e.code(i)})):e.func(t,tt._`${rt.default.data}, ${function(e){return tt._`{${rt.default.instancePath}="", ${rt.default.parentData}, ${rt.default.parentDataProperty}, ${rt.default.rootData}=${rt.default.data}${e.dynamicRef?tt._`, ${rt.default.dynamicAnchors}={}`:tt.nil}}={}`}(s)}`,n.$async,(()=>e.code(at(r,s)).code(i)))}function at(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?tt._`/*# sourceURL=${r} */`:tt.nil}function ct(e,t){lt(e)&&(dt(e),ut(e))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&pt(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,nt.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",rt.default.errors);ft(e,i),n.var(t,tt._`${i} === ${rt.default.errors}`)}(e,t):(0,He.boolOrEmptySchema)(e,t)}function ut({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function lt(e){return"boolean"!=typeof e.schema}function dt(e){(0,st.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,st.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function ft(e,t){if(e.opts.jtd)return mt(e,[],!1,t);const r=(0,We.getSchemaTypes)(e.schema);mt(e,r,!(0,We.coerceAndCheckDataType)(e,r),t)}function pt({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(!0===s.$comment)e.code(tt._`${rt.default.self}.logger.log(${i})`);else if("function"==typeof s.$comment){const r=tt.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(tt._`${rt.default.self}.opts.$comment(${i}, ${r}, ${s}.schema)`)}}function mt(e,t,r,n){const{gen:s,schema:i,data:o,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;function d(u){(0,Ye.shouldUseGroup)(i,u)&&(u.type?(s.if((0,Xe.checkDataType)(u.type,o,c.strictNumbers)),ht(e,u),1===t.length&&t[0]===u.type&&r&&(s.else(),(0,Xe.reportTypeError)(e)),s.endIf()):ht(e,u),a||s.if(tt._`${rt.default.errors} === ${n||0}`))}!i.$ref||!c.ignoreKeywordsWithRef&&(0,st.schemaHasRulesButRef)(i,l)?(c.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{gt(e.dataTypes,t)||$t(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)gt(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&$t(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,Ye.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>yt(t,e)))&&$t(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),s.block((()=>{for(const e of l.rules)d(e);d(l.post)}))):s.block((()=>bt(e,"$ref",l.all.$ref.definition)))}function ht(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,Qe.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,Ye.shouldUseRule)(n,r)&&bt(e,r.keyword,r.definition,t.type)}))}function yt(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function gt(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $t(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,st.checkStrictMode)(e,t,e.opts.strictTypes)}p.validateFunctionCode=function(e){lt(e)&&(dt(e),ut(e))?function(e){const{schema:t,opts:r,gen:n}=e;ot(e,(()=>{r.$comment&&t.$comment&&pt(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,st.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(rt.default.vErrors,null),n.let(rt.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",tt._`${r}.evaluated`),t.if(tt._`${e.evaluated}.dynamicProps`,(()=>t.assign(tt._`${e.evaluated}.props`,tt._`undefined`))),t.if(tt._`${e.evaluated}.dynamicItems`,(()=>t.assign(tt._`${e.evaluated}.items`,tt._`undefined`)))}(e),ft(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if(tt._`${rt.default.errors} === 0`,(()=>t.return(rt.default.data)),(()=>t.throw(tt._`new ${s}(${rt.default.vErrors})`))):(t.assign(tt._`${n}.errors`,rt.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof tt.Name&&e.assign(tt._`${t}.props`,r);n instanceof tt.Name&&e.assign(tt._`${t}.items`,n)}(e),t.return(tt._`${rt.default.errors} === 0`))}(e)}))}(e):ot(e,(()=>(0,He.topBoolOrEmptySchema)(e)))};class vt{constructor(e,t,r){if((0,Ze.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,st.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Et(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ze.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",rt.default.errors))}result(e,t,r){this.failResult((0,tt.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,tt.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));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:t}=this;this.fail(tt._`${t} !== undefined && (${(0,tt.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?it.reportExtraError:it.reportError)(this,this.def.error,t)}$dataError(){(0,it.reportError)(this,this.def.$dataError||it.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,it.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=tt.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=tt.nil,t=tt.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:i}=this;r.if((0,tt.or)(tt._`${n} === undefined`,t)),e!==tt.nil&&r.assign(e,!0),(s.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==tt.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return(0,tt.or)(function(){if(r.length){if(!(t instanceof tt.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return tt._`${(0,Xe.checkDataTypes)(e,t,s.opts.strictNumbers,Xe.DataType.Wrong)}`}return tt.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return tt._`!${r}(${t})`}return tt.nil}())}subschema(e,t){const r=(0,et.getSubschema)(this.it,e);(0,et.extendSubschemaData)(r,this.it,e),(0,et.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return ct(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=st.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=st.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,tt.Name))),!0}}function bt(e,t,r,n){const s=new vt(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,Ze.funcKeywordCode)(s,r):"macro"in r?(0,Ze.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,Ze.funcKeywordCode)(s,r)}p.KeywordCxt=vt;const wt=/^\/(?:[^~]|~0|~1)*$/,Dt=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Et(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(""===e)return rt.default.rootData;if("/"===e[0]){if(!wt.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=rt.default.rootData}else{const o=Dt.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(s=o[2],"#"===s){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!s)return i}let o=i;const a=s.split("/");for(const u of a)u&&(i=tt._`${i}${(0,tt.getProperty)((0,st.unescapeJsonPointer)(u))}`,o=tt._`${o} && ${i}`);return o;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}p.getData=Et;var _t={};Object.defineProperty(_t,"__esModule",{value:!0});class kt extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}_t.default=kt;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});const xt=Se;class Ft extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,xt.resolveUrl)(e,t,r),this.missingSchema=(0,xt.normalizeId)((0,xt.getFullPath)(e,this.missingRef))}}Pt.default=Ft;var At={};Object.defineProperty(At,"__esModule",{value:!0}),At.resolveSchema=At.getCompilingSchema=At.resolveRef=At.compileSchema=At.SchemaEnv=void 0;const St=y,jt=_t,Ct=O,Ot=Se,Nt=v,It=p;class Tt{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,Ot.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function Rt(e){const t=qt.call(this,e);if(t)return t;const r=(0,Ot.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new St.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let a;e.$async&&(a=o.scopeValue("Error",{ref:jt.default,code:St._`require("ajv/dist/runtime/validation_error").default`}));const c=o.scopeName("validate");e.validateName=c;const u={gen:o,allErrors:this.opts.allErrors,data:Ct.default.data,parentData:Ct.default.parentData,parentDataProperty:Ct.default.parentDataProperty,dataNames:[Ct.default.data],dataPathArr:[St.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,St.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:St.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:St._`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,It.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);const t=o.toString();l=`${o.scopeRefs(Ct.default.scope)}return ${t}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const r=new Function(`${Ct.default.self}`,`${Ct.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:c,validateCode:t,scopeValues:o._values}),this.opts.unevaluated){const{props:e,items:t}=u;r.evaluated={props:e instanceof St.Name?void 0:e,items:t instanceof St.Name?void 0:t,dynamicProps:e instanceof St.Name,dynamicItems:t instanceof St.Name},r.source&&(r.source.evaluated=(0,St.stringify)(r.evaluated))}return e.validate=r,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}function Bt(e){return(0,Ot.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Rt.call(this,e)}function qt(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function Mt(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||Lt.call(this,e,t)}function Lt(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Ot._getFullPath)(this.opts.uriResolver,r);let s=(0,Ot.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return Ut.call(this,r,e);const i=(0,Ot.normalizeId)(n),o=this.refs[i]||this.schemas[i];if("string"==typeof o){const t=Lt.call(this,e,o);if("object"!=typeof(null==t?void 0:t.schema))return;return Ut.call(this,r,t)}if("object"==typeof(null==o?void 0:o.schema)){if(o.validate||Rt.call(this,o),i===(0,Ot.normalizeId)(t)){const{schema:t}=o,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,Ot.resolveUrl)(this.opts.uriResolver,s,n)),new Tt({schema:t,schemaId:r,root:e,baseId:s})}return Ut.call(this,r,o)}}At.SchemaEnv=Tt,At.compileSchema=Rt,At.resolveRef=function(e,t,r){var n;r=(0,Ot.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=Mt.call(this,e,r);if(void 0===i){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;s&&(i=new Tt({schema:s,schemaId:o,root:e,baseId:t}))}return void 0!==i?e.refs[r]=Bt.call(this,i):void 0},At.getCompilingSchema=qt,At.resolveSchema=Lt;const Vt=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ut(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const a of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,Nt.unescapeFragment)(a)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!Vt.has(a)&&n&&(t=(0,Ot.resolveUrl)(this.opts.uriResolver,t,n))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,Nt.schemaHasRulesButRef)(r,this.RULES)){const e=(0,Ot.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=Lt.call(this,n,e)}const{schemaId:o}=this.opts;return i=i||new Tt({schema:r,schemaId:o,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}const Kt={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var zt={},Gt={exports:{}};var Jt={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:Ht}=Jt;function Wt(e){if(Zt(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:Qt(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Yt(e,t=!1){let r="",n=!0;for(const s of e){if(void 0===Ht[s])return;"0"!==s&&!0===n&&(n=!1),n||(r+=s)}return t&&0===r.length&&(r="0"),r}function Xt(e,t={}){if(Zt(e,":")<2)return{host:e,isIPV6:!1};const r=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],s=[];let i=!1,o=!1,a=!1;function c(){if(s.length){if(!1===i){const e=Yt(s);if(void 0===e)return r.error=!0,!1;n.push(e)}s.length=0}return!0}for(let u=0;u7){r.error=!0;break}u-1>=0&&":"===e[u-1]&&(o=!0)}}return s.length&&(i?r.zone=s.join(""):a?n.push(s.join("")):n.push(Yt(s))),r.address=n.join(""),r}(e);if(r.error)return{host:e,isIPV6:!1};{let e=r.address,t=r.address;return r.zone&&(e+="%"+r.zone,t+="%25"+r.zone),{host:e,escapedHost:t,isIPV6:!0}}}function Qt(e,t){let r="",n=!0;const s=e.length;for(let i=0;i/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));const Er=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function _r(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=-1!==e.indexOf("%");let i=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const o=e.match(Er);if(o){if(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]),n.host){const e=hr(n.host);if(!1===e.isIPV4){const t=mr(e.host,{isIPV4:!1});n.host=t.host.toLowerCase(),i=t.isIPV6}else n.host=e.host,i=!0}void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const e=vr[(r.scheme||n.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&n.host&&(r.domainHost||e&&e.domainHost)&&!1===i&&function(e){let t=0;for(let r=0,n=e.length;r126||Dr[t])return!0;return!1}(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!e||e&&!e.skipNormalize)&&(s&&void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),s&&void 0!==n.userinfo&&(n.userinfo=unescape(n.userinfo)),s&&void 0!==n.host&&(n.host=unescape(n.host)),void 0!==n.path&&n.path.length&&(n.path=escape(unescape(n.path))),void 0!==n.fragment&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),e&&e.parse&&e.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const kr={SCHEMES:vr,normalize:function(e,t){return"string"==typeof e?e=wr(_r(e,t),t):"object"==typeof e&&(e=_r(wr(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return wr(br(_r(e,n),_r(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:br,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=wr($r(_r(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=wr($r(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=wr($r(_r(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=wr($r(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:wr,parse:_r};Gt.exports=kr,Gt.exports.default=kr,Gt.exports.fastUri=kr;var Pr=Gt.exports;Object.defineProperty(zt,"__esModule",{value:!0});const xr=Pr;xr.code='require("ajv/dist/runtime/uri").default',zt.default=xr,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=p;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=y;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=_t,s=Pt,i=V,o=At,a=y,c=Se,u=L,l=v,d=Kt,f=zt,m=(e,t)=>new RegExp(e,t);m.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"]),$={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."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,s,i,o,a,c,u,l,d,p,h,y,g,$,v,b,w,D,E,_,k,P,x;const F=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,S=!0===A||void 0===A?1:A||0,j=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,C=null!==(s=e.uriResolver)&&void 0!==s?s:f.default;return{strictSchema:null===(o=null!==(i=e.strictSchema)&&void 0!==i?i:F)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:F)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:F)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:F)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:F)&&void 0!==y&&y,code:e.code?{...e.code,optimize:S,regExp:j}:{optimize:S,regExp:j},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==($=e.loopEnum)&&void 0!==$?$:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(D=e.schemaId)&&void 0!==D?D:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(_=e.validateSchema)||void 0===_||_,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:C}}class D{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),E.call(this,$,e,"NOT SUPPORTED"),E.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=F.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await u.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=_.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new o.SchemaEnv({schema:{},schemaId:r});if(t=o.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=_.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,l.eachItem)(r,(e=>C.call(this,e))),this;N.call(this,t);const n={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=s[e];n&&i&&(s[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(void 0!==u)return u;r=(0,c.normalizeId)(i||r);const l=c.getSchemaRefs.call(this,e,r);return u=new o.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:l}),this._cache.set(u.schema,u),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=u),n&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}}function E(e,t,r,n="error"){for(const s in e){const i=s;i in t&&this.logger[n](`${r}: option ${s}. ${e[i]}`)}}function _(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function F(){const e={...this.opts};for(const t of h)delete e[t];return e}D.ValidationError=n.default,D.MissingRefError=s.default,e.default=D;const A={log(){},warn(){},error(){}};const S=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,l.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!S.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=s?i.post:i.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},i.rules.push(o)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?O.call(this,o,a,t.before):o.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function O(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=T(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,I]}}}(f);var Fr={},Ar={},Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.callRef=Sr.getValidate=void 0;const jr=Pt,Cr=de,Or=y,Nr=O,Ir=At,Tr=v,Rr={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:i,validateName:o,opts:a,self:c}=n,{root:u}=i;if(("#"===r||"#/"===r)&&s===u.baseId)return function(){if(i===u)return qr(e,o,i,i.$async);const r=t.scopeValue("root",{ref:u});return qr(e,Or._`${r}.validate`,u,u.$async)}();const l=Ir.resolveRef.call(c,u,s,r);if(void 0===l)throw new jr.default(n.opts.uriResolver,s,r);return l instanceof Ir.SchemaEnv?function(t){const r=Br(e,t);qr(e,r,t,t.$async)}(l):function(n){const s=t.scopeValue("schema",!0===a.code.source?{ref:n,code:(0,Or.stringify)(n)}:{ref:n}),i=t.name("valid"),o=e.subschema({schema:n,dataTypes:[],schemaPath:Or.nil,topSchemaRef:s,errSchemaPath:r},i);e.mergeEvaluated(o),e.ok(i)}(l)}};function Br(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):Or._`${r.scopeValue("wrapper",{ref:t})}.validate`}function qr(e,t,r,n){const{gen:s,it:i}=e,{allErrors:o,schemaEnv:a,opts:c}=i,u=c.passContext?Nr.default.this:Or.nil;function l(e){const t=Or._`${e}.errors`;s.assign(Nr.default.vErrors,Or._`${Nr.default.vErrors} === null ? ${t} : ${Nr.default.vErrors}.concat(${t})`),s.assign(Nr.default.errors,Or._`${Nr.default.vErrors}.length`)}function d(e){var t;if(!i.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==i.props)if(n&&!n.dynamicProps)void 0!==n.props&&(i.props=Tr.mergeEvaluated.props(s,n.props,i.props));else{const t=s.var("props",Or._`${e}.evaluated.props`);i.props=Tr.mergeEvaluated.props(s,t,i.props,Or.Name)}if(!0!==i.items)if(n&&!n.dynamicItems)void 0!==n.items&&(i.items=Tr.mergeEvaluated.items(s,n.items,i.items));else{const t=s.var("items",Or._`${e}.evaluated.items`);i.items=Tr.mergeEvaluated.items(s,t,i.items,Or.Name)}}n?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(Or._`await ${(0,Cr.callValidateCode)(e,t,u)}`),d(t),o||s.assign(r,!0)}),(e=>{s.if(Or._`!(${e} instanceof ${i.ValidationError})`,(()=>s.throw(e))),l(e),o||s.assign(r,!1)})),e.ok(r)}():e.result((0,Cr.callValidateCode)(e,t,u),(()=>d(t)),(()=>l(t)))}Sr.getValidate=Br,Sr.callRef=qr,Sr.default=Rr,Object.defineProperty(Ar,"__esModule",{value:!0});const Mr=["$schema","id","$defs",{keyword:"$comment"},"definitions",Sr.default];Ar.default=Mr;var Lr={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});const Ur=f,Kr=y.operators,zr={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Kr.LTE,fail:Kr.GT},{okStr:"<",ok:Kr.LT,fail:Kr.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Kr.GTE,fail:Kr.LT},{okStr:">",ok:Kr.GT,fail:Kr.LTE}]}},Gr={message:e=>Ur.str`must be ${Hr(e).okStr} ${e.schemaCode}`,params:e=>Ur._`{comparison: ${Hr(e).okStr}, limit: ${e.schemaCode}}`},Jr={keyword:Object.keys(zr),type:"number",schemaType:"number",$data:!0,error:Gr,code(e){const{data:t,schemaCode:r}=e;e.fail$data(Ur._`${t} ${Hr(e).fail} ${r} || isNaN(${t})`)}};function Hr(e){var t;const r=e.keyword,n=(null===(t=e.parentSchema)||void 0===t?void 0:t[zr[r].exclusive])?1:0;return zr[r].ops[n]}Vr.default=Jr;var Wr={};Object.defineProperty(Wr,"__esModule",{value:!0});const Yr={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},Xr={keyword:Object.keys(Yr),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){const r=Yr[e];if(void 0===t[r])throw new Error(`${e} can only be used with ${r}`)}};Wr.default=Xr;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});const Zr=y,en={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>Zr.str`must be multiple of ${e}`,params:({schemaCode:e})=>Zr._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,o=t.let("res"),a=i?Zr._`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:Zr._`${o} !== parseInt(${o})`;e.fail$data(Zr._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};Qr.default=en;var tn={},rn={};function nn(e){const t=e.length;let r,n=0,s=0;for(;s=55296&&r<=56319&&ssn.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>sn._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,i="maxLength"===t?sn.operators.GT:sn.operators.LT,o=!1===s.opts.unicode?sn._`${r}.length`:sn._`${(0,on.useFunc)(e.gen,an.default)}(${r})`;e.fail$data(sn._`${o} ${i} ${n}`)}};tn.default=cn;var un={};Object.defineProperty(un,"__esModule",{value:!0});const ln=de,dn=y,fn={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>dn.str`must match pattern "${e}"`,params:({schemaCode:e})=>dn._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:i}=e,o=i.opts.unicodeRegExp?"u":"",a=r?dn._`(new RegExp(${s}, ${o}))`:(0,ln.usePattern)(e,n);e.fail$data(dn._`!${a}.test(${t})`)}};un.default=fn;var pn={};Object.defineProperty(pn,"__esModule",{value:!0});const mn=y,hn={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>mn.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>mn._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?mn.operators.GT:mn.operators.LT;e.fail$data(mn._`Object.keys(${r}).length ${s} ${n}`)}};pn.default=hn;var yn={};Object.defineProperty(yn,"__esModule",{value:!0});const gn=de,$n=y,vn=v,bn={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>$n.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>$n._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:i,it:o}=e,{opts:a}=o;if(!i&&0===r.length)return;const c=r.length>=a.loopRequired;if(o.allErrors?function(){if(c||i)e.block$data($n.nil,u);else for(const t of r)(0,gn.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(c||i){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(i,(0,gn.propertyInData)(t,s,r,a.ownProperties)),t.if((0,$n.not)(i),(()=>{e.error(),t.break()}))}),$n.nil)}(o,r))),e.ok(r)}else t.if((0,gn.checkMissingProp)(e,r,o)),(0,gn.reportMissingProp)(e,o),t.else()}(),a.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${o.schemaEnv.baseId+o.errSchemaPath}" (strictRequired)`;(0,vn.checkStrictMode)(o,t,o.opts.strictRequired)}}function u(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,gn.noPropertyInData)(t,s,r,a.ownProperties),(()=>e.error()))}))}}};yn.default=bn;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});const Dn=y,En={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>Dn.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>Dn._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?Dn.operators.GT:Dn.operators.LT;e.fail$data(Dn._`${r}.length ${s} ${n}`)}};wn.default=En;var _n={},kn={};Object.defineProperty(kn,"__esModule",{value:!0});const Pn=je;Pn.code='require("ajv/dist/runtime/equal").default',kn.default=Pn,Object.defineProperty(_n,"__esModule",{value:!0});const xn=L,Fn=y,An=v,Sn=kn,jn={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>Fn.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>Fn._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:a}=e;if(!n&&!s)return;const c=t.let("valid"),u=i.items?(0,xn.getSchemaTypes)(i.items):[];function l(n,s){const i=t.name("item"),o=(0,xn.checkDataTypes)(u,i,a.opts.strictNumbers,xn.DataType.Wrong),l=t.const("indices",Fn._`{}`);t.for(Fn._`;${n}--;`,(()=>{t.let(i,Fn._`${r}[${n}]`),t.if(o,Fn._`continue`),u.length>1&&t.if(Fn._`typeof ${i} == "string"`,Fn._`${i} += "_"`),t.if(Fn._`typeof ${l}[${i}] == "number"`,(()=>{t.assign(s,Fn._`${l}[${i}]`),e.error(),t.assign(c,!1).break()})).code(Fn._`${l}[${i}] = ${n}`)}))}function d(n,s){const i=(0,An.useFunc)(t,Sn.default),o=t.name("outer");t.label(o).for(Fn._`;${n}--;`,(()=>t.for(Fn._`${s} = ${n}; ${s}--;`,(()=>t.if(Fn._`${i}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(c,!1).break(o)}))))))}e.block$data(c,(function(){const n=t.let("i",Fn._`${r}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(c,!0),t.if(Fn._`${n} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?l:d)(n,s)))}),Fn._`${o} === false`),e.ok(c)}};_n.default=jn;var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});const On=y,Nn=v,In=kn,Tn={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>On._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:i}=e;n||i&&"object"==typeof i?e.fail$data(On._`!${(0,Nn.useFunc)(t,In.default)}(${r}, ${s})`):e.fail(On._`${i} !== ${r}`)}};Cn.default=Tn;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const Bn=y,qn=v,Mn=kn,Ln={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Bn._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:i,it:o}=e;if(!n&&0===s.length)throw new Error("enum must have non-empty array");const a=s.length>=o.opts.loopEnum;let c;const u=()=>null!=c?c:c=(0,qn.useFunc)(t,Mn.default);let l;if(a||n)l=t.let("valid"),e.block$data(l,(function(){t.assign(l,!1),t.forOf("v",i,(e=>t.if(Bn._`${u()}(${r}, ${e})`,(()=>t.assign(l,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",i);l=(0,Bn.or)(...s.map(((t,n)=>function(e,t){const n=s[t];return"object"==typeof n&&null!==n?Bn._`${u()}(${r}, ${e}[${t}])`:Bn._`${r} === ${n}`}(e,n))))}e.pass(l)}};Rn.default=Ln,Object.defineProperty(Lr,"__esModule",{value:!0});const Vn=Wr,Un=Qr,Kn=tn,zn=un,Gn=pn,Jn=yn,Hn=wn,Wn=_n,Yn=Cn,Xn=Rn,Qn=[Vr.default,Vn.default,Un.default,Kn.default,zn.default,Gn.default,Jn.default,Hn.default,Wn.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Yn.default,Xn.default];Lr.default=Qn;var Zn={},es={};Object.defineProperty(es,"__esModule",{value:!0}),es.validateAdditionalItems=void 0;const ts=y,rs=v,ns={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>ts.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ts._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?ss(e,n):(0,rs.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function ss(e,t){const{gen:r,schema:n,data:s,keyword:i,it:o}=e;o.items=!0;const a=r.const("len",ts._`${s}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(ts._`${a} <= ${t.length}`);else if("object"==typeof n&&!(0,rs.alwaysValidSchema)(o,n)){const n=r.var("valid",ts._`${a} <= ${t.length}`);r.if((0,ts.not)(n),(()=>function(n){r.forRange("i",t.length,a,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:rs.Type.Num},n),o.allErrors||r.if((0,ts.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}es.validateAdditionalItems=ss,es.default=ns;var is={},os={};Object.defineProperty(os,"__esModule",{value:!0}),os.validateTuple=void 0;const as=y,cs=v,us=de,ls={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return ds(e,"additionalItems",t);r.items=!0,(0,cs.alwaysValidSchema)(r,t)||e.ok((0,us.validateArray)(e))}};function ds(e,t,r=e.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:a}=e;!function(e){const{opts:n,errSchemaPath:s}=a,i=r.length,c=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(n.strictTuples&&!c){const e=`"${o}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,cs.checkStrictMode)(a,e,n.strictTuples)}}(s),a.opts.unevaluated&&r.length&&!0!==a.items&&(a.items=cs.mergeEvaluated.items(n,r.length,a.items));const c=n.name("valid"),u=n.const("len",as._`${i}.length`);r.forEach(((t,r)=>{(0,cs.alwaysValidSchema)(a,t)||(n.if(as._`${u} > ${r}`,(()=>e.subschema({keyword:o,schemaProp:r,dataProp:r},c))),e.ok(c))}))}os.validateTuple=ds,os.default=ls,Object.defineProperty(is,"__esModule",{value:!0});const fs=os,ps={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,fs.validateTuple)(e,"items")};is.default=ps;var ms={};Object.defineProperty(ms,"__esModule",{value:!0});const hs=y,ys=v,gs=de,$s=es,vs={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>hs.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>hs._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,ys.alwaysValidSchema)(n,t)||(s?(0,$s.validateAdditionalItems)(e,s):e.ok((0,gs.validateArray)(e)))}};ms.default=vs;var bs={};Object.defineProperty(bs,"__esModule",{value:!0});const ws=y,Ds=v,Es={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?ws.str`must contain at least ${e} valid item(s)`:ws.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?ws._`{minContains: ${e}}`:ws._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;let o,a;const{minContains:c,maxContains:u}=n;i.opts.next?(o=void 0===c?1:c,a=u):o=1;const l=t.const("len",ws._`${s}.length`);if(e.setParams({min:o,max:a}),void 0===a&&0===o)return void(0,Ds.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==a&&o>a)return(0,Ds.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,Ds.alwaysValidSchema)(i,r)){let t=ws._`${l} >= ${o}`;return void 0!==a&&(t=ws._`${t} && ${l} <= ${a}`),void e.pass(t)}i.items=!0;const d=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);p(e,(()=>t.if(e,(()=>function(e){t.code(ws._`${e}++`),void 0===a?t.if(ws._`${e} >= ${o}`,(()=>t.assign(d,!0).break())):(t.if(ws._`${e} > ${a}`,(()=>t.assign(d,!1).break())),1===o?t.assign(d,!0):t.if(ws._`${e} >= ${o}`,(()=>t.assign(d,!0))))}(r)))))}function p(r,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:Ds.Type.Num,compositeRule:!0},r),n()}))}void 0===a&&1===o?p(d,(()=>t.if(d,(()=>t.break())))):0===o?(t.let(d,!0),void 0!==a&&t.if(ws._`${s}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,(()=>e.reset()))}};bs.default=Es;var _s={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=y,r=v,n=de;e.error={message:({params:{property:e,depsCount:r,deps:n}})=>t.str`must have ${1===r?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:n,missingProperty:s}})=>t._`{property: ${e}, missingProperty: ${s}, depsCount: ${r}, deps: ${n}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);i(e,t),o(e,r)}};function i(e,r=e.schema){const{gen:s,data:i,it:o}=e;if(0===Object.keys(r).length)return;const a=s.let("missing");for(const c in r){const u=r[c];if(0===u.length)continue;const l=(0,n.propertyInData)(s,i,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),o.allErrors?s.if(l,(()=>{for(const t of u)(0,n.checkReportMissingProp)(e,t)})):(s.if(t._`${l} && (${(0,n.checkMissingProp)(e,u,a)})`),(0,n.reportMissingProp)(e,a),s.else())}}function o(e,t=e.schema){const{gen:s,data:i,keyword:o,it:a}=e,c=s.name("valid");for(const u in t)(0,r.alwaysValidSchema)(a,t[u])||(s.if((0,n.propertyInData)(s,i,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>s.var(c,!0))),e.ok(c))}e.validatePropertyDeps=i,e.validateSchemaDeps=o,e.default=s}(_s);var ks={};Object.defineProperty(ks,"__esModule",{value:!0});const Ps=y,xs=v,Fs={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>Ps._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,xs.alwaysValidSchema)(s,r))return;const i=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,Ps.not)(i),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(i)}};ks.default=Fs;var As={};Object.defineProperty(As,"__esModule",{value:!0});const Ss=de,js=y,Cs=O,Os=v,Ns={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>js._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:c}=o;if(o.props=!0,"all"!==c.removeAdditional&&(0,Os.alwaysValidSchema)(o,r))return;const u=(0,Ss.allSchemaProperties)(n.properties),l=(0,Ss.allSchemaProperties)(n.patternProperties);function d(e){t.code(js._`delete ${s}[${e}]`)}function f(n){if("all"===c.removeAdditional||c.removeAdditional&&!1===r)d(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(a||t.break());if("object"==typeof r&&!(0,Os.alwaysValidSchema)(o,r)){const r=t.name("valid");"failing"===c.removeAdditional?(p(n,r,!1),t.if((0,js.not)(r),(()=>{e.reset(),d(n)}))):(p(n,r),a||t.if((0,js.not)(r),(()=>t.break())))}}}function p(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:Os.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",s,(r=>{u.length||l.length?t.if(function(r){let s;if(u.length>8){const e=(0,Os.schemaRefOrVal)(o,n.properties,"properties");s=(0,Ss.isOwnProperty)(t,e,r)}else s=u.length?(0,js.or)(...u.map((e=>js._`${r} === ${e}`))):js.nil;return l.length&&(s=(0,js.or)(s,...l.map((t=>js._`${(0,Ss.usePattern)(e,t)}.test(${r})`)))),(0,js.not)(s)}(r),(()=>f(r))):f(r)})),e.ok(js._`${i} === ${Cs.default.errors}`)}};As.default=Ns;var Is={};Object.defineProperty(Is,"__esModule",{value:!0});const Ts=p,Rs=de,Bs=v,qs=As,Ms={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;"all"===i.opts.removeAdditional&&void 0===n.additionalProperties&&qs.default.code(new Ts.KeywordCxt(i,qs.default,"additionalProperties"));const o=(0,Rs.allSchemaProperties)(r);for(const d of o)i.definedProperties.add(d);i.opts.unevaluated&&o.length&&!0!==i.props&&(i.props=Bs.mergeEvaluated.props(t,(0,Bs.toHash)(o),i.props));const a=o.filter((e=>!(0,Bs.alwaysValidSchema)(i,r[e])));if(0===a.length)return;const c=t.name("valid");for(const d of a)u(d)?l(d):(t.if((0,Rs.propertyInData)(t,s,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(e){return i.opts.useDefaults&&!i.compositeRule&&void 0!==r[e].default}function l(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c)}}};Is.default=Ms;var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0});const Vs=de,Us=y,Ks=v,zs=v,Gs={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:i}=e,{opts:o}=i,a=(0,Vs.allSchemaProperties)(r),c=a.filter((e=>(0,Ks.alwaysValidSchema)(i,r[e])));if(0===a.length||c.length===a.length&&(!i.opts.unevaluated||!0===i.props))return;const u=o.strictSchema&&!o.allowMatchingProperties&&s.properties,l=t.name("valid");!0===i.props||i.props instanceof Us.Name||(i.props=(0,zs.evaluatedPropsToName)(t,i.props));const{props:d}=i;function f(e){for(const t in u)new RegExp(e).test(t)&&(0,Ks.checkStrictMode)(i,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function p(r){t.forIn("key",n,(n=>{t.if(Us._`${(0,Vs.usePattern)(e,r)}.test(${n})`,(()=>{const s=c.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:zs.Type.Str},l),i.opts.unevaluated&&!0!==d?t.assign(Us._`${d}[${n}]`,!0):s||i.allErrors||t.if((0,Us.not)(l),(()=>t.break()))}))}))}!function(){for(const e of a)u&&f(e),i.allErrors?p(e):(t.var(l,!0),p(e),t.if(l))}()}};Ls.default=Gs;var Js={};Object.defineProperty(Js,"__esModule",{value:!0});const Hs=v,Ws={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Hs.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Js.default=Ws;var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});const Xs={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:de.validateUnion,error:{message:"must match a schema in anyOf"}};Ys.default=Xs;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});const Zs=y,ei=v,ti={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>Zs._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block((function(){i.forEach(((r,n)=>{let i;(0,ei.alwaysValidSchema)(s,r)?t.var(c,!0):i=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&t.if(Zs._`${c} && ${o}`).assign(o,!1).assign(a,Zs._`[${a}, ${n}]`).else(),t.if(c,(()=>{t.assign(o,!0),t.assign(a,n),i&&e.mergeEvaluated(i,Zs.Name)}))}))})),e.result(o,(()=>e.reset()),(()=>e.error(!0)))}};Qs.default=ti;var ri={};Object.defineProperty(ri,"__esModule",{value:!0});const ni=v,si={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,ni.alwaysValidSchema)(n,t))return;const i=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(i)}))}};ri.default=si;var ii={};Object.defineProperty(ii,"__esModule",{value:!0});const oi=y,ai=v,ci={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>oi.str`must match "${e.ifClause}" schema`,params:({params:e})=>oi._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,ai.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=ui(n,"then"),i=ui(n,"else");if(!s&&!i)return;const o=t.let("valid",!0),a=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(t)}(),e.reset(),s&&i){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(a,c("then",r),c("else",r))}else s?t.if(a,c("then")):t.if((0,oi.not)(a),c("else"));function c(r,n){return()=>{const s=e.subschema({keyword:r},a);t.assign(o,a),e.mergeValidEvaluated(s,o),n?t.assign(n,oi._`${r}`):e.setParams({ifClause:r})}}e.pass(o,(()=>e.error(!0)))}};function ui(e,t){const r=e.schema[t];return void 0!==r&&!(0,ai.alwaysValidSchema)(e,r)}ii.default=ci;var li={};Object.defineProperty(li,"__esModule",{value:!0});const di=v,fi={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,di.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};li.default=fi,Object.defineProperty(Zn,"__esModule",{value:!0});const pi=es,mi=is,hi=os,yi=ms,gi=bs,$i=_s,vi=ks,bi=As,wi=Is,Di=Ls,Ei=Js,_i=Ys,ki=Qs,Pi=ri,xi=ii,Fi=li;Zn.default=function(e=!1){const t=[Ei.default,_i.default,ki.default,Pi.default,xi.default,Fi.default,vi.default,bi.default,$i.default,wi.default,Di.default];return e?t.push(mi.default,yi.default):t.push(pi.default,hi.default),t.push(gi.default),t};var Ai={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});const ji=y,Ci={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>ji.str`must match format "${e}"`,params:({schemaCode:e})=>ji._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;c.validateFormats&&(s?function(){const s=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),i=r.const("fDef",ji._`${s}[${o}]`),a=r.let("fType"),u=r.let("format");r.if(ji._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>r.assign(a,ji._`${i}.type || "string"`).assign(u,ji._`${i}.validate`)),(()=>r.assign(a,ji._`"string"`).assign(u,i))),e.fail$data((0,ji.or)(!1===c.strictSchema?ji.nil:ji._`${o} && !${u}`,function(){const e=l.$async?ji._`(${i}.async ? await ${u}(${n}) : ${u}(${n}))`:ji._`${u}(${n})`,r=ji._`(typeof ${u} == "function" ? ${e} : ${u}.test(${n}))`;return ji._`${u} && ${u} !== true && ${a} === ${t} && !${r}`}()))}():function(){const s=d.formats[i];if(!s)return void function(){if(!1===c.strictSchema)return void d.logger.warn(e());throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}}();if(!0===s)return;const[o,a,f]=function(e){const t=e instanceof RegExp?(0,ji.regexpCode)(e):c.code.formats?ji._`${c.code.formats}${(0,ji.getProperty)(i)}`:void 0,n=r.scopeValue("formats",{key:i,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,ji._`${n}.validate`];return["string",e,n]}(s);o===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return ji._`await ${f}(${n})`}return"function"==typeof a?ji._`${f}(${n})`:ji._`${f}.test(${n})`}())}())}};Si.default=Ci,Object.defineProperty(Ai,"__esModule",{value:!0});const Oi=[Si.default];Ai.default=Oi,Object.defineProperty(Fr,"__esModule",{value:!0});const Ni=Lr,Ii=Zn,Ti=Ai,Ri=[Ar.default,Ni.default,Ii.default(),Ti.default,["title","description","default"]];Fr.default=Ri;var Bi,qi,Mi={},Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.DiscrError=void 0,(qi=Bi||(Li.DiscrError=Bi={})).Tag="tag",qi.Mapping="mapping",Object.defineProperty(Mi,"__esModule",{value:!0});const Vi=y,Ui=Li,Ki=At,zi=Pt,Gi=v,Ji={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Ui.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>Vi._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:i}=e,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if("string"!=typeof a)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 c=t.let("valid",!1),u=t.const("tag",Vi._`${r}${(0,Vi.getProperty)(a)}`);function l(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,Vi.Name),n}t.if(Vi._`typeof ${u} == "string"`,(()=>function(){const r=function(){var e;const t={},r=c(s);let n=!0;for(let s=0;se.error(!1,{discrError:Ui.DiscrError.Tag,tag:u,tagName:a}))),e.ok(c)}};Mi.default=Ji;const Hi={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{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}},type:"object",properties:{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:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=f,n=Fr,s=Mi,i=Hi,o=["/properties"],a="http://json-schema.org/draft-04/schema";class c extends r.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=f;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=f;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}})}(d,d.exports);const Wi=l(d.exports);var Yi={exports:{}},Xi={};!function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(s,i),time:t(a(!0),c),"date-time":t(d(!0),f),"iso-time":t(a(),u),"iso-date-time":t(d(),p),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return m.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\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:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}},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:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=$&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":t(/^\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,f),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\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,p),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},e.formatNames=Object.keys(e.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){const t=r.exec(e);if(!t)return!1;const s=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(s)?29:n[i])}function i(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!a)return!1;if(n<=23&&s<=59&&i<60)return!0;const d=s-l*c,f=n-u*c-(d<0?1:0);return(23===f||-1===f)&&(59===d||-1===d)&&i<61}}function c(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return r&&n?r-n:void 0}function u(e,t){if(!e||!t)return;const r=o.exec(e),n=o.exec(t);return r&&n?(e=r[1]+r[2]+r[3])>(t=n[1]+n[2]+n[3])?1:e=",ok:uo.GTE,fail:uo.LT},exclusiveMaximum:{okStr:"<",ok:uo.LT,fail:uo.GTE},exclusiveMinimum:{okStr:">",ok:uo.GT,fail:uo.LTE}},fo={message:({keyword:e,schemaCode:t})=>co.str`must be ${lo[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>co._`{comparison: ${lo[e].okStr}, limit: ${t}}`},po={keyword:Object.keys(lo),type:"number",schemaType:"number",$data:!0,error:fo,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(co._`${r} ${lo[t].fail} ${n} || isNaN(${r})`)}};ao.default=po,Object.defineProperty(oo,"__esModule",{value:!0});const mo=Qr,ho=tn,yo=un,go=pn,$o=yn,vo=wn,bo=_n,wo=Cn,Do=Rn,Eo=[ao.default,mo.default,ho.default,yo.default,go.default,$o.default,vo.default,bo.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},wo.default,Do.default];oo.default=Eo;var _o={};Object.defineProperty(_o,"__esModule",{value:!0}),_o.contentVocabulary=_o.metadataVocabulary=void 0,_o.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],_o.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(eo,"__esModule",{value:!0});const ko=oo,Po=Zn,xo=Ai,Fo=_o,Ao=[to.default,ko.default,(0,Po.default)(),xo.default,Fo.metadataVocabulary,Fo.contentVocabulary];eo.default=Ao;const So={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=f,n=eo,s=Mi,i=So,o=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=p;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=y;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=_t;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Pt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(Zi,Zi.exports);var jo=Zi.exports;!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=jo,r=y,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:e,schemaCode:t})=>r.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${s[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:i,code(e){const{gen:n,data:i,schemaCode:o,keyword:a,it:c}=e,{opts:u,self:l}=c;if(!u.validateFormats)return;const d=new t.KeywordCxt(c,l.RULES.all.format.definition,"format");function f(e){return r._`${e}.compare(${i}, ${o}) ${s[a].fail} 0`}d.$data?function(){const t=n.scopeValue("formats",{ref:l.formats,code:u.code.formats}),s=n.const("fmt",r._`${t}[${d.schemaCode}]`);e.fail$data((0,r.or)(r._`typeof ${s} != "object"`,r._`${s} instanceof RegExp`,r._`typeof ${s}.compare != "function"`,f(s)))}():function(){const t=d.schema,s=l.formats[t];if(!s||!0===s)return;if("object"!=typeof s||s instanceof RegExp||"function"!=typeof s.compare)throw new Error(`"${a}": format "${t}" does not define "compare" function`);const i=n.scopeValue("formats",{key:t,ref:s,code:u.code.formats?r._`${u.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(i))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(Qi),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Xi,n=Qi,s=y,i=new s.Name("fullFormats"),o=new s.Name("fastFormats"),a=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,i),e;const[s,a]="fast"===t.mode?[r.fastFormats,o]:[r.fullFormats,i];return c(e,t.formats||r.formatNames,s,a),t.keywords&&(0,n.default)(e),e};function c(e,t,r,n){var i,o;null!==(i=(o=e.opts.code).formats)&&void 0!==i||(o.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const s of t)e.addFormat(s,r[s])}a.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(Yi,Yi.exports);const Co=l(Yi.exports);var Oo={exports:{}},No={},Io={},To={};Object.defineProperty(To,"__esModule",{value:!0}),To.dynamicAnchor=void 0;const Ro=y,Bo=O,qo=At,Mo=Sr,Lo={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Vo(e,e.schema)};function Vo(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;const s=Ro._`${Bo.default.dynamicAnchors}${(0,Ro.getProperty)(t)}`,i="#"===n.errSchemaPath?n.validateName:function(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:s,baseId:i,localRefs:o,meta:a}=t.root,{schemaId:c}=n.opts,u=new qo.SchemaEnv({schema:r,schemaId:c,root:s,baseId:i,localRefs:o,meta:a});return qo.compileSchema.call(n,u),(0,Mo.getValidate)(e,u)}(e);r.if(Ro._`!${s}`,(()=>r.assign(s,i)))}To.dynamicAnchor=Vo,To.default=Lo;var Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.dynamicRef=void 0;const Ko=y,zo=O,Go=Sr,Jo={keyword:"$dynamicRef",schemaType:"string",code:e=>Ho(e,e.schema)};function Ho(e,t){const{gen:r,keyword:n,it:s}=e;if("#"!==t[0])throw new Error(`"${n}" only supports hash fragment reference`);const i=t.slice(1);if(s.allErrors)o();else{const t=r.let("valid",!1);o(t),e.ok(t)}function o(e){if(s.schemaEnv.root.dynamicAnchors[i]){const t=r.let("_v",Ko._`${zo.default.dynamicAnchors}${(0,Ko.getProperty)(i)}`);r.if(t,a(t,e),a(s.validateName,e))}else a(s.validateName,e)()}function a(t,n){return n?()=>r.block((()=>{(0,Go.callRef)(e,t),r.let(n,!0)})):()=>(0,Go.callRef)(e,t)}}Uo.dynamicRef=Ho,Uo.default=Jo;var Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});const Yo=To,Xo=v,Qo={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,Yo.dynamicAnchor)(e,""):(0,Xo.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Wo.default=Qo;var Zo={};Object.defineProperty(Zo,"__esModule",{value:!0});const ea=Uo,ta={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,ea.dynamicRef)(e,e.schema)};Zo.default=ta,Object.defineProperty(Io,"__esModule",{value:!0});const ra=Uo,na=Wo,sa=Zo,ia=[To.default,ra.default,na.default,sa.default];Io.default=ia;var oa={},aa={};Object.defineProperty(aa,"__esModule",{value:!0});const ca=_s,ua={keyword:"dependentRequired",type:"object",schemaType:"object",error:ca.error,code:e=>(0,ca.validatePropertyDeps)(e)};aa.default=ua;var la={};Object.defineProperty(la,"__esModule",{value:!0});const da=_s,fa={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,da.validateSchemaDeps)(e)};la.default=fa;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});const ma=v,ha={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){void 0===t.contains&&(0,ma.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};pa.default=ha,Object.defineProperty(oa,"__esModule",{value:!0});const ya=la,ga=pa,$a=[aa.default,ya.default,ga.default];oa.default=$a;var va={},ba={};Object.defineProperty(ba,"__esModule",{value:!0});const wa=y,Da=v,Ea=O,_a={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>wa._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:r,data:n,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,props:a}=i;function c(n){if(!1===r)return e.setParams({unevaluatedProperty:n}),e.error(),void(o||t.break());if(!(0,Da.alwaysValidSchema)(i,r)){const r=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:n,dataPropType:Da.Type.Str},r),o||t.if((0,wa.not)(r),(()=>t.break()))}}a instanceof wa.Name?t.if(wa._`${a} !== true`,(()=>t.forIn("key",n,(e=>t.if(function(e,t){return wa._`!${e} || !${e}[${t}]`}(a,e),(()=>c(e))))))):!0!==a&&t.forIn("key",n,(e=>void 0===a?c(e):t.if(function(e,t){const r=[];for(const n in e)!0===e[n]&&r.push(wa._`${t} !== ${n}`);return(0,wa.and)(...r)}(a,e),(()=>c(e))))),i.props=!0,e.ok(wa._`${s} === ${Ea.default.errors}`)}};ba.default=_a;var ka={};Object.defineProperty(ka,"__esModule",{value:!0});const Pa=y,xa=v,Fa={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>Pa.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>Pa._`{limit: ${e}}`},code(e){const{gen:t,schema:r,data:n,it:s}=e,i=s.items||0;if(!0===i)return;const o=t.const("len",Pa._`${n}.length`);if(!1===r)e.setParams({len:i}),e.fail(Pa._`${o} > ${i}`);else if("object"==typeof r&&!(0,xa.alwaysValidSchema)(s,r)){const r=t.var("valid",Pa._`${o} <= ${i}`);t.if((0,Pa.not)(r),(()=>function(r,n){t.forRange("i",n,o,(n=>{e.subschema({keyword:"unevaluatedItems",dataProp:n,dataPropType:xa.Type.Num},r),s.allErrors||t.if((0,Pa.not)(r),(()=>t.break()))}))}(r,i))),e.ok(r)}s.items=!0}};ka.default=Fa,Object.defineProperty(va,"__esModule",{value:!0});const Aa=ka,Sa=[ba.default,Aa.default];va.default=Sa,Object.defineProperty(No,"__esModule",{value:!0});const ja=to,Ca=oo,Oa=Zn,Na=oa,Ia=va,Ta=Ai,Ra=_o,Ba=[Io.default,ja.default,Ca.default,(0,Oa.default)(!0),Ta.default,Ra.metadataVocabulary,Ra.contentVocabulary,Na.default,Ia.default];No.default=Ba;var qa={};const Ma={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"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},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{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}}},La={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{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"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},Va={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},Ua={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},Ka={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$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"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},za={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Ga={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{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}}},Ja={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{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"}}},$defs:{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:[]}}};Object.defineProperty(qa,"__esModule",{value:!0});const Ha=Ma,Wa=La,Ya=Va,Xa=Ua,Qa=Ka,Za=za,ec=Ga,tc=Ja,rc=["/properties"];qa.default=function(e){return[Ha,Wa,Ya,Xa,Qa,t(this,Za),ec,t(this,tc)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,r){return e?t.$dataMetaSchema(r,rc):r}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=f,n=No,s=Mi,i=qa,o="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(i.default.call(this,e),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var c=p;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=y;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=_t;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=Pt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(Oo,Oo.exports);const nc=l(Oo.exports);function sc(e){for(const t of new Set(c)){const r="2.0"===t?"swagger":"openapi",n=e[r];if("string"==typeof n&&n.startsWith(t))return{version:t,specificationType:r,specificationVersion:n}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function ic(e){return null==e?void 0:e.find((e=>e.isEntrypoint))}function oc(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function ac(e,t,r=[]){const n={};for(const[s,i]of Object.entries(e)){const e=[...r,s];Array.isArray(i)?n[s]=i.map(((r,n)=>"object"==typeof r&&null!==r?ac(r,t,[...e,n.toString()]):r)):n[s]="object"==typeof i&&null!==i?ac(i,t,e):i}return t(n,r)}function cc(e){const t=[];return e&&"object"==typeof e?(ac(e,(e=>(e.$ref&&"string"==typeof e.$ref&&!e.$ref.startsWith("#")&&t.push(e.$ref.split("#")[0]),e))),[...new Set(t)]):t}function uc(e){return void 0!==e&&Array.isArray(e)&&e.length>0&&e.some((e=>!0===e.isEntrypoint))}const lc=Symbol.for("yaml.alias"),dc=Symbol.for("yaml.document"),fc=Symbol.for("yaml.map"),pc=Symbol.for("yaml.pair"),mc=Symbol.for("yaml.scalar"),hc=Symbol.for("yaml.seq"),yc=Symbol.for("yaml.node.type"),gc=e=>!!e&&"object"==typeof e&&e[yc]===lc,$c=e=>!!e&&"object"==typeof e&&e[yc]===dc,vc=e=>!!e&&"object"==typeof e&&e[yc]===fc,bc=e=>!!e&&"object"==typeof e&&e[yc]===pc,wc=e=>!!e&&"object"==typeof e&&e[yc]===mc,Dc=e=>!!e&&"object"==typeof e&&e[yc]===hc;function Ec(e){if(e&&"object"==typeof e)switch(e[yc]){case fc:case hc:return!0}return!1}function _c(e){if(e&&"object"==typeof e)switch(e[yc]){case lc:case fc:case mc:case hc:return!0}return!1}const kc=e=>(wc(e)||Ec(e))&&!!e.anchor,Pc=Symbol("break visit"),xc=Symbol("skip children"),Fc=Symbol("remove node");function Ac(e,t){const r=function(e){if("object"==typeof e&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}(t);if($c(e)){Sc(null,e.contents,r,Object.freeze([e]))===Fc&&(e.contents=null)}else Sc(null,e,r,Object.freeze([]))}function Sc(e,t,r,n){const s=function(e,t,r,n){var s,i,o,a,c;return"function"==typeof r?r(e,t,n):vc(t)?null==(s=r.Map)?void 0:s.call(r,e,t,n):Dc(t)?null==(i=r.Seq)?void 0:i.call(r,e,t,n):bc(t)?null==(o=r.Pair)?void 0:o.call(r,e,t,n):wc(t)?null==(a=r.Scalar)?void 0:a.call(r,e,t,n):gc(t)?null==(c=r.Alias)?void 0:c.call(r,e,t,n):void 0}(e,t,r,n);if(_c(s)||bc(s))return function(e,t,r){const n=t[t.length-1];if(Ec(n))n.items[e]=r;else if(bc(n))"key"===e?n.key=r:n.value=r;else{if(!$c(n)){const e=gc(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}(e,n,s),Sc(e,s,r,n);if("symbol"!=typeof s)if(Ec(t)){n=Object.freeze(n.concat(t));for(let e=0;e"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(i){return t(String(i)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+e.substring(r.length).replace(/[!,[\]{}]/g,(e=>jc[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&_c(e.contents)){const t={};Ac(e.contents,((e,r)=>{_c(r)&&r.tag&&(t[r.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[s,i]of r)"!!"===s&&"tag:yaml.org,2002:"===i||e&&!n.some((e=>e.startsWith(i)))||t.push(`%TAG ${s} ${i}`);return t.join("\n")}}function Oc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function Nc(e){const t=new Set;return Ac(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function Ic(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function Tc(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let s=0,i=n.length;sRc(e,String(t),r)));if(e&&"function"==typeof e.toJSON){if(!r||!kc(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const s=e.toJSON(t,r);return r.onCreate&&r.onCreate(s),s}return"bigint"!=typeof e||(null==r?void 0:r.keep)?e:Number(e)}Cc.defaultYaml={explicit:!1,version:"1.2"},Cc.defaultTags={"!!":"tag:yaml.org,2002:"};class Bc{constructor(e){Object.defineProperty(this,yc,{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:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!$c(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},o=Rc(this,"",i);if("function"==typeof n)for(const{count:a,res:c}of i.anchors.values())n(c,a);return"function"==typeof s?Tc(s,{"":o},"",o):o}}class qc extends Bc{constructor(e){super(lc),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Ac(e,{Node:(e,r)=>{if(r===this)return Ac.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:s}=t,i=this.resolve(n);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=r.get(i);if(o||(Rc(i,null,t),o=r.get(i)),!o||void 0===o.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(s>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=Mc(n,i,r)),o.count*o.aliasCount>s)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return o.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(Oc(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function Mc(e,t,r){if(gc(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(Ec(t)){let n=0;for(const s of t.items){const t=Mc(e,s,r);t>n&&(n=t)}return n}if(bc(t)){const n=Mc(e,t.key,r),s=Mc(e,t.value,r);return Math.max(n,s)}return 1}const Lc=e=>!e||"function"!=typeof e&&"object"!=typeof e;class Vc extends Bc{constructor(e){super(mc),this.value=e}toJSON(e,t){return(null==t?void 0:t.keep)?this.value:Rc(this.value,e,t)}toString(){return String(this.value)}}Vc.BLOCK_FOLDED="BLOCK_FOLDED",Vc.BLOCK_LITERAL="BLOCK_LITERAL",Vc.PLAIN="PLAIN",Vc.QUOTE_DOUBLE="QUOTE_DOUBLE",Vc.QUOTE_SINGLE="QUOTE_SINGLE";const Uc="tag:yaml.org,2002:";function Kc(e,t,r){var n,s,i;if($c(e)&&(e=e.contents),_c(e))return e;if(bc(e)){const t=null==(s=(n=r.schema[fc]).createNode)?void 0:s.call(n,r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=r;let d;if(o&&e&&"object"==typeof e){if(d=l.get(e),d)return d.anchor||(d.anchor=a(e)),new qc(d.anchor);d={anchor:null,node:null},l.set(e,d)}(null==t?void 0:t.startsWith("!!"))&&(t=Uc+t.slice(2));let f=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>{var r;return(null==(r=t.identify)?void 0:r.call(t,e))&&!t.format}))}(e,t,u.tags);if(!f){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new Vc(e);return d&&(d.node=t),t}f=e instanceof Map?u[fc]:Symbol.iterator in Object(e)?u[hc]:u[fc]}c&&(c(f),delete r.onTagObj);const p=(null==f?void 0:f.createNode)?f.createNode(r.schema,e,r):"function"==typeof(null==(i=null==f?void 0:f.nodeClass)?void 0:i.from)?f.nodeClass.from(r.schema,e,r):new Vc(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function zc(e,t,r){let n=r;for(let s=t.length-1;s>=0;--s){const e=t[s];if("number"==typeof e&&Number.isInteger(e)&&e>=0){const t=[];t[e]=n,n=t}else n=new Map([[e,n]])}return Kc(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Gc=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Jc extends Bc{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>_c(t)||bc(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Gc(e))this.add(t);else{const[r,...n]=e,s=this.get(r,!0);if(Ec(s))s.addIn(n,t);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,zc(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(Ec(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,s=this.get(r,!0);return 0===n.length?!t&&wc(s)?s.value:s:Ec(s)?s.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!bc(t))return!1;const r=t.value;return null==r||e&&wc(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!Ec(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(Ec(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,zc(this.schema,n,t))}}}}Jc.maxFlowStringSingleLineLength=60;const Hc=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Wc(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Yc=(e,t,r)=>e.endsWith("\n")?Wc(r,t):r.includes("\n")?"\n"+Wc(r,t):(e.endsWith(" ")?"":" ")+r,Xc="flow",Qc="block",Zc="quoted";function eu(e,t,r="flow",{indentAtStart:n,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return e;const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let d,f,p=s-t.length;"number"==typeof n&&(n>s-Math.max(2,i)?u.push(0):p=s-n);let m=!1,h=-1,y=-1,g=-1;r===Qc&&(h=tu(e,h,t.length),-1!==h&&(p=h+c));for(let v;v=e[h+=1];){if(r===Zc&&"\\"===v){switch(y=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}g=h}if("\n"===v)r===Qc&&(h=tu(e,h,t.length)),p=h+t.length+c,d=void 0;else{if(" "===v&&f&&" "!==f&&"\n"!==f&&"\t"!==f){const t=e[h+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(d=h)}if(h>=p)if(d)u.push(d),p=d+c,d=void 0;else if(r===Zc){for(;" "===f||"\t"===f;)f=v,v=e[h+=1],m=!0;const t=h>g+1?h-2:y-1;if(l[t])return e;u.push(t),l[t]=!0,p=t+c,d=void 0}else m=!0}f=v}if(m&&a&&a(),0===u.length)return e;o&&o();let $=e.slice(0,u[0]);for(let v=0;v({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),nu=e=>/^(%|---|\.\.\.)/m.test(e);function su(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(nu(e)?" ":"");let o="",a=0;for(let c=0,u=r[c];u;u=r[++c])if(" "===u&&"\\"===r[c+1]&&"n"===r[c+2]&&(o+=r.slice(a,c)+"\\ ",c+=1,a=c,u="\\"),"\\"===u)switch(r[c+1]){case"u":{o+=r.slice(a,c);const e=r.substr(c+2,4);switch(e){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:"00"===e.substr(0,2)?o+="\\x"+e.substr(2):o+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(n||'"'===r[c+2]||r.lengthn)return!0;if(o=i+1,s-o<=n)return!1}return!0}(r,c,u.length));if(!r)return l?"|\n":">\n";let d,f;for(f=r.length;f>0;--f){const e=r[f-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(f);const m=p.indexOf("\n");-1===m?d="-":r===p||m!==p.length-1?(d="+",i&&i()):d="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(au,`$&${u}`));let h,y=!1,g=-1;for(h=0;h")+(y?u?"2":"1":"")+d;if(e&&(v+=" "+a(e.replace(/ ?[\r\n]+/g," ")),s&&s()),l)return`${v}\n${u}${$}${r=r.replace(/\n+/g,`$&${u}`)}${p}`;return`${v}\n${u}${eu(`${$}${r=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`)}${p}`,u,Qc,ru(n,!0))}`}function uu(e,t,r,n){const{implicitKey:s,inFlow:i}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==Vc.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Vc.QUOTE_DOUBLE);const c=e=>{switch(e){case Vc.BLOCK_FOLDED:case Vc.BLOCK_LITERAL:return s||i?ou(o.value,t):cu(o,t,r,n);case Vc.QUOTE_DOUBLE:return su(o.value,t);case Vc.QUOTE_SINGLE:return iu(o.value,t);case Vc.PLAIN:return function(e,t,r,n){const{type:s,value:i}=e,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:l}=t;if(a&&i.includes("\n")||l&&/[[\]{},]/.test(i))return ou(i,t);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||l||!i.includes("\n")?ou(i,t):cu(e,t,r,n);if(!a&&!l&&s!==Vc.PLAIN&&i.includes("\n"))return cu(e,t,r,n);if(nu(i)){if(""===c)return t.forceBlockIndent=!0,cu(e,t,r,n);if(a&&c===u)return ou(i,t)}const d=i.replace(/\n+/g,`$&\n${c}`);if(o){const e=e=>{var t;return e.default&&"tag:yaml.org,2002:str"!==e.tag&&(null==(t=e.test)?void 0:t.test(d))},{compat:r,tags:n}=t.doc.schema;if(n.some(e)||(null==r?void 0:r.some(e)))return ou(i,t)}return a?d:eu(d,c,Xc,ru(t,!1))}(o,t,r,n);default:return null}};let u=c(a);if(null===u){const{defaultKeyType:e,defaultStringType:r}=t.options,n=s&&e||r;if(u=c(n),null===u)throw new Error(`Unsupported default string type ${n}`)}return u}function lu(e,t){const r=Object.assign({blockQuote:!0,commentString:Hc,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,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function du(e,t,r,n){var s;if(bc(e))return e.toString(t,r,n);if(gc(e)){if(t.doc.directives)return e.toString(t);if(null==(s=t.resolvedAliases)?void 0:s.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const o=_c(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i||(i=function(e,t){var r;if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let n,s;if(wc(t)){s=t.value;const r=e.filter((e=>{var t;return null==(t=e.identify)?void 0:t.call(e,s)}));n=r.find((e=>e.format===t.format))??r.find((e=>!e.format))}else s=t,n=e.find((e=>e.nodeClass&&s instanceof e.nodeClass));if(!n){const e=(null==(r=null==s?void 0:s.constructor)?void 0:r.name)??typeof s;throw new Error(`Tag not resolved for ${e} value`)}return n}(t.doc.schema.tags,o));const a=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const s=[],i=(wc(e)||Ec(e))&&e.anchor;i&&Oc(i)&&(r.add(i),s.push(`&${i}`));const o=e.tag?e.tag:t.default?null:t.tag;return o&&s.push(n.directives.tagString(o)),s.join(" ")}(o,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const c="function"==typeof i.stringify?i.stringify(o,t,r,n):wc(o)?uu(o,t,r,n):o.toString(t,r,n);return a?wc(o)||"{"===c[0]||"["===c[0]?`${a} ${c}`:`${a}\n${t.indent}${c}`:c}function fu(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}function pu(e,t,{key:r,value:n}){if((null==e?void 0:e.doc.schema.merge)&&mu(r))if(n=gc(n)?n.resolve(e.doc):n,Dc(n))for(const s of n.items)hu(e,t,s);else if(Array.isArray(n))for(const s of n)hu(e,t,s);else hu(e,t,n);else{const s=Rc(r,"",e);if(t instanceof Map)t.set(s,Rc(n,s,e));else if(t instanceof Set)t.add(s);else{const i=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(_c(e)&&(null==r?void 0:r.doc)){const t=lu(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),fu(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,s,e),o=Rc(n,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}}return t}const mu=e=>"<<"===e||wc(e)&&"<<"===e.value&&(!e.type||e.type===Vc.PLAIN);function hu(e,t,r){const n=e&&gc(r)?r.resolve(e.doc):r;if(!vc(n))throw new Error("Merge sources must be maps or map aliases");const s=n.toJSON(null,e,Map);for(const[i,o]of s)t instanceof Map?t.has(i)||t.set(i,o):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function yu(e,t,r){const n=Kc(e,void 0,r),s=Kc(t,void 0,r);return new gu(n,s)}class gu{constructor(e,t=null){Object.defineProperty(this,yc,{value:pc}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return _c(t)&&(t=t.clone(e)),_c(r)&&(r=r.clone(e)),new gu(t,r)}toJSON(e,t){return pu(t,(null==t?void 0:t.mapAsMap)?new Map:{},this)}toString(e,t,r){return(null==e?void 0:e.doc)?function({key:e,value:t},r,n,s){const{allNullValues:i,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:l,simpleKeys:d}}=r;let f=_c(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Ec(e)||!_c(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!d&&(!e||f&&null==t&&!r.inFlow||Ec(e)||(wc(e)?e.type===Vc.BLOCK_FOLDED||e.type===Vc.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(d||!i),indent:a+c});let m,h,y,g=!1,$=!1,v=du(e,r,(()=>g=!0),(()=>$=!0));if(!p&&!r.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||null==t)return g&&n&&n(),""===v?"?":p?`? ${v}`:v}else if(i&&!d||null==t&&p)return v=`? ${v}`,f&&!g?v+=Yc(v,r.indent,u(f)):$&&s&&s(),v;g&&(f=null),p?(f&&(v+=Yc(v,r.indent,u(f))),v=`? ${v}\n${a}:`):(v=`${v}:`,f&&(v+=Yc(v,r.indent,u(f)))),_c(t)?(m=!!t.spaceBefore,h=t.commentBefore,y=t.comment):(m=!1,h=null,y=null,t&&"object"==typeof t&&(t=o.createNode(t))),r.implicitKey=!1,p||f||!wc(t)||(r.indentAtStart=v.length+1),$=!1,l||!(c.length>=2)||r.inFlow||p||!Dc(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let b=!1;const w=du(t,r,(()=>b=!0),(()=>$=!0));let D=" ";if(f||m||h)D=m?"\n":"",h&&(D+=`\n${Wc(u(h),r.indent)}`),""!==w||r.inFlow?D+=`\n${r.indent}`:"\n"===D&&(D="\n\n");else if(!p&&Ec(t)){const e=w[0],n=w.indexOf("\n"),s=-1!==n,i=r.inFlow??t.flow??0===t.items.length;if(s||!i){let t=!1;if(s&&("&"===e||"!"===e)){let r=w.indexOf(" ");"&"===e&&-1!==r&&rs=null),(()=>d=!0));s&&(o+=Yc(o,i,u(s))),d&&s&&(d=!1),f.push(n+o)}let p;if(0===f.length)p=s.start+s.end;else{p=f[0];for(let e=1;es=null));ml||i.includes("\n"))&&(u=!0),d.push(i),l=d.length}const{start:f,end:p}=r;if(0===d.length)return f+p;if(!u){const e=d.reduce(((e,t)=>e+t.length+2),2);u=t.options.lineWidth>0&&e>t.options.lineWidth}if(u){let e=f;for(const t of d)e+=t?`\n${i}${s}${t}`:"\n";return`${e}\n${s}${p}`}return`${f}${o}${d.join(" ")}${o}${p}`}function wu({indent:e,options:{commentString:t}},r,n,s){if(n&&s&&(n=n.replace(/^\n+/,"")),n){const s=Wc(t(n),e);r.push(s.trimStart())}}function Du(e,t){const r=wc(t)?t.value:t;for(const n of e)if(bc(n)){if(n.key===t||n.key===r)return n;if(wc(n.key)&&n.key.value===r)return n}}class Eu extends Jc{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(fc,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:s}=r,i=new this(e),o=(e,o)=>{if("function"==typeof s)o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==o||n)&&i.items.push(yu(e,o,r))};if(t instanceof Map)for(const[a,c]of t)o(a,c);else if(t&&"object"==typeof t)for(const a of Object.keys(t))o(a,t[a]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){var r;let n;n=bc(e)?e:e&&"object"==typeof e&&"key"in e?new gu(e.key,e.value):new gu(e,null==e?void 0:e.value);const s=Du(this.items,n.key),i=null==(r=this.schema)?void 0:r.sortMapEntries;if(s){if(!t)throw new Error(`Key ${n.key} already set`);wc(s.value)&&Lc(n.value)?s.value.value=n.value:s.value=n.value}else if(i){const e=this.items.findIndex((e=>i(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=Du(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Du(this.items,e),n=null==r?void 0:r.value;return(!t&&wc(n)?n.value:n)??void 0}has(e){return!!Du(this.items,e)}set(e,t){this.add(new gu(e,t),!0)}toJSON(e,t,r){const n=r?new r:(null==t?void 0:t.mapAsMap)?new Map:{};(null==t?void 0:t.onCreate)&&t.onCreate(n);for(const s of this.items)pu(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const n of this.items)if(!bc(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),$u(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const _u={collection:"map",default:!0,nodeClass:Eu,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(vc(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Eu.from(e,t,r)};class ku extends Jc{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(hc,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Pu(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const r=Pu(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&wc(n)?n.value:n}has(e){const t=Pu(e);return"number"==typeof t&&t=0?t:null}const xu={collection:"seq",default:!0,nodeClass:ku,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(Dc(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>ku.from(e,t,r)},Fu={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>uu(e,t=Object.assign({actualString:!0},t),r,n)},Au={identify:e=>null==e,createNode:()=>new Vc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Vc(null),stringify:({source:e},t)=>"string"==typeof e&&Au.test.test(e)?e:t.options.nullStr},Su={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Vc("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},r){if(e&&Su.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?r.options.trueStr:r.options.falseStr}};function ju({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const s="number"==typeof n?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}const Cu={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ju},Ou={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():ju(e)}},Nu={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Vc(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:ju},Iu=e=>"bigint"==typeof e||Number.isInteger(e),Tu=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Ru(e,t,r){const{value:n}=e;return Iu(n)&&n>=0?r+n.toString(t):ju(e)}const Bu={identify:e=>Iu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Tu(e,2,8,r),stringify:e=>Ru(e,8,"0o")},qu={identify:Iu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Tu(e,0,10,r),stringify:ju},Mu={identify:e=>Iu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Tu(e,2,16,r),stringify:e=>Ru(e,16,"0x")},Lu=[_u,xu,Fu,Au,Su,Bu,qu,Mu,Cu,Ou,Nu];function Vu(e){return"bigint"==typeof e||Number.isInteger(e)}const Uu=({value:e})=>JSON.stringify(e),Ku=[_u,xu].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Uu},{identify:e=>null==e,createNode:()=>new Vc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Uu},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:Uu},{identify:Vu,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Vu(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Uu}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),zu={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new gu(new Vc(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=bc(n)?n:new gu(n)}}else t("Expected a sequence for this tag");return e}function Ju(e,t,r){const{replacer:n}=r,s=new ku(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){let e,a;if("function"==typeof n&&(o=n.call(t,String(i++),o)),Array.isArray(o)){if(2!==o.length)throw new TypeError(`Expected [key, value] tuple: ${o}`);e=o[0],a=o[1]}else if(o&&o instanceof Object){const t=Object.keys(o);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);e=t[0],a=o[e]}else e=o;s.items.push(yu(e,a,r))}return s}const Hu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gu,createNode:Ju};class Wu extends ku{constructor(){super(),this.add=Eu.prototype.add.bind(this),this.delete=Eu.prototype.delete.bind(this),this.get=Eu.prototype.get.bind(this),this.has=Eu.prototype.has.bind(this),this.set=Eu.prototype.set.bind(this),this.tag=Wu.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;(null==t?void 0:t.onCreate)&&t.onCreate(r);for(const n of this.items){let e,s;if(bc(n)?(e=Rc(n.key,"",t),s=Rc(n.value,e,t)):e=Rc(n,"",t),r.has(e))throw new Error("Ordered maps must not include duplicate keys");r.set(e,s)}return r}static from(e,t,r){const n=Ju(e,t,r),s=new this;return s.items=n.items,s}}Wu.tag="tag:yaml.org,2002:omap";const Yu={collection:"seq",identify:e=>e instanceof Map,nodeClass:Wu,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Gu(e,t),n=[];for(const{key:s}of r.items)wc(s)&&(n.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):n.push(s.value));return Object.assign(new Wu,r)},createNode:(e,t,r)=>Wu.from(e,t,r)};function Xu({value:e,source:t},r){return t&&(e?Qu:Zu).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Qu={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Vc(!0),stringify:Xu},Zu={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Vc(!1),stringify:Xu},el={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ju},tl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():ju(e)}},rl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Vc(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:ju},nl=e=>"bigint"==typeof e||Number.isInteger(e);function sl(e,t,r,{intAsBigInt:n}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const i=parseInt(e,r);return"-"===s?-1*i:i}function il(e,t,r){const{value:n}=e;if(nl(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return ju(e)}const ol={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>sl(e,2,2,r),stringify:e=>il(e,2,"0b")},al={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>sl(e,1,8,r),stringify:e=>il(e,8,"0")},cl={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>sl(e,0,10,r),stringify:ju},ul={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>sl(e,2,16,r),stringify:e=>il(e,16,"0x")};class ll extends Eu{constructor(e){super(e),this.tag=ll.tag}add(e){let t;t=bc(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new gu(e.key,null):new gu(e,null);Du(this.items,t.key)||this.items.push(t)}get(e,t){const r=Du(this.items,e);return!t&&bc(r)?wc(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Du(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new gu(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let i of t)"function"==typeof n&&(i=n.call(t,i,i)),s.items.push(yu(i,null,r));return s}}ll.tag="tag:yaml.org,2002:set";const dl={collection:"map",identify:e=>e instanceof Set,nodeClass:ll,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>ll.from(e,t,r),resolve(e,t){if(vc(e)){if(e.hasAllNullValues(!0))return Object.assign(new ll,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function fl(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*s(60)+s(t)),s(0));return"-"===r?s(-1)*i:i}function pl(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return ju(e);let n="";t<0&&(n="-",t*=r(-1));const s=r(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),n+i.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const ml={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>fl(e,r),stringify:pl},hl={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>fl(e,!1),stringify:pl},yl={identify:e=>e 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(e){const t=e.match(yl.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,i,o,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(r,n-1,s,i||0,o||0,a||0,c);const l=t[8];if(l&&"Z"!==l){let e=fl(l,!1);Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},gl=[_u,xu,Fu,Au,Qu,Zu,ol,al,cl,ul,el,tl,rl,zu,Yu,Hu,dl,ml,hl,yl],$l=new Map([["core",Lu],["failsafe",[_u,xu,Fu]],["json",Ku],["yaml11",gl],["yaml-1.1",gl]]),vl={binary:zu,bool:Su,float:Nu,floatExp:Ou,floatNaN:Cu,floatTime:hl,int:qu,intHex:Mu,intOct:Bu,intTime:ml,map:_u,null:Au,omap:Yu,pairs:Hu,seq:xu,set:dl,timestamp:yl},bl={"tag:yaml.org,2002:binary":zu,"tag:yaml.org,2002:omap":Yu,"tag:yaml.org,2002:pairs":Hu,"tag:yaml.org,2002:set":dl,"tag:yaml.org,2002:timestamp":yl};function wl(e,t){let r=$l.get(t);if(!r){if(!Array.isArray(e)){const e=Array.from($l.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}r=[]}if(Array.isArray(e))for(const n of e)r=r.concat(n);else"function"==typeof e&&(r=e(r.slice()));return r.map((e=>{if("string"!=typeof e)return e;const t=vl[e];if(t)return t;const r=Object.keys(vl).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${r}`)}))}const Dl=(e,t)=>e.keyt.key?1:0;class El{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(e)?wl(e,"compat"):e?wl(null,e):null,this.merge=!!r,this.name="string"==typeof s&&s||"core",this.knownTags=n?bl:{},this.tags=wl(t,this.name),this.toStringOptions=o??null,Object.defineProperty(this,fc,{value:_u}),Object.defineProperty(this,mc,{value:Fu}),Object.defineProperty(this,hc,{value:xu}),this.sortMapEntries="function"==typeof i?i:!0===i?Dl:null}clone(){const e=Object.create(El.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class _l{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,yc,{value:dc});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:i}=s;(null==r?void 0:r._directives)?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new Cc({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(_l.prototype,{[yc]:{value:dc}});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=_c(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){kl(this.contents)&&this.contents.add(e)}addIn(e,t){kl(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=Nc(this);e.anchor=!t||r.has(t)?Ic(t||"a",r):t}return new qc(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:i,flow:o,keepUndefined:a,onTagObj:c,tag:u}=r??{},{onAnchor:l,setAnchors:d,sourceObjects:f}=function(e,t){const r=[],n=new Map;let s=null;return{onAnchor:n=>{r.push(n),s||(s=Nc(e));const i=Ic(t,s);return s.add(i),i},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!wc(t.node)&&!Ec(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,i||"a"),p=Kc(e,u,{aliasDuplicateObjects:s??!0,keepUndefined:a??!1,onAnchor:l,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:f});return o&&Ec(p)&&(p.flow=!0),d(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new gu(n,s)}delete(e){return!!kl(this.contents)&&this.contents.delete(e)}deleteIn(e){return Gc(e)?null!=this.contents&&(this.contents=null,!0):!!kl(this.contents)&&this.contents.deleteIn(e)}get(e,t){return Ec(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Gc(e)?!t&&wc(this.contents)?this.contents.value:this.contents:Ec(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!Ec(this.contents)&&this.contents.has(e)}hasIn(e){return Gc(e)?void 0!==this.contents:!!Ec(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=zc(this.schema,[e],t):kl(this.contents)&&this.contents.set(e,t)}setIn(e,t){Gc(e)?this.contents=t:null==this.contents?this.contents=zc(this.schema,Array.from(e),t):kl(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Cc({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Cc({version:e}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new El(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},a=Rc(this.contents,t??"",o);if("function"==typeof s)for(const{count:c,res:u}of o.anchors.values())s(u,c);return"function"==typeof i?Tc(i,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}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 t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){var r;const n=[];let s=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),s=!0):e.directives.docStart&&(s=!0)}s&&n.push("---");const i=lu(e,t),{commentString:o}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=o(e.commentBefore);n.unshift(Wc(t,""))}let a=!1,c=null;if(e.contents){if(_c(e.contents)){if(e.contents.spaceBefore&&s&&n.push(""),e.contents.commentBefore){const t=o(e.contents.commentBefore);n.push(Wc(t,""))}i.forceBlockIndent=!!e.comment,c=e.contents.comment}const t=c?void 0:()=>a=!0;let r=du(e.contents,i,(()=>c=null),t);c&&(r+=Yc(r,"",o(c))),"|"!==r[0]&&">"!==r[0]||"---"!==n[n.length-1]?n.push(r):n[n.length-1]=`--- ${r}`}else n.push(du(e.contents,i));if(null==(r=e.directives)?void 0:r.docEnd)if(e.comment){const t=o(e.comment);t.includes("\n")?(n.push("..."),n.push(Wc(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&a&&(t=t.replace(/^\n+/,"")),t&&(a&&!c||""===n[n.length-1]||n.push(""),n.push(Wc(o(t),"")))}return n.join("\n")+"\n"}(this,e)}}function kl(e){if(Ec(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Pl extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class xl extends Pl{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Fl extends Pl{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Al=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),o=r+o}if(/[^ ]/.test(o)){let e=1;const t=r.linePos[1];t&&t.line===n&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));const a=" ".repeat(i)+"^".repeat(e);r.message+=`:\n\n${o}\n${a}\n`}};function Sl(e,{flow:t,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,d="",f="",p=!1,m=!1,h=!1,y=null,g=null,$=null,v=null,b=null,w=null;for(const _ of e)switch(h&&("space"!==_.type&&"newline"!==_.type&&"comma"!==_.type&&i(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),y&&(u&&"comment"!==_.type&&"newline"!==_.type&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),_.type){case"space":t||"doc-start"===r&&"flow-collection"===(null==n?void 0:n.type)||!_.source.includes("\t")||(y=_),l=!0;break;case"comment":{l||i(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=_.source.substring(1)||" ";d?d+=f+e:d=e,f="",u=!1;break}case"newline":u?d?d+=_.source:c=!0:f+=_.source,u=!0,p=!0,(g||$)&&(m=!0),l=!0;break;case"anchor":g&&i(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&i(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=_,null===w&&(w=_.offset),u=!1,l=!1,h=!0;break;case"tag":$&&i(_,"MULTIPLE_TAGS","A node can have at most one tag"),$=_,null===w&&(w=_.offset),u=!1,l=!1,h=!0;break;case r:(g||$)&&i(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),b&&i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${t??"collection"}`),b=_,u="seq-item-ind"===r||"explicit-key-ind"===r,l=!1;break;case"comma":if(t){v&&i(_,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=_,u=!1,l=!1;break}default:i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),u=!1,l=!1}const D=e[e.length-1],E=D?D.offset+D.source.length:s;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(u&&y.indent<=o||"block-map"===(null==n?void 0:n.type)||"block-seq"===(null==n?void 0:n.type))&&i(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:b,spaceBefore:c,comment:d,hasNewline:p,hasNewlineAfterProp:m,anchor:g,tag:$,end:E,start:w??E}}function jl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(jl(t.key)||jl(t.value))return!0}return!1;default:return!0}}function Cl(e,t,r){if("flow-collection"===(null==t?void 0:t.type)){const n=t.end[0];if(n.indent===e&&("]"===n.source||"}"===n.source)&&jl(t)){r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}function Ol(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const s="function"==typeof n?n:(t,r)=>t===r||wc(t)&&wc(r)&&t.value===r.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>s(e.key,r)))}const Nl="All mapping items must start at the same column";function Il(e,t,r,n){let s="";if(e){let i=!1,o="";for(const a of e){const{source:e,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 t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}const Tl="Block collections are not allowed within flow collections",Rl=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Bl(e,t,r,n,s,i){const o="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,s,i){var o;const a=new((null==i?void 0:i.nodeClass)??Eu)(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,u=null;for(const l of n.items){const{start:i,key:d,sep:f,value:p}=l,m=Sl(i,{indicator:"explicit-key-ind",next:d??(null==f?void 0:f[0]),offset:c,onError:s,parentIndent:n.indent,startOnNewline:!0}),h=!m.found;if(h){if(d&&("block-seq"===d.type?s(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&s(c,"BAD_INDENT",Nl)),!m.anchor&&!m.tag&&!f){u=m.end,m.comment&&(a.comment?a.comment+="\n"+m.comment:a.comment=m.comment);continue}(m.hasNewlineAfterProp||jl(d))&&s(d??i[i.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else(null==(o=m.found)?void 0:o.indent)!==n.indent&&s(c,"BAD_INDENT",Nl);const y=m.end,g=d?e(r,d,m,s):t(r,y,i,null,m,s);r.schema.compat&&Cl(n.indent,d,s),Ol(r,a.items,g)&&s(y,"DUPLICATE_KEY","Map keys must be unique");const $=Sl(f??[],{indicator:"map-value-ind",next:p,offset:g.range[2],onError:s,parentIndent:n.indent,startOnNewline:!d||"block-scalar"===d.type});if(c=$.end,$.found){h&&("block-map"!==(null==p?void 0:p.type)||$.hasNewline||s(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<$.found.offset-1024&&s(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const i=p?e(r,p,$,s):t(r,c,f,null,$,s);r.schema.compat&&Cl(n.indent,p,s),c=i.range[2];const o=new gu(g,i);r.options.keepSourceTokens&&(o.srcToken=l),a.items.push(o)}else{h&&s(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),$.comment&&(g.comment?g.comment+="\n"+$.comment:g.comment=$.comment);const e=new gu(g);r.options.keepSourceTokens&&(e.srcToken=l),a.items.push(e)}}return u&&u0){const e=Il(p,m,r.options.strict,s);e.comment&&(c.comment?c.comment+="\n"+e.comment:c.comment=e.comment),c.range=[n.offset,m,e.offset]}else c.range=[n.offset,m,m];return c}(e,t,r,n,i),a=o.constructor;return"!"===s||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function ql(e,t,r){const n=t.offset,s=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let o=0,a="",c=-1;for(let f=1;f=0;--h){const e=o[h][1];if(""!==e&&"\r"!==e)break;a=h}if(0===a){const e="+"===s.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"";let r=n+s.length;return t.source&&(r+=t.source.length),{value:e,type:i,comment:s.comment,range:[n,r,r]}}let c=t.indent+s.indent,u=t.offset+s.length,l=0;for(let h=0;hc&&(c=t.length),u+=t.length+n.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>c&&(a=h+1);let d="",f="",p=!1;for(let h=0;hc||"\t"===t[0]?(" "===f?f="\n":p||"\n"!==f||(f="\n\n"),d+=f+e.slice(c)+t,f="\n",p=!0):""===t?"\n"===f?d+="\n":f="\n":(d+=f+t,f=" ",p=!1)}switch(s.chomp){case"-":break;case"+":for(let e=a;er(n+e,t,s);switch(s){case"scalar":a=Vc.PLAIN,c=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Ll(e)}(i,u);break;case"single-quoted-scalar":a=Vc.QUOTE_SINGLE,c=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return Ll(e.slice(1,-1)).replace(/''/g,"'")}(i,u);break;case"double-quoted-scalar":a=Vc.QUOTE_DOUBLE,c=function(e,t){let r="";for(let n=1;nt?e.slice(t,n+1):s)}else r+=s}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}(i,u);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const l=n+i.length,d=Il(o,l,t,r);return{value:c,type:a,comment:d.comment,range:[n,l,d.offset]}}function Ll(e){let t,r;try{t=new RegExp("(.*?)(?n(r,"TAG_RESOLVE_FAILED",e))):null,u=r&&c?function(e,t,r,n,s){var i;if("!"===r)return e[mc];const o=[];for(const c of e.tags)if(!c.collection&&c.tag===r){if(!c.default||!c.test)return c;o.push(c)}for(const c of o)if(null==(i=c.test)?void 0:i.test(t))return c;const a=e.knownTags[r];if(a&&!a.collection)return e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[mc]}(e.schema,s,c,r,n):"scalar"===t.type?function({directives:e,schema:t},r,n,s){const i=t.tags.find((e=>{var t;return e.default&&(null==(t=e.test)?void 0:t.test(r))}))||t[mc];if(t.compat){const o=t.compat.find((e=>{var t;return e.default&&(null==(t=e.test)?void 0:t.test(r))}))??t[mc];if(i.tag!==o.tag){s(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(i.tag)} or ${e.tagString(o.tag)}`,!0)}}return i}(e,s,t,n):e.schema[mc];let l;try{const i=u.resolve(s,(e=>n(r??t,"TAG_RESOLVE_FAILED",e)),e.options);l=wc(i)?i:new Vc(i)}catch(d){const e=d instanceof Error?d.message:String(d);n(r??t,"TAG_RESOLVE_FAILED",e),l=new Vc(s)}return l.range=a,l.source=s,i&&(l.type=i),c&&(l.tag=c),u.format&&(l.format=u.format),o&&(l.comment=o),l}function Gl(e,t,r){if(t){null===r&&(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===(null==r?void 0:r.type);)e+=r.source.length,r=t[++n];break}}return e}const Jl={composeNode:Hl,composeEmptyNode:Wl};function Hl(e,t,r,n){const{spaceBefore:s,comment:i,anchor:o,tag:a}=r;let c,u=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},s){const i=new qc(r.substring(1));""===i.source&&s(t,"BAD_ALIAS","Alias cannot be an empty string");i.source.endsWith(":")&&s(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=t+r.length,a=Il(n,o,e.strict,s);i.range=[t,o,a.offset],a.comment&&(i.comment=a.comment);return i}(e,t,n),(o||a)&&n(t,"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=zl(e,t,a,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=function(e,t,r,n,s){var i;const o=n?t.directives.tagName(n.source,(e=>s(n,"TAG_RESOLVE_FAILED",e))):null,a="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!n||!o||"!"===o||o===Eu.tagName&&"map"===a||o===ku.tagName&&"seq"===a||!a)return Bl(e,t,r,s,o);let c=t.schema.tags.find((e=>e.tag===o&&e.collection===a));if(!c){const i=t.schema.knownTags[o];if(!i||i.collection!==a)return(null==i?void 0:i.collection)?s(n,"BAD_COLLECTION_TYPE",`${i.tag} used for ${a} collection, but expects ${i.collection}`,!0):s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Bl(e,t,r,s,o);t.schema.tags.push(Object.assign({},i,{default:!1})),c=i}const u=Bl(e,t,r,s,o,c),l=(null==(i=c.resolve)?void 0:i.call(c,u,(e=>s(n,"TAG_RESOLVE_FAILED",e)),t.options))??u,d=_c(l)?l:new Vc(l);return d.range=u.range,d.tag=o,(null==c?void 0:c.format)&&(d.format=c.format),d}(Jl,e,t,a,n),o&&(c.anchor=o.source.substring(1));break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),c=Wl(e,t.offset,void 0,null,r,n),u=!1}return o&&""===c.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&(c.spaceBefore=!0),i&&("scalar"===t.type&&""===t.source?c.comment=i:c.commentBefore=i),e.options.keepSourceTokens&&u&&(c.srcToken=t),c}function Wl(e,t,r,n,{spaceBefore:s,comment:i,anchor:o,tag:a,end:c},u){const l=zl(e,{type:"scalar",offset:Gl(t,r,n),indent:-1,source:""},a,u);return o&&(l.anchor=o.source.substring(1),""===l.anchor&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(l.spaceBefore=!0),i&&(l.comment=i,l.range[2]=c),l}function Yl(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Xl(e){var t;let r="",n=!1,s=!1;for(let i=0;i{const s=Yl(e);n?this.warnings.push(new Fl(s,t,r)):this.errors.push(new xl(s,t,r))},this.directives=new Cc({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Xl(this.prelude);if(r){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(Ec(s)&&!s.flow&&s.items.length>0){let e=s.items[0];bc(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=s.commentBefore;s.commentBefore=e?`${r}\n${e}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Xl(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const s=Yl(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:s,end:i},o){const a=Object.assign({_directives:t},e),c=new _l(void 0,a),u={atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},l=Sl(n,{indicator:"doc-start",next:s??(null==i?void 0:i[0]),offset:r,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(c.directives.docStart=!0,!s||"block-map"!==s.type&&"block-seq"!==s.type||l.hasNewline||o(l.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=s?Hl(u,s,l,o):Wl(u,l.end,n,null,l,o);const d=c.contents.range[2],f=Il(i,d,!1,o);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new xl(Yl(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new xl(Yl(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Il(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new xl(Yl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new _l(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function Zl(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const ed=new Set("0123456789ABCDEFabcdef"),td=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),rd=new Set(",[]{}"),nd=new Set(" ,[]{}\n\r\t"),sd=e=>!e||nd.has(e);class id{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,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Zl(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&ethis.indentValue&&!Zl(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Zl(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(sd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if(-1!==r&&r"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>Zl(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let s=this.pos;e=this.buffer[s];++s)switch(e){case" ":r+=1;break;case"\n":t=s,r=0;break;case"\r":{const e=this.buffer[s+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const s=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>s))break;t=e}return yield"",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Zl(t)||e&&rd.has(t))break;r=n}else if(Zl(t)){let s=this.buffer[n+1];if("\r"===t&&("\n"===s?(n+=1,t="\n",s=this.buffer[n+1]):r=n),"#"===s||e&&rd.has(s))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&rd.has(t))break;r=n}return t||this.atEnd?(yield"",yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(sd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Zl(t)||e&&rd.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Zl(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(td.has(t))t=this.buffer[++e];else{if("%"!==t||!ed.has(this.buffer[e+1])||!ed.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class od{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t>1;this.lineStarts[n]=0;)switch(e[r].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===(null==(t=e[++r])?void 0:t.type););return e.splice(r,e.length)}function fd(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||ad(t.start,"explicit-key-ind")||ad(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,ud(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class pd{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 id,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":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(e[0]){case" ":case"\t":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}(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){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 t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,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("doc-end"!==this.type||e&&"doc-end"===e.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&fd(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===cd(r.start)&&(0===t.indent||r.start.every((e=>"comment"!==e.type||e.indent=e.indent){const t=!this.onKeyLine&&this.indent===e.indent,n=t&&(r.sep||r.explicitKey)&&"seq-item-ind"!==this.type;let s=[];if(n&&r.sep&&!r.value){const t=[];for(let n=0;ne.indent&&(t.length=0);break;default:t.length=0}}t.length>=2&&(s=r.sep.splice(t[1]))}switch(this.type){case"anchor":case"tag":return void(n||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken));case"explicit-key-ind":return r.sep||r.explicitKey?n||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(r.start.push(this.sourceToken),r.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ad(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(ud(r.key)&&!ad(r.sep,"newline")){const e=dd(r.start),t=r.key,n=r.sep;n.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:t,sep:n}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(ad(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const e=dd(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:s,key:null,sep:[this.sourceToken]}):ad(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const t=this.flowScalar(this.type);return void(n||r.value?(e.items.push({start:s,key:t,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(t):(Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!0))}default:{const r=this.startBlockValue(e);if(r)return t&&"block-seq"!==r.type&&e.items.push({start:s}),void this.stack.push(r)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;const r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){const t="end"in r.value?r.value.end:void 0,n=Array.isArray(t)?t[t.length-1]:void 0;"comment"===(null==n?void 0:n.type)?null==t||t.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 n=e.items[e.items.length-2],s=null==(t=null==n?void 0:n.value)?void 0:t.end;if(Array.isArray(s))return Array.prototype.push.apply(s,r.start),s.push(this.sourceToken),void e.items.pop()}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;return void r.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(r.value||ad(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=dd(ld(t));fd(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+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 t=dd(ld(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=dd(ld(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type)))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(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;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function md(e,t={}){const{lineCounter:r,prettyErrors:n}=function(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new od||null,prettyErrors:t}}(t),s=new pd(null==r?void 0:r.addNewLine),i=new Ql(t);let o=null;for(const a of i.compose(s.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new xl(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=a;return n&&r&&(o.errors.forEach(Al(e,r)),o.warnings.forEach(Al(e,r))),o}function hd(e){if(uc(e))return e;if("string"==typeof e)try{return JSON.parse(e)}catch(t){return function(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const s=md(e,r);if(!s)return null;if(s.warnings.forEach((e=>fu(s.options.logLevel,e))),s.errors.length>0){if("silent"!==s.options.logLevel)throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}(e,{maxAliasCount:1e4})}return e}function yd(e,t={}){if(uc(e))return e;const r=hd(e);return[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:cc(r),...t}]}function gd(e,t,r,n){void 0===n&&(n=[]);const s=yd(structuredClone(e)),i=ic(s);return o((null==r?void 0:r.specification)??i.specification,s,r??i),o((null==r?void 0:r.specification)??i.specification,s,r??i),{valid:0===(n=n.filter(((e,t,r)=>t===r.findIndex((t=>t.message===e.message&&t.code===e.code))))).length,errors:n,schema:(r??ic(s)).specification};function o(e,r,s){let i;return Object.entries(e??{}).forEach((([a,c])=>{if(void 0!==e.$ref){const i=$d(e.$ref,t,s,r,n);if(void 0===i)return;delete e.$ref,"object"==typeof i&&Object.keys(i).forEach((t=>{void 0===e[t]&&(e[t]=i[t])}))}"object"!=typeof c||function(e){try{return JSON.stringify(e),!1}catch(t){return!0}}(c)||(i=o(c,r,s))})),{errors:(null==i?void 0:i.errors)??[]}}}function $d(e,t,r,n,s){if("string"!=typeof e){if(null==t?void 0:t.throwOnError)throw new Error(u.INVALID_REFERENCE.replace("%s",e));return void s.push({code:"INVALID_REFERENCE",message:u.INVALID_REFERENCE.replace("%s",e)})}const[i,o]=e.split("#",2),a=i!==r.filename;if(i&&a){const e=n.find((e=>e.filename===i));if(!e){if(null==t?void 0:t.throwOnError)throw new Error(u.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i));return void s.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:u.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i)})}const r=gd(n,t,e,s);return void 0===o?r.schema:$d(`#${o}`,t,e,n,s)}const c=function(e){return e.split("/").slice(1).map(oc)}(o);try{return c.reduce(((e,t)=>e[t]),r.specification)}catch(l){if(null==t?void 0:t.throwOnError)throw new Error(u.INVALID_REFERENCE.replace("%s",e));s.push({code:"INVALID_REFERENCE",message:u.INVALID_REFERENCE.replace("%s",e)})}}const vd=e=>void 0!==e,bd=e=>t=>t.keyword===e,wd=bd("required"),Dd=bd("anyOf"),Ed=bd("enum"),_d=e=>e&&e.errors||[],kd=e=>{return e&&(t=e.children,Object.values(t))||[];var t},Pd=e=>t=>{return kd(e).filter((n=t,r=e=>n===e,e=>!r(e)));var r,n},xd=e=>t=>t.reduce(((e,t)=>e.concat(t)),e);var Fd={},Ad=/~/,Sd=/~[01]/g;function jd(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function Cd(e){return Ad.test(e)?e.replace(Sd,jd):e}function Od(e){if("string"==typeof e){if(""===(e=e.split("/"))[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e)){for(const t of e)if("string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function Nd(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");var r=(t=Od(t)).length;if(1===r)return e;for(var n=1;ni,void 0===e[n]&&(Array.isArray(e)&&"-"===n&&(n=e.length),s&&(""!==t[i]&&t[i]<1/0||"-"===t[i]?e[n]=[]:e[n]={})),!s)break;e=e[n]}var a=e[n];return void 0===r?delete e[n]:e[n]=r,a}(e,t,r)}Fd.get=Nd,Fd.set=Id,Fd.compile=function(e){var t=Od(e);return{get:function(e){return Nd(e,t)},set:function(e,r){return Id(e,t,r)}}};const Td=[],Rd=[];function Bd(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,s=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-s);)n--,s--;let i,o,a,c,u=0;for(;uo?c>o?o+1:c:c>a?a+1:c;return o}class qd{constructor(e={isIdentifierLocation:!1},{data:t,schema:r,jsonAst:n,jsonRaw:s}){this.options=e,this.data=t,this.schema=r,this.jsonAst=n,this.jsonRaw=s}get instancePath(){return void 0!==this.options.instancePath?this.options.instancePath:this.options.dataPath}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}}class Md extends qd{constructor(...e){super(...e),this.name="EnumValidationError"}getError(){const{message:e,params:t}=this.options,r=this.findBestMatch(),n={message:`${e}: ${t.allowedValues.join(", ")}`,path:this.instancePath};return null!==r&&(n.suggestion=`Did you mean ${r}?`),n}findBestMatch(){const{params:{allowedValues:e}}=this.options,t=""===this.instancePath?this.data:Fd.get(this.data,this.instancePath);if(!t)return null;const r=e.map((e=>({value:e,weight:Bd(e,t.toString())}))).sort(((e,t)=>e.weight>t.weight?1:e.weight{wd(t)&&(e.errors=[t],e.children={})})),_d(e).some(Dd)&&Object.keys(e.children).length>0&&delete e.errors,(null==(n=e.errors)?void 0:n.length)&&_d(e).every(Ed)&&Pd(t)(e).filter(vd).some(_d)&&delete t.children[r],Object.entries(e.children).forEach((([t,r])=>Jd(r,e,t)))}function Hd(e,t){const r=_d(e);if(r.length&&r.every(Ed)){const e=[...new Set(xd([])(r.map((e=>e.params.allowedValues))))],n=r[0];return[new Md({...n,params:{allowedValues:e}},t)]}return xd(r.reduce(((e,r)=>{switch(r.keyword){case"additionalProperties":return e.concat(new zd(r,t));case"pattern":return e.concat(new Kd(r,t));case"required":return e.concat(new Ud(r,t));case"unevaluatedProperties":return e.concat(new Vd(r,t));default:return e.concat(new Ld(r,t))}}),[]))(kd(e).map((e=>Hd(e,t))))}function Wd(e,t){const r=function(e=[]){const t={children:{}};return e.forEach((e=>{const r=void 0!==e.instancePath?e.instancePath:e.dataPath,n=""===r?[""]:r.match(Gd);n&&n.reduce(((t,r,s)=>(t.children[r]=t.children[r]||{children:{},errors:[]},s===n.length-1&&t.children[r].errors.push(e),t.children[r])),t)})),t}(e||[]);return Jd(r),Hd(r,t)}function Yd(e,t){return"string"==typeof t?[{message:t}]:function(e,t,r,n={}){const{indent:s=null,json:i=null}=n;return Wd(r,{data:t,schema:e,jsonRaw:i||JSON.stringify(t,null,s)}).map((e=>e.getError()))}(e,null,t,{indent:2}).map((e=>(e.message=e.message.trim(),e)))}const Xd={"http://json-schema.org/draft-04/schema#":Wi,"https://json-schema.org/draft/2020-12/schema":nc};class Qd{constructor(){t(this,"version"),t(this,"ajvValidators",{}),t(this,"errors"),t(this,"specificationVersion"),t(this,"specificationType"),t(this,"specification")}async validate(e,t){var r;const n=e.find((e=>e.isEntrypoint)),s=null==n?void 0:n.specification;this.specification=s,(null==(r=this.specification)?void 0:r.info)&&!this.specification.info.version&&(this.specification.info.version="0.0.1");try{if(null==s){if(null==t?void 0:t.throwOnError)throw new Error(u.EMPTY_OR_INVALID);return{valid:!1,errors:Yd(n,u.EMPTY_OR_INVALID)}}const{version:r,specificationType:i,specificationVersion:o}=sc(s);if(this.version=r,this.specificationVersion=o,this.specificationType=i,!r){if(null==t?void 0:t.throwOnError)throw new Error(u.OPENAPI_VERSION_NOT_SUPPORTED);return{valid:!1,errors:Yd(n,u.OPENAPI_VERSION_NOT_SUPPORTED)}}const a=await this.getAjvValidator(r),c=a(s);if(a.errors&&a.errors.length>0){if(null==t?void 0:t.throwOnError)throw new Error(a.errors[0]);return{valid:!1,errors:Yd(n,a.errors)}}const l=gd(e,t);return{valid:c&&l.valid,errors:[...c.errors??[],...l.errors],schema:l.schema}}catch(i){if(null==t?void 0:t.throwOnError)throw i;return{valid:!1,errors:Yd(n,i.message??i)}}}async getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const t=a[e],r=new(0,Xd[t.$schema])({strict:!1});return Co(r),"3.1"===e&&r.addFormat("media-range",!0),this.ajvValidators[e]=r.compile(t)}}async function Zd(e,t){const r=yd(e),n=ic(r),s=gd(r,t);return{specification:n.specification,errors:s.errors,schema:s.schema,...sc(n.specification)}}function ef(e,t){return{specification:ac(ic(yd(e)).specification,(e=>t(e)?e:void 0))}}async function tf(e,t){var r,n,s,i,o,a;const c=[];if(null==(r=null==t?void 0:t.filesystem)?void 0:r.find((t=>t.filename===e)))return{specification:null==(n=ic(t.filesystem))?void 0:n.specification,filesystem:t.filesystem,errors:c};const l=null==(s=null==t?void 0:t.plugins)?void 0:s.find((t=>t.check(e)));let d;if(l)try{d=hd(await l.get(e))}catch(m){if(null==t?void 0:t.throwOnError)throw new Error(u.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return c.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:u.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:c}}else d=hd(e);if(void 0===d){if(null==t?void 0:t.throwOnError)throw new Error("No content to load");return c.push({code:"NO_CONTENT",message:u.NO_CONTENT}),{specification:null,filesystem:[],errors:c}}let f=yd(d,{filename:(null==t?void 0:t.filename)??null});const p=((null==t?void 0:t.filename)?f.find((e=>e.filename===(null==t?void 0:t.filename))):ic(f)).references??cc(d);if(0===p.length)return{specification:null==(i=ic(f))?void 0:i.specification,filesystem:f,errors:c};for(const u of p){const r=null==(o=null==t?void 0:t.plugins)?void 0:o.find((e=>e.check(u)));if(!r)continue;const n=r.check(u)&&r.resolvePath?r.resolvePath(e,u):u;if(f.find((e=>e.filename===u)))continue;const{filesystem:s,errors:i}=await tf(n,{...t,filename:u});c.push(...i),f=[...f,...s.map((e=>({...e,isEntrypoint:!1})))]}return{specification:null==(a=ic(f))?void 0:a.specification,filesystem:f,errors:c}}function rf(e){var t;let r=e;return(null==(t=r.openapi)?void 0:t.startsWith("3.0"))?(r.openapi="3.1.1",r=ac(r,(e=>("undefined"!==e.type&&!0===e.nullable&&(e.type=["null",e.type],delete e.nullable),e))),r=ac(r,(e=>(!0===e.exclusiveMinimum?(e.exclusiveMinimum=e.minimum,delete e.minimum):!1===e.exclusiveMinimum&&delete e.exclusiveMinimum,!0===e.exclusiveMaximum?(e.exclusiveMaximum=e.maximum,delete e.maximum):!1===e.exclusiveMaximum&&delete e.exclusiveMaximum,e))),r=ac(r,((e,t)=>(void 0!==e.example&&(!function(e){return[["components","schemas"],"properties","items","allOf","anyOf","oneOf","not","additionalProperties"].some((t=>Array.isArray(t)?t.every(((t,r)=>e[r]===t)):e.includes(t)))||e.includes("schema")||e.some((e=>e.endsWith("Schema")))}(t)?e.examples={default:{value:e.example}}:e.examples=[e.example],delete e.example),e))),r=ac(r,(e=>{if("object"===e.type&&void 0!==e.properties){const t=Object.entries(e.properties);for(const[e,r]of t)"object"==typeof r&&"string"===r.type&&"binary"===r.format&&(r.contentEncoding="application/octet-stream",delete r.format)}return e})),r=ac(r,(e=>{if("string"!==e.type||"binary"!==e.format)return e})),r=ac(r,(e=>"string"===e.type&&"base64"===e.format?{type:"string",contentEncoding:"base64"}:e)),r):r}function nf(e){var t,r,n;if(!(null==(t=e.swagger)?void 0:t.startsWith("2.0")))return e;if(e.openapi="3.0.4",delete e.swagger,console.warn("[upgradeFromTwoToThree] The upgrade from Swagger 2.0 to OpenAPI 3.0 documents is experimental and lacks features."),e.host){const t=(null==(r=e.schemes)?void 0:r.length)?e.schemes:["http"];e.servers=t.map((t=>({url:`${t}://${e.host}${e.basePath??""}`}))),delete e.basePath,delete e.schemes,delete e.host}if(e.definitions&&("object"!=typeof e.components&&(e.components={}),e.components.schemas=e.definitions,delete e.definitions,e=ac(e,(e=>{var t;return(null==(t=e.$ref)?void 0:t.startsWith("#/definitions/"))&&(e.$ref=e.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),e}))),e.paths)for(const s in e.paths)if(Object.hasOwn(e.paths,s)){const t=e.paths[s];for(const r in t)if(Object.hasOwn(t,r)){const s=t[r];if(s.parameters){const t=structuredClone(s.parameters.find((e=>"body"===e.in))??{});if(t&&Object.keys(t).length){delete t.name,delete t.in;const r=e.consumes??s.consumes??["application/json"];"object"!=typeof s.requestBody&&(s.requestBody={}),"object"!=typeof s.requestBody.content&&(s.requestBody.content={});const{schema:n,...i}=t;s.requestBody={...s.requestBody,...i};for(const e of r)s.requestBody.content[e]={schema:n}}s.parameters=s.parameters.filter((e=>"body"!==e.in)),delete s.consumes;const r=s.parameters.filter((e=>"formData"===e.in));if(r.length>0){"object"!=typeof s.requestBody&&(s.requestBody={}),"object"!=typeof s.requestBody.content&&(s.requestBody.content={}),s.requestBody.content["application/x-www-form-urlencoded"]={schema:{type:"object",properties:{},required:[]}};for(const e of r)s.requestBody.content["application/x-www-form-urlencoded"].schema.properties[e.name]={type:e.type,description:e.description},e.required&&s.requestBody.content["application/x-www-form-urlencoded"].schema.required.push(e.name);s.parameters=s.parameters.filter((e=>"formData"!==e.in))}}if(s.responses)for(const t in s.responses)if(Object.hasOwn(s.responses,t)){const r=s.responses[t];if(r.schema){const t=e.produces??s.produces??["application/json"];"object"!=typeof r.content&&(r.content={});for(const e of t)r.content[e]={schema:r.schema};delete r.schema}}delete s.produces,0===(null==(n=s.parameters)?void 0:n.length)&&delete s.parameters}}if(e.securityDefinitions){"object"!=typeof e.components&&(e.components={}),e.components.securitySchemes={};for(const[t,r]of Object.entries(e.securityDefinitions))if("object"==typeof r)if("type"in r&&"oauth2"===r.type){const{flow:n,authorizationUrl:s,tokenUrl:i,scopes:o}=r;e.components.securitySchemes[t]={type:"oauth2",flows:{[n]:{...s&&{authorizationUrl:s},...i&&{tokenUrl:i},...o&&{scopes:o}}}}}else e.components.securitySchemes[t]=r;delete e.securityDefinitions}return e}async function sf(e,t){const r=yd(e),n=new Qd;return{...await n.validate(r,t),specification:n.specification,version:n.version}}async function of(e){const{input:t}={...e};let r={};for(const s of e.tasks){const e=s.name,i="options"in s?s.options:void 0,o=r.specification?r.specification:"object"==typeof t?structuredClone(t):t;"load"===e?r={...r,...await tf(t,i)}:"filter"===e?r={...r,...ef(o,i)}:"dereference"===e?r={...r,...await Zd(o,i)}:"upgrade"===e?r={...r,...(n=o,{specification:[nf,rf].reduce(((e,t)=>t(e)),ic(yd(n)).specification),version:"3.1"})}:"validate"===e&&(r={...r,...await sf(o,i)})}var n;return r}async function af(e){const{filesystem:t}=await of(e);return sc(ic(t).specification)}async function cf(e){const{filesystem:t}=await of(e);return t}async function uf(e){return{filesystem:[],...await of(e)}}t(Qd,"supportedVersions",c);const lf=e=>JSON.stringify(e,null,2);async function df(e){const{filesystem:t}=await of(e);return lf(ic(t).specification)}const ff=e=>function(e,t,r){let n=null;if(Array.isArray(t)&&(n=t),void 0===e){const{keepUndefined:e}={};if(!e)return}return new _l(e,n,r).toString(r)}(e);async function pf(e){const{filesystem:t}=await of(e);return ff(ic(t).specification)}function mf(e,t){return{...e,tasks:[...e.tasks,t]}}function hf(e,t){var r;const n=mf(e,{name:"dereference",options:{throwOnError:null==(r=e.options)?void 0:r.throwOnError,...t??{}}});return{details:()=>af(n),files:()=>cf(n),get:()=>uf(n),toJson:()=>df(n),toYaml:()=>pf(n)}}function yf(e,t){const r=mf(e,{name:"filter",options:t});return{dereference:e=>hf(r,e),details:()=>af(r),files:()=>cf(r),get:()=>uf(r),toJson:()=>df(r),toYaml:()=>pf(r)}}function gf(e,t){var r;const n=mf(e,{name:"validate",options:{throwOnError:null==(r=e.options)?void 0:r.throwOnError,...t??{}}});return{dereference:e=>hf(n,e),details:()=>af(n),files:()=>cf(n),filter:e=>yf(n,e),get:()=>uf(n),toJson:()=>df(n),toYaml:()=>pf(n),upgrade:()=>$f(n)}}function $f(e){const t=mf(e,{name:"upgrade"});return{dereference:e=>hf(t,e),details:()=>af(t),files:()=>cf(t),filter:e=>yf(t,e),get:()=>uf(t),toJson:()=>df(t),toYaml:()=>pf(t),validate:e=>gf(t,e)}}function vf(e){const t={input:null,options:e,tasks:[]};return{load:(e,r)=>function(e,t,r){var n;const s={...mf(e,{name:"load",options:{throwOnError:null==(n=e.options)?void 0:n.throwOnError,...r}}),input:t};return{dereference:e=>hf(s,e),details:()=>af(s),files:()=>cf(s),filter:e=>yf(s,e),get:()=>uf(s),upgrade:()=>$f(s),toJson:()=>df(s),toYaml:()=>pf(s),validate:e=>gf(s,e)}}(t,e,r)}}const bf={limit:20},wf=e=>{let t=0;const r={...bf,...e};return{check:e=>"string"==typeof e&&!(!e.startsWith("http://")&&!e.startsWith("https://")),async get(e){if(!1!==(null==r?void 0:r.limit)&&t>=(null==r?void 0:r.limit))console.warn(`[fetchUrls] Maximum number of requests reeached (${null==r?void 0:r.limit}), skipping request`);else try{t++;const n=await((null==r?void 0:r.fetch)?r.fetch(e):fetch(e));return await n.text()}catch(n){console.error("[fetchUrls]",n.message,`(${e})`)}}}},Df=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;const Ef={hide:!0},_f=e=>{const t=e??"/reference";return t.endsWith("/")?t.slice(0,-1):t},kf=e=>{const{json:t="/openapi.json",yaml:r="/openapi.yaml"}=e??{};return{json:t,yaml:r}},Pf="js/scalar.js";function xf(e){return`\n\n\n \n Scalar API Reference\n \n \n \n \n ${(e=>{var t,r,n,s;const{configuration:i}=e;return`\n ${(null==(t=null==i?void 0:i.spec)?void 0:t.content)?"function"==typeof(null==(r=null==i?void 0:i.spec)?void 0:r.content)?JSON.stringify(null==(n=null==i?void 0:i.spec)?void 0:n.content()):JSON.stringify(null==(s=null==i?void 0:i.spec)?void 0:s.content):""}<\/script>\n