',''," "])),s,l?"xxx-of-key":"xxx-of-descr",c):s.endsWith("*")?z(yl||(yl=$p([' ',' * '])),s.substring(0,s.length-1)):z(bl||(bl=$p([''," "])),s),"xxx-of"===e["::type"]&&"array"===t?z(xl||(xl=$p(['ARRAY ']))):"",(e["::type"]||"").includes("xxx-of")?"":u,Da(ce()(n||""))):z(wl||(wl=$p([" "," "])),"array"===e["::type"]&&"array"===t?z(kl||(kl=$p(['"])),t):""),Array.isArray(e)&&e[0]?z(Sl||(Sl=$p(["",""])),this.generateTree(e[0],"xxx-of-option","::ARRAY~OF","",o)):z(Al||(Al=$p([" "," "])),Object.keys(e).map(t=>z(Ol||(Ol=$p([" "," "])),["::description","::type","::props","::deprecated"].includes(t)?"array"===e[t]["::type"]||"object"===e[t]["::type"]?z(El||(El=$p(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1)):"":z(Dl||(Dl=$p(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1))))));const p=e.split("~|~"),f=p[0].replace("{","").substring(0,4).toLowerCase();return z(Cl||(Cl=$p([' ','
',' ','
'," "," "," "," "," ","
"])),p[8],i,null!==(a=s)&&void 0!==a&&a.endsWith("*")?z(jl||(jl=$p(['',' * '])),s.substring(0,s.length-1)):r.startsWith("::OPTION")?z(_l||(_l=$p(['',' '," "])),s,c):z(Tl||(Tl=$p(["",""])),s?z(Il||(Il=$p([' '," "])),s):z(Fl||(Fl=$p([''," "])),p[7])),f,"array"===t?"[".concat(p[0],"]"):p[0],p[1],"array"===t?n:"",p[2]?z(Pl||(Pl=$p(['',"
"])),p[2]):"",p[3]?z(Rl||(Rl=$p(['Default: ',"
"])),p[3]):"",p[4]?z(Bl||(Bl=$p(['Allowed: ',"
"])),p[4]):"",p[5]?z(Ll||(Ll=$p(['Pattern: ',"
"])),p[5]):"",p[6]?z(Nl||(Nl=$p([''," "])),Da(ce()(p[6]))):"")}toggleObjectExpand(e){const t=e.target.closest(".tr");t.classList.contains("expanded")?(t.classList.add("collapsed"),t.classList.remove("expanded"),e.target.innerText="+"):(t.classList.remove("collapsed"),t.classList.add("expanded"),e.target.innerText="-")}});function Wp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vp(e,t=""){var r,n;const o=new Set;for(const t in e.responses)for(const r in null===(a=e.responses[t])||void 0===a?void 0:a.content){var a;o.add(r.trim())}const i=[...o].join(", "),s=this.resolvedSpec.securitySchemes.filter(t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some(e=>t.apiKeyId in e))})||[],c=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId&&"-"!==e.value);c&&s.push(c);const l=e.xCodeSamples?Fi.call(this,e.xCodeSamples):"";return z(bu||(bu=Wp([" ",' '])),"read"===this.renderStyle?z(xu||(xu=Wp(['
']))):"",e.method,e.deprecated?"deprecated":"",e.elementId,"focused"===this.renderStyle?z(wu||(wu=Wp([' '," "])),t):"",e.deprecated?z(ku||(ku=Wp([' DEPRECATED
']))):"",z(Su||(Su=Wp([' '," ",""])),e.deprecated?"gray-text":"",e.summary||z(Au||(Au=Wp([' '," ",""])),e.deprecated?" method-fg gray-text":e.method,e.method,e.path),e.summary?z(Ou||(Ou=Wp([' ',' ',"
"])),e.deprecated?" gray-text":" bold-text ".concat(e.method),e.method,e.deprecated?"gray-text":"",e.path):""),e.description?z(Eu||(Eu=Wp([' ',"
"])),Da(ce()(e.description||""))):"",Ti.call(this,e.security),l,e.method,e.path,e.parameters,e.requestBody,s,e.servers,(null===(r=e.servers)||void 0===r||null===(n=r[0])||void 0===n?void 0:n.url)||this.selectedServer.computedUrl,this.fillRequestFieldsWithExample,this.allowTry,i,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded,e.callbacks?Ri.call(this,e.callbacks):"",e.responses,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded,Object.keys(e.responses||{})[0]||"")}function Yp(){return z(Du||(Du=Wp([" "," "])),this.resolvedSpec.tags.map(e=>z(Cu||(Cu=Wp([' ',"
"])),e.elementId,e.name,Da("".concat(ce()(e.description?e.description:""),"
")),e.paths.map(e=>Vp.call(this,e,"BBB")))))}function Kp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Gp(e){return z(ju||(ju=Kp(['
',"
"])),e.name,e.id,z(_u||(_u=Kp([" "," "," "])),e.name,e.component?z(Tu||(Tu=Kp(['
'])),this.renderStyle,e.component):""))}function Jp(){return z(Iu||(Iu=Kp([" "," "])),this.resolvedSpec.components.map(e=>z(Fu||(Fu=Kp([' ',"
"])),e.name.toLowerCase(),e.name,Da("".concat(ce()(e.description?e.description:""),"
")),e.subComponents.map(e=>Gp.call(this,e)))))}function Qp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Xp(){const e=new ce.a.Renderer;return e.heading=(e,t,r,n)=>"').concat(e," "),e}function Zp(){var e,t,r;return z(Pu||(Pu=Qp([' ',"
"])),"view"===this.renderStyle?"section-gap":"section-gap--read-mode",null!==(e=this.resolvedSpec)&&void 0!==e&&e.info?z(Ru||(Ru=Qp([' '," ",'
'," "," "," ",'
',"
"])),this.resolvedSpec.info.title,this.resolvedSpec.info.version?z(Bu||(Bu=Qp([' '," "])),this.resolvedSpec.info.version):"",null!==(t=this.resolvedSpec.info.contact)&&void 0!==t&&t.email?z(Lu||(Lu=Qp(["",': '," "])),this.resolvedSpec.info.contact.name||"Email",this.resolvedSpec.info.contact.email,this.resolvedSpec.info.contact.email):"",null!==(r=this.resolvedSpec.info.contact)&&void 0!==r&&r.url?z(Nu||(Nu=Qp(['URL: '," "])),this.resolvedSpec.info.contact.url,this.resolvedSpec.info.contact.url):"",this.resolvedSpec.info.license?z(Mu||(Mu=Qp(["License: "," "])),this.resolvedSpec.info.license.url?z(qu||(qu=Qp([''," "])),this.resolvedSpec.info.license.url,this.resolvedSpec.info.license.name):this.resolvedSpec.info.license.name):"",this.resolvedSpec.info.termsOfService?z(zu||(zu=Qp(['Terms of Service '])),this.resolvedSpec.info.termsOfService):"",this.resolvedSpec.info.description?z(Uu||(Uu=Qp(["",""])),Da('\n \n '.concat(ce()(this.resolvedSpec.info.description,"true"===this.infoDescriptionHeadingsInNavBar?{renderer:Xp()}:void 0),"\n
"))):""):"")}function ef(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tf(e,t){e&&e.target.checked&&(this.selectedServer=t,this.requestUpdate())}function rf(e,t){const r=[...e.currentTarget.closest("table").querySelectorAll("input, select")];let n=t.url;r.forEach(e=>{const t=new RegExp("{".concat(e.dataset.var,"}"),"g");n=n.replace(t,e.value)}),t.computedUrl=n,this.requestUpdate()}function nf(){return this.selectedServer&&this.selectedServer.variables?z($u||($u=ef([' SERVER VARIABLES
"])),Object.entries(this.selectedServer.variables).map(e=>z(Hu||(Hu=ef([' '," "," "," "])),e[0],e[1].enum?z(Wu||(Wu=ef([' '," "])),e[0],e=>{rf.call(this,e,this.selectedServer)},Object.entries(e[1].enum).map(t=>e[1].default===t[1]?z(Vu||(Vu=ef([' '])),t[1],t[1]):z(Yu||(Yu=ef([' '])),t[1],t[1]))):z(Ku||(Ku=ef([' '])),e[0],e[1].default,e=>{rf.call(this,e,this.selectedServer)}),e[1].description?z(Gu||(Gu=ef([' '," "])),Da(ce()(e[1].description))):""))):""}function of(){var e,t,r;return z(Ju||(Ju=ef([' "])),"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap",0===(null===(e=this.resolvedSpec.servers)||void 0===e?void 0:e.length)?"":z(Qu||(Qu=ef([" "," "])),null===(t=this.resolvedSpec)||void 0===t?void 0:t.servers.map((e,t)=>z(Xu||(Xu=ef([' '," "," "])),t,e.url,t=>{tf.call(this,t,e)},this.selectedServer.url===e.url,t,e.url,e.description?z(Zu||(Zu=ef(['- '," "])),e.description):""))),null===(r=this.selectedServer)||void 0===r?void 0:r.computedUrl,nf.call(this))}function af(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sf(e,t="toggle"){const r=null==e?void 0:e.closest(".nav-bar-tag-and-paths");if(r){const e=r.classList.contains("expanded");!e||"toggle"!==t&&"collapse"!==t?e||"toggle"!==t&&"expand"!==t||r.classList.replace("collapsed","expanded"):r.classList.replace("expanded","collapsed")}}function cf(e){sf(e.target,"toggle")}function lf(e,t="expand-all"){!function(e,t="expand-all"){const r=[...e.querySelectorAll(".nav-bar-tag-and-paths")];"expand-all"===t?r.map(e=>{e.classList.replace("collapsed","expanded")}):r.map(e=>{e.classList.replace("expanded","collapsed")})}(e.target.closest(".nav-scroll"),t)}function uf(){return z(ep||(ep=af([' "])),this.renderStyle,"false"===this.allowSearch&&"false"===this.allowAdvancedSearch?"":z(tp||(tp=af([' '," ","
"])),"false"===this.allowAdvancedSearch?"border-bottom: 1px solid var(--nav-hover-bg-color)":"","false"===this.allowSearch?"":z(rp||(rp=af([' '," "])),this.onSearchChange,this.matchPaths?z(np||(np=af([' CLEAR
'])),this.onClearSearch):""),"false"===this.allowAdvancedSearch||this.matchPaths?"":z(op||(op=af([' '," "])),this.onShowSearchModalClicked,"false"===this.allowSearch?"Search":"Adv. Search")),z(ap||(ap=af([' '," "," ",' '," "," "])),"false"!==this.showInfo&&this.resolvedSpec.info?z(ip||(ip=af([" "," "])),"true"===this.infoDescriptionHeadingsInNavBar?z(sp||(sp=af([" "," "," "," "])),this.resolvedSpec.infoDescriptionHeaders.length>0?z(cp||(cp=af([' Overview
'])),e=>this.scrollToEventTarget(e,!1)):"",this.resolvedSpec.infoDescriptionHeaders.map(e=>z(lp||(lp=af([' ',"
"])),e.depth,(new ce.a.Slugger).slug(e.text),(new ce.a.Slugger).slug(e.text),e=>this.scrollToEventTarget(e,!1),e.text)),this.resolvedSpec.infoDescriptionHeaders.length>0?z(up||(up=af([' ']))):""):z(pp||(pp=af([' Overview
'])),e=>this.scrollToEventTarget(e,!1))):"","false"===this.allowServerSelection?"":z(fp||(fp=af([' API Servers
'])),e=>this.scrollToEventTarget(e,!1)),"false"!==this.allowAuthentication&&this.resolvedSpec.securitySchemes?z(dp||(dp=af([' Authentication
'])),e=>this.scrollToEventTarget(e,!1)):"","focused"===this.renderStyle?z(hp||(hp=af([' ▸
▸
'])),e=>{lf.call(this,e,"expand-all")},e=>{lf.call(this,e,"collapse-all")}):"",this.resolvedSpec.tags.filter(e=>e.paths.filter(e=>Re(this.matchPaths,e)).length).map(e=>z(vp||(vp=af([' "])),e.expanded?"expanded":"collapsed",e.elementId,e.elementId,e=>{this.scrollToEventTarget(e,!1)},e.name,e=>{cf.call(this,e)},e.paths.filter(e=>!this.matchPaths||Re(this.matchPaths,e)).map(e=>z(mp||(mp=af([' ',"
"])),"true"===this.usePathInNavBar?"small-font":"",e.elementId,e.elementId,e=>{this.scrollToEventTarget(e,!1)},e.deprecated?"filter:opacity(0.5)":"","true"===this.usePathInNavBar?z(gp||(gp=af([''," "," "])),e.method.toUpperCase(),e.path):e.summary)))),"false"!==this.showComponents&&this.resolvedSpec.components?z(yp||(yp=af([' '," "])),this.resolvedSpec.components.map(e=>e.subComponents.length?z(bp||(bp=af([' ',"
"," "])),e.name.toLowerCase(),e.name.toLowerCase(),e=>this.scrollToEventTarget(e,!1),e.name,e.subComponents.map(e=>z(xp||(xp=af([' ',"
"])),e.id,e.id,e=>this.scrollToEventTarget(e,!1),e.name))):"")):""))}function pf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ff(e){return z(wp||(wp=pf([' ',";
"])),e)}function df(){var e;if("true"===this.showInfo)return ff(Zp.call(this));const t=this.resolvedSpec.tags[0],r=null===(e=this.resolvedSpec.tags[0])||void 0===e?void 0:e.paths[0];return ff(t&&r?Vp.call(this,r,t.name):"")}function hf(e){return z(kp||(kp=pf([' '," "," "])),e.elementId,e.name,e.description?z(Sp||(Sp=pf([' ',"
"])),Da(ce()(e.description||""))):"")}function vf(){if(!this.focusedElementId)return;const e=this.focusedElementId;let t,r=null,n=null,o=0;if(e.startsWith("overview")&&"true"===this.showInfo)t=Zp.call(this);else if("auth"===e&&"true"===this.allowAuthentication)t=_i.call(this);else if("servers"===e&&"true"===this.allowServerSelection)t=of.call(this);else if(e.startsWith("cmp--")&&"true"===this.showComponents)t=Jp.call(this);else if(e.startsWith("tag--"))n=this.resolvedSpec.tags.find(t=>t.elementId===e),t=n?ff.call(this,hf.call(this,n)):df.call(this);else{for(o=0;o"".concat(t.elementId)===e),!r);o+=1);if(r){sf(this.shadowRoot.getElementById("link-".concat(e)),"expand"),t=ff.call(this,Vp.call(this,r,n.name))}else t=df.call(this)}return t}function mf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gf(e){if(e.expanded)e.expanded=!1,window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0]));else{e.expanded=!0;const t="#".concat(e.elementId);window.location.hash!==t&&window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0]).concat(t))}this.requestUpdate()}function yf(e,t="expand-all"){const r=[...e.querySelectorAll(".section-tag")];"expand-all"===t?r.map(e=>{e.classList.replace("collapsed","expanded")}):r.map(e=>{e.classList.replace("expanded","collapsed")})}function bf(e,t="expand-all"){yf.call(this,e.target.closest(".operations-root"),t)}function xf(e){return z(Ap||(Ap=mf([' "])),t=>{gf.call(this,e,t)},e.method,e.deprecated?"deprecated":"",e.expanded?"expanded":"collapsed",e.method,e.deprecated?"deprecated":"",e.method,e.deprecated?"deprecated":"",e.path,e.deprecated?z(Op||(Op=mf([' deprecated ']))):"",Da(ce()(e.summary||"")))}function wf(e){const t=new Set;for(const n in e.responses)for(const o in null===(r=e.responses[n])||void 0===r?void 0:r.content){var r;t.add(o.trim())}const n=[...t].join(", "),o=this.resolvedSpec.securitySchemes.filter(t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some(e=>t.apiKeyId in e))})||[],a=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId&&"-"!==e.value);a&&o.push(a);const i=e.xCodeSamples?Fi(e.xCodeSamples):"";return z(Ep||(Ep=mf([' '])),e.method,e.deprecated?"deprecated":"",e.summary&&e.summary!==e.description?z(Dp||(Dp=mf(['',"
"])),e.summary):"",e.description?z(Cp||(Cp=mf([' ',"
"])),Da(ce()(e.description))):"",Ti.call(this,e.security),i,e.method,e.path,e.parameters,e.requestBody,o,e.servers,e.servers&&e.servers.length>0?e.servers[0].url:this.selectedServer.computedUrl,this.defaultSchemaTab,this.fillRequestFieldsWithExample,this.allowTry,n,this.renderStyle,this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,e.callbacks?Ri.call(this,e.callbacks):"",e.responses,this.defaultSchemaTab,this.renderStyle,this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,Object.keys(e.responses||{})[0]||"")}function kf(){return z(jp||(jp=mf([' Expand all | Collapse all sections
',""])),e=>bf(e,"expand-all"),e=>bf(e,"collapse-all"),this.resolvedSpec.tags.map(e=>z(_p||(_p=mf([' "])),e.expanded?"expanded":"collapsed",()=>{e.expanded=!e.expanded,this.requestUpdate()},e.elementId,e.name,Da(ce()(e.description||"")),e.paths.filter(e=>!this.matchPaths||Re(this.matchPaths,e)).map(e=>z(Tp||(Tp=mf([' '," ","
"])),e.elementId,e.method,e.expanded?"expanded":"collapsed",xf.call(this,e),e.expanded?wf.call(this,e):"")))))}function Sf(e){return z(Ip||(Ip=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([' '])),e)}function Af(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Of(){return z(Fp||(Fp=Af([' "])),Sf("height:36px;width:36px;margin-left:5px"),this.headingText,"false"===this.allowSpecUrlLoad?"":z(Pp||(Pp=Af([' ↩
'])),this.specUrl||"",this.onSepcUrlChange),"false"===this.allowSpecFileLoad?"":z(Rp||(Rp=Af([' LOCAL JSON FILE '])),this.specFile||"",this.onSepcFileChange,this.onFileLoadClick),"false"===this.allowSearch||"read focused".includes(this.renderStyle)?"":z(Bp||(Bp=Af([' ↩
'])),this.onSearchChange),"false"===this.allowSearch||"false"===this.allowAdvancedSearch||"read focused".includes(this.renderStyle)?"":z(Lp||(Lp=Af([' Advanced Search '])),this.onShowSearchModalClicked))}customElements.define("api-response",class extends ae{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="model"}static get properties(){return{callback:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"}}}static get styles(){return[he,ye,Ee,xe,me,Vi,ne(Ml||(Ml=Hp([".resp-head{vertical-align:middle;padding:16px 0 8px}.resp-head.divider{border-top:1px solid var(--border-color);margin-top:10px}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:calc(var(--font-size-small) + 1px);color:var(--light-fg)}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}.focused-mode,.read-mode{padding-top:24px;margin-top:12px;border-top:1px dashed var(--border-color)}"]))),Te]}render(){return z(ql||(ql=Hp([' "])),this.renderStyle,"true"===this.callback?"tiny-title":"req-res-title","true"===this.callback?"CALLBACK RESPONSE":"RESPONSE",this.responseTemplate())}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const r in this.responses){this.selectedStatus||(this.selectedStatus=r);const n={};for(const t in null===(e=this.responses[r])||void 0===e?void 0:e.content){var e;const o=this.responses[r].content[t];this.selectedMimeType||(this.selectedMimeType=t);const a=es(o.schema,{}),i=ts(o.examples||"",o.example||"",o.schema,t,!0,t.includes("json")?"json":"text");n[t]={description:this.responses[r].description,examples:i,selectedExample:i[0]?i[0].exampleId:"",schemaTree:a}}const o=[];for(const e in null===(t=this.responses[r])||void 0===t?void 0:t.headers){var t;o.push({name:e,...this.responses[r].headers[e]})}this.headersForEachRespStatus[r]=o,this.mimeResponsesForEachStatus[r]=n}return z(zl||(zl=Hp([" "," "," "])),Object.keys(this.responses).length>1?z(Ul||(Ul=Hp([' ',"
"])),Object.keys(this.responses).map(e=>z($l||($l=Hp([" ",""])),"$$ref"===e?"":z(Hl||(Hl=Hp([' '," "])),()=>{this.selectedStatus=e,this.responses[e].content&&Object.keys(this.responses[e].content)[0]?this.selectedMimeType=Object.keys(this.responses[e].content)[0]:this.selectedMimeType=void 0},this.selectedStatus===e?"primary":"",e)))):z(Wl||(Wl=Hp([""," "])),Object.keys(this.responses)[0]),Object.keys(this.responses).map(e=>{var t,r;return z(Vl||(Vl=Hp([' "])),e===this.selectedStatus?"block":"none",Da(ce()((null===(t=this.responses[e])||void 0===t?void 0:t.description)||"")),this.headersForEachRespStatus[e]&&(null===(r=this.headersForEachRespStatus[e])||void 0===r?void 0:r.length)>0?z(Yl||(Yl=Hp(["",""])),this.responseHeaderListTemplate(this.headersForEachRespStatus[e])):"",0===Object.keys(this.mimeResponsesForEachStatus[e]).length?"":z(Kl||(Kl=Hp([' "])),e=>{"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)},"model"===this.activeSchemaTab?"active":"","example"===this.activeSchemaTab?"active":"",1===Object.keys(this.mimeResponsesForEachStatus[e]).length?z(Gl||(Gl=Hp([' '," "])),Object.keys(this.mimeResponsesForEachStatus[e])[0]):z(Jl||(Jl=Hp(["",""])),this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))),"example"===this.activeSchemaTab?z(Ql||(Ql=Hp([' ',"
"])),this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])):z(Xl||(Xl=Hp([' ',"
"])),this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType]))))}))}responseHeaderListTemplate(e){return z(Zl||(Zl=Hp([' "])),e.map(e=>z(eu||(eu=Hp([' ',' ',' ','
'," "])),e.name,e.schema.type?e.schema.type:"",Da(ce()(e.description||"")),e.schema.example?e.schema.example:"")))}mimeTypeDropdownTemplate(e){return z(tu||(tu=Hp([' '," "])),e=>{this.selectedMimeType=e.target.value},e.map(e=>z(ru||(ru=Hp([' '," "])),e,e===this.selectedMimeType,e)))}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return e?z(ou||(ou=Hp([" "," "])),1===e.examples.length?z(au||(au=Hp([" ",""])),"json"===e.examples[0].exampleFormat?z(iu||(iu=Hp([' '])),this.renderStyle,e.examples[0].exampleValue,"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8"):z(su||(su=Hp([' '," "])),"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8",e.examples[0].exampleValue)):z(cu||(cu=Hp([' '," "," "])),"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8",e=>this.onSelectExample(e),e.examples.map(t=>z(lu||(lu=Hp([' '," "])),t.exampleId,t.exampleId===e.selectedExample,t.exampleSummary.length>80?t.exampleId:t.exampleSummary)),e.examples.map(t=>z(uu||(uu=Hp([' '," "," ","
"])),t.exampleId,t.exampleId===e.selectedExample?"block":"none",t.exampleSummary&&t.exampleSummary.length>80?z(pu||(pu=Hp([' ',"
"])),t.exampleSummary):"",t.exampleDescription?z(fu||(fu=Hp([' ',"
"])),Da(ce()(t.exampleDescription||""))):"","json"===t.exampleFormat?z(du||(du=Hp([' '])),this.renderStyle,t.exampleValue):z(hu||(hu=Hp([""," "])),t.exampleValue))))):z(nu||(nu=Hp([' No example provided '])),"read"===this.renderStyle?"read example-panel border pad-8-16":"example-panel border-top")}mimeSchemaTemplate(e){return e?z(mu||(mu=Hp([" ",""])),"table"===this.schemaStyle?z(gu||(gu=Hp([' '])),"read"===this.renderStyle?"border pad-8-16":"border-top",this.renderStyle,e.schemaTree,this.schemaExpandLevel,this.schemaDescriptionExpanded):z(yu||(yu=Hp([' '])),"read"===this.renderStyle?"border pad-8-16":"border-top",this.renderStyle,e.schemaTree,this.schemaExpandLevel,this.schemaDescriptionExpanded)):z(vu||(vu=Hp([' Schema not found '])),"read"===this.renderStyle?"border pad-8-16":"border-top")}});var Ef,Df,Cf,jf,_f=ne(Np||(Np=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([".dialog-box-overlay{background-color:var(--overlay-bg);position:fixed;left:0;top:0;width:100vw;height:100vh;overflow:hidden;z-index:var(--dialog-z-index)}.dialog-box{position:fixed;top:100px;left:50%;transform:translate(-50%,0);display:flex;flex-direction:column;width:70vw;background-color:var(--bg2);color:var(--fg2);border-radius:4px;max-height:500px;overflow:hidden;border:1px solid var(--border-color);box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.dialog-box-header{position:sticky;top:0;align-self:stretch;display:flex;align-items:center;padding:20px 16px;box-sizing:border-box;min-height:60px;max-height:60px;border-bottom:1px solid var(--light-border-color);overflow:hidden}.dialog-box-header button{font-size:1.5rem;font-weight:700;line-height:1;color:var(--fg);border:none;outline:0;background-color:transparent;cursor:pointer;border:1px solid transparent;border-radius:50%;margin-right:-8px}.dialog-box-header button:hover{border-color:var(--primary-color)}.dialog-box-content{padding:16px;display:block;overflow:auto;height:100%}.dialog-box-title{flex-grow:1;font-size:24px}"])));function Tf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function If(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ff(){var e;return document.addEventListener("close",()=>{this.showAdvancedSearchDialog=!1}),document.addEventListener("open",this.onOpenSearchDialog),z(Cf||(Cf=If([' '," "])),!!this.showAdvancedSearchDialog,e=>this.onAdvancedSearch(e,400),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),null===(e=this.advancedSearchMatches)||void 0===e?void 0:e.map(e=>z(jf||(jf=If([' '," ",' ',"
"])),e.deprecated?"filter:opacity(0.5);":"",e.elementId,e=>{this.matchPaths="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(e,!0)},e.method,e.method,e.path,e.summary)))}customElements.define("dialog-box",class extends ae{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[_f]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",e=>{"Escape"===e.code&&this.onClose()})}attributeChangedCallback(e,t,r){t!==r&&("heading"===e&&(this.heading=r),"show"===e&&(this.show=r,"true"===r&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(e,t,r)}render(){return z(Ef||(Ef=Tf([" ",""])),"true"===this.show?z(Df||(Df=Tf([' '])),this.heading,this.onClose):"")}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});var Pf,Rf,Bf,Lf,Nf,Mf,qf,zf,Uf,$f={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(e){if(0===e.indexOf("#")&&(e=e.slice(1,7)),3!==e.length&&4!==e.length||(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6!==e.length)throw new Error("Invalid HEX color.");return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}},luminanace(e){const t=this.getRgb(e);return.299*t.r+.587*t.g+.114*t.b},invert(e){return this.luminanace(e)>135?"#000":"#fff"},opacity(e,t){const r=this.getRgb(e);return"rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(t,")")},brightness(e,t){const r=this.getRgb(e);return r.r+=t,r.g+=t,r.b+=t,r.r>255?r.r=255:r.r<0&&(r.r=0),r.g>255?r.g=255:r.g<0&&(r.g=0),r.b>255?r.b=255:r.b<0&&(r.b=0),"#".concat(r.r.toString(16).padStart(2,"0")).concat(r.g.toString(16).padStart(2,"0")).concat(r.b.toString(16).padStart(2,"0"))},hasGoodContrast(e,t){return this.luminanace(e)-this.luminanace(t)}}};function Hf(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(e)}function Wf(e,t={}){let r={};const n=t.primaryColor?t.primaryColor:"#ff591e",o=$f.color.invert(n),a=$f.color.opacity(n,"0.8");if("dark"===e){const e=t.bg1?t.bg1:"#333",i=t.fg1?t.fg1:"#bbb",s=t.bg2?t.bg2:$f.color.brightness(e,5),c=t.bg3?t.bg3:$f.color.brightness(e,17),l=t.bg3?t.bg3:$f.color.brightness(e,35),u=t.fg2?t.fg2:$f.color.brightness(i,-15),p=t.fg3?t.fg3:$f.color.brightness(i,-20),f=t.fg3?t.fg3:$f.color.brightness(i,-65),d=t.inlineCodeFg?t.inlineCodeFg:"#cdcdcd",h="#bbb",v="#eee",m=t.headerColor?t.headerColor:$f.color.brightness(e,10),g=t.navBgColor?t.navBgColor:$f.color.brightness(e,10);r={bg1:e,bg2:s,bg3:c,lightBg:l,fg1:i,fg2:u,fg3:p,lightFg:f,inlineCodeFg:d,primaryColor:n,primaryColorTrans:a,primaryColorInvert:o,selectionBg:h,selectionFg:v,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:g,navBgImage:t.navBgImage||"",navBgImageSize:t.navBgImageSize,navBgImageRepeat:t.navBgImageRepeat,navTextColor:t.navTextColor?t.navTextColor:$f.color.opacity($f.color.invert(g),"0.65"),navHoverBgColor:t.navHoverBgColor?t.navHoverBgColor:$f.color.brightness(g,-15),navHoverTextColor:t.navHoverTextColor?t.navHoverTextColor:$f.color.invert(g),navAccentColor:t.navAccentColor?t.navAccentColor:$f.color.brightness(n,25),headerColor:m,headerColorInvert:$f.color.invert(m),headerColorDarker:$f.color.brightness(m,-20),headerColorBorder:$f.color.brightness(m,10),borderColor:t.borderColor?t.borderColor:$f.color.brightness(e,20),lightBorderColor:t.lightBorderColor?t.lightBorderColor:$f.color.brightness(e,15),codeBorderColor:t.codeBorderColor?t.codeBorderColor:$f.color.brightness(e,30),codeBg:t.codeBg?t.codeBg:$f.color.brightness(e,-10),codeFg:t.codeFg?t.codeFg:"#999",inputBg:t.inputBg?t.inputBg:$f.color.brightness(e,-5),placeHolder:t.placeHolder?t.placeHolder:$f.color.opacity(i,"0.3"),hoverColor:t.hoverColor?t.hoverColor:$f.color.brightness(e,-10),red:t.red?t.red:"#F06560",lightRed:t.lightRed?t.lightRed:$f.color.brightness(e,-10),green:t.green?t.green:"#99CC00",lightGreen:t.lightGreen?t.lightGreen:$f.color.brightness(e,-10),blue:t.blue?t.blue:"#47AFE8",lightBlue:t.lightBlue?t.lightBlue:$f.color.brightness(e,-10),orange:t.orange?t.orange:"#FF9900",lightOrange:t.lightOrange?t.lightOrange:$f.color.brightness(e,-10),yellow:t.yellow?t.yellow:"#827717",lightYellow:t.lightYellow?t.lightYellow:$f.color.brightness(e,-10),purple:t.purple?t.purple:"#786FF1",brown:t.brown?t.brown:"#D4AC0D"}}else{const e=t.bg1?t.bg1:"#ffffff",i=t.fg1?t.fg1:"#444444",s=t.bg2?t.bg2:$f.color.brightness(e,-5),c=t.bg3?t.bg3:$f.color.brightness(e,-15),l=t.bg3?t.bg3:$f.color.brightness(e,-45),u=t.fg2?t.fg2:$f.color.brightness(i,17),p=t.fg3?t.fg3:$f.color.brightness(i,30),f=t.fg3?t.fg3:$f.color.brightness(i,70),d=t.inlineCodeFg?t.inlineCodeFg:"brown",h="#444",v="#eee",m=t.headerColor?t.headerColor:$f.color.brightness(e,-180),g=t.navBgColor?t.navBgColor:$f.color.brightness(e,-180);r={bg1:e,bg2:s,bg3:c,lightBg:l,fg1:i,fg2:u,fg3:p,lightFg:f,inlineCodeFg:d,primaryColor:n,primaryColorTrans:a,primaryColorInvert:o,selectionBg:h,selectionFg:v,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:g,navBgImage:t.navBgImage||"",navBgImageSize:t.navBgImageSize||"",navBgImageRepeat:t.navBgImageRepeat,navTextColor:t.navTextColor?t.navTextColor:$f.color.opacity($f.color.invert(g),"0.65"),navHoverBgColor:t.navHoverBgColor?t.navHoverBgColor:$f.color.brightness(g,-15),navHoverTextColor:t.navHoverTextColor?t.navHoverTextColor:$f.color.invert(g),navAccentColor:t.navAccentColor?t.navAccentColor:$f.color.brightness(n,25),headerColor:m,headerColorInvert:$f.color.invert(m),headerColorDarker:$f.color.brightness(m,-20),headerColorBorder:$f.color.brightness(m,10),borderColor:t.borderColor?t.borderColor:$f.color.brightness(e,-38),lightBorderColor:t.lightBorderColor?t.lightBorderColor:$f.color.brightness(e,-23),codeBorderColor:t.codeBorderColor?t.codeBorderColor:"#transparent",codeBg:t.codeBg?t.codeBg:"#555",codeFg:t.codeFg?t.codeFg:"#ccc",inputBg:t.inputBg?t.inputBg:$f.color.brightness(e,10),placeHolder:t.placeHolder?t.placeHolder:$f.color.brightness(f,20),hoverColor:t.hoverColor?t.hoverColor:$f.color.brightness(e,-5),red:t.red?t.red:"#F06560",lightRed:t.lightRed?t.lightRed:"#fff0f0",green:t.green?t.green:"#48AD1A",lightGreen:t.lightGreen?t.lightGreen:"#fbfff0",blue:t.blue?t.blue:"#47AFE8",lightBlue:t.lightBlue?t.lightBlue:"#eff8fd",orange:t.orange?t.orange:"#FF9900",lightOrange:t.lightOrange?t.lightOrange:"#fff5e6",yellow:t.yellow?t.yellow:"#827717",lightYellow:t.lightYellow?t.lightYellow:"#fff5cc",purple:t.purple?t.purple:"#786FF1",brown:t.brown?t.brown:"#D4AC0D"}}return z(Pf||(Pf=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""])),this.layout||"row",this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace',this.regularFont||'rapidoc, "Open Sans", BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',"relaxed"===this.navItemSpacing?"10px":"compact"===this.navItemSpacing?"5px 10px":"7px 10px",this.responseAreaHeight,"default"===this.fontSize?"12px":"large"===this.fontSize?"13px":"14px","default"===this.fontSize?"13px":"large"===this.fontSize?"14px":"15px","default"===this.fontSize?"14px":"large"===this.fontSize?"15px":"16px",r.bg1,r.bg2,r.bg3,r.lightBg,r.fg1,r.fg2,r.fg3,r.lightFg,r.selectionBg,r.selectionFg,r.overlayBg,r.borderColor,r.lightBorderColor,r.codeBorderColor,r.codeBg,r.codeFg,r.inlineCodeFg,r.inputBg,r.placeHolder,r.hoverColor,r.red,r.lightRed,r.green,r.lightGreen,r.blue,r.lightBlue,r.orange,r.lightOrange,r.yellow,r.lightYellow,r.purple,r.brown,r.headerColor,r.headerColorInvert,r.headerColorDarker,r.headerColorBorder,r.navBgColor,r.navBgImage,r.navBgImageSize||"contain",r.navBgImageRepeat||"no-repeat",r.navTextColor,r.navHoverBgColor,r.navHoverTextColor,r.navAccentColor,r.primaryColor,r.primaryColorInvert,r.primaryColorTrans)}function Vf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Yf(){const e={bg1:Hf(this.bgColor)?this.bgColor:"",fg1:Hf(this.textColor)?this.textColor:"",headerColor:Hf(this.headerColor)?this.headerColor:"",primaryColor:Hf(this.primaryColor)?this.primaryColor:"",navBgColor:Hf(this.navBgColor)?this.navBgColor:"",navBgImage:this.navBgImage||"",navBgImageSize:this.navBgImageSize,navBgImageRepeat:this.navBgImageRepeat,navTextColor:Hf(this.navTextColor)?this.navTextColor:"",navHoverBgColor:Hf(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:Hf(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:Hf(this.navAccentColor)?this.navAccentColor:""};return z(Rf||(Rf=Vf([" "," "," ",' '])),"dark"===this.theme?Wf.call(this,"dark",e):Wf.call(this,"light",e),"false"===this.showHeader?"":Of.call(this),"false"===this.allowAdvancedSearch?"":Ff.call(this),"read"!==this.renderStyle&&"focused"!==this.renderStyle||"true"!==this.showSideNav||!this.resolvedSpec?"":uf.call(this),this.renderStyle,!0===this.loading?z(Bf||(Bf=Vf(['
']))):z(Lf||(Lf=Vf([" ",""])),!0===this.loadFailed?z(Nf||(Nf=Vf([' Unable to load the Spec
']))):z(Mf||(Mf=Vf([' ',"
"])),e=>{this.handleHref(e)},"focused"===this.renderStyle?z(qf||(qf=Vf(["",""])),vf.call(this)):z(zf||(zf=Vf([" "," "," "," "," "])),"true"===this.showInfo?Zp.call(this):"","true"===this.allowServerSelection?of.call(this):"","true"===this.allowAuthentication?_i.call(this):"","read"===this.renderStyle?Yp.call(this):kf.call(this)))))}function Kf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}class Gf extends ae{constructor(){super();const e={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.isIntersectionObserverActive=!0,this.intersectionObserver=new IntersectionObserver(e=>{this.onIntersect(e)},e)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},showComponents:{type:String,attribute:"show-components"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},navBgColor:{type:String,attribute:"nav-bg-color"},navBgImage:{type:String,attribute:"nav-bg-image"},navBgImageSize:{type:String,attribute:"nav-bg-image-size"},navBgImageRepeat:{type:String,attribute:"nav-bg-image-repeat"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},matchPaths:{type:String,attribute:"match-paths"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object}}}static get styles(){return[he,me,ye,xe,ke,Ae,Ee,Ce,_e,ne(Uf||(Uf=Kf([":host{--border-radius:2px;display:flex;flex-direction:column;min-width:360px;width:100%;height:100%;margin:0;padding:0;overflow:hidden;letter-spacing:normal;color:var(--fg);background-color:var(--bg);font-family:var(--font-regular)}.body{display:flex;height:100%;width:100%;box-sizing:border-box;overflow:hidden}.main-content{margin:0;padding:0;display:block;flex:1;height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--border-color) transparent}.main-content-inner--view-mode{padding:0 16px}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background-color:var(--border-color)}.section-gap.section-tag{border-bottom:1px solid var(--border-color)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{padding:0 4px}.section-tag-header{position:relative;cursor:n-resize;padding:12px 0}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right,rgba(0,0,0,0),var(--border-color),rgba(0,0,0,0))}.section-tag-header:hover::after{position:absolute;margin-left:-24px;font-size:20px;top:calc(50% - 14px);color:var(--primary-color);content:'⬆'}.collapsed .section-tag-header::after{position:absolute;margin-left:-24px;font-size:20px;top:calc(50% - 14px);color:var(--border-color);content:'⬇'}.collapsed .section-tag-header:hover::after{color:var(--primary-color)}.collapsed .section-tag-body{display:none}.logo{height:36px;width:36px;margin-left:5px}.only-large-screen,.only-large-screen-flex{display:none}.header-title{font-size:calc(var(--title-font-size) + 8px);padding:0 8px}.tag.title{text-transform:uppercase}.header{background-color:var(--header-bg);color:var(--header-fg);box-sizing:border-box;width:100%}input.header-input{background:var(--header-color-darker);color:var(--header-fg);border:1px solid var(--header-color-border);flex:1;padding-right:24px;border-radius:3px}input.header-input::placeholder{opacity:.4}.loader{margin:16px auto 16px auto;border:4px solid var(--bg3);border-radius:50%;border-top:4px solid var(--primary-color);width:36px;height:36px;animation:spin 2s linear infinite}.expanded-endpoint-body{position:relative;padding:6px 0}.expanded-endpoint-body.deprecated{filter:opacity(.6)}.divider{border-top:2px solid var(--primary-color);margin:24px 0;width:100%}.tooltip{cursor:pointer;border:1px solid var(--border-color);border-left-width:4px;margin-left:2px}.tooltip-text{color:var(--fg2);background-color:var(--bg2);visibility:hidden;overflow-wrap:break-word}.tooltip:hover{color:var(--primary-color);border-color:var(--primary-color)}.tooltip:hover .tooltip-text{visibility:visible;opacity:1}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media only screen and (min-width:768px){.nav-bar{width:260px;display:flex}.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 24px}.section-gap--focused-mode{padding:24px}.section-gap--read-mode{padding:48px 24px 24px 24px}.endpoint-body{position:relative;padding:36px 0 48px 0}}@media only screen and (min-width:1000px){.nav-bar{width:",";display:flex}.section-gap--focused-mode{padding:12px 100px 12px 100px}.section-gap--read-mode{padding:24px 100px 12px 100px}}"])),re("default"===this.fontSize?"300px":"large"===this.fontSize?"315px":"330px")),Te]}connectedCallback(){super.connectedCallback(),this.renderStyle&&"read, view, focused,".includes("".concat(this.renderStyle,","))||(this.renderStyle="view"),this.schemaStyle&&"tree, table,".includes("".concat(this.schemaStyle,","))||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes("".concat(this.theme,","))||(this.theme="light"),this.defaultSchemaTab&&"example, model,".includes("".concat(this.defaultSchemaTab,","))||(this.defaultSchemaTab="model"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes("".concat(this.schemaDescriptionExpanded,","))||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes("".concat(this.fillRequestFieldsWithExample,","))||(this.fillRequestFieldsWithExample="true"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowSearch&&"true, false,".includes("".concat(this.allowSearch,","))||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes("".concat(this.allowAdvancedSearch,","))||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes("".concat(this.allowTry,","))||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes("".concat(this.sortTags,","))||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes("".concat(this.sortEndpointsBy,","))||(this.sortEndpointsBy="path"),this.navItemSpacing&&"compact, relaxed, default,".includes("".concat(this.navItemSpacing,","))||(this.navItemSpacing="default"),this.usePathInNavBar&&"true, false,".includes("".concat(this.usePathInNavBar,","))||(this.usePathInNavBar="false"),this.fontSize&&"default, large, largest,".includes("".concat(this.fontSize,","))||(this.fontSize="default"),this.showInfo&&"true, false,".includes("".concat(this.showInfo,","))||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes("".concat(this.allowServerSelection,","))||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes("".concat(this.allowAuthentication,","))||(this.allowAuthentication="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes("".concat(this.infoDescriptionHeadingsInNavBar,","))||(this.infoDescriptionHeadingsInNavBar="false"),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),ce.a.setOptions({highlight:(e,t)=>ue.a.languages[t]?ue.a.highlight(e,ue.a.languages[t],t):e}),window.addEventListener("hashchange",()=>{this.scrollTo(window.location.hash.substring(1))},!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const e=new ce.a.Renderer;return e.heading=(e,t,r,n)=>"').concat(e," "),e}render(){return Yf.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,r){if("spec-url"===e&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollTo(this.gotoPath)},0),"render-style"===e&&("read"===r?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect()),"api-key-name"===e||"api-key-location"===e||"api-key-value"===e){let t=!1,n="",o="",a="";if("api-key-name"===e?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(n=r,o=this.getAttribute("api-key-location"),a=this.getAttribute("api-key-value"),t=!0):"api-key-location"===e?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(o=r,n=this.getAttribute("api-key-name"),a=this.getAttribute("api-key-value"),t=!0):"api-key-value"===e&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(a=r,o=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-name"),t=!0),t&&this.resolvedSpec){const e=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId);e?(e.name=n,e.in=o,e.value=a,e.finalKeyValue=a):this.resolvedSpec.securitySchemes.push({apiKeyId:"_rapidoc_api_key",description:"api-key provided in rapidoc element attributes",type:"apiKey",name:n,in:o,value:a,finalKeyValue:a}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSepcUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSepcFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const t=e.target.files[0],r=new FileReader;r.onload=()=>{try{const e=JSON.parse(r.result);this.loadSpec(e),this.shadowRoot.getElementById("spec-url").value=""}catch(e){console.error("RapiDoc: Unable to read or parse json")}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){this.matchPaths=e.target.value,this.resolvedSpec.tags.forEach(e=>e.paths.filter(t=>{this.matchPaths&&Re(this.matchPaths,t)&&(e.expanded=!0)})),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.matchPaths=""}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(e){const t=e.detail.querySelector("input");await Fe(0),t&&t.focus()}async loadSpec(e){if(e){this.matchPaths="";try{this.resolvedSpec=null,this.loading=!0,this.loadFailed=!1;const t=await Oa(e,"true"===this.sortTags,this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"));this.loading=!1,null==t&&console.error("Unable to resolve the API spec. "),this.afterSpecParsedAndValidated(t)}catch(e){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error("RapiDoc: Unable to resolve the API spec.. ".concat(e.message))}}}async afterSpecParsedAndValidated(e){var t;this.resolvedSpec=e,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(e=>e.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();const r=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(r),this.intersectionObserver.disconnect(),"read"===this.renderStyle&&(await Fe(100),this.observeExpandedContent());const n=null===(t=window.location.hash)||void 0===t?void 0:t.substring(1);if(n)"view"===this.renderStyle?this.expandAndGotoOperation(n,!0,!0):"focused"===this.renderStyle&&this.scrollTo(n);else if("focused"===this.renderStyle){var o;const e=this.showInfo?"overview":null===(o=this.resolvedSpec.tags[0])||void 0===o?void 0:o.paths[0];this.scrollTo(e)}}expandAndGotoOperation(e,t=!0){let r=!0;const n=-1===e.indexOf("#")?e:e.substring(1);if(n.startsWith("overview")||"servers"===n||"auth"===n)r=!1;else for(let t=0;t<(null===(o=this.resolvedSpec.tags)||void 0===o?void 0:o.length);t++){var o,a;const n=this.resolvedSpec.tags[t],i=null===(a=n.paths)||void 0===a?void 0:a.find(t=>t.elementId===e);i&&(i.expanded&&n.expanded?r=!1:(i.expanded=!0,n.expanded=!0))}t&&(r&&this.requestUpdate(),window.setTimeout(()=>{const e=this.shadowRoot.getElementById(n);e&&(e.scrollIntoView({behavior:"auto",block:"start"}),window.history.replaceState(null,null,"#".concat(n)))},r?150:0))}isValidTopId(e){return e.startsWith("overview")||"servers"===e||"auth"===e}isValidPathId(e){var t,r;return!("overview"!==e||!this.showInfo)||(!("servers"!==e||!this.allowServerSelection)||(!("auth"!==e||!this.allowAuthentication)||(e.startsWith("tag--")?null===(r=this.resolvedSpec.tags)||void 0===r?void 0:r.find(t=>t.elementId===e):null===(t=this.resolvedSpec.tags)||void 0===t?void 0:t.find(t=>t.paths.find(t=>t.elementId===e)))))}onIntersect(e){!1!==this.isIntersectionObserverActive&&e.forEach(e=>{if(e.isIntersecting&&e.intersectionRatio>0){const t=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active"),r=this.shadowRoot.getElementById("link-".concat(e.target.id));r&&(window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0],"#").concat(e.target.id)),r.scrollIntoView({behavior:"auto",block:"center"}),r.classList.add("active")),t&&t.classList.remove("active")}})}handleHref(e){if("a"===e.target.tagName.toLowerCase()&&e.target.getAttribute("href").startsWith("#")){const t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}async scrollToEventTarget(e,t=!0){const r=e.currentTarget;r.dataset.contentId&&(this.isIntersectionObserverActive=!1,this.scrollTo(r.dataset.contentId,!0,t),setTimeout(()=>{this.isIntersectionObserverActive=!0},300))}async scrollTo(e,t=!0,r=!0){if("focused"===this.renderStyle&&(this.focusedElementId=e,await Fe(0)),"view"===this.renderStyle)this.expandAndGotoOperation(e,t,!0);else{let t=!1;const n=this.shadowRoot.getElementById(e);if(n?(t=!0,("read"===this.renderStyle||e.startsWith("overview"))&&n.scrollIntoView({behavior:"auto",block:"start"})):t=!1,t){if("focused"===this.renderStyle){const e=this.shadowRoot.querySelector("api-request");e&&e.resetRequestBodySelection();const t=this.shadowRoot.querySelector("api-response");t&&t.resetSelection()}window.history.replaceState(null,null,"#".concat(e));const t=this.shadowRoot.getElementById("link-".concat(e));if(t){r&&t.scrollIntoView({behavior:"auto",block:"center"}),await Fe(0);const e=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active");e&&e.classList.remove("active"),t.classList.add("active")}}}}onAdvancedSearch(e,t){const r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let e;e="text"===r.type?r:r.closest(".advanced-search-options").querySelector("input[type=text]");const t=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map(e=>e.id);this.advancedSearchMatches=function(e,t,r=[]){if(!e.trim()||0===r.length)return;const n=[];return t.forEach(t=>{t.paths.forEach(t=>{let o="";var a;(r.includes("search-api-path")&&(o=t.path),r.includes("search-api-descr")&&(o="".concat(o," ").concat(t.summary||t.description||"")),r.includes("search-api-params"))&&(o="".concat(o," ").concat((null===(a=t.parameters)||void 0===a?void 0:a.map(e=>e.name).join(" "))||""));if(r.includes("search-api-request-body")&&t.requestBody){let e=new Set;for(const r in null===(i=t.requestBody)||void 0===i?void 0:i.content){var i,s,c;if(null!==(s=t.requestBody.content[r].schema)&&void 0!==s&&s.properties)e=Be(null===(c=t.requestBody.content[r].schema)||void 0===c?void 0:c.properties);o="".concat(o," ").concat([...e].join(" "))}}r.includes("search-api-resp-descr")&&(o="".concat(o," ").concat(Object.values(t.responses).map(e=>e.description||"").join(" "))),o.toLowerCase().includes(e.trim().toLowerCase())&&n.push({elementId:t.elementId,method:t.method,path:t.path,summary:t.summary||t.description||"",deprecated:t.deprecated})})}),n}(e.value,this.resolvedSpec.tags,t)},t)}}customElements.define("rapi-doc",Gf);class Jf extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",e=>this.receiveStorage(e),!0)}receiveAuthParms(){let e={};if(document.location.search){const t=new URLSearchParams(document.location.search);e={code:t.get("code"),error:t.get("error"),state:t.get("state"),responseType:"code"}}else if(window.location.hash){e={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"}}window.opener?window.opener.postMessage(e,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(e))}relayAuthParams(e){if(window.parent&&"rapidoc-oauth-data"===e.key){const t=JSON.parse(e.newValue);window.parent.postMessage(t,this.target)}}parseQueryString(e,t){const r=e.split("&");for(let e=0;et+1&&(l=s-1),this.node){if(d){var v=e.parent.items||e.parent.contents;v&&v.push(d)}f.length&&Array.prototype.push.apply(this.props,f),l=this.node.range.end}else if(p){var m=f[0];this.props.push(m),l=m.end}else l=n.b.endOfLine(a,t+1);var g=this.node?this.node.valueRange.end:l;return this.valueRange=new n.d(t,g),l}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,r=this.range,o=this.value;if(null!=o)return o;var a=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return n.b.addStringTerminator(e,r.end,a)}},{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}}]),r}(n.b),i=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.call(this,n.e.COMMENT)}return Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var r=this.parseComment(t);return this.range=new n.d(t,r),r}}]),r}(n.b);function s(e){for(var t=e;t instanceof a;)t=t.node;if(!(t instanceof c))return null;for(var r=t.items.length,o=-1,i=r-1;i>=0;--i){var s=t.items[i];if(s.type===n.e.COMMENT){var l=s.context,u=l.indent,p=l.lineStart;if(u>0&&s.range.start>=p+u)break;o=i}else{if(s.type!==n.e.BLANK_LINE)break;o=i}}if(-1===o)return null;for(var f=t.items.splice(o,r-o),d=f[0].range.start;t.range.end=d,t.valueRange&&t.valueRange.end>d&&(t.valueRange.end=d),t!==e;)t=t.context.parent;return f}var c=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(e){var o;Object(n.j)(this,r),o=t.call(this,e.type===n.e.SEQ_ITEM?n.e.SEQ:n.e.MAP);for(var a=e.props.length-1;a>=0;--a)if(e.props[a].start=a+o||("#"===i||"\n"===i)&&r.nextContentHasIndent(e,t,o))}}]),Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var a=e.parseNode,c=e.src,l=n.b.startOfLine(c,t),u=this.items[0];u.context.parent=this,this.valueRange=n.d.copy(u.valueRange);for(var p=u.range.start-u.context.lineStart,f=t,d=c[f=n.b.normalizeOffset(c,f)],h=n.b.endOfWhiteSpace(c,l)===f,v=!1;d;){for(;"\n"===d||"#"===d;){if(h&&"\n"===d&&!v){var m=new o;if(f=m.parse({src:c},f),this.valueRange.end=f,f>=c.length){d=null;break}this.items.push(m),f-=1}else if("#"===d){if(f=c.length){d=null;break}}if(l=f+1,f=n.b.endOfIndent(c,l),n.b.atBlank(c,f)){var y=n.b.endOfWhiteSpace(c,f),b=c[y];b&&"\n"!==b&&"#"!==b||(f=y)}d=c[f],h=!0}if(!d)break;if(f!==l+p&&(h||":"!==d)){if(ft&&(f=l);break}if(!this.error){this.error=new n.f(this,"All collection items must start at the same column")}}if(u.type===n.e.SEQ_ITEM){if("-"!==d){l>t&&(f=l);break}}else if("-"===d&&!this.error){var x=c[f+1];if(!x||"\n"===x||"\t"===x||" "===x){this.error=new n.f(this,"A collection cannot be both a mapping and a sequence")}}var w=a({atLineStart:h,inCollection:!0,indent:p,lineStart:l,parent:this},f);if(!w)return f;if(this.items.push(w),this.valueRange.end=w.valueRange.end,d=c[f=n.b.normalizeOffset(c,w.range.end)],h=!1,v=w.includesTrailingLines,d){for(var k=f-1,S=c[k];" "===S||"\t"===S;)S=c[--k];"\n"===S&&(l=k+1,h=!0)}var A=s(w);A&&Array.prototype.push.apply(this.items,A)}return f}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){t=r.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,o=this.value;if(null!=o)return o;for(var a=e.slice(r.start,t[0].range.start)+String(t[0]),i=1;i0}}]),r}(n.b),l=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){var e;return Object(n.j)(this,r),(e=t.call(this,n.e.DIRECTIVE)).name=null,e}return Object(n.i)(r,[{key:"parseName",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"\t"!==n&&" "!==n;)n=t[r+=1];return this.name=t.slice(e,r),r}},{key:"parseParameters",value:function(e){for(var t=this.context.src,r=e,o=t[r];o&&"\n"!==o&&"#"!==o;)o=t[r+=1];return this.valueRange=new n.d(e,r),r}},{key:"parse",value:function(e,t){this.context=e;var r=this.parseName(t+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new n.d(t,r),r}},{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}}]),r}(n.b),u=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){var e;return Object(n.j)(this,r),(e=t.call(this,n.e.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return Object(n.i)(r,null,[{key:"startCommentOrEndBlankLine",value:function(e,t){var r=n.b.endOfWhiteSpace(e,t),o=e[r];return"#"===o||"\n"===o?r:t}}]),Object(n.i)(r,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var a=!0,s=!1,c=e;!n.b.atDocumentBoundary(t,c,n.a.DIRECTIVES_END);)switch(t[c=r.startCommentOrEndBlankLine(t,c)]){case"\n":if(a){var u=new o;(c=u.parse({src:t},c))0&&(this.contents=this.directives,this.directives=[]),c}return t[c]?(this.directivesEndMarker=new n.d(c,c+3),c+3):(s?this.error=new n.n(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),c)}},{key:"parseContents",value:function(e){var t=this.context,a=t.parseNode,c=t.src;this.contents||(this.contents=[]);for(var l=e;"-"===c[l-1];)l-=1;var u=n.b.endOfWhiteSpace(c,e),p=l===e;for(this.valueRange=new n.d(u);!n.b.atDocumentBoundary(c,u,n.a.DOCUMENT_END);){switch(c[u]){case"\n":if(p){var f=new o;(u=f.parse({src:c},u))0&&((t.length>0||e[0].type===n.e.COMMENT)&&(o+="---\n"),o+=e.join("")),"\n"!==o[o.length-1]&&(o+="\n"),o}}]),r}(n.b),p=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.apply(this,arguments)}return Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var r=e.src,o=n.b.endOfIdentifier(r,t+1);return this.valueRange=new n.d(t+1,o),o=n.b.endOfWhiteSpace(r,o),o=this.parseComment(o)}}]),r}(n.b),f="CLIP",d="KEEP",h="STRIP",v=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(e,o){var a;return Object(n.j)(this,r),(a=t.call(this,e,o)).blockIndent=null,a.chomping=f,a.header=null,a}return Object(n.i)(r,[{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,r=e+1,o="";;){var a=t[r];switch(a){case"-":this.chomping=h;break;case"+":this.chomping=d;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o+=a;break;default:return this.blockIndent=Number(o)||null,this.header=new n.d(e,r),r}r+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,o=t.src,a=!!this.blockIndent,i=e,s=e,c=1,l=o[i];"\n"===l&&(i+=1,!n.b.atDocumentBoundary(o,i));l=o[i]){var u=n.b.endOfBlockIndent(o,r,i);if(null===u)break;var p=o[u],f=u-(i+r);if(this.blockIndent){if(p&&"\n"!==p&&fc&&(c=f);i="\n"===o[u]?u:s=n.b.endOfLine(o,u)}return this.chomping!==d&&(i=o[s]?s+1:s),this.valueRange=new n.d(e+1,i),i}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,o=this.parseBlockHeader(t);return o=n.b.endOfWhiteSpace(r,o),o=this.parseComment(o),o=this.parseBlockValue(o)}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}},{key:"includesTrailingLines",get:function(){return this.chomping===d}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end,o=this.context,a=o.indent,i=o.src;if(this.valueRange.isEmpty())return"";for(var s=null,c=i[r-1];"\n"===c||"\t"===c||" "===c;){if((r-=1)<=t){if(this.chomping===d)break;return""}"\n"===c&&(s=r),c=i[r-1]}var l=r+1;s&&(this.chomping===d?(l=s,r=this.valueRange.end):r=s);for(var u=a+this.blockIndent,p=this.type===n.e.BLOCK_FOLDED,f=!0,v="",m="",g=!1,y=t;y0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===n.e.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,a=e.src,s=e.indent,c=e.lineStart,l=a[t];this.items=[{char:l,offset:t}];var u=n.b.endOfWhiteSpace(a,t+1);for(l=a[u];l&&"]"!==l&&"}"!==l;){switch(l){case"\n":if(c=u+1,"\n"===a[n.b.endOfWhiteSpace(a,c)]){var p=new o;c=p.parse({src:a},c),this.items.push(p)}if((u=n.b.endOfIndent(a,c))<=c+s&&(l=a[u],ur.offset);)++o;r.origOffset=r.offset+o,t=o}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,o=this.value;if(null!=o)return o;var a=t.filter((function(e){return e instanceof n.b})),i="",s=r.start;return a.forEach((function(t){var r=e.slice(s,t.range.start);s=t.range.end,"\n"===(i+=r+String(t))[i.length-1]&&"\n"!==e[s-1]&&"\n"===e[s]&&(s+=1)})),i+=e.slice(s,r.end),n.b.addStringTerminator(e,r.end,i)}}]),r}(n.b),g=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.apply(this,arguments)}return Object(n.i)(r,[{key:"parseCharCode",value:function(e,t,r){var o=this.context.src,a=o.substr(e,t),i=a.length===t&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;return isNaN(i)?(r.push(new n.f(this,"Invalid escape sequence ".concat(o.substr(e-2,t+2)))),o.substr(e-2,t+2)):String.fromCodePoint(i)}},{key:"parse",value:function(e,t){this.context=e;var o=e.src,a=r.endOfQuote(o,t+1);return this.valueRange=new n.d(t,a),a=n.b.endOfWhiteSpace(o,a),a=this.parseComment(a)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,o=t.end,a=this.context,i=a.indent,s=a.src;'"'!==s[o-1]&&e.push(new n.f(this,'Missing closing "quote'));for(var c="",l=r+1;lf?s.slice(f,l+1):u)}else c+=u}return e.length>0?{errors:e,str:c}:c}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r&&'"'!==r;)r=e[t+="\\"===r?2:1];return t+1}}]),r}(n.b),y=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.apply(this,arguments)}return Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var o=e.src,a=r.endOfQuote(o,t+1);return this.valueRange=new n.d(t,a),a=n.b.endOfWhiteSpace(o,a),a=this.parseComment(a)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,o=t.end,a=this.context,i=a.indent,s=a.src;"'"!==s[o-1]&&e.push(new n.f(this,"Missing closing 'quote"));for(var c="",l=r+1;lf?s.slice(f,l+1):u)}else c+=u}return e.length>0?{errors:e,str:c}:c}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r;)if("'"===r){if("'"!==e[t+1])break;r=e[t+=2]}else r=e[t+=1];return t+1}}]),r}(n.b);function b(e,t){switch(e){case n.e.ALIAS:return new p(e,t);case n.e.BLOCK_FOLDED:case n.e.BLOCK_LITERAL:return new v(e,t);case n.e.FLOW_MAP:case n.e.FLOW_SEQ:return new m(e,t);case n.e.MAP_KEY:case n.e.MAP_VALUE:case n.e.SEQ_ITEM:return new a(e,t);case n.e.COMMENT:case n.e.PLAIN:return new n.c(e,t);case n.e.QUOTE_DOUBLE:return new g(e,t);case n.e.QUOTE_SINGLE:return new y(e,t);default:return null}}var x=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.atLineStart,i=o.inCollection,s=o.inFlow,l=o.indent,u=o.lineStart,p=o.parent;Object(n.j)(this,e),Object(n.l)(this,"parseNode",(function(r,o){if(n.b.atDocumentBoundary(t.src,o))return null;var a=new e(t,r),i=a.parseProps(o),s=i.props,l=i.type,u=i.valueStart,p=b(l,s),f=p.parse(a,u);if(p.range=new n.d(o,f),f<=o&&(p.error=new Error("Node#parse consumed no characters"),p.error.parseEnd=f,p.error.source=p,p.range.end=o+1),a.nodeStartsCollection(p)){p.error||a.atLineStart||a.parent.type!==n.e.DOCUMENT||(p.error=new n.f(p,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var d=new c(p);return f=d.parse(new e(a),f),d.range=new n.d(o,f),d}return p})),this.atLineStart=null!=a?a:r.atLineStart||!1,this.inCollection=null!=i?i:r.inCollection||!1,this.inFlow=null!=s?s:r.inFlow||!1,this.indent=null!=l?l:r.indent,this.lineStart=null!=u?u:r.lineStart,this.parent=null!=p?p:r.parent||{},this.root=r.root,this.src=r.src}return Object(n.i)(e,null,[{key:"parseType",value:function(e,t,r){switch(e[t]){case"*":return n.e.ALIAS;case">":return n.e.BLOCK_FOLDED;case"|":return n.e.BLOCK_LITERAL;case"{":return n.e.FLOW_MAP;case"[":return n.e.FLOW_SEQ;case"?":return!r&&n.b.atBlank(e,t+1,!0)?n.e.MAP_KEY:n.e.PLAIN;case":":return!r&&n.b.atBlank(e,t+1,!0)?n.e.MAP_VALUE:n.e.PLAIN;case"-":return!r&&n.b.atBlank(e,t+1,!0)?n.e.SEQ_ITEM:n.e.PLAIN;case'"':return n.e.QUOTE_DOUBLE;case"'":return n.e.QUOTE_SINGLE;default:return n.e.PLAIN}}}]),Object(n.i)(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,r=this.inFlow,o=this.src;if(t||r)return!1;if(e instanceof a)return!0;var i=e.range.end;return"\n"!==o[i]&&"\n"!==o[i-1]&&":"===o[i=n.b.endOfWhiteSpace(o,i)]}},{key:"parseProps",value:function(t){for(var r=this.inFlow,o=this.parent,a=this.src,i=[],s=!1,c=a[t=this.atLineStart?n.b.endOfIndent(a,t):n.b.endOfWhiteSpace(a,t)];c===n.a.ANCHOR||c===n.a.COMMENT||c===n.a.TAG||"\n"===c;){if("\n"===c){var l=t+1,u=n.b.endOfIndent(a,l),p=u-(l+this.indent),f=o.type===n.e.SEQ_ITEM&&o.context.atLineStart;if(!n.b.nextNodeIsIndented(a[u],p,!f))break;this.atLineStart=!0,this.lineStart=l,s=!1,t=u}else if(c===n.a.COMMENT){var d=n.b.endOfLine(a,t+1);i.push(new n.d(t,d)),t=d}else{var h=n.b.endOfIdentifier(a,t+1);c===n.a.TAG&&","===a[h]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(a.slice(t+1,h+13))&&(h=n.b.endOfIdentifier(a,h+5)),i.push(new n.d(t,h)),s=!0,t=n.b.endOfWhiteSpace(a,h)}c=a[t]}return s&&":"===c&&n.b.atBlank(a,t+1,!0)&&(t-=1),{props:i,type:e.parseType(a,t,r),valueStart:t}}}]),e}();function w(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,r){return e.length>1&&t.push(r),"\n"})));var r=[],n=0;do{var o=new u,a=new x({src:e});n=o.parse(a,n),r.push(o)}while(n=0?r+n.toString(t):Object(k.r)(e)}var T={identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new k.f(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:k.t,stringify:function(){return k.t.nullStr}},I={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:k.h,stringify:function(e){return e.value?k.h.trueStr:k.h.falseStr}},F={identify:function(e){return C(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return j(e,t,8)},options:k.p,stringify:function(e){return _(e,8,"0o")}},P={identify:C,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return j(e,e,10)},options:k.p,stringify:k.r},R={identify:function(e){return C(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return j(e,t,16)},options:k.p,stringify:function(e){return _(e,16,"0x")}},B={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:k.r},L={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},N={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,r){var n=t||r,o=new k.f(parseFloat(e));return n&&"0"===n[n.length-1]&&(o.minFractionDigits=n.length),o},stringify:k.r},M=D.concat([T,I,F,P,R,B,L,N]),q=function(e){return"bigint"==typeof e||Number.isInteger(e)},z=function(e){var t=e.value;return JSON.stringify(t)},U=[A,O,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:k.q,stringify:z},{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new k.f(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:z},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:z},{identify:q,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return k.p.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return q(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:z}];U.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var $=function(e){return e.value?k.h.trueStr:k.h.falseStr},H=function(e){return"bigint"==typeof e||Number.isInteger(e)};function W(e,t,r){var n=t.replace(/_/g,"");if(k.p.asBigInt){switch(r){case 2:n="0b".concat(n);break;case 8:n="0o".concat(n);break;case 16:n="0x".concat(n)}var o=BigInt(n);return"-"===e?BigInt(-1)*o:o}var a=parseInt(n,r);return"-"===e?-1*a:a}function V(e,t,r){var n=e.value;if(H(n)){var o=n.toString(t);return n<0?"-"+r+o.substr(1):r+o}return Object(k.r)(e)}var Y=D.concat([{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new k.f(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:k.t,stringify:function(){return k.t.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:k.h,stringify:$},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:k.h,stringify:$},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,r){return W(t,r,2)},stringify:function(e){return V(e,2,"0b")}},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,r){return W(t,r,8)},stringify:function(e){return V(e,8,"0")}},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,r){return W(t,r,10)},stringify:k.r},{identify:H,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,r){return W(t,r,16)},stringify:function(e){return V(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:k.r},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var r=new k.f(parseFloat(e.replace(/_/g,"")));if(t){var n=t.replace(/_/g,"");"0"===n[n.length-1]&&(r.minFractionDigits=n.length)}return r},stringify:k.r}],S.b,S.e,S.f,S.g,S.d,S.c,S.h),K={core:M,failsafe:D,json:U,yaml11:Y},G={binary:S.b,bool:I,float:N,floatExp:L,floatNaN:B,floatTime:S.c,int:P,intHex:R,intOct:F,intTime:S.d,map:A,null:T,omap:S.e,pairs:S.f,seq:O,set:S.g,timestamp:S.h};function J(e,t,r){if(e instanceof k.d)return e;var o=r.defaultPrefix,a=r.onTagObj,i=r.prevObjects,s=r.schema,c=r.wrapScalars;t&&t.startsWith("!!")&&(t=o+t.slice(2));var l=function(e,t,r){if(t){var n=r.filter((function(e){return e.tag===t})),o=n.find((function(e){return!e.format}))||n[0];if(!o)throw new Error("Tag ".concat(t," not found"));return o}return r.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,s.tags);if(!l){if("function"==typeof e.toJSON&&(e=e.toJSON()),"object"!==Object(n.h)(e))return c?new k.f(e):e;l=e instanceof Map?A:e[Symbol.iterator]?O:A}a&&(a(l),delete r.onTagObj);var u={};if(e&&"object"===Object(n.h)(e)&&i){var p=i.get(e);if(p){var f=new k.a(p);return r.aliasNodes.push(f),f}u.value=e,i.set(e,u)}return u.node=l.createNode?l.createNode(r.schema,e,r):c?new k.f(e):e,t&&u.node instanceof k.d&&(u.node.tag=t),u.node}var Q=function(e,t){return e.keyt.key?1:0},X=function(){function e(t){var r=t.customTags,o=t.merge,a=t.schema,i=t.sortMapEntries,s=t.tags;Object(n.j)(this,e),this.merge=!!o,this.name=a,this.sortMapEntries=!0===i?Q:i||null,!r&&s&&Object(S.a)("tags","customTags"),this.tags=function(e,t,r,o){var a=e[o.replace(/\W/g,"")];if(!a){var i=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(o,'"; use one of ').concat(i))}if(Array.isArray(r)){var s,c=Object(n.g)(r);try{for(c.s();!(s=c.n()).done;){var l=s.value;a=a.concat(l)}}catch(e){c.e(e)}finally{c.f()}}else"function"==typeof r&&(a=r(a.slice()));for(var u=0;u");var i=t.substr(o.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return o.handle+i}function ne(e,t,r,o){var a,i=t.doc,s=i.anchors,c=i.schema;if(!(e instanceof k.d)){var l={aliasNodes:[],onTagObj:function(e){return a=e},prevObjects:new Map};e=c.createNode(e,!0,null,l);var u,p=Object(n.g)(l.aliasNodes);try{for(p.s();!(u=p.n()).done;){var f=u.value;f.source=f.source.node;var d=s.getName(f.source);d||(d=s.newName(),s.map[d]=f.source)}}catch(e){p.e(e)}finally{p.f()}}if(e instanceof k.e)return e.toString(t,r,o);a||(a=function(e,t){if(t instanceof k.a)return k.a;if(t.tag){var r=e.filter((function(e){return e.tag===t.tag}));if(r.length>0)return r.find((function(e){return e.format===t.format}))||r[0]}var o,a;if(t instanceof k.f){a=t.value;var i=e.filter((function(e){return e.identify&&e.identify(a)||e.class&&a instanceof e.class}));o=i.find((function(e){return e.format===t.format}))||i.find((function(e){return!e.format}))}else a=t,o=e.find((function(e){return e.nodeClass&&a instanceof e.nodeClass}));if(!o){var s=a&&a.constructor?a.constructor.name:Object(n.h)(a);throw new Error("Tag not resolved for ".concat(s," value"))}return o}(c.tags,e));var h=function(e,t,r){var n=r.anchors,o=r.doc,a=[],i=o.anchors.getName(e);return i&&(n[i]=e,a.push("&".concat(i))),e.tag?a.push(re(o,e.tag)):t.default||a.push(re(o,t.tag)),a.join(" ")}(e,a,t);h.length>0&&(t.indentAtStart=(t.indentAtStart||0)+h.length+1);var v="function"==typeof a.stringify?a.stringify(e,t,r,o):e instanceof k.f?Object(k.j)(e,t,r,o):e.toString(t,r,o);return h?e instanceof k.f||"{"===v[0]||"["===v[0]?"".concat(h," ").concat(v):"".concat(h,"\n").concat(t.indent).concat(v):v}var oe=function(){function e(t){Object(n.j)(this,e),Object(n.l)(this,"map",{}),this.prefix=t}return Object(n.i)(e,null,[{key:"validAnchorNode",value:function(e){return e instanceof k.f||e instanceof k.g||e instanceof k.k}}]),Object(n.i)(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new k.a(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new k.c,r=arguments.length,n=new Array(r),o=0;o0&&!e.commentBefore&&(e.commentBefore=o.before.join("\n"),o.before=[]))}}catch(e){s.e(e)}finally{s.f()}if(e.contents=a||null,a){var u=o.before.join("\n");if(u){var p=a instanceof k.b&&a.items[0]?a.items[0]:a;p.commentBefore=p.commentBefore?"".concat(u,"\n").concat(p.commentBefore):u}e.comment=o.after.join("\n")||null}else e.comment=o.before.concat(o.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){var u,p=Object(n.g)(this.errors);try{for(p.s();!(u=p.n()).done;){var f=u.value;f instanceof n.p&&f.makePretty()}}catch(e){p.e(e)}finally{p.f()}var d,h=Object(n.g)(this.warnings);try{for(h.s();!(d=h.n()).done;){var v=d.value;v instanceof n.p&&v.makePretty()}}catch(e){h.e(e)}finally{h.f()}}return this}},{key:"listNonDefaultTags",value:function(){return ae(this.contents).filter((function(e){return 0!==e.indexOf(X.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var r=this.tagPrefixes.find((function(t){return t.handle===e}));r?r.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var r=this,o=this.options,a=o.keepBlobsInJSON,i=o.mapAsMap,s=o.maxAliasCount,c=a&&("string"!=typeof e||!(this.contents instanceof k.f)),l={doc:this,indentStep:" ",keep:c,mapAsMap:c&&!!i,maxAliasCount:s,stringify:ne},u=Object.keys(this.anchors.map);u.length>0&&(l.anchors=new Map(u.map((function(e){return[r.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var p=Object(k.w)(this.contents,e,l);if("function"==typeof t&&l.anchors){var f,d=Object(n.g)(l.anchors.values());try{for(d.s();!(f=d.n()).done;){var h=f.value,v=h.count;t(h.res,v)}}catch(e){d.e(e)}finally{d.f()}}return p}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var r=[],n=!1;if(this.version){var o="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?o="%YAML:1.0":"1.1"===this.version&&(o="%YAML 1.1")),r.push(o),n=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,o=e.prefix;a.some((function(e){return 0===e.indexOf(o)}))&&(r.push("%TAG ".concat(t," ").concat(o)),n=!0)})),(n||this.directivesEndMarker)&&r.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||r.unshift(""),r.unshift(this.commentBefore.replace(/^/gm,"#")));var i={anchors:{},doc:this,indent:"",indentStep:" ".repeat(e),stringify:ne},s=!1,c=null;if(this.contents){this.contents instanceof k.d&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&r.push(""),this.contents.commentBefore&&r.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,c=this.contents.comment);var l=c?null:function(){return s=!0},u=ne(this.contents,i,(function(){return c=null}),l);r.push(Object(k.m)(u,"",c))}else void 0!==this.contents&&r.push(ne(this.contents,i));return this.comment&&(s&&!c||""===r[r.length-1]||r.push(""),r.push(this.comment.replace(/^/gm,"#"))),r.join("\n")+"\n"}}]),e}();Object(n.l)(le,"defaults",te);var ue=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(e){return Object(n.j)(this,r),t.call(this,Object.assign({},Z,e))}return r}(le);function pe(e,t){var r=w(e),o=new ue(t).parse(r[0]);if(r.length>1){o.errors.unshift(new n.n(r[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return o}var fe={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;void 0===r&&"string"==typeof t&&(r=t,t=!0);var n=Object.assign({},le.defaults[Z.version],Z),o=new X(n);return o.createNode(e,t,r)},defaultOptions:Z,Document:ue,parse:function(e,t){var r=pe(e,t);if(r.warnings.forEach((function(e){return Object(S.i)(e)})),r.errors.length>0)throw r.errors[0];return r.toJSON()},parseAllDocuments:function(e,t){var r,o,a=[],i=Object(n.g)(w(e));try{for(i.s();!(o=i.n()).done;){var s=o.value,c=new ue(t);c.parse(s,r),a.push(c),r=c}}catch(e){i.e(e)}finally{i.f()}return a},parseCST:w,parseDocument:pe,scalarOptions:ee,stringify:function(e,t){var r=new ue(t);return r.contents=e,String(r)}}}]);
+ */(s,t,r),p=function(e){if(!e.components)return[];const t=[];for(const r in e.components){const n=[];for(const t in e.components[r]){const o={show:!0,id:"".concat(r.toLowerCase(),"-").concat(t.toLowerCase()).replace(Ie,"-"),name:t,component:e.components[r][t]};n.push(o)}let o=r,a=r;switch(r){case"schemas":a="Schemas",o="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":a="Responses",o="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":a="Parameters",o="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":a="Examples",o="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":a="Request Bodies",o="Describes common request bodies that are used across the API operations.";break;case"headers":a="Headers",o='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":a="Security Schemes",o="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":a="Links",o="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":a="Callbacks",o="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:a=r,o=r}const i={show:!0,name:a,description:o,subComponents:n};t.push(i)}return t||[]}(s),f=function(e){if(e&&e.info&&e.info.description){const t=ce.a.lexer(e.info.description);return t.filter(e=>"heading"===e.type&&e.depth<=2)||[]}return[]}(s),d=[];s.components&&s.components.securitySchemes&&Object.entries(s.components.securitySchemes).forEach(e=>{const t={apiKeyId:e[0],...e[1]};t.value="",t.finalKeyValue="","apiKey"===e[1].type||"http"===e[1].type?(t.in=e[1].in||"header",t.name=e[1].name||"Authorization",t.user="",t.password=""):"oauth2"===e[1].type&&(t.in="header",t.name="Authorization",t.clientId="",t.clientSecret=""),d.push(t)}),n&&o&&a&&d.push({apiKeyId:"_rapidoc_api_key",description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:n,in:o,value:a,finalKeyValue:a}),d.forEach(e=>{"http"===e.type?e.typeDisplay="basic"===e.scheme?"HTTP Basic":"HTTP Bearer":"apiKey"===e.type?e.typeDisplay="API Key (".concat(e.name,")"):"oauth2"===e.type?e.typeDisplay="OAuth (".concat(e.apiKeyId,")"):e.typeDisplay=e.type});let h=[];s.servers&&Array.isArray(s.servers)?(s.servers.forEach(e=>{let t=e.url.trim();t.startsWith("http")||t.startsWith("//")||t.startsWith("{")||window.location.origin.startsWith("http")&&(e.url=window.location.origin+e.url,t=e.url),e.variables&&Object.entries(e.variables).forEach(e=>{const r=new RegExp("{".concat(e[0],"}"),"g");t=t.replace(r,e[1].default||""),e[1].value=e[1].default||""}),e.computedUrl=t}),i&&s.servers.push({url:i,computedUrl:i})):i?s.servers=[{url:i,computedUrl:i}]:window.location.origin.startsWith("http")?s.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:s.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],h=s.servers;return{info:s.info,infoDescriptionHeaders:f,tags:u,components:p,externalDocs:s.externalDocs,securitySchemes:d,servers:h,basePath:s.basePath}}const Ea=new WeakMap,Da=(Ca=e=>t=>{if(!(t instanceof _))throw new Error("unsafeHTML can only be used in text bindings");const r=Ea.get(t);if(void 0!==r&&E(e)&&e===r.value&&t.value===r.fragment)return;const n=document.createElement("template");n.innerHTML=e;const o=document.importNode(n.content,!0);t.setValue(o),Ea.set(t,{value:e,fragment:o})},(...e)=>{const t=Ca(...e);return b.set(t,!0),t});var Ca,ja,_a,Ta,Ia,Fa,Pa,Ra,Ba,La,Na,Ma,qa,za,Ua,$a,Ha,Wa,Va,Ya,Ka,Ga,Ja,Qa,Xa,Za,ei,ti,ri,ni,oi,ai,ii,si,ci,li,ui,pi,fi,di,hi,vi,mi,gi,yi,bi,xi,wi;function ki(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Si(e,t){let r="";const n=this.resolvedSpec.securitySchemes.find(t=>t.apiKeyId===e);if(n){const e=t.target.closest("tr");if(n.type&&n.scheme&&"http"===n.type&&"basic"===n.scheme.toLowerCase()){const t=e.querySelector(".api-key-user").value.trim(),n=e.querySelector(".api-key-password").value.trim();t&&n&&(r="Basic ".concat(btoa("".concat(t,":").concat(n))))}else r=e.querySelector(".api-key-input").value.trim(),r&&n.scheme&&"bearer"===n.scheme.toLowerCase()&&(r="Bearer ".concat(r));n.finalKeyValue=r}this.requestUpdate()}function Ai(){this.resolvedSpec.securitySchemes.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue=""}),this.requestUpdate()}function Oi(e,t="Bearer",r){this.resolvedSpec.securitySchemes.find(t=>t.apiKeyId===e).finalKeyValue="".concat("bearer"===t.toLowerCase()?"Bearer":"mac"===t.toLowerCase()?"MAC":t," ").concat(r),this.requestUpdate()}async function Ei(e,t,r,n,o,a,i="header",s,c,l=null){const u=c?c.querySelector(".oauth-resp-display"):void 0,p=new URLSearchParams,f=new Headers;p.append("grant_type",o),"client_credentials"!==o&&p.append("redirect_uri",n),a&&p.append("code",a),"header"===i?f.set("Authorization","Basic ".concat(btoa("".concat(t,":").concat(r)))):(p.append("client_id",t),p.append("client_secret",r)),l&&p.append("scope",l);try{const t=await fetch(e,{method:"POST",headers:f,body:p}),r=await t.json();if(!t.ok)return u&&(u.innerHTML=''.concat(r.error_description||r.error_description||"Unable to get access token"," ")),!1;if(r.token_type&&r.access_token)return Oi.call(this,s,r.token_type,r.access_token),u&&(u.innerHTML='Access Token Received '),!0}catch(e){return u&&(u.innerHTML='Failed to get access token '),!1}}async function Di(e,t,r,n,o,a,i,s,c,l){sessionStorage.removeItem("winMessageEventActive"),t.close(),e.data.fake||(e.data||console.warn("RapiDoc: Received no data with authorization message"),e.data.error&&console.warn("RapiDoc: Error while receiving data"),e.data&&("code"===e.data.responseType?Ei.call(this,r,n,o,a,i,e.data.code,s,c,l):"token"===e.data.responseType&&Oi.call(this,c,e.data.token_type,e.data.access_token)))}async function Ci(e,t,r,n,o){const a=o.target.closest(".oauth-flow"),i=a.querySelector(".oauth-client-id")?a.querySelector(".oauth-client-id").value.trim():"",s=a.querySelector(".oauth-client-secret")?a.querySelector(".oauth-client-secret").value.trim():"",c=a.querySelector(".oauth-send-client-secret-in")?a.querySelector(".oauth-send-client-secret-in").value.trim():"header",l=[...a.querySelectorAll('input[type="checkbox"]:checked')],u="".concat(Math.random().toString(36),"random").slice(2,9),p=new URL("".concat(window.location.origin).concat(window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),"/").concat(this.oauthReceiver));let f,d="",h="";if([...a.parentNode.querySelectorAll(".oauth-resp-display")].forEach(e=>{e.innerHTML=""}),"authorizationCode"===t||"implicit"===t){const o=new URL(r);"authorizationCode"===t?(d="authorization_code",h="code"):"implicit"===t&&(h="token");const v=new URLSearchParams(o.search),m=l.map(e=>e.value).join(" ");m&&v.set("scope",m),v.set("client_id",i),v.set("redirect_uri",p.toString()),v.set("response_type",h),v.set("state",u),v.set("show_dialog",!0),o.search=v.toString(),"true"===sessionStorage.getItem("winMessageEventActive")&&window.postMessage({fake:!0},this),setTimeout(()=>{f=window.open(o.toString()),f?(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",t=>Di.call(this,t,f,n,i,s,p.toString(),d,c,e,a),{once:!0})):console.error("RapiDoc: Unable to open ".concat(o.toString()," in a new window"))},10)}else if("clientCredentials"===t){d="client_credentials";const t=l.map(e=>e.value).join(" ");Ei.call(this,n,i,s,p.toString(),d,"",c,e,a,t)}}function ji(e,t,r,n,o){let a;return a="authorizationCode"===e?"Authorization Code Flow":"clientCredentials"===e?"Client Credentials Flow":"implicit"===e?"Implicit Flow":"password"===e?"Password Flow":e,z(ja||(ja=ki([' "])),a,o.authorizationUrl?z(_a||(_a=ki(['Auth URL ',"
"])),o.authorizationUrl):"",o.tokenUrl?z(Ta||(Ta=ki(['Token URL ',"
"])),o.tokenUrl):"",o.refreshUrl?z(Ia||(Ia=ki(['Refresh URL ',"
"])),o.refreshUrl):"","authorizationCode"===e||"clientCredentials"===e||"implicit"===e||"password"===e?z(Fa||(Fa=ki([" ",' '," ","
",'
'])),o.scopes?z(Pa||(Pa=ki([' Scopes ',"
"])),Object.entries(o.scopes).map((t,r)=>z(Ra||(Ra=ki([' '," ","
"])),e,r,t[0],e,r,t[0],t[0]!==t[1]?" - ".concat(t[1]||""):""))):"",t||"","authorizationCode"===e||"clientCredentials"===e||"password"===e?z(Ba||(Ba=ki([' ',""])),r||"","authorizationCode"===e||"clientCredentials"===e?z(La||(La=ki([' Authorization Header Request Body ']))):""):z(Na||(Na=ki(['
']))),"authorizationCode"===e||"clientCredentials"===e||"implicit"===e?z(Ma||(Ma=ki([' GET TOKEN '])),t=>{Ci.call(this,n,e,o.authorizationUrl,o.tokenUrl,t)}):"","password"===e?z(qa||(qa=ki(['
']))):""):"")}function _i(){var e;const t=null===(e=this.resolvedSpec.securitySchemes)||void 0===e?void 0:e.filter(e=>e.finalKeyValue);if(t)return z(za||(za=ki([' "])),"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap ",t.length>0?z(Ua||(Ua=ki([' ',' API key applied
CLEAR ALL API KEYS '])),t.length,()=>{Ai.call(this)}):z($a||($a=ki(['No API key applied
']))),this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?z(Ha||(Ha=ki([' "])),this.resolvedSpec.securitySchemes.map(e=>z(Wa||(Wa=ki([' '," ","
"," "," "," "," "])),e.typeDisplay,e.finalKeyValue?z(Va||(Va=ki([' ',' REMOVE '])),e.finalKeyValue?"Key Applied":"",()=>{e.finalKeyValue="",this.requestUpdate()}):"",e.description?z(Ya||(Ya=ki([' ',"
"])),Da(ce()(e.description||""))):"","apikey"===e.type.toLowerCase()||"http"===e.type.toLowerCase()&&"bearer"===e.scheme.toLowerCase()?z(Ka||(Ka=ki([" ",' ',"
"])),"apikey"===e.type.toLowerCase()?z(Ga||(Ga=ki(["Send ","
in ","
with the given value"])),e.name,e.in):z(Ja||(Ja=ki(["Send Authorization
in header
containing the word Bearer
followed by a space and a Token String."]))),"cookie"!==e.in?z(Qa||(Qa=ki([' '," "])),e.value,t=>{Si.call(this,e.apiKeyId,t)},e.finalKeyValue?"UPDATE":"SET"):""):"","http"===e.type.toLowerCase()&&"basic"===e.scheme.toLowerCase()?z(Xa||(Xa=ki([' Send Authorization
in header
containing the word Basic
followed by a space and a base64 encoded string of username:password
. ',"
"])),e.user,e.password,t=>{Si.call(this,e.apiKeyId,t)},e.finalKeyValue?"UPDATE":"SET"):"","oauth2"===e.type.toLowerCase()?z(Za||(Za=ki([' '," "])),Object.keys(e.flows).map(t=>ji.call(this,t,e["x-client-id"],e["x-client-secret"],e.apiKeyId,e.flows[t]))):""))):"")}function Ti(e){if(this.resolvedSpec.securitySchemes&&e){const t=[];return e.forEach(e=>{const r=[],n=[];let o="";Object.keys(e).forEach(t=>{const a=this.resolvedSpec.securitySchemes.find(e=>e.apiKeyId===t);o||(o=e[t].join(", ")),a&&(n.push(a.typeDisplay),r.push(a))}),t.push({pathScopes:o,securityTypes:n.length>1?"".concat(n[0]," + ").concat(n.length-1," more"):n[0],securityDefs:r})}),z(ei||(ei=ki(['"])),t.map((e,t)=>z(ti||(ti=ki([" ",' "])),0!==t?z(ri||(ri=ki([' OR
']))):"",e.securityTypes,e.securityDefs.length>1?z(ni||(ni=ki(["Requires all of the following
"]))):"",e.securityDefs.map((t,r)=>z(oi||(oi=ki([" "," "])),"oauth2"===t.type?z(ai||(ai=ki([" "," OAuth Token (",") in Authorization header
"])),e.securityDefs.length>1?z(ii||(ii=ki(["",". "])),r+1):z(si||(si=ki(["Requires"]))),t.apiKeyId):"http"===t.type?z(ci||(ci=ki([" "," "," in Authorization header
"])),e.securityDefs.length>1?z(li||(li=ki(["",". "])),r+1):z(ui||(ui=ki(["Requires"]))),"basic"===t.scheme?"Base 64 encoded username:password":"Bearer Token"):z(pi||(pi=ki([" "," Token in "," ","
"])),e.securityDefs.length>1?z(fi||(fi=ki(["",". "])),r+1):z(di||(di=ki(["Requires"]))),t.name,t.in))))))}return""}function Ii(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Fi(e){return z(hi||(hi=Ii([' CODE SAMPLES
"])),e=>{if(!e.target.classList.contains("tab-btn"))return;const t=e.target.dataset.tab,r=[...e.currentTarget.querySelectorAll(".tab-btn")],n=[...e.currentTarget.querySelectorAll(".tab-content")];r.forEach(e=>e.classList[e.dataset.tab===t?"add":"remove"]("active")),n.forEach(e=>{e.style.display=e.dataset.tab===t?"block":"none"})},e.map((e,t)=>z(vi||(vi=Ii([' '," "])),0===t?"active":"",e.lang,t,e.label||e.lang)),e.map((e,t)=>{var r,n,o;return z(mi||(mi=Ii([' "])),0===t?"block":"none",e.lang,t,t=>{Pe(e.source,t)},ue.a.languages[null===(r=e.lang)||void 0===r?void 0:r.toLowerCase()]?Da(ue.a.highlight(e.source,ue.a.languages[null===(n=e.lang)||void 0===n?void 0:n.toLowerCase()],null===(o=e.lang)||void 0===o?void 0:o.toLowerCase())):e.source)}))}function Pi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ri(e){return z(gi||(gi=Pi([' CALLBACKS
'," "])),Object.entries(e).map(e=>z(yi||(yi=Pi([' '," ","
"])),e[0],Object.entries(e[1]).map(e=>z(bi||(bi=Pi([' "])),Object.entries(e[1]).map(t=>{var r,n,o;return z(xi||(xi=Pi([' '])),t[0],t[0],e[0],t[0]||"",e[0]||"",(null===(r=t[1])||void 0===r?void 0:r.parameters)||"",(null===(n=t[1])||void 0===n?void 0:n.requestBody)||"",this.fillRequestFieldsWithExample,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded,null===(o=t[1])||void 0===o?void 0:o.responses,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded)}))))))}var Bi,Li,Ni,Mi,qi,zi,Ui,$i,Hi,Wi,Vi=ne(wi||(wi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([".border-top{border-top:1px solid var(--border-color)}.border{border:1px solid var(--border-color);border-radius:var(--border-radius)}.light-border{border:1px solid var(--light-border-color);border-radius:var(--border-radius)}.pad-8-16{padding:8px 16px}.pad-top-8{padding-top:8px}.mar-top-8{margin-top:8px}"])));function Yi(e){if(!e)return;const t={type:e.$ref?"{recursive}":e.enum?"enum":e.format?e.format:e.type?e.type:"{missing-type-info}",format:e.format?e.format:"",pattern:e.pattern&&!e.enum?e.pattern:"",readOrWriteOnly:e.readOnly?"🆁":e.writeOnly?"🆆":"",deprecated:e.deprecated?"❌":"",example:void 0===e.example?"":Array.isArray(e.example)?e.example:"".concat(e.example),default:void 0===e.default?"":"".concat(e.default),description:e.description?e.description:"",constrain:"",allowedValues:"",arrayType:"",html:""};if("{recursive}"===t.type?t.description=e.$ref.substring(e.$ref.lastIndexOf("/")+1):"{missing-type-info}"===t.type&&(t.description=t.description||""),e.enum){let r="";e.enum.map(e=>{r+="".concat(e,", ")}),t.allowedValues=r.slice(0,-2)}if("array"===e.type&&e.items){const r=e.items;if(t.arrayType="".concat(e.type," of ").concat(r.type),t.default=0===r.default?"0 ":r.default?r.default:"",r.enum){let e="";r.enum.map(t=>{e+="".concat(t,", ")}),t.allowedValues=e.slice(0,-2)}}else"integer"===e.type||"number"===e.type?(void 0!==e.minimum&&void 0!==e.maximum?t.constrain="".concat(e.exclusiveMinimum?">":">=").concat(e.minimum," and ").concat(e.exclusiveMaximum?"<":"<="," ").concat(e.maximum):void 0!==e.minimum&&void 0===e.maximum?t.constrain="".concat(e.exclusiveMinimum?">":">=").concat(e.minimum):void 0===e.minimum&&void 0!==e.maximum&&(t.constrain="".concat(e.exclusiveMaximum?"<":"<=").concat(e.maximum)),void 0!==e.multipleOf&&(t.constrain="(multiple of ".concat(e.multipleOf,")"))):"string"===e.type&&(void 0!==e.minLength&&void 0!==e.maxLength?t.constrain="(".concat(e.minLength," to ").concat(e.maxLength," chars)"):void 0!==e.minLength&&void 0===e.maxLength?t.constrain="min ".concat(e.minLength," chars"):void 0===e.minLength&&void 0!==e.maxLength&&(t.constrain="max ".concat(e.maxLength," chars")));return t.html="".concat(t.type,"~|~").concat(t.readOrWriteOnly,"~|~").concat(t.constrain,"~|~").concat(t.default,"~|~").concat(t.allowedValues,"~|~").concat(t.pattern,"~|~").concat(t.description,"~|~").concat(e.title||"","~|~").concat(t.deprecated?"deprecated":""),t}function Ki(e){if(""===e.example)return"";if(null===e.example)return null;if(0===e.example)return 0;if(e.example)return e.example;if(0===Object.keys(e).length)return null;if(e.$ref)return e.$ref;let t=e.format||e.type||(e.enum?"enum":"");switch(t||(e.enum?t="enum":e.anyOf?t="anyOf":e.oneOf&&(t="oneOf")),t.toLowerCase()){case"int32":case"int64":case"integer":return 0;case"float":case"double":case"number":case"decimal":return.5;case"string":return e.enum?e.enum[0]:e.pattern?e.pattern:"string";case"url":case"uri":return"http://example.com";case"byte":return btoa("string");case"binary":return"binary";case"boolean":return!1;case"date":return new Date(0).toISOString().split("T")[0];case"date-time":case"dateTime":return new Date(0).toISOString();case"password":return"password";case"enum":return e.enum[0];case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"email":return"user@example.com";case"hostname":return"example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"null":return null;default:return e.nullable?null:e.$ref?"data of type ".concat(e.$ref):"?"}}function Gi(e,t=1){const r=" ".repeat(t);let n="";if(1===t&&"object"!=typeof e)return"\n".concat(r).concat(e.toString());for(const o in e)n=Array.isArray(e[o])||"object"==typeof e[o]?"".concat(n,"\n").concat(r,"<").concat(o,"> ").concat(Gi(e[o],t+1),"\n").concat(r,"").concat(o,">"):"".concat(n,"\n").concat(r,"<").concat(o,"> ").concat(e[o].toString()," ").concat(o,">");return n}function Ji(e,t){"object"==typeof t&&null!==t&&(e.title&&(t["::TITLE"]=e.title),e.description&&(t["::DESCRIPTION"]=e.description))}function Qi(e){if("object"==typeof e&&null!==e){delete e["::TITLE"],delete e["::DESCRIPTION"];for(const t in e)Qi(e[t])}}function Xi(e,t,r){for(const n in t)t[n][r]=e}function Zi(e,t,r){let n=0;const o={};for(const a in e)for(const i in r)o["example-".concat(n)]={...e[a]},o["example-".concat(n)][t]=r[i],n++;return o}function es(e,t,r=0,n=""){if(e){if(e.allOf){const n={};if(1===e.allOf.length&&!e.allOf[0].properties&&!e.allOf[0].items){const t=e.allOf[0];return"".concat(Yi(t).html)}e.allOf.map((e,t)=>{if("object"===e.type||e.properties||e.allOf||e.anyOf||e.oneOf){const o=(e.anyOf||e.oneOf)&&t>0?t:"",a=es(e,{},r+1,o);Object.assign(n,a)}else if("array"===e.type||e.items){const t=es(e,{},r+1);Object.assign(n,t)}else{if(!e.type)return"";{const t="prop".concat(Object.keys(n).length),r=Yi(e);n[t]="".concat(r.html)}}}),t=n}else if(e.anyOf||e.oneOf){if(t["::description"]=e.description||"","object"===e.type||e.properties){t["::description"]=e.description||"",t["::type"]="object";for(const n in e.properties)e.required&&e.required.includes(n)?t["".concat(n,"*")]=es(e.properties[n],{},r+1):t[n]=es(e.properties[n],{},r+1)}const o={};e[e.anyOf?"anyOf":"oneOf"].forEach((e,t)=>{if("object"===e.type||e.properties||e.allOf||e.anyOf||e.oneOf){const r=es(e,{});o["::OPTION~".concat(t+1).concat(e.title?"~".concat(e.title):"")]=r,o["::type"]="xxx-of-option"}else if("array"===e.type||e.items){const r=es(e,{});o["::OPTION~".concat(t+1).concat(e.title?"~".concat(e.title):"")]=r,o["::type"]="xxx-of-array"}else{const r="::OPTION~".concat(t+1).concat(e.title?"~".concat(e.title):"");o[r]="".concat(Yi(e).html)}}),t[e.anyOf?"::ANY~OF ".concat(n):"::ONE~OF ".concat(n)]=o,t["::type"]="xxx-of"}else if("object"===e.type||e.properties){t["::description"]=e.description||"",t["::type"]="object",t["::deprecated"]=e.deprecated||!1;for(const n in e.properties)e.required&&e.required.includes(n)?t["".concat(n,"*")]=es(e.properties[n],{},r+1):t[n]=es(e.properties[n],{},r+1);e.additionalProperties&&(t[""]=es(e.additionalProperties,{}))}else{if(!e.items){const t=Yi(e);return t.html?"".concat(t.html):""}t["::description"]=e.description?e.description:e.items.description?"array<".concat(e.items.description,">"):"",t["::type"]="array",t["::props"]=es(e.items,{},r+1)}return t}}function ts(e,t,r,n,o=!0,a){const i=[];if(e)for(const t in e){let r="",o="json";if(n.toLowerCase().includes("json")){if("text"===a)r="string"==typeof e[t].value?e[t].value:JSON.stringify(e[t].value,void 0,2),o="text";else if(r=e[t].value,"string"==typeof e[t].value)try{const n=e[t].value.replace(/([\w]+)(:)/g,'"$1"$2').replace(/'/g,'"');r=JSON.parse(n),o="json"}catch(n){o="text",r=e[t].value}}else r=e[t].value,o="text";i.push({exampleId:t,exampleSummary:e[t].summary||t,exampleDescription:e[t].description||"",exampleType:n,exampleValue:r,exampleFormat:o})}else if(t){let e="",r="json";if(n.toLowerCase().includes("json")){if("text"===a)e="string"==typeof t?t:JSON.stringify(t,void 0,2),r="text";else if("object"==typeof t)e=t,r="json";else if("string"==typeof t)try{e=JSON.parse(t),r="json"}catch(n){r="text",e=t}}else e=t,r="text";i.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:e,exampleFormat:r})}if(0===i.length)if(r)if(r.example)i.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:r.example,exampleFormat:n.toLowerCase().includes("json")&&"object"==typeof r.example?"json":"text"});else if(n.toLowerCase().includes("json")||n.toLowerCase().includes("text")||n.toLowerCase().includes("*/*")||n.toLowerCase().includes("xml")){let e="",t="",s="",c="";n.toLowerCase().includes("xml")?(e=r.xml&&r.xml.name?"<".concat(r.xml.name,">"):"",t=r.xml&&r.xml.name?"".concat(r.xml.name,">"):" ",s="text"):s=a;const l=function e(t,r={}){let n={};if(t){if(t.allOf){const o={};if(1===t.allOf.length&&!t.allOf[0].properties&&!t.allOf[0].items){if(t.allOf[0].$ref)return"{ }";if(t.allOf[0].readOnly&&r.includeReadOnly){return Ki(t.allOf[0])}return}t.allOf.map(t=>{if("object"===t.type||t.properties||t.allOf||t.anyOf||t.oneOf){const n=e(t,r);Object.assign(o,n)}else if("array"===t.type||t.items){const n=[e(t,r)];Object.assign(o,n)}else{if(!t.type)return"";{const e="prop".concat(Object.keys(o).length);o[e]=Ki(t)}}}),n=o}else if(t.oneOf){if(t.oneOf.length>0){let o=0;for(const a in t.oneOf){const i=e(t.oneOf[a],r);for(const e in i)n["example-".concat(o)]=i[e],Ji(t.oneOf[a],n["example-".concat(o)]),o++}}}else if(t.anyOf){let o;if("object"===t.type||t.properties){o={"example-0":{}};for(const n in t.properties){if(t.example){o=t;break}t.properties[n].deprecated&&!r.includeDeprecated||(t.properties[n].readOnly&&!r.includeReadOnly||t.properties[n].writeOnly&&!r.includeWriteOnly||(o=Zi(o,n,e(t.properties[n],r))))}}let a=0;for(const i in t.anyOf){const s=e(t.anyOf[i],r);for(const e in s){if(void 0!==o)for(const t in o)n["example-".concat(a)]={...o[t],...s[e]};else n["example-".concat(a)]=s[e];Ji(t.anyOf[i],n["example-".concat(a)]),a++}}}else if("object"===t.type||t.properties)if(n["example-0"]={},Ji(t,n["example-0"]),t.example)n["example-0"]=t.example;else for(const i in t.properties){var o,a;if(!t.properties[i].deprecated||r.includeDeprecated)if(!t.properties[i].readOnly||r.includeReadOnly)if(!t.properties[i].writeOnly||r.includeWriteOnly)if("array"===t.properties[i].type||t.properties[i].items)if(t.properties[i].example)Xi(t.properties[i].example,n,i);else if(null!==(o=t.properties[i])&&void 0!==o&&null!==(a=o.items)&&void 0!==a&&a.example)Xi([t.properties[i].items.example],n,i);else{const o=e(t.properties[i].items,r),a=[];for(const e in o)a[e]=[o[e]];n=Zi(n,i,a)}else n=Zi(n,i,e(t.properties[i],r))}else{if("array"!==t.type&&!t.items)return{"example-0":Ki(t)};var i;if(t.example)n["example-0"]=t.example;else if(null!==(i=t.items)&&void 0!==i&&i.example)n["example-0"]=[t.items.example];else{const o=e(t.items,r);let a=0;for(const e in o)n["example-".concat(a)]=[o[e]],Ji(t.items,n["example-".concat(a)]),a++}}return n}}(r,{includeReadOnly:o,includeWriteOnly:!0,deprecated:!0});let u=0;for(const r in l){if(!l[r])continue;const o=l[r]["::TITLE"]||"Example ".concat(++u),p=l[r]["::DESCRIPTION"]||"";Qi(l[r]),c=n.toLowerCase().includes("xml")?"".concat(e).concat(Gi(l[r]),"\n").concat(t):"text"===a?JSON.stringify(l[r],null,2):l[r],i.push({exampleId:r,exampleSummary:o,exampleDescription:p,exampleType:n,exampleFormat:s,exampleValue:c})}}else i.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});else i.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});return i}function rs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("json-tree",class extends ae{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[he,Vi,me,ne(Bi||(Bi=rs([":host{display:flex}.json-tree{font-family:var(--font-mono);font-size:var(--font-size-small);display:inline-block;overflow:hidden;word-break:break-all;flex:1;line-height:calc(var(--font-size-small) + 6px)}.open-bracket{display:inline-block;padding:0 20px 0 0;cursor:pointer;border:1px solid transparent;border-radius:3px}.open-bracket:hover{color:var(--primary-color);background-color:var(--hover-color);border:1px solid var(--border-color)}.inside-bracket{padding-left:12px;border-left:1px dotted var(--border-color)}.open-bracket.collapsed+.inside-bracket,.open-bracket.collapsed+.inside-bracket+.close-bracket{display:none}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--red)}.boolean{color:var(--purple)}.object{color:var(--fg)}.toolbar{display:flex;width:100%;padding:2px 0;color:var(--primary-color);font-family:var(--font-regular);margin-bottom:4px;align-items:center;font-size:calc(var(--font-size-small) - 1px)}"]))),Te]}render(){return z(Li||(Li=rs([' "])),e=>{Pe(JSON.stringify(this.data,null,2),e)},this.generateTree(this.data,!0))}generateTree(e,t=!1){if(null===e)return z(Ni||(Ni=rs(['null
'])));if("object"==typeof e&&e instanceof Date==!1){const r=Array.isArray(e)?"array":"pure_object";return 0===Object.keys(e).length?z(Mi||(Mi=rs(["",""])),Array.isArray(e)?"[ ],":"{ },"):z(qi||(qi=rs([' ','
','
',"","
"])),"array"===r?"array":"object",this.toggleExpand,"array"===r?"[":"{",Object.keys(e).map((t,n,o)=>z(zi||(zi=rs([' '," ","
"])),"pure_object"===r?z(Ui||(Ui=rs(["",":"])),t):"",this.generateTree(e[t],n===o.length-1))),"array"===r?"]":"}",t?"":",")}return"string"==typeof e||e instanceof Date?z($i||($i=rs(['"','" ',""])),typeof e,e,t?"":","):z(Hi||(Hi=rs([''," ",""])),typeof e,e,t?"":",")}toggleExpand(e){const t=e.target;t.classList.contains("expanded")?(t.classList.replace("expanded","collapsed"),e.target.innerHTML=e.target.classList.contains("array")?"[...]":"{...}"):(t.classList.replace("collapsed","expanded"),e.target.innerHTML=e.target.classList.contains("array")?"[":"{")}});var ns,os,as,is,ss,cs,ls,us,ps,fs,ds,hs,vs,ms,gs,ys,bs,xs,ws,ks,Ss,As,Os,Es,Ds,Cs,js,_s,Ts,Is,Fs,Ps,Rs,Bs,Ls,Ns,Ms,qs,zs,Us,$s,Hs,Ws,Vs,Ys,Ks,Gs,Js,Qs,Xs,Zs,ec,tc,rc,nc,oc,ac,ic,sc,cc,lc,uc,pc,fc,dc,hc,vc,mc,gc,yc,bc,xc,wc,kc,Sc,Ac,Oc,Ec,Dc,Cc,jc,_c,Tc,Ic,Fc,Pc,Rc,Bc,Lc,Nc,Mc,qc,zc,Uc,$c,Hc,Wc,Vc,Yc,Kc,Gc,Jc,Qc,Xc,Zc,el,tl,rl,nl,ol,al,il,sl,cl,ll,ul,pl,fl,dl,hl,vl,ml,gl,yl,bl,xl,wl,kl,Sl,Al,Ol,El,Dl,Cl,jl,_l,Tl,Il,Fl,Pl,Rl,Bl,Ll,Nl,Ml,ql,zl,Ul,$l,Hl,Wl,Vl,Yl,Kl,Gl,Jl,Ql,Xl,Zl,eu,tu,ru,nu,ou,au,iu,su,cu,lu,uu,pu,fu,du,hu,vu,mu,gu,yu,bu,xu,wu,ku,Su,Au,Ou,Eu,Du,Cu,ju,_u,Tu,Iu,Fu,Pu,Ru,Bu,Lu,Nu,Mu,qu,zu,Uu,$u,Hu,Wu,Vu,Yu,Ku,Gu,Ju,Qu,Xu,Zu,ep,tp,rp,np,op,ap,ip,sp,cp,lp,up,pp,fp,dp,hp,vp,mp,gp,yp,bp,xp,wp,kp,Sp,Ap,Op,Ep,Dp,Cp,jp,_p,Tp,Ip,Fp,Pp,Rp,Bp,Lp,Np=ne(Wi||(Wi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([".tr{display:flex;flex:none;width:100%;border-bottom:1px dotted transparent}.td{display:block;flex:0 0 auto;box-sizing:border-box}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-descr .key{overflow:hidden}.key-descr{font-family:var(--font-regular);color:var(--light-fg);flex-shrink:1;text-overflow:ellipsis;overflow:hidden;display:none}.expanded-descr .key-descr{max-height:auto;overflow:hidden;display:none}.collapsed-descr .tr{max-height:20px}.tr.xxx-of{border-top:1px dotted var(--primary-color)}.xxx-of-key{font-size:calc(var(--font-size-small) - 2px);font-weight:700;background-color:var(--primary-color);color:var(--primary-color-invert);border-radius:2px;line-height:calc(var(--font-size-small) + 6px);padding:0 5px;margin-bottom:1px;display:inline-block}.xxx-of-descr{font-family:var(--font-regular);color:var(--primary-color);font-size:calc(var(--font-size-small) - 1px);margin-left:2px}.bina,.byte,.date,.emai,.host,.ipv4,.pass,.stri,.string,.uri,.url,.uuid{color:var(--green)}.deci .blue,.doub,.floa,.int3,.int6,.inte,.numb,.number{color:var(--blue)}.null{color:var(--red)}.bool,.boolean{color:var(--purple)}.enum{color:var(--orange)}.recu{color:var(--brown)}.toolbar{display:flex;width:100%;padding:2px 0;color:var(--primary-color)}.toolbar-item{cursor:pointer;padding:5px 0;margin:0 2px}.schema-root-type{cursor:auto;color:var(--fg2);font-weight:700;text-transform:uppercase}.schema-root-type.xxx-of{display:none}.toolbar-item:first-of-type{margin:0 2px 0 0}@media only screen and (min-width:500px){.key-descr{display:block}.expanded-descr .key-descr{display:block}}"])));function Mp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("schema-tree",class extends ae{static get properties(){return{data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false")}static get styles(){return[he,Np,Vi,ne(ns||(ns=Mp([".tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px)}.tree .tr:hover{background-color:var(--hover-color)}.collapsed-descr .tr{max-height:calc(var(--font-size-small) + 8px)}.collapsed-descr .m-markdown-small p{line-height:calc(var(--font-size-small) + 6px)}.tree .key{max-width:300px}.key.deprecated .key-label{text-decoration:line-through}.open-bracket{display:inline-block;padding:0 20px 0 0;cursor:pointer;border:1px solid transparent;border-radius:3px}.open-bracket:hover{color:var(--primary-color);background-color:var(--hover-color);border:1px solid var(--border-color)}.close-bracket{display:inline-block;font-family:var(--font-mono)}.tr.collapsed+.inside-bracket,.tr.collapsed+.inside-bracket+.close-bracket{display:none}.inside-bracket.array,.inside-bracket.object{border-left:1px dotted var(--border-color)}.inside-bracket.xxx-of{padding:5px 0;border-style:dotted;border-width:0 0 1px 0;border-color:var(--primary-color)}"]))),Te]}render(){var e,t;return z(os||(os=Mp([' "])),"true"===this.schemaDescriptionExpanded?"expanded-descr":"collapsed-descr",(null===(e=this.data)||void 0===e?void 0:e["::type"])||"",(null===(t=this.data)||void 0===t?void 0:t["::type"])||"",()=>{this.schemaDescriptionExpanded="true"===this.schemaDescriptionExpanded?"false":"true"},"true"===this.schemaDescriptionExpanded?"Single line description":"Multiline description",this.data?Da(ce()(this.data["::description"]||"")):"",this.data?z(as||(as=Mp([" ",""])),this.generateTree("array"===this.data["::type"]?this.data["::props"]:this.data,this.data["::type"])):z(is||(is=Mp([' Schema not found ']))))}generateTree(e,t="object",r="",n="",o=0){if(!e)return z(ss||(ss=Mp(['null
'])));if(0===Object.keys(e).length)return z(cs||(cs=Mp(['',":{ } "])),r);let a="",i="";if(r.startsWith("::ONE~OF")||r.startsWith("::ANY~OF"))a=r.replace("::","").replace("~"," ");else if(r.startsWith("::OPTION")){const e=r.split("~");a=e[1],i=e[2]}else a=r;const s=300-12*o;let c="",l="";if("object"===e["::type"]?"array"===t?(c=o[{'])),this.toggleObjectExpand):z(us||(us=Mp(['[{...}] '])),this.toggleObjectExpand),l="}]"):(c=o{'])),this.toggleObjectExpand):z(fs||(fs=Mp(['{...} '])),this.toggleObjectExpand),l="}"):"array"===e["::type"]&&("array"===t?(c=o[['])),this.toggleObjectExpand):z(hs||(hs=Mp(['[[...]] '])),this.toggleObjectExpand),l="]]"):(c=o['])),this.toggleObjectExpand):z(ms||(ms=Mp(['[...] '])),this.toggleObjectExpand),l="]")),"object"==typeof e)return z(gs||(gs=Mp([' ',"
"," "])),o',''," "])),a,i):a.endsWith("*")?z(bs||(bs=Mp(['',' * '])),a.substring(0,a.length-1)):"::props"===a||"::ARRAY~OF"===a?"":z(xs||(xs=Mp([''," "])),a),o>0&&!(r.startsWith("::props")||r.startsWith("::ONE~")||r.startsWith("::ANY~")||r.startsWith("::OPTION~")||r.startsWith("::ARRAY~OF"))?":":"","xxx-of"===e["::type"]&&"array"===t?z(ws||(ws=Mp(['ARRAY ']))):"",c,Da(ce()(n||"")),e["::type"]||"no-type-info","xxx-of-option"===e["::type"]||"xxx-of-array"===e["::type"]?0:12,Array.isArray(e)&&e[0]?z(ks||(ks=Mp(["",""])),this.generateTree(e[0],"xxx-of-option","::ARRAY~OF","",o)):z(Ss||(Ss=Mp([" "," "])),Object.keys(e).map(t=>z(As||(As=Mp([" "," "])),["::description","::type","::props","::deprecated"].includes(t)?"array"===e[t]["::type"]||"object"===e[t]["::type"]?z(Os||(Os=Mp(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1)):"":z(Es||(Es=Mp(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1))))),e["::type"]&&e["::type"].includes("xxx-of")?"":z(Ds||(Ds=Mp([' ',"
"])),l));const u=e.split("~|~"),p=u[0].replace("{","").substring(0,4).toLowerCase();return z(Cs||(Cs=Mp([' ',' '," ",'
'," "," "," "," "," ","
"])),u[8],s,a.endsWith("*")?z(js||(js=Mp(['',' * :'])),a.substring(0,a.length-1)):r.startsWith("::OPTION")?z(_s||(_s=Mp(['',' '," "])),a,i):z(Ts||(Ts=Mp([''," :"])),a),p,"array"===t?"[".concat(u[0],"]"):"".concat(u[0]),u[1],"array"===t?n:"",u[2]?z(Is||(Is=Mp(['',"
"])),u[2]):"",u[3]?z(Fs||(Fs=Mp(['Default: ',"
"])),u[3]):"",u[4]?z(Ps||(Ps=Mp(['Allowed: ',"
"])),u[4]):"",u[5]?z(Rs||(Rs=Mp(['Pattern: ',"
"])),u[5]):"",u[6]?z(Bs||(Bs=Mp([''," "])),Da(ce()(u[6]))):"")}toggleObjectExpand(e){const t=e.target.closest(".tr");t.classList.contains("expanded")?(t.classList.replace("expanded","collapsed"),e.target.innerHTML=e.target.classList.contains("array-of-object")?"[{...}]":e.target.classList.contains("array-of-array")?"[[...]]":e.target.classList.contains("array")?"[...]":"{...}"):(t.classList.replace("collapsed","expanded"),e.target.innerHTML=e.target.classList.contains("array-of-object")?"[{":e.target.classList.contains("array-of-array")?"[[":e.target.classList.contains("object")?"{":"[")}});function zp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("tag-input",class extends ae{render(){let e="";return Array.isArray(this.value)&&(e=z(Ls||(Ls=qp(["",""])),this.value.filter(e=>""!==e.trim()).map(e=>z(Ns||(Ns=qp([''," "])),e)))),z(Ms||(Ms=qp([' ','
'])),e,e=>this.afterPaste(e),this.afterKeyDown,this.placeholder||"")}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value"}}}attributeChangedCallback(e,t,r){"value"===e&&r&&t!==r&&(this.value=r.split(",").filter(e=>""!==e.trim())),super.attributeChangedCallback(e,t,r)}afterPaste(e){const t=(e.clipboardData||window.clipboardData).getData("Text");this.value=t?t.split(",").filter(e=>""!==e.trim()):"",e.preventDefault()}afterKeyDown(e){13===e.keyCode?(e.stopPropagation(),e.preventDefault(),e.target.value&&(Array.isArray(this.value)?this.value=[...this.value,e.target.value]:this.value=[e.target.value],e.target.value="")):8===e.keyCode&&0===e.target.value.length&&Array.isArray(this.value)&&this.value.length>0&&(this.value.splice(-1),this.value=[...this.value])}static get styles(){return[ne(qs||(qs=qp([".tags{display:flex;flex-wrap:wrap;outline:0;padding:0;border-radius:var(--border-radius);border:1px solid var(--border-color);cursor:text;overflow:hidden;background:var(--input-bg)}.editor,.tag{padding:3px;margin:2px}.tag{border:1px solid var(--border-color);background-color:var(--bg3);color:var(--fg3);border-radius:var(--border-radius);word-break:break-all;font-size:var(--font-size-small)}.tag:hover~#cursor{display:block}.editor{flex:1;border:1px solid transparent;color:var(--fg);min-width:60px;outline:0;line-height:inherit;font-family:inherit;background:0 0;font-size:calc(var(--font-size-small) + 1px)}.editor::placeholder{color:var(--placeholder-color);opacity:1}"])))]}});function Up(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("api-request",class extends ae{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample=""}static get properties(){return{serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},responseMessage:{type:String,attribute:!1},responseText:{type:String,attribute:!1},responseHeaders:{type:String,attribute:!1},responseStatus:{type:String,attribute:!1},responseUrl:{type:String,attribute:!1},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},activeResponseTab:{type:String},selectedRequestBodyType:{type:String,attribute:"selected-request-body-type"},selectedRequestBodyExample:{type:String,attribute:"selected-request-body-example"}}}static get styles(){return[xe,me,he,ye,Vi,Ee,Ae,ne(zs||(zs=zp([".read-mode{margin-top:24px}.param-name,.param-type{margin:1px 0;text-align:right;line-height:var(--font-size-small)}.param-name{color:var(--fg);font-family:var(--font-mono)}.param-type{color:var(--light-fg);font-family:var(--font-regular)}.param-constraint{min-width:100px}.param-constraint:empty{display:none}.top-gap{margin-top:24px}.textarea{min-height:220px;padding:5px;resize:vertical}.example:first-child{margin-top:-9px}.response-message{font-weight:700;text-overflow:ellipsis}.response-message.error{color:var(--red)}.response-message.success{color:var(--blue)}.file-input-container{align-items:flex-end}.file-input-container .input-set:first-child .file-input-remove-btn{visibility:hidden}.file-input-remove-btn{font-size:16px;color:var(--red);outline:0;border:none;background:0 0;cursor:pointer}.v-tab-btn{font-size:var(--smal-font-size);height:24px;border:none;background:0 0;opacity:.3;cursor:pointer;padding:4px 8px}.v-tab-btn.active{font-weight:700;background:var(--bg);opacity:1}@media only screen and (min-width:768px){.textarea{padding:8px}}"]))),Te]}render(){return z(Us||(Us=zp([' ',"
"," "," "," "," "," ","
"])),"read focused".includes(this.renderStyle)||"true"===this.callback?"read-mode":"view-mode","true"===this.callback?"tiny-title":"req-res-title","true"===this.callback?"CALLBACK REQUEST":"REQUEST",this.inputParametersTemplate("path"),this.inputParametersTemplate("query"),this.requestBodyTemplate(),this.inputParametersTemplate("header"),this.inputParametersTemplate("cookie"),"false"===this.allowTry?"":z($s||($s=zp(["",""])),this.apiCallTemplate()))}updated(e){if("focused"===this.renderStyle)if(1===e.size&&e.has("activeSchemaTab"));else{[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach(e=>{const t=this.shadowRoot.querySelector("textarea[data-pname='hidden-".concat(e.dataset.pname,"']"));t&&(e.value=t.value)})}}inputParametersTemplate(e){const t=this.parameters?this.parameters.filter(t=>t.in===e):[];if(0===t.length)return"";let r="";"path"===e?r="PATH PARAMETERS":"query"===e?r="QUERY-STRING PARAMETERS":"header"===e?r="REQUEST HEADERS":"cookie"===e&&(r="COOKIES");const n=[];for(const r of t){if(!r.schema)continue;const t=Yi(r.schema);let a="",i=[],s="form",c=!0;if("query"===e&&(r.style&&"form spaceDelimited pipeDelimited".includes(r.style)&&(s=r.style),"boolean"==typeof r.explode&&(c=r.explode)),r.example=void 0===r.example?"":Array.isArray(r.example)?r.example:"".concat(r.example),r.example)a="array"===t.type?r.example:"".concat(r.example),i=[{value:r.example,description:"".concat(r.example)}];else if(t.example)a="array"===t.type?t.example:"".concat(t.example),i=[{value:t.example,description:"".concat(t.example)}];else if(r.examples&&Object.values(r.examples).length>0)if(Array.isArray(r.examples)){const e=Object.values(r.examples)[0]||"";a="array"===t.type?[e]:e,i=Object.values(r.examples).map(e=>({value:e,description:e}))}else{var o;a=null===(o=Object.values(r.examples)[0])||void 0===o?void 0:o.value,i=Object.values(r.examples).map(e=>({value:e.value,description:e.description||e.summary||e.value}))}n.push(z(Hs||(Hs=zp([' ',"",'
',"
",' '," ",' '," "," "])),"true"===this.allowTry?"1":"2",r.required?z(Ws||(Ws=zp(['* ']))):"",r.name,"array"===t.type?"".concat(t.arrayType):"".concat(t.format?t.format:t.type),"true"===this.allowTry?z(Vs||(Vs=zp([' '," "])),"array"===t.type||"object"===t.type?"read focused".includes(this.renderStyle)?"300px":"220px":"160px","array"===t.type?z(Ys||(Ys=zp([' '])),e,r.name,Array.isArray(a)?a.join("~|~"):a,s,c,Array.isArray(a)?a:a.split(",")):"object"===t.type?z(Ks||(Ks=zp([' "])),e,r.name,a,s,c,"read focused".includes(this.renderStyle)?"180px":"120px","true"===this.fillRequestFieldsWithExample?a:""):z(Gs||(Gs=zp([' '])),"password"===t.format?"password":"text",e,r.name,Array.isArray(a)?a.join("~|~"):a,"true"===this.fillRequestFieldsWithExample?a:"")):"","true"===this.allowTry?"1":"2",t.default||t.constrain||t.allowedValues||t.pattern?z(Js||(Js=zp([' '," "," "," ","
"])),t.default?z(Qs||(Qs=zp(['Default: '," "])),t.default):"",t.pattern?z(Xs||(Xs=zp(['Pattern: '," "])),t.pattern):"",t.constrain?z(Zs||(Zs=zp([""," "])),t.constrain):"",t.allowedValues&&t.allowedValues.split(",").map((e,n)=>z(ec||(ec=zp([" "," ",""])),n>0?" | ":z(tc||(tc=zp([' Allowed: ']))),z(rc||(rc=zp([' '," "])),"true"===this.allowTry?"":"inactive-link","array"===t.type?t.type:"string",e.trim(),e=>{const t=e.target.closest("table").querySelector('[data-pname="'.concat(r.name,'"]'));t&&("array"===e.target.dataset.type?t.value=[e.target.dataset.enum]:t.value=e.target.dataset.enum)},e)))):"","true"===this.allowTry?z(nc||(nc=zp([' ']))):"",Da(ce()(r.description||"")),Array.isArray(i)&&i.length>0?z(oc||(oc=zp([' Example: '," "])),i.map((e,n)=>{var o;return z(ac||(ac=zp([" "," ",' '," "," "])),0===n?"":z(ic||(ic=zp([" ◇"]))),"array"===t.type?"[":"","true"===this.allowTry?"":"inactive-link","array"===t.type?t.type:"string",e.value&&Array.isArray(e.value)?(null===(o=e.value)||void 0===o?void 0:o.join("~|~"))||"":e.value||"",e=>{const t=e.target.closest("table").querySelector('[data-pname="'.concat(r.name,'"]'));t&&("array"===e.target.dataset.exampleType?t.value=e.target.dataset.example.split("~|~"):t.value=e.target.dataset.example)},e.description||"","array"===t.type?"] ":"")})):""))}return z(sc||(sc=zp([' ','
"])),r,n)}resetRequestBodySelection(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;const t=e.target;window.setTimeout(e=>{const t=e.closest(".example-panel").querySelector(".request-body-param");e.closest(".example-panel").querySelector(".request-body-param-user-input").value=t.value},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;const t=e.target;this.selectedRequestBodyExample="",window.setTimeout(e=>{const t=e.closest(".request-body-container").querySelector(".request-body-param");if(t){e.closest(".request-body-container").querySelector(".request-body-param-user-input").value=t.value}},0,t)}requestBodyTemplate(){if(!this.request_body)return"";if(0===Object.keys(this.request_body).length)return"";let e="",t="",r="",n="",o="";const a=[],i=this.request_body.content;for(const e in i)a.push({mimeType:e,schema:i[e].schema,example:i[e].example,examples:i[e].examples}),this.selectedRequestBodyType||(this.selectedRequestBodyType=e);return e=1===a.length?"":z(cc||(cc=zp([' '," "])),e=>this.onMimeTypeChange(e),a.map(e=>z(lc||(lc=zp([' '," "])),e.mimeType,e.mimeType===this.selectedRequestBodyType,e.mimeType))),a.forEach(e=>{let a,i=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text"))e.mimeType===this.selectedRequestBodyType&&(i=ts(e.examples?e.examples:"",e.example?e.example:"",e.schema,e.mimeType,!1,"text"),this.selectedRequestBodyExample||(this.selectedRequestBodyExample=i.length>0?i[0].exampleId:""),o=z(uc||(uc=zp([" ",' '," ","
"])),o,1===i.length?"":z(pc||(pc=zp([' '," "])),e=>this.onSelectExample(e),i.map(e=>z(fc||(fc=zp([' '," "])),e.exampleId,e.exampleId===this.selectedRequestBodyExample,e.exampleSummary.length>80?e.exampleId:e.exampleSummary?e.exampleSummary:e.exampleId))),i.filter(e=>e.exampleId===this.selectedRequestBodyExample).map(t=>z(dc||(dc=zp([' '," ",'
"])),t.exampleId===this.selectedRequestBodyExample?"example-selected":"",t.exampleId,t.exampleSummary&&t.exampleSummary.length>80?z(hc||(hc=zp([' ',"
"])),t.exampleSummary):"",t.exampleDescription?z(vc||(vc=zp([' ',"
"])),Da(ce()(t.exampleDescription||""))):"",e.mimeType,"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2),t.exampleFormat,"true"===this.fillRequestFieldsWithExample?"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2):"",e.mimeType.substring(e.mimeType.indexOf("/")+1),e.mimeType,"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2)))));else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(e.mimeType===this.selectedRequestBodyType){const t=ts(e.examples?e.examples:"",e.example?e.example:"",e.schema,e.mimeType,!1,"text");e.schema&&(r=this.formDataTemplate(e.schema,e.mimeType,t[0]?t[0].exampleValue:""))}}else RegExp("^audio/|^image/|^video/|^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$").test(this.selectedRequestBodyType)&&e.mimeType===this.selectedRequestBodyType&&(t=z(mc||(mc=zp(['
'])),e.mimeType));(e.mimeType.includes("json")||e.mimeType.includes("xml")||e.mimeType.includes("text"))&&(a=es(e.schema,{}),"table"===this.schemaStyle?n=z(gc||(gc=zp([" ",' '])),n,e.mimeType.substring(e.mimeType.indexOf("/")+1),this.selectedRequestBodyType===e.mimeType?"block":"none",a,this.schemaExpandLevel,this.schemaDescriptionExpanded):"tree"===this.schemaStyle&&(n=z(yc||(yc=zp([" ",' '])),n,e.mimeType.substring(e.mimeType.indexOf("/")+1),this.selectedRequestBodyType===e.mimeType?"block":"none",a,this.schemaExpandLevel,this.schemaDescriptionExpanded)))}),z(bc||(bc=zp([' REQUEST BODY ',' ',' ',"
"," ","
"])),this.selectedRequestBodyType,this.request_body.required?z(xc||(xc=zp(['* ']))):"",this.selectedRequestBodyType,e,this.request_body.description?z(wc||(wc=zp(['',"
"])),Da(ce()(this.request_body.description))):"",this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")?z(kc||(kc=zp([' "])),e=>{"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)},"model"===this.activeSchemaTab?"active":"","example"===this.activeSchemaTab?"active":"",z(Sc||(Sc=zp([' ',"
"])),"model"===this.activeSchemaTab?"block":"none",n),z(Ac||(Ac=zp([' ',"
"])),"model"===this.activeSchemaTab?"none":"block",o)):z(Oc||(Oc=zp([" "," ",""])),t,r))}formDataTemplate(e,t,r=""){const n=[];if(e.properties){for(const r in e.properties){var o,a,i;const s=e.properties[r],c=s.type,l=es(s,{}),u=Yi(s),p=ts("",s.example?s.example:"",s,"json",!1,"text");n.push(z(Ec||(Ec=zp([' ','
','
'," "," ",""])),s.required?z(Dc||(Dc=zp(['* ',""])),r):z(Cc||(Cc=zp(["",""])),r),u.type,"object"===c?"width:100%; padding:0;":"true"===this.allowTry?"width:160px;":"display:none;","object"===c?2:1,"array"===c?"binary"===(null===(o=s.items)||void 0===o?void 0:o.format)?z(jc||(jc=zp([' '])),e=>this.onAddRemoveFileInput(e,r,t),r,t.includes("form-urlencode")?"form-urlencode":"form-data"):z(_c||(_c=zp([' '])),t.includes("form-urlencode")?"form-urlencode":"form-data",r,Array.isArray(s.example)?s.example.join("~|~"):s.example||"",Array.isArray(s.example)?s.example:s.example.split(",")):z(Tc||(Tc=zp([" ",""])),"object"===c?z(Ic||(Ic=zp([' "])),e=>{if(e.target.classList.contains("v-tab-btn")){const t=e.target.dataset.tab;if(t){const r=e.target.closest(".tab-panel"),n=r.querySelector('.v-tab-btn[data-tab="'.concat(t,'"]')),o=[...r.querySelectorAll('.v-tab-btn:not([data-tab="'.concat(t,'"])'))],a=r.querySelector('.tab-content[data-tab="'.concat(t,'"]')),i=[...r.querySelectorAll('.tab-content:not([data-tab="'.concat(t,'"])'))];n.classList.add("active"),a.style.display="block",o.forEach(e=>{e.classList.remove("active")}),i.forEach(e=>{e.style.display="none"})}}"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)},"model"===this.activeSchemaTab?"active":"","example"===this.activeSchemaTab?"active":"",z(Fc||(Fc=zp(['
'])),"model"===this.activeSchemaTab?"block":"none",l,this.schemaExpandLevel,this.schemaDescriptionExpanded),z(Pc||(Pc=zp(['
"])),"example"===this.activeSchemaTab?"block":"none",t.includes("form-urlencode")?"form-urlencode":"form-data",r,(null===(a=p[0])||void 0===a?void 0:a.exampleValue)||"","true"===this.fillRequestFieldsWithExample?p[0].exampleValue:"",r,t.includes("form-urlencode")?"hidden-form-urlencode":"hidden-form-data",p[0].exampleValue)):z(Rc||(Rc=zp([" "," "])),"true"===this.allowTry?z(Bc||(Bc=zp([' '])),"true"===this.fillRequestFieldsWithExample&&s.example||"","binary"===s.format?"file":"password"===s.format?"password":"text",t.includes("form-urlencode")?"form-urlencode":"form-data",r,s.example||""):"")),"object"===c?"":z(Lc||(Lc=zp([" "," "])),u.default||u.constrain||u.allowedValues||u.pattern?z(Nc||(Nc=zp([' '," "," "," ","
"])),u.default?z(Mc||(Mc=zp(['Default: '," "])),u.default):"",u.pattern?z(qc||(qc=zp(['Pattern: '," "])),u.pattern):"",u.constrain?z(zc||(zc=zp([""," "])),u.constrain):"",u.allowedValues&&u.allowedValues.split(",").map((e,t)=>z(Uc||(Uc=zp([" "," ",""])),t>0?" | ":z($c||($c=zp([' Allowed: ']))),z(Hc||(Hc=zp([' '," "])),"true"===this.allowTry?"":"inactive-link","array"===u.type?u.type:"string",e.trim(),e=>{const t=e.target.closest("table").querySelector('[data-pname="'.concat(r,'"]'));t&&("array"===e.target.dataset.type?t.value=[e.target.dataset.enum]:t.value=e.target.dataset.enum)},e)))):""),"object"===c?"":z(Wc||(Wc=zp([' '," "," "])),Da(ce()(s.description||"")),u.example?z(Vc||(Vc=zp([' Example: ',' '," "," "])),"array"===u.type?"[ ":"","true"===this.allowTry?"":"inactive-link","array"===u.type?u.type:"string","array"===u.type?(null===(i=u.example)||void 0===i?void 0:i.join("~|~"))||"":u.example,e=>{const t=e.target.closest("table").querySelector('[data-pname="'.concat(r,'"]'));t&&("array"===e.target.dataset.exampleType?t.value=e.target.dataset.example.split("~|~"):t.value=e.target.dataset.example)},"array"===u.type?u.example.join(", "):u.example,"array"===u.type?"] ":""):"")))}return z(Yc||(Yc=zp([' "])),n)}return z(Kc||(Kc=zp([' "," "])),t,t,r,e.description?z(Gc||(Gc=zp([''," "])),Da(ce()(e.description))):"")}apiResponseTabTemplate(){const e=this.responseHeaders.includes("json")?"json":this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?"html":"";return z(Jc||(Jc=zp([' Response Status: ','
CLEAR RESPONSE RESPONSE RESPONSE HEADERS CURL
','
"])),this.responseStatus,this.responseMessage,this.clearResponseData,e=>{!1!==e.target.classList.contains("tab-btn")&&(this.activeResponseTab=e.target.dataset.tab)},"response"===this.activeResponseTab?"active":"","headers"===this.activeResponseTab?"active":"","curl"===this.activeResponseTab?"active":"",this.responseIsBlob?z(Qc||(Qc=zp([' DOWNLOAD ',"
"])),"response"===this.activeResponseTab?"flex":"none",this.downloadResponseBlob,"view"===this.responseBlobType?z(Xc||(Xc=zp(['VIEW (NEW TAB) '])),this.viewResponseBlob):""):z(Zc||(Zc=zp([' "])),"response"===this.activeResponseTab?"flex":"none",e=>{Pe(this.responseText,e)},e?z(el||(el=zp(["","
"])),Da(ue.a.highlight(this.responseText,ue.a.languages[e],e))):"".concat(this.responseText)),"headers"===this.activeResponseTab?"flex":"none",e=>{Pe(this.responseHeaders,e)},Da(ue.a.highlight(this.responseHeaders,ue.a.languages.css,"css")),"curl"===this.activeResponseTab?"flex":"none",e=>{Pe(this.curlSyntax.replace(/\\$/,""),e)},Da(ue.a.highlight(this.curlSyntax.trim().replace(/\\$/,""),ue.a.languages.shell,"shell")))}apiCallTemplate(){var e;let t="";this.servers&&this.servers.length>0&&(t=z(tl||(tl=zp([' '," "])),e=>{this.serverUrl=e.target.value},this.servers.map(e=>z(rl||(rl=zp([' '," - "," "])),e.url,e.url,e.description))));const r=z(nl||(nl=zp([' '," ","
"])),t,this.serverUrl?z(ol||(ol=zp([' "])),this.serverUrl):"");return z(al||(al=zp([' '," "])),r,this.api_keys.length>0?z(il||(il=zp([' ',"
"])),1===this.api_keys.length?"".concat(null===(e=this.api_keys[0])||void 0===e?void 0:e.typeDisplay," in ").concat(this.api_keys[0].in):"".concat(this.api_keys.length," API keys applied")):z(sl||(sl=zp(['No API key applied
']))),this.parameters.length>0||this.request_body?z(cl||(cl=zp([' FILL EXAMPLE CLEAR '])),this.onFillRequestData,this.onClearRequestData):"",this.onTryClick,""===this.responseMessage?"":this.apiResponseTabTemplate())}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(e=>{e.dataset.example&&("TAG-INPUT"===e.tagName.toUpperCase()?e.value=e.dataset.example.split("~|~"):e.value=e.dataset.example)})}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(e=>{e.value=""})}async onTryClick(e){var t;const r=this,n=e.target;let o,a,i="",s="",c="",l="";const u=null===(t=this.closest(".expanded-req-resp-container, .req-resp-container"))||void 0===t?void 0:t.getElementsByTagName("api-response")[0],p=null==u?void 0:u.selectedMimeType,f=e.target.closest(".request-panel"),d=[...f.querySelectorAll("[data-ptype='path']")],h=[...f.querySelectorAll("[data-ptype='query']")],v=[...f.querySelectorAll("[data-ptype='query-object']")],m=[...f.querySelectorAll("[data-ptype='header']")],g=f.querySelector(".request-body-container");o=r.path;const y={method:this.method.toUpperCase(),headers:{}};if(d.map(e=>{o=o.replace("{".concat(e.dataset.pname,"}"),encodeURIComponent(e.value))}),h.length>0){const e=new URLSearchParams;h.forEach(t=>{if("false"===t.dataset.array)""!==t.value&&e.append(t.dataset.pname,t.value);else{const r=t.dataset.paramSerializeStyle,n=t.dataset.paramSerializeExplode,o=t.value&&Array.isArray(t.value)?t.value:[];"spaceDelimited"===r?e.append(t.dataset.pname,o.join(" ").replace(/^\s|\s$/g,"")):"pipeDelimited"===r?e.append(t.dataset.pname,o.join("|").replace(/^\||\|$/g,"")):"true"===n?o.forEach(r=>{e.append(t.dataset.pname,r)}):e.append(t.dataset.pname,o.join(",").replace(/^,|,$/g,""))}}),o="".concat(o).concat(e.toString()?"?":"").concat(e.toString())}if(v.length>0){const e=new URLSearchParams;v.map(t=>{try{let r={};const n=t.dataset.paramSerializeStyle,a=t.dataset.paramSerializeExplode;r=Object.assign(r,JSON.parse(t.value.replace(/\s+/g," ")));for(const t in r)"object"==typeof r[t]?Array.isArray(r[t])&&("spaceDelimited"===n?e.append(t,r[t].join(" ")):"pipeDelimited"===n?e.append(t,r[t].join("|")):"true"===a?r[t].forEach(r=>{e.append(t,r)}):e.append(t,r[t])):e.append(t,r[t]);o="".concat(o).concat(e.toString()?"?":"").concat(e.toString())}catch(e){console.log("RapiDoc: unable to parse %s into object",t.value)}})}if(this.api_keys.filter(e=>"query"===e.in).forEach(e=>{o="".concat(o).concat(o.includes("?")?"&":"?").concat(e.name,"=").concat(encodeURIComponent(e.finalKeyValue))}),o="".concat(this.serverUrl.replace(/\/$/,"")).concat(o),!1===o.startsWith("http")){a=new URL(o,window.location.href).href}else a=o;if(i="curl -X ".concat(this.method.toUpperCase(),' "').concat(a,'" \\\n'),p?(y.headers.Accept=p,s+=' -H "Accept: '.concat(p,'" \\\n')):this.accept&&(y.headers.Accept=this.accept,s+=' -H "Accept: '.concat(this.accept,'" \\\n')),this.api_keys.filter(e=>"header"===e.in).forEach(e=>{y.headers[e.name]=e.finalKeyValue,s+=' -H "'.concat(e.name,": ").concat(e.finalKeyValue,'" \\\n')}),m.map(e=>{e.value&&(y.headers[e.dataset.pname]=e.value,s+=' -H "'.concat(e.dataset.pname,": ").concat(e.value,'" \\\n'))}),g){const e=g.dataset.selectedRequestBodyType;if(e.includes("form-urlencoded")){const e=f.querySelector("[data-ptype='dynamic-form']");if(e){const t=e.value,r=new URLSearchParams;let n,o=!0;if(t)try{n=JSON.parse(t)}catch(e){o=!1,console.warn("RapiDoc: Invalid JSON provided",e)}else o=!1;if(o){for(const e in n)r.append(e,JSON.stringify(n[e]));y.body=r,c=" -d ".concat(r.toString()," \\\n")}}else{const e=[...f.querySelectorAll("[data-ptype='form-urlencode']")],t=new URLSearchParams;e.filter(e=>"file"!==e.type).forEach(e=>{if("false"===e.dataset.array)e.value&&t.append(e.dataset.pname,e.value);else{const r=e.value&&Array.isArray(e.value)?e.value.join(","):"";t.append(e.dataset.pname,r)}}),y.body=t,c=" -d ".concat(t.toString()," \\\n")}}else if(e.includes("form-data")){const e=new FormData;[...f.querySelectorAll("[data-ptype='form-data']")].forEach(t=>{"false"===t.dataset.array?"file"===t.type&&t.files[0]?(e.append(t.dataset.pname,t.files[0],t.files[0].name),l+=' -F "'.concat(t.dataset.pname,"=@").concat(t.files[0].name,'" \\\n')):t.value&&(e.append(t.dataset.pname,t.value),l+=' -F "'.concat(t.dataset.pname,"=").concat(t.value,'" \\\n')):t.value&&Array.isArray(t.value)&&(t.value.forEach(e=>{l="".concat(l,' -F "').concat(t.dataset.pname,"[]=").concat(e,'" \\\n')}),e.append(t.dataset.pname,t.value.join(",")))}),y.body=e}else if(RegExp("^audio/|^image/|^video/|^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$").test(e)){const e=f.querySelector(".request-body-param-file");e&&e.files[0]&&(y.body=e.files[0],c=" --data-binary @".concat(e.files[0].name," \\\n"))}else if(e.includes("json")||e.includes("xml")||e.includes("text")){const e=f.querySelector(".request-body-param-user-input");if(e&&e.value){y.body=e.value;try{c=" -d '".concat(JSON.stringify(JSON.parse(e.value)),"' \\\n")}catch(t){c=" -d '".concat(e.value.replace(/(\r\n|\n|\r)/gm,""),"' \\\n")}}}e.includes("form-data")||(y.headers["Content-Type"]=e),s+=' -H "Content-Type: '.concat(e,'" \\\n')}r.responseUrl="",r.responseHeaders="",r.curlSyntax="",r.responseStatus="success",r.responseIsBlob=!1,r.respContentDisposition="",r.responseBlobUrl&&(URL.revokeObjectURL(r.responseBlobUrl),r.responseBlobUrl=""),r.curlSyntax="".concat(i).concat(s).concat(c).concat(l);try{let e,t,a;n.disabled=!0;const i=await fetch(o,y);n.disabled=!1,r.responseStatus=i.ok?"success":"error",r.responseMessage="".concat(i.statusText,":").concat(i.status),r.responseUrl=i.url,i.headers.forEach((e,t)=>{r.responseHeaders="".concat(r.responseHeaders).concat(t.trim(),": ").concat(e,"\n")});const s=i.headers.get("content-type");if(s){if(s.includes("json"))if(/charset=[^"']+/.test(s)){const e=s.split("charset=")[1],t=await i.arrayBuffer();try{a=new TextDecoder(e).decode(t)}catch{a=new TextDecoder("utf-8").decode(t)}try{r.responseText=JSON.stringify(JSON.parse(a),null,2)}catch{r.responseText=a}}else t=await i.json(),r.responseText=JSON.stringify(t,null,2);else RegExp("^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$").test(s)?(r.responseIsBlob=!0,r.responseBlobType="download"):RegExp("^audio|^image|^video").test(s)?(r.responseIsBlob=!0,r.responseBlobType="view"):(a=await i.text(),r.responseText=a);if(r.responseIsBlob){const t=i.headers.get("content-disposition");r.respContentDisposition=t?t.split("filename=")[1]:"filename",e=await i.blob(),r.responseBlobUrl=URL.createObjectURL(e)}}else a=await i.text(),r.responseText=a;this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{fetchUrl:o,fetchOptions:y,responseStatus:r.responseStatus,responseContentType:s,responseIsBlob:r.responseIsBlob,response:t||a||e}}))}catch(e){n.disabled=!1,r.responseMessage="".concat(e.message," (CORS or Network Issue)"),document.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:e,url:o,options:y}}))}}onAddRemoveFileInput(e,t,r){if("button"!==e.target.tagName.toLowerCase())return;if(e.target.classList.contains("file-input-remove-btn")){return void e.target.closest(".input-set").remove()}const n=e.target.closest(".file-input-container"),o=document.createElement("div");o.setAttribute("class","input-set row");const a=document.createElement("input");a.type="file",a.style="width:200px; margin-top:2px;",a.setAttribute("data-pname",t),a.setAttribute("data-ptype",r.includes("form-urlencode")?"form-urlencode":"form-data"),a.setAttribute("data-array","false"),a.setAttribute("data-file-array","true");const i=document.createElement("button");i.setAttribute("class","file-input-remove-btn"),i.innerHTML="✕",o.appendChild(a),o.appendChild(i),n.insertBefore(o,e.target)}downloadResponseBlob(){if(this.responseBlobUrl){const e=document.createElement("a");document.body.appendChild(e),e.style="display: none",e.href=this.responseBlobUrl,e.download=this.respContentDisposition,e.click(),e.remove()}}viewResponseBlob(){if(this.responseBlobUrl){const e=document.createElement("a");document.body.appendChild(e),e.style="display: none",e.href=this.responseBlobUrl,e.target="_blank",e.click(),e.remove()}}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl="")}disconnectedCallback(){this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),super.disconnectedCallback()}});function $p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("schema-table",class extends ae{static get properties(){return{schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},data:{type:Object}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false")}static get styles(){return[he,Np,ne(ll||(ll=Up([".table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px)}.table .tr{width:calc(100% - 5px);padding:0 0 0 5px;border-bottom:1px dotted var(--light-border-color)}.table .td{padding:4px 0}.table .key{width:240px}.key.deprecated .key-label{text-decoration:line-through}.table .key-type{white-space:normal;width:85px}.collapsed-descr .tr{max-height:calc(var(--font-size-small) + var(--font-size-small) + 4px)}.obj-toggle{padding:0 2px;border-radius:2px;border:1px solid transparent;display:inline-block;margin-left:-16px;color:var(--primary-color);cursor:pointer;font-size:calc(var(--font-size-small) + 4px);font-family:var(--font-mono);background-clip:border-box}.obj-toggle:hover{border-color:var(--primary-color)}.tr.expanded+.object-body{display:block}.tr.collapsed+.object-body{display:none}"]))),Te]}render(){var e,t;return z(ul||(ul=Up([' "])),"true"===this.schemaDescriptionExpanded?"expanded-descr":"collapsed-descr",()=>{this.schemaDescriptionExpanded="true"===this.schemaDescriptionExpanded?"false":"true"},"true"===this.schemaDescriptionExpanded?"Single line description":"Multiline description",(null===(e=this.data)||void 0===e?void 0:e["::type"])||"",(null===(t=this.data)||void 0===t?void 0:t["::type"])||"",this.data?Da(ce()(this.data["::description"]||"")):"",this.data?z(pl||(pl=Up([" ",""])),this.generateTree("array"===this.data["::type"]?this.data["::props"]:this.data,this.data["::type"])):"")}generateTree(e,t="object",r="",n="",o=0){var a;const i=16*o;if(!e)return z(fl||(fl=Up(['null
'])));if(0===Object.keys(e).length)return z(dl||(dl=Up([''," "])),i,r);let s="",c="",l=!1;if(r.startsWith("::ONE~OF")||r.startsWith("::ANY~OF"))s=r.replace("::","").replace("~"," "),l=!0;else if(r.startsWith("::OPTION")){const e=r.split("~");s=e[1],c=e[2]}else s=r;let u="";if("object"===e["::type"]?u="array"===t?"array":"object":"array"===e["::type"]&&(u="array"===t?"array of array":"array"),"object"==typeof e)return z(hl||(hl=Up([" ",' "])),o>0?z(vl||(vl=Up([' "])),o '," "])),othis.toggleObjectExpand(e,s),o',''," "])),s,l?"xxx-of-key":"xxx-of-descr",c):s.endsWith("*")?z(yl||(yl=Up([' ',' * '])),s.substring(0,s.length-1)):z(bl||(bl=Up([''," "])),s),"xxx-of"===e["::type"]&&"array"===t?z(xl||(xl=Up(['ARRAY ']))):"",(e["::type"]||"").includes("xxx-of")?"":u,Da(ce()(n||""))):z(wl||(wl=Up([" "," "])),"array"===e["::type"]&&"array"===t?z(kl||(kl=Up(['"])),t):""),Array.isArray(e)&&e[0]?z(Sl||(Sl=Up(["",""])),this.generateTree(e[0],"xxx-of-option","::ARRAY~OF","",o)):z(Al||(Al=Up([" "," "])),Object.keys(e).map(t=>z(Ol||(Ol=Up([" "," "])),["::description","::type","::props","::deprecated"].includes(t)?"array"===e[t]["::type"]||"object"===e[t]["::type"]?z(El||(El=Up(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1)):"":z(Dl||(Dl=Up(["",""])),this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],t,e[t]["::description"],o+1))))));const p=e.split("~|~"),f=p[0].replace("{","").substring(0,4).toLowerCase();return z(Cl||(Cl=Up([' ','
',' ','
'," "," "," "," "," ","
"])),p[8],i,null!==(a=s)&&void 0!==a&&a.endsWith("*")?z(jl||(jl=Up(['',' * '])),s.substring(0,s.length-1)):r.startsWith("::OPTION")?z(_l||(_l=Up(['',' '," "])),s,c):z(Tl||(Tl=Up(["",""])),s?z(Il||(Il=Up([' '," "])),s):z(Fl||(Fl=Up([''," "])),p[7])),f,"array"===t?"[".concat(p[0],"]"):p[0],p[1],"array"===t?n:"",p[2]?z(Pl||(Pl=Up(['',"
"])),p[2]):"",p[3]?z(Rl||(Rl=Up(['Default: ',"
"])),p[3]):"",p[4]?z(Bl||(Bl=Up(['Allowed: ',"
"])),p[4]):"",p[5]?z(Ll||(Ll=Up(['Pattern: ',"
"])),p[5]):"",p[6]?z(Nl||(Nl=Up([''," "])),Da(ce()(p[6]))):"")}toggleObjectExpand(e){const t=e.target.closest(".tr");t.classList.contains("expanded")?(t.classList.add("collapsed"),t.classList.remove("expanded"),e.target.innerText="+"):(t.classList.remove("collapsed"),t.classList.add("expanded"),e.target.innerText="-")}});function Hp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Wp(e,t=""){var r,n;const o=new Set;for(const t in e.responses)for(const r in null===(a=e.responses[t])||void 0===a?void 0:a.content){var a;o.add(r.trim())}const i=[...o].join(", "),s=this.resolvedSpec.securitySchemes.filter(t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some(e=>t.apiKeyId in e))})||[],c=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId&&"-"!==e.value);c&&s.push(c);const l=e.xCodeSamples?Fi.call(this,e.xCodeSamples):"";return z(bu||(bu=Hp([" ",' '])),"read"===this.renderStyle?z(xu||(xu=Hp(['
']))):"",e.method,e.deprecated?"deprecated":"",e.elementId,"focused"===this.renderStyle?z(wu||(wu=Hp([' '," "])),t):"",e.deprecated?z(ku||(ku=Hp([' DEPRECATED
']))):"",z(Su||(Su=Hp([" ",' '," ","
"])),e.shortSummary||"".concat(e.method.toUpperCase()," ").concat(e.path),e.method,e.method,e.path),e.description?z(Au||(Au=Hp([' ',"
"])),Da(ce()(e.description))):"",Ti.call(this,e.security),l,e.method,e.path,e.parameters,e.requestBody,s,e.servers,(null===(r=e.servers)||void 0===r||null===(n=r[0])||void 0===n?void 0:n.url)||this.selectedServer.computedUrl,this.fillRequestFieldsWithExample,this.allowTry,i,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded,e.callbacks?Ri.call(this,e.callbacks):"",e.responses,this.renderStyle,this.schemaStyle,this.defaultSchemaTab,this.schemaExpandLevel,this.schemaDescriptionExpanded,Object.keys(e.responses||{})[0]||"")}function Vp(){return z(Ou||(Ou=Hp([" "," "])),this.resolvedSpec.tags.map(e=>z(Eu||(Eu=Hp([' ',"
"])),e.elementId,e.name,Da("".concat(ce()(e.description?e.description:""),"
")),e.paths.map(e=>Wp.call(this,e,"BBB")))))}function Yp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Kp(e){return z(Du||(Du=Yp(['
',"
"])),e.name,e.id,z(Cu||(Cu=Yp([" "," "," "])),e.name,e.component?z(ju||(ju=Yp(['
'])),this.renderStyle,e.component):""))}function Gp(){return z(_u||(_u=Yp([" "," "])),this.resolvedSpec.components.map(e=>z(Tu||(Tu=Yp([' ',"
"])),e.name.toLowerCase(),e.name,Da("".concat(ce()(e.description?e.description:""),"
")),e.subComponents.map(e=>Kp.call(this,e)))))}function Jp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Qp(){const e=new ce.a.Renderer;return e.heading=(e,t,r,n)=>"').concat(e," "),e}function Xp(){var e,t,r;return z(Iu||(Iu=Jp([' ',"
"])),"view"===this.renderStyle?"section-gap":"section-gap--read-mode",null!==(e=this.resolvedSpec)&&void 0!==e&&e.info?z(Fu||(Fu=Jp([' '," ",'
'," "," "," ",'
',"
"])),this.resolvedSpec.info.title,this.resolvedSpec.info.version?z(Pu||(Pu=Jp([' '," "])),this.resolvedSpec.info.version):"",null!==(t=this.resolvedSpec.info.contact)&&void 0!==t&&t.email?z(Ru||(Ru=Jp(["",': '," "])),this.resolvedSpec.info.contact.name||"Email",this.resolvedSpec.info.contact.email,this.resolvedSpec.info.contact.email):"",null!==(r=this.resolvedSpec.info.contact)&&void 0!==r&&r.url?z(Bu||(Bu=Jp(['URL: '," "])),this.resolvedSpec.info.contact.url,this.resolvedSpec.info.contact.url):"",this.resolvedSpec.info.license?z(Lu||(Lu=Jp(["License: "," "])),this.resolvedSpec.info.license.url?z(Nu||(Nu=Jp([''," "])),this.resolvedSpec.info.license.url,this.resolvedSpec.info.license.name):this.resolvedSpec.info.license.name):"",this.resolvedSpec.info.termsOfService?z(Mu||(Mu=Jp(['Terms of Service '])),this.resolvedSpec.info.termsOfService):"",this.resolvedSpec.info.description?z(qu||(qu=Jp(["",""])),Da('\n \n '.concat(ce()(this.resolvedSpec.info.description,"true"===this.infoDescriptionHeadingsInNavBar?{renderer:Qp()}:void 0),"\n
"))):""):"")}function Zp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ef(e,t){e&&e.target.checked&&(this.selectedServer=t,this.requestUpdate())}function tf(e,t){const r=[...e.currentTarget.closest("table").querySelectorAll("input, select")];let n=t.url;r.forEach(e=>{const t=new RegExp("{".concat(e.dataset.var,"}"),"g");n=n.replace(t,e.value)}),t.computedUrl=n,this.requestUpdate()}function rf(){return this.selectedServer&&this.selectedServer.variables?z(zu||(zu=Zp([' SERVER VARIABLES
"])),Object.entries(this.selectedServer.variables).map(e=>z(Uu||(Uu=Zp([' '," "," "," "])),e[0],e[1].enum?z($u||($u=Zp([' '," "])),e[0],e=>{tf.call(this,e,this.selectedServer)},Object.entries(e[1].enum).map(t=>e[1].default===t[1]?z(Hu||(Hu=Zp([' '])),t[1],t[1]):z(Wu||(Wu=Zp([' '])),t[1],t[1]))):z(Vu||(Vu=Zp([' '])),e[0],e[1].default,e=>{tf.call(this,e,this.selectedServer)}),e[1].description?z(Yu||(Yu=Zp([' '," "])),Da(ce()(e[1].description))):""))):""}function nf(){var e,t,r;return z(Ku||(Ku=Zp([' "])),"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap",0===(null===(e=this.resolvedSpec.servers)||void 0===e?void 0:e.length)?"":z(Gu||(Gu=Zp([" "," "])),null===(t=this.resolvedSpec)||void 0===t?void 0:t.servers.map((e,t)=>z(Ju||(Ju=Zp([' '," "," "])),t,e.url,t=>{ef.call(this,t,e)},this.selectedServer.url===e.url,t,e.url,e.description?z(Qu||(Qu=Zp(['- '," "])),e.description):""))),null===(r=this.selectedServer)||void 0===r?void 0:r.computedUrl,rf.call(this))}function of(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function af(e,t="toggle"){const r=null==e?void 0:e.closest(".nav-bar-tag-and-paths");if(r){const e=r.classList.contains("expanded");!e||"toggle"!==t&&"collapse"!==t?e||"toggle"!==t&&"expand"!==t||r.classList.replace("collapsed","expanded"):r.classList.replace("expanded","collapsed")}}function sf(e){af(e.target,"toggle")}function cf(e,t="expand-all"){!function(e,t="expand-all"){const r=[...e.querySelectorAll(".nav-bar-tag-and-paths")];"expand-all"===t?r.map(e=>{e.classList.replace("collapsed","expanded")}):r.map(e=>{e.classList.replace("expanded","collapsed")})}(e.target.closest(".nav-scroll"),t)}function lf(){return z(Xu||(Xu=of([' "])),this.renderStyle,"false"===this.allowSearch&&"false"===this.allowAdvancedSearch?"":z(Zu||(Zu=of([' '," ","
"])),"false"===this.allowAdvancedSearch?"border-bottom: 1px solid var(--nav-hover-bg-color)":"","false"===this.allowSearch?"":z(ep||(ep=of([' '," "])),this.onSearchChange,this.matchPaths?z(tp||(tp=of([' CLEAR
'])),this.onClearSearch):""),"false"===this.allowAdvancedSearch||this.matchPaths?"":z(rp||(rp=of([' '," "])),this.onShowSearchModalClicked,"false"===this.allowSearch?"Search":"Adv. Search")),z(np||(np=of([' '," "," ",' '," "," "])),"false"!==this.showInfo&&this.resolvedSpec.info?z(op||(op=of([" "," "])),"true"===this.infoDescriptionHeadingsInNavBar?z(ap||(ap=of([" "," "," "," "])),this.resolvedSpec.infoDescriptionHeaders.length>0?z(ip||(ip=of([' Overview
'])),e=>this.scrollToEventTarget(e,!1)):"",this.resolvedSpec.infoDescriptionHeaders.map(e=>z(sp||(sp=of([' ',"
"])),e.depth,(new ce.a.Slugger).slug(e.text),(new ce.a.Slugger).slug(e.text),e=>this.scrollToEventTarget(e,!1),e.text)),this.resolvedSpec.infoDescriptionHeaders.length>0?z(cp||(cp=of([' ']))):""):z(lp||(lp=of([' Overview
'])),e=>this.scrollToEventTarget(e,!1))):"","false"===this.allowServerSelection?"":z(up||(up=of([' API Servers
'])),e=>this.scrollToEventTarget(e,!1)),"false"!==this.allowAuthentication&&this.resolvedSpec.securitySchemes?z(pp||(pp=of([' Authentication
'])),e=>this.scrollToEventTarget(e,!1)):"","focused"===this.renderStyle?z(fp||(fp=of([' ▸
▸
'])),e=>{cf.call(this,e,"expand-all")},e=>{cf.call(this,e,"collapse-all")}):"",this.resolvedSpec.tags.filter(e=>e.paths.filter(e=>Re(this.matchPaths,e)).length).map(e=>z(dp||(dp=of([' "])),e.expanded?"expanded":"collapsed",e.elementId,e.elementId,e=>{this.scrollToEventTarget(e,!1)},e.name,e=>{sf.call(this,e)},e.paths.filter(e=>!this.matchPaths||Re(this.matchPaths,e)).map(e=>z(hp||(hp=of([' ',"
"])),"true"===this.usePathInNavBar?"small-font":"",e.elementId,e.elementId,e=>{this.scrollToEventTarget(e,!1)},e.deprecated?"filter:opacity(0.5)":"","true"===this.usePathInNavBar?z(vp||(vp=of([''," "," "])),e.method.toUpperCase(),e.path):e.summary||e.shortSummary)))),"false"!==this.showComponents&&this.resolvedSpec.components?z(mp||(mp=of([' '," "])),this.resolvedSpec.components.map(e=>e.subComponents.length?z(gp||(gp=of([' ',"
"," "])),e.name.toLowerCase(),e.name.toLowerCase(),e=>this.scrollToEventTarget(e,!1),e.name,e.subComponents.map(e=>z(yp||(yp=of([' ',"
"])),e.id,e.id,e=>this.scrollToEventTarget(e,!1),e.name))):"")):""))}function uf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function pf(e){return z(bp||(bp=uf([' ',";
"])),e)}function ff(){var e;if("true"===this.showInfo)return pf(Xp.call(this));const t=this.resolvedSpec.tags[0],r=null===(e=this.resolvedSpec.tags[0])||void 0===e?void 0:e.paths[0];return pf(t&&r?Wp.call(this,r,t.name):"")}function df(e){return z(xp||(xp=uf([' '," "," "])),e.elementId,e.name,e.description?z(wp||(wp=uf([' ',"
"])),Da(ce()(e.description||""))):"")}function hf(){if(!this.focusedElementId)return;const e=this.focusedElementId;let t,r=null,n=null,o=0;if(e.startsWith("overview")&&"true"===this.showInfo)t=Xp.call(this);else if("auth"===e&&"true"===this.allowAuthentication)t=_i.call(this);else if("servers"===e&&"true"===this.allowServerSelection)t=nf.call(this);else if(e.startsWith("cmp--")&&"true"===this.showComponents)t=Gp.call(this);else if(e.startsWith("tag--"))n=this.resolvedSpec.tags.find(t=>t.elementId===e),t=n?pf.call(this,df.call(this,n)):ff.call(this);else{for(o=0;o"".concat(t.elementId)===e),!r);o+=1);if(r){af(this.shadowRoot.getElementById("link-".concat(e)),"expand"),t=pf.call(this,Wp.call(this,r,n.name))}else t=ff.call(this)}return t}function vf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mf(e){if(e.expanded)e.expanded=!1,window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0]));else{e.expanded=!0;const t="#".concat(e.elementId);window.location.hash!==t&&window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0]).concat(t))}this.requestUpdate()}function gf(e,t="expand-all"){const r=[...e.querySelectorAll(".section-tag")];"expand-all"===t?r.map(e=>{e.classList.replace("collapsed","expanded")}):r.map(e=>{e.classList.replace("expanded","collapsed")})}function yf(e,t="expand-all"){gf.call(this,e.target.closest(".operations-root"),t)}function bf(e){return z(kp||(kp=vf([' "])),t=>{mf.call(this,e,t)},e.method,e.deprecated?"deprecated":"",e.expanded?"expanded":"collapsed",e.method,e.deprecated?"deprecated":"",e.method,e.deprecated?"deprecated":"",e.path,e.deprecated?z(Sp||(Sp=vf([' deprecated ']))):"",e.summary||e.shotSummary)}function xf(e){const t=new Set;for(const n in e.responses)for(const o in null===(r=e.responses[n])||void 0===r?void 0:r.content){var r;t.add(o.trim())}const n=[...t].join(", "),o=this.resolvedSpec.securitySchemes.filter(t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some(e=>t.apiKeyId in e))})||[],a=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId&&"-"!==e.value);a&&o.push(a);const i=e.xCodeSamples?Fi(e.xCodeSamples):"";return z(Ap||(Ap=vf([' '])),e.method,e.deprecated?"deprecated":"",e.summary?z(Op||(Op=vf(['"])),e.summary):e.shortSummary!==e.description?z(Ep||(Ep=vf(['',"
"])),e.shortSummary):"",e.description?z(Dp||(Dp=vf([' ',"
"])),Da(ce()(e.description))):"",Ti.call(this,e.security),i,e.method,e.path,e.parameters,e.requestBody,o,e.servers,e.servers&&e.servers.length>0?e.servers[0].url:this.selectedServer.computedUrl,this.defaultSchemaTab,this.fillRequestFieldsWithExample,this.allowTry,n,this.renderStyle,this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,e.callbacks?Ri.call(this,e.callbacks):"",e.responses,this.defaultSchemaTab,this.renderStyle,this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,Object.keys(e.responses||{})[0]||"")}function wf(){return z(Cp||(Cp=vf([' Expand all | Collapse all sections
',""])),e=>yf(e,"expand-all"),e=>yf(e,"collapse-all"),this.resolvedSpec.tags.map(e=>z(jp||(jp=vf([' "])),e.expanded?"expanded":"collapsed",()=>{e.expanded=!e.expanded,this.requestUpdate()},e.elementId,e.name,Da(ce()(e.description||"")),e.paths.filter(e=>!this.matchPaths||Re(this.matchPaths,e)).map(e=>z(_p||(_p=vf([' '," ","
"])),e.elementId,e.method,e.expanded?"expanded":"collapsed",bf.call(this,e),e.expanded?xf.call(this,e):"")))))}function kf(e){return z(Tp||(Tp=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([' '])),e)}function Sf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Af(){return z(Ip||(Ip=Sf([' "])),kf("height:36px;width:36px;margin-left:5px"),this.headingText,"false"===this.allowSpecUrlLoad?"":z(Fp||(Fp=Sf([' ↩
'])),this.specUrl||"",this.onSepcUrlChange),"false"===this.allowSpecFileLoad?"":z(Pp||(Pp=Sf([' LOCAL JSON FILE '])),this.specFile||"",this.onSepcFileChange,this.onFileLoadClick),"false"===this.allowSearch||"read focused".includes(this.renderStyle)?"":z(Rp||(Rp=Sf([' ↩
'])),this.onSearchChange),"false"===this.allowSearch||"false"===this.allowAdvancedSearch||"read focused".includes(this.renderStyle)?"":z(Bp||(Bp=Sf([' Advanced Search '])),this.onShowSearchModalClicked))}customElements.define("api-response",class extends ae{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="model"}static get properties(){return{callback:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"}}}static get styles(){return[he,ye,Ee,xe,me,Vi,ne(Ml||(Ml=$p([".resp-head{vertical-align:middle;padding:16px 0 8px}.resp-head.divider{border-top:1px solid var(--border-color);margin-top:10px}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:calc(var(--font-size-small) + 1px);color:var(--light-fg)}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}.focused-mode,.read-mode{padding-top:24px;margin-top:12px;border-top:1px dashed var(--border-color)}"]))),Te]}render(){return z(ql||(ql=$p([' "])),this.renderStyle,"true"===this.callback?"tiny-title":"req-res-title","true"===this.callback?"CALLBACK RESPONSE":"RESPONSE",this.responseTemplate())}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const r in this.responses){this.selectedStatus||(this.selectedStatus=r);const n={};for(const t in null===(e=this.responses[r])||void 0===e?void 0:e.content){var e;const o=this.responses[r].content[t];this.selectedMimeType||(this.selectedMimeType=t);const a=es(o.schema,{}),i=ts(o.examples||"",o.example||"",o.schema,t,!0,t.includes("json")?"json":"text");n[t]={description:this.responses[r].description,examples:i,selectedExample:i[0]?i[0].exampleId:"",schemaTree:a}}const o=[];for(const e in null===(t=this.responses[r])||void 0===t?void 0:t.headers){var t;o.push({name:e,...this.responses[r].headers[e]})}this.headersForEachRespStatus[r]=o,this.mimeResponsesForEachStatus[r]=n}return z(zl||(zl=$p([" "," "," "])),Object.keys(this.responses).length>1?z(Ul||(Ul=$p([' ',"
"])),Object.keys(this.responses).map(e=>z($l||($l=$p([" ",""])),"$$ref"===e?"":z(Hl||(Hl=$p([' '," "])),()=>{this.selectedStatus=e,this.responses[e].content&&Object.keys(this.responses[e].content)[0]?this.selectedMimeType=Object.keys(this.responses[e].content)[0]:this.selectedMimeType=void 0},this.selectedStatus===e?"primary":"",e)))):z(Wl||(Wl=$p([""," "])),Object.keys(this.responses)[0]),Object.keys(this.responses).map(e=>{var t,r;return z(Vl||(Vl=$p([' "])),e===this.selectedStatus?"block":"none",Da(ce()((null===(t=this.responses[e])||void 0===t?void 0:t.description)||"")),this.headersForEachRespStatus[e]&&(null===(r=this.headersForEachRespStatus[e])||void 0===r?void 0:r.length)>0?z(Yl||(Yl=$p(["",""])),this.responseHeaderListTemplate(this.headersForEachRespStatus[e])):"",0===Object.keys(this.mimeResponsesForEachStatus[e]).length?"":z(Kl||(Kl=$p([' "])),e=>{"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)},"model"===this.activeSchemaTab?"active":"","example"===this.activeSchemaTab?"active":"",1===Object.keys(this.mimeResponsesForEachStatus[e]).length?z(Gl||(Gl=$p([' '," "])),Object.keys(this.mimeResponsesForEachStatus[e])[0]):z(Jl||(Jl=$p(["",""])),this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))),"example"===this.activeSchemaTab?z(Ql||(Ql=$p([' ',"
"])),this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])):z(Xl||(Xl=$p([' ',"
"])),this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType]))))}))}responseHeaderListTemplate(e){return z(Zl||(Zl=$p([' "])),e.map(e=>z(eu||(eu=$p([' ',' ',' ','
'," "])),e.name,e.schema.type?e.schema.type:"",Da(ce()(e.description||"")),e.schema.example?e.schema.example:"")))}mimeTypeDropdownTemplate(e){return z(tu||(tu=$p([' '," "])),e=>{this.selectedMimeType=e.target.value},e.map(e=>z(ru||(ru=$p([' '," "])),e,e===this.selectedMimeType,e)))}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return e?z(ou||(ou=$p([" "," "])),1===e.examples.length?z(au||(au=$p([" ",""])),"json"===e.examples[0].exampleFormat?z(iu||(iu=$p([' '])),this.renderStyle,e.examples[0].exampleValue,"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8"):z(su||(su=$p([' '," "])),"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8",e.examples[0].exampleValue)):z(cu||(cu=$p([' '," "," "])),"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8",e=>this.onSelectExample(e),e.examples.map(t=>z(lu||(lu=$p([' '," "])),t.exampleId,t.exampleId===e.selectedExample,t.exampleSummary.length>80?t.exampleId:t.exampleSummary)),e.examples.map(t=>z(uu||(uu=$p([' '," "," ","
"])),t.exampleId,t.exampleId===e.selectedExample?"block":"none",t.exampleSummary&&t.exampleSummary.length>80?z(pu||(pu=$p([' ',"
"])),t.exampleSummary):"",t.exampleDescription?z(fu||(fu=$p([' ',"
"])),Da(ce()(t.exampleDescription||""))):"","json"===t.exampleFormat?z(du||(du=$p([' '])),this.renderStyle,t.exampleValue):z(hu||(hu=$p([""," "])),t.exampleValue))))):z(nu||(nu=$p([' No example provided '])),"read"===this.renderStyle?"read example-panel border pad-8-16":"example-panel border-top")}mimeSchemaTemplate(e){return e?z(mu||(mu=$p([" ",""])),"table"===this.schemaStyle?z(gu||(gu=$p([' '])),"read"===this.renderStyle?"border pad-8-16":"border-top",this.renderStyle,e.schemaTree,this.schemaExpandLevel,this.schemaDescriptionExpanded):z(yu||(yu=$p([' '])),"read"===this.renderStyle?"border pad-8-16":"border-top",this.renderStyle,e.schemaTree,this.schemaExpandLevel,this.schemaDescriptionExpanded)):z(vu||(vu=$p([' Schema not found '])),"read"===this.renderStyle?"border pad-8-16":"border-top")}});var Of,Ef,Df,Cf,jf=ne(Lp||(Lp=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([".dialog-box-overlay{background-color:var(--overlay-bg);position:fixed;left:0;top:0;width:100vw;height:100vh;overflow:hidden;z-index:var(--dialog-z-index)}.dialog-box{position:fixed;top:100px;left:50%;transform:translate(-50%,0);display:flex;flex-direction:column;width:70vw;background-color:var(--bg2);color:var(--fg2);border-radius:4px;max-height:500px;overflow:hidden;border:1px solid var(--border-color);box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.dialog-box-header{position:sticky;top:0;align-self:stretch;display:flex;align-items:center;padding:20px 16px;box-sizing:border-box;min-height:60px;max-height:60px;border-bottom:1px solid var(--light-border-color);overflow:hidden}.dialog-box-header button{font-size:1.5rem;font-weight:700;line-height:1;color:var(--fg);border:none;outline:0;background-color:transparent;cursor:pointer;border:1px solid transparent;border-radius:50%;margin-right:-8px}.dialog-box-header button:hover{border-color:var(--primary-color)}.dialog-box-content{padding:16px;display:block;overflow:auto;height:100%}.dialog-box-title{flex-grow:1;font-size:24px}"])));function _f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Tf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function If(){var e;return document.addEventListener("close",()=>{this.showAdvancedSearchDialog=!1}),document.addEventListener("open",this.onOpenSearchDialog),z(Df||(Df=Tf([' '," "])),!!this.showAdvancedSearchDialog,e=>this.onAdvancedSearch(e,400),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),e=>this.onAdvancedSearch(e,0),null===(e=this.advancedSearchMatches)||void 0===e?void 0:e.map(e=>z(Cf||(Cf=Tf([' '," ",' ',"
"])),e.deprecated?"filter:opacity(0.5);":"",e.elementId,e=>{this.matchPaths="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(e,!0)},e.method,e.method,e.path,e.summary)))}customElements.define("dialog-box",class extends ae{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[jf]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",e=>{"Escape"===e.code&&this.onClose()})}attributeChangedCallback(e,t,r){t!==r&&("heading"===e&&(this.heading=r),"show"===e&&(this.show=r,"true"===r&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(e,t,r)}render(){return z(Of||(Of=_f([" ",""])),"true"===this.show?z(Ef||(Ef=_f([' '])),this.heading,this.onClose):"")}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});var Ff,Pf,Rf,Bf,Lf,Nf,Mf,qf,zf,Uf={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(e){if(0===e.indexOf("#")&&(e=e.slice(1,7)),3!==e.length&&4!==e.length||(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6!==e.length)throw new Error("Invalid HEX color.");return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}},luminanace(e){const t=this.getRgb(e);return.299*t.r+.587*t.g+.114*t.b},invert(e){return this.luminanace(e)>135?"#000":"#fff"},opacity(e,t){const r=this.getRgb(e);return"rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(t,")")},brightness(e,t){const r=this.getRgb(e);return r.r+=t,r.g+=t,r.b+=t,r.r>255?r.r=255:r.r<0&&(r.r=0),r.g>255?r.g=255:r.g<0&&(r.g=0),r.b>255?r.b=255:r.b<0&&(r.b=0),"#".concat(r.r.toString(16).padStart(2,"0")).concat(r.g.toString(16).padStart(2,"0")).concat(r.b.toString(16).padStart(2,"0"))},hasGoodContrast(e,t){return this.luminanace(e)-this.luminanace(t)}}};function $f(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(e)}function Hf(e,t={}){let r={};const n=t.primaryColor?t.primaryColor:"#ff591e",o=Uf.color.invert(n),a=Uf.color.opacity(n,"0.8");if("dark"===e){const e=t.bg1?t.bg1:"#333",i=t.fg1?t.fg1:"#bbb",s=t.bg2?t.bg2:Uf.color.brightness(e,5),c=t.bg3?t.bg3:Uf.color.brightness(e,17),l=t.bg3?t.bg3:Uf.color.brightness(e,35),u=t.fg2?t.fg2:Uf.color.brightness(i,-15),p=t.fg3?t.fg3:Uf.color.brightness(i,-20),f=t.fg3?t.fg3:Uf.color.brightness(i,-65),d=t.inlineCodeFg?t.inlineCodeFg:"#cdcdcd",h="#bbb",v="#eee",m=t.headerColor?t.headerColor:Uf.color.brightness(e,10),g=t.navBgColor?t.navBgColor:Uf.color.brightness(e,10);r={bg1:e,bg2:s,bg3:c,lightBg:l,fg1:i,fg2:u,fg3:p,lightFg:f,inlineCodeFg:d,primaryColor:n,primaryColorTrans:a,primaryColorInvert:o,selectionBg:h,selectionFg:v,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:g,navBgImage:t.navBgImage||"",navBgImageSize:t.navBgImageSize,navBgImageRepeat:t.navBgImageRepeat,navTextColor:t.navTextColor?t.navTextColor:Uf.color.opacity(Uf.color.invert(g),"0.65"),navHoverBgColor:t.navHoverBgColor?t.navHoverBgColor:Uf.color.brightness(g,-15),navHoverTextColor:t.navHoverTextColor?t.navHoverTextColor:Uf.color.invert(g),navAccentColor:t.navAccentColor?t.navAccentColor:Uf.color.brightness(n,25),headerColor:m,headerColorInvert:Uf.color.invert(m),headerColorDarker:Uf.color.brightness(m,-20),headerColorBorder:Uf.color.brightness(m,10),borderColor:t.borderColor?t.borderColor:Uf.color.brightness(e,20),lightBorderColor:t.lightBorderColor?t.lightBorderColor:Uf.color.brightness(e,15),codeBorderColor:t.codeBorderColor?t.codeBorderColor:Uf.color.brightness(e,30),codeBg:t.codeBg?t.codeBg:Uf.color.brightness(e,-10),codeFg:t.codeFg?t.codeFg:"#999",inputBg:t.inputBg?t.inputBg:Uf.color.brightness(e,-5),placeHolder:t.placeHolder?t.placeHolder:Uf.color.opacity(i,"0.3"),hoverColor:t.hoverColor?t.hoverColor:Uf.color.brightness(e,-10),red:t.red?t.red:"#F06560",lightRed:t.lightRed?t.lightRed:Uf.color.brightness(e,-10),green:t.green?t.green:"#99CC00",lightGreen:t.lightGreen?t.lightGreen:Uf.color.brightness(e,-10),blue:t.blue?t.blue:"#47AFE8",lightBlue:t.lightBlue?t.lightBlue:Uf.color.brightness(e,-10),orange:t.orange?t.orange:"#FF9900",lightOrange:t.lightOrange?t.lightOrange:Uf.color.brightness(e,-10),yellow:t.yellow?t.yellow:"#827717",lightYellow:t.lightYellow?t.lightYellow:Uf.color.brightness(e,-10),purple:t.purple?t.purple:"#786FF1",brown:t.brown?t.brown:"#D4AC0D"}}else{const e=t.bg1?t.bg1:"#ffffff",i=t.fg1?t.fg1:"#444444",s=t.bg2?t.bg2:Uf.color.brightness(e,-5),c=t.bg3?t.bg3:Uf.color.brightness(e,-15),l=t.bg3?t.bg3:Uf.color.brightness(e,-45),u=t.fg2?t.fg2:Uf.color.brightness(i,17),p=t.fg3?t.fg3:Uf.color.brightness(i,30),f=t.fg3?t.fg3:Uf.color.brightness(i,70),d=t.inlineCodeFg?t.inlineCodeFg:"brown",h="#444",v="#eee",m=t.headerColor?t.headerColor:Uf.color.brightness(e,-180),g=t.navBgColor?t.navBgColor:Uf.color.brightness(e,-180);r={bg1:e,bg2:s,bg3:c,lightBg:l,fg1:i,fg2:u,fg3:p,lightFg:f,inlineCodeFg:d,primaryColor:n,primaryColorTrans:a,primaryColorInvert:o,selectionBg:h,selectionFg:v,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:g,navBgImage:t.navBgImage||"",navBgImageSize:t.navBgImageSize||"",navBgImageRepeat:t.navBgImageRepeat,navTextColor:t.navTextColor?t.navTextColor:Uf.color.opacity(Uf.color.invert(g),"0.65"),navHoverBgColor:t.navHoverBgColor?t.navHoverBgColor:Uf.color.brightness(g,-15),navHoverTextColor:t.navHoverTextColor?t.navHoverTextColor:Uf.color.invert(g),navAccentColor:t.navAccentColor?t.navAccentColor:Uf.color.brightness(n,25),headerColor:m,headerColorInvert:Uf.color.invert(m),headerColorDarker:Uf.color.brightness(m,-20),headerColorBorder:Uf.color.brightness(m,10),borderColor:t.borderColor?t.borderColor:Uf.color.brightness(e,-38),lightBorderColor:t.lightBorderColor?t.lightBorderColor:Uf.color.brightness(e,-23),codeBorderColor:t.codeBorderColor?t.codeBorderColor:"#transparent",codeBg:t.codeBg?t.codeBg:"#555",codeFg:t.codeFg?t.codeFg:"#ccc",inputBg:t.inputBg?t.inputBg:Uf.color.brightness(e,10),placeHolder:t.placeHolder?t.placeHolder:Uf.color.brightness(f,20),hoverColor:t.hoverColor?t.hoverColor:Uf.color.brightness(e,-5),red:t.red?t.red:"#F06560",lightRed:t.lightRed?t.lightRed:"#fff0f0",green:t.green?t.green:"#48AD1A",lightGreen:t.lightGreen?t.lightGreen:"#fbfff0",blue:t.blue?t.blue:"#47AFE8",lightBlue:t.lightBlue?t.lightBlue:"#eff8fd",orange:t.orange?t.orange:"#FF9900",lightOrange:t.lightOrange?t.lightOrange:"#fff5e6",yellow:t.yellow?t.yellow:"#827717",lightYellow:t.lightYellow?t.lightYellow:"#fff5cc",purple:t.purple?t.purple:"#786FF1",brown:t.brown?t.brown:"#D4AC0D"}}return z(Ff||(Ff=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""])),this.layout||"row",this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace',this.regularFont||'rapidoc, "Open Sans", BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',"relaxed"===this.navItemSpacing?"10px":"compact"===this.navItemSpacing?"5px 10px":"7px 10px",this.responseAreaHeight,"default"===this.fontSize?"12px":"large"===this.fontSize?"13px":"14px","default"===this.fontSize?"13px":"large"===this.fontSize?"14px":"15px","default"===this.fontSize?"14px":"large"===this.fontSize?"15px":"16px",r.bg1,r.bg2,r.bg3,r.lightBg,r.fg1,r.fg2,r.fg3,r.lightFg,r.selectionBg,r.selectionFg,r.overlayBg,r.borderColor,r.lightBorderColor,r.codeBorderColor,r.codeBg,r.codeFg,r.inlineCodeFg,r.inputBg,r.placeHolder,r.hoverColor,r.red,r.lightRed,r.green,r.lightGreen,r.blue,r.lightBlue,r.orange,r.lightOrange,r.yellow,r.lightYellow,r.purple,r.brown,r.headerColor,r.headerColorInvert,r.headerColorDarker,r.headerColorBorder,r.navBgColor,r.navBgImage,r.navBgImageSize||"contain",r.navBgImageRepeat||"no-repeat",r.navTextColor,r.navHoverBgColor,r.navHoverTextColor,r.navAccentColor,r.primaryColor,r.primaryColorInvert,r.primaryColorTrans)}function Wf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vf(){const e={bg1:$f(this.bgColor)?this.bgColor:"",fg1:$f(this.textColor)?this.textColor:"",headerColor:$f(this.headerColor)?this.headerColor:"",primaryColor:$f(this.primaryColor)?this.primaryColor:"",navBgColor:$f(this.navBgColor)?this.navBgColor:"",navBgImage:this.navBgImage||"",navBgImageSize:this.navBgImageSize,navBgImageRepeat:this.navBgImageRepeat,navTextColor:$f(this.navTextColor)?this.navTextColor:"",navHoverBgColor:$f(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:$f(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:$f(this.navAccentColor)?this.navAccentColor:""};return z(Pf||(Pf=Wf([" "," "," ",' '])),"dark"===this.theme?Hf.call(this,"dark",e):Hf.call(this,"light",e),"false"===this.showHeader?"":Af.call(this),"false"===this.allowAdvancedSearch?"":If.call(this),"read"!==this.renderStyle&&"focused"!==this.renderStyle||"true"!==this.showSideNav||!this.resolvedSpec?"":lf.call(this),this.renderStyle,!0===this.loading?z(Rf||(Rf=Wf(['
']))):z(Bf||(Bf=Wf([" ",""])),!0===this.loadFailed?z(Lf||(Lf=Wf([' Unable to load the Spec
']))):z(Nf||(Nf=Wf([' ',"
"])),e=>{this.handleHref(e)},"focused"===this.renderStyle?z(Mf||(Mf=Wf(["",""])),hf.call(this)):z(qf||(qf=Wf([" "," "," "," "," "])),"true"===this.showInfo?Xp.call(this):"","true"===this.allowServerSelection?nf.call(this):"","true"===this.allowAuthentication?_i.call(this):"","read"===this.renderStyle?Vp.call(this):wf.call(this)))))}function Yf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}class Kf extends ae{constructor(){super();const e={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.isIntersectionObserverActive=!0,this.intersectionObserver=new IntersectionObserver(e=>{this.onIntersect(e)},e)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},showComponents:{type:String,attribute:"show-components"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},navBgColor:{type:String,attribute:"nav-bg-color"},navBgImage:{type:String,attribute:"nav-bg-image"},navBgImageSize:{type:String,attribute:"nav-bg-image-size"},navBgImageRepeat:{type:String,attribute:"nav-bg-image-repeat"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},matchPaths:{type:String,attribute:"match-paths"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object}}}static get styles(){return[he,me,ye,xe,ke,Ae,Ee,Ce,_e,ne(zf||(zf=Yf([":host{--border-radius:2px;display:flex;flex-direction:column;min-width:360px;width:100%;height:100%;margin:0;padding:0;overflow:hidden;letter-spacing:normal;color:var(--fg);background-color:var(--bg);font-family:var(--font-regular)}.body{display:flex;height:100%;width:100%;box-sizing:border-box;overflow:hidden}.main-content{margin:0;padding:0;display:block;flex:1;height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--border-color) transparent}.main-content-inner--view-mode{padding:0 16px}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background-color:var(--border-color)}.section-gap.section-tag{border-bottom:1px solid var(--border-color)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{padding:0 4px}.section-tag-header{position:relative;cursor:n-resize;padding:12px 0}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right,rgba(0,0,0,0),var(--border-color),rgba(0,0,0,0))}.section-tag-header:hover::after{position:absolute;margin-left:-24px;font-size:20px;top:calc(50% - 14px);color:var(--primary-color);content:'⬆'}.collapsed .section-tag-header::after{position:absolute;margin-left:-24px;font-size:20px;top:calc(50% - 14px);color:var(--border-color);content:'⬇'}.collapsed .section-tag-header:hover::after{color:var(--primary-color)}.collapsed .section-tag-body{display:none}.logo{height:36px;width:36px;margin-left:5px}.only-large-screen,.only-large-screen-flex{display:none}.header-title{font-size:calc(var(--title-font-size) + 8px);padding:0 8px}.tag.title{text-transform:uppercase}.header{background-color:var(--header-bg);color:var(--header-fg);box-sizing:border-box;width:100%}input.header-input{background:var(--header-color-darker);color:var(--header-fg);border:1px solid var(--header-color-border);flex:1;padding-right:24px;border-radius:3px}input.header-input::placeholder{opacity:.4}.loader{margin:16px auto 16px auto;border:4px solid var(--bg3);border-radius:50%;border-top:4px solid var(--primary-color);width:36px;height:36px;animation:spin 2s linear infinite}.expanded-endpoint-body{position:relative;padding:6px 0}.expanded-endpoint-body.deprecated{filter:opacity(.6)}.divider{border-top:2px solid var(--primary-color);margin:24px 0;width:100%}.tooltip{cursor:pointer;border:1px solid var(--border-color);border-left-width:4px;margin-left:2px}.tooltip-text{color:var(--fg2);background-color:var(--bg2);visibility:hidden;overflow-wrap:break-word}.tooltip:hover{color:var(--primary-color);border-color:var(--primary-color)}.tooltip:hover .tooltip-text{visibility:visible;opacity:1}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media only screen and (min-width:768px){.nav-bar{width:260px;display:flex}.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 24px}.section-gap--focused-mode{padding:24px}.section-gap--read-mode{padding:48px 24px 24px 24px}.endpoint-body{position:relative;padding:36px 0 48px 0}}@media only screen and (min-width:1000px){.nav-bar{width:",";display:flex}.section-gap--focused-mode{padding:12px 100px 12px 100px}.section-gap--read-mode{padding:24px 100px 12px 100px}}"])),re("default"===this.fontSize?"300px":"large"===this.fontSize?"315px":"330px")),Te]}connectedCallback(){super.connectedCallback(),this.renderStyle&&"read, view, focused,".includes("".concat(this.renderStyle,","))||(this.renderStyle="view"),this.schemaStyle&&"tree, table,".includes("".concat(this.schemaStyle,","))||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes("".concat(this.theme,","))||(this.theme="light"),this.defaultSchemaTab&&"example, model,".includes("".concat(this.defaultSchemaTab,","))||(this.defaultSchemaTab="model"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes("".concat(this.schemaDescriptionExpanded,","))||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes("".concat(this.fillRequestFieldsWithExample,","))||(this.fillRequestFieldsWithExample="true"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowSearch&&"true, false,".includes("".concat(this.allowSearch,","))||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes("".concat(this.allowAdvancedSearch,","))||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes("".concat(this.allowTry,","))||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes("".concat(this.sortTags,","))||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes("".concat(this.sortEndpointsBy,","))||(this.sortEndpointsBy="path"),this.navItemSpacing&&"compact, relaxed, default,".includes("".concat(this.navItemSpacing,","))||(this.navItemSpacing="default"),this.usePathInNavBar&&"true, false,".includes("".concat(this.usePathInNavBar,","))||(this.usePathInNavBar="false"),this.fontSize&&"default, large, largest,".includes("".concat(this.fontSize,","))||(this.fontSize="default"),this.showInfo&&"true, false,".includes("".concat(this.showInfo,","))||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes("".concat(this.allowServerSelection,","))||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes("".concat(this.allowAuthentication,","))||(this.allowAuthentication="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes("".concat(this.infoDescriptionHeadingsInNavBar,","))||(this.infoDescriptionHeadingsInNavBar="false"),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),ce.a.setOptions({highlight:(e,t)=>ue.a.languages[t]?ue.a.highlight(e,ue.a.languages[t],t):e}),window.addEventListener("hashchange",()=>{this.scrollTo(window.location.hash.substring(1))},!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const e=new ce.a.Renderer;return e.heading=(e,t,r,n)=>"').concat(e," "),e}render(){return Vf.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,r){if("spec-url"===e&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollTo(this.gotoPath)},0),"render-style"===e&&("read"===r?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect()),"api-key-name"===e||"api-key-location"===e||"api-key-value"===e){let t=!1,n="",o="",a="";if("api-key-name"===e?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(n=r,o=this.getAttribute("api-key-location"),a=this.getAttribute("api-key-value"),t=!0):"api-key-location"===e?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(o=r,n=this.getAttribute("api-key-name"),a=this.getAttribute("api-key-value"),t=!0):"api-key-value"===e&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(a=r,o=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-name"),t=!0),t&&this.resolvedSpec){const e=this.resolvedSpec.securitySchemes.find(e=>"_rapidoc_api_key"===e.apiKeyId);e?(e.name=n,e.in=o,e.value=a,e.finalKeyValue=a):this.resolvedSpec.securitySchemes.push({apiKeyId:"_rapidoc_api_key",description:"api-key provided in rapidoc element attributes",type:"apiKey",name:n,in:o,value:a,finalKeyValue:a}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSepcUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSepcFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const t=e.target.files[0],r=new FileReader;r.onload=()=>{try{const e=JSON.parse(r.result);this.loadSpec(e),this.shadowRoot.getElementById("spec-url").value=""}catch(e){console.error("RapiDoc: Unable to read or parse json")}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){this.matchPaths=e.target.value,this.resolvedSpec.tags.forEach(e=>e.paths.filter(t=>{this.matchPaths&&Re(this.matchPaths,t)&&(e.expanded=!0)})),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.matchPaths=""}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(e){const t=e.detail.querySelector("input");await Fe(0),t&&t.focus()}async loadSpec(e){if(e){this.matchPaths="";try{this.resolvedSpec=null,this.loading=!0,this.loadFailed=!1;const t=await Oa(e,"true"===this.sortTags,this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"));this.loading=!1,null==t&&console.error("Unable to resolve the API spec. "),this.afterSpecParsedAndValidated(t)}catch(e){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error("RapiDoc: Unable to resolve the API spec.. ".concat(e.message))}}}async afterSpecParsedAndValidated(e){var t;this.resolvedSpec=e,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(e=>e.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();const r=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(r),this.intersectionObserver.disconnect(),"read"===this.renderStyle&&(await Fe(100),this.observeExpandedContent());const n=null===(t=window.location.hash)||void 0===t?void 0:t.substring(1);if(n)"view"===this.renderStyle?this.expandAndGotoOperation(n,!0,!0):"focused"===this.renderStyle&&this.scrollTo(n);else if("focused"===this.renderStyle){var o;const e=this.showInfo?"overview":null===(o=this.resolvedSpec.tags[0])||void 0===o?void 0:o.paths[0];this.scrollTo(e)}}expandAndGotoOperation(e,t=!0){let r=!0;const n=-1===e.indexOf("#")?e:e.substring(1);if(n.startsWith("overview")||"servers"===n||"auth"===n)r=!1;else for(let t=0;t<(null===(o=this.resolvedSpec.tags)||void 0===o?void 0:o.length);t++){var o,a;const n=this.resolvedSpec.tags[t],i=null===(a=n.paths)||void 0===a?void 0:a.find(t=>t.elementId===e);i&&(i.expanded&&n.expanded?r=!1:(i.expanded=!0,n.expanded=!0))}t&&(r&&this.requestUpdate(),window.setTimeout(()=>{const e=this.shadowRoot.getElementById(n);e&&(e.scrollIntoView({behavior:"auto",block:"start"}),window.history.replaceState(null,null,"#".concat(n)))},r?150:0))}isValidTopId(e){return e.startsWith("overview")||"servers"===e||"auth"===e}isValidPathId(e){var t,r;return!("overview"!==e||!this.showInfo)||(!("servers"!==e||!this.allowServerSelection)||(!("auth"!==e||!this.allowAuthentication)||(e.startsWith("tag--")?null===(r=this.resolvedSpec.tags)||void 0===r?void 0:r.find(t=>t.elementId===e):null===(t=this.resolvedSpec.tags)||void 0===t?void 0:t.find(t=>t.paths.find(t=>t.elementId===e)))))}onIntersect(e){!1!==this.isIntersectionObserverActive&&e.forEach(e=>{if(e.isIntersecting&&e.intersectionRatio>0){const t=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active"),r=this.shadowRoot.getElementById("link-".concat(e.target.id));r&&(window.history.replaceState(null,null,"".concat(window.location.href.split("#")[0],"#").concat(e.target.id)),r.scrollIntoView({behavior:"auto",block:"center"}),r.classList.add("active")),t&&t.classList.remove("active")}})}handleHref(e){if("a"===e.target.tagName.toLowerCase()&&e.target.getAttribute("href").startsWith("#")){const t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}async scrollToEventTarget(e,t=!0){const r=e.currentTarget;r.dataset.contentId&&(this.isIntersectionObserverActive=!1,this.scrollTo(r.dataset.contentId,!0,t),setTimeout(()=>{this.isIntersectionObserverActive=!0},300))}async scrollTo(e,t=!0,r=!0){if("focused"===this.renderStyle&&(this.focusedElementId=e,await Fe(0)),"view"===this.renderStyle)this.expandAndGotoOperation(e,t,!0);else{let t=!1;const n=this.shadowRoot.getElementById(e);if(n?(t=!0,("read"===this.renderStyle||e.startsWith("overview"))&&n.scrollIntoView({behavior:"auto",block:"start"})):t=!1,t){if("focused"===this.renderStyle){const e=this.shadowRoot.querySelector("api-request");e&&e.resetRequestBodySelection();const t=this.shadowRoot.querySelector("api-response");t&&t.resetSelection()}window.history.replaceState(null,null,"#".concat(e));const t=this.shadowRoot.getElementById("link-".concat(e));if(t){r&&t.scrollIntoView({behavior:"auto",block:"center"}),await Fe(0);const e=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active");e&&e.classList.remove("active"),t.classList.add("active")}}}}onAdvancedSearch(e,t){const r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let e;e="text"===r.type?r:r.closest(".advanced-search-options").querySelector("input[type=text]");const t=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map(e=>e.id);this.advancedSearchMatches=function(e,t,r=[]){if(!e.trim()||0===r.length)return;const n=[];return t.forEach(t=>{t.paths.forEach(t=>{let o="";var a;(r.includes("search-api-path")&&(o=t.path),r.includes("search-api-descr")&&(o="".concat(o," ").concat(t.summary||t.description||"")),r.includes("search-api-params"))&&(o="".concat(o," ").concat((null===(a=t.parameters)||void 0===a?void 0:a.map(e=>e.name).join(" "))||""));if(r.includes("search-api-request-body")&&t.requestBody){let e=new Set;for(const r in null===(i=t.requestBody)||void 0===i?void 0:i.content){var i,s,c;if(null!==(s=t.requestBody.content[r].schema)&&void 0!==s&&s.properties)e=Be(null===(c=t.requestBody.content[r].schema)||void 0===c?void 0:c.properties);o="".concat(o," ").concat([...e].join(" "))}}r.includes("search-api-resp-descr")&&(o="".concat(o," ").concat(Object.values(t.responses).map(e=>e.description||"").join(" "))),o.toLowerCase().includes(e.trim().toLowerCase())&&n.push({elementId:t.elementId,method:t.method,path:t.path,summary:t.summary||t.description||"",deprecated:t.deprecated})})}),n}(e.value,this.resolvedSpec.tags,t)},t)}}customElements.define("rapi-doc",Kf);class Gf extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",e=>this.receiveStorage(e),!0)}receiveAuthParms(){let e={};if(document.location.search){const t=new URLSearchParams(document.location.search);e={code:t.get("code"),error:t.get("error"),state:t.get("state"),responseType:"code"}}else if(window.location.hash){e={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"}}window.opener?window.opener.postMessage(e,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(e))}relayAuthParams(e){if(window.parent&&"rapidoc-oauth-data"===e.key){const t=JSON.parse(e.newValue);window.parent.postMessage(t,this.target)}}parseQueryString(e,t){const r=e.split("&");for(let e=0;et+1&&(l=s-1),this.node){if(d){var v=e.parent.items||e.parent.contents;v&&v.push(d)}f.length&&Array.prototype.push.apply(this.props,f),l=this.node.range.end}else if(p){var m=f[0];this.props.push(m),l=m.end}else l=n.b.endOfLine(a,t+1);var g=this.node?this.node.valueRange.end:l;return this.valueRange=new n.d(t,g),l}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,r=this.range,o=this.value;if(null!=o)return o;var a=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return n.b.addStringTerminator(e,r.end,a)}},{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}}]),r}(n.b),i=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.call(this,n.e.COMMENT)}return Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var r=this.parseComment(t);return this.range=new n.d(t,r),r}}]),r}(n.b);function s(e){for(var t=e;t instanceof a;)t=t.node;if(!(t instanceof c))return null;for(var r=t.items.length,o=-1,i=r-1;i>=0;--i){var s=t.items[i];if(s.type===n.e.COMMENT){var l=s.context,u=l.indent,p=l.lineStart;if(u>0&&s.range.start>=p+u)break;o=i}else{if(s.type!==n.e.BLANK_LINE)break;o=i}}if(-1===o)return null;for(var f=t.items.splice(o,r-o),d=f[0].range.start;t.range.end=d,t.valueRange&&t.valueRange.end>d&&(t.valueRange.end=d),t!==e;)t=t.context.parent;return f}var c=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(e){var o;Object(n.j)(this,r),o=t.call(this,e.type===n.e.SEQ_ITEM?n.e.SEQ:n.e.MAP);for(var a=e.props.length-1;a>=0;--a)if(e.props[a].start=a+o||("#"===i||"\n"===i)&&r.nextContentHasIndent(e,t,o))}}]),Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var a=e.parseNode,c=e.src,l=n.b.startOfLine(c,t),u=this.items[0];u.context.parent=this,this.valueRange=n.d.copy(u.valueRange);for(var p=u.range.start-u.context.lineStart,f=t,d=c[f=n.b.normalizeOffset(c,f)],h=n.b.endOfWhiteSpace(c,l)===f,v=!1;d;){for(;"\n"===d||"#"===d;){if(h&&"\n"===d&&!v){var m=new o;if(f=m.parse({src:c},f),this.valueRange.end=f,f>=c.length){d=null;break}this.items.push(m),f-=1}else if("#"===d){if(f=c.length){d=null;break}}if(l=f+1,f=n.b.endOfIndent(c,l),n.b.atBlank(c,f)){var y=n.b.endOfWhiteSpace(c,f),b=c[y];b&&"\n"!==b&&"#"!==b||(f=y)}d=c[f],h=!0}if(!d)break;if(f!==l+p&&(h||":"!==d)){if(ft&&(f=l);break}if(!this.error){this.error=new n.f(this,"All collection items must start at the same column")}}if(u.type===n.e.SEQ_ITEM){if("-"!==d){l>t&&(f=l);break}}else if("-"===d&&!this.error){var x=c[f+1];if(!x||"\n"===x||"\t"===x||" "===x){this.error=new n.f(this,"A collection cannot be both a mapping and a sequence")}}var w=a({atLineStart:h,inCollection:!0,indent:p,lineStart:l,parent:this},f);if(!w)return f;if(this.items.push(w),this.valueRange.end=w.valueRange.end,d=c[f=n.b.normalizeOffset(c,w.range.end)],h=!1,v=w.includesTrailingLines,d){for(var k=f-1,S=c[k];" "===S||"\t"===S;)S=c[--k];"\n"===S&&(l=k+1,h=!0)}var A=s(w);A&&Array.prototype.push.apply(this.items,A)}return f}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){t=r.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,o=this.value;if(null!=o)return o;for(var a=e.slice(r.start,t[0].range.start)+String(t[0]),i=1;i0}}]),r}(n.b),l=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){var e;return Object(n.j)(this,r),(e=t.call(this,n.e.DIRECTIVE)).name=null,e}return Object(n.i)(r,[{key:"parseName",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"\t"!==n&&" "!==n;)n=t[r+=1];return this.name=t.slice(e,r),r}},{key:"parseParameters",value:function(e){for(var t=this.context.src,r=e,o=t[r];o&&"\n"!==o&&"#"!==o;)o=t[r+=1];return this.valueRange=new n.d(e,r),r}},{key:"parse",value:function(e,t){this.context=e;var r=this.parseName(t+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new n.d(t,r),r}},{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}}]),r}(n.b),u=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){var e;return Object(n.j)(this,r),(e=t.call(this,n.e.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return Object(n.i)(r,null,[{key:"startCommentOrEndBlankLine",value:function(e,t){var r=n.b.endOfWhiteSpace(e,t),o=e[r];return"#"===o||"\n"===o?r:t}}]),Object(n.i)(r,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var a=!0,s=!1,c=e;!n.b.atDocumentBoundary(t,c,n.a.DIRECTIVES_END);)switch(t[c=r.startCommentOrEndBlankLine(t,c)]){case"\n":if(a){var u=new o;(c=u.parse({src:t},c))0&&(this.contents=this.directives,this.directives=[]),c}return t[c]?(this.directivesEndMarker=new n.d(c,c+3),c+3):(s?this.error=new n.n(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),c)}},{key:"parseContents",value:function(e){var t=this.context,a=t.parseNode,c=t.src;this.contents||(this.contents=[]);for(var l=e;"-"===c[l-1];)l-=1;var u=n.b.endOfWhiteSpace(c,e),p=l===e;for(this.valueRange=new n.d(u);!n.b.atDocumentBoundary(c,u,n.a.DOCUMENT_END);){switch(c[u]){case"\n":if(p){var f=new o;(u=f.parse({src:c},u))0&&((t.length>0||e[0].type===n.e.COMMENT)&&(o+="---\n"),o+=e.join("")),"\n"!==o[o.length-1]&&(o+="\n"),o}}]),r}(n.b),p=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.apply(this,arguments)}return Object(n.i)(r,[{key:"parse",value:function(e,t){this.context=e;var r=e.src,o=n.b.endOfIdentifier(r,t+1);return this.valueRange=new n.d(t+1,o),o=n.b.endOfWhiteSpace(r,o),o=this.parseComment(o)}}]),r}(n.b),f="CLIP",d="KEEP",h="STRIP",v=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(e,o){var a;return Object(n.j)(this,r),(a=t.call(this,e,o)).blockIndent=null,a.chomping=f,a.header=null,a}return Object(n.i)(r,[{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,r=e+1,o="";;){var a=t[r];switch(a){case"-":this.chomping=h;break;case"+":this.chomping=d;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o+=a;break;default:return this.blockIndent=Number(o)||null,this.header=new n.d(e,r),r}r+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,o=t.src,a=!!this.blockIndent,i=e,s=e,c=1,l=o[i];"\n"===l&&(i+=1,!n.b.atDocumentBoundary(o,i));l=o[i]){var u=n.b.endOfBlockIndent(o,r,i);if(null===u)break;var p=o[u],f=u-(i+r);if(this.blockIndent){if(p&&"\n"!==p&&fc&&(c=f);i="\n"===o[u]?u:s=n.b.endOfLine(o,u)}return this.chomping!==d&&(i=o[s]?s+1:s),this.valueRange=new n.d(e+1,i),i}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,o=this.parseBlockHeader(t);return o=n.b.endOfWhiteSpace(r,o),o=this.parseComment(o),o=this.parseBlockValue(o)}},{key:"setOrigRanges",value:function(e,t){return t=Object(n.s)(Object(n.t)(r.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}},{key:"includesTrailingLines",get:function(){return this.chomping===d}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end,o=this.context,a=o.indent,i=o.src;if(this.valueRange.isEmpty())return"";for(var s=null,c=i[r-1];"\n"===c||"\t"===c||" "===c;){if((r-=1)<=t){if(this.chomping===d)break;return""}"\n"===c&&(s=r),c=i[r-1]}var l=r+1;s&&(this.chomping===d?(l=s,r=this.valueRange.end):r=s);for(var u=a+this.blockIndent,p=this.type===n.e.BLOCK_FOLDED,f=!0,v="",m="",g=!1,y=t;y0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===n.e.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,a=e.src,s=e.indent,c=e.lineStart,l=a[t];this.items=[{char:l,offset:t}];var u=n.b.endOfWhiteSpace(a,t+1);for(l=a[u];l&&"]"!==l&&"}"!==l;){switch(l){case"\n":if(c=u+1,"\n"===a[n.b.endOfWhiteSpace(a,c)]){var p=new o;c=p.parse({src:a},c),this.items.push(p)}if((u=n.b.endOfIndent(a,c))<=c+s&&(l=a[u],ur.offset);)++o;r.origOffset=r.offset+o,t=o}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,o=this.value;if(null!=o)return o;var a=t.filter((function(e){return e instanceof n.b})),i="",s=r.start;return a.forEach((function(t){var r=e.slice(s,t.range.start);s=t.range.end,"\n"===(i+=r+String(t))[i.length-1]&&"\n"!==e[s-1]&&"\n"===e[s]&&(s+=1)})),i+=e.slice(s,r.end),n.b.addStringTerminator(e,r.end,i)}}]),r}(n.b),g=function(e){Object(n.q)(r,e);var t=Object(n.r)(r);function r(){return Object(n.j)(this,r),t.apply(this,arguments)}return Object(n.i)(r,[{key:"parseCharCode",value:function(e,t,r){var o=this.context.src,a=o.substr(e,t),i=a.length===t&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;return isNaN(i)?(r.push(new n.f(this,"Invalid escape sequence ".concat(o.substr(e-2,t+2)))),o.substr(e-2,t+2)):String.fromCodePoint(i)}},{key:"parse",value:function(e,t){this.context=e;var o=e.src,a=r.endOfQuote(o,t+1);return this.valueRange=new n.d(t,a),a=n.b.endOfWhiteSpace(o,a),a=this.parseComment(a)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,o=t.end,a=this.context,i=a.indent,s=a.src;'"'!==s[o-1]&&e.push(new n.f(this,'Missing closing "quote'));for(var c="",l=r+1;l