@asyncapi/react-component
Version:
A React component for AsyncAPI specification.
2 lines • 2.06 MB
JavaScript
/*! For license information please see without-parser.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("AsyncApiComponent",["react"],t):"object"==typeof exports?exports.AsyncApiComponent=t(require("react")):e.AsyncApiComponent=t(e.React)}("undefined"!=typeof self?self:this,(e=>(()=>{var t={8262:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.lastVersion=t.specVersions=t.EXTENSION_REGEX=t.xParserObjectUniqueId=t.xParserCircularProps=t.xParserCircular=t.xParserOriginalTraits=t.xParserOriginalPayload=t.xParserOriginalSchemaFormat=t.xParserSchemaId=t.xParserMessageParsed=t.xParserMessageName=t.xParserApiVersion=t.xParserSpecStringified=t.xParserSpecParsed=void 0;const r=i(n(11005));t.xParserSpecParsed="x-parser-spec-parsed",t.xParserSpecStringified="x-parser-spec-stringified",t.xParserApiVersion="x-parser-api-version",t.xParserMessageName="x-parser-message-name",t.xParserMessageParsed="x-parser-message-parsed",t.xParserSchemaId="x-parser-schema-id",t.xParserOriginalSchemaFormat="x-parser-original-schema-format",t.xParserOriginalPayload="x-parser-original-payload",t.xParserOriginalTraits="x-parser-original-traits",t.xParserCircular="x-parser-circular",t.xParserCircularProps="x-parser-circular-props",t.xParserObjectUniqueId="x-parser-unique-object-id",t.EXTENSION_REGEX=/^x-[\w\d.\-_]+$/,t.specVersions=Object.keys(r.default.schemas),t.lastVersion=t.specVersions[t.specVersions.length-1]},7307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStringifiedDocument=t.isParsedDocument=t.isOldAsyncAPIDocument=t.isAsyncAPIDocument=t.toAsyncAPIDocument=t.createAsyncAPIDocument=void 0;const i=n(99711),r=n(21634),s=n(28227),o=n(8262);function a(e){switch(e.semver.major){case 2:return new i.AsyncAPIDocumentV2(e.parsed,{asyncapi:e,pointer:"/"});case 3:return new i.AsyncAPIDocumentV3(e.parsed,{asyncapi:e,pointer:"/"});default:throw new Error(`Unsupported AsyncAPI version: ${e.semver.version}`)}}function c(e){return!!e&&(e instanceof i.AsyncAPIDocumentV2||e instanceof i.AsyncAPIDocumentV3||!(!e||"function"!=typeof e.json)&&e.json()[o.xParserApiVersion]===i.ParserAPIVersion)}function p(e){return"object"==typeof e&&null!==e&&Boolean(e[o.xParserSpecParsed])}t.createAsyncAPIDocument=a,t.toAsyncAPIDocument=function(e){return c(e)?e:p(e)?a((0,s.createDetailedAsyncAPI)(e,e)):(0,r.unstringify)(e)},t.isAsyncAPIDocument=c,t.isOldAsyncAPIDocument=function(e){if(e&&"function"==typeof e.json){const t=e.json()[o.xParserApiVersion];return void 0===t||0===t}return!1},t.isParsedDocument=p,t.isStringifiedDocument=function(e){try{return"object"==typeof(e="string"==typeof e?JSON.parse(e):e)&&null!==e&&Boolean(e[o.xParserSpecParsed])&&Boolean(e[o.xParserSpecStringified])}catch(e){return!1}}},4613:(e,t)=>{"use strict";var n,i;function r(e,t,s){if(!e)return;const{schemaTypesToIterate:o,callback:a,seenSchemas:c}=s,p=e.json();if(c.has(p))return;c.add(p);let d=e.type()||[];Array.isArray(d)||(d=[d]),!o.includes(i.Objects)&&d.includes("object")||!o.includes(i.Arrays)&&d.includes("array")||!1!==a(e,t,n.NEW_SCHEMA)&&(o.includes(i.Objects)&&d.includes("object")&&function(e,t){Object.entries(e.properties()||{}).forEach((([e,n])=>{r(n,e,t)}));const n=e.additionalProperties();"object"==typeof n&&r(n,null,t);const s=t.schemaTypesToIterate;s.includes(i.PropertyNames)&&e.propertyNames()&&r(e.propertyNames(),null,t),s.includes(i.PatternProperties)&&Object.entries(e.patternProperties()||{}).forEach((([e,n])=>{r(n,e,t)}))}(e,s),o.includes(i.Arrays)&&d.includes("array")&&function(e,t){const n=e.items();n&&(Array.isArray(n)?n.forEach(((e,n)=>{r(e,n,t)})):r(n,null,t));const i=e.additionalItems();"object"==typeof i&&r(i,null,t),t.schemaTypesToIterate.includes("contains")&&e.contains()&&r(e.contains(),null,t)}(e,s),o.includes(i.OneOfs)&&(e.oneOf()||[]).forEach(((e,t)=>{r(e,t,s)})),o.includes(i.AnyOfs)&&(e.anyOf()||[]).forEach(((e,t)=>{r(e,t,s)})),o.includes(i.AllOfs)&&(e.allOf()||[]).forEach(((e,t)=>{r(e,t,s)})),o.includes(i.Nots)&&e.not()&&r(e.not(),null,s),o.includes(i.Ifs)&&e.if()&&r(e.if(),null,s),o.includes(i.Thenes)&&e.then()&&r(e.then(),null,s),o.includes(i.Elses)&&e.else()&&r(e.else(),null,s),o.includes(i.Dependencies)&&Object.entries(e.dependencies()||{}).forEach((([e,t])=>{t&&!Array.isArray(t)&&r(t,e,s)})),o.includes(i.Definitions)&&Object.entries(e.definitions()||{}).forEach((([e,t])=>{r(t,e,s)})),a(e,t,n.END_SCHEMA),c.delete(p))}function s(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Headers)&&e.hasHeaders()&&r(e.headers(),null,t),n.includes(i.Payloads)&&e.hasPayload()&&r(e.payload(),null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.traverseAsyncApiDocument=t.SchemaTypesToIterate=t.SchemaIteratorCallbackType=void 0,function(e){e.NEW_SCHEMA="NEW_SCHEMA",e.END_SCHEMA="END_SCHEMA"}(n=t.SchemaIteratorCallbackType||(t.SchemaIteratorCallbackType={})),function(e){e.Parameters="parameters",e.Payloads="payloads",e.Headers="headers",e.Components="components",e.Objects="objects",e.Arrays="arrays",e.OneOfs="oneOfs",e.AllOfs="allOfs",e.AnyOfs="anyOfs",e.Nots="nots",e.PropertyNames="propertyNames",e.PatternProperties="patternProperties",e.Contains="contains",e.Ifs="ifs",e.Thenes="thenes",e.Elses="elses",e.Dependencies="dependencies",e.Definitions="definitions"}(i=t.SchemaTypesToIterate||(t.SchemaTypesToIterate={})),t.traverseAsyncApiDocument=function(e,t,n=[]){0===n.length&&(n=Object.values(i));const o={callback:t,schemaTypesToIterate:n,seenSchemas:new Set};if(e.channels().isEmpty()||e.channels().all().forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Parameters)&&Object.values(e.parameters().filterBy((e=>e.hasSchema()))||{}).forEach((e=>{r(e.schema(),null,t)})),e.messages().all().forEach((e=>{s(e,t)}))}(e,o)})),n.includes(i.Components)&&!e.components().isEmpty()){const t=e.components();Object.values(t.messages().all()||{}).forEach((e=>{s(e,o)})),Object.values(t.schemas().all()||{}).forEach((e=>{r(e,null,o)})),n.includes(i.Parameters)&&Object.values(t.channelParameters().filterBy((e=>e.hasSchema()))).forEach((e=>{r(e.schema(),null,o)})),Object.values(t.messageTraits().all()||{}).forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:n}=t;n.includes(i.Headers)&&e.hasHeaders()&&r(e.headers(),null,t)}(e,o)}))}}},41029:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserAPIVersion=void 0,t.ParserAPIVersion=3},87506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseModel=void 0,t.BaseModel=class{constructor(e,t={}){this._json=e,this._meta=t}json(e){return void 0===e||null===this._json||void 0===this._json?this._json:this._json[e]}meta(e){return void 0===e?this._meta:this._meta?this._meta[e]:void 0}jsonPath(e){return"string"!=typeof e?this._meta.pointer:`${this._meta.pointer}/${e}`}createModel(e,t,n){return new e(t,Object.assign(Object.assign({},n),{asyncapi:this._meta.asyncapi}))}}},19488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},99594:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},41318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},44634:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2504:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0,t.Collection=class extends Array{constructor(e,t={}){super(...e),this.collections=e,this._meta=t}has(e){return void 0!==this.get(e)}all(){return this.collections}isEmpty(){return 0===this.collections.length}filterBy(e){return this.collections.filter(e)}meta(e){return void 0===e?this._meta:this._meta?this._meta[String(e)]:void 0}}},39762:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21078:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},48139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3272:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},75773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentations=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.ExternalDocumentations=r},99711:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(91776),t),r(n(11195),t),r(n(41029),t),r(n(87506),t),r(n(19488),t),r(n(5205),t),r(n(99594),t),r(n(41318),t),r(n(44634),t),r(n(2504),t),r(n(31247),t),r(n(39762),t),r(n(21078),t),r(n(48139),t),r(n(46449),t),r(n(230),t),r(n(3272),t),r(n(51760),t),r(n(67137),t),r(n(27990),t),r(n(17595),t),r(n(9532),t),r(n(1412),t),r(n(18593),t),r(n(15548),t),r(n(28875),t),r(n(48945),t),r(n(63221),t),r(n(22874),t),r(n(52959),t),r(n(77186),t),r(n(20919),t),r(n(78583),t),r(n(92469),t),r(n(67990),t),r(n(90964),t),r(n(7527),t),r(n(61746),t),r(n(77990),t),r(n(20262),t),r(n(85797),t),r(n(34241),t),r(n(98341),t),r(n(778),t),r(n(64780),t),r(n(24851),t),r(n(37020),t),r(n(31591),t)},67137:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},27990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},17595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1412:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15548:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},28875:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},48945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},52959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77186:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},20919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92469:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},67990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90964:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},20262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85797:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98341:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},778:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},64780:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemasFromDocument=t.createModel=void 0;const i=n(4613);t.createModel=function(e,t,n,i){return new e(t,Object.assign(Object.assign({},n),{asyncapi:n.asyncapi||(null==i?void 0:i.meta().asyncapi)}))},t.schemasFromDocument=function(e,t,n){const r=new Set,s=new Set;let o=Object.values(i.SchemaTypesToIterate);return n||(o=o.filter((e=>e!==i.SchemaTypesToIterate.Components))),(0,i.traverseAsyncApiDocument)(e,(function(e){r.has(e.json())||(r.add(e.json()),s.add(e))}),o),new t(Array.from(s))}},26325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAPIDocument=void 0;const i=n(87506),r=n(84505),s=n(91548),o=n(14620),a=n(21688),c=n(88537),p=n(74262),d=n(80758),l=n(53890),f=n(52773),u=n(98643),m=n(9481),h=n(99237),y=n(28227),g=n(33584);class b extends i.BaseModel{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(r.Info,this._json.info,{pointer:"/info"})}servers(){return new d.Servers(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(l.Server,t,{id:e,pointer:`/servers/${e}`}))))}channels(){return new s.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(o.Channel,t,{id:e,address:e,pointer:`/channels/${(0,y.tilde)(e)}`}))))}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),new c.Messages(e)}schemas(){return(0,g.schemasFromDocument)(this,m.Schemas,!1)}securitySchemes(){var e;return new f.SecuritySchemes(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(u.SecurityScheme,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(a.Components,this._json.components||{},{pointer:"/components"})}allServers(){const e=this.servers().all();return this.components().servers().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new d.Servers(e)}allChannels(){const e=this.channels().all();return this.components().channels().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new s.Channels(e)}allOperations(){const e=[];return this.allChannels().forEach((t=>e.push(...t.operations()))),new p.Operations(e)}allMessages(){const e=[];return this.allOperations().forEach((t=>t.messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))))),this.components().messages().forEach((t=>!e.some((e=>e.json()===t.json()))&&e.push(t))),new c.Messages(e)}allSchemas(){return(0,g.schemasFromDocument)(this,m.Schemas,!0)}extensions(){return(0,h.extensions)(this)}}t.AsyncAPIDocument=b},580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return(0,r.extensions)(this)}}t.Binding=s},9143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const i=n(31247),r=n(23415),s=n(25777),o=n(33584),a=n(8262);class c extends i.Collection{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,n])=>{a.EXTENSION_REGEX.test(t)&&e.push((0,o.createModel)(s.Extension,n,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new r.Extensions(e)}}t.Bindings=c},87129:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameter=void 0;const i=n(87506),r=n(94020),s=n(99237);class o extends i.BaseModel{id(){return this._meta.id}hasSchema(){return!!this._json.schema}schema(){if(this._json.schema)return this.createModel(r.Schema,this._json.schema,{pointer:`${this._meta.pointer}/schema`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return(0,s.hasDescription)(this)}description(){return(0,s.description)(this)}extensions(){return(0,s.extensions)(this)}}t.ChannelParameter=o},65980:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelParameters=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ChannelParameters=r},14620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channel=void 0;const i=n(87506),r=n(65980),s=n(87129),o=n(88537),a=n(74262),c=n(7523),p=n(80758),d=n(53890),l=n(99237);class f extends i.BaseModel{id(){return this._meta.id}address(){return this._meta.address}hasDescription(){return(0,l.hasDescription)(this)}description(){return(0,l.description)(this)}servers(){var e;const t=[],n=this._json.servers||[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.servers)||{}).forEach((([e,i])=>{(0===n.length||n.includes(e))&&t.push(this.createModel(d.Server,i,{id:e,pointer:`/servers/${e}`}))})),new p.Servers(t)}operations(){const e=[];return["publish","subscribe"].forEach((t=>{const n=this._json[t],i=n&&n.operationId||t;n&&e.push(this.createModel(c.Operation,n,{id:i,action:t,pointer:`${this._meta.pointer}/${t}`}))})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new o.Messages(e)}parameters(){return new r.ChannelParameters(Object.entries(this._json.parameters||{}).map((([e,t])=>this.createModel(s.ChannelParameter,t,{id:e,pointer:`${this._meta.pointer}/parameters/${e}`}))))}bindings(){return(0,l.bindings)(this)}extensions(){return(0,l.extensions)(this)}}t.Channel=f},91548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Channels=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Channels=r},21688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Components=void 0;const i=n(87506),r=n(9143),s=n(580),o=n(14620),a=n(87129),c=n(45219),p=n(44495),d=n(69588),l=n(94020),f=n(98643),u=n(53890),m=n(12162),h=n(99237),y=n(80758),g=n(91548),b=n(88537),v=n(9481),j=n(65980),$=n(45466),_=n(31334),x=n(60603),w=n(52773),S=n(61617),P=n(74262),O=n(18467),E=n(28227);class A extends i.BaseModel{servers(){return this.createCollection("servers",y.Servers,u.Server)}channels(){return new g.Channels(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(o.Channel,t,{id:e,address:"",pointer:`/components/channels/${(0,E.tilde)(e)}`}))))}operations(){return new P.Operations([])}messages(){return this.createCollection("messages",b.Messages,O.Message)}schemas(){return this.createCollection("schemas",v.Schemas,l.Schema)}channelParameters(){return this.createCollection("parameters",j.ChannelParameters,a.ChannelParameter)}serverVariables(){return this.createCollection("serverVariables",$.ServerVariables,m.ServerVariable)}operationTraits(){return this.createCollection("operationTraits",_.OperationTraits,d.OperationTrait)}messageTraits(){return this.createCollection("messageTraits",x.MessageTraits,p.MessageTrait)}correlationIds(){return this.createCollection("correlationIds",S.CorrelationIds,c.CorrelationId)}securitySchemes(){return this.createCollection("securitySchemes",w.SecuritySchemes,f.SecurityScheme)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return(0,h.extensions)(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,n){const i=[];return Object.entries(this._json[e]||{}).forEach((([t,r])=>{i.push(this.createModel(n,r,{id:t,pointer:`/components/${e}/${t}`}))})),new t(i)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[n,i])=>{const o=i||{},a=this.meta("asyncapi"),c=`components/${e}/${n}`;return t[n]=new r.Bindings(Object.entries(o).map((([e,t])=>this.createModel(s.Binding,t,{protocol:e,pointer:`${c}/${e}`}))),{originalData:o,asyncapi:a,pointer:c}),t}),{})}}t.Components=A},90852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contact=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return(0,r.extensions)(this)}}t.Contact=s},45219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationId=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{location(){return this._json.location}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.CorrelationId=s},61617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationIds=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.CorrelationIds=r},25777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const i=n(87506);class r extends i.BaseModel{id(){return this._meta.id}value(){return this._json}}t.Extension=r},23415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=void 0;const i=n(31247);class r extends i.Collection{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}t.Extensions=r},66241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalDocumentation=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{url(){return this._json.url}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}extensions(){return(0,r.extensions)(this)}}t.ExternalDocumentation=s},91776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsV2=t.TagV2=t.ServersV2=t.ServerV2=t.ServerVariablesV2=t.ServerVariableV2=t.SecuritySchemesV2=t.SecuritySchemeV2=t.SchemasV2=t.SchemaV2=t.OperationsV2=t.OperationV2=t.OperationTraitsV2=t.OperationTraitV2=t.OAuthFlowsV2=t.OAuthFlowV2=t.MessagesV2=t.MessageV2=t.MessageTraitsV2=t.MessageTraitV2=t.MessageExamplesV2=t.MessageExampleV2=t.LicenseV2=t.InfoV2=t.ExternalDocumentationV2=t.ExtensionsV2=t.ExtensionV2=t.CorrelationIdV2=t.ContactV2=t.ComponentsV2=t.ChannelsV2=t.ChannelV2=t.ChannelParametersV2=t.ChannelParameterV2=t.BindingsV2=t.BindingV2=t.AsyncAPIDocumentV2=void 0;var i=n(26325);Object.defineProperty(t,"AsyncAPIDocumentV2",{enumerable:!0,get:function(){return i.AsyncAPIDocument}});var r=n(580);Object.defineProperty(t,"BindingV2",{enumerable:!0,get:function(){return r.Binding}});var s=n(9143);Object.defineProperty(t,"BindingsV2",{enumerable:!0,get:function(){return s.Bindings}});var o=n(87129);Object.defineProperty(t,"ChannelParameterV2",{enumerable:!0,get:function(){return o.ChannelParameter}});var a=n(65980);Object.defineProperty(t,"ChannelParametersV2",{enumerable:!0,get:function(){return a.ChannelParameters}});var c=n(14620);Object.defineProperty(t,"ChannelV2",{enumerable:!0,get:function(){return c.Channel}});var p=n(91548);Object.defineProperty(t,"ChannelsV2",{enumerable:!0,get:function(){return p.Channels}});var d=n(21688);Object.defineProperty(t,"ComponentsV2",{enumerable:!0,get:function(){return d.Components}});var l=n(90852);Object.defineProperty(t,"ContactV2",{enumerable:!0,get:function(){return l.Contact}});var f=n(45219);Object.defineProperty(t,"CorrelationIdV2",{enumerable:!0,get:function(){return f.CorrelationId}});var u=n(25777);Object.defineProperty(t,"ExtensionV2",{enumerable:!0,get:function(){return u.Extension}});var m=n(23415);Object.defineProperty(t,"ExtensionsV2",{enumerable:!0,get:function(){return m.Extensions}});var h=n(66241);Object.defineProperty(t,"ExternalDocumentationV2",{enumerable:!0,get:function(){return h.ExternalDocumentation}});var y=n(84505);Object.defineProperty(t,"InfoV2",{enumerable:!0,get:function(){return y.Info}});var g=n(60082);Object.defineProperty(t,"LicenseV2",{enumerable:!0,get:function(){return g.License}});var b=n(50765);Object.defineProperty(t,"MessageExampleV2",{enumerable:!0,get:function(){return b.MessageExample}});var v=n(95501);Object.defineProperty(t,"MessageExamplesV2",{enumerable:!0,get:function(){return v.MessageExamples}});var j=n(44495);Object.defineProperty(t,"MessageTraitV2",{enumerable:!0,get:function(){return j.MessageTrait}});var $=n(60603);Object.defineProperty(t,"MessageTraitsV2",{enumerable:!0,get:function(){return $.MessageTraits}});var _=n(18467);Object.defineProperty(t,"MessageV2",{enumerable:!0,get:function(){return _.Message}});var x=n(88537);Object.defineProperty(t,"MessagesV2",{enumerable:!0,get:function(){return x.Messages}});var w=n(63);Object.defineProperty(t,"OAuthFlowV2",{enumerable:!0,get:function(){return w.OAuthFlow}});var S=n(57310);Object.defineProperty(t,"OAuthFlowsV2",{enumerable:!0,get:function(){return S.OAuthFlows}});var P=n(69588);Object.defineProperty(t,"OperationTraitV2",{enumerable:!0,get:function(){return P.OperationTrait}});var O=n(31334);Object.defineProperty(t,"OperationTraitsV2",{enumerable:!0,get:function(){return O.OperationTraits}});var E=n(7523);Object.defineProperty(t,"OperationV2",{enumerable:!0,get:function(){return E.Operation}});var A=n(74262);Object.defineProperty(t,"OperationsV2",{enumerable:!0,get:function(){return A.Operations}});var T=n(94020);Object.defineProperty(t,"SchemaV2",{enumerable:!0,get:function(){return T.Schema}});var I=n(9481);Object.defineProperty(t,"SchemasV2",{enumerable:!0,get:function(){return I.Schemas}});var k=n(98643);Object.defineProperty(t,"SecuritySchemeV2",{enumerable:!0,get:function(){return k.SecurityScheme}});var M=n(52773);Object.defineProperty(t,"SecuritySchemesV2",{enumerable:!0,get:function(){return M.SecuritySchemes}});var R=n(12162);Object.defineProperty(t,"ServerVariableV2",{enumerable:!0,get:function(){return R.ServerVariable}});var N=n(45466);Object.defineProperty(t,"ServerVariablesV2",{enumerable:!0,get:function(){return N.ServerVariables}});var q=n(53890);Object.defineProperty(t,"ServerV2",{enumerable:!0,get:function(){return q.Server}});var C=n(80758);Object.defineProperty(t,"ServersV2",{enumerable:!0,get:function(){return C.Servers}});var D=n(3410);Object.defineProperty(t,"TagV2",{enumerable:!0,get:function(){return D.Tag}});var F=n(82385);Object.defineProperty(t,"TagsV2",{enumerable:!0,get:function(){return F.Tags}})},84505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const i=n(87506),r=n(90852),s=n(66241),o=n(60082),a=n(82385),c=n(3410),p=n(99237);class d extends i.BaseModel{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(r.Contact,e,{pointer:"/info/contact"})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(o.License,e,{pointer:"/info/license"})}hasExternalDocs(){const e=this._meta.asyncapi.parsed;return Object.keys(e.externalDocs||{}).length>0}externalDocs(){if(this.hasExternalDocs()){const e=this._meta.asyncapi.parsed;return this.createModel(s.ExternalDocumentation,e.externalDocs,{pointer:"/externalDocs"})}}tags(){const e=this._meta.asyncapi.parsed.tags||[];return new a.Tags(e.map(((e,t)=>this.createModel(c.Tag,e,{pointer:`/tags/${t}`}))))}extensions(){return(0,p.extensions)(this)}}t.Info=d},60082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.License=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return(0,r.extensions)(this)}}t.License=s},50765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExample=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return(0,r.extensions)(this)}}t.MessageExample=s},95501:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageExamples=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.name()===e))}}t.MessageExamples=r},44495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTrait=void 0;const i=n(87506),r=n(45219),s=n(95501),o=n(50765),a=n(94020),c=n(8262),p=n(99237),d=n(87401);class l extends i.BaseModel{id(){return this._json.messageId||this._meta.id||this.json(c.xParserMessageName)}hasSchemaFormat(){return void 0!==this.schemaFormat()}schemaFormat(){return this._json.schemaFormat||(0,d.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}hasMessageId(){return!!this._json.messageId}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(r.CorrelationId,this._json.correlationId,{pointer:`${this._meta.pointer}/correlationId`})}hasContentType(){return!!this._json.contentType}contentType(){var e;return this._json.contentType||(null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(a.Schema,this._json.headers,{pointer:`${this._meta.pointer}/headers`})}hasName(){return!!this._json.name}name(){return this._json.name}hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,p.hasDescription)(this)}description(){return(0,p.description)(this)}hasExternalDocs(){return(0,p.hasExternalDocs)(this)}externalDocs(){return(0,p.externalDocs)(this)}examples(){return new s.MessageExamples((this._json.examples||[]).map(((e,t)=>this.createModel(o.MessageExample,e,{pointer:`${this._meta.pointer}/examples/${t}`}))))}tags(){return(0,p.tags)(this)}bindings(){return(0,p.bindings)(this)}extensions(){return(0,p.extensions)(this)}}t.MessageTrait=l},60603:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageTraits=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.MessageTraits=r},18467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const i=n(91548),r=n(74262),s=n(7523),o=n(60603),a=n(44495),c=n(80758),p=n(94020),d=n(28227);class l extends a.MessageTrait{hasPayload(){return!!this._json.payload}payload(){if(this._json.payload)return this.createModel(p.Schema,this._json.payload,{pointer:`${this._meta.pointer}/payload`,schemaFormat:this._json.schemaFormat})}servers(){const e=[],t=[];return this.channels().forEach((n=>{n.servers().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new c.Servers(e)}channels(){const e=[],t=[];return this.operations().all().forEach((n=>{n.channels().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new i.Channels(e)}operations(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,n])=>{["subscribe","publish"].forEach((i=>{const r=n[i];r&&(r.message===this._json||(r.message.oneOf||[]).includes(this._json))&&t.push(this.createModel(s.Operation,r,{id:"",pointer:`/channels/${(0,d.tilde)(e)}/${i}`,action:i}))}))})),new r.Operations(t)}traits(){return new o.MessageTraits((this._json.traits||[]).map(((e,t)=>this.createModel(a.MessageTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`}))))}}t.Message=l},88537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}t.Messages=r},99237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tags=t.externalDocs=t.hasExternalDocs=t.extensions=t.description=t.hasDescription=t.bindings=void 0;const i=n(9143),r=n(580),s=n(23415),o=n(25777),a=n(66241),c=n(82385),p=n(3410),d=n(33584),l=n(8262);function f(e){return e.json("description")}function u(e){return Object.keys(e.json("externalDocs")||{}).length>0}t.bindings=function(e){const t=e.json("bindings")||{};return new i.Bindings(Object.entries(t||{}).map((([t,n])=>(0,d.createModel)(r.Binding,n,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})},t.hasDescription=function(e){return Boolean(f(e))},t.description=f,t.extensions=function(e){const t=[];return Object.entries(e.json()).forEach((([n,i])=>{l.EXTENSION_REGEX.test(n)&&t.push((0,d.createModel)(o.Extension,i,{id:n,pointer:e.jsonPath(n)},e))})),new s.Extensions(t)},t.hasExternalDocs=u,t.externalDocs=function(e){if(u(e))return new a.ExternalDocumentation(e.json("externalDocs"))},t.tags=function(e){return new c.Tags((e.json("tags")||[]).map(((t,n)=>(0,d.createModel)(p.Tag,t,{pointer:e.jsonPath(`tags/${n}`)},e))))}},63:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlow=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{hasAuthorizationUrl(){return!!this.json().authorizationUrl}authorizationUrl(){return this.json().authorizationUrl}hasTokenUrl(){return!!this.json().tokenUrl}tokenUrl(){return this.json().tokenUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}extensions(){return(0,r.extensions)(this)}}t.OAuthFlow=s},57310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthFlows=void 0;const i=n(87506),r=n(63),s=n(99237);class o extends i.BaseModel{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new r.OAuthFlow(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new r.OAuthFlow(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new r.OAuthFlow(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new r.OAuthFlow(this._json.password)}extensions(){return(0,s.extensions)(this)}}t.OAuthFlows=o},69588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTrait=void 0;const i=n(87506),r=n(98643),s=n(41649),o=n(60655),a=n(99237);class c extends i.BaseModel{id(){return this.operationId()||this._meta.id}hasOperationId(){return!!this._json.operationId}operationId(){return this._json.operationId}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return(0,a.hasDescription)(this)}description(){return(0,a.description)(this)}hasExternalDocs(){return(0,a.hasExternalDocs)(this)}externalDocs(){return(0,a.externalDocs)(this)}security(){var e,t,n,i;const a=(null===(i=null===(n=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===n?void 0:n.components)||void 0===i?void 0:i.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const n=[];return Object.entries(e).forEach((([e,i])=>{const s=this.createModel(r.SecurityScheme,a[e],{id:e,pointer:`/components/securitySchemes/${e}`});n.push(this.createModel(o.SecurityRequirement,{scheme:s,scopes:i},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new s.SecurityRequirements(n)}))}tags(){return(0,a.tags)(this)}bindings(){return(0,a.bindings)(this)}extensions(){return(0,a.extensions)(this)}}t.OperationTrait=c},31334:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTraits=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.OperationTraits=r},7523:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const i=n(91548),r=n(14620),s=n(88537),o=n(18467),a=n(31334),c=n(69588),p=n(80758),d=n(28227);class l extends c.OperationTrait{action(){return this._meta.action}isSend(){return"subscribe"===this.action()}isReceive(){return"publish"===this.action()}servers(){const e=[],t=[];return this.channels().forEach((n=>{n.servers().forEach((n=>{t.includes(n.json())||(t.push(n.json()),e.push(n))}))})),new p.Servers(e)}channels(){const e=[];return Object.entries(this._meta.asyncapi.parsed.channels||{}).forEach((([t,n])=>{n.subscribe!==this._json&&n.publish!==this._json||e.push(this.createModel(r.Channel,n,{id:t,address:t,pointer:`/channels/${(0,d.tilde)(t)}`}))})),new i.Channels(e)}messages(){let e=!1,t=[];return this._json.message&&(Array.isArray(this._json.message.oneOf)?(t=this._json.message.oneOf,e=!0):t=[this._json.message]),new s.Messages(t.map(((t,n)=>this.createModel(o.Message,t,{id:"",pointer:`${this._meta.pointer}/message${e?`/oneOf/${n}`:""}`}))))}reply(){}traits(){return new a.OperationTraits((this._json.traits||[]).map(((e,t)=>this.createModel(c.OperationTrait,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`,action:""}))))}}t.Operation=l},74262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operations=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}t.Operations=r},94020:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;const i=n(87506),r=n(8262),s=n(99237),o=n(87401);class a extends i.BaseModel{id(){return this.$id()||this._meta.id||this.json(r.xParserSchemaId)}$comment(){if("boolean"!=typeof this._json)return this._json.$comment}$id(){if("boolean"!=typeof this._json)return this._json.$id}$schema(){return"boolean"==typeof this._json?"http://json-schema.org/draft-07/schema#":this._json.$schema||"http://json-schema.org/draft-07/schema#"}additionalItems(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalItems?this._json.additionalItems:void 0===this._json.additionalItems||null!==this._json.additionalItems&&this.createModel(a,this._json.additionalItems,{pointer:`${this._meta.pointer}/additionalItems`,parent:this})}additionalProperties(){return"boolean"==typeof this._json?this._json:"boolean"==typeof this._json.additionalProperties?this._json.additionalProperties:void 0===this._json.additionalProperties||null!==this._json.additionalProperties&&this.createModel(a,this._json.additionalProperties,{pointer:`${this._meta.pointer}/additionalProperties`,parent:this})}allOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.allOf))return this._json.allOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.anyOf))return this._json.anyOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._json)return this._json.const}contains(){if("boolean"!=typeof this._json&&"object"==typeof this._json.contains)return this.createModel(a,this._json.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._json)return this._json.contentEncoding}contentMediaType(){if("boolean"!=typeof this._json)return this._json.contentMediaType}default(){if("boolean"!=typeof this._json)return this._json.default}definitions(){if("boolean"!=typeof this._json&&"object"==typeof this._json.definitions)return Object.entries(this._json.definitions).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._json)return this._json.description}dependencies(){if("boolean"!=typeof this._json&&"object"==typeof this._json.dependencies)return Object.entries(this._json.dependencies).reduce(((e,[t,n])=>(e[t]=Array.isArray(n)?n:this.createModel(a,n,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._json&&(this._json.deprecated||!1)}discriminator(){if("boolean"!=typeof this._json)return this._json.discriminator}else(){if("boolean"!=typeof this._json&&"object"==typeof this._json.else)return this.createModel(a,this._json.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._json)return this._json.enum}examples(){if("boolean"!=typeof this._json)return this._json.examples}exclusiveMaximum(){if("boolean"!=typeof this._json)return this._json.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._json)return this._json.exclusiveMinimum}format(){if("boolean"!=typeof this._json)return this._json.format}isBooleanSchema(){return"boolean"==typeof this._json}if(){if("boolean"!=typeof this._json&&"object"==typeof this._json.if)return this.createModel(a,this._json.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){let e=this._meta.parent;for(;e;){if(e._json===this._json)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._json&&"object"==typeof this._json.items)return Array.isArray(this._json.items)?this._json.items.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(a,this._json.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._json)return this._json.maximum}maxItems(){if("boolean"!=typeof this._json)return this._json.maxItems}maxLength(){if("boolean"!=typeof this._json)return this._json.maxLength}maxProperties(){if("boolean"!=typeof this._json)return this._json.maxProperties}minimum(){if("boolean"!=typeof this._json)return this._json.minimum}minItems(){if("boolean"!=typeof this._json)return this._json.minItems}minLength(){if("boolean"!=typeof this._json)return this._json.minLength}minProperties(){if("boolean"!=typeof this._json)return this._json.minProperties}multipleOf(){if("boolean"!=typeof this._json)return this._json.multipleOf}not(){if("boolean"!=typeof this._json&&"object"==typeof this._json.not)return this.createModel(a,this._json.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.oneOf))return this._json.oneOf.map(((e,t)=>this.createModel(a,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._json)return this._json.pattern}patternProperties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.patternProperties)return Object.entries(this._json.patternProperties).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties)return Object.entries(this._json.properties).reduce(((e,[t,n])=>(e[t]=this.createModel(a,n,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties&&"object"==typeof this._json.properties[e])return this.createModel(a,this._json.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._json&&"object"==typeof this._json.propertyNames)return this.createModel(a,this._json.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._json&&(this._json.readOnly||!1)}required(){if("boolean"!=typeof this._json)return this._json.required}schemaFormat(){return this._meta.schemaFormat||(0,o.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version)}then(){if("boolean"!=typeof this._json&&"object"==typeof this._json.then)return this.createModel(a,this._json.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._json)return this._json.title}type(){if("boolean"!=typeof this._json)return this._json.type}uniqueItems(){return"boolean"!=typeof this._json&&(this._json.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._json&&(this._json.writeOnly||!1)}hasExternalDocs(){return(0,s.hasExternalDocs)(this)}externalDocs(){return(0,s.externalDocs)(this)}extensions(){return(0,s.extensions)(this)}}t.Schema=a},9481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schemas=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.Schemas=r},60655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirement=void 0;const i=n(87506);class r extends i.BaseModel{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}t.SecurityRequirement=r},41649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRequirements=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.meta("id")===e))}}t.SecurityRequirements=r},98643:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityScheme=void 0;const i=n(87506),r=n(57310),s=n(99237);class o extends i.BaseModel{id(){return this._meta.id}type(){return this._json.type}hasDescription(){return(0,s.hasDescription)(this)}description(){return(0,s.description)(this)}hasName(){return!!this._json.name}name(){return this._json.name}hasIn(){return!!this._json.in}in(){return this._json.in}hasScheme(){return!!this._json.scheme}scheme(){return this._json.scheme}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}hasFlows(){return!!this._json.flows}flows(){if(this._json.flows)return new r.OAuthFlows(this._json.flows)}hasOpenIdConnectUrl(){return!!this._json.openIdConnectUrl}openIdConnectUrl(){return this._json.openIdConnectUrl}extensions(){return(0,s.extensions)(this)}}t.SecurityScheme=o},52773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecuritySchemes=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.SecuritySchemes=r},12162:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariable=void 0;const i=n(87506),r=n(99237);class s extends i.BaseModel{id(){return this._meta.id}hasDescription(){return(0,r.hasDescription)(this)}description(){return(0,r.description)(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return(0,r.extensions)(this)}}t.ServerVariable=s},45466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerVariables=void 0;const i=n(31247);class r extends i.Collection{get(e){return this.collections.find((t=>t.id()===e))}}t.ServerVariables=r},53890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=void 0;const i=n(87506),r=n(91548),s=n(14620),o=n(88537),a=n(74262),c=n(98643),p=n(45466),d=n(12162),l=n(41649),f=n(60655),u=n(99237),m=n(28227);class h extends i.BaseModel{id(){return this._meta.id}url(){return this._json.url}host(){return new URL(this.url()).host}hasPathname(){return!!this.pathname()}pathname(){return new URL(this.url()).pathname}protocol(){return this._json.protocol}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}hasDescription(){return(0,u.hasDescription)(this)}description(){return(0,u.description)(this)}channels(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,n])=>{const i=n.servers||[];(0===i.length||i.includes(this._meta.id))&&t.push(this.createModel(s.Channel,n,{id:e,address:e,pointer:`/channels/${(0,m.tilde)(e)}`}))})),new r.Channels(t)}operations(){const e=[];return this.channels().forEach((t=>{e.push(...t.operations().all())})),new a.Operations(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new o.Messages(e)}variables(){return new p.ServerVariables(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(d.ServerVariable,t,{id:e,pointer:`${this._meta.pointer}/variables/${e}`}))))}security(){var e,t,n,i;const r=(null===(i=null===(n=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void