rapidoc 11.0.1 → 12.1.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.
- package/README.md +171 -54
- package/dist/rapidoc-flow-min.js +580 -0
- package/dist/rapidoc-flow-min.js.LICENSE.txt +171 -0
- package/dist/rapidoc-min.js +645 -202
- package/dist/rapidoc-min.js.LICENSE.txt +381 -0
- package/package.json +57 -42
- package/src/README.md +150 -0
- package/src/components/README.md +91 -0
- package/src/components/api-request.ts +912 -0
- package/src/components/api-response.ts +514 -0
- package/src/components/json-tree.ts +171 -0
- package/src/components/schema-base-element.ts +329 -0
- package/src/components/schema-table.ts +475 -0
- package/src/components/schema-tree.ts +393 -0
- package/src/components/tag-input.ts +180 -0
- package/src/flow.js +3 -0
- package/src/index.js +6 -0
- package/src/oauth-receiver.ts +29 -0
- package/src/rapi-flow.ts +1178 -0
- package/src/rapidoc-mini.ts +603 -0
- package/src/rapidoc.ts +1854 -0
- package/src/styles/README.md +96 -0
- package/src/styles/auth-styles.js +318 -0
- package/src/styles/border-styles.js +24 -0
- package/src/styles/css-bundle.js +129 -0
- package/src/styles/custom-styles.js +8 -0
- package/src/styles/dialog-box-styles.js +102 -0
- package/src/styles/endpoint-styles.js +564 -0
- package/src/styles/flex-styles.js +16 -0
- package/src/styles/flow-styles.js +248 -0
- package/src/styles/font-styles.js +432 -0
- package/src/styles/info-styles.js +36 -0
- package/src/styles/input-styles.js +555 -0
- package/src/styles/layout-styles.js +396 -0
- package/src/styles/microlighter-styles.js +99 -0
- package/src/styles/nav-styles.js +633 -0
- package/src/styles/param-list-styles.js +261 -0
- package/src/styles/schema-styles.js +296 -0
- package/src/styles/tab-styles.js +106 -0
- package/src/styles/theme-tokens.js +582 -0
- package/src/templates/README.md +89 -0
- package/src/templates/advanced-search-dialog-template.js +94 -0
- package/src/templates/api-response-template.js +223 -0
- package/src/templates/callback-template.js +86 -0
- package/src/templates/code-samples-template.js +52 -0
- package/src/templates/components-template.js +86 -0
- package/src/templates/downloads-template.js +70 -0
- package/src/templates/endpoint-template.js +377 -0
- package/src/templates/expanded-endpoint-template.js +270 -0
- package/src/templates/focused-endpoint-template.js +146 -0
- package/src/templates/header-template.js +92 -0
- package/src/templates/logo-template.js +21 -0
- package/src/templates/main-body-template.js +102 -0
- package/src/templates/navbar-template.js +498 -0
- package/src/templates/overview-template.js +104 -0
- package/src/templates/request-body-template.js +673 -0
- package/src/templates/request-params-template.js +485 -0
- package/src/templates/security-scheme-template.js +1272 -0
- package/src/templates/server-template.js +153 -0
- package/src/utils/README.md +146 -0
- package/src/utils/arazzo/README.md +119 -0
- package/src/utils/arazzo/components.js +15 -0
- package/src/utils/arazzo/graph.js +269 -0
- package/src/utils/arazzo/index.js +52 -0
- package/src/utils/arazzo/operations.js +106 -0
- package/src/utils/arazzo/parse.js +196 -0
- package/src/utils/arazzo/refs.js +40 -0
- package/src/utils/arazzo/svg.js +707 -0
- package/src/utils/auto-color-scheme.js +99 -0
- package/src/utils/bind-navbar.js +175 -0
- package/src/utils/color-utils.js +59 -0
- package/src/utils/common-utils.js +191 -0
- package/src/utils/curl-utils.js +126 -0
- package/src/utils/highlighter.js +419 -0
- package/src/utils/markdown-utils.js +110 -0
- package/src/utils/mcp/README.md +155 -0
- package/src/utils/mcp/common.js +166 -0
- package/src/utils/mcp/manifest.js +382 -0
- package/src/utils/mcp/project/server.ts +53 -0
- package/src/utils/mcp/project.js +88 -0
- package/src/utils/mcp/runtime.js +289 -0
- package/src/utils/mcp/schema.js +98 -0
- package/src/utils/mcp/workflow-runtime.js +374 -0
- package/src/utils/mcp/workflows.js +240 -0
- package/src/utils/mcp/zip.js +102 -0
- package/src/utils/mcp-generator.js +47 -0
- package/src/utils/mock-interceptor.js +557 -0
- package/src/utils/oauth-utils.js +87 -0
- package/src/utils/request-utils.js +264 -0
- package/src/utils/response-utils.js +203 -0
- package/src/utils/sanitize.js +57 -0
- package/src/utils/schema-utils.js +1954 -0
- package/src/utils/slugger.js +187 -0
- package/src/utils/spec-parser.js +941 -0
- package/src/utils/url-utils.js +246 -0
- package/src/utils/xml-utils.js +61 -0
package/dist/rapidoc-min.js
CHANGED
|
@@ -1,257 +1,700 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license
|
|
3
|
-
* rapidoc
|
|
3
|
+
* rapidoc v12.1.0
|
|
4
4
|
* (c) 2026 Mrinmoy Majumdar <mrin9@yahoo.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
|
+
* Bundled third-party code and its licenses: rapidoc-min.js.LICENSE.txt
|
|
6
7
|
*/
|
|
7
|
-
var
|
|
8
|
-
\f\r]`,
|
|
9
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),qs=/'/g,Ls=/"/g,Bs=/^(?:script|style|textarea|title)$/i,p=(e=>(t,...a)=>({_$litType$:e,strings:t,values:a}))(1),Y=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),Is=new WeakMap,Oe=Te.createTreeWalker(Te,129);function zs(e,t){if(!sr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return _s===void 0?t:_s.createHTML(t)}var Ps=(e,t)=>{let a=e.length-1,r=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=wt;for(let o=0;o<a;o++){let l=e[o],c,d,u=-1,h=0;for(;h<l.length&&(i.lastIndex=h,d=i.exec(l),d!==null);)h=i.lastIndex,i===wt?d[1]==="!--"?i=Rs:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(i=Fe):(Bs.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=Fe):i=Ns:i===Fe?d[0]===">"?(i=s??wt,u=-1):d[1]===void 0?u=-2:(u=i.lastIndex-d[2].length,c=d[1],i=d[3]===void 0?Fe:d[3]==='"'?Ls:qs):i===Ls||i===qs?i=Fe:i===Rs||i===Ns?i=wt:(i=Fe,s=void 0);let m=i===Fe&&e[o+1].startsWith("/>")?" ":"";n+=i===wt?l+tl:u>=0?(r.push(c),l.slice(0,u)+ar+l.slice(u)+ge+m):l+ge+(u===-2?o:m)}return[zs(e,n+(e[a]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},ir=class Bo{constructor({strings:t,_$litType$:a},r){let s;this.parts=[];let n=0,i=0,o=t.length-1,l=this.parts,[c,d]=Ps(t,a);if(this.el=Bo.createElement(c,r),Oe.currentNode=this.el.content,a===2||a===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(s=Oe.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(let u of s.getAttributeNames())if(u.endsWith(ar)){let h=d[i++],m=s.getAttribute(u).split(ge),y=/([.?@])?(.*)/.exec(h);l.push({type:1,index:n,name:y[2],strings:m,ctor:y[1]==="."?Ms:y[1]==="?"?Hs:y[1]==="@"?Ws:kt}),s.removeAttribute(u)}else u.startsWith(ge)&&(l.push({type:6,index:n}),s.removeAttribute(u));if(Bs.test(s.tagName)){let u=s.textContent.split(ge),h=u.length-1;if(h>0){s.textContent=Yt?Yt.emptyScript:"";for(let m=0;m<h;m++)s.append(u[m],vt()),Oe.nextNode(),l.push({type:2,index:++n});s.append(u[h],vt())}}}else if(s.nodeType===8)if(s.data===rr)l.push({type:2,index:n});else{let u=-1;for(;(u=s.data.indexOf(ge,u+1))!==-1;)l.push({type:7,index:n}),u+=ge.length-1}n++}}static createElement(t,a){let r=Te.createElement("template");return r.innerHTML=t,r}};function _e(e,t,a=e,r){if(t===Y)return t;let s=r===void 0?a._$Cl:a._$Co?.[r],n=xt(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,a,r)),r===void 0?a._$Cl=s:(a._$Co??=[])[r]=s),s!==void 0&&(t=_e(e,s._$AS(e,t.values),s,r)),t}var Us=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:a}=this._$AD,r=(e?.creationScope??Te).importNode(t,!0);Oe.currentNode=r;let s=Oe.nextNode(),n=0,i=0,o=a[0];for(;o!==void 0;){if(n===o.index){let l;o.type===2?l=new Qt(s,s.nextSibling,this,e):o.type===1?l=new o.ctor(s,o.name,o.strings,this,e):o.type===6&&(l=new Vs(s,this,e)),this._$AV.push(l),o=a[++i]}n!==o?.index&&(s=Oe.nextNode(),n++)}return Oe.currentNode=Te,r}p(e){let t=0;for(let a of this._$AV)a!==void 0&&(a.strings===void 0?a._$AI(e[t]):(a._$AI(e,a,t),t+=a.strings.length-2)),t++}},Qt=class Io{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,a,r,s){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=a,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,a=this._$AM;return a!==void 0&&t?.nodeType===11&&(t=a.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,a=this){t=_e(this,t,a),xt(t)?t===I||t==null||t===""?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==Y&&this._(t):t._$litType$===void 0?t.nodeType===void 0?js(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==I&&xt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Te.createTextNode(t)),this._$AH=t}$(t){let{values:a,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=ir.createElement(zs(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(a);else{let n=new Us(s,this),i=n.u(this.options);n.p(a),this.T(i),this._$AH=n}}_$AC(t){let a=Is.get(t.strings);return a===void 0&&Is.set(t.strings,a=new ir(t)),a}k(t){sr(this._$AH)||(this._$AH=[],this._$AR());let a=this._$AH,r,s=0;for(let n of t)s===a.length?a.push(r=new Io(this.O(vt()),this.O(vt()),this,this.options)):r=a[s],r._$AI(n),s++;s<a.length&&(this._$AR(r&&r._$AB.nextSibling,s),a.length=s)}_$AR(t=this._$AA.nextSibling,a){for(this._$AP?.(!1,!0,a);t!==this._$AB;){let r=Os(t).nextSibling;Os(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},kt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,a,r,s){this.type=1,this._$AH=I,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=I}_$AI(e,t=this,a,r){let s=this.strings,n=!1;if(s===void 0)e=_e(this,e,t,0),n=!xt(e)||e!==this._$AH&&e!==Y,n&&(this._$AH=e);else{let i=e,o,l;for(e=s[0],o=0;o<s.length-1;o++)l=_e(this,i[a+o],t,o),l===Y&&(l=this._$AH[o]),n||=!xt(l)||l!==this._$AH[o],l===I?e=I:e!==I&&(e+=(l??"")+s[o+1]),this._$AH[o]=l}n&&!r&&this.j(e)}j(e){e===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ms=class extends kt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===I?void 0:e}},Hs=class extends kt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==I)}},Ws=class extends kt{constructor(e,t,a,r,s){super(e,t,a,r,s),this.type=5}_$AI(e,t=this){if((e=_e(this,e,t,0)??I)===Y)return;let a=this._$AH,r=e===I&&a!==I||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,s=e!==I&&(a===I||r);r&&this.element.removeEventListener(this.name,this,a),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Vs=class{constructor(e,t,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){_e(this,e)}},al={M:ar,P:ge,A:rr,C:1,L:Ps,R:Us,D:js,V:_e,I:Qt,H:kt,N:Hs,U:Ws,B:Ms,F:Vs},rl=tr.litHtmlPolyfillSupport;rl?.(ir,Qt),(tr.litHtmlVersions??=[]).push("3.3.3");var sl=(e,t,a)=>{let r=a?.renderBefore??t,s=r._$litPart$;if(s===void 0){let n=a?.renderBefore??null;r._$litPart$=s=new Qt(t.insertBefore(vt(),n),n,void 0,a??{})}return s._$AI(e),s},or=globalThis,se=class extends Ke{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=sl(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}};se._$litElement$=!0,se.finalized=!0,or.litElementHydrateSupport?.({LitElement:se});var nl=or.litElementPolyfillSupport;nl?.({LitElement:se}),(or.litElementVersions??=[]).push("4.2.2");function lr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var je=lr();function Ks(e){je=e}var Re={exec:()=>null};function Ze(e){let t=[];return a=>{let r=Math.max(0,Math.min(3,a-1)),s=t[r];return s||(s=e(r),t[r]=s),s}}function T(e,t=""){let a=typeof e=="string"?e:e.source,r={replace:(s,n)=>{let i=typeof n=="string"?n:n.source;return i=i.replace(K.caret,"$1"),a=a.replace(s,i),r},getRegex:()=>new RegExp(a,t)};return r}var il=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),K={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ze(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ze(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ze(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ze(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ze(e=>RegExp(`^ {0,${e}}(?:</?(?:${St})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ze(e=>RegExp(`^ {0,${e}}>`))},ol=/^(?:[ \t]*(?:\n|$))+/,ll=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$t=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,dl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,cr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Zs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Js=T(Zs).replace(/bull/g,cr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pl=T(Zs).replace(/bull/g,cr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),dr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ul=/^[^\n]+/,pr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hl=T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ml=T(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,cr).getRegex(),St="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ur=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fl=T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ur).replace("tag",St).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gs=e=>T(dr).replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex(),yl=Gs(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),gl=Gs(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),hr={blockquote:T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gl).getRegex(),code:ll,def:hl,fences:cl,heading:dl,hr:$t,html:fl,lheading:Js,list:ml,newline:ol,paragraph:yl,table:Re,text:ul},Xs=T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex(),bl={...hr,lheading:pl,table:Xs,paragraph:T(dr).replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Xs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",St).getRegex()},vl={...hr,html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ur).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:Re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:T(dr).replace("hr",$t).replace("heading",` *#{1,6} *[^
|
|
10
|
-
]`).replace("lheading",
|
|
11
|
-
`),
|
|
12
|
-
`)}function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`)
|
|
16
|
-
`)}}
|
|
8
|
+
var xr=globalThis,Ca=xr.ShadowRoot&&(xr.ShadyCSS===void 0||xr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ta=Symbol(),gn=new WeakMap,yn=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Ta)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ca&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=gn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&gn.set(t,e))}return e}toString(){return this.cssText}},bn=e=>new yn(typeof e=="string"?e:e+"",void 0,Ta),Z=(e,...t)=>new yn(e.length===1?e[0]:t.reduce((r,a,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[s+1],e[0]),e,Ta),Sc=(e,t)=>{if(Ca)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let a=document.createElement("style"),s=xr.litNonce;s!==void 0&&a.setAttribute("nonce",s),a.textContent=r.cssText,e.appendChild(a)}},vn=Ca?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let a of t.cssRules)r+=a.cssText;return bn(r)})(e):e,{is:Ac,defineProperty:Ec,getOwnPropertyDescriptor:Dc,getOwnPropertyNames:Cc,getOwnPropertySymbols:Tc,getPrototypeOf:Oc}=Object,wr=globalThis,xn=wr.trustedTypes,Fc=xn?xn.emptyScript:"",jc=wr.reactiveElementPolyfillSupport,zt=(e,t)=>e,kr={toAttribute(e,t){switch(t){case Boolean:e=e?Fc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Oa=(e,t)=>!Ac(e,t),wn={attribute:!0,type:String,converter:kr,reflect:!1,useDefault:!1,hasChanged:Oa};Symbol.metadata??=Symbol("metadata"),wr.litPropertyMetadata??=new WeakMap;var ct=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=wn){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&Ec(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:s}=Dc(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:a,set(n){let i=a?.call(this);s?.call(this,n),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??wn}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;let e=Oc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){let t=this.properties,r=[...Cc(t),...Tc(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(vn(a))}else e!==void 0&&t.push(vn(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Sc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,r);if(a!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute===void 0?kr:r.converter).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,a=r._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let s=r.getPropertyOptions(a),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute===void 0?kr:s.converter;this._$Em=a;let i=n.fromAttribute(t,s.type);this[a]=i??this._$Ej?.get(a)??i,this._$Em=null}}requestUpdate(e,t,r,a=!1,s){if(e!==void 0){let n=this.constructor;if(a===!1&&(s=this[e]),r??=n.getPropertyOptions(e),!((r.hasChanged??Oa)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:a,wrapped:s},n){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,s]of this._$Ep)this[a]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[a,s]of r){let{wrapped:n}=s,i=this[a];n!==!0||this._$AL.has(a)||i===void 0||this.C(a,void 0,s,i)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};ct.elementStyles=[],ct.shadowRootOptions={mode:"open"},ct[zt("elementProperties")]=new Map,ct[zt("finalized")]=new Map,jc?.({ReactiveElement:ct}),(wr.reactiveElementVersions??=[]).push("2.1.2");var Fa=globalThis,kn=e=>e,$r=Fa.trustedTypes,$n=$r?$r.createPolicy("lit-html",{createHTML:e=>e}):void 0,ja="$lit$",$e=`lit$${Math.random().toFixed(9).slice(2)}$`,_a="?"+$e,_c=`<${_a}>`,ze=document,Pt=()=>ze.createComment(""),Mt=e=>e===null||typeof e!="object"&&typeof e!="function",qa=Array.isArray,Sn=e=>qa(e)||typeof e?.[Symbol.iterator]=="function",Ra=`[
|
|
9
|
+
\f\r]`,Ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,An=/-->/g,En=/>/g,Pe=RegExp(`>|${Ra}(?:([^\\s"'>=/]+)(${Ra}*=${Ra}*(?:[^
|
|
10
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dn=/'/g,Cn=/"/g,Tn=/^(?:script|style|textarea|title)$/i,m=(e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),ne=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),On=new WeakMap,Me=ze.createTreeWalker(ze,129);function Fn(e,t){if(!qa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return $n===void 0?t:$n.createHTML(t)}var jn=(e,t)=>{let r=e.length-1,a=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=Ut;for(let o=0;o<r;o++){let l=e[o],c,d,p=-1,h=0;for(;h<l.length&&(i.lastIndex=h,d=i.exec(l),d!==null);)h=i.lastIndex,i===Ut?d[1]==="!--"?i=An:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(i=Pe):(Tn.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=Pe):i=En:i===Pe?d[0]===">"?(i=s??Ut,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,c=d[1],i=d[3]===void 0?Pe:d[3]==='"'?Cn:Dn):i===Cn||i===Dn?i=Pe:i===An||i===En?i=Ut:(i=Pe,s=void 0);let u=i===Pe&&e[o+1].startsWith("/>")?" ":"";n+=i===Ut?l+_c:p>=0?(a.push(c),l.slice(0,p)+ja+l.slice(p)+$e+u):l+$e+(p===-2?o:u)}return[Fn(e,n+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Ia=class yc{constructor({strings:t,_$litType$:r},a){let s;this.parts=[];let n=0,i=0,o=t.length-1,l=this.parts,[c,d]=jn(t,r);if(this.el=yc.createElement(c,a),Me.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=Me.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(let p of s.getAttributeNames())if(p.endsWith(ja)){let h=d[i++],u=s.getAttribute(p).split($e),g=/([.?@])?(.*)/.exec(h);l.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?qn:g[1]==="?"?Rn:g[1]==="@"?In:Ht}),s.removeAttribute(p)}else p.startsWith($e)&&(l.push({type:6,index:n}),s.removeAttribute(p));if(Tn.test(s.tagName)){let p=s.textContent.split($e),h=p.length-1;if(h>0){s.textContent=$r?$r.emptyScript:"";for(let u=0;u<h;u++)s.append(p[u],Pt()),Me.nextNode(),l.push({type:2,index:++n});s.append(p[h],Pt())}}}else if(s.nodeType===8)if(s.data===_a)l.push({type:2,index:n});else{let p=-1;for(;(p=s.data.indexOf($e,p+1))!==-1;)l.push({type:7,index:n}),p+=$e.length-1}n++}}static createElement(t,r){let a=ze.createElement("template");return a.innerHTML=t,a}};function Ue(e,t,r=e,a){if(t===ne)return t;let s=a===void 0?r._$Cl:r._$Co?.[a],n=Mt(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,r,a)),a===void 0?r._$Cl=s:(r._$Co??=[])[a]=s),s!==void 0&&(t=Ue(e,s._$AS(e,t.values),s,a)),t}var _n=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??ze).importNode(t,!0);Me.currentNode=a;let s=Me.nextNode(),n=0,i=0,o=r[0];for(;o!==void 0;){if(n===o.index){let l;o.type===2?l=new Sr(s,s.nextSibling,this,e):o.type===1?l=new o.ctor(s,o.name,o.strings,this,e):o.type===6&&(l=new Ln(s,this,e)),this._$AV.push(l),o=r[++i]}n!==o?.index&&(s=Me.nextNode(),n++)}return Me.currentNode=ze,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings===void 0?r._$AI(e[t]):(r._$AI(e,r,t),t+=r.strings.length-2)),t++}},Sr=class bc{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,a,s){this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=a,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Ue(this,t,r),Mt(t)?t===O||t==null||t===""?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==ne&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Sn(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==O&&Mt(this._$AH)?this._$AA.nextSibling.data=t:this.T(ze.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:a}=t,s=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Ia.createElement(Fn(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===s)this._$AH.p(r);else{let n=new _n(s,this),i=n.u(this.options);n.p(r),this.T(i),this._$AH=n}}_$AC(t){let r=On.get(t.strings);return r===void 0&&On.set(t.strings,r=new Ia(t)),r}k(t){qa(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,a,s=0;for(let n of t)s===r.length?r.push(a=new bc(this.O(Pt()),this.O(Pt()),this,this.options)):a=r[s],a._$AI(n),s++;s<r.length&&(this._$AR(a&&a._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let a=kn(t).nextSibling;kn(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ht=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,s){this.type=1,this._$AH=O,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=O}_$AI(e,t=this,r,a){let s=this.strings,n=!1;if(s===void 0)e=Ue(this,e,t,0),n=!Mt(e)||e!==this._$AH&&e!==ne,n&&(this._$AH=e);else{let i=e,o,l;for(e=s[0],o=0;o<s.length-1;o++)l=Ue(this,i[r+o],t,o),l===ne&&(l=this._$AH[o]),n||=!Mt(l)||l!==this._$AH[o],l===O?e=O:e!==O&&(e+=(l??"")+s[o+1]),this._$AH[o]=l}n&&!a&&this.j(e)}j(e){e===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},qn=class extends Ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===O?void 0:e}},Rn=class extends Ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==O)}},In=class extends Ht{constructor(e,t,r,a,s){super(e,t,r,a,s),this.type=5}_$AI(e,t=this){if((e=Ue(this,e,t,0)??O)===ne)return;let r=this._$AH,a=e===O&&r!==O||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==O&&(r===O||a);a&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ln=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ue(this,e)}},qc={M:ja,P:$e,A:_a,C:1,L:jn,R:_n,D:Sn,V:Ue,I:Sr,H:Ht,N:Rn,U:In,B:qn,F:Ln},Rc=Fa.litHtmlPolyfillSupport;Rc?.(Ia,Sr),(Fa.litHtmlVersions??=[]).push("3.3.3");var Ic=(e,t,r)=>{let a=r?.renderBefore??t,s=a._$litPart$;if(s===void 0){let n=r?.renderBefore??null;a._$litPart$=s=new Sr(t.insertBefore(Pt(),n),n,void 0,r??{})}return s._$AI(e),s},La=globalThis,fe=class extends ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ic(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ne}};fe._$litElement$=!0,fe.finalized=!0,La.litElementHydrateSupport?.({LitElement:fe});var Lc=La.litElementPolyfillSupport;Lc?.({LitElement:fe}),(La.litElementVersions??=[]).push("4.2.2");var Se=e=>(t,r)=>{r===void 0?customElements.define(e,t):r.addInitializer(()=>{customElements.define(e,t)})},Bc={attribute:!0,type:String,converter:kr,reflect:!1,hasChanged:Oa},Nc=(e=Bc,t,r)=>{let{kind:a,metadata:s}=r,n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),n.set(r.name,e),a==="accessor"){let{name:i}=r;return{set(o){let l=t.get.call(this);t.set.call(this,o),this.requestUpdate(i,l,e,!0,o)},init(o){return o!==void 0&&this.C(i,void 0,e,o),o}}}if(a==="setter"){let{name:i}=r;return function(o){let l=this[i];t.call(this,o),this.requestUpdate(i,l,e,!0,o)}}throw Error("Unsupported decorator location: "+a)};function k(e){return(t,r)=>typeof r=="object"?Nc(e,t,r):((a,s,n)=>{let i=s.hasOwnProperty(n);return s.constructor.createProperty(n,a),i?Object.getOwnPropertyDescriptor(s,n):void 0})(e,t,r)}function re(e){return k({...e,state:!0,attribute:!1})}function Ba(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var He=Ba();function Bn(e){He=e}var We={exec:()=>null};function Ke(e){let t=[];return r=>{let a=Math.max(0,Math.min(3,r-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function R(e,t=""){let r=typeof e=="string"?e:e.source,a={replace:(s,n)=>{let i=typeof n=="string"?n:n.source;return i=i.replace(te.caret,"$1"),r=r.replace(s,i),a},getRegex:()=>new RegExp(r,t)};return a}var Nn=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),te={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ke(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ke(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ke(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ke(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Ke(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ke(e=>RegExp(`^ {0,${e}}(?:</?(?:${Kt})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Ke(e=>RegExp(`^ {0,${e}}>`))},zc=/^(?:[ \t]*(?:\n|$))+/,Pc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Wt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Uc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Na=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,zn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,Pn=R(zn).replace(/bull/g,Na).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hc=R(zn).replace(/bull/g,Na).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),za=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Wc=/^[^\n]+/,Pa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Kc=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Pa).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Vc=R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Na).getRegex(),Kt="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ma=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zc=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ma).replace("tag",Kt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Mn=e=>R(za).replace("hr",Wt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex(),Jc=Mn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Gc=Mn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ua={blockquote:R(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Gc).getRegex(),code:Pc,def:Kc,fences:Mc,heading:Uc,hr:Wt,html:Zc,lheading:Pn,list:Vc,newline:zc,paragraph:Jc,table:We,text:Wc},Un=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex(),Xc={...Ua,lheading:Hc,table:Un,paragraph:R(za).replace("hr",Wt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Un).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Kt).getRegex()},Yc={...Ua,html:R(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Ma).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:We,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(za).replace("hr",Wt).replace("heading",` *#{1,6} *[^
|
|
11
|
+
]`).replace("lheading",Pn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ed=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,td=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,we=/[\p{P}\p{S}]/u,dt=/[\s\p{P}\p{S}]/u,Vt=/[^\s\p{P}\p{S}]/u,rd=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dt).getRegex(),ad=/[\p{Pi}\p{Ps}"']/u,Wn=/(?!~)[\p{P}\p{S}]/u,sd=/(?!~)[\s\p{P}\p{S}]/u,nd=/(?:[^\s\p{P}\p{S}]|~)/u,id=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Nn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Kn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,od=R(Kn,"u").replace(/punct/g,we).getRegex(),ld=R(Kn,"u").replace(/punct/g,Wn).getRegex(),cd=R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,ad).replace(/punct/g,we).getRegex(),Vn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dd=R(Vn,"gu").replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,dt).replace(/punct/g,we).getRegex(),pd=R(Vn,"gu").replace(/notPunctSpace/g,nd).replace(/punctSpace/g,sd).replace(/punct/g,Wn).getRegex(),ud=R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,dt).replace(/punct/g,we).getRegex(),hd=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,dt).replace(/punct/g,we).getRegex(),md=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,dt).replace(/punct/g,we).getRegex(),fd=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,we).getRegex(),gd=R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Vt).replace(/punctSpace/g,dt).replace(/punct/g,we).getRegex(),yd=R(/\\(punct)/,"gu").replace(/punct/g,we).getRegex(),bd=R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,we).getRegex(),vd=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),xd=R(Ma).replace("(?:-->|$)","-->").getRegex(),wd=R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",xd).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ar=R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Zn).getRegex(),kd=R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ar).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),$d=R(/^!?\[(label)\]\[(ref)\]/).replace("label",Ar).replace("ref",Pa).getRegex(),Sd=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",Pa).getRegex(),Jn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Ad=R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Zn).getRegex(),Ed=R("reflink|nolink(?!\\()","g").replace("reflink",R(/^!?\[(label)\]\[(ref)\]/).replace("label",Ad).replace("ref",Jn).getRegex()).replace("nolink",R(/^!?\[(ref)\](?:\[\])?/).replace("ref",Jn).getRegex()).getRegex(),Gn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dd=R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Ha={_backpedal:We,anyPunctuation:yd,anyPunctuationOutsideCode:bd,autolink:vd,blockSkip:id,br:Hn,code:ed,del:We,delLDelim:We,delRDelim:We,emStrongLDelim:od,emStrongRDelimAst:dd,emStrongRDelimUnd:hd,escape:Qc,link:kd,nolink:Sd,punctuation:rd,reflink:$d,reflinkSearch:Ed,tag:wd,text:td,url:We},Cd={...Ha,emStrongLDelim:cd,emStrongRDelimAst:ud,emStrongRDelimUnd:md,link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",Ar).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ar).getRegex()},Wa={...Ha,emStrongRDelimAst:pd,emStrongLDelim:ld,delLDelim:fd,delRDelim:gd,url:R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Dd).replace("protocol",Gn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Gn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",Nn?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},Td={...Wa,br:R(Hn).replace("{2,}","*").getRegex(),text:R(Wa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Er={normal:Ua,gfm:Xc,pedantic:Yc},Zt={normal:Ha,gfm:Wa,breaks:Td,pedantic:Cd},Od={"&":"&","<":"<",">":">",'"':""","'":"'"},Xn=e=>Od[e];function oe(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Xn)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Xn);return e}function Fd(e){return te.numericCharacterReference.test(e)?e.replace(te.numericCharacterReferenceOrAmpersand,(t,r,a)=>{if(r===void 0&&a===void 0)return"&";let s=r===void 0?Number.parseInt(a,16):Number.parseInt(r,10);return s===0||s>1114111||s>=55296&&s<=57343?"\uFFFD":s===38?"&":String.fromCodePoint(s)}):e}function Yn(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Qn(e,t){let r=e.replace(te.findPipe,(s,n,i)=>{let o=!1,l=n;for(;--l>=0&&i[l]==="\\";)o=!o;return o?"|":" |"}).split(te.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(te.slashPipe,"|");return r}function Ae(e,t,r){let a=e.length;if(a===0)return"";let s=0;for(;s<a;){let n=e.charAt(a-s-1);if(n===t&&!r)s++;else if(n!==t&&r)s++;else break}return e.slice(0,a-s)}function ei(e){let t=e.split(`
|
|
12
|
+
`),r=t.length-1;for(;r>=0&&te.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
|
|
13
|
+
`)}function Dr(e){return e.trim().replace(te.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function ti(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let r=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return r>0?-2:-1}var pt=new WeakMap;function Ka(e){let t={"*":-1,_:-1},r=-1,a=e.length;for(let s=0;s<a;s++){let n=e[s];if(n!=="*"&&n!=="_"&&n!=="~")continue;let i=s===0?`
|
|
14
|
+
`:e[s-1],o=s+1;for(;o<a&&e[o]===n;)o++;i!==" "&&i!==" "&&i!==`
|
|
15
|
+
`&&i!=="\r"&&i!=="\f"&&(n==="~"?r=s:t[n]=s),s=o-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:r}}function jd(e,t){let r=Ka(t),a=pt.get(e);a?a.push(r):pt.set(e,[r])}function _d(e){let t=pt.get(e);t&&(t.pop(),t.length===0&&pt.delete(e))}function qd(e,t,r){let a=pt.get(e)?.at(-1);return a&&a.maskedSrc===t?a.lastPossibleEmStrongCloserIndex[r]:Ka(t).lastPossibleEmStrongCloserIndex[r]}function Rd(e,t){let r=pt.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleDelCloserIndex:Ka(t).lastPossibleDelCloserIndex}function Cr(e,t=0){let r=t,a="";for(let s of e)if(s===" "){let n=4-r%4;a+=" ".repeat(n),r+=n}else a+=s,r++;return a}function ri(e,t,r,a,s){let n=t.href,i=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!",c=a.state.inLink,d=a.state.linkEmitted,p=a.state.inRawBlock;a.state.inLink=!0,a.state.linkEmitted=!1;let h=a.inlineTokens(o),u=a.state.linkEmitted;if(a.state.linkEmitted=d,a.state.inLink=c,!l){if(u){a.state.inRawBlock=p;return}a.state.linkEmitted=!0}return{type:l?"image":"link",raw:r,href:n,title:i,text:o,tokens:h}}function Id(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
|
|
16
|
+
`).map(n=>{let i=n.match(r.other.beginningSpace);if(i===null)return n;let[o]=i;return n.slice(Math.min(o.length,s.length))}).join(`
|
|
17
|
+
`)}function ai(e,t,r,a){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++;continue}if(t[s]==="`"){let o=a.inline.code.exec(t.slice(s));if(o){s+=o[0].length-1;continue}}if(t[s]!=="<")continue;let n=e.slice(r+s),i=a.inline.tag.exec(n)||a.inline.autolink.exec(n);if(i){if(i[0].length>t.length-s)return!0;s+=i[0].length-1}}return!1}var ut=class{options;rules;lexer;constructor(e){this.options=e||He}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:ei(t[0]);return{type:"code",raw:r,codeBlockStyle:"indented",text:r.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],a=Id(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let a=Ae(r,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceTabChar.test(a))&&(r=a.trim())}return{type:"heading",raw:Ae(t[0],`
|
|
18
|
+
`),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ae(t[0],`
|
|
19
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Ae(t[0],`
|
|
17
20
|
`).split(`
|
|
18
|
-
`),
|
|
19
|
-
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");
|
|
21
|
+
`),a="",s="",n=[];for(;r.length>0;){let i=!1,o=[],l=0;for(;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),i=!0;else if(!i)o.push(r[l]);else break;r=r.slice(l);let c=o.join(`
|
|
22
|
+
`),d=c.replace(this.rules.other.blockquoteMarkerWhitespace,(u,g,f)=>g+Cr(f,g.length)).replace(this.rules.other.blockquoteSetextReplace,`
|
|
23
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
21
24
|
${c}`:c,s=s?`${s}
|
|
22
|
-
${d}`:d;let
|
|
23
|
-
`),f=
|
|
24
|
-
`+
|
|
25
|
-
`).length:0,
|
|
26
|
-
${
|
|
27
|
-
`)}`),s=s.substring(0,s.length-
|
|
28
|
-
`+
|
|
29
|
-
`),f=this.list(
|
|
30
|
-
`)
|
|
31
|
-
|
|
32
|
-
`,
|
|
33
|
-
|
|
34
|
-
`,1)[0],
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`)
|
|
39
|
-
|
|
40
|
-
`),
|
|
41
|
-
`)
|
|
42
|
-
|
|
43
|
-
`),
|
|
44
|
-
|
|
25
|
+
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=p,r.length===0)break;let h=n.at(-1);if(h?.type==="code"||h?.type==="heading"||h?.type==="hr"||h?.type==="html"||h?.type==="table")break;if(h?.type==="blockquote"){let u=h,g=r.join(`
|
|
26
|
+
`),f=u.raw+`
|
|
27
|
+
`+g.replace(this.rules.other.blockquoteSetextReplace2,""),y=this.blockquote(f);n[n.length-1]=y;let v=f.substring(y.raw.length).replace(/^\n/,""),A=v?v.split(`
|
|
28
|
+
`).length:0,x=A?r.slice(0,-A):r;if(x.length>0&&(a=`${a}
|
|
29
|
+
${x.join(`
|
|
30
|
+
`)}`),s=s.substring(0,s.length-u.text.length)+y.text,r=r.slice(x.length),r.length>0&&this.rules.other.blockquoteStart.test(r[0]))continue;break}if(h?.type==="list"){let u=h,g=u.raw+`
|
|
31
|
+
`+r.join(`
|
|
32
|
+
`),f=this.list(g);n[n.length-1]=f;let y=f.raw.length>u.raw.length?g.slice(u.raw.length+1,f.raw.length).split(`
|
|
33
|
+
`).length:0;if(y>0){let v=r.slice(0,y).join(`
|
|
34
|
+
`);a=`${a}
|
|
35
|
+
${v}`,s=`${s}
|
|
36
|
+
${v}`}r=r.slice(y)}}return{type:"blockquote",raw:a,tokens:n,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=e,a=()=>r.length-e.length,s=t[1].trim(),n=s.length>1,i={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let o=this.rules.other.listItemRegex(s),l=!1;for(;e;){let d=!1,p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;let h=a();e=e.substring(t[0].length);let u=t[2].split(`
|
|
37
|
+
`,1)[0],g=t[1].length,f=this.options.pedantic?Cr(u,g):u.replace(this.rules.other.leadingSpaceTab,b=>Cr(b,g)),y=e.split(`
|
|
38
|
+
`,1)[0],v=!f.trim(),A=0;if(this.options.pedantic?(A=2,p=f.trimStart()):v?A=g+1:(A=f.search(this.rules.other.nonSpaceChar),A=A>4?1:A,p=f.slice(A),A+=g),v&&this.rules.other.blankLine.test(y)&&(e=e.substring(y.length+1),d=!0),!d){let b=this.rules.other.nextBulletRegex(A),$=this.rules.other.hrRegex(A),S=this.rules.other.fencesBeginRegex(A),E=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(A):this.rules.other.headingBeginRegex(A),D=this.rules.other.htmlBeginRegex(A),j=this.rules.other.blockquoteBeginRegex(A);for(;e;){let N=e.split(`
|
|
39
|
+
`,1)[0],F;if(y=N,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),F=y):F=y.replace(this.rules.other.leadingSpaceTab,z=>Cr(z)),S.test(y)||E.test(y)||D.test(y)||j.test(y)||b.test(y)||$.test(y))break;if(F.search(this.rules.other.nonSpaceChar)>=A||!y.trim())p+=`
|
|
40
|
+
`+F.slice(A);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||E.test(f)||D.test(f)||$.test(f))break;let z=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(y)&&this.rules.block.lheading.test(`${f}
|
|
41
|
+
${y}`)?` ${F.replace(/^ {0,3}/,"")}`:y;p+=`
|
|
42
|
+
`+z}v=!y.trim(),e=e.substring(N.length+1),f=F.slice(A)}}let x=r.slice(h,a());i.loose||(l?i.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(l=!0)),i.items.push({type:"list_item",raw:x,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]})}let c=i.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;i.raw=r.slice(0,a()).trimEnd();for(let d of i.items)if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),!i.loose){let p=d.tokens.filter(h=>h.type==="space");i.loose=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw))}for(let d of i.items){let p=d.tokens[0];if(d.task&&(p?.type==="text"||p?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(d.raw);if(h){let u={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};d.checked=u.checked,i.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=u.raw+d.tokens[0].raw,d.tokens[0].text=u.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(u)):d.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):d.tokens.unshift(u)}}else d.task&&=!1}if(i.loose)for(let d of i.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=ei(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ti(t[2],"()")!==-1)return;let r=Dr(t[1]),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:Ae(t[0],`
|
|
43
|
+
`),href:a,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Qn(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
44
|
+
`):[],n={type:"table",raw:Ae(t[0],`
|
|
45
|
+
`),header:[],align:[],rows:[]};if(r.length===a.length){for(let i of a)this.rules.other.tableAlignRight.test(i)?n.align.push("right"):this.rules.other.tableAlignCenter.test(i)?n.align.push("center"):this.rules.other.tableAlignLeft.test(i)?n.align.push("left"):n.align.push(null);for(let i=0;i<r.length;i++)n.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:n.align[i]});for(let i of s)n.rows.push(Qn(i,n.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:n.align[l]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:Ae(t[0],`
|
|
46
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
|
|
47
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let 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){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&ai(e,t[1],r,this.rules))return;let a=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let o=Ae(a.slice(0,-1),"\\");if((a.length-o.length)%2==0)return}else{let o=ti(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=Ae(t[0].slice(0,-1),"\\");if((t[0].length-s.length)%2==0)return;let n=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?n.slice(1):n.slice(1,-1)),ri(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let a=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&ai(e,r[1],a,this.rules))return;let s=t[Dr(r[2]||r[1])];if(!s){let n=r[0].charAt(0);return{type:"text",raw:n,text:n}}return ri(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!a||!a[1]&&!a[2]&&!a[3]&&!a[4])return;let s=a[0][0],n=r===s,i=t.length-e.length,o=i;for(;!this.options.pedantic&&o>0&&t[o-1]===s;)o--;let l=[...t.slice(Math.max(0,o-2),o)].at(-1)??"",c=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o<i&&(r=l);let d=o<i?c:!!this.rules.inline.punctuation.exec(r);if(a[4]&&r.match(this.rules.other.unicodeAlphaNumeric))return;let p=a[1]||a[3]||"";if(!p||!r||d){let h=[...a[0]].length-1,u,g,f=h,y=0,v=i-o+h,A=!this.options.pedantic&&!!l.trim()&&(!!p||s==="*"&&!c);if(s!=="*"&&s!=="_")return;let x=s==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,b=qd(this,t,s),$=t.length-e.length+h;if(b<$)return;t=t.slice(-1*e.length+h);let S=b-$;for(x.lastIndex=0;(a=x.exec(t))!==null&&!(a.index>S);){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u)continue;if(g=[...u].length,a[3]||a[4]){f+=g;continue}if(a[5]||a[6]||A){if(n&&(a[5]||a[6]))break;if(v%3&&!((v+g)%3)){y+=g;continue}}if(f-=g,f>0)continue;g=Math.min(g,g+f+y);let E=[...a[0]][0].length,D=e.slice(0,h+a.index+E+g);if(Math.min(h,g)%2){let N=D.slice(1,-1);return{type:"em",raw:D,text:N,tokens:this.lexer.inlineTokens(N)}}let j=D.slice(2,-2);return{type:"strong",raw:D,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return a&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...a[0]].length-1,n,i,o=s,l=this.rules.inline.delRDelim,c=Rd(this,t),d=t.length-e.length+s;if(c<d)return;t=t.slice(-1*e.length+s);let p=c-d;for(l.lastIndex=0;(a=l.exec(t))!==null&&!(a.index>p);){if(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!n||(i=[...n].length,i!==s))continue;if(a[3]||a[4]){o+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o);let h=[...a[0]][0].length,u=e.slice(0,s+a.index+h+i),g=u.slice(s,-s);return{type:"del",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,a;return t[2]==="@"?(r=t[1],a="mailto:"+r):(r=t[1],a=r),{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,a;if(t[2]==="@")r=t[0],a="mailto:"+r;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);r=t[0],a=t[1]==="www."?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:Fd(t[0]),escaped:r}}}},ge=class mn{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||He,this.options.tokenizer=this.options.tokenizer||new ut,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:te,block:Er.normal,inline:Zt.normal};this.options.pedantic?(r.block=Er.pedantic,r.inline=Zt.pedantic):this.options.gfm&&(r.block=Er.gfm,r.inline=this.options.breaks?Zt.breaks:Zt.gfm),this.tokenizer.rules=r}static get rules(){return{block:Er,inline:Zt}}static lex(t,r){return new mn(r).lex(t)}static lexInline(t,r){return new mn(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
|
|
48
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.state.inRawBlock=!1,this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],a=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
|
|
49
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
45
50
|
`)?"":`
|
|
46
51
|
`)+n.raw,o.text+=`
|
|
47
|
-
`+n.text,this.inlineQueue.at(-1).src=o.text):
|
|
52
|
+
`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if((n=this.tokenizer.fences(t))||(n=this.tokenizer.heading(t))||(n=this.tokenizer.hr(t))||(n=this.tokenizer.blockquote(t))||(n=this.tokenizer.list(t))||(n=this.tokenizer.html(t))){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
48
53
|
`)?"":`
|
|
49
54
|
`)+n.raw,o.text+=`
|
|
50
|
-
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},
|
|
55
|
+
`+n.raw,this.inlineQueue.at(-1).src=o.text):(this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}),r.push(n));continue}if((n=this.tokenizer.table(t))||(n=this.tokenizer.lheading(t))){t=t.substring(n.raw.length),r.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(i=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let o=r.at(-1);a&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
51
56
|
`)?"":`
|
|
52
57
|
`)+n.raw,o.text+=`
|
|
53
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):
|
|
58
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),a=i.length!==t.length,t=t.substring(n.raw.length)}else if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
54
59
|
`)?"":`
|
|
55
60
|
`)+n.raw,o.text+=`
|
|
56
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):
|
|
57
|
-
`:"";return
|
|
58
|
-
`:"<pre><code>"+(
|
|
61
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let a of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(a[0])&&t.charAt(a.index-1)!=="!")return!0;for(let a of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=a[0],n=s.lastIndexOf("[");if(s.charAt(0)!=="!"&&Object.hasOwn(this.tokens.links,Dr(s.slice(n+1,-1)))&&!(n>1&&this.linkInText(s.slice(1,n-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let a=this.state.linkParenPossible;this.state.linkParenPossible=a&&t.includes(")");try{return this.#e(t,r)}finally{this.state.linkParenPossible=a}}#e(t,r){let a=t.includes("*")||t.includes("_")||t.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==ut.prototype.emStrong||this.tokenizer.del!==ut.prototype.del?this.#r(t):t;jd(this.tokenizer,a);try{return this.#t(t,a,r)}finally{_d(this.tokenizer)}}#t(t,r,a){let s=!1,n="",i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(n=""),s=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},t,a))?(t=t.substring(o.raw.length),a.push(o),!0):!1))continue;if((o=this.tokenizer.escape(t))||(o=this.tokenizer.tag(t))||(o=this.tokenizer.link(t))){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let c=a.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o);continue}if((o=this.tokenizer.emStrong(t,r,n))||(o=this.tokenizer.codespan(t))||(o=this.tokenizer.br(t))||(o=this.tokenizer.del(t,r,n))||(o=this.tokenizer.autolink(t))||!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),a.push(o);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),p;this.options.extensions.startInline.forEach(h=>{p=h.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(n=o.raw.slice(-1)),s=!0;let c=a.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return a}#r(t){let r=t;if(this.tokens.links&&t.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,s=n=>{let i=n.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Dr(n.slice(i+1,-1))))return n;if(i>1&&n.charAt(0)!=="!"){let o=n.slice(1,i-1);if(this.linkInText(o))return"["+o.replace(a,s)+"]["+"a".repeat(n.length-i-2)+"]"}return"["+"a".repeat(n.length-2)+"]"};r=r.replace(a,s)}return r=r.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,s,n)=>n?"+".repeat(a.length):s?s+a.slice(s.length,-s.length).replace(/`/g,"+")+s:a),r=r.replace(this.tokenizer.rules.inline.blockSkip,(a,s,n)=>{let i=n?n.length:0;return a.slice(0,i)+"["+"a".repeat(a.length-i-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r,r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(!this.options.silent)throw Error(r)}},Tr=class{options;parser;constructor(e){this.options=e||He}space(e){return""}code({text:e,lang:t,escaped:r}){let a=(t||"").match(te.notSpaceStart)?.[0],s=e?e.replace(te.endingNewline,"")+`
|
|
62
|
+
`:"";return a?'<pre><code class="language-'+oe(a)+'">'+(r?s:oe(s,!0))+`</code></pre>
|
|
63
|
+
`:"<pre><code>"+(r?s:oe(s,!0))+`</code></pre>
|
|
59
64
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
60
65
|
${this.parser.parse(e)}</blockquote>
|
|
61
66
|
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
62
67
|
`}hr(e){return`<hr>
|
|
63
|
-
`}list(e){let t=e.ordered,
|
|
64
|
-
`+
|
|
68
|
+
`}list(e){let t=e.ordered,r=e.start,a="";for(let i=0;i<e.items.length;i++){let o=e.items[i];a+=this.listitem(o)}let s=t?"ol":"ul",n=t&&r!==1?' start="'+r+'"':"";return"<"+s+n+`>
|
|
69
|
+
`+a+"</"+s+`>
|
|
65
70
|
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
66
71
|
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
67
|
-
`}table(e){let t="",
|
|
72
|
+
`}table(e){let t="",r="";for(let s=0;s<e.header.length;s++)r+=this.tablecell(e.header[s]);t+=this.tablerow({text:r});let a="";for(let s=0;s<e.rows.length;s++){let n=e.rows[s];r="";for(let i=0;i<n.length;i++)r+=this.tablecell(n[i]);a+=this.tablerow({text:r})}return a&&=`<tbody>${a}</tbody>`,`<table>
|
|
68
73
|
<thead>
|
|
69
74
|
`+t+`</thead>
|
|
70
|
-
`+
|
|
75
|
+
`+a+`</table>
|
|
71
76
|
`}tablerow({text:e}){return`<tr>
|
|
72
77
|
${e}</tr>
|
|
73
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),
|
|
74
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${
|
|
75
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+ee(a.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(a);throw a}}};function E(e,t){return Ne.parse(e,t)}E.options=E.setOptions=function(e){return Ne.setOptions(e),E.defaults=Ne.defaults,Ks(E.defaults),E},E.getDefaults=lr,E.defaults=je;function Ql(...e){return Ne.use(...e),E.defaults=Ne.defaults,Ks(E.defaults),E}E.use=Ql,E.walkTokens=function(e,t){return Ne.walkTokens(e,t)},E.parseInline=Ne.parseInline,E.Parser=he,E.parser=he.parse,E.Renderer=sa,E.TextRenderer=yr,E.Lexer=ue,E.lexer=ue.lex,E.Tokenizer=ra,E.Hooks=Dt,E.parse=E,E.options,E.setOptions,E.walkTokens,E.parseInline,he.parse,ue.lex;var mn=!1;function fn(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function yn(e,{href:t,title:a,tokens:r}){if(!t?.startsWith("#")||typeof location>"u")return!1;let s=`${location.href.replace(/#.*/,"")}${t}`,n=a?` title="${fn(a)}"`:"";return`<a class="anchor-link" href="${fn(s)}"${n}>${e.parser.parseInline(r)}</a>`}function na(e){let t=e.link;e.link=function(a){let r=yn(this,a);return r===!1?t.call(this,a):r}}function ec(){mn||(mn=!0,E.use({renderer:{link(e){return yn(this,e)}}}))}ec();function J(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/<br\s*\/?>$/i,"").trim();return t.includes("<br")||t.includes(`
|
|
76
|
-
`)}var tc=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,ac=Object.hasOwnProperty,Ge=class{constructor(){this.occurrences,this.reset()}slug(e,t){let a=this,r=rc(e,t===!0),s=r;for(;ac.call(a.occurrences,r);)a.occurrences[s]++,r=s+"-"+a.occurrences[s];return a.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function rc(e,t){return typeof e=="string"?(t||(e=e.toLowerCase()),e.replace(tc,"").replace(/ /g,"-")):""}var gn={astro:{scopeName:"source.astro",dependencies:["html","css","scss","javascript","typescript","tsx"],patterns:[{include:"#frontmatter"},{include:"#script"},{include:"#style"},{include:"#interpolation"},{include:"text.html.basic"}],repository:{frontmatter:{begin:"^---\\s*$",end:"^---\\s*$",beginCaptures:{0:{name:"punctuation.definition.frontmatter.begin.astro"}},endCaptures:{0:{name:"punctuation.definition.frontmatter.end.astro"}},contentName:"meta.embedded.block.astro",patterns:[{include:"source.ts"}]},script:{patterns:[{begin:"<(script)\\s*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.astro",patterns:[{include:"source.ts"}]},{include:"text.html.basic#embedded-javascript"}]},style:{patterns:[{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.scss.embedded.astro",patterns:[{include:"source.scss"}]},{include:"source.css"}]},interpolation:{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin.astro"}},endCaptures:{0:{name:"punctuation.section.embedded.end.astro"}},contentName:"meta.embedded.expression.astro",patterns:[{include:"text.html.basic#comments"},{include:"source.tsx"}]}}},bash:{scopeName:"source.shell",patterns:[{match:"^#!.*$",name:"comment.line.shebang"},{match:"(?!^#!)#.*$",name:"comment.line.number-sign"},{match:"'(?:[^']*)'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"\\$[a-zA-Z_][\\w]*|\\$\\d+|\\$[?@*#$!_-]|\\$\\{[^}]+\\}",name:"entity.name.variable"},{match:"\\b([a-zA-Z_][\\w]*)(?==)",captures:{1:{name:"entity.name.variable.assignment"}}},{match:"\\b(?:if|then|else|elif|fi|for|while|until|in|do|done|case|esac|function|select|time|coproc)\\b",name:"keyword.control"},{match:"(?:&&|\\|\\||[|&;])",name:"keyword.operator"},{match:"(?<![\\w-])--?[a-zA-Z][\\w-]*(?:=[^\\s]+)?",name:"constant.language.option"},{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?\\b",name:"constant.numeric"}]},c:{scopeName:"source.c",patterns:[{include:"#comments"},{include:"#preprocessor"},{include:"#strings"},{include:"#storage-types"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},preprocessor:{patterns:[{begin:"^\\s*#\\s*include\\b",end:"$",name:"keyword.control.directive.include",patterns:[{match:"<[^>]*>",name:"string.quoted.other.lt-gt"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},{match:"^\\s*#\\s*(?:define|undef|ifdef|ifndef|if|elif|else|endif|pragma|error|warning|line)\\b.*$",name:"keyword.control.directive"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},"storage-types":{match:"\\b(?:auto|const|enum|extern|inline|register|restrict|signed|static|struct|typedef|union|unsigned|volatile)\\b",name:"storage.modifier"},keywords:{match:"\\b(?:break|case|continue|default|do|else|for|goto|if|return|sizeof|switch|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:char|double|float|int|long|short|void|_Bool|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|size_t|ssize_t|ptrdiff_t|FILE)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:NULL|true|false)\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|0[bB][01]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\+\\+|--|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},cpp:{scopeName:"source.cpp",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"source.c#strings"},{include:"#class-declaration"},{include:"#keywords"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"source.c#builtin-types"},{include:"#stl-types"},{include:"#constants"},{include:"source.c#constants"},{include:"#numbers"},{include:"#operators"},{include:"source.c#function-declaration"}],repository:{"class-declaration":{match:"\\b(class|struct|enum|namespace)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:catch|class|const_cast|constexpr|decltype|delete|dynamic_cast|explicit|export|final|friend|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|reinterpret_cast|static_assert|static_cast|template|this|throw|try|typeid|typename|using|virtual)\\b",name:"keyword.control"},"stl-types":{match:"\\bstd::(?:array|deque|forward_list|list|map|multimap|multiset|pair|priority_queue|queue|set|shared_ptr|stack|string|tuple|unique_ptr|unordered_map|unordered_set|vector|weak_ptr)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F']+|0[bB][01']+|(?:\\d[\\d']*\\.[\\d']*|\\.\\d[\\d']*|\\d[\\d']*)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->\\*?|::|\\.\\.\\.|<=>|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"}}},csharp:{scopeName:"source.cs",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"///.*$",name:"comment.line.documentation"},{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:'@"(?:""|[^"])*"',name:"string.quoted.double.verbatim"},{match:'\\$@"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'@\\$"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'\\$"(?:\\\\.|\\{\\{|\\}\\}|[^"\\\\\\r\\n])*"',name:"string.quoted.double.interpolated"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},attributes:{match:"\\[[A-Za-z_][\\w.]*\\]",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|struct|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|as|async|await|base|break|case|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|if|implicit|in|internal|is|lock|namespace|new|null|operator|out|override|params|partial|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var|void)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[uUlLfFdDmM]*\\b",name:"constant.numeric"},operators:{match:"(?:=>|\\?\\?=?|\\?\\.|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*(?:<[^>]*>)?\\s*\\()",name:"entity.name.function"}}},css:{scopeName:"source.css",patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"}],repository:{comments:{begin:"/\\*",end:"\\*/",name:"comment.block"},strings:{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1`,name:"string.quoted"},keyframes:{begin:"(@(?:-\\w+-)?keyframes)\\s+([a-zA-Z_-][\\w-]*)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"},2:{name:"entity.name.animation"}},patterns:[{include:"$self"}]},"at-rule-block":{begin:"(@(?:container|counter-style|document|font-face|font-feature-values|font-palette-values|layer|media|page|position-try|scope|starting-style|supports|view-transition)\\b)[^{;]*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"$self"}]},"at-rule-statement":{begin:"(@(?:charset|custom-media|import|namespace|property)\\b)",end:";",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#values"}]},"rule-set":{begin:"([^\\s@{};<][^@{};<]*?)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"entity.name.selector"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"},{include:"#declarations"},{include:"#values"}]},declarations:{match:"(--[a-zA-Z0-9_-]+|[a-zA-Z-][\\w-]*)(\\s*:)",captures:{1:{name:"support.type.property-name"}}},values:{patterns:[{match:"!important\\b",name:"keyword.other.important"},{match:"\\b(var)\\(\\s*(--[a-zA-Z0-9_-]+)",captures:{1:{name:"entity.name.function"},2:{name:"variable.other.custom-property"}}},{match:"\\b([a-zA-Z_-][\\w-]*)(?=\\()",captures:{1:{name:"entity.name.function"}}},{match:"#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\\b",name:"constant.other.color"},{match:"(?<![\\w.-])-?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?(?:%|[a-zA-Z]+)?\\b",name:"constant.numeric"},{match:"\\b(?:auto|currentColor|inherit|initial|none|normal|revert|revert-layer|transparent|unset)\\b",name:"constant.language"},{match:"(?:[+*/]|(?<=\\s)-(?!-))",name:"keyword.operator"}]}}},go:{scopeName:"source.go",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#builtin-functions"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:"`",end:"`",name:"string.quoted.raw"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.rune"}]},"function-declaration":{match:"\\b(func)\\s+(?:\\([^)]*\\)\\s*)?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|iota)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:any|bool|byte|complex64|complex128|error|float32|float64|int|int8|int16|int32|int64|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\\b",name:"support.class.builtin"},"builtin-functions":{match:"\\b(?:append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\\b(?=\\s*\\()",name:"entity.name.function"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?i?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\.\\.\\.|<-|\\|\\||&&|==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},html:{scopeName:"text.html.basic",dependencies:["css","json","javascript"],patterns:[{include:"#comments"},{include:"#doctype"},{include:"#embedded-css"},{include:"#embedded-json"},{include:"#embedded-javascript"},{include:"#raw-text"},{include:"#tags"},{include:"#entities"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},doctype:{match:"<![Dd][Oo][Cc][Tt][Yy][Pp][Ee]\\b[^>]*>",name:"keyword.control.doctype"},"embedded-css":{begin:`<([Ss][Tt][Yy][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Tt][Yy][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.html",patterns:[{include:"source.css"}]},"embedded-json":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:application/(?:ld\\+)?json|importmap|speculationrules)\\2)(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.json.embedded.html",patterns:[{include:"source.json"}]},"embedded-javascript":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?:(?![^>]*\\b[Tt][Yy][Pp][Ee]\\s*=)|(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:module|(?:text|application)/(?:java|ecma)script)\\2))(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.html",patterns:[{include:"source.js"}]},"raw-text":{begin:`<([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"string.unquoted.raw-text"},tags:{begin:"<(/?)([a-zA-Z][\\w.-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#inline-css"},{include:"#inline-javascript"},{include:"#attributes"},{include:"#unquoted-attributes"},{include:"#boolean-attributes"}]},"inline-css":{begin:`[ \\t]+(style)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.css.embedded.inline",patterns:[{include:"source.css#comments"},{include:"source.css#strings"},{include:"source.css#declarations"},{include:"source.css#values"}]},"inline-javascript":{begin:`[ \\t]+(on[a-zA-Z][\\w-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.inline",patterns:[{include:"source.js"}]},attributes:{begin:`[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"string.quoted.attribute-value",patterns:[{include:"#entities"}]},"unquoted-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*([^\\s\"'`=<>]+)",captures:{1:{name:"entity.other.attribute-name"},2:{name:"string.unquoted.attribute-value"}}},"boolean-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)(?=[ \\t]*/?>|[ \\t]+[a-zA-Z_:])",captures:{1:{name:"entity.other.attribute-name"}}},entities:{match:"&(?:#\\d+|#x[0-9a-fA-F]+|[a-zA-Z][\\w]+);",name:"constant.character.entity"}}},http:{scopeName:"source.http",patterns:[{match:"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE|CONNECT)\\s+([^\\s]+)\\s+(HTTP\\/[0-9.]+)",captures:{1:{name:"keyword.control.http"},2:{name:"string.unquoted.http"},3:{name:"keyword.other.http"}}},{match:"^(HTTP\\/[0-9.]+)\\s+([0-9]{3})(?:\\s+(.*))?",captures:{1:{name:"keyword.other.http"},2:{name:"constant.numeric.http"},3:{name:"string.unquoted.http"}}},{match:"^([a-zA-Z0-9_-]+):\\s*(.*)",captures:{1:{name:"support.type.property-name.http"},2:{name:"string.unquoted.http"}}}]},java:{scopeName:"source.java",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|assert|break|case|catch|continue|default|do|else|extends|final|finally|for|goto|if|implements|import|instanceof|native|new|non-sealed|package|permits|private|protected|public|return|sealed|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:boolean|byte|char|double|float|int|long|short|void|Boolean|Byte|Character|Double|Float|Integer|Long|Short|String|Object|List|Map|Set|ArrayList|HashMap|HashSet|Optional)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[lLfFdD]?\\b",name:"constant.numeric"},operators:{match:"(?:->|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>>?=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},javascript:{scopeName:"source.js",patterns:[{include:"#comments"},{include:"#strings"},{include:"#template"},{include:"#regexp"},{include:"#jsx-closing-tag"},{include:"#jsx-tag"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#variable-declaration"},{include:"#keywords"},{include:"#numbers"},{include:"#constants"},{include:"#decorators"},{include:"#private-fields"},{include:"#properties"},{include:"#functions"},{include:"#built-ins"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},template:{begin:"`",end:"(?<!\\\\)(?:\\\\\\\\)*`",name:"string.quoted.template",patterns:[{include:"#template-interpolation"}]},"template-interpolation":{begin:"\\$\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"balanced-braces":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},regexp:{match:"(?<![\\w)$\\]])/(?![/*])(?:\\\\.|\\[(?:\\\\.|[^\\]\\\\])*\\]|[^/\\\\\\r\\n])+/[dgimsuvy]*",name:"string.regexp"},"jsx-closing-tag":{match:"</([A-Za-z][\\w.-]*)\\s*>",captures:{1:{name:"entity.name.tag"}}},"jsx-tag":{begin:"<([A-Za-z][\\w.-]*)",end:"/?>",beginCaptures:{1:{name:"entity.name.tag"}},patterns:[{include:"#jsx-expression"},{include:"#strings"},{include:"#jsx-boolean-attributes"},{include:"#jsx-attributes"}]},"jsx-expression":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"jsx-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s*(?:=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"jsx-boolean-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s+(?:[a-zA-Z_:][\\w:.-]*\\s*=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(?:(async)\\s+)?(function)\\s*(\\*)?\\s*([A-Za-z_$][\\w$]*)?",captures:{1:{name:"storage.modifier.async"},2:{name:"storage.type.function"},4:{name:"entity.name.function"}}},"variable-declaration":{match:"\\b(const|let|var)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.variable"},2:{name:"variable.other.readwrite"}}},keywords:{match:"\\b(?:as|assert|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b",name:"keyword.control"},numbers:{match:"(?<![\\w$])(?:0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*n?|0[bB][01](?:_?[01])*n?|0[oO][0-7](?:_?[0-7])*n?|\\d(?:_?\\d)*n|(?:\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?)(?![\\w$])",name:"constant.numeric"},constants:{patterns:[{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\b(?:Infinity|NaN|null|undefined)\\b",name:"constant.language"}]},decorators:{match:"@[A-Za-z_$][\\w$]*",name:"entity.name.decorator"},"private-fields":{match:"#[A-Za-z_$][\\w$]*",name:"variable.other.private"},properties:{match:"(?<=\\.)[A-Za-z_$][\\w$]*|[A-Za-z_$][\\w$]*(?=\\s*:)",name:"entity.name.property"},functions:{match:"\\b[A-Za-z_$][\\w$]*(?=\\s*\\()",name:"entity.name.function"},"built-ins":{match:"\\b(?:Array|BigInt|Boolean|console|customElements|Date|document|Error|JSON|Map|Math|Number|Object|Promise|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet|window)\\b",name:"support.class"},operators:{match:"(?:=>|===|!==|==|!=|<=|>=|\\?\\?|\\?\\.|\\+\\+|--|&&|\\|\\||\\*\\*|[+*%&|^!~?:-])",name:"keyword.operator"}}},json:{scopeName:"source.json",patterns:[{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*:)',name:"entity.name.key"},{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*[,}\\]])',name:"string.quoted.double"},{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"},{match:"(?<![\\w.])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric"}]},kotlin:{scopeName:"source.kotlin",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(?:(data|sealed|abstract|open|inner|enum|annotation)\\s+)?(class|interface|object)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.modifier"},2:{name:"storage.type.class"},3:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(fun)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|actual|annotation|as|break|by|catch|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|final|finally|for|get|if|import|in|infix|init|inline|inner|internal|is|lateinit|noinline|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|try|typealias|val|var|vararg|when|where|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:Any|Array|Boolean|Byte|Char|Double|Float|Int|List|Long|Map|MutableList|MutableMap|MutableSet|Nothing|Set|Short|String|Unit)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[fFLuU]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\?:|\\?\\.|!!|\\.\\.|::|&&|\\|\\||==|!=|<=|>=|[+\\-*/%!<>=]=?)",name:"keyword.operator"}}},markdown:{scopeName:"text.html.markdown",dependencies:["yaml"],patterns:[{include:"#front-matter"},{include:"#comments"},{include:"#fenced-code"},{include:"#headings"},{include:"#quotes"},{include:"#lists"},{include:"#links"},{include:"#inline-code"}],repository:{"front-matter":{begin:"^[ \\t]*---[ \\t]*$",end:"^[ \\t]*(?:---|\\.\\.\\.)[ \\t]*$",patterns:[{include:"source.yaml"}]},comments:{begin:"<!--",end:"-->",name:"comment.block.html"},"fenced-code":{begin:"^[ \\t]*(```+|~~~+).*$",end:"^[ \\t]*\\1[ \\t]*$",name:"string.unquoted.fenced-code"},headings:{match:"^[ \\t]{0,3}#{1,6}[ \\t]+(.+)$",captures:{1:{name:"entity.name.section"}}},quotes:{match:"^[ \\t]*>.*$",name:"comment.blockquote"},lists:{match:"^[ \\t]*(?:[-+*]|\\d+[.)])(?=[ \\t]+)",name:"keyword.control.list"},links:{match:`!?\\[([^\\]]+)\\](\\([^\\s)]+(?:\\s+['"][^'"]*['"])?\\))`,captures:{1:{name:"entity.name.link"},2:{name:"string.other.link"}}},"inline-code":{match:"(`+)(.+?)\\1",captures:{2:{name:"string.other.raw"}}}}},"objective-c":{scopeName:"source.objc",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"#interface-declaration"},{include:"#directives"},{include:"#nsstring"},{include:"source.c#strings"},{include:"#method-declaration"},{include:"#language-variables"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"#property-attributes"},{include:"#builtin-types"},{include:"source.c#builtin-types"},{include:"#constants"},{include:"source.c#constants"},{include:"source.c#numbers"},{include:"source.c#operators"},{include:"source.c#function-declaration"}],repository:{"interface-declaration":{match:"\\b(@interface|@implementation|@protocol)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},directives:{match:"@(?:end|property|synthesize|dynamic|optional|required|class|import|selector|encode|synchronized|autoreleasepool|try|catch|finally|throw)\\b",name:"keyword.control.directive.objc"},nsstring:{match:'@"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},"method-declaration":{match:"^\\s*[-+]\\s*\\([^)]*\\)\\s*([A-Za-z_]\\w*)",captures:{1:{name:"entity.name.function"}}},"language-variables":{match:"\\b(?:self|super)\\b",name:"variable.language.objc"},"property-attributes":{match:"\\b(?:nonatomic|atomic|strong|weak|copy|assign|retain|readonly|readwrite|unsafe_unretained|nullable|nonnull|null_resettable)\\b",name:"storage.modifier"},"builtin-types":{match:"\\b(?:id|instancetype|BOOL|SEL|Class|IMP|NSInteger|NSUInteger|CGFloat|NSString|NSMutableString|NSArray|NSMutableArray|NSDictionary|NSMutableDictionary|NSNumber|NSObject|NSError|NSData|NSURL|NSNotification)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:YES|NO)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|Nil)\\b",name:"constant.language"}]}}},perl:{scopeName:"source.perl",patterns:[{include:"#comments"},{include:"#pod"},{include:"#strings"},{include:"#variables"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},pod:{begin:"^=\\w+",end:"^=cut\\b",name:"comment.block.documentation"},strings:{patterns:[{match:"qw\\s*\\(([^)]*)\\)",name:"string.quoted.other.qw"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"`(?:\\\\.|[^`\\\\])*`",name:"string.interpolated.backtick"}]},variables:{match:"[$@%&][A-Za-z_]\\w*(?:::\\w+)*|\\$\\{[^}]+\\}|\\$[0-9]+|\\$[!@_/\\\\,.;]",name:"entity.name.variable"},"function-declaration":{match:"\\b(sub)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:my|our|local|sub|if|elsif|else|unless|while|until|for|foreach|do|return|last|next|redo|use|no|package|require|and|or|not|xor|eq|ne|lt|gt|le|ge|cmp|given|when|default)\\b",name:"keyword.control"},builtins:{match:"\\b(?:print|printf|sprintf|push|pop|shift|unshift|splice|join|split|map|grep|sort|keys|values|each|defined|exists|delete|ref|bless|die|warn|chomp|chop|length|substr|index|lc|uc|lcfirst|ucfirst|wantarray|scalar)\\b",name:"support.class.builtin"},constants:{match:"\\bundef\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:=>|->|::|\\.\\.\\.?|<=>|==|!=|<=|>=|&&|\\|\\||//|=~|!~|\\*\\*|[+\\-*/%.!<>=]=?)",name:"keyword.operator"}}},php:{scopeName:"source.php",patterns:[{match:"<\\?php\\b|<\\?=|\\?>",name:"punctuation.section.embedded"},{include:"#comments"},{include:"#attributes"},{include:"#strings"},{include:"#variables"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-call"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{match:"#(?!\\[).*$",name:"comment.line.number-sign"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},attributes:{match:"#\\[[^\\]]*\\]",name:"entity.name.decorator"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},variables:{match:"\\$[A-Za-z_]\\w*",name:"entity.name.variable"},"class-declaration":{match:"\\b(class|interface|trait|enum)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(function)\\s+&?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|fn|for|foreach|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|print|private|protected|public|readonly|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false|TRUE|FALSE)\\b",name:"constant.language.boolean"},{match:"\\b(?:null|NULL)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\?\\?=?|<=>|===|!==|==|!=|<=|>=|\\.=|&&|\\|\\||[+\\-*/%.!<>=]=?)",name:"keyword.operator"},"function-call":{match:"\\b[A-Za-z_]\\w*(?=\\s*\\()",name:"entity.name.function"}}},powershell:{scopeName:"source.powershell",patterns:[{include:"#comments"},{include:"#strings"},{include:"#constants"},{include:"#variables"},{include:"#function-declaration"},{include:"#operators"},{include:"#keywords"},{include:"#parameters"},{include:"#cmdlets"},{include:"#numbers"}],repository:{comments:{patterns:[{begin:"<#",end:"#>",name:"comment.block"},{match:"#.*$",name:"comment.line.number-sign"}]},strings:{patterns:[{match:"'(?:''|[^'])*'",name:"string.quoted.single"},{match:'"(?:`.|[^"])*"',name:"string.quoted.double"}]},variables:{match:"\\$(?:\\{[^}]+\\}|[A-Za-z_][\\w:]*)",name:"entity.name.variable"},"function-declaration":{match:"\\b(function|filter)\\s+([A-Za-z_][\\w-]*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},operators:{match:"-(?:eq|ne|gt|lt|ge|le|like|notlike|match|notmatch|contains|notcontains|in|notin|and|or|not|xor|replace|split|join|is|isnot|as)\\b",name:"keyword.operator"},keywords:{match:"\\b(?:begin|break|catch|class|continue|do|dynamicparam|else|elseif|end|exit|finally|for|foreach|if|in|param|process|return|switch|throw|trap|try|until|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\$(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\$(?:null)\\b",name:"constant.language"}]},parameters:{match:"(?<![\\w-])-[A-Za-z][\\w]*",name:"constant.language.option"},cmdlets:{match:"\\b[A-Z][a-zA-Z]*-[A-Za-z]+\\b",name:"entity.name.function"},numbers:{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?(?:[kKmMgGtTpP][bB])?\\b",name:"constant.numeric"}}},python:{scopeName:"source.python",patterns:[{include:"#comments"},{include:"#strings"},{include:"#decorators"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtins"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{begin:'[rRbBfFuU]{0,2}"""',end:'"""',name:"string.quoted.triple.double"},{begin:"[rRbBfFuU]{0,2}'''",end:"'''",name:"string.quoted.triple.single"},{match:'[rRbBfFuU]{0,2}"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"[rRbBfFuU]{0,2}'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"}]},decorators:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(def)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:True|False)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Ellipsis|NotImplemented|__debug__)\\b",name:"constant.language"},{match:"\\b(?:self|cls)\\b",name:"variable.language.python"}]},builtins:{match:"\\b(?:abs|all|any|bool|bytearray|bytes|callable|chr|classmethod|dict|dir|divmod|enumerate|filter|float|format|frozenset|getattr|hasattr|hash|hex|id|input|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip)\\b(?=\\s*\\()",name:"support.class.builtin"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|(?:\\d(?:_?\\d)*)?\\.?\\d(?:_?\\d)*(?:[eE][+-]?\\d+)?[jJ]?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\*\\*|//|<=|>=|==|!=|->|[+\\-*/%@&|^~<>=])",name:"keyword.operator"}}},r:{scopeName:"source.r",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},"function-declaration":{match:"\\b([A-Za-z_.][\\w.]*)\\s*(?=<-\\s*function\\b|=\\s*function\\b)",name:"entity.name.function"},keywords:{match:"\\b(?:if|else|repeat|while|function|for|next|break|in)\\b",name:"keyword.control"},builtins:{match:"\\b(?:c|list|vector|matrix|data\\.frame|print|cat|paste|paste0|sprintf|nrow|ncol|length|names|colnames|rownames|sapply|lapply|vapply|mapply|apply|Map|Filter|Reduce|library|require|source|setwd|getwd|summary|str|head|tail|is\\.na|is\\.null|as\\.character|as\\.numeric|as\\.integer|as\\.factor|as\\.data\\.frame)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:TRUE|FALSE|T|F)\\b",name:"constant.language.boolean"},{match:"\\b(?:NULL|NA|NA_integer_|NA_real_|NA_character_|NA_complex_|Inf|NaN)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?[Li]?)\\b",name:"constant.numeric"},operators:{match:"(?:%[^%\\s]*%|<<-|<-|->>|->|==|!=|<=|>=|&&|\\|\\||[-+*/^!<>=&|~?:])",name:"keyword.operator"}}},ruby:{scopeName:"source.ruby",patterns:[{match:"#(?!\\{).*$",name:"comment.line.number-sign"},{begin:`<<[-~]?(['"]?)([A-Z][A-Z0-9_]*)\\1`,end:"^\\2$",name:"string.unquoted.heredoc"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"(?:@@|@|\\$)[a-zA-Z_][\\w]*",name:"entity.name.variable"},{match:":[a-zA-Z_][\\w]*[!?=]?",name:"constant.other.symbol"},{match:"\\b(def)\\s+([a-zA-Z_][\\w]*[!?=]?)",captures:{1:{name:"storage.type.method"},2:{name:"entity.name.function"}}},{match:"\\b(class|module)\\s+([A-Z][\\w]*(?:::[A-Z][\\w]*)*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\bnil\\b",name:"constant.language"},{match:"\\b(?:BEGIN|END|alias|and|begin|break|case|catch|defined|do|else|elsif|ensure|for|if|in|next|not|or|redo|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b",name:"keyword.control"},{match:"\\b[A-Z][\\w]*(?:::[A-Z][\\w]*)*\\b",name:"entity.name.type.constant"},{match:"(?<![\\w.])-?(?:0[xX][0-9a-fA-F]+|0[bB][01]+|\\d+(?:_\\d+)*(?:\\.\\d+)?)\\b",name:"constant.numeric"}]},rust:{scopeName:"source.rust",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#macros"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#lifetimes"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'b?r#"',end:'"#',name:"string.quoted.raw"},{match:'b?r"[^"]*"',name:"string.quoted.raw"},{match:'b?"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\])'",name:"string.quoted.char"}]},attributes:{match:"#!?\\[[^\\]]*\\]",name:"entity.name.decorator"},"function-declaration":{match:"\\b(fn)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(struct|enum|trait|union|type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},macros:{match:"\\b[A-Za-z_]\\w*!(?=\\s*[\\(\\[{])",name:"entity.name.function.macro"},keywords:{match:"\\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|union|unsafe|use|where|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Some|Ok|Err)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:bool|char|str|String|i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usize|f32|f64|Vec|Option|Result|Box|Rc|Arc|RefCell|HashMap|HashSet)\\b",name:"support.class.builtin"},lifetimes:{match:"'[a-z_]\\w*\\b",name:"variable.language.lifetime"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)(?:[iuf](?:8|16|32|64|128|size))?\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\.\\.=?|&&|\\|\\||==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},svelte:{scopeName:"source.svelte",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#blocks"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.svelte",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.svelte",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.svelte",patterns:[{include:"source.css"}]},blocks:{match:"\\{([#/:@])\\s*(if|else|each|key|await|then|catch|snippet|render|html|debug|const)\\b",captures:{1:{name:"punctuation.definition.keyword"},2:{name:"keyword.control"}}},interpolation:{begin:"\\{(?![#/:@])",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive"},{include:"#shorthand"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},directive:{match:"[ \\t]+((?:bind|on|class|use|transition|in|out|animate|let):[\\w-]+(?:\\|[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}},shorthand:{begin:"[ \\t]+\\{",end:"\\}",contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]}}},toml:{scopeName:"source.toml",patterns:[{include:"#comments"},{include:"#table-headers"},{include:"#datetime"},{include:"#strings"},{include:"#keys"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},"table-headers":{match:"^\\s*(\\[\\[?)([^\\[\\]]+)(\\]\\]?)\\s*$",captures:{1:{name:"punctuation.definition.table"},2:{name:"entity.name.type.class"},3:{name:"punctuation.definition.table"}}},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple.double"},{begin:"'''",end:"'''",name:"string.quoted.triple.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'[^'\\r\\n]*'",name:"string.quoted.single"}]},keys:{match:`^\\s*((?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*')(?:\\s*\\.\\s*(?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*'))*)\\s*(?==)`,captures:{1:{name:"entity.name.key"}}},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:inf|nan)\\b",name:"constant.language"}]},datetime:{match:"\\b\\d{4}-\\d{2}-\\d{2}(?:[Tt ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[Zz]|[+-]\\d{2}:\\d{2})?)?\\b",name:"constant.other.date-time"},numbers:{match:"(?<![\\w.])[+-]?(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"=",name:"keyword.operator"}}},tsx:{scopeName:"source.tsx",dependencies:["javascript","typescript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"source.js#jsx-closing-tag"},{include:"source.js#jsx-tag"},{include:"source.ts#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"source.ts#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"source.ts#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}]},typescript:{scopeName:"source.ts",dependencies:["javascript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}],repository:{"type-declaration":{match:"\\b(interface|enum|namespace|module|type)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},"type-keywords":{match:"\\b(?:abstract|accessor|asserts|declare|infer|keyof|override|readonly|satisfies|unique)\\b",name:"keyword.control.ts"},"builtin-types":{match:"\\b(?:any|bigint|boolean|never|number|object|string|symbol|undefined|unknown|void)\\b",name:"support.class.builtin"}}},vue:{scopeName:"text.html.vue",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.vue",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.vue",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.vue",patterns:[{include:"source.css"}]},interpolation:{begin:"\\{\\{",end:"\\}\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive-value"},{include:"#directive"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},"directive-value":{begin:`[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},directive:{match:"[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}}}},yaml:{scopeName:"source.yaml",patterns:[{match:"#.*$",name:"comment.line.number-sign"},{match:"^(?:---|\\.\\.\\.)\\s*$|^%YAML\\b.*$",name:"keyword.control.document"},{match:"^\\s*(?:-\\s+)?([^#\\s][^\\r\\n:#]*?)(?=\\s*:)",captures:{1:{name:"entity.name.key"}}},{match:"[&*][a-zA-Z_][\\w-]*|![^\\s]+",name:"entity.name.anchor"},{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n]|\\r?\\n[ \\t]+)*\\1`,name:"string.quoted"},{match:"(?<=:\\s)[|>][-+]?\\s*$",name:"keyword.control.block-scalar"},{match:"\\b(?:true|false|yes|no|on|off)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b|~",name:"constant.language"},{match:"(?<![\\w.-])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b",name:"constant.numeric"}]}},bn=new Map;Object.values(gn).forEach(e=>{e?.scopeName&&bn.set(e.scopeName,e)});var sc={"c++":"cpp",cs:"csharp",curl:"bash",js:"javascript",jsx:"javascript",markup:"html",md:"markdown",objc:"objective-c",ps1:"powershell",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"html",ts:"typescript",xml:"html",yml:"yaml",zsh:"bash"},nc={indices:[[1/0,1/0]]},Ct=new Map,ic=e=>{let t=e.split("."),[a,r,s]=t,n=t.at(-1);if(a==="markup"&&["quote","inserted","deleted","raw"].includes(r))return r;if(a==="entity"&&r==="name")return s;if(e.startsWith("constant.character.entity"))return"character-entity";if(t.includes("numeric"))return"numeric";if(e.startsWith("support.type.property-name"))return"property";if(t.includes("attribute-value"))return"attribute-value";if(e.startsWith("string.other.link"))return"link";if(["doctype","at-rule","important","regexp","boolean","symbol","operator","attribute-name"].includes(n))return n;if(["comment","string","constant","storage","keyword","variable","punctuation","entity","support"].includes(a))return a},ia=(e,t,a,r)=>{let s=ic(r);if(!s||t===a)return;let n=new Range;n.setStart(e,t),n.setEnd(e,a),Ct.has(s)||Ct.set(s,new Highlight),Ct.get(s).add(n)},gr=(e,t,a={})=>{Object.entries(a).forEach(([r,s])=>{let n=t.indices[+r];n&&ia(e,...n,s.name)})},oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lc=(e,t)=>e.replace(/\\(\d+)/g,(a,r)=>t[r]===void 0?a:oc(t[r])),vn=e=>e?Array.isArray(e)?e:e.match||e.begin||e.include?[e]:e.patterns||[]:[],cc=(e,t,a)=>{if(e==="$self")return{grammar:t,rules:t.patterns};if(e==="$base")return{grammar:a,rules:a.patterns};if(e[0]==="#")return{grammar:t,rules:vn(t.repository?.[e.slice(1)])};let[r,s]=e.split("#"),n=bn.get(r);return n?{grammar:n,rules:s?vn(n.repository?.[s]):n.patterns}:null},xn=(e,t,a,r=new Set)=>{let s=[];return e.forEach(n=>{if(n.include){let i=`${t.scopeName}:${n.include}`;if(r.has(i))return;let o=cc(n.include,t,a);if(!o)return;let l=new Set(r);l.add(i),s.push(...xn(o.rules,o.grammar,a,l));return}(n.match||n.begin&&n.end)&&s.push({grammar:t,rule:n})}),s},br=new Map,vr=new Map,wn=(e,t,a,r)=>{let s=vr.get(e);if(!s||s.indices[0][0]<a){br.has(e)||br.set(e,new RegExp(e,"dgm"));let n=br.get(e);n.lastIndex=a,s=n.exec(t.data)||nc,vr.set(e,s)}return s.indices[0][0]<r&&s.indices[0][1]<=r?s:null},dc=(e,t,a,r)=>{let s=null;return t.forEach(n=>{let i=wn(n.rule.match||n.rule.begin,e,a,r);i&&(!s||i.indices[0][0]<s.match.indices[0][0])&&(s={...n,match:i})}),s},kn=(e,t,a,r,s,n=s,i=null)=>{let o=xn(t,s,n),l=a;for(;l<r;){let c=dc(e,o,l,r),d=i?wn(i.pattern,e,l,r):null,u=c?.match.indices[0][0]??1/0,h=d?.indices[0][0]??1/0;if(d&&(h<u||h===u&&!i?.applyEndPatternLast))return{contentEnd:h,end:d.indices[0][1],match:d};if(!c)return{contentEnd:r,end:r,match:null};let{rule:m,match:y,grammar:f}=c;if(m.match){m.name&&ia(e,...y.indices[0],m.name),gr(e,y,m.captures),l=y.indices[0][1]>l?y.indices[0][1]:l+1;continue}let b=kn(e,m.patterns||[],y.indices[0][1],r,f,n,{pattern:lc(m.end,y),applyEndPatternLast:m.applyEndPatternLast});m.name&&ia(e,y.indices[0][0],b.end,m.name),m.contentName&&ia(e,y.indices[0][1],b.contentEnd,m.contentName),gr(e,y,m.beginCaptures||m.captures),b.match&&gr(e,b.match,m.endCaptures||m.captures),l=b.end>l?b.end:l+1}return{contentEnd:r,end:r,match:null}},$n=e=>{let t=e.parentElement,a=r=>!r||!r.classList?null:[...r.classList].find(s=>s.startsWith("language-"))?.slice(9);return(a(e)||e.dataset?.language||a(t)||t?.dataset?.language||t?.getAttribute?.("lang")||"").toLowerCase()},pc=e=>sc[e]||e,uc=(e=document)=>{let t=[],a=new Set,r=s=>{if(s&&!a.has(s)&&(a.add(s),s.querySelectorAll)){let n=s.querySelectorAll("pre > code");t.push(...n);let i=s.querySelectorAll("*");for(let o=0;o<i.length;o++){let l=i[o];l.shadowRoot&&r(l.shadowRoot)}}};return r(e),t},xr=!1,hc=(e=document)=>{if(typeof window>"u"||typeof CSS>"u"||!CSS.highlights)return;let t=uc(e).filter($n);t.length!==0&&(Ct.forEach((a,r)=>{CSS.highlights.get(r)===a&&CSS.highlights.delete(r),a.clear()}),t.forEach(a=>{let r=gn[pc($n(a))];if(!r)return;let s=Array.from(a.childNodes).filter(n=>n.nodeType===Node.TEXT_NODE&&n.data?.length>0);s.length!==0&&(vr=new Map,s.forEach(n=>{kn(n,r.patterns,0,n.data.length,r)}))}),Ct.forEach((a,r)=>{a.size&&CSS.highlights.set(r,a)}))},oa=(e=document)=>{xr||(xr=!0,requestAnimationFrame(()=>{xr=!1,hc(e)}))},qe=B`.hover-bg:hover{background:var(--muted)}::selection{background:var(--selection-bg);color:var(--selection-fg)}.regular-font{font-family:var(--font-regular)}.mono-font{font-family:var(--font-mono)}.title{font-size:calc(var(--font-size-small) + 1.125rem);text-wrap:balance;font-weight:400}.sub-title{text-wrap:balance;font-size:1.25rem}.req-res-title{font-family:var(--font-regular);font-size:calc(var(--font-size-small) + .25rem);text-align:start;text-wrap:balance;margin-bottom:.5rem;font-weight:700}.tiny-title{font-size:calc(var(--font-size-small) + 1px);font-weight:700}.regular-font-size{font-size:var(--font-size-regular)}.small-font-size{font-size:var(--font-size-small)}.upper{text-transform:uppercase}.primary-text{color:var(--primary)}.bold-text{font-weight:700}.gray-text{color:var(--muted-foreground)}.red-text{color:var(--red)}.blue-text{color:var(--blue)}.multiline{max-height:var(--resp-area-height,400px);color:var(--muted-foreground);overflow:scroll}.method-fg{color:var(--method-default)}.method-fg.put{color:var(--method-put)}.method-fg.post{color:var(--method-post)}.method-fg.get{color:var(--method-get)}.method-fg.delete{color:var(--method-delete)}.method-fg.head{color:var(--method-head)}.method-fg.patch{color:var(--method-patch)}.method-fg.options{color:var(--method-options)}.method-fg.trace{color:var(--method-trace)}.method-fg.query{color:var(--method-query)}.method-fg.copy{color:var(--method-copy,var(--method-default))}.method-fg.purge{color:var(--method-purge,var(--method-default))}h1{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.75rem;font-weight:400}h2{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.5rem;font-weight:400}h3{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1.25rem;font-weight:400}h4{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:1rem;font-weight:400}h5{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:.875rem;font-weight:400}h6{font-family:var(--font-regular);letter-spacing:normal;padding-top:.625rem;font-size:.75rem;font-weight:400}h1,h2,h3,h4,h5,h6{text-wrap:balance;margin-block-end:.2em}p{margin-block-start:.5em}a{color:var(--blue);cursor:pointer}a.inactive-link{color:var(--foreground);cursor:text;text-decoration:none}code,pre{font-family:var(--font-mono);font-size:calc(var(--font-size-mono) - 1px);margin:0}.m-markdown,.m-markdown-small{color:var(--markdown-fg,var(--foreground));display:block}.m-markdown p,.m-markdown span{font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 8px);color:inherit}.m-markdown li{font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 10px);color:inherit;margin-block:4px}.m-markdown-small p,.m-markdown-small span{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 6px);color:inherit}.m-markdown-small li{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 8px);color:inherit;margin-block:3px}.m-markdown strong,.m-markdown b,.m-markdown-small strong,.m-markdown-small b{color:var(--foreground);font-weight:600}.m-markdown h1,.m-markdown h2,.m-markdown h3,.m-markdown h4,.m-markdown h5,.m-markdown h6,.m-markdown-small h1,.m-markdown-small h2,.m-markdown-small h3,.m-markdown-small h4,.m-markdown-small h5,.m-markdown-small h6{color:var(--foreground)}.m-markdown p:not(:first-child){margin-block-start:24px}.m-markdown-small p:not(:first-child){margin-block-start:12px}.m-markdown-small p:first-child{margin-block-start:0}.m-markdown p,.m-markdown-small p{margin-block-end:0}.m-markdown code span{font-size:var(--font-size-mono)}.m-markdown-small code,.m-markdown code{border-radius:var(--card-radius);color:var(--inline-code-fg);background-color:var(--inline-code-bg,var(--muted));font-size:calc(var(--font-size-mono));padding:1px 6px;line-height:1.2}.m-markdown-small code{font-size:calc(var(--font-size-mono) - 1px);padding:1px 5px}.m-markdown-small pre,.m-markdown pre{white-space:pre-wrap;border-radius:var(--card-radius);border:1px solid var(--input-border);line-height:normal;overflow-x:auto}.m-markdown pre{background:var(--input-background);color:var(--foreground);padding:12px}.m-markdown-small pre{background:var(--input-background);color:var(--card-foreground);margin-top:4px;padding:2px 4px}.m-markdown-small pre code,.m-markdown pre code{background:0 0;border:none;padding:0}.m-markdown pre code{color:var(--code-fg)}.m-markdown-small pre code{color:var(--card-foreground);background:0 0}.m-markdown ul,.m-markdown ol{padding-inline-start:30px}.m-markdown-small ul,.m-markdown-small ol{padding-inline-start:20px}.m-markdown-small a,.m-markdown a{color:var(--blue)}.m-markdown-small img,.m-markdown img{max-width:100%}.m-markdown-small table,.m-markdown table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:var(--card-radius);font-size:calc(var(--font-size-small) + 1px);line-height:calc(var(--font-size-small) + 4px);max-width:100%;margin:10px 0}.m-markdown-small table{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 2px);margin:8px 0}.m-markdown-small td,.m-markdown-small th,.m-markdown td,.m-markdown th{vertical-align:top;border-top:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px)}.m-markdown-small tr:first-child th,.m-markdown tr:first-child th{border-top:0}.m-markdown th,.m-markdown td{padding:10px 12px}.m-markdown-small th,.m-markdown-small td{padding:8px}.m-markdown th,.m-markdown-small th{background:var(--card);vertical-align:middle;font-weight:600}.m-markdown-small table code{font-size:calc(var(--font-size-mono) - 2px)}.m-markdown table code{font-size:calc(var(--font-size-mono) - 1px)}.m-markdown blockquote,.m-markdown-small blockquote{border-inline-start:3px solid var(--border);margin-inline:0;padding:6px 0 6px 6px}.m-markdown hr{border:1px solid var(--border)}`,Tt=B`.m-btn{border-radius:var(--radius);font-weight:600;font-size:var(--font-size-small);text-align:center;white-space:nowrap;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);user-select:none;cursor:pointer;outline:0;padding:.4em 1em;line-height:1;transition:background .2s,color .2s,border-color .2s,transform .1s;display:inline-block;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.m-btn:hover{background:color-mix(in srgb, var(--primary) 28%, transparent);color:var(--foreground)}.m-btn.primary{background:var(--primary);color:var(--primary-foreground)}.m-btn.primary:hover{background:var(--primary);filter:brightness(110%);color:var(--primary-foreground)}.m-btn.thin-border{border-width:1px}.m-btn.large{padding:.55em 1.1em}.m-btn.small{padding:.35em .85em}.m-btn.tiny{padding:.3em .5em}.m-btn.circle{border-radius:50%}.m-btn.nav{border:1px solid var(--primary)}.m-btn.nav:hover{background:var(--primary)}.m-btn:disabled{background:var(--muted);color:var(--muted-foreground);border-color:var(--border);cursor:not-allowed;opacity:.4}.m-btn:active{filter:brightness(85%);transition:scale;transform:scale(.97)}.toolbar-btn{cursor:pointer;font-size:var(--font-size-small);min-width:50px;color:var(--primary-foreground);border-radius:var(--radius);background:var(--primary);border:none;margin:0 2px;padding:4px}input,textarea,select,pre{color:var(--foreground);background:var(--input-background);border:1px solid var(--input-border);border-radius:var(--radius);outline:none}textarea,pre{border-radius:var(--card-radius)}button{font-family:var(--font-regular);color:var(--foreground)}pre,select,textarea,input[type=file],input[type=text],input[type=password]{font-family:var(--font-mono);font-weight:400;font-size:var(--font-size-small);padding:6px 5px;transition:border .2s}select{font-family:var(--font-regular);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E);background-position:calc(100% - 5px);background-repeat:no-repeat;background-size:10px;padding:5px 30px 5px 5px}select:hover{border-color:var(--primary)}textarea::placeholder,input[type=text]::placeholder,input[type=password]::placeholder{color:var(--muted-foreground);opacity:1}input[type=file]{font-family:var(--font-regular);cursor:pointer;background:var(--input-background);border:1px solid var(--input-border);border-radius:var(--radius);min-height:calc(var(--font-size-small) + 1.125rem);padding:2px}input[type=file]::file-selector-button,input[type=file]::-webkit-file-upload-button{font-family:var(--font-regular);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:3px 8px}input[type=file]::file-selector-button,input[type=file]::file-selector-button{font-family:var(--font-regular);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:3px 8px}pre,textarea{scrollbar-width:thin;scrollbar-color:var(--input-border) var(--input-background)}pre::-webkit-scrollbar,textarea::-webkit-scrollbar{width:8px;height:8px}pre::-webkit-scrollbar-track,textarea::-webkit-scrollbar-track{background:var(--input-background)}pre::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{background:var(--input-border);border-radius:2px}.link{font-size:var(--font-size-small);color:var(--blue);font-family:var(--font-mono);margin-bottom:2px;text-decoration:underline}input[type=checkbox]{appearance:none;background:var(--muted);border:1px solid var(--border);cursor:pointer;vertical-align:top;border-radius:9px;width:36px;min-width:36px;height:18px;transition:border .25s .15s,box-shadow .25s .3s,padding .25s;display:inline-block;position:relative}input[type=checkbox]:after{background:var(--background);border:1px solid var(--border);content:"";border-radius:8px;height:16px;transition:border .25s .15s,left .25s .1s,right .15s .175s;display:block;position:absolute;top:0;left:0;right:16px}input[type=checkbox]:checked{background:var(--green);border-color:var(--green)}input[type=checkbox]:checked:after{border:1px solid var(--green);transition:border .25s,left .15s .25s,right .25s .175s;left:16px;right:1px}`,la=B`.row,.col{display:flex}.row{flex-direction:row;align-items:center}.col{flex-direction:column;align-items:stretch}`,ca=B`.m-table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:var(--card-radius);direction:ltr;max-width:100%;margin:0}.m-table tr:first-child td,.m-table tr:first-child th{border-top:0}.m-table td,.m-table th{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 4px);vertical-align:top;padding:4px 5px}.m-table.padded-12 td,.m-table.padded-12 th{padding:12px}.m-table td:not([align]),.m-table th:not([align]){text-align:start}.m-table th{color:var(--card-foreground);font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 18px);letter-spacing:normal;background:var(--card);vertical-align:bottom;border-bottom:1px solid var(--border);font-weight:600}.m-table>tbody>tr>td,.m-table>tr>td{border-top:1px solid var(--border);text-overflow:ellipsis;overflow:hidden}.table-title{font-size:var(--font-size-small);vertical-align:middle;margin:12px 0 4px;font-weight:700}`,Sn=B`.only-large-screen{display:none}.endpoint-head .path{font-family:var(--font-mono);font-size:var(--font-size-small);overflow-wrap:break-word;word-break:break-all;align-items:center;display:flex}.endpoint-head .descr{font-size:var(--font-size-small);color:var(--muted-foreground);overflow-wrap:break-word;word-break:break-all;align-items:center;font-weight:400;display:none}.m-endpoint{border-radius:min(var(--radius), 1rem);--method-color:var(--method-default)}.m-endpoint.expanded{margin-bottom:16px}.m-endpoint>.endpoint-head{border:1px solid #0000;border-left-width:5px;border-top-color:var(--border);border-radius:min(var(--radius), 1rem);cursor:pointer;align-items:center;padding:6px 16px;display:flex}.m-endpoint>.endpoint-head.expanded{border-bottom-right-radius:0;border-bottom-left-radius:0}.m-endpoint>.endpoint-head:hover,.m-endpoint>.endpoint-head.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.put:hover,.m-endpoint>.endpoint-head.put.expanded{border-color:var(--method-put,var(--orange));background:color-mix(in srgb, var(--method-put,var(--orange)) 10%, transparent)}.m-endpoint>.endpoint-head.post:hover,.m-endpoint>.endpoint-head.post.expanded{border-color:var(--method-post,var(--green));background:color-mix(in srgb, var(--method-post,var(--green)) 10%, transparent)}.m-endpoint>.endpoint-head.get:hover,.m-endpoint>.endpoint-head.get.expanded{border-color:var(--method-get,var(--blue));background:color-mix(in srgb, var(--method-get,var(--blue)) 10%, transparent)}.m-endpoint>.endpoint-head.delete:hover,.m-endpoint>.endpoint-head.delete.expanded{border-color:var(--method-delete,var(--red));background:color-mix(in srgb, var(--method-delete,var(--red)) 10%, transparent)}.m-endpoint>.endpoint-head.head:hover,.m-endpoint>.endpoint-head.head.expanded,.m-endpoint>.endpoint-head.patch:hover,.m-endpoint>.endpoint-head.patch.expanded,.m-endpoint>.endpoint-head.options:hover,.m-endpoint>.endpoint-head.options.expanded{border-color:var(--yellow);background:color-mix(in srgb, var(--yellow) 10%, transparent)}.m-endpoint>.endpoint-head.trace:hover,.m-endpoint>.endpoint-head.trace.expanded{border-color:var(--pink);background:color-mix(in srgb, var(--pink) 10%, transparent)}.m-endpoint>.endpoint-head.query:hover,.m-endpoint>.endpoint-head.query.expanded{border-color:var(--purple);background:color-mix(in srgb, var(--purple) 10%, transparent)}.m-endpoint>.endpoint-head.copy:hover,.m-endpoint>.endpoint-head.copy.expanded,.m-endpoint>.endpoint-head.purge:hover,.m-endpoint>.endpoint-head.purge.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.deprecated:hover,.m-endpoint>.endpoint-head.deprecated.expanded{border-color:var(--border);filter:opacity(.6)}.m-endpoint .endpoint-body{border-style:solid;border-width:0 1px 1px 5px;border-color:var(--method-color,var(--method-default));border-bottom-left-radius:min(var(--radius), 1rem);border-bottom-right-radius:min(var(--radius), 1rem);flex-wrap:wrap;padding:16px 0 0;box-shadow:0 4px 3px -3px #00000026}.m-endpoint .endpoint-body.delete{border-color:var(--red)}.m-endpoint .endpoint-body.put{border-color:var(--orange)}.m-endpoint .endpoint-body.post{border-color:var(--green)}.m-endpoint .endpoint-body.get{border-color:var(--blue)}.m-endpoint .endpoint-body.head,.m-endpoint .endpoint-body.patch,.m-endpoint .endpoint-body.options{border-color:var(--yellow)}.m-endpoint .endpoint-body.trace{border-color:var(--pink)}.m-endpoint .endpoint-body.query{border-color:var(--purple)}.m-endpoint .endpoint-body.copy,.m-endpoint .endpoint-body.purge{border-color:var(--method-color,var(--method-default))}.m-endpoint .endpoint-body.deprecated{border-color:var(--border);filter:opacity(.6)}.endpoint-head .deprecated{color:var(--muted-foreground);filter:opacity(.6)}.summary{padding:8px}.summary .title{font-size:calc(var(--font-size-regular) + 2px);word-break:break-all;margin-bottom:6px}.endpoint-head .method{vertical-align:middle;font-size:var(--font-size-small);height:calc(var(--font-size-small) + 16px);line-height:calc(var(--font-size-small) + 8px);border-radius:var(--radius);text-align:center;text-transform:uppercase;border:2px solid var(--method-color,var(--method-default));width:60px;margin-inline-end:5px;padding:2px 5px;font-weight:700;display:inline-block}.endpoint-head .method.delete{border:2px solid var(--method-delete)}.endpoint-head .method.put{border:2px solid var(--method-put)}.endpoint-head .method.post{border:2px solid var(--method-post)}.endpoint-head .method.get{border:2px solid var(--method-get)}.endpoint-head .method.get.deprecated{border:2px solid var(--border)}.endpoint-head .method.head{border:2px solid var(--method-head)}.endpoint-head .method.patch{border:2px solid var(--method-patch)}.endpoint-head .method.options{border:2px solid var(--method-options)}.endpoint-head .method.trace{border:2px solid var(--method-trace)}.endpoint-head .method.query{border:2px solid var(--method-query)}.endpoint-head .method.copy{border:2px solid var(--method-copy,var(--method-default))}.endpoint-head .method.purge{border:2px solid var(--method-purge,var(--method-default))}.head{--method-color:var(--method-head)}.patch{--method-color:var(--method-patch)}.options{--method-color:var(--method-options)}.trace{--method-color:var(--method-trace)}.query{--method-color:var(--method-query)}.put{--method-color:var(--method-put)}.post{--method-color:var(--method-post)}.get{--method-color:var(--method-get)}.delete{--method-color:var(--method-delete)}.copy{--method-color:var(--method-copy,var(--method-default))}.purge{--method-color:var(--method-purge,var(--method-default))}.req-resp-container{border-top:1px solid var(--border);flex-flow:column wrap;align-items:stretch;min-width:0;margin-top:16px;display:flex}.expanded-req-resp-container{border-top:none;flex-flow:column wrap;align-items:stretch;min-width:0;margin-top:16px;display:flex}.request-panel,.view-mode-request,api-response{box-sizing:border-box;flex:auto;min-width:0;min-height:100px;padding:16px 8px;overflow:hidden}.m-endpoint .request-panel,.m-endpoint .view-mode-request{border-style:dashed;border-width:0 0 1px;border-color:var(--method-color,var(--primary));flex-direction:column;display:flex}.expanded-endpoint-body .request-panel,.expanded-req-resp-container .request-panel{border:0;flex-direction:column;display:flex}.head .view-mode-request,.patch .view-mode-request,.options .view-mode-request{border-color:var(--yellow)}.put .view-mode-request{border-color:var(--orange)}.post .view-mode-request{border-color:var(--green)}.get .view-mode-request{border-color:var(--blue)}.delete .view-mode-request{border-color:var(--red)}.trace .view-mode-request{border-color:var(--pink)}.query .view-mode-request{border-color:var(--purple)}.copy .view-mode-request,.purge .view-mode-request{border-color:var(--method-color,var(--method-default))}@container (width>=860px){.only-large-screen{display:block}.endpoint-head .path{font-size:var(--font-size-regular)}.endpoint-head .descr{display:flex}.endpoint-head .m-markdown-small,.descr .m-markdown-small{display:block}.req-resp-container,.expanded-req-resp-container{flex-direction:var(--layout,row);flex-wrap:nowrap}:host([layout=column]) .req-resp-container,:host([layout=column]) .expanded-req-resp-container,.req-resp-container.column-layout,.expanded-req-resp-container.column-layout{flex-direction:column!important}:host([layout=column]) .m-endpoint .request-panel,:host([layout=column]) .view-mode-request,.m-endpoint .request-panel.column-layout,.view-mode-request.column-layout{border-width:0 0 1px;padding:16px 8px}:host([layout=column]) .expanded-endpoint-body .request-panel,:host([layout=column]) .expanded-req-resp-container .request-panel,.expanded-endpoint-body .request-panel.column-layout,.expanded-req-resp-container .request-panel.column-layout{padding:16px 8px;border:0!important}:host([layout=row]) .req-resp-container,:host([layout=row]) .expanded-req-resp-container,.req-resp-container.row-layout,.expanded-req-resp-container.row-layout{flex-direction:row}:host([layout=row]) .request-panel,:host([layout=row]) .view-mode-request,:host([layout=row]) api-response,.req-resp-container.row-layout .request-panel,.req-resp-container.row-layout .view-mode-request,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout .request-panel,.expanded-req-resp-container.row-layout .view-mode-request,.expanded-req-resp-container.row-layout api-response{flex:1;min-width:0}:host([layout=row]) .m-endpoint .request-panel.row-layout,:host([layout=row]) .view-mode-request.row-layout,.m-endpoint .request-panel.row-layout,.view-mode-request.row-layout{border-style:dashed;border-width:0 1px 0 0;border-color:var(--method-color,var(--primary));padding:16px 20px 16px 8px}:host([layout=row]) .expanded-endpoint-body .request-panel.row-layout,:host([layout=row]) .expanded-req-resp-container.row-layout .request-panel,.expanded-endpoint-body .request-panel.row-layout,.expanded-req-resp-container.row-layout .request-panel{border-style:dashed;border-width:0 1px 0 0;border-color:color-mix(in srgb, var(--method-color,var(--primary)) 50%, transparent);padding:16px 20px 16px 8px}.head .expanded-endpoint-body .request-panel,.head .expanded-req-resp-container .request-panel,.patch .expanded-endpoint-body .request-panel,.patch .expanded-req-resp-container .request-panel,.options .expanded-endpoint-body .request-panel,.options .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--yellow) 50%, transparent)}.put .expanded-endpoint-body .request-panel,.put .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--orange) 50%, transparent)}.post .expanded-endpoint-body .request-panel,.post .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--green) 50%, transparent)}.get .expanded-endpoint-body .request-panel,.get .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--blue) 50%, transparent)}.delete .expanded-endpoint-body .request-panel,.delete .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--red) 50%, transparent)}.trace .expanded-endpoint-body .request-panel,.trace .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--pink) 50%, transparent)}.query .expanded-endpoint-body .request-panel,.query .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--purple) 50%, transparent)}.copy .expanded-endpoint-body .request-panel,.copy .expanded-req-resp-container .request-panel,.purge .expanded-endpoint-body .request-panel,.purge .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--method-color,var(--method-default)) 50%, transparent)}:host([layout=row]) api-response,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout api-response{padding:16px 8px 16px 20px}.summary{padding:8px 16px}}`,wr=B`code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5}pre[class*=language-]{border-radius:var(--card-radius);background:var(--input-background);border:1px solid var(--input-border);margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{white-space:normal;border-radius:var(--card-radius)}::highlight(comment),::highlight(quote){color:var(--syntax-comment,#6e7781)}::highlight(keyword),::highlight(storage),::highlight(at-rule),::highlight(doctype),::highlight(important),::highlight(section){color:var(--syntax-keyword,#cf222e)}::highlight(operator),::highlight(punctuation){color:var(--syntax-operator,#24292f)}::highlight(string),::highlight(regexp),::highlight(attribute-value),::highlight(link),::highlight(raw){color:var(--syntax-string,#0a3069)}::highlight(numeric),::highlight(boolean),::highlight(constant),::highlight(symbol),::highlight(character-entity),::highlight(anchor),::highlight(entity){color:var(--syntax-constant,#0550ae)}::highlight(function),::highlight(decorator),::highlight(animation){color:var(--syntax-function,#8250df)}::highlight(type),::highlight(support){color:var(--syntax-type,#8250df)}::highlight(variable),::highlight(interpolation){color:var(--syntax-variable,#953800)}::highlight(property),::highlight(key),::highlight(attribute-name){color:var(--syntax-property,#0550ae)}::highlight(tag){color:var(--syntax-tag,#116329)}::highlight(selector){color:var(--syntax-selector,#8250df)}::highlight(inserted){color:var(--syntax-inserted,#116329)}::highlight(deleted){color:var(--syntax-deleted,#cf222e)}`,da=B`.tab-panel{border:none}.tab-buttons{border-bottom:1px solid var(--border);scrollbar-width:thin;align-items:stretch;height:30px;padding:4px 4px 0;overflow:auto hidden}.tab-buttons::-webkit-scrollbar{background:var(--border);height:1px}.tab-btn{corner-shape:square;color:var(--muted-foreground);white-space:nowrap;cursor:pointer;font-family:var(--font-regular);font-size:var(--font-size-small);background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;outline:none;margin-inline-end:16px;padding:2px 4px;transition:color .15s}.tab-btn.active{border-bottom:2px solid var(--primary);color:var(--primary);font-weight:600}.tab-btn:hover{color:var(--primary)}.tab-content{min-height:50px;margin:-1px 0 0;position:relative}`,En=B`#advanced-search-btn{width:75px;margin-left:5px;padding:6px 8px;display:none}.btn-clear-filter{color:var(--muted-foreground);width:75px;margin-left:5px;padding:6px 8px}.nav-bar-header{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(12px);flex-direction:column;width:100%;transition:box-shadow .2s,background .2s;display:flex;position:sticky;top:0}@container scroll-state(scrollable:top){.nav-bar-header{box-shadow:0 4px 12px -2px #00000040,0 2px 4px -1px #00000026}}.nav-bar-search-container{box-sizing:border-box;flex-direction:row;justify-content:center;align-items:stretch;width:100%;padding:8px 16px 12px;display:flex}.nav-bar-search-container.has-bottom-border{border-bottom:1px solid var(--muted)}.nav-bar-search-input-wrapper{flex:1;line-height:22px;display:flex;position:relative}.nav-bar-search-input{width:100%;color:var(--foreground);border:1px solid var(--input-border);border-radius:var(--radius);background:var(--input-background);font-size:calc(var(--font-size-small) + 1px);box-sizing:border-box;padding:6px 28px 6px 10px;transition:border-color .2s,box-shadow .2s}.nav-bar-search-input:focus{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);outline:none}.nav-bar-search-icon{font-size:var(--font-size-regular);cursor:pointer;color:var(--muted-foreground);opacity:.6;user-select:none;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.nav-bar-search-icon:hover{opacity:1;color:var(--foreground)}#nav-bar-btn{background:var(--card);width:50px;height:50px;color:var(--foreground);border:1px solid var(--border);cursor:pointer;z-index:10;border-radius:4px;font-size:36px;line-height:30px;position:absolute;top:16px;right:16px;box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030;&:hover{border-color:var(--primary);color:var(--primary)}}.nav-bar{width:0;height:100%;color:var(--muted-foreground);background:var(--background);background-blend-mode:multiply;border-right:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px);word-break:break-word;flex-flow:column;position:relative;overflow:hidden;&.floating-nav{z-index:5;width:330px;position:absolute;top:0;left:0;overflow:scroll}}.nav-bar-info:focus-visible,.nav-bar-tag:focus-visible,.nav-bar-path:focus-visible{box-shadow:none;outline-offset:-4px;outline:1px solid}.nav-bar-expand-all:focus-visible,.nav-bar-collapse-all:focus-visible,.nav-bar-tag-icon:focus-visible{box-shadow:none;outline-offset:2px;outline:1px solid}::slotted([slot=nav-logo]){max-height:var(--nav-logo-max-height,60px);object-fit:contain;width:auto;padding:16px 16px 0}.nav-scroll{overflow:hidden auto;overflow-y:overlay;scrollbar-width:thin;scrollbar-color:var(--muted) transparent;scroll-padding-top:60px;container-type:scroll-state}.nav-bar-tag{flex-direction:row;justify-content:space-between;align-items:center;display:flex}.nav-bar.read .nav-bar-tag-icon{display:none}.nav-bar-paths-under-tag{transition:max-height .2s ease-out,visibility .3s;overflow:hidden}.collapsed .nav-bar-paths-under-tag{visibility:hidden;max-height:0}.nav-bar-expand-all{cursor:pointer;margin-inline-end:10px;transform:rotate(90deg)}.nav-bar-collapse-all{cursor:pointer;transform:rotate(270deg)}.nav-bar-expand-all:hover,.nav-bar-collapse-all:hover{color:var(--primary)}.nav-bar-tag-icon{color:var(--muted-foreground);font-size:20px}.nav-bar-tag-icon:hover{color:var(--foreground)}.nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon:after{content:"⌵";text-align:center;width:16px;height:16px;transition:transform .2s ease-out;display:inline-block;transform:rotate(-90deg)}.nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon:after{content:"⌵";text-align:center;width:16px;height:16px;transition:transform .2s ease-out;display:inline-block}.nav-scroll::-webkit-scrollbar{width:8px}.nav-scroll::-webkit-scrollbar-track{background:0 0}.nav-scroll::-webkit-scrollbar-thumb{background:var(--muted)}.nav-bar-tag{font-size:var(--font-size-regular);color:var(--primary);text-transform:capitalize;border-inline-start:4px solid #0000;padding:15px 15px 15px 10px;font-weight:700}.nav-bar-components,.nav-bar-h1,.nav-bar-h2,.nav-bar-info,.nav-bar-tag,.nav-bar-path{cursor:pointer;width:100%;color:var(--muted-foreground);background:0 0;border:none;border-inline-start:4px solid #0000;transition:background .15s,color .15s;display:flex}.nav-bar-path-inner{pointer-events:none;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.nav-bar-path-label{overflow-wrap:break-word;word-break:break-word;flex:1;align-items:baseline;min-width:0;display:flex}.nav-bar-webhook{font-weight:700;font-size:calc(var(--font-size-small) - 2px);flex-shrink:0;margin-right:8px}.nav-bar-h1,.nav-bar-h2,.nav-bar-path{font-size:calc(var(--font-size-small) + 1px);padding:var(--nav-item-padding)}.nav-bar-path.small-font{font-size:var(--font-size-small)}.nav-bar-info{font-size:var(--font-size-regular);padding:16px 10px;font-weight:700}.nav-bar-section{font-size:var(--font-size-small);color:var(--muted-foreground);padding:var(--nav-item-padding);flex-direction:row;justify-content:space-between;font-weight:700;display:flex}.nav-bar-section.operations{cursor:pointer;transition:background .15s,color .15s}.nav-bar-section.operations:hover{color:var(--nav-hover-fg,var(--foreground));background:var(--nav-hover-bg,var(--muted))}.nav-bar-section:first-child{display:none}.nav-bar-h2{padding-inline-start:28px}.nav-bar-h1.left-bar.active,.nav-bar-h2.left-bar.active,.nav-bar-info.left-bar.active,.nav-bar-tag.left-bar.active,.nav-bar-path.left-bar.active,.nav-bar-section.left-bar.operations.active{border-inline-start:4px solid var(--primary);color:var(--nav-accent-fg,var(--primary))}.nav-bar-h1.left-bar.active:hover,.nav-bar-h2.left-bar.active:hover,.nav-bar-info.left-bar.active:hover,.nav-bar-tag.left-bar.active:hover,.nav-bar-path.left-bar.active:hover,.nav-bar-section.left-bar.operations.active:hover{color:var(--nav-accent-fg,var(--primary))}.nav-bar-h1.colored-block.active,.nav-bar-h2.colored-block.active,.nav-bar-info.colored-block.active,.nav-bar-tag.colored-block.active,.nav-bar-path.colored-block.active,.nav-bar-section.colored-block.operations.active,.nav-bar-h1.colored-block.active:hover,.nav-bar-h2.colored-block.active:hover,.nav-bar-info.colored-block.active:hover,.nav-bar-tag.colored-block.active:hover,.nav-bar-path.colored-block.active:hover,.nav-bar-section.colored-block.operations.active:hover{background:var(--primary);color:var(--primary-foreground)}.nav-bar-h1:hover,.nav-bar-h2:hover,.nav-bar-info:hover,.nav-bar-tag:hover,.nav-bar-path:hover{color:var(--nav-hover-fg,var(--foreground));background:var(--nav-hover-bg,var(--muted))}`,An=B`#api-info{font-size:calc(var(--font-size-regular) - 1px);margin-top:8px}#api-info span:before{content:"|";opacity:.5;text-align:center;width:15px;display:inline-block}#api-info span:first-child:before{content:"";width:0}`,Xe=B``,mc=B`*,:before,:after{box-sizing:border-box}.dialog-box{background:var(--card);color:var(--card-foreground);border-radius:var(--card-radius);border:1px solid var(--border);width:70vw;max-width:70vw;height:70vh;max-height:70vh;padding:0;position:absolute;top:100px;overflow:hidden;box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.dialog-box-header{z-index:10;backdrop-filter:blur(12px);border-bottom:1px solid var(--border);border-top-left-radius:var(--card-radius);border-top-right-radius:var(--card-radius);align-self:stretch;align-items:center;min-height:60px;max-height:60px;padding:0 16px;display:flex;position:sticky;top:0;overflow:hidden}.dialog-box-header button{color:var(--foreground);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:50%;outline:none;margin-inline-end:-8px;font-size:1.5rem;font-weight:700;line-height:1}.dialog-box-header button:hover{border-color:var(--primary)}.dialog-box-content{height:100%;padding:1rem;display:block;overflow:auto}.dialog-box-title{flex-grow:1;font-size:24px}`,Dn=["amber","blue","emerald","violet","graphite","rose","slate"];function Cn(e){return!e||typeof e!="string"?!1:/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.trim())}function pa(e){if(!e||typeof e!="string")return{theme:"amber"};let t=e.trim(),a=t.toLowerCase();return Dn.includes(a)?{theme:a}:Cn(t)?{theme:t}:{theme:"amber"}}function fc(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(a=>a+a).join("")),t.length===6||t.length===8){let a=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return(a*299+r*587+s*114)/1e3>=128}return!1}function ua(e,t){if(!e||!e.style)return;if(!t||Dn.includes(t.trim().toLowerCase())||!Cn(t)){e.style.removeProperty("--primary"),e.style.removeProperty("--ring"),e.style.removeProperty("--primary-foreground");return}let a=t.trim();e.style.setProperty("--primary",a),e.style.setProperty("--ring",a);let r=fc(a)?"#000000":"#ffffff";e.style.setProperty("--primary-foreground",r)}var Tn=B`:host{--font-mono:"Roboto Mono", Monaco, "Andale Mono", Consolas, monospace;--font-regular:var(--font-sans,"Open Sans", "Segoe UI", Tahoma, Arial, sans-serif);--radius:.25rem;--card-radius:4px;--border-radius:var(--radius);--ui-base-size:14px;--font-size-small:12px;--font-size-mono:13px;--font-size-regular:14px;--nav-width:18.75rem;--nav-item-padding:.4375rem 1rem .4375rem .625rem;--nav-logo-max-height:60px;--resp-area-height:400px;--layout:row;--table-schema-key-width:240px;--table-schema-key-text-overflow:ellipsis;--table-schema-key-whitespace:nowrap;--scroll-bar-width:8px;--focus-shadow:0 0 0 1px transparent, 0 0 0 2px color-mix(in srgb, var(--ring) 40%, transparent);--selection-bg:color-mix(in srgb, var(--primary) 25%, transparent);--selection-fg:var(--foreground);--nav-accent-fg:var(--primary)}:host([radius=none]){--radius:0px;--card-radius:0px}:host([radius=sm]),:host(:not([radius])){--radius:.25rem;--card-radius:4px}:host([radius=md]){--radius:.375rem;--card-radius:6px}:host([radius=lg]){--radius:.5rem;--card-radius:8px}:host([radius=full]){--radius:9999px;--card-radius:8px}:host([scale=sm]){--ui-base-size:13px;--font-size-small:11px;--font-size-mono:12px;--font-size-regular:13px;--nav-width:17rem}:host([scale=default]),:host(:not([scale])){--ui-base-size:14px;--font-size-small:12px;--font-size-mono:13px;--font-size-regular:14px;--nav-width:18.75rem}:host([scale=lg]){--ui-base-size:16px;--font-size-small:14px;--font-size-mono:15px;--font-size-regular:16px;--nav-width:21rem}:host([nav-item-spacing=compact]){--nav-item-padding:.3125rem 1rem .3125rem .625rem}:host([nav-item-spacing=default]),:host(:not([nav-item-spacing])){--nav-item-padding:.4375rem 1rem .4375rem .625rem}:host([nav-item-spacing=relaxed]){--nav-item-padding:.625rem 1rem .625rem .625rem}:host,:host([color-scheme=dark]),:host([color-scheme=system]),:host(:not([color-scheme])){--background:var(--_preset-bg,#09090b);--foreground:var(--_preset-fg,#fafafa);--card:var(--_preset-card,#18181b);--card-foreground:var(--_preset-card-fg,#fafafa);--muted:var(--_preset-muted,#27272a);--muted-foreground:#a1a1aa;--border:var(--_preset-border,#27272a);--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 75%, #000);--input-border:color-mix(in srgb, var(--border) 60%, var(--background));--input:var(--input-background);--method-get:#5c98f9;--method-post:#68cc97;--method-put:#f59e0b;--method-delete:#f75252;--method-patch:#8b5cf6;--method-head:#eab308;--method-options:#06b6d4;--method-trace:#ec4899;--method-query:#818cf8;--method-default:#64748b;--method-badge-fg:#000;--blue:#3b82f6;--green:#10b981;--orange:#f59e0b;--red:#ef4444;--purple:#8b5cf6;--yellow:#eab308;--pink:#ec4899;--brown:#d97706;--syntax-comment:#8b949e;--syntax-keyword:#ff7b72;--syntax-operator:#c9d1d9;--syntax-string:#a5d6ff;--syntax-constant:#79c0ff;--syntax-function:#d2a8ff;--syntax-type:#d2a8ff;--syntax-variable:#ffa657;--syntax-property:#79c0ff;--syntax-tag:#7ee787;--syntax-selector:#d2a8ff;--syntax-inserted:#7ee787;--syntax-deleted:#ff7b72;--code-bg:var(--input-background);--code-fg:var(--foreground);--inline-code-fg:#c4c6d1;--inline-code-bg:#3b3c45;--markdown-fg:#c4c6d1;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}:host([color-scheme=light]){--background:#fff;--foreground:#09090b;--card:#f4f4f5;--card-foreground:#09090b;--muted:#f4f4f5;--muted-foreground:#71717a;--border:#e4e4e7;--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 94%, var(--foreground));--input-border:color-mix(in srgb, var(--border) 80%, var(--foreground));--input:var(--input-background);--method-get:#2563eb;--method-post:#059669;--method-put:#c2410c;--method-delete:#dc2626;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#db2777;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:var(--input-background);--code-fg:var(--foreground);--inline-code-fg:#334155;--inline-code-bg:#e2e8f0;--markdown-fg:#475569;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}@media (prefers-color-scheme:light){:host([color-scheme=system]){--background:#fff;--foreground:#09090b;--card:#f4f4f5;--card-foreground:#09090b;--muted:#f4f4f5;--muted-foreground:#71717a;--border:#e4e4e7;--nav-hover-bg:oklch(from var(--background) calc(l - .04) c h);--nav-hover-fg:var(--foreground);--input-background:color-mix(in srgb, var(--background) 94%, var(--foreground));--input-border:color-mix(in srgb, var(--border) 80%, var(--foreground));--input:var(--input-background);--method-get:#2563eb;--method-post:#059669;--method-put:#c2410c;--method-delete:#dc2626;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#db2777;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:var(--input-background);--code-fg:var(--foreground);--inline-code-fg:#334155;--inline-code-bg:#e2e8f0;--markdown-fg:#475569;--code-property-color:var(--syntax-property);--code-keyword-color:var(--syntax-keyword);--code-operator-color:var(--syntax-operator)}}:host,:host([theme=amber]),:host(:not([theme])){--primary:#f76b39;--primary-foreground:#000;--foreground:#ccc;--ring:#f76b39;--_preset-bg:oklch(26.13% .0134 272.84);--_preset-card:oklch(26.13% .0134 272.84);--_preset-border:#363636}:host([theme=amber][color-scheme=light]),:host(:not([theme])[color-scheme=light]){--primary:#f76b39;--primary-foreground:#000;--foreground:#555;--ring:#d97706}:host([theme=blue]){--primary:#488bf8;--primary-foreground:#fff;--ring:#488bf8;--_preset-bg:#1c1b1b;--_preset-fg:#e5e5e5;--_preset-border:#414146}:host([theme=blue][color-scheme=light]){--primary:#2563eb;--primary-foreground:#fff;--ring:#2563eb}:host([theme=emerald]){--primary:#03bf80;--primary-foreground:#0f331d;--ring:#03bf80;--_preset-bg:#060913;--_preset-fg:#e2e8f0;--_preset-card:#0f172a;--_preset-card-fg:#f8fafc;--_preset-muted:#111827;--_preset-border:#242c29}:host([theme=emerald][color-scheme=light]){--primary:#059669;--primary-foreground:#fff;--ring:#059669}:host([theme=violet]){--primary:#8b5cf6;--primary-foreground:#fff;--ring:#8b5cf6;--_preset-bg:#130e20;--_preset-fg:#f5f3ff;--_preset-card:#1e1633;--_preset-card-fg:#f5f3ff;--_preset-muted:#19122b;--_preset-border:#342854}:host([theme=violet][color-scheme=light]){--primary:#7c3aed;--primary-foreground:#fff;--ring:#7c3aed}:host([theme=graphite]){--primary:#fafafa;--primary-foreground:#18181b;--ring:#d4d4d8}:host([theme=graphite][color-scheme=light]){--primary:#18181b;--primary-foreground:#fafafa;--foreground:#111;--muted-foreground:#222;--ring:#27272a}:host([theme=rose]){--primary:#ee5d7c;--ring:#ee5d7c;--_preset-bg:oklch(26.13% .0134 272.84);--_preset-card:oklch(26.13% .0134 272.84)}:host([theme=rose][color-scheme=light]){--primary:#e11d48;--primary-foreground:#fff;--ring:#e11d48}:host([theme=slate]){--primary:#64748b;--primary-foreground:#fff;--nav-accent-fg:#fff;--ring:#64748b}:host([theme=slate][color-scheme=light]){--primary:#475569;--primary-foreground:#fff;--ring:#475569}@media (prefers-color-scheme:light){:host([theme=amber][color-scheme=system]),:host(:not([theme])[color-scheme=system]){--primary:#d97706;--primary-foreground:#fff;--ring:#d97706}:host([theme=blue][color-scheme=system]){--primary:#2563eb;--primary-foreground:#fff;--ring:#2563eb}:host([theme=emerald][color-scheme=system]){--primary:#059669;--primary-foreground:#fff;--ring:#059669}:host([theme=violet][color-scheme=system]){--primary:#7c3aed;--primary-foreground:#fff;--ring:#7c3aed}:host([theme=graphite][color-scheme=system]){--primary:#18181b;--primary-foreground:#fafafa;--ring:#27272a}:host([theme=rose][color-scheme=system]){--primary:#e11d48;--primary-foreground:#fff;--ring:#e11d48}:host([theme=slate][color-scheme=system]){--primary:#475569;--primary-foreground:#fff;--ring:#475569}}`,ha=/[\s#:?&={}]/g,Ft="_rapidoc_api_key";function ma(e){return new Promise(t=>setTimeout(t,e))}function Ot(e,t){let a=t.target,r=document.createElement("textarea");r.value=e,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy"),a.innerText="Copied",setTimeout(()=>{a.innerText="Copy"},5e3)}catch{}document.body.removeChild(r)}function yc(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}function _t(e,t,a=""){return`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${a}`.toLowerCase().includes(e.toLowerCase())}function kr(e,t=new Set){return e&&Object.keys(e).forEach(a=>{t.add(a),e[a].properties?kr(e[a].properties,t):e[a].items?.properties&&kr(e[a].items?.properties,t)}),t}function gc(e,t,a=[]){if(!e.trim()||a.length===0)return;let r=[];return t.forEach(s=>{s.paths.forEach(n=>{let i="";if(a.includes("search-api-path")&&(i=n.path),a.includes("search-api-descr")&&(i=`${i} ${(n.summary||"")+(n.description||"")}`),a.includes("search-api-params")&&(i=`${i} ${n.parameters?.map(o=>o.name).join(" ")||""}`),a.includes("search-api-request-body")&&n.requestBody){let o=new Set;for(let l in n.requestBody?.content)n.requestBody.content[l].schema?.properties&&(o=kr(n.requestBody.content[l].schema?.properties)),i=`${i} ${[...o].join(" ")}`}a.includes("search-api-resp-descr")&&(i=`${i} ${Object.values(n.responses).map(o=>o.description||"").join(" ")}`),i.toLowerCase().includes(e.trim().toLowerCase())&&r.push({elementId:n.elementId,method:n.method,path:n.path,summary:n.summary||n.description||"",deprecated:n.deprecated})})}),r}function Fn(e,t){if(e){let a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=e,a.download=t,a.click(),a.remove()}}function On(e){if(e){let t=document.createElement("a");document.body.appendChild(t),t.style="display: none",t.href=e,t.target="_blank",t.click(),t.remove()}}var P=e=>{if(typeof e!="object"||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},ne=e=>typeof e=="object"&&!!e;function Le(e,t,a=[]){let r={};for(let[s,n]of Object.entries(e)){let i=[...a,s];if(Array.isArray(n)){r[s]=n.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?Le(o,t,[...i,l.toString()]):o);continue}if(ne(n)){r[s]=Le(n,t,i);continue}r[s]=n}return t(r,a)}var Ee="application/json";function _n(e){let t=e["x-example"],a=e["x-examples"];return delete e["x-example"],delete e["x-examples"],{xExample:t,xExamples:a}}function Be(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Object.keys(e).length>0}function bc(e){return Be(e)&&Object.values(e).every(t=>typeof t=="object"&&!!t&&!Array.isArray(t))}function vc(e){if(!ne(e))return!0;let t=e;return!(t.allOf||t.oneOf||t.anyOf||t.items||t.$ref||"additionalProperties"in t||["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"].some(a=>a in t)||typeof t.properties=="object"&&t.properties!==null&&Object.keys(t.properties).length>0)}function jn(e){let t=Object.keys(e);if(t.some(a=>{let r=e[a];return ne(r)&&(r.example!==void 0||r.examples!==void 0)}))for(let a of t){let r=e[a];if(!ne(r))continue;let s=r.example!==void 0||r.examples!==void 0;r.schema!==void 0&&!s&&Object.keys(r).length===1&&vc(r.schema)&&delete e[a]}}var xc=new Set(["summary","description","value","externalValue"]);function Rn(e){if(typeof e!="object"||!e)return!1;let t=e,a="value"in t||"externalValue"in t,r=Object.keys(t).every(s=>xc.has(s));return a&&r}function Ye(e){return Rn(e)?e:{value:e}}var wc=/^[a-zA-Z0-9*+.-]+\/[a-zA-Z0-9*+.+-]+$/;function $r(e){return wc.test(e)}function kc(e){return Object.entries(e).reduce((t,[a,r])=>(t[a]={value:r},t),{})}var $c=e=>{switch(e){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return e}};function Nn(e){let t=e;if(typeof t=="object"&&t&&typeof t.swagger=="string"&&t.swagger?.startsWith("2.0"))t.openapi="3.0.4",delete t.swagger;else return t;if(t.host){let a=Array.isArray(t.schemes)&&t.schemes?.length?t.schemes:["http"];t.servers=a.map(r=>({url:`${r}://${t.host}${t.basePath??""}`})),delete t.basePath,delete t.schemes,delete t.host}else t.basePath&&(t.servers=[{url:t.basePath}],delete t.basePath);if(t.definitions){for(let a of Object.values(t.definitions))ve(a);t.components=Object.assign({},t.components,{schemas:t.definitions}),delete t.definitions,t=Le(t,a=>(typeof a.$ref=="string"&&a.$ref.startsWith("#/definitions/")&&(a.$ref=a.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),a))}if(t=Le(t,a=>(a.type==="file"&&(a.type="string",a.format="binary"),a)),Object.hasOwn(t,"parameters")){t=Le(t,n=>{if(typeof n.$ref=="string"&&n.$ref.startsWith("#/parameters/")){let i=n.$ref.split("/")[2];if(!i)return n;let o=ne(t.parameters)&&i in t.parameters?t.parameters[i]:void 0;n.$ref=o&&typeof o=="object"&&"in"in o&&(o.in==="body"||o.in==="formData")?n.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):n.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return n}),t.components??={};let a={},r={},s=ne(t.parameters)?t.parameters:{};for(let[n,i]of Object.entries(s))i&&typeof i=="object"&&("$ref"in i?a[n]=Er(i):"in"in i&&(i.in==="body"?r[n]=In(i,t.consumes??[Ee]):i.in==="formData"?r[n]=zn([i],t.consumes):a[n]=Er(i)));Object.keys(a).length>0&&(t.components.parameters=a),Object.keys(r).length>0&&(t.components.requestBodies=r),delete t.parameters}if(Object.hasOwn(t,"responses")&&typeof t.responses=="object"&&t.responses!==null){t=Le(t,s=>(typeof s.$ref=="string"&&s.$ref.startsWith("#/responses/")&&(s.$ref=s.$ref.replace(/^#\/responses\//,"#/components/responses/")),s)),t.components??={};let a={},r=t.responses;for(let[s,n]of Object.entries(r))if(ne(n))if("$ref"in n)a[s]=n;else{let i=n,o=t.produces??[Ee];if(i.schema){ve(i.schema),typeof i.content!="object"&&(i.content={});for(let l of o)i.content[l]={schema:i.schema};delete i.schema}if(i.examples&&typeof i.examples=="object"){typeof i.content!="object"&&(i.content={});let l=o[0]??Ee;for(let[c,d]of Object.entries(i.examples))if($r(c))typeof i.content[c]!="object"&&(i.content[c]={}),i.content[c].example=d;else{typeof i.content[l]!="object"&&(i.content[l]={});let u=i.content[l];typeof u.examples!="object"&&(u.examples={}),u.examples[c]=Ye(d)}delete i.examples}i.content&&typeof i.content=="object"&&jn(i.content),ne(i.headers)&&(i.headers=Object.entries(i.headers).reduce((l,[c,d])=>d&&typeof d=="object"?{[c]:qn(d),...l}:l,{})),a[s]=i}Object.keys(a).length>0&&(t.components.responses=a),delete t.responses}if(typeof t.paths=="object"){for(let a in t.paths)if(Object.hasOwn(t.paths,a)){let r=ne(t.paths)&&a in t.paths?t.paths[a]:void 0;if(!r||typeof r!="object")continue;let s;for(let n in r)if(n==="parameters"&&Object.hasOwn(r,n)){let i=Pn(r.parameters,t.consumes??[Ee]);r.parameters=i.parameters,s=i.requestBody}else if(Object.hasOwn(r,n)){let i=r[n];if(s&&(i.requestBody=s),i.parameters){let o=Pn(i.parameters,i.consumes??t.consumes??[Ee]);i.parameters=o.parameters,o.requestBody&&(i.requestBody=o.requestBody)}if(delete i.consumes,i.responses){for(let o in i.responses)if(Object.hasOwn(i.responses,o)){let l=i.responses[o];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((c,[d,u])=>u&&typeof u=="object"?{[d]:qn(u),...c}:c,{})),l.schema){ve(l.schema);let c=t.produces??i.produces??[Ee];typeof l.content!="object"&&(l.content={});for(let d of c)l.content[d]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});let c=(t.produces??i.produces??[Ee])[0]??Ee;for(let[d,u]of Object.entries(l.examples))if($r(d))typeof l.content[d]!="object"&&(l.content[d]={}),l.content[d].example=u;else{typeof l.content[c]!="object"&&(l.content[c]={});let h=l.content[c];typeof h.examples!="object"&&(h.examples={}),h.examples[d]=Ye(u)}delete l.examples}l.content&&typeof l.content=="object"&&jn(l.content)}}delete i.produces,i.parameters?.length===0&&delete i.parameters}}}if(t.securityDefinitions){(typeof t.components!="object"||t.components===null)&&(t.components={}),t.components&&typeof t.components=="object"&&Object.assign(t.components,{securitySchemes:{}});for(let[a,r]of Object.entries(t.securityDefinitions))if(typeof r=="object")if("type"in r&&r.type==="oauth2"){let{flow:s,authorizationUrl:n,tokenUrl:i,scopes:o}=r;t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:{type:"oauth2",flows:{[$c(s||"implicit")]:Object.assign({},n&&{authorizationUrl:n},i&&{tokenUrl:i},o&&{scopes:o})}}})}else"type"in r&&r.type==="basic"?t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:{type:"http",scheme:"basic"}}):t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[a]:r});delete t.securityDefinitions}return delete t.consumes,delete t.produces,t}var ve=e=>{if(ne(e)){if(typeof e["x-nullable"]=="boolean"&&(e["x-nullable"]&&(e.nullable=!0),delete e["x-nullable"]),ne(e.properties))for(let t of Object.values(e.properties))ve(t);if(ve(e.items),ve(e.additionalProperties),Array.isArray(e.allOf))for(let t of e.allOf)ve(t)}};function Sr(e){let t=["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf","x-nullable"].reduce((a,r)=>(Object.hasOwn(e,r)&&(a[r]=e[r],delete e[r]),a),{});return ve(t),t}function Sc(e){if(e==="formData")throw Error("Encountered a formData parameter which should have been filtered out by the caller");if(e==="body")throw Error("Encountered a body parameter which should have been filtered out by the caller");return e}function Er(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Ec(e),a=Sr(e),{xExample:r,xExamples:s}=_n(e);if(Be(r)?e.examples=kc(r):Be(s)&&(e.examples=Object.entries(s).reduce((n,[i,o])=>(n[i]=Ye(o),n),{})),delete e.collectionFormat,delete e.default,!e.in)throw Error('Parameter object must have an "in" property');return{schema:a,...t,...e,in:Sc(e.in)}}function qn(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Sr(e);return{...e,schema:t}}var Ln={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Bn={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},Ar={header:Bn,query:Ln,path:Bn};function Ec(e){if(e.type!=="array"||e.in!=="query"&&e.in!=="path"&&e.in!=="header")return{};let t=e.collectionFormat??"csv";return e.in in Ar&&t in Ar[e.in]?Ar[e.in][t]:{}}function Ac(e){if(e.type!=="array"||typeof e.collectionFormat!="string")return;let t=Ln[e.collectionFormat];if(t&&Object.keys(t).length!==0)return t}function In(e,t){let{xExample:a,xExamples:r}=_n(e);delete e.name,delete e.in;let{schema:s,...n}=e;ve(s);let i={content:{},...n};if(i.content)for(let o of t){if(i.content[o]={schema:s},Be(r)&&o in r){let l=r[o];Be(l)&&Object.values(l).every(c=>Rn(c))?i.content[o].examples=l:bc(l)?i.content[o].examples=Object.entries(l).reduce((c,[d,u])=>(c[d]=Ye(u),c),{}):i.content[o].examples={default:Ye(l)}}else Be(r)&&!Object.keys(r).some($r)&&(i.content[o].examples=Object.entries(r).reduce((l,[c,d])=>(l[c]=Ye(d),l),{}));!i.content[o].examples&&Be(a)&&o in a&&(i.content[o].example=a[o])}return i}function zn(e,t=["multipart/form-data"]){let a={content:{}},r=t.filter(n=>n==="multipart/form-data"||n==="application/x-www-form-urlencoded"),s=r.length>0?r:["multipart/form-data"];if(a.content)for(let n of s){a.content[n]={schema:{type:"object",properties:{},required:[]}};let i=a.content?.[n];if(i?.schema&&typeof i.schema=="object"&&"properties"in i.schema){for(let o of e)if(o.name&&i.schema.properties){i.schema.properties[o.name]={...Sr(structuredClone(o)),...o.description===void 0?{}:{description:o.description}};let l=Ac(o);l&&(i.encoding??={},i.encoding[o.name]=l),o.required&&Array.isArray(i.schema.required)&&i.schema.required.push(o.name)}}}return a}function Pn(e,t){let a={parameters:e.filter(n=>n.in!=="body"&&n.in!=="formData").map(n=>Er(n))},r=structuredClone(e.find(n=>n.in==="body")??{});r&&Object.keys(r).length&&(a.requestBody=In(r,t));let s=e.filter(n=>n.in==="formData");if(s.length>0){let n=zn(s,t);a.requestBody=typeof a.requestBody=="object"?{...a.requestBody,content:{...a.requestBody.content,...n.content}}:n,typeof a.requestBody!="object"&&(a.requestBody={content:{}})}return a}var Dc=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema","schemas"]),Cc=new Set(["paths","webhooks","responses","content","headers","examples","links","encoding","variables","parameters","requestBodies","securitySchemes","pathItems","scopes"]),Tc=e=>{if(!e)return!1;let t=e[0]==="x-ext"&&e[1]!==void 0?e.slice(2):e,a=0;for(let r of t){if(a>0){a--;continue}if(Dc.has(r)||r.endsWith("Schema"))return!0;if(r==="callbacks"){a=2;continue}Cc.has(r)&&(a=1)}return!1},Fc=new Set(["properties","patternProperties","$defs","definitions"]);function fa(e){let t=e?.[e.length-1];return t===void 0?!1:t==="schemas"&&e?.[e.length-2]==="components"||Fc.has(t)}var Oc=new Set(["example","default","const","enum"]);function _c(e){if(!e)return!1;for(let[t,a]of e.entries())if(Oc.has(a)&&!fa(e.slice(0,t))||a==="value"&&e[t-2]==="examples"&&!fa(e.slice(0,t-2)))return!0;return!1}function Un(e){let t=e;return t===null||typeof t.openapi!="string"||!t.openapi.startsWith("3.0")||(t.openapi="3.1.1",t=Le(t,jc)),t}var jc=(e,t)=>{if(_c(t))return e;if(e.type!==void 0&&e.nullable===!0)e.type=[e.type,"null"],delete e.nullable;else if(e.nullable===!0&&e.type===void 0){if(typeof e.$ref=="string"){let{nullable:n,$ref:i,...o}=e;return{...o,anyOf:[{$ref:i},{type:"null"}]}}if(Array.isArray(e.allOf)){let{nullable:n,allOf:i,...o}=e,l=i.length===1?i[0]:{allOf:i};return{...o,anyOf:[l,{type:"null"}]}}}e.exclusiveMinimum===!0&&e.minimum!==void 0?(e.exclusiveMinimum=e.minimum,delete e.minimum):typeof e.exclusiveMinimum=="boolean"&&delete e.exclusiveMinimum,e.exclusiveMaximum===!0&&e.maximum!==void 0?(e.exclusiveMaximum=e.maximum,delete e.maximum):typeof e.exclusiveMaximum=="boolean"&&delete e.exclusiveMaximum;let a=t?.some((n,i)=>n==="examples"&&i>0&&!fa(t.slice(0,i)));e.example!==void 0&&!a&&!fa(t)&&(e.examples=Tc(t)?[e.example]:{default:{value:e.example}},delete e.example);let{format:r,...s}=e;if(e.type==="string"||Array.isArray(e.type)&&e.type.includes("string")){if(e.format==="binary"){let{type:n,...i}=s;return t?.at(-1)==="schema"&&t.at(-3)==="content"?i:{contentMediaType:"application/octet-stream",...i}}if(e.format==="base64"||e.format==="byte")return{...s,contentEncoding:"base64"}}return e["x-webhooks"]!==void 0&&(t===void 0||t.length===0)&&(e.webhooks=e["x-webhooks"],delete e["x-webhooks"]),e},Rc=["2.0","3.0","3.1","3.2"],ie={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function Mn(e){if(e===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(P(e))for(let t of new Set(Rc)){let a=t==="2.0"?"swagger":"openapi",r=e[a];if(typeof r!="string")continue;let[s,n]=r.split(".");if(`${s}.${n}`===t)return{version:t,specificationType:a,specificationVersion:r}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function Ie(e){return e?.find(t=>t.isEntrypoint)}function Dr(e,t,a=[]){let r={};for(let[s,n]of Object.entries(e)){let i=[...a,s];if(Array.isArray(n)){r[s]=n.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?Dr(o,t,[...i,l.toString()]):o);continue}if(typeof n=="object"&&n){r[s]=Dr(n,t,i);continue}r[s]=n}return t(r,a)}function Hn(e){let t=[];return!e||typeof e!="object"?t:(Dr(e,a=>(a.$ref&&typeof a.$ref=="string"&&!a.$ref.startsWith("#")&&t.push(a.$ref.split("#")[0]),a)),[...new Set(t)])}function Cr(e){return e!==void 0&&Array.isArray(e)&&e.length>0&&e.some(t=>t.isEntrypoint===!0)}var Tr=Symbol.for("yaml.alias"),Fr=Symbol.for("yaml.document"),Ae=Symbol.for("yaml.map"),Wn=Symbol.for("yaml.pair"),ye=Symbol.for("yaml.scalar"),Qe=Symbol.for("yaml.seq"),oe=Symbol.for("yaml.node.type"),et=e=>!!e&&typeof e=="object"&&e[oe]===Tr,ya=e=>!!e&&typeof e=="object"&&e[oe]===Fr,jt=e=>!!e&&typeof e=="object"&&e[oe]===Ae,U=e=>!!e&&typeof e=="object"&&e[oe]===Wn,R=e=>!!e&&typeof e=="object"&&e[oe]===ye,Rt=e=>!!e&&typeof e=="object"&&e[oe]===Qe;function M(e){if(e&&typeof e=="object")switch(e[oe]){case Ae:case Qe:return!0}return!1}function H(e){if(e&&typeof e=="object")switch(e[oe]){case Tr:case Ae:case ye:case Qe:return!0}return!1}var Vn=e=>(R(e)||M(e))&&!!e.anchor,ze=Symbol("break visit"),Nc=Symbol("skip children"),Nt=Symbol("remove node");function tt(e,t){let a=qc(t);ya(e)?at(null,e.contents,a,Object.freeze([e]))===Nt&&(e.contents=null):at(null,e,a,Object.freeze([]))}tt.BREAK=ze,tt.SKIP=Nc,tt.REMOVE=Nt;function at(e,t,a,r){let s=Lc(e,t,a,r);if(H(s)||U(s))return Bc(e,r,s),at(e,s,a,r);if(typeof s!="symbol"){if(M(t)){r=Object.freeze(r.concat(t));for(let n=0;n<t.items.length;++n){let i=at(n,t.items[n],a,r);if(typeof i=="number")n=i-1;else{if(i===ze)return ze;i===Nt&&(t.items.splice(n,1),--n)}}}else if(U(t)){r=Object.freeze(r.concat(t));let n=at("key",t.key,a,r);if(n===ze)return ze;n===Nt&&(t.key=null);let i=at("value",t.value,a,r);if(i===ze)return ze;i===Nt&&(t.value=null)}}return s}function qc(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Lc(e,t,a,r){if(typeof a=="function")return a(e,t,r);if(jt(t))return a.Map?.(e,t,r);if(Rt(t))return a.Seq?.(e,t,r);if(U(t))return a.Pair?.(e,t,r);if(R(t))return a.Scalar?.(e,t,r);if(et(t))return a.Alias?.(e,t,r)}function Bc(e,t,a){let r=t[t.length-1];if(M(r))r.items[e]=a;else if(U(r))e==="key"?r.key=a:r.value=a;else if(ya(r))r.contents=a;else{let s=et(r)?"alias":"scalar";throw Error(`Cannot replace node with ${s} parent`)}}var Ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},zc=e=>e.replace(/[!,[\]{}]/g,t=>Ic[t]),rt=class $e{constructor(t,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},$e.defaultYaml,t),this.tags=Object.assign({},$e.defaultTags,a)}clone(){let t=new $e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new $e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:$e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},$e.defaultTags)}return t}add(t,a){this.atNextDocument&&=(this.yaml={explicit:$e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},$e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[n,i]=r;return this.tags[n]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;let[n]=r;if(n==="1.1"||n==="1.2")return this.yaml.version=n,!0;{let i=/^\d+\.\d+$/.test(n);return a(6,`Unsupported YAML version ${n}`,i),!1}}default:return a(0,`Unknown directive ${s}`,!0),!1}}tagName(t,a){if(t==="!")return"!";if(t[0]!=="!")return a(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let i=t.slice(2,-1);return i==="!"||i==="!!"?(a(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&a("Verbatim tags must end with a >"),i)}let[,r,s]=t.match(/^(.*!)([^!]*)$/s);s||a(`The ${t} tag has no suffix`);let n=this.tags[r];if(n)try{return n+decodeURIComponent(s)}catch(i){return a(String(i)),null}return r==="!"?t:(a(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[a,r]of Object.entries(this.tags))if(t.startsWith(r))return a+zc(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(t&&r.length>0&&H(t.contents)){let n={};tt(t.contents,(i,o)=>{H(o)&&o.tag&&(n[o.tag]=!0)}),s=Object.keys(n)}else s=[];for(let[n,i]of r)(n!=="!!"||i!=="tag:yaml.org,2002:")&&(!t||s.some(o=>o.startsWith(i)))&&a.push(`%TAG ${n} ${i}`);return a.join(`
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
79
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${oe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:a,autolink:s}){let n=s?oe(r,!0):this.parser.parseInline(a),i=Yn(e);if(i===null)return n;e=oe(i,s);let o='<a href="'+e+'"';return t&&(o+=' title="'+oe(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let s=Yn(e);if(s===null)return oe(r);e=s;let n=`<img src="${oe(e)}" alt="${oe(r)}"`;return t&&(n+=` title="${oe(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:oe(e.text)}},Va=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return""}checkbox({raw:e}){return e}},ye=class fn{options;renderer;textRenderer;constructor(t){this.options=t||He,this.options.renderer=this.options.renderer||new Tr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Va,this.textRenderer.parser=this}static parse(t,r){return new fn(r).parse(t)}static parseInline(t,r){return new fn(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let i=s,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(i.type)){r+=o||"";continue}}let n=s;switch(n.type){case"space":r+=this.renderer.space(n);break;case"hr":r+=this.renderer.hr(n);break;case"heading":r+=this.renderer.heading(n);break;case"code":r+=this.renderer.code(n);break;case"table":r+=this.renderer.table(n);break;case"blockquote":r+=this.renderer.blockquote(n);break;case"list":r+=this.renderer.list(n);break;case"checkbox":r+=this.renderer.checkbox(n);break;case"html":r+=this.renderer.html(n);break;case"def":r+=this.renderer.def(n);break;case"paragraph":r+=this.renderer.paragraph(n);break;case"text":r+=this.renderer.text(n);break;default:{let i='Token with "'+n.type+'" type was not found.';if(this.options.silent)return"";throw Error(i)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let a="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){a+=o||"";continue}}let i=n;switch(i.type){case"escape":a+=r.text(i);break;case"html":a+=r.html(i);break;case"link":a+=r.link(i);break;case"image":a+=r.image(i);break;case"checkbox":a+=r.checkbox(i);break;case"strong":a+=r.strong(i);break;case"em":a+=r.em(i);break;case"codespan":a+=r.codespan(i);break;case"br":a+=r.br(i);break;case"del":a+=r.del(i);break;case"text":a+=r.text(i);break;default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return"";throw Error(o)}}}return a}},Jt=class{options;block;constructor(e){this.options=e||He}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ge.lex:ge.lexInline}provideParser(e=this.block){return e?ye.parse:ye.parseInline}};function Re(e,t){if(Array.isArray(t))for(let r=0;r<t.length;r++)e.push(t[r]);else e.push(t)}var Ve=new class{defaults=Ba();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ye;Renderer=Tr;TextRenderer=Va;Lexer=ge;Tokenizer=ut;Hooks=Jt;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let a of e)switch(Re(r,t.call(this,a)),a.type){case"table":{let s=a;for(let n of s.header)Re(r,this.walkTokens(n.tokens,t));for(let n of s.rows)for(let i of n)Re(r,this.walkTokens(i.tokens,t));break}case"list":{let s=a;Re(r,this.walkTokens(s.items,t));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let i=s[n].flat(1/0);Re(r,this.walkTokens(i,t))}):s.tokens&&Re(r,this.walkTokens(s.tokens,t))}}return r}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw Error("extension name required");if("renderer"in s){let n=t.renderers[s.name];n?t.renderers[s.name]=function(...i){let o=s.renderer.apply(this,i);return o===!1&&(o=n.apply(this,i)),o}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let n=t[s.level];n?n.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),a.extensions=t),r.renderer){let s=this.defaults.renderer||new Tr(this.defaults);for(let n in r.renderer){if(!(n in s))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let i=n,o=r.renderer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d===!1?"":d??""}}a.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new ut(this.defaults);for(let n in r.tokenizer){if(!(n in s))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let i=n,o=r.tokenizer[i],l=s[i];s[i]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}a.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Jt;for(let n in r.hooks){if(!(n in s))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let i=n,o=r.hooks[i],l=s[i];s[i]=Jt.passThroughHooks.has(n)?c=>{if(s.options.async&&Jt.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await o.call(s,c);return l.call(s,p)})();let d=o.call(s,c);return l.call(s,d)}:(...c)=>{if(s.options.async)return(async()=>{let p=await o.apply(s,c);return p===!1&&(p=await l.apply(s,c)),p})();let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}a.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,n=r.walkTokens;a.walkTokens=function(i){let o=[];return Re(o,n.call(this,i)),s&&Re(o,s.call(this,i)),o}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ge.lex(e,t??this.defaults)}parser(e,t){return ye.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let a={...r},s={...this.defaults,...a},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return n(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return n(Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let i=s.hooks?await s.hooks.preprocess(t):t,o=await(s.hooks?await s.hooks.provideLexer(e):e?ge.lex:ge.lexInline)(i,s),l=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(e):e?ye.parse:ye.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(t=s.hooks.preprocess(t));let i=(s.hooks?s.hooks.provideLexer(e):e?ge.lex:ge.lexInline)(t,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let o=(s.hooks?s.hooks.provideParser(e):e?ye.parse:ye.parseInline)(i,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(i){return n(i)}}}onError(e,t){return r=>{if(r.message+=`
|
|
80
|
+
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+oe(r.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(r);throw r}}};function T(e,t){return Ve.parse(e,t)}T.options=T.setOptions=function(e){return Ve.setOptions(e),T.defaults=Ve.defaults,Bn(T.defaults),T},T.getDefaults=Ba,T.defaults=He;function Ld(...e){return Ve.use(...e),T.defaults=Ve.defaults,Bn(T.defaults),T}T.use=Ld,T.walkTokens=function(e,t){return Ve.walkTokens(e,t)},T.parseInline=Ve.parseInline,T.Parser=ye,T.parser=ye.parse,T.Renderer=Tr,T.TextRenderer=Va,T.Lexer=ge,T.lexer=ge.lex,T.Tokenizer=ut,T.Hooks=Jt,T.parse=T,T.options,T.setOptions,T.walkTokens,T.parseInline,ye.parse,ge.lex;var si=!1;function Za(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function ni(e,{href:t,title:r,tokens:a}){if(!t?.startsWith("#")||typeof location>"u")return!1;let s=`${location.href.replace(/#.*/,"")}${t}`,n=r?` title="${Za(r)}"`:"";return`<a class="anchor-link" href="${Za(s)}"${n}>${e.parser.parseInline(a)}</a>`}function Or(e){let t=e.link;e.link=function(r){let a=ni(this,r);return a===!1?t.call(this,r):a}}function ii(e){let t=e.type==="list"?e.items[0]?.tokens?.find(r=>r.type==="text"||r.type==="paragraph")?.text:e.text;return T.parseInline((t||"").replace(/\s*\n\s*/g," ").trim())}function oi(e){switch(e?.type){case"table":{let t=e.rows.length;return`<span class="descr-placeholder">Table \xB7 ${t} ${t===1?"row":"rows"}</span>`}case"code":return`<span class="descr-placeholder">Code block${e.lang?` \xB7 ${Za(e.lang)}`:""}</span>`;case"html":return e.text.replace(/<(script|style)\b[\s\S]*?<\/\1>/gi,"").replace(/<[^>]*>/g," ").replace(/[<>]/g,"").replace(/\s+/g," ").trim()||'<span class="descr-placeholder">HTML content</span>';case"blockquote":{let t=e.tokens.find(r=>r.type!=="space");return t?["paragraph","heading","list","text"].includes(t.type)?ii(t):oi(t):""}default:return""}}function Bd(){si||(si=!0,T.use({renderer:{link(e){return ni(this,e)}}}))}Bd();var Nd=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,zd=Object.hasOwnProperty,Ze=class{constructor(){this.occurrences,this.reset()}slug(e,t){let r=this,a=Pd(e,t===!0),s=a;for(;zd.call(r.occurrences,a);)r.occurrences[s]++,a=s+"-"+r.occurrences[s];return r.occurrences[a]=0,a}reset(){this.occurrences=Object.create(null)}};function Pd(e,t){return typeof e=="string"?(t||(e=e.toLowerCase()),e.replace(Nd,"").replace(/ /g,"-")):""}var li={astro:{scopeName:"source.astro",dependencies:["html","css","scss","javascript","typescript","tsx"],patterns:[{include:"#frontmatter"},{include:"#script"},{include:"#style"},{include:"#interpolation"},{include:"text.html.basic"}],repository:{frontmatter:{begin:"^---\\s*$",end:"^---\\s*$",beginCaptures:{0:{name:"punctuation.definition.frontmatter.begin.astro"}},endCaptures:{0:{name:"punctuation.definition.frontmatter.end.astro"}},contentName:"meta.embedded.block.astro",patterns:[{include:"source.ts"}]},script:{patterns:[{begin:"<(script)\\s*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.astro",patterns:[{include:"source.ts"}]},{include:"text.html.basic#embedded-javascript"}]},style:{patterns:[{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.scss.embedded.astro",patterns:[{include:"source.scss"}]},{include:"source.css"}]},interpolation:{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin.astro"}},endCaptures:{0:{name:"punctuation.section.embedded.end.astro"}},contentName:"meta.embedded.expression.astro",patterns:[{include:"text.html.basic#comments"},{include:"source.tsx"}]}}},bash:{scopeName:"source.shell",patterns:[{match:"^#!.*$",name:"comment.line.shebang"},{match:"(?!^#!)#.*$",name:"comment.line.number-sign"},{match:"'(?:[^']*)'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"\\$[a-zA-Z_][\\w]*|\\$\\d+|\\$[?@*#$!_-]|\\$\\{[^}]+\\}",name:"entity.name.variable"},{match:"\\b([a-zA-Z_][\\w]*)(?==)",captures:{1:{name:"entity.name.variable.assignment"}}},{match:"\\b(?:if|then|else|elif|fi|for|while|until|in|do|done|case|esac|function|select|time|coproc)\\b",name:"keyword.control"},{match:"(?:&&|\\|\\||[|&;])",name:"keyword.operator"},{match:"(?<![\\w-])--?[a-zA-Z][\\w-]*(?:=[^\\s]+)?",name:"constant.language.option"},{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?\\b",name:"constant.numeric"}]},c:{scopeName:"source.c",patterns:[{include:"#comments"},{include:"#preprocessor"},{include:"#strings"},{include:"#storage-types"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},preprocessor:{patterns:[{begin:"^\\s*#\\s*include\\b",end:"$",name:"keyword.control.directive.include",patterns:[{match:"<[^>]*>",name:"string.quoted.other.lt-gt"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},{match:"^\\s*#\\s*(?:define|undef|ifdef|ifndef|if|elif|else|endif|pragma|error|warning|line)\\b.*$",name:"keyword.control.directive"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},"storage-types":{match:"\\b(?:auto|const|enum|extern|inline|register|restrict|signed|static|struct|typedef|union|unsigned|volatile)\\b",name:"storage.modifier"},keywords:{match:"\\b(?:break|case|continue|default|do|else|for|goto|if|return|sizeof|switch|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:char|double|float|int|long|short|void|_Bool|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|size_t|ssize_t|ptrdiff_t|FILE)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:NULL|true|false)\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|0[bB][01]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\+\\+|--|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},cpp:{scopeName:"source.cpp",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"source.c#strings"},{include:"#class-declaration"},{include:"#keywords"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"source.c#builtin-types"},{include:"#stl-types"},{include:"#constants"},{include:"source.c#constants"},{include:"#numbers"},{include:"#operators"},{include:"source.c#function-declaration"}],repository:{"class-declaration":{match:"\\b(class|struct|enum|namespace)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:catch|class|const_cast|constexpr|decltype|delete|dynamic_cast|explicit|export|final|friend|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|reinterpret_cast|static_assert|static_cast|template|this|throw|try|typeid|typename|using|virtual)\\b",name:"keyword.control"},"stl-types":{match:"\\bstd::(?:array|deque|forward_list|list|map|multimap|multiset|pair|priority_queue|queue|set|shared_ptr|stack|string|tuple|unique_ptr|unordered_map|unordered_set|vector|weak_ptr)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F']+|0[bB][01']+|(?:\\d[\\d']*\\.[\\d']*|\\.\\d[\\d']*|\\d[\\d']*)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->\\*?|::|\\.\\.\\.|<=>|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"}}},csharp:{scopeName:"source.cs",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"///.*$",name:"comment.line.documentation"},{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:'@"(?:""|[^"])*"',name:"string.quoted.double.verbatim"},{match:'\\$@"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'@\\$"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'\\$"(?:\\\\.|\\{\\{|\\}\\}|[^"\\\\\\r\\n])*"',name:"string.quoted.double.interpolated"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},attributes:{match:"\\[[A-Za-z_][\\w.]*\\]",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|struct|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|as|async|await|base|break|case|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|if|implicit|in|internal|is|lock|namespace|new|null|operator|out|override|params|partial|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var|void)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[uUlLfFdDmM]*\\b",name:"constant.numeric"},operators:{match:"(?:=>|\\?\\?=?|\\?\\.|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*(?:<[^>]*>)?\\s*\\()",name:"entity.name.function"}}},css:{scopeName:"source.css",patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"}],repository:{comments:{begin:"/\\*",end:"\\*/",name:"comment.block"},strings:{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1`,name:"string.quoted"},keyframes:{begin:"(@(?:-\\w+-)?keyframes)\\s+([a-zA-Z_-][\\w-]*)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"},2:{name:"entity.name.animation"}},patterns:[{include:"$self"}]},"at-rule-block":{begin:"(@(?:container|counter-style|document|font-face|font-feature-values|font-palette-values|layer|media|page|position-try|scope|starting-style|supports|view-transition)\\b)[^{;]*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"$self"}]},"at-rule-statement":{begin:"(@(?:charset|custom-media|import|namespace|property)\\b)",end:";",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#values"}]},"rule-set":{begin:"([^\\s@{};<][^@{};<]*?)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"entity.name.selector"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"},{include:"#declarations"},{include:"#values"}]},declarations:{match:"(--[a-zA-Z0-9_-]+|[a-zA-Z-][\\w-]*)(\\s*:)",captures:{1:{name:"support.type.property-name"}}},values:{patterns:[{match:"!important\\b",name:"keyword.other.important"},{match:"\\b(var)\\(\\s*(--[a-zA-Z0-9_-]+)",captures:{1:{name:"entity.name.function"},2:{name:"variable.other.custom-property"}}},{match:"\\b([a-zA-Z_-][\\w-]*)(?=\\()",captures:{1:{name:"entity.name.function"}}},{match:"#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\\b",name:"constant.other.color"},{match:"(?<![\\w.-])-?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?(?:%|[a-zA-Z]+)?\\b",name:"constant.numeric"},{match:"\\b(?:auto|currentColor|inherit|initial|none|normal|revert|revert-layer|transparent|unset)\\b",name:"constant.language"},{match:"(?:[+*/]|(?<=\\s)-(?!-))",name:"keyword.operator"}]}}},go:{scopeName:"source.go",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#builtin-functions"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:"`",end:"`",name:"string.quoted.raw"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.rune"}]},"function-declaration":{match:"\\b(func)\\s+(?:\\([^)]*\\)\\s*)?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|iota)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:any|bool|byte|complex64|complex128|error|float32|float64|int|int8|int16|int32|int64|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\\b",name:"support.class.builtin"},"builtin-functions":{match:"\\b(?:append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\\b(?=\\s*\\()",name:"entity.name.function"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?i?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\.\\.\\.|<-|\\|\\||&&|==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},html:{scopeName:"text.html.basic",dependencies:["css","json","javascript"],patterns:[{include:"#comments"},{include:"#doctype"},{include:"#embedded-css"},{include:"#embedded-json"},{include:"#embedded-javascript"},{include:"#raw-text"},{include:"#tags"},{include:"#entities"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},doctype:{match:"<![Dd][Oo][Cc][Tt][Yy][Pp][Ee]\\b[^>]*>",name:"keyword.control.doctype"},"embedded-css":{begin:`<([Ss][Tt][Yy][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Tt][Yy][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.html",patterns:[{include:"source.css"}]},"embedded-json":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:application/(?:ld\\+)?json|importmap|speculationrules)\\2)(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.json.embedded.html",patterns:[{include:"source.json"}]},"embedded-javascript":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?:(?![^>]*\\b[Tt][Yy][Pp][Ee]\\s*=)|(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:module|(?:text|application)/(?:java|ecma)script)\\2))(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.html",patterns:[{include:"source.js"}]},"raw-text":{begin:`<([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"string.unquoted.raw-text"},tags:{begin:"<(/?)([a-zA-Z][\\w.-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#inline-css"},{include:"#inline-javascript"},{include:"#attributes"},{include:"#unquoted-attributes"},{include:"#boolean-attributes"}]},"inline-css":{begin:`[ \\t]+(style)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.css.embedded.inline",patterns:[{include:"source.css#comments"},{include:"source.css#strings"},{include:"source.css#declarations"},{include:"source.css#values"}]},"inline-javascript":{begin:`[ \\t]+(on[a-zA-Z][\\w-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.inline",patterns:[{include:"source.js"}]},attributes:{begin:`[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"string.quoted.attribute-value",patterns:[{include:"#entities"}]},"unquoted-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*([^\\s\"'`=<>]+)",captures:{1:{name:"entity.other.attribute-name"},2:{name:"string.unquoted.attribute-value"}}},"boolean-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)(?=[ \\t]*/?>|[ \\t]+[a-zA-Z_:])",captures:{1:{name:"entity.other.attribute-name"}}},entities:{match:"&(?:#\\d+|#x[0-9a-fA-F]+|[a-zA-Z][\\w]+);",name:"constant.character.entity"}}},http:{scopeName:"source.http",patterns:[{match:"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE|CONNECT)\\s+([^\\s]+)\\s+(HTTP\\/[0-9.]+)",captures:{1:{name:"keyword.control.http"},2:{name:"string.unquoted.http"},3:{name:"keyword.other.http"}}},{match:"^(HTTP\\/[0-9.]+)\\s+([0-9]{3})(?:\\s+(.*))?",captures:{1:{name:"keyword.other.http"},2:{name:"constant.numeric.http"},3:{name:"string.unquoted.http"}}},{match:"^([a-zA-Z0-9_-]+):\\s*(.*)",captures:{1:{name:"support.type.property-name.http"},2:{name:"string.unquoted.http"}}}]},java:{scopeName:"source.java",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|assert|break|case|catch|continue|default|do|else|extends|final|finally|for|goto|if|implements|import|instanceof|native|new|non-sealed|package|permits|private|protected|public|return|sealed|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:boolean|byte|char|double|float|int|long|short|void|Boolean|Byte|Character|Double|Float|Integer|Long|Short|String|Object|List|Map|Set|ArrayList|HashMap|HashSet|Optional)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[lLfFdD]?\\b",name:"constant.numeric"},operators:{match:"(?:->|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>>?=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},javascript:{scopeName:"source.js",patterns:[{include:"#comments"},{include:"#strings"},{include:"#template"},{include:"#regexp"},{include:"#jsx-closing-tag"},{include:"#jsx-tag"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#variable-declaration"},{include:"#keywords"},{include:"#numbers"},{include:"#constants"},{include:"#decorators"},{include:"#private-fields"},{include:"#properties"},{include:"#functions"},{include:"#built-ins"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},template:{begin:"`",end:"(?<!\\\\)(?:\\\\\\\\)*`",name:"string.quoted.template",patterns:[{include:"#template-interpolation"}]},"template-interpolation":{begin:"\\$\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"balanced-braces":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},regexp:{match:"(?<![\\w)$\\]])/(?![/*])(?:\\\\.|\\[(?:\\\\.|[^\\]\\\\])*\\]|[^/\\\\\\r\\n])+/[dgimsuvy]*",name:"string.regexp"},"jsx-closing-tag":{match:"</([A-Za-z][\\w.-]*)\\s*>",captures:{1:{name:"entity.name.tag"}}},"jsx-tag":{begin:"<([A-Za-z][\\w.-]*)",end:"/?>",beginCaptures:{1:{name:"entity.name.tag"}},patterns:[{include:"#jsx-expression"},{include:"#strings"},{include:"#jsx-boolean-attributes"},{include:"#jsx-attributes"}]},"jsx-expression":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"jsx-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s*(?:=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"jsx-boolean-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s+(?:[a-zA-Z_:][\\w:.-]*\\s*=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(?:(async)\\s+)?(function)\\s*(\\*)?\\s*([A-Za-z_$][\\w$]*)?",captures:{1:{name:"storage.modifier.async"},2:{name:"storage.type.function"},4:{name:"entity.name.function"}}},"variable-declaration":{match:"\\b(const|let|var)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.variable"},2:{name:"variable.other.readwrite"}}},keywords:{match:"\\b(?:as|assert|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b",name:"keyword.control"},numbers:{match:"(?<![\\w$])(?:0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*n?|0[bB][01](?:_?[01])*n?|0[oO][0-7](?:_?[0-7])*n?|\\d(?:_?\\d)*n|(?:\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?)(?![\\w$])",name:"constant.numeric"},constants:{patterns:[{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\b(?:Infinity|NaN|null|undefined)\\b",name:"constant.language"}]},decorators:{match:"@[A-Za-z_$][\\w$]*",name:"entity.name.decorator"},"private-fields":{match:"#[A-Za-z_$][\\w$]*",name:"variable.other.private"},properties:{match:"(?<=\\.)[A-Za-z_$][\\w$]*|[A-Za-z_$][\\w$]*(?=\\s*:)",name:"entity.name.property"},functions:{match:"\\b[A-Za-z_$][\\w$]*(?=\\s*\\()",name:"entity.name.function"},"built-ins":{match:"\\b(?:Array|BigInt|Boolean|console|customElements|Date|document|Error|JSON|Map|Math|Number|Object|Promise|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet|window)\\b",name:"support.class"},operators:{match:"(?:=>|===|!==|==|!=|<=|>=|\\?\\?|\\?\\.|\\+\\+|--|&&|\\|\\||\\*\\*|[+*%&|^!~?:-])",name:"keyword.operator"}}},json:{scopeName:"source.json",patterns:[{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*:)',name:"entity.name.key"},{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*[,}\\]])',name:"string.quoted.double"},{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"},{match:"(?<![\\w.])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric"}]},kotlin:{scopeName:"source.kotlin",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(?:(data|sealed|abstract|open|inner|enum|annotation)\\s+)?(class|interface|object)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.modifier"},2:{name:"storage.type.class"},3:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(fun)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|actual|annotation|as|break|by|catch|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|final|finally|for|get|if|import|in|infix|init|inline|inner|internal|is|lateinit|noinline|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|try|typealias|val|var|vararg|when|where|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:Any|Array|Boolean|Byte|Char|Double|Float|Int|List|Long|Map|MutableList|MutableMap|MutableSet|Nothing|Set|Short|String|Unit)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[fFLuU]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\?:|\\?\\.|!!|\\.\\.|::|&&|\\|\\||==|!=|<=|>=|[+\\-*/%!<>=]=?)",name:"keyword.operator"}}},markdown:{scopeName:"text.html.markdown",dependencies:["yaml"],patterns:[{include:"#front-matter"},{include:"#comments"},{include:"#fenced-code"},{include:"#headings"},{include:"#quotes"},{include:"#lists"},{include:"#links"},{include:"#inline-code"}],repository:{"front-matter":{begin:"^[ \\t]*---[ \\t]*$",end:"^[ \\t]*(?:---|\\.\\.\\.)[ \\t]*$",patterns:[{include:"source.yaml"}]},comments:{begin:"<!--",end:"-->",name:"comment.block.html"},"fenced-code":{begin:"^[ \\t]*(```+|~~~+).*$",end:"^[ \\t]*\\1[ \\t]*$",name:"string.unquoted.fenced-code"},headings:{match:"^[ \\t]{0,3}#{1,6}[ \\t]+(.+)$",captures:{1:{name:"entity.name.section"}}},quotes:{match:"^[ \\t]*>.*$",name:"comment.blockquote"},lists:{match:"^[ \\t]*(?:[-+*]|\\d+[.)])(?=[ \\t]+)",name:"keyword.control.list"},links:{match:`!?\\[([^\\]]+)\\](\\([^\\s)]+(?:\\s+['"][^'"]*['"])?\\))`,captures:{1:{name:"entity.name.link"},2:{name:"string.other.link"}}},"inline-code":{match:"(`+)(.+?)\\1",captures:{2:{name:"string.other.raw"}}}}},"objective-c":{scopeName:"source.objc",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"#interface-declaration"},{include:"#directives"},{include:"#nsstring"},{include:"source.c#strings"},{include:"#method-declaration"},{include:"#language-variables"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"#property-attributes"},{include:"#builtin-types"},{include:"source.c#builtin-types"},{include:"#constants"},{include:"source.c#constants"},{include:"source.c#numbers"},{include:"source.c#operators"},{include:"source.c#function-declaration"}],repository:{"interface-declaration":{match:"\\b(@interface|@implementation|@protocol)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},directives:{match:"@(?:end|property|synthesize|dynamic|optional|required|class|import|selector|encode|synchronized|autoreleasepool|try|catch|finally|throw)\\b",name:"keyword.control.directive.objc"},nsstring:{match:'@"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},"method-declaration":{match:"^\\s*[-+]\\s*\\([^)]*\\)\\s*([A-Za-z_]\\w*)",captures:{1:{name:"entity.name.function"}}},"language-variables":{match:"\\b(?:self|super)\\b",name:"variable.language.objc"},"property-attributes":{match:"\\b(?:nonatomic|atomic|strong|weak|copy|assign|retain|readonly|readwrite|unsafe_unretained|nullable|nonnull|null_resettable)\\b",name:"storage.modifier"},"builtin-types":{match:"\\b(?:id|instancetype|BOOL|SEL|Class|IMP|NSInteger|NSUInteger|CGFloat|NSString|NSMutableString|NSArray|NSMutableArray|NSDictionary|NSMutableDictionary|NSNumber|NSObject|NSError|NSData|NSURL|NSNotification)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:YES|NO)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|Nil)\\b",name:"constant.language"}]}}},perl:{scopeName:"source.perl",patterns:[{include:"#comments"},{include:"#pod"},{include:"#strings"},{include:"#variables"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},pod:{begin:"^=\\w+",end:"^=cut\\b",name:"comment.block.documentation"},strings:{patterns:[{match:"qw\\s*\\(([^)]*)\\)",name:"string.quoted.other.qw"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"`(?:\\\\.|[^`\\\\])*`",name:"string.interpolated.backtick"}]},variables:{match:"[$@%&][A-Za-z_]\\w*(?:::\\w+)*|\\$\\{[^}]+\\}|\\$[0-9]+|\\$[!@_/\\\\,.;]",name:"entity.name.variable"},"function-declaration":{match:"\\b(sub)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:my|our|local|sub|if|elsif|else|unless|while|until|for|foreach|do|return|last|next|redo|use|no|package|require|and|or|not|xor|eq|ne|lt|gt|le|ge|cmp|given|when|default)\\b",name:"keyword.control"},builtins:{match:"\\b(?:print|printf|sprintf|push|pop|shift|unshift|splice|join|split|map|grep|sort|keys|values|each|defined|exists|delete|ref|bless|die|warn|chomp|chop|length|substr|index|lc|uc|lcfirst|ucfirst|wantarray|scalar)\\b",name:"support.class.builtin"},constants:{match:"\\bundef\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:=>|->|::|\\.\\.\\.?|<=>|==|!=|<=|>=|&&|\\|\\||//|=~|!~|\\*\\*|[+\\-*/%.!<>=]=?)",name:"keyword.operator"}}},php:{scopeName:"source.php",patterns:[{match:"<\\?php\\b|<\\?=|\\?>",name:"punctuation.section.embedded"},{include:"#comments"},{include:"#attributes"},{include:"#strings"},{include:"#variables"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-call"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{match:"#(?!\\[).*$",name:"comment.line.number-sign"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},attributes:{match:"#\\[[^\\]]*\\]",name:"entity.name.decorator"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},variables:{match:"\\$[A-Za-z_]\\w*",name:"entity.name.variable"},"class-declaration":{match:"\\b(class|interface|trait|enum)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(function)\\s+&?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|fn|for|foreach|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|print|private|protected|public|readonly|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false|TRUE|FALSE)\\b",name:"constant.language.boolean"},{match:"\\b(?:null|NULL)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\?\\?=?|<=>|===|!==|==|!=|<=|>=|\\.=|&&|\\|\\||[+\\-*/%.!<>=]=?)",name:"keyword.operator"},"function-call":{match:"\\b[A-Za-z_]\\w*(?=\\s*\\()",name:"entity.name.function"}}},powershell:{scopeName:"source.powershell",patterns:[{include:"#comments"},{include:"#strings"},{include:"#constants"},{include:"#variables"},{include:"#function-declaration"},{include:"#operators"},{include:"#keywords"},{include:"#parameters"},{include:"#cmdlets"},{include:"#numbers"}],repository:{comments:{patterns:[{begin:"<#",end:"#>",name:"comment.block"},{match:"#.*$",name:"comment.line.number-sign"}]},strings:{patterns:[{match:"'(?:''|[^'])*'",name:"string.quoted.single"},{match:'"(?:`.|[^"])*"',name:"string.quoted.double"}]},variables:{match:"\\$(?:\\{[^}]+\\}|[A-Za-z_][\\w:]*)",name:"entity.name.variable"},"function-declaration":{match:"\\b(function|filter)\\s+([A-Za-z_][\\w-]*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},operators:{match:"-(?:eq|ne|gt|lt|ge|le|like|notlike|match|notmatch|contains|notcontains|in|notin|and|or|not|xor|replace|split|join|is|isnot|as)\\b",name:"keyword.operator"},keywords:{match:"\\b(?:begin|break|catch|class|continue|do|dynamicparam|else|elseif|end|exit|finally|for|foreach|if|in|param|process|return|switch|throw|trap|try|until|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\$(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\$(?:null)\\b",name:"constant.language"}]},parameters:{match:"(?<![\\w-])-[A-Za-z][\\w]*",name:"constant.language.option"},cmdlets:{match:"\\b[A-Z][a-zA-Z]*-[A-Za-z]+\\b",name:"entity.name.function"},numbers:{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?(?:[kKmMgGtTpP][bB])?\\b",name:"constant.numeric"}}},python:{scopeName:"source.python",patterns:[{include:"#comments"},{include:"#strings"},{include:"#decorators"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtins"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{begin:'[rRbBfFuU]{0,2}"""',end:'"""',name:"string.quoted.triple.double"},{begin:"[rRbBfFuU]{0,2}'''",end:"'''",name:"string.quoted.triple.single"},{match:'[rRbBfFuU]{0,2}"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"[rRbBfFuU]{0,2}'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"}]},decorators:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(def)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:True|False)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Ellipsis|NotImplemented|__debug__)\\b",name:"constant.language"},{match:"\\b(?:self|cls)\\b",name:"variable.language.python"}]},builtins:{match:"\\b(?:abs|all|any|bool|bytearray|bytes|callable|chr|classmethod|dict|dir|divmod|enumerate|filter|float|format|frozenset|getattr|hasattr|hash|hex|id|input|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip)\\b(?=\\s*\\()",name:"support.class.builtin"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|(?:\\d(?:_?\\d)*)?\\.?\\d(?:_?\\d)*(?:[eE][+-]?\\d+)?[jJ]?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\*\\*|//|<=|>=|==|!=|->|[+\\-*/%@&|^~<>=])",name:"keyword.operator"}}},r:{scopeName:"source.r",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},"function-declaration":{match:"\\b([A-Za-z_.][\\w.]*)\\s*(?=<-\\s*function\\b|=\\s*function\\b)",name:"entity.name.function"},keywords:{match:"\\b(?:if|else|repeat|while|function|for|next|break|in)\\b",name:"keyword.control"},builtins:{match:"\\b(?:c|list|vector|matrix|data\\.frame|print|cat|paste|paste0|sprintf|nrow|ncol|length|names|colnames|rownames|sapply|lapply|vapply|mapply|apply|Map|Filter|Reduce|library|require|source|setwd|getwd|summary|str|head|tail|is\\.na|is\\.null|as\\.character|as\\.numeric|as\\.integer|as\\.factor|as\\.data\\.frame)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:TRUE|FALSE|T|F)\\b",name:"constant.language.boolean"},{match:"\\b(?:NULL|NA|NA_integer_|NA_real_|NA_character_|NA_complex_|Inf|NaN)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?[Li]?)\\b",name:"constant.numeric"},operators:{match:"(?:%[^%\\s]*%|<<-|<-|->>|->|==|!=|<=|>=|&&|\\|\\||[-+*/^!<>=&|~?:])",name:"keyword.operator"}}},ruby:{scopeName:"source.ruby",patterns:[{match:"#(?!\\{).*$",name:"comment.line.number-sign"},{begin:`<<[-~]?(['"]?)([A-Z][A-Z0-9_]*)\\1`,end:"^\\2$",name:"string.unquoted.heredoc"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"(?:@@|@|\\$)[a-zA-Z_][\\w]*",name:"entity.name.variable"},{match:":[a-zA-Z_][\\w]*[!?=]?",name:"constant.other.symbol"},{match:"\\b(def)\\s+([a-zA-Z_][\\w]*[!?=]?)",captures:{1:{name:"storage.type.method"},2:{name:"entity.name.function"}}},{match:"\\b(class|module)\\s+([A-Z][\\w]*(?:::[A-Z][\\w]*)*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\bnil\\b",name:"constant.language"},{match:"\\b(?:BEGIN|END|alias|and|begin|break|case|catch|defined|do|else|elsif|ensure|for|if|in|next|not|or|redo|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b",name:"keyword.control"},{match:"\\b[A-Z][\\w]*(?:::[A-Z][\\w]*)*\\b",name:"entity.name.type.constant"},{match:"(?<![\\w.])-?(?:0[xX][0-9a-fA-F]+|0[bB][01]+|\\d+(?:_\\d+)*(?:\\.\\d+)?)\\b",name:"constant.numeric"}]},rust:{scopeName:"source.rust",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#macros"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#lifetimes"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'b?r#"',end:'"#',name:"string.quoted.raw"},{match:'b?r"[^"]*"',name:"string.quoted.raw"},{match:'b?"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\])'",name:"string.quoted.char"}]},attributes:{match:"#!?\\[[^\\]]*\\]",name:"entity.name.decorator"},"function-declaration":{match:"\\b(fn)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(struct|enum|trait|union|type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},macros:{match:"\\b[A-Za-z_]\\w*!(?=\\s*[\\(\\[{])",name:"entity.name.function.macro"},keywords:{match:"\\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|union|unsafe|use|where|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Some|Ok|Err)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:bool|char|str|String|i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usize|f32|f64|Vec|Option|Result|Box|Rc|Arc|RefCell|HashMap|HashSet)\\b",name:"support.class.builtin"},lifetimes:{match:"'[a-z_]\\w*\\b",name:"variable.language.lifetime"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)(?:[iuf](?:8|16|32|64|128|size))?\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\.\\.=?|&&|\\|\\||==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},svelte:{scopeName:"source.svelte",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#blocks"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.svelte",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.svelte",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.svelte",patterns:[{include:"source.css"}]},blocks:{match:"\\{([#/:@])\\s*(if|else|each|key|await|then|catch|snippet|render|html|debug|const)\\b",captures:{1:{name:"punctuation.definition.keyword"},2:{name:"keyword.control"}}},interpolation:{begin:"\\{(?![#/:@])",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive"},{include:"#shorthand"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},directive:{match:"[ \\t]+((?:bind|on|class|use|transition|in|out|animate|let):[\\w-]+(?:\\|[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}},shorthand:{begin:"[ \\t]+\\{",end:"\\}",contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]}}},toml:{scopeName:"source.toml",patterns:[{include:"#comments"},{include:"#table-headers"},{include:"#datetime"},{include:"#strings"},{include:"#keys"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},"table-headers":{match:"^\\s*(\\[\\[?)([^\\[\\]]+)(\\]\\]?)\\s*$",captures:{1:{name:"punctuation.definition.table"},2:{name:"entity.name.type.class"},3:{name:"punctuation.definition.table"}}},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple.double"},{begin:"'''",end:"'''",name:"string.quoted.triple.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'[^'\\r\\n]*'",name:"string.quoted.single"}]},keys:{match:`^\\s*((?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*')(?:\\s*\\.\\s*(?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*'))*)\\s*(?==)`,captures:{1:{name:"entity.name.key"}}},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:inf|nan)\\b",name:"constant.language"}]},datetime:{match:"\\b\\d{4}-\\d{2}-\\d{2}(?:[Tt ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[Zz]|[+-]\\d{2}:\\d{2})?)?\\b",name:"constant.other.date-time"},numbers:{match:"(?<![\\w.])[+-]?(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"=",name:"keyword.operator"}}},tsx:{scopeName:"source.tsx",dependencies:["javascript","typescript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"source.js#jsx-closing-tag"},{include:"source.js#jsx-tag"},{include:"source.ts#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"source.ts#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"source.ts#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}]},typescript:{scopeName:"source.ts",dependencies:["javascript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}],repository:{"type-declaration":{match:"\\b(interface|enum|namespace|module|type)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},"type-keywords":{match:"\\b(?:abstract|accessor|asserts|declare|infer|keyof|override|readonly|satisfies|unique)\\b",name:"keyword.control.ts"},"builtin-types":{match:"\\b(?:any|bigint|boolean|never|number|object|string|symbol|undefined|unknown|void)\\b",name:"support.class.builtin"}}},vue:{scopeName:"text.html.vue",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.vue",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.vue",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.vue",patterns:[{include:"source.css"}]},interpolation:{begin:"\\{\\{",end:"\\}\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive-value"},{include:"#directive"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},"directive-value":{begin:`[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},directive:{match:"[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}}}},yaml:{scopeName:"source.yaml",patterns:[{match:"#.*$",name:"comment.line.number-sign"},{match:"^(?:---|\\.\\.\\.)\\s*$|^%YAML\\b.*$",name:"keyword.control.document"},{match:"^\\s*(?:-\\s+)?([^#\\s][^\\r\\n:#]*?)(?=\\s*:)",captures:{1:{name:"entity.name.key"}}},{match:"[&*][a-zA-Z_][\\w-]*|![^\\s]+",name:"entity.name.anchor"},{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n]|\\r?\\n[ \\t]+)*\\1`,name:"string.quoted"},{match:"(?<=:\\s)[|>][-+]?\\s*$",name:"keyword.control.block-scalar"},{match:"\\b(?:true|false|yes|no|on|off)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b|~",name:"constant.language"},{match:"(?<![\\w.-])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b",name:"constant.numeric"}]}},ci=new Map;Object.values(li).forEach(e=>{e?.scopeName&&ci.set(e.scopeName,e)});var Md={"c++":"cpp",cs:"csharp",curl:"bash",js:"javascript",jsx:"javascript",markup:"html",md:"markdown",objc:"objective-c",ps1:"powershell",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"html",ts:"typescript",xml:"html",yml:"yaml",zsh:"bash"},Ud={indices:[[1/0,1/0]]},Gt=new Map,Hd=e=>{let t=e.split("."),[r,a,s]=t,n=t.at(-1);if(r==="markup"&&["quote","inserted","deleted","raw"].includes(a))return a;if(r==="entity"&&a==="name")return s;if(e.startsWith("constant.character.entity"))return"character-entity";if(t.includes("numeric"))return"numeric";if(e.startsWith("support.type.property-name"))return"property";if(t.includes("attribute-value"))return"attribute-value";if(e.startsWith("string.other.link"))return"link";if(["doctype","at-rule","important","regexp","boolean","symbol","operator","attribute-name"].includes(n))return n;if(["comment","string","constant","storage","keyword","variable","punctuation","entity","support"].includes(r))return r},Fr=(e,t,r,a)=>{let s=Hd(a);if(!s||t===r)return;let n=new Range;n.setStart(e,t),n.setEnd(e,r),Gt.has(s)||Gt.set(s,new Highlight),Gt.get(s).add(n)},Ja=(e,t,r={})=>{Object.entries(r).forEach(([a,s])=>{let n=t.indices[+a];n&&Fr(e,...n,s.name)})},Wd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Kd=(e,t)=>e.replace(/\\(\d+)/g,(r,a)=>t[a]===void 0?r:Wd(t[a])),di=e=>e?Array.isArray(e)?e:e.match||e.begin||e.include?[e]:e.patterns||[]:[],Vd=(e,t,r)=>{if(e==="$self")return{grammar:t,rules:t.patterns};if(e==="$base")return{grammar:r,rules:r.patterns};if(e[0]==="#")return{grammar:t,rules:di(t.repository?.[e.slice(1)])};let[a,s]=e.split("#"),n=ci.get(a);return n?{grammar:n,rules:s?di(n.repository?.[s]):n.patterns}:null},pi=(e,t,r,a=new Set)=>{let s=[];return e.forEach(n=>{if(n.include){let i=`${t.scopeName}:${n.include}`;if(a.has(i))return;let o=Vd(n.include,t,r);if(!o)return;let l=new Set(a);l.add(i),s.push(...pi(o.rules,o.grammar,r,l))}else(n.match||n.begin&&n.end)&&s.push({grammar:t,rule:n})}),s},Ga=new Map,Xa=new Map,ui=(e,t,r,a)=>{let s=Xa.get(e);if(!s||s.indices[0][0]<r){Ga.has(e)||Ga.set(e,new RegExp(e,"dgm"));let n=Ga.get(e);n.lastIndex=r,s=n.exec(t.data)||Ud,Xa.set(e,s)}return s.indices[0][0]<a&&s.indices[0][1]<=a?s:null},Zd=(e,t,r,a)=>{let s=null;return t.forEach(n=>{let i=ui(n.rule.match||n.rule.begin,e,r,a);i&&(!s||i.indices[0][0]<s.match.indices[0][0])&&(s={...n,match:i})}),s},hi=(e,t,r,a,s,n=s,i=null)=>{let o=pi(t,s,n),l=r;for(;l<a;){let c=Zd(e,o,l,a),d=i?ui(i.pattern,e,l,a):null,p=c?.match.indices[0][0]??1/0,h=d?.indices[0][0]??1/0;if(d&&(h<p||h===p&&!i?.applyEndPatternLast))return{contentEnd:h,end:d.indices[0][1],match:d};if(!c)return{contentEnd:a,end:a,match:null};let{rule:u,match:g,grammar:f}=c;if(u.match){u.name&&Fr(e,...g.indices[0],u.name),Ja(e,g,u.captures),l=g.indices[0][1]>l?g.indices[0][1]:l+1;continue}let y=hi(e,u.patterns||[],g.indices[0][1],a,f,n,{pattern:Kd(u.end,g),applyEndPatternLast:u.applyEndPatternLast});u.name&&Fr(e,g.indices[0][0],y.end,u.name),u.contentName&&Fr(e,g.indices[0][1],y.contentEnd,u.contentName),Ja(e,g,u.beginCaptures||u.captures),y.match&&Ja(e,y.match,u.endCaptures||u.captures),l=y.end>l?y.end:l+1}return{contentEnd:a,end:a,match:null}},mi=e=>{let t=e.parentElement,r=a=>!a||!a.classList?null:[...a.classList].find(s=>s.startsWith("language-"))?.slice(9);return(r(e)||e.dataset?.language||r(t)||t?.dataset?.language||t?.getAttribute?.("lang")||"").toLowerCase()},Jd=e=>Md[e]||e,Gd=(e=document)=>{let t=[],r=new Set,a=s=>{if(s&&!r.has(s)&&(r.add(s),s.querySelectorAll)){let n=s.querySelectorAll("pre > code");t.push(...n);let i=s.querySelectorAll("*");for(let o=0;o<i.length;o++){let l=i[o];l.shadowRoot&&a(l.shadowRoot)}}};return a(e),t},Ya=!1,Xd=(e=document)=>{if(typeof window>"u"||typeof CSS>"u"||!CSS.highlights)return;let t=Gd(e).filter(mi);t.length!==0&&(Gt.forEach((r,a)=>{CSS.highlights.get(a)===r&&CSS.highlights.delete(a),r.clear()}),t.forEach(r=>{let a=li[Jd(mi(r))];if(!a)return;let s=Array.from(r.childNodes).filter(n=>n.nodeType===Node.TEXT_NODE&&n.data?.length>0);s.length!==0&&(Xa=new Map,s.forEach(n=>{hi(n,a.patterns,0,n.data.length,a)}))}),Gt.forEach((r,a)=>{r.size&&CSS.highlights.set(a,r)}))},jr=(e=document)=>{typeof window<"u"&&typeof CSS<"u"&&CSS.highlights&&(Ya||(Ya=!0,requestAnimationFrame(()=>{Ya=!1,Xd(e)})))},Je=Z`.hover-bg:hover{background:var(--muted)}::selection{background:var(--selection-bg);color:var(--selection-fg)}.regular-font{font-family:var(--font-sans)}.mono-font{font-family:var(--font-mono)}.title{font-size:calc(var(--font-size-small) + 1.125rem);text-wrap:balance;font-weight:400}.sub-title{font-size:var(--h3-font-size);text-wrap:balance}.req-res-title{font-family:var(--font-sans);font-size:calc(var(--font-size-small) + .25rem);text-align:start;text-wrap:balance;margin-bottom:.5rem;font-weight:700}.tiny-title{font-size:calc(var(--font-size-small) + 1px);font-weight:700}.regular-font-size{font-size:var(--font-size-regular)}.small-font-size{font-size:var(--font-size-small)}.upper{text-transform:uppercase}.primary-text{color:var(--primary)}.bold-text{font-weight:700}.gray-text{color:var(--muted-foreground)}.red-text{color:var(--destructive)}.blue-text{color:var(--blue)}.multiline{max-height:var(--resp-area-height);color:var(--muted-foreground);overflow:scroll}.method-fg{color:var(--method-default)}.method-fg.put{color:var(--method-put)}.method-fg.post{color:var(--method-post)}.method-fg.get{color:var(--method-get)}.method-fg.delete{color:var(--method-delete)}.method-fg.head{color:var(--method-head)}.method-fg.patch{color:var(--method-patch)}.method-fg.options{color:var(--method-options)}.method-fg.trace{color:var(--method-trace)}.method-fg.query{color:var(--method-query)}.method-fg.copy,.method-fg.purge{color:var(--method-default)}h1,h2,h3,h4,h5,h6,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6){font-family:var(--heading-font);font-weight:var(--heading-weight);line-height:var(--heading-line-height);letter-spacing:var(--heading-letter-spacing);color:var(--heading-color);margin-block:var(--heading-margin-top) var(--heading-margin-bottom);text-wrap:balance;padding:0}h1,h1.rapidoc-heading{font-size:var(--h1-font-size)}h2,h2.rapidoc-heading{font-size:var(--h2-font-size)}h3,h3.rapidoc-heading{font-size:var(--h3-font-size)}h4,h4.rapidoc-heading{font-size:var(--h4-font-size)}h5,h5.rapidoc-heading{font-size:var(--h5-font-size)}h6,h6.rapidoc-heading{font-size:var(--h6-font-size)}:is(h1,h2,h3,h4,h5,h6):first-child,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6):first-child{margin-block-start:0}.rapidoc-heading.label-heading{font-size:var(--label-heading-font-size);font-weight:var(--heading-weight);letter-spacing:.04em;text-transform:uppercase;margin-block:16px 6px;line-height:1.4}.rapidoc-heading.label-heading.req-res-title{font-size:calc(var(--font-size-small) + .25rem);margin-block:0 .5rem}.rapidoc-heading.label-heading.tiny-title{font-size:calc(var(--font-size-small) + 1px);margin-block:0 8px}.table-title{font-size:var(--font-size-small);vertical-align:middle;margin:12px 0 4px;font-weight:600}.table-title>.rapidoc-heading.label-heading{margin:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}p{margin-block-start:.5em}a{color:var(--blue);cursor:pointer;text-decoration:none}a:hover{text-decoration:underline}code,pre{font-family:var(--font-mono);font-size:calc(var(--font-size-mono) - 1px);margin:0}.m-markdown,.m-markdown-small{color:var(--foreground);overflow-wrap:anywhere;display:block}.m-markdown p,.m-markdown span{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit}.m-markdown li{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit;margin-block:.25em}.m-markdown-small p,.m-markdown-small span{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 6px);color:inherit}.m-markdown-small li{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 8px);color:inherit;margin-block:3px}.m-markdown strong,.m-markdown b,.m-markdown-small strong,.m-markdown-small b{color:var(--foreground);font-weight:600}.m-markdown h1,.m-markdown h2,.m-markdown h3,.m-markdown h4,.m-markdown h5,.m-markdown h6,.m-markdown-small h1,.m-markdown-small h2,.m-markdown-small h3,.m-markdown-small h4,.m-markdown-small h5,.m-markdown-small h6{color:var(--foreground)}.m-markdown p:not(:first-child){margin-block-start:var(--paragraph-spacing)}.m-markdown-small p:not(:first-child){margin-block-start:12px}.m-markdown-small p:first-child{margin-block-start:0}.m-markdown p,.m-markdown-small p{margin-block-end:0}.m-markdown code span{font-size:var(--font-size-mono)}.m-markdown-small code,.m-markdown code{border-radius:min(var(--radius), .5rem);color:var(--foreground);background-color:var(--muted);font-size:calc(var(--font-size-mono));padding:1px 6px;line-height:1.2}.m-markdown-small code{font-size:calc(var(--font-size-mono) - 1px);padding:1px 5px}.m-markdown-small pre,.m-markdown pre{white-space:pre-wrap;overflow-wrap:normal;border-radius:min(var(--radius), .5rem);border:1px solid var(--input);line-height:normal;overflow-x:auto}.m-markdown pre{background:var(--code-bg);color:var(--foreground);padding:12px;& code{color:var(--foreground);background:0 0;border:none;padding:0}}.m-markdown-small pre{background:var(--code-bg);color:var(--card-foreground);margin-top:4px;padding:2px 4px;& code{color:var(--card-foreground);background:0 0;border:none;padding:0}}.m-markdown ul,.m-markdown ol{padding-inline-start:30px}.m-markdown-small ul,.m-markdown-small ol{padding-inline-start:20px}.m-markdown-small a,.m-markdown a{color:var(--blue)}.m-markdown-small img,.m-markdown img{max-width:100%}.m-markdown-small table,.m-markdown table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:min(var(--radius), .5rem);font-size:calc(var(--font-size-small) + 1px);line-height:calc(var(--font-size-small) + 4px);width:max-content;max-width:100%;margin:10px 0;display:block;overflow-x:auto}.m-markdown-small table{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 2px);margin:8px 0}.m-markdown-small td,.m-markdown-small th,.m-markdown td,.m-markdown th{vertical-align:top;border-top:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px)}.m-markdown-small tr:first-child th,.m-markdown tr:first-child th{border-top:0}.m-markdown th,.m-markdown td{padding:10px 12px}.m-markdown-small th,.m-markdown-small td{padding:8px}.m-markdown th,.m-markdown-small th{background:var(--card);vertical-align:middle;font-weight:600}.m-markdown-small table code,.m-markdown table code{font-size:calc(var(--font-size-mono) - 1px)}.m-markdown blockquote,.m-markdown-small blockquote{border-inline-start:3px solid var(--border);margin-inline:0;padding:6px 0 6px 6px}.m-markdown hr{border:1px solid var(--border)}`,Xt=Z`.btn{border-radius:var(--radius);font-weight:600;font-size:var(--font-size-small);vertical-align:middle;text-align:center;white-space:nowrap;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);user-select:none;cursor:pointer;outline:0;justify-content:center;align-items:center;padding:.45em 1em;line-height:1.25;transition:background .2s,color .2s,border-color .2s,transform .1s;display:inline-flex;&:hover{background:color-mix(in srgb, var(--primary) 28%, transparent);color:var(--foreground)}&:disabled{background:var(--muted);color:var(--muted-foreground);border-color:var(--border);cursor:not-allowed;opacity:.4;box-shadow:none}&:active{filter:brightness(85%);transition:scale;transform:scale(.97)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.btn-primary,.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);&:hover{background:var(--primary);filter:brightness(110%);color:var(--primary-foreground)}}.btn-secondary,.btn.secondary{background:var(--muted);border-color:var(--border);color:var(--foreground);box-shadow:none;&:hover{background:color-mix(in srgb, var(--muted) 80%, var(--foreground));color:var(--foreground)}}.btn-outline,.btn.thin-border{border-width:1px;border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--foreground);box-shadow:none;&:hover{background:var(--muted);border-color:var(--muted-foreground);color:var(--foreground)}}.btn-ghost,.btn.ghost{color:var(--muted-foreground);box-shadow:none;background:0 0;border-color:#0000;&:hover{background:var(--muted);color:var(--foreground)}}.btn-destructive,.btn.destructive{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);&:hover{background:var(--method-delete);color:#fff}}.btn-link,.btn.link{color:var(--blue);box-shadow:none;background:0 0;border-color:#0000;padding:0;text-decoration:underline}.btn-lg,.btn.large{font-size:var(--font-size-regular);padding:.55em 1.1em}.btn-sm,.btn.small{font-size:var(--font-size-small);padding:.3em .75em}.btn-xs,.btn.tiny{font-size:var(--font-size-xs);padding:.2em .5em}.btn-icon,.btn.circle{border-radius:50%;width:calc(2.15em + 2px);min-width:calc(2.15em + 2px);height:calc(2.15em + 2px);padding:.35em}.btn.nav{border:1px solid var(--primary);&:hover{background:var(--primary)}}.badge{border-radius:var(--radius);font-size:var(--font-size-xs);white-space:nowrap;background:var(--primary);color:var(--primary-foreground);user-select:none;border:1px solid #0000;justify-content:center;align-items:center;padding:2px 6px;font-weight:600;line-height:1;display:inline-flex}.badge-secondary{background:var(--muted);color:var(--foreground);border-color:var(--border)}.badge-outline{color:var(--foreground);border-color:var(--border);background:0 0}.badge-destructive{background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);border-color:var(--method-delete)}.badge-sm{font-size:var(--font-size-xs);padding:1px 4px}.input,input,textarea,select,pre{color:var(--foreground);background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);outline:none}textarea,pre{border-radius:min(var(--radius), .5rem)}pre{background:var(--code-bg)}button{font-family:var(--font-sans);color:var(--foreground)}.input,pre,select,textarea,input[type=file],input[type=text],input[type=password]{font-family:var(--font-mono);font-weight:400;font-size:var(--font-size-small);padding:6px 8px;transition:border-color .2s,box-shadow .2s}.input,select,input[type=text],input[type=password]{vertical-align:middle;padding:.45em .75em;line-height:1.25}.input:focus,.input:focus-visible,input[type=text]:focus,input[type=text]:focus-visible,input[type=password]:focus,input[type=password]:focus-visible,textarea:focus,textarea:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow)}.input-sm{font-size:var(--font-size-small);padding:.3em .5em}select{font-family:var(--font-sans);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E);background-position:calc(100% - 5px);background-repeat:no-repeat;background-size:10px;padding-right:2.25em}select:hover{border-color:var(--primary)}@supports (appearance:base-select){select,select::picker(select){appearance:base-select}select{background-image:none;justify-content:space-between;align-items:center;padding-right:.75em;display:inline-flex}select:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow);outline:none}select::picker(select){background:var(--input-background);color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-small);scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background);padding:4px;box-shadow:0 4px 16px #00000040}select option{border-radius:var(--radius);color:var(--foreground);cursor:pointer;font-family:var(--font-sans);font-size:var(--font-size-small);background:0 0;align-items:center;padding:4px 6px;transition:background .15s,color .15s;display:flex}select option:hover,select option:focus-visible{background:var(--primary);color:var(--primary-foreground)}select option:checked{background:color-mix(in srgb, var(--primary) 8%, transparent);color:var(--foreground);font-weight:500}select option:checked:hover,select option:checked:focus-visible{background:var(--primary);color:var(--primary-foreground)}select::picker-icon{content:"";background-color:var(--muted-foreground);transform-origin:50%;justify-content:center;align-items:center;width:12px;height:12px;margin-left:8px;transition:transform .2s,background-color .15s;display:inline-flex;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat}select:hover::picker-icon{background-color:var(--primary)}select:open::picker-icon{transform:rotate(180deg)}select option::checkmark{content:"➜";width:14px;height:14px;line-height:1;font-size:var(--font-size-xs);color:var(--primary);flex-shrink:0;justify-content:center;align-items:center;margin-right:8px;display:inline-flex}select option:not(:checked)::checkmark{visibility:hidden}select option:hover::checkmark,select option:focus-visible::checkmark,select option:checked:hover::checkmark,select option:checked:focus-visible::checkmark{color:var(--primary-foreground)}}textarea::placeholder,input[type=text]::placeholder,input[type=password]::placeholder{color:var(--muted-foreground);opacity:1}input[type=file]{font-family:var(--font-sans);cursor:pointer;background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);padding:calc(.45em - 1px)}input[type=file]::file-selector-button,input[type=file]::-webkit-file-upload-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}input[type=file]::file-selector-button,input[type=file]::file-selector-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}pre,textarea{scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background)}pre::-webkit-scrollbar,textarea::-webkit-scrollbar{width:8px;height:8px}pre::-webkit-scrollbar-track,textarea::-webkit-scrollbar-track{background:var(--input-background)}pre::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{background:var(--input);border-radius:2px}.link{font-size:var(--font-size-small);color:var(--blue);font-family:var(--font-mono);margin-bottom:2px;text-decoration:underline}input[type=checkbox]{appearance:none;box-sizing:border-box;width:3em;height:1.5em;font-size:var(--font-size-small);vertical-align:middle;background:var(--muted);border:1px solid var(--input);cursor:pointer;border-radius:999px;flex:none;margin:0;transition:background-color .2s,border-color .2s;position:relative;&:after{content:"";background:var(--background);border-radius:50%;width:calc(1.5em - 4px);height:calc(1.5em - 4px);transition:transform .2s;position:absolute;top:1px;left:1px;box-shadow:0 1px 2px #0000004d}&:checked{background:var(--green);border-color:var(--green)}&:checked:after{transform:translate(1.5em)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:disabled{opacity:.5;cursor:not-allowed}@media (prefers-reduced-motion:reduce){&,&:after{transition:none}}}`,_r=Z`.row,.col{display:flex}.row{flex-direction:row;align-items:center}.col{flex-direction:column;align-items:stretch}`,fi=Z`.auth-status{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.5rem;display:flex}.auth-list{border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);direction:ltr;margin:0;padding:0;line-height:1.5;list-style:none;container-type:inline-size}.auth-scheme{padding:calc(var(--auth-scheme-padding) * 1.5);overflow-wrap:break-word;margin:0;&+.auth-scheme{border-top:1px solid var(--border)}}.auth-scheme-body,.oauth-flow{flex-direction:column;align-items:flex-start;gap:.75em;display:flex;&>*{max-width:100%;margin:0}}.auth-scheme-header{flex-wrap:wrap;align-items:center;gap:.5em;display:flex}.auth-scheme-title{font-size:var(--font-size-regular);font-weight:600}.auth-scheme-body>.m-markdown,.auth-hint,.auth-host-note{max-width:70ch}.auth-host-toggle{font-size:var(--font-size-small)}.auth-controls{grid-template-columns:repeat(auto-fill,minmax(12em,16em));align-items:center;gap:.5em;width:100%;display:grid;&>:is(input,select){box-sizing:border-box;width:100%;min-width:0}&>.btn{justify-self:start}}.oauth-flow{padding-block:1.25em;&+.oauth-flow{border-top:1px dashed var(--border)}&:last-child{padding-bottom:0}&>.tiny-title{margin:0}}.oauth-urls{grid-template-columns:max-content minmax(0,1fr);gap:.25em 1.5em;display:grid;&>dt{color:var(--muted-foreground)}&>dd{overflow-wrap:anywhere;margin:0}}.oauth-scopes-label{color:var(--muted-foreground);margin-bottom:-.25em}.oauth-scopes{flex-direction:column;gap:.5em;display:flex}.oauth-scope-name{color:var(--foreground)}.oauth-scope-descr{color:var(--muted-foreground);&:before{content:"– "}}.auth-toggle{cursor:pointer;align-items:flex-start;gap:.625em;display:inline-flex}.oauth-resp-display:empty{display:none}@container (width<=30rem){.auth-controls{grid-template-columns:minmax(0,1fr)}.oauth-urls{grid-template-columns:minmax(0,1fr);&>dd+dt{margin-top:.375em}}}.operation-security{min-width:0;max-width:100%;font-size:var(--font-size-small);align-items:flex-start;gap:.375em;margin:0 0 12px;line-height:1.25;display:flex}.security-chips{align-items:center;row-gap:6px;&>li{align-items:center;display:inline-flex}}.value-list-items.security-chips>li:not(:last-child):after{content:"OR";font-size:var(--font-size-xs);letter-spacing:.04em;margin-inline:.625em}.security-chip{min-width:0;max-width:100%;color:var(--foreground);background:color-mix(in srgb, var(--card) 80%, transparent);border:1px solid var(--input);border-radius:var(--radius);align-items:center;gap:.375em;padding:.25em .625em;transition:color .15s,border-color .15s;display:inline-flex;&.has-details{cursor:pointer}&.has-details:is(:hover,:focus-within){color:var(--primary);border-color:var(--primary)}}.security-lock-btn{width:calc(1.75em + 2px);height:calc(1.75em + 2px);color:var(--muted-foreground);border-radius:var(--radius);flex:none;justify-content:center;align-items:center;display:inline-flex}a.security-lock-btn{transition:color .15s,background-color .15s;&:hover{color:var(--foreground);background:var(--muted)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.security-lock{stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;width:1.25em;height:1.25em}.security-chip-label{white-space:nowrap;text-overflow:ellipsis;max-width:240px;color:inherit;font:inherit;cursor:inherit;background:0 0;border:none;border-radius:0;padding:0;text-decoration:none;display:block;overflow:hidden;&:focus-visible{outline:2px solid var(--ring);outline-offset:2px}}.security-popover{position-area:bottom span-right;position-try-fallbacks:flip-block;width:max-content;max-width:min(400px,100vw - 16px);color:var(--foreground);background:var(--background);border:1px solid var(--border);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-description);text-align:start;overflow-wrap:anywhere;cursor:auto;margin:6px 0;padding:.75em 1em;line-height:1.5;inset:auto;box-shadow:0 1px 2px #0000000f,0 4px 12px #00000014}`,qr=Z`.param-list-container{container-type:inline-size}.param-list{grid-template-columns:var(--param-label-width) minmax(10rem, 1fr) minmax(0, 1.5fr);border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 4px);word-break:break-word;direction:ltr;margin:0;padding:0;list-style:none;display:grid}.param{grid-column:1/-1;grid-template-columns:subgrid;column-gap:var(--param-gap);row-gap:var(--param-row-gap);padding:var(--param-padding);margin:0;display:grid;&+.param{border-top:1px solid var(--border)}}.param-label{grid-area:1/1/span 2;min-width:0}.param-input{grid-column:2;min-width:0}.param-input :is(input[type=text],input[type=password],select){padding:.75em;line-height:1.25}@supports not (appearance:base-select){.param-input select{padding-right:2.25em}}.param-constraint{align-content:start;column-gap:var(--value-list-label-gap);row-gap:var(--param-row-gap);grid-column:3;grid-template-columns:max-content minmax(0,1fr);min-width:0;margin:0;display:grid;&>dd{min-width:0;margin:0}}.param-details{grid-column:2/-1;min-width:0;&:not(:has(*)){display:none}}.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-column:2/-1}.param-name,.param-type{text-align:right;margin:1px 0;line-height:1.35}.param-name{color:var(--foreground);font-family:var(--font-mono);&.deprecated{color:var(--destructive)}}.param-required{color:var(--destructive)}.param-deprecated-icon{stroke:var(--destructive);margin-right:-6px}.param-type{color:var(--muted-foreground);font-family:var(--font-sans)}.param-constraint-label{color:var(--muted-foreground);font-weight:600}.value-list{column-gap:var(--value-list-label-gap);grid-template-columns:max-content minmax(0,1fr);align-items:baseline;display:grid}.value-list-items{row-gap:var(--value-list-row-gap);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex;&>li{margin:0}&>li:not(:last-child):after{content:"┃";margin-inline:var(--value-list-gap);color:var(--muted-foreground)}}.value-chip{max-width:100%;font:inherit;font-family:var(--font-mono);line-height:inherit;text-align:start;overflow-wrap:anywhere;color:var(--foreground);background:color-mix(in srgb, var(--foreground) 6%, transparent);border-radius:var(--radius);cursor:pointer;border:none;margin:0;padding:0 .4em;transition:background-color .15s,color .15s;display:inline-block;&:hover{color:var(--primary);background:color-mix(in srgb, var(--primary) 14%, transparent)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:disabled{color:var(--foreground);background:color-mix(in srgb, var(--foreground) 6%, transparent);cursor:text;user-select:text}}.value-list-items:has(>li>.value-chip){column-gap:.375em;&>li:after{content:none}}.param-example-list{margin:var(--param-row-gap) 0 0;padding:0;list-style:none;&>li{margin:0 0 var(--param-row-gap);border-inline-start:2px solid var(--border);padding-inline-start:var(--param-padding)}&>li:is(:hover,:focus-within){border-inline-start-color:var(--primary)}}@container (width<=36rem){.param-list{grid-template-columns:minmax(0,1fr)}.param-label,.param-input,.param-constraint,.param-details,.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-area:auto/1}.param-label{align-items:baseline;gap:var(--param-gap);flex-wrap:wrap;display:flex}.param-name,.param-type{text-align:start}}`,gi=Z`.only-large-screen{display:none}.endpoint-head{& .path{font-family:var(--font-mono);font-size:var(--font-size-small);overflow-wrap:break-word;word-break:break-all;align-items:center;display:flex}& .descr{font-size:var(--font-size-small);color:var(--muted-foreground);overflow-wrap:break-word;word-break:break-all;align-items:center;margin-inline-start:auto;padding-inline-start:16px;font-weight:400;display:none}}.external-docs-box{background:var(--muted);border-radius:min(var(--radius), .5rem);margin:8px 0;padding:2px 8px 8px}.external-docs-link{font-family:var(--font-mono);font-size:var(--font-size-small)}.external-docs-arrow{margin-left:5px;display:inline-block;transform:rotate(270deg)scale(1.5)}.section-expand-collapse-container{justify-content:flex-end;gap:4px;display:flex}.callback-operation-list{margin-left:16px}.callback-operation-item{margin-top:12px}.callback-operation-item>.expanded-req-resp-container{flex-direction:column!important}.callback-operation-header{align-items:baseline;gap:8px;display:flex}.callback-method{vertical-align:baseline;text-align:left;border:none;width:70px;margin:0;padding:0;line-height:20px}.read-mode-group,.read-mode-tag{border-top:1px solid var(--border)}.section-gap--read-mode:is(.read-mode-group,.read-mode-tag){padding-top:24px}.section-gap--read-mode.read-mode-group{margin-top:24px;padding-bottom:0}.section-gap--read-mode.read-mode-group+.read-mode-tag{border-top:none;padding-top:.5em}.rapidoc-heading.title.tag-group{font-size:var(--font-size-regular);letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);margin:0;font-weight:600}.expanded-endpoint-body[data-first-operation-in-tag=true]{margin-top:32px}.tag-group-description{color:var(--muted-foreground);margin-top:.5em}.m-endpoint{border-radius:min(var(--radius), 1rem);--method-color:var(--method-default)}.m-endpoint.expanded{margin-bottom:16px}.m-endpoint>.endpoint-head{border:1px solid #0000;border-left-width:5px;border-top-color:var(--border);border-radius:min(var(--radius), 1rem);cursor:pointer;align-items:center;padding:6px 16px;display:flex}.m-endpoint>.endpoint-head.expanded{border-bottom-right-radius:0;border-bottom-left-radius:0}.m-endpoint>.endpoint-head:hover,.m-endpoint>.endpoint-head.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.put:hover,.m-endpoint>.endpoint-head.put.expanded{border-color:var(--method-put);background:color-mix(in srgb, var(--method-put) 10%, transparent)}.m-endpoint>.endpoint-head.post:hover,.m-endpoint>.endpoint-head.post.expanded{border-color:var(--method-post);background:color-mix(in srgb, var(--method-post) 10%, transparent)}.m-endpoint>.endpoint-head.get:hover,.m-endpoint>.endpoint-head.get.expanded{border-color:var(--method-get);background:color-mix(in srgb, var(--method-get) 10%, transparent)}.m-endpoint>.endpoint-head.delete:hover,.m-endpoint>.endpoint-head.delete.expanded{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 10%, transparent)}.m-endpoint>.endpoint-head.head:hover,.m-endpoint>.endpoint-head.head.expanded,.m-endpoint>.endpoint-head.patch:hover,.m-endpoint>.endpoint-head.patch.expanded,.m-endpoint>.endpoint-head.options:hover,.m-endpoint>.endpoint-head.options.expanded{border-color:var(--yellow);background:color-mix(in srgb, var(--yellow) 10%, transparent)}.m-endpoint>.endpoint-head.trace:hover,.m-endpoint>.endpoint-head.trace.expanded{border-color:var(--pink);background:color-mix(in srgb, var(--pink) 10%, transparent)}.m-endpoint>.endpoint-head.query:hover,.m-endpoint>.endpoint-head.query.expanded{border-color:var(--purple);background:color-mix(in srgb, var(--purple) 10%, transparent)}.m-endpoint>.endpoint-head.copy:hover,.m-endpoint>.endpoint-head.copy.expanded,.m-endpoint>.endpoint-head.purge:hover,.m-endpoint>.endpoint-head.purge.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.deprecated:hover,.m-endpoint>.endpoint-head.deprecated.expanded{border-color:var(--border);filter:opacity(.6)}.m-endpoint .endpoint-body{border-style:solid;border-width:0 1px 1px 5px;border-color:var(--method-color,var(--method-default));border-bottom-left-radius:min(var(--radius), 1rem);border-bottom-right-radius:min(var(--radius), 1rem);flex-wrap:wrap;padding:16px 0 0;box-shadow:0 4px 3px -3px #00000026}.m-endpoint .endpoint-body.get{border-color:var(--method-get)}.m-endpoint .endpoint-body.post{border-color:var(--method-post)}.m-endpoint .endpoint-body.put{border-color:var(--method-put)}.m-endpoint .endpoint-body.delete{border-color:var(--method-delete)}.m-endpoint .endpoint-body.patch{border-color:var(--method-patch)}.m-endpoint .endpoint-body.head{border-color:var(--method-head)}.m-endpoint .endpoint-body.options{border-color:var(--method-options)}.m-endpoint .endpoint-body.trace{border-color:var(--method-trace)}.m-endpoint .endpoint-body.query{border-color:var(--method-query)}.m-endpoint .endpoint-body.deprecated{border-color:var(--border);filter:opacity(.6)}.endpoint-head .deprecated{color:var(--muted-foreground);filter:opacity(.6)}.summary{padding:8px}.summary .title{overflow-wrap:anywhere}.endpoint-head .method{box-sizing:border-box;vertical-align:middle;font-size:var(--font-size-small);height:calc(var(--font-size-small) + 16px);line-height:calc(var(--font-size-small) + 8px);border-radius:var(--radius);text-align:center;text-transform:uppercase;border:2px solid var(--method-color,var(--method-default));width:60px;margin-inline-end:5px;padding:2px 5px;font-weight:700;display:inline-block}.endpoint-head .method.delete{border:2px solid var(--method-delete)}.endpoint-head .method.put{border:2px solid var(--method-put)}.endpoint-head .method.post{border:2px solid var(--method-post)}.endpoint-head .method.get{border:2px solid var(--method-get)}.endpoint-head .method.get.deprecated{border:2px solid var(--border)}.endpoint-head .method.head{border:2px solid var(--method-head)}.endpoint-head .method.patch{border:2px solid var(--method-patch)}.endpoint-head .method.options{border:2px solid var(--method-options)}.endpoint-head .method.trace{border:2px solid var(--method-trace)}.endpoint-head .method.query{border:2px solid var(--method-query)}.endpoint-head .method.copy,.endpoint-head .method.purge{border:2px solid var(--method-default)}.head{--method-color:var(--method-head)}.patch{--method-color:var(--method-patch)}.options{--method-color:var(--method-options)}.trace{--method-color:var(--method-trace)}.query{--method-color:var(--method-query)}.put{--method-color:var(--method-put)}.post{--method-color:var(--method-post)}.get{--method-color:var(--method-get)}.delete{--method-color:var(--method-delete)}.copy,.purge{--method-color:var(--method-default)}.req-resp-container{border-top:1px solid var(--border);flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.expanded-req-resp-container{border-top:none;flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.request-panel,.view-mode-request,api-response{box-sizing:border-box;flex:auto;min-width:0;min-height:100px;padding:16px 8px;overflow:hidden}.m-endpoint .request-panel,.m-endpoint .view-mode-request{border-style:dashed;border-width:0 0 1px;border-color:var(--method-color,var(--primary));flex-direction:column;display:flex}.expanded-endpoint-body .request-panel,.expanded-req-resp-container .request-panel{border:0;flex-direction:column;display:flex}.head .view-mode-request,.patch .view-mode-request,.options .view-mode-request{border-color:var(--yellow)}.put .view-mode-request{border-color:var(--orange)}.post .view-mode-request{border-color:var(--green)}.get .view-mode-request{border-color:var(--blue)}.delete .view-mode-request{border-color:var(--destructive)}.trace .view-mode-request{border-color:var(--pink)}.query .view-mode-request{border-color:var(--purple)}.copy .view-mode-request,.purge .view-mode-request{border-color:var(--method-color,var(--method-default))}@container (width>=860px){.only-large-screen{display:block}.endpoint-head .path{font-size:var(--font-size-regular)}.endpoint-head .descr{display:flex}.endpoint-head .m-markdown-small,.descr .m-markdown-small{display:block}.req-resp-container,.expanded-req-resp-container{flex-direction:row}:host([layout=column]) .req-resp-container,:host([layout=column]) .expanded-req-resp-container,.req-resp-container.column-layout,.expanded-req-resp-container.column-layout{flex-direction:column!important}:host([layout=column]) .m-endpoint .request-panel,:host([layout=column]) .view-mode-request,.m-endpoint .request-panel.column-layout,.view-mode-request.column-layout{border-width:0 0 1px;padding:16px 8px}:host([layout=column]) .expanded-endpoint-body .request-panel,:host([layout=column]) .expanded-req-resp-container .request-panel,.expanded-endpoint-body .request-panel.column-layout,.expanded-req-resp-container .request-panel.column-layout{padding:16px 8px;border:0!important}:host([layout=row]) .req-resp-container,:host([layout=row]) .expanded-req-resp-container,.req-resp-container.row-layout,.expanded-req-resp-container.row-layout{flex-direction:row}:host([layout=row]) .request-panel,:host([layout=row]) .view-mode-request,:host([layout=row]) api-response,.req-resp-container.row-layout .request-panel,.req-resp-container.row-layout .view-mode-request,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout .request-panel,.expanded-req-resp-container.row-layout .view-mode-request,.expanded-req-resp-container.row-layout api-response{flex:1;min-width:0}:host([layout=row]) .m-endpoint .request-panel.row-layout,:host([layout=row]) .view-mode-request.row-layout,.m-endpoint .request-panel.row-layout,.view-mode-request.row-layout{border-style:dashed;border-width:0 1px 0 0;border-color:var(--method-color,var(--primary));padding:16px 20px 16px 8px}:host([layout=row]) .expanded-endpoint-body .request-panel.row-layout,:host([layout=row]) .expanded-req-resp-container.row-layout .request-panel,.expanded-endpoint-body .request-panel.row-layout,.expanded-req-resp-container.row-layout .request-panel{border-style:dashed;border-width:0 1px 0 0;border-color:color-mix(in srgb, var(--method-color,var(--primary)) 50%, transparent);padding:16px 20px 16px 8px}.head .expanded-endpoint-body .request-panel,.head .expanded-req-resp-container .request-panel,.patch .expanded-endpoint-body .request-panel,.patch .expanded-req-resp-container .request-panel,.options .expanded-endpoint-body .request-panel,.options .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--yellow) 50%, transparent)}.put .expanded-endpoint-body .request-panel,.put .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--orange) 50%, transparent)}.post .expanded-endpoint-body .request-panel,.post .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--green) 50%, transparent)}.get .expanded-endpoint-body .request-panel,.get .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--blue) 50%, transparent)}.delete .expanded-endpoint-body .request-panel,.delete .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--destructive) 50%, transparent)}.trace .expanded-endpoint-body .request-panel,.trace .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--pink) 50%, transparent)}.query .expanded-endpoint-body .request-panel,.query .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--purple) 50%, transparent)}.copy .expanded-endpoint-body .request-panel,.copy .expanded-req-resp-container .request-panel,.purge .expanded-endpoint-body .request-panel,.purge .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--method-color,var(--method-default)) 50%, transparent)}:host([layout=row]) api-response,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout api-response{padding:16px 8px 16px 20px}.summary{padding:8px 16px}}`,Qa=Z`code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5}pre[class*=language-]{border-radius:min(var(--radius), .5rem);background:var(--code-bg);border:1px solid var(--input);margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{white-space:normal;border-radius:min(var(--radius), .5rem)}::highlight(comment),::highlight(quote){color:var(--syntax-comment)}::highlight(keyword),::highlight(storage),::highlight(at-rule),::highlight(doctype),::highlight(important),::highlight(section){color:var(--syntax-keyword)}::highlight(operator),::highlight(punctuation){color:var(--syntax-operator)}::highlight(string),::highlight(regexp),::highlight(attribute-value),::highlight(link),::highlight(raw){color:var(--syntax-string)}::highlight(numeric),::highlight(boolean),::highlight(constant),::highlight(symbol),::highlight(character-entity),::highlight(anchor),::highlight(entity){color:var(--syntax-constant)}::highlight(function),::highlight(decorator),::highlight(animation){color:var(--syntax-function)}::highlight(type),::highlight(support){color:var(--syntax-type)}::highlight(variable),::highlight(interpolation){color:var(--syntax-variable)}::highlight(property),::highlight(key),::highlight(attribute-name){color:var(--syntax-property)}::highlight(tag){color:var(--syntax-tag)}::highlight(selector){color:var(--syntax-selector)}::highlight(inserted){color:var(--syntax-inserted)}::highlight(deleted){color:var(--syntax-deleted)}`,Rr=Z`.tab-panel{min-width:0}.tabs,.tab-buttons{min-height:2.5em;box-shadow:inset 0 -1px 0 var(--border);font-size:var(--font-size-small);scrollbar-width:none;align-items:center;gap:1.25em;display:flex;overflow-x:auto;&::-webkit-scrollbar{display:none}}.tab,.tab-btn{font-family:var(--font-sans);font-size:inherit;letter-spacing:.04em;white-space:nowrap;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;flex:none;align-self:stretch;margin:0;padding:0 .125em;font-weight:600;transition:color .15s,border-color .15s;&:hover{color:var(--foreground)}&.tab-active,&.active{color:var(--primary);border-bottom-color:var(--primary)}&:focus-visible{outline:2px solid var(--ring);outline-offset:-2px}}.tab-bar-end{color:var(--muted-foreground);flex:none;margin-inline-start:auto}select.select-sm{max-width:100%;font-size:var(--font-size-small);background-color:#0000;padding:.3em .75em}@supports not (appearance:base-select){select.select-sm{padding-right:2em}}.example-select{width:fit-content;margin-bottom:.75em;display:flex}.tab-content{min-width:0;min-height:50px;padding-top:.75em;position:relative;& .toolbar-btn{position:absolute;top:12px;right:8px}}`,yi=Z`#advanced-search-btn{width:75px;margin-left:5px;display:none}.btn-clear-filter{color:var(--foreground);width:75px;margin-left:5px}.nav-bar-header{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(12px);flex-direction:column;width:100%;transition:box-shadow .2s,background .2s;display:flex;position:sticky;top:0}@container scroll-state(scrollable:top){.nav-bar-header{box-shadow:0 4px 12px -2px #00000040,0 2px 4px -1px #00000026}}.nav-bar-search-container{box-sizing:border-box;flex-direction:row;justify-content:center;align-items:stretch;width:100%;padding:8px 16px 12px;display:flex}.nav-bar-search-container.has-bottom-border{border-bottom:1px solid var(--muted)}.nav-bar-search-input-wrapper{flex:1;line-height:22px;display:flex;position:relative}.nav-bar-search-input-wrapper .nav-bar-search-input{width:100%;color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);background:var(--input-background);font-family:inherit;line-height:1.25;font-size:calc(var(--font-size-small) + 1px);box-sizing:border-box;padding:.45em 28px .45em 10px;transition:border-color .2s,box-shadow .2s}.nav-bar-search-input:focus{border-color:var(--sidebar-ring);box-shadow:0 0 0 2px color-mix(in srgb, var(--sidebar-ring) 25%, transparent);outline:none}.nav-bar-search-icon{font-size:var(--font-size-regular);cursor:pointer;color:var(--foreground);opacity:.6;user-select:none;position:absolute;top:50%;right:8px;transform:translateY(-50%)}svg.nav-bar-search-icon{cursor:default;pointer-events:none}.nav-bar-search-icon:hover{opacity:1;color:var(--foreground)}#nav-bar-btn{background:var(--card);width:50px;height:50px;color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;z-index:10;font-size:36px;line-height:30px;position:absolute;top:16px;right:16px;box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030;&:hover{border-color:var(--primary);color:var(--primary)}}.nav-bar{width:0;height:100%;color:var(--sidebar-foreground);background:var(--sidebar);background-blend-mode:multiply;border-right:1px solid var(--sidebar-border);font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 6px);word-break:break-word;flex-flow:column;position:relative;overflow:hidden;&.floating-nav{z-index:5;width:330px;position:absolute;top:0;left:0;overflow:scroll}}.nav-bar-info:focus-visible,.nav-bar-tag:focus-visible,.nav-bar-path:focus-visible{box-shadow:none;outline-offset:-4px;outline:1px solid}.nav-bar-expand-all:focus-visible,.nav-bar-collapse-all:focus-visible,.nav-bar-tag-icon:focus-visible{box-shadow:none;outline-offset:2px;outline:1px solid}::slotted([slot=nav-logo]){max-height:var(--sidebar-logo-max-height);box-sizing:border-box;object-fit:contain;width:auto;padding:16px 16px 0;overflow:hidden}.nav-scroll{overflow:hidden auto;overflow-y:overlay;scrollbar-width:thin;scrollbar-color:var(--muted) transparent;scroll-padding-top:60px;container-type:scroll-state}.nav-bar-tag{flex-direction:row;justify-content:space-between;align-items:center;display:flex}.nav-bar-paths-under-tag,.nav-bar-tags-under-group{interpolate-size:allow-keywords;height:auto;transition:height .25s,visibility;overflow:hidden}.nav-bar-tag-and-paths.collapsed .nav-bar-paths-under-tag,.nav-bar-tag-group.collapsed .nav-bar-tags-under-group{visibility:hidden;height:0;transition:height .25s,visibility 0s linear .25s}@media (prefers-reduced-motion:reduce){.nav-bar-paths-under-tag,.nav-bar-tags-under-group{transition:none}}.nav-bar-paths-under-tag{padding-left:10px}.nav-bar-expand-all{cursor:pointer;margin-inline-end:10px;transform:rotate(90deg)}.nav-bar-collapse-all{cursor:pointer;transform:rotate(270deg)}.nav-bar-expand-all:hover,.nav-bar-collapse-all:hover{color:var(--primary)}.nav-bar-tag-icon,.nav-bar-tag-group-icon{color:var(--foreground);cursor:pointer;user-select:none;justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;line-height:1;transition:color .15s;display:inline-flex}.nav-bar-tag-icon:hover,.nav-bar-tag-group-icon:hover{color:var(--foreground)}.nav-bar-tag-icon:after,.nav-bar-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon:after,.nav-bar-tag-group.collapsed .nav-bar-tag-group-icon:after{transform:rotate(-90deg)}.nav-bar-tag-and-paths.expanded .nav-bar-tag-icon:after,.nav-bar-tag-group.expanded .nav-bar-tag-group-icon:after{transform:rotate(0)}.nav-scroll::-webkit-scrollbar{width:8px}.nav-scroll::-webkit-scrollbar-track{background:0 0}.nav-scroll::-webkit-scrollbar-thumb{background:var(--muted)}.nav-bar-tag-group{margin-top:6px;margin-bottom:2px}.nav-bar-tag-group-header{text-transform:uppercase;letter-spacing:.05em;color:var(--sidebar-foreground);cursor:pointer;user-select:none;border-inline-start:4px solid #0000;justify-content:space-between;align-items:center;padding:8px 15px 4px 6px;font-weight:700;transition:border-color .15s,color .15s;display:flex}.nav-bar-tag-group-header:hover{color:var(--sidebar-accent-foreground)}.nav-bar-tag-group-title{flex:1;min-width:0}.nav-bar-tags-under-group{border-inline-start:1px solid var(--border);margin-inline-start:10px}.nav-bar-tag{color:var(--primary);text-transform:capitalize;border-inline-start:4px solid #0000;min-width:0;padding:10px 15px 10px 10px;font-weight:600}.nav-bar-tag a,.nav-bar-tag-title,a.nav-bar-tag-title{color:inherit;flex:1;min-width:0;text-decoration:none}.nav-bar-tag a:hover,.nav-bar-tag-title:hover,a.nav-bar-tag-title:hover{color:inherit;text-decoration:none}a.nav-bar-tag{text-decoration:none}.nav-bar-components,.nav-bar-h1,.nav-bar-h2,.nav-bar-info,.nav-bar-tag,.nav-bar-path{cursor:pointer;box-sizing:border-box;width:100%;color:var(--sidebar-foreground);background:0 0;border:none;border-inline-start:4px solid #0000;text-decoration:none;transition:background .15s,color .15s;display:flex}.nav-bar-path,a.nav-bar-path{justify-content:space-between;align-items:center;gap:8px;min-width:0}a.nav-bar-info:hover,a.nav-bar-path:hover{text-decoration:none}.nav-bar-path>*{pointer-events:none}.nav-bar-path.deprecated{filter:opacity(.5)}.portal-sidebar-footer-link{padding:16px 12px}.nav-bar-path-label{flex:1;align-items:baseline;min-width:0;display:flex}.nav-bar-webhook{font-weight:700;font-size:var(--font-size-xs);flex-shrink:0;margin-right:8px}.nav-bar-path-label .mono-font{font-family:var(--font-mono)}.nav-method{font-weight:700;font-size:var(--font-size-xs);white-space:nowrap;flex-shrink:0;margin-inline-start:auto;&.false{display:none}}.nav-method.as-colored-text{color:var(--method-default)}.nav-method.as-colored-text.get{color:var(--method-get)}.nav-method.as-colored-text.put{color:var(--method-put)}.nav-method.as-colored-text.post{color:var(--method-post)}.nav-method.as-colored-text.delete{color:var(--method-delete)}.nav-method.as-colored-text.head{color:var(--method-head)}.nav-method.as-colored-text.patch{color:var(--method-patch)}.nav-method.as-colored-text.options{color:var(--method-options)}.nav-method.as-colored-text.trace{color:var(--method-trace)}.nav-method.as-colored-text.query{color:var(--method-query)}.nav-method.as-colored-text.copy,.nav-method.as-colored-text.purge{color:var(--method-default)}.nav-method.as-colored-block{text-align:center;min-width:32px;color:var(--method-badge-fg);background:var(--method-default);border-radius:4px;padding:1px 4px;font-weight:600}:host([color-scheme=light]) .nav-method.as-colored-block{color:var(--method-badge-fg)}@media (prefers-color-scheme:light){:host([color-scheme=system]) .nav-method.as-colored-block{color:var(--method-badge-fg)}}.colored-block .nav-method.as-colored-block{outline:1px solid}.nav-method.as-colored-block.get{background:var(--method-get)}.nav-method.as-colored-block.put{background:var(--method-put)}.nav-method.as-colored-block.post{background:var(--method-post)}.nav-method.as-colored-block.delete{background:var(--method-delete)}.nav-method.as-colored-block.head{background:var(--method-head)}.nav-method.as-colored-block.patch{background:var(--method-patch)}.nav-method.as-colored-block.options{background:var(--method-options)}.nav-method.as-colored-block.trace{background:var(--method-trace)}.nav-method.as-colored-block.query{background:var(--method-query)}.nav-method.as-colored-block.copy,.nav-method.as-colored-block.purge{background:var(--method-default)}.nav-bar-h1,.nav-bar-h2,.nav-bar-path{padding:var(--sidebar-item-padding);font-weight:400}.nav-bar-info{padding:12px 10px;font-weight:600}.nav-bar-section{color:var(--foreground);padding:var(--sidebar-item-padding);flex-direction:row;justify-content:space-between;font-weight:700;display:flex}.nav-bar-section.operations{display:none!important}.nav-bar-section:first-child{display:none}.nav-bar-h2{padding-inline-start:28px}.nav-bar-h1.active,.nav-bar-h2.active,.nav-bar-info.active,.nav-bar-tag.active,.nav-bar-path.active,.nav-bar-section.operations.active,.nav-bar-h1.left-bar.active,.nav-bar-h2.left-bar.active,.nav-bar-info.left-bar.active,.nav-bar-tag.left-bar.active,.nav-bar-path.left-bar.active,.nav-bar-section.left-bar.operations.active{border-inline-start:4px solid var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-h1.active:hover,.nav-bar-h2.active:hover,.nav-bar-info.active:hover,.nav-bar-tag.active:hover,.nav-bar-path.active:hover,.nav-bar-section.operations.active:hover,.nav-bar-h1.left-bar.active:hover,.nav-bar-h2.left-bar.active:hover,.nav-bar-info.left-bar.active:hover,.nav-bar-tag.left-bar.active:hover,.nav-bar-path.left-bar.active:hover,.nav-bar-section.left-bar.operations.active:hover{color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header{border-inline-start-color:var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag:hover,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header:hover{color:var(--sidebar-primary)}.nav-bar-h1:hover,.nav-bar-h2:hover,.nav-bar-info:hover,.nav-bar-tag:hover,.nav-bar-path:hover{color:var(--sidebar-accent-foreground);background:var(--sidebar-accent)}:host([nav-item-overflow=ellipsis]) .nav-bar-tag-group-title,:host(:not([nav-item-overflow])) .nav-bar-tag-group-title,.overflow-ellipsis .nav-bar-tag-group-title,:host([nav-item-overflow=ellipsis]) .nav-bar-tag-title,:host(:not([nav-item-overflow])) .nav-bar-tag-title,.overflow-ellipsis .nav-bar-tag-title,:host([nav-item-overflow=ellipsis]) .nav-bar-path-label,:host(:not([nav-item-overflow])) .nav-bar-path-label,.overflow-ellipsis .nav-bar-path-label,:host([nav-item-overflow=ellipsis]) .nav-bar-info,:host(:not([nav-item-overflow])) .nav-bar-info,.overflow-ellipsis .nav-bar-info,:host([nav-item-overflow=ellipsis]) .nav-bar-section-title,:host(:not([nav-item-overflow])) .nav-bar-section-title,.overflow-ellipsis .nav-bar-section-title{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}:host([nav-item-overflow=wrap]) .nav-bar-tag-group-title,.overflow-wrap .nav-bar-tag-group-title,:host([nav-item-overflow=wrap]) .nav-bar-tag-title,.overflow-wrap .nav-bar-tag-title,:host([nav-item-overflow=wrap]) .nav-bar-path-label,.overflow-wrap .nav-bar-path-label,:host([nav-item-overflow=wrap]) .nav-bar-info,.overflow-wrap .nav-bar-info,:host([nav-item-overflow=wrap]) .nav-bar-section-title,.overflow-wrap .nav-bar-section-title{white-space:normal;text-overflow:clip;word-break:break-word;overflow:visible}`,bi=Z`#api-title .version{vertical-align:middle;border:1px solid var(--border);border-radius:var(--radius);background:var(--muted);color:var(--muted-foreground);font-family:var(--font-mono);font-size:var(--font-size-small);letter-spacing:normal;margin-inline-start:.5em;padding:.125em .5em;font-weight:500;line-height:1.5;display:inline-block}#api-info{font-size:calc(var(--font-size-regular) - 1px);margin-top:8px}#api-info span:before{content:"|";opacity:.5;text-align:center;width:15px;display:inline-block}#api-info span:first-child:before{content:"";width:0}`,ht=Z``,Yd=Z`*,:before,:after{box-sizing:border-box}.dialog-box{background:var(--card);color:var(--card-foreground);border-radius:min(var(--radius), .5rem);border:1px solid var(--border);width:70vw;max-width:70vw;height:70vh;max-height:70vh;padding:0;position:absolute;top:100px;overflow:hidden;box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.dialog-box-header{z-index:10;backdrop-filter:blur(12px);border-bottom:1px solid var(--border);border-top-left-radius:min(var(--radius), .5rem);border-top-right-radius:min(var(--radius), .5rem);align-self:stretch;align-items:center;min-height:60px;max-height:60px;padding:0 16px;display:flex;position:sticky;top:0;overflow:hidden;& button{color:var(--foreground);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:50%;outline:none;margin-inline-end:-8px;font-size:1.5rem;font-weight:700;line-height:1;&:hover{border-color:var(--primary)}}}.dialog-box-content{height:100%;padding:1rem;display:block;overflow:auto}.dialog-box-title{font-size:var(--h2-font-size);flex-grow:1}.search-options-row{flex-wrap:wrap;gap:16px;margin:8px 0 24px;display:flex}.search-option-label{cursor:pointer;user-select:none;align-items:center;gap:.5em;display:inline-flex}.search-option-label input{cursor:pointer}.search-match-row{cursor:pointer;border-bottom:1px solid var(--border);padding:5px}.search-match-row *{pointer-events:none}`,Qd=Z`rapi-doc:not(:defined){display:none}:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.body{background:var(--background);width:100%;height:100%;display:flex;position:relative;overflow:hidden}.main-content{scrollbar-width:thin;scrollbar-color:var(--border) transparent;flex:1;height:100%;margin:0;padding:0;display:block;overflow:hidden auto;container-type:inline-size}:host([auto-height]),:host([auto-height=true]),:host([auto-height]) .body,:host([auto-height=true]) .body,:host([auto-height]) .main-content,:host([auto-height=true]) .main-content{height:auto;overflow:visible}.main-content-inner--view-mode{padding:0 8px}.main-content-inner--read-mode{padding:0 8px min(70vh,600px)}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background:var(--border)}.section-gap.section-tag{border-bottom:1px solid var(--border)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{scroll-margin-top:var(--scroll-margin-top);padding:0 4px}:host([auto-height]) .main-content-inner--read-mode,:host([auto-height=true]) .main-content-inner--read-mode{padding-bottom:40px}.section-tag-header{cursor:n-resize;padding:12px 0;position:relative}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-header:hover:after{color:var(--primary);content:"⬆";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:after{color:var(--border);content:"⬇";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:hover:after{color:var(--primary)}.collapsed .section-tag-body{display:none}.section-gap.section-tag-group{border-bottom:2px solid var(--border);margin-top:24px;margin-bottom:8px}.section-tag-group-header{cursor:pointer;user-select:none;justify-content:space-between;align-items:center;padding:16px 0 8px;display:flex;position:relative}.section-tag-group-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-group.collapsed .section-tag-group-body{display:none}.section-tag-group-body{border-inline-start:2px solid var(--border);margin-inline-start:4px;padding-inline-start:12px}.section-tag-group-icon{color:var(--muted-foreground);justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;display:inline-flex}.section-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.section-tag-group.collapsed .section-tag-group-icon:after{transform:rotate(-90deg)}::slotted([slot=fixed-header]){background:var(--background);max-height:40px;color:var(--foreground);text-align:center;padding:4px 12px;overflow:hidden}::slotted([slot=logo]){object-fit:contain;width:auto;height:36px;margin-left:5px}.only-large-screen-flex,.only-large-screen{display:none}.main-header{background:var(--background);color:var(--foreground);min-height:48px;padding:8px 4px}.main-header-controls{flex:1;align-items:center;margin:0 8px;display:flex}.header-title{font-size:calc(var(--font-size-regular) + 8px);padding:0 8px}input.header-input{background:var(--input-background);color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius);flex:1;padding-right:24px}input.header-input::placeholder{opacity:.4}.loader{border:4px solid var(--muted);border-top:4px solid var(--primary);border-radius:50%;width:36px;height:36px;margin:16px auto;animation:2s linear infinite spin}.expanded-endpoint-body{padding:6px 0;position:relative}.expanded-endpoint-body .tag-description{background:var(--code-bg);border-radius:min(var(--radius), .5rem);transition:max-height .2s ease-out}.expanded-endpoint-body .tag-icon{transition:transform .2s ease-out}.expanded-endpoint-body .tag-icon.expanded{transform:rotate(180deg)}.divider{border-top:1px solid var(--border);width:100%;margin:24px 0}.downloads-bar{flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;margin:12px 0;display:flex}.download-btn{white-space:nowrap;vertical-align:middle;box-sizing:border-box;justify-content:center;align-items:center;min-width:170px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.download-btn.view-spec{min-width:190px}.download-select{white-space:nowrap;vertical-align:middle;box-sizing:border-box;cursor:pointer;justify-content:space-between;align-items:center;min-width:180px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.header-action-icon{font-size:var(--font-size-regular);cursor:pointer;user-select:none;margin:6px 5px 0 -24px}#spec-not-found{border:1px dashed var(--border);overflow-wrap:anywhere;font-size:var(--font-size-small);color:var(--destructive);font-family:var(--font-mono);justify-content:center;align-items:center;padding:12px;display:flex}.server-opt-row{align-items:baseline;gap:6px;margin:4px 0;display:flex}.server-opt-row input[type=radio],.server-opt-row label{cursor:pointer}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@container (width>=768px){.nav-bar{width:260px;display:flex}#nav-bar-btn{display:none}#advanced-search-btn,.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 0 0 24px}.section-gap--focused-mode,.section-gap--read-mode{padding:24px 8px}.endpoint-body{padding:36px 0 48px;position:relative}}@container (width>=1024px){.nav-bar{width:var(--sidebar-width);display:flex}#nav-bar-btn{display:none}#advanced-search-btn{display:block}.section-gap--focused-mode{padding:12px 80px}.section-gap--read-mode{padding:24px 80px 12px}}`,Ge="ember",vi={ember:{dark:`
|
|
81
|
+
--primary: #f76b39;
|
|
82
|
+
--primary-foreground: #000000;
|
|
83
|
+
`,light:`
|
|
84
|
+
--primary: #f76b39;
|
|
85
|
+
--primary-foreground: #000000;
|
|
86
|
+
`},carbon:{dark:`
|
|
87
|
+
--primary: #fafafa;
|
|
88
|
+
--primary-foreground: #18181b;
|
|
89
|
+
--ring: #a1a1aa;
|
|
90
|
+
--background: #121214;
|
|
91
|
+
--foreground: #e4e4e7;
|
|
92
|
+
`,light:`
|
|
93
|
+
--primary: #18181b;
|
|
94
|
+
--primary-foreground: #fafafa;
|
|
95
|
+
--ring: #52525b;
|
|
96
|
+
--background: #ffffff;
|
|
97
|
+
--foreground: #18181b;
|
|
98
|
+
`},cobalt:{dark:`
|
|
99
|
+
--primary: #7aa2d6;
|
|
100
|
+
--primary-foreground: #0f1a2a;
|
|
101
|
+
--background: #1e2530;
|
|
102
|
+
--foreground: #b4bcc8;
|
|
103
|
+
--card: #181e27;
|
|
104
|
+
--card-foreground: #ced5df;
|
|
105
|
+
`,light:`
|
|
106
|
+
--primary: #3a6cb0;
|
|
107
|
+
--primary-foreground: #ffffff;
|
|
108
|
+
--background: #ffffff;
|
|
109
|
+
--foreground: #243244;
|
|
110
|
+
--card: color-mix(in srgb, var(--background) 94%, var(--foreground));
|
|
111
|
+
--card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
|
|
112
|
+
`},jade:{dark:`
|
|
113
|
+
--primary: #00d390;
|
|
114
|
+
--primary-foreground: #0b1f17;
|
|
115
|
+
--background: #1d232a;
|
|
116
|
+
--foreground: #a6adbb;
|
|
117
|
+
--card: #181e25;
|
|
118
|
+
--card-foreground: #c8cfd9;
|
|
119
|
+
`,light:`
|
|
120
|
+
--primary: #047857;
|
|
121
|
+
--primary-foreground: #ffffff;
|
|
122
|
+
--background: #ffffff;
|
|
123
|
+
--foreground: #1a2e26;
|
|
124
|
+
--card: color-mix(in srgb, var(--background) 94%, var(--foreground));
|
|
125
|
+
--card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
|
|
126
|
+
`},indigo:{dark:`
|
|
127
|
+
--primary: #818cf8;
|
|
128
|
+
--primary-foreground: #1e1b4b;
|
|
129
|
+
--background: #0f0e1c;
|
|
130
|
+
--foreground: #e4e2f5;
|
|
131
|
+
`,light:`
|
|
132
|
+
--primary: #4f46e5;
|
|
133
|
+
--primary-foreground: #ffffff;
|
|
134
|
+
--background: #ffffff;
|
|
135
|
+
--foreground: #1e1b3a;
|
|
136
|
+
`}},xi=Object.keys(vi);function ep(e,{dark:t,light:r}){let a=s=>{let n=s?`[color-scheme='${s}']`:"",i=[`:host([theme='${e}']${n})`];return e==="ember"&&i.push(`:host(:not([theme])${n})`),i.join(`,
|
|
137
|
+
`)};return`
|
|
138
|
+
/* --------- ${e.toUpperCase()}${e==="ember"?" (default)":""} --------- */
|
|
139
|
+
${a()} {${t}}
|
|
140
|
+
${a("light")} {${r}}
|
|
141
|
+
@media (prefers-color-scheme: light) {
|
|
142
|
+
${a("system")} {${r}}
|
|
143
|
+
}
|
|
144
|
+
`}var tp=bn(Object.entries(vi).map(([e,t])=>ep(e,t)).join(""));function mt(e){return!e||typeof e!="string"?!1:/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.trim())}function ft(e){if(!e||typeof e!="string")return{theme:Ge};let t=e.trim(),r=t.toLowerCase();return xi.includes(r)?{theme:r}:mt(t)?{theme:t}:{theme:Ge}}function rp(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length===6||t.length===8){let r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return(r*299+a*587+s*114)/1e3>=128}return!1}function gt(e,t){if(!e||!e.style)return;if(typeof t!="string"||xi.includes(t.trim().toLowerCase())||!mt(t)){e.style.removeProperty("--primary"),e.style.removeProperty("--primary-foreground");return}let r=t.trim();e.style.setProperty("--primary",r);let a=rp(r)?"#000000":"#ffffff";e.style.setProperty("--primary-foreground",a)}var wi=Z`:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Roboto Mono", monospace;--heading-font:var(--font-sans);--heading-weight:600;--heading-line-height:1.25;--heading-letter-spacing:normal;--heading-color:var(--foreground);--heading-margin-top:1.5em;--heading-margin-bottom:.5em;--h1-font-size:2rem;--h2-font-size:1.5rem;--h3-font-size:1.25rem;--h4-font-size:1rem;--h5-font-size:.875rem;--h6-font-size:.8125rem;--label-heading-font-size:var(--font-size-small);--line-height:1.6;--paragraph-spacing:1em;--radius:.25rem;--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--resp-area-height:400px;--table-schema-key-width:240px;--table-schema-key-text-overflow:ellipsis;--table-schema-key-whitespace:nowrap;--scroll-margin-top:120px;--param-label-width:12rem;--param-gap:.5rem;--param-row-gap:.25rem;--param-padding:.5rem;--auth-scheme-padding:.75rem;--value-list-gap:.375rem;--value-list-row-gap:.125rem;--value-list-label-gap:.25rem;--ring:var(--primary);--focus-shadow:0 0 0 1px transparent, 0 0 0 2px color-mix(in srgb, var(--ring) 40%, transparent);--selection-bg:color-mix(in srgb, var(--primary) 25%, transparent);--selection-fg:var(--foreground);--sidebar-width:18.75rem;--sidebar-item-padding:.4375rem 1rem .4375rem .625rem;--sidebar-logo-max-height:60px;--sidebar:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-accent-foreground:var(--foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}:host([radius=none]){--radius:0px}:host([radius=sm]),:host(:not([radius])){--radius:.25rem}:host([radius=md]){--radius:.375rem}:host([radius=lg]){--radius:.5rem}:host([radius=full]){--radius:9999px}:host([scale=sm]){--font-size-xs:11px;--font-size-small:11px;--font-size-description:12px;--font-size-mono:12px;--font-size-regular:13px;--sidebar-width:17rem}:host([scale=default]),:host(:not([scale])){--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--sidebar-width:18.75rem}:host([scale=lg]){--font-size-xs:12px;--font-size-small:14px;--font-size-description:15px;--font-size-mono:15px;--font-size-regular:16px;--sidebar-width:21rem}:host([nav-item-spacing=compact]){--sidebar-item-padding:.3125rem 1rem .3125rem .625rem}:host([nav-item-spacing=default]),:host(:not([nav-item-spacing])){--sidebar-item-padding:.4375rem 1rem .4375rem .625rem}:host([nav-item-spacing=relaxed]){--sidebar-item-padding:.625rem 1rem .625rem .625rem}:host,:host([color-scheme=dark]),:host([color-scheme=system]),:host(:not([color-scheme])){--background:#1f1f23;--foreground:#d4d4d8;--card:color-mix(in srgb, var(--background) 92%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #fff);--muted:color-mix(in srgb, var(--background) 86%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 65%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 88%, var(--foreground));--input:oklch(from var(--border) calc(l + .05) c h);--input-background:color-mix(in srgb, var(--background) 80%, #000);--method-get:#5c98f9;--method-post:#68cc97;--method-put:#f59e0b;--method-delete:#f75252;--method-patch:#a78bfa;--method-head:#eab308;--method-options:#06b6d4;--method-trace:#ec4899;--method-query:#818cf8;--method-default:#64748b;--method-badge-fg:#000;--destructive:#ef4444;--blue:#3b82f6;--green:#10b981;--orange:#f59e0b;--red:#ef4444;--purple:#8b5cf6;--yellow:#eab308;--pink:#ec4899;--brown:#d97706;--syntax-comment:#8b949e;--syntax-keyword:#ff7b72;--syntax-operator:#c9d1d9;--syntax-string:#a5d6ff;--syntax-constant:#79c0ff;--syntax-function:#d2a8ff;--syntax-type:#d2a8ff;--syntax-variable:#ffa657;--syntax-property:#79c0ff;--syntax-tag:#7ee787;--syntax-selector:#d2a8ff;--syntax-inserted:#7ee787;--syntax-deleted:#ff7b72;--code-bg:var(--input-background)}:host([color-scheme=light]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 96%, var(--foreground))}@media (prefers-color-scheme:light){:host([color-scheme=system]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 96%, var(--foreground))}}${tp}`,ap=/[\s#:?&={}]/g,Yt="_rapidoc_api_key";function Ir(e){return new Promise(t=>setTimeout(t,e))}function Qt(e,t){let r=t.target,a=document.createElement("textarea");a.value=e,a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy"),r.innerText="Copied",setTimeout(()=>{r.innerText="Copy"},5e3)}catch{}document.body.removeChild(a)}function sp(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}function Lr(e="",t,r=""){return!e||`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${r}`.toLowerCase().includes(e.toLowerCase())}function es(e){return!e||typeof e!="object"?!1:e.xInternal===!0||e.xInternal==="true"||e.xHidden===!0||e.xHidden==="true"||e["x-internal"]===!0||e["x-internal"]==="true"||e["x-hidden"]===!0||e["x-hidden"]==="true"||e.rawOperation?.["x-internal"]===!0||e.rawOperation?.["x-internal"]==="true"||e.rawOperation?.["x-hidden"]===!0||e.rawOperation?.["x-hidden"]==="true"}function ts(e,t=new Set){return e&&Object.keys(e).forEach(r=>{t.add(r),e[r].properties?ts(e[r].properties,t):e[r].items?.properties&&ts(e[r].items?.properties,t)}),t}function np(e,t,r=[]){if(!e.trim()||r.length===0)return;let a=[];return t.forEach(s=>{s.paths.forEach(n=>{let i="";if(r.includes("search-api-path")&&(i=n.path),r.includes("search-api-descr")&&(i=`${i} ${(n.summary||"")+(n.description||"")}`),r.includes("search-api-params")&&(i=`${i} ${n.parameters?.map(o=>o.name).join(" ")||""}`),r.includes("search-api-request-body")&&n.requestBody){let o=new Set;for(let l in n.requestBody?.content)n.requestBody.content[l].schema?.properties&&(o=ts(n.requestBody.content[l].schema?.properties)),i=`${i} ${[...o].join(" ")}`}r.includes("search-api-resp-descr")&&(i=`${i} ${Object.values(n.responses).map(o=>o.description||"").join(" ")}`),i.toLowerCase().includes(e.trim().toLowerCase())&&a.push({elementId:n.elementId,method:n.method,path:n.path,summary:n.summary||n.description||"",deprecated:n.deprecated})})}),a}function ki(e,t){if(e){let r=document.createElement("a");document.body.appendChild(r),r.style="display: none",r.href=e,r.download=t,r.click(),r.remove()}}function $i(e){if(e){let t=document.createElement("a");document.body.appendChild(t),t.style="display: none",t.href=e,t.target="_blank",t.click(),t.remove()}}var rs=Symbol.for("yaml.alias"),as=Symbol.for("yaml.document"),Ie=Symbol.for("yaml.map"),Si=Symbol.for("yaml.pair"),ke=Symbol.for("yaml.scalar"),yt=Symbol.for("yaml.seq"),pe=Symbol.for("yaml.node.type"),bt=e=>!!e&&typeof e=="object"&&e[pe]===rs,Br=e=>!!e&&typeof e=="object"&&e[pe]===as,er=e=>!!e&&typeof e=="object"&&e[pe]===Ie,X=e=>!!e&&typeof e=="object"&&e[pe]===Si,K=e=>!!e&&typeof e=="object"&&e[pe]===ke,tr=e=>!!e&&typeof e=="object"&&e[pe]===yt;function Y(e){if(e&&typeof e=="object")switch(e[pe]){case Ie:case yt:return!0}return!1}function Q(e){if(e&&typeof e=="object")switch(e[pe]){case rs:case Ie:case ke:case yt:return!0}return!1}var Ai=e=>(K(e)||Y(e))&&!!e.anchor,Xe=Symbol("break visit"),ip=Symbol("skip children"),rr=Symbol("remove node");function vt(e,t){let r=op(t);Br(e)?xt(null,e.contents,r,Object.freeze([e]))===rr&&(e.contents=null):xt(null,e,r,Object.freeze([]))}vt.BREAK=Xe,vt.SKIP=ip,vt.REMOVE=rr;function xt(e,t,r,a){let s=lp(e,t,r,a);if(Q(s)||X(s))return cp(e,a,s),xt(e,s,r,a);if(typeof s!="symbol"){if(Y(t)){a=Object.freeze(a.concat(t));for(let n=0;n<t.items.length;++n){let i=xt(n,t.items[n],r,a);if(typeof i=="number")n=i-1;else{if(i===Xe)return Xe;i===rr&&(t.items.splice(n,1),--n)}}}else if(X(t)){a=Object.freeze(a.concat(t));let n=xt("key",t.key,r,a);if(n===Xe)return Xe;n===rr&&(t.key=null);let i=xt("value",t.value,r,a);if(i===Xe)return Xe;i===rr&&(t.value=null)}}return s}function op(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function lp(e,t,r,a){if(typeof r=="function")return r(e,t,a);if(er(t))return r.Map?.(e,t,a);if(tr(t))return r.Seq?.(e,t,a);if(X(t))return r.Pair?.(e,t,a);if(K(t))return r.Scalar?.(e,t,a);if(bt(t))return r.Alias?.(e,t,a)}function cp(e,t,r){let a=t[t.length-1];if(Y(a))a.items[e]=r;else if(X(a))e==="key"?a.key=r:a.value=r;else if(Br(a))a.contents=r;else{let s=bt(a)?"alias":"scalar";throw Error(`Cannot replace node with ${s} parent`)}}var dp={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},pp=e=>e.replace(/[!,[\]{}]/g,t=>dp[t]),wt=class qe{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},qe.defaultYaml,t),this.tags=Object.assign({},qe.defaultTags,r)}clone(){let t=new qe(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new qe(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:qe.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},qe.defaultTags)}return t}add(t,r){this.atNextDocument&&=(this.yaml={explicit:qe.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},qe.defaultTags),!1);let a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;let[n,i]=a;return this.tags[n]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[n]=a;if(n==="1.1"||n==="1.2")return this.yaml.version=n,!0;{let i=/^\d+\.\d+$/.test(n);return r(6,`Unsupported YAML version ${n}`,i),!1}}default:return r(0,`Unknown directive ${s}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let i=t.slice(2,-1);return i==="!"||i==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),i)}let[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||r(`The ${t} tag has no suffix`);let n=this.tags[a];if(n)try{return n+decodeURIComponent(s)}catch(i){return r(String(i)),null}return a==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,a]of Object.entries(this.tags))if(t.startsWith(a))return r+pp(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags),s;if(t&&a.length>0&&Q(t.contents)){let n={};vt(t.contents,(i,o)=>{Q(o)&&o.tag&&(n[o.tag]=!0)}),s=Object.keys(n)}else s=[];for(let[n,i]of a)n==="!!"&&i==="tag:yaml.org,2002:"||t&&!s.some(o=>o.startsWith(i))||r.push(`%TAG ${n} ${i}`);return r.join(`
|
|
145
|
+
`)}};wt.defaultYaml={explicit:!1,version:"1.2"},wt.defaultTags={"!!":"tag:yaml.org,2002:"};function Ei(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Di(e){let t=new Set;return vt(e,{Value(r,a){a.anchor&&t.add(a.anchor)}}),t}function Ci(e,t){for(let r=1;;++r){let a=`${e}${r}`;if(!t.has(a))return a}}function up(e,t){let r=[],a=new Map,s=null;return{onAnchor:n=>{r.push(n),s??=Di(e);let i=Ci(t,s);return s.add(i),i},setAnchors:()=>{for(let n of r){let i=a.get(n);if(typeof i=="object"&&i.anchor&&(K(i.node)||Y(i.node)))i.node.anchor=i.anchor;else{let o=Error("Failed to resolve repeated object (this should not happen)");throw o.source=n,o}}},sourceObjects:a}}function kt(e,t,r,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,n=a.length;s<n;++s){let i=a[s],o=kt(e,a,String(s),i);o===void 0?delete a[s]:o!==i&&(a[s]=o)}else if(a instanceof Map)for(let s of Array.from(a.keys())){let n=a.get(s),i=kt(e,a,s,n);i===void 0?a.delete(s):i!==n&&a.set(s,i)}else if(a instanceof Set)for(let s of Array.from(a)){let n=kt(e,a,s,s);n===void 0?a.delete(s):n!==s&&(a.delete(s),a.add(n))}else for(let[s,n]of Object.entries(a)){let i=kt(e,a,s,n);i===void 0?delete a[s]:i!==n&&(a[s]=i)}return e.call(t,r,a)}function ue(e,t,r){if(Array.isArray(e))return e.map((a,s)=>ue(a,String(s),r));if(e&&typeof e.toJSON=="function"){if(!r||!Ai(e))return e.toJSON(t,r);let a={aliasCount:0,count:1,res:void 0};r.anchors.set(e,a),r.onCreate=n=>{a.res=n,delete r.onCreate};let s=e.toJSON(t,r);return r.onCreate&&r.onCreate(s),s}return typeof e=="bigint"&&!r?.keep?Number(e):e}var ss=class{constructor(e){Object.defineProperty(this,pe,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:a,reviver:s}={}){if(!Br(e))throw TypeError("A document argument is required");let n={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},i=ue(this,"",n);if(typeof a=="function")for(let{count:o,res:l}of n.anchors.values())a(l,o);return typeof s=="function"?kt(s,{"":i},"",i):i}},ns=class extends ss{constructor(e){super(rs),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],vt(e,{Node:(s,n)=>{(bt(n)||Ai(n))&&r.push(n)}}),t&&(t.aliasResolveCache=r));let a;for(let s of r){if(s===this)break;s.anchor===this.source&&(a=s)}if(a&&t){let{anchors:s,doc:n,maxAliasCount:i}=t,o=s.get(a);if(o||=(ue(a,null,t),s.get(a)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Nr(n,a,s)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return a}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(a)}return t.anchors.get(r).res}toString(e,t,r){let a=`*${this.source}`;if(e){if(Ei(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(s)}if(e.implicitKey)return`${a} `}return a}};function Nr(e,t,r){if(bt(t)){let a=t.resolve(e),s=r&&a&&r.get(a);return s?s.count*s.aliasCount:0}if(Y(t)){let a=0;for(let s of t.items){let n=Nr(e,s,r);n>a&&(a=n)}return a}if(X(t)){let a=Nr(e,t.key,r),s=Nr(e,t.value,r);return Math.max(a,s)}return 1}var Ti=e=>!e||typeof e!="function"&&typeof e!="object",I=class extends ss{constructor(e){super(ke),this.value=e}toJSON(e,t){return t?.keep?this.value:ue(this.value,e,t)}toString(){return String(this.value)}};I.BLOCK_FOLDED="BLOCK_FOLDED",I.BLOCK_LITERAL="BLOCK_LITERAL",I.PLAIN="PLAIN",I.QUOTE_DOUBLE="QUOTE_DOUBLE",I.QUOTE_SINGLE="QUOTE_SINGLE";var hp="tag:yaml.org,2002:";function mp(e,t,r){if(t){let a=r.filter(n=>n.tag===t),s=a.find(n=>!n.format)??a[0];if(!s)throw Error(`Tag ${t} not found`);return s}return r.find(a=>a.identify?.(e)&&!a.format)}function ar(e,t,r){if(Br(e)&&(e=e.contents),Q(e))return e;if(X(e)){let p=r.schema[Ie].createNode?.(r.schema,null,r);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:a,onAnchor:s,onTagObj:n,schema:i,sourceObjects:o}=r,l;if(a&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=s(e)),new ns(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=hp+t.slice(2));let c=mp(e,t,i.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let p=new I(e);return l&&(l.node=p),p}c=e instanceof Map?i[Ie]:Symbol.iterator in Object(e)?i[yt]:i[Ie]}n&&(n(c),delete r.onTagObj);let d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(r.schema,e,r):new I(e);return t?d.tag=t:c.default||(d.tag=c.tag),l&&(l.node=d),d}function zr(e,t,r){let a=r;for(let s=t.length-1;s>=0;--s){let n=t[s];if(typeof n=="number"&&Number.isInteger(n)&&n>=0){let i=[];i[n]=a,a=i}else a=new Map([[n,a]])}return ar(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var sr=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Oi=class extends ss{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>Q(r)||X(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(sr(e))this.add(t);else{let[r,...a]=e,s=this.get(r,!0);if(Y(s))s.addIn(a,t);else if(s===void 0&&this.schema)this.set(r,zr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let a=this.get(t,!0);if(Y(a))return a.deleteIn(r);throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...a]=e,s=this.get(r,!0);return a.length===0?!t&&K(s)?s.value:s:Y(s)?s.getIn(a,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X(t))return!1;let r=t.value;return r==null||e&&K(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let a=this.get(t,!0);return Y(a)?a.hasIn(r):!1}setIn(e,t){let[r,...a]=e;if(a.length===0)this.set(r,t);else{let s=this.get(r,!0);if(Y(s))s.setIn(a,t);else if(s===void 0&&this.schema)this.set(r,zr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}},fp=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ee(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ye=(e,t,r)=>e.endsWith(`
|
|
146
|
+
`)?Ee(r,t):r.includes(`
|
|
79
147
|
`)?`
|
|
80
|
-
`+
|
|
81
|
-
`)
|
|
82
|
-
`&&
|
|
83
|
-
`&&
|
|
84
|
-
${t}${e.slice(0
|
|
85
|
-
${t}${e.slice(
|
|
86
|
-
`);
|
|
87
|
-
`){if(n-i>
|
|
88
|
-
|
|
89
|
-
`;
|
|
90
|
-
`,l+=2;i+=n,
|
|
91
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return
|
|
92
|
-
${
|
|
148
|
+
`+Ee(r,t):(e.endsWith(" ")?"":" ")+r,Fi="flow",gp="block",yp="quoted";function Pr(e,t,r="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:n=20,onFold:i,onOverflow:o}={}){if(!s||s<0)return e;s<n&&(n=0);let l=Math.max(1+n,1+s-t.length);if(e.length<=l)return e;let c=[],d={},p=s-t.length;typeof a=="number"&&(a>s-Math.max(2,n)?c.push(0):p=s-a);let h,u,g=!1,f=-1,y=-1,v=-1;r==="block"&&(f=ji(e,f,t.length),f!==-1&&(p=f+l));for(let x;x=e[f+=1];){if(r==="quoted"&&x==="\\"){switch(y=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}v=f}if(x===`
|
|
149
|
+
`)r==="block"&&(f=ji(e,f,t.length)),p=f+t.length+l,h=void 0;else{if(x===" "&&u&&u!==" "&&u!==`
|
|
150
|
+
`&&u!==" "){let b=e[f+1];b&&b!==" "&&b!==`
|
|
151
|
+
`&&b!==" "&&(h=f)}if(f>=p)if(h)c.push(h),p=h+l,h=void 0;else if(r==="quoted"){for(;u===" "||u===" ";)u=x,x=e[f+=1],g=!0;let b=f>v+1?f-2:y-1;if(d[b])return e;c.push(b),d[b]=!0,p=b+l,h=void 0}else g=!0}u=x}if(g&&o&&o(),c.length===0)return e;i&&i();let A=e.slice(0,c[0]);for(let x=0;x<c.length;++x){let b=c[x],$=c[x+1]||e.length;b===0?A=`
|
|
152
|
+
${t}${e.slice(0,$)}`:(r==="quoted"&&d[b]&&(A+=`${e[b]}\\`),A+=`
|
|
153
|
+
${t}${e.slice(b+1,$)}`)}return A}function ji(e,t,r){let a=t,s=t+1,n=e[s];for(;n===" "||n===" ";)if(t<s+r)n=e[++t];else{do n=e[++t];while(n&&n!==`
|
|
154
|
+
`);a=t,s=t+1,n=e[s]}return a}var Mr=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ur=e=>/^(%|---|\.\.\.)/m.test(e);function bp(e,t,r){if(!t||t<0)return!1;let a=t-r,s=e.length;if(s<=a)return!1;for(let n=0,i=0;n<s;++n)if(e[n]===`
|
|
155
|
+
`){if(n-i>a)return!0;if(i=n+1,s-i<=a)return!1}return!0}function nr(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,n=t.indent||(Ur(e)?" ":""),i="",o=0;for(let l=0,c=r[l];c;c=r[++l])if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"&&(i+=r.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(r[l+1]){case"u":{i+=r.slice(o,l);let d=r.substr(l+2,4);switch(d){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:d.substr(0,2)==="00"?i+="\\x"+d.substr(2):i+=r.substr(l,6)}l+=5,o=l+1}break;case"n":if(a||r[l+2]==='"'||r.length<s)l+=1;else{for(i+=r.slice(o,l)+`
|
|
156
|
+
|
|
157
|
+
`;r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"';)i+=`
|
|
158
|
+
`,l+=2;i+=n,r[l+2]===" "&&(i+="\\"),l+=1,o=l+1}break;default:l+=1}return i=o?i+r.slice(o):r,a?i:Pr(i,n,yp,Mr(t,!1))}function is(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
159
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return nr(e,t);let r=t.indent||(Ur(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
160
|
+
${r}`)+"'";return t.implicitKey?a:Pr(a,r,Fi,Mr(t,!1))}function $t(e,t){let{singleQuote:r}=t.options,a;if(r===!1)a=nr;else{let s=e.includes('"'),n=e.includes("'");a=s&&!n?is:n&&!s?nr:r?is:nr}return a(e,t)}var os;try{os=RegExp(`(^|(?<!
|
|
93
161
|
))
|
|
94
162
|
+(?!
|
|
95
|
-
|$)`,"g")}catch{
|
|
163
|
+
|$)`,"g")}catch{os=/\n+(?!\n|$)/g}function Hr({comment:e,type:t,value:r},a,s,n){let{blockQuote:i,commentString:o,lineWidth:l}=a.options;if(!i||/\n[\t ]+$/.test(r))return $t(r,a);let c=a.indent||(a.forceBlockIndent||Ur(r)?" ":""),d=i==="literal"?!0:i==="folded"||t===I.BLOCK_FOLDED?!1:t===I.BLOCK_LITERAL||!bp(r,l,c.length);if(!r)return d?`|
|
|
96
164
|
`:`>
|
|
97
|
-
`;let
|
|
98
|
-
`&&
|
|
99
|
-
`);
|
|
100
|
-
`&&(
|
|
101
|
-
`)
|
|
102
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),
|
|
103
|
-
${c}${
|
|
104
|
-
${c}${
|
|
105
|
-
`)||d&&/[[\]{},]/.test(n))return
|
|
106
|
-
`)
|
|
107
|
-
`))return
|
|
108
|
-
${l}`);if(i){let h=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(
|
|
109
|
-
${t.indent}${o}`:o}function
|
|
110
|
-
${o}:`):(
|
|
111
|
-
`:"",
|
|
112
|
-
${
|
|
113
|
-
`&&
|
|
114
|
-
|
|
115
|
-
`)
|
|
116
|
-
${
|
|
117
|
-
`),
|
|
118
|
-
${
|
|
119
|
-
`)&&(
|
|
165
|
+
`;let p,h;for(h=r.length;h>0;--h){let b=r[h-1];if(b!==`
|
|
166
|
+
`&&b!==" "&&b!==" ")break}let u=r.substring(h),g=u.indexOf(`
|
|
167
|
+
`);g===-1?p="-":r===u||g!==u.length-1?(p="+",n&&n()):p="",u&&=(r=r.slice(0,-u.length),u[u.length-1]===`
|
|
168
|
+
`&&(u=u.slice(0,-1)),u.replace(os,`$&${c}`));let f=!1,y,v=-1;for(y=0;y<r.length;++y){let b=r[y];if(b===" ")f=!0;else if(b===`
|
|
169
|
+
`)v=y;else break}let A=r.substring(0,v<y?v+1:y);A&&=(r=r.substring(A.length),A.replace(/\n+/g,`$&${c}`));let x=(f?c?"2":"1":"")+p;if(e&&(x+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!d){let b=r.replace(/\n+/g,`
|
|
170
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),$=!1,S=Mr(a,!0);i!=="folded"&&t!==I.BLOCK_FOLDED&&(S.onOverflow=()=>{$=!0});let E=Pr(`${A}${b}${u}`,c,gp,S);if(!$)return`>${x}
|
|
171
|
+
${c}${E}`}return r=r.replace(/\n+/g,`$&${c}`),`|${x}
|
|
172
|
+
${c}${A}${r}${u}`}function vp(e,t,r,a){let{type:s,value:n}=e,{actualString:i,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&n.includes(`
|
|
173
|
+
`)||d&&/[[\]{},]/.test(n))return $t(n,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(n))return o||d||!n.includes(`
|
|
174
|
+
`)?$t(n,t):Hr(e,t,r,a);if(!o&&!d&&s!==I.PLAIN&&n.includes(`
|
|
175
|
+
`))return Hr(e,t,r,a);if(Ur(n)){if(l==="")return t.forceBlockIndent=!0,Hr(e,t,r,a);if(o&&l===c)return $t(n,t)}let p=n.replace(/\n+/g,`$&
|
|
176
|
+
${l}`);if(i){let h=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(p),{compat:u,tags:g}=t.doc.schema;if(g.some(h)||u?.some(h))return $t(n,t)}return o?p:Pr(p,l,Fi,Mr(t,!1))}function ls(e,t,r,a){let{implicitKey:s,inFlow:n}=t,i=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==I.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(o=I.QUOTE_DOUBLE);let l=d=>{switch(d){case I.BLOCK_FOLDED:case I.BLOCK_LITERAL:return s||n?$t(i.value,t):Hr(i,t,r,a);case I.QUOTE_DOUBLE:return nr(i.value,t);case I.QUOTE_SINGLE:return is(i.value,t);case I.PLAIN:return vp(i,t,r,a);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:p}=t.options,h=s&&d||p;if(c=l(h),c===null)throw Error(`Unsupported default string type ${h}`)}return c}function _i(e,t){let r=Object.assign({blockQuote:!0,commentString:fp,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),a;switch(r.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:a,options:r}}function xp(e,t){if(t.tag){let s=e.filter(n=>n.tag===t.tag);if(s.length>0)return s.find(n=>n.format===t.format)??s[0]}let r,a;if(K(t)){a=t.value;let s=e.filter(n=>n.identify?.(a));if(s.length>1){let n=s.filter(i=>i.test);n.length>0&&(s=n)}r=s.find(n=>n.format===t.format)??s.find(n=>!n.format)}else a=t,r=e.find(s=>s.nodeClass&&a instanceof s.nodeClass);if(!r){let s=a?.constructor?.name??(a===null?"null":typeof a);throw Error(`Tag not resolved for ${s} value`)}return r}function wp(e,t,{anchors:r,doc:a}){if(!a.directives)return"";let s=[],n=(K(e)||Y(e))&&e.anchor;n&&Ei(n)&&(r.add(n),s.push(`&${n}`));let i=e.tag??(t.default?null:t.tag);return i&&s.push(a.directives.tagString(i)),s.join(" ")}function St(e,t,r,a){if(X(e))return e.toString(t,r,a);if(bt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s,n=Q(e)?e:t.doc.createNode(e,{onTagObj:l=>s=l});s??=xp(t.doc.schema.tags,n);let i=wp(n,s,t);i.length>0&&(t.indentAtStart=(t.indentAtStart??0)+i.length+1);let o=typeof s.stringify=="function"?s.stringify(n,t,r,a):K(n)?ls(n,t,r,a):n.toString(t,r,a);return i?K(n)||o[0]==="{"||o[0]==="["?`${i} ${o}`:`${i}
|
|
177
|
+
${t.indent}${o}`:o}function kp({key:e,value:t},r,a,s){let{allNullValues:n,doc:i,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:p}}=r,h=Q(e)&&e.comment||null;if(p){if(h)throw Error("With simple keys, key nodes cannot have comments");if(Y(e)||!Q(e)&&typeof e=="object")throw Error("With simple keys, collection cannot be used as a key value")}let u=!p&&(!e||h&&t==null&&!r.inFlow||Y(e)||(K(e)?e.type===I.BLOCK_FOLDED||e.type===I.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!u&&(p||!n),indent:o+l});let g=!1,f=!1,y=St(e,r,()=>g=!0,()=>f=!0);if(!u&&!r.inFlow&&y.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");u=!0}if(r.inFlow){if(n||t==null)return g&&a&&a(),y===""?"?":u?`? ${y}`:y}else if(n&&!p||t==null&&u)return y=`? ${y}`,h&&!g?y+=Ye(y,r.indent,c(h)):f&&s&&s(),y;g&&(h=null),u?(h&&(y+=Ye(y,r.indent,c(h))),y=`? ${y}
|
|
178
|
+
${o}:`):(y=`${y}:`,h&&(y+=Ye(y,r.indent,c(h))));let v,A,x;Q(t)?(v=!!t.spaceBefore,A=t.commentBefore,x=t.comment):(v=!1,A=null,x=null,t&&typeof t=="object"&&(t=i.createNode(t))),r.implicitKey=!1,!u&&!h&&K(t)&&(r.indentAtStart=y.length+1),f=!1,!d&&l.length>=2&&!r.inFlow&&!u&&tr(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let b=!1,$=St(t,r,()=>b=!0,()=>f=!0),S=" ";if(h||v||A){if(S=v?`
|
|
179
|
+
`:"",A){let E=c(A);S+=`
|
|
180
|
+
${Ee(E,r.indent)}`}$===""&&!r.inFlow?S===`
|
|
181
|
+
`&&x&&(S=`
|
|
182
|
+
|
|
183
|
+
`):S+=`
|
|
184
|
+
${r.indent}`}else if(!u&&Y(t)){let E=$[0],D=$.indexOf(`
|
|
185
|
+
`),j=D!==-1,N=r.inFlow??t.flow??t.items.length===0;if(j||!N){let F=!1;if(j&&(E==="&"||E==="!")){let z=$.indexOf(" ");E==="&"&&z!==-1&&z<D&&$[z+1]==="!"&&(z=$.indexOf(" ",z+1)),(z===-1||D<z)&&(F=!0)}F||(S=`
|
|
186
|
+
${r.indent}`)}}else($===""||$[0]===`
|
|
187
|
+
`)&&(S="");return y+=S+$,r.inFlow?b&&a&&a():x&&!b?y+=Ye(y,r.indent,c(x)):f&&s&&s(),y}function uf(e,t){}var Wr="<<",De={identify:e=>e===Wr||typeof e=="symbol"&&e.description===Wr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new I(Symbol(Wr)),{addToJSMap:qi}),stringify:()=>Wr},$p=(e,t)=>(De.identify(t)||K(t)&&(!t.type||t.type===I.PLAIN)&&De.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===De.tag&&r.default);function qi(e,t,r){let a=Ri(e,r);if(tr(a))for(let s of a.items)cs(e,t,s);else if(Array.isArray(a))for(let s of a)cs(e,t,s);else cs(e,t,a)}function cs(e,t,r){let a=Ri(e,r);if(!er(a))throw Error("Merge sources must be maps or map aliases");let s=a.toJSON(null,e,Map);for(let[n,i]of s)t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function Ri(e,t){return e&&bt(t)?t.resolve(e.doc,e):t}function Ii(e,t,{key:r,value:a}){if(Q(r)&&r.addToJSMap)r.addToJSMap(e,t,a);else if($p(e,r))qi(e,t,a);else{let s=ue(r,"",e);if(t instanceof Map)t.set(s,ue(a,s,e));else if(t instanceof Set)t.add(s);else{let n=Sp(r,s,e),i=ue(a,n,e);n in t?Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[n]=i}}return t}function Sp(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Q(e)&&r?.doc){let a=_i(r.doc,{});a.anchors=new Set;for(let n of r.anchors.keys())a.anchors.add(n.anchor);a.inFlow=!0,a.inStringifyKey=!0;let s=e.toString(a);if(!r.mapKeyWarned){let n=JSON.stringify(s);n.length>40&&(n=n.substring(0,36)+'..."'),r.doc.options.logLevel,`${n}`,r.mapKeyWarned=!0}return s}return JSON.stringify(t)}function ds(e,t,r){return new le(ar(e,void 0,r),ar(t,void 0,r))}var le=class vc{constructor(t,r=null){Object.defineProperty(this,pe,{value:Si}),this.key=t,this.value=r}clone(t){let{key:r,value:a}=this;return Q(r)&&(r=r.clone(t)),Q(a)&&(a=a.clone(t)),new vc(r,a)}toJSON(t,r){return Ii(r,r?.mapAsMap?new Map:{},this)}toString(t,r,a){return t?.doc?kp(this,t,r,a):JSON.stringify(this)}};function Li(e,t,r){return(t.inFlow??e.flow?Ep:Ap)(e,t,r)}function Ap({comment:e,items:t},r,{blockItemPrefix:a,flowChars:s,itemIndent:n,onChompKeep:i,onComment:o}){let{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:n,type:null}),p=!1,h=[];for(let g=0;g<t.length;++g){let f=t[g],y=null;if(Q(f))!p&&f.spaceBefore&&h.push(""),Kr(r,h,f.commentBefore,p),f.comment&&(y=f.comment);else if(X(f)){let A=Q(f.key)?f.key:null;A&&(!p&&A.spaceBefore&&h.push(""),Kr(r,h,A.commentBefore,p))}p=!1;let v=St(f,d,()=>y=null,()=>p=!0);y&&(v+=Ye(v,n,c(y))),p&&y&&(p=!1),h.push(a+v)}let u;if(h.length===0)u=s.start+s.end;else{u=h[0];for(let g=1;g<h.length;++g){let f=h[g];u+=f?`
|
|
120
188
|
${l}${f}`:`
|
|
121
|
-
`}}return e?(
|
|
122
|
-
`+
|
|
123
|
-
`),
|
|
189
|
+
`}}return e?(u+=`
|
|
190
|
+
`+Ee(c(e),l),o&&o()):p&&i&&i(),u}function Ep({items:e},t,{flowChars:r,itemIndent:a}){let{indent:s,indentStep:n,flowCollectionPadding:i,options:{commentString:o}}=t;a+=n;let l=Object.assign({},t,{indent:a,inFlow:!0,type:null}),c=!1,d=0,p=[];for(let g=0;g<e.length;++g){let f=e[g],y=null;if(Q(f))f.spaceBefore&&p.push(""),Kr(t,p,f.commentBefore,!1),f.comment&&(y=f.comment);else if(X(f)){let A=Q(f.key)?f.key:null;A&&(A.spaceBefore&&p.push(""),Kr(t,p,A.commentBefore,!1),A.comment&&(c=!0));let x=Q(f.value)?f.value:null;x?(x.comment&&(y=x.comment),x.commentBefore&&(c=!0)):f.value==null&&A?.comment&&(y=A.comment)}y&&(c=!0);let v=St(f,l,()=>y=null);c||=p.length>d||v.includes(`
|
|
191
|
+
`),g<e.length-1?v+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||=p.reduce((A,x)=>A+x.length+2,2)+(v.length+2)>t.options.lineWidth),c&&(v+=",")),y&&(v+=Ye(v,a,o(y))),p.push(v),d=p.length}let{start:h,end:u}=r;if(p.length===0)return h+u;if(!c){let g=p.reduce((f,y)=>f+y.length+2,2);c=t.options.lineWidth>0&&g>t.options.lineWidth}if(c){let g=h;for(let f of p)g+=f?`
|
|
124
192
|
${n}${s}${f}`:`
|
|
125
|
-
`;return`${
|
|
126
|
-
${s}${
|
|
127
|
-
`:" ")}return
|
|
128
|
-
${s.key.commentBefore}`:
|
|
129
|
-
${n.comment}`:
|
|
130
|
-
`)?(
|
|
193
|
+
`;return`${g}
|
|
194
|
+
${s}${u}`}return`${h}${i}${p.join(" ")}${i}${u}`}function Kr({indent:e,options:{commentString:t}},r,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){let n=Ee(t(a),e);r.push(n.trimStart())}}function Qe(e,t){let r=K(t)?t.value:t;for(let a of e)if(X(a)&&(a.key===t||a.key===r||K(a.key)&&a.key.value===r))return a}var he=class extends Oi{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ie,e),this.items=[]}static from(e,t,r){let{keepUndefined:a,replacer:s}=r,n=new this(e),i=(o,l)=>{if(typeof s=="function")l=s.call(t,o,l);else if(Array.isArray(s)&&!s.includes(o))return;(l!==void 0||a)&&n.items.push(ds(o,l,r))};if(t instanceof Map)for(let[o,l]of t)i(o,l);else if(t&&typeof t=="object")for(let o of Object.keys(t))i(o,t[o]);return typeof e.sortMapEntries=="function"&&n.items.sort(e.sortMapEntries),n}add(e,t){let r;r=X(e)?e:!e||typeof e!="object"||!("key"in e)?new le(e,e?.value):new le(e.key,e.value);let a=Qe(this.items,r.key),s=this.schema?.sortMapEntries;if(a){if(!t)throw Error(`Key ${r.key} already set`);K(a.value)&&Ti(r.value)?a.value.value=r.value:a.value=r.value}else if(s){let n=this.items.findIndex(i=>s(r,i)<0);n===-1?this.items.push(r):this.items.splice(n,0,r)}else this.items.push(r)}delete(e){let t=Qe(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=Qe(this.items,e)?.value;return(!t&&K(r)?r.value:r)??void 0}has(e){return!!Qe(this.items,e)}set(e,t){this.add(new le(e,t),!0)}toJSON(e,t,r){let a=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(a);for(let s of this.items)Ii(t,a,s);return a}toString(e,t,r){if(!e)return JSON.stringify(this);for(let a of this.items)if(!X(a))throw Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Li(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}},At={collection:"map",default:!0,nodeClass:he,tag:"tag:yaml.org,2002:map",resolve(e,t){return er(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>he.from(e,t,r)},et=class extends Oi{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(yt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Vr(e);return typeof t=="number"&&this.items.splice(t,1).length>0}get(e,t){let r=Vr(e);if(typeof r!="number")return;let a=this.items[r];return!t&&K(a)?a.value:a}has(e){let t=Vr(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=Vr(e);if(typeof r!="number")throw Error(`Expected a valid index, not ${e}.`);let a=this.items[r];K(a)&&Ti(t)?a.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let a=0;for(let s of this.items)r.push(ue(s,String(a++),t));return r}toString(e,t,r){return e?Li(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:a}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let n=0;for(let i of t){if(typeof a=="function"){let o=t instanceof Set?i:String(n++);i=a.call(t,o,i)}s.items.push(ar(i,void 0,r))}}return s}};function Vr(e){let t=K(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}var Et={collection:"seq",default:!0,nodeClass:et,tag:"tag:yaml.org,2002:seq",resolve(e,t){return tr(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>et.from(e,t,r)},Zr={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,a){return t=Object.assign({actualString:!0},t),ls(e,t,r,a)}},Jr={identify:e=>e==null,createNode:()=>new I(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new I(null),stringify:({source:e},t)=>typeof e=="string"&&Jr.test.test(e)?e:t.options.nullStr},ps={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new I(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){return e&&ps.test.test(e)&&t===(e[0]==="t"||e[0]==="T")?e:t?r.options.trueStr:r.options.falseStr}};function be({format:e,minFractionDigits:t,tag:r,value:a}){if(typeof a=="bigint")return String(a);let s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let n=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(n)&&!n.includes("e")){let i=n.indexOf(".");i<0&&(i=n.length,n+=".");let o=t-(n.length-i-1);for(;o-- >0;)n+="0"}return n}var Bi={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?-1/0:1/0,stringify:be},Ni={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():be(e)}},zi={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new I(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:be},Gr=e=>typeof e=="bigint"||Number.isInteger(e),us=(e,t,r,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),r);function Pi(e,t,r){let{value:a}=e;return Gr(a)&&a>=0?r+a.toString(t):be(e)}var Mi={identify:e=>Gr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>us(e,2,8,r),stringify:e=>Pi(e,8,"0o")},Ui={identify:Gr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>us(e,0,10,r),stringify:be},Hi={identify:e=>Gr(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>us(e,2,16,r),stringify:e=>Pi(e,16,"0x")},Dp=[At,Et,Zr,Jr,ps,Mi,Ui,Hi,Bi,Ni,zi];function Wi(e){return typeof e=="bigint"||Number.isInteger(e)}var Xr=({value:e})=>JSON.stringify(e),Cp=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Xr},{identify:e=>e==null,createNode:()=>new I(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Xr},{identify:Wi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Wi(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Xr}],Tp=[At,Et].concat(Cp,{default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),hs={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(r.length);for(let s=0;s<r.length;++s)a[s]=r.charCodeAt(s);return a}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},a,s,n){if(!r)return"";let i=r,o;if(typeof btoa=="function"){let l="";for(let c=0;c<i.length;++c)l+=String.fromCharCode(i[c]);o=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??=I.BLOCK_LITERAL,t!==I.QUOTE_DOUBLE){let l=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),c=Math.ceil(o.length/l),d=Array(c);for(let p=0,h=0;p<c;++p,h+=l)d[p]=o.substr(h,l);o=d.join(t===I.BLOCK_LITERAL?`
|
|
195
|
+
`:" ")}return ls({comment:e,type:t,value:o},a,s,n)}};function Ki(e,t){if(tr(e))for(let r=0;r<e.items.length;++r){let a=e.items[r];if(!X(a)){if(er(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");let s=a.items[0]||new le(new I(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
|
|
196
|
+
${s.key.commentBefore}`:a.commentBefore),a.comment){let n=s.value??s.key;n.comment=n.comment?`${a.comment}
|
|
197
|
+
${n.comment}`:a.comment}a=s}e.items[r]=X(a)?a:new le(a)}}else t("Expected a sequence for this tag");return e}function Vi(e,t,r){let{replacer:a}=r,s=new et(e);s.tag="tag:yaml.org,2002:pairs";let n=0;if(t&&Symbol.iterator in Object(t))for(let i of t){typeof a=="function"&&(i=a.call(t,String(n++),i));let o,l;if(Array.isArray(i))if(i.length===2)o=i[0],l=i[1];else throw TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){let c=Object.keys(i);if(c.length===1)o=c[0],l=i[o];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=i;s.items.push(ds(o,l,r))}return s}var ms={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ki,createNode:Vi},Yr=class xc extends et{constructor(){super(),this.add=he.prototype.add.bind(this),this.delete=he.prototype.delete.bind(this),this.get=he.prototype.get.bind(this),this.has=he.prototype.has.bind(this),this.set=he.prototype.set.bind(this),this.tag=xc.tag}toJSON(t,r){if(!r)return super.toJSON(t);let a=new Map;r?.onCreate&&r.onCreate(a);for(let s of this.items){let n,i;if(X(s)?(n=ue(s.key,"",r),i=ue(s.value,n,r)):n=ue(s,"",r),a.has(n))throw Error("Ordered maps must not include duplicate keys");a.set(n,i)}return a}static from(t,r,a){let s=Vi(t,r,a),n=new this;return n.items=s.items,n}};Yr.tag="tag:yaml.org,2002:omap";var fs={collection:"seq",identify:e=>e instanceof Map,nodeClass:Yr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=Ki(e,t),a=[];for(let{key:s}of r.items)K(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new Yr,r)},createNode:(e,t,r)=>Yr.from(e,t,r)};function Zi({value:e,source:t},r){return t&&(e?Ji:Gi).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var Ji={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new I(!0),stringify:Zi},Gi={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new I(!1),stringify:Zi},Op={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?-1/0:1/0,stringify:be},Fp={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():be(e)}},jp={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new I(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let a=e.substring(r+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:be},ir=e=>typeof e=="bigint"||Number.isInteger(e);function Qr(e,t,r,{intAsBigInt:a}){let s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let i=BigInt(e);return s==="-"?BigInt(-1)*i:i}let n=parseInt(e,r);return s==="-"?-1*n:n}function gs(e,t,r){let{value:a}=e;if(ir(a)){let s=a.toString(t);return a<0?"-"+r+s.substr(1):r+s}return be(e)}var _p={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Qr(e,2,2,r),stringify:e=>gs(e,2,"0b")},qp={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Qr(e,1,8,r),stringify:e=>gs(e,8,"0")},Rp={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Qr(e,0,10,r),stringify:be},Ip={identify:ir,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Qr(e,2,16,r),stringify:e=>gs(e,16,"0x")},ea=class wc extends he{constructor(t){super(t),this.tag=wc.tag}add(t){let r;r=X(t)?t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?new le(t.key,null):new le(t,null),Qe(this.items,r.key)||this.items.push(r)}get(t,r){let a=Qe(this.items,t);return!r&&X(a)?K(a.key)?a.key.value:a.key:a}set(t,r){if(typeof r!="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let a=Qe(this.items,t);a&&!r?this.items.splice(this.items.indexOf(a),1):!a&&r&&this.items.push(new le(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,a);throw Error("Set items must all have null values")}static from(t,r,a){let{replacer:s}=a,n=new this(t);if(r&&Symbol.iterator in Object(r))for(let i of r)typeof s=="function"&&(i=s.call(r,i,i)),n.items.push(ds(i,null,a));return n}};ea.tag="tag:yaml.org,2002:set";var ys={collection:"map",identify:e=>e instanceof Set,nodeClass:ea,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>ea.from(e,t,r),resolve(e,t){if(er(e)){if(e.hasAllNullValues(!0))return Object.assign(new ea,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function bs(e,t){let r=e[0],a=r==="-"||r==="+"?e.substring(1):e,s=i=>t?BigInt(i):Number(i),n=a.replace(/_/g,"").split(":").reduce((i,o)=>i*s(60)+s(o),s(0));return r==="-"?s(-1)*n:n}function Xi(e){let{value:t}=e,r=i=>i;if(typeof t=="bigint")r=i=>BigInt(i);else if(isNaN(t)||!isFinite(t))return be(e);let a="";t<0&&(a="-",t*=r(-1));let s=r(60),n=[t%s];return t<60?n.unshift(0):(t=(t-n[0])/s,n.unshift(t%s),t>=60&&(t=(t-n[0])/s,n.unshift(t))),a+n.map(i=>String(i).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Yi={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>bs(e,r),stringify:Xi},Qi={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>bs(e,!1),stringify:Xi},ta={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(ta.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,a,s,n,i,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,a-1,s,n||0,i||0,o||0,l),d=t[8];if(d&&d!=="Z"){let p=bs(d,!1);Math.abs(p)<30&&(p*=60),c-=6e4*p}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},eo=[At,Et,Zr,Jr,Ji,Gi,_p,qp,Rp,Ip,Op,Fp,jp,hs,De,fs,ms,ys,Yi,Qi,ta],to=new Map([["core",Dp],["failsafe",[At,Et,Zr]],["json",Tp],["yaml11",eo],["yaml-1.1",eo]]),ro={binary:hs,bool:ps,float:zi,floatExp:Ni,floatNaN:Bi,floatTime:Qi,int:Ui,intHex:Hi,intOct:Mi,intTime:Yi,map:At,merge:De,null:Jr,omap:fs,pairs:ms,seq:Et,set:ys,timestamp:ta},Lp={"tag:yaml.org,2002:binary":hs,"tag:yaml.org,2002:merge":De,"tag:yaml.org,2002:omap":fs,"tag:yaml.org,2002:pairs":ms,"tag:yaml.org,2002:set":ys,"tag:yaml.org,2002:timestamp":ta};function vs(e,t,r){let a=to.get(t);if(a&&!e)return r&&!a.includes(De)?a.concat(De):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{let n=Array.from(to.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${n} or define customTags array`)}if(Array.isArray(e))for(let n of e)s=s.concat(n);else typeof e=="function"&&(s=e(s.slice()));return r&&(s=s.concat(De)),s.reduce((n,i)=>{let o=typeof i=="string"?ro[i]:i;if(!o){let l=JSON.stringify(i),c=Object.keys(ro).map(d=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}return n.includes(o)||n.push(o),n},[])}var Bp=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Np=class kc{constructor({compat:t,customTags:r,merge:a,resolveKnownTags:s,schema:n,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(t)?vs(t,"compat"):t?vs(null,t):null,this.name=typeof n=="string"&&n||"core",this.knownTags=s?Lp:{},this.tags=vs(r,this.name,a),this.toStringOptions=o??null,Object.defineProperty(this,Ie,{value:At}),Object.defineProperty(this,ke,{value:Zr}),Object.defineProperty(this,yt,{value:Et}),this.sortMapEntries=typeof i=="function"?i:i===!0?Bp:null}clone(){let t=Object.create(kc.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function zp(e,t){let r=[],a=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(r.push(l),a=!0):e.directives.docStart&&(a=!0)}a&&r.push("---");let s=_i(e,t),{commentString:n}=s.options;if(e.commentBefore){r.length!==1&&r.unshift("");let l=n(e.commentBefore);r.unshift(Ee(l,""))}let i=!1,o=null;if(e.contents){if(Q(e.contents)){if(e.contents.spaceBefore&&a&&r.push(""),e.contents.commentBefore){let d=n(e.contents.commentBefore);r.push(Ee(d,""))}s.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>i=!0,c=St(e.contents,s,()=>o=null,l);o&&(c+=Ye(c,"",n(o))),(c[0]==="|"||c[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${c}`:r.push(c)}else r.push(St(e.contents,s));if(e.directives?.docEnd)if(e.comment){let l=n(e.comment);l.includes(`
|
|
198
|
+
`)?(r.push("..."),r.push(Ee(l,""))):r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;l&&i&&(l=l.replace(/^\n+/,"")),l&&((!i||o)&&r[r.length-1]!==""&&r.push(""),r.push(Ee(n(l),"")))}return r.join(`
|
|
131
199
|
`)+`
|
|
132
|
-
`}var
|
|
133
|
-
`),i=o+i}if(/[^ ]/.test(i)){let o=1,l=
|
|
200
|
+
`}var ao=class $c{constructor(t,r,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,pe,{value:as});let s=null;typeof r=="function"||Array.isArray(r)?s=r:a===void 0&&r&&(a=r,r=void 0);let n=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=n;let{version:i}=n;a?._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new wt({version:i}),this.setSchema(i,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){let t=Object.create($c.prototype,{[pe]:{value:as}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Dt(this.contents)&&this.contents.add(t)}addIn(t,r){Dt(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let a=Di(this);t.anchor=!r||a.has(r)?Ci(r||"a",a):r}return new ns(t.anchor)}createNode(t,r,a){let s;if(typeof r=="function")t=r.call({"":t},"",t),s=r;else if(Array.isArray(r)){let y=r.filter(v=>typeof v=="number"||v instanceof String||v instanceof Number).map(String);y.length>0&&(r=r.concat(y)),s=r}else a===void 0&&r&&(a=r,r=void 0);let{aliasDuplicateObjects:n,anchorPrefix:i,flow:o,keepUndefined:l,onTagObj:c,tag:d}=a??{},{onAnchor:p,setAnchors:h,sourceObjects:u}=up(this,i||"a"),g={aliasDuplicateObjects:n??!0,keepUndefined:l??!1,onAnchor:p,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:u},f=ar(t,d,g);return o&&Y(f)&&(f.flow=!0),h(),f}createPair(t,r,a={}){return new le(this.createNode(t,null,a),this.createNode(r,null,a))}delete(t){return Dt(this.contents)?this.contents.delete(t):!1}deleteIn(t){return sr(t)?this.contents!=null&&(this.contents=null,!0):Dt(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Y(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return sr(t)?!r&&K(this.contents)?this.contents.value:this.contents:Y(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Y(this.contents)?this.contents.has(t):!1}hasIn(t){return sr(t)?this.contents!==void 0:Y(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=zr(this.schema,[t],r):Dt(this.contents)&&this.contents.set(t,r)}setIn(t,r){sr(t)?this.contents=r:this.contents==null?this.contents=zr(this.schema,Array.from(t),r):Dt(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wt({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new wt({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{let s=JSON.stringify(t);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(a)this.schema=new Np(Object.assign(a,r));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:a,maxAliasCount:s,onAnchor:n,reviver:i}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=ue(this.contents,r??"",o);if(typeof n=="function")for(let{count:c,res:d}of o.anchors.values())n(d,c);return typeof i=="function"?kt(i,{"":l},"",l):l}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw Error(`"indent" option must be a positive integer, not ${r}`)}return zp(this,t)}};function Dt(e){if(Y(e))return!0;throw Error("Expected a YAML collection as document contents")}var so=class extends Error{constructor(e,t,r,a){super(),this.name=e,this.code=r,this.message=a,this.pos=t}},or=class extends so{constructor(e,t,r){super("YAMLParseError",e,t,r)}},Pp=class extends so{constructor(e,t,r){super("YAMLWarning",e,t,r)}},no=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:a,col:s}=r.linePos[0];r.message+=` at line ${a}, column ${s}`;let n=s-1,i=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(n>=60&&i.length>80){let o=Math.min(n-39,i.length-79);i="\u2026"+i.substring(o),n-=o-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),a>1&&/^ *$/.test(i.substring(0,n))){let o=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
201
|
+
`),i=o+i}if(/[^ ]/.test(i)){let o=1,l=r.linePos[1];l?.line===a&&l.col>s&&(o=Math.max(1,Math.min(l.col-s,80-n)));let c=" ".repeat(n)+"^".repeat(o);r.message+=`:
|
|
134
202
|
|
|
135
203
|
${i}
|
|
136
204
|
${c}
|
|
137
|
-
`}};function
|
|
138
|
-
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let
|
|
139
|
-
`+
|
|
140
|
-
`+
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
`+
|
|
144
|
-
`+f.comment:l.comment=f.comment),l.range=[
|
|
145
|
-
`.repeat(Math.max(1,i.length-1)):"",
|
|
146
|
-
`;for(let f=d;f<o;++f){let[
|
|
147
|
-
`):
|
|
148
|
-
`:!
|
|
205
|
+
`}};function Ct(e,{flow:t,indicator:r,next:a,offset:s,onError:n,parentIndent:i,startOnNewline:o}){let l=!1,c=o,d=o,p="",h="",u=!1,g=!1,f=null,y=null,v=null,A=null,x=null,b=null,$=null;for(let D of e)switch(g&&=(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&n(D.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),!1),f&&=(c&&D.type!=="comment"&&D.type!=="newline"&&n(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),null),D.type){case"space":!t&&(r!=="doc-start"||a?.type!=="flow-collection")&&D.source.includes(" ")&&(f=D),d=!0;break;case"comment":{d||n(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let j=D.source.substring(1)||" ";p?p+=h+j:p=j,h="",c=!1;break}case"newline":c?p?p+=D.source:b&&r==="seq-item-ind"||(l=!0):h+=D.source,c=!0,u=!0,(y||v)&&(A=D),d=!0;break;case"anchor":y&&n(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&n(D.offset+D.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=D,$??=D.offset,c=!1,d=!1,g=!0;break;case"tag":v&&n(D,"MULTIPLE_TAGS","A node can have at most one tag"),v=D,$??=D.offset,c=!1,d=!1,g=!0;break;case r:(y||v)&&n(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),b&&n(D,"UNEXPECTED_TOKEN",`Unexpected ${D.source} in ${t??"collection"}`),b=D,c=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){x&&n(D,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),x=D,c=!1,d=!1;break}default:n(D,"UNEXPECTED_TOKEN",`Unexpected ${D.type} token`),c=!1,d=!1}let S=e[e.length-1],E=S?S.offset+S.source.length:s;return g&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&n(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(c&&f.indent<=i||a?.type==="block-map"||a?.type==="block-seq")&&n(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:x,found:b,spaceBefore:l,comment:p,hasNewline:u,anchor:y,tag:v,newlineAfterProp:A,end:E,start:$??E}}function lr(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
206
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(lr(t.key)||lr(t.value))return!0}return!1;default:return!0}}function xs(e,t,r){if(t?.type==="flow-collection"){let a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&lr(t)&&r(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function io(e,t,r){let{uniqueKeys:a}=e.options;if(a===!1)return!1;let s=typeof a=="function"?a:(n,i)=>n===i||K(n)&&K(i)&&n.value===i.value;return t.some(n=>s(n.key,r))}var oo="All mapping items must start at the same column";function Mp({composeNode:e,composeEmptyNode:t},r,a,s,n){let i=new(n?.nodeClass??he)(r.schema);r.atRoot&&=!1;let o=a.offset,l=null;for(let c of a.items){let{start:d,key:p,sep:h,value:u}=c,g=Ct(d,{indicator:"explicit-key-ind",next:p??h?.[0],offset:o,onError:s,parentIndent:a.indent,startOnNewline:!0}),f=!g.found;if(f){if(p&&(p.type==="block-seq"?s(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==a.indent&&s(o,"BAD_INDENT",oo)),!g.anchor&&!g.tag&&!h){l=g.end,g.comment&&(i.comment?i.comment+=`
|
|
207
|
+
`+g.comment:i.comment=g.comment);continue}(g.newlineAfterProp||lr(p))&&s(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==a.indent&&s(o,"BAD_INDENT",oo);r.atKey=!0;let y=g.end,v=p?e(r,p,g,s):t(r,y,d,null,g,s);r.schema.compat&&xs(a.indent,p,s),r.atKey=!1,io(r,i.items,v)&&s(y,"DUPLICATE_KEY","Map keys must be unique");let A=Ct(h??[],{indicator:"map-value-ind",next:u,offset:v.range[2],onError:s,parentIndent:a.indent,startOnNewline:!p||p.type==="block-scalar"});if(o=A.end,A.found){f&&(u?.type==="block-map"&&!A.hasNewline&&s(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<A.found.offset-1024&&s(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let x=u?e(r,u,A,s):t(r,o,h,null,A,s);r.schema.compat&&xs(a.indent,u,s),o=x.range[2];let b=new le(v,x);r.options.keepSourceTokens&&(b.srcToken=c),i.items.push(b)}else{f&&s(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(v.comment?v.comment+=`
|
|
208
|
+
`+A.comment:v.comment=A.comment);let x=new le(v);r.options.keepSourceTokens&&(x.srcToken=c),i.items.push(x)}}return l&&l<o&&s(l,"IMPOSSIBLE","Map comment with trailing content"),i.range=[a.offset,o,l??o],i}function Up({composeNode:e,composeEmptyNode:t},r,a,s,n){let i=new(n?.nodeClass??et)(r.schema);r.atRoot&&=!1,r.atKey&&=!1;let o=a.offset,l=null;for(let{start:c,value:d}of a.items){let p=Ct(c,{indicator:"seq-item-ind",next:d,offset:o,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d?.type==="block-seq"?s(p.end,"BAD_INDENT","All sequence items must start at the same column"):s(o,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(i.comment=p.comment);continue}let h=d?e(r,d,p,s):t(r,p.end,c,null,p,s);r.schema.compat&&xs(a.indent,d,s),o=h.range[2],i.items.push(h)}return i.range=[a.offset,o,l??o],i}function cr(e,t,r,a){let s="";if(e){let n=!1,i="";for(let o of e){let{source:l,type:c}=o;switch(c){case"space":n=!0;break;case"comment":{r&&!n&&a(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";s?s+=i+d:s=d,i="";break}case"newline":s&&(i+=l),n=!0;break;default:a(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:s,offset:t}}var ws="Block collections are not allowed within flow collections",ks=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Hp({composeNode:e,composeEmptyNode:t},r,a,s,n){let i=a.start.source==="{",o=i?"flow map":"flow sequence",l=new(n?.nodeClass??(i?he:et))(r.schema);l.flow=!0;let c=r.atRoot;c&&(r.atRoot=!1),r.atKey&&=!1;let d=a.offset+a.start.source.length;for(let f=0;f<a.items.length;++f){let y=a.items[f],{start:v,key:A,sep:x,value:b}=y,$=Ct(v,{flow:o,indicator:"explicit-key-ind",next:A??x?.[0],offset:d,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!$.found){if(!$.anchor&&!$.tag&&!x&&!b){f===0&&$.comma?s($.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):f<a.items.length-1&&s($.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),$.comment&&(l.comment?l.comment+=`
|
|
209
|
+
`+$.comment:l.comment=$.comment),d=$.end;continue}!i&&r.options.strict&&lr(A)&&s(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(f===0)$.comma&&s($.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if($.comma||s($.start,"MISSING_CHAR",`Missing , between ${o} items`),$.comment){let S="";e:for(let E of v)switch(E.type){case"comma":case"space":break;case"comment":S=E.source.substring(1);break e;default:break e}if(S){let E=l.items[l.items.length-1];X(E)&&(E=E.value??E.key),E.comment?E.comment+=`
|
|
210
|
+
`+S:E.comment=S,$.comment=$.comment.substring(S.length+1)}}if(!i&&!x&&!$.found){let S=b?e(r,b,$,s):t(r,$.end,x,null,$,s);l.items.push(S),d=S.range[2],ks(b)&&s(S.range,"BLOCK_IN_FLOW",ws)}else{r.atKey=!0;let S=$.end,E=A?e(r,A,$,s):t(r,S,v,null,$,s);ks(A)&&s(E.range,"BLOCK_IN_FLOW",ws),r.atKey=!1;let D=Ct(x??[],{flow:o,indicator:"map-value-ind",next:b,offset:E.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(D.found){if(!i&&!$.found&&r.options.strict){if(x)for(let F of x){if(F===D.found)break;if(F.type==="newline"){s(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}$.start<D.found.offset-1024&&s(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else b&&("source"in b&&b.source?.[0]===":"?s(b,"MISSING_CHAR",`Missing space after : in ${o}`):s(D.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let j=b?e(r,b,D,s):D.found?t(r,D.end,x,null,D,s):null;j?ks(b)&&s(j.range,"BLOCK_IN_FLOW",ws):D.comment&&(E.comment?E.comment+=`
|
|
211
|
+
`+D.comment:E.comment=D.comment);let N=new le(E,j);if(r.options.keepSourceTokens&&(N.srcToken=y),i){let F=l;io(r,F.items,E)&&s(S,"DUPLICATE_KEY","Map keys must be unique"),F.items.push(N)}else{let F=new he(r.schema);F.flow=!0,F.items.push(N);let z=(j??E).range;F.range=[E.range[0],z[1],z[2]],l.items.push(F)}d=j?j.range[2]:D.end}}let p=i?"}":"]",[h,...u]=a.end,g=d;if(h?.source===p)g=h.offset+h.source.length;else{let f=o[0].toUpperCase()+o.substring(1),y=c?`${f} must end with a ${p}`:`${f} in block collection must be sufficiently indented and end with a ${p}`;s(d,c?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&u.unshift(h)}if(u.length>0){let f=cr(u,g,r.options.strict,s);f.comment&&(l.comment?l.comment+=`
|
|
212
|
+
`+f.comment:l.comment=f.comment),l.range=[a.offset,g,f.offset]}else l.range=[a.offset,g,g];return l}function $s(e,t,r,a,s,n){let i=r.type==="block-map"?Mp(e,t,r,a,n):r.type==="block-seq"?Up(e,t,r,a,n):Hp(e,t,r,a,n),o=i.constructor;return s==="!"||s===o.tagName?(i.tag=o.tagName,i):(s&&(i.tag=s),i)}function Wp(e,t,r,a,s){let n=a.tag,i=n?t.directives.tagName(n.source,h=>s(n,"TAG_RESOLVE_FAILED",h)):null;if(r.type==="block-seq"){let{anchor:h,newlineAfterProp:u}=a,g=h&&n?h.offset>n.offset?h:n:h??n;g&&(!u||u.offset<g.offset)&&s(g,"MISSING_CHAR","Missing newline after block sequence props")}let o=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!n||!i||i==="!"||i===he.tagName&&o==="map"||i===et.tagName&&o==="seq")return $s(e,t,r,s,i);let l=t.schema.tags.find(h=>h.tag===i&&h.collection===o);if(!l){let h=t.schema.knownTags[i];if(h?.collection===o)t.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h?s(n,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${h.collection??"scalar"}`,!0):s(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),$s(e,t,r,s,i)}let c=$s(e,t,r,s,i,l),d=l.resolve?.(c,h=>s(n,"TAG_RESOLVE_FAILED",h),t.options)??c,p=Q(d)?d:new I(d);return p.range=c.range,p.tag=i,l?.format&&(p.format=l.format),p}function Kp(e,t,r){let a=t.offset,s=Vp(t,e.options.strict,r);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};let n=s.mode===">"?I.BLOCK_FOLDED:I.BLOCK_LITERAL,i=t.source?Zp(t.source):[],o=i.length;for(let f=i.length-1;f>=0;--f){let y=i[f][1];if(y===""||y==="\r")o=f;else break}if(o===0){let f=s.chomp==="+"&&i.length>0?`
|
|
213
|
+
`.repeat(Math.max(1,i.length-1)):"",y=a+s.length;return t.source&&(y+=t.source.length),{value:f,type:n,comment:s.comment,range:[a,y,y]}}let l=t.indent+s.indent,c=t.offset+s.length,d=0;for(let f=0;f<o;++f){let[y,v]=i[f];if(v===""||v==="\r")s.indent===0&&y.length>l&&(l=y.length);else{y.length<l&&r(c+y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=y.length),d=f,l===0&&!e.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=y.length+v.length+1}for(let f=i.length-1;f>=o;--f)i[f][0].length>l&&(o=f+1);let p="",h="",u=!1;for(let f=0;f<d;++f)p+=i[f][0].slice(l)+`
|
|
214
|
+
`;for(let f=d;f<o;++f){let[y,v]=i[f];c+=y.length+v.length+1;let A=v[v.length-1]==="\r";if(A&&(v=v.slice(0,-1)),v&&y.length<l){let x=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;r(c-v.length-(A?2:1),"BAD_INDENT",x),y=""}n===I.BLOCK_LITERAL?(p+=h+y.slice(l)+v,h=`
|
|
215
|
+
`):y.length>l||v[0]===" "?(h===" "?h=`
|
|
216
|
+
`:!u&&h===`
|
|
149
217
|
`&&(h=`
|
|
150
218
|
|
|
151
|
-
`),
|
|
152
|
-
`,
|
|
153
|
-
`?
|
|
219
|
+
`),p+=h+y.slice(l)+v,h=`
|
|
220
|
+
`,u=!0):v===""?h===`
|
|
221
|
+
`?p+=`
|
|
154
222
|
`:h=`
|
|
155
|
-
`:(
|
|
156
|
-
`+i[f][0].slice(l);
|
|
157
|
-
`&&(
|
|
158
|
-
`);break;default:
|
|
159
|
-
`}let
|
|
223
|
+
`:(p+=h+v,h=" ",u=!1)}switch(s.chomp){case"-":break;case"+":for(let f=o;f<i.length;++f)p+=`
|
|
224
|
+
`+i[f][0].slice(l);p[p.length-1]!==`
|
|
225
|
+
`&&(p+=`
|
|
226
|
+
`);break;default:p+=`
|
|
227
|
+
`}let g=a+s.length+t.source.length;return{value:p,type:n,comment:s.comment,range:[a,g,g]}}function Vp({offset:e,props:t},r,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],n=s[0],i=0,o="",l=-1;for(let h=1;h<s.length;++h){let u=s[h];if(!o&&(u==="-"||u==="+"))o=u;else{let g=Number(u);!i&&g?i=g:l===-1&&(l=e+h)}}l!==-1&&a(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,d="",p=s.length;for(let h=1;h<t.length;++h){let u=t[h];switch(u.type){case"space":c=!0;case"newline":p+=u.source.length;break;case"comment":r&&!c&&a(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=u.source.length,d=u.source.substring(1);break;case"error":a(u,"UNEXPECTED_TOKEN",u.message),p+=u.source.length;break;default:{a(u,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${u.type}`);let g=u.source;g&&typeof g=="string"&&(p+=g.length)}}}return{mode:n,indent:i,chomp:o,comment:d,length:p}}function Zp(e){let t=e.split(/\n( *)/),r=t[0],a=r.match(/^( *)/),s=[a?.[1]?[a[1],r.slice(a[1].length)]:["",r]];for(let n=1;n<t.length;n+=2)s.push([t[n],t[n+1]]);return s}function Jp(e,t,r){let{offset:a,type:s,source:n,end:i}=e,o,l,c=(h,u,g)=>r(a+h,u,g);switch(s){case"scalar":o=I.PLAIN,l=Gp(n,c);break;case"single-quoted-scalar":o=I.QUOTE_SINGLE,l=Xp(n,c);break;case"double-quoted-scalar":o=I.QUOTE_DOUBLE,l=Yp(n,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+n.length,a+n.length]}}let d=a+n.length,p=cr(i,d,t,r);return{value:l,type:o,comment:p.comment,range:[a,d,p.offset]}}function Gp(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),lo(e)}function Xp(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),lo(e.slice(1,-1)).replace(/''/g,"'")}function lo(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let a,s;try{a=RegExp("(?<![ ])[ ]+$"),s=RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{a=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let n=r[1].replace(a,""),i=" ",o=t.lastIndex;for(;r=t.exec(e);){let c=r[1].replace(s,"");c===""?i===`
|
|
160
228
|
`?n+=i:i=`
|
|
161
|
-
`:(n+=i+c,i=" "),o=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=o,
|
|
229
|
+
`:(n+=i+c,i=" "),o=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=o,r=l.exec(e),n+i+(r?.[1]??"")}function Yp(e,t){let r="";for(let a=1;a<e.length-1;++a){let s=e[a];if(s!=="\r"||e[a+1]!==`
|
|
162
230
|
`)if(s===`
|
|
163
|
-
`){let{fold:n,offset:i}=
|
|
164
|
-
`)for(n=e[
|
|
165
|
-
`)for(n=e[++
|
|
166
|
-
`&&(i!=="\r"||e[
|
|
167
|
-
`)&&(a
|
|
168
|
-
`||
|
|
169
|
-
`);)
|
|
170
|
-
`&&(
|
|
171
|
-
`),t+=1,
|
|
172
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
231
|
+
`){let{fold:n,offset:i}=Qp(e,a);r+=n,a=i}else if(s==="\\"){let n=e[++a],i=eu[n];if(i)r+=i;else if(n===`
|
|
232
|
+
`)for(n=e[a+1];n===" "||n===" ";)n=e[++a+1];else if(n==="\r"&&e[a+1]===`
|
|
233
|
+
`)for(n=e[++a+1];n===" "||n===" ";)n=e[++a+1];else if(n==="x"||n==="u"||n==="U"){let o=n==="x"?2:n==="u"?4:8;r+=tu(e,a+1,o,t),a+=o}else{let o=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(s===" "||s===" "){let n=a,i=e[a+1];for(;i===" "||i===" ";)i=e[++a+1];i!==`
|
|
234
|
+
`&&(i!=="\r"||e[a+2]!==`
|
|
235
|
+
`)&&(r+=a>n?e.slice(n,a+1):s)}else r+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function Qp(e,t){let r="",a=e[t+1];for(;(a===" "||a===" "||a===`
|
|
236
|
+
`||a==="\r")&&(a!=="\r"||e[t+2]===`
|
|
237
|
+
`);)a===`
|
|
238
|
+
`&&(r+=`
|
|
239
|
+
`),t+=1,a=e[t+1];return r||=" ",{fold:r,offset:t}}var eu={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
240
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function tu(e,t,r,a){let s=e.substr(t,r),n=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(n)}catch{let i=e.substr(t-2,r+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}function co(e,t,r,a){let{value:s,type:n,comment:i,range:o}=t.type==="block-scalar"?Kp(e,t,a):Jp(t,e.options.strict,a),l=r?e.directives.tagName(r.source,p=>a(r,"TAG_RESOLVE_FAILED",p)):null,c;c=e.options.stringKeys&&e.atKey?e.schema[ke]:l?ru(e.schema,s,l,r,a):t.type==="scalar"?au(e,s,t,a):e.schema[ke];let d;try{let p=c.resolve(s,h=>a(r??t,"TAG_RESOLVE_FAILED",h),e.options);d=K(p)?p:new I(p)}catch(p){let h=p instanceof Error?p.message:String(p);a(r??t,"TAG_RESOLVE_FAILED",h),d=new I(s)}return d.range=o,d.source=s,n&&(d.type=n),l&&(d.tag=l),c.format&&(d.format=c.format),i&&(d.comment=i),d}function ru(e,t,r,a,s){if(r==="!")return e[ke];let n=[];for(let o of e.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)n.push(o);else return o;for(let o of n)if(o.test?.test(t))return o;let i=e.knownTags[r];return i&&!i.collection?(e.tags.push(Object.assign({},i,{default:!1,test:void 0})),i):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[ke])}function au({atKey:e,directives:t,schema:r},a,s,n){let i=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(a))||r[ke];if(r.compat){let o=r.compat.find(l=>l.default&&l.test?.test(a))??r[ke];i.tag!==o.tag&&n(s,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(i.tag)} or ${t.tagString(o.tag)}`,!0)}return i}function su(e,t,r){if(t){r??=t.length;for(let a=r-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];s?.type==="space";)e+=s.source.length,s=t[++a];break}}return e}var nu={composeNode:po,composeEmptyNode:Ss};function po(e,t,r,a){let s=e.atKey,{spaceBefore:n,comment:i,anchor:o,tag:l}=r,c,d=!0;switch(t.type){case"alias":c=iu(e,t,a),(o||l)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=co(e,t,l,a),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Wp(nu,e,t,r,a),o&&(c.anchor=o.source.substring(1))}catch(p){a(t,"RESOURCE_EXHAUSTION",p instanceof Error?p.message:String(p))}break;default:a(t,"UNEXPECTED_TOKEN",t.type==="error"?t.message:`Unsupported token (type: ${t.type})`),d=!1}return c??=Ss(e,t.offset,void 0,null,r,a),o&&c.anchor===""&&a(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!K(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&a(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),n&&(c.spaceBefore=!0),i&&(t.type==="scalar"&&t.source===""?c.comment=i:c.commentBefore=i),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Ss(e,t,r,a,{spaceBefore:s,comment:n,anchor:i,tag:o,end:l},c){let d=co(e,{type:"scalar",offset:su(t,r,a),indent:-1,source:""},o,c);return i&&(d.anchor=i.source.substring(1),d.anchor===""&&c(i,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(d.spaceBefore=!0),n&&(d.comment=n,d.range[2]=l),d}function iu({options:e},{offset:t,source:r,end:a},s){let n=new ns(r.substring(1));n.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),n.source.endsWith(":")&&s(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let i=t+r.length,o=cr(a,i,e.strict,s);return n.range=[t,i,o.offset],o.comment&&(n.comment=o.comment),n}function ou(e,t,{offset:r,start:a,value:s,end:n},i){let o=new ao(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},c=Ct(a,{indicator:"doc-start",next:s??n?.[0],offset:r,onError:i,parentIndent:0,startOnNewline:!0});c.found&&(o.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!c.hasNewline&&i(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=s?po(l,s,c,i):Ss(l,c.end,a,null,c,i);let d=o.contents.range[2],p=cr(n,d,!1,i);return p.comment&&(o.comment=p.comment),o.range=[r,d,p.offset],o}function dr(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function uo(e){let t="",r=!1,a=!1;for(let s=0;s<e.length;++s){let n=e[s];switch(n[0]){case"#":t+=(t===""?"":a?`
|
|
173
241
|
|
|
174
242
|
`:`
|
|
175
|
-
`)+(n.substring(1)||" "),
|
|
176
|
-
${
|
|
177
|
-
${i}`:
|
|
178
|
-
${n}`:
|
|
179
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new
|
|
243
|
+
`)+(n.substring(1)||" "),r=!0,a=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),r=!1;break;default:r||(a=!0),r=!1}}return{comment:t,afterEmptyLine:a}}var lu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,a,s)=>{let n=dr(t);s?this.warnings.push(new Pp(n,r,a)):this.errors.push(new or(n,r,a))},this.directives=new wt({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:a}=uo(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
244
|
+
${r}`:r;else if(a||e.directives.docStart||!s)e.commentBefore=r;else if(Y(s)&&!s.flow&&s.items.length>0){let n=s.items[0];X(n)&&(n=n.key);let i=n.commentBefore;n.commentBefore=i?`${r}
|
|
245
|
+
${i}`:r}else{let n=s.commentBefore;s.commentBefore=n?`${r}
|
|
246
|
+
${n}`:r}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:uo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let a of e)yield*this.next(a);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,a)=>{let s=dr(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=ou(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new or(dr(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new or(dr(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=cr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
247
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new or(dr(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=new ao(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},As=Symbol("break visit"),cu=Symbol("skip children"),ho=Symbol("remove item");function Tt(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),mo(Object.freeze([]),e,t)}Tt.BREAK=As,Tt.SKIP=cu,Tt.REMOVE=ho,Tt.itemAtPath=(e,t)=>{let r=e;for(let[a,s]of t){let n=r?.[a];if(n&&"items"in n)r=n.items[s];else return}return r},Tt.parentCollection=(e,t)=>{let r=Tt.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=r?.[a];if(s&&"items"in s)return s;throw Error("Parent collection not found")};function mo(e,t,r){let a=r(t,e);if(typeof a=="symbol")return a;for(let s of["key","value"]){let n=t[s];if(n&&"items"in n){for(let i=0;i<n.items.length;++i){let o=mo(Object.freeze(e.concat([[s,i]])),n.items[i],r);if(typeof o=="number")i=o-1;else{if(o===As)return As;o===ho&&(n.items.splice(i,1),--i)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}function du(e){switch(e){case"\uFEFF":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
180
248
|
`:case`\r
|
|
181
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function
|
|
182
|
-
`:case"\r":case" ":return!0;default:return!1}}var
|
|
183
|
-
\r `),
|
|
249
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ve(e){switch(e){case void 0:case" ":case`
|
|
250
|
+
`:case"\r":case" ":return!0;default:return!1}}var fo=new Set("0123456789ABCDEFabcdef"),pu=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ra=new Set(",[]{}"),uu=new Set(` ,[]{}
|
|
251
|
+
\r `),Es=e=>!e||uu.has(e),hu=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
184
252
|
`||t==="\r"&&this.buffer[e+1]===`
|
|
185
|
-
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let
|
|
186
|
-
`||!
|
|
187
|
-
`||
|
|
188
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]==="\uFEFF"&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,
|
|
189
|
-
`,this.pos);if(
|
|
190
|
-
`,s)}
|
|
253
|
+
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let a=this.buffer[r+e+1];if(a===`
|
|
254
|
+
`||!a&&!this.atEnd)return e+r+1}return t===`
|
|
255
|
+
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ve(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
256
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]==="\uFEFF"&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")--t;else break}let a=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&ve(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ve(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ve(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Es),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&ve(a[3]))&&(r!==this.indentNext-1||this.flowLevel!==1||a[0]!=="]"&&a[0]!=="}"))return this.flowLevel=0,yield"",yield*this.parseLineStart();let s=0;for(;a[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),a[s]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Es),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let n=this.charAt(1);if(this.flowKey||ve(n)||n===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2==0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),a=r.indexOf(`
|
|
257
|
+
`,this.pos);if(a!==-1){for(;a!==-1;){let s=this.continueScalar(a+1);if(s===-1)break;a=r.indexOf(`
|
|
258
|
+
`,s)}a!==-1&&(t=a-(r[a-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>ve(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
|
|
191
259
|
`:e=s,t=0;break;case"\r":{let n=this.buffer[s+1];if(!n&&!this.atEnd)return this.setNext("block-scalar");if(n===`
|
|
192
|
-
`)break}default:break e}if(!
|
|
193
|
-
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let
|
|
194
|
-
`;)
|
|
195
|
-
`&&s>=this.pos&&s+1+t>i)e=s;else break}while(!0);return yield"",yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,
|
|
196
|
-
`?(
|
|
197
|
-
`,s=this.buffer[
|
|
198
|
-
`){let n=this.continueScalar(
|
|
260
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
261
|
+
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
262
|
+
`;)r=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let s=e-1,n=this.buffer[s];n==="\r"&&(n=this.buffer[--s]);let i=s;for(;n===" ";)n=this.buffer[--s];if(n===`
|
|
263
|
+
`&&s>=this.pos&&s+1+t>i)e=s;else break}while(!0);return yield"",yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){let s=this.buffer[r+1];if(ve(s)||e&&ra.has(s))break;t=r}else if(ve(a)){let s=this.buffer[r+1];if(a==="\r"&&(s===`
|
|
264
|
+
`?(r+=1,a=`
|
|
265
|
+
`,s=this.buffer[r+1]):t=r),s==="#"||e&&ra.has(s))break;if(a===`
|
|
266
|
+
`){let n=this.continueScalar(r+1);if(n===-1)break;r=Math.max(r,n-2)}}else{if(e&&ra.has(a))break;t=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield"",yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Es),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(ve(r)||t&&ra.has(r)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!ve(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(pu.has(t))t=this.buffer[++e];else if(t==="%"&&fo.has(this.buffer[e+1])&&fo.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
199
267
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
200
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,
|
|
268
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let a=t-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=t),a}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},mu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let a=this.lineStarts[t-1];return{line:t,col:e-a+1}}}};function Le(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function go(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function yo(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function aa(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Ot(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function sa(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function bo(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!Le(t.start,"explicit-key-ind")&&!Le(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,yo(t.value)?t.value.end?sa(t.value.end,t.sep):t.value.end=t.sep:sa(t.start,t.sep),delete t.sep)}var fu=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new hu,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=du(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}else{if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&bo(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(a.sep)a.value=t;else{Object.assign(a,{key:t,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{let a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:t}):a.value=t;break}case"flow-collection":{let a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:t,sep:[]}):a.sep?a.value=t:Object.assign(a,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let a=t.items[t.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&go(a.start)===-1&&(t.indent===0||a.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":go(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Ot(aa(this.peek(2))),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
201
269
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
202
|
-
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let
|
|
270
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){sa(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,a=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(a&&t.sep&&!t.value){let n=[];for(let i=0;i<t.sep.length;++i){let o=t.sep[i];switch(o.type){case"newline":n.push(i);break;case"space":break;case"comment":o.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":a||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):a||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Le(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(yo(t.key)&&!Le(t.sep,"newline")){let n=Ot(t.start),i=t.key,o=t.sep;o.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:i,sep:o}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Le(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let n=Ot(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||a?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Le(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);a||t.value?(e.items.push({start:s,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let n=this.startBlockValue(e);if(n){if(n.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Le(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:s});this.stack.push(n);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){sa(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Le(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:a,sep:[]}):t.sep?this.stack.push(a):Object.assign(t,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let a=Ot(aa(r));bo(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:a,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
203
271
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
204
|
-
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ut(Na(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ut(Na(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Wd(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Md||null,prettyErrors:t}}function Vd(e,t={}){let{lineCounter:a,prettyErrors:r}=Wd(t),s=new Hd(a?.addNewLine),n=new Ld(t),i=null;for(let o of n.compose(s.parse(e),!0,e.length))if(!i)i=o;else if(i.options.logLevel!=="silent"){i.errors.push(new zt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&a&&(i.errors.forEach(Ai(e,a)),i.warnings.forEach(Ai(e,a))),i}function es(e,t,a){let r;typeof t=="function"?r=t:a===void 0&&t&&typeof t=="object"&&(a=t);let s=Vd(e,a);if(!s)return null;if(s.warnings.forEach(n=>(s.options.logLevel,void 0)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},a))}function La(e){if(e!==null){if(typeof e=="string"){if(e.trim()==="")return;try{return JSON.parse(e)}catch{let t=/^[^:]+:/.test(e),a=e.slice(0,50).trimStart().startsWith("{");return!t||a?void 0:es(e,{maxAliasCount:1e4,merge:!0})}}return Cr(e),e}}function ts(e,t={}){if(Cr(e))return e;let a=La(e);return Array.isArray(a)?a:[{isEntrypoint:!0,specification:a,filename:null,dir:"./",references:Hn(a),...t}]}function Kd(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function Zd(e){return e.split("/").slice(1).map(Kd)}function Jd(e,t,a,r=[]){let s=ts(structuredClone(e)),n=Ie(s),i=a?.specification??n.specification;if(!P(i)){if(t?.throwOnError)throw Error(ie.NO_CONTENT);return{valid:!1,errors:r,schema:i}}return as(i,s,a??n,new WeakSet,r,t),r=r.filter((o,l,c)=>l===c.findIndex(d=>d.message===o.message&&d.code===o.code)),{valid:r.length===0,errors:r,schema:i}}function as(e,t,a,r,s,n){if(e===null||r.has(e))return;r.add(e);function i(l){return as(l.specification,t,l,r,s,n),l}let o=new Set;for(;e.$ref!==void 0;){if(o.has(e.$ref)){s.push({code:"SELF_REFERENCE",message:ie.SELF_REFERENCE.replace("%s",e.$ref)}),delete e.$ref;break}o.add(e.$ref);let l=Ii(e.$ref,n,a,t,i,s);if(typeof l!="object"||!l)break;let c=e.$ref;delete e.$ref;for(let d of Object.keys(l))e[d]===void 0&&(e[d]=l[d]);c&&n?.onDereference?.({schema:e,ref:c,resolved:l})}for(let l of Object.values(e))typeof l=="object"&&l&&as(l,t,a,r,s,n)}function Ii(e,t,a,r,s,n){if(typeof e!="string"){if(t?.throwOnError)throw Error(ie.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:ie.INVALID_REFERENCE.replace("%s",e)});return}let[i,o]=e.split("#",2),l=i!==a.filename;if(i&&l){let c=r.find(d=>d.filename===i);if(!c){if(t?.throwOnError)throw Error(ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i));n.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i)});return}return o===void 0?c.specification:Ii(`#${o}`,t,s(c),r,s,n)}try{return Zd(o).reduce((c,d)=>{if(!ne(c)||!(d in c))throw Error(ie.INVALID_REFERENCE.replace("%s",e));return c[d]},a.specification)}catch{if(t?.throwOnError)throw Error(ie.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:ie.INVALID_REFERENCE.replace("%s",e)})}}function zi(e,t){let a=ts(e),r=Ie(a),s=Jd(a,t);return{specification:r.specification,errors:s.errors,schema:s.schema,...Mn(r.specification)}}var Gd=1e5,Xd=10,Pi=e=>{let t=new WeakSet,a={sourceEntries:0,copiedEntries:0,sizes:new Map},r=s=>{if(s===null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===void 0)return s;if(!Array.isArray(s)&&!P(s))return structuredClone(s);if(t.has(s))throw Error("Cannot upgrade to OpenAPI 3.2: cyclic objects cannot be represented in JSON. Use $ref instead.");let n=a.sizes.get(s)??1+(Array.isArray(s)?s.length:Object.keys(s).length);if(a.sizes.has(s)||(a.sizes.set(s,n),a.sourceEntries+=n),a.copiedEntries+=n,a.copiedEntries>Gd&&a.copiedEntries>a.sourceEntries*Xd)throw Error("Cannot upgrade to OpenAPI 3.2: excessive YAML alias expansion. Use $ref for shared schemas.");t.add(s);let i=Array.isArray(s)?s.map(r):Object.fromEntries(Object.entries(s).map(([o,l])=>[o,r(l)]));return t.delete(s),i};return r(e)},ht=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Yd=e=>e.replaceAll("~1","/").replaceAll("~0","~"),Qd=e=>decodeURI(Yd(e)),Ui=e=>e.split("/").slice(1).map(Qd),Mi=class extends AggregateError{errors;constructor(e){super(e,e.map(t=>t.message).join(`
|
|
205
|
-
`)),this.errors=e,this.name="UpgradeIncompatibilityError"}},ep=["properties","patternProperties","$defs","dependentSchemas"],tp=["allOf","anyOf","oneOf","prefixItems"],ap=["items","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"],rp=(e,t="throw")=>{let a=new WeakMap,r=(g,w)=>{let $=a.get(g)??new Map(Object.entries(Object.getOwnPropertyDescriptors(g)).filter(([,A])=>Object.hasOwn(A,"value")).map(([A,S])=>[A,S.value]));return a.set(g,$),$.get(w)},s=new Set,n=[],i=new WeakMap,o=new WeakSet,l={evaluations:0},c=new WeakSet,d=[],u=g=>{P(g)&&!c.has(g)&&(c.add(g),u(g.items),Array.isArray(g.prefixItems)&&g.prefixItems.forEach(u))},h=new WeakMap,m=new WeakMap,y=(g,w)=>{n.push(Error(`Cannot upgrade to OpenAPI 3.2 at ${g}: ${w}`))},f=(g,w=!1)=>{if(typeof g=="string"&&g.startsWith("#/"))try{return Ui(decodeURIComponent(g.slice(1))).reduce(($,A)=>{if((!w||!P($)||$.$id===void 0&&$.$schema===void 0)&&(!Array.isArray($)||/^(0|[1-9]\d*)$/.test(A))&&(P($)||Array.isArray($))&&Object.hasOwn($,A))return r($,A)},e)}catch{return}},b=(g,w)=>{if(typeof g!="string")return;let $=[...g.matchAll(/\{([^{}]+)\}/g)].map(A=>A[1]);new Set($).size!==$.length&&y(w,"Template variables must not be repeated. Rename the repeated variable and define it separately.")},x=(g,w,$=new Set)=>{if(g===!1)return!0;if(g===!0)return!1;if(!P(g)||g.$id!==void 0||g.$schema!==void 0)return;if($.has(g)){for(let C of $)o.add(C);return}let A=i.get(g)??new Map;if(A.has(w))return A.get(w);if(++l.evaluations>1e5){l.evaluations===100001&&y("#","Discriminator requiredness analysis was truncated after 100,000 evaluations.");return}let S=C=>((C!==void 0||!o.has(g))&&(A.set(w,C),i.set(g,A)),C);if(Array.isArray(g.required)&&g.required.includes(w))return S(!0);let _=new Set([...$,g]),N=[];g.$ref!==void 0&&N.push(x(f(g.$ref,!0),w,_)),Array.isArray(g.allOf)&&N.push(...g.allOf.map(C=>x(C,w,_)));for(let C of["oneOf","anyOf"])if(Array.isArray(g[C])){let q=g[C].map(Z=>x(Z,w,_));q.every(Z=>Z===!0)?N.push(!0):q.every(Z=>Z===!1)?N.push(!1):N.push(void 0)}return N.includes(!0)?S(!0):N.includes(void 0)||["if","not","$dynamicRef","const","enum","minProperties","dependentRequired","dependentSchemas"].some(C=>C in g)?S(void 0):S(!1)},v=(g,w,{inferredName:$,propertyName:A,dialect:S,ancestors:_=new Set,baseChanged:N=!1})=>{if(!P(g)||_.has(g)||(g.$schema??S)!==void 0)return;let C=N||g.$id!==void 0,q=[$,A,C].join(":"),Z=h.get(g)??new Set;if(Z.has(q))return;let pe=P(g.xml)?g.xml:{},Q=g.$ref!==void 0||g.$dynamicRef!==void 0||g.type==="array"?"none":"element",j=pe.wrapped===!0?"element":Q,V=pe.nodeType??(pe.attribute===!0?"attribute":j);(V==="element"||V==="attribute")&&!$&&pe.name===void 0&&y(w,"An inline XML element needs an explicit xml.name.");let L={dialect:S,ancestors:new Set([..._,g]),baseChanged:C};if(!C&&typeof g.$ref=="string"){let W=f(g.$ref,!0);if(P(W)){let z=Ui(decodeURIComponent(g.$ref.slice(1))),gt=z.length===3&&z[0]==="components"&&z[1]==="schemas",Ve=c.has(W);v(W,g.$ref,{...L,inferredName:gt||Ve,propertyName:Ve})}}for(let W of["allOf","anyOf","oneOf"]){let z=g[W];Array.isArray(z)&&z.forEach((gt,Ve)=>v(gt,w+"/"+W+"/"+Ve,{...L,inferredName:!1,propertyName:!1}))}if(v(g.items,w+"/items",{...L,inferredName:A,propertyName:A}),Array.isArray(g.prefixItems)&&g.prefixItems.forEach((W,z)=>v(W,w+"/prefixItems/"+z,{...L,inferredName:A,propertyName:A})),P(g.properties))for(let[W,z]of Object.entries(g.properties))v(z,w+"/properties/"+ht(W),{...L,inferredName:!0,propertyName:!0});Z.add(q),h.set(g,Z)},k=(g,w,$,A=e.jsonSchemaDialect,S=!1)=>{if(!P(g))return;let _=w==="schema"?g.$schema??A:A,N=S||w==="schema"&&g.$id!==void 0,C=`${w}:${String(_)}:${N}`,q=m.get(g)??new Set;if(q.has(C))return;q.add(C),m.set(g,q);let Z=(j,V)=>k(r(g,j),V,`${$}/${ht(j)}`,_,N),pe=(j,V)=>{let L=r(g,j);Array.isArray(L)&&L.forEach((W,z)=>k(W,V,`${$}/${j}/${z}`,_,N))},Q=(j,V)=>{let L=r(g,j);if(P(L))for(let[W,z]of Object.entries(L))j==="responses"&&W.startsWith("x-")||(w==="schema"&&j==="properties"&&u(z),k(z,V,`${$}/${j}/${ht(W)}`,_,N))};if(w==="schema"){if(_!==void 0)return;let j=r(g,"xml");P(j)&&(j.wrapped===!0&&j.attribute===!0&&y(`${$}/xml`,"wrapped and attribute cannot both be true."),(j.wrapped===!0||j.attribute===!0)&&(j.nodeType=j.attribute===!0?"attribute":"element",delete j.wrapped,delete j.attribute)),!N&&g.$ref!==void 0&&k(f(g.$ref,!0),"schema",String(g.$ref),_);let V=g.discriminator;P(V)&&typeof V.propertyName=="string"&&V.defaultMapping===void 0&&!N&&x(g,V.propertyName)===!1&&y(`${$}/discriminator`,"An optional discriminating property needs an explicit defaultMapping.");for(let L of ep)Q(L,"schema");for(let L of tp)pe(L,"schema");for(let L of ap)Z(L,"schema");return}switch(g.$ref!==void 0&&k(f(g.$ref),w,String(g.$ref),_),w){case"document":{let j=r(g,"paths");if(P(j))for(let[L,W]of Object.entries(j)){if(!L.startsWith("/"))continue;let z=`${$}/paths/${ht(L)}`;b(L,z),k(W,"pathItem",z)}Q("webhooks","pathItem"),pe("servers","server");let V=r(g,"components");if(P(V))for(let[L,W]of Object.entries({schemas:"schema",parameters:"parameter",headers:"header",requestBodies:"body",responses:"response",callbacks:"callback",pathItems:"pathItem"})){let z=r(V,L);if(P(z))for(let[gt,Ve]of Object.entries(z))k(Ve,W,`${$}/components/${L}/${ht(gt)}`)}break}case"pathItem":for(let j of["get","put","post","delete","options","head","patch","trace"])Z(j,"operation");pe("parameters","parameter"),pe("servers","server");break;case"operation":if(Array.isArray(g.tags))for(let j of g.tags)typeof j=="string"&&s.add(j);pe("parameters","parameter"),pe("servers","server"),Z("requestBody","body"),Q("responses","response"),Q("callbacks","callback");break;case"callback":for(let[j,V]of Object.entries(g))!j.startsWith("x-")&&j!=="$ref"&&k(V,"pathItem",`${$}/${ht(j)}`,_,N);break;case"parameter":(g.in==="path"||g.in==="cookie")&&delete g.allowReserved,Z("schema","schema"),Q("content","media");break;case"header":Z("schema","schema"),Q("content","media");break;case"response":Q("headers","header"),Q("content","media");break;case"body":Q("content","media");break;case"media":/\/(?:[^;]+\+)?xml(?:\s*;|$)/i.test($.slice($.lastIndexOf("/")+1).replace(/~1/g,"/"))&&d.push({schema:g.schema,path:`${$}/schema`,dialect:_}),Z("schema","schema"),Q("encoding","encoding");break;case"encoding":Q("headers","header");break;case"server":b(g.url,`${$}/url`)}};k(e,"document","#");for(let{schema:g,path:w,dialect:$}of d)v(g,w,{inferredName:!1,propertyName:!1,dialect:$});if(n.length>0&&t==="throw")throw new Mi(n);return s},sp=(e,t)=>{let a=e["x-tagGroups"];if(!Array.isArray(a)||a.length===0||e.tags!==void 0&&!Array.isArray(e.tags))return;let r=e.tags??[];if(!r.every(l=>P(l)&&typeof l.name=="string"))return;let s=new Map(r.map(l=>[l.name,l])),n=new Set,i=new Set;for(let l of a){if(!P(l)||typeof l.name!="string"||!l.name||!Array.isArray(l.tags)||!l.tags.every(c=>typeof c=="string")||Object.keys(l).some(c=>c!=="name"&&c!=="tags")||n.has(l.name)||s.has(l.name)||t.has(l.name))return;n.add(l.name);for(let c of l.tags){if(i.has(c)||s.get(c)?.parent!==void 0)return;i.add(c)}}if([...n].some(l=>i.has(l))||s.size!==r.length)return;let o=[];for(let l of a){o.push({name:l.name,kind:"nav"});for(let c of l.tags)o.push({...s.get(c)??{name:c},parent:l.name})}e.tags=[...o,...r.filter(l=>!i.has(l.name))]},np=e=>{if(!P(e)||typeof e.openapi!="string")return!1;if(/^3\.1\.\d+$/.test(e.openapi))return!0;if(/^3\.1(?:\D|$)/.test(e.openapi))throw Error(`Cannot upgrade to OpenAPI 3.2: invalid OpenAPI version "${e.openapi}". Expected 3.1.x with a numeric patch version.`);return!1},ip=(e,t="throw")=>(np(e)&&(sp(e,rp(e,t)),e.openapi="3.2.0"),e);function Hi(e,t,a){if(t==="3.2"){let s=Un(Nn(Pi(e)));try{let n=ip(s,a?.onIncompatible==="ignore"?"ignore":"throw");return a?.onIncompatible==="collect"?{document:n,diagnostics:[]}:n}catch(n){if(a?.onIncompatible!=="collect"||!(n instanceof Mi))throw n;return{document:Hi(Pi(e),"3.1"),diagnostics:n.errors}}}let r=Nn(e);return t==="3.0"?r:Un(r)}function op(e){if(!e)return{specification:null,version:void 0};let t=Hi(Cr(e)?Ie(e).specification:La(e),"3.1"),{version:a}=Mn(t);return{specification:t,version:a==="3.1"||a==="3.2"?a:void 0}}async function Wi(e,t){let a=[];if(t?.filesystem?.find(o=>o.filename===e))return{specification:Ie(t.filesystem)?.specification,filesystem:t.filesystem,errors:a};let r=t?.plugins?.find(o=>o.check(e)),s=La(e);if(r)try{s=La(await r.get(e))}catch{if(t?.throwOnError)throw Error(ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return a.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:ie.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:a}}if(s===void 0){if(t?.throwOnError)throw Error("No content to load");return a.push({code:"NO_CONTENT",message:ie.NO_CONTENT}),{specification:null,filesystem:[],errors:a}}let n=ts(s,{filename:t?.filename??null}),i=(t?.filename?n.find(o=>o.filename===t?.filename):Ie(n)).references??Hn(s);if(i.length===0)return{specification:Ie(n)?.specification,filesystem:n,errors:a};for(let o of i){let l=t?.plugins?.find(h=>h.check(o));if(!l)continue;let c=l.check(o)&&l.resolvePath?l.resolvePath(e,o):o;if(n.find(h=>h.filename===o))continue;let{filesystem:d,errors:u}=await Wi(c,{...t,filename:o});a.push(...u),n=[...n,...d.map(h=>({...h,isEntrypoint:!1}))]}return{specification:Ie(n)?.specification,filesystem:n,errors:a}}function rs(e){if(typeof e!="string")return!1;let t=e.trim();return!(t.startsWith("{")||t.startsWith("[")||t.includes(`
|
|
206
|
-
`))}function lp(e){let t=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost/",a=e?new URL(e,t):new URL(t);return{check(r){return typeof r!="string"||r.startsWith("#")?!1:rs(r)},resolvePath(r,s){if(s.startsWith("http://")||s.startsWith("https://"))return s;let n=r&&(r.startsWith("http://")||r.startsWith("https://"))?new URL(r):a;return new URL(s,n).href},async get(r){let s=r.startsWith("http://")||r.startsWith("https://")?r:new URL(r,a).href,n=await fetch(s);if(!n.ok){let o=Error(`Failed to load ${s} (${n.status})`);throw o.status=n.status,o.statusCode=n.status,o.response=n,o.url=s,o}let i=await n.text();try{return JSON.parse(i)}catch{try{return es(i,{maxAliasCount:-1,merge:!0})}catch{return i}}}}}function Vi(e){let t=new WeakMap,a=new WeakSet;function r(s,n=new Set,i=null){if(!s||typeof s!="object")return s;let o=s["x-ref"];if(o&&n.has(o))return{$ref:o};if(a.has(s))return{$ref:o||i||"#/components/schemas/Circular"};if(t.has(s))return t.get(s);a.add(s);let l=n;o&&(l=new Set(n),l.add(o));let c;if(Array.isArray(s)){c=[],t.set(s,c);for(let d=0;d<s.length;d++)c.push(r(s[d],l,o||i))}else{c={},t.set(s,c);for(let d of Object.keys(s))d!=="x-ref"&&(c[d]=r(s[d],l,o||i))}return a.delete(s),c}return r(e)}async function Ki(e,t=!1,a=!1,r=!1,s="none",n="",i="",o="",l="",c="",d="",u=""){let h;try{this?.requestUpdate?.();let v=e;if(typeof e=="string"&&!rs(e))try{v=JSON.parse(e)}catch{try{v=es(e,{maxAliasCount:-1,merge:!0})}catch{v=e}}let k=lp(typeof e=="string"&&rs(e)?e:void 0),g=await Wi(v,{plugins:[k]});if(g.errors&&g.errors.length>0&&!g.specification){let A=g.errors[0],S=Error(A.message||"Error loading specification");throw S.status=404,S}let w={onDereference:({schema:A,ref:S})=>{A["x-ref"]=S}},$;if($=g.specification?.swagger&&String(g.specification.swagger).startsWith("2")?Vi((await zi(op(g.filesystem).specification,w)).schema):Vi((await zi(g.filesystem,w)).schema),await ma(0),$&&($.components||$.info||$.servers||$.tags||$.paths))h=cp($,c,d,u),this?.dispatchEvent?.(new CustomEvent("before-render",{detail:{spec:h}}));else return{specLoadError:!0,isSpecLoading:!1,info:{title:"Invalid Spec Definition",description:"Invalid Spec Definition",version:""},tags:[]}}catch(v){let k;return k=v.statusCode===404||v.status===404?v.response?.url||v.url?`${v.response?.url||v.url} \u2503 Not Found (${v.response?.status||v.status})`:"Spec Not Found \u2503 404":`Unable to load ${v.response?.url||v.url||(typeof e=="string"?e:"")} \u2503 ${v.response?.status||v.status||v.message}`,{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:k,version:""},tags:[]}}let m=pp(h,s,t,a),y=dp(h,r),f=h.info?.description?ss(h.info.description):[],b=[];if(h.components?.securitySchemes){let v=new Set;Object.entries(h.components.securitySchemes).forEach(k=>{if(!v.has(k[0])){v.add(k[0]);let g={securitySchemeId:k[0],...k[1]};g.in="header",g.name="Authorization",g.nameId=k[1].name||k[0],g.user="",g.password="",g.clientId="",g.clientSecret="",g.value="",g.finalKeyValue="",k[1].type==="apiKey"&&(g.in=k[1].in||"header",g.name=k[1].name||"Authorization"),b.push(g)}})}n&&i&&o&&b.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:n,nameId:n,in:i,value:o,finalKeyValue:o}),b.forEach(v=>{v.typeDisplay=v.type==="http"?v.scheme==="basic"?"HTTP Basic":`HTTP Bearer ${v.nameId}`:v.type==="apiKey"?`API Key (${v.name})`:v.type==="oauth2"?`OAuth (${v.securitySchemeId})`:v.type||"None"});let x=[];return h.servers&&Array.isArray(h.servers)&&h.servers.length>0?(h.servers.forEach(v=>{let k=v.url.trim();k.startsWith("http")||k.startsWith("//")||k.startsWith("{")||typeof window<"u"&&window.location?.origin?.startsWith("http")&&(v.url=window.location.origin+v.url,k=v.url),v.variables&&Object.entries(v.variables).forEach(g=>{let w=RegExp(`{${g[0]}}`,"g");k=k.replace(w,g[1].default||""),g[1].value=g[1].default||""}),v.computedUrl=k}),l&&h.servers.push({url:l,computedUrl:l})):l?h.servers=[{url:l,computedUrl:l}]:typeof window<"u"&&window.location?.origin?.startsWith("http")?h.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:h.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],x=h.servers,{specLoadError:!1,isSpecLoading:!1,info:h.info,infoDescriptionHeaders:f,tags:m,components:y,externalDocs:h.externalDocs,securitySchemes:b,servers:x}}function cp(e,t="",a="",r=""){let s={},n=r.split(",").map(l=>l.trim().toLowerCase()).filter(Boolean);function i(l,c){if(!t)return!0;let d=`${c} ${l}`.toLowerCase();return a==="regex"?new RegExp(t,"i").test(d):d.includes(t.toLowerCase())}function o(l){return l.some(c=>n.includes(c?.label.toLowerCase()))}return Object.entries(e.paths).forEach(([l,c])=>{let d={};Object.entries(c).forEach(([u,h])=>{if(u==="additionalOperations"&&typeof h=="object"&&h){let y={};Object.entries(h).forEach(([f,b])=>{let x=b?.["x-badges"];i(l,f)&&(x&&Array.isArray(x)&&o(x)||(y[f]=b))}),Object.keys(y).length>0&&(d.additionalOperations=y);return}if(["parameters","servers","summary","description"].includes(u)){d[u]=h;return}let m=h?.["x-badges"];i(l,u)&&(m&&Array.isArray(m)&&o(m)||(d[u]=h))}),Object.keys(d).length>0&&(s[l]=d)}),e.paths=s,e}function ss(e){return E.lexer(e).filter(t=>t.type==="heading"&&t.depth<=2)||[]}function dp(e,t=!1){if(!e.components)return[];let a=[];for(let r in e.components){let s=[];for(let l in e.components[r]){let c={show:!0,id:`${r.toLowerCase()}-${l.toLowerCase()}`.replace(ha,"-"),name:l,component:e.components[r][l]};s.push(c)}let n=r,i=r;switch(r){case"schemas":t&&s.sort((l,c)=>l.name.localeCompare(c.name)),i="Schemas",n="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":i="Responses",n="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":i="Parameters",n="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":i="Examples",n="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":i="Request Bodies",n="Describes common request bodies that are used across the API operations.";break;case"headers":i="Headers",n='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":i="Security Schemes",n="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":i="Links",n="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":i="Callbacks",n="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:i=r,n=r}let o={show:!0,name:i,description:n,subComponents:s};a.push(o)}return a||[]}function pp(e,t="none",a=!1,r=!1){let s=["get","put","post","delete","patch","head","options","trace","query"],n=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map(l=>({show:!0,elementId:`tag--${l.name.replace(ha,"-")}`,name:l.name,displayName:l["x-displayName"]||l.name,description:l.description||"",headers:l.description?ss(l.description):[],paths:[],expanded:l["x-tag-expanded"]!==!1})):[],i=e.paths||{};if(e.webhooks)for(let[l,c]of Object.entries(e.webhooks))c._type="webhook",i[l]=c;for(let l in i){let c=i[l].parameters,d={servers:i[l].servers||[],parameters:i[l].parameters||[]},u=i[l]._type==="webhook",h=[];s.forEach(m=>{i[l][m]&&h.push({methodName:m,pathOrHookObj:i[l][m]})}),i[l].additionalOperations&&typeof i[l].additionalOperations=="object"&&Object.entries(i[l].additionalOperations).forEach(([m,y])=>{y&&typeof y=="object"&&h.push({methodName:m.toLowerCase(),pathOrHookObj:y})}),h.forEach(({methodName:m,pathOrHookObj:y})=>{let f=y.tags||[];if(f.length===0)if(a){let b=l.replace(/^\/+|\/+$/g,""),x=b.indexOf("/");x===-1?f.push(b):f.push(b.substring(0,x))}else f.push("General \u2982");f.forEach(b=>{let x,v;e.tags&&(v=e.tags.find(w=>w.name.toLowerCase()===b.toLowerCase())),x=n.find(w=>w.name===b),x||(x={show:!0,elementId:`tag--${b.replace(ha,"-")}`,name:b,description:v?.description||"",headers:v?.description?ss(v.description):[],paths:[],expanded:!v||v["x-tag-expanded"]!==!1},n.push(x));let k=(y.summary||y.description||`${m.toUpperCase()} ${l}`).trim();k.length>100&&([k]=k.split(/[.|!|?]\s|[\r?\n]/));let g=[];if(g=c?y.parameters?c.filter(w=>{if(!y.parameters.some($=>w.name===$.name&&w.in===$.in))return w}).concat(y.parameters):c.slice(0):y.parameters?y.parameters.slice(0):[],y.callbacks)for(let[w,$]of Object.entries(y.callbacks)){let A=Object.entries($).filter(S=>typeof S[1]=="object")||[];y.callbacks[w]=Object.fromEntries(A)}x.paths.push({show:!0,expanded:!1,isWebhook:u,expandedAtLeastOnce:!1,summary:y.summary||"",description:y.description||"",externalDocs:y.externalDocs,shortSummary:k,method:m,path:l,operationId:y.operationId,elementId:`${m}-${l.replace(ha,"-")}`,servers:y.servers?d.servers.concat(y.servers):d.servers,parameters:g,requestBody:y.requestBody,responses:y.responses,callbacks:y.callbacks,deprecated:y.deprecated,security:y.security??e.security,xBadges:y["x-badges"]||void 0,xCodeSamples:y["x-codeSamples"]||y["x-code-samples"]||""})})})}let o=n.filter(l=>l.paths&&l.paths.length>0);return t!=="none"&&o.forEach(l=>{t==="method"?l.paths.sort((c,d)=>{let u=s.indexOf(c.method),h=s.indexOf(d.method);return u!==-1&&h!==-1?u-h:u===-1?h===-1?c.method.localeCompare(d.method):1:-1}):t==="summary"?l.paths.sort((c,d)=>c.shortSummary.localeCompare(d.shortSummary)):t==="path"&&l.paths.sort((c,d)=>c.path.localeCompare(d.path)),l.firstPathId=l.paths[0].elementId}),r?o.sort((l,c)=>l.name.localeCompare(c.name)):o}function up(e){if(!e||typeof e!="string")return"";try{let t=e.trim();t.startsWith("^")&&(t=t.slice(1)),t.endsWith("$")&&!t.endsWith("\\$")&&(t=t.slice(0,-1)),t=t.replace(/\((?:\?:)?([^()|]+)(?:\|[^()]+)*\)/g,"$1");let a=/(\[[^\]]+\]|\\[dwsDWS]|\\[^]|\.|[^\\[\]{}()+*?|])(?:\{(\d+)(?:,\d*)?\}|([+*?]))?/g,r="",s;for(;(s=a.exec(t))!==null;){let n=s[1],i=s[2],o=s[3],l=1;i===void 0?o==="+"?l=1:(o==="*"||o==="?")&&(l=0):l=parseInt(i,10),l=Math.min(Math.max(0,l),50);let c="a";if(n==="\\d")c="0";else if(n==="\\D")c="a";else if(n==="\\w")c="a";else if(n==="\\W")c="_";else if(n==="\\s")c=" ";else if(n==="\\S")c="a";else if(n===".")c="a";else if(n.startsWith("\\"))c=n.slice(1);else if(n.startsWith("[")){let d=n.slice(1,-1);d.startsWith("^")?c=d.includes("a")?"0":"a":/[1-9]/.test(d)&&!d.includes("0")?c="1":/[0-9]/.test(d)&&!/[a-zA-Z]/.test(d)||/[0-9]/.test(d)&&/[a-fA-F]/.test(d)&&!/[g-zG-Z]/.test(d)?c="0":/[A-Z]/.test(d)&&!/[a-z]/.test(d)?c="A":/[a-z]/.test(d)?c="a":d.length>0&&(c=d[0])}else c=n;r+=c.repeat(l)}return r||e}catch{return e}}function ae(e){if(e===void 0)return"";if(e===null)return"null";if(e==="")return"\u2205";if(typeof e=="boolean"||typeof e=="number")return`${e}`;if(Array.isArray(e))return e.map(t=>t===null?"null":t===""?"\u2205":t.toString().replace(/^ +| +$/g,a=>"\u25CF".repeat(a.length))||"").join(", ");if(typeof e=="object"){let t=Object.keys(e);return`{ ${t[0]}:${e[t[0]]}${t.length>1?",":""} ... }`}return e.toString().replace(/^ +| +$/g,t=>"\u25CF".repeat(t.length))||""}function Zi(e){return e?e.format==="binary"||e.contentEncoding==="binary"||!!e.contentMediaType&&e.contentEncoding!=="base64":!1}function Ba(e){if(!e)return;let t="",a="";if(e.$ref){let i=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(i+1)}} `}else if(e.type)t=Array.isArray(e.type)?e.type.join("\u2503"):e.type,(e.format||e.enum||e.const!==void 0)&&(t=t.replace("string",e.enum?"enum":e.const===void 0?e.format:"const")),e.nullable&&(t+="\u2503null");else if(e.const!==void 0)t="const";else if(e.anyOf||e.oneOf){let i=(e.anyOf||e.oneOf).filter(Boolean),o=[];i.forEach(l=>{let c=Ba(l);c?.type&&c.type!=="{missing-type-info}"&&c.type.split("\u2503").forEach(d=>{let u=d.trim();u&&!o.includes(u)&&o.push(u)})}),t=o.length>0?o.join("\u2503"):"{missing-type-info}"}else t=Object.keys(e).length===0?"any":"{missing-type-info}";let r=e.anyOf||e.oneOf?{...(e.anyOf||e.oneOf).find(i=>i&&i.type&&i.type!=="null")||(e.anyOf||e.oneOf)[0]||{},...e}:e,s={type:t,format:e.format||r.format||"",contentMediaType:e.contentMediaType||r.contentMediaType||"",contentEncoding:e.contentEncoding||r.contentEncoding||"",contentSchema:e.contentSchema||r.contentSchema||null,pattern:(e.pattern||r.pattern)&&!e.enum&&!r.enum?e.pattern||r.pattern:"",readOrWriteOnly:e.readOnly?"\u{1F181}":e.writeOnly?"\u{1F186}":r.readOnly?"\u{1F181}":r.writeOnly?"\u{1F186}":"",deprecated:e.deprecated||r.deprecated?"\u274C":"",examples:e.examples||e.example||r.examples||r.example,default:ae(e.default===void 0?r.default:e.default),description:e.description||r.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if(s.type==="{recursive}"?s.description=e.$ref.substring(e.$ref.lastIndexOf("/")+1):(s.type==="{missing-type-info}"||s.type==="any")&&(s.description=s.description||""),s.allowedValues=e.const===void 0?Array.isArray(e.enum)?e.enum.map(i=>ae(i)).join("\u2503"):r.const===void 0?Array.isArray(r.enum)?r.enum.map(i=>ae(i)).join("\u2503"):"":ae(r.const):ae(e.const),!s.allowedValues&&(e.anyOf||e.oneOf)){let i=[];(e.anyOf||e.oneOf).forEach(o=>{let l=o.const===void 0?Array.isArray(o.enum)?o.enum.map(c=>ae(c)).join("\u2503"):"":ae(o.const);l&&!i.includes(l)&&i.push(l)}),i.length>0&&(s.allowedValues=i.join("\u2503"))}let n=e.items||r.items;if((t==="array"||t.split("\u2503").includes("array"))&&n){let i=n.format||n.contentMediaType||(Array.isArray(n?.type)?n.type.join("\u2503"):n?.type)||"",o=ae(n.default);s.arrayType=i?`array of ${i}`:`${e.type||"array"}`,s.default||=o,s.allowedValues||=n.const===void 0?Array.isArray(n?.enum)?n.enum.map(l=>ae(l)).join("\u2503"):"":ae(n.const)}if(t.match(/integer|number/g)){let i=e.minimum===void 0?r.minimum:e.minimum,o=e.exclusiveMinimum===void 0?r.exclusiveMinimum:e.exclusiveMinimum;(i!==void 0||o!==void 0)&&(a+=i===void 0?`More than ${o}`:`Min ${i}`);let l=e.maximum===void 0?r.maximum:e.maximum,c=e.exclusiveMaximum===void 0?r.exclusiveMaximum:e.exclusiveMaximum;(l!==void 0||c!==void 0)&&(a+=l===void 0?`${a?"\u2503":""}Less than ${c}`:`${a?"\u2503":""}Max ${l}`);let d=e.multipleOf===void 0?r.multipleOf:e.multipleOf;d!==void 0&&(a+=`${a?"\u2503":""} multiple of ${d}`)}if(t.match(/string/g)){let i=e.minLength===void 0?r.minLength:e.minLength,o=e.maxLength===void 0?r.maxLength:e.maxLength;i!==void 0&&o!==void 0?a+=`${a?"\u2503":""}${i} to ${o} chars`:i===void 0?o!==void 0&&(a+=`Max ${a?"\u2503":""}${o} chars`):a+=`${a?"\u2503":""}Min ${i} chars`}return s.constrain=a,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function de(e){if(typeof e=="object"&&e&&!Array.isArray(e)){if(e.value!==void 0)return{Example:{...e}};let t=Object.entries(e).filter(([a,r])=>r?.value!==void 0);return t.length===0?void 0:Object.fromEntries(t)}return Array.isArray(e)?e.reduce((t,a,r)=>(t[`Example${r+1}`]={value:a},t),{}):e?{Example:{value:e}}:void 0}function Ji(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){let a=Object.values(e).filter(r=>r["x-example-show-value"]!==!1).map(r=>({value:typeof r.value=="boolean"||typeof r.value=="number"?`${r.value}`:r.value||"",printableValue:ae(r.value),summary:r.summary||"",description:r.description||""}));return{exampleVal:a.length>0?a[0].value:"",exampleList:a}}if(Array.isArray(e)||(e=e?[e]:[]),e.length===0)return{exampleVal:"",exampleList:[]};if(t==="array"){let[a]=e;return{exampleVal:a,exampleList:e.map(r=>({value:r,printableValue:ae(r)}))}}return{exampleVal:e[0].toString(),exampleList:e.map(a=>({value:a.toString(),printableValue:ae(a)}))}}function hp(e){return e.some(t=>t.summary?.length>0||t.description?.length>0)}function ke(e){let t;return e&&(t=e.examples&&e.examples.length>=1?e.examples[0]:e.example),t}function Ia(e){let t=ke(e);if(t==="")return"";if(t===null)return null;if(t===0)return 0;if(t===!1)return!1;if(t instanceof Date)switch(e.format.toLowerCase()){case"date":return t.toISOString().split("T")[0];case"time":return t.toISOString().split("T")[1];default:return t.toISOString()}if(t)return t;if(Object.keys(e).length===0)return null;if(e.$ref)return{};if(e.const===!1||e.const===0||e.const===null||e.const===""||e.const)return e.const;if(e.default)return e.default;let a=Array.isArray(e.type)?e.type[0]:e.type;if(!a)return null;if(a.match(/^integer|^number/g)){let r=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),s=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),n=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?s||0:Number(e.exclusiveMinimum)+(a.startsWith("integer")?1:.001):Number(e.minimum);return r?r>=n?r:n%r===0?n:Math.ceil(n/r)*r:n}if(a.match(/^boolean/g))return!1;if(a.match(/^null/g))return null;if(a.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return up(e.pattern)}catch{return e.pattern}if(e.contentEncoding)switch(e.contentEncoding.toLowerCase()){case"base64":return"ZXhhbXBsZQ==";case"binary":case"7bit":case"8bit":case"quoted-printable":return"string"}if(e.contentMediaType){if(e.contentMediaType.toLowerCase()==="application/json"){if(e.contentSchema){let r=re(e.contentSchema),s=r?.["example-0"]??r;return JSON.stringify(s)}return"{}"}if(e.contentMediaType.startsWith("text/"))return"text content"}if(e.format)switch(e.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"byte":case"base64":return"ZXhhbXBsZQ==";case"binary":return"binary";default:return""}else{let r=Number.isNaN(e.minLength)?void 0:Number(e.minLength),s=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),n=r||(s>6?6:s||void 0);return n?"A".repeat(n):"string"}}return null}function ns(e,t=1){if(e==null)return"";let a=" ".repeat(t),r="";if(typeof e!="object")return`
|
|
207
|
-
${
|
|
208
|
-
${
|
|
209
|
-
${
|
|
210
|
-
${
|
|
211
|
-
${
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
${h}${
|
|
215
|
-
${
|
|
216
|
-
`).join("");this.getAllResponseHeaders=()=>i,this.getResponseHeader=o=>{let l=o.toLowerCase(),c=Object.keys(s.headers).find(d=>d.toLowerCase()===l);return c?s.headers[c]:null},this.dispatchEvent(new Event("readystatechange")),this.dispatchEvent(new Event("load")),this.dispatchEvent(new Event("loadend")),typeof this.onreadystatechange=="function"&&this.onreadystatechange(),typeof this.onload=="function"&&this.onload()},n)}),Wt=!0)}function Wa(){Wt=!1,Ua=[],Ma.clear(),typeof window<"u"&&(ft&&=(window.fetch=ft,null),yt&&(window.XMLHttpRequest.prototype.open=yt,window.XMLHttpRequest.prototype.send=Vt,window.XMLHttpRequest.prototype.setRequestHeader=Pa,yt=null,Vt=null,Pa=null))}function ro(e={}){e.statusCode!==void 0&&(X.statusCode=e.statusCode),e.statusStrategy!==void 0&&(X.statusStrategy=e.statusStrategy),e.delay!==void 0&&(X.delay=Number(e.delay)||0),e.log!==void 0&&(X.log=e.log!=="false")}var Ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Va=e=>(...t)=>({_$litDirective$:e,values:t}),Ka=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},hs=class extends Ka{constructor(e){if(super(e),this.it=I,e.type!==Ce.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===I||e==null)return this._t=void 0,this.it=e;if(e===Y)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};hs.directiveName="unsafeHTML",hs.resultType=1;var F=Va(hs);function O(e){if(typeof e!="string")return"";if(typeof window<"u"&&window.Sanitizer&&Element.prototype.setHTML)try{let s=document.createElement("div"),n=new window.Sanitizer({allowAttributes:{"*":["*"]}});return s.setHTML(e,{sanitizer:n}),s.innerHTML}catch{}let t;if(typeof DOMParser<"u")t=new DOMParser().parseFromString(e,"text/html");else return e;let a=t.querySelectorAll("script");for(let s=a.length-1;s>=0;s--)a[s].parentNode.removeChild(a[s]);let r=t.querySelectorAll("*");for(let s=0;s<r.length;s++){let n=r[s];for(let i=n.attributes.length-1;i>=0;i--){let o=n.attributes[i],l=o.name.toLowerCase(),c=o.value.toLowerCase();(l.startsWith("on")||(l==="href"||l==="src")&&(c.includes("javascript:")||c.includes("data:text/html")))&&n.removeAttribute(o.name)}}return t.body.innerHTML}var bp="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",vp="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",so="rapidoc";function no(e){try{let t=new TextEncoder().encode(e),a="";for(let r=0;r<t.byteLength;r++)a+=String.fromCharCode(t[r]);return btoa(a)}catch{return btoa(e)}}function Za(e){let t=new URLSearchParams;if(!e)return t;if(e instanceof URLSearchParams){for(let[a,r]of e.entries())t.set(a,r);return t}if(typeof e=="object")return Object.entries(e).forEach(([a,r])=>{r!=null&&t.set(a,String(r))}),t;if(typeof e=="string"){let a=e.trim();if(a.startsWith("{")&&a.endsWith("}"))try{let n=JSON.parse(a);if(typeof n=="object"&&n)return Object.entries(n).forEach(([i,o])=>{o!=null&&t.set(i,String(o))}),t}catch{}let r=a.startsWith("?")?a.slice(1):a,s=new URLSearchParams(r);for(let[n,i]of s.entries())t.set(n,i);return t}return t}function He(e,t="",a="",r=""){let s=this.resolvedSpec.securitySchemes?.find(i=>i.securitySchemeId===e);if(!s)return!1;let n="";return s.scheme?.toLowerCase()==="basic"?t&&(n=`Basic ${no(`${t}:${a}`)}`):r&&(s.value=r,n=`${s.scheme?.toLowerCase()==="bearer"?"Bearer ":""}${r}`),n?(s.finalKeyValue=n,this.requestUpdate(),!0):!1}function ms(){this.resolvedSpec.securitySchemes?.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue=""}),this.requestUpdate()}function fs(){return JSON.parse(localStorage.getItem(so))||{}}function io(e){localStorage.setItem(so,JSON.stringify(e))}function xp(){let e=fs.call(this);Object.values(e).forEach(t=>{He.call(this,t.securitySchemeId,t.username,t.password,t.value)})}function ys(e){let t="",a=this.resolvedSpec.securitySchemes.find(r=>r.securitySchemeId===e);if(a){let r=this.shadowRoot.getElementById(`security-scheme-${e}`);if(r){if(a.type&&a.scheme&&a.type==="http"&&a.scheme.toLowerCase()==="basic"){let s=r.querySelector(".api-key-user").value.trim(),n=r.querySelector(".api-key-password").value.trim();He.call(this,e,s,n)}else t=r.querySelector(".api-key-input").value.trim(),He.call(this,e,"","",t);if(this.persistAuth==="true"){let s=fs.call(this);s[e]=a,io.call(this,s)}}}}function oo(e,t,a="Bearer"){let r=this.resolvedSpec.securitySchemes.find(s=>s.securitySchemeId===e);r.finalKeyValue=`${a.toLowerCase()==="bearer"?"Bearer":a.toLowerCase()==="mac"?"MAC":a} ${t}`,this.requestUpdate()}async function gs(e,t,a,r,s,n,i,o,l="request-body",c=null,d=null,u=null,h=null){let m=o?o.querySelector(".oauth-resp-display"):void 0,y=new URLSearchParams,f=new Headers,b=Za(h);for(let[g,w]of b.entries())y.set(g,w);let x=Za(this.additionalTokenParams);for(let[g,w]of x.entries())y.set(g,w);y.set("grant_type",s),s!=="client_credentials"&&s!=="password"&&y.set("redirect_uri",r),n&&(y.set("code",n),y.set("code_verifier",bp)),l==="header"&&a?f.set("Authorization",`Basic ${no(`${t}:${a}`)}`):(t&&y.set("client_id",t),a&&y.set("client_secret",a)),s==="password"&&(y.set("username",d),y.set("password",u)),c&&y.set("scope",c);let v={method:"POST",headers:f,body:y},k=new CustomEvent("before-token-request",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:i,grantType:s,tokenUrl:e,params:y,headers:f,request:v}});if(!this.dispatchEvent(k))return!1;try{let g=await fetch(e,{method:v.method||"POST",headers:v.headers||f,body:v.body||y}),w=await g.json();if(g.ok){if(w.token_type&&w.access_token)return oo.call(this,i,w.access_token,w.token_type),m&&(m.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}else return m&&(m.innerHTML=`<span style="color:var(--red)">${w.error_description||w.error||"Unable to get access token"}</span>`),!1}catch{return m&&(m.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function wp(e,t,a,r,s,n,i,o,l,c,d=null){sessionStorage.removeItem("winMessageEventActive"),t.close(),!e.data.fake&&(e.data,e.data.error,e.data&&(e.data.responseType==="code"?gs.call(this,a,r,s,n,i,e.data.code,l,c,o,null,null,null,d):e.data.responseType==="token"&&oo.call(this,l,e.data.access_token,e.data.token_type)))}async function kp(e,t,a,r,s,n=null,i=null){let o=s.target.closest(".oauth-flow"),l=o.querySelector(".oauth-client-id")?o.querySelector(".oauth-client-id").value.trim():"",c=o.querySelector(".oauth-client-secret")?o.querySelector(".oauth-client-secret").value.trim():"",d=o.querySelector(".api-key-user")?o.querySelector(".api-key-user").value.trim():"",u=o.querySelector(".api-key-password")?o.querySelector(".api-key-password").value.trim():"",h=o.querySelector(".oauth-send-client-secret-in")?o.querySelector(".oauth-send-client-secret-in").value.trim():"request-body",m=[...o.querySelectorAll(".scope-checkbox:checked")],y=o.querySelector(`#${e}-pkce`),f=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,b=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,x=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`),v="",k="",g;if([...o.parentNode.querySelectorAll(".oauth-resp-display")].forEach(w=>{w.innerHTML=""}),t==="authorizationCode"||t==="implicit"){let w=new URL(a);t==="authorizationCode"?(v="authorization_code",k="code"):t==="implicit"&&(k="token");let $=new URLSearchParams(w.search),A=Za(n);for(let[C,q]of A.entries())$.set(C,q);let S=Za(this.additionalAuthorizeParams);for(let[C,q]of S.entries())$.set(C,q);let _=m.map(C=>C.value).join(" ");_&&$.set("scope",_),$.set("client_id",l),$.set("redirect_uri",x.toString()),$.set("response_type",k),$.set("state",f),$.set("nonce",b),y&&y.checked&&($.set("code_challenge",vp),$.set("code_challenge_method","S256")),$.set("show_dialog",!0);let N=new CustomEvent("before-authorize",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:e,flowType:t,authUrl:a,authParams:$}});if(!this.dispatchEvent(N))return;w.search=$.toString(),sessionStorage.getItem("winMessageEventActive")==="true"&&window.postMessage({fake:!0},"*"),setTimeout(()=>{g=window.open(w.toString()),g&&(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",C=>wp.call(this,C,g,r,l,c,x.toString(),v,h,e,o,i),{once:!0}))},10)}else if(t==="clientCredentials"){v="client_credentials";let w=m.map($=>$.value).join(" ");gs.call(this,r,l,c,x.toString(),v,"",e,o,h,w,null,null,i)}else if(t==="password"){v="password";let w=m.map($=>$.value).join(" ");gs.call(this,r,l,c,x.toString(),v,"",e,o,h,w,d,u,i)}}function $p(e,t,a,r,s,n=[],i="request-body",o=void 0,l="true",c=null,d=null){let{authorizationUrl:u,tokenUrl:h,refreshUrl:m}=s,y=s["x-pkce-only"]||!1,f=v=>v.indexOf("://")>0||v.indexOf("//")===0,b=new URL(this.selectedServer?.computedUrl).origin;m&&!f(m)&&(m=this.selectedServer?.computedUrl.trim().endsWith("/")&&!m.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${m.trim()}`:`${b}/${m.replace(/^\//,"")}`),h&&!f(h)&&(h=this.selectedServer?.computedUrl.trim().endsWith("/")&&!h.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${h.trim()}`:`${b}/${h.replace(/^\//,"")}`),u&&!f(u)&&(u=this.selectedServer?.computedUrl.trim().endsWith("/")&&!u.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${u.trim()}`:`${b}/${u.replace(/^\//,"")}`);let x;return x=e==="authorizationCode"?"Authorization Code Flow":e==="clientCredentials"?"Client Credentials Flow":e==="implicit"?"Implicit Flow":e==="password"?"Password Flow":e,p`<div class="oauth-flow ${e}" style="padding:12px 0;margin-bottom:12px"><div class="tiny-title upper" style="margin-bottom:8px">${x}</div>${u?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Auth URL</span> <span class="mono-font">${u}</span></div>`:""} ${h?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Token URL</span> <span class="mono-font">${h}</span></div>`:""} ${m?p`<div style="margin-bottom:5px"><span style="width:75px;display:inline-block">Refresh URL</span> <span class="mono-font">${m}</span></div>`:""} ${e==="authorizationCode"||e==="clientCredentials"||e==="implicit"||e==="password"?p`${s.scopes?p`<span>Scopes</span><div class="oauth-scopes" part="section-auth-scopes" style="width:100%;display:flex;flex-direction:column;flex-wrap:wrap;margin:0 0 10px 24px">${Object.entries(s.scopes).map((v,k)=>p`<div class="m-checkbox" style="display:inline-flex;align-items:center"><input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${r}${e}${k}" ?checked="${n.includes(v[0])}" value="${v[0]}"> <label for="${r}${e}${k}" style="margin-left:5px;cursor:pointer"><span class="mono-font">${v[0]}</span> ${v[0]===v[1]?"":` - ${v[1]||""}`}</label></div>`)}</div>`:""} ${e==="password"&&l==="true"?p`<div style="margin:5px 0"><input type="text" placeholder="username" spellcheck="false" class="oauth2 ${e} ${r} api-key-user" part="textbox textbox-username" id="input-${r}-${e}-api-key-user"> <input type="password" placeholder="password" spellcheck="false" class="oauth2 ${e} ${r} api-key-password" style="margin:0 5px" part="textbox textbox-password" id="input-${r}-${e}-api-key-password"></div>`:""} ${l==="true"?p`<div>${e==="authorizationCode"?p`<div style="margin:16px 0 4px"><input type="checkbox" part="checkbox checkbox-auth-scope" id="${r}-pkce" checked="checked" ?disabled="${y}"> <label for="${r}-pkce" style="margin:0 16px 0 4px;line-height:24px;cursor:pointer">Send Proof Key for Code Exchange (PKCE)</label></div>`:""} <input type="text" part="textbox textbox-auth-client-id" value="${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${r} oauth-client-id"> ${e==="authorizationCode"||e==="clientCredentials"||e==="password"?p`<input id="${r}-${e}-oauth-client-secret" type="password" part="textbox textbox-auth-client-secret" value="${a||""}" placeholder="client-secret" spellcheck="false" class="oauth2 ${e} ${r} oauth-client-secret" style="margin:0 5px;${y?"display:none;":""}"> <select style="margin-right:5px;${y?"display:none;":""}" class="${e} ${r} oauth-send-client-secret-in">${!o||o.includes("request-body")?p`<option value="request-body" .selected="${i==="request-body"}">Request Body</option>`:""} ${!o||o.includes("header")?p`<option value="header" .selected="${i==="header"}">Authorization Header</option>`:""}</select>`:""} ${e==="authorizationCode"||e==="clientCredentials"||e==="implicit"||e==="password"?p`<button class="m-btn thin-border" part="btn btn-outline" @click="${v=>{kp.call(this,r,e,u,h,v,c,d)}}">GET TOKEN</button>`:""}</div><div class="oauth-resp-display red-text small-font-size"></div>`:""}`:""}</div>`}function Sp(e){let t=this.resolvedSpec.securitySchemes?.find(a=>a.securitySchemeId===e);if(t.user="",t.password="",t.value="",t.finalKeyValue="",this.persistAuth==="true"){let a=fs.call(this);delete a[t.securitySchemeId],io.call(this,a)}this.requestUpdate()}function lo(e="true"){if(!this.resolvedSpec)return"";let t=this.resolvedSpec.securitySchemes?.filter(a=>a.finalKeyValue);if(t)return p`<section id="auth" part="section-auth" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}"><div class="sub-title regular-font">AUTHENTICATION</div>${e==="true"?p`<div class="small-font-size" style="display:flex;align-items:center;min-height:30px">${t.length>0?p`<div class="blue-text">${t.length} API key applied</div><div style="flex:1"></div><button class="m-btn thin-border" part="btn btn-outline" @click="${()=>{ms.call(this)}}">CLEAR ALL API KEYS</button>`:p`<div class="red-text">No API key applied</div>`}</div>`:""} ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?p`<table role="presentation" id="auth-table" class="m-table padded-12" style="width:100%">${this.resolvedSpec.securitySchemes.filter(a=>a.type).map(a=>p`<tr id="security-scheme-${a.securitySchemeId}" class="${a.type.toLowerCase()}"><td style="max-width:500px;overflow-wrap:break-word"><div style="line-height:28px;margin-bottom:5px"><span style="font-weight:700;font-size:var(--font-size-regular)">${a.typeDisplay}</span> ${a.finalKeyValue?p`<span class="blue-text">${a.finalKeyValue?"Key Applied":""} </span><button class="m-btn thin-border small" part="btn btn-outline" @click="${()=>{Sp.call(this,a.securitySchemeId)}}">REMOVE</button>`:""}</div>${a.description?p`<div class="m-markdown">${F(O(E(a.description||"")))}</div>`:""} ${a.type.toLowerCase()==="apikey"?p`<div style="margin-bottom:5px">Send <code>${a.name}</code> in <code>${a.in}</code></div>${e==="true"?p`<div style="max-height:28px">${a.in==="cookie"?p`<span class="gray-text" style="font-size::var(--font-size-small)">cookies cannot be set from here</span>`:p`<input type="text" value="${a.value}" class="${a.type} ${a.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${a.type}-${a.securitySchemeId}-api-key-input"> <button class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${()=>{ys.call(this,a.securitySchemeId)}}">${a.finalKeyValue?"UPDATE":"SET"}</button>`}</div>`:""}`:""} ${a.type.toLowerCase()==="http"&&a.scheme?.toLowerCase()==="basic"?p`<div style="margin-bottom:5px">Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.</div>${e==="true"?p`<div><input type="text" value="${a.user}" placeholder="username" spellcheck="false" class="${a.type} ${a.securitySchemeId} api-key-user" style="width:100px" id="input-${a.type}-${a.securitySchemeId}-api-key-user"> <input type="password" value="${a.password}" placeholder="password" spellcheck="false" class="${a.type} ${a.securitySchemeId} api-key-password" style="width:100px;margin:0 5px" id="input-${a.type}-${a.securitySchemeId}-api-key-password"> <button class="m-btn thin-border" @click="${()=>{ys.call(this,a.securitySchemeId)}}" part="btn btn-outline">${a.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${a.type.toLowerCase()==="http"&&a.scheme?.toLowerCase()==="bearer"?p`<div style="margin-bottom:5px">Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and token value</div>${e==="true"?p`<div style="max-height:28px"><input type="text" value="${a.value}" class="${a.type} ${a.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${a.type}-${a.securitySchemeId}-api-key-input"> <button class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${()=>{ys.call(this,a.securitySchemeId)}}">${a.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""}</td></tr>${a.type.toLowerCase()==="oauth2"?p`<tr><td style="border:none;padding-left:48px">${Object.keys(a.flows).map(r=>$p.call(this,r,a.flows[r]["x-client-id"]||a["x-client-id"]||"",a.flows[r]["x-client-secret"]||a["x-client-secret"]||"",a.securitySchemeId,a.flows[r],a.flows[r]["x-default-scopes"]||a["x-default-scopes"],a.flows[r]["x-receive-token-in"]||a["x-receive-token-in"],a.flows[r]["x-receive-token-in-options"]||a["x-receive-token-in-options"],e,a.flows[r]["x-authorize-params"]||a["x-authorize-params"]||null,a.flows[r]["x-token-params"]||a["x-token-params"]||null))}</td></tr>`:""}`)}</table>`:""}<slot name="auth"></slot></section>`}function Ep(e,t,a){let r=e.scopes?p`<div><b>Required scopes:</b><br><div style="margin-left:8px">${e.scopes.split(",").map((s,n)=>p`${n===0?"":"\u2503"}<span>${s.trim()}</span>`)}</div></div>`:"";return e.type==="oauth2"?p`<div>${t?p`<b>${a+1}.</b> `:"Needs "}OAuth Token <span style="font-family:var(--font-mono);color:var(--primary)">${e.securitySchemeId}</span> in <b>Authorization header</b> ${r}</div>`:e.type==="http"?p`<div>${t?p`<b>${a+1}.</b> `:"Requires "} ${e.scheme==="basic"?"Base 64 encoded username:password":p`Bearer Token <b>${e.nameId}</b>`} in <b>Authorization header</b> ${r}</div>`:p`<div>${t?p`<b>${a+1}.</b> `:"Requires "} Token in <b>${e.name} ${e.in}</b> ${r}</div>`}function co(e){if(!this.resolvedSpec.securitySchemes||!Array.isArray(e)||e.length===0)return"";let t=e.some(s=>!s||Object.keys(s).length===0),a=e.filter(s=>s&&Object.keys(s).length>0);if(a.length===0)return"";let r=[];return a.forEach(s=>{let n=[],i=[];Object.keys(s).forEach(l=>{let c="",d=this.resolvedSpec.securitySchemes.find(u=>u.securitySchemeId===l);s[l]&&Array.isArray(s[l])&&(c=s[l].join(", ")),d&&(i.push(d.typeDisplay),n.push({...d,scopes:c}))});let o=i.length>1?`${i[0]} + ${i.length-1} more`:i[0];r.push({securityTypes:t?`${o} (Optional)`:o,securityDefs:n})}),p`<div style="position:absolute;top:3px;right:2px;font-size:var(--font-size-small);line-height:1.5"><div style="position:relative;display:flex;min-width:350px;max-width:700px;justify-content:flex-end"><svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--muted-foreground)"><rect x="5" y="11" width="14" height="10" rx="2"/><circle cx="12" cy="16" r="1"/><path d="M8 11v-4a4 4 0 0 1 8 0v4"/></svg> ${r.map((s,n)=>{if(!s.securityTypes)return"";let i=s.securityDefs.length>1,o=this.updateRoute==="true"&&this.allowAuthentication==="true"&&s.securityDefs.length>0?p`<a part="anchor anchor-operation-security" href="#auth">${s.securityTypes}</a>`:p`${s.securityTypes}`;return p`${n===0?"":p`<div style="padding:3px 4px">OR</div>`}<div class="tooltip" style="${s.securityDefs.length===0?"cursor:default;":""}"><div style="padding:2px 4px;white-space:nowrap;text-overflow:ellipsis;max-width:150px;overflow:hidden">${o}</div>${s.securityDefs.length>0?p`<div class="tooltip-text" style="position:absolute;color:var(--foreground);top:26px;right:0;border:1px solid var(--border);padding:4px 6px;display:block">${i?p`<div>Requires <b>all</b> of the following:</div>`:""}<div style="padding-left:${i?"8px":"0"}">${s.securityDefs.map((l,c)=>Ep(l,i,c))}</div></div>`:""}</div>`})}</div></div>`}function po(e){return p`<section class="table-title" style="margin-top:24px">CODE SAMPLES<div part="tab-panel" class="tab-panel col" @click="${t=>{if(!t.target.classList.contains("tab-btn"))return;let a=t.target.dataset.tab,r=[...t.currentTarget.querySelectorAll(".tab-btn")],s=[...t.currentTarget.querySelectorAll(".tab-content")];r.forEach(n=>n.classList[n.dataset.tab===a?"add":"remove"]("active")),s.forEach(n=>{n.style.display=n.dataset.tab===a?"block":"none"}),oa(t.currentTarget.getRootNode()?.host?.shadowRoot||t.currentTarget)}}"><div part="tab-btn-row" class="tab-buttons row" style="width:100">${e.map((t,a)=>p`<button part="tab-btn" class="tab-btn ${a===0?"active":""}" data-tab="${t.lang}${a}">${t.label||t.lang}</button>`)}</div>${e.map((t,a)=>p`<div class="tab-content m-markdown" style="display:${a===0?"block":"none"}" data-tab="${t.lang}${a}"><button class="toolbar-btn" part="btn btn-fill btn-copy" style="position:absolute;top:12px;right:8px" @click="${r=>{Ot(t.source,r)}}">Copy</button><pre><code class="language-${t.lang?.toLowerCase()}">${t.source}</code></pre></div>`)}</div></section>`}function uo(e){return p`<div class="req-res-title" style="margin-top:12px">CALLBACKS</div>${Object.entries(e).map(t=>p`<div class="tiny-title" style="padding:12px;border:1px solid var(--border)">${t[0]} ${Object.entries(t[1]).map(a=>p`<div class="mono-font small-font-size" style="display:flex;margin-left:16px"><div style="width:100%">${Object.entries(a[1]).map(r=>p`<div><div style="margin-top:12px"><div class="method method-fg ${r[0]}" style="width:70px;border:none;margin:0;padding:0;line-height:20px;vertical-align:baseline;text-align:left"><span style="font-size:20px">⥄ </span>${r[0]}</div><span style="line-height:20px;vertical-align:baseline">${a[0]}</span></div><div class="expanded-req-resp-container"><api-request .config="${this.config}" class="${this.renderStyle}-mode callback" style="width:100%" callback="true" method="${r[0]||""}" path="${a[0]||""}" .parameters="${r[1]?.parameters||""}" .request_body="${r[1]?.requestBody||""}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="false" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":"true"}" fetch-credentials="${this.fetchCredentials}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
`);
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
`;
|
|
227
|
-
|
|
228
|
-
`;else if(
|
|
229
|
-
`
|
|
230
|
-
|
|
231
|
-
`
|
|
232
|
-
`)}async function Bp(e){let t,a,r,s=!1,n="",i="",o="",l="",c=e.headers.get("content-type");if((await e.clone().text()).length===0)l="";else if(c){if(c=c.split(";")[0].trim(),c==="application/x-ndjson")l=await e.text();else if(c.includes("json"))if(/charset=[^"']+/.test(c)){let d=c.split("charset=")[1],u=await e.arrayBuffer();try{r=new TextDecoder(d).decode(u)}catch{r=new TextDecoder("utf-8").decode(u)}try{a=JSON.parse(r),l=JSON.stringify(a,null,2)}catch{l=r}}else a=await e.json(),l=JSON.stringify(a,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(c)?(s=!0,n="download"):/^image/.test(c)?(s=!0,n="image"):/^audio|^image|^video/.test(c)?(s=!0,n="view"):(r=await e.text(),l=c.includes("xml")?Lp(r,{textNodesOnSameLine:!0,indentor:" "}):r);if(s){let d=e.headers.get("content-disposition")||"",u="filename";if(d){let h=d.match(/filename\*=\s*UTF-8''([^;]+)/);if(h)u=decodeURIComponent(h[1]);else{let m=d.match(/filename="?([^"]+)"?/);m&&(u=m[1])}}o=u,t=await e.blob(),typeof URL<"u"&&URL.createObjectURL&&(i=URL.createObjectURL(t))}}else r=await e.text(),l=r;return{responseText:l,respJson:a,respBlob:t,respText:r,responseIsBlob:s,responseBlobType:n,responseBlobUrl:i,respContentDisposition:o}}function Ip(e,t={}){let{callback:a=!1,webhook:r=!1}=t,s=a===!0||a==="true"||r===!0||r==="true",n={},i={},o="",l="";if(!e||typeof e!="object")return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l};for(let c of Object.keys(e)){if(c==="$$ref")continue;o||=c;let d={},u=e[c]?.content;if(u&&typeof u=="object")for(let m of Object.keys(u)){let y=u[m];l||=m;let f=y?.schema?G(y.schema):null,b=mt(y?.schema,m,de(y?.examples),de(y?.example),!s,s,m.includes("json")?"json":"text");d[m]={description:e[c].description,examples:b,selectedExample:b[0]?.exampleId||"",schemaTree:f}}let h=[];if(e[c]?.headers)for(let m of Object.keys(e[c].headers))h.push({name:m,...e[c].headers[m]});n[c]=h,i[c]=d}return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l}}var{I:zp}=al,mo=e=>e,Pp=e=>e.strings===void 0,fo=()=>document.createComment(""),Zt=(e,t,a)=>{let r=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(a===void 0)a=new zp(r.insertBefore(fo(),s),r.insertBefore(fo(),s),e,e.options);else{let n=a._$AB.nextSibling,i=a._$AM,o=i!==e;if(o){let l;a._$AQ?.(e),a._$AM=e,a._$AP!==void 0&&(l=e._$AU)!==i._$AU&&a._$AP(l)}if(n!==s||o){let l=a._$AA;for(;l!==n;){let c=mo(l).nextSibling;mo(r).insertBefore(l,s),l=c}}}return a},We=(e,t,a=e)=>(e._$AI(t,a),e),Up={},yo=(e,t=Up)=>e._$AH=t,Mp=e=>e._$AH,vs=e=>{e._$AR(),e._$AA.remove()},Jt=Va(class extends Ka{constructor(e){if(super(e),e.type!==Ce.PROPERTY&&e.type!==Ce.ATTRIBUTE&&e.type!==Ce.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pp(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Y||t===I)return t;let a=e.element,r=e.name;if(e.type===Ce.PROPERTY){if(t===a[r])return Y}else if(e.type===Ce.BOOLEAN_ATTRIBUTE){if(!!t===a.hasAttribute(r))return Y}else if(e.type===Ce.ATTRIBUTE&&a.getAttribute(r)===t+"")return Y;return yo(e),t}}),go=B`*,:before,:after{box-sizing:border-box}.tr{box-sizing:content-box;border-bottom:1px dotted #0000;flex:none;width:100%;transition:max-height .3s ease-out;display:flex}.td{flex:none;display:block}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-all-descr .key{overflow:hidden}.expanded-all-descr .key-descr .descr-expand-toggle{display:none}.key-descr .descr-expand-toggle{user-select:none;color:var(--foreground);cursor:pointer;margin-right:4px;transition:transform .2s;display:inline-block;transform:rotate(45deg)}.key-descr .m-markdown-small{vertical-align:top;max-width:100%;display:inline-block}.key-descr .m-markdown-small p{margin:0;display:inline}.key-descr .m-markdown-small p+p{margin-top:4px;display:block}.key-descr .item-details{margin-top:2px;display:block}.expanded-descr .key-descr .descr-expand-toggle,.key-descr .descr-expand-toggle.expanded-descr{transform:rotate(270deg)}.key-descr .descr-expand-toggle:hover{color:var(--primary)}.expanded-descr .more-content{display:none}.key-descr{font-family:var(--font-regular);color:var(--muted-foreground);text-overflow:ellipsis;flex-shrink:1;display:none;overflow:hidden}.expanded-descr .key-descr{max-height:auto;display:none;overflow:hidden}.xxx-of-key{font-size:calc(var(--font-size-small) - 3px);line-height:calc(var(--font-size-small) + 1px);border-radius:var(--radius);corner-shape:squircle;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);vertical-align:middle;margin-bottom:1px;padding:1px 6px;display:inline-block}.xxx-of-descr{font-family:var(--font-regular);color:var(--primary);font-size:calc(var(--font-size-small) - 2px);vertical-align:middle;margin-inline-start:4px}.stri,.string,.uri,.url,.byte,.bina,.date,.pass,.ipv4,.ipv4,.uuid,.emai,.host{color:var(--green)}.inte,.numb,.number,.int6,.int3,.floa,.doub,.deci .blue{color:var(--blue)}.null{color:var(--red)}.bool,.boolean{color:var(--orange)}.enum,.cons{color:var(--purple)}.recu{color:var(--brown)}.toolbar{width:100%;color:var(--primary);padding:2px 0;display:flex}.toolbar-item{cursor:pointer;margin:0 2px;padding:5px 0}.schema-root-type{cursor:auto;color:var(--card-foreground);text-transform:uppercase;font-weight:700}.toolbar-item:first-of-type{margin:0 2px 0 0}@container (width>=500px){.key-descr,.expanded-descr .key-descr{display:block}}`,Hp=class extends se{static get properties(){return{config:{type:Object},data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly)),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),(!this.schemaDescriptionExpanded||!"true false".includes(this.schemaDescriptionExpanded))&&(this.schemaDescriptionExpanded="false"),(!this.schemaHideReadOnly||!"true false".includes(this.schemaHideReadOnly))&&(this.schemaHideReadOnly="true"),(!this.schemaHideWriteOnly||!"true false".includes(this.schemaHideWriteOnly))&&(this.schemaHideWriteOnly="true")}static get styles(){return[qe,go,Ja,B`.tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);direction:ltr}.tree .tr:hover{background:var(--muted)}.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 8px);overflow:hidden}.tree .tr.expanded-descr{max-height:none}.tree .key{max-width:300px}.tr.expanded:hover>.td.key>.open-bracket{color:var(--primary)}.tr.expanded:hover+.inside-bracket{border-left:1px solid var(--muted-foreground)}.tr.expanded:hover+.inside-bracket+.close-bracket{color:var(--primary)}.inside-bracket.xxx-of-option{border-left:1px solid #0000}.open-bracket{cursor:pointer;border-radius:var(--card-radius);border:1px solid #0000;padding:0 20px 0 0;display:inline-block}.open-bracket:hover{color:var(--primary);background:var(--muted);border:1px solid var(--border)}.close-bracket{font-family:var(--font-mono);display:inline-block}.tr.collapsed+.inside-bracket,.tr.collapsed+.inside-bracket+.close-bracket{display:none;overflow:hidden}.inside-bracket.object,.inside-bracket.array{border-left:1px dotted var(--border)}.tr.expanded .open-bracket .open-bracket-collapsed,.tr.collapsed .open-bracket .open-bracket-expanded{display:none}`,Xe]}render(){if(!this.data)return p`<div class="tree"><span class="mono-font" style="color:var(--red)">Schema not found</span></div>`;let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return p`<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${a=>this.handleAllEvents(a)}"><div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?p`<div style="flex:1"></div><div part="schema-toolbar-item schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div><span part="schema-description" class="m-markdown">${F(O(E(t)))}</span> ${this.renderAST(this.data)}</div>`}renderAST(e,t="",a=0,r=0){if(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)return"";let s=400-r*12,n=a<this.schemaExpandLevel,i=e.readOnly?p`🆁`:e.writeOnly?p`🆆`:"",o=e.readOnly?"Read-Only":e.writeOnly?"Write-Only":"",l=e.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:"";if(e.kind==="array"){let c=e.items;if(!c)return p`<div class="tr ${n?"expanded":"collapsed"} array" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array">[ ]</span></div><div class="td key-descr m-markdown-small">${F(O(E(e.description||"")))}</div></div>`;if(c.kind==="primitive"){let m=c.format||c.contentMediaType||c.type||"string",y=m.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),f=!!(e.description||c.description),b=!!(c.constraints||c.defaultValue||c.allowedValues||c.pattern||c.contentMediaType||c.contentEncoding),x=b||J(e.description)||J(c.description),v=f&&x?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",k=p`${c.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${c.constraints}</div>`:""} ${c.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${c.defaultValue}</div>`:""} ${c.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${c.type==="const"?"Value":"Allowed"}: </span>${c.allowedValues}</div>`:""} ${c.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${c.pattern}</div>`:""} ${c.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${c.contentMediaType}</div>`:""} ${c.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${c.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}:</span>`:""} <span class="${y}" title="${o}">[${m}]${i}</span></div><div class="td key-descr">${f?p`<span class="m-markdown-small">${v} ${F(O(E(e.description||c.description)))}</span>`:""} ${f&&b?p`<div class="item-details">${k}</div>`:k}</div></div>`}if(c.kind==="object"){let m=p`<span class="open-bracket array-of-object"><span class="open-bracket-expanded">[{</span><span class="open-bracket-collapsed">[{...}]</span></span>`,y=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} object ${c.nullable?"nullable":""}" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${m}</div><div class="td key-descr m-markdown-small">${y} ${F(O(E(e.description||c.description||"")))}</div></div><div class="inside-bracket object" style="padding-left:${12}px">${c.properties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.patternProperties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.additionalProperties?this.renderAST(c.additionalProperties,"object",a+1,r+1):""} ${c.unions?.map(f=>this.renderAST(f,"object",a+1,r+1))}</div><div class="close-bracket">${"}]"}</div>`}if(c.kind==="array"){let m=e.arrayType==="object"?"":e.arrayType,y=p`<span class="open-bracket array-of-array" data-array-type="${m}"><span class="open-bracket-expanded">[[ ${m} </span><span class="open-bracket-collapsed">[[...]]</span></span>`,f=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} array ${e.nullable?"nullable":""}" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${y}</div><div class="td key-descr m-markdown-small">${f} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",a+1,r+1)}</div><div class="close-bracket">${"]]"}</div>`}let d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} array" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array"><span class="open-bracket-expanded">[</span><span class="open-bracket-collapsed">[...]</span></span></div><div class="td key-descr m-markdown-small">${h} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(c,"array",a+1,r+1)}</div><div class="close-bracket">]</div>`}if(e.kind==="object"){let c=p`<span class="open-bracket object">${e.nullable?"null\u2503":""}<span class="open-bracket-expanded">{</span><span class="open-bracket-collapsed">{...}</span></span>`,d=J(e.description)?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr ${n?"expanded":"collapsed"} object ${e.nullable?"nullable":""}" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label" title="${o}">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}${i}:</span>`:""} ${c}</div><div class="td key-descr m-markdown-small">${d} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket object" style="padding-left:${12}px">${e.properties?.map(u=>this.renderAST(u,"object",a+1,r+1))} ${e.patternProperties?.map(u=>this.renderAST(u,"object",a+1,r+1))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",a+1,r+1):""} ${e.unions?.map(u=>this.renderAST(u,"object",a+1,r+1))}</div><div class="close-bracket">${"}"}</div>`}if(e.kind==="union"){let c=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),d=t==="xxx-of-option"?r:r+1,u=!!e.description,h=J(e.description),m=u&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`${e.properties?.map(y=>this.renderAST(y,"object",a,r))}<div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${s}px"><span class="key-label xxx-of-key">${c}</span></div><div class="td key-descr m-markdown-small">${m} ${F(O(E(e.description||"")))}</div></div><div class="inside-bracket xxx-of-option" style="padding-left:0">${e.options?.map((y,f)=>p`<div><div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${s}px"><span class="key-label xxx-of-key">OPT ${y.optionIndex||f+1}</span> ${y.optionTitle?p`<span class="xxx-of-descr">${y.optionTitle}</span>`:""}</div></div>${this.renderAST(y,"xxx-of-option",a,d)}</div>`)}</div>`}if(e.kind==="primitive"){let c=(e.type||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),d=!!(e.description||e.title),u=!!(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding),h=u||J(e.description),m=d&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=p`${e.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${e.constraints}</div>`:""} ${e.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${e.defaultValue}</div>`:""} ${e.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${e.type==="const"?"Value":"Allowed"}: </span>${e.allowedValues}</div>`:""} ${e.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${e.pattern}</div>`:""} ${e.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${e.contentMediaType}</div>`:""} ${e.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${e.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${l} ${e.name?p`<span class="key-label">${e.name}${e.required?p`<span style="color:var(--red)">*</span>`:""}:</span>`:""} <span class="${c}" title="${o}">${t==="array"?`[${e.type}]`:e.type}${i}</span></div><div class="td key-descr">${d?p`<span class="m-markdown-small">${m} ${F(O(E(e.title?e.description?`<b>${e.title}:</b> ${e.description}`:`<b>${e.title}</b>`:e.description)))}</span>`:""} ${d&&u?p`<div class="item-details">${y}</div>`:y}</div></div>`}return""}handleAllEvents(e){let t=e.target.closest(".open-bracket");if(t)this.toggleObjectExpand(t);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.classList.contains("descr-expand-toggle")){let a=e.target.closest(".tr");a&&(a.classList.toggle("expanded-descr"),a.classList.contains("expanded-descr")?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight="")}}toggleObjectExpand(e){let t=e.closest(".tr");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};customElements.define("schema-tree",Hp);var Wp=class extends se{render(){let e="";return Array.isArray(this.value)&&(e=p`${this.value.filter(t=>t!==""&&t!=null&&String(t).trim()!=="").map(t=>p`<span class="tag">${t}</span>`)}`),p`<div class="tags" @click="${t=>this.focusEditor(t)}">${e} <input type="text" class="editor" @paste="${t=>this.afterPaste(t)}" @keydown="${t=>this.afterKeyDown(t)}" @blur="${t=>this.onBlur(t)}" placeholder="${this.placeholder||""}"></div>`}focusEditor(e){e.target.classList.contains("tags")&&this.shadowRoot?.querySelector(".editor")?.focus()}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value",hasChanged(e,t){return e===t?!1:!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.some((a,r)=>a!==t[r])}}}}attributeChangedCallback(e,t,a){e==="value"&&a&&t!==a&&(this.value=a.split(",").filter(r=>r.trim()!=="")),super.attributeChangedCallback(e,t,a)}dispatchEvents(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}}))}afterPaste(e){let t=(e.clipboardData||window.clipboardData).getData("Text"),a=t?t.split(",").filter(r=>r.trim()!==""):"";a&&(this.value=Array.isArray(this.value)?[...this.value,...a]:a,this.dispatchEvents()),e.preventDefault()}afterKeyDown(e){if(e.key==="Enter"||e.keyCode===13){e.stopPropagation(),e.preventDefault();let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}else(e.key==="Backspace"||e.key==="Delete"||e.keyCode===8||e.keyCode===46)&&(!e.target.value||e.target.value.length===0)&&Array.isArray(this.value)&&this.value.length>0&&(e.preventDefault(),this.value=this.value.slice(0,-1),this.dispatchEvents())}onBlur(e){let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}static get styles(){return[B`.tags{border-radius:var(--border-radius);border:1px solid var(--input-border);cursor:text;background:var(--input-background);outline:none;flex-wrap:wrap;padding:0;display:flex;overflow:hidden}.tag,.editor{margin:2px;padding:3px}.tag{border:1px solid var(--border);background:var(--muted);color:var(--muted-foreground);border-radius:var(--border-radius);word-break:break-all;font-size:var(--font-size-small)}.tag:hover~#cursor{display:block}.editor{color:var(--foreground);min-width:60px;line-height:inherit;font-family:inherit;font-size:calc(var(--font-size-small) + 1px);background:0 0;border:1px solid #0000;outline:none;flex:1}.editor:focus-visible{outline:1px solid}.editor::placeholder{color:var(--muted-foreground);opacity:1}`]}};customElements.define("tag-input",Wp);function bo(e,t,a){return p`${t==="array"?"[":""} <a part="anchor anchor-param-example" style="display:inline-block;min-width:24px;text-align:center" class="${this.allowTry==="true"?"":"inactive-link"}" data-example-type="${t==="array"?t:"string"}" data-example="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" title="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" @click="${r=>{let s=r.target.closest("table").querySelector(`[data-pname="${a}"]`);s&&(s.value=r.target.dataset.exampleType==="array"?r.target.dataset.example.split("~|~"):r.target.dataset.example)}}">${e.printableValue||e.value} </a>${t==="array"?"] ":""}`}function Vp(e,t,a){return p`${e.map((r,s)=>p`${s===0?"":"\u2503"} ${bo.call(this,r,t,a)}`)}`}function Kp(e,t,a){return p`<ul style="list-style-type:disclosure-closed">${e.map(r=>p`<li>${bo.call(this,r,t,a)} ${r.summary?.length>0?p`<span>(${r.summary})</span>`:""} ${r.description?.length>0?p`<p>${F(O(E(r.description)))}</p>`:""}</li>`)}</ul>`}function vo(e,t,a=[]){return p`${a.length>0?p`<span style="font-weight:700">Examples: </span>${hp(a)?Kp.call(this,a,t,e):Vp.call(this,a,t,e)}`:""}`}function Ga(e){let t=this.parameters?this.parameters.filter(s=>s.in===e):[];if(t.length===0)return"";let a="";e==="path"?a="PATH PARAMETERS":e==="query"?a="QUERY-STRING PARAMETERS":e==="header"?a="REQUEST HEADERS":e==="cookie"&&(a="COOKIES");let r=[];for(let s of t){let[n,i,o]=fp(s);if(!n)continue;let l=Ba(n);if(!l)continue;let c=G(n),d="form",u=!0,h=!1;(e==="query"||e==="header"||e==="path")&&(s.style&&"form spaceDelimited pipeDelimited".includes(s.style)?d=s.style:i&&(d=i),typeof s.explode=="boolean"&&(u=s.explode),typeof s.allowReserved=="boolean"&&(h=s.allowReserved));let m=Ji(de(s.examples)||de(s.example)||de(o?.example)||de(o?.examples)||de(l.examples)||de(l.example),l.type);!m.exampleVal&&(l.type==="object"||l.type.split("\u2503").includes("object"))&&(m.exampleVal=mt(n,i||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1)[0]?.exampleValue||"");let y="read focused".includes(this.renderStyle)?"200px":"160px";r.push(p`<tr title="${s.deprecated?"Deprecated":""}"><td rowspan="${this.allowTry==="true"?"1":"2"}" style="width:${y};min-width:100px"><div class="param-name ${s.deprecated?"deprecated":""}">${s.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${s.required?p`<span style="color:var(--red)">*</span>`:""} ${s.name}</div><div class="param-type">${l.type==="array"||l.type.split("\u2503").includes("array")?`${l.arrayType||l.type}`:`${l.format&&!l.type.includes("\u2503")?l.format:l.contentMediaType&&!l.type.includes("\u2503")?l.contentMediaType:l.type}`}</div></td>${this.allowTry==="true"?p`<td style="min-width:100px" colspan="${l.default||l.constrain||l.allowedValues||l.pattern?"1":"2"}">${l.type==="array"||l.type.split("\u2503").includes("array")&&!l.type.split("\u2503").includes("object")?p`<tag-input class="request-param" id="tag-input-request-param-${s.name}" style="width:100%" data-ptype="${e}" data-pname="${s.name}" data-example="${Array.isArray(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${u}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="true" placeholder="add-multiple ↩" .value="${s["x-fill-example"]==="no"?ps:Jt(this.fillRequestFieldsWithExample==="true"?Array.isArray(m.exampleVal)?m.exampleVal:[m.exampleVal]:ps)}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}" @change="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}"></tag-input>`:l.type==="object"||l.type.split("\u2503").includes("object")?p`<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0"><div part="tab-btn-row" class="tab-buttons row" @click="${f=>{if(f.target.tagName.toLowerCase()==="button"){let b={...this.activeParameterSchemaTabs};b[s.name]=f.target.dataset.tab,this.activeParameterSchemaTabs=b}}}"><button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div>${p`<div part="tab-content" class="tab-content col" data-tab="example" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"block":"none"};padding-left:5px;width:100%"><textarea id="textarea-request-param-${s.name}" class="textarea request-param" part="textarea textarea-param" data-ptype="${e}-object" data-pname="${s.name}" data-example="${m.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${u}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" spellcheck="false" .value="${s["x-fill-example"]==="no"?"":Jt(this.fillRequestFieldsWithExample==="true"?typeof m.exampleVal=="object"?JSON.stringify(m.exampleVal,null,2):m.exampleVal:"")}" style="resize:vertical;width:100%;height:${"read focused".includes(this.renderStyle)?"180px":"120px"}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}"></textarea></div>`} ${p`<div part="tab-content" class="tab-content col" data-tab="schema" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"none":"block"};padding-left:5px;width:100%"><schema-tree class="json" style="display:block" .data="${c}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly.includes(this.method)}" schema-hide-write-only="${this.schemaHideWriteOnly.includes(this.method)}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
|
272
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Ot(aa(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ot(aa(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function gu(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new mu||null,prettyErrors:t}}function yu(e,t={}){let{lineCounter:r,prettyErrors:a}=gu(t),s=new fu(r?.addNewLine),n=new lu(t),i=null;for(let o of n.compose(s.parse(e),!0,e.length))if(!i)i=o;else if(i.options.logLevel!=="silent"){i.errors.push(new or(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&r&&(i.errors.forEach(no(e,r)),i.warnings.forEach(no(e,r))),i}function Ds(e,t,r){let a;typeof t=="function"?a=t:r===void 0&&t&&typeof t=="object"&&(r=t);let s=yu(e,r);if(!s)return null;if(s.warnings.forEach(n=>(s.options.logLevel,void 0)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},r))}var bu=e=>e.startsWith("\uFEFF")?e.slice(1):e;function na(e){if(e!==null){if(typeof e=="string"){let t=bu(e);if(t.trim()==="")return;try{return JSON.parse(t)}catch{let r=/^[^:]+:/.test(t),a=t.slice(0,50).trimStart(),s=a.startsWith("{")||a.startsWith("[");return!r||s?void 0:Ds(t,{maxAliasCount:1e4,merge:!0})}}return e}}var ee=e=>{if(typeof e!="object"||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},ie=e=>typeof e=="object"&&!!e;function tt(e,t,r=[]){let a={};for(let[s,n]of Object.entries(e)){let i=[...r,s];a[s]=Array.isArray(n)?n.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?tt(o,t,[...i,l.toString()]):o):ie(n)?tt(n,t,i):n}return t(a,r)}var Be="application/json";function vo(e){let t=e["x-example"],r=e["x-examples"];return delete e["x-example"],delete e["x-examples"],{xExample:t,xExamples:r}}function rt(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Object.keys(e).length>0}function vu(e){return rt(e)&&Object.values(e).every(t=>typeof t=="object"&&!!t&&!Array.isArray(t))}function xu(e){if(!ie(e))return!0;let t=e;return!(t.allOf||t.oneOf||t.anyOf||t.items||t.$ref||"additionalProperties"in t||["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"].some(r=>r in t)||typeof t.properties=="object"&&t.properties!==null&&Object.keys(t.properties).length>0)}function xo(e){let t=Object.keys(e);if(t.some(r=>{let a=e[r];return ie(a)&&(a.example!==void 0||a.examples!==void 0)}))for(let r of t){let a=e[r];if(!ie(a))continue;let s=a.example!==void 0||a.examples!==void 0;a.schema!==void 0&&!s&&Object.keys(a).length===1&&xu(a.schema)&&delete e[r]}}var wu=new Set(["summary","description","value","externalValue"]);function wo(e){if(typeof e!="object"||!e)return!1;let t=e,r="value"in t||"externalValue"in t,a=Object.keys(t).every(s=>wu.has(s));return r&&a}function Ft(e){return wo(e)?e:{value:e}}var ku=/^(\*|application|audio|example|font|haptics|image|message|model|multipart|text|video)\/[a-zA-Z0-9*+.-]+$/,Cs=(e,t)=>t.includes(e)||ku.test(e);function $u(e){return Object.entries(e).reduce((t,[r,a])=>(t[r]={value:a},t),{})}var Su=e=>{switch(e){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return e}};function ko(e){let t=e;if(typeof t=="object"&&t&&typeof t.swagger=="string"&&t.swagger?.startsWith("2.0"))t.openapi="3.0.4",delete t.swagger;else return t;if(t.host){let r=Array.isArray(t.schemes)&&t.schemes?.length?t.schemes:["http"];t.servers=r.map(a=>({url:`${a}://${t.host}${t.basePath??""}`})),delete t.basePath,delete t.schemes,delete t.host}else t.basePath&&(t.servers=[{url:t.basePath}],delete t.basePath);if(t.definitions){for(let r of Object.values(t.definitions))Ce(r);t.components=Object.assign({},t.components,{schemas:t.definitions}),delete t.definitions,t=tt(t,r=>(typeof r.$ref=="string"&&r.$ref.startsWith("#/definitions/")&&(r.$ref=r.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),r))}if(t=tt(t,r=>(r.type==="file"&&(r.type="string",r.format="binary"),r)),Object.hasOwn(t,"parameters")){t=tt(t,n=>{if(typeof n.$ref=="string"&&n.$ref.startsWith("#/parameters/")){let i=n.$ref.split("/")[2];if(!i)return n;let o=ie(t.parameters)&&i in t.parameters?t.parameters[i]:void 0;n.$ref=o&&typeof o=="object"&&"in"in o&&(o.in==="body"||o.in==="formData")?n.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):n.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return n}),t.components??={};let r={},a={},s=ie(t.parameters)?t.parameters:{};for(let[n,i]of Object.entries(s))i&&typeof i=="object"&&("$ref"in i?r[n]=Os(i):"in"in i&&(i.in==="body"?a[n]=Eo(i,t.consumes??[Be]):i.in==="formData"?a[n]=Do([i],t.consumes):r[n]=Os(i)));Object.keys(r).length>0&&(t.components.parameters=r),Object.keys(a).length>0&&(t.components.requestBodies=a),delete t.parameters}if(Object.hasOwn(t,"responses")&&typeof t.responses=="object"&&t.responses!==null){t=tt(t,s=>(typeof s.$ref=="string"&&s.$ref.startsWith("#/responses/")&&(s.$ref=s.$ref.replace(/^#\/responses\//,"#/components/responses/")),s)),t.components??={};let r={},a=t.responses;for(let[s,n]of Object.entries(a))if(ie(n))if("$ref"in n)r[s]=n;else{let i=n,o=t.produces??[Be];if(i.schema){Ce(i.schema),typeof i.content!="object"&&(i.content={});for(let l of o)i.content[l]={schema:i.schema};delete i.schema}if(i.examples&&typeof i.examples=="object"){typeof i.content!="object"&&(i.content={});let l=o[0]??Be;for(let[c,d]of Object.entries(i.examples))if(Cs(c,o))typeof i.content[c]!="object"&&(i.content[c]={}),i.content[c].example=d;else{typeof i.content[l]!="object"&&(i.content[l]={});let p=i.content[l];typeof p.examples!="object"&&(p.examples={}),p.examples[c]=Ft(d)}delete i.examples}i.content&&typeof i.content=="object"&&xo(i.content),ie(i.headers)&&(i.headers=Object.entries(i.headers).reduce((l,[c,d])=>d&&typeof d=="object"?{[c]:$o(d),...l}:l,{})),r[s]=i}Object.keys(r).length>0&&(t.components.responses=r),delete t.responses}if(typeof t.paths=="object"){for(let r in t.paths)if(Object.hasOwn(t.paths,r)){let a=ie(t.paths)&&r in t.paths?t.paths[r]:void 0;if(!a||typeof a!="object")continue;let s;for(let n in a)if(n==="parameters"&&Object.hasOwn(a,n)){let i=Co(a.parameters,t.consumes??[Be]);a.parameters=i.parameters,s=i.requestBody}else if(Object.hasOwn(a,n)){let i=a[n];if(s&&(i.requestBody=s),i.parameters){let o=Co(i.parameters,i.consumes??t.consumes??[Be]);i.parameters=o.parameters,o.requestBody&&(i.requestBody=o.requestBody)}if(delete i.consumes,i.responses){for(let o in i.responses)if(Object.hasOwn(i.responses,o)){let l=i.responses[o];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((c,[d,p])=>p&&typeof p=="object"?{[d]:$o(p),...c}:c,{})),l.schema){Ce(l.schema);let c=t.produces??i.produces??[Be];typeof l.content!="object"&&(l.content={});for(let d of c)l.content[d]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});let c=t.produces??i.produces??[Be],d=c[0]??Be;for(let[p,h]of Object.entries(l.examples))if(Cs(p,i.produces??c))typeof l.content[p]!="object"&&(l.content[p]={}),l.content[p].example=h;else{typeof l.content[d]!="object"&&(l.content[d]={});let u=l.content[d];typeof u.examples!="object"&&(u.examples={}),u.examples[p]=Ft(h)}delete l.examples}l.content&&typeof l.content=="object"&&xo(l.content)}}delete i.produces,i.parameters?.length===0&&delete i.parameters}}}if(t.securityDefinitions){(typeof t.components!="object"||t.components===null)&&(t.components={}),t.components&&typeof t.components=="object"&&Object.assign(t.components,{securitySchemes:{}});for(let[r,a]of Object.entries(t.securityDefinitions))if(typeof a=="object"){let s=Object.fromEntries(Object.entries(a).filter(([n])=>n==="description"||n.startsWith("x-")));if("type"in a&&a.type==="oauth2"){let{flow:n,authorizationUrl:i,tokenUrl:o,scopes:l}=a;t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...s,type:"oauth2",flows:{[Su(n||"implicit")]:Object.assign({},i&&{authorizationUrl:i},o&&{tokenUrl:o},l&&{scopes:l})}}})}else"type"in a&&a.type==="basic"?t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...s,type:"http",scheme:"basic"}}):t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:a})}delete t.securityDefinitions}return delete t.consumes,delete t.produces,t}var Ce=e=>{if(ie(e)){if(typeof e["x-nullable"]=="boolean"&&(e["x-nullable"]&&(e.nullable=!0),delete e["x-nullable"]),ie(e.properties))for(let t of Object.values(e.properties))Ce(t);if(Ce(e.items),Ce(e.additionalProperties),Array.isArray(e.allOf))for(let t of e.allOf)Ce(t)}};function Ts(e){let t=["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf","x-nullable"].reduce((r,a)=>(Object.hasOwn(e,a)&&(r[a]=e[a],delete e[a]),r),{});return Ce(t),t}function Au(e){if(e==="formData")throw Error("Encountered a formData parameter which should have been filtered out by the caller");if(e==="body")throw Error("Encountered a body parameter which should have been filtered out by the caller");return e}function Os(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Eu(e),r=Ts(e),{xExample:a,xExamples:s}=vo(e);if(rt(a)?e.examples=$u(a):rt(s)&&(e.examples=Object.entries(s).reduce((n,[i,o])=>(n[i]=Ft(o),n),{})),delete e.collectionFormat,delete e.default,!e.in)throw Error('Parameter object must have an "in" property');return{schema:r,...t,...e,in:Au(e.in)}}function $o(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Ts(e);return{...e,schema:t}}var So={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Ao={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},Fs={header:Ao,query:So,path:Ao};function Eu(e){if(e.type!=="array"||e.in!=="query"&&e.in!=="path"&&e.in!=="header")return{};let t=e.collectionFormat??"csv";return e.in in Fs&&t in Fs[e.in]?Fs[e.in][t]:{}}function Du(e){if(e.type!=="array"||typeof e.collectionFormat!="string")return;let t=So[e.collectionFormat];if(t&&Object.keys(t).length!==0)return t}function Eo(e,t){let{xExample:r,xExamples:a}=vo(e);delete e.name,delete e.in;let{schema:s,...n}=e;Ce(s);let i={content:{},...n};if(i.content)for(let o of t){if(i.content[o]={schema:s},rt(a)&&o in a){let l=a[o];rt(l)&&Object.values(l).every(c=>wo(c))?i.content[o].examples=l:vu(l)?i.content[o].examples=Object.entries(l).reduce((c,[d,p])=>(c[d]=Ft(p),c),{}):i.content[o].examples={default:Ft(l)}}else if(rt(a)){let l=Object.entries(a).filter(([c])=>!Cs(c,t));l.length&&(i.content[o].examples=l.reduce((c,[d,p])=>(c[d]=Ft(p),c),{}))}!i.content[o].examples&&rt(r)&&o in r&&(i.content[o].example=r[o])}return i}function Do(e,t=["multipart/form-data"]){let r={content:{}},a=t.filter(n=>n==="multipart/form-data"||n==="application/x-www-form-urlencoded"),s=a.length>0?a:["multipart/form-data"];if(r.content)for(let n of s){r.content[n]={schema:{type:"object",properties:{},required:[]}};let i=r.content?.[n];if(i?.schema&&typeof i.schema=="object"&&"properties"in i.schema){for(let o of e)if(o.name&&i.schema.properties){let l=structuredClone(o),c=Ts(l);i.schema.properties[o.name]={...c,...Object.fromEntries(Object.entries(l).filter(([p])=>p.startsWith("x-"))),...o.description===void 0?{}:{description:o.description}};let d=Du(o);d&&(i.encoding??={},i.encoding[o.name]=d),o.required&&Array.isArray(i.schema.required)&&i.schema.required.push(o.name)}}}return r}function Co(e,t){let r={parameters:e.filter(n=>n.in!=="body"&&n.in!=="formData").map(n=>Os(n))},a=structuredClone(e.find(n=>n.in==="body")??{});a&&Object.keys(a).length&&(r.requestBody=Eo(a,t));let s=e.filter(n=>n.in==="formData");if(s.length>0){let n=Do(s,t);r.requestBody=typeof r.requestBody=="object"?{...r.requestBody,content:{...r.requestBody.content,...n.content}}:n,typeof r.requestBody!="object"&&(r.requestBody={content:{}})}return r}var Cu=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema","schemas"]),Tu=new Set(["paths","webhooks","responses","content","headers","examples","links","encoding","variables","parameters","requestBodies","securitySchemes","pathItems","scopes"]),js=e=>{if(!e)return!1;let t=e[0]==="x-ext"&&e[1]!==void 0?e.slice(2):e,r=0;for(let a of t)if(r>0)r--;else{if(Cu.has(a)||a.endsWith("Schema"))return!0;a==="callbacks"?r=2:Tu.has(a)&&(r=1)}return!1},Ou=new Set(["properties","patternProperties","$defs","definitions"]);function jt(e){let t=e?.[e.length-1];return t===void 0?!1:t==="schemas"&&e?.[e.length-2]==="components"||Ou.has(t)}function Fu(e,t){return e[t]==="default"&&e[t-1]==="responses"&&!jt(e.slice(0,t-1))}var ju=new Set(["example","default","const","enum"]);function _u(e){if(!e)return!1;for(let[t,r]of e.entries())if(ju.has(r)&&!jt(e.slice(0,t))&&!Fu(e,t)||r==="value"&&e[t-2]==="examples"&&!jt(e.slice(0,t-2)))return!0;return!1}var qu=new Set(["title","description","deprecated","default","example","examples","externalDocs","readOnly","writeOnly"]);function Ru(e){if(!e||e.length<2||!js(e.slice(0,-2))||e.some((a,s)=>{let n=e.slice(0,s);return a.startsWith("x-")&&js(n)&&!jt(n)}))return!1;let t=e[e.length-2],r=e[e.length-1];return(t==="oneOf"||t==="anyOf")&&r!==void 0&&/^\d+$/.test(r)}function Iu(e){return Object.keys(e).every(t=>t==="nullable"||qu.has(t)||t.startsWith("x-"))}function To(e){let t=e;return t===null||typeof t.openapi!="string"||!t.openapi.startsWith("3.0")||(t.openapi="3.1.1",t=tt(t,Lu)),t}var Lu=(e,t)=>{if(_u(t))return e;if(e.type!==void 0&&e.nullable===!0)e.type=[e.type,"null"],delete e.nullable;else if(e.nullable===!0&&e.type===void 0){if(typeof e.$ref=="string"){let{nullable:n,$ref:i,...o}=e;return{...o,anyOf:[{$ref:i},{type:"null"}]}}if(Array.isArray(e.allOf)){let{nullable:n,allOf:i,...o}=e,l=i.length===1?i[0]:{allOf:i};return{...o,anyOf:[l,{type:"null"}]}}Ru(t)&&Iu(e)&&(delete e.nullable,e.type="null")}e.exclusiveMinimum===!0&&e.minimum!==void 0?(e.exclusiveMinimum=e.minimum,delete e.minimum):typeof e.exclusiveMinimum=="boolean"&&delete e.exclusiveMinimum,e.exclusiveMaximum===!0&&e.maximum!==void 0?(e.exclusiveMaximum=e.maximum,delete e.maximum):typeof e.exclusiveMaximum=="boolean"&&delete e.exclusiveMaximum;let r=t?.some((n,i)=>n==="examples"&&i>0&&!jt(t.slice(0,i)));e.example!==void 0&&!r&&!jt(t)&&(e.examples=js(t)?[e.example]:{default:{value:e.example}},delete e.example);let{format:a,...s}=e;if(e.type==="string"||Array.isArray(e.type)&&e.type.includes("string")){if(e.format==="binary"){let{type:n,...i}=s;return t?.at(-1)==="schema"&&t.at(-3)==="content"?i:{contentMediaType:"application/octet-stream",...i}}if(e.format==="base64"||e.format==="byte")return{...s,contentEncoding:"base64"}}return e["x-webhooks"]!==void 0&&(t===void 0||t.length===0)&&(e.webhooks=e["x-webhooks"],delete e["x-webhooks"]),e},Bu=["2.0","3.0","3.1","3.2"],me={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function Oo(e){if(e===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(ee(e))for(let t of new Set(Bu)){let r=t==="2.0"?"swagger":"openapi",a=e[r];if(typeof a!="string")continue;let[s,n]=a.split(".");if(`${s}.${n}`===t)return{version:t,specificationType:r,specificationVersion:a}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function at(e){return e?.find(t=>t.isEntrypoint)}function Nu(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function Fo(e){return e.split("/").slice(1).map(Nu)}var zu=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas"]),Pu=new Set(["allOf","anyOf","oneOf","prefixItems"]),Mu=new Set(["schema","items","additionalItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"]),Uu=new Set(["additionalOperations","webhooks","content","mediaTypes","headers","encoding","variables","parameters","requestBodies","securitySchemes","pathItems"]),Hu=new Set(["example","default","enum","const","dependentRequired"]),jo=(e,t,r)=>e==="literal"?"literal":e==="callbackMap"?"callback":e==="callback"?"object":e==="responseMap"||e==="paths"?t.startsWith("x-")?"literal":e==="paths"?"object":"response":e==="namedResponseMap"?"response":e==="schemaMap"?"schema":e==="objectMap"?"object":e==="linkMap"?"link":e==="exampleMap"?"example":t.startsWith("x-")||t==="scopes"||e==="discriminator"&&t==="mapping"||e==="link"&&(t==="requestBody"||t==="parameters")?"literal":t==="links"?"linkMap":t==="discriminator"?"discriminator":Hu.has(t)||e==="example"&&(t==="value"||t==="dataValue")?"literal":t==="examples"?e==="schema"||e==="response"||Array.isArray(r)?"literal":"exampleMap":zu.has(t)||Pu.has(t)||t==="schemas"?"schemaMap":Mu.has(t)?Array.isArray(r)?"schemaMap":"schema":t==="components"?"components":t==="paths"?"paths":t==="responses"?e==="components"||e==="document"?"namedResponseMap":"responseMap":t==="callbacks"?"callbackMap":Uu.has(t)?"objectMap":"object",_o=e=>e==="document"||e==="link"||e==="object"||e==="schema"||e==="example"||e==="callback"||e==="response",qo=(e,t=[{fragment:"",context:"document"}])=>{let r=[],a=[],s=new WeakMap,n=({fragment:o,context:l})=>{try{let c=Fo(o).reduce((d,p)=>ie(d)&&Object.hasOwn(d,p)?d[p]:void 0,e);i(c,l)}catch{}},i=(o,l)=>{if(l==="literal"||!ie(o)||s.get(o)?.has(l))return;let c=s.get(o)??new Set;if(c.add(l),s.set(o,c),_o(l)&&typeof o.$ref=="string"&&o.$ref){let[d,p=""]=o.$ref.split("#",2);d?r.push({filename:d,fragment:p,context:l}):a.push({fragment:p,context:l})}for(let[d,p]of Object.entries(o))i(p,jo(l,d,p))};for(let o of t)n(o);for(let o of a)n(o);return r},Wu=e=>[...new Set(qo(e).map(({filename:t})=>t))];function Ro(e){return e!==void 0&&Array.isArray(e)&&e.length>0&&e.some(t=>t.isEntrypoint===!0)}function _s(e,t={}){if(Ro(e))return e;let r=na(e);return Array.isArray(r)?r:[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:Wu(r),...t}]}function Ku(e,t,r,a=[]){let s=_s(structuredClone(e)),n=at(s),i=r?.specification??n.specification;if(!ee(i)){if(t?.throwOnError)throw Error(me.NO_CONTENT);return{valid:!1,errors:a,schema:i}}qs(i,s,r??n,new WeakSet,a,t,"document");let o=a.filter((l,c,d)=>c===d.findIndex(p=>p.message===l.message&&p.code===l.code));return{valid:o.length===0,errors:o,schema:i}}function qs(e,t,r,a,s,n,i="object"){if(i==="literal"||e===null||a.has(e))return;a.add(e);let o=(c,d)=>{let p=Io(`#${d}`,n,c,t,o,s);return ie(p)&&qs(p,t,c,a,s,n,i),p},l=new Set;for(;_o(i)&&e.$ref!==void 0;){if(l.has(e.$ref)){s.push({code:"SELF_REFERENCE",message:me.SELF_REFERENCE.replace("%s",e.$ref)}),delete e.$ref;break}l.add(e.$ref);let c=Io(e.$ref,n,r,t,o,s);if(typeof c!="object"||!c)break;let d=e.$ref;delete e.$ref;for(let p of Object.keys(c))e[p]===void 0&&(e[p]=c[p]);d&&n?.onDereference?.({schema:e,ref:d,resolved:c})}for(let[c,d]of Object.entries(e))typeof d=="object"&&d&&qs(d,t,r,a,s,n,jo(i,c,d))}function Io(e,t,r,a,s,n){if(typeof e!="string"){if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)});return}let[i,o]=e.split("#",2),l=i!==r.filename;if(i&&l){let c=a.find(d=>d.filename===i);if(!c){if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i));n.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i)});return}return s(c,o??"")}try{return Fo(o).reduce((c,d)=>{if(!ie(c)||!(d in c))throw Error(me.INVALID_REFERENCE.replace("%s",e));return c[d]},r.specification)}catch{if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));n.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)})}}function Lo(e,t){let r=_s(e),a=at(r),s=Ku(r,t);return{specification:a.specification,errors:s.errors,schema:s.schema,...Oo(a.specification)}}var Vu=e=>e.replaceAll("~1","/").replaceAll("~0","~"),Zu=1e5,Ju=10,Bo=e=>{let t=new WeakSet,r={sourceEntries:0,copiedEntries:0,sizes:new Map},a=s=>{if(s===null||typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===void 0)return s;if(!Array.isArray(s)&&!ee(s))return structuredClone(s);if(t.has(s))throw Error("Cannot upgrade to OpenAPI 3.2: cyclic objects cannot be represented in JSON. Use $ref instead.");let n=r.sizes.get(s)??1+(Array.isArray(s)?s.length:Object.keys(s).length);if(r.sizes.has(s)||(r.sizes.set(s,n),r.sourceEntries+=n),r.copiedEntries+=n,r.copiedEntries>Zu&&r.copiedEntries>r.sourceEntries*Ju)throw Error("Cannot upgrade to OpenAPI 3.2: excessive YAML alias expansion. Use $ref for shared schemas.");t.add(s);let i=Array.isArray(s)?s.map(a):Object.fromEntries(Object.entries(s).map(([o,l])=>[o,a(l)]));return t.delete(s),i};return a(e)},_t=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Gu=e=>decodeURI(Vu(e)),No=e=>e.split("/").slice(1).map(Gu),zo=class extends AggregateError{errors;constructor(e){super(e,e.map(t=>t.message).join(`
|
|
273
|
+
`)),this.errors=e,this.name="UpgradeIncompatibilityError"}},Xu=["properties","patternProperties","$defs","dependentSchemas"],Yu=["allOf","anyOf","oneOf","prefixItems"],Qu=["items","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"],eh=(e,t="throw")=>{let r=new WeakMap,a=(b,$)=>{let S=r.get(b)??new Map(Object.entries(Object.getOwnPropertyDescriptors(b)).filter(([,E])=>Object.hasOwn(E,"value")).map(([E,D])=>[E,D.value]));return r.set(b,S),S.get($)},s=new Set,n=[],i=new WeakMap,o=new WeakSet,l={evaluations:0},c=new WeakSet,d=[],p=b=>{ee(b)&&!c.has(b)&&(c.add(b),p(b.items),Array.isArray(b.prefixItems)&&b.prefixItems.forEach(p))},h=new WeakMap,u=new WeakMap,g=(b,$)=>{n.push(Error(`Cannot upgrade to OpenAPI 3.2 at ${b}: ${$}`))},f=(b,$=!1)=>{if(typeof b=="string"&&b.startsWith("#/"))try{return No(decodeURIComponent(b.slice(1))).reduce((S,E)=>{if((!$||!ee(S)||S.$id===void 0&&S.$schema===void 0)&&(!Array.isArray(S)||/^(0|[1-9]\d*)$/.test(E))&&(ee(S)||Array.isArray(S))&&Object.hasOwn(S,E))return a(S,E)},e)}catch{return}},y=(b,$)=>{if(typeof b!="string")return;let S=[...b.matchAll(/\{([^{}]+)\}/g)].map(E=>E[1]);new Set(S).size!==S.length&&g($,"Template variables must not be repeated. Rename the repeated variable and define it separately.")},v=(b,$,S=new Set)=>{if(b===!1)return!0;if(b===!0)return!1;if(!ee(b)||b.$id!==void 0||b.$schema!==void 0)return;if(S.has(b)){for(let F of S)o.add(F);return}let E=i.get(b)??new Map;if(E.has($))return E.get($);if(++l.evaluations>1e5){l.evaluations===100001&&g("#","Discriminator requiredness analysis was truncated after 100,000 evaluations.");return}let D=F=>(F===void 0&&o.has(b)||(E.set($,F),i.set(b,E)),F);if(Array.isArray(b.required)&&b.required.includes($))return D(!0);let j=new Set([...S,b]),N=[];b.$ref!==void 0&&N.push(v(f(b.$ref,!0),$,j)),Array.isArray(b.allOf)&&N.push(...b.allOf.map(F=>v(F,$,j)));for(let F of["oneOf","anyOf"])if(Array.isArray(b[F])){let z=b[F].map(V=>v(V,$,j));z.every(V=>V===!0)?N.push(!0):z.every(V=>V===!1)?N.push(!1):N.push(void 0)}return N.includes(!0)?D(!0):N.includes(void 0)||["if","not","$dynamicRef","const","enum","minProperties","dependentRequired","dependentSchemas"].some(F=>F in b)?D(void 0):D(!1)},A=(b,$,{inferredName:S,propertyName:E,dialect:D,ancestors:j=new Set,baseChanged:N=!1})=>{if(!ee(b)||j.has(b)||(b.$schema??D)!==void 0)return;let F=N||b.$id!==void 0,z=[S,E,F].join(":"),V=h.get(b)??new Set;if(V.has(z))return;let _=ee(b.xml)?b.xml:{},U=b.$ref!==void 0||b.$dynamicRef!==void 0||b.type==="array"?"none":"element",B=_.wrapped===!0?"element":U,H=_.nodeType??(_.attribute===!0?"attribute":B);H!=="element"&&H!=="attribute"||S||_.name!==void 0||g($,"An inline XML element needs an explicit xml.name.");let W={dialect:D,ancestors:new Set([...j,b]),baseChanged:F};if(!F&&typeof b.$ref=="string"){let J=f(b.$ref,!0);if(ee(J)){let G=No(decodeURIComponent(b.$ref.slice(1))),Nt=G.length===3&&G[0]==="components"&&G[1]==="schemas",lt=c.has(J);A(J,b.$ref,{...W,inferredName:Nt||lt,propertyName:lt})}}for(let J of["allOf","anyOf","oneOf"]){let G=b[J];Array.isArray(G)&&G.forEach((Nt,lt)=>A(Nt,$+"/"+J+"/"+lt,{...W,inferredName:!1,propertyName:!1}))}if(A(b.items,$+"/items",{...W,inferredName:E,propertyName:E}),Array.isArray(b.prefixItems)&&b.prefixItems.forEach((J,G)=>A(J,$+"/prefixItems/"+G,{...W,inferredName:E,propertyName:E})),ee(b.properties))for(let[J,G]of Object.entries(b.properties))A(G,$+"/properties/"+_t(J),{...W,inferredName:!0,propertyName:!0});V.add(z),h.set(b,V)},x=(b,$,S,E=e.jsonSchemaDialect,D=!1)=>{if(!ee(b))return;let j=$==="schema"?b.$schema??E:E,N=D||$==="schema"&&b.$id!==void 0,F=`${$}:${String(j)}:${N}`,z=u.get(b)??new Set;if(z.has(F))return;z.add(F),u.set(b,z);let V=(B,H)=>x(a(b,B),H,`${S}/${_t(B)}`,j,N),_=(B,H)=>{let W=a(b,B);Array.isArray(W)&&W.forEach((J,G)=>x(J,H,`${S}/${B}/${G}`,j,N))},U=(B,H)=>{let W=a(b,B);if(ee(W))for(let[J,G]of Object.entries(W))B==="responses"&&J.startsWith("x-")||($==="schema"&&B==="properties"&&p(G),x(G,H,`${S}/${B}/${_t(J)}`,j,N))};if($==="schema"){if(j!==void 0)return;let B=a(b,"xml");ee(B)&&(B.wrapped===!0&&B.attribute===!0&&g(`${S}/xml`,"wrapped and attribute cannot both be true."),(B.wrapped===!0||B.attribute===!0)&&(B.nodeType=B.attribute===!0?"attribute":"element",delete B.wrapped,delete B.attribute)),!N&&b.$ref!==void 0&&x(f(b.$ref,!0),"schema",String(b.$ref),j);let H=b.discriminator;ee(H)&&typeof H.propertyName=="string"&&H.defaultMapping===void 0&&!N&&v(b,H.propertyName)===!1&&g(`${S}/discriminator`,"An optional discriminating property needs an explicit defaultMapping.");for(let W of Xu)U(W,"schema");for(let W of Yu)_(W,"schema");for(let W of Qu)V(W,"schema")}else switch(b.$ref!==void 0&&x(f(b.$ref),$,String(b.$ref),j),$){case"document":{let B=a(b,"paths");if(ee(B))for(let[W,J]of Object.entries(B)){if(!W.startsWith("/"))continue;let G=`${S}/paths/${_t(W)}`;y(W,G),x(J,"pathItem",G)}U("webhooks","pathItem"),_("servers","server");let H=a(b,"components");if(ee(H))for(let[W,J]of Object.entries({schemas:"schema",parameters:"parameter",headers:"header",requestBodies:"body",responses:"response",callbacks:"callback",pathItems:"pathItem"})){let G=a(H,W);if(ee(G))for(let[Nt,lt]of Object.entries(G))x(lt,J,`${S}/components/${W}/${_t(Nt)}`)}break}case"pathItem":for(let B of["get","put","post","delete","options","head","patch","trace"])V(B,"operation");_("parameters","parameter"),_("servers","server");break;case"operation":if(Array.isArray(b.tags))for(let B of b.tags)typeof B=="string"&&s.add(B);_("parameters","parameter"),_("servers","server"),V("requestBody","body"),U("responses","response"),U("callbacks","callback");break;case"callback":for(let[B,H]of Object.entries(b))!B.startsWith("x-")&&B!=="$ref"&&x(H,"pathItem",`${S}/${_t(B)}`,j,N);break;case"parameter":(b.in==="path"||b.in==="cookie")&&delete b.allowReserved,V("schema","schema"),U("content","media");break;case"header":V("schema","schema"),U("content","media");break;case"response":U("headers","header"),U("content","media");break;case"body":U("content","media");break;case"media":/\/(?:[^;]+\+)?xml(?:\s*;|$)/i.test(S.slice(S.lastIndexOf("/")+1).replace(/~1/g,"/"))&&d.push({schema:b.schema,path:`${S}/schema`,dialect:j}),V("schema","schema"),U("encoding","encoding");break;case"encoding":U("headers","header");break;case"server":y(b.url,`${S}/url`)}};x(e,"document","#");for(let{schema:b,path:$,dialect:S}of d)A(b,$,{inferredName:!1,propertyName:!1,dialect:S});if(n.length>0&&t==="throw")throw new zo(n);return s},th=(e,t)=>{let r=e["x-tagGroups"];if(!Array.isArray(r)||r.length===0||e.tags!==void 0&&!Array.isArray(e.tags))return;let a=e.tags??[];if(!a.every(l=>ee(l)&&typeof l.name=="string"))return;let s=new Map(a.map(l=>[l.name,l])),n=new Set,i=new Set;for(let l of r){if(!ee(l)||typeof l.name!="string"||!l.name||!Array.isArray(l.tags)||!l.tags.every(c=>typeof c=="string")||Object.keys(l).some(c=>c!=="name"&&c!=="tags")||n.has(l.name)||s.has(l.name)||t.has(l.name))return;n.add(l.name);for(let c of l.tags){if(i.has(c)||s.get(c)?.parent!==void 0)return;i.add(c)}}if([...n].some(l=>i.has(l))||s.size!==a.length)return;let o=[];for(let l of r){o.push({name:l.name,kind:"nav"});for(let c of l.tags)o.push({...s.get(c)??{name:c},parent:l.name})}e.tags=[...o,...a.filter(l=>!i.has(l.name))]},rh=e=>{if(!ee(e)||typeof e.openapi!="string")return!1;if(/^3\.1\.\d+$/.test(e.openapi))return!0;if(/^3\.1(?:\D|$)/.test(e.openapi))throw Error(`Cannot upgrade to OpenAPI 3.2: invalid OpenAPI version "${e.openapi}". Expected 3.1.x with a numeric patch version.`);return!1},ah=(e,t="throw")=>(rh(e)&&(th(e,eh(e,t)),e.openapi="3.2.0"),e);function Po(e,t,r){if(t==="3.2"){let s=To(ko(Bo(e)));try{let n=ah(s,r?.onIncompatible==="ignore"?"ignore":"throw");return r?.onIncompatible==="collect"?{document:n,diagnostics:[]}:n}catch(n){if(r?.onIncompatible!=="collect"||!(n instanceof zo))throw n;return{document:Po(Bo(e),"3.1"),diagnostics:n.errors}}}let a=ko(e);return t==="3.0"?a:To(a)}function sh(e){if(!e)return{specification:null,version:void 0};let t=Po(Ro(e)?at(e).specification:na(e),"3.1"),{version:r}=Oo(t);return{specification:t,version:r==="3.1"||r==="3.2"?r:void 0}}var nh=(e,t)=>Mo(e,t),Mo=async(e,t,r,a=new Map)=>{let s=[];if(t?.filesystem?.find(f=>f.filename===e))return{specification:at(t.filesystem)?.specification,filesystem:t.filesystem,errors:s};let n=t?.plugins?.find(f=>f.check(e)),i=typeof e=="string"?e:t?.filename,o=i===void 0?void 0:a.get(i),l=o?.content??na(e);if(n&&!o)try{l=na(await n.get(e))}catch{if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return s.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:s}}if(l===void 0){if(t?.throwOnError)throw Error("No content to load");return s.push({code:"NO_CONTENT",message:me.NO_CONTENT}),{specification:null,filesystem:[],errors:s}}let c=_s(l,{filename:t?.filename??null}),d=t?.filename?c.find(f=>f.filename===t?.filename):at(c),p=o?.targets??new Set,h=(r??[{fragment:"",context:"document"}]).filter(f=>{let y=JSON.stringify(f);return!p.has(y)&&(p.add(y),!0)});i!==void 0&&a.set(i,{content:l,targets:p});let u=qo(d.specification,h),g=[...new Set(u.map(({filename:f})=>f))];if(d.references=g,g.length===0)return{specification:at(c)?.specification,filesystem:c,errors:s};for(let f of g){let y=t?.plugins?.find(x=>x.check(f));if(!y)continue;let{filesystem:v,errors:A}=await Mo(y.check(f)&&y.resolvePath?y.resolvePath(e,f):f,{...t,filename:f},u.filter(({filename:x})=>x===f).map(({fragment:x,context:b})=>({fragment:x,context:b})),a);s.push(...A);for(let x of v){let b=c.find($=>$.filename===x.filename);b?b.references=[...new Set([...b.references,...x.references])]:c.push({...x,isEntrypoint:!1})}}return{specification:at(c)?.specification,filesystem:c,errors:s}};function st(e){return String(e||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[_\s/\\.]+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function ih(e,t=40){if(!e||e.length<=t)return e;let r=e.slice(0,t),a=r.lastIndexOf("-");return a>8?r.slice(0,a):r}function Uo(e,t){let r=(e||"get").toLowerCase(),a=(t||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"");return a?`${r}-${a}`:r}function oh(e={}){if(typeof e.operationId=="string"){let t=e.operationId.trim();if(t.length>0&&t.length<=45&&!/^(endpoint|operation|method|api)[-_]?\d+$/i.test(t)&&st(t))return"operationId"}return typeof e.summary=="string"&&st(e.summary.trim().slice(0,100))?"summary":"path"}var Ho=class{constructor(){this.slugger=new Ze,this.used=new Set,this.opMap=new Map}reset(){this.slugger.reset(),this.used.clear(),this.opMap.clear()}slugOp(e={}){let t=oh(e);return t==="operationId"?st(e.operationId.trim()):t==="summary"?ih(st(e.summary.trim().slice(0,100)),40):Uo(e.method,e.path)}slug(e={},t=""){let r=t?`${t}:${(e.method||"get").toLowerCase()} ${e.path||""}`:`${(e.method||"get").toLowerCase()} ${e.path||""}`;if(this.opMap.has(r))return this.opMap.get(r);let a=t&&t!=="general"?`${t}--`:"",s=this.slugOp(e),n=`${a}${s}`;if(this.used.has(n)){let o=`${a}${(e.method||"get").toLowerCase()}-${s}`;this.used.has(o)||(n=o)}let i=this.slugger.slug(n);return this.used.add(i),r&&this.opMap.set(r,i),i}slugTag(e){return`tag--${st(e)}`}slugTagGroup(e){return`tag-group--${st(e)}`}};function lh(e){return String(e||"").replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase()).replace(/^[a-z]/,t=>t.toUpperCase())}function Wo(e){if(typeof e!="string")return!1;let t=e.trim();return!(t.startsWith("{")||t.startsWith("[")||t.includes(`
|
|
274
|
+
`))}function Rs(){return typeof window<"u"&&window.location?.href?window.location.href:"http://localhost/"}function ch(e){let t=new URL(e||Rs(),Rs());return{check(r){return typeof r!="string"||r.startsWith("#")?!1:Wo(r)},resolvePath(r,a){if(typeof a=="string"&&(a.startsWith("http://")||a.startsWith("https://")))return a;let s=typeof r=="string"&&(r.startsWith("http://")||r.startsWith("https://"))?new URL(r):t;return new URL(a,s).href},async get(r){let a=r.startsWith("http://")||r.startsWith("https://")?r:new URL(r,t).href,s=await fetch(a);if(!s.ok){let i=Error(`Failed to load ${a} (${s.status})`);throw i.status=s.status,i.statusCode=s.status,i.response=s,i.url=a,i}let n=await s.text();try{return JSON.parse(n)}catch{try{return Ds(n,{maxAliasCount:-1,merge:!0})}catch{return n}}}}}function Ko(e){let t=new WeakMap,r=new WeakSet;function a(s,n=new Set,i=null){if(!s||typeof s!="object")return s;let o=s["x-ref"];if(o&&n.has(o))return{$ref:o};if(r.has(s))return{$ref:o||i||"#/components/schemas/Circular"};if(t.has(s))return t.get(s);r.add(s);let l=n;o&&(l=new Set(n),l.add(o));let c;if(Array.isArray(s)){c=[],t.set(s,c);for(let d=0;d<s.length;d++)c.push(a(s[d],l,o||i))}else{c={},t.set(s,c);for(let d of Object.keys(s))d!=="x-ref"&&(c[d]=a(s[d],l,o||i))}return r.delete(s),c}return a(e)}async function Vo(e,t=!1,r=!1,a=!1,s="none",n="",i="",o="",l="",c="",d="",p="",h=!1){let u;try{this?.requestUpdate?.();let g=e,f;if(typeof e=="string"&&Wo(e))try{f=new URL(e.trim(),Rs()).href,g=f}catch{f=e}else if(typeof e=="string")try{g=JSON.parse(e)}catch{try{g=Ds(e,{maxAliasCount:-1,merge:!0})}catch{g=e}}let y=ch(f),v=await nh(g,{plugins:[y]});if(v.errors&&v.errors.length>0&&!v.specification){let b=v.errors[0],$=Error(b.message||"Error loading specification");throw $.status=404,$}let A={onDereference:({schema:b,ref:$})=>{b["x-ref"]=$}},x;if(x=v.specification?.swagger&&String(v.specification.swagger).startsWith("2")?Ko((await Lo(sh(v.filesystem).specification,A)).schema):Ko((await Lo(v.filesystem,A)).schema),await Ir(0),x&&(x.components||x.info||x.servers||x.tags||x.paths))u=dh(x,c,d,p),this?.dispatchEvent?.(new CustomEvent("before-render",{detail:{spec:u}}));else return{specLoadError:!0,isSpecLoading:!1,info:{title:"Invalid Spec Definition",description:"Invalid Spec Definition",version:""},tags:[],tagGroups:[]}}catch(g){let f;return f=g.statusCode===404||g.status===404?g.response?.url||g.url?`${g.response?.url||g.url} \u2503 Not Found (${g.response?.status||g.status})`:"Spec Not Found \u2503 404":`Unable to load ${g.response?.url||g.url||(typeof e=="string"?e:"")} \u2503 ${g.response?.status||g.status||g.message}`,{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:f,version:""},tags:[],tagGroups:[]}}try{let g=!!(u?.["x-tagGroups"]&&u["x-tagGroups"].length>0||u?.["x-tag-groups"]&&u["x-tag-groups"].length>0),f=uh(u,s,t,r,g,h),y=hh(u,f),v=ph(u,a),A=u.info?.description?Is(u.info.description):[],x=[];if(u.components?.securitySchemes){let $=new Set;Object.entries(u.components.securitySchemes).forEach(S=>{if(!$.has(S[0])){$.add(S[0]);let E={securitySchemeId:S[0],...S[1]};E.in="header",E.name="Authorization",E.nameId=S[1].name||S[0],E.user="",E.password="",E.clientId="",E.clientSecret="",E.value="",E.finalKeyValue="",S[1].type==="apiKey"&&(E.in=S[1].in||"header",E.name=S[1].name||"Authorization"),x.push(E)}})}n&&i&&o&&x.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:n,nameId:n,in:i,value:o,finalKeyValue:o}),x.forEach($=>{$.typeDisplay=$.type==="http"?$.scheme==="basic"?"HTTP Basic":`HTTP Bearer ${$.nameId}`:$.type==="apiKey"?`API Key (${$.name})`:$.type==="oauth2"?`OAuth (${$.securitySchemeId})`:$.type||"None"});let b=[];return u.servers&&Array.isArray(u.servers)&&u.servers.length>0?(u.servers.forEach($=>{let S=String($.url??"").trim();S.startsWith("http")||S.startsWith("//")||S.startsWith("{")||typeof window<"u"&&window.location?.origin?.startsWith("http")&&($.url=window.location.origin+$.url,S=$.url),$.variables&&Object.entries($.variables).forEach(E=>{let D=RegExp(`{${E[0]}}`,"g");S=S.replace(D,E[1].default||""),E[1].value=E[1].default||""}),$.computedUrl=S}),l&&u.servers.push({url:l,computedUrl:l})):l?u.servers=[{url:l,computedUrl:l}]:typeof window<"u"&&window.location?.origin?.startsWith("http")?u.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:u.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],b=u.servers,{specLoadError:!1,isSpecLoading:!1,info:u.info,infoDescriptionHeaders:A,tags:f,tagGroups:y,components:v,externalDocs:u.externalDocs,securitySchemes:x,servers:b}}catch(g){return{specLoadError:!0,isSpecLoading:!1,info:{title:"Error processing the spec",description:`Unable to process the spec \u2503 ${g?.message||g}`,version:""},tags:[],tagGroups:[]}}}function dh(e,t="",r="",a=""){let s={},n=a.split(",").map(l=>l.trim().toLowerCase()).filter(Boolean);function i(l,c){if(!t)return!0;let d=`${c} ${l}`.toLowerCase();return r==="regex"?new RegExp(t,"i").test(d):d.includes(t.toLowerCase())}function o(l){return l.some(c=>n.includes(c?.label.toLowerCase()))}return Object.entries(e.paths).forEach(([l,c])=>{let d={};Object.entries(c).forEach(([p,h])=>{if(p==="additionalOperations"&&typeof h=="object"&&h){let g={};Object.entries(h).forEach(([f,y])=>{let v=y?.["x-badges"];i(l,f)&&(v&&Array.isArray(v)&&o(v)||(g[f]=y))}),Object.keys(g).length>0&&(d.additionalOperations=g);return}if(["parameters","servers","summary","description"].includes(p)){d[p]=h;return}let u=h?.["x-badges"];i(l,p)&&(u&&Array.isArray(u)&&o(u)||(d[p]=h))}),Object.keys(d).length>0&&(s[l]=d)}),e.paths=s,e}function Is(e){return T.lexer(e).filter(t=>t.type==="heading"&&t.depth<=2)||[]}function ph(e,t=!1){if(!e.components)return[];let r=[];for(let a in e.components){let s=[];for(let l in e.components[a]){let c={show:!0,id:`${a.toLowerCase()}-${l.toLowerCase()}`.replace(ap,"-"),name:l,component:e.components[a][l]};s.push(c)}let n=a,i=a;switch(a){case"schemas":t&&s.sort((l,c)=>l.name.localeCompare(c.name)),i="Schemas",n="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":i="Responses",n="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":i="Parameters",n="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":i="Examples",n="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":i="Request Bodies",n="Describes common request bodies that are used across the API operations.";break;case"headers":i="Headers",n='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":i="Security Schemes",n="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":i="Links",n="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":i="Callbacks",n="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:i=a,n=a}let o={show:!0,name:i,description:n,subComponents:s};r.push(o)}return r||[]}function Ls(e){if(!e)return!0;let t=e["x-tag-expanded"]??e["x-tagExpanded"]??e["x-expanded"]??e.expanded;return t!==!1&&t!=="false"}function uh(e,t="none",r=!1,a=!1,s=!1,n=!1){let i=["get","put","post","delete","patch","head","options","trace","query"],o=new Ho,l=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map(h=>({show:!0,elementId:o.slugTag(h.name),name:h.name,displayName:h["x-displayName"]||h.name,description:h.description||"",headers:h.description?Is(h.description):[],paths:[],expanded:Ls(h),xInternal:h["x-internal"]??void 0,xHidden:h["x-hidden"]??void 0})):[],c=[...Object.entries(e.paths||{}).map(([h,u])=>[h,u,!1]),...Object.entries(e.webhooks||{}).map(([h,u])=>[h,u,!0])];for(let[h,u,g]of c){let f=u.parameters,y={servers:u.servers||[],parameters:u.parameters||[]},v=[];i.forEach(A=>{u[A]&&v.push({methodName:A,pathOrHookObj:u[A]})}),u.additionalOperations&&typeof u.additionalOperations=="object"&&Object.entries(u.additionalOperations).forEach(([A,x])=>{x&&typeof x=="object"&&v.push({methodName:A.toLowerCase(),pathOrHookObj:x})}),v.forEach(({methodName:A,pathOrHookObj:x})=>{let b=x.tags||[];if(b.length===0)if(r){let $=h.replace(/^\/+|\/+$/g,""),S=$.indexOf("/");S===-1?b.push($):b.push($.substring(0,S))}else b.push("General");b.forEach($=>{let S,E;e.tags&&(E=e.tags.find(_=>_.name?.toLowerCase()===$.toLowerCase())),S=l.find(_=>_.name===$),S||(S={show:!0,elementId:o.slugTag($),name:$,displayName:E?.["x-displayName"]||E?.name||$,description:E?.description||"",headers:E?.description?Is(E.description):[],paths:[],expanded:Ls(E),xInternal:E?.["x-internal"]??void 0,xHidden:E?.["x-hidden"]??void 0},l.push(S));let D=(x.summary||x.description||`${A.toUpperCase()} ${h}`).trim();D.length>100&&([D]=D.split(/[.|!|?]\s|[\r?\n]/));let j=[];if(j=f?x.parameters?f.filter(_=>{if(!x.parameters.some(U=>_.name===U.name&&_.in===U.in))return _}).concat(x.parameters):f.slice(0):x.parameters?x.parameters.slice(0):[],x.callbacks)for(let[_,U]of Object.entries(x.callbacks)){let B=Object.entries(U).filter(H=>typeof H[1]=="object")||[];x.callbacks[_]=Object.fromEntries(B)}let N=`${A}${lh((h||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,""))}`,F=x.operationId||N,z=s?st($):"",V=o.slug({method:A,path:h,operationId:x.operationId,summary:x.summary||x.description},z);S.paths.push({show:!0,expanded:!1,isWebhook:g,expandedAtLeastOnce:!1,summary:x.summary||"",description:x.description||"",externalDocs:x.externalDocs,shortSummary:D,method:A,path:h,operationId:F,elementId:V,servers:x.servers?y.servers.concat(x.servers):y.servers,parameters:j,requestBody:x.requestBody,responses:x.responses,callbacks:x.callbacks,deprecated:x.deprecated,security:x.security??e.security,xBadges:x["x-badges"]||void 0,xCodeSamples:x["x-codeSamples"]||x["x-code-samples"]||"",rawOperation:x,xInternal:x["x-internal"]??u?.["x-internal"]??void 0,xHidden:x["x-hidden"]??u?.["x-hidden"]??void 0})})})}let d=new Set((e["x-tagGroups"]||e["x-tag-groups"]||[]).flatMap(h=>Array.isArray(h?.tags)?h.tags:[]).filter(h=>typeof h=="string").map(h=>h.toLowerCase())),p=l.filter(h=>h.paths&&h.paths.length>0?!0:h.description&&(n||d.has(h.name?.toLowerCase()))?(h.descriptionOnly=!0,!0):!1);return p.forEach(h=>{t!=="none"&&(t==="method"?h.paths.sort((u,g)=>{let f=i.indexOf(u.method),y=i.indexOf(g.method);return f!==-1&&y!==-1?f-y:f===-1?y===-1?u.method.localeCompare(g.method):1:-1}):t==="summary"?h.paths.sort((u,g)=>u.shortSummary.localeCompare(g.shortSummary)):t==="path"&&h.paths.sort((u,g)=>u.path.localeCompare(g.path))),h.firstPathId=h.paths[0]?.elementId||""}),a?p.sort((h,u)=>h.name.localeCompare(u.name)):p}function hh(e,t=[]){let r=e?.["x-tagGroups"]||e?.["x-tag-groups"]||e?.["x-taggroups"];if(!r||!Array.isArray(r)||r.length===0)return[];let a=new Ho,s=new Set,n=[];return r.forEach(i=>{if(!i||!i.name)return;let o=Array.isArray(i.tags)?i.tags:[],l=[];o.forEach(c=>{if(typeof c!="string")return;let d=t.find(p=>p.name===c||p.name.toLowerCase()===c.toLowerCase());d&&!l.includes(d)&&(l.push(d),s.add(d.name))}),l.length>0&&n.push({name:i.name,displayName:i["x-displayName"]||i.displayName||i.name,description:i.description||"",elementId:a.slugTagGroup(i.name),tags:l,expanded:Ls(i),xInternal:i["x-internal"]??void 0,xHidden:i["x-hidden"]??void 0})}),n}function mh(e){if(!e||typeof e!="string")return"";try{let t=e.trim();t.startsWith("^")&&(t=t.slice(1)),t.endsWith("$")&&!t.endsWith("\\$")&&(t=t.slice(0,-1)),t=t.replace(/\((?:\?:)?([^()|]+)(?:\|[^()]+)*\)/g,"$1");let r=/(\[[^\]]+\]|\\[dwsDWS]|\\[^]|\.|[^\\[\]{}()+*?|])(?:\{(\d+)(?:,\d*)?\}|([+*?]))?/g,a="",s;for(;(s=r.exec(t))!==null;){let n=s[1],i=s[2],o=s[3],l=1;i===void 0?o==="+"?l=1:(o==="*"||o==="?")&&(l=0):l=parseInt(i,10),l=Math.min(Math.max(0,l),50);let c="a";if(n==="\\d")c="0";else if(n==="\\D")c="a";else if(n==="\\w")c="a";else if(n==="\\W")c="_";else if(n==="\\s")c=" ";else if(n==="\\S")c="a";else if(n===".")c="a";else if(n.startsWith("\\"))c=n.slice(1);else if(n.startsWith("[")){let d=n.slice(1,-1);d.startsWith("^")?c=d.includes("a")?"0":"a":/[1-9]/.test(d)&&!d.includes("0")?c="1":/[0-9]/.test(d)&&!/[a-zA-Z]/.test(d)||/[0-9]/.test(d)&&/[a-fA-F]/.test(d)&&!/[g-zG-Z]/.test(d)?c="0":/[A-Z]/.test(d)&&!/[a-z]/.test(d)?c="A":/[a-z]/.test(d)?c="a":d.length>0&&(c=d[0])}else c=n;a+=c.repeat(l)}return a||e}catch{return e}}function ce(e){if(e===void 0)return"";if(e===null)return"null";if(e==="")return"\u2205";if(typeof e=="boolean"||typeof e=="number")return`${e}`;if(Array.isArray(e))return e.map(t=>t===null?"null":t===""?"\u2205":t.toString().replace(/^ +| +$/g,r=>"\u25CF".repeat(r.length))||"").join(", ");if(typeof e=="object"){let t=Object.keys(e);return`{ ${t[0]}:${e[t[0]]}${t.length>1?",":""} ... }`}return e.toString().replace(/^ +| +$/g,t=>"\u25CF".repeat(t.length))||""}function Zo(e){return e?e.format==="binary"||e.contentEncoding==="binary"||!!e.contentMediaType&&e.contentEncoding!=="base64":!1}var fh=new Set(["title","description","example","examples","default","deprecated","readOnly","writeOnly","externalDocs"]);function gh(e){return Object.keys(e).every(t=>fh.has(t)||t.startsWith("x-"))}function ia(e){if(!e)return;let t="",r="";if(e.$ref){let i=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(i+1)}} `}else if(e.type)t=Array.isArray(e.type)?e.type.join("\u2503"):e.type,(e.format||e.enum||e.const!==void 0)&&(t=t.replace("string",e.enum?"enum":e.const===void 0?e.format:"const")),e.nullable&&(t+="\u2503null");else if(e.const!==void 0)t="const";else if(e.anyOf||e.oneOf){let i=(e.anyOf||e.oneOf).filter(Boolean),o=[];i.forEach(l=>{let c=ia(l);c?.type&&c.type!=="{missing-type-info}"&&c.type.split("\u2503").forEach(d=>{let p=d.trim();p&&!o.includes(p)&&o.push(p)})}),t=o.length>0?o.join("\u2503"):"{missing-type-info}"}else t=gh(e)?"any":"{missing-type-info}";let a=e.anyOf||e.oneOf?{...(e.anyOf||e.oneOf).find(i=>i&&i.type&&i.type!=="null")||(e.anyOf||e.oneOf)[0],...e}:e,s={type:t,format:e.format||a.format||"",contentMediaType:e.contentMediaType||a.contentMediaType||"",contentEncoding:e.contentEncoding||a.contentEncoding||"",contentSchema:e.contentSchema||a.contentSchema||null,pattern:(e.pattern||a.pattern)&&!e.enum&&!a.enum?e.pattern||a.pattern:"",readOrWriteOnly:e.readOnly?"\u{1F181}":e.writeOnly?"\u{1F186}":a.readOnly?"\u{1F181}":a.writeOnly?"\u{1F186}":"",deprecated:e.deprecated||a.deprecated?"\u274C":"",examples:e.examples||e.example||a.examples||a.example,default:ce(e.default===void 0?a.default:e.default),description:e.description||a.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if((s.type==="{missing-type-info}"||s.type==="any")&&(s.description=s.description||""),s.allowedValues=e.const===void 0?Array.isArray(e.enum)?e.enum.map(i=>ce(i)).join("\u2503"):a.const===void 0?Array.isArray(a.enum)?a.enum.map(i=>ce(i)).join("\u2503"):"":ce(a.const):ce(e.const),!s.allowedValues&&(e.anyOf||e.oneOf)){let i=[];(e.anyOf||e.oneOf).forEach(o=>{let l=o.const===void 0?Array.isArray(o.enum)?o.enum.map(c=>ce(c)).join("\u2503"):"":ce(o.const);l&&!i.includes(l)&&i.push(l)}),i.length>0&&(s.allowedValues=i.join("\u2503"))}let n=e.items||a.items;if((t==="array"||t.split("\u2503").includes("array"))&&n){let i=n.format||n.contentMediaType||(Array.isArray(n?.type)?n.type.join("\u2503"):n?.type)||"",o=ce(n.default);s.arrayType=i?`array of ${i}`:`${e.type||"array"}`,s.default||=o,s.allowedValues||=n.const===void 0?Array.isArray(n?.enum)?n.enum.map(l=>ce(l)).join("\u2503"):"":ce(n.const)}if(t.match(/integer|number/g)){let i=e.minimum===void 0?a.minimum:e.minimum,o=e.exclusiveMinimum===void 0?a.exclusiveMinimum:e.exclusiveMinimum;(i!==void 0||o!==void 0)&&(r+=i===void 0?`More than ${o}`:`Min ${i}`);let l=e.maximum===void 0?a.maximum:e.maximum,c=e.exclusiveMaximum===void 0?a.exclusiveMaximum:e.exclusiveMaximum;(l!==void 0||c!==void 0)&&(r+=l===void 0?`${r?"\u2503":""}Less than ${c}`:`${r?"\u2503":""}Max ${l}`);let d=e.multipleOf===void 0?a.multipleOf:e.multipleOf;d!==void 0&&(r+=`${r?"\u2503":""} multiple of ${d}`)}if([].concat(a.type||[]).includes("string")||t.match(/string/g)){let i=e.minLength===void 0?a.minLength:e.minLength,o=e.maxLength===void 0?a.maxLength:e.maxLength;i!==void 0&&o!==void 0?r+=`${r?"\u2503":""}${i} to ${o} chars`:i===void 0?o!==void 0&&(r+=`${r?"\u2503":""}Max ${o} chars`):r+=`${r?"\u2503":""}Min ${i} chars`}return s.constrain=r,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function xe(e){if(typeof e=="object"&&e&&!Array.isArray(e)){if(e.value!==void 0)return{Example:{...e}};let t=Object.entries(e).filter(([r,a])=>a?.value!==void 0);return t.length===0?void 0:Object.fromEntries(t)}return Array.isArray(e)?e.reduce((t,r,a)=>(t[`Example${a+1}`]={value:r},t),{}):e?{Example:{value:e}}:void 0}function Jo(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){let r=Object.values(e).filter(a=>a["x-example-show-value"]!==!1).map(a=>({value:typeof a.value=="boolean"||typeof a.value=="number"?`${a.value}`:a.value||"",printableValue:ce(a.value),summary:a.summary||"",description:a.description||""}));return{exampleVal:r.length>0?r[0].value:"",exampleList:r}}if(Array.isArray(e)||(e=e?[e]:[]),e.length===0)return{exampleVal:"",exampleList:[]};if(t==="array"){let[r]=e;return{exampleVal:r,exampleList:e.map(a=>({value:a,printableValue:ce(a)}))}}return{exampleVal:e[0].toString(),exampleList:e.map(r=>({value:r.toString(),printableValue:ce(r)}))}}function Go(e){return e.some(t=>t.summary?.length>0||t.description?.length>0)}function Te(e){let t;return e&&(t=e.examples&&e.examples.length>=1?e.examples[0]:e.example),t}function oa(e){let t=Te(e);if(t==="")return"";if(t===null)return null;if(t===0)return 0;if(t===!1)return!1;if(t instanceof Date)switch(e.format.toLowerCase()){case"date":return t.toISOString().split("T")[0];case"time":return t.toISOString().split("T")[1];default:return t.toISOString()}if(t)return t;if(Object.keys(e).length===0)return null;if(e.$ref)return{};if(e.const===!1||e.const===0||e.const===null||e.const===""||e.const)return e.const;if(e.default)return e.default;let r=Array.isArray(e.type)?e.type[0]:e.type;if(!r)return null;if(r.match(/^integer|^number/g)){let a=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),s=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),n=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?s||0:Number(e.exclusiveMinimum)+(r.startsWith("integer")?1:.001):Number(e.minimum);return a?a>=n?a:n%a===0?n:Math.ceil(n/a)*a:n}if(r.match(/^boolean/g))return!1;if(r.match(/^null/g))return null;if(r.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return mh(e.pattern)}catch{return e.pattern}if(e.contentEncoding)switch(e.contentEncoding.toLowerCase()){case"base64":return"ZXhhbXBsZQ==";case"binary":case"7bit":case"8bit":case"quoted-printable":return"string"}if(e.contentMediaType){if(e.contentMediaType.toLowerCase()==="application/json"){if(e.contentSchema){let a=de(e.contentSchema),s=a?.["example-0"]??a;return JSON.stringify(s)}return"{}"}if(e.contentMediaType.startsWith("text/"))return"text content"}if(e.format)switch(e.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"byte":case"base64":return"ZXhhbXBsZQ==";case"binary":return"binary";default:return""}else{let a=Number.isNaN(e.minLength)?void 0:Number(e.minLength),s=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),n=a||(s>6?6:s||void 0);return n?"A".repeat(n):"string"}}return null}function Bs(e,t=1){if(e==null)return"";let r=" ".repeat(t),a="";if(typeof e!="object")return`
|
|
275
|
+
${r}${e.toString()}`;for(let s in e){if(s.startsWith("::"))continue;let n=e[s],i=s;Array.isArray(n)?i=n["::XML_TAG"]||n[0]?.["::XML_TAG"]||s:n&&typeof n=="object"?i=n["::XML_TAG"]||s:Array.isArray(e)&&e["::XML_TAG"]&&(i=e["::XML_TAG"]),a=n==null?`${a}
|
|
276
|
+
${r}<${i}></${i}>`:Array.isArray(n)||typeof n=="object"?`${a}
|
|
277
|
+
${r}<${i}>${Bs(n,t+1)}
|
|
278
|
+
${r}</${i}>`:`${a}
|
|
279
|
+
${r}<${i}>${n.toString()}</${i}>`}return a}function pr(e,t){typeof t=="object"&&t&&(e.title&&(t["::TITLE"]=e.title),e.description&&(t["::DESCRIPTION"]=e.description),e.xml?.name&&(t["::XML_TAG"]=e.xml?.name),e.xml?.wrapped&&(t["::XML_WRAP"]=e.xml?.wrapped.toString()))}function Xo(e){if(typeof e=="object"&&e){delete e["::TITLE"],delete e["::DESCRIPTION"],delete e["::XML_TAG"],delete e["::XML_WRAP"];for(let t in e)Xo(e[t])}}function la(e,t,r){if(!e||typeof e!="object")return e;let a=r&&typeof r=="object"&&"example-0"in r?r["example-0"]:r&&typeof r=="object"&&Object.keys(r).length>0&&!Array.isArray(r)?Object.values(r)[0]:r;for(let s in e)e[s]&&typeof e[s]=="object"&&(e[s][t]=a);return e}function de(e,t={},r=0){let a={};if(!(!e||r>8)){if(e.allOf){let s={};if(e.allOf.length===1&&!e.allOf[0]?.properties&&!e.allOf[0]?.items){if(e.allOf[0].$ref)return{"example-0":{}};if(e.allOf[0].readOnly&&t.includeReadOnly){let n=e.allOf[0];return{"example-0":oa(n)}}return}e.allOf.forEach(n=>{if(n){if(n.type==="object"||n.properties||n.allOf||n.anyOf||n.oneOf){let i=de(n,t,r+1),o=i?.["example-0"]??i;o&&typeof o=="object"&&!Array.isArray(o)&&Object.assign(s,o)}else if(n.type==="array"||n.items){let i=de(n,t,r+1),o=i?.["example-0"]??i;Array.isArray(o)&&(s[Object.keys(s).length]=o)}else if(n.type){let i=`prop${Object.keys(s).length}`;s[i]=oa(n)}}}),a={"example-0":s},pr(e,a["example-0"])}else if(e.oneOf){let s={};if(e.properties)for(let n in e.properties){let i=e.properties[n];if(i?.properties||i?.items){let o=de(i,t,r+1);s[n]=o?.["example-0"]??o}else s[n]=oa(i)}if(e.oneOf.length>0){let n=r===0?e.oneOf:[e.oneOf[0]],i=0;for(let o=0;o<n.length;o++){let l=n[o],c=de(l,t,r+1);for(let d in c){let p=c[d];if(Object.keys(s).length>0&&p&&typeof p=="object"&&!Array.isArray(p)&&(p={...s,...p}),a[`example-${i}`]=p,pr(l,a[`example-${i}`]),i++,r>0)break}}}}else if(e.anyOf){let s={"example-0":{}};if(e.type==="object"||e.properties)for(let n in e.properties){let i=e.properties[n];if(i?.deprecated&&!t.includeDeprecated||i?.readOnly&&!t.includeReadOnly||i?.writeOnly&&!t.includeWriteOnly)continue;let o=Te(i);o===void 0?la(s,n,de(i,t,r+1)):s["example-0"][n]=o}if(e.anyOf.length>0){let n=r===0?e.anyOf:[e.anyOf[0]],i=0;for(let o=0;o<n.length;o++){let l=n[o],c=de(l,t,r+1);for(let d in c){let p=c[d];if(s?.["example-0"]&&Object.keys(s["example-0"]).length>0?a[`example-${i}`]={...s["example-0"],...typeof p=="object"?p:{}}:a[`example-${i}`]=p,pr(l,a[`example-${i}`]),i++,r>0)break}}}}else if(e.type==="object"||e.properties){a["example-0"]={},pr(e,a["example-0"]);let s=Te(e);if(s!==void 0)a["example-0"]=s;else{for(let n in e.properties){let i=e.properties[n];if(i&&(!i.deprecated||t.includeDeprecated)&&(!i.readOnly||t.includeReadOnly)&&(!i.writeOnly||t.includeWriteOnly))if(i.type==="array"||i.items){let o=Te(i);if(o!==void 0)a["example-0"][n]=o;else if(Te(i.items)!==void 0)a["example-0"][n]=[Te(i.items)];else{let l=de(i.items,t,r+1),c=l?.["example-0"]??l;if(t.useXmlTagForProp){let d=i.xml?.name||n;i.xml?.wrapped?a["example-0"][d]={[d]:c}:a["example-0"][d]=[c]}else a["example-0"][n]=[c]}}else la(a,n,de(i,t,r+1))}if(typeof e.additionalProperties=="object"&&e.additionalProperties!==null){let n=e.additionalProperties["x-additionalPropertiesName"]||"property";la(a,`${n}1`,de(e.additionalProperties,t,r+1)),la(a,`${n}2`,de(e.additionalProperties,t,r+1))}}}else if(e.type==="array"||e.items){let s=Te(e);if(s!==void 0)a["example-0"]=s;else if(e.items){let n=Te(e.items);if(n!==void 0)a["example-0"]=[n];else{let i=de(e.items,t,r+1),o=i?.["example-0"]??i;a["example-0"]=[o],pr(e.items,a["example-0"])}}else a["example-0"]=[]}else return{"example-0":oa(e)};return a}}function Ns(e,t=0){let r="";e.title?r=e.description?`<b>${e.title}:</b> ${e.description}`:e.title:e.description&&(r=e.description);let a=[];e.minItems&&a.push(`<span class="descr-label">Min Items:</span> <span class="descr-value">${e.minItems}</span>`),e.maxItems&&a.push(`<span class="descr-label">Max Items:</span> <span class="descr-value">${e.maxItems}</span>`),e.uniqueItems===!0&&a.push('<span class="descr-label">Must have unique items</span>');let s=r?[r.trim()]:[];if(a.length>0&&s.push(`<div class="item-details">${a.join(" ")}</div>`),t>0&&e.items?.description){let n="";e.items.minProperties&&(n=`<span class="descr-label">Min Properties:</span> <span class="descr-value">${e.items.minProperties}</span>`),e.items.maxProperties&&(n=`${n} <span class="descr-label">Max Properties:</span> <span class="descr-value">${e.items.maxProperties}</span>`),s.push(`\u2B95 ${n} [ ${e.items.description} ]`)}return s.join(`
|
|
280
|
+
|
|
281
|
+
`)}function zs(e,t,r,a){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,n=[];if(e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=se(e.properties[l],t+1,l,c);d&&n.push(d)}let i=[];if(e.patternProperties)for(let l in e.patternProperties){let c=se(e.patternProperties[l],t+1,`[pattern: ${l}]`,!1);c&&i.push(c)}let o=null;return e.additionalProperties&&typeof e.additionalProperties=="object"&&(o=se(e.additionalProperties,t+1,"[any-key]",!1)),{kind:"object",name:r,title:e.title||"",description:Ns(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"object \u2503 null":"object",properties:n,patternProperties:i,additionalProperties:o}}function Ps(e,t,r,a){let s=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,n=null;e.items&&(n=se(e.items,t+1,"",!1));let i="";return e.items?.items?i=e.items.items.type||"":e.items?.type&&typeof e.items.type=="string"&&(i=e.items.type),{kind:"array",name:r,title:e.title||"",description:Ns(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:s,dataTypeLabel:s?"array \u2503 null":"array",arrayType:i,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems||!1,items:n}}function Ms(e,t,r){let a=ia(e)||{};return{kind:"primitive",name:t,type:a.type||e.type||"",format:a.format||e.format||"",contentMediaType:a.contentMediaType||e.contentMediaType||"",contentEncoding:a.contentEncoding||e.contentEncoding||"",contentSchema:a.contentSchema||e.contentSchema||null,pattern:a.pattern||e.pattern||"",constraints:a.constrain||"",defaultValue:a.default!==void 0&&a.default!==""?String(a.default):"",allowedValues:a.allowedValues||"",description:(e.description||a.description||"").trim(),title:(e.title||"").trim(),required:r,deprecated:e.deprecated||!!a.deprecated,readOnly:e.readOnly||a.readOrWriteOnly==="\u{1F181}",writeOnly:e.writeOnly||a.readOrWriteOnly==="\u{1F186}",html:a.html||""}}var Yo=8,Qo=8e3,el=4;function tl(e){let t=Array.isArray(e.type)?e.type:[e.type];return t.includes("object")||t.includes("array")||!!(e.properties||e.patternProperties||e.items)||!!e.additionalProperties&&typeof e.additionalProperties=="object"||!!e.allOf?.some(r=>r&&tl(r))}var ca=new Set,ur=Yo,da=0;function se(e,t=0,r="",a=!1,s=""){if(!e)return null;if(ca.size>0)return rl(e,t,r,a,s);for(ur=Yo;;--ur){da=0;let n=rl(e,t,r,a,s);if(da<=Qo||ur<=el)return n}}function rl(e,t,r,a,s){if(!e)return null;da+=1;let n=da>Qo&&ur>el;if(ca.has(e)||(t>ur||n)&&tl(e)){let i=e.type==="array"||Array.isArray(e.type)&&e.type.includes("array")||!!e.items;return{kind:i?"array":"object",name:r,type:i?"array":"object",title:e.title||"",description:e.description||"",required:a,truncated:!0}}ca.add(e);try{return yh(e,t,r,a,s)}finally{ca.delete(e)}}function yh(e,t,r,a,s){if(e.allOf){if(e.allOf.length===1&&!e.allOf[0].properties&&!e.allOf[0].items){let f={...e.allOf[0],...e,title:e.title||e.allOf[0].title||"",description:e.description||e.allOf[0].description||""};return delete f.allOf,se(f,t,r,a)}let n=[],i=[],o=null,l=[],c=e.title||"",d=e.description||"",p=e.deprecated||!1,h=e.readOnly||!1,u=e.writeOnly||!1,g=e.nullable||!1;return e.allOf.forEach((f,y)=>{if(f.title&&!c&&(c=f.title),f.description&&!d&&(d=f.description),f.deprecated&&(p=!0),f.readOnly&&(h=!0),f.writeOnly&&(u=!0),f.nullable&&(g=!0),f.type==="object"||f.properties||f.allOf||f.anyOf||f.oneOf){let v=se(f,t,"",!1,(f.anyOf||f.oneOf)&&y>0?`${y}`:"");v&&(v.kind==="object"?(v.properties&&n.push(...v.properties),v.patternProperties&&i.push(...v.patternProperties),v.additionalProperties&&(o=v.additionalProperties)):v.kind==="union"&&l.push(v))}else if(f.type==="array"||f.items){let v=se(f,t);v&&n.push(v)}else if(f.type){let v=`prop${n.length}`;n.push(se(f,t,v,!1))}}),{kind:"object",name:r,title:c,description:Ns({...e,title:c,description:d},t),required:a,deprecated:p,readOnly:h,writeOnly:u,nullable:g,dataTypeLabel:g?"object \u2503 null":"object",properties:n,patternProperties:i,additionalProperties:o,unions:l}}if(e.anyOf||e.oneOf){let n=e.anyOf?"anyOf":"oneOf",i=(e.anyOf||e.oneOf).map((l,c)=>{let d=l.title||"",p=se(l,t,d||`Option ${c+1}`,!1);return p&&(p.readOnly=!1,p.writeOnly=!1,p.optionIndex=c+1,p.optionTitle=d,p.kind==="primitive"&&!d&&(p.name="")),p}).filter(Boolean),o=[];if((e.type==="object"||e.properties)&&e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=se(e.properties[l],t+1,l,c);d&&o.push(d)}return{kind:"union",operator:n,name:r,suffix:s,title:e.title||"",description:e.description||"",required:a,properties:o,options:i}}if(Array.isArray(e.type)){if(e.type.length===2&&e.type.includes("null")){if(e.type.includes("object"))return zs(e,t,r,a);if(e.type.includes("array"))return Ps(e,t,r,a)}let n=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e)),i=[],o=[];if(n.type.forEach(l=>{l.match(/integer|number|string|null|boolean/g)?i.push(l):l==="array"&&typeof n.items?.type=="string"&&n.items?.type.match(/integer|number|string|null|boolean/g)?n.items.type==="string"&&(n.items.format||n.items.contentMediaType)?i.push(`[${n.items.format||n.items.contentMediaType}]`):i.push(`[${n.items.type}]`):o.push(l)}),o.length===0&&i.length>0)return n.type=i.join("\u2503"),Ms(n,r,a);if(o.length>0){let l=[],c=1;if(o.forEach(d=>{if(d==="object"){let p=zs(e,t,e.title||`Option ${c}`,!1);p.optionIndex=c++,p.optionTitle=e.title||"",l.push(p)}else if(d==="array"){let p=Ps(e,t,e.title||`Option ${c}`,!1);p.optionIndex=c++,p.optionTitle=e.title||"",l.push(p)}}),i.length>0){n.type=i.join("\u2503");let d=Ms(n,`Option ${c}`,!1);d.optionIndex=c++,l.push(d)}return{kind:"union",operator:"oneOf",name:r,title:e.title||"",description:e.description||"",required:a,options:l}}}return e.type==="object"||e.properties?zs(e,t,r,a):e.type==="array"||e.items?Ps(e,t,r,a):Ms(e,r,a)}function Us(e,t="",r="json"){let a=e,s="text";if(t?.toLowerCase().includes("json"))if(r==="text")a=typeof e=="string"?e:JSON.stringify(e,void 0,2),s="text";else if(typeof e=="object"&&e)a=e,s="json";else if(typeof e=="string")try{a=JSON.parse(e),s="json"}catch{a=e,s="text"}else a=e,s="json";else a=typeof e=="object"&&e?JSON.stringify(e,void 0,2):String(e??""),s="text";return{content:a,format:s}}function qt(e,t="",r=null,a=null,s=!0,n=!0,i="json",o=!1){let l=[],c=t?.toLowerCase().includes("json"),d=t?.toLowerCase().includes("xml");if(r&&typeof r=="object"&&Object.keys(r).length>0)for(let p in r){let{content:h,format:u}=Us(r[p]?.value===void 0?r[p]:r[p].value,t,i);l.push({exampleId:p,exampleSummary:r[p]?.summary||p,exampleDescription:r[p]?.description||"",exampleType:t,exampleValue:h,exampleFormat:u})}else if(a!=null&&(typeof a!="object"||Object.keys(a).length>0)){let{content:p,format:h}=Us(a?.value===void 0?a:a.value,t,i);l.push({exampleId:"Example",exampleSummary:a?.summary||"",exampleDescription:a?.description||"",exampleType:t,exampleValue:p,exampleFormat:h})}if(l.length===0||o===!0)if(e){let p=Te(e);if(p!=null){let{content:h,format:u}=Us(p,t,i);l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:h,exampleFormat:u})}else if(c||d||t?.toLowerCase().includes("text")||t?.toLowerCase().includes("yaml")||t?.toLowerCase().includes("*/*")){let h="",u="",g=i;d&&(h=e.xml?.name?`<${e.xml.name}${e.xml.namespace?` xmlns="${e.xml.namespace}"`:""}>`:"<root>",u=e.xml?.name?`</${e.xml.name}>`:"</root>",g="text");let f=de(e,{includeReadOnly:s,includeWriteOnly:n,deprecated:!0,useXmlTagForProp:d}),y=0;for(let v in f){if(!f[v])continue;let A=f[v]["::TITLE"]||`Example ${++y}`,x=f[v]["::DESCRIPTION"]||"",b="";d?b=`<?xml version="1.0" encoding="UTF-8"?>
|
|
282
|
+
${h}${Bs(f[v],1)}
|
|
283
|
+
${u}`:(Xo(f[v]),b=i==="text"?JSON.stringify(f[v],null,2):f[v]),l.push({exampleId:v,exampleSummary:A,exampleDescription:x,exampleType:t,exampleFormat:g,exampleValue:b})}}else t?.toLowerCase().includes("jose")?l.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:t,exampleValue:e.pattern||"bXJpbg==",exampleFormat:"text"}):l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"})}else l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"});return l}function bh(e){return e==="application/json"?"json":e==="application/xml"?"xml":null}function Rt(e){return e?.exampleSummary||e?.exampleId||""}function vh(e){if(e.schema)return[e.schema,null,null];if(e.content){for(let t of Object.keys(e.content))if(e.content[t].schema)return[e.content[t].schema,bh(t),e.content[t]]}return[null,null,null]}var Hs=Object.freeze([]);function al(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return{};t.add(e);let r={...e.properties};return Array.isArray(e.allOf)&&e.allOf.forEach(a=>{Object.assign(r,al(a,t))}),r}function sl(e,t=new Set){if(!e||typeof e!="object"||t.has(e))return[];t.add(e);let r=Array.isArray(e.required)?[...e.required]:[];return Array.isArray(e.allOf)&&e.allOf.forEach(a=>{r.push(...sl(a,t))}),[...new Set(r)]}var Ws={200:"OK",201:"Created",202:"Accepted",204:"No Content",301:"Moved Permanently",302:"Found",304:"Not Modified",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",409:"Conflict",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},It=null,Lt=null,hr=null,pa=null,Oe=new Map,Ks=Symbol("rapidoc-mock");function nl(e){if(e&&typeof e=="object"){let r={};for(let[a,s]of Object.entries(e)){let n=a.trim();n&&s&&(r[n==="*"?"*":n.replace(/^(\w+)\s+/,(i,o)=>`${o.toUpperCase()} `)]=String(s))}return r}let t=typeof e=="string"?e.trim():"";if(t.startsWith("{"))try{return nl(JSON.parse(t))}catch{return""}return t}function xh(e,t){return!e||typeof e=="string"?e||"":e[t]??e["*"]??""}function il(e={},t={}){return{statusCode:e.statusCode===void 0?t.statusCode||"":nl(e.statusCode),statusStrategy:e.statusStrategy===void 0?t.statusStrategy||"first":e.statusStrategy||"first",delay:e.delay===void 0?t.delay||0:Number(e.delay)||0,log:e.log===void 0?t.log!==!1:e.log!=="false"}}function ol(e=[]){let t=new Map;return t.set("|",{origin:null,base:""}),e.forEach(r=>{let a=r.computedUrl||r.url||"";if(a)try{if(a.startsWith("http://")||a.startsWith("https://")){let s=new URL(a),n=s.pathname.replace(/\/+$/,"");t.set(`${s.origin}|${n}`,{origin:s.origin,base:n})}else{let s=a.replace(/\/+$/,"");s&&t.set(`|${s}`,{origin:null,base:s.startsWith("/")?s:`/${s}`})}}catch{}}),Array.from(t.values())}function wh(e,t=""){let r=((t.endsWith("/")?t.slice(0,-1):t)+(e.startsWith("/")?e:`/${e}`)).replace(/\{([a-zA-Z0-9_-]+)\}/g,"__PARAM_$1__").replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace(/__PARAM_([a-zA-Z0-9_-]+)__/g,"(?<$1>[^/?#]+)");return RegExp(`^${r}(?:\\/)?$`)}function kh(e){let t=[],r=ol(e?.servers);if(!e?.tags||!Array.isArray(e.tags))return t;let a=new Set;return e.tags.forEach(s=>{(s.paths||[]).forEach(n=>{let i=(n.method||"GET").toUpperCase(),o=n.path||"",l=`${i} ${o}`;if(a.has(l))return;a.add(l);let c=(n.servers?.length>0?ol(n.servers):r).map(({origin:d,base:p})=>({regex:wh(o,p),origin:d,base:p}));t.push({method:i,pathTemplate:o,routeKey:l,patterns:c,responses:n.responses||{},parameters:n.parameters||[]})})}),t}function ll(e,t){if(!Oe.size||!t)return null;let r;try{let i=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost";r=new URL(t,i)}catch{return null}let a=(e||"GET").toUpperCase(),s=decodeURI(r.pathname),n=null;for(let i of Oe.values())for(let o of i.routes)if(o.method===a)for(let l of o.patterns){let c=s.match(l.regex);if(!c)continue;let d=+!!l.base+(l.origin&&l.origin===r.origin?1:0);(!n||d>n.rank)&&(n={mock:i,route:o,rank:d,pathParams:c.groups||{},url:r})}return n}function $h(e,t,r,a={},s){let n=(e||"").split(",").map(i=>i.trim()).filter(Boolean);if(n.length===0)return Object.keys(a).find(i=>i.startsWith("2"))||("default"in a?"default":Object.keys(a)[0]||"200");if(t==="random")return n[Math.floor(Math.random()*n.length)];if(t==="cycle"&&s){let i=s.get(r)||0,o=n[i%n.length];return s.set(r,(i+1)%n.length),o}return n[0]}function Sh(e,t){let r=e.responses?.[t]||e.responses?.[String(t)]||e.responses?.default,a={"X-Mock-Server":"RapiDoc","Access-Control-Allow-Origin":"*"},s="",n="application/json";if(r?.content){let i=Object.keys(r.content);n=i.find(l=>l.includes("json"))||i.find(l=>l.includes("xml"))||i.find(l=>l.includes("text"))||i[0]||"application/json";let o=r.content[n];if(o){if(o.example!==void 0)s=typeof o.example=="object"?JSON.stringify(o.example,null,2):String(o.example);else if(o.examples&&Object.keys(o.examples).length>0){let l=Object.values(o.examples)[0]?.value;l!==void 0&&(s=typeof l=="object"?JSON.stringify(l,null,2):String(l))}if(!s&&o.schema){let l=qt(o.schema,n,null,null,!0,!1,"text",!0);if(l&&l.length>0){let c=l[0].exampleValue;s=typeof c=="object"?JSON.stringify(c,null,2):String(c)}}}}if(!s)if(String(t)==="204")s="";else if(n.includes("json")){let i=Number(t)||200;s=JSON.stringify({status:i,message:Ws[i]||"Mock Response"},null,2)}else s=Ws[Number(t)]||"OK";return r?.headers&&Object.entries(r.headers).forEach(([i,o])=>{o.schema?.default===void 0?o.example!==void 0&&(a[i]=String(o.example)):a[i]=String(o.schema.default)}),String(t)!=="204"&&(a["Content-Type"]=n),{statusCode:Number(t)||200,statusText:Ws[Number(t)]||(t==="default"?"OK":"Mock Response"),headers:a,body:s}}function cl(e){let{config:t,cycle:r}=e.mock,a=$h(xh(t.statusCode,e.route.routeKey),t.statusStrategy,e.route.routeKey,e.route.responses,r);return{config:t,statusCode:a,payload:Sh(e.route,a)}}function ua(e,t={}){let r=t.owner||Ks,a=Oe.get(r);Oe.set(r,{routes:kh(e),config:il(t,a?.config),cycle:new Map}),typeof window<"u"&&(!It&&window.fetch&&(It=window.fetch,window.fetch=async function(s,n={}){if(!Oe.size)return It.apply(this,arguments);let i="",o="GET";typeof s=="string"?(i=s,o=n?.method||"GET"):s instanceof URL?(i=s.href,o=n?.method||"GET"):s&&typeof s=="object"&&"url"in s&&(i=s.url,o=n?.method||s.method||"GET");let l=ll(o,i);if(!l)return It.apply(this,arguments);let{config:c,payload:d}=cl(l);return c.delay>0&&await new Promise(p=>setTimeout(p,c.delay)),c.log,new Response(d.body,{status:d.statusCode,statusText:d.statusText,headers:d.headers})}),!Lt&&window.XMLHttpRequest&&(Lt=window.XMLHttpRequest.prototype.open,hr=window.XMLHttpRequest.prototype.send,pa=window.XMLHttpRequest.prototype.setRequestHeader,window.XMLHttpRequest.prototype.open=function(s,n,...i){return this._mockMethod=s,this._mockUrl=n,this._mockHeaders={},Lt.apply(this,[s,n,...i])},window.XMLHttpRequest.prototype.setRequestHeader=function(s,n){return this._mockHeaders&&(this._mockHeaders[s]=n),pa.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){if(!Oe.size)return hr.apply(this,arguments);let s=ll(this._mockMethod,this._mockUrl);if(!s)return hr.apply(this,arguments);let{config:n,payload:i}=cl(s),o=n.delay>0?n.delay:10;setTimeout(()=>{n.log,Object.defineProperty(this,"readyState",{value:4,writable:!0}),Object.defineProperty(this,"status",{value:i.statusCode,writable:!0}),Object.defineProperty(this,"statusText",{value:i.statusText,writable:!0}),Object.defineProperty(this,"responseText",{value:i.body,writable:!0}),Object.defineProperty(this,"response",{value:i.body,writable:!0});let l=Object.entries(i.headers).map(([c,d])=>`${c}: ${d}\r
|
|
284
|
+
`).join("");this.getAllResponseHeaders=()=>l,this.getResponseHeader=c=>{let d=c.toLowerCase(),p=Object.keys(i.headers).find(h=>h.toLowerCase()===d);return p?i.headers[p]:null},this.dispatchEvent(new Event("readystatechange")),this.dispatchEvent(new Event("load")),this.dispatchEvent(new Event("loadend")),typeof this.onreadystatechange=="function"&&this.onreadystatechange(),typeof this.onload=="function"&&this.onload()},o)}))}function ha(e=Ks){Oe.delete(e),Oe.size||typeof window<"u"&&(It&&=(window.fetch=It,null),Lt&&(window.XMLHttpRequest.prototype.open=Lt,window.XMLHttpRequest.prototype.send=hr,window.XMLHttpRequest.prototype.setRequestHeader=pa,Lt=null,hr=null,pa=null))}function dl(e={}){let t=Oe.get(e.owner||Ks);t&&(t.config=il(e,t.config))}var Ne={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ma=e=>(...t)=>({_$litDirective$:e,values:t}),fa=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Vs=class extends fa{constructor(e){if(super(e),this.it=O,e.type!==Ne.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===O||e==null)return this._t=void 0,this.it=e;if(e===ne)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Vs.directiveName="unsafeHTML",Vs.resultType=1;var P=ma(Vs),pl;function M(e){if(typeof e!="string")return"";if(typeof window<"u"&&window.Sanitizer&&Element.prototype.setHTML)try{let s=document.createElement("div");return pl??=new window.Sanitizer({allowAttributes:{"*":["*"]}}),s.setHTML(e,{sanitizer:pl}),s.innerHTML}catch{}let t;if(typeof DOMParser<"u")t=new DOMParser().parseFromString(e,"text/html");else return e;let r=t.querySelectorAll("script");for(let s=r.length-1;s>=0;s--)r[s].parentNode.removeChild(r[s]);let a=t.querySelectorAll("*");for(let s=0;s<a.length;s++){let n=a[s];for(let i=n.attributes.length-1;i>=0;i--){let o=n.attributes[i],l=o.name.toLowerCase(),c=o.value.toLowerCase();(l.startsWith("on")||(l==="href"||l==="src")&&(c.includes("javascript:")||c.includes("data:text/html")))&&n.removeAttribute(o.name)}}return t.body.innerHTML}function Ah(e="",t={}){let r=e;if(!t||typeof t!="object")return r;for(let[a,s]of Object.entries(t)){let n=s==null?"":String(s),i=`{${a}}`;r=r.replaceAll(i,encodeURIComponent(n))}return r}function Eh(e,t){if(typeof e!="string")return e;let r=String(t).split(","),a=e.trim();return(r.includes("integer")||r.includes("number"))&&a!==""&&Number.isFinite(Number(a))?Number(a):r.includes("boolean")&&(a==="true"||a==="false")?a==="true":e}function Dh(e,t,r={}){let{style:a="form",explode:s=a==="form",isArray:n=Array.isArray(t),isObject:i=!1,itemType:o=""}=r;if(t==null||t==="")return[];if(i||typeof t=="object"&&!Array.isArray(t)){let l=t;if(typeof t=="string")try{l=JSON.parse(t)}catch{return[]}if(!l||typeof l!="object")return[];if(a==="json")return[[e,JSON.stringify(l)]];if(a==="xml")return[[e,Bs(l)]];let c=[];for(let d of Object.keys(l)){let p=`${e}[${d}]`,h=l[d];if(h!=null)if(typeof h=="object"&&Array.isArray(h)){let u=h.filter(g=>g!==""&&g!=null);u.length>0&&(a==="spaceDelimited"?c.push([p,u.join(" ")]):a==="pipeDelimited"?c.push([p,u.join("|")]):s?u.forEach(g=>c.push([p,String(g)])):c.push([p,u.join(",")]))}else typeof h=="object"?c.push([p,JSON.stringify(h)]):c.push([p,String(h)])}return c}if(n||Array.isArray(t)){let l=(Array.isArray(t)?t:[t]).filter(c=>c!==""&&c!=null);return l.length===0?[]:a==="json"?[[e,JSON.stringify(l.map(c=>Eh(c,o)))]]:a==="spaceDelimited"?[[e,l.join(" ")]]:a==="pipeDelimited"?[[e,l.join("|")]]:s?l.map(c=>[e,String(c)]):[[e,l.join(",")]]}return[[e,String(t)]]}function Ch(e){return encodeURI(e).replace(/&/g,"%26").replace(/=/g,"%3D").replace(/\+/g,"%2B")}function Th(e=[]){if(!Array.isArray(e)||e.length===0)return"";let t=[];for(let r of e){let{name:a,value:s,style:n="form",explode:i=n==="form",allowReserved:o=!1,isArray:l=!1,isObject:c=!1,itemType:d=""}=r,p=Dh(a,s,{style:n,explode:i,isArray:l,isObject:c,itemType:d});for(let[h,u]of p){let g=encodeURIComponent(h),f=o?Ch(u):encodeURIComponent(u);t.push(`${g}=${f}`)}}return t.join("&")}function Oh(e,t="oauth-receiver.html"){if(/^[a-z][a-z0-9+.-]*:/i.test(t))return new URL(t);if(t.startsWith("/"))return new URL(t,e.origin);let r=e.pathname.substring(0,e.pathname.lastIndexOf("/"));return new URL(`${e.origin}${r}/${t}`)}function Fh(e="",t=""){return`${(e||"").replace(/\/+$/,"")}${t?`/${t.replace(/^\/+/,"")}`:""}`}function jh({serverUrl:e="",path:t="",pathParams:r={},queryParams:a=[],apiKeys:s=[]}={}){let n=Ah(t,r),i=Th(a);return i&&(n=`${n}${n.includes("?")?"&":"?"}${i}`),Array.isArray(s)&&s.filter(o=>o&&o.in==="query"&&o.finalKeyValue).forEach(o=>{n=`${n}${n.includes("?")?"&":"?"}${encodeURIComponent(o.name)}=${encodeURIComponent(o.finalKeyValue)}`}),Fh(e,n)}var ul="rapidoc-oauth";function hl(e){let t="";for(let r of e)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Zs(e=32){return hl(crypto.getRandomValues(new Uint8Array(e)))}async function _h(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e));return hl(new Uint8Array(t))}function qh(e){if(e.search&&e.search.length>1){let t=new URLSearchParams(e.search);return{responseType:"code",code:t.get("code"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}if(e.hash&&e.hash.length>1){let t=new URLSearchParams(e.hash.slice(1));return{responseType:"token",accessToken:t.get("access_token"),tokenType:t.get("token_type"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}return null}function ml(e,t,r,a,s){return!(!e||typeof e!="object"||e.responseType!=="code"&&e.responseType!=="token"||!t.state||e.state!==t.state||t.origin!==void 0&&r!==t.origin||s!==void 0&&a!==s)}var fl="rapidoc";function gl(e){try{let t=new TextEncoder().encode(e),r="";for(let a=0;a<t.byteLength;a++)r+=String.fromCharCode(t[a]);return btoa(r)}catch{return btoa(e)}}function ga(e){let t=new URLSearchParams;if(!e)return t;if(e instanceof URLSearchParams){for(let[r,a]of e.entries())t.set(r,a);return t}if(typeof e=="object")return Object.entries(e).forEach(([r,a])=>{a!=null&&t.set(r,String(a))}),t;if(typeof e=="string"){let r=e.trim();if(r.startsWith("{")&&r.endsWith("}"))try{let n=JSON.parse(r);if(typeof n=="object"&&n)return Object.entries(n).forEach(([i,o])=>{o!=null&&t.set(i,String(o))}),t}catch{}let a=r.startsWith("?")?r.slice(1):r,s=new URLSearchParams(a);for(let[n,i]of s.entries())t.set(n,i);return t}return t}function nt(e,t="",r="",a="",s=""){let n=this.resolvedSpec.securitySchemes?.find(o=>o.securitySchemeId===e);if(!n)return!1;let i="";return n.scheme?.toLowerCase()==="basic"?t&&(i=`Basic ${gl(`${t}:${r}`)}`):a&&(n.value=a,i=`${n.scheme?.toLowerCase()==="bearer"?"Bearer ":""}${a}`),i?(n.finalKeyValue=i,n.hostNote=s?String(s):"",n.hostFormOpen=!1,this.requestUpdate(),!0):!1}function Js(){this.resolvedSpec.securitySchemes?.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue="",e.hostNote=""}),this.persistAuth==="true"&&Xs.call(this,{}),this.requestUpdate()}function Gs(){return JSON.parse(localStorage.getItem(fl))||{}}function Xs(e){localStorage.setItem(fl,JSON.stringify(e))}function Rh(){let e=Gs.call(this);Object.values(e).forEach(t=>{nt.call(this,t.securitySchemeId,"","",t.value)})}function Ys(e){let t="",r=this.resolvedSpec.securitySchemes.find(a=>a.securitySchemeId===e);if(r){let a=this.shadowRoot.getElementById(`security-scheme-${e}`);if(a){if(r.type&&r.scheme&&r.type==="http"&&r.scheme.toLowerCase()==="basic"){let s=a.querySelector(".api-key-user").value.trim(),n=a.querySelector(".api-key-password").value.trim();nt.call(this,e,s,n)}else t=a.querySelector(".api-key-input").value.trim(),nt.call(this,e,"","",t);if(this.persistAuth==="true"){let s=Gs.call(this);r.value?s[e]={securitySchemeId:e,value:r.value}:delete s[e],Xs.call(this,s)}}}}function mr(e,t,r){if(!e)return;let a=document.createElement("span");a.style.color=`var(${r})`,a.textContent=t,e.replaceChildren(a)}function yl(e,t,r="Bearer"){let a=this.resolvedSpec.securitySchemes.find(s=>s.securitySchemeId===e);a.finalKeyValue=`${r.toLowerCase()==="bearer"?"Bearer":r.toLowerCase()==="mac"?"MAC":r} ${t}`,a.hostNote="",this.requestUpdate()}async function Qs(e,t,r,a,s,n,i,o,l="request-body",c=null,d=null,p=null,h=null,u=null){let g=o?o.querySelector(".oauth-resp-display"):void 0,f=new URLSearchParams,y=new Headers,v=ga(h);for(let[$,S]of v.entries())f.set($,S);let A=ga(this.additionalTokenParams);for(let[$,S]of A.entries())f.set($,S);f.set("grant_type",s),s!=="client_credentials"&&s!=="password"&&f.set("redirect_uri",a),n&&(f.set("code",n),u&&f.set("code_verifier",u)),l==="header"&&r?y.set("Authorization",`Basic ${gl(`${t}:${r}`)}`):(t&&f.set("client_id",t),r&&f.set("client_secret",r)),s==="password"&&(f.set("username",d),f.set("password",p)),c&&f.set("scope",c);let x={method:"POST",headers:y,body:f},b=new CustomEvent("before-token-request",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:i,grantType:s,tokenUrl:e,params:f,headers:y,request:x}});if(!this.dispatchEvent(b))return!1;try{let $=await fetch(e,{method:x.method||"POST",headers:x.headers||y,body:x.body||f}),S=await $.json();if($.ok){if(S.token_type&&S.access_token)return yl.call(this,i,S.access_token,S.token_type),mr(g,"Access Token Received","--green"),!0}else return mr(g,S.error_description||S.error||"Unable to get access token","--destructive"),!1}catch{return mr(g,"Failed to get access token","--destructive"),!1}}function Ih(e,t){let r=t.authFlowDivEl?t.authFlowDivEl.querySelector(".oauth-resp-display"):void 0;if(e.error)mr(r,e.errorDescription||e.error,"--destructive");else if(e.responseType==="code")Qs.call(this,t.tokenUrl,t.clientId,t.clientSecret,t.redirectUrl,t.grantType,e.code,t.securitySchemeId,t.authFlowDivEl,t.sendClientSecretIn,null,null,null,t.tokenParamsSpec,t.codeVerifier);else{let a=e.accessToken||e.access_token;a&&yl.call(this,t.securitySchemeId,a,e.tokenType||e.token_type||"Bearer")}}function Lh(e,t,r){typeof this.stopOAuthWait=="function"&&this.stopOAuthWait();let a=typeof BroadcastChannel=="function"?new BroadcastChannel(ul):null,s,n=()=>{window.removeEventListener("message",s),a&&a.close(),this.stopOAuthWait===n&&(this.stopOAuthWait=null)},i=o=>{n();try{e.close()}catch{}r(o)};s=o=>{ml(o.data,{state:t,origin:window.location.origin},o.origin,o.source,e)&&i(o.data)},window.addEventListener("message",s),a&&(a.onmessage=o=>{ml(o.data,{state:t})&&i(o.data)}),this.stopOAuthWait=n}async function Bh(e,t,r,a,s,n=null,i=null){let o=s.target.closest(".oauth-flow"),l=o.querySelector(".oauth-client-id")?o.querySelector(".oauth-client-id").value.trim():"",c=o.querySelector(".oauth-client-secret")?o.querySelector(".oauth-client-secret").value.trim():"",d=o.querySelector(".api-key-user")?o.querySelector(".api-key-user").value.trim():"",p=o.querySelector(".api-key-password")?o.querySelector(".api-key-password").value.trim():"",h=o.querySelector(".oauth-send-client-secret-in")?o.querySelector(".oauth-send-client-secret-in").value.trim():"request-body",u=[...o.querySelectorAll(".scope-checkbox:checked")],g=o.querySelector(`#${e}-pkce`),f=Zs(16),y=Zs(16),v=g&&g.checked?Zs(32):null,A=Oh(window.location,this.oauthReceiver),x="",b="",$;if([...o.parentNode.querySelectorAll(".oauth-resp-display")].forEach(S=>{S.replaceChildren()}),t==="authorizationCode"||t==="implicit"){let S=new URL(r);t==="authorizationCode"?(x="authorization_code",b="code"):t==="implicit"&&(b="token");let E=new URLSearchParams(S.search),D=ga(n);for(let[z,V]of D.entries())E.set(z,V);let j=ga(this.additionalAuthorizeParams);for(let[z,V]of j.entries())E.set(z,V);let N=u.map(z=>z.value).join(" ");N&&E.set("scope",N),E.set("client_id",l),E.set("redirect_uri",A.toString()),E.set("response_type",b),E.set("state",f),E.set("nonce",y),v&&(E.set("code_challenge",await _h(v)),E.set("code_challenge_method","S256"));let F=new CustomEvent("before-authorize",{bubbles:!0,composed:!0,cancelable:!0,detail:{securitySchemeId:e,flowType:t,authUrl:r,authParams:E}});if(!this.dispatchEvent(F))return;if(S.search=E.toString(),$=window.open(S.toString()),!$){mr(o.querySelector(".oauth-resp-display"),"The sign-in window was blocked","--destructive");return}Lh.call(this,$,f,z=>Ih.call(this,z,{tokenUrl:a,clientId:l,clientSecret:c,redirectUrl:A.toString(),grantType:x,sendClientSecretIn:h,securitySchemeId:e,authFlowDivEl:o,tokenParamsSpec:i,codeVerifier:v}))}else if(t==="clientCredentials"){x="client_credentials";let S=u.map(E=>E.value).join(" ");Qs.call(this,a,l,c,A.toString(),x,"",e,o,h,S,null,null,i)}else if(t==="password"){x="password";let S=u.map(E=>E.value).join(" ");Qs.call(this,a,l,c,A.toString(),x,"",e,o,h,S,d,p,i)}}function Nh(e,t,r,a,s,n=[],i="request-body",o=void 0,l="true",c=null,d=null){let{authorizationUrl:p,tokenUrl:h,refreshUrl:u}=s,g=s["x-pkce-only"]||!1,f=b=>b.indexOf("://")>0||b.indexOf("//")===0,y=new URL(this.selectedServer?.computedUrl).origin;u&&!f(u)&&(u=this.selectedServer?.computedUrl.trim().endsWith("/")&&!u.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${u.trim()}`:`${y}/${u.replace(/^\//,"")}`),h&&!f(h)&&(h=this.selectedServer?.computedUrl.trim().endsWith("/")&&!h.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${h.trim()}`:`${y}/${h.replace(/^\//,"")}`),p&&!f(p)&&(p=this.selectedServer?.computedUrl.trim().endsWith("/")&&!p.trim().startsWith("/")?`${this.selectedServer?.computedUrl.trim()}${p.trim()}`:`${y}/${p.replace(/^\//,"")}`);let v;v=e==="authorizationCode"?"Authorization Code Flow":e==="clientCredentials"?"Client Credentials Flow":e==="implicit"?"Implicit Flow":e==="password"?"Password Flow":e;let A=e==="authorizationCode"||e==="clientCredentials"||e==="password",x=A||e==="implicit";return m`<div class="oauth-flow ${e}"><h3 class="rapidoc-heading label-heading tiny-title upper" part="heading heading-3">${v}</h3>${p||h||u?m`<dl class="oauth-urls">${p?m`<dt>Auth URL</dt><dd class="mono-font">${p}</dd>`:""} ${h?m`<dt>Token URL</dt><dd class="mono-font">${h}</dd>`:""} ${u?m`<dt>Refresh URL</dt><dd class="mono-font">${u}</dd>`:""}</dl>`:""} ${x&&s.scopes?m`<div class="oauth-scopes-label">Scopes</div><div class="oauth-scopes" part="section-auth-scopes">${Object.entries(s.scopes).map(([b,$],S)=>m`<label class="auth-toggle" for="${a}${e}${S}"><input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${a}${e}${S}" ?checked="${n.includes(b)}" value="${b}"> <span><span class="oauth-scope-name mono-font">${b}</span>${b!==$&&$?m`<span class="oauth-scope-descr">${$}</span>`:""}</span></label>`)}</div>`:""} ${x&&l==="true"?m`${e==="authorizationCode"?m`<label class="auth-toggle oauth-pkce" for="${a}-pkce"><input type="checkbox" part="checkbox checkbox-auth-scope" id="${a}-pkce" checked="checked" ?disabled="${g}"> <span>Send Proof Key for Code Exchange (PKCE)</span></label>`:""} ${e==="password"?m`<div class="auth-controls"><input type="text" placeholder="username" spellcheck="false" class="oauth2 ${e} ${a} api-key-user" part="textbox textbox-username" id="input-${a}-${e}-api-key-user"> <input type="password" placeholder="password" spellcheck="false" class="oauth2 ${e} ${a} api-key-password" part="textbox textbox-password" id="input-${a}-${e}-api-key-password"></div>`:""}<div class="auth-controls"><input type="text" part="textbox textbox-auth-client-id" value="${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-id"> ${A?m`<input id="${a}-${e}-oauth-client-secret" type="password" part="textbox textbox-auth-client-secret" value="${r||""}" placeholder="client-secret" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-secret" ?hidden="${g}"> <select class="${e} ${a} oauth-send-client-secret-in" aria-label="Send client secret in" ?hidden="${g}">${!o||o.includes("request-body")?m`<option value="request-body" .selected="${i==="request-body"}">Request Body</option>`:""} ${!o||o.includes("header")?m`<option value="header" .selected="${i==="header"}">Authorization Header</option>`:""}</select>`:""} <button class="btn btn-outline" part="btn btn-outline" @click="${b=>{Bh.call(this,a,e,p,h,b,c,d)}}">GET TOKEN</button></div><div class="oauth-resp-display red-text small-font-size"></div>`:""}</div>`}function zh(e){let t=this.resolvedSpec.securitySchemes?.find(r=>r.securitySchemeId===e);if(t.user="",t.password="",t.value="",t.finalKeyValue="",t.hostNote="",this.persistAuth==="true"){let r=Gs.call(this);delete r[t.securitySchemeId],Xs.call(this,r)}this.requestUpdate()}function bl(e="true"){if(!this.resolvedSpec)return"";let t=this.resolvedSpec.securitySchemes?.filter(r=>r.finalKeyValue);if(t)return m`<section id="auth" part="section-auth" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}"><h2 class="rapidoc-heading sub-title regular-font" part="section-auth-title heading heading-2">Authentication</h2>${e==="true"?m`<div class="auth-status small-font-size">${t.length>0?m`<div class="blue-text">${t.length} API key applied</div><button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Js.call(this)}}">CLEAR ALL API KEYS</button>`:m`<div class="red-text">No API key applied</div>`}</div>`:""} ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?m`<ul class="auth-list" id="auth-list" part="auth-list" role="list">${this.resolvedSpec.securitySchemes.filter(r=>r.type).map(r=>{let a=e==="true"&&r.finalKeyValue?r.hostNote:"",s=a&&!r.hostFormOpen;return m`<li id="security-scheme-${r.securitySchemeId}" class="auth-scheme ${r.type.toLowerCase()}" part="auth-scheme"><div class="auth-scheme-body"><div class="auth-scheme-header"><span class="auth-scheme-title">${r.typeDisplay}</span> ${r.finalKeyValue?m`<span class="blue-text">Key Applied</span> <button class="btn btn-outline btn-sm" part="btn btn-outline" @click="${()=>{zh.call(this,r.securitySchemeId)}}">REMOVE</button>`:""}</div>${r.description?m`<div class="m-markdown">${P(M(T(r.description||"")))}</div>`:""} ${a?m`<div class="auth-host-note" part="auth-host-note">${a}</div><button class="btn btn-link auth-host-toggle" part="btn btn-link" aria-expanded="${s?"false":"true"}" @click="${()=>{r.hostFormOpen=!r.hostFormOpen,this.requestUpdate()}}">${s?"Use a different token":"Hide token form"}</button>`:""} ${!s&&r.type.toLowerCase()==="apikey"?m`<div class="auth-hint">Send <code>${r.name}</code> in <code>${r.in}</code></div>${e==="true"?r.in==="cookie"?m`<div class="auth-hint gray-text">Cookies cannot be set from here</div>`:m`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Ys.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!s&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="basic"?m`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.</div>${e==="true"?m`<div class="auth-controls"><input type="text" value="${r.user}" placeholder="username" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-user" id="input-${r.type}-${r.securitySchemeId}-api-key-user"> <input type="password" value="${r.password}" placeholder="password" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-password" id="input-${r.type}-${r.securitySchemeId}-api-key-password"> <button class="btn btn-outline" @click="${()=>{Ys.call(this,r.securitySchemeId)}}" part="btn btn-outline">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!s&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="bearer"?m`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and token value</div>${e==="true"?m`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{Ys.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""}</div>${!s&&r.type.toLowerCase()==="oauth2"?m`<div class="auth-flows" part="auth-flows">${Object.keys(r.flows).map(n=>Nh.call(this,n,r.flows[n]["x-client-id"]||r["x-client-id"]||"",r.flows[n]["x-client-secret"]||r["x-client-secret"]||"",r.securitySchemeId,r.flows[n],r.flows[n]["x-default-scopes"]||r["x-default-scopes"],r.flows[n]["x-receive-token-in"]||r["x-receive-token-in"],r.flows[n]["x-receive-token-in-options"]||r["x-receive-token-in-options"],e,r.flows[n]["x-authorize-params"]||r["x-authorize-params"]||null,r.flows[n]["x-token-params"]||r["x-token-params"]||null))}</div>`:""}</li>`})}</ul>`:""}<slot name="auth"></slot></section>`}function Ph(e,t,r){let a=e.scopes?m`<div><b>Required scopes:</b><br><div style="margin-left:8px">${e.scopes.split(",").map((s,n)=>m`${n===0?"":"\u2503"}<span>${s.trim()}</span>`)}</div></div>`:"";return e.type==="oauth2"?m`<div>${t?m`<b>${r+1}.</b> `:"Needs "}OAuth Token <span style="font-family:var(--font-mono);color:var(--primary)">${e.securitySchemeId}</span> in <b>Authorization header</b> ${a}</div>`:e.type==="http"?m`<div>${t?m`<b>${r+1}.</b> `:"Requires "} ${e.scheme==="basic"?"Base 64 encoded username:password":m`Bearer Token <b>${e.nameId}</b>`} in <b>Authorization header</b> ${a}</div>`:m`<div>${t?m`<b>${r+1}.</b> `:"Requires "} Token in <b>${e.name} ${e.in}</b> ${a}</div>`}var Mh=typeof CSS<"u"&&CSS.supports?.("anchor-name: --a"),en=new WeakMap,Fe=null;function vl(e){e.key==="Escape"&&Fe&&tn(Fe)}function tn(e){e.matches(":popover-open")&&e.hidePopover(),Fe===e&&(Fe=null,document.removeEventListener("keydown",vl))}function Uh(e,t){let r=e.getBoundingClientRect(),{offsetWidth:a,offsetHeight:s}=t,n=Math.max(8,Math.min(r.left,window.innerWidth-a-8)),i=r.bottom+6+s>window.innerHeight&&r.top-6-s>=0?r.top-6-s:r.bottom+6;Object.assign(t.style,{inset:"auto",margin:"0",left:`${n}px`,top:`${i}px`})}function rn(e){let t=e.currentTarget.closest(".security-chip"),r=t?.querySelector(".security-popover");r&&typeof r.showPopover=="function"&&(clearTimeout(en.get(t)),Fe&&Fe!==r&&tn(Fe),r.matches(":popover-open")||r.showPopover(),Mh||Uh(t,r),Fe!==r&&(Fe=r,document.addEventListener("keydown",vl)))}function xl(e){let t=e.currentTarget;clearTimeout(en.get(t)),en.set(t,setTimeout(()=>{let r=t.querySelector(".security-popover");r&&!t.matches(":hover, :focus-within")&&tn(r)},150))}var wl=m`<svg class="security-lock" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke-width="1.75"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>`;function kl(e,t=""){if(!this.resolvedSpec.securitySchemes||!Array.isArray(e)||e.length===0)return"";let r=e.some(o=>!o||Object.keys(o).length===0),a=e.filter(o=>o&&Object.keys(o).length>0);if(a.length===0)return"";let s=[];a.forEach(o=>{let l=[],c=[];Object.keys(o).forEach(p=>{let h="",u=this.resolvedSpec.securitySchemes.find(g=>g.securitySchemeId===p);o[p]&&Array.isArray(o[p])&&(h=o[p].join(", ")),u&&(c.push(u.typeDisplay),l.push({...u,scopes:h}))});let d=c.length>1?`${c[0]} + ${c.length-1} more`:c[0];s.push({securityTypes:r?`${d} (Optional)`:d,securityDefs:l})});let n=`${t||"operation"}--security`,i=`--${n.replace(/[^\w-]/g,"_")}`;return m`<div class="operation-security" part="section-operation-security" role="group" aria-labelledby="${n}-label"><span id="${n}-label" class="security-label visually-hidden" part="label-operation-security">Authorization</span> ${this.updateRoute==="true"&&this.allowAuthentication==="true"?m`<a class="security-lock-btn" part="anchor anchor-operation-security" href="#auth" title="Go to Authentication" aria-label="Authorization: go to Authentication section">${wl}</a>`:m`<span class="security-lock-btn">${wl}</span>`}<ul class="value-list-items security-chips" role="list">${s.map((o,l)=>{if(!o.securityTypes)return"";let c=o.securityDefs.length>1,d=o.securityDefs.length>0,p=`${n}-${l}`,h=`${i}-${l}`,u=d?m`<button type="button" class="security-chip-label" aria-describedby="${p}" @click="${rn}">${o.securityTypes}</button>`:m`<span class="security-chip-label">${o.securityTypes}</span>`;return m`<li><span class="security-chip ${d?"has-details":""}" part="operation-security-chip" style="anchor-name:${h}" @mouseenter="${rn}" @mouseleave="${xl}" @focusin="${rn}" @focusout="${xl}">${u} ${d?m`<div id="${p}" class="security-popover" part="operation-security-details" popover="hint" role="tooltip" style="position-anchor:${h}">${c?m`<div>Requires <b>all</b> of the following:</div>`:""}<div style="padding-left:${c?"8px":"0"}">${o.securityDefs.map((g,f)=>Ph(g,c,f))}</div></div>`:""}</span></li>`})}</ul></div>`}function $l(e){return m`<div class="code-samples-container"><h4 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-4">Code samples</h4><div part="tab-panel" class="tab-panel col" @click="${t=>{if(!t.target.classList.contains("tab-btn"))return;let r=t.target.dataset.tab,a=[...t.currentTarget.querySelectorAll(".tab-btn")],s=[...t.currentTarget.querySelectorAll(".tab-content")];a.forEach(n=>n.classList[n.dataset.tab===r?"add":"remove"]("active")),s.forEach(n=>{n.style.display=n.dataset.tab===r?"block":"none"}),jr(t.currentTarget.getRootNode()?.host?.shadowRoot||t.currentTarget)}}"><div part="tab-btn-row" class="tab-buttons row" style="width:100%;overflow:auto">${e.map((t,r)=>m`<button part="tab-btn" class="tab-btn ${r===0?"active":""}" data-tab="${t.lang}${r}">${t.label||t.lang}</button>`)}</div>${e.map((t,r)=>m`<div class="tab-content m-markdown" style="display:${r===0?"block":"none"}" data-tab="${t.lang}${r}"><button class="btn btn-sm btn-outline toolbar-btn" part="btn btn-outline btn-copy" @click="${a=>{Qt(t.source,a)}}">Copy</button><pre><code class="language-${t.lang?.toLowerCase()}">${t.source}</code></pre></div>`)}</div></div>`}function Sl(e){return m`<h4 class="rapidoc-heading label-heading req-res-title" part="heading heading-4">Callbacks</h4>${Object.entries(e).map(t=>m`<div class="tiny-title" style="padding:12px;border:1px solid var(--border)"><h5 class="rapidoc-heading callback-name" part="heading heading-5">${t[0]}</h5>${Object.entries(t[1]).map(r=>m`<div class="callback-operation-list mono-font small-font-size">${Object.entries(r[1]).map(a=>m`<div class="callback-operation-item"><div class="callback-operation-header"><div class="method method-fg ${a[0]} callback-method"><span style="font-size:20px">⥄ </span>${a[0]}</div><span style="line-height:20px;vertical-align:baseline">${r[0]}</span></div><div class="expanded-req-resp-container"><api-request .config="${this.config}" class="${this.renderStyle}-mode callback" style="width:100%" callback="true" method="${a[0]||""}" path="${r[0]||""}" .parameters="${a[1]?.parameters||""}" .request_body="${a[1]?.requestBody||""}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="false" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":"true"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
285
|
+
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
|
|
286
|
+
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
287
|
+
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
|
288
|
+
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request><api-response .config="${this.config}" style="width:100%" class="${this.renderStyle}-mode" callback="true" .responses="${a[1]?.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":"true"}" schema-hide-write-only="false" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
289
|
+
btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
|
|
290
|
+
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
291
|
+
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`)}</div>`)}</div>`)}`}var Hh={},fr=ma(class extends fa{constructor(){super(...arguments),this.ot=Hh}render(e,t){return t()}update(e,[t,r]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((a,s)=>a===this.ot[s]))return ne}else if(this.ot===t)return ne;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,r)}}),ya=Z`.border-top{border-top:1px solid var(--border)}.border,.light-border{border:1px solid var(--border);border-radius:min(var(--radius), .5rem)}.pad-8-16{padding:8px 16px}.pad-top-8{padding-top:8px}.mar-top-8{margin-top:8px}`;function an(e){if(!e||typeof e!="string")return e||"";let t=[];return e.split(",").map(r=>{let a=r.trim(),s=a.toLowerCase();return t.includes(s)?null:(t.push(s),a)}).filter(r=>r!==null).join(", ")}function Wh({method:e="GET",url:t="",headers:r,body:a,contentType:s="",partContentTypes:n={},baseLocation:i=typeof location<"u"?location.href:""}={}){let o=t;if(!t.startsWith("http://")&&!t.startsWith("https://")&&i)try{o=new URL(t,i).href}catch{o=t}let l=`curl -X ${e.toUpperCase()} "${o}" \\
|
|
292
|
+
`,c=[];r instanceof Headers||r&&typeof r.forEach=="function"?r.forEach((g,f)=>{c.push([f,an(g)])}):Array.isArray(r)?r.forEach(([g,f])=>{c.push([g,an(f)])}):r&&typeof r=="object"&&Object.entries(r).forEach(([g,f])=>{c.push([g,an(String(f))])});let d=c.map(([g,f])=>` -H '${g}: ${f}'`).join(`\\
|
|
293
|
+
`);d&&=`${d} \\
|
|
294
|
+
`;let p="",h="";if(typeof URLSearchParams<"u"&&a instanceof URLSearchParams)p=` -d ${a.toString()} \\
|
|
295
|
+
`;else if(typeof File<"u"&&a instanceof File)p=` --data-binary @${a.name} \\
|
|
296
|
+
`;else if(typeof FormData<"u"&&a instanceof FormData)h=Array.from(a).map(([g,f])=>{let y=n?.[g]?`;type=${n[g]}`:"";return typeof File<"u"&&f instanceof File?` -F "${g}=@${f.name}${f.type?"":y}"`:` -F "${g}=${typeof f=="string"?f.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):f}${y}"`}).join(`\\
|
|
297
|
+
`),h&&=`${h} \\
|
|
298
|
+
`;else if(a!=null&&a!==""){let g=typeof a=="object"?JSON.stringify(a):String(a);if(s.includes("json")||g.trim().startsWith("{")&&g.trim().endsWith("}"))try{p=` -d '${JSON.stringify(JSON.parse(g)).replace(/'/g,"'\\''")}' \\
|
|
299
|
+
`}catch{}p||=` -d '${g.replace(/'/g,`'"'"'`)}' \\
|
|
300
|
+
`}let u=`${l}${d}${p}${h}`;return u.endsWith(` \\
|
|
301
|
+
`)?u.slice(0,-3):u}function Kh(e,t={}){let{explode:r=!1,isObject:a=!1}=t;if(e==null||e==="")return"";if(a||typeof e=="object"&&!Array.isArray(e)){let s=e;if(typeof e=="string")try{s=JSON.parse(e.replace(/\n/g,"").trim())}catch{return""}if(!s||typeof s!="object")return"";let n=r?"=":",";return Object.keys(s).map(i=>{let o=s[i],l=typeof o=="object"?JSON.stringify(o):String(o);return`${i}${n}${l}`}).join(",")}return Array.isArray(e)?e.filter(s=>s!==""&&s!=null).join(","):String(e)}function Vh({accept:e="",apiKeys:t=[],headerParams:r=[],contentType:a=""}={}){let s=new Headers;return e&&s.append("Accept",e),Array.isArray(t)&&t.filter(n=>n&&n.in==="header"&&n.finalKeyValue).forEach(n=>{s.append(n.name,n.finalKeyValue)}),Array.isArray(r)&&r.forEach(n=>{if(n&&n.name&&n.value!==void 0&&n.value!==null&&n.value!==""){let i=Kh(n.value,{explode:n.explode===!0||n.explode==="true",isObject:n.isObject===!0});i&&s.append(n.name,i)}}),a&&!a.includes("form-data")&&s.append("Content-Type",a),s}function Al(e=[],t=""){let r=new URLSearchParams;if(t)try{let a=JSON.parse(t);if(a&&typeof a=="object"){for(let s of Object.keys(a))r.append(s,typeof a[s]=="object"?JSON.stringify(a[s]):String(a[s]));return r}}catch{}return Array.isArray(e)&&e.forEach(a=>{if(a&&a.name&&a.value!==void 0&&a.value!==null&&a.value!=="")if(a.isArray){let s=(Array.isArray(a.value)?a.value:[a.value]).filter(n=>n!==""&&n!=null);s.length>0&&r.append(a.name,s.join(","))}else r.append(a.name,String(a.value))}),r}var El=e=>!!e&&(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")||!e.type&&!!e.properties);function Zh(e,t){return(typeof t?.contentType=="string"?t.contentType.split(",")[0].trim():"")||(El(e)||e?.type==="array"&&El(e.items)?"application/json":"")}var Dl=e=>String(e).replace(/"/g,"%22").replace(/\r/g,"%0D").replace(/\n/g,"%0A");function Jh(e,t={},r=`----RapiDocFormBoundary${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`){let a=[];for(let[s,n]of e.entries()){let i=typeof n!="string",o=`--${r}\r
|
|
302
|
+
Content-Disposition: form-data; name="${Dl(s)}"`;i?o+=`; filename="${Dl(n.name??"blob")}"\r
|
|
303
|
+
Content-Type: ${n.type||t[s]||"application/octet-stream"}`:t[s]&&(o+=`\r
|
|
304
|
+
Content-Type: ${t[s]}`),a.push(`${o}\r
|
|
305
|
+
\r
|
|
306
|
+
`,i?n:n.replace(/\r?\n/g,`\r
|
|
307
|
+
`),`\r
|
|
308
|
+
`)}return a.push(`--${r}--\r
|
|
309
|
+
`),{body:new Blob(a),contentType:`multipart/form-data; boundary=${r}`}}function Gh(e=[]){let t=new FormData;return Array.isArray(e)&&e.forEach(r=>{r&&r.name&&(typeof File<"u"&&r.file instanceof File?t.append(r.name,r.file,r.file.name):r.value!==void 0&&r.value!==null&&r.value!==""&&(r.isArray?(Array.isArray(r.value)?r.value:[r.value]).filter(a=>a!==""&&a!=null).forEach(a=>{typeof File<"u"&&a instanceof File?t.append(r.name,a,a.name):t.append(r.name,String(a))}):t.append(r.name,String(r.value))))}),t}function Xh(e,{indentor:t=" ",textNodesOnSameLine:r=!0}={}){if(!e||typeof e!="string")return"";let a=e.split(/(<[^>]+>)/g).map(i=>i.trim()).filter(Boolean),s=0,n=[];for(let i=0;i<a.length;i++){let o=a[i],l=o.startsWith("</"),c=o.endsWith("/>"),d=/^<[^/!?]/.test(o)&&!c;l&&(s=Math.max(0,s-1));let p=t.repeat(s);if(r&&d&&i+2<a.length&&!a[i+1].startsWith("<")&&a[i+2].startsWith("</")){let h=o.match(/^<([a-zA-Z0-9_\-:]+)/)?.[1],u=a[i+2].match(/^<\/([a-zA-Z0-9_\-:]+)/)?.[1];if(h&&u&&h===u){n.push(`${p}${o}${a[i+1]}${a[i+2]}`),i+=2;continue}}n.push(`${p}${o}`),d&&s++}return n.join(`
|
|
310
|
+
`)}async function Yh(e){let t,r,a,s=!1,n="",i="",o="",l="",c=e.headers.get("content-type");if((await e.clone().text()).length===0)l="";else if(c){if(c=c.split(";")[0].trim(),c==="application/x-ndjson")l=await e.text();else if(c.includes("json"))if(/charset=[^"']+/.test(c)){let d=c.split("charset=")[1],p=await e.arrayBuffer();try{a=new TextDecoder(d).decode(p)}catch{a=new TextDecoder("utf-8").decode(p)}try{r=JSON.parse(a),l=JSON.stringify(r,null,2)}catch{l=a}}else r=await e.json(),l=JSON.stringify(r,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(c)?(s=!0,n="download"):c.startsWith("image")?(s=!0,n="image"):/^audio|^image|^video/.test(c)?(s=!0,n="view"):(a=await e.text(),l=c.includes("xml")?Xh(a,{textNodesOnSameLine:!0,indentor:" "}):a);if(s){let d=e.headers.get("content-disposition")||"",p="filename";if(d){let h=d.match(/filename\*=\s*UTF-8''([^;]+)/);if(h)p=decodeURIComponent(h[1]);else{let u=d.match(/filename="?([^"]+)"?/);u&&(p=u[1])}}o=p,t=await e.blob(),typeof URL<"u"&&URL.createObjectURL&&(i=URL.createObjectURL(t))}}else a=await e.text(),l=a;return{responseText:l,respJson:r,respBlob:t,respText:a,responseIsBlob:s,responseBlobType:n,responseBlobUrl:i,respContentDisposition:o}}function Qh(e,t={}){let{callback:r=!1,webhook:a=!1}=t,s=r===!0||r==="true"||a===!0||a==="true",n={},i={},o="",l="";if(!e||typeof e!="object")return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l};for(let c of Object.keys(e)){if(c==="$$ref")continue;o||=c;let d={},p=e[c]?.content;if(p&&typeof p=="object")for(let u of Object.keys(p)){let g=p[u];l||=u;let f=g?.schema?se(g.schema):null,y=qt(g?.schema,u,xe(g?.examples),xe(g?.example),!s,s,u.includes("json")?"json":"text");d[u]={description:e[c].description,examples:y,selectedExample:y[0]?.exampleId||"",schemaTree:f}}let h=[];if(e[c]?.headers)for(let u of Object.keys(e[c].headers))h.push({name:u,...e[c].headers[u]});n[c]=h,i[c]=d}return{headersForEachRespStatus:n,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l}}var{I:em}=qc,Cl=e=>e,tm=e=>e.strings===void 0,Tl=()=>document.createComment(""),gr=(e,t,r)=>{let a=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(r===void 0)r=new em(a.insertBefore(Tl(),s),a.insertBefore(Tl(),s),e,e.options);else{let n=r._$AB.nextSibling,i=r._$AM,o=i!==e;if(o){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==i._$AU&&r._$AP(l)}if(n!==s||o){let l=r._$AA;for(;l!==n;){let c=Cl(l).nextSibling;Cl(a).insertBefore(l,s),l=c}}}return r},it=(e,t,r=e)=>(e._$AI(t,r),e),rm={},Ol=(e,t=rm)=>e._$AH=t,am=e=>e._$AH,sn=e=>{e._$AR(),e._$AA.remove()},yr=ma(class extends fa{constructor(e){if(super(e),e.type!==Ne.PROPERTY&&e.type!==Ne.ATTRIBUTE&&e.type!==Ne.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!tm(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ne||t===O)return t;let r=e.element,a=e.name;if(e.type===Ne.PROPERTY){if(t===r[a])return ne}else if(e.type===Ne.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(a))return ne}else if(e.type===Ne.ATTRIBUTE&&r.getAttribute(a)===t+"")return ne;return Ol(e),t}}),Fl=Z`*,:before,:after{box-sizing:border-box}:host{interpolate-size:allow-keywords;container-type:inline-size}.tr{box-sizing:content-box;border-bottom:1px dotted #0000;flex:none;width:100%;transition:max-height .3s ease-out;display:flex;&.expanded-descr{max-height:3000px;@supports (interpolate-size:allow-keywords){max-height:max-content}}}.td{flex:none;display:block}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-all-descr .key{overflow:hidden}.key-descr{font-family:var(--font-sans);color:var(--muted-foreground);flex-shrink:1;align-items:flex-start;gap:4px;min-width:0;display:flex;overflow:hidden;& .descr-expand-toggle{top:0;text-align:center;user-select:none;width:1em;color:var(--foreground);cursor:pointer;visibility:hidden;border-radius:2px;font-weight:400;transition:transform .2s;position:absolute;inset-inline-start:0;transform:rotate(45deg);&:hover{color:var(--primary)}&:focus-visible{outline:2px solid var(--primary)}}& .descr-body{flex:1;min-width:0;padding-inline-start:calc(1em + 4px);position:relative;&>.descr-expand-toggle+*{margin-top:0}& .item-details{margin-top:2px}& .descr-chip{line-break:anywhere;margin-right:8px;display:inline-block}& .descr-summary{display:none}& .descr-placeholder{color:var(--muted-foreground)}}& .descr-label,& b{font-weight:500;font-size:var(--font-size-xs);color:var(--primary)}& .descr-value{font-family:var(--font-mono);font-size:var(--font-size-small);line-height:1}}.expanded-descr .key-descr .descr-expand-toggle{transform:rotate(-90deg)}.key-descr .descr-body.has-more>.descr-expand-toggle,.tr.expanded-descr .key-descr .descr-expand-toggle{visibility:visible}.expanded-all-descr .tr .key-descr .descr-body>.descr-expand-toggle{visibility:hidden}.collapsed-all-descr .tr.expanded-descr .descr-body{cursor:pointer}.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{white-space:nowrap;text-overflow:ellipsis;color:var(--foreground);overflow:hidden;&.has-more{cursor:pointer}&>.descr-expand-toggle+*{white-space:inherit;margin:0;padding:0;display:inline}&>.descr-expand-toggle+:is(ul,ol)>li{display:inline}&>.descr-expand-toggle+:is(h1,h2,h3,h4,h5,h6){font-size:var(--font-size-description);line-height:inherit;font-weight:600}& .descr-chip{display:inline}&>.descr-expand-toggle+:is(ul,ol)>li:not(:first-child),&>.descr-expand-toggle+*~*{display:none}}@supports (container-type:scroll-state){.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{container-type:scroll-state}@container scroll-state(scrollable:inline-end){.descr-body>*{cursor:pointer}.descr-body>.descr-expand-toggle{visibility:visible}}}.xxx-of-key{font-size:var(--font-size-xs);line-height:calc(var(--font-size-small) + 1px);border-radius:var(--radius);corner-shape:squircle;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);vertical-align:middle;margin-bottom:1px;padding:1px 6px;display:inline-block}.xxx-of-descr{font-family:var(--font-sans);color:var(--primary);font-size:var(--font-size-xs);vertical-align:middle;margin-inline-start:4px}.stri,.string,.uri,.url,.byte,.bina,.date,.pass,.ipv4,.ipv4,.uuid,.emai,.host{color:var(--green)}.inte,.numb,.number,.int6,.int3,.floa,.doub,.deci{color:var(--blue)}.null{color:var(--destructive)}.bool,.boolean{color:var(--orange)}.enum,.cons{color:var(--purple)}.recu{color:var(--brown)}.toolbar{width:100%;color:var(--primary);padding:2px 0;display:flex}.toolbar-item{cursor:pointer;margin:0 2px;padding:5px 0;&:first-of-type{margin:0 2px 0 0}}.schema-root-type{cursor:auto;color:var(--muted-foreground);text-transform:uppercase;font-weight:600}@container (width<500px){.tr{flex-wrap:wrap}.tr>.key-descr{flex-basis:100%;&:empty{display:none}}}`;function w(e,t,r,a){var s=arguments.length,n=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(n=(s<3?i(n):s>3?i(t,r,n):i(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n}var sm=/[*_`~[\]<>#|\\&\n]|https?:|ftp:|www\.|@|^([-+]|\d+[.)])\s|^-{3,}$/;function jl(e){return!sm.test(e)}var ba=new Map,nm=5e3;function im(e,t){let r=`${t}
|
|
311
|
+
|
|
312
|
+
${e}`,a=ba.get(r);if(a)return a;let s=e?T.lexer(e).find(h=>h.type!=="space"):null,n=oi(s),i=t?`<b>${t}${e?":":""}</b>`:"",o=!!i&&!!s&&s.type!=="paragraph",l=o?`${i} ${n||ii(s)}`:n,c=i&&e?`${i}${o?`
|
|
313
|
+
|
|
314
|
+
`:" "}${e}`:i||e,d=c?T.lexer(c):[],p=d.filter(h=>h.type!=="space");return a={summary:l?M(l):"",html:p.length?M(T.parser(d)).trim():"",hasMore:!!l||p.length>1||p[0]?.type==="list"&&p[0].items.length>1||/<br\s*\/?>(?!\s*$)/i.test(c)},ba.size>=nm&&ba.clear(),ba.set(r,a),a}function _l(e,t){return e==="never"?"false":e==="true"||e==="false"?e:t}var je=class extends fe{constructor(...e){super(...e),this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="true"}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.schemaHideReadOnly=_l(this.config.schemaHideReadOnly,this.schemaHideReadOnly),this.schemaHideWriteOnly=_l(this.config.schemaHideWriteOnly,this.schemaHideWriteOnly)),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}handleAllEvents(e){let t=e.target.closest(".open-bracket, .obj-toggle");if(t)this.toggleObjectExpand(t);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.closest(".descr-expand-toggle, .descr-body")){if(this.schemaDescriptionExpanded==="true"||e.target.closest("a")||window.getSelection()?.isCollapsed===!1)return;let r=e.target.closest(".tr");if(r&&(r.classList.contains("expanded-descr")||this.descrHasMore(e.target.closest(".descr-body")))){let a=r.classList.toggle("expanded-descr");r.querySelector(".descr-expand-toggle")?.setAttribute("aria-expanded",a?"true":"false")}}}descrHasMore(e){if(!e)return!1;let t=e.querySelector(":scope > .descr-expand-toggle");return t&&getComputedStyle(t).visibility==="visible"||e.scrollWidth>e.clientWidth}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){let t=e.target.closest(".open-bracket, .obj-toggle, .descr-expand-toggle, .schema-multiline-toggle");t&&(e.preventDefault(),t.click())}}toggleObjectExpand(e){let t=e.closest(".tr");if(!t)return;let r=t.classList.contains("collapsed");r?t.classList.replace("collapsed","expanded"):t.classList.replace("expanded","collapsed");let a=t.querySelector(".open-bracket, .obj-toggle");a&&a.setAttribute("aria-expanded",r?"true":"false")}isFieldHidden(e){return!!(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)}renderDeprecatedIcon(e){return e?.deprecated?m`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--destructive);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}getReadWriteBadge(e){return e?.readOnly?m`🆁`:e?.writeOnly?m`🆆`:""}getReadWriteTip(e){return e?.readOnly?"Read-Only":e?.writeOnly?"Write-Only":""}getDataTypeCss(e){return(e||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase()}hasDetailChips(e){return!!(e&&(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding))}renderDetailChips(e){return e?m`${e.constraints?m`<div class="descr-chip"><span class="descr-label">Constraints:</span> <span class="descr-value">${e.constraints}</span></div>`:""} ${e.defaultValue?m`<div class="descr-chip"><span class="descr-label">Default:</span> <span class="descr-value">${e.defaultValue}</span></div>`:""} ${e.allowedValues?m`<div class="descr-chip"><span class="descr-label">${e.type==="const"?"Value":"Allowed"}:</span> <span class="descr-value">${e.allowedValues}</span></div>`:""} ${e.pattern?m`<div class="descr-chip"><span class="descr-label">Pattern:</span> <span class="descr-value">${e.pattern}</span></div>`:""} ${e.contentMediaType?m`<div class="descr-chip"><span class="descr-label">Media-Type:</span> <span class="descr-value">${e.contentMediaType}</span></div>`:""} ${e.contentEncoding?m`<div class="descr-chip"><span class="descr-label">Encoding:</span> <span class="descr-value">${e.contentEncoding}</span></div>`:""}`:""}renderDescriptionHtml(e,t=""){return!e&&!t?"":m`${P(M(T(t?e?`<b>${t}:</b> ${e}`:`<b>${t}</b>`:e)))}`}renderDescrCell(e,t=null,r=""){let a=typeof e=="string"?e.trim():"",s=this.hasDetailChips(t);if(!a&&!r&&!s)return m`<div class="td key-descr"></div>`;let n,i;if(jl(a)&&jl(r))n=r?m`<p><b>${r}${a?":":""}</b> ${a}</p>`:a?m`<p>${a}</p>`:"",i=s&&!!n;else{let l=im(a,r);n=m`${l.summary?m`<span class="descr-summary">${P(l.summary)}</span>`:""}${l.html?P(l.html):""}`,i=l.hasMore||!!l.html&&s}let o=this.schemaDescriptionExpanded==="true";return m`<div class="td key-descr"><div class="descr-body m-markdown-small ${i?"has-more":""}"><span class="descr-expand-toggle" role="button" tabindex="0" aria-label="Toggle description" aria-expanded="${o?"true":"false"}">➔</span>${n}${s?m`<div class="item-details">${this.renderDetailChips(t)}</div>`:""}</div></div>`}renderToolbar(e){return m`<div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?m`<div style="flex:1"></div><div part="schema-toolbar-item schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div>`}};w([k({type:Object})],je.prototype,"config",void 0),w([k({type:Object})],je.prototype,"data",void 0),w([k({type:Number,attribute:"schema-expand-level"})],je.prototype,"schemaExpandLevel",void 0),w([k({type:String,attribute:"schema-description-expanded"})],je.prototype,"schemaDescriptionExpanded",void 0),w([k({type:String,attribute:"allow-schema-description-expand-toggle"})],je.prototype,"allowSchemaDescriptionExpandToggle",void 0),w([k({type:String,attribute:"schema-hide-read-only"})],je.prototype,"schemaHideReadOnly",void 0),w([k({type:String,attribute:"schema-hide-write-only"})],je.prototype,"schemaHideWriteOnly",void 0);var ql=class extends je{static get styles(){return[Je,Fl,ya,Z`.tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);direction:ltr;& .tr:hover{background-color:#00000026}& .tr.expanded-descr{max-height:none}&.expanded-all-descr .tr,&.collapsed-all-descr .tr.expanded-descr{border-bottom:1px solid color-mix(in srgb, var(--border) 60%, transparent)}&.collapsed-all-descr .tr.expanded-descr{box-shadow:0 -1px 0 color-mix(in srgb, var(--border) 60%, transparent)}& .key{max-width:300px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 8px);overflow:hidden;& .key{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}}.tr{&.expanded{&:hover{&>.td.key>.open-bracket,&+.inside-bracket+.close-bracket{color:var(--primary)}&+.inside-bracket{border-left:1px solid var(--muted-foreground)}}& .open-bracket .open-bracket-collapsed{display:none}}&.collapsed{&+.inside-bracket,&+.inside-bracket+.close-bracket{display:none;overflow:hidden}& .open-bracket .open-bracket-expanded{display:none}}}@container (width<500px){.tree.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(2 * (var(--font-size-small) + 8px))}}.inside-bracket{&.xxx-of-option{border-left:1px solid #0000}&.object,&.array{border-left:1px dotted var(--border)}}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}.close-bracket{font-family:var(--font-mono);display:inline-block}`,ht]}render(){if(!this.data)return m`<div class="tree"><span class="mono-font" style="color:var(--destructive)">Schema not found</span></div>`;let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return m`<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span> ${this.renderAST(this.data)}</div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let s=400-a*12,n=r<this.schemaExpandLevel,i=this.getReadWriteBadge(e),o=this.getReadWriteTip(e),l=e.nullable?"null\u2503":"",c=e.nullable?"nullable":"",d=this.renderDeprecatedIcon(e);if(e.kind==="array"){let p=e.items;if(!p){let u=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${n?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${u}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array">${l}[ ]</span></div>${this.renderDescrCell(e.description)}</div>`}if(p.kind==="primitive"){let u=p.format||p.contentMediaType||p.type||"string",g=this.getDataTypeCss(u),f=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr primitive ${c}" title="${e.deprecated||p.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated||p.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${f}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${g}" title="${o||O}">${l}[${u}]${i}</span></div>${this.renderDescrCell(e.description||p.description,p)}</div>`}if(p.kind==="object"){let u=m`<span class="open-bracket array-of-object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${n?"true":"false"}">${l}<span class="open-bracket-expanded">[{</span><span class="open-bracket-collapsed">[{...}]</span></span>`,g=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${n?"expanded":"collapsed"} object ${c}" title="${e.deprecated||p.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated||p.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${g}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${u}</div>${this.renderDescrCell(e.description||p.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${p.properties?.map(f=>this.renderAST(f,"object",r+1,a+1))} ${p.patternProperties?.map(f=>this.renderAST(f,"object",r+1,a+1))} ${p.additionalProperties?this.renderAST(p.additionalProperties,"object",r+1,a+1):""} ${p.unions?.map(f=>this.renderAST(f,"object",r+1,a+1))}</div><div class="close-bracket">${"}]"}</div>`}if(p.kind==="array"){let u=e.arrayType==="object"?"":e.arrayType,g=m`<span class="open-bracket array-of-array" data-array-type="${u}" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${n?"true":"false"}">${l}<span class="open-bracket-expanded">[[ ${u} </span><span class="open-bracket-collapsed">[[...]]</span></span>`,f=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${n?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${f}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${g}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(p,"array",r+1,a+1)}</div><div class="close-bracket">${"]]"}</div>`}let h=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${n?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${h}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${n?"true":"false"}">${l}<span class="open-bracket-expanded">[</span><span class="open-bracket-collapsed">[...]</span></span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(p,"array",r+1,a+1)}</div><div class="close-bracket">]</div>`}if(e.kind==="object"){let p=m`<span class="open-bracket object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${n?"true":"false"}">${l}<span class="open-bracket-expanded">{</span><span class="open-bracket-collapsed">{...}</span></span>`,h=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr ${n?"expanded":"collapsed"} object ${c}" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${h}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${p}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${e.properties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${e.patternProperties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+1):""} ${e.unions?.map(u=>this.renderAST(u,"object",r+1,a+1))}</div><div class="close-bracket">${"}"}</div>`}if(e.kind==="union"){let p=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),h=t==="xxx-of-option"?a:a+1,u=e.name&&t!=="xxx-of-option",g=u?s-12:s,f=m`<div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${g}px"><span class="key-label xxx-of-key">${p}</span></div>${u?"":this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:0">${e.options?.map((y,v)=>m`<div><div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${g}px"><span class="key-label xxx-of-key">OPT ${y.optionIndex||v+1}</span> ${y.optionTitle?m`<span class="xxx-of-descr">${y.optionTitle}</span>`:""}</div></div>${this.renderAST(y,"xxx-of-option",r,h)}</div>`)}</div>`;return m`${e.properties?.map(y=>this.renderAST(y,"object",r,a))} ${u?m`<div class="tr expanded xxx-of-prop"><div class="td key" style="min-width:${s}px"><span class="key-label" title="${e.name}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:${12}px">${f}</div>`:f}`}if(e.kind==="primitive"){let p=this.getDataTypeCss(e.type),h=e.name?`${e.name}${o?` (${o})`:""}`:"";return m`<div class="tr primitive" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${s}px">${d}${e.name?m`<span class="key-label" title="${h}">${e.name}${e.required?m`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${p}" title="${o||O}">${t==="array"?`[${e.type}]`:e.type}${i}</span></div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};ql=w([Se("schema-tree")],ql);var va=class extends fe{constructor(...e){super(...e),this.placeholder="",this.value=[]}static get properties(){return Object.fromEntries(this.elementProperties||[])}render(){let e="";return Array.isArray(this.value)&&(e=m`${this.value.filter(t=>t!==""&&t!=null&&String(t).trim()!=="").map(t=>m`<span class="tag">${t}</span>`)}`),m`<div class="tags" @click="${t=>this.focusEditor(t)}">${e} <input type="text" class="editor" @paste="${t=>this.afterPaste(t)}" @keydown="${t=>this.afterKeyDown(t)}" @blur="${t=>this.onBlur(t)}" placeholder="${this.placeholder||""}"></div>`}focusEditor(e){e.target.classList.contains("tags")&&this.shadowRoot?.querySelector(".editor")?.focus()}dispatchEvents(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}}))}afterPaste(e){let t=(e.clipboardData||window.clipboardData).getData("Text"),r=t?t.split(",").filter(a=>a.trim()!==""):"";r&&(this.value=Array.isArray(this.value)?[...this.value,...r]:r,this.dispatchEvents()),e.preventDefault()}afterKeyDown(e){if(e.key==="Enter"||e.keyCode===13){e.stopPropagation(),e.preventDefault();let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}else(e.key==="Backspace"||e.key==="Delete"||e.keyCode===8||e.keyCode===46)&&(!e.target.value||e.target.value.length===0)&&Array.isArray(this.value)&&this.value.length>0&&(e.preventDefault(),this.value=this.value.slice(0,-1),this.dispatchEvents())}onBlur(e){let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}static get styles(){return[Z`.tags{box-sizing:border-box;min-height:calc(2.75 * var(--font-size-small) + 2px);border-radius:var(--radius);border:1px solid var(--input);cursor:text;background:var(--input-background);outline:none;flex-wrap:wrap;align-items:center;padding:0;transition:border-color .2s,box-shadow .2s;display:flex;overflow:hidden;&:focus-within{border-color:var(--primary);box-shadow:var(--focus-shadow)}}.tag,.editor{margin:2px;padding:3px}.tag{border:1px solid var(--input);background:var(--muted);color:var(--foreground);border-radius:var(--radius);word-break:break-all;font-size:var(--font-size-small)}.tag:hover~#cursor{display:block}.editor{color:var(--foreground);min-width:60px;line-height:inherit;font-family:inherit;font-size:calc(var(--font-size-small) + 1px);background:0 0;border:1px solid #0000;outline:none;flex:1}.editor::placeholder{color:var(--muted-foreground);opacity:1}`]}};w([k({type:String})],va.prototype,"placeholder",void 0),w([k({type:Array,attribute:"value",converter:{fromAttribute:e=>e?e.split(",").filter(t=>t.trim()!==""):[],toAttribute:e=>Array.isArray(e)?e.join(","):e},hasChanged(e,t){return e===t?!1:!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.some((r,a)=>r!==t[a])}})],va.prototype,"value",void 0),va=w([Se("tag-input")],va);function om(e,t){return m`<div class="value-list" part="value-list"><span class="param-constraint-label value-list-label" part="value-list-label">${e}</span><ul class="value-list-items" part="value-list-items" role="list">${t.map(r=>m`<li>${r}</li>`)}</ul></div>`}function Rl(e,t,r){let a=n=>m`<ul class="value-list-items" part="value-list-items" role="list">${n.map(i=>m`<li>${i}</li>`)}</ul>`,s=(n,i)=>m`<dt class="param-constraint-label" part="param-constraint-label">${n}</dt><dd>${i}</dd>`;return m`<dl class="param-constraint" part="param-constraint">${e.default?s("Default:",e.default):""} ${e.pattern?s("Pattern:",e.pattern):""} ${e.constrain?s("Limits:",a(e.constrain.split("\u2503").map(n=>n.trim()).filter(Boolean))):""} ${t?s("Allowed:",a(t)):""} ${r?s("Examples:",a(r)):""}</dl>`}function Il(e,t,r=[]){return!e?.trim()&&!!t&&r.length>0&&!Go(r)}function xa(e,t,r){return m`${t==="array"?"[":""} <button type="button" part="anchor anchor-param-example" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-example-type="${t==="array"?t:"string"}" data-example="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" title="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" @click="${a=>{let s=a.target.closest(".param-list").querySelector(`[data-pname="${r}"]`);s&&(s.value=a.target.dataset.exampleType==="array"?a.target.dataset.example.split("~|~"):a.target.dataset.example)}}">${e.printableValue||e.value}</button> ${t==="array"?"] ":""}`}function lm(e,t,r){return om("Examples:",e.map(a=>xa.call(this,a,t,r)))}function cm(e,t,r){return m`<ul class="param-example-list" part="param-example-list" role="list">${e.map(a=>m`<li>${xa.call(this,a,t,r)} ${a.summary?.length>0?m`<span>(${a.summary})</span>`:""} ${a.description?.length>0?m`<div class="m-markdown-small">${P(M(T(a.description)))}</div>`:""}</li>`)}</ul>`}function Ll(e,t,r=[]){return m`${r.length>0?Go(r)?m`<span class="param-constraint-label">Examples: </span>${cm.call(this,r,t,e)}`:lm.call(this,r,t,e):""}`}var Bl=e=>typeof e=="object"&&e&&!Array.isArray(e)?{Example:{value:e}}:xe(e);function wa(e){let t=this.parameters?this.parameters.filter(s=>s.in===e):[];if(t.length===0)return"";let r="";e==="path"?r="Path parameters":e==="query"?r="Query-string parameters":e==="header"?r="Request headers":e==="cookie"&&(r="Cookies");let a=[];for(let s of t){let[n,i,o]=vh(s);if(!n)continue;let l=ia(n);if(!l)continue;let c=se(n),d="form",p=!0,h=!1;(e==="query"||e==="header"||e==="path")&&(s.style&&"form spaceDelimited pipeDelimited".includes(s.style)?d=s.style:i&&(d=i),typeof s.explode=="boolean"&&(p=s.explode),typeof s.allowReserved=="boolean"&&(h=s.allowReserved));let u=Jo(xe(s.examples)||Bl(s.example)||Bl(o?.example)||xe(o?.examples)||xe(l.examples)||xe(l.example),l.type);!u.exampleVal&&(l.type==="object"||l.type.split("\u2503").includes("object"))&&(u.exampleVal=qt(n,i||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1)[0]?.exampleValue||"");let g=l.default||l.constrain||l.allowedValues||l.pattern,f=Il(s.description,g,u.exampleList);a.push(m`<li class="param ${s.deprecated?"deprecated":""}" part="param" title="${s.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${s.deprecated?"deprecated":""}" part="param-name">${s.deprecated?m`<svg class="param-deprecated-icon" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${s.required?m`<span class="param-required" title="Required">*</span>`:""} ${s.name}</div><div class="param-type" part="param-type">${l.type==="array"||l.type.split("\u2503").includes("array")?`${l.arrayType||l.type}`:`${l.format&&!l.type.includes("\u2503")?l.format:l.contentMediaType&&!l.type.includes("\u2503")?l.contentMediaType:l.type}`}</div></div>${this.allowTry==="true"?m`<div class="param-input" part="param-input">${l.type==="array"||l.type.split("\u2503").includes("array")&&!l.type.split("\u2503").includes("object")?m`<tag-input class="request-param" id="tag-input-request-param-${s.name}" style="width:100%" data-ptype="${e}" data-pname="${s.name}" data-item-type="${n.items?.type||""}" data-example="${Array.isArray(u.exampleVal)?u.exampleVal.join("~|~"):u.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${p}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="true" placeholder="add-multiple ↩" .value="${s["x-fill-example"]==="no"?Hs:yr(this.fillRequestFieldsWithExample==="true"?Array.isArray(u.exampleVal)?u.exampleVal:[u.exampleVal]:Hs)}" @input="${y=>{let v=this.getRequestPanel(y);this.liveCURLSyntaxUpdate(v)}}" @change="${y=>{let v=this.getRequestPanel(y);this.liveCURLSyntaxUpdate(v)}}"></tag-input>`:l.type==="object"||l.type.split("\u2503").includes("object")?m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${y=>{if(y.target.tagName.toLowerCase()==="button"){let v={...this.activeParameterSchemaTabs};v[s.name]=y.target.dataset.tab,this.activeParameterSchemaTabs=v}}}"><button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[s.name]==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div>${m`<div part="tab-content" class="tab-content col" data-tab="example" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"block":"none"};padding-left:5px;width:100%"><textarea id="textarea-request-param-${s.name}" class="textarea request-param" part="textarea textarea-param" data-ptype="${e}-object" data-pname="${s.name}" data-example="${typeof u.exampleVal=="object"?JSON.stringify(u.exampleVal,null,2):u.exampleVal}" data-param-serialize-style="${d}" data-param-serialize-explode="${p}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" spellcheck="false" .value="${s["x-fill-example"]==="no"?"":yr(this.fillRequestFieldsWithExample==="true"?typeof u.exampleVal=="object"?JSON.stringify(u.exampleVal,null,2):u.exampleVal:"")}" style="resize:vertical;width:100%;height:${"read focused".includes(this.renderStyle)?"180px":"120px"}" @input="${y=>{let v=this.getRequestPanel(y);this.liveCURLSyntaxUpdate(v)}}"></textarea></div>`} ${m`<div part="tab-content" class="tab-content col" data-tab="schema" style="display:${this.activeParameterSchemaTabs[s.name]==="example"?"none":"block"};padding-left:5px;width:100%"><schema-tree class="json" style="display:block" .data="${c}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly.includes(this.method)}" schema-hide-write-only="${this.schemaHideWriteOnly.includes(this.method)}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
|
|
233
315
|
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
|
234
|
-
anchor:anchor, anchor-param-example:anchor-param-example"></schema-tree></div>`}</div>`:p`<input type="${l.format==="password"?"password":"text"}" spellcheck="false" style="width:100%" id="input-request-param-${s.name}" class="request-param" part="textbox textbox-param" data-ptype="${e}" data-pname="${s.name}" data-example="${Array.isArray(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="false" .value="${s["x-fill-example"]==="no"?"":Jt(this.fillRequestFieldsWithExample==="true"?m.exampleVal:"")}" @input="${f=>{let b=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(b)}}">`}</td>`:""} ${l.default||l.constrain||l.allowedValues||l.pattern?p`<td colspan="${this.allowTry==="true"?"1":"2"}"><div class="param-constraint">${l.default?p`<span style="font-weight:700">Default: </span>${l.default}<br>`:""} ${l.pattern?p`<span style="font-weight:700">Pattern: </span>${l.pattern}<br>`:""} ${l.constrain?p`${l.constrain}<br>`:""} ${l.allowedValues&&String(l.allowedValues).split("\u2503").map((f,b)=>p`${b>0?"\u2503":p`<span style="font-weight:700">Allowed:</span>`} ${p`<a part="anchor anchor-param-constraint" class="${this.allowTry==="true"?"":"inactive-link"}" data-type="${l.type==="array"?l.type:"string"}" data-enum="${f.trim()}" @click="${x=>{let v=x.target.closest("table").querySelector(`[data-pname="${s.name}"]`);v&&(v.value=x.target.dataset.type==="array"?[x.target.dataset.enum]:x.target.dataset.enum)}}">${f}</a>`}`)}</div></td>`:p`<td></td>`}</tr><tr>${this.allowTry==="true"?p`<td style="border:none"></td>`:""}<td colspan="2" style="border:none"><span class="m-markdown-small">${F(O(E(s.description||"")))} </span>${vo.call(this,s.name,l.type,m.exampleList)}</td></tr>`)}return p`<div class="table-title top-gap">${a}</div><div style="display:block;overflow-x:auto;max-width:100%"><table role="presentation" class="m-table" style="width:100%;word-break:break-word">${r}</table></div>`}var xo=(e,t,a)=>{let r=new Map;for(let s=t;s<=a;s++)r.set(e[s],s);return r},Zp=Va(class extends Ka{constructor(e){if(super(e),e.type!==Ce.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,a){let r;a===void 0?a=t:t!==void 0&&(r=t);let s=[],n=[],i=0;for(let o of e)s[i]=r?r(o,i):i,n[i]=a(o,i),i++;return{values:n,keys:s}}render(e,t,a){return this.dt(e,t,a).values}update(e,[t,a,r]){let s=Mp(e),{values:n,keys:i}=this.dt(t,a,r);if(!Array.isArray(s))return this.ut=i,n;let o=this.ut??=[],l=[],c,d,u=0,h=s.length-1,m=0,y=n.length-1;for(;u<=h&&m<=y;)if(s[u]===null)u++;else if(s[h]===null)h--;else if(o[u]===i[m])l[m]=We(s[u],n[m]),u++,m++;else if(o[h]===i[y])l[y]=We(s[h],n[y]),h--,y--;else if(o[u]===i[y])l[y]=We(s[u],n[y]),Zt(e,l[y+1],s[u]),u++,y--;else if(o[h]===i[m])l[m]=We(s[h],n[m]),Zt(e,s[u],s[h]),h--,m++;else if(c===void 0&&(c=xo(i,m,y),d=xo(o,u,h)),c.has(o[u]))if(c.has(o[h])){let f=d.get(i[m]),b=f===void 0?null:s[f];if(b===null){let x=Zt(e,s[u]);We(x,n[m]),l[m]=x}else l[m]=We(b,n[m]),Zt(e,s[u],b),s[f]=null;m++}else vs(s[h]),h--;else vs(s[u]),u++;for(;m<=y;){let f=Zt(e,l[y+1]);We(f,n[m]),l[m++]=f}for(;u<=h;){let f=s[u++];f!==null&&vs(f)}return this.ut=i,yo(e,l),Y}}),wo=e=>e??I,Jp=class extends se{static get properties(){return{config:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly)),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),(!this.schemaDescriptionExpanded||!"true false".includes(this.schemaDescriptionExpanded))&&(this.schemaDescriptionExpanded="false"),(!this.schemaHideReadOnly||!"true false".includes(this.schemaHideReadOnly))&&(this.schemaHideReadOnly="true"),(!this.schemaHideWriteOnly||!"true false".includes(this.schemaHideWriteOnly))&&(this.schemaHideWriteOnly="true")}static get styles(){return[qe,go,B`.table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px)}.table .tr{border-bottom:1px dotted var(--border);width:calc(100% - 5px);padding:0 0 0 5px}.table .td{padding:4px 0}.table .key{width:var(--table-schema-key-width,240px);text-overflow:var(--table-schema-key-text-overflow,ellipsis);white-space:var(--table-schema-key-whitespace,nowrap)}.key .key-label{font-size:var(--font-size-mono)}.key.deprecated .key-label{color:var(--red)}.table .key-type{white-space:normal;width:150px}.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + var(--font-size-small));overflow:hidden}.table .tr.expanded-descr{max-height:none}.obj-toggle{color:var(--primary);cursor:pointer;font-size:calc(var(--font-size-small) + 4px);font-family:var(--font-mono);text-align:center;user-select:none;background-clip:border-box;border:1px solid #0000;border-radius:2px;min-width:14px;margin-left:-16px;padding:0 2px;display:inline-block}.obj-toggle:hover{border-color:var(--primary)}.tr.expanded .obj-toggle:after{content:"-"}.tr.collapsed .obj-toggle:after{content:"+"}.tr.expanded+.object-body{display:block}.tr.collapsed+.object-body{display:none}`,Xe]}render(){if(!this.data)return"";let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return p`<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${a=>this.handleAllEvents(a)}"><div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?p`<div style="flex:1"></div><div part="schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div><span part="schema-description" class="m-markdown">${F(O(E(t)))}</span><div style="border:1px solid var(--border)"><div style="display:flex;background:var(--card);padding:8px 4px;border-bottom:1px solid var(--border)"><div class="key" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Field</div><div class="key-type" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Type</div><div class="key-descr" style="font-family:var(--font-regular);font-weight:700;color:var(--foreground)">Description</div></div>${this.renderAST(this.data)}</div></div>`}renderAST(e,t="",a=0,r=0){if(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)return"";let s=16*(r+1),n=a<this.schemaExpandLevel,i=e.deprecated?p`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:"",o=e.readOnly?" \u{1F181}":e.writeOnly?" \u{1F186}":"",l=e.readOnly?"Read-Only":e.writeOnly?"Write-Only":"";if(e.kind==="array"){let c=e.items;if(!c){let f=!!e.description,b=J(e.description),x=f&&b?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`<div class="tr array" data-obj="${e.name||""}"><div class="td key" style="padding-left:${s}px"><span class="key-label">${i}${e.name||""}</span> ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">array${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${f?p`<span class="m-markdown-small">${x} ${F(O(E(e.description)))}</span>`:""}</div></div>`}if(c.kind==="primitive"){let f=c.format||c.contentMediaType||c.type||"string",b=f.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),x=!!(e.description||c.description),v=!!(c.constraints||c.defaultValue||c.allowedValues||c.pattern||c.contentMediaType||c.contentEncoding),k=v||J(e.description)||J(c.description),g=x&&k?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",w=p`${c.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${c.constraints}</div>`:""} ${c.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${c.defaultValue}</div>`:""} ${c.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${c.type==="const"?"Value":"Allowed"}: </span>${c.allowedValues}</div>`:""} ${c.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${c.pattern}</div>`:""} ${c.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${c.contentMediaType}</div>`:""} ${c.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${c.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated||c.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated||c.deprecated?"deprecated":""}" style="padding-left:${s}px">${i} ${e.name?p`<span class="key-label">${e.name}</span>`:""} ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type ${b}" title="${l}">[${f}]${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${x?p`<span class="m-markdown-small">${g} ${F(O(E(e.description||c.description)))}</span>`:""} ${x&&v?p`<div class="item-details">${w}</div>`:w}</div></div>`}let d=c.kind==="object"?"array of object":`array of array ${e.arrayType?`of ${e.arrayType}`:""}`,u=!!(e.description||c.description),h=J(e.description)||J(c.description),m=u&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=c.kind!=="object"||!!(c.properties&&c.properties.length>0||c.patternProperties&&c.patternProperties.length>0||c.additionalProperties||c.unions&&c.unions.length>0);return p`<div class="tr ${n?"expanded":"collapsed"} array" data-obj="${e.name||""}" title="${e.deprecated?`Deprecated ${e.name}`:e.name||""}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${e.name&&y?p`<span class="obj-toggle" data-obj="${e.name}"></span>`:""} <span class="key-label" style="display:inline-block;${y?"margin-left:-6px;":""}">${i}${e.name||""} </span>${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">${d}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${u?p`<span class="m-markdown-small">${m} ${F(O(E(e.description||c.description||"")))}</span>`:""}</div></div>${y?p`<div class="object-body">${c.kind==="object"?p`${c.properties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.patternProperties?.map(f=>this.renderAST(f,"object",a+1,r+1))} ${c.additionalProperties?this.renderAST(c.additionalProperties,"object",a+1,r+1):""} ${c.unions?.map(f=>this.renderAST(f,"object",a+1,r+1))}`:this.renderAST(c,"array",a+1,r+1)}</div>`:""}`}if(e.kind==="object"){let c=e.dataTypeLabel||"object",d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",m=!!(e.properties&&e.properties.length>0||e.patternProperties&&e.patternProperties.length>0||e.additionalProperties||e.unions&&e.unions.length>0);return p`${e.name?p`<div class="tr ${n?"expanded":"collapsed"} object" data-obj="${e.name}" title="${e.deprecated?`Deprecated ${e.name}`:e.name}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${m?p`<span class="obj-toggle" data-obj="${e.name}"></span>`:""} <span class="key-label" style="display:inline-block;${m?"margin-left:-6px;":""}">${i}${e.name} </span>${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type" title="${l}">${c}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${h} ${F(O(E(e.description||"")))}</span>`:""}</div></div>`:""} ${m?p`<div class="object-body">${e.properties?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))} ${e.patternProperties?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",a+1,r+ +!!e.name):""} ${e.unions?.map(y=>this.renderAST(y,"object",a+1,r+ +!!e.name))}</div>`:""}`}if(e.kind==="union"){let c=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),d=!!e.description,u=J(e.description),h=d&&u?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";return p`${e.properties?.map(m=>this.renderAST(m,"object",a,r))}<div class="tr expanded xxx-of" data-obj="${c}"><div class="td key" style="padding-left:${s}px"><span class="xxx-of-key" style="margin-left:-6px">${c}</span></div><div class="td key-type"></div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${h} ${F(O(E(e.description||"")))}</span>`:""}</div></div><div class="object-body">${e.options?.map((m,y)=>p`<div class="tr expanded xxx-of-option" data-obj="OPTION ${m.optionIndex||y+1}"><div class="td key" style="padding-left:${s+16}px"><span class="xxx-of-key">OPT ${m.optionIndex||y+1}</span> ${m.optionTitle?p`<span class="xxx-of-descr">${m.optionTitle}</span>`:""}</div><div class="td key-type"></div><div class="td key-descr"></div></div><div class="object-body">${this.renderAST(m,"xxx-of-option",a+1,r+1)}</div>`)}</div>`}if(e.kind==="primitive"){let c=(e.type||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),d=!!(e.description||e.title),u=!!(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.contentMediaType||e.contentEncoding),h=u||J(e.description),m=d&&h?p`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"",y=p`${e.constraints?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Constraints: </span>${e.constraints}</div>`:""} ${e.defaultValue?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Default: </span>${e.defaultValue}</div>`:""} ${e.allowedValues?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">${e.type==="const"?"Value":"Allowed"}: </span>${e.allowedValues}</div>`:""} ${e.pattern?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Pattern: </span>${e.pattern}</div>`:""} ${e.contentMediaType?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Media-Type: </span>${e.contentMediaType}</div>`:""} ${e.contentEncoding?p`<div style="display:inline-block;line-break:anywhere;margin-right:8px"><span class="bold-text">Encoding: </span>${e.contentEncoding}</div>`:""}`;return p`<div class="tr primitive" title="${e.deprecated?"Deprecated":""}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${i} ${e.name?p`<span class="key-label">${e.name}</span>`:""} ${e.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="td key-type ${c}" title="${l}">${t==="array"?`[${e.type}]`:e.type}${o}</div><div class="td key-descr" style="font-size:var(--font-size-small)">${d?p`<span class="m-markdown-small">${m} ${F(O(E(e.title?e.description?`<b>${e.title}:</b> ${e.description}`:`<b>${e.title}</b>`:e.description)))}</span>`:""} ${d&&u?p`<div class="item-details">${y}</div>`:y}</div></div>`}return""}handleAllEvents(e){if(e.target.classList.contains("obj-toggle"))this.toggleObjectExpand(e);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.classList.contains("descr-expand-toggle")){let t=e.target.closest(".tr");t&&(t.classList.toggle("expanded-descr"),t.classList.contains("expanded-descr")?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight="")}}toggleObjectExpand(e){let t=e.target.closest(".tr");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};customElements.define("schema-table",Jp);function Gp(e,t,a){let r=G(t),s=mt(t,"json",de(t.examples),de(t.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return p`<div part="tab-panel" class="tab-panel row" style="min-height:220px;border-left:6px solid var(--border);align-items:stretch"><div style="width:24px;background:var(--border)"><div class="row" style="flex-direction:row-reverse;width:160px;height:24px;transform:rotate(270deg) translateX(-160px);transform-origin:top left;display:block" @click="${n=>{if(n.target.classList.contains("v-tab-btn")){let{tab:i}=n.target.dataset;if(i){let o=n.target.closest(".tab-panel"),l=o.querySelector(`.v-tab-btn[data-tab="${i}"]`),c=[...o.querySelectorAll(`.v-tab-btn:not([data-tab="${i}"])`)],d=o.querySelector(`.tab-content[data-tab="${i}"]`),u=[...o.querySelectorAll(`.tab-content:not([data-tab="${i}"])`)];l.classList.add("active"),d.style.display="block",c.forEach(h=>{h.classList.remove("active")}),u.forEach(h=>{h.style.display="none"})}}n.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=n.target.dataset.tab)}}"><button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button class="v-tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div></div>${p`<div class="tab-content col" data-tab="example" style="display:${this.activeSchemaTab==="example"?"block":"none"};padding-left:5px;width:100%"><textarea class="textarea" part="textarea textarea-param" style="width:100%;border:none;resize:vertical" data-array="false" data-ptype="${a.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${e}" data-example="${s[0]?.exampleValue||""}" .value="${Jt(this.fillRequestFieldsWithExample==="true"&&s[0]?.exampleValue||"")}" spellcheck="false"></textarea></div>`} ${p`<div class="tab-content col" data-tab="schema" style="display:${this.activeSchemaTab==="example"?"none":"block"};padding-left:5px;width:100%">${this.schemaStyle==="table"?p`<schema-table .data="${r}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:p`<schema-tree .data="${r}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}</div>`}function Xp(e,t,a=""){let r=[],s=Xi(e),n=Yi(e);if(Object.keys(s).length>0){for(let i in s){let o=s[i];if(o.readOnly)continue;let l=o.examples||o.example||"",c=o.type,d=Ba(o),u="read focused".includes(this.renderStyle)?"200px":"160px",h=Ji(d.examples||d.example,d.type);r.push(p`<tr title="${o.deprecated?"Deprecated":""}"><td style="width:${u};min-width:100px"><div class="param-name ${o.deprecated?"deprecated":""}">${i}${n.includes(i)||o.required?p`<span style="color:var(--red)">*</span>`:""}</div><div class="param-type">${d.type==="array"||d.type.split("\u2503").includes("array")?`${d.arrayType||d.type}`:`${d.format&&!d.type.includes("\u2503")?d.format:d.contentMediaType&&!d.type.includes("\u2503")?d.contentMediaType:d.type}`}</div></td><td style="${c==="object"?"width:100%; padding:0;":this.allowTry==="true"?"":"display:none;"}min-width:100px" colspan="${c==="object"?2:1}">${c==="array"?Zi(o.items)?p`<div class="file-input-container col" style="align-items:flex-start;width:100%">${Zp(this.fileInputKeys[i]??[0],m=>m,(m,y)=>p`<div class="input-set row" style="width:100%;margin-top:${y>0?"4px":"0"}"><input type="file" part="file-input" style="width:100%" data-pname="${i}" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-array="false" data-file-array="true"> <button class="file-input-remove-btn" @click="${()=>this.onRemoveFileInput(i,m)}">✕</button></div>`)} <button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:4px 0 0 0;padding:2px 8px;align-self:flex-start" @click="${()=>this.onAddFileInput(i)}">ADD</button></div>`:p`<tag-input style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${i}" data-example="${Array.isArray(l)?l.join("~|~"):l}" data-array="true" placeholder="add-multiple ↩" .value="${Array.isArray(l)?Array.isArray(l[0])?l[0]:l:ps}"></tag-input>`:p`${c==="object"?Gp.call(this,i,o,t):p`${this.allowTry==="true"?p`<input .value="${this.fillRequestFieldsWithExample==="true"?h.exampleVal:""}" spellcheck="false" type="${Zi(o)?"file":o.format==="password"?"password":"text"}" part="textbox textbox-param" style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${i}" data-example="${Array.isArray(l)?l[0]:l}" data-array="false">`:""}`}`}</td>${c==="object"?"":p`<td>${d.default||d.constrain||d.allowedValues||d.pattern?p`<div class="param-constraint">${d.default?p`<span style="font-weight:700">Default: </span>${d.default}<br>`:""} ${d.pattern?p`<span style="font-weight:700">Pattern: </span>${d.pattern}<br>`:""} ${d.constrain?p`${d.constrain}<br>`:""} ${d.allowedValues&&String(d.allowedValues).split("\u2503").map((m,y)=>p`${y>0?"\u2503":p`<span style="font-weight:700">Allowed:</span>`} ${p`<a part="anchor anchor-param-constraint" class="${this.allowTry==="true"?"":"inactive-link"}" data-type="${d.type==="array"?d.type:"string"}" data-enum="${m.trim()}" @click="${f=>{let b=f.target.closest("table").querySelector(`[data-pname="${i}"]`);if(b){b.value=f.target.dataset.type==="array"?[f.target.dataset.enum]:f.target.dataset.enum;let x=this.getRequestPanel(f);this.liveCURLSyntaxUpdate(x)}}}">${m}</a>`}`)}</div>`:""}</td>`}</tr>${c==="object"?"":p`<tr><td style="border:none"></td><td colspan="2" style="border:none;margin-top:0;padding:0 5px 8px 5px"><span class="m-markdown-small">${F(O(E(o.description||"")))} </span>${vo.call(this,i,d.type,h.exampleList)}</td></tr>`}`)}return p`<table role="presentation" style="width:100%" class="m-table" @input="${i=>{let o=this.getRequestPanel(i);this.liveCURLSyntaxUpdate(o)}}" @change="${i=>{let o=this.getRequestPanel(i);this.liveCURLSyntaxUpdate(o)}}">${r}</table>`}return p`<textarea class="textarea dynamic-form-param ${t}" part="textarea textarea-param" spellcheck="false" data-pname="dynamic-form" data-ptype="${t}" .value="${Jt(a)}" style="width:100%"></textarea> ${e.description?p`<span class="m-markdown-small">${F(O(E(e.description)))}</span>`:""}`}function Yp(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let e="",t="",a="",r="",s="",n=[],{content:i}=this.request_body;for(let o in i)n.push({mimeType:o,schema:i[o].schema,example:i[o].example,examples:i[o].examples}),this.selectedRequestBodyType||=o;return e=n.length===1?"":p`<select style="min-width:100px;max-width:100%;margin-bottom:-1px" @change="${o=>this.onMimeTypeChange(o)}">${n.map(o=>p`<option value="${o.mimeType}" ?selected="${o.mimeType===this.selectedRequestBodyType}">${o.mimeType}</option>`)}</select>`,n.forEach(o=>{let l,c=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))o.mimeType===this.selectedRequestBodyType&&(c=mt(o.schema,o.mimeType,de(o.examples),de(o.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||=c.length>0?c[0].exampleId:"",s=p`${s}<div class="example-panel border-top pad-top-8">${c.length===1?"":p`<select style="min-width:100px;max-width:100%;margin-bottom:-1px" @change="${d=>this.onSelectExample(d)}">${c.map(d=>p`<option value="${d.exampleId}" ?selected="${d.exampleId===this.selectedRequestBodyExample}">${d.exampleSummary.length>80?d.exampleId:d.exampleSummary?d.exampleSummary:d.exampleId}</option>`)}</select>`} ${c.filter(d=>d.exampleId===this.selectedRequestBodyExample).map(d=>p`<div class="example ${d.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example="${d.exampleId}">${d.exampleSummary&&d.exampleSummary.length>80?p`<div style="padding:4px 0">${d.exampleSummary}</div>`:""} ${d.exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(d.exampleDescription||"")))}</div>`:""}<pre class="textarea is-hidden request-body-param ${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" spellcheck="false" data-ptype="${o.mimeType}" style="width:100%;resize:vertical;display:none">
|
|
235
|
-
${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}</pre><textarea class="textarea request-body-param-user-input" part="textarea textarea-param" spellcheck="false" data-ptype="${o.mimeType}" data-example="${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}" data-example-format="${d.exampleFormat}" style="width:100%;resize:vertical" .value="${this.fillRequestFieldsWithExample==="true"?d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2):""}" @input="${
|
|
236
|
-
${t}</pre></div>`}<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="headers"?"flex":"none"}"><button class="toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${a=>{Ot(this.responseHeaders,a)}}" part="btn btn-fill btn-copy">Copy</button><pre style="white-space:pre"><code class="language-css">${this.responseHeaders}</code></pre></div>${this.showCurlBeforeTry==="true"?"":ko.call(this,this.activeResponseTab==="curl"?"flex":"none")}</div>`}function eu(){return p`<div style="display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 8px;margin:16px 0;font-size:var(--font-size-small)" part="wrap-request-btn"><div class="hide-in-small-screen" style="display:flex;flex-direction:column;margin:0;flex:1 1 180px;min-width:0"><div style="display:flex;flex-direction:row;align-items:center;overflow:hidden">${p`<div style="display:flex;flex-direction:column">${this.serverUrl?p`<div style="display:flex;align-items:baseline"><div style="font-weight:700;padding-right:5px">API Server</div><span class="gray-text">${this.serverUrl}</span></div>`:""}</div>`}</div><div style="display:flex;flex-wrap:wrap"><div style="font-weight:700;padding-right:5px">Authentication</div>${this.security?.length>0&&!this.security.every(e=>!e||Object.keys(e).length===0)?p`${this.api_keys.length>0?p`<div style="color:var(--blue);overflow:hidden">${this.api_keys.length===1?`${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}</div>`:this.security.some(e=>!e||Object.keys(e).length===0)?p`<div class="gray-text">Optional <span class="gray-text">(None Applied)</span></div>`:p`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span></div>`}`:p`<span class="gray-text">Not Required</span>`}</div></div><div style="display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex-shrink:0">${this.parameters.length>0||this.request_body?p`<button class="m-btn thin-border" part="btn btn-outline btn-fill" ?disabled="${this.loading}" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">FILL EXAMPLE</button> <button class="m-btn thin-border" part="btn btn-outline btn-clear" ?disabled="${this.loading}" @click="${this.onClearRequestData}">CLEAR</button>`:""} <button class="m-btn primary thin-border" part="btn btn-try" ?disabled="${this.loading}" aria-busy="${this.loading}" @click="${this.onTryClick}">${this.loading?"TRYING...":"TRY"}</button></div></div><div class="row" style="font-size:var(--font-size-small);margin:5px 0">${this.showCurlBeforeTry==="true"?ko.call(this):""}</div>${this.responseMessage===""?"":Qp.call(this)}`}var tu=class extends se{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={},this.fileInputKeys={},this.loading=!1}static get properties(){return{config:{type:Object},serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},responseMessage:{state:!0},responseText:{state:!0},responseHeaders:{state:!0},responseStatus:{state:!0},responseUrl:{state:!0},curlSyntax:{state:!0},responseIsBlob:{state:!0},responseBlobType:{state:!0},responseBlobUrl:{state:!0},respContentDisposition:{state:!0},activeResponseTab:{state:!0},selectedRequestBodyType:{state:!0},selectedRequestBodyExample:{state:!0},fileInputKeys:{state:!0},loading:{state:!0}}}static get styles(){return[ca,Tt,qe,la,Ja,da,wr,B`*,:before,:after{box-sizing:border-box}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}tag-input:focus-within{outline:1px solid}.param-name,.param-type{text-align:right;line-height:var(--font-size-small);margin:1px 0}.param-name{color:var(--foreground);font-family:var(--font-mono)}.param-name.deprecated{color:var(--red)}.param-type{color:var(--muted-foreground);font-family:var(--font-regular)}.param-constraint{min-width:100px}.param-constraint:empty{display:none}.top-gap{margin-top:24px}.textarea{resize:vertical;direction:ltr;min-height:220px;padding:5px}.example:first-child{margin-top:-9px}.response-message{text-overflow:ellipsis;font-weight:700}.response-message.error{color:var(--red)}.response-message.success{color:var(--blue)}.file-input-container{align-items:flex-start;width:100%}.file-input-container .input-set{align-items:center;width:100%;display:flex}.file-input-container .input-set:first-child .file-input-remove-btn{visibility:hidden}.file-input-remove-btn{color:var(--red);cursor:pointer;background:0 0;border:none;outline:none;font-size:16px}.v-tab-btn{font-size:var(--font-size-small);opacity:.3;cursor:pointer;background:0 0;border:none;height:24px;padding:4px 8px}.v-tab-btn.active{background:var(--background);opacity:1;font-weight:700}@container (width>=768px){.textarea{padding:8px}}@container (width<=470px){.hide-in-small-screen{display:none}}`,Xe]}get commonConfigDeps(){return[this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,this.allowSchemaDescriptionExpandToggle,this.schemaHideReadOnly,this.schemaHideWriteOnly,this.fillRequestFieldsWithExample,this.renderStyle,this.allowTry,this.callback,this.webhook]}get parameterGuardDeps(){return[this.method,this.path,this.parameters,this.activeParameterSchemaTabs,...this.commonConfigDeps]}get requestBodyGuardDeps(){return[this.method,this.path,this.request_body,this.selectedRequestBodyType,this.selectedRequestBodyExample,this.activeSchemaTab,this.fileInputKeys,...this.commonConfigDeps]}render(){return p`<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}"><div class="${this.callback==="true"?"tiny-title":"req-res-title"}">${this.callback==="true"?"CALLBACK REQUEST":"REQUEST"}</div><div>${Kt(this.parameterGuardDeps,()=>Ga.call(this,"path"))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"query"))} ${Kt(this.requestBodyGuardDeps,()=>Yp.call(this))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"header"))} ${Kt(this.parameterGuardDeps,()=>Ga.call(this,"cookie"))} ${this.allowTry==="false"?"":p`${eu.call(this)}`}</div></div>`}async updated(e){this.showCurlBeforeTry==="true"&&(!e||!e.has("curlSyntax")||e.size>1)&&this.applyCURLSyntax(this.shadowRoot),oa(this.getRootNode()?.host?.shadowRoot||this.shadowRoot),this.webhook==="true"&&(this.allowTry="false")}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;let t=e.target;window.setTimeout(a=>{let r=a.closest(".example-panel").querySelector(".request-body-param"),s=a.closest(".example-panel").querySelector(".request-body-param-user-input");s.value=r.innerText;let n=this.getRequestPanel({target:a});this.liveCURLSyntaxUpdate(n)},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;let t=e.target;this.selectedRequestBodyExample="",window.setTimeout(a=>{let r=a.closest(".request-body-container").querySelector(".request-body-param");if(r){let s=a.closest(".request-body-container").querySelector(".request-body-param-user-input");s.value=r.innerText}},0,t)}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.dataset.example&&(t.value=t.tagName.toUpperCase()==="TAG-INPUT"?t.dataset.example.split("~|~"):t.dataset.example)})}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.value=""})}buildFetchURL(e){let t=[...e.querySelectorAll("[data-ptype='path']")],a=[...e.querySelectorAll("[data-ptype='query']")],r=[...e.querySelectorAll("[data-ptype='query-object']")],s={};t.forEach(i=>{s[i.dataset.pname]=i.value});let n=[];return a.forEach(i=>{let o=i.dataset.array!=="false",l=i.dataset.paramSerializeStyle||"form",c=i.dataset.paramSerializeExplode===void 0?l==="form":i.dataset.paramSerializeExplode==="true",d=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:l,explode:c,allowReserved:d,isArray:o})}),r.forEach(i=>{let o=i.dataset.paramSerializeStyle||"form",l=i.dataset.paramSerializeExplode===void 0?o==="form":i.dataset.paramSerializeExplode==="true",c=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:o,explode:l,allowReserved:c,isObject:!0})}),_p({serverUrl:this.serverUrl,path:this.path,pathParams:s,queryParams:n,apiKeys:this.api_keys})}buildFetchHeaders(e){let t=this.closest(".expanded-req-resp-container, .req-resp-container")?.getElementsByTagName("api-response")[0],a=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],r=e.querySelector(".request-body-container"),s=t?.selectedMimeType||this.accept||"",n=r?.dataset?.selectedRequestBodyType||"",i=a.map(o=>({name:o.dataset.pname,value:o.value,explode:o.dataset.paramSerializeExplode==="true",isObject:o.dataset.ptype==="header-object"}));return Np({accept:s,apiKeys:this.api_keys,headerParams:i,contentType:n})}buildFetchBodyOptions(e){let t=e.querySelector(".request-body-container"),a={method:this.method.toUpperCase()};if(t){let r=t.dataset.selectedRequestBodyType||"";if(r.includes("form-urlencoded")){let s=e.querySelector("[data-ptype='dynamic-form']");a.body=s?ho([],s.value):ho([...e.querySelectorAll("[data-ptype='form-urlencode']")].filter(n=>n.type!=="file").map(n=>({name:n.dataset.pname,value:n.value,isArray:n.dataset.array!=="false"})))}else if(r.includes("form-data"))a.body=qp([...e.querySelectorAll("[data-ptype='form-data']")].map(s=>({name:s.dataset.pname,value:s.value,file:s.type==="file"?s.files?.[0]:void 0,isArray:s.dataset.array!=="false"})));else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(r)){let s=e.querySelector(".request-body-param-file");s?.files[0]&&(a.body=s.files[0])}else if(r.includes("json")||r.includes("xml")||r.includes("text")){let s=e.querySelector(".request-body-param-user-input");s?.value&&(a.body=s.value)}}return a}async onTryClick(e){let t=e?.target?this.getRequestPanel(e):this.shadowRoot.querySelector(".request-panel"),a=this.buildFetchURL(t),r=this.buildFetchBodyOptions(t),s=this.buildFetchHeaders(t);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(a,s,r,t),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),this.fetchCredentials&&(r.credentials=this.fetchCredentials);let n=new AbortController;this.activeAbortController=n;let{signal:i}=n;r.headers=s;let o={url:a,...r};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:o,controller:n}}));let l={method:o.method,headers:o.headers,credentials:o.credentials,body:o.body},c,d,u;try{this.loading=!0,this.responseText="\u231B",this.responseMessage="",c=new Request(o.url,l);let h=performance.now();d=await fetch(c,{signal:i});let m=performance.now();u=d.clone(),this.responseMessage=p`${d.statusText?`${d.statusText}:${d.status}`:d.status}<div style="color:var(--muted-foreground)">Took ${Math.round(m-h)} milliseconds</div>`,this.responseUrl=d.url;let y={};d.headers.forEach((b,x)=>{y[x]=b,this.responseHeaders=`${this.responseHeaders}${x}: ${b}
|
|
237
|
-
`});let f=await Bp(d);this.responseText=f.responseText,this.responseIsBlob=f.responseIsBlob,this.responseBlobType=f.responseBlobType,this.responseBlobUrl=f.responseBlobUrl,this.respContentDisposition=f.respContentDisposition,this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:c,response:u,responseHeaders:y,responseBody:f.respJson||f.respText||f.respBlob,responseStatus:u.ok}}))}catch(h){h.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage=o.method?.toUpperCase()==="TRACE"?`${h.message} (Browser security restricts TRACE requests in fetch. Use the cURL snippet below.)`:`${h.message} (CORS or Network Issue)`)}finally{this.loading=!1,this.activeAbortController=null}}liveCURLSyntaxUpdate(e){this.applyCURLSyntax(e)}onGenerateCURLClick(e){let t=this.getRequestPanel(e);this.applyCURLSyntax(t)}getRequestPanel(e){return e.target.closest(".request-panel")}applyCURLSyntax(e){let t=this.buildFetchURL(e),a=this.buildFetchBodyOptions(e),r=this.buildFetchHeaders(e),s=this.generateCURLSyntax(t,r,a,e);this.curlSyntax!==s&&(this.curlSyntax=s)}generateCURLSyntax(e,t,a,r){let s=r?.querySelector(".request-body-container"),n=s?.dataset?.selectedRequestBodyType||"",i=a?.body;if(!i&&s){let o=r.querySelector(".request-body-param-user-input");o?.value&&(i=o.value)}return jp({method:this.method,url:e,headers:t,body:i,contentType:n})}onAddFileInput(e){let t=this.fileInputKeys[e]??[0],a=t.length>0?Math.max(...t)+1:0;this.fileInputKeys={...this.fileInputKeys,[e]:[...t,a]}}onRemoveFileInput(e,t){let a=this.fileInputKeys[e]??[0];this.fileInputKeys={...this.fileInputKeys,[e]:a.filter(r=>r!==t)}}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.fileInputKeys={},this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),"")}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"||this.webhook==="true"?"false":"true"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.fillRequestFieldsWithExample!==void 0&&(this.fillRequestFieldsWithExample=this.config.fillRequestFieldsWithExample),this.config.allowTry!==void 0&&(this.allowTry=this.config.allowTry),this.config.showCurlBeforeTry!==void 0&&(this.showCurlBeforeTry=this.config.showCurlBeforeTry),this.config.fetchCredentials!==void 0&&(this.fetchCredentials=this.config.fetchCredentials),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab))}disconnectedCallback(){this.curlSyntax="",this.activeAbortController&&=(this.activeAbortController.abort(),null),this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),super.disconnectedCallback()}};customElements.define("api-request",tu);var au=class extends se{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[qe,Ja,Tt,B`:host{display:flex}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.json-tree{font-family:var(--font-mono);font-size:var(--font-size-small);word-break:break-all;line-height:calc(var(--font-size-small) + 6px);text-align:left;direction:ltr;flex:1;min-height:40px;display:inline-block;position:relative;overflow:hidden}.open-bracket{cursor:pointer;border-radius:var(--card-radius);border:1px solid #0000;padding:0 20px 0 0;display:inline-block}.close-bracket{border-radius:var(--card-radius);border:1px solid #0000;display:inline-block}.open-bracket:hover{color:var(--primary);background:var(--muted);border:1px solid var(--border)}.open-bracket.expanded:hover~.inside-bracket{border-left:1px solid var(--muted-foreground)}.open-bracket.expanded:hover~.close-bracket{color:var(--primary)}.inside-bracket{border-left:1px dotted var(--border);padding-left:12px;overflow:hidden}.open-bracket.collapsed+.inside-bracket,.open-bracket.collapsed+.inside-bracket+.close-bracket,.open-bracket.expanded .open-bracket-collapsed,.open-bracket.collapsed .open-bracket-expanded{display:none}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--red)}.boolean{color:var(--purple)}.object{color:var(--foreground)}.toolbar{align-items:center;padding:2px;display:flex;position:absolute;top:5px;right:6px}`,Xe]}render(){return p`<div class="json-tree" @click="${e=>{e.target.classList.contains("btn-copy")?Ot(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}"><div class="toolbar"><button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy">Copy</button></div>${this.generateTree(this.data,!0)}</div>`}generateTree(e,t=!1){if(e===null)return p`<span class="null">null</span>${t?"":","}`;if(typeof e=="object"&&!(e instanceof Date)){let a=Array.isArray(e)?"array":"pure_object";return Object.keys(e).length===0?p`${Array.isArray(e)?"[ ],":"{ },"}`:p`<div class="open-bracket expanded ${a==="array"?"array":"object"}"><span class="open-bracket-expanded">${a==="array"?"[":"{"}</span> <span class="open-bracket-collapsed">${a==="array"?"[...]":"{...}"}</span></div><div class="inside-bracket">${Object.keys(e).map((r,s,n)=>p`<div class="item">${a==="pure_object"?p`"${r}":`:""} ${this.generateTree(e[r],s===n.length-1)}</div>`)}</div><div class="close-bracket">${a==="array"?"]":"}"}${t?"":","}</div>`}return typeof e=="string"||e instanceof Date?p`<span class="${typeof e}">"${e}"</span>${t?"":","}`:p`<span class="${typeof e}">${e}</span>${t?"":","}`}toggleExpand(e){let t=e.target.closest(".open-bracket");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};customElements.define("json-tree",au);var ru=class extends se{constructor(){super(),this.selectedStatus="",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{config:{type:Object},callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[qe,la,da,ca,Tt,Ja,B`:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.resp-head{vertical-align:middle;padding:16px 0 8px}.resp-head.divider{border-top:1px solid var(--border);margin-top:10px}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:calc(var(--font-size-small) + 1px);color:var(--muted-foreground);text-align:left}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}`,Xe]}willUpdate(e){if(super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"||this.webhook==="true"?"false":"true"),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab)),e.has("responses")||e.has("callback")||e.has("webhook")){let t=Ip(this.responses,{callback:this.callback,webhook:this.webhook});this.headersForEachRespStatus=t.headersForEachRespStatus,this.mimeResponsesForEachStatus=t.mimeResponsesForEachStatus,this.defaultStatus=t.defaultStatus,this.defaultMimeType=t.defaultMimeType,(!this.selectedStatus||!this.responses[this.selectedStatus])&&(this.selectedStatus=t.defaultStatus),this.selectedMimeType||=t.defaultMimeType}}render(){return p`<div class="col regular-font response-panel ${this.renderStyle}-mode"><div class="${this.callback==="true"?"tiny-title":"req-res-title"}">${this.callback==="true"?"CALLBACK RESPONSE":"RESPONSE"}</div><div>${this.responseTemplate()}</div></div>`}resetSelection(){this.selectedStatus=this.defaultStatus||this.responses&&Object.keys(this.responses).find(e=>e!=="$$ref")||"",this.selectedMimeType=this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]?Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||"":this.defaultMimeType||""}responseTemplate(){return this.responses?((!this.selectedStatus||!this.responses[this.selectedStatus])&&(this.selectedStatus=this.defaultStatus||Object.keys(this.responses).find(e=>e!=="$$ref")||Object.keys(this.responses)[0]||""),!this.selectedMimeType&&this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]&&(this.selectedMimeType=Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||this.defaultMimeType||""),p`${Object.keys(this.responses).length>1?p`<div class="row" style="flex-wrap:wrap">${Object.keys(this.responses).map(e=>p`${e==="$$ref"?"":p`<button @click="${()=>{this.selectedStatus=e,this.selectedMimeType=this.responses[e].content&&Object.keys(this.responses[e].content)[0]?Object.keys(this.responses[e].content)[0]:void 0}}" class="m-btn small ${this.selectedStatus===e?"primary":""}" part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}" style="margin:8px 4px 0 0">${e}</button>`}`)}</div>`:p`<span>${Object.keys(this.responses)[0]}</span>`} ${Object.keys(this.responses).map(e=>p`<div style="display:${e===this.selectedStatus?"block":"none"}"><div class="top-gap"><span class="resp-descr m-markdown">${F(O(E(this.responses[e]?.description||"")))}</span> ${this.headersForEachRespStatus[e]&&this.headersForEachRespStatus[e]?.length>0?p`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}</div>${!this.mimeResponsesForEachStatus[e]||Object.keys(this.mimeResponsesForEachStatus[e]).length===0?"":p`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${t=>{t.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=t.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button><div style="flex:1"></div>${Object.keys(this.mimeResponsesForEachStatus[e]).length===1?p`<span class="small-font-size gray-text" style="align-self:center;margin-top:8px">${Object.keys(this.mimeResponsesForEachStatus[e])[0]}</span>`:p`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}</div>${this.activeSchemaTab==="example"?p`<div part="tab-content" class="tab-content col" style="flex:1">${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`:p`<div part="tab-content" class="tab-content col" style="flex:1">${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`}</div>`}</div>`)}`):""}responseHeaderListTemplate(e){return p`<div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div><table role="presentation" style="border-collapse:collapse;margin-bottom:16px;border:1px solid var(--border);border-radius:var(--card-radius)" class="small-font-size mono-font">${e.map(t=>p`<tr><td style="padding:8px;vertical-align:baseline;min-width:120px;border-top:1px solid var(--border);text-overflow:ellipsis">${t.name||""}</td><td style="padding:4px;vertical-align:baseline;padding:0 5px;border-top:1px solid var(--border);text-overflow:ellipsis">${t.schema?.type||""}</td><td style="padding:8px;vertical-align:baseline;border-top:1px solid var(--border);text-overflow:ellipsis"><div class="m-markdown-small regular-font">${F(O(E(t.description||"")))}</div></td><td style="padding:8px;vertical-align:baseline;border-top:1px solid var(--border);text-overflow:ellipsis">${t.schema?.example||""}</td></tr>`)}</table>`}mimeTypeDropdownTemplate(e){return p`<select aria-label="mime types" @change="${t=>{this.selectedMimeType=t.target.value}}" style="margin-bottom:-1px;z-index:1">${e.map(t=>p`<option value="${t}" ?selected="${t===this.selectedMimeType}">${t}</option>`)}</select>`}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return!e||!e.examples||e.examples.length===0?p`<pre style="color:var(--red)" class="${this.renderStyle==="read"?"read example-panel border pad-8-16":"example-panel border-top"}">
|
|
238
|
-
|
|
239
|
-
${e.examples[0].exampleValue}</pre>`}`:p`<span class="example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}"><select aria-label="response examples" style="min-width:100px;max-width:100%" @change="${t=>this.onSelectExample(t)}">${e.examples.map(t=>p`<option value="${t.exampleId}" ?selected="${t.exampleId===e.selectedExample}">${t.exampleSummary.length>80?t.exampleId:t.exampleSummary}</option>`)}</select> ${e.examples.map(t=>p`<div class="example" data-example="${t.exampleId}" style="display:${t.exampleId===e.selectedExample?"block":"none"}">${t.exampleSummary&&t.exampleSummary.length>80?p`<div style="padding:4px 0">${t.exampleSummary}</div>`:""} ${t.exampleDescription?p`<div class="m-markdown-small" style="padding:4px 0">${F(O(E(t.exampleDescription||"")))}</div>`:""} ${t.exampleFormat==="json"?p`<json-tree render-style="${this.renderStyle}" .data="${t.exampleValue}" exportparts="btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"></json-tree>`:p`<pre>${t.exampleValue}</pre>`}</div>`)}</span>`}`}mimeSchemaTemplate(e){return e?p`${this.schemaStyle==="table"?p`<schema-table .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:p`<schema-tree .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}`:p`<pre style="color:var(--red)" class="${this.renderStyle==="read"?"border pad-8-16":"border-top"}"> Schema not found</pre>`}};customElements.define("api-response",ru);function su(e){let t=new Ge,a=new E.Renderer;return a.heading=({text:r,depth:s})=>`<h${s} class="observe-me" id="${e}--${t.slug(r)}">${r}</h${s}>`,na(a),a}function nu(e){let t=e.target.closest(".tag-container").querySelector(".tag-description"),a=e.target.closest(".tag-container").querySelector(".tag-icon");t&&a&&(t.classList.contains("expanded")?(t.style.maxHeight=0,t.classList.replace("expanded","collapsed"),a.classList.replace("expanded","collapsed")):(t.style.maxHeight=`${t.scrollHeight}px`,t.classList.replace("collapsed","expanded"),a.classList.replace("collapsed","expanded")))}function xs(e,t="",a=""){let r=new Set;for(let l in e.responses)for(let c in e.responses[l]?.content)r.add(c.trim());let s=[...r].join(", "),n=this.resolvedSpec.securitySchemes.filter(l=>l.finalKeyValue&&e.security?.some(c=>l.securitySchemeId in c))||[],i=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId==="_rapidoc_api_key"&&l.value!=="-");i&&n.push(i);let o=e.xCodeSamples?po.call(this,e.xCodeSamples):"";return p`${this.renderStyle==="read"?p`<div class="divider" part="operation-divider"></div>`:""}<div class="expanded-endpoint-body observe-me ${e.method} ${e.deprecated?"deprecated":""}" part="section-operation ${e.elementId}" id="${e.elementId}">${this.renderStyle==="focused"&&t!=="General \u2982"?p`<div class="tag-container" part="section-operation-tag"><span class="upper" style="font-weight:700;font-size:18px">${t} </span>${a?p`<svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary);vertical-align:top;cursor:pointer" @click="${l=>{nu.call(this,l)}}"><path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path></svg><div class="tag-description collapsed" style="max-height:0;overflow:hidden;margin-top:16px;border:1px solid var(--border)"><div class="m-markdown" style="padding:8px">${F(O(E(a)))}</div></div>`:""}</div>`:""} ${e.deprecated?p`<div class="bold-text red-text">DEPRECATED</div>`:""} ${p`${e.xBadges&&e.xBadges?.length>0?p`<div style="display:flex;flex-wrap:wrap;margin-bottom:-24px;font-size:var(--font-size-small)">${e.xBadges.map(l=>l.color==="none"?"":p`<span style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${l.color}) 10%,transparent);color:var(--${l.color});border:1px solid var(--${l.color})">${l.label}</span>`)}</div>`:""}<h2 part="section-operation-summary">${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h2>${e.isWebhook?p`<span part="section-operation-webhook" style="color:var(--primary);font-weight:700;font-size:var(--font-size-regular)">WEBHOOK</span>`:p`<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left;direction:ltr;padding:8px 0;color:var(--muted-foreground)"><span part="label-operation-method" class="regular-font upper method-fg bold-text ${e.method}">${e.method}</span> <span style="overflow-wrap:break-word" part="label-operation-path">${e.path}</span></div>`}<slot name="${e.elementId}"></slot>`} ${e.description?p`<div class="m-markdown">${F(O(E(e.description)))}</div>`:""} ${co.call(this,e.security)} ${e.externalDocs?.url||e.externalDocs?.description?p`<div style="background:var(--muted);padding:2px 8px 8px 8px;margin:8px 0;border-radius:var(--card-radius)"><div class="m-markdown">${F(O(E(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?p`<a style="font-family:var(--font-mono);font-size:var(--font-size-small)" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url}<div style="transform:rotate(270deg) scale(1.5);display:inline-block;margin-left:5px">⇲</div></a>`:""}</div>`:""} ${o}<div class="req-resp-container expanded-req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.renderStyle}-mode ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${n}" .servers="${e.servers}" server-url="${e.servers?.[0]?.url||this.selectedServer?.computedUrl}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${s}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
|
316
|
+
anchor:anchor, anchor-param-example:anchor-param-example"></schema-tree></div>`}</div>`:m`<input type="${l.format==="password"?"password":"text"}" spellcheck="false" style="width:100%" id="input-request-param-${s.name}" class="request-param" part="textbox textbox-param" data-ptype="${e}" data-pname="${s.name}" data-example="${Array.isArray(u.exampleVal)?u.exampleVal.join("~|~"):u.exampleVal}" data-param-allow-reserved="${h}" data-x-fill-example="${s["x-fill-example"]||"yes"}" data-array="false" .value="${s["x-fill-example"]==="no"?"":yr(this.fillRequestFieldsWithExample==="true"?u.exampleVal:"")}" @input="${y=>{let v=this.getRequestPanel(y);this.liveCURLSyntaxUpdate(v)}}">`}</div>`:""} ${g?Rl(l,l.allowedValues&&String(l.allowedValues).split("\u2503").map(y=>m`<button type="button" part="anchor anchor-param-constraint" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-type="${l.type==="array"?l.type:"string"}" data-enum="${y.trim()}" @click="${v=>{let A=v.target.closest(".param-list").querySelector(`[data-pname="${s.name}"]`);A&&(A.value=v.target.dataset.type==="array"?[v.target.dataset.enum]:v.target.dataset.enum)}}">${y}</button>`),f&&u.exampleList.map(y=>xa.call(this,y,l.type,s.name))):""}<div class="param-details" part="param-details">${s.description?m`<div class="m-markdown-small">${P(M(T(s.description)))}</div>`:""} ${f?"":Ll.call(this,s.name,l.type,u.exampleList)}</div></li>`)}return m`<h5 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-5">${r}</h5><div class="param-list-container"><ul class="param-list" part="param-list" role="list">${a}</ul></div>`}var Nl=(e,t,r)=>{let a=new Map;for(let s=t;s<=r;s++)a.set(e[s],s);return a},dm=ma(class extends fa{constructor(e){if(super(e),e.type!==Ne.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let a;r===void 0?r=t:t!==void 0&&(a=t);let s=[],n=[],i=0;for(let o of e)s[i]=a?a(o,i):i,n[i]=r(o,i),i++;return{values:n,keys:s}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,a]){let s=am(e),{values:n,keys:i}=this.dt(t,r,a);if(!Array.isArray(s))return this.ut=i,n;let o=this.ut??=[],l=[],c,d,p=0,h=s.length-1,u=0,g=n.length-1;for(;p<=h&&u<=g;)if(s[p]===null)p++;else if(s[h]===null)h--;else if(o[p]===i[u])l[u]=it(s[p],n[u]),p++,u++;else if(o[h]===i[g])l[g]=it(s[h],n[g]),h--,g--;else if(o[p]===i[g])l[g]=it(s[p],n[g]),gr(e,l[g+1],s[p]),p++,g--;else if(o[h]===i[u])l[u]=it(s[h],n[u]),gr(e,s[p],s[h]),h--,u++;else if(c===void 0&&(c=Nl(i,u,g),d=Nl(o,p,h)),c.has(o[p]))if(c.has(o[h])){let f=d.get(i[u]),y=f===void 0?null:s[f];if(y===null){let v=gr(e,s[p]);it(v,n[u]),l[u]=v}else l[u]=it(y,n[u]),gr(e,s[p],y),s[f]=null;u++}else sn(s[h]),h--;else sn(s[p]),p++;for(;u<=g;){let f=gr(e,l[g+1]);it(f,n[u]),l[u++]=f}for(;p<=h;){let f=s[p++];f!==null&&sn(f)}return this.ut=i,Ol(e,l),ne}}),zl=e=>e??O,Pl=class extends je{static get styles(){return[Je,Fl,Z`.table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);& .table-container{border:1px solid var(--border);background:color-mix(in srgb, var(--card) 80%, transparent);max-width:100%;overflow-x:auto}& .table-header{background:var(--card);border-bottom:1px solid var(--border);padding:8px 4px;display:flex;& .td{font-family:var(--font-sans);color:var(--foreground);font-weight:700}}& .tr{border-bottom:1px dotted var(--border);width:calc(100% - 5px);padding:0 0 0 5px;&.expanded{& .obj-toggle:after{content:"-"}&+.object-body{display:block}}&.collapsed{& .obj-toggle:after{content:"+"}&+.object-body{display:none}}}& .td{padding:4px 0}& .key{width:var(--table-schema-key-width);text-overflow:var(--table-schema-key-text-overflow);white-space:var(--table-schema-key-whitespace);overflow:hidden;& .key-label{font-size:var(--font-size-mono)}&.deprecated .key-label{color:var(--destructive)}}& .key-type{white-space:normal;width:150px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 16px);overflow:hidden}}.obj-toggle{color:var(--primary);cursor:pointer;font-size:14px;font-family:var(--font-mono);text-align:center;user-select:none;box-sizing:border-box;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:2px;justify-content:center;align-items:center;width:14px;min-width:14px;height:14px;margin-top:-2px;margin-left:-16px;padding:0;line-height:12px;display:inline-flex;&:hover{border-color:var(--primary)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}@supports (grid-template-columns:subgrid){.table{& .table-container{grid-template-columns:minmax(var(--table-schema-key-width), auto) minmax(150px, auto) 1fr;display:grid}& .table-header,& .tr{grid-column:1/-1;grid-template-columns:subgrid;box-sizing:border-box;width:100%;padding:0 4px;display:grid;& .key,& .key-type{width:auto}& .key-descr{min-width:0}}& .object-body{display:contents}& .tr.collapsed+.object-body{display:none}& .tr.expanded+.object-body{display:contents}}}@container (width<500px){.table{& .table-container{grid-template-columns:minmax(0,1fr) minmax(0,max-content) 0}& .tr>.key-descr{grid-column:1/-1}& .table-header>.key-descr{display:none}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(2 * (var(--font-size-small) + 16px))}}}`,ht]}render(){if(!this.data)return"";let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return m`<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span><div class="table-container"><div class="tr table-header"><div class="td key">Field</div><div class="td key-type">Type</div><div class="td key-descr">Description</div></div>${this.renderAST(this.data)}</div></div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let s=16*(a+1),n=r<this.schemaExpandLevel,i=e.nullable?"nullable":"",o=this.renderDeprecatedIcon(e),l=this.getReadWriteBadge(e),c=this.getReadWriteTip(e);if(e.kind==="array"){let d=e.items;if(!d){let u=e.dataTypeLabel||(e.nullable?"array \u2503 null":"array");return m`<div class="tr array ${i}" data-obj="${e.name||""}"><div class="td key" style="padding-left:${s}px"><span class="key-label" title="${e.name||O}">${o}${e.name||""}</span> ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||O}">${u}${l}</div>${this.renderDescrCell(e.description)}</div>`}if(d.kind==="primitive"){let u=d.format||d.contentMediaType||d.type||"string",g=this.getDataTypeCss(u);return m`<div class="tr primitive ${i}" title="${e.deprecated||d.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated||d.deprecated?"deprecated":""}" style="padding-left:${s}px">${o}${e.name?m`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${g}" title="${c||O}">[${u}]${e.nullable?" \u2503 null":""}${l}</div>${this.renderDescrCell(e.description||d.description,d)}</div>`}let p="array";d.kind==="object"?p="array of object":d.kind==="array"?p=`array of array ${e.arrayType?`of ${e.arrayType}`:""}`.trim():d.kind==="union"&&(p="array of union"),e.nullable&&(p+=" \u2503 null");let h=d.kind!=="object"||!!(d.properties&&d.properties.length>0||d.patternProperties&&d.patternProperties.length>0||d.additionalProperties||d.unions&&d.unions.length>0);return m`<div class="tr ${n?"expanded":"collapsed"} array ${i}" data-obj="${e.name||""}" title="${e.deprecated?`Deprecated ${e.name}`:e.name||O}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${e.name&&h?m`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${n?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||O}" style="display:inline-block;${h?"margin-left:-6px;":""}">${o}${e.name||""} </span>${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||O}">${p}${l}</div>${this.renderDescrCell(e.description||d.description)}</div>${h?m`<div class="object-body">${d.kind==="object"?m`${d.properties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${d.patternProperties?.map(u=>this.renderAST(u,"object",r+1,a+1))} ${d.additionalProperties?this.renderAST(d.additionalProperties,"object",r+1,a+1):""} ${d.unions?.map(u=>this.renderAST(u,"object",r+1,a+1))}`:this.renderAST(d,"array",r+1,a+1)}</div>`:""}`}if(e.kind==="object"){let d=e.dataTypeLabel||(e.nullable?"object \u2503 null":"object"),p=!!(e.properties&&e.properties.length>0||e.patternProperties&&e.patternProperties.length>0||e.additionalProperties||e.unions&&e.unions.length>0);return m`${e.name?m`<div class="tr ${n?"expanded":"collapsed"} object ${i}" data-obj="${e.name}" title="${e.deprecated?`Deprecated ${e.name}`:e.name}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${p?m`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${n?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||O}" style="display:inline-block;${p?"margin-left:-6px;":""}">${o}${e.name} </span>${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||O}">${d}${l}</div>${this.renderDescrCell(e.description)}</div>`:""} ${p?m`<div class="object-body">${e.properties?.map(h=>this.renderAST(h,"object",r+1,a+ +!!e.name))} ${e.patternProperties?.map(h=>this.renderAST(h,"object",r+1,a+ +!!e.name))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+ +!!e.name):""} ${e.unions?.map(h=>this.renderAST(h,"object",r+1,a+ +!!e.name))}</div>`:""}`}if(e.kind==="union"){let d=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),p=e.name&&t!=="xxx-of-option";return m`${e.properties?.map(h=>this.renderAST(h,"object",r,a))}<div class="tr expanded xxx-of" data-obj="${p?e.name:d}">${p?m`<div class="td key" style="padding-left:${s}px"><span class="key-label" title="${e.name}">${e.name}</span> ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type"><span class="xxx-of-key">${d}</span></div>`:m`<div class="td key" style="padding-left:${s}px"><span class="xxx-of-key" style="margin-left:-6px">${d}</span></div><div class="td key-type"></div>`} ${this.renderDescrCell(e.description)}</div><div class="object-body">${e.options?.map((h,u)=>h.kind==="primitive"?m`<div class="object-body">${this.renderAST(h,"xxx-of-option",r+1,a+1)}</div>`:m`<div class="tr expanded xxx-of-option" data-obj="OPTION ${h.optionIndex||u+1}"><div class="td key" style="padding-left:${s+16}px"><span class="xxx-of-key">OPT ${h.optionIndex||u+1}</span> ${h.optionTitle?m`<span class="xxx-of-descr">${h.optionTitle}</span>`:""}</div><div class="td key-type"></div><div class="td key-descr"></div></div><div class="object-body">${this.renderAST(h,"xxx-of-option",r+1,a+1)}</div>`)}</div>`}if(e.kind==="primitive"){let d=this.getDataTypeCss(e.type),p=t==="xxx-of-option"&&!!e.optionIndex;return m`<div class="tr primitive ${i}" title="${e.deprecated?"Deprecated":O}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${s}px">${p?m`<span class="xxx-of-key">OPT ${e.optionIndex}</span>${e.optionTitle?m`<span class="xxx-of-descr">${e.optionTitle}</span>`:""}`:""}${o}${e.name&&!p?m`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?m`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${d}" title="${c||O}">${t==="array"?`[${e.type}]`:e.type}${l}</div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};Pl=w([Se("schema-table")],Pl);function pm(e,t,r,a=""){let s=se(t),n=qt(t,"json",xe(t.examples),xe(t.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return m`<div part="tab-panel" class="tab-panel row" style="min-height:220px;border-left:6px solid var(--border);align-items:stretch"><div style="width:24px;background:var(--border)"><div class="row" style="flex-direction:row-reverse;width:160px;height:24px;transform:rotate(270deg) translateX(-160px);transform-origin:top left;display:block" @click="${i=>{if(i.target.classList.contains("v-tab-btn")){let{tab:o}=i.target.dataset;if(o){let l=i.target.closest(".tab-panel"),c=l.querySelector(`.v-tab-btn[data-tab="${o}"]`),d=[...l.querySelectorAll(`.v-tab-btn:not([data-tab="${o}"])`)],p=l.querySelector(`.tab-content[data-tab="${o}"]`),h=[...l.querySelectorAll(`.tab-content:not([data-tab="${o}"])`)];c.classList.add("active"),p.style.display="block",d.forEach(u=>{u.classList.remove("active")}),h.forEach(u=>{u.style.display="none"})}}i.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=i.target.dataset.tab)}}"><button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button class="v-tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div></div>${m`<div class="tab-content col" data-tab="example" style="display:${this.activeSchemaTab==="example"?"block":"none"};padding-left:5px;width:100%"><textarea class="textarea" part="textarea textarea-param" style="width:100%;border:none;resize:vertical" data-array="false" data-ptype="${r.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${e}" data-content-type="${a}" data-example="${n[0]?.exampleValue||""}" .value="${yr(this.fillRequestFieldsWithExample==="true"&&n[0]?.exampleValue||"")}" spellcheck="false"></textarea></div>`} ${m`<div class="tab-content col" data-tab="schema" style="display:${this.activeSchemaTab==="example"?"none":"block"};padding-left:5px;width:100%">${this.schemaStyle==="table"?m`<schema-table .data="${s}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${s}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}</div>`}function um(e,t,r="",a={}){let s=[],n=al(e),i=sl(e);if(Object.keys(n).length>0){for(let o in n){let l=n[o];if(l.readOnly)continue;let c=l.examples||l.example||"",d=l.type,p=t.includes("form-data")?Zh(l,a?.[o]):"",h=ia(l),u=Jo(h.examples||h.example,h.type),g=d!=="object"&&(h.default||h.constrain||h.allowedValues||h.pattern),f=Il(l.description,g,u.exampleList);s.push(m`<li class="param ${l.deprecated?"deprecated":""}" part="param" title="${l.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${l.deprecated?"deprecated":""}" part="param-name">${o}${i.includes(o)?m`<span class="param-required" title="Required">*</span>`:""}</div><div class="param-type" part="param-type">${h.type==="array"||h.type.split("\u2503").includes("array")?`${h.arrayType||h.type}`:`${h.format&&!h.type.includes("\u2503")?h.format:h.contentMediaType&&!h.type.includes("\u2503")?h.contentMediaType:h.type}`}</div></div>${d!=="object"&&this.allowTry!=="true"?"":m`<div class="param-input" part="param-input">${d==="array"?Zo(l.items)?m`<div class="file-input-container col" style="align-items:flex-start;width:100%">${dm(this.fileInputKeys[o]??[0],y=>y,(y,v)=>m`<div class="input-set row" style="width:100%;margin-top:${v>0?"4px":"0"}"><input type="file" part="file-input" style="width:100%" data-pname="${o}" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-array="false" data-file-array="true"> <button class="file-input-remove-btn" aria-label="Remove file" title="Remove" @click="${()=>this.onRemoveFileInput(o,y)}">✕</button></div>`)} <button class="btn btn-primary btn-sm file-input-add-btn" part="btn btn-fill" @click="${()=>this.onAddFileInput(o)}">ADD</button></div>`:m`<tag-input style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${o}" data-content-type="${p}" data-example="${Array.isArray(c)?c.join("~|~"):c}" data-array="true" placeholder="add-multiple ↩" .value="${Array.isArray(c)?Array.isArray(c[0])?c[0]:c:Hs}"></tag-input>`:m`${d==="object"?pm.call(this,o,l,t,p):m`${this.allowTry==="true"?m`<input .value="${this.fillRequestFieldsWithExample==="true"?u.exampleVal:""}" spellcheck="false" type="${Zo(l)?"file":l.format==="password"?"password":"text"}" part="textbox textbox-param" style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${o}" data-content-type="${p}" data-example="${Array.isArray(c)?c[0]:c}" data-array="false">`:""}`}`}</div>`} ${g?Rl(h,h.allowedValues&&String(h.allowedValues).split("\u2503").map(y=>m`<button type="button" part="anchor anchor-param-constraint" class="value-chip" ?disabled="${this.allowTry!=="true"}" data-type="${h.type==="array"?h.type:"string"}" data-enum="${y.trim()}" @click="${v=>{let A=v.target.closest(".param-list").querySelector(`[data-pname="${o}"]`);if(A){A.value=v.target.dataset.type==="array"?[v.target.dataset.enum]:v.target.dataset.enum;let x=this.getRequestPanel(v);this.liveCURLSyntaxUpdate(x)}}}">${y}</button>`),f&&u.exampleList.map(y=>xa.call(this,y,h.type,o))):""} ${d==="object"?"":m`<div class="param-details" part="param-details">${l.description?m`<div class="m-markdown-small">${P(M(T(l.description)))}</div>`:""} ${f?"":Ll.call(this,o,h.type,u.exampleList)}</div>`}</li>`)}return m`<div class="param-list-container"><ul class="param-list" part="param-list" role="list" @input="${o=>{let l=this.getRequestPanel(o);this.liveCURLSyntaxUpdate(l)}}" @change="${o=>{let l=this.getRequestPanel(o);this.liveCURLSyntaxUpdate(l)}}">${s}</ul></div>`}return m`<textarea class="textarea dynamic-form-param ${t}" part="textarea textarea-param" spellcheck="false" data-pname="dynamic-form" data-ptype="${t}" .value="${yr(r)}" style="width:100%"></textarea> ${e.description?m`<span class="m-markdown-small">${P(M(T(e.description)))}</span>`:""}`}function hm(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let e="",t="",r="",a="",s="",n=[],{content:i}=this.request_body;for(let o in i)n.push({mimeType:o,schema:i[o].schema,example:i[o].example,examples:i[o].examples,encoding:i[o].encoding}),this.selectedRequestBodyType||=o;return e=n.length===1?"":m`<select class="select-sm" aria-label="request body media type" @change="${o=>this.onMimeTypeChange(o)}">${n.map(o=>m`<option value="${o.mimeType}" ?selected="${o.mimeType===this.selectedRequestBodyType}">${o.mimeType}</option>`)}</select>`,n.forEach(o=>{let l,c=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))o.mimeType===this.selectedRequestBodyType&&(c=qt(o.schema,o.mimeType,xe(o.examples),xe(o.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||=c.length>0?c[0].exampleId:"",s=m`${s}<div class="example-panel">${c.length===1?"":m`<select class="select-sm example-select" aria-label="request body examples" title="${Rt(c.find(d=>d.exampleId===this.selectedRequestBodyExample))}" @change="${d=>this.onSelectExample(d)}">${c.map(d=>m`<option value="${d.exampleId}" title="${Rt(d)}" ?selected="${d.exampleId===this.selectedRequestBodyExample}">${Rt(d)}</option>`)}</select>`} ${c.filter(d=>d.exampleId===this.selectedRequestBodyExample).map(d=>m`<div class="example ${d.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example="${d.exampleId}">${c.length===1&&d.exampleSummary&&d.exampleSummary.length>80?m`<div style="padding:4px 0">${d.exampleSummary}</div>`:""} ${d.exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${P(M(T(d.exampleDescription||"")))}</div>`:""}<pre class="textarea is-hidden request-body-param ${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" spellcheck="false" data-ptype="${o.mimeType}" style="width:100%;resize:vertical;display:none">
|
|
317
|
+
${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}</pre><textarea class="textarea request-body-param-user-input" part="textarea textarea-param" spellcheck="false" data-ptype="${o.mimeType}" data-example="${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}" data-example-format="${d.exampleFormat}" style="width:100%;resize:vertical" .value="${this.fillRequestFieldsWithExample==="true"?d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2):""}" @input="${p=>{let h=this.getRequestPanel(p);this.liveCURLSyntaxUpdate(h)}}" @keydown="${p=>{if((p.keyCode===10||p.keyCode===13)&&p.ctrlKey)return this.onTryClick(p)}}"></textarea></div>`)}</div>`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(o.mimeType===this.selectedRequestBodyType){let d=qt(o.schema,o.mimeType,o.examples,o.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);o.schema&&(r=um.call(this,o.schema,o.mimeType,d[0]?d[0].exampleValue:"",o.encoding))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&o.mimeType===this.selectedRequestBodyType&&(t=m`<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file small-font-size bold-text" data-ptype="${o.mimeType}" spellcheck="false">`);(o.mimeType.includes("json")||o.mimeType.includes("xml")||o.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(l=se(o.schema),this.schemaStyle==="table"?a=m`${a}<schema-table class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:this.schemaStyle==="tree"&&(a=m`${a}<schema-tree class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`))}),m`<div class="request-body-container" data-selected-request-body-type="${zl(this.selectedRequestBodyType)}"><div class="table-title top-gap row" style="justify-content:space-between;align-items:center"><h5 class="rapidoc-heading label-heading" part="heading heading-5">Request body ${this.request_body.required?m`<span class="mono-font" style="color:var(--destructive)">*</span>`:""} <span style="font-weight:400;margin-left:5px;text-transform:none">${this.selectedRequestBodyType}</span></h5>${e}</div>${this.request_body.description?m`<div class="m-markdown" style="margin-bottom:12px">${P(M(T(this.request_body.description)))}</div>`:""} ${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${o=>{o.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=o.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button></div>${m`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"}">${s}</div>`} ${m`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"}">${a}</div>`}</div>`:m`${t} ${r}`}</div>`}function Ml(e="flex"){return m`<div class="col m-markdown" style="flex:1;display:${e};position:relative;max-width:100%"><button class="btn btn-sm btn-outline toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${t=>{Qt(this.curlSyntax.trim().replace(/\\$/,""),t)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-shell">${this.curlSyntax.trim().replace(/\\$/,"")}</code></pre></div>`}function mm(){let e="",t="";return this.responseIsBlob||(e=this.responseHeaders.includes("application/x-ndjson")||this.responseHeaders.includes("json")?"json":this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?"html":"text",t=m`<code class="language-${e}">${this.responseText}</code>`),m`<div class="row" style="font-size:var(--font-size-small);margin:5px 0;justify-content:space-between;align-items:center"><div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div><button class="btn btn-outline" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button></div><div part="tab-panel" class="tab-panel col"><div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${r=>{(r.target.classList.contains("tab-btn")!==!1||r.target.classList.contains("tab")!==!1)&&(this.activeResponseTab=r.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab="response">RESPONSE</button> <button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab="headers">RESPONSE HEADERS</button> ${this.showCurlBeforeTry==="true"?"":m`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab="curl">CURL</button>`}</div>${this.responseIsBlob?m`<div part="tab-content" class="tab-content col" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}">${this.responseBlobType==="image"?m`<img style="max-height:var(--resp-area-height);object-fit:contain" class="mar-top-8" src="${zl(this.responseBlobUrl)}">`:""} <button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{ki(this.responseBlobUrl,this.respContentDisposition)}}" part="btn btn-outline">DOWNLOAD</button> ${this.responseBlobType==="view"||this.responseBlobType==="image"?m`<button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{$i(this.responseBlobUrl)}}" part="btn btn-outline">VIEW (NEW TAB)</button>`:""}</div>`:m`<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{Qt(this.responseText,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre;min-height:50px;height:var(--resp-area-height);resize:vertical;overflow:auto">
|
|
318
|
+
${t}</pre></div>`}<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="headers"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{Qt(this.responseHeaders,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-css">${this.responseHeaders}</code></pre></div>${this.showCurlBeforeTry==="true"?"":Ml.call(this,this.activeResponseTab==="curl"?"flex":"none")}</div>`}function fm(){let e;return e=this.security?.length>0&&!this.security.every(t=>!t||Object.keys(t).length===0)?this.api_keys.length>0?m`<span class="blue-text">${this.api_keys.length===1?`${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}</span>`:this.security.some(t=>!t||Object.keys(t).length===0)?m`Optional (None Applied)`:m`Required <span class="red-text">(None Applied)</span>`:m`Not Required`,m`<div class="try-bar" part="wrap-request-btn"><div class="try-layout"><dl class="try-info">${this.serverUrl?m`<dt>API Server</dt><dd class="try-server-url">${this.serverUrl}</dd>`:""}<dt>Authentication</dt><dd>${e}</dd></dl><div class="try-actions">${this.parameters.length>0||this.request_body?m`${this.hasExampleToFill?m`<button class="btn btn-outline" part="btn btn-outline btn-fill btn-fill-example" ?disabled="${this.loading}" @click="${this.onFillRequestData}" title="Fills the request fields with their examples">FILL EXAMPLE</button>`:""} <button class="btn btn-outline" part="btn btn-outline btn-clear" ?disabled="${this.loading||!this.hasValueToClear}" @click="${this.onClearRequestData}">CLEAR</button>`:""} <button class="btn btn-primary" part="btn btn-try" ?disabled="${this.loading}" aria-busy="${this.loading}" @click="${this.onTryClick}">${this.loading?"TRYING...":"TRY"}</button></div></div></div><div class="row" style="font-size:var(--font-size-small);margin:5px 0">${this.showCurlBeforeTry==="true"?Ml.call(this):""}</div>${this.responseMessage===""?"":mm.call(this)}`}var q=class extends fe{constructor(){super(),this.serverUrl="",this.servers=[],this.method="",this.path="",this.security=[],this.parameters=[],this.api_keys=[],this.accept="",this.callback="",this.webhook="",this.fillRequestFieldsWithExample="",this.allowTry="true",this.showCurlBeforeTry="false",this.renderStyle="view",this.schemaStyle="tree",this.activeSchemaTab="schema",this.activeParameterSchemaTabs={},this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="false",this.fetchCredentials="",this.responseMessage="",this.responseText="",this.responseHeaders="",this.responseStatus="success",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.fileInputKeys={},this.loading=!1,this.hasExampleToFill=!1,this.hasValueToClear=!1,this.activeAbortController=null,this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={},this.fileInputKeys={},this.loading=!1}static get styles(){return[qr,Xt,Je,_r,ya,Rr,Qa,Z`*,:before,:after{box-sizing:border-box}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}tag-input:focus-within{outline:1px solid}.top-gap{margin-top:24px}.request-panel>div>.top-gap:first-child,.request-panel>div>.request-body-container:first-child>.top-gap{margin-top:4px}.textarea{resize:vertical;direction:ltr;min-height:220px;padding:5px}.response-message{text-overflow:ellipsis;font-weight:700;&.error{color:var(--destructive)}&.success{color:var(--blue)}}.file-input-container{align-items:flex-start;width:100%;& .input-set{align-items:center;width:100%;display:flex;position:relative;&:first-child .file-input-remove-btn{display:none}&:not(:first-child) input[type=file]{padding-right:2.25em}}& .file-input-add-btn{align-self:flex-start;margin:4px 0 0 .45em;font-weight:400}}.file-input-remove-btn{color:var(--destructive);border-radius:var(--radius);cursor:pointer;background:0 0;border:none;padding:0 .25em;font-size:1.25em;line-height:1;position:absolute;top:50%;right:.45em;transform:translateY(-50%);&:hover{background:color-mix(in srgb, var(--destructive) 15%, transparent)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.v-tab-btn{font-size:var(--font-size-small);opacity:.3;cursor:pointer;background:0 0;border:none;height:24px;padding:4px 8px;&.active{background:var(--background);opacity:1;font-weight:700}}@container (width>=768px){.textarea{padding:8px}}.try-bar{font-size:var(--font-size-small);margin:16px 0;container-type:inline-size}.try-layout{flex-direction:column;gap:.75em;display:flex}.try-info{grid-template-columns:max-content minmax(0,1fr);gap:.25em .75em;margin:0;line-height:1.35;display:grid;&>dt{color:var(--foreground);font-weight:600}&>dd{min-width:0;color:var(--muted-foreground);overflow-wrap:anywhere;margin:0}}.try-actions{flex-wrap:wrap;justify-content:flex-end;gap:.5em;display:flex}@container (width>=34rem){.try-layout{flex-direction:row;align-items:center;gap:1.5em}.try-info{flex:1;min-width:0}.try-actions{flex:none}}@container (width<=20rem){.try-info{grid-template-columns:minmax(0,1fr);gap:0;&>dd+dt{margin-top:.5em}}}`,ht]}get commonConfigDeps(){return[this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,this.allowSchemaDescriptionExpandToggle,this.schemaHideReadOnly,this.schemaHideWriteOnly,this.fillRequestFieldsWithExample,this.renderStyle,this.allowTry,this.callback,this.webhook]}get parameterGuardDeps(){return[this.method,this.path,this.parameters,this.activeParameterSchemaTabs,...this.commonConfigDeps]}get requestBodyGuardDeps(){return[this.method,this.path,this.request_body,this.selectedRequestBodyType,this.selectedRequestBodyExample,this.activeSchemaTab,this.fileInputKeys,...this.commonConfigDeps]}render(){return m`<div @input="${this.syncTryBarState}" @change="${this.syncTryBarState}" class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">${this.callback==="true"?m`<h6 class="rapidoc-heading label-heading tiny-title" part="section-request-title heading heading-6">Callback request</h6>`:m`<h4 class="rapidoc-heading label-heading req-res-title" part="section-request-title heading heading-4">Request</h4>`}<div>${fr(this.parameterGuardDeps,()=>wa.call(this,"path"))} ${fr(this.parameterGuardDeps,()=>wa.call(this,"query"))} ${fr(this.requestBodyGuardDeps,()=>hm.call(this))} ${fr(this.parameterGuardDeps,()=>wa.call(this,"header"))} ${fr(this.parameterGuardDeps,()=>wa.call(this,"cookie"))} ${this.allowTry==="false"?"":m`${fm.call(this)}`}</div></div>`}async updated(e){this.showCurlBeforeTry==="true"&&(!e||!e.has("curlSyntax")||e.size>1)&&this.applyCURLSyntax(this.shadowRoot),jr(this.getRootNode()?.host?.shadowRoot||this.shadowRoot),this.webhook==="true"&&(this.allowTry="false"),queueMicrotask(()=>this.syncTryBarState())}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;let t=e.target;window.setTimeout(r=>{let a=r.closest(".example-panel").querySelector(".request-body-param"),s=r.closest(".example-panel").querySelector(".request-body-param-user-input");s.value=a.innerText;let n=this.getRequestPanel({target:r});this.liveCURLSyntaxUpdate(n)},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;let t=e.target;this.selectedRequestBodyExample="",window.setTimeout(r=>{let a=r.closest(".request-body-container").querySelector(".request-body-param");if(a){let s=r.closest(".request-body-container").querySelector(".request-body-param-user-input");s.value=a.innerText}},0,t)}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.dataset.example&&(t.value=t.tagName.toUpperCase()==="TAG-INPUT"?t.dataset.example.split("~|~"):t.dataset.example)}),this.syncTryBarState()}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.value=""}),this.syncTryBarState()}syncTryBarState(){let e=this.shadowRoot?.querySelector(".request-panel"),t=e?[...e.querySelectorAll("input, tag-input, textarea:not(.is-hidden)")]:[];this.hasExampleToFill=t.some(r=>!!r.dataset.example),this.hasValueToClear=t.some(r=>Array.isArray(r.value)?r.value.length>0:r.value!=="")}buildFetchURL(e){let t=[...e.querySelectorAll("[data-ptype='path']")],r=[...e.querySelectorAll("[data-ptype='query']")],a=[...e.querySelectorAll("[data-ptype='query-object']")],s={};t.forEach(i=>{s[i.dataset.pname]=i.value});let n=[];return r.forEach(i=>{let o=i.dataset.array!=="false",l=i.dataset.paramSerializeStyle||"form",c=i.dataset.paramSerializeExplode===void 0?l==="form":i.dataset.paramSerializeExplode==="true",d=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:l,explode:c,allowReserved:d,isArray:o,itemType:i.dataset.itemType||""})}),a.forEach(i=>{let o=i.dataset.paramSerializeStyle||"form",l=i.dataset.paramSerializeExplode===void 0?o==="form":i.dataset.paramSerializeExplode==="true",c=i.dataset.paramAllowReserved==="true";n.push({name:i.dataset.pname,value:i.value,style:o,explode:l,allowReserved:c,isObject:!0})}),jh({serverUrl:this.serverUrl,path:this.path,pathParams:s,queryParams:n,apiKeys:this.api_keys})}buildFetchHeaders(e){let t=this.closest(".expanded-req-resp-container, .req-resp-container")?.getElementsByTagName("api-response")[0],r=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],a=e.querySelector(".request-body-container"),s=t?.selectedMimeType||this.accept||"",n=a?.dataset?.selectedRequestBodyType||"",i=r.map(o=>({name:o.dataset.pname,value:o.value,explode:o.dataset.paramSerializeExplode==="true",isObject:o.dataset.ptype==="header-object"}));return Vh({accept:s,apiKeys:this.api_keys,headerParams:i,contentType:n})}buildFetchBodyOptions(e){let t=e.querySelector(".request-body-container"),r={method:this.method.toUpperCase()};if(t){let a=t.dataset.selectedRequestBodyType||"";if(a.includes("form-urlencoded")){let s=e.querySelector("[data-ptype='dynamic-form']");r.body=s?Al([],s.value):Al([...e.querySelectorAll("[data-ptype='form-urlencode']")].filter(n=>n.type!=="file").map(n=>({name:n.dataset.pname,value:n.value,isArray:n.dataset.array!=="false"})))}else if(a.includes("form-data")){let s=[...e.querySelectorAll("[data-ptype='form-data']")];r.body=Gh(s.map(i=>({name:i.dataset.pname,value:i.value,file:i.type==="file"?i.files?.[0]:void 0,isArray:i.dataset.array!=="false"})));let n=Object.fromEntries(s.filter(i=>i.dataset.contentType).map(i=>[i.dataset.pname,i.dataset.contentType]));Object.keys(n).length>0&&(r.partContentTypes=n)}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(a)){let s=e.querySelector(".request-body-param-file");s?.files[0]&&(r.body=s.files[0])}else if(a.includes("json")||a.includes("xml")||a.includes("text")){let s=e.querySelector(".request-body-param-user-input");s?.value&&(r.body=s.value)}}return r}async onTryClick(e){let t=e?.target?this.getRequestPanel(e):this.shadowRoot.querySelector(".request-panel"),r=this.buildFetchURL(t),a=this.buildFetchBodyOptions(t),s=this.buildFetchHeaders(t);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(r,s,a,t),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),this.fetchCredentials&&(a.credentials=this.fetchCredentials);let n=new AbortController;this.activeAbortController=n;let{signal:i}=n;a.headers=s;let o={url:r,...a};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:o,controller:n}}));let l={method:o.method,headers:o.headers,credentials:o.credentials,body:o.body};if(o.body instanceof FormData&&o.partContentTypes){let h=Jh(o.body,o.partContentTypes),u=new Headers(o.headers);u.set("Content-Type",h.contentType),l.headers=u,l.body=h.body}let c,d,p;try{this.loading=!0,this.responseText="\u231B",this.responseMessage="",c=new Request(o.url,l);let h=performance.now();d=await fetch(c,{signal:i});let u=performance.now();p=d.clone(),this.responseMessage=m`${d.statusText?`${d.statusText}:${d.status}`:d.status}<div style="color:var(--muted-foreground)">Took ${Math.round(u-h)} milliseconds</div>`,this.responseUrl=d.url;let g={};d.headers.forEach((y,v)=>{g[v]=y,this.responseHeaders=`${this.responseHeaders}${v}: ${y}
|
|
319
|
+
`});let f=await Yh(d);this.responseText=f.responseText,this.responseIsBlob=f.responseIsBlob,this.responseBlobType=f.responseBlobType,this.responseBlobUrl=f.responseBlobUrl,this.respContentDisposition=f.respContentDisposition,this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:c,response:p,responseHeaders:g,responseBody:f.respJson||f.respText||f.respBlob,responseStatus:p.ok}}))}catch(h){h.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:h,request:c}})),this.responseMessage=o.method?.toUpperCase()==="TRACE"?`${h.message} (Browser security restricts TRACE requests in fetch. Use the cURL snippet below.)`:`${h.message} (CORS or Network Issue)`)}finally{this.loading=!1,this.activeAbortController=null}}liveCURLSyntaxUpdate(e){this.applyCURLSyntax(e)}onGenerateCURLClick(e){let t=this.getRequestPanel(e);this.applyCURLSyntax(t)}getRequestPanel(e){return e.target.closest(".request-panel")}applyCURLSyntax(e){let t=this.buildFetchURL(e),r=this.buildFetchBodyOptions(e),a=this.buildFetchHeaders(e),s=this.generateCURLSyntax(t,a,r,e);this.curlSyntax!==s&&(this.curlSyntax=s)}generateCURLSyntax(e,t,r,a){let s=a?.querySelector(".request-body-container"),n=s?.dataset?.selectedRequestBodyType||"",i=r?.body;if(!i&&s){let o=a.querySelector(".request-body-param-user-input");o?.value&&(i=o.value)}return Wh({method:this.method,url:e,headers:t,body:i,contentType:n,partContentTypes:r?.partContentTypes})}onAddFileInput(e){let t=this.fileInputKeys[e]??[0],r=t.length>0?Math.max(...t)+1:0;this.fileInputKeys={...this.fileInputKeys,[e]:[...t,r]}}onRemoveFileInput(e,t){let r=this.fileInputKeys[e]??[0];this.fileInputKeys={...this.fileInputKeys,[e]:r.filter(a=>a!==t)}}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.fileInputKeys={},this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),"")}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"||this.webhook==="true"?"false":"true"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.fillRequestFieldsWithExample!==void 0&&(this.fillRequestFieldsWithExample=this.config.fillRequestFieldsWithExample),this.config.allowTry!==void 0&&(this.allowTry=this.config.allowTry),this.config.showCurlBeforeTry!==void 0&&(this.showCurlBeforeTry=this.config.showCurlBeforeTry),this.config.fetchCredentials!==void 0&&(this.fetchCredentials=this.config.fetchCredentials),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab))}disconnectedCallback(){this.curlSyntax="",this.activeAbortController&&=(this.activeAbortController.abort(),null),this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),super.disconnectedCallback()}};w([k({type:Object})],q.prototype,"config",void 0),w([k({type:String,attribute:"server-url"})],q.prototype,"serverUrl",void 0),w([k({type:Array})],q.prototype,"servers",void 0),w([k({type:String})],q.prototype,"method",void 0),w([k({type:String})],q.prototype,"path",void 0),w([k({type:Array})],q.prototype,"security",void 0),w([k({type:Array})],q.prototype,"parameters",void 0),w([k({type:Object})],q.prototype,"request_body",void 0),w([k({type:Array})],q.prototype,"api_keys",void 0),w([k({type:Object})],q.prototype,"parser",void 0),w([k({type:String})],q.prototype,"accept",void 0),w([k({type:String})],q.prototype,"callback",void 0),w([k({type:String})],q.prototype,"webhook",void 0),w([k({type:String,attribute:"fill-request-fields-with-example"})],q.prototype,"fillRequestFieldsWithExample",void 0),w([k({type:String,attribute:"allow-try"})],q.prototype,"allowTry",void 0),w([k({type:String,attribute:"show-curl-before-try"})],q.prototype,"showCurlBeforeTry",void 0),w([k({type:String,attribute:"render-style"})],q.prototype,"renderStyle",void 0),w([k({type:String,attribute:"schema-style"})],q.prototype,"schemaStyle",void 0),w([k({type:String,attribute:"active-schema-tab"})],q.prototype,"activeSchemaTab",void 0),w([k({type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"})],q.prototype,"activeParameterSchemaTabs",void 0),w([k({type:Number,attribute:"schema-expand-level"})],q.prototype,"schemaExpandLevel",void 0),w([k({type:String,attribute:"schema-description-expanded"})],q.prototype,"schemaDescriptionExpanded",void 0),w([k({type:String,attribute:"allow-schema-description-expand-toggle"})],q.prototype,"allowSchemaDescriptionExpandToggle",void 0),w([k({type:String,attribute:"schema-hide-read-only"})],q.prototype,"schemaHideReadOnly",void 0),w([k({type:String,attribute:"schema-hide-write-only"})],q.prototype,"schemaHideWriteOnly",void 0),w([k({type:String,attribute:"fetch-credentials"})],q.prototype,"fetchCredentials",void 0),w([re()],q.prototype,"responseMessage",void 0),w([re()],q.prototype,"responseText",void 0),w([re()],q.prototype,"responseHeaders",void 0),w([re()],q.prototype,"responseStatus",void 0),w([re()],q.prototype,"responseUrl",void 0),w([re()],q.prototype,"curlSyntax",void 0),w([re()],q.prototype,"responseIsBlob",void 0),w([re()],q.prototype,"responseBlobType",void 0),w([re()],q.prototype,"responseBlobUrl",void 0),w([re()],q.prototype,"respContentDisposition",void 0),w([re()],q.prototype,"activeResponseTab",void 0),w([re()],q.prototype,"selectedRequestBodyType",void 0),w([re()],q.prototype,"selectedRequestBodyExample",void 0),w([re()],q.prototype,"fileInputKeys",void 0),w([re()],q.prototype,"loading",void 0),w([re()],q.prototype,"hasExampleToFill",void 0),w([re()],q.prototype,"hasValueToClear",void 0),q=w([Se("api-request")],q);var ka=class extends fe{constructor(...e){super(...e),this.data=null,this.renderStyle=""}static get styles(){return[Je,ya,Xt,Z`:host{display:flex}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.json-tree{font-family:var(--font-mono);font-size:var(--font-size-small);word-break:break-all;line-height:calc(var(--font-size-small) + 6px);text-align:left;direction:ltr;flex:1;min-height:40px;display:inline-block;position:relative;overflow:hidden}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&.expanded:hover~.inside-bracket{border-left:1px solid var(--muted-foreground)}&.expanded:hover~.close-bracket{color:var(--primary)}&.collapsed+.inside-bracket,&.collapsed+.inside-bracket+.close-bracket,&.expanded .open-bracket-collapsed,&.collapsed .open-bracket-expanded{display:none}}.close-bracket{border-radius:min(var(--radius), .5rem);border:1px solid #0000;display:inline-block}.inside-bracket{border-left:1px dotted var(--border);padding-left:12px;overflow:hidden}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--destructive)}.boolean{color:var(--purple)}.object{color:var(--foreground)}.toolbar{align-items:center;padding:2px;display:flex;position:absolute;top:5px;right:6px}`,ht]}render(){return m`<div class="json-tree" @click="${e=>{e.target.classList.contains("btn-copy")?Qt(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}"><div class="toolbar"><button class="btn btn-sm btn-outline toolbar-btn btn-copy" part="btn btn-outline btn-copy">Copy</button></div>${this.generateTree(this.data,!0)}</div>`}generateTree(e,t=!1){if(e===null)return m`<span class="null">null</span>${t?"":","}`;if(typeof e=="object"&&!(e instanceof Date)){let r=Array.isArray(e)?"array":"pure_object";return Object.keys(e).length===0?m`${Array.isArray(e)?"[ ],":"{ },"}`:m`<div class="open-bracket expanded ${r==="array"?"array":"object"}"><span class="open-bracket-expanded">${r==="array"?"[":"{"}</span> <span class="open-bracket-collapsed">${r==="array"?"[...]":"{...}"}</span></div><div class="inside-bracket">${Object.keys(e).map((a,s,n)=>m`<div class="item">${r==="pure_object"?m`"${a}":`:""} ${this.generateTree(e[a],s===n.length-1)}</div>`)}</div><div class="close-bracket">${r==="array"?"]":"}"}${t?"":","}</div>`}return typeof e=="string"||e instanceof Date?m`<span class="${typeof e}">"${e}"</span>${t?"":","}`:m`<span class="${typeof e}">${e}</span>${t?"":","}`}toggleExpand(e){let t=e.target.closest(".open-bracket");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};w([k({type:Object})],ka.prototype,"data",void 0),w([k({type:String,attribute:"render-style"})],ka.prototype,"renderStyle",void 0),ka=w([Se("json-tree")],ka);var ae=class extends fe{constructor(){super(),this.callback="",this.webhook="",this.schemaStyle="",this.renderStyle="",this.selectedStatus="",this.selectedMimeType="",this.activeSchemaTab="schema",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="false",this.schemaHideWriteOnly="true",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.selectedStatus="",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get styles(){return[Je,_r,Rr,qr,Xt,ya,Z`.resp-headers-list{margin-bottom:16px}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.resp-head{vertical-align:middle;padding:16px 0 8px;&.divider{border-top:1px solid var(--border);margin-top:10px}}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:var(--font-size-description);color:var(--muted-foreground);text-align:left}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}.status-group{flex-wrap:wrap;margin-top:8px;display:inline-flex}.status-btn{border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--muted-foreground);border-radius:0;margin:0 0 0 -1px;&:first-child{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius);margin-left:0}&:last-child{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius)}&:hover{background:var(--muted);color:var(--foreground)}&[aria-pressed=true]{z-index:1;border-color:var(--primary);background:color-mix(in srgb, var(--primary) 14%, transparent);color:var(--primary);position:relative}&:focus-visible{z-index:2}}`,ht]}willUpdate(e){if(super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"||this.webhook==="true"?"false":"true"),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab)),e.has("responses")||e.has("callback")||e.has("webhook")){if(!this.responses||typeof this.responses!="object")return;let t=Qh(this.responses,{callback:this.callback,webhook:this.webhook});this.headersForEachRespStatus=t.headersForEachRespStatus,this.mimeResponsesForEachStatus=t.mimeResponsesForEachStatus,this.defaultStatus=t.defaultStatus,this.defaultMimeType=t.defaultMimeType,this.selectedStatus&&this.responses?.[this.selectedStatus]||(this.selectedStatus=t.defaultStatus),this.selectedMimeType||=t.defaultMimeType}}render(){return m`<div class="col regular-font response-panel ${this.renderStyle}-mode">${this.callback==="true"?m`<h6 class="rapidoc-heading label-heading tiny-title" part="section-response-title heading heading-6">Callback response</h6>`:m`<h4 class="rapidoc-heading label-heading req-res-title" part="section-response-title heading heading-4">Response</h4>`}<div>${this.responseTemplate()}</div></div>`}resetSelection(){this.selectedStatus=this.defaultStatus||this.responses&&Object.keys(this.responses).find(e=>e!=="$$ref")||"",this.selectedMimeType=this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]?Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||"":this.defaultMimeType||""}responseTemplate(){return this.responses?(this.selectedStatus&&this.responses[this.selectedStatus]||(this.selectedStatus=this.defaultStatus||Object.keys(this.responses).find(e=>e!=="$$ref")||Object.keys(this.responses)[0]||""),!this.selectedMimeType&&this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]&&(this.selectedMimeType=Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||this.defaultMimeType||""),m`${Object.keys(this.responses).length>1?m`<div class="status-group" role="group" aria-label="Response status">${Object.keys(this.responses).map(e=>m`${e==="$$ref"?"":m`<button @click="${()=>{this.selectedStatus=e,this.selectedMimeType=this.responses[e].content&&Object.keys(this.responses[e].content)[0]?Object.keys(this.responses[e].content)[0]:void 0}}" class="btn btn-sm status-btn" aria-pressed="${this.selectedStatus===e?"true":"false"}" part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}">${e}</button>`}`)}</div>`:m`<span>${Object.keys(this.responses)[0]}</span>`} ${Object.keys(this.responses).map(e=>m`<div style="display:${e===this.selectedStatus?"block":"none"}"><div class="top-gap"><span class="resp-descr m-markdown">${P(M(T(this.responses[e]?.description||"")))}</span> ${this.headersForEachRespStatus[e]&&this.headersForEachRespStatus[e]?.length>0?m`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}</div>${!this.mimeResponsesForEachStatus[e]||Object.keys(this.mimeResponsesForEachStatus[e]).length===0?"":m`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${t=>{t.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=t.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab="example">EXAMPLE</button> <button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"":"active"}" data-tab="schema">SCHEMA</button> ${Object.keys(this.mimeResponsesForEachStatus[e]).length===1?m`<span class="tab-bar-end">${Object.keys(this.mimeResponsesForEachStatus[e])[0]}</span>`:m`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}</div>${this.activeSchemaTab==="example"?m`<div part="tab-content" class="tab-content col">${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`:m`<div part="tab-content" class="tab-content col">${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`}</div>`}</div>`)}`):""}responseHeaderListTemplate(e){return m`<h5 class="rapidoc-heading label-heading resp-headers" part="heading heading-5">Response headers</h5><div class="param-list-container resp-headers-list"><ul class="param-list" part="param-list" role="list">${e.map(t=>m`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${t.name||""}</div>${t.schema?.type?m`<div class="param-type" part="param-type">${t.schema.type}</div>`:""}</div>${t.schema?.example?m`<dl class="param-constraint" part="param-constraint"><dt class="param-constraint-label" part="param-constraint-label">Example:</dt><dd>${t.schema.example}</dd></dl>`:""}<div class="param-details" part="param-details">${t.description?m`<div class="m-markdown-small">${P(M(T(t.description)))}</div>`:""}</div></li>`)}</ul></div>`}mimeTypeDropdownTemplate(e){return m`<select aria-label="mime types" class="select-sm tab-bar-end" @change="${t=>{this.selectedMimeType=t.target.value}}">${e.map(t=>m`<option value="${t}" ?selected="${t===this.selectedMimeType}">${t}</option>`)}</select>`}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return!e||!e.examples||e.examples.length===0?m`<pre style="color:var(--destructive)" class="example-panel"> No example provided </pre>`:m`${e.examples.length===1?m`${e.examples[0].exampleFormat==="json"?m`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?m`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${P(M(T(e.examples[0].exampleDescription||"")))}</div>`:""}<json-tree render-style="${this.renderStyle}" .data="${e.examples[0].exampleValue}" class="example-panel" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:m`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?m`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${P(M(T(e.examples[0].exampleDescription||"")))}</div>`:""}<pre class="example-panel">${e.examples[0].exampleValue}</pre>`}`:m`<div class="example-panel"><select aria-label="response examples" class="select-sm example-select" title="${Rt(e.examples.find(t=>t.exampleId===e.selectedExample))}" @change="${t=>this.onSelectExample(t)}">${e.examples.map(t=>m`<option value="${t.exampleId}" title="${Rt(t)}" ?selected="${t.exampleId===e.selectedExample}">${Rt(t)}</option>`)}</select> ${e.examples.map(t=>m`<div class="example" data-example="${t.exampleId}" style="display:${t.exampleId===e.selectedExample?"block":"none"}">${t.exampleDescription?m`<div class="m-markdown-small" style="padding:4px 0">${P(M(T(t.exampleDescription||"")))}</div>`:""} ${t.exampleFormat==="json"?m`<json-tree render-style="${this.renderStyle}" .data="${t.exampleValue}" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:m`<pre>${t.exampleValue}</pre>`}</div>`)}</div>`}`}mimeSchemaTemplate(e){return e?m`${this.schemaStyle==="table"?m`<schema-table .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}`:m`<pre style="color:var(--destructive)" class="example-panel"> Schema not found</pre>`}};w([k({type:Object})],ae.prototype,"config",void 0),w([k({type:String})],ae.prototype,"callback",void 0),w([k({type:String})],ae.prototype,"webhook",void 0),w([k({type:Object})],ae.prototype,"responses",void 0),w([k({type:Object})],ae.prototype,"parser",void 0),w([k({type:String,attribute:"schema-style"})],ae.prototype,"schemaStyle",void 0),w([k({type:String,attribute:"render-style"})],ae.prototype,"renderStyle",void 0),w([k({type:String,attribute:"selected-status"})],ae.prototype,"selectedStatus",void 0),w([k({type:String,attribute:"selected-mime-type"})],ae.prototype,"selectedMimeType",void 0),w([k({type:String,attribute:"active-schema-tab"})],ae.prototype,"activeSchemaTab",void 0),w([k({type:Number,attribute:"schema-expand-level"})],ae.prototype,"schemaExpandLevel",void 0),w([k({type:String,attribute:"schema-description-expanded"})],ae.prototype,"schemaDescriptionExpanded",void 0),w([k({type:String,attribute:"allow-schema-description-expand-toggle"})],ae.prototype,"allowSchemaDescriptionExpandToggle",void 0),w([k({type:String,attribute:"schema-hide-read-only"})],ae.prototype,"schemaHideReadOnly",void 0),w([k({type:String,attribute:"schema-hide-write-only"})],ae.prototype,"schemaHideWriteOnly",void 0),ae=w([Se("api-response")],ae);function gm(e){let t=new Ze,r=new T.Renderer;return r.heading=({text:a,depth:s})=>`<h${s} class="observe-me" id="${e}--${t.slug(a)}">${a}</h${s}>`,Or(r),r}function nn(e,t="",r="",a=!1){let s=new Set;for(let c in e.responses)for(let d in e.responses[c]?.content)s.add(d.trim());let n=[...s].join(", "),i=this.resolvedSpec.securitySchemes.filter(c=>c.finalKeyValue&&e.security?.some(d=>c.securitySchemeId in d))||[],o=this.resolvedSpec.securitySchemes.find(c=>c.securitySchemeId==="_rapidoc_api_key"&&c.value!=="-");o&&i.push(o);let l=e.xCodeSamples?$l.call(this,e.xCodeSamples):"";return m`${this.renderStyle==="read"&&!a?m`<div class="divider" part="operation-divider"></div>`:""}<div class="expanded-endpoint-body observe-me ${e.method} ${e.deprecated?"deprecated":""}" part="section-operation ${e.elementId}" id="${e.elementId}" data-first-operation-in-tag="${a?"true":O}">${this.renderStyle==="focused"&&t?m`<div class="tag-container" part="section-operation-tag" style="margin-bottom:16px"><h2 class="rapidoc-heading upper" part="heading heading-2" style="font-size:var(--h3-font-size);margin:0">${t}</h2>${a&&r?m`<div class="tag-description regular-font" part="section-tag-description" style="margin-top:12px;padding:12px 14px;background:var(--code-bg);border-radius:min(var(--radius),.5rem);border:1px solid var(--border)"><div class="m-markdown">${P(M(T(r)))}</div></div>`:""}</div>`:""} ${e.deprecated?m`<div class="bold-text red-text">DEPRECATED</div>`:""} ${m`${e.xBadges&&e.xBadges?.length>0?m`<div style="display:flex;flex-wrap:wrap;margin-bottom:-24px;font-size:var(--font-size-small)">${e.xBadges.map(c=>c.color==="none"?"":m`<span style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${c.color}) 10%,transparent);color:var(--${c.color});border:1px solid var(--${c.color})">${c.label}</span>`)}</div>`:""}<h3 class="rapidoc-heading operation-summary" part="section-operation-summary heading heading-3">${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h3>${e.isWebhook?m`<span part="section-operation-webhook" style="color:var(--primary);font-weight:700;font-size:var(--font-size-regular)">WEBHOOK</span>`:m`<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left;direction:ltr;padding:8px 0;color:var(--muted-foreground)"><span part="label-operation-method" class="regular-font upper method-fg bold-text ${e.method}">${e.method}</span> <span style="overflow-wrap:break-word" part="label-operation-path">${e.path}</span></div>`} ${kl.call(this,e.security,e.elementId)}<slot name="${e.elementId}"></slot>`} ${e.description?m`<div class="m-markdown">${P(M(T(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?m`<div class="external-docs-box"><div class="m-markdown">${P(M(T(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?m`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""} ${l}<div class="req-resp-container expanded-req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.renderStyle}-mode ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${i}" .servers="${e.servers}" server-url="${e.servers?.[0]?.url||this.selectedServer?.computedUrl}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${n}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
320
|
+
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
|
|
240
321
|
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
241
322
|
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
|
242
|
-
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?
|
|
323
|
+
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?Sl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
324
|
+
btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
|
|
243
325
|
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
244
|
-
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-response></div></div>`}function
|
|
245
|
-
|
|
246
|
-
${
|
|
247
|
-
</div>`)}</div></section><section class="regular-font section-gap--read-mode" part="section-operations-in-tag">${e.paths.map(t=>xs.call(this,t))}</section>`)}`:""}function ou(e){return p`<div class="divider"></div><div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}"><div style="font-weight:700">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">Schema</span></div>${this.schemaStyle==="table"?p`<schema-table .data="${G(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:p`<schema-tree .data="${G(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}function lu(e,t){return e.id.indexOf("schemas-")===-1?p`<div class="divider"></div><div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}">${p`<div style="font-weight:700">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">${t}</span></div>${e.component?p`<div class="mono-font regular-font-size" style="padding:8px 0;color:var(--card-foreground)"><json-tree class="border tree" render-style="${this.renderStyle}" .data="${e.component}"></json-tree></div>`:""}`}</div>`:ou.call(this,e)}function $o(){return this.resolvedSpec?p`${this.resolvedSpec.components.map(e=>p`<div id="cmp--${e.name.toLowerCase()}" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary)"><div class="title tag">${e.name}</div><div class="regular-font-size">${F(`<div class='m-markdown regular-font'>${O(E(e.description||""))}</div>`)}</div></div><div class="regular-font section-gap--read-mode">${e.subComponents.filter(t=>t.expanded!==!1).map(t=>lu.call(this,t,e.name))}</div>`)}`:""}function cu(){let e=new Ge,t=new E.Renderer;return t.heading=({text:a,depth:r})=>`<h${r} class="observe-me" id="overview--${e.slug(a)}">${a}</h${r}>`,na(t),t}function ws(){return p`<section id="overview" part="section-overview" class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">${this.resolvedSpec?.info?p`<div id="api-title" part="section-overview-title" style="font-size:32px">${this.resolvedSpec.info.title} ${this.resolvedSpec.info.version?p`<span style="font-size:var(--font-size-small);font-weight:700">${this.resolvedSpec.info.version}</span>`:""}</div><div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px);margin-top:8px">${this.resolvedSpec.info.contact?.email?p`<span>${this.resolvedSpec.info.contact.name||"Email"}: <a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a></span>`:""} ${this.resolvedSpec.info.contact?.url?p`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""} ${this.resolvedSpec.info.license?p`<span>License: ${this.resolvedSpec.info.license.url?p`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name}</span>`:""} ${this.resolvedSpec.info.termsOfService?p`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""} ${this.specUrl&&this.allowSpecFileDownload==="true"?p`<div style="display:flex;margin:12px 0;gap:8px;justify-content:start"><button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click="${()=>{Fn(this.specUrl,"openapi-spec")}}">Download OpenAPI spec</button> ${this.specUrl?.trim().toLowerCase().endsWith("json")?p`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click="${()=>{On(this.specUrl)}}">View OpenAPI spec (New Tab)</button>`:""}</div>`:""}</div><slot name="overview"></slot><div id="api-description">${this.resolvedSpec.info.description?p`${F(O(`<div class="m-markdown regular-font">
|
|
248
|
-
|
|
249
|
-
</div>`))}`:""}</div>`:""}</section>`}function ks(e){let t=this.resolvedSpec?.servers.find(a=>a.url===e);return t?(this.selectedServer=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:t}})),!0):!1}function So(e,t){let a=[...e.currentTarget.closest("table").querySelectorAll("input, select")],r=t.url;a.forEach(s=>{let n=RegExp(`{${s.dataset.var}}`,"g");r=r.replace(n,s.value)}),t.computedUrl=r,this.requestUpdate()}function du(){return this.selectedServer&&this.selectedServer.variables?p`<div class="table-title">SERVER VARIABLES</div><table class="m-table" role="presentation">${Object.entries(this.selectedServer.variables).map(e=>p`<tr><td style="vertical-align:middle">${e[0]}</td><td>${e[1].enum?p`<select data-var="${e[0]}" @input="${t=>{So.call(this,t,this.selectedServer)}}">${Object.entries(e[1].enum).map(t=>e[1].default===t[1]?p`<option selected="selected" label="${t[1]}" value="${t[1]}"></option>`:p`<option label="${t[1]}" value="${t[1]}"></option>`)}</select>`:p`<input type="text" part="textbox textbox-server-var" spellcheck="false" data-var="${e[0]}" value="${e[1].default}" @input="${t=>{So.call(this,t,this.selectedServer)}}">`}</td></tr>${e[1].description?p`<tr><td colspan="2" style="border:none"><span class="m-markdown-small">${F(O(E(e[1].description)))}</span></td></tr>`:""}`)}</table>`:""}function Eo(){return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":p`<section id="servers" part="section-servers" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}"><div part="section-servers-title" class="sub-title" style="display:flex;align-items:center;gap:8px">API SERVER ${this.mockServer==="true"?p`<span style="font-size:var(--font-size-small);font-weight:700;color:var(--green,#10b981);border:1px solid var(--green,#10b981);border-radius:4px;padding:1px 6px;letter-spacing:.5px" title="In-browser mock server is active">MOCK ACTIVE</span>`:""}</div><div class="mono-font" style="margin:12px 0;font-size:calc(var(--font-size-small) + 1px)">${!this.resolvedSpec.servers||this.resolvedSpec.servers?.length===0?"":p`${this.resolvedSpec?.servers.map((e,t)=>p`<input type="radio" name="api_server" id="srvr-opt-${t}" value="${e.url}" @change="${()=>{ks.call(this,e.url)}}" .checked="${this.selectedServer.url===e.url}" style="margin:4px 0;cursor:pointer"> <label style="cursor:pointer" for="srvr-opt-${t}">${e.url} ${e.description?p`- <span class="regular-font">${e.description}</span>`:""}</label><br>`)}`}<div class="table-title primary-text" part="label-selected-server">SELECTED: ${this.selectedServer?.computedUrl||"none"} ${this.mockServer==="true"?p`<span style="color:var(--green,#10b981);margin-left:6px">(Mocked)</span>`:""}</div></div><slot name="servers"></slot>${du.call(this)}</section>`}function Ao(e,t="toggle"){let a=e?.closest(".nav-bar-tag-and-paths"),r=a?.querySelector(".nav-bar-paths-under-tag");if(a){let s=a.classList.contains("expanded");s&&(t==="toggle"||t==="collapse")?(r.style.maxHeight=0,a.classList.replace("expanded","collapsed")):!s&&(t==="toggle"||t==="expand")&&(a.classList.replace("collapsed","expanded"),r.style.maxHeight=`${r.scrollHeight}px`)}}function pu(e,t="expand-all"){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let a=[...e.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];t==="expand-all"?a.forEach(r=>{let s=r.querySelector(".nav-bar-paths-under-tag");r.classList.replace("collapsed","expanded"),s.style.maxHeight=`${s?.scrollHeight}px`}):a.forEach(r=>{r.classList.replace("expanded","collapsed")})}function Do(e){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let t=e.target;if(!(t.closest("#nav-bar-search")||t.closest("#advanced-search-btn")||t.closest('[part~="btn-clear-filter"]')||t.closest('slot[name="nav-logo"]')))if(e.stopPropagation(),t.dataset?.action==="navigate"){this.scrollToEventTarget(e,!1);let a=e.currentTarget.closest("#nav-bar");a.classList.contains("floating-nav")&&a.classList.remove("floating-nav")}else t.dataset?.action==="expand-all"||t.dataset?.action==="collapse-all"?pu(e,t.dataset.action):t.dataset?.action==="expand-collapse-tag"&&Ao(t,"toggle")}function uu(){let e=new Ge;return!this.resolvedSpec||this.resolvedSpec.specLoadError?p`<nav class="nav-bar" part="section-navbar"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo"></slot></div></nav>`:p`<button id="nav-bar-btn" part="btn-navbar" class="btn" @click="${this.onOpenNavBarToggle}">☰</button><nav id="nav-bar" class="nav-bar ${this.renderStyle}" part="section-navbar"><nav class="nav-scroll" tabindex="-1" part="section-navbar-scroll" @click="${t=>Do.call(this,t)}" @keyup="${t=>Do.call(this,t)}"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo"></slot>${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":p`<div class="nav-bar-search-container ${this.allowAdvancedSearch==="false"?"has-bottom-border":""}" part="section-navbar-search">${this.allowSearch==="false"?"":p`<div class="nav-bar-search-input-wrapper"><input id="nav-bar-search" part="textbox textbox-nav-filter" class="nav-bar-search-input" type="text" placeholder="Filter" @change="${this.onSearchChange}" spellcheck="false"><div class="nav-bar-search-icon" @click="${this.onSearchChange}">↩</div></div>${this.searchVal?p`<button @click="${this.onClearSearch}" class="m-btn thin-border btn-clear-filter" part="btn btn-outline btn-clear-filter">CLEAR</button>`:""}`} ${this.allowAdvancedSearch==="false"||this.searchVal?"":p`<button id="advanced-search-btn" class="m-btn primary" part="btn btn-fill btn-search" @click="${this.onShowAdvancedSearchClicked}">SEARCH</button>`}</div>`}</div>${this.showInfo==="false"||!this.resolvedSpec.info?"":p`${this.infoDescriptionHeadingsInNavBar==="true"?p`${this.resolvedSpec.infoDescriptionHeaders.length>0?p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-overview" data-content-id="overview" data-action="navigate" tabindex="0" part="section-navbar-item section-navbar-overview">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`:""}<div class="overview-headers">${this.resolvedSpec.infoDescriptionHeaders.map(t=>{let a=e.slug(t.text);return p`<div class="nav-bar-h${t.depth} ${this.navActiveItemMarker}" id="link-overview--${a}" data-action="navigate" data-content-id="overview--${a}">${t.text}</div>`})}</div>${this.resolvedSpec.infoDescriptionHeaders.length>0?p`<hr style="border-top:1px solid var(--muted);border-width:1px 0 0 0;margin:15px 0 0 0">`:""}`:p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-overview" data-action="navigate" data-content-id="overview" tabindex="0">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`}`} ${this.allowServerSelection==="false"?"":p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-servers" data-action="navigate" data-content-id="servers" tabindex="0" part="section-navbar-item section-navbar-servers">API Servers</div>`} ${this.allowAuthentication==="false"||!this.resolvedSpec.securitySchemes?"":p`<div class="nav-bar-info ${this.navActiveItemMarker}" id="link-auth" data-action="navigate" data-content-id="auth" tabindex="0" part="section-navbar-item section-navbar-auth">Authentication</div>`}<div id="link-operations-top" class="nav-bar-section operations" data-action="navigate" data-content-id="${this.renderStyle==="focused"?"":"operations-top"}" part="section-navbar-item section-navbar-operations-top"><div style="font-size:16px;display:flex;margin-left:10px">${this.renderStyle==="focused"?p`<div class="nav-bar-expand-all" data-action="expand-all" tabindex="0" title="Expand all">▸</div><div class="nav-bar-collapse-all" data-action="collapse-all" tabindex="0" title="Collapse all">▸</div>`:""}</div><div class="nav-bar-section-title">OPERATIONS</div></div>${this.resolvedSpec.tags.filter(t=>t.paths.filter(a=>_t(this.searchVal,a,t.name)).length).map(t=>p`<div class="nav-bar-tag-and-paths ${this.renderStyle==="read"||t.expanded?"expanded":"collapsed"}">${t.name==="General \u2982"?p`<hr style="border:none;border-top:1px dotted var(--muted-foreground);opacity:.3;margin:-1px 0 0 0">`:p`<div class="nav-bar-tag ${this.navActiveItemMarker}" part="section-navbar-item section-navbar-tag" id="link-${t.elementId}" data-action="${this.renderStyle==="read"||this.onNavTagClick==="show-description"?"navigate":"expand-collapse-tag"}" data-content-id="${(this.renderStyle==="read"?`${t.elementId}`:this.onNavTagClick==="show-description")?`${t.elementId}`:""}" data-first-path-id="${t.firstPathId}" tabindex="0"><div style="pointer-events:none">${t.displayName||t.name}</div><div class="nav-bar-tag-icon" tabindex="0" data-action="expand-collapse-tag"></div></div>`} ${this.infoDescriptionHeadingsInNavBar==="true"?p`${this.renderStyle==="focused"&&this.onNavTagClick==="expand-collapse"?"":p`<div class="tag-headers">${(()=>{let a=new Ge;return t.headers.map(r=>{let s=a.slug(r.text);return p`<div class="nav-bar-h${r.depth} ${this.navActiveItemMarker}" part="section-navbar-item section-navbar-h${r.depth}" id="link-${t.elementId}--${s}" data-action="navigate" data-content-id="${t.elementId}--${s}" tabindex="0">${r.text}</div>`})})()}</div>`}`:""}<div class="nav-bar-paths-under-tag">${t.paths.filter(a=>!this.searchVal||_t(this.searchVal,a,t.name)).map(a=>p`<div class="nav-bar-path ${this.navActiveItemMarker} ${this.usePathInNavBar==="true"?"small-font":""}" part="section-navbar-item section-navbar-path" data-action="navigate" data-content-id="${a.elementId}" id="link-${a.elementId}" tabindex="0"><span class="nav-bar-path-inner" style="${a.deprecated?"filter:opacity(0.5);":""}"><span class="nav-bar-path-label">${a.isWebhook?p`<span class="nav-bar-webhook">WEBHOOK</span>`:""} ${this.usePathInNavBar==="true"?p`<span class="mono-font">${a.path}</span>`:a.summary||a.shortSummary} </span>${p`<span class="nav-method ${this.showMethodInNavBar} ${a.method}">${this.showMethodInNavBar==="as-colored-block"?a.method.substring(0,3).toUpperCase():a.method.toUpperCase()}</span>`}</span></div>`)}</div></div>`)} ${this.resolvedSpec.components&&this.showComponents==="true"?p`<div id="link-components" class="nav-bar-section components"><div></div><div class="nav-bar-section-title">COMPONENTS</div></div>${this.resolvedSpec.components.map(t=>t.subComponents.length?p`<div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" data-action="navigate" data-content-id="cmp--${t.name.toLowerCase()}" id="link-cmp--${t.name.toLowerCase()}">${t.name}</div>${t.subComponents.filter(a=>a.expanded!==!1).map(a=>p`<div class="nav-bar-path" data-action="navigate" data-content-id="cmp--${a.id}" id="link-cmp--${a.id}"><span style="pointer-events:none">${a.name}</span></div>`)}`:"")}`:""}</nav></nav>`}function hu(e){let t=new E.Renderer,a=new Ge;return t.heading=({text:r,depth:s})=>`<h${s} class="observe-me" id="${e}--${a.slug(r)}">${r}</h${s}>`,na(t),t}function Xa(e){return p`<div class="regular-font section-gap--focused-mode" part="section-operations-in-tag">${e}</div>`}function Co(){if(this.showInfo==="true")return Xa(ws.call(this));let e=this.resolvedSpec.tags[0],t=this.resolvedSpec.tags[0]?.paths[0];return Xa(e&&t?xs.call(this,t,e.name):"")}function mu(e){return p`<h1 id="${e.elementId}">${e.displayName||e.name}</h1>${this.onNavTagClick==="show-description"&&e.description?p`<div class="m-markdown">${F(`<div class="m-markdown regular-font">
|
|
250
|
-
|
|
251
|
-
|
|
326
|
+
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`}function ym(){if(!this.resolvedSpec)return"";let e=t=>m`<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${t.displayName||t.name}</h2><slot name="${t.elementId}"></slot>${P(`
|
|
327
|
+
<div class="m-markdown regular-font">
|
|
328
|
+
${M(T(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:gm(t.elementId)}:void 0))}
|
|
329
|
+
</div>`)}</section>${t.paths.length>0?m`<section class="regular-font section-gap--read-mode" part="section-operations-in-tag">${t.paths.map((r,a)=>nn.call(this,r,t.name,t.description,a===0))}</section>`:""}`;if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let t=new Set;this.resolvedSpec.tagGroups.forEach(a=>{(a.tags||[]).forEach(s=>t.add(s.name.toLowerCase()))});let r=(this.resolvedSpec.tags||[]).filter(a=>!t.has(a.name.toLowerCase()));return m`${this.resolvedSpec.tagGroups.map(a=>m`<section id="${a.elementId}" part="section-tag-group" class="regular-font section-gap--read-mode observe-me read-mode-group"><h2 class="rapidoc-heading title tag-group" part="section-tag-group-title heading heading-2">${a.displayName||a.name}</h2>${a.description?m`<div class="m-markdown tag-group-description">${P(M(T(a.description)))}</div>`:""}</section>${a.tags.map(s=>e(s))}`)} ${r.map(a=>e(a))}`}return m`${this.resolvedSpec.tags.map(t=>e(t))}`}function bm(e){return m`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}"><h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">Schema</span></h3>${this.schemaStyle==="table"?m`<schema-table .data="${se(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:m`<schema-tree .data="${se(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}function vm(e,t){return e.id.indexOf("schemas-")===-1?m`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}">${m`<h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">${t}</span></h3>${e.component?m`<div class="mono-font regular-font-size" style="padding:8px 0;color:var(--card-foreground)"><json-tree class="border tree" render-style="${this.renderStyle}" .data="${e.component}"></json-tree></div>`:""}`}</div>`:bm.call(this,e)}function Ul(){return this.resolvedSpec?m`${this.resolvedSpec.components.map(e=>m`<div id="cmp--${e.name.toLowerCase()}" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="heading heading-2">${e.name}</h2>${P(`<div class='m-markdown regular-font'>${M(T(e.description||""))}</div>`)}</div><div class="regular-font section-gap--read-mode">${e.subComponents.filter(t=>t.expanded!==!1).map(t=>vm.call(this,t,e.name))}</div>`)}`:""}function xm(){let e=new Ze,t=new T.Renderer;return t.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="overview--${e.slug(r)}">${r}</h${a}>`,Or(t),t}function on(){return m`<section id="overview" part="section-overview" class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">${this.resolvedSpec?.info?m`<h1 id="api-title" class="rapidoc-heading" part="section-overview-title heading heading-1">${this.resolvedSpec.info.title} ${this.resolvedSpec.info.version?m`<span class="version" part="label-overview-version">${this.resolvedSpec.info.version}</span>`:""}</h1><div id="api-info">${this.resolvedSpec.info.contact?.email?m`<span>${this.resolvedSpec.info.contact.name||"Email"}: <a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a></span>`:""} ${this.resolvedSpec.info.contact?.url?m`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""} ${this.resolvedSpec.info.license?m`<span>License: ${this.resolvedSpec.info.license.url?m`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name}</span>`:""} ${this.resolvedSpec.info.termsOfService?m`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}</div><slot name="overview"></slot>${this.resolvedSpec.info.description?m`<div id="api-description" class="m-markdown regular-font">${P(M(T(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:xm()}:void 0)))}</div>`:""}`:""}</section>`}function ln(e){return String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").replace(/^_|_$/g,"").toUpperCase()||"API_KEY"}var wm=new Set(["authorization","cookie","set-cookie","x-api-key","api-key","apikey","api_key","user-agent","host","content-length","accept","accept-encoding","connection"]);function Hl(e){if(!e||e==="false")return!1;let t=(Array.isArray(e)?e:String(e).split(",")).map(r=>String(r).trim().toLowerCase()).filter(Boolean);return t.length?!t.some(r=>r==="none"||r==="false"):!1}function ot(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").toLowerCase():"tool"}function Bt(e,t=300){if(!e||typeof e!="string")return"";let r=e.replace(/<[^>]*>/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[`*_~#<>]/g,"").replace(/\s+/g," ").trim();return r.length<=t?r:r.slice(0,t-3)+"..."}function km(e,t){return ot(`${e}_${t.split("/").filter(Boolean).map(r=>r.startsWith("{")&&r.endsWith("}")?`by_${r.slice(1,-1)}`:r).join("_")}`)}function Wl(e){let t=e?.tools||[],r=e?.resources||[],a=0,s=0;for(let i of t)a+=Math.ceil((i.name.length+(i.description||"").length+JSON.stringify(i.inputSchema||{}).length)/4),a+=25,i.annotations?.readOnlyHint||s++;for(let i of r)a+=Math.ceil((i.name.length+(i.description||"").length+i.uri.length)/4)+20;let n=[];return a>5e3&&n.push(`Context overhead (~${a.toLocaleString()} tokens/turn) is high. Consider hiding unused operations with x-internal: true.`),t.length>30&&n.push(`${t.length} tools exceeds the recommended limit of 30 tools per agent to prevent model paralysis.`),{totalTools:t.length,totalResources:r.length,estimatedTokens:a,consequentialCount:s,warnings:n}}function Kl(e,t={}){let r=ot(e||"api_mcp_server"),a=t.schemes?.length?t.schemes:[],s={};for(let o of a)s[ln(o)]=`your-${ot(o).replace(/_/g,"-")}`;a.length||(s.API_KEY="your-api-key-here");let n={mcpServers:{[r]:{command:"npx",args:["-y","tsx","server.ts"],env:s}}},i=n;return{claudeDesktopConfig:JSON.stringify(n,null,2),cursorConfig:JSON.stringify(i,null,2)}}var $m=new Set(["type","title","description","default","enum","const","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"]),Sm=new Set(["items","additionalProperties","not"]),Am=new Set(["allOf","anyOf","oneOf"]);function Vl(e,t){if(typeof t=="string"&&t.startsWith("#/"))return t.slice(2).split("/").map(r=>decodeURIComponent(r).replace(/~1/g,"/").replace(/~0/g,"~")).reduce((r,a)=>r&&typeof r=="object"?r[a]:void 0,e)}function _e(e,t,r=new Set){if(!e||typeof e!="object")return{};if(e.$ref){let n=Vl(t,e.$ref);return!n||typeof n!="object"?{description:`See ${e.$ref}`}:_e(n,t,r)}if(r.has(e))return e.type?{type:e.type}:{};r.add(e);let a={},s=!1;for(let[n,i]of Object.entries(e))if(n==="properties"&&i&&typeof i=="object"){a.properties={};for(let[o,l]of Object.entries(i))l?.readOnly!==!0&&(a.properties[o]=_e(l,t,r))}else Sm.has(n)?a[n]=typeof i=="object"?_e(i,t,r):i:Am.has(n)&&Array.isArray(i)?a[n]=i.map(o=>_e(o,t,r)):n==="nullable"?s=i===!0:$m.has(n)&&(a[n]=i);r.delete(e),a.properties&&Array.isArray(a.required)&&(a.required=a.required.filter(n=>n in a.properties),a.required.length||delete a.required);for(let[n,i]of[["exclusiveMinimum","minimum"],["exclusiveMaximum","maximum"]])typeof a[n]=="boolean"&&(a[n]&&a[i]!==void 0?(a[n]=a[i],delete a[i]):delete a[n]);return s&&a.type&&![].concat(a.type).includes("null")&&(a.type=[].concat(a.type,"null")),a}function Zl(e,t,r){if(!t||typeof t.reference!="string")return t;let a=t.reference.match(/^\$components\.([A-Za-z]+)\.([A-Za-z0-9_.-]+)$/);if(!a||a[1]!==r)return null;let s=e?.components?.[r]?.[a[2]];return s?{...s,...t.value===void 0?{}:{value:t.value}}:null}var Em=["get","put","post","delete","options","head","patch","trace","query"];function Jl(e){let t=new Map,r=new Map;for(let[a,s]of Object.entries(e?.paths||{}))if(s&&typeof s=="object")for(let n of Em){let i=s[n];if(!i||typeof i!="object")continue;let o={operationId:i.operationId||"",method:n,path:a,summary:i.summary||""},l=i.security??e.security;l!==void 0&&(o.security=l),i.operationId&&t.set(i.operationId,o),r.set(`${n} ${a}`,o)}return{byId:t,byPath:r}}function Gl(e){let t=new Map,r=new Map;for(let a of e?.tags||[])for(let s of a?.paths||[]){if(!s?.method||!s.path||s.isWebhook)continue;let n=s.method.toLowerCase(),i={operationId:s.operationId||"",method:n,path:s.path,summary:s.summary||""};s.security!==void 0&&(i.security=s.security);let o=`${n} ${s.path}`;r.has(o)||(s.operationId&&t.set(s.operationId,i),r.set(o,i))}return{byId:t,byPath:r}}function Dm(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}function Cm(e,t){if(!t?.size)return null;if(e.operationId){let r="",a=e.operationId,s=a.match(/^\$sourceDescriptions\.([A-Za-z0-9_-]+)\.(.+)$/);s&&([,r,a]=s);for(let[n,i]of t){if(r&&n!==r)continue;let o=i.byId.get(a);if(o)return{source:n,...o}}return null}if(e.operationPath){let r=e.operationPath.match(/^\{\$sourceDescriptions\.([A-Za-z0-9_-]+)\.url\}#(.*)$/);if(!r)return null;let[,a,s]=r,n=s.split("/").slice(1).map(Dm);if(n.length!==3||n[0]!=="paths")return null;let i=t.get(a)?.byPath.get(`${n[2].toLowerCase()} ${n[1]}`);return i?{source:a,...i}:null}return null}var Tm=/\$(inputs|steps|workflows)\.([A-Za-z0-9_-]+)(?:\.([A-Za-z0-9_-]+)(?:\.([A-Za-z0-9_-]+))?)?/g;function cn(e,t,r){if(typeof e=="string")for(let a of e.matchAll(Tm)){let[s,n,i,o,l]=a,c;c=n==="inputs"?{kind:"input",name:i,expr:s}:n==="steps"&&o==="outputs"&&l?{kind:"step",stepId:i,name:l,expr:s}:n==="steps"?{kind:"step",stepId:i,name:"",expr:s}:o==="outputs"&&l?{kind:"workflow",workflowId:i,name:l,expr:s}:{kind:"workflow",workflowId:i,name:"",expr:s},r.has(s)||(r.add(s),t.push(c))}else if(Array.isArray(e))for(let a of e)cn(a,t,r);else if(e&&typeof e=="object")for(let a of Object.values(e))cn(a,t,r)}function Om(e){let t=[];return cn(e,t,new Set),t}var Fm=new Set(["path","query","header","cookie"]),jm=new Set(["end","goto","retry"]);function Xl(e,t,r){let a=[];for(let[s,n]of(Array.isArray(e)?e:[]).entries()){if(!n||typeof n.condition!="string")continue;let i=typeof n.type=="string"?n.type:n.type?.type||"simple";i==="simple"?a.push({condition:n.condition}):r.push(`${t}[${s}]: criterion type ${i} is not supported, only simple conditions`)}return a}function $a(e,t,r,a,s,n){let i=[];for(let[o,l]of(Array.isArray(t)?t:[]).entries()){let c=Zl(e,l,r);if(!c||!jm.has(c.type))continue;let d=`${a}[${o}]`;if(c.workflowId){n.push(`${d}: ${c.type} to another workflow is not supported`);continue}if(c.stepId&&!s.has(c.stepId)){n.push(`${d}: no step "${c.stepId}"`);continue}let p={name:c.name||"",type:c.type,criteria:Xl(c.criteria,d,n)};c.stepId&&(p.stepId=c.stepId),c.type==="retry"&&(p.retryLimit=Number.isFinite(c.retryLimit)?c.retryLimit:1,p.retryAfter=Number.isFinite(c.retryAfter)?c.retryAfter:0),i.push(p)}return i}function Yl(e,t){let r=new Set(e.map(a=>a.name).filter(Boolean));return[...e,...t.filter(a=>!a.name||!r.has(a.name))]}function Sa(e,t,r){for(let a of Om(e))a.kind==="workflow"&&r.push(`${t}: ${a.expr} refers to another workflow, which is not supported`)}function _m(e,t,r,a,s,n){let i=`steps.${t.stepId}`;if(t.workflowId)return n.push(`${i}: calls workflow "${t.workflowId}", which is not supported`),null;let o=Cm(t,a);if(!o){let g=t.operationId||t.operationPath||"(no operation)";return n.push(`${i}: operation ${g} was not found in ${[...a.keys()].join(", ")||"any source"}`),null}let l=[],c=[];for(let[g,f]of(Array.isArray(t.parameters)?t.parameters:[]).entries()){let y=Zl(e,f,"parameters");y?.name&&(Fm.has(y.in)?(l.push({name:y.name,in:y.in}),c.push({name:y.name,in:y.in,value:y.value}),Sa(y.value,`${i}.parameters[${g}]`,n)):n.push(`${i}.parameters[${g}]: "in" must be path, query, header or cookie`))}let d=null;if(t.requestBody&&typeof t.requestBody=="object"){let g=t.requestBody.contentType||"application/json";d={contentType:g,payload:t.requestBody.payload??null},Array.isArray(t.requestBody.replacements)&&(d.replacements=t.requestBody.replacements.filter(f=>f&&typeof f.target=="string").map(f=>({target:f.target,value:f.value}))),l.push({name:"body",in:"body",contentType:g}),Sa(t.requestBody,`${i}.requestBody`,n)}let p=$a(e,t.onSuccess,"successActions",`${i}.onSuccess`,s,n),h=$a(e,t.onFailure,"failureActions",`${i}.onFailure`,s,n),u={};for(let[g,f]of Object.entries(t.outputs||{}))u[g]=f,Sa(f,`${i}.outputs.${g}`,n);return{stepId:t.stepId,description:t.description||"",operation:{source:o.source,method:o.method.toUpperCase(),path:o.path,params:l,security:Array.isArray(o.security)?o.security.filter(g=>g&&typeof g=="object"):[]},parameters:c,requestBody:d,successCriteria:Xl(t.successCriteria,`${i}.successCriteria`,n),onSuccess:Yl(p,r.successActions),onFailure:Yl(h,r.failureActions),outputs:u}}function qm(e,t={}){let r=t.sources||new Map,a=[],s={},n=Array.isArray(e?.workflows)?e.workflows:[];for(let[i,o]of n.entries()){if(!o?.workflowId)continue;let l=[],c=Array.isArray(o.steps)?o.steps:[],d=new Set(c.map(y=>y?.stepId).filter(Boolean)),p={successActions:$a(e,o.successActions,"successActions","successActions",d,l),failureActions:$a(e,o.failureActions,"failureActions","failureActions",d,l)},h=c.filter(y=>y?.stepId).map(y=>_m(e,y,p,r,d,l)).filter(Boolean);h.length||l.push("has no runnable step");let u={};for(let[y,v]of Object.entries(o.outputs||{}))u[y]=v,Sa(v,`outputs.${y}`,l);if(l.length){t.onProblem?.({level:"error",path:`workflows[${i}]`,message:`workflow ${o.workflowId} is left out of the MCP export: ${l.join("; ")}`});continue}let g=o.inputs?_e(o.inputs,e):{type:"object",properties:{}};g.type||="object",g.properties||={};let f=h.map(y=>y.operation.method);a.push({name:ot(o.workflowId),description:Bt(o.summary||o.description||o.workflowId),inputSchema:g,annotations:{readOnlyHint:f.every(y=>y==="GET"),destructiveHint:f.some(y=>["PUT","PATCH","DELETE"].includes(y)),idempotentHint:!1},workflow:o.workflowId}),s[o.workflowId]={workflowId:o.workflowId,summary:o.summary||"",description:o.description||"",inputs:g,steps:h,outputs:u}}return{tools:a,workflows:s}}var Rm=["get","put","post","delete","options","head","patch","trace","query"],Im=["/reference","/currencies","/countries","/tiers","/categories","/status","/schema"],Lm=["type","description","in","name","scheme","bearerFormat","openIdConnectUrl"];function Ql(e){return"specLoadError"in e||Array.isArray(e.tags)&&e.tags.some(t=>Array.isArray(t?.paths))}function dn(e,t){for(let r=0;r<10&&typeof e?.$ref=="string"&&e.$ref.startsWith("#/");r++){let a=t;for(let s of e.$ref.slice(2).split("/")){let n=decodeURIComponent(s).replace(/~1/g,"/").replace(/~0/g,"~");a=a?.[n]}if(!a||typeof a!="object")return e;e=a}return e}function Bm(e,t){let r=[];if(t){for(let s of e.tags||[])for(let n of s.paths||[])r.push({method:String(n.method||"get").toLowerCase(),path:n.path||"",operationId:n.rawOperation?.operationId||"",summary:n.summary||"",description:n.description||"",deprecated:n.deprecated===!0,isWebhook:n.isWebhook===!0,internal:n.xInternal===!0||n.xHidden===!0,parameters:Array.isArray(n.parameters)?n.parameters:[],requestBody:n.requestBody||null,security:n.security,tag:s.name||""});return r}let a=s=>Array.isArray(s)?s.map(n=>dn(n,e)):[];for(let[s,n]of Object.entries(e.paths||{})){let i=dn(n,e);if(!i||typeof i!="object")continue;let o=a(i.parameters);for(let l of Rm){let c=i[l];if(!c||typeof c!="object")continue;let d=a(c.parameters),p=o.filter(h=>!d.some(u=>u?.name===h?.name&&u?.in===h?.in)).concat(d);r.push({method:l,path:s,operationId:c.operationId||"",summary:c.summary||"",description:c.description||"",deprecated:c.deprecated===!0,isWebhook:!1,internal:c["x-internal"]===!0||c["x-hidden"]===!0||i["x-internal"]===!0||i["x-hidden"]===!0,parameters:p,requestBody:dn(c.requestBody,e)||null,security:c.security??e.security,tag:Array.isArray(c.tags)&&c.tags[0]||""})}}return r}function ec(e,t){let r={},a=(s,n)=>{if(!n||typeof n!="object"||!n.type)return;let i={};for(let o of Lm)n[o]!==void 0&&(i[o]=n[o]);n.type==="oauth2"&&n.flows&&typeof n.flows=="object"&&(i.flows=n.flows),r[s]=i};if(t)for(let s of e.securitySchemes||[])s?.securitySchemeId&&s.securitySchemeId!=="_rapidoc_api_key"&&a(s.securitySchemeId,s.type==="apiKey"?s:{...s,in:void 0,name:void 0});else{let s=e.components?.securitySchemes||e.securityDefinitions||{};for(let[n,i]of Object.entries(s))a(n,i?.$ref?Vl(e,i.$ref):i)}return r}function tc(e,t){let r=e.servers?.[0];if(r?.url){let a=String(r.url);for(let[s,n]of Object.entries(r.variables||{}))a=a.split(`{${s}}`).join(String(n?.default??n?.enum?.[0]??""));return a}return!t&&e.host?`${e.schemes?.[0]||"https"}://${e.host}${e.basePath||""}`:"http://localhost"}function rc(e,t){if(e.schema)return _e(e.schema,t);if(e.content&&typeof e.content=="object"){let a=Object.values(e.content)[0];if(a?.schema)return _e(a.schema,t)}let r={};for(let a of["type","format","enum","items","default","minimum","maximum","pattern"])e[a]!==void 0&&(r[a]=e[a]);return r.type?_e(r,t):{type:"string"}}function Nm(e){let t=e?.content;if(!t||typeof t!="object")return null;let r=Object.keys(t),a=r.find(s=>s==="application/json")||r.find(s=>s.endsWith("+json"))||r.find(s=>s==="application/x-www-form-urlencoded")||r.find(s=>s==="multipart/form-data")||r[0];return a?{contentType:a,schema:t[a]?.schema}:null}function ac(e,t={}){let r=e&&typeof e=="object"?e:{},a=Ql(r),{includeInternal:s=!1,includeDeprecated:n=!1,includeOperations:i=!0}=t,o=r.info||{},l=o.title||"OpenAPI MCP Server",c=typeof t.arazzo=="string"?JSON.parse(t.arazzo):t.arazzo,d=(c?.sourceDescriptions||[]).find(x=>x?.name&&(!x.type||x.type==="openapi")),p=t.sourceName||d?.name||"api",h=ec(r,a),u=new Set(Object.values(h).filter(x=>x.type==="apiKey"&&x.name).map(x=>`${x.in||"header"}:${String(x.name).toLowerCase()}`)),g=[],f=[],y=new Map;for(let x of i?Bm(r,a):[]){if(x.isWebhook||x.internal&&!s||x.deprecated&&!n)continue;let b={},$=[],S=[];for(let _ of x.parameters){if(!_?.name)continue;let U=_.in||"query",B=String(_.name).toLowerCase();if(U==="header"&&wm.has(B)||u.has(`${U}:${B}`))continue;if(U==="body"){let J=rc(_,r);_.description&&(J.description=Bt(_.description)),b.body=J,_.required&&$.push("body"),S.push({name:"body",in:"body",contentType:"application/json"});continue}if(U==="formData")continue;let H=_.name;H in b&&(H=`${_.name}_${U}`);let W=rc(_,r);_.description&&(W.description=Bt(_.description)),b[H]=W,(_.required||U==="path")&&$.push(H),S.push(H===_.name?{name:_.name,in:U}:{name:_.name,in:U,arg:H})}let E=Nm(x.requestBody);if(E){let _=E.schema?_e(E.schema,r):{type:"object"};x.requestBody.description&&(_.description=Bt(x.requestBody.description)),b.body=_,x.requestBody.required&&$.push("body"),S.push({name:"body",in:"body",contentType:E.contentType})}let D={type:"object",properties:b};$.length&&(D.required=$);let j=ot(x.operationId||km(x.method,x.path)),N=y.get(j)||0;y.set(j,N+1),N&&(j=`${j}_${N+1}`);let F=Bt(x.summary||x.description||`${x.method.toUpperCase()} ${x.path}`),z={source:p,method:x.method.toUpperCase(),path:x.path,params:S,security:Array.isArray(x.security)?x.security.filter(_=>_&&typeof _=="object"):[]},V=x.method==="get";V&&!$.length&&Im.some(_=>x.path.includes(_))?f.push({name:j,uri:`reference://${j.replace(/^get_/,"").replace(/_/g,"-")}`,description:F,mimeType:"application/json",operation:z}):g.push({name:j,description:F,inputSchema:D,annotations:{readOnlyHint:V,destructiveHint:["put","patch","delete"].includes(x.method),idempotentHint:["get","put","delete"].includes(x.method)},operation:z})}let v={},A={[p]:{baseUrl:tc(r,a),securitySchemes:h}};if(c&&typeof c=="object"){let x=new Map([[p,a?Gl(r):Jl(r)]]);for(let[$,S]of Object.entries(t.sources||{})){if($===p||!S||typeof S!="object")continue;let E=Ql(S);x.set($,E?Gl(S):Jl(S)),A[$]={baseUrl:tc(S,E),securitySchemes:ec(S,E)}}let b=qm(c,{sources:x,onProblem:t.onProblem});for(let $ of b.tools){let S=y.get($.name)||0;y.set($.name,S+1),g.push(S?{...$,name:`${$.name}_${S+1}`}:$)}Object.assign(v,b.workflows)}return{manifestVersion:1,server:{name:ot(t.serverName||l),version:o.version||"1.0.0",description:Bt(o.description||"")},sources:A,tools:g,resources:f,workflows:v}}var zm=`/**
|
|
330
|
+
* RapiDoc MCP runtime: executes the operation tools of an MCP manifest (see manifest.js) with
|
|
331
|
+
* \`fetch\`, so the same code runs in Node, browsers and edge workers. Workflow tools are run by
|
|
332
|
+
* workflow-runtime.js, plugged in through the \`runWorkflow\` option, so pages and exports without
|
|
333
|
+
* workflows carry no Arazzo code.
|
|
334
|
+
*
|
|
335
|
+
* This file is copied verbatim into every exported MCP server project as \`runtime.js\`, so it
|
|
336
|
+
* imports nothing and relies only on \`fetch\`, \`URLSearchParams\`, \`TextEncoder\` and \`btoa\`.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
/** @param {string} text UTF-8 text as base64 */
|
|
340
|
+
function base64(text) {
|
|
341
|
+
const bytes = new TextEncoder().encode(text);
|
|
342
|
+
let binary = "";
|
|
343
|
+
for (const b of bytes) binary += String.fromCharCode(b);
|
|
344
|
+
return btoa(binary);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function serialize(value) {
|
|
348
|
+
if (typeof value === "string") return value;
|
|
349
|
+
if (value && typeof value === "object") return JSON.stringify(value);
|
|
350
|
+
return String(value);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function parseJson(text) {
|
|
354
|
+
try {
|
|
355
|
+
return JSON.parse(text);
|
|
356
|
+
} catch {
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** The environment variable name that holds a scheme's credential: \`petstore_auth\` \u2192 \`PETSTORE_AUTH\`. */
|
|
362
|
+
export function envNameFor(schemeId) {
|
|
363
|
+
const name = String(schemeId || "")
|
|
364
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1_$2")
|
|
365
|
+
.replace(/[^a-zA-Z0-9]+/g, "_")
|
|
366
|
+
.replace(/^_|_$/g, "")
|
|
367
|
+
.toUpperCase();
|
|
368
|
+
return name || "API_KEY";
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Credentials for every security scheme in the manifest, read from environment variables:
|
|
373
|
+
* \`<SCHEME>\` (the scheme id in upper snake case), else \`API_KEY\` for any scheme. HTTP Basic takes
|
|
374
|
+
* \`<SCHEME>\` as \`user:password\`, or \`<SCHEME>_USERNAME\` and \`<SCHEME>_PASSWORD\`.
|
|
375
|
+
*
|
|
376
|
+
* @param {object} manifest
|
|
377
|
+
* @param {Record<string, string|undefined>} env such as \`process.env\`
|
|
378
|
+
* @returns {Record<string, string|{ username: string, password: string }>}
|
|
379
|
+
*/
|
|
380
|
+
export function credentialsFromEnv(manifest, env = {}) {
|
|
381
|
+
const credentials = {};
|
|
382
|
+
for (const source of Object.values(manifest.sources || {})) {
|
|
383
|
+
for (const [id, scheme] of Object.entries(source.securitySchemes || {})) {
|
|
384
|
+
const key = envNameFor(id);
|
|
385
|
+
if (scheme.type === "http" && String(scheme.scheme).toLowerCase() === "basic") {
|
|
386
|
+
if (env[\`\${key}_USERNAME\`] !== undefined) {
|
|
387
|
+
credentials[id] = {
|
|
388
|
+
username: env[\`\${key}_USERNAME\`],
|
|
389
|
+
password: env[\`\${key}_PASSWORD\`] || "",
|
|
390
|
+
};
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
const value = env[key] ?? env.API_KEY;
|
|
395
|
+
if (value !== undefined && value !== "") credentials[id] = value;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return credentials;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Adds the credentials a security requirement asks for. \`security\` is a list of alternatives,
|
|
403
|
+
* each \`{ schemeId: scopes }\`; the first alternative every credential of which is known is used.
|
|
404
|
+
* With none fully known, nothing is sent when an alternative is empty (anonymous access), else
|
|
405
|
+
* the first alternative is applied as far as credentials go, so the API's 401 says what is missing.
|
|
406
|
+
*/
|
|
407
|
+
function applySecurity(security, schemes, credentials, target) {
|
|
408
|
+
if (!Array.isArray(security) || !security.length) return;
|
|
409
|
+
const known = (alt) => Object.keys(alt).every((id) => credentials[id] !== undefined);
|
|
410
|
+
let chosen = security.find(known);
|
|
411
|
+
if (!chosen) {
|
|
412
|
+
if (security.some((alt) => !Object.keys(alt).length)) return;
|
|
413
|
+
chosen = security[0];
|
|
414
|
+
}
|
|
415
|
+
for (const id of Object.keys(chosen)) {
|
|
416
|
+
const scheme = schemes?.[id];
|
|
417
|
+
const credential = credentials[id];
|
|
418
|
+
if (!scheme || credential === undefined) continue;
|
|
419
|
+
const token =
|
|
420
|
+
typeof credential === "string" ? credential : credential?.token || credential?.accessToken;
|
|
421
|
+
if (scheme.type === "apiKey") {
|
|
422
|
+
const value = serialize(credential);
|
|
423
|
+
if (scheme.in === "query") target.query.set(scheme.name, value);
|
|
424
|
+
else if (scheme.in === "cookie")
|
|
425
|
+
target.cookies.push(\`\${scheme.name}=\${encodeURIComponent(value)}\`);
|
|
426
|
+
else target.headers[scheme.name || "Authorization"] = value;
|
|
427
|
+
} else if (scheme.type === "http" && String(scheme.scheme).toLowerCase() === "basic") {
|
|
428
|
+
const pair =
|
|
429
|
+
typeof credential === "string"
|
|
430
|
+
? credential
|
|
431
|
+
: \`\${credential?.username ?? ""}:\${credential?.password ?? ""}\`;
|
|
432
|
+
target.headers.Authorization = \`Basic \${base64(pair)}\`;
|
|
433
|
+
} else if (token) {
|
|
434
|
+
// http bearer, oauth2 and openIdConnect all send a bearer token
|
|
435
|
+
target.headers.Authorization = \`Bearer \${token}\`;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* The HTTP request a tool call makes, without sending it.
|
|
442
|
+
*
|
|
443
|
+
* @param {object} manifest
|
|
444
|
+
* @param {object} operation a tool's or resource's \`operation\`
|
|
445
|
+
* @param {object} args the tool arguments
|
|
446
|
+
* @param {object} [options]
|
|
447
|
+
* @param {object} [options.credentials] by security scheme id
|
|
448
|
+
* @param {Record<string, string>} [options.baseUrls] by source name, overriding the manifest
|
|
449
|
+
* @returns {{ url: string, method: string, headers: Record<string, string>, body?: string }}
|
|
450
|
+
*/
|
|
451
|
+
export function buildRequest(manifest, operation, args = {}, options = {}) {
|
|
452
|
+
const source = manifest.sources?.[operation.source] || {};
|
|
453
|
+
const base = String(options.baseUrls?.[operation.source] || source.baseUrl || "").replace(
|
|
454
|
+
/\\/$/,
|
|
455
|
+
"",
|
|
456
|
+
);
|
|
457
|
+
const headers = {};
|
|
458
|
+
const query = new URLSearchParams();
|
|
459
|
+
const cookies = [];
|
|
460
|
+
let path = operation.path || "";
|
|
461
|
+
let body;
|
|
462
|
+
for (const p of operation.params || []) {
|
|
463
|
+
const value = args[p.arg || p.name];
|
|
464
|
+
if (value === undefined || value === null) continue;
|
|
465
|
+
if (p.in === "path") {
|
|
466
|
+
path = path.split(\`{\${p.name}}\`).join(encodeURIComponent(serialize(value)));
|
|
467
|
+
} else if (p.in === "query") {
|
|
468
|
+
for (const v of Array.isArray(value) ? value : [value]) query.append(p.name, serialize(v));
|
|
469
|
+
} else if (p.in === "header") {
|
|
470
|
+
headers[p.name] = serialize(value);
|
|
471
|
+
} else if (p.in === "cookie") {
|
|
472
|
+
cookies.push(\`\${p.name}=\${encodeURIComponent(serialize(value))}\`);
|
|
473
|
+
} else if (p.in === "body") {
|
|
474
|
+
body = { contentType: p.contentType || "application/json", value };
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
const missing = path.match(/\\{[^}]+\\}/g);
|
|
478
|
+
if (missing) throw new Error(\`Missing path parameter \${missing.join(", ")}\`);
|
|
479
|
+
|
|
480
|
+
applySecurity(operation.security, source.securitySchemes, options.credentials || {}, {
|
|
481
|
+
headers,
|
|
482
|
+
query,
|
|
483
|
+
cookies,
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
const request = { url: base + path, method: operation.method || "GET", headers };
|
|
487
|
+
const qs = query.toString();
|
|
488
|
+
if (qs) request.url += (request.url.includes("?") ? "&" : "?") + qs;
|
|
489
|
+
if (cookies.length) headers.Cookie = cookies.join("; ");
|
|
490
|
+
if (!Object.keys(headers).some((h) => h.toLowerCase() === "accept")) {
|
|
491
|
+
headers.Accept = "application/json";
|
|
492
|
+
}
|
|
493
|
+
if (body) {
|
|
494
|
+
if (body.contentType === "application/x-www-form-urlencoded") {
|
|
495
|
+
const form = new URLSearchParams();
|
|
496
|
+
for (const [k, v] of Object.entries(body.value || {})) form.append(k, serialize(v));
|
|
497
|
+
request.body = form.toString();
|
|
498
|
+
headers["Content-Type"] = body.contentType;
|
|
499
|
+
} else {
|
|
500
|
+
request.body = typeof body.value === "string" ? body.value : JSON.stringify(body.value);
|
|
501
|
+
headers["Content-Type"] = body.contentType.startsWith("multipart/")
|
|
502
|
+
? "application/json"
|
|
503
|
+
: body.contentType;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return request;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function errorResult(text) {
|
|
510
|
+
return { isError: true, content: [{ type: "text", text }] };
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @param {object} manifest from buildMcpManifest()
|
|
515
|
+
* @param {object} [options]
|
|
516
|
+
* @param {typeof fetch} [options.fetch] defaults to the global fetch
|
|
517
|
+
* @param {object} [options.credentials] by security scheme id: an API key or token string, or
|
|
518
|
+
* \`{ username, password }\` for HTTP Basic
|
|
519
|
+
* @param {Record<string, string>} [options.baseUrls] by source name, overriding the manifest
|
|
520
|
+
* @param {Function} [options.runWorkflow] \`(runtime, tool, args, hooks) => Promise<result>\` from
|
|
521
|
+
* workflow-runtime.js; without it a workflow tool answers with an error result
|
|
522
|
+
* @returns {{ manifest: object, listTools(): object[], listResources(): object[],
|
|
523
|
+
* callTool(name: string, args?: object, hooks?: object): Promise<object>,
|
|
524
|
+
* readResource(uri: string): Promise<object>, execute(operation: object, args: object,
|
|
525
|
+
* extra?: { headers?: object }): Promise<object> }} MCP results: \`callTool\` returns \`{ content, structuredContent?,
|
|
526
|
+
* isError? }\`, \`readResource\` returns \`{ contents }\`. \`execute\` sends one operation and returns
|
|
527
|
+
* \`{ request, response, headers, text, data }\` or \`{ request?, error }\`, for workflow runners.
|
|
528
|
+
*/
|
|
529
|
+
export function createMcpRuntime(manifest, options = {}) {
|
|
530
|
+
const fetchImpl = options.fetch || globalThis.fetch;
|
|
531
|
+
const requestOptions = {
|
|
532
|
+
credentials: options.credentials || {},
|
|
533
|
+
baseUrls: options.baseUrls || {},
|
|
534
|
+
};
|
|
535
|
+
const tools = new Map((manifest.tools || []).map((t) => [t.name, t]));
|
|
536
|
+
const resources = new Map((manifest.resources || []).map((r) => [r.uri, r]));
|
|
537
|
+
|
|
538
|
+
async function send(operation, args, extra = {}) {
|
|
539
|
+
let request;
|
|
540
|
+
try {
|
|
541
|
+
request = buildRequest(manifest, operation, args, requestOptions);
|
|
542
|
+
if (extra.headers) request.headers = { ...request.headers, ...extra.headers };
|
|
543
|
+
} catch (err) {
|
|
544
|
+
return { error: errorResult(err.message) };
|
|
545
|
+
}
|
|
546
|
+
let response;
|
|
547
|
+
try {
|
|
548
|
+
response = await fetchImpl(request.url, {
|
|
549
|
+
method: request.method,
|
|
550
|
+
headers: request.headers,
|
|
551
|
+
body: request.body,
|
|
552
|
+
});
|
|
553
|
+
} catch (err) {
|
|
554
|
+
return { request, error: errorResult(\`Request failed: \${err.message}\`) };
|
|
555
|
+
}
|
|
556
|
+
const text = await response.text();
|
|
557
|
+
const headers = {};
|
|
558
|
+
if (typeof response.headers?.forEach === "function") {
|
|
559
|
+
response.headers.forEach((v, k) => (headers[k] = v));
|
|
560
|
+
}
|
|
561
|
+
return { request, response, headers, text, data: parseJson(text) };
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
const runtime = {
|
|
565
|
+
manifest,
|
|
566
|
+
execute: send,
|
|
567
|
+
listTools() {
|
|
568
|
+
return [...tools.values()].map(({ name, description, inputSchema, annotations }) => ({
|
|
569
|
+
name,
|
|
570
|
+
description,
|
|
571
|
+
inputSchema,
|
|
572
|
+
annotations,
|
|
573
|
+
}));
|
|
574
|
+
},
|
|
575
|
+
listResources() {
|
|
576
|
+
return [...resources.values()].map(({ name, uri, description, mimeType }) => ({
|
|
577
|
+
name,
|
|
578
|
+
uri,
|
|
579
|
+
description,
|
|
580
|
+
mimeType,
|
|
581
|
+
}));
|
|
582
|
+
},
|
|
583
|
+
async callTool(name, args = {}, hooks = {}) {
|
|
584
|
+
const tool = tools.get(name);
|
|
585
|
+
if (!tool) return errorResult(\`Unknown tool "\${name}"\`);
|
|
586
|
+
if (tool.workflow) {
|
|
587
|
+
if (!options.runWorkflow) {
|
|
588
|
+
return errorResult(
|
|
589
|
+
\`Tool "\${name}" is a workflow; this runtime was created without workflow support\`,
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
return options.runWorkflow(runtime, tool, args, hooks);
|
|
593
|
+
}
|
|
594
|
+
if (!tool.operation) return errorResult(\`Tool "\${name}" has nothing to run\`);
|
|
595
|
+
const { error, response, text, data } = await send(tool.operation, args || {});
|
|
596
|
+
if (error) return error;
|
|
597
|
+
const pretty = data === undefined ? text : JSON.stringify(data, null, 2);
|
|
598
|
+
if (!response.ok) {
|
|
599
|
+
return errorResult(
|
|
600
|
+
\`HTTP \${response.status}\${response.statusText ? \` \${response.statusText}\` : ""}\\n\${pretty}\`,
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
const result = { content: [{ type: "text", text: pretty }] };
|
|
604
|
+
if (data && typeof data === "object" && !Array.isArray(data)) result.structuredContent = data;
|
|
605
|
+
return result;
|
|
606
|
+
},
|
|
607
|
+
async readResource(uri) {
|
|
608
|
+
const resource = resources.get(uri);
|
|
609
|
+
if (!resource) throw new Error(\`Unknown resource "\${uri}"\`);
|
|
610
|
+
const { error, response, text } = await send(resource.operation, {});
|
|
611
|
+
if (error) throw new Error(error.content[0].text);
|
|
612
|
+
if (!response.ok) throw new Error(\`HTTP \${response.status} reading \${uri}: \${text}\`);
|
|
613
|
+
return { contents: [{ uri, mimeType: resource.mimeType || "application/json", text }] };
|
|
614
|
+
},
|
|
615
|
+
};
|
|
616
|
+
return runtime;
|
|
617
|
+
}
|
|
618
|
+
`,Pm=`/**
|
|
619
|
+
* MCP server over stdio for the API described in manifest.json. Exported by RapiDoc.
|
|
620
|
+
*
|
|
621
|
+
* The tools, resources and the API's base URL come from the manifest and the requests are made
|
|
622
|
+
* by runtime.js, so this file is the same for every API. Credentials come from environment
|
|
623
|
+
* variables named after the API's security schemes (see claude_desktop_config.json);
|
|
624
|
+
* API_BASE_URL overrides the base URL.
|
|
625
|
+
*/
|
|
626
|
+
import { readFileSync } from "node:fs";
|
|
627
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
628
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
629
|
+
import {
|
|
630
|
+
CallToolRequestSchema,
|
|
631
|
+
ListResourcesRequestSchema,
|
|
632
|
+
ListToolsRequestSchema,
|
|
633
|
+
ReadResourceRequestSchema,
|
|
634
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
635
|
+
import { createMcpRuntime, credentialsFromEnv } from "./runtime.js";
|
|
636
|
+
|
|
637
|
+
// workflow-runtime.js is part of the export only when the manifest has workflow tools
|
|
638
|
+
const { runWorkflow } = await import("./workflow-runtime.js").catch(() => ({
|
|
639
|
+
runWorkflow: undefined,
|
|
640
|
+
}));
|
|
641
|
+
|
|
642
|
+
const manifest = JSON.parse(readFileSync(new URL("./manifest.json", import.meta.url), "utf8"));
|
|
643
|
+
|
|
644
|
+
const baseUrls: Record<string, string> = {};
|
|
645
|
+
if (process.env.API_BASE_URL) {
|
|
646
|
+
for (const name of Object.keys(manifest.sources)) baseUrls[name] = process.env.API_BASE_URL;
|
|
647
|
+
}
|
|
648
|
+
const runtime = createMcpRuntime(manifest, {
|
|
649
|
+
credentials: credentialsFromEnv(manifest, process.env),
|
|
650
|
+
baseUrls,
|
|
651
|
+
runWorkflow,
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
const server = new Server(
|
|
655
|
+
{ name: manifest.server.name, version: manifest.server.version },
|
|
656
|
+
{ capabilities: { tools: {}, resources: {} } },
|
|
657
|
+
);
|
|
658
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: runtime.listTools() }));
|
|
659
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) =>
|
|
660
|
+
runtime.callTool(request.params.name, request.params.arguments ?? {}),
|
|
661
|
+
);
|
|
662
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
663
|
+
resources: runtime.listResources(),
|
|
664
|
+
}));
|
|
665
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) =>
|
|
666
|
+
runtime.readResource(request.params.uri),
|
|
667
|
+
);
|
|
668
|
+
|
|
669
|
+
await server.connect(new StdioServerTransport());
|
|
670
|
+
console.error(\`[MCP] \${manifest.server.name}: \${manifest.tools.length} tools on stdio\`);
|
|
671
|
+
`;function Mm(e,t={}){let r=e.server.name||"api_mcp_server",a=Object.keys(e.workflows||{}).length>0,s=Object.values(e.sources||{}).flatMap(c=>Object.keys(c.securitySchemes||{})),n=Kl(t.serverName||r,{schemes:s}),i={name:ot(t.serverName||r).replace(/_/g,"-"),version:e.server.version||"1.0.0",private:!0,type:"module",scripts:{start:"tsx server.ts"},dependencies:{"@modelcontextprotocol/sdk":"^1.12.0"},devDependencies:{tsx:"^4.19.0"}},o=s.length?s.map(c=>{let d=Object.values(e.sources).map(h=>h.securitySchemes?.[c]).find(Boolean),p=d?.type==="apiKey"?`the API key sent as ${d.in||"header"} \`${d.name}\``:d?.type==="http"&&String(d.scheme).toLowerCase()==="basic"?"`user:password` for HTTP Basic":"the bearer token";return`- \`${ln(c)}\`: ${p} (security scheme \`${c}\`)`}):["- `API_KEY`: not needed; this API declares no security scheme"],l=`# ${e.server.name} MCP server
|
|
672
|
+
|
|
673
|
+
Exported by RapiDoc from the API's OpenAPI document. \`manifest.json\` lists ${e.tools.length} tools${a?` (${Object.keys(e.workflows).length} of them workflows)`:""}${e.resources.length?` and ${e.resources.length} resources`:""}; \`server.ts\` serves them over stdio and \`runtime.js\` makes the requests${a&&t.workflowRuntime?", with workflow-runtime.js running the workflows":""}.
|
|
674
|
+
|
|
675
|
+
## Run
|
|
676
|
+
|
|
677
|
+
\`\`\`bash
|
|
678
|
+
npm install
|
|
679
|
+
${s.map(c=>`${ln(c)}="..." `).join("")}npm start
|
|
680
|
+
\`\`\`
|
|
681
|
+
|
|
682
|
+
Environment variables:
|
|
683
|
+
|
|
684
|
+
${o.join(`
|
|
685
|
+
`)}
|
|
686
|
+
- \`API_BASE_URL\`: overrides the base URL in the manifest (${Object.values(e.sources)[0]?.baseUrl||""})
|
|
687
|
+
|
|
688
|
+
## Use with Claude Desktop or Cursor
|
|
689
|
+
|
|
690
|
+
Copy the \`mcpServers\` entry from \`claude_desktop_config.json\` into your host's configuration
|
|
691
|
+
and fill in the credentials.
|
|
692
|
+
`;return{"manifest.json":JSON.stringify(e,null,2),"server.ts":Pm,"runtime.js":zm,...a&&t.workflowRuntime?{"workflow-runtime.js":t.workflowRuntime}:{},"package.json":JSON.stringify(i,null,2),"README.md":l,"claude_desktop_config.json":n.claudeDesktopConfig}}var Um=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let a=0;a<8;a++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r>>>0}return e})();function Hm(e){let t=4294967295;for(let r=0;r<e.length;r++)t=Um[(t^e[r])&255]^t>>>8;return(t^4294967295)>>>0}function Wm(e){let t=new TextEncoder,r=Object.entries(e).map(([u,g])=>({name:t.encode(u),data:t.encode(String(g??""))}));for(let u of r)u.crc=Hm(u.data);let a=r.reduce((u,g)=>u+30+g.name.length+g.data.length,0),s=r.reduce((u,g)=>u+46+g.name.length,0),n=new Uint8Array(a+s+22),i=new DataView(n.buffer),o=0,l=u=>{i.setUint16(o,u,!0),o+=2},c=u=>{i.setUint32(o,u>>>0,!0),o+=4},d=u=>{n.set(u,o),o+=u.length},p=2048;for(let u of r)u.offset=o,c(67324752),l(20),l(p),l(0),l(0),l(33),c(u.crc),c(u.data.length),c(u.data.length),l(u.name.length),l(0),d(u.name),d(u.data);let h=o;for(let u of r)c(33639248),l(20),l(20),l(p),l(0),l(0),l(33),c(u.crc),c(u.data.length),c(u.data.length),l(u.name.length),l(0),l(0),l(0),l(0),c(0),c(u.offset),d(u.name);return c(101010256),l(0),l(0),l(r.length),l(r.length),c(s),c(h),l(0),n}function Km(e,t={}){let r=[],a=ac(e,{...t,onProblem:o=>r.push(o)}),s=Mm(a,t),n=Wl(a),i=Object.values(a.sources).flatMap(o=>Object.keys(o.securitySchemes));return{manifest:a,files:s,budget:n,hostConfig:Kl(a.server.name,{schemes:i}).claudeDesktopConfig,problems:r}}function Aa(){let e=this.specUrl&&this.allowSpecFileDownload==="true",t=Hl(this.mcp);if(!e&&!t)return"";let r="section-gap";return this.renderStyle==="focused"?r="section-gap--focused-mode":this.renderStyle==="read"&&(r="section-gap--read-mode"),m`<section id="downloads" part="section-downloads" class="downloads-bar observe-me ${r}">${e?m`<button class="btn btn-outline download-btn" part="btn btn-outline" @click="${()=>{ki(this.specUrl,"openapi-spec")}}">Download OpenAPI spec</button> ${this.specUrl?.trim().toLowerCase().endsWith("json")?m`<button class="btn btn-outline download-btn view-spec" part="btn btn-outline" @click="${()=>{$i(this.specUrl)}}">View OpenAPI spec (New Tab)</button>`:""}`:""} ${t?m`<button class="btn btn-outline download-btn" part="btn btn-outline btn-mcp-export" title="Download an MCP server project (manifest, runtime and stdio server) as a zip" @click="${()=>{this.downloadMcpServer()}}">Export MCP Server</button>`:""}</section>`}function pn(e){let t=this.resolvedSpec?.servers.find(r=>r.url===e);return t?(this.selectedServer=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:t}})),!0):!1}function sc(e,t){let r=[...e.currentTarget.closest(".server-vars").querySelectorAll("input, select")],a=t.url;r.forEach(s=>{let n=RegExp(`{${s.dataset.var}}`,"g");a=a.replace(n,s.value)}),t.computedUrl=a,this.requestUpdate()}function Vm(){return this.selectedServer&&this.selectedServer.variables?m`<h3 class="rapidoc-heading label-heading table-title" part="heading heading-3">Server variables</h3><div class="param-list-container"><ul class="param-list server-vars" part="param-list" role="list">${Object.entries(this.selectedServer.variables).map(e=>m`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${e[0]}</div></div><div class="param-input" part="param-input">${e[1].enum?m`<select data-var="${e[0]}" @input="${t=>{sc.call(this,t,this.selectedServer)}}">${Object.entries(e[1].enum).map(t=>e[1].default===t[1]?m`<option selected="selected" label="${t[1]}" value="${t[1]}"></option>`:m`<option label="${t[1]}" value="${t[1]}"></option>`)}</select>`:m`<input type="text" part="textbox textbox-server-var" spellcheck="false" data-var="${e[0]}" value="${e[1].default}" @input="${t=>{sc.call(this,t,this.selectedServer)}}">`}</div>${e[1].description?m`<div class="param-details" part="param-details"><div class="m-markdown-small">${P(M(T(e[1].description)))}</div></div>`:""}</li>`)}</ul></div>`:""}function nc(){return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":m`<section id="servers" part="section-servers" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}"><h2 part="section-servers-title heading heading-2" class="rapidoc-heading sub-title" style="display:flex;align-items:center;gap:8px">API Server ${this.mockServer==="true"?m`<span style="font-size:var(--font-size-small);font-weight:700;color:var(--green);border:1px solid var(--green);border-radius:var(--radius);padding:1px 6px;letter-spacing:.5px" title="In-browser mock server is active">MOCK ACTIVE</span>`:""}</h2><div class="mono-font" style="margin:12px 0;font-size:calc(var(--font-size-small) + 1px)">${!this.resolvedSpec.servers||this.resolvedSpec.servers?.length===0?"":m`${this.resolvedSpec?.servers.map((e,t)=>m`<div class="server-opt-row"><input type="radio" name="api_server" id="srvr-opt-${t}" value="${e.url}" @change="${()=>{pn.call(this,e.url)}}" .checked="${this.selectedServer.url===e.url}"> <label for="srvr-opt-${t}">${e.url} ${e.description?m`- <span class="regular-font">${P(M(T.parseInline(e.description)))}</span>`:""}</label></div>`)}`}<div class="table-title primary-text" part="label-selected-server">SELECTED: ${this.selectedServer?.computedUrl||"none"} ${this.mockServer==="true"?m`<span style="color:var(--green);margin-left:6px">(Mocked)</span>`:""}</div></div><slot name="servers"></slot>${Vm.call(this)}</section>`}function br(e,t="toggle"){let r=e?.closest(".nav-bar-tag-and-paths");if(r){let a=r.classList.contains("expanded");a&&(t==="toggle"||t==="collapse")?(r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag")?.setAttribute("aria-expanded","false")):a||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),r.querySelector(".nav-bar-tag")?.setAttribute("aria-expanded","true"))}}function Ea(e,t="toggle"){let r=e?.closest(".nav-bar-tag-group");if(r){let a=r.classList.contains("expanded");a&&(t==="toggle"||t==="collapse")?(r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")):a||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true"))}}function un(e){e&&(Ea(e,"expand"),br(e,"expand"))}function ic(e,t,r){return es(e)?!1:!t||Lr(t,e,r)}function vr(e,t){return es(e)?!1:e.descriptionOnly?!t:(e.paths||[]).some(r=>ic(r,t,e.name))}function Zm(e,t){return!es(e)&&(e.tags||[]).some(r=>vr(r,t))}function Jm(e,t="expand-all"){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target.closest(".nav-scroll"),a=[...r.querySelectorAll(".nav-bar-tag-group")];t==="expand-all"?a.forEach(n=>{n.classList.replace("collapsed","expanded"),n.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true")}):a.forEach(n=>{n.classList.replace("expanded","collapsed"),n.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")});let s=[...r.querySelectorAll(".nav-bar-tag-and-paths")];t==="expand-all"?s.forEach(n=>{n.classList.replace("collapsed","expanded")}):s.forEach(n=>{n.classList.replace("expanded","collapsed")})}function oc(e){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let t=e.target.closest("[data-action]")||e.target;if(!(t.closest("#nav-bar-search")||t.closest("#advanced-search-btn")||t.closest('[part~="btn-clear-filter"]')||t.closest('slot[name="nav-logo"]')))if(e.stopPropagation(),t.dataset?.action==="navigate"){this.scrollToEventTarget(e,!1);let r=e.currentTarget.closest("#nav-bar");r.classList.contains("floating-nav")&&r.classList.remove("floating-nav")}else t.dataset?.action==="expand-all"||t.dataset?.action==="collapse-all"?Jm(e,t.dataset.action):t.dataset?.action==="expand-collapse-tag-group"?Ea(t,"toggle"):t.dataset?.action==="expand-collapse-tag"&&br(t,"toggle")}function Gm(){let e=new Ze,t=!0;function r(){return t?(t=!1,!0):!1}return!this.resolvedSpec||this.resolvedSpec.specLoadError?m`<nav class="nav-bar" part="section-navbar"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot></div></nav>`:m`<button id="nav-bar-btn" part="btn-navbar" class="btn" @click="${this.onOpenNavBarToggle}">☰</button><nav id="nav-bar" class="nav-bar ${this.renderStyle} overflow-${this.navItemOverflow||"ellipsis"}" part="section-navbar"><div class="nav-scroll" tabindex="-1" part="section-navbar-scroll" @click="${a=>oc.call(this,a)}" @keyup="${a=>oc.call(this,a)}"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot>${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":m`<div class="nav-bar-search-container ${this.allowAdvancedSearch==="false"?"has-bottom-border":""}" part="section-navbar-search">${this.allowSearch==="false"?"":m`<div class="nav-bar-search-input-wrapper"><input id="nav-bar-search" part="textbox textbox-nav-filter" class="nav-bar-search-input" type="text" placeholder="Filter" @change="${this.onSearchChange}" spellcheck="false"><div class="nav-bar-search-icon" @click="${this.onSearchChange}">↩</div></div>${this.searchVal?m`<button @click="${this.onClearSearch}" class="btn btn-outline btn-clear-filter" part="btn btn-outline btn-clear-filter">CLEAR</button>`:""}`} ${this.allowAdvancedSearch==="false"||this.searchVal?"":m`<button id="advanced-search-btn" class="btn btn-primary" part="btn btn-fill btn-search" @click="${this.onShowAdvancedSearchClicked}">SEARCH</button>`}</div>`}</div>${this.showInfo==="false"||!this.resolvedSpec.info?"":m`${this.infoDescriptionHeadingsInNavBar==="true"?m`${this.resolvedSpec.infoDescriptionHeaders.length>0?(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-content-id="overview" data-action="navigate" data-first-nav-item="${a?"true":O}" tabindex="0" part="section-navbar-item section-navbar-overview">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})():""}<div class="overview-headers">${this.resolvedSpec.infoDescriptionHeaders.map(a=>{let s=e.slug(a.text);return m`<div class="nav-bar-h${a.depth}" id="link-overview--${s}" data-action="navigate" data-content-id="overview--${s}">${a.text}</div>`})}</div>${this.resolvedSpec.infoDescriptionHeaders.length>0?m`<hr style="border-top:1px solid var(--muted);border-width:1px 0 0 0;margin:15px 0 0 0">`:""}`:(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-action="navigate" data-content-id="overview" data-first-nav-item="${a?"true":O}" tabindex="0">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})()}`} ${this.allowServerSelection==="false"?"":(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-servers" data-action="navigate" data-content-id="servers" data-first-nav-item="${a?"true":O}" tabindex="0" part="section-navbar-item section-navbar-servers">API Servers</div>`})()} ${this.allowAuthentication==="false"||!this.resolvedSpec.securitySchemes?"":(()=>{let a=r();return m`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-auth" data-action="navigate" data-content-id="auth" data-first-nav-item="${a?"true":O}" tabindex="0" part="section-navbar-item section-navbar-auth">Authentication</div>`})()}<div id="link-operations-top" class="nav-bar-section operations" data-action="navigate" data-content-id="${this.renderStyle==="focused"?"":"operations-top"}" part="section-navbar-item section-navbar-operations-top"><div style="font-size:16px;display:flex;margin-left:10px">${this.renderStyle==="focused"?m`<div class="nav-bar-expand-all" data-action="expand-all" tabindex="0" title="Expand all">▸</div><div class="nav-bar-collapse-all" data-action="collapse-all" tabindex="0" title="Collapse all">▸</div>`:""}</div><div class="nav-bar-section-title">OPERATIONS</div></div>${(()=>{let a=s=>{if(s.descriptionOnly)return vr(s,this.searchVal)?m`<div class="nav-bar-tag-and-paths description-only"><div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" id="link-${s.elementId}" data-action="navigate" data-content-id="${s.elementId}" tabindex="0"><div class="nav-bar-tag-title">${s.displayName||s.name}</div></div></div>`:"";let n=(s.paths||[]).filter(o=>ic(o,this.searchVal,s.name));if(n.length===0)return"";let i=n[0].elementId;return m`<div class="nav-bar-tag-and-paths ${s.expanded?"expanded":"collapsed"}"><div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" id="link-${s.elementId}" data-action="expand-collapse-tag" data-first-path-id="${i}" tabindex="0" role="button" aria-expanded="${s.expanded?"true":"false"}"><div class="nav-bar-tag-title">${s.displayName||s.name}</div><div class="nav-bar-tag-icon" tabindex="0" data-action="expand-collapse-tag"></div></div>${this.infoDescriptionHeadingsInNavBar==="true"?m`<div class="tag-headers">${(()=>{let o=new Ze;return s.headers.map(l=>{let c=o.slug(l.text);return m`<div class="nav-bar-h${l.depth}" part="section-navbar-item section-navbar-h${l.depth}" id="link-${s.elementId}--${c}" data-action="navigate" data-content-id="${s.elementId}--${c}" tabindex="0">${l.text}</div>`})})()}</div>`:""}<div class="nav-bar-paths-under-tag">${n.map(o=>{let l=r();return m`<div class="nav-bar-path${l?" first-nav-item":""}" style="${o.deprecated?"filter:opacity(0.5);":""}" part="section-navbar-item section-navbar-path" data-action="navigate" data-content-id="${o.elementId}" data-first-nav-item="${l?"true":O}" id="link-${o.elementId}" tabindex="0"><span class="nav-bar-path-label">${o.isWebhook?m`<span class="nav-bar-webhook">WEBHOOK</span>`:""} ${this.usePathInNavBar==="true"?m`<span class="mono-font">${o.path}</span>`:o.summary||o.shortSummary} </span>${m`<span class="nav-method ${this.showMethodInNavBar} ${o.method}">${this.showMethodInNavBar==="as-colored-block"?o.method.substring(0,3).toUpperCase():o.method.toUpperCase()}</span>`}</div>`})}</div></div>`};if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let s=new Set;return this.resolvedSpec.tagGroups.forEach(n=>{(n.tags||[]).forEach(i=>{s.add(i.name.toLowerCase())})}),m`${this.resolvedSpec.tagGroups.filter(n=>Zm(n,this.searchVal)).map(n=>{let i=n.tags.filter(o=>vr(o,this.searchVal));return i.length===0?"":m`<div class="nav-bar-tag-group ${n.expanded?"expanded":"collapsed"}" id="link-${n.elementId}"><div class="nav-bar-tag-group-header" part="section-navbar-item section-navbar-tag-group" data-action="expand-collapse-tag-group" tabindex="0" role="button" aria-expanded="${n.expanded?"true":"false"}"><div class="nav-bar-tag-group-title">${n.displayName||n.name}</div><div class="nav-bar-tag-group-icon" tabindex="0" data-action="expand-collapse-tag-group"></div></div><div class="nav-bar-tags-under-group">${i.map(o=>a(o))}</div></div>`})}${(this.resolvedSpec.tags||[]).filter(n=>!s.has(n.name.toLowerCase())&&vr(n,this.searchVal)).map(n=>a(n))}`}return(this.resolvedSpec.tags||[]).filter(s=>vr(s,this.searchVal)).map(s=>a(s))})()} ${this.resolvedSpec.components&&this.showComponents==="true"?m`<div id="link-components" class="nav-bar-section components"><div class="nav-bar-section-title">COMPONENTS</div></div>${this.resolvedSpec.components.map(a=>a.subComponents.length?m`<div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" data-action="navigate" data-content-id="cmp--${a.name.toLowerCase()}" id="link-cmp--${a.name.toLowerCase()}">${a.name}</div>${a.subComponents.filter(s=>s.expanded!==!1).map(s=>m`<div class="nav-bar-path" data-action="navigate" data-content-id="cmp--${s.id}" id="link-cmp--${s.id}"><span style="pointer-events:none">${s.name}</span></div>`)}`:"")}`:""}</div></nav>`}function Xm(e){let t=new T.Renderer,r=new Ze;return t.heading=({text:a,depth:s})=>`<h${s} class="observe-me" id="${e}--${r.slug(a)}">${a}</h${s}>`,Or(t),t}function Da(e){return m`<div class="regular-font section-gap--focused-mode" part="section-operations-in-tag">${e}</div>`}function lc(){if(this.showInfo==="true")return Da(m`${on.call(this)}${Aa.call(this)}`);let e=this.resolvedSpec.tags.find(r=>r.paths.length>0),t=e?.paths[0];return Da(e&&t?nn.call(this,t,e.name||"",e.description||"",!0):"")}function Ym(e){return m`<h2 id="${e.elementId}" class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${e.displayName||e.name}</h2>${e.description?m`<div class="m-markdown regular-font">${P(M(T(e.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:Xm(e.elementId)}:void 0)))}</div>`:""}`}function Qm(){if(!this.focusedElementId&&this.resolvedSpec&&(this.focusedElementId=this.showInfo==="false"||this.showInfo===!1?this.resolvedSpec.tags?.find(s=>s.paths.length>0)?.paths[0]?.elementId||"":"overview"),!this.focusedElementId||!this.resolvedSpec)return;let e=this.focusedElementId,t=null,r=null,a;if(e.startsWith("overview")&&this.showInfo==="true")a=m`${on.call(this)}${Aa.call(this)}`;else if(e==="auth"&&this.allowAuthentication==="true")a=bl.call(this,this.allowTry);else if(e==="servers"&&this.allowServerSelection==="true")a=nc.call(this);else if(e==="operations-top")a=m`<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>`;else if(e.startsWith("cmp--")&&this.showComponents==="true")a=Ul.call(this);else if(e.startsWith("tag--")){let s=e.indexOf("--",4)>0?e.substring(0,e.indexOf("--",5)):e;r=this.resolvedSpec.tags.find(n=>n.elementId===s),a=r?Da.call(this,Ym.call(this,r)):lc.call(this)}else{for(let s of this.resolvedSpec.tags)if(r=s,t=s.paths.find(n=>`${n.elementId}`===e),t)break;if(t){let s=this.shadowRoot?.getElementById(`link-${e}`);br(s,"expand");let n=r?.paths?.[0]?.elementId===t.elementId;a=Da.call(this,nn.call(this,t,r.name||"",r.description||"",n))}else a=lc.call(this)}return a}function ef(e){if(e.expanded)e.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(e.expanded=!0,this.updateRoute==="true"){let t=`#${e.elementId}`;window.location.hash!==t&&this.replaceHistoryState(e.elementId)}this.requestUpdate()}function cc(e="expand-all"){let t=e==="expand-all";(this.resolvedSpec.tagGroups||[]).forEach(r=>{r.expanded=t,(r.tags||[]).forEach(a=>{a.expanded=t})}),(this.resolvedSpec.tags||[]).forEach(r=>{r.expanded=t}),this.requestUpdate()}function dc(e,t=!1){return m`<summary @click="${r=>{ef.call(this,e,r)}}" part="section-endpoint-head-${e.expanded?"expanded":"collapsed"}" class="endpoint-head ${e.method} ${e.deprecated?"deprecated":""} ${t||e.expanded?"expanded":"collapsed"}"><div part="section-endpoint-head-method" class="method ${e.method} ${e.deprecated?"deprecated":""}">${e.method}</div><div part="section-endpoint-head-path" class="path ${e.deprecated?"deprecated":""}">${e.path} ${e.isWebhook?m`<span style="font-family:var(--font-sans);font-size:var(--font-size-small);color:var(--primary);margin-left:16px">Webhook</span>`:""}</div>${e.deprecated?m`<span style="font-size:var(--font-size-small);text-transform:uppercase;font-weight:700;color:var(--destructive);margin:2px 0 0 5px">deprecated</span>`:""} ${this.showSummaryWhenCollapsed?m`<div part="section-endpoint-head-description" class="descr">${e.summary||e.shortSummary}</div>`:""}</summary>`}function pc(e){let t=new Set;for(let i in e.responses)for(let o in e.responses[i]?.content)t.add(o.trim());let r=[...t].join(", "),a=this.resolvedSpec.securitySchemes.filter(i=>i.finalKeyValue&&e.security?.some(o=>i.securitySchemeId in o))||[],s=this.resolvedSpec.securitySchemes.find(i=>i.securitySchemeId==="_rapidoc_api_key"&&i.value!=="-");s&&a.push(s);let n=e.xCodeSamples?$l(e.xCodeSamples):"";return m`<div part="section-endpoint-body-${e.expanded?"expanded":"collapsed"}" class="endpoint-body ${e.method} ${e.deprecated?"deprecated":""}"><div class="summary">${e.summary?m`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.summary}</h3>`:e.shortSummary===e.description?m`<h3 class="visually-hidden">${e.method.toUpperCase()} ${e.path}</h3>`:m`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.shortSummary}</h3>`} ${e.xBadges&&e.xBadges?.length>0?m`<div style="display:flex;flex-wrap:wrap;font-size:var(--font-size-small)">${e.xBadges.map(i=>i.color==="none"?"":m`<span part="endpoint-badge" style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,var(--${i.color}) 20%,transparent);color:var(--${i.color});border:1px solid var(--${i.color})">${i.label}</span>`)}</div>`:""} ${kl.call(this,e.security,e.elementId)} ${e.description?m`<div part="section-endpoint-body-description" class="m-markdown">${P(M(T(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?m`<div class="external-docs-box"><div class="m-markdown">${P(M(T(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?m`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""}<slot name="${e.elementId}"></slot>${n}</div><div class="req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${a}" .servers="${e.servers}" server-url="${e.servers?.length>0?e.servers[0].url:this.selectedServer?.computedUrl}" active-schema-tab="${this.defaultSchemaTab}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${r}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
693
|
+
wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
|
|
252
694
|
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
253
695
|
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
|
254
|
-
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?
|
|
255
|
-
|
|
696
|
+
anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?Sl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" part="section-response-panel" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" active-schema-tab="${this.defaultSchemaTab}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
|
|
697
|
+
btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
|
|
698
|
+
textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, btn-clear-resp:btn-clear-resp,
|
|
256
699
|
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content,
|
|
257
|
-
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-response></div></div>`}function bu(e=!1,t=!1){return this.resolvedSpec?p`${e?"":p`<div style="display:flex;justify-content:flex-end"><span @click="${a=>To(a,"expand-all")}" style="color:var(--primary);cursor:pointer">Expand all </span> | <span @click="${a=>To(a,"collapse-all")}" style="color:var(--primary);cursor:pointer">Collapse all </span> sections</div>`} ${this.resolvedSpec.tags.map(a=>p`${e?p`<div class="section-tag-body">${a.paths.filter(r=>!this.searchVal||_t(this.searchVal,r,a.name)).map(r=>p`<section id="${r.elementId}" class="m-endpoint regular-font ${r.method} ${t||r.expanded?"expanded":"collapsed"}">${Fo.call(this,r,t)} ${t||r.expanded?Oo.call(this,r):""}</section>`)}</div>`:p`<div class="regular-font section-gap section-tag ${a.expanded?"expanded":"collapsed"}"><div class="section-tag-header" @click="${()=>{a.expanded=!a.expanded,this.requestUpdate()}}"><div id="${a.elementId}" class="sub-title tag" style="color:var(--primary)">${a.displayName||a.name}</div></div><div class="section-tag-body"><slot name="${a.elementId}"></slot><div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${F(O(E(a.description||"")))}</div>${a.paths.filter(r=>!this.searchVal||_t(this.searchVal,r,a.name)).map(r=>p`<section part="section-endpoint" id="${r.elementId}" class="m-endpoint regular-font ${r.method} ${t||r.expanded?"expanded":"collapsed"}">${Fo.call(this,r,t)} ${t||r.expanded?Oo.call(this,r):""}</section>`)}</div></div>`}`)}`:""}function vu(e){return p`<div style="${e}"><svg viewBox="1 0 511 512"><path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/><path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/><path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/><path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/><path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/><path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/></svg></div>`}function xu(){return p`<header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px"><div class="only-large-screen-flex" style="align-items:center"><slot name="logo" class="logo" part="section-logo">${vu("height:36px;width:36px;margin-left:5px")}</slot><div class="header-title" part="label-header-title">${this.headingText}</div></div><div style="margin:0 8px;display:flex;flex:1">${this.allowSpecUrlLoad==="false"?"":p`<input id="spec-url" type="text" style="font-size:var(--font-size-small)" class="header-input mono-font" part="textbox textbox-spec-url" placeholder="Spec URL" value="${this.specUrl||""}" @change="${this.onSpecUrlChange}" spellcheck="false"><div style="margin:6px 5px 0 -24px;font-size:var(--font-size-regular);cursor:pointer">↩</div>`} ${this.allowSpecFileLoad==="false"?"":p`<input id="spec-file" part="file-input" type="file" style="display:none" value="${this.specFile||""}" @change="${this.onSpecFileChange}" spellcheck="false"> <button class="m-btn primary only-large-screen" style="margin-left:10px" part="btn btn-fill" @click="${this.onFileLoadClick}">LOCAL JSON FILE</button>`}<slot name="header"></slot>${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":p`<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px" spellcheck="false"><div style="margin:6px 5px 0 -24px;font-size:var(--font-size-regular);cursor:pointer">↩</div>`} ${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":p`<button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px" @click="${this.onShowAdvancedSearchClicked}">Search</button>`}</div></header>`}function wu(){return p`<dialog id="advanced-search-dialog" class="dialog-box"><header class="dialog-box-header"><span class="dialog-box-title">Search</span> <button type="button" @click="${e=>this.onAdvancedSearchClose(e)}">×</button></header><div class="dialog-box-content"><span class="advanced-search-options"><input id="input-advanced-search-dialog" style="width:100%;padding-right:20px" type="text" part="textbox textbox-search-dialog" placeholder="search text..." spellcheck="false" @keyup="${e=>this.onAdvancedSearch(e,400)}"><div style="display:flex;gap:16px;flex-wrap:wrap;margin:8px 0 24px"><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> <label for="search-api-path" style="cursor:pointer">API Path</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-descr">API Description</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-params">API Parameters</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-request-body">Request Body Parameters</label></div><div><input style="cursor:pointer" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change="${e=>this.onAdvancedSearch(e,0)}"> <label style="cursor:pointer" for="search-api-resp-descr">Response Description</label></div></div></span>${this.advancedSearchMatches?.map(e=>p`<div class="mono-font small-font-size hover-bg" style="padding:5px;cursor:pointer;border-bottom:1px solid var(--border);${e.deprecated?"filter:opacity(0.5);":""}" data-content-id="${e.elementId}" tabindex="0" @click="${t=>{this.searchVal="",this.shadowRoot.getElementById("advanced-search-dialog").close(),this.requestUpdate(),this.scrollToEventTarget(t,!0)}}"><span style="pointer-events:none" class="upper bold-text method-fg ${e.method}">${e.method}</span> <span style="pointer-events:none">${e.path}</span> <span style="pointer-events:none" class="regular-font gray-text">${e.summary}</span></div>`)}</div></dialog>`}function _o(e=!1,t=!1){return this.resolvedSpec?(this.persistAuth==="true"&&xp.call(this),this.resolvedSpec.specLoadError?p`<div id="spec-not-found" style="display:flex;align-items:center;justify-content:center;border:1px dashed var(--border);padding:12px;overflow-wrap:anywhere;font-size:var(--font-size-small);color:var(--red);font-family:var(--font-mono)">${this.resolvedSpec.info.description}</div>`:this.resolvedSpec.isSpecLoading?p`<main class="main-content regular-font" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode"><div class="loader"></div></div></main>`:p`<slot name="fixed-header"></slot>${this.showHeader==="false"?"":xu.call(this)} ${this.allowAdvancedSearch==="false"?"":wu.call(this)}<div id="the-main-body" class="body ${this.cssClasses}" dir="${this.pageDirection}">${(this.renderStyle==="read"||this.renderStyle==="focused")&&this.showSideNav==="true"&&this.resolvedSpec?uu.call(this):""}<main class="main-content regular-font" tabindex="-1" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode">${this.loading===!0?p`<div class="loader"></div>`:p`${this.loadFailed===!0?p`<div style="text-align:center;margin:16px">Unable to load the Spec</div>`:p`<div class="operations-root" @click="${a=>{this.handleHref(a)}}">${this.renderStyle==="focused"?p`${fu.call(this)}`:p`${this.showInfo==="true"?ws.call(this):""} ${this.allowServerSelection==="true"?Eo.call(this):""} ${this.allowAuthentication==="true"?lo.call(this,this.allowTry):""}<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>${this.renderStyle==="read"?iu.call(this):bu.call(this,e,t)} ${this.showComponents==="true"?$o.call(this):""}`}</div>`}`}</div><slot name="footer"></slot></main></div>`):""}var jo={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},Ro=class extends se{constructor(){super();let e={rootMargin:"0px 0px -50% 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this._intersectingElements=new Map,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver(t=>{this.onIntersect(t)},e),this._userSetLayout=!1,this._isDefaultingLayout=!1}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String,reflect:!0},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},additionalAuthorizeParams:{type:Object,attribute:"additional-authorize-params",converter:jo},additionalTokenParams:{type:Object,attribute:"additional-token-params",converter:jo},mockServer:{type:String,attribute:"mock-server"},mockServerStatusCode:{type:String,attribute:"mock-server-status-code"},mockServerStatusStrategy:{type:String,attribute:"mock-server-status-strategy"},mockServerDelay:{type:Number,attribute:"mock-server-delay"},mockServerLog:{type:String,attribute:"mock-server-log"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String,reflect:!0},colorScheme:{type:String,attribute:"color-scheme",reflect:!0},radius:{type:String,reflect:!0},scale:{type:String,reflect:!0},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navItemSpacing:{type:String,attribute:"nav-item-spacing",reflect:!0},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[Tn,qe,Tt,la,ca,Sn,wr,da,En,An,mc,B`rapi-doc:not(:defined){display:none}:host{all:initial;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-regular);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.body{background:var(--background);width:100%;height:100%;display:flex;position:relative;overflow:hidden}.main-content{scrollbar-width:thin;scrollbar-color:var(--border) transparent;flex:1;height:100%;margin:0;padding:0;display:block;overflow:hidden auto;container-type:inline-size}.main-content-inner--view-mode{padding:0 8px}.main-content-inner--read-mode{padding-bottom:min(70vh,600px)}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background:var(--border)}.section-gap.section-tag{border-bottom:1px solid var(--border)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{padding:0 4px}.section-tag-header{cursor:n-resize;padding:12px 0;position:relative}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-header:hover:after{color:var(--primary);content:"⬆";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:after{color:var(--border);content:"⬇";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:hover:after{color:var(--primary)}.collapsed .section-tag-body{display:none}::slotted([slot=fixed-header]){background:var(--background);max-height:40px;color:var(--foreground);text-align:center;padding:4px 12px;overflow:hidden}::slotted([slot=logo]){object-fit:contain;width:auto;height:36px;margin-left:5px}.only-large-screen-flex,.only-large-screen{display:none}.tag.title{text-transform:uppercase}.main-header{background:var(--background);color:var(--foreground)}.header-title{font-size:calc(var(--font-size-regular) + 8px);padding:0 8px}input.header-input{background:var(--input-background);color:var(--foreground);border:1px solid var(--border);border-radius:3px;flex:1;padding-right:24px}input.header-input::placeholder{opacity:.4}.loader{border:4px solid var(--muted);border-top:4px solid var(--primary);border-radius:50%;width:36px;height:36px;margin:16px auto;animation:2s linear infinite spin}.expanded-endpoint-body{padding:6px 0;position:relative}.expanded-endpoint-body .tag-description{background:var(--code-bg);border-radius:var(--card-radius);transition:max-height .2s ease-out}.expanded-endpoint-body .tag-icon{transition:transform .2s ease-out}.expanded-endpoint-body .tag-icon.expanded{transform:rotate(180deg)}.divider{border-top:2px solid var(--border);width:100%;margin:24px 0}.tooltip{cursor:pointer;border:1px solid var(--border);border-left-width:4px;margin-left:2px}.tooltip a{color:var(--card-foreground);text-decoration:none}.tooltip-text{color:var(--card-foreground);z-index:1;background:var(--card);visibility:hidden;overflow-wrap:break-word;max-width:400px;position:absolute}.tooltip:hover{color:var(--primary);border-color:var(--primary)}.tooltip:hover a:hover{color:var(--primary)}.tooltip:hover .tooltip-text{visibility:visible}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.nav-method{font-weight:700;font-size:calc(var(--font-size-small) - 2px);white-space:nowrap;flex-shrink:0;margin-inline-start:auto}.nav-method.false{display:none}.nav-method.as-colored-text{color:var(--method-default)}.nav-method.as-colored-text.get{color:var(--nav-get-color,var(--method-get))}.nav-method.as-colored-text.put{color:var(--nav-put-color,var(--method-put))}.nav-method.as-colored-text.post{color:var(--nav-post-color,var(--method-post))}.nav-method.as-colored-text.delete{color:var(--nav-delete-color,var(--method-delete))}.nav-method.as-colored-text.head{color:var(--nav-head-color,var(--method-head))}.nav-method.as-colored-text.patch{color:var(--nav-patch-color,var(--method-patch))}.nav-method.as-colored-text.options{color:var(--nav-options-color,var(--method-options))}.nav-method.as-colored-text.trace{color:var(--nav-trace-color,var(--method-trace))}.nav-method.as-colored-text.query{color:var(--nav-query-color,var(--method-query))}.nav-method.as-colored-text.copy{color:var(--nav-copy-color,var(--method-copy,var(--method-default)))}.nav-method.as-colored-text.purge{color:var(--nav-purge-color,var(--method-purge,var(--method-default)))}.nav-method.as-colored-block{text-align:center;border-radius:var(--radius);min-width:32px;color:var(--nav-method-badge-fg,var(--method-badge-fg,#000));background:var(--method-default);padding:1px 4px;font-weight:700}:host([color-scheme=light]) .nav-method.as-colored-block{color:var(--nav-method-badge-fg,var(--method-badge-fg,#fff))}@media (prefers-color-scheme:light){:host([color-scheme=system]) .nav-method.as-colored-block{color:var(--nav-method-badge-fg,var(--method-badge-fg,#fff))}}.colored-block .nav-method.as-colored-block{outline:1px solid}.nav-method.as-colored-block.get{background:var(--nav-get-color,var(--method-get))}.nav-method.as-colored-block.put{background:var(--nav-put-color,var(--method-put))}.nav-method.as-colored-block.post{background:var(--nav-post-color,var(--method-post))}.nav-method.as-colored-block.delete{background:var(--nav-delete-color,var(--method-delete))}.nav-method.as-colored-block.head{background:var(--nav-head-color,var(--method-head))}.nav-method.as-colored-block.patch{background:var(--nav-patch-color,var(--method-patch))}.nav-method.as-colored-block.options{background:var(--nav-options-color,var(--method-options))}.nav-method.as-colored-block.trace{background:var(--nav-trace-color,var(--method-trace))}.nav-method.as-colored-block.query{background:var(--nav-query-color,var(--method-query))}.nav-method.as-colored-block.copy{background:var(--nav-copy-color,var(--method-copy,var(--method-default)))}.nav-method.as-colored-block.purge{background:var(--nav-purge-color,var(--method-purge,var(--method-default)))}@container (width>=768px){.nav-bar{width:260px;display:flex}#nav-bar-btn{display:none}#advanced-search-btn,.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 0 0 24px}.section-gap--focused-mode,.section-gap--read-mode{padding:24px 8px}.endpoint-body{padding:36px 0 48px;position:relative}}@container (width>=1024px){.nav-bar{width:var(--nav-width,18.75rem);display:flex}#nav-bar-btn{display:none}#advanced-search-btn{display:block}.section-gap--focused-mode{padding:12px 80px}.section-gap--read-mode{padding:24px 80px 12px}}`,Xe]}connectedCallback(){super.connectedCallback();let e=this.parentElement;if(e&&(e.offsetWidth===0&&e.style.width===""&&(e.style.width="100vw"),e.offsetHeight===0&&e.style.height===""&&(e.style.height="100vh"),e.tagName==="BODY"&&(e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0"))),this.loadFonts!=="false"){let a={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",a);a.weight="600";let s=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",a);r.load().then(n=>{document.fonts.add(n)}),s.load().then(n=>{document.fonts.add(n)})}if((!this.renderStyle||!"read, view, focused,".includes(`${this.renderStyle},`))&&(this.renderStyle="focused"),this.hasAttribute("layout")){let a=this.getAttribute("layout");"row, column,".includes(`${a},`)&&(this.layout=a,this._userSetLayout=!0)}if(this._userSetLayout)(!this.layout||!"row, column,".includes(`${this.layout},`))&&(this.layout=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row",this.setAttribute("layout",this.layout));else{let a=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}(!this.schemaStyle||!"tree, table,".includes(`${this.schemaStyle},`))&&(this.schemaStyle="tree");let t=pa(this.theme);this.theme=t.theme,this.setAttribute("theme",this.theme),(!this.colorScheme||!"dark, light, system,".includes(`${this.colorScheme},`))&&(this.colorScheme="dark"),(!this.radius||!"none, sm, md, lg, full,".includes(`${this.radius},`))&&(this.radius="sm"),(!this.scale||!"sm, default, lg,".includes(`${this.scale},`))&&(this.scale="default"),(!this.navItemSpacing||!"compact, default, relaxed,".includes(`${this.navItemSpacing},`))&&(this.navItemSpacing="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),ua(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),(!this.schemaDescriptionExpanded||!"true, false,".includes(`${this.schemaDescriptionExpanded},`))&&(this.schemaDescriptionExpanded="false"),(!this.schemaHideReadOnly||!"default, never,".includes(`${this.schemaHideReadOnly},`))&&(this.schemaHideReadOnly="default"),(!this.schemaHideWriteOnly||!"default, never,".includes(`${this.schemaHideWriteOnly},`))&&(this.schemaHideWriteOnly="default"),(!this.fillRequestFieldsWithExample||!"true, false,".includes(`${this.fillRequestFieldsWithExample},`))&&(this.fillRequestFieldsWithExample="true"),(!this.persistAuth||!"true, false,".includes(`${this.persistAuth},`))&&(this.persistAuth="false"),this.responseAreaHeight||="400px",(!this.allowSearch||!"true, false,".includes(`${this.allowSearch},`))&&(this.allowSearch="true"),(!this.allowAdvancedSearch||!"true, false,".includes(`${this.allowAdvancedSearch},`))&&(this.allowAdvancedSearch="true"),(!this.allowTry||!"true, false,".includes(`${this.allowTry},`))&&(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",(!this.updateRoute||!"true, false,".includes(`${this.updateRoute},`))&&(this.updateRoute="true"),this.routePrefix||="#",(!this.sortTags||!"true, false,".includes(`${this.sortTags},`))&&(this.sortTags="false"),(!this.sortSchemas||!"true, false,".includes(`${this.sortSchemas},`))&&(this.sortSchemas="false"),(!this.generateMissingTags||!"true, false,".includes(`${this.generateMissingTags},`))&&(this.generateMissingTags="false"),(!this.sortEndpointsBy||!"method, path, summary, none,".includes(`${this.sortEndpointsBy},`))&&(this.sortEndpointsBy="path"),(!this.onNavTagClick||!"expand-collapse, show-description,".includes(`${this.onNavTagClick},`))&&(this.onNavTagClick="expand-collapse"),(!this.navItemSpacing||!"compact, relaxed, default,".includes(`${this.navItemSpacing},`))&&(this.navItemSpacing="default"),(!this.showMethodInNavBar||!"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`))&&(this.showMethodInNavBar="false"),(!this.usePathInNavBar||!"true, false,".includes(`${this.usePathInNavBar},`))&&(this.usePathInNavBar="false"),(!this.navActiveItemMarker||!"left-bar, colored-block".includes(`${this.navActiveItemMarker},`))&&(this.navActiveItemMarker="left-bar"),(!this.showInfo||!"true, false,".includes(`${this.showInfo},`))&&(this.showInfo="true"),(!this.allowServerSelection||!"true, false,".includes(`${this.allowServerSelection},`))&&(this.allowServerSelection="true"),(!this.allowAuthentication||!"true, false,".includes(`${this.allowAuthentication},`))&&(this.allowAuthentication="true"),(!this.allowSchemaDescriptionExpandToggle||!"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`))&&(this.allowSchemaDescriptionExpandToggle="true"),(!this.showSideNav||!"true false".includes(this.showSideNav))&&(this.showSideNav="true"),(!this.showComponents||!"true false".includes(this.showComponents))&&(this.showComponents="false"),(!this.infoDescriptionHeadingsInNavBar||!"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`))&&(this.infoDescriptionHeadingsInNavBar="false"),(!this.fetchCredentials||!"omit, same-origin, include,".includes(`${this.fetchCredentials},`))&&(this.fetchCredentials=""),(!this.scrollBehavior||!"smooth, auto,".includes(`${this.scrollBehavior},`))&&(this.scrollBehavior="auto"),(!this.matchType||!"includes regex".includes(this.matchType))&&(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",this.cssFile||=null,this.cssClasses||="",window.addEventListener("hashchange",()=>{this.scrollToPath(this.getElementIDFromURL())},!0)}disconnectedCallback(){this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this.intersectionObserver&&this.intersectionObserver.disconnect(),this.mockServer==="true"&&Wa(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){let e=new E.Renderer,t=new Ge;return e.heading=({text:a,depth:r})=>`<h${r} class="observe-me" id="${t.slug(a)}">${a}</h${r}>`,na(e),e}willUpdate(e){if(super.willUpdate?.(e),this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),e.has("layout")&&!this._isDefaultingLayout&&(this._userSetLayout=!!(this.layout&&"row, column,".includes(`${this.layout},`))),e.has("renderStyle")&&!this._userSetLayout){let t=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this.layout!==t&&(this._isDefaultingLayout=!0,this.layout=t,this.setAttribute("layout",t),this._isDefaultingLayout=!1)}}render(){let e=document.querySelector(`link[href*="${this.cssFile}"]`);return e&&this.shadowRoot.appendChild(e.cloneNode()),_o.call(this)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),oa(this.shadowRoot),e.has("theme")){let t=pa(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),ua(this,this.theme)}e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?Ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&Wa()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&ro({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,a){if(e==="spec-url"&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(a),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="layout"&&!this._isDefaultingLayout){if(a!==null&&"row, column,".includes(`${a},`))this._userSetLayout=!0,this.layout=a;else if(a===null){this._userSetLayout=!1;let r=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}}if(e==="render-style"&&(a==="read"?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect(),!this._userSetLayout)){let r=a==="read"||a==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}if(e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let r=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=a,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=a,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=a,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),r=!0),r&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Ft);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,a)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);let t=e.target.files[0],a=new FileReader;a.onload=()=>{try{let r=JSON.parse(a.result);this.loadSpec(r),this.shadowRoot.getElementById("spec-url").value=""}catch{}},a.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){let t=e.target instanceof HTMLInputElement?e.target:this.shadowRoot.getElementById("nav-bar-search");this.searchVal=t?.value??"",this.resolvedSpec.tags.forEach(a=>a.paths.filter(r=>{this.searchVal&&_t(this.searchVal,r,a.name)&&(a.expanded=!0)})),this.resolvedSpec.components.forEach(a=>a.subComponents.filter(r=>{r.expanded=!1,yc(this.searchVal,r)&&(r.expanded=!0)})),this.requestUpdate()}onClearSearch(){let e=this.shadowRoot.getElementById("nav-bar-search");e.value="",this.searchVal="",this.resolvedSpec.components.forEach(t=>t.subComponents.filter(a=>{a.expanded=!0}))}onOpenNavBarToggle(){this.shadowRoot.getElementById("nav-bar").classList.toggle("floating-nav")}onShowAdvancedSearchClicked(){this.shadowRoot.getElementById("advanced-search-dialog").showModal()}onAdvancedSearchClose(){this.shadowRoot.getElementById("advanced-search-dialog").close()}async loadSpec(e){if(e){this.searchVal="";try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;let t=await Ki.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch{this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null}}}async afterSpecParsedAndValidated(e){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(r=>r.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);let t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t),this.mockServer==="true"&&Ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),this.intersectionObserver.disconnect(),this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="read"&&(await ma(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;let a=this.getElementIDFromURL();if(a)this.renderStyle==="view"?this.expandAndGotoOperation(a,!0,!0):this.scrollToPath(a);else if(this.renderStyle==="focused"&&!this.gotoPath){let r=this.showInfo==="true"?"overview":this.resolvedSpec.tags[0]?.paths[0]?.elementId;r&&this.scrollToPath(r)}}getComponentBaseURL(){let{href:e}=window.location,t=this.routePrefix.replace(/(#|\/)$/,"");if(!t)return e.split("#")[0];let a=e.lastIndexOf(t);return a===-1?e:e.slice(0,a)}getElementIDFromURL(){let e=this.getComponentBaseURL();return window.location.href.replace(e+this.routePrefix,"")}replaceHistoryState(e){let t=this.getComponentBaseURL();window.history.replaceState(null,null,`${t}${this.routePrefix||"#"}${e}`)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let a=!0,r=e.indexOf("#")===-1?e:e.substring(1);if(r.startsWith("overview")||r==="servers"||r==="auth")a=!1;else for(let s=0;s<this.resolvedSpec.tags?.length;s++){let n=this.resolvedSpec.tags[s],i=n.paths?.find(o=>o.elementId===e);i&&(i.expanded&&n.expanded?a=!1:(i.expanded=!0,n.expanded=!0))}t&&(a&&this.requestUpdate(),window.setTimeout(()=>{let s=this.shadowRoot.getElementById(r);s&&(s.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),this.updateRoute==="true"&&this.replaceHistoryState(r))},a?150:0))}isValidTopId(e){return e.startsWith("overview")||e==="servers"||e==="auth"}isValidPathId(e){return e==="overview"&&this.showInfo||e==="servers"&&this.allowServerSelection||e==="auth"&&this.allowAuthentication?!0:e.startsWith("tag--")?this.resolvedSpec?.tags?.find(t=>t.elementId===e):this.resolvedSpec?.tags?.find(t=>t.paths.find(a=>a.elementId===e))}onIntersect(e){if(this.isIntersectionObserverActive===!1)return;this._intersectingElements||=new Map;for(let o of e)o.isIntersecting&&o.intersectionRatio>0?this._intersectingElements.set(o.target.id,o.target):this._intersectingElements.delete(o.target.id);if(this._intersectingElements.size===0)return;let t=Array.from(this._intersectingElements.values()).filter(o=>o.isConnected);if(t.length===0)return;let a=[],r=[];for(let o of t){let l=o.getBoundingClientRect().top;l>=0?a.push({el:o,top:l}):r.push({el:o,top:l})}let s;a.length>0?(a.sort((o,l)=>o.top-l.top),s=a[0].el):(r.sort((o,l)=>l.top-o.top),s=r[0].el);let n=s.id,i=this.shadowRoot.getElementById(`link-${n}`);i&&!i.classList.contains("active")&&(this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this._intersectionRaf=requestAnimationFrame(()=>{let o=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");o&&o!==i&&(o.classList.remove("active"),o.part.remove("section-navbar-active-item")),i.classList.add("active"),i.part.add("section-navbar-active-item");let l=i.closest(".nav-scroll");if(l){let c=l.querySelector(".nav-bar-header")||l.querySelector(".nav-bar-search-container"),d=c?c.offsetHeight:0;if(i.offsetTop<=d+30){if(l.scrollTop>0){let u=this.scrollBehavior==="auto"?"auto":"smooth";l.scrollTo({top:0,behavior:u})}}else{let u=l.getBoundingClientRect(),h=i.getBoundingClientRect();if(h.top<u.top+d+15||h.bottom>u.bottom-40){let m=this.scrollBehavior==="auto"?"auto":"smooth";i.scrollIntoView({behavior:m,block:"nearest"})}}}this.updateRoute==="true"&&this.replaceHistoryState(n)}))}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(e,t=!0){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let a=e.target;if(a.dataset.contentId){if(this.isIntersectionObserverActive=!1,this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="focused"){let r=this.shadowRoot.querySelector("api-request");typeof r?.beforeNavigationFocusedMode=="function"&&r.beforeNavigationFocusedMode()}this.scrollToPath(a.dataset.contentId,!0,t),setTimeout(()=>{this.isIntersectionObserverActive=!0},500)}}async scrollTo(e){return this.scrollToPath(e)}async scrollToPath(e,t=!0,a=!0){if(this.renderStyle==="focused"&&(this.focusedElementId=e,await ma(0)),this.renderStyle==="view")this.expandAndGotoOperation(e,t,!0);else{let r=!1,s=this.shadowRoot.getElementById(e);if(s?(r=!0,s.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):r=!1,r){if(this.renderStyle==="focused"){let i=this.shadowRoot.querySelector("api-request");typeof i?.afterNavigationFocusedMode=="function"&&i.afterNavigationFocusedMode();let o=this.shadowRoot.querySelector("api-response");typeof o?.resetSelection=="function"&&o.resetSelection()}this.updateRoute==="true"&&this.replaceHistoryState(e);let n=this.shadowRoot.getElementById(`link-${e}`);if(n){a&&n.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await ma(0);let i=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");i&&(i.classList.remove("active"),i.part.remove("active"),i.part.remove("section-navbar-active-item")),n.classList.add("active"),n.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,a){return He.call(this,e,t,a)}setApiKey(e,t){return He.call(this,e,"","",t)}removeAllSecurityKeys(){return ms.call(this)}setApiServer(e){return ks.call(this,e)}onAdvancedSearch(e,t){let a=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let r;r=a.type==="text"?a:a.closest(".advanced-search-options").querySelector("input[type=text]");let s=[...a.closest(".advanced-search-options").querySelectorAll("input:checked")].map(n=>n.id);this.advancedSearchMatches=gc(r.value,this.resolvedSpec.tags,s)},t)}};customElements.define("rapi-doc",Ro);var No={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},qo=class extends se{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},additionalAuthorizeParams:{type:Object,attribute:"additional-authorize-params",converter:No},additionalTokenParams:{type:Object,attribute:"additional-token-params",converter:No},mockServer:{type:String,attribute:"mock-server"},mockServerStatusCode:{type:String,attribute:"mock-server-status-code"},mockServerStatusStrategy:{type:String,attribute:"mock-server-status-strategy"},mockServerDelay:{type:Number,attribute:"mock-server-delay"},mockServerLog:{type:String,attribute:"mock-server-log"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String,reflect:!0},colorScheme:{type:String,attribute:"color-scheme",reflect:!0},radius:{type:String,reflect:!0},scale:{type:String,reflect:!0},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[Tn,qe,Tt,la,ca,Sn,wr,da,En,An,B`:host{all:initial;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-regular);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}@container (width>=768px){.only-large-screen{display:block}.only-large-screen-flex{display:flex}}`]}connectedCallback(){if(super.connectedCallback(),this.loadFonts!=="false"){let t={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},a=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",t);t.weight="600";let r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",t);a.load().then(s=>{document.fonts.add(s)}),r.load().then(s=>{document.fonts.add(s)})}(!this.showSummaryWhenCollapsed||!"true, false,".includes(`${this.showSummaryWhenCollapsed},`))&&(this.showSummaryWhenCollapsed="true"),(!this.layout||!"row, column,".includes(`${this.layout},`))&&(this.layout="row"),(!this.schemaStyle||!"tree, table,".includes(`${this.schemaStyle},`))&&(this.schemaStyle="tree");let e=pa(this.theme);this.theme=e.theme,this.setAttribute("theme",this.theme),(!this.colorScheme||!"dark, light, system,".includes(`${this.colorScheme},`))&&(this.colorScheme="dark"),(!this.radius||!"none, sm, md, lg, full,".includes(`${this.radius},`))&&(this.radius="sm"),(!this.scale||!"sm, default, lg,".includes(`${this.scale},`))&&(this.scale="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),ua(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),(!this.schemaDescriptionExpanded||!"true, false,".includes(`${this.schemaDescriptionExpanded},`))&&(this.schemaDescriptionExpanded="false"),(!this.fillRequestFieldsWithExample||!"true, false,".includes(`${this.fillRequestFieldsWithExample},`))&&(this.fillRequestFieldsWithExample="true"),(!this.persistAuth||!"true, false,".includes(`${this.persistAuth},`))&&(this.persistAuth="false"),this.responseAreaHeight||="300px",(!this.allowTry||!"true, false,".includes(`${this.allowTry},`))&&(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",(!this.sortTags||!"true, false,".includes(`${this.sortTags},`))&&(this.sortTags="false"),(!this.sortEndpointsBy||!"method, path, summary,".includes(`${this.sortEndpointsBy},`))&&(this.sortEndpointsBy="path"),(!this.matchType||!"includes regex".includes(this.matchType))&&(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",(!this.allowSchemaDescriptionExpandToggle||!"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`))&&(this.allowSchemaDescriptionExpandToggle="true"),(!this.fetchCredentials||!"omit, same-origin, include,".includes(`${this.fetchCredentials},`))&&(this.fetchCredentials="")}disconnectedCallback(){this.mockServer==="true"&&Wa(),super.disconnectedCallback()}render(){return _o.call(this,!0,this.pathsExpanded)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),oa(this.shadowRoot),e.has("theme")){let t=pa(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),ua(this,this.theme)}e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?Ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&Wa()),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&ro({statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}attributeChangedCallback(e,t,a){if(e==="spec-url"&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(a)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==a&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let r=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=a,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=a,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),r=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=a,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),r=!0),r&&this.resolvedSpec){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Ft);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Ft,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,a)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(e){if(e)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();let t=await Ki.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch{this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null}}setHttpUserNameAndPassword(e,t,a){return He.call(this,e,t,a)}setApiKey(e,t){return He.call(this,e,"","",t)}removeAllSecurityKeys(){return ms.call(this)}setApiServer(e){return ks.call(this,e)}async afterSpecParsedAndValidated(e){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(a=>a.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);let t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t),this.mockServer==="true"&&Ha(this.resolvedSpec,{statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}};customElements.define("rapi-doc-mini",qo);var Lo=class extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",e=>this.relayAuthParams(e),!0)}receiveAuthParms(){let e={};if(document.location.search){let t=new URLSearchParams(document.location.search);e={code:t.get("code"),error:t.get("error"),state:t.get("state"),responseType:"code"}}else window.location.hash&&(e={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"});if(window.opener){window.opener.postMessage(e,this.target);return}sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(e))}relayAuthParams(e){if(window.parent&&e.key==="rapidoc-oauth-data"){let t=JSON.parse(e.newValue);window.parent.postMessage(t,this.target)}}parseQueryString(e,t){let a=e.split("&");for(let r=0;r<a.length;r++){let s=a[r].split("=");if(decodeURIComponent(s[0])===t)return decodeURIComponent(s[1])}}};customElements.define("oauth-receiver",Lo);var ku={RapiDoc:Ro};export{Lo as OAuthReceiver,qo as RapiDocMini,ku as default};
|
|
700
|
+
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-response></div></div>`}function tf(e=!1,t=!1){if(!this.resolvedSpec)return"";let r=i=>m`${e?m`<div class="section-tag-body">${i.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${P(M(T(i.description||"")))}</div>`:""} ${i.paths.filter(o=>!this.searchVal||Lr(this.searchVal,o,i.name)).map((o,l)=>m`<section id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":O}">${dc.call(this,o,t)} ${t||o.expanded?pc.call(this,o):""}</section>`)}</div>`:m`<div class="regular-font section-gap section-tag ${i.expanded?"expanded":"collapsed"}"><div class="section-tag-header" @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}"><h2 id="${i.elementId}" class="rapidoc-heading sub-title tag" part="heading heading-2" style="color:var(--primary)">${i.displayName||i.name}</h2></div><div class="section-tag-body"><slot name="${i.elementId}"></slot>${i.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${P(M(T(i.description||"")))}</div>`:""} ${i.paths.filter(o=>!this.searchVal||Lr(this.searchVal,o,i.name)).map((o,l)=>m`<section part="section-endpoint" id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":O}">${dc.call(this,o,t)} ${t||o.expanded?pc.call(this,o):""}</section>`)}</div></div>`}`,a=this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0,s=new Set;a&&this.resolvedSpec.tagGroups.forEach(i=>{(i.tags||[]).forEach(o=>s.add(o.name.toLowerCase()))});let n=a?(this.resolvedSpec.tags||[]).filter(i=>!s.has(i.name.toLowerCase())):[];return m`${e?"":m`<div class="section-expand-collapse-container"><span @click="${()=>cc.call(this,"expand-all")}" style="color:var(--primary);cursor:pointer">Expand all </span> | <span @click="${()=>cc.call(this,"collapse-all")}" style="color:var(--primary);cursor:pointer">Collapse all </span> sections</div>`} ${a?m`${this.resolvedSpec.tagGroups.map(i=>m`<div class="regular-font section-gap section-tag-group ${i.expanded?"expanded":"collapsed"}" id="${i.elementId}"><div class="section-tag-group-header" @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}"><h2 class="rapidoc-heading sub-title tag-group" part="heading heading-2" style="color:var(--foreground);font-size:var(--h4-font-size);font-weight:700;text-transform:uppercase;letter-spacing:.05em">${i.displayName||i.name}</h2><div class="section-tag-group-icon"></div></div><div class="section-tag-group-body">${i.description?m`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${P(M(T(i.description||"")))}</div>`:""} ${i.tags.map(o=>r(o))}</div></div>`)} ${n.map(i=>r(i))}`:this.resolvedSpec.tags.map(i=>r(i))}`}function rf(e){return m`<svg style="${e}" viewBox="1 0 511 512"><path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/><path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/><path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/><path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/><path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/><path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/></svg>`}function af(){return m`<header class="row main-header regular-font" part="section-header"><div class="only-large-screen-flex" style="align-items:center"><slot name="logo" class="logo" part="section-logo">${rf("height:36px;width:36px;margin-left:5px")}</slot><div class="header-title" part="label-header-title">${this.headingText}</div></div><div class="main-header-controls">${this.allowSpecUrlLoad==="false"?"":m`<input id="spec-url" type="text" style="font-size:var(--font-size-small)" class="header-input mono-font" part="textbox textbox-spec-url" placeholder="Spec URL" value="${this.specUrl||""}" @change="${this.onSpecUrlChange}" spellcheck="false"><div class="header-action-icon" @click="${this.onSpecUrlChange}">↩</div>`} ${this.allowSpecFileLoad==="false"?"":m`<input id="spec-file" part="file-input" type="file" style="display:none" value="${this.specFile||""}" @change="${this.onSpecFileChange}" spellcheck="false"> <button class="btn btn-primary only-large-screen" style="margin-left:10px" part="btn btn-fill" @click="${this.onFileLoadClick}">LOCAL JSON FILE</button>`}<slot name="header"></slot>${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":m`<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px" spellcheck="false"><div class="header-action-icon" @click="${this.onSearchChange}">↩</div>`} ${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":m`<button class="btn btn-primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px" @click="${this.onShowAdvancedSearchClicked}">Search</button>`}</div></header>`}function sf(){return m`<dialog id="advanced-search-dialog" class="dialog-box"><header class="dialog-box-header"><span class="dialog-box-title">Search</span> <button type="button" @click="${e=>this.onAdvancedSearchClose(e)}">×</button></header><div class="dialog-box-content"><div class="advanced-search-options"><input id="input-advanced-search-dialog" style="width:100%;padding-right:20px" type="text" part="textbox textbox-search-dialog" placeholder="search text..." spellcheck="false" @keyup="${e=>this.onAdvancedSearch(e,400)}"><div class="search-options-row"><label class="search-option-label" for="search-api-path"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Path</label> <label class="search-option-label" for="search-api-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Description</label> <label class="search-option-label" for="search-api-params"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change="${e=>this.onAdvancedSearch(e,0)}"> API Parameters</label> <label class="search-option-label" for="search-api-request-body"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change="${e=>this.onAdvancedSearch(e,0)}"> Request Body Parameters</label> <label class="search-option-label" for="search-api-resp-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change="${e=>this.onAdvancedSearch(e,0)}"> Response Description</label></div></div>${this.advancedSearchMatches?.map(e=>m`<div class="mono-font small-font-size hover-bg search-match-row" style="${e.deprecated?"filter:opacity(0.5);":""}" data-content-id="${e.elementId}" tabindex="0" @click="${t=>{this.searchVal="",this.shadowRoot.getElementById("advanced-search-dialog").close(),this.requestUpdate(),this.scrollToEventTarget(t,!0)}}"><span class="upper bold-text method-fg ${e.method}">${e.method}</span> <span>${e.path}</span> <span class="regular-font gray-text">${e.summary}</span></div>`)}</div></dialog>`}function uc(e=!1,t=!1){return this.resolvedSpec?(this.persistAuth==="true"&&Rh.call(this),this.resolvedSpec.specLoadError?m`<div id="spec-not-found">${this.resolvedSpec.info.description}</div>`:this.resolvedSpec.isSpecLoading?m`<main class="main-content regular-font" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode"><div class="loader"></div></div></main>`:m`<slot name="fixed-header"></slot>${this.showHeader==="false"?"":af.call(this)} ${this.allowAdvancedSearch==="false"?"":sf.call(this)}<div id="the-main-body" class="body ${this.cssClasses}" dir="${this.pageDirection}">${(this.renderStyle==="read"||this.renderStyle==="focused")&&this.showSideNav==="true"&&this.resolvedSpec?Gm.call(this):""}<main class="main-content regular-font" tabindex="-1" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode">${this.loading===!0?m`<div class="loader"></div>`:m`${this.loadFailed===!0?m`<div style="text-align:center;margin:16px">Unable to load the Spec</div>`:m`<div class="operations-root" @click="${r=>{this.handleHref(r)}}">${this.renderStyle==="focused"?m`${this.showInfo==="false"?Aa.call(this):""}${Qm.call(this)}`:m`${this.showInfo==="true"?on.call(this):""} ${Aa.call(this)} ${this.allowServerSelection==="true"?nc.call(this):""} ${this.allowAuthentication==="true"?bl.call(this,this.allowTry):""}<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>${this.renderStyle==="read"?ym.call(this):tf.call(this,e,t)} ${this.showComponents==="true"?Ul.call(this):""}`}</div>`}`}</div><slot name="footer"></slot></main></div>`):""}function nf(e,t,r={}){let a=typeof e=="string"?document.querySelector(e):e,s=typeof t=="string"?document.querySelector(t):t;if(!a||typeof window>"u")return()=>{};let n=r.activeClass||"active",i=r.updateHistory!==!1;function o(g){return g?a.querySelector(`#link-${CSS.escape(g)}`)||a.querySelector(`.nav-bar-path[data-content-id="${CSS.escape(g)}"]`)||a.querySelector(`.nav-bar-path[data-op-slug="${CSS.escape(g)}"]`)||a.querySelector(`#link-${CSS.escape(g.replace(/^[a-z0-9_-]+--/,""))}`)||(g==="overview"?a.querySelector("#link-overview, .nav-bar-info"):null):null}function l(g,f=!0){let y=o(g);if(!y||y.classList.contains(n))return;if(a.querySelectorAll("."+n).forEach(A=>A.classList.remove(n)),y.classList.add(n),un(y),f&&i){let A=y.getAttribute("href");A&&window.history.replaceState(null,"",A)}let v=y.closest(".nav-scroll");if(v){let A=y.getBoundingClientRect(),x=v.getBoundingClientRect();if(A.top<x.top+20||A.bottom>x.bottom-40){let b=A.top-x.top+v.scrollTop-40;v.scrollTo({top:b,behavior:"smooth"})}}}let c=g=>{let f=g.target.closest("[data-action]")||g.target.closest(".nav-bar-path, .nav-bar-info");if(!f)return;let y=f.dataset?.action;if(y==="expand-collapse-tag")br(f,"toggle");else if(y==="expand-collapse-tag-group")Ea(f,"toggle");else if(y==="navigate"||f.classList.contains("nav-bar-path")||f.classList.contains("nav-bar-info")){let v=f.getAttribute("href")||f.getAttribute("data-tag-href"),A=v?v.indexOf("#"):-1,x=(A===-1?v:v.substring(A+1))||f.getAttribute("data-content-id")||f.getAttribute("data-op-slug")||f.id?.replace(/^link-/,"");x&&s&&typeof s.scrollToPath=="function"&&(g.preventDefault(),l(x,!1),s.scrollToPath(x),i&&v&&window.history.pushState(null,"",v))}};a.addEventListener("click",c);let d=a.querySelector(".portal-filter-input, .nav-bar-search-input"),p=null;d&&(p=g=>{let f=(g.target.value||"").toLowerCase().trim();a.querySelectorAll(".nav-bar-path, .portal-sidebar-op-item").forEach(y=>{y.style.display=y.textContent.toLowerCase().includes(f)?"flex":"none"}),a.querySelectorAll(".nav-bar-tag-and-paths").forEach(y=>{let v=y.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');y.style.display=v||!f?"":"none",f&&v&&br(y,"expand")}),a.querySelectorAll(".nav-bar-tag-group").forEach(y=>{let v=y.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');y.style.display=v||!f?"":"none",f&&v&&Ea(y,"expand")})},d.addEventListener("input",p));let h=g=>{let f=g.detail?.operationId||g.detail?.id||g.detail?.elementId;f&&l(f,!0)};s&&s.addEventListener("nav-active-change",h);let u=()=>{if(window.location.hash){let g=window.location.hash.replace(/^#/,"");g&&(l(g,!1),s&&typeof s.scrollToPath=="function"&&s.scrollToPath(g))}};return window.addEventListener("popstate",u),window.addEventListener("hashchange",u),s&&(s.addEventListener("spec-loaded",()=>setTimeout(u,80)),typeof s.updateComplete?.then=="function"&&s.updateComplete.then(()=>setTimeout(u,50))),setTimeout(u,150),()=>{a.removeEventListener("click",c),d&&p&&d.removeEventListener("input",p),s&&s.removeEventListener("nav-active-change",h),window.removeEventListener("popstate",u),window.removeEventListener("hashchange",u)}}var hc=class{constructor(e){this.host=e,this.active=!1,this.resolved="",this.observer=null,this.media=null,this.onPageChange=()=>this.apply(),e.addController(this)}hostConnected(){this.host.colorScheme==="auto"?this.enable():this.active&&(this.watch(!0),this.apply())}hostDisconnected(){this.watch(!1)}hostUpdate(){let e=this.host.colorScheme;e==="auto"?this.enable():this.active&&e!==this.resolved&&(this.active=!1,this.watch(!1))}enable(){this.active=!0,this.watch(!0),this.apply()}apply(){if(!this.active||typeof window>"u")return;let e=of(this.host);this.resolved=e,this.host.colorScheme!==e&&(this.host.colorScheme=e),this.host.getAttribute("color-scheme")!==e&&this.host.setAttribute("color-scheme",e)}watch(e){this.observer?.disconnect(),this.observer=null,this.media?.removeEventListener("change",this.onPageChange),this.media=null,e&&typeof window<"u"&&(this.observer=new MutationObserver(this.onPageChange),this.observer.observe(document.documentElement,{attributes:!0}),document.body&&this.observer.observe(document.body,{attributes:!0}),this.media=window.matchMedia("(prefers-color-scheme: light)"),this.media.addEventListener("change",this.onPageChange))}};function of(e){let t=e.parentElement||e.getRootNode().host||document.documentElement,r=getComputedStyle(t).colorScheme||"",a=/\bdark\b/.test(r);return a===/\blight\b/.test(r)?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":a?"dark":"light"}var mc={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},fc=["pointerdown","keydown","wheel","touchstart"],C=class extends fe{constructor(){super(),this.headingText="",this.gotoPath="",this.updateRoute="true",this.specUrl="",this.sortTags="false",this.sortSchemas="false",this.generateMissingTags="false",this.showUnusedTags="false",this.sortEndpointsBy="path",this.layout="row",this.renderStyle="read",this.defaultSchemaTab="example",this.responseAreaHeight="400px",this.fillRequestFieldsWithExample="true",this.persistAuth="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="true",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.defaultApiServerUrl="",this.serverUrl="",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="example",this.mockServerDelay=0,this.mockServerLog="false",this.showHeader="true",this.showSideNav="true",this.showInfo="true",this.allowAuthentication="true",this.allowTry="true",this.showCurlBeforeTry="false",this.allowSpecUrlLoad="true",this.allowSpecFileLoad="true",this.allowSpecFileDownload="false",this.allowSearch="true",this.allowAdvancedSearch="true",this.allowServerSelection="true",this.allowSchemaDescriptionExpandToggle="true",this.mcp="false",this.mcpServerName="",this.showComponents="false",this.pageDirection="ltr",this.scrollBehavior="smooth",this.autoHeight="false",this.scrollContainer="",this.scrollOffset="",this.theme=Ge,this.primaryColor="",this.colorScheme="dark",this._autoColorScheme=new hc(this),this.radius="sm",this.scale="default",this.cssFile="",this.cssClasses="",this.navItemSpacing="default",this.navItemOverflow="ellipsis",this.showMethodInNavBar="false",this.usePathInNavBar="false",this.infoDescriptionHeadingsInNavBar="false",this.fetchCredentials="",this.matchPaths="",this.matchType="includes",this.removeEndpointsWithBadgeLabelAs="",this.loading=!1,this.focusedElementId="",this.searchVal="",this.showSummaryWhenCollapsed=!0,this._intersectingElements=new Map,this.isIntersectionObserverActive=!1,this._userSetLayout=!1,this._isDefaultingLayout=!1,this._observerLockTimeout=null,this._observerLockCleanup=null,this._readerHasInteracted=!1,this._onFirstInteraction=null,this._onHashChange=null,this._specLoadSeq=0,this._lastSpecUrlRequested=null,this.initIntersectionObserver()}static get styles(){return[wi,Je,Xt,_r,fi,qr,gi,Qa,Rr,yi,bi,Yd,Qd,ht]}connectedCallback(){super.connectedCallback(),this.initIntersectionObserver(),this.shadowRoot&&this.shadowRoot.querySelector(".main-content")&&(this._hasDsd=!0);let e=this.parentElement;if(e&&e.tagName==="BODY"&&(e.offsetWidth===0&&e.style.width===""&&(e.style.width="100vw"),e.offsetHeight===0&&e.style.height===""&&(e.style.height="100vh"),e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0")),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.hasAttribute("layout")){let r=this.getAttribute("layout");"row, column,".includes(`${r},`)&&(this.layout=r,this._userSetLayout=!0)}if(this._userSetLayout)this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row",this.setAttribute("layout",this.layout));else{let r=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.theme=Ge),this.primaryColor&&mt(this.primaryColor)&&(this.theme=this.primaryColor);let t=ft(this.theme);if(this.theme=t.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.navItemSpacing&&"compact, default, relaxed,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),gt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="400px",this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.showUnusedTags&&"true, false,".includes(`${this.showUnusedTags},`)||(this.showUnusedTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navItemOverflow&&"ellipsis, wrap,".includes(`${this.navItemOverflow},`)||(this.navItemOverflow="ellipsis"),this.getAttribute("nav-item-overflow")||this.setAttribute("nav-item-overflow",this.navItemOverflow),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",this.cssFile||=null,this.cssClasses||="",this.mcp||="none",this._onHashChange||(this._onHashChange=()=>{this.scrollToPath(this.getElementIDFromURL())},window.addEventListener("hashchange",this._onHashChange,!0)),!this._readerHasInteracted&&!this._onFirstInteraction&&(this._onFirstInteraction=()=>{this._readerHasInteracted=!0,this.removeFirstInteractionListeners()},fc.forEach(r=>window.addEventListener(r,this._onFirstInteraction,{capture:!0,passive:!0}))),!this.resolvedSpec){let r=this.querySelector('script[type="application/json"][slot="rapidoc-spec"]');if(r?.textContent)try{let a=JSON.parse(r.textContent);this._lastSpecUrlRequested=this.getAttribute("spec-url"),this.loadSpec(a)}catch{}else this.getAttribute("spec-url")&&this.loadSpec(this.getAttribute("spec-url"))}}disconnectedCallback(){this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),this.intersectionObserver&&this.intersectionObserver.disconnect(),this._onHashChange&&=(window.removeEventListener("hashchange",this._onHashChange,!0),null),this.removeFirstInteractionListeners(),this.mockServer==="true"&&ha(this),super.disconnectedCallback()}removeFirstInteractionListeners(){this._onFirstInteraction&&=(fc.forEach(e=>window.removeEventListener(e,this._onFirstInteraction,{capture:!0})),null)}getContentScrollBehavior(){return this._readerHasInteracted?this.scrollBehavior:"instant"}infoDescriptionHeadingRenderer(){let e=new T.Renderer,t=new Ze;return e.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="${t.slug(r)}">${r}</h${a}>`,Or(e),e}willUpdate(e){if(super.willUpdate?.(e),this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),e.has("layout")&&!this._isDefaultingLayout&&(this._userSetLayout=!!(this.layout&&"row, column,".includes(`${this.layout},`))),e.has("renderStyle")&&!this._userSetLayout){let t=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this.layout!==t&&(this._isDefaultingLayout=!0,this.layout=t,this.setAttribute("layout",t),this._isDefaultingLayout=!1)}}_clearDsdIfNeeded(){this._hasDsd&&this.shadowRoot&&(this.shadowRoot.replaceChildren(),this.renderOptions&&delete this.renderOptions.renderBefore,this._hasDsd=!1)}render(){if(this._hasDsd&&!this.resolvedSpec)return ne;if(this._clearDsdIfNeeded(),this.cssFile){let e=document.querySelector(`link[href*="${CSS.escape(this.cssFile)}"]`);e&&this.shadowRoot.appendChild(e.cloneNode())}return uc.call(this)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),jr(this.shadowRoot),e.has("theme")){(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.setAttribute("color-scheme",this.colorScheme),this.theme=Ge,this.setAttribute("theme",Ge));let t=ft(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),gt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&mt(this.primaryColor)&&(this.theme=ft(this.primaryColor).theme,this.setAttribute("theme",this.theme),gt(this,this.theme)),e.has("colorScheme")&&(this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.getAttribute("color-scheme")!==this.colorScheme&&this.setAttribute("color-scheme",this.colorScheme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?ua(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&ha(this)),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&dl({owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),e.has("scrollContainer")&&this.initIntersectionObserver()}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&window.setTimeout(async()=>{r!==this._lastSpecUrlRequested&&(await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath))},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="scroll-offset"&&t!==r&&window.setTimeout(()=>this.initIntersectionObserver(),0),e==="layout"&&!this._isDefaultingLayout){if(r!==null&&"row, column,".includes(`${r},`))this._userSetLayout=!0,this.layout=r;else if(r===null){this._userSetLayout=!1;let a=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}}if(e==="render-style"&&(r==="read"?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect(),!this._userSetLayout)){let a=r==="read"||r==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}if(e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Yt);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);let t=e.target.files[0],r=new FileReader;r.onload=()=>{try{let a=JSON.parse(r.result);this.loadSpec(a),this.shadowRoot.getElementById("spec-url").value=""}catch{}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){let t=e.target instanceof HTMLInputElement?e.target:this.shadowRoot.getElementById("nav-bar-search");this.searchVal=t?.value??"",this.resolvedSpec.tags.forEach(r=>r.paths.filter(a=>{this.searchVal&&Lr(this.searchVal,a,r.name)&&(r.expanded=!0)})),this.resolvedSpec.components.forEach(r=>r.subComponents.filter(a=>{a.expanded=!1,sp(this.searchVal,a)&&(a.expanded=!0)})),this.requestUpdate()}onClearSearch(){let e=this.shadowRoot.getElementById("nav-bar-search");e.value="",this.searchVal="",this.resolvedSpec.components.forEach(t=>t.subComponents.filter(r=>{r.expanded=!0}))}onOpenNavBarToggle(){this.shadowRoot.getElementById("nav-bar").classList.toggle("floating-nav")}onShowAdvancedSearchClicked(){this.shadowRoot.getElementById("advanced-search-dialog").showModal()}onAdvancedSearchClose(){this.shadowRoot.getElementById("advanced-search-dialog").close()}async loadSpec(e){if(!e)return;typeof e=="string"&&(this._lastSpecUrlRequested=e);let t=++this._specLoadSeq;this.searchVal="";try{this._hasDsd||(this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0),this.loadFailed=!1;let r=await Vo.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs,this.showUnusedTags==="true");if(t!==this._specLoadSeq)return;this.loading=!1,this.afterSpecParsedAndValidated(r,t)}catch{if(t!==this._specLoadSeq)return;this.loading=!1,this._clearDsdIfNeeded(),this.loadFailed=!0,this.resolvedSpec=null}}async afterSpecParsedAndValidated(e,t=this._specLoadSeq){for(this._clearDsdIfNeeded(),this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(s=>s.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);if(t!==this._specLoadSeq)return;let r=new CustomEvent("spec-loaded",{detail:e});if(this.dispatchEvent(r),this.mockServer==="true"&&ua(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),this.intersectionObserver.disconnect(),this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="read"){if(await Ir(100),t!==this._specLoadSeq)return;this.observeExpandedContent()}this.isIntersectionObserverActive=!0;let a=this.getElementIDFromURL();if(a)this.renderStyle==="view"?this.expandAndGotoOperation(a,!0,!0):this.scrollToPath(a);else if(this.gotoPath)this.scrollToPath(this.gotoPath);else if(this.renderStyle==="focused"&&!this.gotoPath){let s=this.showInfo==="true"?"overview":this.resolvedSpec.tags.find(n=>n.paths.length>0)?.paths[0]?.elementId;s&&this.scrollToPath(s)}}getComponentBaseURL(){return window.location.href.split("#")[0]}getElementIDFromURL(){return window.location.hash?window.location.hash.substring(1):""}replaceHistoryState(e){let t=this.getComponentBaseURL();window.history.replaceState(null,null,e?`${t}#${e}`:t)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let r=!0,a=e.indexOf("#")===-1?e:e.substring(1);if(a.startsWith("overview")||a==="servers"||a==="auth")r=!1;else{for(let s=0;s<this.resolvedSpec.tags?.length;s++){let n=this.resolvedSpec.tags[s],i=n.paths?.find(o=>o.elementId===e);i&&(i.expanded&&n.expanded?r=!1:(i.expanded=!0,n.expanded=!0))}if(this.resolvedSpec.tagGroups)for(let s=0;s<this.resolvedSpec.tagGroups.length;s++){let n=this.resolvedSpec.tagGroups[s];n.tags?.some(i=>i.paths?.some(o=>o.elementId===e))&&!n.expanded&&(n.expanded=!0,r=!0)}}t&&(r&&this.requestUpdate(),window.setTimeout(()=>{let s=this.shadowRoot.querySelector(".first-nav-item"),n=s&&s.dataset.contentId===a,i=this.shadowRoot.getElementById(a);if(i){let o=this.shadowRoot.querySelector(".main-content"),l;if(this.autoHeight==="true")this.scrollAutoHeightTarget(i,a);else if(n)l=0,this.lockObserverDuringScroll(i,a,l),o?o.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):i.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(o){let c=o.getBoundingClientRect();l=i.getBoundingClientRect().top-c.top+o.scrollTop,this.lockObserverDuringScroll(i,a,l),o.scrollTo({top:l,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(i,a),i.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});this._activeElementId=a,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:a,elementId:a},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(a)}},r?150:0))}isValidTopId(e){return e.startsWith("overview")||e==="servers"||e==="auth"}isValidPathId(e){return e==="overview"&&this.showInfo||e==="servers"&&this.allowServerSelection||e==="auth"&&this.allowAuthentication?!0:e.startsWith("tag--")?this.resolvedSpec?.tags?.find(t=>t.elementId===e):this.resolvedSpec?.tags?.find(t=>t.paths.find(r=>r.elementId===e))}initIntersectionObserver(){this.intersectionObserver&&this.intersectionObserver.disconnect();let e=null;if(this.scrollContainer&&typeof document<"u")try{e=document.querySelector(this.scrollContainer);let r=!!(e&&(e.contains(this)||this.assignedSlot&&e.contains(this.assignedSlot)||e.shadowRoot&&e.shadowRoot.contains(this.assignedSlot)));e&&!r&&(e=null)}catch{}if(!e&&typeof window<"u"){let r=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;r&&r!==document.body&&r!==document.documentElement;){let a=window.getComputedStyle(r).overflowY;if(a==="auto"||a==="scroll"){e=r;break}r=r.parentElement||(r.getRootNode&&r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null)}}this._scrollRootContainer=e;let t={root:e,rootMargin:`-${this.getScrollOffset()}px 0px -50% 0px`,threshold:0};this.intersectionObserver=new IntersectionObserver(r=>{this.onIntersect(r)},t),this.isIntersectionObserverActive&&this.observeExpandedContent()}onIntersect(e){if(this.isIntersectionObserverActive===!1)return;this._intersectingElements||=new Map;for(let o of e)o.isIntersecting&&o.intersectionRatio>0?this._intersectingElements.set(o.target.id,o.target):this._intersectingElements.delete(o.target.id);if(this._intersectingElements.size===0)return;let t=Array.from(this._intersectingElements.values()).filter(o=>o.isConnected);if(t.length===0)return;let r=(this._scrollRootContainer?this._scrollRootContainer.getBoundingClientRect().top:0)+this.getScrollOffset(),a=[],s=[];for(let o of t){let l=o.getBoundingClientRect().top-r;l>-1?a.push({el:o,top:l}):s.push({el:o,top:l})}let n;a.length>0?(a.sort((o,l)=>o.top-l.top),n=a[0].el):(s.sort((o,l)=>l.top-o.top),n=s[0].el);let i=n.id;this._activeElementId!==i&&(this._activeElementId=i,this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this._intersectionRaf=requestAnimationFrame(()=>{let o=i;if(i.startsWith("tag--")&&this.resolvedSpec?.tags){let c=this.resolvedSpec.tags.find(d=>d.elementId===i);c?.paths?.[0]?.elementId&&(o=c.paths[0].elementId)}this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:i,elementId:i,operationId:o},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(i);let l=this.shadowRoot.getElementById(`link-${i}`);if(l){let c=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");c&&c!==l&&(c.classList.remove("active"),c.part.remove("section-navbar-active-item")),un(l),l.classList.add("active"),l.part.add("section-navbar-active-item");let d=l.closest(".nav-scroll");if(d){let p=d.querySelector(".nav-bar-header")||d.querySelector(".nav-bar-search-container"),h=p?p.offsetHeight:0;if(l.offsetTop<=h+30){if(d.scrollTop>0){let u=this.scrollBehavior==="auto"?"auto":"smooth";d.scrollTo({top:0,behavior:u})}}else{let u=d.getBoundingClientRect(),g=l.getBoundingClientRect();if(g.top<u.top+h+15||g.bottom>u.bottom-40){let f=this.scrollBehavior==="auto"?"auto":"smooth",y=g.top-u.top+d.scrollTop-h-20;d.scrollTo({top:y,behavior:f})}}}}}))}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));if(t){let r=this.shadowRoot.querySelector(".main-content");if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(t,t.id);else if(r){let a=r.getBoundingClientRect(),s=t.getBoundingClientRect().top-a.top+r.scrollTop;r.scrollTo({top:s,behavior:this.scrollBehavior})}else t.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}}getScrollOffset(){if(!(this.autoHeight==="true"||this.hasAttribute("auto-height"))||typeof window>"u")return 0;let e=parseFloat(this.scrollOffset);if(Number.isFinite(e))return e;let t=this._scrollRootContainer||document.scrollingElement||document.documentElement,r=getComputedStyle(t).scrollPaddingTop,a=parseFloat(r);return Number.isFinite(a)?r.endsWith("%")?a/100*t.clientHeight:a:0}scrollAutoHeightTarget(e,t){let r=e.getBoundingClientRect().top-this.getScrollOffset(),a=this._scrollRootContainer;if(a){let s=r-a.getBoundingClientRect().top+a.scrollTop;this.lockObserverDuringScroll(e,t,s),a.scrollTo({top:s,behavior:this.getContentScrollBehavior()})}else{let s=r+window.scrollY;this.lockObserverDuringScroll(e,t,s),window.scrollTo({top:s,behavior:this.getContentScrollBehavior()})}}lockObserverDuringScroll(e,t="",r){this._intersectionRaf&&=(cancelAnimationFrame(this._intersectionRaf),null),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null);let a=e?.id||t;this.isIntersectionObserverActive=!1,this._intersectingElements&&(this._intersectingElements.clear(),e&&a&&this._intersectingElements.set(a,e)),a&&(this._activeElementId=a);let s=this.autoHeight==="true"||this.hasAttribute("auto-height")?this._scrollRootContainer||(typeof window<"u"?window:null):this.shadowRoot?.querySelector(".main-content")||(typeof window<"u"?window:null);if(!s||typeof window>"u"){this.isIntersectionObserverActive=!0;return}let n=!1,i=()=>{n||(n=!0,d&&(d(),d=null,this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),e&&a&&this._intersectingElements&&this._intersectingElements.set(a,e),this.isIntersectionObserverActive=!0)},o=null,l=()=>{clearTimeout(o),o=setTimeout(i,120)},c=()=>{i()},d=()=>{s.removeEventListener?.("scrollend",c),window.removeEventListener?.("scrollend",c),s.removeEventListener?.("scroll",l),window.removeEventListener?.("scroll",l),clearTimeout(o)};this._observerLockCleanup=d,"onscrollend"in window&&(s.addEventListener?.("scrollend",c,{once:!0,passive:!0}),window.addEventListener?.("scrollend",c,{once:!0,passive:!0})),s.addEventListener?.("scroll",l,{passive:!0}),window.addEventListener?.("scroll",l,{passive:!0});let p=s===window?window.scrollY:s.scrollTop||0,h=typeof r=="number"&&Math.abs(r-p)<3?60:this.getContentScrollBehavior()==="smooth"?1200:100;this._observerLockTimeout=setTimeout(i,h)}async scrollToEventTarget(e,t=!0){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target?.closest?.("[data-content-id]")||e.target;if(!r?.dataset?.contentId)return;if(this.renderStyle==="focused"){let s=this.shadowRoot.querySelector("api-request");typeof s?.beforeNavigationFocusedMode=="function"&&s.beforeNavigationFocusedMode()}let a=r.dataset.firstNavItem==="true";this.scrollToPath(r.dataset.contentId,!0,t,a)}getTargetElement(e){return!e||!this.shadowRoot?null:this.shadowRoot.getElementById(e)||this.shadowRoot.querySelector(`[data-op-slug="${CSS.escape(e)}"]`)||this.shadowRoot.querySelector(`[id$="--${CSS.escape(e)}"]`)||this.shadowRoot.getElementById(e.replace(/^[a-z0-9_-]+--/,""))}resolveOperationAlias(e){if(!e||this.getTargetElement(e))return e;let t=a=>a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),r=t(e);for(let a of this.resolvedSpec?.tags||[]){let s=a.paths?.find(n=>t(Uo(n.method,n.path))===r);if(s)return s.elementId}return e}bindNavBar(e,t){return nf(e,this,t)}async scrollTo(e){return this.scrollToPath(e)}async scrollToPath(e,t=!0,r=!0,a=!1){if(e=this.resolveOperationAlias(e),this.renderStyle==="focused"&&(this.focusedElementId=e,await Ir(0)),this.renderStyle==="view")this.expandAndGotoOperation(e,t,!0);else{let s=this.getTargetElement(e),n=!!s;if(s){let i=this.shadowRoot.querySelector(".first-nav-item"),o=a||i&&i.dataset.contentId===e,l=this.shadowRoot.querySelector(".main-content"),c;if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(s,e);else if(o)c=0,this.lockObserverDuringScroll(s,e,c),l?l.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):s.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(l){let d=l.getBoundingClientRect();c=s.getBoundingClientRect().top-d.top+l.scrollTop,this.lockObserverDuringScroll(s,e,c),l.scrollTo({top:c,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(s,e),s.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"})}if(n){if(this.renderStyle==="focused"){let o=this.shadowRoot.querySelector("api-request");typeof o?.afterNavigationFocusedMode=="function"&&o.afterNavigationFocusedMode();let l=this.shadowRoot.querySelector("api-response");typeof l?.resetSelection=="function"&&l.resetSelection()}this._activeElementId=s?.id||e,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:e,elementId:e},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(e);let i=this.shadowRoot.getElementById(`link-${e}`);if(i){if(un(i),r){let l=this.shadowRoot.querySelector(".nav-scroll");if(l){let c=l.getBoundingClientRect(),d=i.getBoundingClientRect().top-c.top+l.scrollTop-l.clientHeight/2;l.scrollTo({top:d,behavior:this.scrollBehavior})}else i.scrollIntoView({behavior:this.scrollBehavior,block:"center"})}await Ir(0);let o=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");o&&(o.classList.remove("active"),o.part.remove("active"),o.part.remove("section-navbar-active-item")),i.classList.add("active"),i.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,r){return nt.call(this,e,t,r)}setApiKey(e,t,r={}){return nt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return Js.call(this)}setApiServer(e){return pn.call(this,e)}get mcpEnabled(){return Hl(this.mcp)}findArazzoDocument(){if(typeof customElements>"u"||!customElements.get("rapi-flow"))return;let e=[...document.querySelectorAll("rapi-flow")];return e.find(t=>this.id&&t.getAttribute("for")===this.id&&t.arazzoDocument)||e.find(t=>!t.getAttribute("for")&&t.arazzoDocument)}mcpOptions(e){let t=this.findArazzoDocument();return{serverName:this.mcpServerName,arazzo:t?.arazzoDocument,workflowRuntime:t?.workflowRuntimeSource,...e}}generateMcpServer(e={}){let t=this.resolvedSpec||this.openApiSpec;return t?Km(t,this.mcpOptions(e)):null}downloadMcpServer(e={}){let t=this.generateMcpServer(e);if(!t)return;let r=new Blob([Wm(t.files)],{type:"application/zip"}),a=document.createElement("a");a.href=URL.createObjectURL(r),a.download=`${t.manifest.server.name.replace(/_/g,"-")}-mcp.zip`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(a.href)}getMcpBudget(e={}){let t=this.resolvedSpec||this.openApiSpec;return t?Wl(ac(t,this.mcpOptions(e))):null}onAdvancedSearch(e,t){let r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let a;a=r.type==="text"?r:r.closest(".advanced-search-options").querySelector("input[type=text]");let s=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map(n=>n.id);this.advancedSearchMatches=np(a.value,this.resolvedSpec.tags,s)},t)}};w([k({type:String,attribute:"heading-text"})],C.prototype,"headingText",void 0),w([k({type:String,attribute:"goto-path"})],C.prototype,"gotoPath",void 0),w([k({type:String,attribute:"update-route"})],C.prototype,"updateRoute",void 0),w([k({type:String,attribute:"spec-url"})],C.prototype,"specUrl",void 0),w([k({type:String,attribute:"sort-tags"})],C.prototype,"sortTags",void 0),w([k({type:String,attribute:"sort-schemas"})],C.prototype,"sortSchemas",void 0),w([k({type:String,attribute:"generate-missing-tags"})],C.prototype,"generateMissingTags",void 0),w([k({type:String,attribute:"show-unused-tags"})],C.prototype,"showUnusedTags",void 0),w([k({type:String,attribute:"sort-endpoints-by"})],C.prototype,"sortEndpointsBy",void 0),w([k({type:String,attribute:!1})],C.prototype,"specFile",void 0),w([k({type:String,reflect:!0})],C.prototype,"layout",void 0),w([k({type:String,attribute:"render-style"})],C.prototype,"renderStyle",void 0),w([k({type:String,attribute:"default-schema-tab"})],C.prototype,"defaultSchemaTab",void 0),w([k({type:String,attribute:"response-area-height"})],C.prototype,"responseAreaHeight",void 0),w([k({type:String,attribute:"fill-request-fields-with-example"})],C.prototype,"fillRequestFieldsWithExample",void 0),w([k({type:String,attribute:"persist-auth"})],C.prototype,"persistAuth",void 0),w([k({type:String,attribute:"schema-style"})],C.prototype,"schemaStyle",void 0),w([k({type:Number,attribute:"schema-expand-level"})],C.prototype,"schemaExpandLevel",void 0),w([k({type:String,attribute:"schema-description-expanded"})],C.prototype,"schemaDescriptionExpanded",void 0),w([k({type:String,attribute:"schema-hide-read-only"})],C.prototype,"schemaHideReadOnly",void 0),w([k({type:String,attribute:"schema-hide-write-only"})],C.prototype,"schemaHideWriteOnly",void 0),w([k({type:String,attribute:"api-key-name"})],C.prototype,"apiKeyName",void 0),w([k({type:String,attribute:"api-key-location"})],C.prototype,"apiKeyLocation",void 0),w([k({type:String,attribute:"api-key-value"})],C.prototype,"apiKeyValue",void 0),w([k({type:String,attribute:"default-api-server"})],C.prototype,"defaultApiServerUrl",void 0),w([k({type:String,attribute:"server-url"})],C.prototype,"serverUrl",void 0),w([k({type:String,attribute:"oauth-receiver"})],C.prototype,"oauthReceiver",void 0),w([k({type:Object,attribute:"additional-authorize-params",converter:mc})],C.prototype,"additionalAuthorizeParams",void 0),w([k({type:Object,attribute:"additional-token-params",converter:mc})],C.prototype,"additionalTokenParams",void 0),w([k({type:String,attribute:"mock-server"})],C.prototype,"mockServer",void 0),w([k({type:String,attribute:"mock-server-status-code"})],C.prototype,"mockServerStatusCode",void 0),w([k({type:String,attribute:"mock-server-status-strategy"})],C.prototype,"mockServerStatusStrategy",void 0),w([k({type:Number,attribute:"mock-server-delay"})],C.prototype,"mockServerDelay",void 0),w([k({type:String,attribute:"mock-server-log"})],C.prototype,"mockServerLog",void 0),w([k({type:String,attribute:"show-header"})],C.prototype,"showHeader",void 0),w([k({type:String,attribute:"show-side-nav"})],C.prototype,"showSideNav",void 0),w([k({type:String,attribute:"show-info"})],C.prototype,"showInfo",void 0),w([k({type:String,attribute:"allow-authentication"})],C.prototype,"allowAuthentication",void 0),w([k({type:String,attribute:"allow-try"})],C.prototype,"allowTry",void 0),w([k({type:String,attribute:"show-curl-before-try"})],C.prototype,"showCurlBeforeTry",void 0),w([k({type:String,attribute:"allow-spec-url-load"})],C.prototype,"allowSpecUrlLoad",void 0),w([k({type:String,attribute:"allow-spec-file-load"})],C.prototype,"allowSpecFileLoad",void 0),w([k({type:String,attribute:"allow-spec-file-download"})],C.prototype,"allowSpecFileDownload",void 0),w([k({type:String,attribute:"allow-search"})],C.prototype,"allowSearch",void 0),w([k({type:String,attribute:"allow-advanced-search"})],C.prototype,"allowAdvancedSearch",void 0),w([k({type:String,attribute:"allow-server-selection"})],C.prototype,"allowServerSelection",void 0),w([k({type:String,attribute:"allow-schema-description-expand-toggle"})],C.prototype,"allowSchemaDescriptionExpandToggle",void 0),w([k({type:String,attribute:"mcp"})],C.prototype,"mcp",void 0),w([k({type:String,attribute:"mcp-server-name"})],C.prototype,"mcpServerName",void 0),w([k({type:String,attribute:"show-components"})],C.prototype,"showComponents",void 0),w([k({type:String,attribute:"page-direction"})],C.prototype,"pageDirection",void 0),w([k({type:String,attribute:"scroll-behavior"})],C.prototype,"scrollBehavior",void 0),w([k({type:String,attribute:"auto-height"})],C.prototype,"autoHeight",void 0),w([k({type:String,attribute:"scroll-container"})],C.prototype,"scrollContainer",void 0),w([k({type:String,attribute:"scroll-offset"})],C.prototype,"scrollOffset",void 0),w([k({type:String,reflect:!0})],C.prototype,"theme",void 0),w([k({type:String,attribute:"primary-color"})],C.prototype,"primaryColor",void 0),w([k({type:String,attribute:"color-scheme",reflect:!0})],C.prototype,"colorScheme",void 0),w([k({type:String,reflect:!0})],C.prototype,"radius",void 0),w([k({type:String,reflect:!0})],C.prototype,"scale",void 0),w([k({type:String,attribute:"css-file"})],C.prototype,"cssFile",void 0),w([k({type:String,attribute:"css-classes"})],C.prototype,"cssClasses",void 0),w([k({type:String,attribute:"nav-item-spacing",reflect:!0})],C.prototype,"navItemSpacing",void 0),w([k({type:String,attribute:"nav-item-overflow",reflect:!0})],C.prototype,"navItemOverflow",void 0),w([k({type:String,attribute:"show-method-in-nav-bar"})],C.prototype,"showMethodInNavBar",void 0),w([k({type:String,attribute:"use-path-in-nav-bar"})],C.prototype,"usePathInNavBar",void 0),w([k({type:String,attribute:"info-description-headings-in-navbar"})],C.prototype,"infoDescriptionHeadingsInNavBar",void 0),w([k({type:String,attribute:"fetch-credentials"})],C.prototype,"fetchCredentials",void 0),w([k({type:String,attribute:"match-paths"})],C.prototype,"matchPaths",void 0),w([k({type:String,attribute:"match-type"})],C.prototype,"matchType",void 0),w([k({type:String,attribute:"remove-endpoints-with-badge-label-as"})],C.prototype,"removeEndpointsWithBadgeLabelAs",void 0),w([k({type:Boolean})],C.prototype,"loading",void 0),w([k({type:String})],C.prototype,"focusedElementId",void 0),w([k({type:Object})],C.prototype,"advancedSearchMatches",void 0),w([k({type:String})],C.prototype,"searchVal",void 0),C=w([Se("rapi-doc")],C);var lf=C,gc={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},L=class extends fe{constructor(){super(),this.specUrl="",this.sortEndpointsBy="path",this.layout="row",this.pathsExpanded="false",this.defaultSchemaTab="example",this.responseAreaHeight="300px",this.showSummaryWhenCollapsed="true",this.fillRequestFieldsWithExample="true",this.persistAuth="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.defaultApiServerUrl="",this.serverUrl="",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="example",this.mockServerDelay=0,this.mockServerLog="false",this.allowTry="true",this.showCurlBeforeTry="false",this.theme=Ge,this.primaryColor="",this.colorScheme="dark",this._autoColorScheme=new hc(this),this.radius="sm",this.scale="default",this.fetchCredentials="",this.matchPaths="",this.matchType="includes",this.removeEndpointsWithBadgeLabelAs="",this.loading=!1,this.isMini=!0,this._specLoadSeq=0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false",this.loadFailed=!1}static get styles(){return[wi,Je,Xt,_r,fi,qr,gi,Qa,Rr,yi,bi,Z`:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}@container (width>=768px){.only-large-screen{display:block}.only-large-screen-flex{display:flex}}`]}connectedCallback(){super.connectedCallback(),this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.primaryColor&&mt(this.primaryColor)&&(this.theme=this.primaryColor);let e=ft(this.theme);this.theme=e.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),gt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="300px",this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||="",this.removeEndpointsWithBadgeLabelAs||="",this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials="")}disconnectedCallback(){this.mockServer==="true"&&ha(this),super.disconnectedCallback()}render(){return uc.call(this,!0,this.pathsExpanded)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials}}updated(e){if(super.updated?.(e),jr(this.shadowRoot),e.has("theme")){let t=ft(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),gt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&mt(this.primaryColor)&&(this.theme=ft(this.primaryColor).theme,this.setAttribute("theme",this.theme),gt(this,this.theme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?ua(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&ha(this)),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&dl({owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(r)},0),(e==="match-paths"||e==="match-type"||e==="remove-endpoints-with-badge-label-as")&&t!==r&&window.setTimeout(async()=>{await this.loadSpec(this.specUrl)},0),e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,s="",n="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===Yt);o?(o.name=s,o.in=n,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:Yt,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(e){if(!e)return;let t=++this._specLoadSeq;try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();let r=await Vo.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);if(t!==this._specLoadSeq)return;this.loading=!1,this.afterSpecParsedAndValidated(r,t)}catch{if(t!==this._specLoadSeq)return;this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null}}setHttpUserNameAndPassword(e,t,r){return nt.call(this,e,t,r)}setApiKey(e,t,r={}){return nt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return Js.call(this)}setApiServer(e){return pn.call(this,e)}async afterSpecParsedAndValidated(e,t=this._specLoadSeq){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(a=>a.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);if(t!==this._specLoadSeq)return;let r=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(r),this.mockServer==="true"&&ua(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}};w([k({type:String,attribute:"spec-url"})],L.prototype,"specUrl",void 0),w([k({type:String,attribute:"sort-endpoints-by"})],L.prototype,"sortEndpointsBy",void 0),w([k({type:String})],L.prototype,"layout",void 0),w([k({type:String,attribute:"paths-expanded"})],L.prototype,"pathsExpanded",void 0),w([k({type:String,attribute:"default-schema-tab"})],L.prototype,"defaultSchemaTab",void 0),w([k({type:String,attribute:"response-area-height"})],L.prototype,"responseAreaHeight",void 0),w([k({type:String,attribute:"show-summary-when-collapsed"})],L.prototype,"showSummaryWhenCollapsed",void 0),w([k({type:String,attribute:"fill-request-fields-with-example"})],L.prototype,"fillRequestFieldsWithExample",void 0),w([k({type:String,attribute:"persist-auth"})],L.prototype,"persistAuth",void 0),w([k({type:String,attribute:"schema-style"})],L.prototype,"schemaStyle",void 0),w([k({type:Number,attribute:"schema-expand-level"})],L.prototype,"schemaExpandLevel",void 0),w([k({type:String,attribute:"schema-description-expanded"})],L.prototype,"schemaDescriptionExpanded",void 0),w([k({type:String,attribute:"api-key-name"})],L.prototype,"apiKeyName",void 0),w([k({type:String,attribute:"api-key-location"})],L.prototype,"apiKeyLocation",void 0),w([k({type:String,attribute:"api-key-value"})],L.prototype,"apiKeyValue",void 0),w([k({type:String,attribute:"default-api-server"})],L.prototype,"defaultApiServerUrl",void 0),w([k({type:String,attribute:"server-url"})],L.prototype,"serverUrl",void 0),w([k({type:String,attribute:"oauth-receiver"})],L.prototype,"oauthReceiver",void 0),w([k({type:Object,attribute:"additional-authorize-params",converter:gc})],L.prototype,"additionalAuthorizeParams",void 0),w([k({type:Object,attribute:"additional-token-params",converter:gc})],L.prototype,"additionalTokenParams",void 0),w([k({type:String,attribute:"mock-server"})],L.prototype,"mockServer",void 0),w([k({type:String,attribute:"mock-server-status-code"})],L.prototype,"mockServerStatusCode",void 0),w([k({type:String,attribute:"mock-server-status-strategy"})],L.prototype,"mockServerStatusStrategy",void 0),w([k({type:Number,attribute:"mock-server-delay"})],L.prototype,"mockServerDelay",void 0),w([k({type:String,attribute:"mock-server-log"})],L.prototype,"mockServerLog",void 0),w([k({type:String,attribute:"allow-try"})],L.prototype,"allowTry",void 0),w([k({type:String,attribute:"show-curl-before-try"})],L.prototype,"showCurlBeforeTry",void 0),w([k({type:String,reflect:!0})],L.prototype,"theme",void 0),w([k({type:String,attribute:"primary-color"})],L.prototype,"primaryColor",void 0),w([k({type:String,attribute:"color-scheme",reflect:!0})],L.prototype,"colorScheme",void 0),w([k({type:String,reflect:!0})],L.prototype,"radius",void 0),w([k({type:String,reflect:!0})],L.prototype,"scale",void 0),w([k({type:String,attribute:"fetch-credentials"})],L.prototype,"fetchCredentials",void 0),w([k({type:String,attribute:"match-paths"})],L.prototype,"matchPaths",void 0),w([k({type:String,attribute:"match-type"})],L.prototype,"matchType",void 0),w([k({type:String,attribute:"remove-endpoints-with-badge-label-as"})],L.prototype,"removeEndpointsWithBadgeLabelAs",void 0),w([k({type:Boolean})],L.prototype,"loading",void 0),L=w([Se("rapi-doc-mini")],L);var cf=L,hn=class extends HTMLElement{connectedCallback(){let e=qh(window.location);if(e&&(window.history.replaceState(null,"",window.location.pathname),window.opener&&window.opener.postMessage(e,window.location.origin),typeof BroadcastChannel=="function")){let t=new BroadcastChannel(ul);t.postMessage(e),t.close()}}};hn=w([Se("oauth-receiver")],hn);var df=hn,pf={RapiDoc:lf};export{df as OAuthReceiver,cf as RapiDocMini,pf as default};
|