redoc 2.1.5 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@
14
14
  `}};var ee=J;function te(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const re=ee.div`
15
15
  padding: 20px;
16
16
  color: red;
17
- `;class ne extends e.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?e.createElement(re,null,e.createElement("h1",null,"Something went wrong..."),e.createElement("small",null," ",this.state.error.message," "),e.createElement("p",null,e.createElement("details",null,e.createElement("summary",null,"Stack trace"),e.createElement("pre",null,this.state.error.stack))),e.createElement("small",null," ReDoc Version: ","2.1.5")," ",e.createElement("br",null),e.createElement("small",null," Commit: ","3658b6d")):e.createElement(e.Fragment,null,e.Children.only(this.props.children))}}const oe=G`
17
+ `;class ne extends e.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?e.createElement(re,null,e.createElement("h1",null,"Something went wrong..."),e.createElement("small",null," ",this.state.error.message," "),e.createElement("p",null,e.createElement("details",null,e.createElement("summary",null,"Stack trace"),e.createElement("pre",null,this.state.error.stack))),e.createElement("small",null," ReDoc Version: ","2.2.0")," ",e.createElement("br",null),e.createElement("small",null," Commit: ","4736c54")):e.createElement(e.Fragment,null,e.Children.only(this.props.children))}}const oe=G`
18
18
  0% {
19
19
  transform: rotate(0deg); }
20
20
  100% {
@@ -38,7 +38,7 @@
38
38
  font-size: 25px;
39
39
  margin: 30px 0 20px 0;
40
40
  color: ${e=>e.color};
41
- `;class ae extends e.PureComponent{render(){return e.createElement("div",{style:{textAlign:"center"}},e.createElement(se,{color:this.props.color},"Loading ..."),e.createElement(ie,{color:this.props.color}))}}var le=require("prop-types");const ce=e.createContext(new W({})),pe=ce.Provider,ue=ce.Consumer;var de=require("mobx"),he=require("@redocly/openapi-core/lib/bundle"),me=require("@redocly/openapi-core/lib/config/config"),fe=r(925),ye=(e,t,r)=>new Promise(((n,o)=>{var i=e=>{try{a(r.next(e))}catch(e){o(e)}},s=e=>{try{a(r.throw(e))}catch(e){o(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);a((r=r.apply(e,t)).next())}));function ge(e){return ye(this,null,(function*(){const t=new me.Config({}),n={config:t,base:s?window.location.href:process.cwd()};s&&(t.resolve.http.customFetch=r.g.fetch),"object"==typeof e&&null!==e?n.doc={source:{absoluteRef:""},parsed:e}:n.ref=e;const{bundle:{parsed:o}}=yield(0,he.bundle)(n);return void 0!==o.swagger?be(o):o}))}function be(e){return console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((t,r)=>(0,fe.convertObj)(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((e,n)=>{if(e)return r(e);t(n&&n.openapi)}))))}var xe=require("decko"),ve=require("eventemitter3"),we=require("json-pointer");const ke=we.parse;class Oe{static baseName(e,t=1){const r=Oe.parse(e);return r[r.length-t]}static dirName(e,t=1){const r=Oe.parse(e);return we.compile(r.slice(0,r.length-t))}static relative(e,t){const r=Oe.parse(e);return Oe.parse(t).slice(r.length)}static parse(e){let t=e;return"#"===t.charAt(0)&&(t=t.substring(1)),ke(t)}static join(e,t){const r=Oe.parse(e).concat(t);return we.compile(r)}static get(e,t){return we.get(e,t)}static compile(e){return we.compile(e)}static escape(e){return we.escape(e)}}we.parse=Oe.parse,Object.assign(Oe,we);var Ee=r(17),je=require("url-template"),$e=Object.defineProperty,Se=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Te=(e,t,r)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_e=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&Te(e,r,t[r]);if(Ce)for(var r of Ce(t))Ie.call(t,r)&&Te(e,r,t[r]);return e},Re=(e,t)=>Se(e,Pe(t));function De(e){return"string"==typeof e&&/\dxx/i.test(e)}function Le(e){return"default"===e||y(e)||De(e)}function ze(e,t=!1){if("default"===e)return t?"error":"success";let r="string"==typeof e?parseInt(e,10):e;if(De(e)&&(r*=100),r<100||r>599)throw new Error("invalid HTTP code");let n="success";return r>=300&&r<400?n="redirect":r>=400?n="error":r<200&&(n="info"),n}const Me={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function Ne(e){return e in Me}function qe(e){return e.summary||e.operationId||e.description&&e.description.substring(0,50)||e.pathName||"<no summary>"}const Fe={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",properties:"object",patternProperties:"object"};function Be(e){if(void 0!==e.type&&!A(e.type))return e.type;const t=Object.keys(Fe);for(const r of t){const t=Fe[r];if(void 0!==e[r])return t}return"any"}function Qe(e,t=e.type){if(e["x-circular-ref"])return!0;if(void 0!==e.oneOf||void 0!==e.anyOf)return!1;if(e.if&&e.then||e.if&&e.else)return!1;let r=!0;const n=A(t);return("object"===t||n&&(null==t?void 0:t.includes("object")))&&(r=void 0!==e.properties?0===Object.keys(e.properties).length:void 0===e.additionalProperties&&void 0===e.unevaluatedProperties&&void 0===e.patternProperties),!A(e.items)&&!A(e.prefixItems)&&(void 0!==e.items&&!I(e.items)&&("array"===t||n&&(null==t?void 0:t.includes("array")))&&(r=Qe(e.items,e.items.type)),r)}function Ue(e){return-1!==e.search(/json/i)}function We(e){return"application/x-www-form-urlencoded"===e}function Ve(e,t,r){return A(e)?e.map((e=>e.toString())).join(r):"object"==typeof e?Object.keys(e).map((t=>`${t}${r}${e[t]}`)).join(r):t+"="+e.toString()}function He(e,t){return A(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):"object"==typeof e?Object.keys(e).map((r=>`${t}[${r}]=${e[r]}`)).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function Je(e,t,r){const n="__redoc_param_name__",o=t?"*":"";return je.parse(`{?${n}${o}}`).expand({[n]:r}).substring(1).replace(/__redoc_param_name__/g,e)}function Ye(e,t={}){if(A(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map((r=>{const n=e[r],{style:o="form",explode:i=!0}=t[r]||{};switch(o){case"form":return Je(r,i,n);case"spaceDelimited":return Ve(n,r,"%20");case"pipeDelimited":return Ve(n,r,"|");case"deepObject":return He(n,r);default:return console.warn("Incorrect or unsupported encoding style: "+o),""}})).join("&")}function Ze(e,t){return Ue(t)?JSON.stringify(e):(console.warn(`Parameter serialization as ${t} is not supported`),"")}function Ge(e,t){const{name:r,style:n,explode:o=!1,serializationMime:i}=e;if(i)switch(e.in){case"path":case"header":return Ze(t,i);case"cookie":case"query":return`${r}=${Ze(t,i)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${r}`),"";switch(e.in){case"path":return function(e,t,r,n){const o=r?"*":"";let i="";"label"===t?i=".":"matrix"===t&&(i=";");const s="__redoc_param_name__";return je.parse(`{${i}${s}${o}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}(r,n,o,t);case"query":return function(e,t,r,n){switch(t){case"form":return Je(e,r,n);case"spaceDelimited":return A(n)?r?Je(e,r,n):`${e}=${n.join("%20")}`:(console.warn("The style spaceDelimited is only applicable to arrays"),"");case"pipeDelimited":return A(n)?r?Je(e,r,n):`${e}=${n.join("|")}`:(console.warn("The style pipeDelimited is only applicable to arrays"),"");case"deepObject":return!r||A(n)||"object"!=typeof n?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):He(n,e);default:return console.warn("Unexpected style for query: "+t),""}}(r,n,o,t);case"header":return function(e,t,r){if("simple"===e){const e=t?"*":"",n="__redoc_param_name__",o=je.parse(`{${n}${e}}`);return decodeURIComponent(o.expand({[n]:r}))}return console.warn("Unexpected style for header: "+e),""}(n,o,t);case"cookie":return function(e,t,r,n){return"form"===t?Je(e,r,n):(console.warn("Unexpected style for cookie: "+t),"")}(r,n,o,t);default:return console.warn("Unexpected parameter location: "+e.in),""}}function Xe(e,t){return e.in?decodeURIComponent(Ge(e,t)):String(t)}function Ke(e){return-1!==e.search(/xml/i)?"xml":-1!==e.search(/csv/i)?"csv":-1!==e.search(/plain/i)?"tex":"clike"}const et=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function tt(e){return et.test(e||"")}function rt(e){var t;const[r]=(null==(t=null==e?void 0:e.match(et))?void 0:t.reverse())||[];return r}function nt(e,t,r){let n;return void 0!==t&&void 0!==r?n=t===r?`= ${t} ${e}`:`[ ${t} .. ${r} ] ${e}`:void 0!==r?n=`<= ${r} ${e}`:void 0!==t&&(n=1===t?"non-empty":`>= ${t} ${e}`),n}function ot(e){var t,r;const n="number"==typeof e.exclusiveMinimum?Math.min(e.exclusiveMinimum,null!=(t=e.minimum)?t:1/0):e.minimum,o="number"==typeof e.exclusiveMaximum?Math.max(e.exclusiveMaximum,null!=(r=e.maximum)?r:-1/0):e.maximum,i="number"==typeof e.exclusiveMinimum||e.exclusiveMinimum,s="number"==typeof e.exclusiveMaximum||e.exclusiveMaximum;return void 0!==n&&void 0!==o?`${i?"( ":"[ "}${n} .. ${o}${s?" )":" ]"}`:void 0!==o?`${s?"< ":"<= "}${o}`:void 0!==n?`${i?"> ":">= "}${n}`:void 0}function it(e){const t=[],r=nt("characters",e.minLength,e.maxLength);void 0!==r&&t.push(r);const n=nt("items",e.minItems,e.maxItems);void 0!==n&&t.push(n);const o=nt("properties",e.minProperties,e.maxProperties);void 0!==o&&t.push(o);const i=function(e){if(void 0===e)return;const t=e.toString(10);return/^0\.0*1$/.test(t)?`decimal places <= ${t.split(".")[1].length}`:`multiple of ${t}`}(e.multipleOf);void 0!==i&&t.push(i);const s=ot(e);return void 0!==s&&t.push(s),e.uniqueItems&&t.push("unique"),t}function st(e,t=[]){const r=[],n=[],o=[];return e.forEach((e=>{e.required?t.includes(e.name)?n.push(e):o.push(e):r.push(e)})),n.sort(((e,r)=>t.indexOf(e.name)-t.indexOf(r.name))),[...n,...o,...r]}function at(e,t){return[...e].sort(((e,r)=>e[t].localeCompare(r[t])))}function lt(e,t=[],r=[]){const n={};return r.forEach((t=>{({resolved:t}=e.deref(t)),n[t.name+"_"+t.in]=!0})),(t=t.filter((t=>(({resolved:t}=e.deref(t)),!n[t.name+"_"+t.in])))).concat(r)}function ct(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r],o=r.split(";")[0].trim();t[o]?t[o]=_e(_e({},t[o]),n):t[o]=n})),t}function pt(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,r)=>t[r]&&t[r].default||e))}function ut(e,t){const r=void 0===e?$((()=>{if(!s)return"";const e=window.location.href;return e.endsWith(".html")?(0,Ee.dirname)(e):e})()):(0,Ee.dirname)(e);return 0===t.length&&(t=[{url:"/"}]),t.map((e=>{return Re(_e({},e),{url:(t=e.url,O(r,t)),description:e.description||""});var t}))}const dt="SecurityDefinitions",ht="security-definitions",mt="SchemaDefinition";let ft="section/Authentication/";function yt(e){ft=e}const gt=e=>({delete:"del",options:"opts"}[e]||e);function bt(e){return e in{"x-circular-ref":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-code-samples":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-ignoredHeaderParameters":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0}}function xt(e,t){return Object.keys(e).filter((e=>!0===t?e.startsWith("x-")&&!bt(e):e.startsWith("x-")&&t.indexOf(e)>-1)).reduce(((t,r)=>(t[r]=e[r],t)),{})}function vt(e){return e.split(" or ").map((e=>e.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2"))).join(" or ")}function wt(e){let t=e.content;const r=e["x-examples"],n=e["x-example"];if(r){t=_e({},t);for(const e of Object.keys(r)){const n=r[e];t[e]=Re(_e({},t[e]),{examples:n})}}else if(n){t=_e({},t);for(const e of Object.keys(n)){const r=n[e];t[e]=Re(_e({},t[e]),{example:r})}}return t}var kt=require("prismjs");require("prismjs/components/prism-bash.js"),require("prismjs/components/prism-c.js"),require("prismjs/components/prism-clike.js"),require("prismjs/components/prism-coffeescript.js"),require("prismjs/components/prism-cpp.js"),require("prismjs/components/prism-csharp.js"),require("prismjs/components/prism-go.js"),require("prismjs/components/prism-http.js"),require("prismjs/components/prism-java.js"),require("prismjs/components/prism-lua.js"),require("prismjs/components/prism-markup-templating.js"),require("prismjs/components/prism-markup.js"),require("prismjs/components/prism-objectivec.js"),require("prismjs/components/prism-perl.js"),require("prismjs/components/prism-php.js"),require("prismjs/components/prism-python.js"),require("prismjs/components/prism-q.js"),require("prismjs/components/prism-ruby.js"),require("prismjs/components/prism-scala.js"),require("prismjs/components/prism-sql.js"),require("prismjs/components/prism-swift.js"),require("prismjs/components/prism-yaml.js"),require("prismjs/components/prism-csv.js");const Ot="clike";function Et(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||Ot}function jt(e,t=Ot){t=t.toLowerCase();let r=kt.languages[t];return r||(r=kt.languages[Et(t)]),kt.highlight(e.toString(),r,t)}function $t(e){return(t,r,n)=>{n.value=function(e,t){let r,n,o,i=null,s=0;const a=()=>{s=(new Date).getTime(),i=null,o=e.apply(r,n),i||(r=n=null)};return function(){const l=(new Date).getTime(),c=t-(l-s);return r=this,n=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),s=l,o=e.apply(r,n),i||(r=n=null)):i||(i=setTimeout(a,c)),o}}(n.value,e)}}function St(e){}function Pt(e){}kt.languages.insertBefore("javascript","string",{"property string":{pattern:/([{,]\s*)"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,lookbehind:!0}},void 0),kt.languages.insertBefore("javascript","punctuation",{property:{pattern:/([{,]\s*)[a-z]\w*(?=\s*:)/i,lookbehind:!0}},void 0);var Ct=Object.defineProperty,At=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Dt=(e,t,r)=>t in e?Ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lt=(e,t)=>{for(var r in t||(t={}))_t.call(t,r)&&Dt(e,r,t[r]);if(Tt)for(var r of Tt(t))Rt.call(t,r)&&Dt(e,r,t[r]);return e},zt=(e,t)=>At(e,It(t));const Mt={};function Nt(e,t,r){if("function"==typeof r.value)return function(e,t,r){if(!r.value||r.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");const n=`_memoized_${t}`,o=r.value;return e[n]=Mt,zt(Lt({},r),{value(){return this[n]===Mt&&(this[n]=o.call(this)),this[n]}})}(e,t,r);if("function"==typeof r.get)return function(e,t,r){const n=`_memoized_${t}`,o=r.get;return e[n]=Mt,zt(Lt({},r),{get(){return this[n]===Mt&&(this[n]=o.call(this)),this[n]}})}(e,t,r);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(r.value)+" instead")}function qt(e){let t=1;return"-"===e[0]&&(t=-1,e=e.substr(1)),(r,n)=>-1==t?n[e].localeCompare(r[e]):r[e].localeCompare(n[e])}var Ft=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor;const Qt="hashchange";class Ut{constructor(){this.emit=()=>{this._emiter.emit(Qt,this.currentId)},this._emiter=new ve.EventEmitter,this.bind()}get currentId(){return s?decodeURIComponent(window.location.hash.substring(1)):""}linkForId(e){return e?"#"+e:""}subscribe(e){const t=this._emiter.addListener(Qt,e);return()=>t.removeListener(Qt,e)}bind(){s&&window.addEventListener("hashchange",this.emit,!1)}dispose(){s&&window.removeEventListener("hashchange",this.emit)}replace(e,t=!1){s&&null!=e&&e!==this.currentId&&(t?window.history.replaceState(null,"",window.location.href.split("#")[0]+this.linkForId(e)):(window.history.pushState(null,"",window.location.href.split("#")[0]+this.linkForId(e)),this.emit()))}}((e,t,r,n)=>{for(var o,i=Bt(t,r),s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);i&&Ft(t,r,i)})([xe.bind,xe.debounce],Ut.prototype,"replace");const Wt=new Ut;var Vt=require("mark.js");class Ht{constructor(){this.map=new Map,this.prevTerm=""}add(e){this.map.set(e,new Vt(e))}delete(e){this.map.delete(e)}addOnly(e){this.map.forEach(((t,r)=>{-1===e.indexOf(r)&&(t.unmark(),this.map.delete(r))}));for(const t of e)this.map.has(t)||this.map.set(t,new Vt(t))}clearAll(){this.unmark(),this.map.clear()}mark(e){(e||this.prevTerm)&&(this.map.forEach((t=>{t.unmark(),t.mark(e||this.prevTerm)})),this.prevTerm=e||this.prevTerm)}unmark(){this.map.forEach((e=>e.unmark())),this.prevTerm=""}}let Jt={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Yt=/[&<>"']/,Zt=new RegExp(Yt.source,"g"),Gt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Xt=new RegExp(Gt.source,"g"),Kt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},er=e=>Kt[e];function tr(e,t){if(t){if(Yt.test(e))return e.replace(Zt,er)}else if(Gt.test(e))return e.replace(Xt,er);return e}const rr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function nr(e){return e.replace(rr,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const or=/(^|[^\[])\^/g;function ir(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n=n.source||n).replace(or,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}const sr=/[^\w:]/g,ar=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function lr(e,t,r){if(e){let e;try{e=decodeURIComponent(nr(r)).replace(sr,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!ar.test(r)&&(r=function(e,t){cr[" "+e]||(pr.test(e)?cr[" "+e]=e+"/":cr[" "+e]=fr(e,"/",!0));const r=-1===(e=cr[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(ur,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(dr,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}const cr={},pr=/^[^:]+:\/*[^/]*$/,ur=/^([^:]+:)[\s\S]*$/,dr=/^([^:]+:\/*[^/]*)[\s\S]*$/,hr={exec:function(){}};function mr(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,o=t;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function fr(e,t,r){const n=e.length;if(0===n)return"";let o=0;for(;o<n;){const i=e.charAt(n-o-1);if(i!==t||r){if(i===t||!r)break;o++}else o++}return e.slice(0,n-o)}function yr(e,t){if(t<1)return"";let r="";for(;t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function gr(e,t,r,n){const o=t.href,i=t.title?tr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:o,title:i,text:tr(s)}}class br{constructor(e){this.options=e||Jt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:fr(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=fr(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,n,o,i,s,a,l,c,p,u,d,h,m=t[1].trim();const f=m.length>1,y={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=g.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),p=e.split("\n",1)[0],this.options.pedantic?(i=2,d=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,d=c.slice(i),i+=t[1].length),a=!1,!c&&/^ *$/.test(p)&&(r+=p+"\n",e=e.substring(p.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,i-1)}}#`);for(;e&&(u=e.split("\n",1)[0],p=u,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!o.test(p))&&!s.test(p)&&!t.test(p)&&!n.test(e);){if(p.search(/[^ ]/)>=i||!p.trim())d+="\n"+p.slice(i);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(o.test(c))break;if(s.test(c))break;if(n.test(c))break;d+="\n"+p}a||p.trim()||(a=!0),r+=u+"\n",e=e.substring(u.length+1),c=p.slice(i)}}y.loose||(l?y.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(d),n&&(o="[ ] "!==n[0],d=d.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:r,task:!!n,checked:o,loose:!1,text:d}),y.raw+=r}y.items[y.items.length-1].raw=r.trimRight(),y.items[y.items.length-1].text=d.trimRight(),y.raw=y.raw.trimRight();const b=y.items.length;for(s=0;s<b;s++)if(this.lexer.state.top=!1,y.items[s].tokens=this.lexer.blockTokens(y.items[s].text,[]),!y.loose){const e=y.items[s].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));y.loose=t}if(y.loose)for(s=0;s<b;s++)y.items[s].loose=!0;return y}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const r=this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]);e.type="paragraph",e.text=r,e.tokens=this.lexer.inline(r)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:mr(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let r,n,o,i,s=e.align.length;for(r=0;r<s;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(s=e.rows.length,r=0;r<s;r++)e.rows[r]=mr(e.rows[r],e.header.length).map((e=>({text:e})));for(s=e.header.length,n=0;n<s;n++)e.header[n].tokens=this.lexer.inline(e.header[n].text);for(s=e.rows.length,n=0;n<s;n++)for(i=e.rows[n],o=0;o<i.length;o++)i[o].tokens=this.lexer.inline(i[o].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:tr(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=fr(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let n=0,o=0;for(;o<r;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),gr(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return gr(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=n[1]||n[2]||"";if(!o||o&&(""===r||this.rules.inline.punctuation.exec(r))){const r=n[0].length-1;let o,i,s=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=o.length,n[3]||n[4]){s+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);const t=e.slice(0,r+n.index+(n[0].length-o.length)+i);if(Math.min(r,i)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=tr(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let e,n;return"@"===r[2]?(e=tr(this.options.mangle?t(r[1]):r[1]),n="mailto:"+e):(e=tr(r[1]),n=e),{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=tr(this.options.mangle?t(r[0]):r[0]),n="mailto:"+e;else{let t;do{t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(t!==r[0]);e=tr(r[0]),n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):tr(r[0]):r[0]:tr(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}const xr={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:hr,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};xr.def=ir(xr.def).replace("label",xr._label).replace("title",xr._title).getRegex(),xr.bullet=/(?:[*+-]|\d{1,9}[.)])/,xr.listItemStart=ir(/^( *)(bull) */).replace("bull",xr.bullet).getRegex(),xr.list=ir(xr.list).replace(/bull/g,xr.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xr.def.source+")").getRegex(),xr._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xr._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,xr.html=ir(xr.html,"i").replace("comment",xr._comment).replace("tag",xr._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xr.paragraph=ir(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.blockquote=ir(xr.blockquote).replace("paragraph",xr.paragraph).getRegex(),xr.normal={...xr},xr.gfm={...xr.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},xr.gfm.table=ir(xr.gfm.table).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.gfm.paragraph=ir(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",xr.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.pedantic={...xr.normal,html:ir("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",xr._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ir(xr.normal._paragraph).replace("hr",xr.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",xr.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const vr={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:hr,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:hr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function wr(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function kr(e){let t,r,n="";const o=e.length;for(t=0;t<o;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}vr._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",vr.punctuation=ir(vr.punctuation).replace(/punctuation/g,vr._punctuation).getRegex(),vr.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vr.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,vr._comment=ir(xr._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vr.emStrong.lDelim=ir(vr.emStrong.lDelim).replace(/punct/g,vr._punctuation).getRegex(),vr.emStrong.rDelimAst=ir(vr.emStrong.rDelimAst,"g").replace(/punct/g,vr._punctuation).getRegex(),vr.emStrong.rDelimUnd=ir(vr.emStrong.rDelimUnd,"g").replace(/punct/g,vr._punctuation).getRegex(),vr._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vr._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vr._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,vr.autolink=ir(vr.autolink).replace("scheme",vr._scheme).replace("email",vr._email).getRegex(),vr._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vr.tag=ir(vr.tag).replace("comment",vr._comment).replace("attribute",vr._attribute).getRegex(),vr._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vr._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vr._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vr.link=ir(vr.link).replace("label",vr._label).replace("href",vr._href).replace("title",vr._title).getRegex(),vr.reflink=ir(vr.reflink).replace("label",vr._label).replace("ref",xr._label).getRegex(),vr.nolink=ir(vr.nolink).replace("ref",xr._label).getRegex(),vr.reflinkSearch=ir(vr.reflinkSearch,"g").replace("reflink",vr.reflink).replace("nolink",vr.nolink).getRegex(),vr.normal={...vr},vr.pedantic={...vr.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ir(/^!?\[(label)\]\((.*?)\)/).replace("label",vr._label).getRegex(),reflink:ir(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vr._label).getRegex()},vr.gfm={...vr.normal,escape:ir(vr.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},vr.gfm.url=ir(vr.gfm.url,"i").replace("email",vr.gfm._extended_email).getRegex(),vr.breaks={...vr.gfm,br:ir(vr.br).replace("{2,}","*").getRegex(),text:ir(vr.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Or{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Jt,this.options.tokenizer=this.options.tokenizer||new br,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:xr.normal,inline:vr.normal};this.options.pedantic?(t.block=xr.pedantic,t.inline=vr.pedantic):this.options.gfm&&(t.block=xr.gfm,this.options.breaks?t.inline=vr.breaks:t.inline=vr.gfm),this.tokenizer.rules=t}static get rules(){return{block:xr,inline:vr}}static lex(e,t){return new Or(t).lex(e)}static lexInline(e,t){return new Or(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,o,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o)))n=t[t.length-1],i&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),i=o.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,o,i,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+yr("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,i.index)+"["+yr("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,i.index+i[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,a))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,kr))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,kr))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o,wr))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),s=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Er{constructor(e){this.options=e||Jt}code(e,t,r){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(r=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+tr(n)+'">'+(r?e:tr(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:tr(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,r,n){return this.options.headerIds?`<h${t} id="${this.options.headerPrefix+n.slug(r)}">${e}</h${t}>\n`:`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return r;let n='<a href="'+e+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>",n}image(e,t,r){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return r;let n=`<img src="${e}" alt="${r}"`;return t&&(n+=` title="${t}"`),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class jr{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class $r{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{n++,r=e+"-"+n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class Sr{constructor(e){this.options=e||Jt,this.options.renderer=this.options.renderer||new Er,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new jr,this.slugger=new $r}static parse(e,t){return new Sr(t).parse(e)}static parseInline(e,t){return new Sr(t).parseInline(e)}parse(e,t=!0){let r,n,o,i,s,a,l,c,p,u,d,h,m,f,y,g,b,x,v,w="";const k=e.length;for(r=0;r<k;r++)if(u=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(v=this.options.extensions.renderers[u.type].call({parser:this},u),!1!==v||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))w+=v||"";else switch(u.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(u.tokens),u.depth,nr(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(c="",l="",i=u.header.length,n=0;n<i;n++)l+=this.renderer.tablecell(this.parseInline(u.header[n].tokens),{header:!0,align:u.align[n]});for(c+=this.renderer.tablerow(l),p="",i=u.rows.length,n=0;n<i;n++){for(a=u.rows[n],l="",s=a.length,o=0;o<s;o++)l+=this.renderer.tablecell(this.parseInline(a[o].tokens),{header:!1,align:u.align[o]});p+=this.renderer.tablerow(l)}w+=this.renderer.table(c,p);continue;case"blockquote":p=this.parse(u.tokens),w+=this.renderer.blockquote(p);continue;case"list":for(d=u.ordered,h=u.start,m=u.loose,i=u.items.length,p="",n=0;n<i;n++)y=u.items[n],g=y.checked,b=y.task,f="",y.task&&(x=this.renderer.checkbox(g),m?y.tokens.length>0&&"paragraph"===y.tokens[0].type?(y.tokens[0].text=x+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&"text"===y.tokens[0].tokens[0].type&&(y.tokens[0].tokens[0].text=x+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:x}):f+=x),f+=this.parse(y.tokens,m),p+=this.renderer.listitem(f,b,g);w+=this.renderer.list(p,d,h);continue;case"html":w+=this.renderer.html(u.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(p=u.tokens?this.parseInline(u.tokens):u.text;r+1<k&&"text"===e[r+1].type;)u=e[++r],p+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);w+=t?this.renderer.paragraph(p):p;continue;default:{const e='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return w}parseInline(e,t){t=t||this.renderer;let r,n,o,i="";const s=e.length;for(r=0;r<s;r++)if(n=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]&&(o=this.options.extensions.renderers[n.type].call({parser:this},n),!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)))i+=o||"";else switch(n.type){case"escape":case"text":i+=t.text(n.text);break;case"html":i+=t.html(n.text);break;case"link":i+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":i+=t.image(n.href,n.title,n.text);break;case"strong":i+=t.strong(this.parseInline(n.tokens,t));break;case"em":i+=t.em(this.parseInline(n.tokens,t));break;case"codespan":i+=t.codespan(n.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(n.tokens,t));break;default:{const e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}class Pr{constructor(e){this.options=e||Jt}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}function Cr(e,t){return(r,n,o)=>{"function"==typeof n&&(o=n,n=null);const i={...n},s=function(e,t,r){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+tr(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):r?void r(null,e):e}if(t)return Promise.reject(n);if(!r)throw n;r(n)}}((n={...Ar.defaults,...i}).silent,n.async,o);if(null==r)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(n),n.hooks&&(n.hooks.options=n),o){const i=n.highlight;let a;try{n.hooks&&(r=n.hooks.preprocess(r)),a=e(r,n)}catch(e){return s(e)}const l=function(e){let r;if(!e)try{n.walkTokens&&Ar.walkTokens(a,n.walkTokens),r=t(a,n),n.hooks&&(r=n.hooks.postprocess(r))}catch(t){e=t}return n.highlight=i,e?s(e):o(null,r)};if(!i||i.length<3)return l();if(delete n.highlight,!a.length)return l();let c=0;return Ar.walkTokens(a,(function(e){"code"===e.type&&(c++,setTimeout((()=>{i(e.text,e.lang,(function(t,r){if(t)return l(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),c--,0===c&&l()}))}),0))})),void(0===c&&l())}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((t=>e(t,n))).then((e=>n.walkTokens?Promise.all(Ar.walkTokens(e,n.walkTokens)).then((()=>e)):e)).then((e=>t(e,n))).then((e=>n.hooks?n.hooks.postprocess(e):e)).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const o=e(r,n);n.walkTokens&&Ar.walkTokens(o,n.walkTokens);let i=t(o,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(e){return s(e)}}}function Ar(e,t,r){return Cr(Or.lex,Sr.parse)(e,t,r)}Ar.options=Ar.setOptions=function(e){var t;return Ar.defaults={...Ar.defaults,...e},t=Ar.defaults,Jt=t,Ar},Ar.getDefaults=function(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},Ar.defaults=Jt,Ar.use=function(...e){const t=Ar.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const r={...e};if(r.async=Ar.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=Ar.defaults.renderer||new Er;for(const r in e.renderer){const n=t[r];t[r]=(...o)=>{let i=e.renderer[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.renderer=t}if(e.tokenizer){const t=Ar.defaults.tokenizer||new br;for(const r in e.tokenizer){const n=t[r];t[r]=(...o)=>{let i=e.tokenizer[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.tokenizer=t}if(e.hooks){const t=Ar.defaults.hooks||new Pr;for(const r in e.hooks){const n=t[r];Pr.passThroughHooks.has(r)?t[r]=o=>{if(Ar.defaults.async)return Promise.resolve(e.hooks[r].call(t,o)).then((e=>n.call(t,e)));const i=e.hooks[r].call(t,o);return n.call(t,i)}:t[r]=(...o)=>{let i=e.hooks[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.hooks=t}if(e.walkTokens){const t=Ar.defaults.walkTokens;r.walkTokens=function(r){let n=[];return n.push(e.walkTokens.call(this,r)),t&&(n=n.concat(t.call(this,r))),n}}Ar.setOptions(r)}))},Ar.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(Ar,n)),n.type){case"table":for(const e of n.header)r=r.concat(Ar.walkTokens(e.tokens,t));for(const e of n.rows)for(const n of e)r=r.concat(Ar.walkTokens(n.tokens,t));break;case"list":r=r.concat(Ar.walkTokens(n.items,t));break;default:Ar.defaults.extensions&&Ar.defaults.extensions.childTokens&&Ar.defaults.extensions.childTokens[n.type]?Ar.defaults.extensions.childTokens[n.type].forEach((function(e){r=r.concat(Ar.walkTokens(n[e],t))})):n.tokens&&(r=r.concat(Ar.walkTokens(n.tokens,t)))}return r},Ar.parseInline=Cr(Or.lexInline,Sr.parseInline),Ar.Parser=Sr,Ar.parser=Sr.parse,Ar.Renderer=Er,Ar.TextRenderer=jr,Ar.Lexer=Or,Ar.lexer=Or.lex,Ar.Tokenizer=br,Ar.Slugger=$r,Ar.Hooks=Pr,Ar.parse=Ar,Ar.options,Ar.setOptions,Ar.use,Ar.walkTokens,Ar.parseInline,Sr.parse,Or.lex;var Ir=Object.defineProperty,Tr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,zr=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mr=(e,t)=>{for(var r in t||(t={}))Dr.call(t,r)&&zr(e,r,t[r]);if(Rr)for(var r of Rr(t))Lr.call(t,r)&&zr(e,r,t[r]);return e};const Nr=new Ar.Renderer;Ar.setOptions({renderer:Nr,highlight:(e,t)=>jt(e,t)});const qr="^ {0,3}\x3c!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?--\x3e\\s*$",Fr="(?:^ {0,3}<({component})([\\s\\S]*?)>([\\s\\S]*?)</\\2>|^ {0,3}<({component})([\\s\\S]*?)(?:/>|\\n{2,}))",Br="(?:"+qr+"|"+Fr+")";function Qr(e){return`\x3c!-- ReDoc-Inject: <${e}> --\x3e`}class Ur{constructor(e,t){this.options=e,this.parentId=t,this.headings=[],this.headingRule=(e,t,r,n)=>(1===t?this.currentTopHeading=this.saveHeading(e,t):2===t&&this.saveHeading(e,t,this.currentTopHeading&&this.currentTopHeading.items,this.currentTopHeading&&this.currentTopHeading.id),this.originalHeadingRule(e,t,r,n)),this.parentId=t,this.parser=new Ar.Parser,this.headingEnhanceRenderer=new Ar.Renderer,this.originalHeadingRule=this.headingEnhanceRenderer.heading.bind(this.headingEnhanceRenderer),this.headingEnhanceRenderer.heading=this.headingRule}static containsComponent(e,t){return new RegExp(Br.replace(/{component}/g,t),"gmi").test(e)}static getTextBeforeHading(e,t){const r=e.search(new RegExp(`^##?\\s+${t}`,"m"));return r>-1?e.substring(0,r):e}saveHeading(e,t,r=this.headings,n){e=C(e);const o={id:n?`${n}/${w(e)}`:`${this.parentId||"section"}/${w(e)}`,name:e,level:t,items:[]};return r.push(o),o}flattenHeadings(e){if(void 0===e)return[];const t=[];for(const r of e)t.push(r),t.push(...this.flattenHeadings(r.items));return t}attachHeadingsDescriptions(e){const t=e=>new RegExp(`##?\\s+${e.name.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}s*(\n|\r\n|$|s*)`),r=this.flattenHeadings(this.headings);if(r.length<1)return;let n=r[0],o=t(n),i=e.search(o);for(let s=1;s<r.length;s++){const a=r[s],l=t(a),c=e.substr(i+1).search(l)+i+1;n.description=e.substring(i,c).replace(o,"").trim(),n=a,o=l,i=c}n.description=e.substring(i).replace(o,"").trim()}renderMd(e,t=!1){const r=t?{renderer:this.headingEnhanceRenderer}:void 0;return Ar(e.toString(),r)}extractHeadings(e){this.renderMd(e,!0),this.attachHeadingsDescriptions(e);const t=this.headings;return this.headings=[],t}renderMdWithComponents(e){const t=this.options&&this.options.allowedMdComponents;if(!t||0===Object.keys(t).length)return[this.renderMd(e)];const r=Object.keys(t).join("|"),n=new RegExp(Br.replace(/{component}/g,r),"mig"),o=[],i=[];let s=n.exec(e),a=0;for(;s;){o.push(e.substring(a,s.index)),a=n.lastIndex;const r=t[s[1]||s[2]||s[5]],p=s[3]||s[6],u=s[4];r&&i.push({component:r.component,propsSelector:r.propsSelector,props:(l=Mr(Mr({},Wr(p)),r.props),c={children:u},Tr(l,_r(c)))}),s=n.exec(e)}var l,c;o.push(e.substring(a));const p=[];for(let e=0;e<o.length;e++){const t=o[e];t&&p.push(this.renderMd(t)),i[e]&&p.push(i[e])}return p}}function Wr(e){if(!e)return{};const t=/([\w-]+)\s*=\s*(?:{([^}]+?)}|"([^"]+?)")/gim,r={};let n;for(;null!==(n=t.exec(e));)if(n[3])r[n[1]]=n[3];else if(n[2]){let e;try{e=JSON.parse(n[2])}catch(e){}r[n[1]]=e}return r}class Vr{constructor(e,t=new W({})){this.parser=e,this.options=t,Object.assign(this,e.spec.info),this.description=e.spec.info.description||"",this.summary=e.spec.info.summary||"";const r=this.description.search(/^\s*##?\s+/m);r>-1&&(this.description=this.description.substring(0,r)),this.downloadLink=this.getDownloadLink(),this.downloadFileName=this.getDownloadFileName()}getDownloadLink(){if(this.options.downloadDefinitionUrl)return this.options.downloadDefinitionUrl;if(this.parser.specUrl)return this.parser.specUrl;if(s&&window.Blob&&window.URL&&window.URL.createObjectURL){const e=new Blob([JSON.stringify(this.parser.spec,null,2)],{type:"application/json"});return window.URL.createObjectURL(e)}}getDownloadFileName(){return this.parser.specUrl||this.options.downloadDefinitionUrl?this.options.downloadFileName:this.options.downloadFileName||"openapi.json"}}var Hr=Object.defineProperty,Jr=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,Kr=(e,t,r)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class en{constructor(e,t){const r=t.spec.components&&t.spec.components.securitySchemes||{};this.schemes=Object.keys(e||{}).map((n=>{const{resolved:o}=t.deref(r[n]),i=e[n]||[];if(!o)return void console.warn(`Non existing security scheme referenced: ${n}. Skipping`);const s=o["x-displayName"]||n;return a=((e,t)=>{for(var r in t||(t={}))Gr.call(t,r)&&Kr(e,r,t[r]);if(Zr)for(var r of Zr(t))Xr.call(t,r)&&Kr(e,r,t[r]);return e})({},o),Jr(a,Yr({id:n,sectionId:n,displayName:s,scopes:i}));var a})).filter((e=>void 0!==e))}}var tn=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptor,on=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,cn=(e,t,r)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t)=>{for(var r in t||(t={}))an.call(t,r)&&cn(e,r,t[r]);if(sn)for(var r of sn(t))ln.call(t,r)&&cn(e,r,t[r]);return e},un=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?nn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&tn(t,r,i),i};class dn{constructor(e,t,r,n,o){this.expanded=!1,this.operations=[],(0,de.makeObservable)(this),this.name=t;const{resolved:i}=e.deref(r);for(const r of Object.keys(i)){const l=i[r],c=Object.keys(l).filter(Ne);for(const i of c){const c=l[i],p=new go(e,(s=pn({},c),a={pathName:r,pointer:Oe.compile([n,t,r,i]),httpVerb:i,pathParameters:l.parameters||[],pathServers:l.servers},rn(s,on(a))),void 0,o,!0);this.operations.push(p)}}var s,a}toggle(){this.expanded=!this.expanded}}un([de.observable],dn.prototype,"expanded",2),un([de.action],dn.prototype,"toggle",1);var hn=Object.defineProperty,mn=Object.defineProperties,fn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,xn=(e,t,r)=>t in e?hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vn=(e,t)=>{for(var r in t||(t={}))gn.call(t,r)&&xn(e,r,t[r]);if(yn)for(var r of yn(t))bn.call(t,r)&&xn(e,r,t[r]);return e},wn=(e,t)=>mn(e,fn(t)),kn=(e,t)=>{var r={};for(var n in e)gn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&yn)for(var n of yn(e))t.indexOf(n)<0&&bn.call(e,n)&&(r[n]=e[n]);return r};function On(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function En(e,t){return t?e.concat(t):e}class jn{constructor(e,t,r=new W({})){this.options=r,this.allowMergeRefs=!1,this.byRef=e=>{let t;if(this.spec){"#"!==e.charAt(0)&&(e="#"+e),e=decodeURIComponent(e);try{t=Oe.get(this.spec,e)}catch(e){}return t||{}}},this.validate(e),this.spec=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const n=s?window.location.href:"";"string"==typeof t&&(this.specUrl=n?new URL(t,n).href:t)}validate(e){if(void 0===e.openapi)throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&void 0!==e.$ref&&null!==e.$ref}deref(e,t=[],r=!1){const n=null==e?void 0:e["x-refsStack"];if(t=En(t,n),this.isRef(e)){const n=rt(e.$ref);if(n&&this.options.ignoreNamedSchemas.has(n))return{resolved:{type:"object",title:n},refsStack:t};let o=this.byRef(e.$ref);if(!o)throw new Error(`Failed to resolve $ref "${e.$ref}"`);let i=t;if(t.includes(e.$ref)||t.length>999)o=Object.assign({},o,{"x-circular-ref":!0});else if(this.isRef(o)){const e=this.deref(o,t,r);i=e.refsStack,o=e.resolved}return i=On(t,e.$ref),o=this.allowMergeRefs?this.mergeRefs(e,o,r):o,{resolved:o,refsStack:i}}return{resolved:e,refsStack:En(t,n)}}mergeRefs(e,t,r){const n=e,{$ref:o}=n,i=kn(n,["$ref"]),s=Object.keys(i);if(0===s.length)return t;if(r&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly"].includes(e)))){const e=i,{description:r,title:n,readOnly:o,writeOnly:s}=e;return{allOf:[{description:r,title:n,readOnly:o,writeOnly:s},t,kn(e,["description","title","readOnly","writeOnly"])]}}return vn(vn({},t),i)}mergeAllOf(e,t,r){var n;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e,r)).allOf)return e;let o=wn(vn({},e),{"x-parentRefs":[],allOf:void 0,title:e.title||rt(t)});void 0!==o.properties&&"object"==typeof o.properties&&(o.properties=vn({},o.properties)),void 0!==o.items&&"object"==typeof o.items&&(o.items=vn({},o.items));const i=function(e,t){const r=new Set;return e.filter((e=>{const t=e.$ref;return!t||t&&!r.has(t)&&r.add(t)}))}(e.allOf.map((e=>{var t;const{resolved:n,refsStack:i}=this.deref(e,r,!0),s=e.$ref||void 0,a=this.mergeAllOf(n,s,i);if(!a["x-circular-ref"]||!a.allOf)return s&&(null==(t=o["x-parentRefs"])||t.push(...a["x-parentRefs"]||[],s)),{$ref:s,refsStack:On(i,s),schema:a}})).filter((e=>void 0!==e)));for(const{schema:e,refsStack:r}of i){const i=e,{type:s,enum:a,properties:l,items:c,required:p,title:u,description:d,readOnly:h,writeOnly:m,oneOf:f,anyOf:y,"x-circular-ref":g}=i,b=kn(i,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref"]);if(o.type!==s&&void 0!==o.type&&void 0!==s&&console.warn(`Incompatible types in allOf at "${t}": "${o.type}" and "${s}"`),void 0!==s&&(Array.isArray(s)&&Array.isArray(o.type)?o.type=[...s,...o.type]:o.type=s),void 0!==a&&(Array.isArray(a)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...a,...o.enum])):o.enum=a),void 0!==l&&"object"==typeof l){o.properties=o.properties||{};for(const e in l){const i=En(r,null==(n=l[e])?void 0:n["x-refsStack"]);if(o.properties[e]){if(!g){const r=this.mergeAllOf({allOf:[o.properties[e],wn(vn({},l[e]),{"x-refsStack":i})],"x-refsStack":i},t+"/properties/"+e,i);o.properties[e]=r}}else o.properties[e]=wn(vn({},l[e]),{"x-refsStack":i})}}if(void 0!==c&&!g){const n="boolean"==typeof o.items?{}:Object.assign({},o.items),i="boolean"==typeof e.items?{}:Object.assign({},e.items);o.items=this.mergeAllOf({allOf:[n,i]},t+"/items",r)}void 0!==f&&(o.oneOf=f),void 0!==y&&(o.anyOf=y),void 0!==p&&(o.required=[...o.required||[],...p]),o=vn(wn(vn({},o),{title:o.title||u,description:o.description||d,readOnly:void 0!==o.readOnly?o.readOnly:h,writeOnly:void 0!==o.writeOnly?o.writeOnly:m,"x-circular-ref":o["x-circular-ref"]||g}),b)}return o}findDerived(e){const t={},r=this.spec.components&&this.spec.components.schemas||{};for(const n in r){const{resolved:o}=this.deref(r[n]);void 0!==o.allOf&&o.allOf.find((t=>void 0!==t.$ref&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+n]=[o["x-discriminator-value"]||n])}return t}hoistOneOfs(e,t){if(void 0===e.allOf)return e;const r=e.allOf;for(let e=0;e<r.length;e++){const n=r[e];if(Array.isArray(n.oneOf)){const o=r.slice(0,e),i=r.slice(e+1);return{oneOf:n.oneOf.map((e=>({allOf:[...o,e,...i],"x-refsStack":t})))}}}return e}}var $n=Object.defineProperty,Sn=Object.defineProperties,Pn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,_n=(e,t,r)=>t in e?$n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rn=(e,t)=>{for(var r in t||(t={}))In.call(t,r)&&_n(e,r,t[r]);if(An)for(var r of An(t))Tn.call(t,r)&&_n(e,r,t[r]);return e},Dn=(e,t)=>Sn(e,Cn(t)),Ln=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Pn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&$n(t,r,i),i};const zn=class{constructor(e,t,r,n,o=!1,i=[]){this.options=n,this.refsStack=i,this.typePrefix="",this.isCircular=!1,this.activeOneOf=0,(0,de.makeObservable)(this),this.pointer=t.$ref||r||"";const{resolved:s,refsStack:a}=e.deref(t,i,!0);this.refsStack=On(a,this.pointer),this.rawSchema=s,this.schema=e.mergeAllOf(this.rawSchema,this.pointer,this.refsStack),this.init(e,o),n.showExtensions&&(this.extensions=xt(this.schema,n.showExtensions))}activateOneOf(e){this.activeOneOf=e}hasType(e){return this.type===e||A(this.type)&&this.type.includes(e)}init(e,t){var r,n,o,i,s,a,l,c;const p=this.schema;if(this.isCircular=!!p["x-circular-ref"],this.title=p.title||tt(this.pointer)&&Oe.baseName(this.pointer)||"",this.description=p.description||"",this.type=p.type||Be(p),this.format=p.format,this.enum=p.enum||[],this.example=p.example,this.examples=p.examples,this.deprecated=!!p.deprecated,this.pattern=p.pattern,this.externalDocs=p.externalDocs,this.constraints=it(p),this.displayFormat=this.format,this.isPrimitive=Qe(p,this.type),this.default=p.default,this.readOnly=!!p.readOnly,this.writeOnly=!!p.writeOnly,this.const=p.const||"",this.contentEncoding=p.contentEncoding,this.contentMediaType=p.contentMediaType,this.minItems=p.minItems,this.maxItems=p.maxItems,(p.nullable||p["x-nullable"])&&(A(this.type)&&!this.type.some((e=>null===e||"null"===e))?this.type=[...this.type,"null"]:A(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=A(this.type)?this.type.map((e=>null===e?"null":e)).join(" or "):this.type,!this.isCircular)if(p.if&&p.then||p.if&&p.else)this.initConditionalOperators(p,e);else if(t||void 0===qn(p)){if(t&&A(p.oneOf)&&p.oneOf.find((e=>e.$ref===this.pointer))&&delete p.oneOf,void 0!==p.oneOf)return this.initOneOf(p.oneOf,e),this.oneOfType="One of",void(void 0!==p.anyOf&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${this.pointer}`));if(void 0!==p.anyOf)return this.initOneOf(p.anyOf,e),void(this.oneOfType="Any of");if(this.hasType("object"))this.fields=Nn(e,p,this.pointer,this.options,this.refsStack);else if(this.hasType("array")&&(A(p.items)||A(p.prefixItems)?this.fields=Nn(e,p,this.pointer,this.options,this.refsStack):p.items&&(this.items=new zn(e,p.items,this.pointer+"/items",this.options,!1,this.refsStack)),this.displayType=p.prefixItems||A(p.items)?"items":vt((null==(r=this.items)?void 0:r.displayType)||this.displayType),this.displayFormat=(null==(n=this.items)?void 0:n.format)||"",this.typePrefix=(null==(o=this.items)?void 0:o.typePrefix)||""+_("arrayOf"),this.title=this.title||(null==(i=this.items)?void 0:i.title)||"",this.isPrimitive=void 0!==(null==(s=this.items)?void 0:s.isPrimitive)?null==(a=this.items)?void 0:a.isPrimitive:this.isPrimitive,void 0===this.example&&void 0!==(null==(l=this.items)?void 0:l.example)&&(this.example=[this.items.example]),(null==(c=this.items)?void 0:c.isPrimitive)&&(this.enum=this.items.enum),A(this.type))){const e=this.type.filter((e=>"array"!==e));e.length&&(this.displayType+=` or ${e.join(" or ")}`)}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(p,e)}initOneOf(e,t){if(this.oneOf=e.map(((e,r)=>{const{resolved:n,refsStack:o}=t.deref(e,this.refsStack,!0),i=t.mergeAllOf(n,this.pointer+"/oneOf/"+r,o),s=tt(e.$ref)&&!i.title?Oe.baseName(e.$ref):`${i.title||""}${void 0!==i.const&&JSON.stringify(i.const)||""}`;return new zn(t,Dn(Rn({},i),{title:s,allOf:[Dn(Rn({},this.schema),{oneOf:void 0,anyOf:void 0})],discriminator:n.allOf?void 0:i.discriminator}),e.$ref||this.pointer+"/oneOf/"+r,this.options,!1,o)})),this.options.simpleOneOfTypeLabel){const e=function(e){const t=new Set;return function e(r){for(const n of r.oneOf||[])n.oneOf?e(n):n.type&&t.add(n.type)}(e),Array.from(t.values())}(this);this.displayType=e.join(" or ")}else this.displayType=this.oneOf.map((e=>{let t=e.typePrefix+(e.title?`${e.title} (${e.displayType})`:e.displayType);return t.indexOf(" or ")>-1&&(t=`(${t})`),t})).join(" or ")}initDiscriminator(e,t){const r=qn(e);this.discriminatorProp=r.propertyName;const n=t.findDerived([...this.schema["x-parentRefs"]||[],this.pointer]);if(e.oneOf)for(const t of e.oneOf){if(void 0===t.$ref)continue;const e=Oe.baseName(t.$ref);n[t.$ref]=e}const o=r.mapping||{};let i=r["x-explicitMappingOnly"]||!1;0===Object.keys(o).length&&(i=!1);const s={};for(const e in o){const t=o[e];A(s[t])?s[t].push(e):s[t]=[e]}const a=Rn(i?{}:Rn({},n),s);let l=[];for(const e of Object.keys(a)){const t=a[e];if(A(t))for(const r of t)l.push({$ref:e,name:r});else l.push({$ref:e,name:t})}const c=Object.keys(o);0!==c.length&&(l=l.sort(((e,t)=>{const r=c.indexOf(e.name),n=c.indexOf(t.name);return r<0&&n<0?e.name.localeCompare(t.name):r<0?1:n<0?-1:r-n}))),this.oneOf=l.map((({$ref:e,name:r})=>{const n=new zn(t,{$ref:e},e,this.options,!0,this.refsStack.slice(0,-1));return n.title=r,n}))}initConditionalOperators(e,t){const r=e,{if:n,else:o={},then:i={}}=r,s=((e,t)=>{var r={};for(var n in e)In.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&An)for(var n of An(e))t.indexOf(n)<0&&Tn.call(e,n)&&(r[n]=e[n]);return r})(r,["if","else","then"]),a=[{allOf:[s,i,n],title:n&&n["x-displayName"]||(null==n?void 0:n.title)||"case 1"},{allOf:[s,o],title:o&&o["x-displayName"]||(null==o?void 0:o.title)||"case 2"}];this.oneOf=a.map(((e,r)=>new zn(t,Rn({},e),this.pointer+"/oneOf/"+r,this.options,!1,this.refsStack))),this.oneOfType="One of"}};let Mn=zn;function Nn(e,t,r,n,o){const i=t.properties||t.prefixItems||t.items||{},s=t.patternProperties||{},a=t.additionalProperties||t.unevaluatedProperties,l=t.prefixItems?t.items:t.additionalItems,c=t.default;let p=Object.keys(i||[]).map((s=>{let a=i[s];a||(console.warn(`Field "${s}" is invalid, skipping.\n Field must be an object but got ${typeof a} at "${r}"`),a={});const l=void 0!==t.required&&t.required.indexOf(s)>-1;return new Hn(e,{name:t.properties?s:`[${s}]`,required:l,schema:Dn(Rn({},a),{default:void 0===a.default&&c?c[s]:a.default})},r+"/properties/"+s,n,o)}));return n.sortPropsAlphabetically&&(p=at(p,"name")),n.requiredPropsFirst&&(p=st(p,n.sortPropsAlphabetically?void 0:t.required)),p.push(...Object.keys(s).map((t=>{let i=s[t];return i||(console.warn(`Field "${t}" is invalid, skipping.\n Field must be an object but got ${typeof i} at "${r}"`),i={}),new Hn(e,{name:t,required:!1,schema:i,kind:"patternProperties"},`${r}/patternProperties/${t}`,n,o)}))),"object"!=typeof a&&!0!==a||p.push(new Hn(e,{name:("object"==typeof a&&a["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===a?{}:a,kind:"additionalProperties"},r+"/additionalProperties",n,o)),p.push(...function({parser:e,schema:t=!1,fieldsCount:r,$ref:n,options:o,refsStack:i}){return I(t)?t?[new Hn(e,{name:`[${r}...]`,schema:{}},`${n}/additionalItems`,o,i)]:[]:A(t)?[...t.map(((t,s)=>new Hn(e,{name:`[${r+s}]`,schema:t},`${n}/additionalItems`,o,i)))]:x(t)?[new Hn(e,{name:`[${r}...]`,schema:t},`${n}/additionalItems`,o,i)]:[]}({parser:e,schema:l,fieldsCount:p.length,$ref:r,options:n,refsStack:o})),p}function qn(e){return e.discriminator||e["x-discriminator"]}Ln([de.observable],Mn.prototype,"activeOneOf",2),Ln([de.action],Mn.prototype,"activateOneOf",1);const Fn={};class Bn{constructor(e,t,r,n){this.mime=r;const{resolved:o}=e.deref(t);this.value=o.value,this.summary=o.summary,this.description=o.description,o.externalValue&&(this.externalValueUrl=new URL(o.externalValue,e.specUrl).href),We(r)&&this.value&&"object"==typeof this.value&&(this.value=Ye(this.value,n))}getExternalValue(e){return this.externalValueUrl?(this.externalValueUrl in Fn||(Fn[this.externalValueUrl]=fetch(this.externalValueUrl).then((t=>t.text().then((r=>{if(!t.ok)return Promise.reject(new Error(r));if(!Ue(e))return r;try{return JSON.parse(r)}catch(e){return r}}))))),Fn[this.externalValueUrl]):Promise.resolve(void 0)}}var Qn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,Wn=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Un(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Qn(t,r,i),i};const Vn={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};class Hn{constructor(e,t,r,n,o){var i,s,a,l,c;this.expanded=void 0,(0,de.makeObservable)(this);const{resolved:p}=e.deref(t);this.kind=t.kind||"field",this.name=t.name||p.name,this.in=p.in,this.required=!!p.required;let u=p.schema,d="";if(!u&&p.in&&p.content&&(d=Object.keys(p.content)[0],u=p.content[d]&&p.content[d].schema),this.schema=new Mn(e,u||{},r,n,!1,o),this.description=void 0===p.description?this.schema.description||"":p.description,this.example=p.example||this.schema.example,void 0!==p.examples||void 0!==this.schema.examples){const t=p.examples||this.schema.examples;this.examples=A(t)?t:h(t,((t,r)=>new Bn(e,t,r,p.encoding)))}d?this.serializationMime=d:p.style?this.style=p.style:this.in&&(this.style=null!=(s=null==(i=Vn[this.in])?void 0:i.style)?s:"form"),void 0===p.explode&&this.in?this.explode=null==(l=null==(a=Vn[this.in])?void 0:a.explode)||l:this.explode=!!p.explode,this.deprecated=void 0===p.deprecated?!!this.schema.deprecated:p.deprecated,n.showExtensions&&(this.extensions=xt(p,n.showExtensions)),this.const=(null==(c=this.schema)?void 0:c.const)||(null==p?void 0:p.const)||""}toggle(){this.expanded=!this.expanded}collapse(){this.expanded=!1}expand(){this.expanded=!0}}Wn([de.observable],Hn.prototype,"expanded",2),Wn([de.action],Hn.prototype,"toggle",1),Wn([de.action],Hn.prototype,"collapse",1),Wn([de.action],Hn.prototype,"expand",1);var Jn=require("openapi-sampler");class Yn{constructor(e,t,r,n,o){this.name=t,this.isRequestType=r,this.schema=n.schema&&new Mn(e,n.schema,"",o),this.onlyRequiredInSamples=o.onlyRequiredInSamples,this.generatedPayloadSamplesMaxDepth=o.generatedPayloadSamplesMaxDepth,void 0!==n.examples?this.examples=h(n.examples,(r=>new Bn(e,r,t,n.encoding))):void 0!==n.example?this.examples={default:new Bn(e,{value:e.deref(n.example).resolved},t,n.encoding)}:Ue(t)&&this.generateExample(e,n)}generateExample(e,t){const r={skipReadOnly:this.isRequestType,skipWriteOnly:!this.isRequestType,skipNonRequired:this.isRequestType&&this.onlyRequiredInSamples,maxSampleDepth:this.generatedPayloadSamplesMaxDepth};if(this.schema&&this.schema.oneOf){this.examples={};for(const n of this.schema.oneOf){const o=Jn.sample(n.rawSchema,r,e.spec);this.schema.discriminatorProp&&"object"==typeof o&&o&&(o[this.schema.discriminatorProp]=n.title),this.examples[n.title]=new Bn(e,{value:o},this.name,t.encoding)}}else this.schema&&(this.examples={default:new Bn(e,{value:Jn.sample(t.schema,r,e.spec)},this.name,t.encoding)})}}var Zn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Xn=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Gn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Zn(t,r,i),i};class Kn{constructor(e,t,r,n){this.isRequestType=r,this.activeMimeIdx=0,(0,de.makeObservable)(this),n.unstable_ignoreMimeParameters&&(t=ct(t)),this.mediaTypes=Object.keys(t).map((o=>{const i=t[o];return new Yn(e,o,r,i,n)}))}activate(e){this.activeMimeIdx=e}get active(){return this.mediaTypes[this.activeMimeIdx]}get hasSample(){return this.mediaTypes.filter((e=>!!e.examples)).length>0}}Xn([de.observable],Kn.prototype,"activeMimeIdx",2),Xn([de.action],Kn.prototype,"activate",1),Xn([de.computed],Kn.prototype,"active",1);class eo{constructor({parser:e,infoOrRef:t,options:r,isEvent:n}){const o=!n,{resolved:i}=e.deref(t);this.description=i.description||"",this.required=i.required;const s=wt(i);void 0!==s&&(this.content=new Kn(e,s,o,r))}}var to=Object.defineProperty,ro=Object.defineProperties,no=Object.getOwnPropertyDescriptor,oo=Object.getOwnPropertyDescriptors,io=Object.getOwnPropertySymbols,so=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable,lo=(e,t,r)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,co=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?no(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&to(t,r,i),i};class po{constructor({parser:e,code:t,defaultAsError:r,infoOrRef:n,options:o,isEvent:i}){this.expanded=!1,this.headers=[],(0,de.makeObservable)(this),this.expanded="all"===o.expandResponses||o.expandResponses[t];const{resolved:s}=e.deref(n);this.code=t,void 0!==s.content&&(this.content=new Kn(e,s.content,i,o)),void 0!==s["x-summary"]?(this.summary=s["x-summary"],this.description=s.description||""):(this.summary=s.description||"",this.description=""),this.type=ze(t,r);const a=s.headers;void 0!==a&&(this.headers=Object.keys(a).map((t=>{const r=a[t];return new Hn(e,(n=((e,t)=>{for(var r in t||(t={}))so.call(t,r)&&lo(e,r,t[r]);if(io)for(var r of io(t))ao.call(t,r)&&lo(e,r,t[r]);return e})({},r),ro(n,oo({name:t}))),"",o);var n}))),o.showExtensions&&(this.extensions=xt(s,o.showExtensions))}toggle(){this.expanded=!this.expanded}}co([de.observable],po.prototype,"expanded",2),co([de.action],po.prototype,"toggle",1);var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,mo=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?ho(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&uo(t,r,i),i};function fo(e){return"payload"===e.lang&&e.requestBodyContent}let yo=!1;class go{constructor(e,t,r,n,o=!1){this.parser=e,this.operationSpec=t,this.options=n,this.type="operation",this.items=[],this.ready=!0,this.active=!1,this.expanded=!1,(0,de.makeObservable)(this),this.pointer=t.pointer,this.description=t.description,this.parent=r,this.externalDocs=t.externalDocs,this.deprecated=!!t.deprecated,this.httpVerb=t.httpVerb,this.deprecated=!!t.deprecated,this.operationId=t.operationId,this.path=t.pathName,this.isCallback=o,this.isWebhook=t.isWebhook,this.isEvent=this.isCallback||this.isWebhook,this.name=qe(t),this.sidebarLabel=n.sideNavStyle===R.IdOnly?this.operationId||this.path:n.sideNavStyle===R.PathOnly?this.path:this.name,this.isCallback?(this.security=(t.security||[]).map((t=>new en(t,e))),this.servers=ut("",t.servers||t.pathServers||[])):(this.operationHash=t.operationId&&"operation/"+t.operationId,this.id=void 0!==t.operationId?(r?r.id+"/":"")+this.operationHash:void 0!==r?r.id+this.pointer:this.pointer,this.security=(t.security||e.spec.security||[]).map((t=>new en(t,e))),this.servers=ut(e.specUrl,t.servers||t.pathServers||e.spec.servers||[])),n.showExtensions&&(this.extensions=xt(t,n.showExtensions))}activate(){this.active=!0}deactivate(){this.active=!1}toggle(){this.expanded=!this.expanded}expand(){this.parent&&this.parent.expand()}collapse(){}get requestBody(){return this.operationSpec.requestBody&&new eo({parser:this.parser,infoOrRef:this.operationSpec.requestBody,options:this.options,isEvent:this.isEvent})}get codeSamples(){const{payloadSampleIdx:e,hideRequestPayloadSample:t}=this.options;let r=this.operationSpec["x-codeSamples"]||this.operationSpec["x-code-samples"]||[];this.operationSpec["x-code-samples"]&&!yo&&(yo=!0,console.warn('"x-code-samples" is deprecated. Use "x-codeSamples" instead'));const n=this.requestBody&&this.requestBody.content;if(n&&n.hasSample&&!t){const t=Math.min(r.length,e);r=[...r.slice(0,t),{lang:"payload",label:"Payload",source:"",requestBodyContent:n},...r.slice(t)]}return r}get parameters(){const e=lt(this.parser,this.operationSpec.pathParameters,this.operationSpec.parameters).map((e=>new Hn(this.parser,e,this.pointer,this.options)));return this.options.sortPropsAlphabetically?at(e,"name"):this.options.requiredPropsFirst?st(e):e}get responses(){let e=!1;return Object.keys(this.operationSpec.responses||[]).filter((t=>"default"===t||("success"===ze(t)&&(e=!0),Le(t)))).map((t=>new po({parser:this.parser,code:t,defaultAsError:e,infoOrRef:this.operationSpec.responses[t],options:this.options,isEvent:this.isEvent})))}get callbacks(){return Object.keys(this.operationSpec.callbacks||[]).map((e=>new dn(this.parser,e,this.operationSpec.callbacks[e],this.pointer,this.options)))}}mo([de.observable],go.prototype,"ready",2),mo([de.observable],go.prototype,"active",2),mo([de.observable],go.prototype,"expanded",2),mo([de.action],go.prototype,"activate",1),mo([de.action],go.prototype,"deactivate",1),mo([de.action],go.prototype,"toggle",1),mo([Nt],go.prototype,"requestBody",1),mo([Nt],go.prototype,"codeSamples",1),mo([Nt],go.prototype,"parameters",1),mo([Nt],go.prototype,"responses",1),mo([Nt],go.prototype,"callbacks",1);var bo=Object.defineProperty,xo=Object.defineProperties,vo=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,ko=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,Eo=(e,t,r)=>t in e?bo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jo=(e,t)=>{for(var r in t||(t={}))ko.call(t,r)&&Eo(e,r,t[r]);if(wo)for(var r of wo(t))Oo.call(t,r)&&Eo(e,r,t[r]);return e};class $o{constructor(e,t,r){this.operations=[];const{resolved:n}=e.deref(r||{});this.initWebhooks(e,n,t)}initWebhooks(e,t,r){for(const o of Object.keys(t)){const i=t[o],s=Object.keys(i).filter(Ne);for(const t of s){const o=i[t];if(i.$ref){const n=e.deref(i||{});this.initWebhooks(e,{[t]:n},r)}if(!o)continue;const s=new go(e,(n=jo({},o),xo(n,vo({httpVerb:t}))),void 0,r,!1);this.operations.push(s)}}var n}}class So{constructor(e,t,r){const{resolved:n}=e.deref(r);this.id=t,this.sectionId=ft+t,this.type=n.type,this.displayName=n["x-displayName"]||t,this.description=n.description||"","apiKey"===n.type&&(this.apiKey={name:n.name,in:n.in}),"http"===n.type&&(this.http={scheme:n.scheme,bearerFormat:n.bearerFormat}),"openIdConnect"===n.type&&(this.openId={connectUrl:n.openIdConnectUrl}),"oauth2"===n.type&&n.flows&&(this.flows=n.flows)}}class Po{constructor(e){const t=e.spec.components&&e.spec.components.securitySchemes||{};this.schemes=Object.keys(t).map((r=>new So(e,r,t[r])))}}var Co=Object.defineProperty,Ao=Object.getOwnPropertySymbols,Io=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,_o=(e,t,r)=>t in e?Co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ro=(e,t)=>{for(var r in t||(t={}))Io.call(t,r)&&_o(e,r,t[r]);if(Ao)for(var r of Ao(t))To.call(t,r)&&_o(e,r,t[r]);return e};class Do{constructor(e,t,r){var n,o,i;this.options=r,this.parser=new jn(e,t,r),this.info=new Vr(this.parser,this.options),this.externalDocs=this.parser.spec.externalDocs,this.contentItems=Zo.buildStructure(this.parser,this.options),this.securitySchemes=new Po(this.parser);const s=Ro(Ro({},null==(o=null==(n=this.parser)?void 0:n.spec)?void 0:o["x-webhooks"]),null==(i=this.parser)?void 0:i.spec.webhooks);this.webhooks=new $o(this.parser,r,s)}}var Lo=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,Mo=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?zo(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Lo(t,r,i),i};class No{constructor(e,t,r){this.items=[],this.active=!1,this.expanded=!1,(0,de.makeObservable)(this),this.id=t.id||e+"/"+w(t.name),this.type=e,this.name=t["x-displayName"]||t.name,this.level=t.level||1,this.sidebarLabel=this.name,this.description=t.description||"";const n=t.items;n&&n.length&&(this.description=Ur.getTextBeforeHading(this.description,n[0].name)),this.parent=r,this.externalDocs=t.externalDocs,"group"===this.type&&(this.expanded=!0)}activate(){this.active=!0}expand(){this.parent&&this.parent.expand(),this.expanded=!0}collapse(){"group"!==this.type&&(this.expanded=!1)}deactivate(){this.active=!1}}Mo([de.observable],No.prototype,"active",2),Mo([de.observable],No.prototype,"expanded",2),Mo([de.action],No.prototype,"activate",1),Mo([de.action],No.prototype,"expand",1),Mo([de.action],No.prototype,"collapse",1),Mo([de.action],No.prototype,"deactivate",1);var qo=Object.defineProperty,Fo=Object.defineProperties,Bo=Object.getOwnPropertyDescriptors,Qo=Object.getOwnPropertySymbols,Uo=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Vo=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ho=(e,t)=>{for(var r in t||(t={}))Uo.call(t,r)&&Vo(e,r,t[r]);if(Qo)for(var r of Qo(t))Wo.call(t,r)&&Vo(e,r,t[r]);return e},Jo=(e,t)=>Fo(e,Bo(t));const Yo=0;class Zo{static buildStructure(e,t){const r=e.spec,n=[],o=Zo.getTagsWithOperations(e,r);return n.push(...Zo.addMarkdownItems(r.info.description||"",void 0,1,t)),r["x-tagGroups"]&&r["x-tagGroups"].length>0?n.push(...Zo.getTagGroupsItems(e,void 0,r["x-tagGroups"],o,t)):n.push(...Zo.getTagsItems(e,o,void 0,void 0,t)),n}static addMarkdownItems(e,t,r,n){const o=new Ur(n,null==t?void 0:t.id).extractHeadings(e||"");o.length&&t&&t.description&&(t.description=Ur.getTextBeforeHading(t.description,o[0].name));const i=(e,t,r=1)=>t.map((t=>{const n=new No("section",t,e);return n.depth=r,t.items&&(n.items=i(n,t.items,r+1)),n}));return i(t,o,r)}static getTagGroupsItems(e,t,r,n,o){const i=[];for(const s of r){const r=new No("group",s,t);r.depth=Yo,r.items=Zo.getTagsItems(e,n,r,s,o),i.push(r)}return i}static getTagsItems(e,t,r,n,o){let i;i=void 0===n?Object.keys(t):n.tags;const s=i.map((e=>t[e]?(t[e].used=!0,t[e]):(console.warn(`Non-existing tag "${e}" is added to the group "${n.name}"`),null))),a=[];for(const t of s){if(!t)continue;const n=new No("tag",t,r);if(n.depth=Yo+1,""===t.name){const r=[...Zo.addMarkdownItems(t.description||"",n,n.depth+1,o),...this.getOperationsItems(e,void 0,t,n.depth+1,o)];a.push(...r);continue}const i=this.getTagRelatedSchema({parser:e,tag:t,parent:n});n.items=[...i,...Zo.addMarkdownItems(t.description||"",n,n.depth+1,o),...this.getOperationsItems(e,n,t,n.depth+1,o)],a.push(n)}return o.sortTagsAlphabetically&&a.sort(qt("name")),a}static getOperationsItems(e,t,r,n,o){if(0===r.operations.length)return[];const i=[];for(const s of r.operations){const r=new go(e,s,t,o);r.depth=n,i.push(r)}return o.sortOperationsAlphabetically&&i.sort(qt("name")),i}static getTagsWithOperations(e,t){const r={},n=t["x-webhooks"]||t.webhooks;for(const e of t.tags||[])r[e.name]=Jo(Ho({},e),{operations:[]});function o(e,t,n){for(const i of Object.keys(t)){const s=t[i],a=Object.keys(s).filter(Ne);for(const t of a){const a=s[t];if(s.$ref){const{resolved:t}=e.deref(s);o(e,{[i]:t},n);continue}let l=null==a?void 0:a.tags;l&&l.length||(l=[""]);for(const e of l){let o=r[e];void 0===o&&(o={name:e,operations:[]},r[e]=o),o["x-traitTag"]||o.operations.push(Jo(Ho({},a),{pathName:i,pointer:Oe.compile(["paths",i,t]),httpVerb:t,pathParameters:s.parameters||[],pathServers:s.servers,isWebhook:!!n}))}}}}return n&&o(e,n,!0),t.paths&&o(e,t.paths),r}static getTagRelatedSchema({parser:e,tag:t,parent:r}){var n;return Object.entries((null==(n=e.spec.components)?void 0:n.schemas)||{}).map((([e,n])=>{const o=n["x-tags"];if(!(null==o?void 0:o.includes(t.name)))return null;const i=new No("schema",{name:e,"x-displayName":`${n.title||e}`,description:`<SchemaDefinition showWriteOnly={true} schemaRef="#/components/schemas/${e}" />`},r);return i.depth=r.depth+1,i})).filter(Boolean)}}var Go=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ko=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Xo(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Go(t,r,i),i};const ei="data-section-id";class ti{constructor(e,t,r){this.scroll=t,this.history=r,this.activeItemIdx=-1,this.sideBarOpened=!1,this.updateOnScroll=e=>{const t=e?1:-1;let r=this.activeItemIdx;for(;(-1!==r||e)&&!(r>=this.flatItems.length-1&&e);){if(e){const e=this.getElementAtOrFirstChild(r+1);if(this.scroll.isElementBellow(e))break}else{const e=this.getElementAt(r);if(this.scroll.isElementAbove(e))break}r+=t}this.activate(this.flatItems[r],!0,!0)},this.updateOnHistory=(e=this.history.currentId)=>{if(!e)return;let t;t=this.flatItems.find((t=>t.id===e)),t?this.activateAndScroll(t,!1):(e.startsWith(ft)&&(t=this.flatItems.find((e=>ft.startsWith(e.id))),this.activateAndScroll(t,!1)),this.scroll.scrollIntoViewBySelector(`[${ei}="${P(e)}"]`))},this.getItemById=e=>this.flatItems.find((t=>t.id===e)),(0,de.makeObservable)(this),this.items=e.contentItems,this.flatItems=m(this.items||[],"items"),this.flatItems.forEach(((e,t)=>e.absoluteIdx=t)),this.subscribe()}static updateOnHistory(e=Wt.currentId,t){e&&t.scrollIntoViewBySelector(`[${ei}="${P(e)}"]`)}subscribe(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}toggleSidebar(){this.sideBarOpened=!this.sideBarOpened}closeSidebar(){this.sideBarOpened=!1}getElementAt(e){const t=this.flatItems[e];return t&&a(`[${ei}="${P(t.id)}"]`)||null}getElementAtOrFirstChild(e){let t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&a(`[${ei}="${P(t.id)}"]`)||null}get activeItem(){return this.flatItems[this.activeItemIdx]||void 0}activate(e,t=!0,r=!1){if((this.activeItem&&this.activeItem.id)!==(e&&e.id)&&(!e||"group"!==e.type)){if(this.deactivate(this.activeItem),!e)return this.activeItemIdx=-1,void this.history.replace("",r);e.depth<=Yo||(this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(encodeURI(e.id),r),e.activate(),e.expand())}}deactivate(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}activateAndScroll(e,t,r){const n=e&&this.getItemById(e.id)||e;this.activate(n,t,r),this.scrollToActive(),n&&n.items.length||this.closeSidebar()}scrollToActive(){this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}dispose(){this._unsubscribe(),this._hashUnsubscribe()}}Ko([de.observable],ti.prototype,"activeItemIdx",2),Ko([de.observable],ti.prototype,"sideBarOpened",2),Ko([de.action],ti.prototype,"toggleSidebar",1),Ko([de.action],ti.prototype,"closeSidebar",1),Ko([de.action],ti.prototype,"activate",1),Ko([de.action.bound],ti.prototype,"activateAndScroll",1);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor;const oi="scroll";class ii{constructor(e){this.options=e,this._prevOffsetY=0,this._scrollParent=s?window:void 0,this._emiter=new ve.EventEmitter,this.bind()}bind(){this._prevOffsetY=this.scrollY(),this._scrollParent&&this._scrollParent.addEventListener("scroll",this.handleScroll)}dispose(){this._scrollParent&&this._scrollParent.removeEventListener("scroll",this.handleScroll),this._emiter.removeAllListeners(oi)}scrollY(){return"undefined"!=typeof HTMLElement&&this._scrollParent instanceof HTMLElement?this._scrollParent.scrollTop:void 0!==this._scrollParent?this._scrollParent.pageYOffset:0}isElementBellow(e){if(null!==e)return e.getBoundingClientRect().top>this.options.scrollYOffset()}isElementAbove(e){if(null===e)return;const t=e.getBoundingClientRect().top;return(t>0?Math.floor(t):Math.ceil(t))<=this.options.scrollYOffset()}subscribe(e){const t=this._emiter.addListener(oi,e);return()=>t.removeListener(oi,e)}scrollIntoView(e){null!==e&&(e.scrollIntoView(),this._scrollParent&&this._scrollParent.scrollBy&&this._scrollParent.scrollBy(0,1-this.options.scrollYOffset()))}scrollIntoViewBySelector(e){const t=a(e);this.scrollIntoView(t)}handleScroll(){const e=this.scrollY()-this._prevOffsetY>0;this._prevOffsetY=this.scrollY(),this._emiter.emit(oi,e)}}((e,t,r,n)=>{for(var o,i=ni(t,r),s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);i&&ri(t,r,i)})([xe.bind,$t(100)],ii.prototype,"handleScroll");class si{constructor(){this.searchWorker=function(){let e;if(s)try{e=r(595)}catch(t){e=r(388).ZP}else e=r(388).ZP;return new e}()}indexItems(e){const t=e=>{e.forEach((e=>{"group"!==e.type&&this.add(e.name,(e.description||"").concat(" ",e.path||""),e.id),t(e.items)}))};t(e),this.searchWorker.done()}add(e,t,r){this.searchWorker.add(e,t,r)}dispose(){this.searchWorker.terminate(),this.searchWorker.dispose()}search(e){return this.searchWorker.search(e)}toJS(){return e=this,null,t=function*(){return this.searchWorker.toJS()},new Promise(((r,n)=>{var o=e=>{try{s(t.next(e))}catch(e){n(e)}},i=e=>{try{s(t.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((t=t.apply(e,null)).next())}));var e,t}load(e){this.searchWorker.load(e)}fromExternalJS(e,t){e&&t&&this.searchWorker.fromExternalJS(e,t)}}const ai=ee.div`
41
+ `;class ae extends e.PureComponent{render(){return e.createElement("div",{style:{textAlign:"center"}},e.createElement(se,{color:this.props.color},"Loading ..."),e.createElement(ie,{color:this.props.color}))}}var le=require("prop-types");const ce=e.createContext(new W({})),pe=ce.Provider,ue=ce.Consumer;var de=require("mobx"),he=require("@redocly/openapi-core/lib/bundle"),me=require("@redocly/openapi-core/lib/config/config"),fe=r(925),ye=(e,t,r)=>new Promise(((n,o)=>{var i=e=>{try{a(r.next(e))}catch(e){o(e)}},s=e=>{try{a(r.throw(e))}catch(e){o(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);a((r=r.apply(e,t)).next())}));function ge(e){return ye(this,null,(function*(){const t=new me.Config({}),n={config:t,base:s?window.location.href:process.cwd()};s&&(t.resolve.http.customFetch=r.g.fetch),"object"==typeof e&&null!==e?n.doc={source:{absoluteRef:""},parsed:e}:n.ref=e;const{bundle:{parsed:o}}=yield(0,he.bundle)(n);return void 0!==o.swagger?be(o):o}))}function be(e){return console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((t,r)=>(0,fe.convertObj)(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((e,n)=>{if(e)return r(e);t(n&&n.openapi)}))))}var xe=require("decko"),ve=require("eventemitter3"),we=require("json-pointer");const ke=we.parse;class Oe{static baseName(e,t=1){const r=Oe.parse(e);return r[r.length-t]}static dirName(e,t=1){const r=Oe.parse(e);return we.compile(r.slice(0,r.length-t))}static relative(e,t){const r=Oe.parse(e);return Oe.parse(t).slice(r.length)}static parse(e){let t=e;return"#"===t.charAt(0)&&(t=t.substring(1)),ke(t)}static join(e,t){const r=Oe.parse(e).concat(t);return we.compile(r)}static get(e,t){return we.get(e,t)}static compile(e){return we.compile(e)}static escape(e){return we.escape(e)}}we.parse=Oe.parse,Object.assign(Oe,we);var Ee=r(17),je=require("url-template"),$e=Object.defineProperty,Se=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Te=(e,t,r)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_e=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&Te(e,r,t[r]);if(Ce)for(var r of Ce(t))Ie.call(t,r)&&Te(e,r,t[r]);return e},Re=(e,t)=>Se(e,Pe(t));function De(e){return"string"==typeof e&&/\dxx/i.test(e)}function Le(e){return"default"===e||y(e)||De(e)}function ze(e,t=!1){if("default"===e)return t?"error":"success";let r="string"==typeof e?parseInt(e,10):e;if(De(e)&&(r*=100),r<100||r>599)throw new Error("invalid HTTP code");let n="success";return r>=300&&r<400?n="redirect":r>=400?n="error":r<200&&(n="info"),n}const Me={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function Ne(e){return e in Me}function qe(e){return e.summary||e.operationId||e.description&&e.description.substring(0,50)||e.pathName||"<no summary>"}const Fe={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",properties:"object",patternProperties:"object"};function Be(e){if(void 0!==e.type&&!A(e.type))return e.type;const t=Object.keys(Fe);for(const r of t){const t=Fe[r];if(void 0!==e[r])return t}return"any"}function Qe(e,t=e.type){if(e["x-circular-ref"])return!0;if(void 0!==e.oneOf||void 0!==e.anyOf)return!1;if(e.if&&e.then||e.if&&e.else)return!1;let r=!0;const n=A(t);return("object"===t||n&&(null==t?void 0:t.includes("object")))&&(r=void 0!==e.properties?0===Object.keys(e.properties).length:void 0===e.additionalProperties&&void 0===e.unevaluatedProperties&&void 0===e.patternProperties),!A(e.items)&&!A(e.prefixItems)&&(void 0!==e.items&&!I(e.items)&&("array"===t||n&&(null==t?void 0:t.includes("array")))&&(r=Qe(e.items,e.items.type)),r)}function Ue(e){return-1!==e.search(/json/i)}function We(e){return"application/x-www-form-urlencoded"===e}function Ve(e,t,r){return A(e)?e.map((e=>e.toString())).join(r):"object"==typeof e?Object.keys(e).map((t=>`${t}${r}${e[t]}`)).join(r):t+"="+e.toString()}function He(e,t){return A(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):"object"==typeof e?Object.keys(e).map((r=>`${t}[${r}]=${e[r]}`)).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function Je(e,t,r){const n="__redoc_param_name__",o=t?"*":"";return je.parse(`{?${n}${o}}`).expand({[n]:r}).substring(1).replace(/__redoc_param_name__/g,e)}function Ye(e,t={}){if(A(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map((r=>{const n=e[r],{style:o="form",explode:i=!0}=t[r]||{};switch(o){case"form":return Je(r,i,n);case"spaceDelimited":return Ve(n,r,"%20");case"pipeDelimited":return Ve(n,r,"|");case"deepObject":return He(n,r);default:return console.warn("Incorrect or unsupported encoding style: "+o),""}})).join("&")}function Ze(e,t){return Ue(t)?JSON.stringify(e):(console.warn(`Parameter serialization as ${t} is not supported`),"")}function Ge(e,t){const{name:r,style:n,explode:o=!1,serializationMime:i}=e;if(i)switch(e.in){case"path":case"header":return Ze(t,i);case"cookie":case"query":return`${r}=${Ze(t,i)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${r}`),"";switch(e.in){case"path":return function(e,t,r,n){const o=r?"*":"";let i="";"label"===t?i=".":"matrix"===t&&(i=";");const s="__redoc_param_name__";return je.parse(`{${i}${s}${o}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}(r,n,o,t);case"query":return function(e,t,r,n){switch(t){case"form":return Je(e,r,n);case"spaceDelimited":return A(n)?r?Je(e,r,n):`${e}=${n.join("%20")}`:(console.warn("The style spaceDelimited is only applicable to arrays"),"");case"pipeDelimited":return A(n)?r?Je(e,r,n):`${e}=${n.join("|")}`:(console.warn("The style pipeDelimited is only applicable to arrays"),"");case"deepObject":return!r||A(n)||"object"!=typeof n?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):He(n,e);default:return console.warn("Unexpected style for query: "+t),""}}(r,n,o,t);case"header":return function(e,t,r){if("simple"===e){const e=t?"*":"",n="__redoc_param_name__",o=je.parse(`{${n}${e}}`);return decodeURIComponent(o.expand({[n]:r}))}return console.warn("Unexpected style for header: "+e),""}(n,o,t);case"cookie":return function(e,t,r,n){return"form"===t?Je(e,r,n):(console.warn("Unexpected style for cookie: "+t),"")}(r,n,o,t);default:return console.warn("Unexpected parameter location: "+e.in),""}}function Xe(e,t){return e.in?decodeURIComponent(Ge(e,t)):String(t)}function Ke(e){return-1!==e.search(/xml/i)?"xml":-1!==e.search(/csv/i)?"csv":-1!==e.search(/plain/i)?"tex":"clike"}const et=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function tt(e){return et.test(e||"")}function rt(e){var t;const[r]=(null==(t=null==e?void 0:e.match(et))?void 0:t.reverse())||[];return r}function nt(e,t,r){let n;return void 0!==t&&void 0!==r?n=t===r?`= ${t} ${e}`:`[ ${t} .. ${r} ] ${e}`:void 0!==r?n=`<= ${r} ${e}`:void 0!==t&&(n=1===t?"non-empty":`>= ${t} ${e}`),n}function ot(e){var t,r;const n="number"==typeof e.exclusiveMinimum?Math.min(e.exclusiveMinimum,null!=(t=e.minimum)?t:1/0):e.minimum,o="number"==typeof e.exclusiveMaximum?Math.max(e.exclusiveMaximum,null!=(r=e.maximum)?r:-1/0):e.maximum,i="number"==typeof e.exclusiveMinimum||e.exclusiveMinimum,s="number"==typeof e.exclusiveMaximum||e.exclusiveMaximum;return void 0!==n&&void 0!==o?`${i?"( ":"[ "}${n} .. ${o}${s?" )":" ]"}`:void 0!==o?`${s?"< ":"<= "}${o}`:void 0!==n?`${i?"> ":">= "}${n}`:void 0}function it(e){const t=[],r=nt("characters",e.minLength,e.maxLength);void 0!==r&&t.push(r);const n=nt("items",e.minItems,e.maxItems);void 0!==n&&t.push(n);const o=nt("properties",e.minProperties,e.maxProperties);void 0!==o&&t.push(o);const i=function(e){if(void 0===e)return;const t=e.toString(10);return/^0\.0*1$/.test(t)?`decimal places <= ${t.split(".")[1].length}`:`multiple of ${t}`}(e.multipleOf);void 0!==i&&t.push(i);const s=ot(e);return void 0!==s&&t.push(s),e.uniqueItems&&t.push("unique"),t}function st(e,t=[]){const r=[],n=[],o=[];return e.forEach((e=>{e.required?t.includes(e.name)?n.push(e):o.push(e):r.push(e)})),n.sort(((e,r)=>t.indexOf(e.name)-t.indexOf(r.name))),[...n,...o,...r]}function at(e,t){return[...e].sort(((e,r)=>e[t].localeCompare(r[t])))}function lt(e,t=[],r=[]){const n={};return r.forEach((t=>{({resolved:t}=e.deref(t)),n[t.name+"_"+t.in]=!0})),(t=t.filter((t=>(({resolved:t}=e.deref(t)),!n[t.name+"_"+t.in])))).concat(r)}function ct(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r],o=r.split(";")[0].trim();t[o]?t[o]=_e(_e({},t[o]),n):t[o]=n})),t}function pt(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,r)=>t[r]&&t[r].default||e))}function ut(e,t){const r=void 0===e?$((()=>{if(!s)return"";const e=window.location.href;return e.endsWith(".html")?(0,Ee.dirname)(e):e})()):(0,Ee.dirname)(e);return 0===t.length&&(t=[{url:"/"}]),t.map((e=>{return Re(_e({},e),{url:(t=e.url,O(r,t)),description:e.description||""});var t}))}const dt="SecurityDefinitions",ht="security-definitions",mt="SchemaDefinition";let ft="section/Authentication/";function yt(e){ft=e}const gt=e=>({delete:"del",options:"opts"}[e]||e);function bt(e){return e in{"x-circular-ref":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-code-samples":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-ignoredHeaderParameters":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-badges":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0}}function xt(e,t){return Object.keys(e).filter((e=>!0===t?e.startsWith("x-")&&!bt(e):e.startsWith("x-")&&t.indexOf(e)>-1)).reduce(((t,r)=>(t[r]=e[r],t)),{})}function vt(e){return e.split(" or ").map((e=>e.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2"))).join(" or ")}function wt(e){let t=e.content;const r=e["x-examples"],n=e["x-example"];if(r){t=_e({},t);for(const e of Object.keys(r)){const n=r[e];t[e]=Re(_e({},t[e]),{examples:n})}}else if(n){t=_e({},t);for(const e of Object.keys(n)){const r=n[e];t[e]=Re(_e({},t[e]),{example:r})}}return t}var kt=require("prismjs");require("prismjs/components/prism-bash.js"),require("prismjs/components/prism-c.js"),require("prismjs/components/prism-clike.js"),require("prismjs/components/prism-coffeescript.js"),require("prismjs/components/prism-cpp.js"),require("prismjs/components/prism-csharp.js"),require("prismjs/components/prism-go.js"),require("prismjs/components/prism-http.js"),require("prismjs/components/prism-java.js"),require("prismjs/components/prism-lua.js"),require("prismjs/components/prism-markup-templating.js"),require("prismjs/components/prism-markup.js"),require("prismjs/components/prism-objectivec.js"),require("prismjs/components/prism-perl.js"),require("prismjs/components/prism-php.js"),require("prismjs/components/prism-python.js"),require("prismjs/components/prism-q.js"),require("prismjs/components/prism-ruby.js"),require("prismjs/components/prism-scala.js"),require("prismjs/components/prism-sql.js"),require("prismjs/components/prism-swift.js"),require("prismjs/components/prism-yaml.js"),require("prismjs/components/prism-csv.js");const Ot="clike";function Et(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||Ot}function jt(e,t=Ot){t=t.toLowerCase();let r=kt.languages[t];return r||(r=kt.languages[Et(t)]),kt.highlight(e.toString(),r,t)}function $t(e){return(t,r,n)=>{n.value=function(e,t){let r,n,o,i=null,s=0;const a=()=>{s=(new Date).getTime(),i=null,o=e.apply(r,n),i||(r=n=null)};return function(){const l=(new Date).getTime(),c=t-(l-s);return r=this,n=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),s=l,o=e.apply(r,n),i||(r=n=null)):i||(i=setTimeout(a,c)),o}}(n.value,e)}}function St(e){}function Pt(e){}kt.languages.insertBefore("javascript","string",{"property string":{pattern:/([{,]\s*)"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,lookbehind:!0}},void 0),kt.languages.insertBefore("javascript","punctuation",{property:{pattern:/([{,]\s*)[a-z]\w*(?=\s*:)/i,lookbehind:!0}},void 0);var Ct=Object.defineProperty,At=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Dt=(e,t,r)=>t in e?Ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lt=(e,t)=>{for(var r in t||(t={}))_t.call(t,r)&&Dt(e,r,t[r]);if(Tt)for(var r of Tt(t))Rt.call(t,r)&&Dt(e,r,t[r]);return e},zt=(e,t)=>At(e,It(t));const Mt={};function Nt(e,t,r){if("function"==typeof r.value)return function(e,t,r){if(!r.value||r.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");const n=`_memoized_${t}`,o=r.value;return e[n]=Mt,zt(Lt({},r),{value(){return this[n]===Mt&&(this[n]=o.call(this)),this[n]}})}(e,t,r);if("function"==typeof r.get)return function(e,t,r){const n=`_memoized_${t}`,o=r.get;return e[n]=Mt,zt(Lt({},r),{get(){return this[n]===Mt&&(this[n]=o.call(this)),this[n]}})}(e,t,r);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(r.value)+" instead")}function qt(e){let t=1;return"-"===e[0]&&(t=-1,e=e.substr(1)),(r,n)=>-1==t?n[e].localeCompare(r[e]):r[e].localeCompare(n[e])}var Ft=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor;const Qt="hashchange";class Ut{constructor(){this.emit=()=>{this._emiter.emit(Qt,this.currentId)},this._emiter=new ve.EventEmitter,this.bind()}get currentId(){return s?decodeURIComponent(window.location.hash.substring(1)):""}linkForId(e){return e?"#"+e:""}subscribe(e){const t=this._emiter.addListener(Qt,e);return()=>t.removeListener(Qt,e)}bind(){s&&window.addEventListener("hashchange",this.emit,!1)}dispose(){s&&window.removeEventListener("hashchange",this.emit)}replace(e,t=!1){s&&null!=e&&e!==this.currentId&&(t?window.history.replaceState(null,"",window.location.href.split("#")[0]+this.linkForId(e)):(window.history.pushState(null,"",window.location.href.split("#")[0]+this.linkForId(e)),this.emit()))}}((e,t,r,n)=>{for(var o,i=Bt(t,r),s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);i&&Ft(t,r,i)})([xe.bind,xe.debounce],Ut.prototype,"replace");const Wt=new Ut;var Vt=require("mark.js");class Ht{constructor(){this.map=new Map,this.prevTerm=""}add(e){this.map.set(e,new Vt(e))}delete(e){this.map.delete(e)}addOnly(e){this.map.forEach(((t,r)=>{-1===e.indexOf(r)&&(t.unmark(),this.map.delete(r))}));for(const t of e)this.map.has(t)||this.map.set(t,new Vt(t))}clearAll(){this.unmark(),this.map.clear()}mark(e){(e||this.prevTerm)&&(this.map.forEach((t=>{t.unmark(),t.mark(e||this.prevTerm)})),this.prevTerm=e||this.prevTerm)}unmark(){this.map.forEach((e=>e.unmark())),this.prevTerm=""}}let Jt={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Yt=/[&<>"']/,Zt=new RegExp(Yt.source,"g"),Gt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Xt=new RegExp(Gt.source,"g"),Kt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},er=e=>Kt[e];function tr(e,t){if(t){if(Yt.test(e))return e.replace(Zt,er)}else if(Gt.test(e))return e.replace(Xt,er);return e}const rr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function nr(e){return e.replace(rr,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const or=/(^|[^\[])\^/g;function ir(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n=n.source||n).replace(or,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}const sr=/[^\w:]/g,ar=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function lr(e,t,r){if(e){let e;try{e=decodeURIComponent(nr(r)).replace(sr,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!ar.test(r)&&(r=function(e,t){cr[" "+e]||(pr.test(e)?cr[" "+e]=e+"/":cr[" "+e]=fr(e,"/",!0));const r=-1===(e=cr[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(ur,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(dr,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}const cr={},pr=/^[^:]+:\/*[^/]*$/,ur=/^([^:]+:)[\s\S]*$/,dr=/^([^:]+:\/*[^/]*)[\s\S]*$/,hr={exec:function(){}};function mr(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let n=!1,o=t;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function fr(e,t,r){const n=e.length;if(0===n)return"";let o=0;for(;o<n;){const i=e.charAt(n-o-1);if(i!==t||r){if(i===t||!r)break;o++}else o++}return e.slice(0,n-o)}function yr(e,t){if(t<1)return"";let r="";for(;t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function gr(e,t,r,n){const o=t.href,i=t.title?tr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:o,title:i,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:r,href:o,title:i,text:tr(s)}}class br{constructor(e){this.options=e||Jt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:fr(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=fr(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const n=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:n,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,n,o,i,s,a,l,c,p,u,d,h,m=t[1].trim();const f=m.length>1,y={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=g.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),p=e.split("\n",1)[0],this.options.pedantic?(i=2,d=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,d=c.slice(i),i+=t[1].length),a=!1,!c&&/^ *$/.test(p)&&(r+=p+"\n",e=e.substring(p.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,i-1)}}#`);for(;e&&(u=e.split("\n",1)[0],p=u,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!o.test(p))&&!s.test(p)&&!t.test(p)&&!n.test(e);){if(p.search(/[^ ]/)>=i||!p.trim())d+="\n"+p.slice(i);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(o.test(c))break;if(s.test(c))break;if(n.test(c))break;d+="\n"+p}a||p.trim()||(a=!0),r+=u+"\n",e=e.substring(u.length+1),c=p.slice(i)}}y.loose||(l?y.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(d),n&&(o="[ ] "!==n[0],d=d.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:r,task:!!n,checked:o,loose:!1,text:d}),y.raw+=r}y.items[y.items.length-1].raw=r.trimRight(),y.items[y.items.length-1].text=d.trimRight(),y.raw=y.raw.trimRight();const b=y.items.length;for(s=0;s<b;s++)if(this.lexer.state.top=!1,y.items[s].tokens=this.lexer.blockTokens(y.items[s].text,[]),!y.loose){const e=y.items[s].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));y.loose=t}if(y.loose)for(s=0;s<b;s++)y.items[s].loose=!0;return y}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const r=this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]);e.type="paragraph",e.text=r,e.tokens=this.lexer.inline(r)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:mr(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let r,n,o,i,s=e.align.length;for(r=0;r<s;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(s=e.rows.length,r=0;r<s;r++)e.rows[r]=mr(e.rows[r],e.header.length).map((e=>({text:e})));for(s=e.header.length,n=0;n<s;n++)e.header[n].tokens=this.lexer.inline(e.header[n].text);for(s=e.rows.length,n=0;n<s;n++)for(i=e.rows[n],o=0;o<i.length;o++)i[o].tokens=this.lexer.inline(i[o].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:tr(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=fr(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let n=0,o=0;for(;o<r;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),gr(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return gr(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=n[1]||n[2]||"";if(!o||o&&(""===r||this.rules.inline.punctuation.exec(r))){const r=n[0].length-1;let o,i,s=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=o.length,n[3]||n[4]){s+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);const t=e.slice(0,r+n.index+(n[0].length-o.length)+i);if(Math.min(r,i)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=tr(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let e,n;return"@"===r[2]?(e=tr(this.options.mangle?t(r[1]):r[1]),n="mailto:"+e):(e=tr(r[1]),n=e),{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=tr(this.options.mangle?t(r[0]):r[0]),n="mailto:"+e;else{let t;do{t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(t!==r[0]);e=tr(r[0]),n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):tr(r[0]):r[0]:tr(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}const xr={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:hr,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};xr.def=ir(xr.def).replace("label",xr._label).replace("title",xr._title).getRegex(),xr.bullet=/(?:[*+-]|\d{1,9}[.)])/,xr.listItemStart=ir(/^( *)(bull) */).replace("bull",xr.bullet).getRegex(),xr.list=ir(xr.list).replace(/bull/g,xr.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xr.def.source+")").getRegex(),xr._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xr._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,xr.html=ir(xr.html,"i").replace("comment",xr._comment).replace("tag",xr._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xr.paragraph=ir(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.blockquote=ir(xr.blockquote).replace("paragraph",xr.paragraph).getRegex(),xr.normal={...xr},xr.gfm={...xr.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},xr.gfm.table=ir(xr.gfm.table).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.gfm.paragraph=ir(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",xr.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.pedantic={...xr.normal,html:ir("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",xr._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ir(xr.normal._paragraph).replace("hr",xr.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",xr.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const vr={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:hr,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:hr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function wr(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function kr(e){let t,r,n="";const o=e.length;for(t=0;t<o;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}vr._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",vr.punctuation=ir(vr.punctuation).replace(/punctuation/g,vr._punctuation).getRegex(),vr.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vr.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,vr._comment=ir(xr._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vr.emStrong.lDelim=ir(vr.emStrong.lDelim).replace(/punct/g,vr._punctuation).getRegex(),vr.emStrong.rDelimAst=ir(vr.emStrong.rDelimAst,"g").replace(/punct/g,vr._punctuation).getRegex(),vr.emStrong.rDelimUnd=ir(vr.emStrong.rDelimUnd,"g").replace(/punct/g,vr._punctuation).getRegex(),vr._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vr._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vr._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,vr.autolink=ir(vr.autolink).replace("scheme",vr._scheme).replace("email",vr._email).getRegex(),vr._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vr.tag=ir(vr.tag).replace("comment",vr._comment).replace("attribute",vr._attribute).getRegex(),vr._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vr._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vr._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vr.link=ir(vr.link).replace("label",vr._label).replace("href",vr._href).replace("title",vr._title).getRegex(),vr.reflink=ir(vr.reflink).replace("label",vr._label).replace("ref",xr._label).getRegex(),vr.nolink=ir(vr.nolink).replace("ref",xr._label).getRegex(),vr.reflinkSearch=ir(vr.reflinkSearch,"g").replace("reflink",vr.reflink).replace("nolink",vr.nolink).getRegex(),vr.normal={...vr},vr.pedantic={...vr.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ir(/^!?\[(label)\]\((.*?)\)/).replace("label",vr._label).getRegex(),reflink:ir(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vr._label).getRegex()},vr.gfm={...vr.normal,escape:ir(vr.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},vr.gfm.url=ir(vr.gfm.url,"i").replace("email",vr.gfm._extended_email).getRegex(),vr.breaks={...vr.gfm,br:ir(vr.br).replace("{2,}","*").getRegex(),text:ir(vr.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Or{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Jt,this.options.tokenizer=this.options.tokenizer||new br,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:xr.normal,inline:vr.normal};this.options.pedantic?(t.block=xr.pedantic,t.inline=vr.pedantic):this.options.gfm&&(t.block=xr.gfm,this.options.breaks?t.inline=vr.breaks:t.inline=vr.gfm),this.tokenizer.rules=t}static get rules(){return{block:xr,inline:vr}}static lex(e,t){return new Or(t).lex(e)}static lexInline(e,t){return new Or(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,n,o,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o)))n=t[t.length-1],i&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),i=o.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,o,i,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+yr("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,i.index)+"["+yr("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,i.index+i[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,a))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,kr))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,kr))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o,wr))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),s=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Er{constructor(e){this.options=e||Jt}code(e,t,r){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(r=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+tr(n)+'">'+(r?e:tr(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:tr(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,r,n){return this.options.headerIds?`<h${t} id="${this.options.headerPrefix+n.slug(r)}">${e}</h${t}>\n`:`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return r;let n='<a href="'+e+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>",n}image(e,t,r){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return r;let n=`<img src="${e}" alt="${r}"`;return t&&(n+=` title="${t}"`),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class jr{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class $r{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{n++,r=e+"-"+n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class Sr{constructor(e){this.options=e||Jt,this.options.renderer=this.options.renderer||new Er,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new jr,this.slugger=new $r}static parse(e,t){return new Sr(t).parse(e)}static parseInline(e,t){return new Sr(t).parseInline(e)}parse(e,t=!0){let r,n,o,i,s,a,l,c,p,u,d,h,m,f,y,g,b,x,v,w="";const k=e.length;for(r=0;r<k;r++)if(u=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(v=this.options.extensions.renderers[u.type].call({parser:this},u),!1!==v||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))w+=v||"";else switch(u.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(u.tokens),u.depth,nr(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(c="",l="",i=u.header.length,n=0;n<i;n++)l+=this.renderer.tablecell(this.parseInline(u.header[n].tokens),{header:!0,align:u.align[n]});for(c+=this.renderer.tablerow(l),p="",i=u.rows.length,n=0;n<i;n++){for(a=u.rows[n],l="",s=a.length,o=0;o<s;o++)l+=this.renderer.tablecell(this.parseInline(a[o].tokens),{header:!1,align:u.align[o]});p+=this.renderer.tablerow(l)}w+=this.renderer.table(c,p);continue;case"blockquote":p=this.parse(u.tokens),w+=this.renderer.blockquote(p);continue;case"list":for(d=u.ordered,h=u.start,m=u.loose,i=u.items.length,p="",n=0;n<i;n++)y=u.items[n],g=y.checked,b=y.task,f="",y.task&&(x=this.renderer.checkbox(g),m?y.tokens.length>0&&"paragraph"===y.tokens[0].type?(y.tokens[0].text=x+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&"text"===y.tokens[0].tokens[0].type&&(y.tokens[0].tokens[0].text=x+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:x}):f+=x),f+=this.parse(y.tokens,m),p+=this.renderer.listitem(f,b,g);w+=this.renderer.list(p,d,h);continue;case"html":w+=this.renderer.html(u.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(p=u.tokens?this.parseInline(u.tokens):u.text;r+1<k&&"text"===e[r+1].type;)u=e[++r],p+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);w+=t?this.renderer.paragraph(p):p;continue;default:{const e='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return w}parseInline(e,t){t=t||this.renderer;let r,n,o,i="";const s=e.length;for(r=0;r<s;r++)if(n=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]&&(o=this.options.extensions.renderers[n.type].call({parser:this},n),!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)))i+=o||"";else switch(n.type){case"escape":case"text":i+=t.text(n.text);break;case"html":i+=t.html(n.text);break;case"link":i+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":i+=t.image(n.href,n.title,n.text);break;case"strong":i+=t.strong(this.parseInline(n.tokens,t));break;case"em":i+=t.em(this.parseInline(n.tokens,t));break;case"codespan":i+=t.codespan(n.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(n.tokens,t));break;default:{const e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}class Pr{constructor(e){this.options=e||Jt}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}function Cr(e,t){return(r,n,o)=>{"function"==typeof n&&(o=n,n=null);const i={...n},s=function(e,t,r){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+tr(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):r?void r(null,e):e}if(t)return Promise.reject(n);if(!r)throw n;r(n)}}((n={...Ar.defaults,...i}).silent,n.async,o);if(null==r)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(n),n.hooks&&(n.hooks.options=n),o){const i=n.highlight;let a;try{n.hooks&&(r=n.hooks.preprocess(r)),a=e(r,n)}catch(e){return s(e)}const l=function(e){let r;if(!e)try{n.walkTokens&&Ar.walkTokens(a,n.walkTokens),r=t(a,n),n.hooks&&(r=n.hooks.postprocess(r))}catch(t){e=t}return n.highlight=i,e?s(e):o(null,r)};if(!i||i.length<3)return l();if(delete n.highlight,!a.length)return l();let c=0;return Ar.walkTokens(a,(function(e){"code"===e.type&&(c++,setTimeout((()=>{i(e.text,e.lang,(function(t,r){if(t)return l(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),c--,0===c&&l()}))}),0))})),void(0===c&&l())}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((t=>e(t,n))).then((e=>n.walkTokens?Promise.all(Ar.walkTokens(e,n.walkTokens)).then((()=>e)):e)).then((e=>t(e,n))).then((e=>n.hooks?n.hooks.postprocess(e):e)).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));const o=e(r,n);n.walkTokens&&Ar.walkTokens(o,n.walkTokens);let i=t(o,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(e){return s(e)}}}function Ar(e,t,r){return Cr(Or.lex,Sr.parse)(e,t,r)}Ar.options=Ar.setOptions=function(e){var t;return Ar.defaults={...Ar.defaults,...e},t=Ar.defaults,Jt=t,Ar},Ar.getDefaults=function(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},Ar.defaults=Jt,Ar.use=function(...e){const t=Ar.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const r={...e};if(r.async=Ar.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=Ar.defaults.renderer||new Er;for(const r in e.renderer){const n=t[r];t[r]=(...o)=>{let i=e.renderer[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.renderer=t}if(e.tokenizer){const t=Ar.defaults.tokenizer||new br;for(const r in e.tokenizer){const n=t[r];t[r]=(...o)=>{let i=e.tokenizer[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.tokenizer=t}if(e.hooks){const t=Ar.defaults.hooks||new Pr;for(const r in e.hooks){const n=t[r];Pr.passThroughHooks.has(r)?t[r]=o=>{if(Ar.defaults.async)return Promise.resolve(e.hooks[r].call(t,o)).then((e=>n.call(t,e)));const i=e.hooks[r].call(t,o);return n.call(t,i)}:t[r]=(...o)=>{let i=e.hooks[r].apply(t,o);return!1===i&&(i=n.apply(t,o)),i}}r.hooks=t}if(e.walkTokens){const t=Ar.defaults.walkTokens;r.walkTokens=function(r){let n=[];return n.push(e.walkTokens.call(this,r)),t&&(n=n.concat(t.call(this,r))),n}}Ar.setOptions(r)}))},Ar.walkTokens=function(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(Ar,n)),n.type){case"table":for(const e of n.header)r=r.concat(Ar.walkTokens(e.tokens,t));for(const e of n.rows)for(const n of e)r=r.concat(Ar.walkTokens(n.tokens,t));break;case"list":r=r.concat(Ar.walkTokens(n.items,t));break;default:Ar.defaults.extensions&&Ar.defaults.extensions.childTokens&&Ar.defaults.extensions.childTokens[n.type]?Ar.defaults.extensions.childTokens[n.type].forEach((function(e){r=r.concat(Ar.walkTokens(n[e],t))})):n.tokens&&(r=r.concat(Ar.walkTokens(n.tokens,t)))}return r},Ar.parseInline=Cr(Or.lexInline,Sr.parseInline),Ar.Parser=Sr,Ar.parser=Sr.parse,Ar.Renderer=Er,Ar.TextRenderer=jr,Ar.Lexer=Or,Ar.lexer=Or.lex,Ar.Tokenizer=br,Ar.Slugger=$r,Ar.Hooks=Pr,Ar.parse=Ar,Ar.options,Ar.setOptions,Ar.use,Ar.walkTokens,Ar.parseInline,Sr.parse,Or.lex;var Ir=Object.defineProperty,Tr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,zr=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mr=(e,t)=>{for(var r in t||(t={}))Dr.call(t,r)&&zr(e,r,t[r]);if(Rr)for(var r of Rr(t))Lr.call(t,r)&&zr(e,r,t[r]);return e};const Nr=new Ar.Renderer;Ar.setOptions({renderer:Nr,highlight:(e,t)=>jt(e,t)});const qr="^ {0,3}\x3c!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?--\x3e\\s*$",Fr="(?:^ {0,3}<({component})([\\s\\S]*?)>([\\s\\S]*?)</\\2>|^ {0,3}<({component})([\\s\\S]*?)(?:/>|\\n{2,}))",Br="(?:"+qr+"|"+Fr+")";function Qr(e){return`\x3c!-- ReDoc-Inject: <${e}> --\x3e`}class Ur{constructor(e,t){this.options=e,this.parentId=t,this.headings=[],this.headingRule=(e,t,r,n)=>(1===t?this.currentTopHeading=this.saveHeading(e,t):2===t&&this.saveHeading(e,t,this.currentTopHeading&&this.currentTopHeading.items,this.currentTopHeading&&this.currentTopHeading.id),this.originalHeadingRule(e,t,r,n)),this.parentId=t,this.parser=new Ar.Parser,this.headingEnhanceRenderer=new Ar.Renderer,this.originalHeadingRule=this.headingEnhanceRenderer.heading.bind(this.headingEnhanceRenderer),this.headingEnhanceRenderer.heading=this.headingRule}static containsComponent(e,t){return new RegExp(Br.replace(/{component}/g,t),"gmi").test(e)}static getTextBeforeHading(e,t){const r=e.search(new RegExp(`^##?\\s+${t}`,"m"));return r>-1?e.substring(0,r):e}saveHeading(e,t,r=this.headings,n){e=C(e);const o={id:n?`${n}/${w(e)}`:`${this.parentId||"section"}/${w(e)}`,name:e,level:t,items:[]};return r.push(o),o}flattenHeadings(e){if(void 0===e)return[];const t=[];for(const r of e)t.push(r),t.push(...this.flattenHeadings(r.items));return t}attachHeadingsDescriptions(e){const t=e=>new RegExp(`##?\\s+${e.name.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}s*(\n|\r\n|$|s*)`),r=this.flattenHeadings(this.headings);if(r.length<1)return;let n=r[0],o=t(n),i=e.search(o);for(let s=1;s<r.length;s++){const a=r[s],l=t(a),c=e.substr(i+1).search(l)+i+1;n.description=e.substring(i,c).replace(o,"").trim(),n=a,o=l,i=c}n.description=e.substring(i).replace(o,"").trim()}renderMd(e,t=!1){const r=t?{renderer:this.headingEnhanceRenderer}:void 0;return Ar(e.toString(),r)}extractHeadings(e){this.renderMd(e,!0),this.attachHeadingsDescriptions(e);const t=this.headings;return this.headings=[],t}renderMdWithComponents(e){const t=this.options&&this.options.allowedMdComponents;if(!t||0===Object.keys(t).length)return[this.renderMd(e)];const r=Object.keys(t).join("|"),n=new RegExp(Br.replace(/{component}/g,r),"mig"),o=[],i=[];let s=n.exec(e),a=0;for(;s;){o.push(e.substring(a,s.index)),a=n.lastIndex;const r=t[s[1]||s[2]||s[5]],p=s[3]||s[6],u=s[4];r&&i.push({component:r.component,propsSelector:r.propsSelector,props:(l=Mr(Mr({},Wr(p)),r.props),c={children:u},Tr(l,_r(c)))}),s=n.exec(e)}var l,c;o.push(e.substring(a));const p=[];for(let e=0;e<o.length;e++){const t=o[e];t&&p.push(this.renderMd(t)),i[e]&&p.push(i[e])}return p}}function Wr(e){if(!e)return{};const t=/([\w-]+)\s*=\s*(?:{([^}]+?)}|"([^"]+?)")/gim,r={};let n;for(;null!==(n=t.exec(e));)if(n[3])r[n[1]]=n[3];else if(n[2]){let e;try{e=JSON.parse(n[2])}catch(e){}r[n[1]]=e}return r}class Vr{constructor(e,t=new W({})){this.parser=e,this.options=t,Object.assign(this,e.spec.info),this.description=e.spec.info.description||"",this.summary=e.spec.info.summary||"";const r=this.description.search(/^\s*##?\s+/m);r>-1&&(this.description=this.description.substring(0,r)),this.downloadLink=this.getDownloadLink(),this.downloadFileName=this.getDownloadFileName()}getDownloadLink(){if(this.options.downloadDefinitionUrl)return this.options.downloadDefinitionUrl;if(this.parser.specUrl)return this.parser.specUrl;if(s&&window.Blob&&window.URL&&window.URL.createObjectURL){const e=new Blob([JSON.stringify(this.parser.spec,null,2)],{type:"application/json"});return window.URL.createObjectURL(e)}}getDownloadFileName(){return this.parser.specUrl||this.options.downloadDefinitionUrl?this.options.downloadFileName:this.options.downloadFileName||"openapi.json"}}var Hr=Object.defineProperty,Jr=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,Kr=(e,t,r)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class en{constructor(e,t){const r=t.spec.components&&t.spec.components.securitySchemes||{};this.schemes=Object.keys(e||{}).map((n=>{const{resolved:o}=t.deref(r[n]),i=e[n]||[];if(!o)return void console.warn(`Non existing security scheme referenced: ${n}. Skipping`);const s=o["x-displayName"]||n;return a=((e,t)=>{for(var r in t||(t={}))Gr.call(t,r)&&Kr(e,r,t[r]);if(Zr)for(var r of Zr(t))Xr.call(t,r)&&Kr(e,r,t[r]);return e})({},o),Jr(a,Yr({id:n,sectionId:n,displayName:s,scopes:i}));var a})).filter((e=>void 0!==e))}}var tn=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptor,on=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,cn=(e,t,r)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t)=>{for(var r in t||(t={}))an.call(t,r)&&cn(e,r,t[r]);if(sn)for(var r of sn(t))ln.call(t,r)&&cn(e,r,t[r]);return e},un=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?nn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&tn(t,r,i),i};class dn{constructor(e,t,r,n,o){this.expanded=!1,this.operations=[],(0,de.makeObservable)(this),this.name=t;const{resolved:i}=e.deref(r);for(const r of Object.keys(i)){const l=i[r],c=Object.keys(l).filter(Ne);for(const i of c){const c=l[i],p=new go(e,(s=pn({},c),a={pathName:r,pointer:Oe.compile([n,t,r,i]),httpVerb:i,pathParameters:l.parameters||[],pathServers:l.servers},rn(s,on(a))),void 0,o,!0);this.operations.push(p)}}var s,a}toggle(){this.expanded=!this.expanded}}un([de.observable],dn.prototype,"expanded",2),un([de.action],dn.prototype,"toggle",1);var hn=Object.defineProperty,mn=Object.defineProperties,fn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,xn=(e,t,r)=>t in e?hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vn=(e,t)=>{for(var r in t||(t={}))gn.call(t,r)&&xn(e,r,t[r]);if(yn)for(var r of yn(t))bn.call(t,r)&&xn(e,r,t[r]);return e},wn=(e,t)=>mn(e,fn(t)),kn=(e,t)=>{var r={};for(var n in e)gn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&yn)for(var n of yn(e))t.indexOf(n)<0&&bn.call(e,n)&&(r[n]=e[n]);return r};function On(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function En(e,t){return t?e.concat(t):e}class jn{constructor(e,t,r=new W({})){this.options=r,this.allowMergeRefs=!1,this.byRef=e=>{let t;if(this.spec){"#"!==e.charAt(0)&&(e="#"+e),e=decodeURIComponent(e);try{t=Oe.get(this.spec,e)}catch(e){}return t||{}}},this.validate(e),this.spec=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const n=s?window.location.href:"";"string"==typeof t&&(this.specUrl=n?new URL(t,n).href:t)}validate(e){if(void 0===e.openapi)throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&void 0!==e.$ref&&null!==e.$ref}deref(e,t=[],r=!1){const n=null==e?void 0:e["x-refsStack"];if(t=En(t,n),this.isRef(e)){const n=rt(e.$ref);if(n&&this.options.ignoreNamedSchemas.has(n))return{resolved:{type:"object",title:n},refsStack:t};let o=this.byRef(e.$ref);if(!o)throw new Error(`Failed to resolve $ref "${e.$ref}"`);let i=t;if(t.includes(e.$ref)||t.length>999)o=Object.assign({},o,{"x-circular-ref":!0});else if(this.isRef(o)){const e=this.deref(o,t,r);i=e.refsStack,o=e.resolved}return i=On(t,e.$ref),o=this.allowMergeRefs?this.mergeRefs(e,o,r):o,{resolved:o,refsStack:i}}return{resolved:e,refsStack:En(t,n)}}mergeRefs(e,t,r){const n=e,{$ref:o}=n,i=kn(n,["$ref"]),s=Object.keys(i);if(0===s.length)return t;if(r&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly"].includes(e)))){const e=i,{description:r,title:n,readOnly:o,writeOnly:s}=e;return{allOf:[{description:r,title:n,readOnly:o,writeOnly:s},t,kn(e,["description","title","readOnly","writeOnly"])]}}return vn(vn({},t),i)}mergeAllOf(e,t,r){var n;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e,r)).allOf)return e;let o=wn(vn({},e),{"x-parentRefs":[],allOf:void 0,title:e.title||rt(t)});void 0!==o.properties&&"object"==typeof o.properties&&(o.properties=vn({},o.properties)),void 0!==o.items&&"object"==typeof o.items&&(o.items=vn({},o.items));const i=function(e,t){const r=new Set;return e.filter((e=>{const t=e.$ref;return!t||t&&!r.has(t)&&r.add(t)}))}(e.allOf.map((e=>{var t;const{resolved:n,refsStack:i}=this.deref(e,r,!0),s=e.$ref||void 0,a=this.mergeAllOf(n,s,i);if(!a["x-circular-ref"]||!a.allOf)return s&&(null==(t=o["x-parentRefs"])||t.push(...a["x-parentRefs"]||[],s)),{$ref:s,refsStack:On(i,s),schema:a}})).filter((e=>void 0!==e)));for(const{schema:e,refsStack:r}of i){const i=e,{type:s,enum:a,properties:l,items:c,required:p,title:u,description:d,readOnly:h,writeOnly:m,oneOf:f,anyOf:y,"x-circular-ref":g}=i,b=kn(i,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref"]);if(o.type!==s&&void 0!==o.type&&void 0!==s&&console.warn(`Incompatible types in allOf at "${t}": "${o.type}" and "${s}"`),void 0!==s&&(Array.isArray(s)&&Array.isArray(o.type)?o.type=[...s,...o.type]:o.type=s),void 0!==a&&(Array.isArray(a)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...a,...o.enum])):o.enum=a),void 0!==l&&"object"==typeof l){o.properties=o.properties||{};for(const e in l){const i=En(r,null==(n=l[e])?void 0:n["x-refsStack"]);if(o.properties[e]){if(!g){const r=this.mergeAllOf({allOf:[o.properties[e],wn(vn({},l[e]),{"x-refsStack":i})],"x-refsStack":i},t+"/properties/"+e,i);o.properties[e]=r}}else o.properties[e]=wn(vn({},l[e]),{"x-refsStack":i})}}if(void 0!==c&&!g){const n="boolean"==typeof o.items?{}:Object.assign({},o.items),i="boolean"==typeof e.items?{}:Object.assign({},e.items);o.items=this.mergeAllOf({allOf:[n,i]},t+"/items",r)}void 0!==f&&(o.oneOf=f),void 0!==y&&(o.anyOf=y),void 0!==p&&(o.required=[...o.required||[],...p]),o=vn(wn(vn({},o),{title:o.title||u,description:o.description||d,readOnly:void 0!==o.readOnly?o.readOnly:h,writeOnly:void 0!==o.writeOnly?o.writeOnly:m,"x-circular-ref":o["x-circular-ref"]||g}),b)}return o}findDerived(e){const t={},r=this.spec.components&&this.spec.components.schemas||{};for(const n in r){const{resolved:o}=this.deref(r[n]);void 0!==o.allOf&&o.allOf.find((t=>void 0!==t.$ref&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+n]=[o["x-discriminator-value"]||n])}return t}hoistOneOfs(e,t){if(void 0===e.allOf)return e;const r=e.allOf;for(let e=0;e<r.length;e++){const n=r[e],{oneOf:o}=n,i=kn(n,["oneOf"]);if(o&&Array.isArray(o)){const n=r.slice(0,e),s=r.slice(e+1),a=Object.keys(i).length>0?[i]:[];return{oneOf:o.map((e=>({allOf:[...n,...a,e,...s],"x-refsStack":t})))}}}return e}}var $n=Object.defineProperty,Sn=Object.defineProperties,Pn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,_n=(e,t,r)=>t in e?$n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rn=(e,t)=>{for(var r in t||(t={}))In.call(t,r)&&_n(e,r,t[r]);if(An)for(var r of An(t))Tn.call(t,r)&&_n(e,r,t[r]);return e},Dn=(e,t)=>Sn(e,Cn(t)),Ln=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Pn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&$n(t,r,i),i};const zn=class{constructor(e,t,r,n,o=!1,i=[]){this.options=n,this.refsStack=i,this.typePrefix="",this.isCircular=!1,this.activeOneOf=0,(0,de.makeObservable)(this),this.pointer=t.$ref||r||"";const{resolved:s,refsStack:a}=e.deref(t,i,!0);this.refsStack=On(a,this.pointer),this.rawSchema=s,this.schema=e.mergeAllOf(this.rawSchema,this.pointer,this.refsStack),this.init(e,o),n.showExtensions&&(this.extensions=xt(this.schema,n.showExtensions))}activateOneOf(e){this.activeOneOf=e}hasType(e){return this.type===e||A(this.type)&&this.type.includes(e)}init(e,t){var r,n,o,i,s,a,l,c;const p=this.schema;if(this.isCircular=!!p["x-circular-ref"],this.title=p.title||tt(this.pointer)&&Oe.baseName(this.pointer)||"",this.description=p.description||"",this.type=p.type||Be(p),this.format=p.format,this.enum=p.enum||[],this.example=p.example,this.examples=p.examples,this.deprecated=!!p.deprecated,this.pattern=p.pattern,this.externalDocs=p.externalDocs,this.constraints=it(p),this.displayFormat=this.format,this.isPrimitive=Qe(p,this.type),this.default=p.default,this.readOnly=!!p.readOnly,this.writeOnly=!!p.writeOnly,this.const=p.const||"",this.contentEncoding=p.contentEncoding,this.contentMediaType=p.contentMediaType,this.minItems=p.minItems,this.maxItems=p.maxItems,(p.nullable||p["x-nullable"])&&(A(this.type)&&!this.type.some((e=>null===e||"null"===e))?this.type=[...this.type,"null"]:A(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=A(this.type)?this.type.map((e=>null===e?"null":e)).join(" or "):this.type,!this.isCircular)if(p.if&&p.then||p.if&&p.else)this.initConditionalOperators(p,e);else if(t||void 0===qn(p)){if(t&&A(p.oneOf)&&p.oneOf.find((e=>e.$ref===this.pointer))&&delete p.oneOf,void 0!==p.oneOf)return this.initOneOf(p.oneOf,e),this.oneOfType="One of",void(void 0!==p.anyOf&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${this.pointer}`));if(void 0!==p.anyOf)return this.initOneOf(p.anyOf,e),void(this.oneOfType="Any of");if(this.hasType("object"))this.fields=Nn(e,p,this.pointer,this.options,this.refsStack);else if(this.hasType("array")&&(A(p.items)||A(p.prefixItems)?this.fields=Nn(e,p,this.pointer,this.options,this.refsStack):p.items&&(this.items=new zn(e,p.items,this.pointer+"/items",this.options,!1,this.refsStack)),this.displayType=p.prefixItems||A(p.items)?"items":vt((null==(r=this.items)?void 0:r.displayType)||this.displayType),this.displayFormat=(null==(n=this.items)?void 0:n.format)||"",this.typePrefix=(null==(o=this.items)?void 0:o.typePrefix)||""+_("arrayOf"),this.title=this.title||(null==(i=this.items)?void 0:i.title)||"",this.isPrimitive=void 0!==(null==(s=this.items)?void 0:s.isPrimitive)?null==(a=this.items)?void 0:a.isPrimitive:this.isPrimitive,void 0===this.example&&void 0!==(null==(l=this.items)?void 0:l.example)&&(this.example=[this.items.example]),(null==(c=this.items)?void 0:c.isPrimitive)&&(this.enum=this.items.enum),A(this.type))){const e=this.type.filter((e=>"array"!==e));e.length&&(this.displayType+=` or ${e.join(" or ")}`)}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(p,e)}initOneOf(e,t){if(this.oneOf=e.map(((e,r)=>{const{resolved:n,refsStack:o}=t.deref(e,this.refsStack,!0),i=t.mergeAllOf(n,this.pointer+"/oneOf/"+r,o),s=tt(e.$ref)&&!i.title?Oe.baseName(e.$ref):`${i.title||""}${void 0!==i.const&&JSON.stringify(i.const)||""}`;return new zn(t,Dn(Rn({},i),{title:s,allOf:[Dn(Rn({},this.schema),{oneOf:void 0,anyOf:void 0})],discriminator:n.allOf?void 0:i.discriminator}),e.$ref||this.pointer+"/oneOf/"+r,this.options,!1,o)})),this.options.simpleOneOfTypeLabel){const e=function(e){const t=new Set;return function e(r){for(const n of r.oneOf||[])n.oneOf?e(n):n.type&&t.add(n.type)}(e),Array.from(t.values())}(this);this.displayType=e.join(" or ")}else this.displayType=this.oneOf.map((e=>{let t=e.typePrefix+(e.title?`${e.title} (${e.displayType})`:e.displayType);return t.indexOf(" or ")>-1&&(t=`(${t})`),t})).join(" or ")}initDiscriminator(e,t){const r=qn(e);this.discriminatorProp=r.propertyName;const n=t.findDerived([...this.schema["x-parentRefs"]||[],this.pointer]);if(e.oneOf)for(const t of e.oneOf){if(void 0===t.$ref)continue;const e=Oe.baseName(t.$ref);n[t.$ref]=e}const o=r.mapping||{};let i=r["x-explicitMappingOnly"]||!1;0===Object.keys(o).length&&(i=!1);const s={};for(const e in o){const t=o[e];A(s[t])?s[t].push(e):s[t]=[e]}const a=Rn(i?{}:Rn({},n),s);let l=[];for(const e of Object.keys(a)){const t=a[e];if(A(t))for(const r of t)l.push({$ref:e,name:r});else l.push({$ref:e,name:t})}const c=Object.keys(o);0!==c.length&&(l=l.sort(((e,t)=>{const r=c.indexOf(e.name),n=c.indexOf(t.name);return r<0&&n<0?e.name.localeCompare(t.name):r<0?1:n<0?-1:r-n}))),this.oneOf=l.map((({$ref:e,name:r})=>{const n=new zn(t,{$ref:e},e,this.options,!0,this.refsStack.slice(0,-1));return n.title=r,n}))}initConditionalOperators(e,t){const r=e,{if:n,else:o={},then:i={}}=r,s=((e,t)=>{var r={};for(var n in e)In.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&An)for(var n of An(e))t.indexOf(n)<0&&Tn.call(e,n)&&(r[n]=e[n]);return r})(r,["if","else","then"]),a=[{allOf:[s,i,n],title:n&&n["x-displayName"]||(null==n?void 0:n.title)||"case 1"},{allOf:[s,o],title:o&&o["x-displayName"]||(null==o?void 0:o.title)||"case 2"}];this.oneOf=a.map(((e,r)=>new zn(t,Rn({},e),this.pointer+"/oneOf/"+r,this.options,!1,this.refsStack))),this.oneOfType="One of"}};let Mn=zn;function Nn(e,t,r,n,o){const i=t.properties||t.prefixItems||t.items||{},s=t.patternProperties||{},a=t.additionalProperties||t.unevaluatedProperties,l=t.prefixItems?t.items:t.additionalItems,c=t.default;let p=Object.keys(i||[]).map((s=>{let a=i[s];a||(console.warn(`Field "${s}" is invalid, skipping.\n Field must be an object but got ${typeof a} at "${r}"`),a={});const l=void 0!==t.required&&t.required.indexOf(s)>-1;return new Hn(e,{name:t.properties?s:`[${s}]`,required:l,schema:Dn(Rn({},a),{default:void 0===a.default&&c?c[s]:a.default})},r+"/properties/"+s,n,o)}));return n.sortPropsAlphabetically&&(p=at(p,"name")),n.requiredPropsFirst&&(p=st(p,n.sortPropsAlphabetically?void 0:t.required)),p.push(...Object.keys(s).map((t=>{let i=s[t];return i||(console.warn(`Field "${t}" is invalid, skipping.\n Field must be an object but got ${typeof i} at "${r}"`),i={}),new Hn(e,{name:t,required:!1,schema:i,kind:"patternProperties"},`${r}/patternProperties/${t}`,n,o)}))),"object"!=typeof a&&!0!==a||p.push(new Hn(e,{name:("object"==typeof a&&a["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===a?{}:a,kind:"additionalProperties"},r+"/additionalProperties",n,o)),p.push(...function({parser:e,schema:t=!1,fieldsCount:r,$ref:n,options:o,refsStack:i}){return I(t)?t?[new Hn(e,{name:`[${r}...]`,schema:{}},`${n}/additionalItems`,o,i)]:[]:A(t)?[...t.map(((t,s)=>new Hn(e,{name:`[${r+s}]`,schema:t},`${n}/additionalItems`,o,i)))]:x(t)?[new Hn(e,{name:`[${r}...]`,schema:t},`${n}/additionalItems`,o,i)]:[]}({parser:e,schema:l,fieldsCount:p.length,$ref:r,options:n,refsStack:o})),p}function qn(e){return e.discriminator||e["x-discriminator"]}Ln([de.observable],Mn.prototype,"activeOneOf",2),Ln([de.action],Mn.prototype,"activateOneOf",1);const Fn={};class Bn{constructor(e,t,r,n){this.mime=r;const{resolved:o}=e.deref(t);this.value=o.value,this.summary=o.summary,this.description=o.description,o.externalValue&&(this.externalValueUrl=new URL(o.externalValue,e.specUrl).href),We(r)&&this.value&&"object"==typeof this.value&&(this.value=Ye(this.value,n))}getExternalValue(e){return this.externalValueUrl?(this.externalValueUrl in Fn||(Fn[this.externalValueUrl]=fetch(this.externalValueUrl).then((t=>t.text().then((r=>{if(!t.ok)return Promise.reject(new Error(r));if(!Ue(e))return r;try{return JSON.parse(r)}catch(e){return r}}))))),Fn[this.externalValueUrl]):Promise.resolve(void 0)}}var Qn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,Wn=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Un(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Qn(t,r,i),i};const Vn={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};class Hn{constructor(e,t,r,n,o){var i,s,a,l,c;this.expanded=void 0,(0,de.makeObservable)(this);const{resolved:p}=e.deref(t);this.kind=t.kind||"field",this.name=t.name||p.name,this.in=p.in,this.required=!!p.required;let u=p.schema,d="";if(!u&&p.in&&p.content&&(d=Object.keys(p.content)[0],u=p.content[d]&&p.content[d].schema),this.schema=new Mn(e,u||{},r,n,!1,o),this.description=void 0===p.description?this.schema.description||"":p.description,this.example=p.example||this.schema.example,void 0!==p.examples||void 0!==this.schema.examples){const t=p.examples||this.schema.examples;this.examples=A(t)?t:h(t,((t,r)=>new Bn(e,t,r,p.encoding)))}d?this.serializationMime=d:p.style?this.style=p.style:this.in&&(this.style=null!=(s=null==(i=Vn[this.in])?void 0:i.style)?s:"form"),void 0===p.explode&&this.in?this.explode=null==(l=null==(a=Vn[this.in])?void 0:a.explode)||l:this.explode=!!p.explode,this.deprecated=void 0===p.deprecated?!!this.schema.deprecated:p.deprecated,n.showExtensions&&(this.extensions=xt(p,n.showExtensions)),this.const=(null==(c=this.schema)?void 0:c.const)||(null==p?void 0:p.const)||""}toggle(){this.expanded=!this.expanded}collapse(){this.expanded=!1}expand(){this.expanded=!0}}Wn([de.observable],Hn.prototype,"expanded",2),Wn([de.action],Hn.prototype,"toggle",1),Wn([de.action],Hn.prototype,"collapse",1),Wn([de.action],Hn.prototype,"expand",1);var Jn=require("openapi-sampler");class Yn{constructor(e,t,r,n,o){this.name=t,this.isRequestType=r,this.schema=n.schema&&new Mn(e,n.schema,"",o),this.onlyRequiredInSamples=o.onlyRequiredInSamples,this.generatedPayloadSamplesMaxDepth=o.generatedPayloadSamplesMaxDepth,void 0!==n.examples?this.examples=h(n.examples,(r=>new Bn(e,r,t,n.encoding))):void 0!==n.example?this.examples={default:new Bn(e,{value:e.deref(n.example).resolved},t,n.encoding)}:Ue(t)&&this.generateExample(e,n)}generateExample(e,t){const r={skipReadOnly:this.isRequestType,skipWriteOnly:!this.isRequestType,skipNonRequired:this.isRequestType&&this.onlyRequiredInSamples,maxSampleDepth:this.generatedPayloadSamplesMaxDepth};if(this.schema&&this.schema.oneOf){this.examples={};for(const n of this.schema.oneOf){const o=Jn.sample(n.rawSchema,r,e.spec);this.schema.discriminatorProp&&"object"==typeof o&&o&&(o[this.schema.discriminatorProp]=n.title),this.examples[n.title]=new Bn(e,{value:o},this.name,t.encoding)}}else this.schema&&(this.examples={default:new Bn(e,{value:Jn.sample(t.schema,r,e.spec)},this.name,t.encoding)})}}var Zn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Xn=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Gn(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Zn(t,r,i),i};class Kn{constructor(e,t,r,n){this.isRequestType=r,this.activeMimeIdx=0,(0,de.makeObservable)(this),n.unstable_ignoreMimeParameters&&(t=ct(t)),this.mediaTypes=Object.keys(t).map((o=>{const i=t[o];return new Yn(e,o,r,i,n)}))}activate(e){this.activeMimeIdx=e}get active(){return this.mediaTypes[this.activeMimeIdx]}get hasSample(){return this.mediaTypes.filter((e=>!!e.examples)).length>0}}Xn([de.observable],Kn.prototype,"activeMimeIdx",2),Xn([de.action],Kn.prototype,"activate",1),Xn([de.computed],Kn.prototype,"active",1);class eo{constructor({parser:e,infoOrRef:t,options:r,isEvent:n}){const o=!n,{resolved:i}=e.deref(t);this.description=i.description||"",this.required=i.required;const s=wt(i);void 0!==s&&(this.content=new Kn(e,s,o,r))}}var to=Object.defineProperty,ro=Object.defineProperties,no=Object.getOwnPropertyDescriptor,oo=Object.getOwnPropertyDescriptors,io=Object.getOwnPropertySymbols,so=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable,lo=(e,t,r)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,co=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?no(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&to(t,r,i),i};class po{constructor({parser:e,code:t,defaultAsError:r,infoOrRef:n,options:o,isEvent:i}){this.expanded=!1,this.headers=[],(0,de.makeObservable)(this),this.expanded="all"===o.expandResponses||o.expandResponses[t];const{resolved:s}=e.deref(n);this.code=t,void 0!==s.content&&(this.content=new Kn(e,s.content,i,o)),void 0!==s["x-summary"]?(this.summary=s["x-summary"],this.description=s.description||""):(this.summary=s.description||"",this.description=""),this.type=ze(t,r);const a=s.headers;void 0!==a&&(this.headers=Object.keys(a).map((t=>{const r=a[t];return new Hn(e,(n=((e,t)=>{for(var r in t||(t={}))so.call(t,r)&&lo(e,r,t[r]);if(io)for(var r of io(t))ao.call(t,r)&&lo(e,r,t[r]);return e})({},r),ro(n,oo({name:t}))),"",o);var n}))),o.showExtensions&&(this.extensions=xt(s,o.showExtensions))}toggle(){this.expanded=!this.expanded}}co([de.observable],po.prototype,"expanded",2),co([de.action],po.prototype,"toggle",1);var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,mo=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?ho(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&uo(t,r,i),i};function fo(e){return"payload"===e.lang&&e.requestBodyContent}let yo=!1;class go{constructor(e,t,r,n,o=!1){var i;this.parser=e,this.operationSpec=t,this.options=n,this.type="operation",this.items=[],this.ready=!0,this.active=!1,this.expanded=!1,(0,de.makeObservable)(this),this.pointer=t.pointer,this.description=t.description,this.parent=r,this.externalDocs=t.externalDocs,this.deprecated=!!t.deprecated,this.httpVerb=t.httpVerb,this.deprecated=!!t.deprecated,this.operationId=t.operationId,this.path=t.pathName,this.isCallback=o,this.isWebhook=t.isWebhook,this.isEvent=this.isCallback||this.isWebhook,this.name=qe(t),this.sidebarLabel=n.sideNavStyle===R.IdOnly?this.operationId||this.path:n.sideNavStyle===R.PathOnly?this.path:this.name,this.badges=(null==(i=t["x-badges"])?void 0:i.map((({name:e,color:t,position:r})=>({name:e,color:t,position:r||"after"}))))||[],this.isCallback?(this.security=(t.security||[]).map((t=>new en(t,e))),this.servers=ut("",t.servers||t.pathServers||[])):(this.operationHash=t.operationId&&"operation/"+t.operationId,this.id=void 0!==t.operationId?(r?r.id+"/":"")+this.operationHash:void 0!==r?r.id+this.pointer:this.pointer,this.security=(t.security||e.spec.security||[]).map((t=>new en(t,e))),this.servers=ut(e.specUrl,t.servers||t.pathServers||e.spec.servers||[])),n.showExtensions&&(this.extensions=xt(t,n.showExtensions))}activate(){this.active=!0}deactivate(){this.active=!1}toggle(){this.expanded=!this.expanded}expand(){this.parent&&this.parent.expand()}collapse(){}get requestBody(){return this.operationSpec.requestBody&&new eo({parser:this.parser,infoOrRef:this.operationSpec.requestBody,options:this.options,isEvent:this.isEvent})}get codeSamples(){const{payloadSampleIdx:e,hideRequestPayloadSample:t}=this.options;let r=this.operationSpec["x-codeSamples"]||this.operationSpec["x-code-samples"]||[];this.operationSpec["x-code-samples"]&&!yo&&(yo=!0,console.warn('"x-code-samples" is deprecated. Use "x-codeSamples" instead'));const n=this.requestBody&&this.requestBody.content;if(n&&n.hasSample&&!t){const t=Math.min(r.length,e);r=[...r.slice(0,t),{lang:"payload",label:"Payload",source:"",requestBodyContent:n},...r.slice(t)]}return r}get parameters(){const e=lt(this.parser,this.operationSpec.pathParameters,this.operationSpec.parameters).map((e=>new Hn(this.parser,e,this.pointer,this.options)));return this.options.sortPropsAlphabetically?at(e,"name"):this.options.requiredPropsFirst?st(e):e}get responses(){let e=!1;return Object.keys(this.operationSpec.responses||[]).filter((t=>"default"===t||("success"===ze(t)&&(e=!0),Le(t)))).map((t=>new po({parser:this.parser,code:t,defaultAsError:e,infoOrRef:this.operationSpec.responses[t],options:this.options,isEvent:this.isEvent})))}get callbacks(){return Object.keys(this.operationSpec.callbacks||[]).map((e=>new dn(this.parser,e,this.operationSpec.callbacks[e],this.pointer,this.options)))}}mo([de.observable],go.prototype,"ready",2),mo([de.observable],go.prototype,"active",2),mo([de.observable],go.prototype,"expanded",2),mo([de.action],go.prototype,"activate",1),mo([de.action],go.prototype,"deactivate",1),mo([de.action],go.prototype,"toggle",1),mo([Nt],go.prototype,"requestBody",1),mo([Nt],go.prototype,"codeSamples",1),mo([Nt],go.prototype,"parameters",1),mo([Nt],go.prototype,"responses",1),mo([Nt],go.prototype,"callbacks",1);var bo=Object.defineProperty,xo=Object.defineProperties,vo=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,ko=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,Eo=(e,t,r)=>t in e?bo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jo=(e,t)=>{for(var r in t||(t={}))ko.call(t,r)&&Eo(e,r,t[r]);if(wo)for(var r of wo(t))Oo.call(t,r)&&Eo(e,r,t[r]);return e};class $o{constructor(e,t,r){this.operations=[];const{resolved:n}=e.deref(r||{});this.initWebhooks(e,n,t)}initWebhooks(e,t,r){for(const o of Object.keys(t)){const i=t[o],s=Object.keys(i).filter(Ne);for(const t of s){const o=i[t];if(i.$ref){const n=e.deref(i||{});this.initWebhooks(e,{[t]:n},r)}if(!o)continue;const s=new go(e,(n=jo({},o),xo(n,vo({httpVerb:t}))),void 0,r,!1);this.operations.push(s)}}var n}}class So{constructor(e,t,r){const{resolved:n}=e.deref(r);this.id=t,this.sectionId=ft+t,this.type=n.type,this.displayName=n["x-displayName"]||t,this.description=n.description||"","apiKey"===n.type&&(this.apiKey={name:n.name,in:n.in}),"http"===n.type&&(this.http={scheme:n.scheme,bearerFormat:n.bearerFormat}),"openIdConnect"===n.type&&(this.openId={connectUrl:n.openIdConnectUrl}),"oauth2"===n.type&&n.flows&&(this.flows=n.flows)}}class Po{constructor(e){const t=e.spec.components&&e.spec.components.securitySchemes||{};this.schemes=Object.keys(t).map((r=>new So(e,r,t[r])))}}var Co=Object.defineProperty,Ao=Object.getOwnPropertySymbols,Io=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,_o=(e,t,r)=>t in e?Co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ro=(e,t)=>{for(var r in t||(t={}))Io.call(t,r)&&_o(e,r,t[r]);if(Ao)for(var r of Ao(t))To.call(t,r)&&_o(e,r,t[r]);return e};class Do{constructor(e,t,r){var n,o,i;this.options=r,this.parser=new jn(e,t,r),this.info=new Vr(this.parser,this.options),this.externalDocs=this.parser.spec.externalDocs,this.contentItems=Zo.buildStructure(this.parser,this.options),this.securitySchemes=new Po(this.parser);const s=Ro(Ro({},null==(o=null==(n=this.parser)?void 0:n.spec)?void 0:o["x-webhooks"]),null==(i=this.parser)?void 0:i.spec.webhooks);this.webhooks=new $o(this.parser,r,s)}}var Lo=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,Mo=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?zo(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Lo(t,r,i),i};class No{constructor(e,t,r){this.items=[],this.active=!1,this.expanded=!1,(0,de.makeObservable)(this),this.id=t.id||e+"/"+w(t.name),this.type=e,this.name=t["x-displayName"]||t.name,this.level=t.level||1,this.sidebarLabel=this.name,this.description=t.description||"";const n=t.items;n&&n.length&&(this.description=Ur.getTextBeforeHading(this.description,n[0].name)),this.parent=r,this.externalDocs=t.externalDocs,"group"===this.type&&(this.expanded=!0)}activate(){this.active=!0}expand(){this.parent&&this.parent.expand(),this.expanded=!0}collapse(){"group"!==this.type&&(this.expanded=!1)}deactivate(){this.active=!1}}Mo([de.observable],No.prototype,"active",2),Mo([de.observable],No.prototype,"expanded",2),Mo([de.action],No.prototype,"activate",1),Mo([de.action],No.prototype,"expand",1),Mo([de.action],No.prototype,"collapse",1),Mo([de.action],No.prototype,"deactivate",1);var qo=Object.defineProperty,Fo=Object.defineProperties,Bo=Object.getOwnPropertyDescriptors,Qo=Object.getOwnPropertySymbols,Uo=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Vo=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ho=(e,t)=>{for(var r in t||(t={}))Uo.call(t,r)&&Vo(e,r,t[r]);if(Qo)for(var r of Qo(t))Wo.call(t,r)&&Vo(e,r,t[r]);return e},Jo=(e,t)=>Fo(e,Bo(t));const Yo=0;class Zo{static buildStructure(e,t){const r=e.spec,n=[],o=Zo.getTagsWithOperations(e,r);return n.push(...Zo.addMarkdownItems(r.info.description||"",void 0,1,t)),r["x-tagGroups"]&&r["x-tagGroups"].length>0?n.push(...Zo.getTagGroupsItems(e,void 0,r["x-tagGroups"],o,t)):n.push(...Zo.getTagsItems(e,o,void 0,void 0,t)),n}static addMarkdownItems(e,t,r,n){const o=new Ur(n,null==t?void 0:t.id).extractHeadings(e||"");o.length&&t&&t.description&&(t.description=Ur.getTextBeforeHading(t.description,o[0].name));const i=(e,t,r=1)=>t.map((t=>{const n=new No("section",t,e);return n.depth=r,t.items&&(n.items=i(n,t.items,r+1)),n}));return i(t,o,r)}static getTagGroupsItems(e,t,r,n,o){const i=[];for(const s of r){const r=new No("group",s,t);r.depth=Yo,r.items=Zo.getTagsItems(e,n,r,s,o),i.push(r)}return i}static getTagsItems(e,t,r,n,o){let i;i=void 0===n?Object.keys(t):n.tags;const s=i.map((e=>t[e]?(t[e].used=!0,t[e]):(console.warn(`Non-existing tag "${e}" is added to the group "${n.name}"`),null))),a=[];for(const t of s){if(!t)continue;const n=new No("tag",t,r);if(n.depth=Yo+1,""===t.name){const r=[...Zo.addMarkdownItems(t.description||"",n,n.depth+1,o),...this.getOperationsItems(e,void 0,t,n.depth+1,o)];a.push(...r);continue}const i=this.getTagRelatedSchema({parser:e,tag:t,parent:n});n.items=[...i,...Zo.addMarkdownItems(t.description||"",n,n.depth+1,o),...this.getOperationsItems(e,n,t,n.depth+1,o)],a.push(n)}return o.sortTagsAlphabetically&&a.sort(qt("name")),a}static getOperationsItems(e,t,r,n,o){if(0===r.operations.length)return[];const i=[];for(const s of r.operations){const r=new go(e,s,t,o);r.depth=n,i.push(r)}return o.sortOperationsAlphabetically&&i.sort(qt("name")),i}static getTagsWithOperations(e,t){const r={},n=t["x-webhooks"]||t.webhooks;for(const e of t.tags||[])r[e.name]=Jo(Ho({},e),{operations:[]});function o(e,t,n){for(const i of Object.keys(t)){const s=t[i],a=Object.keys(s).filter(Ne);for(const t of a){const a=s[t];if(s.$ref){const{resolved:t}=e.deref(s);o(e,{[i]:t},n);continue}let l=null==a?void 0:a.tags;l&&l.length||(l=[""]);for(const e of l){let o=r[e];void 0===o&&(o={name:e,operations:[]},r[e]=o),o["x-traitTag"]||o.operations.push(Jo(Ho({},a),{pathName:i,pointer:Oe.compile(["paths",i,t]),httpVerb:t,pathParameters:s.parameters||[],pathServers:s.servers,isWebhook:!!n}))}}}}return n&&o(e,n,!0),t.paths&&o(e,t.paths),r}static getTagRelatedSchema({parser:e,tag:t,parent:r}){var n;return Object.entries((null==(n=e.spec.components)?void 0:n.schemas)||{}).map((([e,n])=>{const o=n["x-tags"];if(!(null==o?void 0:o.includes(t.name)))return null;const i=new No("schema",{name:e,"x-displayName":`${n.title||e}`,description:`<SchemaDefinition showWriteOnly={true} schemaRef="#/components/schemas/${e}" />`},r);return i.depth=r.depth+1,i})).filter(Boolean)}}var Go=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ko=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Xo(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Go(t,r,i),i};const ei="data-section-id";class ti{constructor(e,t,r){this.scroll=t,this.history=r,this.activeItemIdx=-1,this.sideBarOpened=!1,this.updateOnScroll=e=>{const t=e?1:-1;let r=this.activeItemIdx;for(;(-1!==r||e)&&!(r>=this.flatItems.length-1&&e);){if(e){const e=this.getElementAtOrFirstChild(r+1);if(this.scroll.isElementBellow(e))break}else{const e=this.getElementAt(r);if(this.scroll.isElementAbove(e))break}r+=t}this.activate(this.flatItems[r],!0,!0)},this.updateOnHistory=(e=this.history.currentId)=>{if(!e)return;let t;t=this.flatItems.find((t=>t.id===e)),t?this.activateAndScroll(t,!1):(e.startsWith(ft)&&(t=this.flatItems.find((e=>ft.startsWith(e.id))),this.activateAndScroll(t,!1)),this.scroll.scrollIntoViewBySelector(`[${ei}="${P(e)}"]`))},this.getItemById=e=>this.flatItems.find((t=>t.id===e)),(0,de.makeObservable)(this),this.items=e.contentItems,this.flatItems=m(this.items||[],"items"),this.flatItems.forEach(((e,t)=>e.absoluteIdx=t)),this.subscribe()}static updateOnHistory(e=Wt.currentId,t){e&&t.scrollIntoViewBySelector(`[${ei}="${P(e)}"]`)}subscribe(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}toggleSidebar(){this.sideBarOpened=!this.sideBarOpened}closeSidebar(){this.sideBarOpened=!1}getElementAt(e){const t=this.flatItems[e];return t&&a(`[${ei}="${P(t.id)}"]`)||null}getElementAtOrFirstChild(e){let t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&a(`[${ei}="${P(t.id)}"]`)||null}get activeItem(){return this.flatItems[this.activeItemIdx]||void 0}activate(e,t=!0,r=!1){if((this.activeItem&&this.activeItem.id)!==(e&&e.id)&&(!e||"group"!==e.type)){if(this.deactivate(this.activeItem),!e)return this.activeItemIdx=-1,void this.history.replace("",r);e.depth<=Yo||(this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(encodeURI(e.id),r),e.activate(),e.expand())}}deactivate(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}activateAndScroll(e,t,r){const n=e&&this.getItemById(e.id)||e;this.activate(n,t,r),this.scrollToActive(),n&&n.items.length||this.closeSidebar()}scrollToActive(){this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}dispose(){this._unsubscribe(),this._hashUnsubscribe()}}Ko([de.observable],ti.prototype,"activeItemIdx",2),Ko([de.observable],ti.prototype,"sideBarOpened",2),Ko([de.action],ti.prototype,"toggleSidebar",1),Ko([de.action],ti.prototype,"closeSidebar",1),Ko([de.action],ti.prototype,"activate",1),Ko([de.action.bound],ti.prototype,"activateAndScroll",1);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor;const oi="scroll";class ii{constructor(e){this.options=e,this._prevOffsetY=0,this._scrollParent=s?window:void 0,this._emiter=new ve.EventEmitter,this.bind()}bind(){this._prevOffsetY=this.scrollY(),this._scrollParent&&this._scrollParent.addEventListener("scroll",this.handleScroll)}dispose(){this._scrollParent&&this._scrollParent.removeEventListener("scroll",this.handleScroll),this._emiter.removeAllListeners(oi)}scrollY(){return"undefined"!=typeof HTMLElement&&this._scrollParent instanceof HTMLElement?this._scrollParent.scrollTop:void 0!==this._scrollParent?this._scrollParent.pageYOffset:0}isElementBellow(e){if(null!==e)return e.getBoundingClientRect().top>this.options.scrollYOffset()}isElementAbove(e){if(null===e)return;const t=e.getBoundingClientRect().top;return(t>0?Math.floor(t):Math.ceil(t))<=this.options.scrollYOffset()}subscribe(e){const t=this._emiter.addListener(oi,e);return()=>t.removeListener(oi,e)}scrollIntoView(e){null!==e&&(e.scrollIntoView(),this._scrollParent&&this._scrollParent.scrollBy&&this._scrollParent.scrollBy(0,1-this.options.scrollYOffset()))}scrollIntoViewBySelector(e){const t=a(e);this.scrollIntoView(t)}handleScroll(){const e=this.scrollY()-this._prevOffsetY>0;this._prevOffsetY=this.scrollY(),this._emiter.emit(oi,e)}}((e,t,r,n)=>{for(var o,i=ni(t,r),s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(t,r,i)||i);i&&ri(t,r,i)})([xe.bind,$t(100)],ii.prototype,"handleScroll");class si{constructor(){this.searchWorker=function(){let e;if(s)try{e=r(595)}catch(t){e=r(388).ZP}else e=r(388).ZP;return new e}()}indexItems(e){const t=e=>{e.forEach((e=>{"group"!==e.type&&this.add(e.name,(e.description||"").concat(" ",e.path||""),e.id),t(e.items)}))};t(e),this.searchWorker.done()}add(e,t,r){this.searchWorker.add(e,t,r)}dispose(){this.searchWorker.terminate(),this.searchWorker.dispose()}search(e){return this.searchWorker.search(e)}toJS(){return e=this,null,t=function*(){return this.searchWorker.toJS()},new Promise(((r,n)=>{var o=e=>{try{s(t.next(e))}catch(e){n(e)}},i=e=>{try{s(t.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((t=t.apply(e,null)).next())}));var e,t}load(e){this.searchWorker.load(e)}fromExternalJS(e,t){e&&t&&this.searchWorker.fromExternalJS(e,t)}}const ai=ee.div`
42
42
  width: calc(100% - ${e=>e.theme.rightPanel.width});
43
43
  padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
44
44
 
@@ -159,7 +159,7 @@
159
159
  display: inline-block;
160
160
  padding: 2px 8px;
161
161
  margin: 0;
162
- background-color: ${e=>e.theme.colors[e.type].main};
162
+ background-color: ${e=>e.color||e.theme.colors[e.type].main};
163
163
  color: ${e=>e.theme.colors[e.type].contrastText};
164
164
  font-size: ${e=>e.theme.typography.code.fontSize};
165
165
  vertical-align: middle;
@@ -1373,7 +1373,7 @@
1373
1373
  display: inline-block;
1374
1374
  height: ${e=>e.theme.typography.code.fontSize};
1375
1375
  line-height: ${e=>e.theme.typography.code.fontSize};
1376
- background-color: #333;
1376
+ background-color: ${e=>e.color||"#333"};
1377
1377
  border-radius: 3px;
1378
1378
  background-repeat: no-repeat;
1379
1379
  background-position: 6px 4px;
@@ -1671,7 +1671,7 @@
1671
1671
  padding: ${e=>4*e.theme.spacing.unit}px;
1672
1672
  `;Object.defineProperty,Object.getOwnPropertyDescriptor;let au=class extends e.Component{render(){const{operation:t}=this.props,r=t.codeSamples,n=r.length>0,o=1===r.length&&this.context.hideSingleRequestSampleTab;return n&&e.createElement("div",null,e.createElement(gi,null," ",_("requestSamples")," "),e.createElement(Vi,{defaultIndex:0},e.createElement(Wi.TabList,{hidden:o},r.map((t=>e.createElement(Wi.Tab,{key:t.lang+"_"+(t.label||"")},void 0!==t.label?t.label:t.lang)))),r.map((t=>e.createElement(Wi.TabPanel,{key:t.lang+"_"+(t.label||"")},fo(t)?e.createElement("div",null,e.createElement(Yp,{content:t.requestBodyContent})):e.createElement(ra,{lang:t.lang,source:t.source}))))))||null}};au.contextType=ce,au=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],au);Object.defineProperty,Object.getOwnPropertyDescriptor;let lu=class extends e.Component{render(){const{operation:t}=this.props,r=t.responses.filter((e=>e.content&&e.content.hasSample));return r.length>0&&e.createElement("div",null,e.createElement(gi,null," ",_("responseSamples")," "),e.createElement(Vi,{defaultIndex:0},e.createElement(Wi.TabList,null,r.map((t=>e.createElement(Wi.Tab,{className:"tab-"+t.type,key:t.code},t.code)))),r.map((t=>e.createElement(Wi.TabPanel,{key:t.code},e.createElement("div",null,e.createElement(Yp,{content:t.content})))))))||null}};lu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],lu);var cu=Object.defineProperty,pu=Object.defineProperties,uu=Object.getOwnPropertyDescriptors,du=Object.getOwnPropertySymbols,hu=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,fu=(e,t,r)=>t in e?cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const yu=ee.div`
1673
1673
  margin-bottom: ${({theme:e})=>6*e.spacing.unit}px;
1674
- `,gu=(0,ma.observer)((({operation:t})=>{const{name:r,description:n,deprecated:o,externalDocs:i,isWebhook:s,httpVerb:a}=t,l=!(!n&&!i),{showWebhookVerb:c}=e.useContext(ce);return e.createElement(ce.Consumer,null,(p=>{return e.createElement(ui,(u=((e,t)=>{for(var r in t||(t={}))hu.call(t,r)&&fu(e,r,t[r]);if(du)for(var r of du(t))mu.call(t,r)&&fu(e,r,t[r]);return e})({},{[ei]:t.operationHash}),d={id:t.operationHash},pu(u,uu(d))),e.createElement(ai,null,e.createElement(fi,null,e.createElement(Si,{to:t.id}),r," ",o&&e.createElement(Ai,{type:"warning"}," Deprecated "),s&&e.createElement(Ai,{type:"primary"}," ","Webhook ",c&&a&&"| "+a.toUpperCase())),p.pathInMiddlePanel&&!s&&e.createElement(Kc,{operation:t,inverted:!0}),l&&e.createElement(yu,null,void 0!==n&&e.createElement(Ds,{source:n}),i&&e.createElement(Aa,{externalDocs:i})),e.createElement(Ra,{extensions:t.extensions}),e.createElement(_p,{securities:t.security}),e.createElement(pp,{parameters:t.parameters,body:t.requestBody}),e.createElement(Ap,{responses:t.responses}),e.createElement(Np,{callbacks:t.callbacks})),e.createElement(pi,null,!p.pathInMiddlePanel&&!s&&e.createElement(Kc,{operation:t}),e.createElement(au,{operation:t}),e.createElement(lu,{operation:t}),e.createElement(iu,{callbacks:t.callbacks})));var u,d}))}));var bu=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,vu=Object.getOwnPropertySymbols,wu=Object.prototype.hasOwnProperty,ku=Object.prototype.propertyIsEnumerable,Ou=(e,t,r)=>t in e?bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eu=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?xu(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&bu(t,r,i),i};let ju=class extends e.Component{render(){const t=this.props.items;return 0===t.length?null:t.map((t=>e.createElement($u,{key:t.id,item:t})))}};ju=Eu([ma.observer],ju);let $u=class extends e.Component{render(){const t=this.props.item;let r;const{type:n}=t;switch(n){case"group":r=null;break;case"tag":case"section":default:r=e.createElement(Pu,((e,t)=>{for(var r in t||(t={}))wu.call(t,r)&&Ou(e,r,t[r]);if(vu)for(var r of vu(t))ku.call(t,r)&&Ou(e,r,t[r]);return e})({},this.props));break;case"operation":r=e.createElement(Cu,{item:t})}return e.createElement(e.Fragment,null,r&&e.createElement(li,{id:t.id,$underlined:"operation"===t.type},r),t.items&&e.createElement(ju,{items:t.items}))}};$u=Eu([ma.observer],$u);const Su=t=>e.createElement(ai,{$compact:!0},t);let Pu=class extends e.Component{render(){const{name:t,description:r,externalDocs:n,level:o}=this.props.item,i=2===o?yi:fi;return e.createElement(e.Fragment,null,e.createElement(ui,null,e.createElement(ai,{$compact:!1},e.createElement(i,null,e.createElement(Si,{to:this.props.item.id}),t))),e.createElement(Ac,{parentId:this.props.item.id,source:r||"",htmlWrap:Su}),n&&e.createElement(ui,null,e.createElement(ai,null,e.createElement(Aa,{externalDocs:n}))))}};Pu=Eu([ma.observer],Pu);let Cu=class extends e.Component{render(){return e.createElement(gu,{operation:this.props.item})}};Cu=Eu([ma.observer],Cu);var Au=Object.defineProperty,Iu=Object.defineProperties,Tu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),_u=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,Du=Object.prototype.propertyIsEnumerable,Lu=(e,t,r)=>t in e?Au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let zu=class extends e.Component{constructor(){super(...arguments),this.ref=e.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&c(this.ref.current)}render(){const{item:t,withoutChildren:r}=this.props;return e.createElement(Dc,{tabIndex:0,onClick:this.activate,depth:t.depth,"data-item-id":t.id,role:"menuitem"},"operation"===t.type?e.createElement(Mu,(n=((e,t)=>{for(var r in t||(t={}))Ru.call(t,r)&&Lu(e,r,t[r]);if(_u)for(var r of _u(t))Du.call(t,r)&&Lu(e,r,t[r]);return e})({},this.props),Iu(n,Tu({item:t})))):e.createElement(zc,{$depth:t.depth,$active:t.active,$type:t.type,ref:this.ref},"schema"===t.type&&e.createElement(Tc,{type:"schema"},"schema"),e.createElement(Mc,{width:"calc(100% - 38px)",title:t.sidebarLabel},t.sidebarLabel,this.props.children),t.depth>0&&t.items.length>0&&e.createElement(Ci,{float:"right",direction:t.expanded?"down":"right"})||null),!r&&t.items&&t.items.length>0&&e.createElement(Uu,{expanded:t.expanded,items:t.items,onActivate:this.props.onActivate}));var n}};zu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],zu);const Mu=(0,ma.observer)((t=>{const{item:r}=t,n=e.createRef(),{showWebhookVerb:o}=e.useContext(ce);return e.useEffect((()=>{t.item.active&&n.current&&c(n.current)}),[t.item.active,n]),e.createElement(zc,{$depth:r.depth,$active:r.active,$deprecated:r.deprecated,ref:n},r.isWebhook?e.createElement(Tc,{type:"hook"},o?r.httpVerb:_("webhook")):e.createElement(Tc,{type:r.httpVerb},gt(r.httpVerb)),e.createElement(Mc,{tabIndex:0,width:"calc(100% - 38px)"},r.sidebarLabel,t.children))}));var Nu=Object.defineProperty,qu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Fu=Object.prototype.hasOwnProperty,Bu=Object.prototype.propertyIsEnumerable,Qu=(e,t,r)=>t in e?Nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Uu=class extends e.Component{render(){const{items:t,root:r,className:n}=this.props,o=null==this.props.expanded||this.props.expanded;return e.createElement(Rc,((e,t)=>{for(var r in t||(t={}))Fu.call(t,r)&&Qu(e,r,t[r]);if(qu)for(var r of qu(t))Bu.call(t,r)&&Qu(e,r,t[r]);return e})({className:n,style:this.props.style,$expanded:o},r?{role:"menu"}:{}),t.map(((t,r)=>e.createElement(zu,{key:r,item:t,onActivate:this.props.onActivate}))))}};function Wu(){const[t,r]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{r(!0)}),[]),t?e.createElement("img",{alt:"redocly logo",onError:()=>r(!1),src:"https://cdn.redoc.ly/redoc/logo-mini.svg"}):null}Uu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],Uu);Object.defineProperty,Object.getOwnPropertyDescriptor;let Vu=class extends e.Component{constructor(){super(...arguments),this.activate=e=>{if(e&&e.active&&this.context.menuToggle)return e.expanded?e.collapse():e.expand();this.props.menu.activateAndScroll(e,!0),setTimeout((()=>{this._updateScroll&&this._updateScroll()}))},this.saveScrollUpdate=e=>{this._updateScroll=e}}render(){const t=this.props.menu;return e.createElement(cs,{updateFn:this.saveScrollUpdate,className:this.props.className,options:{wheelPropagation:!1}},e.createElement(Uu,{items:t.items,onActivate:this.activate,root:!0}),e.createElement(Nc,null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://redocly.com/redoc/"},e.createElement(Wu,null),"API docs by Redocly")))}};Vu.contextType=ce,Vu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],Vu);const Hu=({open:t})=>{const r=t?8:-4;return e.createElement(Yu,null,e.createElement(Ju,{size:15,style:{transform:`translate(2px, ${r}px) rotate(180deg)`,transition:"transform 0.2s ease"}}),e.createElement(Ju,{size:15,style:{transform:`translate(2px, ${0-r}px)`,transition:"transform 0.2s ease"}}))},Ju=({size:t=10,className:r="",style:n})=>e.createElement("svg",{className:r,style:n||{},viewBox:"0 0 926.23699 573.74994",version:"1.1",x:"0px",y:"0px",width:t,height:t},e.createElement("g",{transform:"translate(904.92214,-879.1482)"},e.createElement("path",{d:"\n m -673.67664,1221.6502 -231.2455,-231.24803 55.6165,\n -55.627 c 30.5891,-30.59485 56.1806,-55.627 56.8701,-55.627 0.6894,\n 0 79.8637,78.60862 175.9427,174.68583 l 174.6892,174.6858 174.6892,\n -174.6858 c 96.079,-96.07721 175.253196,-174.68583 175.942696,\n -174.68583 0.6895,0 26.281,25.03215 56.8701,\n 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864\n -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688,\n -104.0616 -231.873,-231.248 z\n ",fill:"currentColor"}))),Yu=ee.div`
1674
+ `,gu=(0,ma.observer)((({operation:t})=>{const{name:r,description:n,deprecated:o,externalDocs:i,isWebhook:s,httpVerb:a,badges:l}=t,c=!(!n&&!i),{showWebhookVerb:p}=e.useContext(ce),u=l.filter((({position:e})=>"before"===e)),d=l.filter((({position:e})=>"after"===e));return e.createElement(ce.Consumer,null,(l=>{return e.createElement(ui,(h=((e,t)=>{for(var r in t||(t={}))hu.call(t,r)&&fu(e,r,t[r]);if(du)for(var r of du(t))mu.call(t,r)&&fu(e,r,t[r]);return e})({},{[ei]:t.operationHash}),m={id:t.operationHash},pu(h,uu(m))),e.createElement(ai,null,e.createElement(fi,null,e.createElement(Si,{to:t.id}),u.map((({name:t,color:r})=>e.createElement(Ai,{type:"primary",key:t,color:r},t))),r," ",o&&e.createElement(Ai,{type:"warning"}," Deprecated "),s&&e.createElement(Ai,{type:"primary"}," ","Webhook ",p&&a&&"| "+a.toUpperCase()),d.map((({name:t,color:r})=>e.createElement(Ai,{type:"primary",key:t,color:r},t)))),l.pathInMiddlePanel&&!s&&e.createElement(Kc,{operation:t,inverted:!0}),c&&e.createElement(yu,null,void 0!==n&&e.createElement(Ds,{source:n}),i&&e.createElement(Aa,{externalDocs:i})),e.createElement(Ra,{extensions:t.extensions}),e.createElement(_p,{securities:t.security}),e.createElement(pp,{parameters:t.parameters,body:t.requestBody}),e.createElement(Ap,{responses:t.responses}),e.createElement(Np,{callbacks:t.callbacks})),e.createElement(pi,null,!l.pathInMiddlePanel&&!s&&e.createElement(Kc,{operation:t}),e.createElement(au,{operation:t}),e.createElement(lu,{operation:t}),e.createElement(iu,{callbacks:t.callbacks})));var h,m}))}));var bu=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,vu=Object.getOwnPropertySymbols,wu=Object.prototype.hasOwnProperty,ku=Object.prototype.propertyIsEnumerable,Ou=(e,t,r)=>t in e?bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eu=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?xu(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&bu(t,r,i),i};let ju=class extends e.Component{render(){const t=this.props.items;return 0===t.length?null:t.map((t=>e.createElement($u,{key:t.id,item:t})))}};ju=Eu([ma.observer],ju);let $u=class extends e.Component{render(){const t=this.props.item;let r;const{type:n}=t;switch(n){case"group":r=null;break;case"tag":case"section":default:r=e.createElement(Pu,((e,t)=>{for(var r in t||(t={}))wu.call(t,r)&&Ou(e,r,t[r]);if(vu)for(var r of vu(t))ku.call(t,r)&&Ou(e,r,t[r]);return e})({},this.props));break;case"operation":r=e.createElement(Cu,{item:t})}return e.createElement(e.Fragment,null,r&&e.createElement(li,{id:t.id,$underlined:"operation"===t.type},r),t.items&&e.createElement(ju,{items:t.items}))}};$u=Eu([ma.observer],$u);const Su=t=>e.createElement(ai,{$compact:!0},t);let Pu=class extends e.Component{render(){const{name:t,description:r,externalDocs:n,level:o}=this.props.item,i=2===o?yi:fi;return e.createElement(e.Fragment,null,e.createElement(ui,null,e.createElement(ai,{$compact:!1},e.createElement(i,null,e.createElement(Si,{to:this.props.item.id}),t))),e.createElement(Ac,{parentId:this.props.item.id,source:r||"",htmlWrap:Su}),n&&e.createElement(ui,null,e.createElement(ai,null,e.createElement(Aa,{externalDocs:n}))))}};Pu=Eu([ma.observer],Pu);let Cu=class extends e.Component{render(){return e.createElement(gu,{operation:this.props.item})}};Cu=Eu([ma.observer],Cu);var Au=Object.defineProperty,Iu=Object.defineProperties,Tu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),_u=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,Du=Object.prototype.propertyIsEnumerable,Lu=(e,t,r)=>t in e?Au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let zu=class extends e.Component{constructor(){super(...arguments),this.ref=e.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&c(this.ref.current)}render(){const{item:t,withoutChildren:r}=this.props;return e.createElement(Dc,{tabIndex:0,onClick:this.activate,depth:t.depth,"data-item-id":t.id,role:"menuitem"},"operation"===t.type?e.createElement(Mu,(n=((e,t)=>{for(var r in t||(t={}))Ru.call(t,r)&&Lu(e,r,t[r]);if(_u)for(var r of _u(t))Du.call(t,r)&&Lu(e,r,t[r]);return e})({},this.props),Iu(n,Tu({item:t})))):e.createElement(zc,{$depth:t.depth,$active:t.active,$type:t.type,ref:this.ref},"schema"===t.type&&e.createElement(Tc,{type:"schema"},"schema"),e.createElement(Mc,{width:"calc(100% - 38px)",title:t.sidebarLabel},t.sidebarLabel,this.props.children),t.depth>0&&t.items.length>0&&e.createElement(Ci,{float:"right",direction:t.expanded?"down":"right"})||null),!r&&t.items&&t.items.length>0&&e.createElement(Uu,{expanded:t.expanded,items:t.items,onActivate:this.props.onActivate}));var n}};zu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],zu);const Mu=(0,ma.observer)((t=>{var r;const{item:n}=t,o=e.createRef(),{showWebhookVerb:i}=e.useContext(ce);return e.useEffect((()=>{t.item.active&&o.current&&c(o.current)}),[t.item.active,o]),e.createElement(zc,{$depth:n.depth,$active:n.active,$deprecated:n.deprecated,ref:o},n.badges&&(null==(r=n.badges)?void 0:r.map((({name:t,color:r})=>e.createElement(Tc,{type:"badge",color:r,key:t},t)))),n.isWebhook?e.createElement(Tc,{type:"hook"},i?n.httpVerb:_("webhook")):e.createElement(Tc,{type:n.httpVerb},gt(n.httpVerb)),e.createElement(Mc,{tabIndex:0,width:"calc(100% - 38px)"},n.sidebarLabel,t.children))}));var Nu=Object.defineProperty,qu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Fu=Object.prototype.hasOwnProperty,Bu=Object.prototype.propertyIsEnumerable,Qu=(e,t,r)=>t in e?Nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Uu=class extends e.Component{render(){const{items:t,root:r,className:n}=this.props,o=null==this.props.expanded||this.props.expanded;return e.createElement(Rc,((e,t)=>{for(var r in t||(t={}))Fu.call(t,r)&&Qu(e,r,t[r]);if(qu)for(var r of qu(t))Bu.call(t,r)&&Qu(e,r,t[r]);return e})({className:n,style:this.props.style,$expanded:o},r?{role:"menu"}:{}),t.map(((t,r)=>e.createElement(zu,{key:r,item:t,onActivate:this.props.onActivate}))))}};function Wu(){const[t,r]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{r(!0)}),[]),t?e.createElement("img",{alt:"redocly logo",onError:()=>r(!1),src:"https://cdn.redoc.ly/redoc/logo-mini.svg"}):null}Uu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],Uu);Object.defineProperty,Object.getOwnPropertyDescriptor;let Vu=class extends e.Component{constructor(){super(...arguments),this.activate=e=>{if(e&&e.active&&this.context.menuToggle)return e.expanded?e.collapse():e.expand();this.props.menu.activateAndScroll(e,!0),setTimeout((()=>{this._updateScroll&&this._updateScroll()}))},this.saveScrollUpdate=e=>{this._updateScroll=e}}render(){const t=this.props.menu;return e.createElement(cs,{updateFn:this.saveScrollUpdate,className:this.props.className,options:{wheelPropagation:!1}},e.createElement(Uu,{items:t.items,onActivate:this.activate,root:!0}),e.createElement(Nc,null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://redocly.com/redoc/"},e.createElement(Wu,null),"API docs by Redocly")))}};Vu.contextType=ce,Vu=((e,t,r,n)=>{for(var o,i=t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i})([ma.observer],Vu);const Hu=({open:t})=>{const r=t?8:-4;return e.createElement(Yu,null,e.createElement(Ju,{size:15,style:{transform:`translate(2px, ${r}px) rotate(180deg)`,transition:"transform 0.2s ease"}}),e.createElement(Ju,{size:15,style:{transform:`translate(2px, ${0-r}px)`,transition:"transform 0.2s ease"}}))},Ju=({size:t=10,className:r="",style:n})=>e.createElement("svg",{className:r,style:n||{},viewBox:"0 0 926.23699 573.74994",version:"1.1",x:"0px",y:"0px",width:t,height:t},e.createElement("g",{transform:"translate(904.92214,-879.1482)"},e.createElement("path",{d:"\n m -673.67664,1221.6502 -231.2455,-231.24803 55.6165,\n -55.627 c 30.5891,-30.59485 56.1806,-55.627 56.8701,-55.627 0.6894,\n 0 79.8637,78.60862 175.9427,174.68583 l 174.6892,174.6858 174.6892,\n -174.6858 c 96.079,-96.07721 175.253196,-174.68583 175.942696,\n -174.68583 0.6895,0 26.281,25.03215 56.8701,\n 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864\n -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688,\n -104.0616 -231.873,-231.248 z\n ",fill:"currentColor"}))),Yu=ee.div`
1675
1675
  user-select: none;
1676
1676
  width: 20px;
1677
1677
  height: 20px;