apiuikit 1.5.2 → 1.5.3

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.
@@ -1,13 +1,13 @@
1
- "use strict";var Eu=Object.defineProperty;var ju=(e,t,n)=>t in e?Eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>ju(e,typeof t!="symbol"?t+"":t,n);const o=require("react/jsx-runtime"),b=require("react"),Pr=require("react-dom"),so=["#14b8a6","#22c55e","#84cc16","#3b82f6","#06b6d4","#8b5cf6"],oo=(e,t)=>{const n=t.length>0?t:so,r=(e%n.length+n.length)%n.length;return n[r]},an={show:{sidebar:!0,info:!0,servers:!0,operations:!0,messages:!0,messageExamples:!1,schemas:!0},theme:{colors:{primary:{50:"#ddf4ff",100:"#b6e3ff",200:"#80ccff",300:"#54aeff",500:"#58a6ff",600:"#1f6feb",700:"#0d419d"}},light:{background:"#f8fafc",surface:"#ffffff",border:"#e2e8f0",textPrimary:"#1e293b",textSecondary:"#475569",textMuted:"#64748b"},dark:{background:"#0d1117",surface:"#161b22",border:"#30363d",textPrimary:"#c9d1d9",textSecondary:"#8b949e",textMuted:"#6e7681"},depthColors:so},expand:{schemas:!1},sidebar:{useChannelAddressAsIdentifier:!0},sidePanel:{containment:"viewport"}},io=e=>typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string",Au=e=>typeof e=="object"&&e!==null;function Nu(e){try{return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}catch{return}}function Oa(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let n=e;for(const r of t.slice(2).split("/")){if(!Au(n))return;const s=Nu(r);if(s===void 0||(n=n[s],n===void 0))return}return n}function Rn(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const r=Oa(e,n);return t.set(n,r),r}}const xs=e=>typeof e=="object"&&e!==null,Tu=e=>e.replace(/^#\//,"").split("/").pop()??e,ao=(e,t=new Set)=>typeof e!="object"||e===null||t.has(e)?!1:(t.add(e),io(e)?!0:(Array.isArray(e)?e:Object.values(e)).some(r=>ao(r,t))),Ia=(e,t=new Set,n=new Set)=>{if(typeof e!="object"||e===null)return!1;if(t.has(e))return!0;if(n.has(e))return!1;if(n.add(e),io(e))return!0;t.add(e);try{return(Array.isArray(e)?e:Object.values(e)).some(s=>Ia(s,t,n))}finally{t.delete(e)}},_u=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),$i=e=>e.length?`#/${e.map(_u).join("/")}`:"#";function Mn(e){if(!Ia(e))return e;const t=new Map,n=new Set,r=new Map,s=(i,a)=>{if(Array.isArray(i)){if(n.has(i))return{$ref:r.get(i)};const l=t.get(i);if(l!==void 0)return l;const c=[];r.set(i,$i(a)),t.set(i,c),n.add(i);try{i.forEach((u,d)=>c.push(s(u,[...a,String(d)])))}finally{n.delete(i)}return c}if(io(i)){const l=Oa(e,i.$ref),c=xs(l)||Array.isArray(l);if(c&&!n.has(l)){const u=s(l,a);return xs(u)&&u["x-parser-schema-id"]===void 0&&(u["x-parser-schema-id"]=Tu(i.$ref)),u}if(l!==void 0&&!c)return l}if(xs(i)){if(n.has(i))return{$ref:r.get(i)};const l=t.get(i);if(l!==void 0)return l;const c={};r.set(i,$i(a)),t.set(i,c),n.add(i);try{for(const[u,d]of Object.entries(i))c[u]=s(d,[...a,u])}finally{n.delete(i)}return c}return i};return s(e,[])}class lo extends b.Component{constructor(){super(...arguments);be(this,"state",{error:null});be(this,"reset",()=>{this.setState({error:null})})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var s,i;console.error("[apiuikit] Rendering error:",n,r.componentStack),(i=(s=this.props).onError)==null||i.call(s,n,r)}render(){const{error:n}=this.state;if(!n)return this.props.children;const{fallback:r}=this.props;return typeof r=="function"?r(n,this.reset):r!==void 0?r:o.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-3 rounded-lg border border-border bg-surface p-6 text-foreground",children:[o.jsx("p",{className:"font-semibold text-foreground",children:"Something went wrong rendering this API specification."}),o.jsx("p",{className:"text-sm text-foreground-secondary break-words",children:n.message}),o.jsx("button",{type:"button",onClick:this.reset,className:"rounded-md bg-primary-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-primary-600",children:"Try again"})]})}}const Dr=b.createContext(null),ln=()=>{const e=b.useContext(Dr);if(!e)throw new Error("useDocumentContext must be used within a document provider (AsyncAPIDocumentProvider or OpenAPIDocumentProvider)");return e},Ue=ln;var Er=(e=>(e.SEND="send",e.RECEIVE="receive",e))(Er||{});const Cu="Contact",$u="Email",Oi="License",Ii="External Documentation",Ou="Tags",Iu="Implicit",Ru=`The Implicit flow is a simplified OAuth flow previously recommended
1
+ "use strict";var Eu=Object.defineProperty;var ju=(e,t,n)=>t in e?Eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>ju(e,typeof t!="symbol"?t+"":t,n);const o=require("react/jsx-runtime"),b=require("react"),Pr=require("react-dom"),so=["#14b8a6","#22c55e","#84cc16","#3b82f6","#06b6d4","#8b5cf6"],oo=(e,t)=>{const n=t.length>0?t:so,r=(e%n.length+n.length)%n.length;return n[r]},an={show:{sidebar:!0,info:!0,servers:!0,operations:!0,messages:!0,messageExamples:!1,schemas:!0},theme:{colors:{primary:{50:"#ddf4ff",100:"#b6e3ff",200:"#80ccff",300:"#54aeff",500:"#58a6ff",600:"#1f6feb",700:"#0d419d"}},light:{background:"#f8fafc",surface:"#ffffff",border:"#e2e8f0",textPrimary:"#1e293b",textSecondary:"#475569",textMuted:"#64748b"},dark:{background:"#0d1117",surface:"#161b22",border:"#30363d",textPrimary:"#c9d1d9",textSecondary:"#8b949e",textMuted:"#6e7681"},depthColors:so},expand:{schemas:!1},sidebar:{useChannelAddressAsIdentifier:!0},sidePanel:{containment:"viewport"}},io=e=>typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string",Au=e=>typeof e=="object"&&e!==null;function Nu(e){try{return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}catch{return}}function Oa(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let n=e;for(const r of t.slice(2).split("/")){if(!Au(n))return;const s=Nu(r);if(s===void 0||(n=n[s],n===void 0))return}return n}function Mn(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const r=Oa(e,n);return t.set(n,r),r}}const xs=e=>typeof e=="object"&&e!==null,Tu=e=>e.replace(/^#\//,"").split("/").pop()??e,ao=(e,t=new Set)=>typeof e!="object"||e===null||t.has(e)?!1:(t.add(e),io(e)?!0:(Array.isArray(e)?e:Object.values(e)).some(r=>ao(r,t))),Ia=(e,t=new Set,n=new Set)=>{if(typeof e!="object"||e===null)return!1;if(t.has(e))return!0;if(n.has(e))return!1;if(n.add(e),io(e))return!0;t.add(e);try{return(Array.isArray(e)?e:Object.values(e)).some(s=>Ia(s,t,n))}finally{t.delete(e)}},_u=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),$i=e=>e.length?`#/${e.map(_u).join("/")}`:"#";function Ln(e){if(!Ia(e))return e;const t=new Map,n=new Set,r=new Map,s=(i,a)=>{if(Array.isArray(i)){if(n.has(i))return{$ref:r.get(i)};const l=t.get(i);if(l!==void 0)return l;const c=[];r.set(i,$i(a)),t.set(i,c),n.add(i);try{i.forEach((u,d)=>c.push(s(u,[...a,String(d)])))}finally{n.delete(i)}return c}if(io(i)){const l=Oa(e,i.$ref),c=xs(l)||Array.isArray(l);if(c&&!n.has(l)){const u=s(l,a);return xs(u)&&u["x-parser-schema-id"]===void 0&&(u["x-parser-schema-id"]=Tu(i.$ref)),u}if(l!==void 0&&!c)return l}if(xs(i)){if(n.has(i))return{$ref:r.get(i)};const l=t.get(i);if(l!==void 0)return l;const c={};r.set(i,$i(a)),t.set(i,c),n.add(i);try{for(const[u,d]of Object.entries(i))c[u]=s(d,[...a,u])}finally{n.delete(i)}return c}return i};return s(e,[])}class lo extends b.Component{constructor(){super(...arguments);be(this,"state",{error:null});be(this,"reset",()=>{this.setState({error:null})})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var s,i;console.error("[apiuikit] Rendering error:",n,r.componentStack),(i=(s=this.props).onError)==null||i.call(s,n,r)}render(){const{error:n}=this.state;if(!n)return this.props.children;const{fallback:r}=this.props;return typeof r=="function"?r(n,this.reset):r!==void 0?r:o.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-3 rounded-lg border border-border bg-surface p-6 text-foreground",children:[o.jsx("p",{className:"font-semibold text-foreground",children:"Something went wrong rendering this API specification."}),o.jsx("p",{className:"text-sm text-foreground-secondary break-words",children:n.message}),o.jsx("button",{type:"button",onClick:this.reset,className:"rounded-md bg-primary-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-primary-600",children:"Try again"})]})}}const Dr=b.createContext(null),ln=()=>{const e=b.useContext(Dr);if(!e)throw new Error("useDocumentContext must be used within a document provider (AsyncAPIDocumentProvider or OpenAPIDocumentProvider)");return e},Ue=ln;var Er=(e=>(e.SEND="send",e.RECEIVE="receive",e))(Er||{});const Cu="Contact",$u="Email",Oi="License",Ii="External Documentation",Ou="Tags",Iu="Implicit",Ru=`The Implicit flow is a simplified OAuth flow previously recommended
2
2
  for native apps and JavaScript apps where the access token is returned
3
- immediately without an extra authorization code exchange step.`,Mu="Client Credentials",Lu="The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.",Pu="Password",Du="The Password grant type is a legacy way to exchange a user's credentials for an access token.",Bu="Authorization Code",Fu="The Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.",Ra="Connecting to a server",zu="",Ri=["text-blue-600","text-indigo-600","text-purple-600","text-pink-600","text-green-700"],Uu=[50,100,200,300,500,600,700],Hu={kafka:{label:"Kafka",color:"bg-primary-100 text-primary-700 border-primary-200"},mqtt:{label:"MQTT",color:"bg-purple-100 text-purple-700 border-purple-200"},http:{label:"HTTP",color:"bg-blue-100 text-blue-700 border-blue-200"},https:{label:"HTTPS",color:"bg-blue-100 text-blue-700 border-blue-200"},ws:{label:"WebSocket",color:"bg-green-100 text-green-700 border-green-200"},wss:{label:"WebSocket Secure",color:"bg-green-100 text-green-700 border-green-200"},amqp:{label:"AMQP",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},amqps:{label:"AMQPS",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},ibmmq:{label:"IBM MQ",color:"bg-indigo-100 text-indigo-700 border-indigo-200"},solace:{label:"Solace",color:"bg-pink-100 text-pink-700 border-pink-200"},nats:{label:"NATS",color:"bg-teal-100 text-teal-700 border-teal-200"}},Wu=[{location:"path",label:"Path Parameters"},{location:"query",label:"Query Parameters"},{location:"header",label:"Header Parameters"},{location:"cookie",label:"Cookie Parameters"}],Gu={get:"bg-blue-100 text-blue-800",post:"bg-green-100 text-green-800",put:"bg-yellow-100 text-yellow-800",patch:"bg-orange-100 text-orange-800",delete:"bg-red-100 text-red-800",options:"bg-neutral-100 text-foreground-secondary",head:"bg-neutral-100 text-foreground-secondary",trace:"bg-neutral-100 text-foreground-secondary",[Er.SEND]:"bg-green-100 text-green-800",[Er.RECEIVE]:"bg-blue-100 text-blue-800"};function Ma(e){const t=e.replace("#","").padEnd(6,"0"),n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return`${n} ${r} ${s}`}function bs(e,t,n){if(e)for(const r of Uu){const s=e[r];s&&(n[`--color-${t}-${r}`]=Ma(s))}}const Ku=[["background","--color-background"],["surface","--color-surface"],["border","--color-border"],["textPrimary","--color-text-primary"],["textSecondary","--color-text-secondary"],["textMuted","--color-text-muted"]],Vu={50:"15 23 42",100:"30 41 59",200:"51 65 85",300:"71 85 105",500:"148 163 184",600:"203 213 225",700:"226 232 240",800:"241 245 249",900:"248 250 252"};function Ju(e){const t={},n=e.light?"light":e.dark?"dark":null,r=n==="dark"?e.dark:n==="light"?e.light:void 0;if(n==="dark")for(const[s,i]of Object.entries(Vu))t[`--color-neutral-${s}`]=i;if(r)for(const[s,i]of Ku){const a=r[s];a&&(t[i]=Ma(a))}return e.colors&&(bs(e.colors.primary,"primary",t),bs(e.colors.secondary,"secondary",t),bs(e.colors.neutral,"neutral",t)),t}function La(e,t,n=an){var D,_,A,v,y,F,Z,N;const[r,s]=b.useState(null),[i,a]=b.useState(null),l=b.useMemo(()=>Rn(t),[t]),c=((D=n.expand)==null?void 0:D.schemas)===!0,u=(A=(_=n.theme)==null?void 0:_.depthColors)!=null&&A.length?n.theme.depthColors:so,d=((v=n.show)==null?void 0:v.extensions)!==!1,f=((y=n.show)==null?void 0:y.codeSamples)!==!1,p=n.topOffset,m=typeof p=="number"&&Number.isFinite(p)?Math.max(0,p):0,h=((F=n.sidePanel)==null?void 0:F.containment)??"viewport",x=(Z=n.sidePanel)==null?void 0:Z.topOffset,k=typeof x=="number"&&Number.isFinite(x)?Math.max(0,x):m,j=(N=n.markdown)==null?void 0:N.url,C=b.useMemo(()=>{if(typeof j=="function")return j;if(typeof j=="string")return()=>j},[j]),E=b.useMemo(()=>({specType:e,document:t,deref:l,portalHost:r,rootElement:i,topOffset:m,sidePanelContainment:h,sidePanelTopOffset:k,defaultSchemaExpanded:c,depthColors:u,showExtensions:d,showCodeSamples:f,markdownUrl:C}),[e,t,l,r,i,m,h,k,c,u,d,f,C]),R=n.theme?Ju(n.theme):{};return{contextValue:E,themeVars:R,setPortalHost:s,setRootElement:a}}function co({document:e,config:t=an,className:n="",children:r}){const{contextValue:s,themeVars:i,setPortalHost:a,setRootElement:l}=La("asyncapi",e,t);return o.jsx(Dr.Provider,{value:s,children:o.jsxs("div",{ref:l,style:i,className:`apiuikit-root relative @container bg-background text-foreground ${n}`,children:[o.jsx("div",{ref:a,className:"asyncapi-portal-root"}),r]})})}const Pa="@lg:mx-auto @lg:max-w-[calc(70ch+28rem)]";function Ot({title:e,content:t,sideContent:n,stickySideContent:r=!1,info:s=!1,reverseLayoutOnMobile:i=!1,mobileLeadContent:a,layout:l="columns"}){const c=l==="stacked",u=n!=null&&n!==!1,d=`${s?"text-4xl inline-block text-3xl font-extrabold text-foreground tracking-tight":"text-2xl"} mb-4 @lg:mb-0 font-bold`;return o.jsxs("div",{className:`w-full mt-6 ${c?"":Pa}`,children:[a&&o.jsx("div",{className:"@lg:hidden mb-3",children:a}),e&&o.jsx("div",{className:c?"w-full":"@lg:w-prose",children:o.jsx("h1",{className:d,children:e})}),o.jsxs("section",{className:`border-border text-lg flex gap-6 @lg:gap-0 ${c?"flex-col":u&&i?"flex-col-reverse @lg:flex-row":"flex-col @lg:flex-row"}`,children:[o.jsx("div",{className:`${c?"w-full":"@lg:w-prose"} min-w-0`,children:t}),c?u&&o.jsx("div",{className:r?"@lg:sticky @lg:top-4":void 0,children:n}):o.jsx("div",{className:"@lg:pl-12 @lg:w-[400px] shrink-0","data-testid":"section-side-column",children:o.jsx("div",{className:`${r&&"@lg:sticky @lg:top-4"}`,children:n})})]})]})}function en(...e){return e.filter(Boolean).join(" ")}function cn({tabs:e,current:t,onChange:n=()=>{},ariaLabel:r="Tabs",selectLabel:s="Select a tab",placeholder:i}){var m;const a=b.useId(),l=b.useRef([]),c=t??(i?"":((m=e[0])==null?void 0:m.id)??""),u=e.some(h=>!!h.icon),d=t?e.findIndex(h=>h.id===t):-1,f=d>=0?d:0,p=(h,x)=>{var C;if(e.length===0)return;const k=E=>(E+e.length)%e.length;let j=x;if(h.key==="ArrowRight"&&(h.preventDefault(),j=k(x+1)),h.key==="ArrowLeft"&&(h.preventDefault(),j=k(x-1)),h.key==="Home"&&(h.preventDefault(),j=0),h.key==="End"&&(h.preventDefault(),j=e.length-1),j!==x){const E=e[j];n(E.id),(C=l.current[j])==null||C.focus()}};return e.length?o.jsxs("div",{children:[o.jsxs("div",{className:"@sm:hidden",children:[o.jsx("label",{htmlFor:a,className:"sr-only",children:s}),o.jsxs("select",{id:a,name:"tabs",value:c,onChange:h=>n(h.target.value),className:en("block w-full rounded-md border-neutral-300 bg-neutral-200 focus:border-secondary-500 focus:ring-secondary-500",u?"mt-0":"mt-4"),children:[i&&o.jsx("option",{value:"",children:i}),e.map(h=>o.jsx("option",{value:h.id,children:h.name},h.id))]})]}),o.jsx("div",{className:en("hidden @sm:block",u?"":"mt-6"),children:u?o.jsx("div",{className:"border-b border-border",role:"tablist","aria-label":r,children:o.jsx("div",{className:"flex flex-wrap gap-6",children:e.map((h,x)=>{const k=h.id===t,j=h.icon;return o.jsx("button",{ref:C=>{l.current[x]=C},id:`tab-${h.id}`,type:"button",role:"tab",tabIndex:x===f?0:-1,"aria-selected":k,"aria-controls":`panel-${h.id}`,onClick:()=>n(h.id),onKeyDown:C=>p(C,x),className:en("cursor-pointer border-b-2 px-1 py-3 text-sm font-semibold transition-colors",k?"border-primary-500 text-primary-600":"border-transparent text-foreground-muted hover:text-foreground"),children:o.jsxs("span",{className:"inline-flex items-center gap-2",children:[j?o.jsx(j,{className:"h-4 w-4 shrink-0"}):null,o.jsx("span",{children:h.name})]})},h.id)})})}):o.jsx("nav",{className:"relative z-0 flex divide-x divide-border rounded-lg shadow",role:"tablist","aria-label":r,children:e.map((h,x)=>{const k=h.id===t;return o.jsxs("button",{ref:j=>{l.current[x]=j},id:`tab-${h.id}`,type:"button",role:"tab",tabIndex:x===f?0:-1,"aria-selected":k,"aria-controls":`panel-${h.id}`,onClick:()=>n(h.id),onKeyDown:j=>p(j,x),className:en(k?"text-foreground":"text-foreground-muted hover:text-foreground-secondary",x===0?"rounded-l-lg":"",x===e.length-1?"rounded-r-lg":"","group relative min-w-0 flex-1 cursor-pointer overflow-hidden bg-surface px-4 py-4 text-center text-sm font-medium hover:bg-neutral-50 focus:z-10"),children:[o.jsx("span",{children:h.name}),o.jsx("span",{"aria-hidden":"true",className:en(k?"bg-primary-500":"bg-transparent","absolute inset-x-0 bottom-0 h-0.5")})]},h.id)})})})]}):null}function Da(e){const t=getComputedStyle(e).overflowY;return(t==="auto"||t==="scroll")&&e.scrollHeight>e.clientHeight}function uo(e){let t=e;for(;t&&t!==document.body;){if(Da(t))return t;t=t.parentElement}return document.documentElement}function Yu(e,t){if(!e||!t||!t.contains(e))return null;let n=e;for(;n;){if(Da(n))return n;if(n===t)break;n=n.parentElement}return null}function Ba(e){const t=e.style.overflow,n=e.style.paddingRight,r=e.offsetWidth-e.clientWidth;if(e.style.overflow="hidden",r>0){const s=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${s+r}px`}return()=>{e.style.overflow=t,e.style.paddingRight=n}}function Fa({tabs:e,current:t,onChange:n}){const{rootElement:r,topOffset:s=0}=ln();if(!e.length)return null;const i=typeof document<"u"&&uo(r)===document.documentElement?s:0,a=o.jsx("div",{className:"w-full mt-10 @lg:mt-0",children:o.jsx(cn,{tabs:e,current:t,onChange:n,ariaLabel:"AsyncAPI sections",selectLabel:"Select an AsyncAPI section"})});return o.jsx("div",{className:"sticky z-10 flex w-full justify-center bg-background",style:{top:i},children:o.jsx(Ot,{content:a,stickySideContent:!1})})}function Xu(e,t){const[n,r]=b.useState("docked"),s=b.useRef(t);return s.current=t,b.useEffect(()=>{if(!e)return;let i=null,a=null;const l=()=>{a=null;const u=e.getBoundingClientRect().top,d=i===null?0:u-i;i=u,u>=0?r("docked"):s.current||d>0?r("pinned"):d<0?r("hidden"):r(f=>f==="docked"?"hidden":f)},c=()=>{a===null&&(a=requestAnimationFrame(l))};return l(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{a!==null&&cancelAnimationFrame(a),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e]),b.useEffect(()=>{t&&r(i=>i==="hidden"?"pinned":i)},[t]),n}function fo(e,t){const[n,r]=b.useState(null);return b.useLayoutEffect(()=>{if(!e||!t){r(null);return}let s=null;const i=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,r(e.getBoundingClientRect())}))};r(e.getBoundingClientRect());const a=new ResizeObserver(i);return a.observe(e),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),()=>{s!==null&&cancelAnimationFrame(s),a.disconnect(),window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i)}},[e,t]),n}const ar=16;function za({logo:e,children:t,forceVisible:n=!1}){const{rootElement:r,topOffset:s=0}=ln(),i=Xu(r,n),a=i!=="docked",l=fo(r,a),c=typeof window>"u"?0:window.innerWidth,u=l?Math.max(l.left,0):0,d=l?Math.min(l.right,c):c,f={left:a?u+ar:ar,right:a?Math.max(c-d,0)+ar:ar,transform:`translateY(${i==="hidden"?"-150%":"0px"})`,...a?{position:"fixed",top:s+10,pointerEvents:i==="hidden"?"none":void 0}:{}};return o.jsx("header",{className:"document-topbar",style:f,"aria-label":"Document toolbar",children:o.jsxs("div",{className:`document-topbar-inner w-full ${Pa}`,children:[o.jsx("div",{className:"document-logo",children:e}),o.jsx("div",{className:"document-topbar-controls",children:t})]})})}function Zu(e){if(e.length===0)return o.jsx("span",{children:"No allowed values."});if(e.length===1)return o.jsxs("span",{children:["Allowed value is ",o.jsx("code",{children:e[0]})]});const t=e.slice(0,-1).map((r,s)=>o.jsxs(b.Fragment,{children:[o.jsx("code",{children:r}),", "," "]},s)),n=o.jsx("code",{children:e[e.length-1]},"last");return o.jsxs("span",{children:["Allowed values are ",t," and ",n]})}function Qu(e){return e.map(t=>`\`${t}\``).join(", ")}function qu(e){const t=[],n=/\{([^}]+)\}/g;let r=0,s;for(;(s=n.exec(e))!==null;)s.index>r&&t.push({type:"text",value:e.slice(r,s.index)}),t.push({type:"param",value:s[1]}),r=s.index+s[0].length;return r<e.length&&t.push({type:"text",value:e.slice(r)}),t}function Ct({address:e,parameters:t,className:n="text-xs",truncate:r=!1,padded:s=!0}){const{portalHost:i}=Ue(),[a,l]=b.useState(null),[c,u]=b.useState({top:0,left:0,placement:"top"}),[d,f]=b.useState(!1),p=b.useRef(null),m=qu(e);let h=0;const x=40;b.useEffect(()=>{if(!r)return;const R=p.current;if(!R)return;const D=()=>f(R.scrollWidth>R.clientWidth);D();const _=new ResizeObserver(D);return _.observe(R),()=>_.disconnect()},[r,e]);const k=(R,D)=>{const _=D.getBoundingClientRect(),A=_.top<x?"bottom":"top";u({top:A==="top"?_.top-8:_.bottom+8,left:_.left+_.width/2,placement:A}),l(R)},j=()=>l(null),C=m.map((R,D)=>{if(R.type==="text")return o.jsx("span",{children:R.value},D);const _=t==null?void 0:t[R.value],A=Ri[h++%Ri.length],v=a===D,y=!!_&&(_.description||_.type||_.default||_.enum&&_.enum.length>0||_.examples&&_.examples.length>0),F=`channel-address-tooltip-${D}`,Z=y&&v?F:void 0;return o.jsxs("span",{className:"inline-block",onMouseEnter:N=>y&&k(D,N.currentTarget),onMouseLeave:j,children:[o.jsx("span",{className:`font-semibold ${A} ${y?"cursor-help underline decoration-dotted":""}`,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-expanded":y?v:void 0,"aria-describedby":Z,onFocus:N=>y&&k(D,N.currentTarget),onBlur:j,onKeyDown:N=>{y&&((N.key==="Enter"||N.key===" ")&&(N.preventDefault(),k(D,N.currentTarget)),N.key==="Escape"&&(N.preventDefault(),j(),N.currentTarget.blur()))},children:`{${R.value}}`}),y&&v&&i&&Pr.createPortal(o.jsxs("div",{id:F,className:`fixed -translate-x-1/2 max-w-xs px-2.5 py-1.5 bg-neutral-50 text-foreground-muted text-xs rounded pointer-events-none z-[60] shadow-lg text-left leading-snug ${c.placement==="top"?"-translate-y-full":""}`,style:{top:c.top,left:c.left},children:[_.description&&o.jsx("div",{children:_.description}),_.type&&o.jsx("div",{className:"mt-1",children:o.jsx("code",{children:_.type})}),_.default&&o.jsxs("div",{className:"mt-1",children:[o.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Default:"})," ",o.jsx("code",{children:_.default})]}),_.enum&&_.enum.length>0&&o.jsx("div",{className:"mt-1",children:Zu(_.enum)}),_.examples&&_.examples.length>0&&o.jsxs("div",{className:"mt-1",children:[o.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Examples:"})," ",_.examples.join(", ")]})]}),i)]},D)}),E=s?"px-2 py-1 ":"";return r?o.jsxs("code",{className:`${E}rounded text-foreground-secondary flex items-center min-w-0 ${n}`,children:[o.jsx("span",{ref:p,className:"overflow-hidden whitespace-nowrap min-w-0",children:C}),d&&o.jsx("span",{"aria-hidden":!0,className:"shrink-0",children:"..."})]}):o.jsx("code",{className:`${E}rounded text-foreground-secondary break-all ${n}`,children:C})}const ed={sm:"px-2.5 py-1 rounded-md text-xs",xs:"px-1.5 py-0.5 rounded text-[10px]"};function $t({method:e,size:t="sm",className:n=""}){return e?o.jsx("span",{className:`inline-flex items-center justify-center font-medium uppercase ${ed[t]} ${Gu[e]} ${n}`,children:e}):null}const Mi=6,td=12,nd=8,rd=.7;function sd(e,t){if(e===0)return 1/0;const n=e*rd-nd*2,r=t*Mi+Math.max(0,t-1)*td;return Math.max(1,Math.floor((n-r)/Mi))}function od(e,t){const n=e.reduce((s,i)=>s+i,0);if(n<=t)return e;if(t<=e.length)return e.map(()=>1);const r=t-e.length;return e.map(s=>Math.min(s,1+Math.floor(s/n*r)))}const Li=20;function id({sections:e,activeSection:t,onTabChange:n,onItemSelect:r,selectedItem:s}){const[i,a]=b.useState(!1),[l,c]=b.useState(!1),u=i||l,{rootElement:d,portalHost:f,topOffset:p=0}=Ue(),m=b.useRef(null),h=b.useRef(null),x=b.useMemo(()=>e.filter(P=>P.items.length>0),[e]),k=b.useMemo(()=>x.filter(P=>P.isTab===!1||P.id===t),[x,t]),j=b.useMemo(()=>x.filter(P=>P.showInPopover!==!1),[x]),[C,E]=b.useState(null),R=b.useRef(null),D=b.useRef(null),_=b.useCallback((P,Y)=>{E({section:P,key:Y}),R.current={section:P,key:Y},D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{R.current=null},600)},[]);b.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]),b.useEffect(()=>{const Y=e.filter(G=>G.items.length>0).flatMap(G=>G.items.map(pe=>({section:G.id,key:G.itemKey(pe),id:G.targetId(pe)}))).map(G=>({...G,el:document.getElementById(G.id)})).filter(G=>!!G.el);if(Y.length===0)return;const O=new Map(Y.map(G=>[G.el,G])),q=new Map,le=new IntersectionObserver(G=>{for(const xe of G)xe.isIntersecting?q.set(xe.target,xe.boundingClientRect.top):q.delete(xe.target);if(q.size===0)return;let pe=null,we=-1/0;for(const[xe,He]of q)He>we&&(pe=xe,we=He);const fe=pe&&O.get(pe);if(!fe)return;const Me=R.current;if(Me){if(fe.section!==Me.section||fe.key!==Me.key)return;R.current=null}E({section:fe.section,key:fe.key})},{rootMargin:"-10% 0px -75% 0px",threshold:0});return Y.forEach(G=>le.observe(G.el)),()=>le.disconnect()},[e]);const A=(C==null?void 0:C.section)??t,v=C??s,y=fo(d,!0),F=typeof window>"u"?0:window.innerWidth,Z=typeof window>"u"?0:window.innerHeight,N=!!y&&y.bottom>p&&y.top<Z,W=Math.max(0,Z-p),ie=p+W/2,oe=!!y&&y.width<1024,S={opacity:N?1:0,pointerEvents:N?"auto":"none",transition:"opacity 0.2s ease"},T={position:"fixed",top:ie,left:((y==null?void 0:y.left)??0)+Li,transform:"translateY(-50%)",zIndex:51,...S},H=Math.min((y==null?void 0:y.right)??0,F)-60,V={position:"fixed",bottom:16,left:H,zIndex:51,...S},ae=oe?{position:"fixed",bottom:68,right:F-(H+44),zIndex:52}:{position:"fixed",top:ie,left:((y==null?void 0:y.left)??0)+Li,transform:"translateY(-50%)",maxHeight:`calc(100vh - ${p+32}px)`,zIndex:52};b.useEffect(()=>{if(!i)return;const P=O=>{O.key==="Escape"&&a(!1)},Y=O=>{var le,G;const q=O.target;(le=m.current)!=null&&le.contains(q)||(G=h.current)!=null&&G.contains(q)||a(!1)};return document.addEventListener("keydown",P),document.addEventListener("mousedown",Y),()=>{document.removeEventListener("keydown",P),document.removeEventListener("mousedown",Y)}},[i]);const ee=b.useCallback((P,Y)=>{P.isTab!==!1&&n(P.id),Y&&setTimeout(()=>{var O;(O=document.getElementById(Y))==null||O.scrollIntoView({behavior:"smooth",block:"start"})},50)},[n]),Te=b.useMemo(()=>j.map(P=>{const Y=A===P.id,O=(v==null?void 0:v.section)===P.id,q=P.icon;return o.jsxs("div",{className:"pb-1",children:[o.jsxs("button",{onClick:()=>{ee(P),_(P.id,""),oe&&a(!1)},className:`group flex w-full items-center gap-2 rounded-md px-2 py-2 text-left transition-colors ${Y?"bg-primary-50":"hover:bg-neutral-50"}`,children:[o.jsx(q,{className:`h-3.5 w-3.5 shrink-0 transition-colors ${Y?"text-primary-500":"text-foreground-muted group-hover:text-foreground-secondary"}`}),o.jsx("span",{className:`text-xs font-semibold uppercase tracking-wider transition-colors ${Y?"text-primary-600":"text-foreground-muted group-hover:text-foreground-secondary"}`,children:P.label}),o.jsx("span",{className:`ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 font-mono text-[10px] transition-colors ${Y?"border border-primary-200 bg-primary-100 text-primary-500":"bg-neutral-100 text-foreground-muted"}`,children:P.items.length})]}),P.items.length>0&&o.jsx("ul",{className:"ml-4 mt-0.5 border-l border-border pl-3",children:P.items.map(le=>{const G=P.itemKey(le),pe=O&&(v==null?void 0:v.key)===G;return o.jsx("li",{children:o.jsx("button",{onClick:()=>{ee(P,P.targetId(le)),r(P.id,G),_(P.id,G),oe&&a(!1)},className:`flex w-full items-center gap-2 rounded-md px-2 py-0.5 text-left text-xs transition-colors ${pe?"bg-primary-50 font-medium text-primary-500":Y?"text-foreground-secondary hover:bg-primary-50 hover:text-foreground":"text-foreground-muted hover:bg-neutral-50 hover:text-foreground-secondary"}`,children:P.renderItem(le,{isSelected:pe,isSectionActive:Y})})},G)})})]},P.id)}),[j,A,v,oe,ee,r,_]),Q=sd(W,k.length),ve=b.useMemo(()=>{const P=od(k.map(Y=>Y.items.length),Q);return k.map((Y,O)=>{const q=A===Y.id,le=Y.items.length,G=P[O];let pe=-1;if((v==null?void 0:v.section)===Y.id){const we=Y.items.findIndex(fe=>Y.itemKey(fe)===v.key);we>=0&&(pe=Math.min(G-1,Math.floor(we*G/le)))}return o.jsxs("div",{className:"flex flex-col items-start gap-1",children:[o.jsx("span",{className:`block h-[2px] rounded-full transition-all duration-150 ${q?"w-6 bg-foreground-secondary":"w-4 bg-neutral-300 group-hover:bg-neutral-400"}`}),o.jsx("div",{className:"flex flex-col items-start gap-1",children:Array.from({length:G},(we,fe)=>o.jsx("span",{className:`block h-[2px] w-3 rounded-full transition-colors duration-150 ${fe===pe?"bg-neutral-500":"bg-neutral-200 group-hover:bg-neutral-300"}`},fe))})]},Y.id)})},[k,A,v,Q]);return o.jsxs(o.Fragment,{children:[!oe&&o.jsx("button",{ref:m,onClick:()=>a(P=>!P),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),title:u?"Close navigation":"Open navigation","aria-label":u?"Close navigation":"Open navigation",className:"group flex flex-col items-start gap-3 p-2",style:T,children:ve}),oe&&o.jsx("button",{ref:m,onClick:()=>a(P=>!P),title:i?"Close navigation":"Open navigation","aria-label":i?"Close navigation":"Open navigation",className:"flex h-11 w-11 items-center justify-center rounded-full border border-border bg-background shadow-lg",style:V,children:o.jsxs("span",{className:"flex flex-col items-start gap-1",children:[o.jsx("span",{className:"block h-[2px] w-4 rounded-full bg-foreground-secondary"}),o.jsx("span",{className:"block h-[2px] w-3 rounded-full bg-neutral-400"}),o.jsx("span",{className:"block h-[2px] w-3 rounded-full bg-neutral-300"})]})}),f&&Pr.createPortal(o.jsx("div",{ref:h,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),className:`max-h-[70vh] w-96 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-xl border border-border bg-background p-2 shadow-xl transition-all duration-150 ${oe?"origin-bottom-right":""} ${u?"opacity-100 scale-100 pointer-events-auto":"opacity-0 scale-95 pointer-events-none"}`,style:ae,children:Te}),f)]})}function Ua({sections:e,activeTab:t,onTabChange:n,onItemSelect:r,onSelectServer:s,selectedItem:i}){return o.jsx(id,{sections:e,activeSection:t,onTabChange:a=>n(a),onItemSelect:(a,l)=>{a!=="info"&&(a==="servers"?s==null||s(l):r==null||r(a,l))},selectedItem:i?{section:i.tab,key:i.key}:null})}function po({className:e,children:t,...n}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:t})}function ad(e){return o.jsxs(po,{stroke:"url(#icon-book-open-gradient)",...e,children:[o.jsxs("linearGradient",{id:"icon-book-open-gradient",x2:"1",y2:"1",children:[o.jsx("stop",{offset:"0%",className:"primary-gradient-color-stop"}),o.jsx("stop",{offset:"100%",className:"secondary-gradient-color-stop"})]}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})]})}function ho({className:e}){return o.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[o.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M14 20C17.3137 20 20 17.3137 20 14C20 10.6863 17.3137 8 14 8C10.6863 8 8 10.6863 8 14C8 17.3137 10.6863 20 14 20ZM18 14C18 16.2091 16.2091 18 14 18C11.7909 18 10 16.2091 10 14C10 11.7909 11.7909 10 14 10C16.2091 10 18 11.7909 18 14Z"}),o.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M0 12.9996V14.9996C0 16.5478 1.17261 17.822 2.67809 17.9826C2.80588 18.3459 2.95062 18.7011 3.11133 19.0473C2.12484 20.226 2.18536 21.984 3.29291 23.0916L4.70712 24.5058C5.78946 25.5881 7.49305 25.6706 8.67003 24.7531C9.1044 24.9688 9.55383 25.159 10.0163 25.3218C10.1769 26.8273 11.4511 28 12.9993 28H14.9993C16.5471 28 17.8211 26.8279 17.9821 25.3228C18.4024 25.175 18.8119 25.0046 19.2091 24.8129C20.3823 25.6664 22.0344 25.564 23.0926 24.5058L24.5068 23.0916C25.565 22.0334 25.6674 20.3813 24.814 19.2081C25.0054 18.8113 25.1757 18.4023 25.3234 17.9824C26.8282 17.8211 28 16.5472 28 14.9996V12.9996C28 11.452 26.8282 10.1782 25.3234 10.0169C25.1605 9.55375 24.9701 9.10374 24.7541 8.66883C25.6708 7.49189 25.5882 5.78888 24.5061 4.70681L23.0919 3.29259C21.9846 2.18531 20.2271 2.12455 19.0485 3.1103C18.7017 2.94935 18.3459 2.80441 17.982 2.67647C17.8207 1.17177 16.5468 0 14.9993 0H12.9993C11.4514 0 10.1773 1.17231 10.0164 2.6775C9.60779 2.8213 9.20936 2.98653 8.82251 3.17181C7.64444 2.12251 5.83764 2.16276 4.70782 3.29259L3.2936 4.7068C2.16377 5.83664 2.12352 7.64345 3.17285 8.82152C2.98737 9.20877 2.82199 9.60763 2.67809 10.0167C1.17261 10.1773 0 11.4515 0 12.9996ZM15.9993 3C15.9993 2.44772 15.5516 2 14.9993 2H12.9993C12.447 2 11.9993 2.44772 11.9993 3V3.38269C11.9993 3.85823 11.6626 4.26276 11.2059 4.39542C10.4966 4.60148 9.81974 4.88401 9.18495 5.23348C8.76836 5.46282 8.24425 5.41481 7.90799 5.07855L7.53624 4.70681C7.14572 4.31628 6.51256 4.31628 6.12203 4.7068L4.70782 6.12102C4.31729 6.51154 4.31729 7.14471 4.70782 7.53523L5.07958 7.90699C5.41584 8.24325 5.46385 8.76736 5.23451 9.18395C4.88485 9.8191 4.6022 10.4963 4.39611 11.2061C4.2635 11.6629 3.85894 11.9996 3.38334 11.9996H3C2.44772 11.9996 2 12.4474 2 12.9996V14.9996C2 15.5519 2.44772 15.9996 3 15.9996H3.38334C3.85894 15.9996 4.26349 16.3364 4.39611 16.7931C4.58954 17.4594 4.85042 18.0969 5.17085 18.6979C5.39202 19.1127 5.34095 19.6293 5.00855 19.9617L4.70712 20.2632C4.3166 20.6537 4.3166 21.2868 4.70712 21.6774L6.12134 23.0916C6.51186 23.4821 7.14503 23.4821 7.53555 23.0916L7.77887 22.8483C8.11899 22.5081 8.65055 22.4633 9.06879 22.7008C9.73695 23.0804 10.4531 23.3852 11.2059 23.6039C11.6626 23.7365 11.9993 24.1411 11.9993 24.6166V25C11.9993 25.5523 12.447 26 12.9993 26H14.9993C15.5516 26 15.9993 25.5523 15.9993 25V24.6174C15.9993 24.1418 16.3361 23.7372 16.7929 23.6046C17.5032 23.3985 18.1809 23.1157 18.8164 22.7658C19.233 22.5365 19.7571 22.5845 20.0934 22.9208L20.2642 23.0916C20.6547 23.4821 21.2879 23.4821 21.6784 23.0916L23.0926 21.6774C23.4831 21.2868 23.4831 20.6537 23.0926 20.2632L22.9218 20.0924C22.5855 19.7561 22.5375 19.232 22.7669 18.8154C23.1166 18.1802 23.3992 17.503 23.6053 16.7931C23.7379 16.3364 24.1425 15.9996 24.6181 15.9996H25C25.5523 15.9996 26 15.5519 26 14.9996V12.9996C26 12.4474 25.5523 11.9996 25 11.9996H24.6181C24.1425 11.9996 23.7379 11.6629 23.6053 11.2061C23.3866 10.4529 23.0817 9.73627 22.7019 9.06773C22.4643 8.64949 22.5092 8.11793 22.8493 7.77781L23.0919 7.53523C23.4824 7.14471 23.4824 6.51154 23.0919 6.12102L21.6777 4.7068C21.2872 4.31628 20.654 4.31628 20.2635 4.7068L19.9628 5.00748C19.6304 5.33988 19.1137 5.39096 18.6989 5.16979C18.0976 4.84915 17.4596 4.58815 16.7929 4.39467C16.3361 4.2621 15.9993 3.85752 15.9993 3.38187V3Z"})]})}function Ha(e){return{id:"info",label:"Info",icon:ad,isTab:!1,showInPopover:!1,items:e?["info"]:[],itemKey:()=>"info",targetId:()=>"info-panel",renderItem:()=>o.jsx("span",{className:"truncate",children:"Overview"})}}function Wa(e){return{id:"schemas",label:"Schemas",icon:ho,items:Object.keys(e),itemKey:t=>t,targetId:t=>`schema-${t}`,renderItem:t=>o.jsx("span",{className:"truncate",children:t})}}function Ga({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.948 1.5H18.052C18.9505 1.49997 19.6997 1.49995 20.2945 1.57991C20.9223 1.66432 21.4891 1.84999 21.9445 2.30546C22.4 2.76093 22.5857 3.32773 22.6701 3.95552C22.7501 4.5503 22.75 5.29953 22.75 6.19801V6.302C22.75 7.20048 22.7501 7.9497 22.6701 8.54448C22.5857 9.17228 22.4 9.73907 21.9445 10.1945C21.4891 10.65 20.9223 10.8357 20.2945 10.9201C19.6997 11.0001 18.9505 11 18.052 11H5.94801C5.04953 11 4.3003 11.0001 3.70552 10.9201C3.07773 10.8357 2.51093 10.65 2.05546 10.1945C1.59999 9.73907 1.41432 9.17228 1.32991 8.54448C1.24995 7.9497 1.24997 7.20048 1.25 6.302V6.198C1.24997 5.29952 1.24995 4.5503 1.32991 3.95552C1.41432 3.32773 1.59999 2.76093 2.05546 2.30546C2.51093 1.84999 3.07773 1.66432 3.70552 1.57991C4.3003 1.49995 5.04952 1.49997 5.948 1.5ZM3.90539 3.06654C3.44393 3.12858 3.24644 3.2358 3.11612 3.36612C2.9858 3.49643 2.87858 3.69393 2.81654 4.15539C2.7516 4.63843 2.75 5.28599 2.75 6.25C2.75 7.21401 2.7516 7.86157 2.81654 8.34461C2.87858 8.80607 2.9858 9.00357 3.11612 9.13388C3.24644 9.2642 3.44393 9.37142 3.90539 9.43347C4.38843 9.49841 5.03599 9.5 6 9.5H18C18.964 9.5 19.6116 9.49841 20.0946 9.43347C20.5561 9.37142 20.7536 9.2642 20.8839 9.13388C21.0142 9.00357 21.1214 8.80607 21.1835 8.34461C21.2484 7.86157 21.25 7.21401 21.25 6.25C21.25 5.28599 21.2484 4.63843 21.1835 4.15539C21.1214 3.69393 21.0142 3.49643 20.8839 3.36612C20.7536 3.2358 20.5561 3.12858 20.0946 3.06654C19.6116 3.00159 18.964 3 18 3H6C5.03599 3 4.38843 3.00159 3.90539 3.06654ZM5.25 6.25C5.25 5.83579 5.58579 5.5 6 5.5H8C8.41422 5.5 8.75 5.83579 8.75 6.25C8.75 6.66422 8.41422 7 8 7H6C5.58579 7 5.25 6.66422 5.25 6.25ZM10.25 6.25C10.25 5.83579 10.5858 5.5 11 5.5H18C18.4142 5.5 18.75 5.83579 18.75 6.25C18.75 6.66422 18.4142 7 18 7H11C10.5858 7 10.25 6.66422 10.25 6.25ZM5.94801 12.5H18.052C18.9505 12.5 19.6997 12.4999 20.2945 12.5799C20.9223 12.6643 21.4891 12.85 21.9445 13.3055C22.4 13.7609 22.5857 14.3277 22.6701 14.9555C22.7501 15.5503 22.75 16.2995 22.75 17.198V17.302C22.75 18.2005 22.7501 18.9497 22.6701 19.5445C22.5857 20.1723 22.4 20.7391 21.9445 21.1945C21.4891 21.65 20.9223 21.8357 20.2945 21.9201C19.6997 22.0001 18.9505 22 18.052 22H5.94801C5.04953 22 4.30031 22.0001 3.70552 21.9201C3.07773 21.8357 2.51093 21.65 2.05546 21.1945C1.59999 20.7391 1.41432 20.1723 1.32991 19.5445C1.24995 18.9497 1.24997 18.2005 1.25 17.302V17.198C1.24997 16.2995 1.24995 15.5503 1.32991 14.9555C1.41432 14.3277 1.59999 13.7609 2.05546 13.3055C2.51093 12.85 3.07773 12.6643 3.70552 12.5799C4.30031 12.4999 5.04953 12.5 5.94801 12.5ZM3.90539 14.0665C3.44393 14.1286 3.24644 14.2358 3.11612 14.3661C2.9858 14.4964 2.87858 14.6939 2.81654 15.1554C2.7516 15.6384 2.75 16.286 2.75 17.25C2.75 18.214 2.7516 18.8616 2.81654 19.3446C2.87858 19.8061 2.9858 20.0036 3.11612 20.1339C3.24644 20.2642 3.44393 20.3714 3.90539 20.4335C4.38843 20.4984 5.03599 20.5 6 20.5H18C18.964 20.5 19.6116 20.4984 20.0946 20.4335C20.5561 20.3714 20.7536 20.2642 20.8839 20.1339C21.0142 20.0036 21.1214 19.8061 21.1835 19.3446C21.2484 18.8616 21.25 18.214 21.25 17.25C21.25 16.286 21.2484 15.6384 21.1835 15.1554C21.1214 14.6939 21.0142 14.4964 20.8839 14.3661C20.7536 14.2358 20.5561 14.1286 20.0946 14.0665C19.6116 14.0016 18.964 14 18 14H6C5.03599 14 4.38843 14.0016 3.90539 14.0665ZM5.25 17.25C5.25 16.8358 5.58579 16.5 6 16.5H8C8.41422 16.5 8.75 16.8358 8.75 17.25C8.75 17.6642 8.41422 18 8 18H6C5.58579 18 5.25 17.6642 5.25 17.25ZM10.25 17.25C10.25 16.8358 10.5858 16.5 11 16.5H18C18.4142 16.5 18.75 16.8358 18.75 17.25C18.75 17.6642 18.4142 18 18 18H11C10.5858 18 10.25 17.6642 10.25 17.25Z",fill:"currentColor"})})}function Br({className:e}){return o.jsx("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64h261.44zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64h453.44zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64h133.44z"})})}function Ka({className:e}){return o.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[o.jsx("path",{d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224H128zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64z"}),o.jsx("path",{d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224h784zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056z"})]})}const lr={};function ld({operations:e=lr,messages:t=lr,schemas:n=lr,servers:r=lr,hasInfo:s=!0,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u,sidebarConfig:d}){const f=b.useMemo(()=>{const p=m=>{var x;return d!=null&&d.useChannelAddressAsIdentifier?((x=e[m])==null?void 0:x.channel)??null:null};return[Ha(s),{id:"servers",label:"Servers",icon:Ga,isTab:!1,items:Object.keys(r),itemKey:m=>m,targetId:m=>`server-${m}`,renderItem:m=>o.jsx("span",{className:"truncate",children:m})},{id:"operations",label:"Operations",icon:Br,items:Object.keys(e),itemKey:m=>m,targetId:m=>`operation-${m}`,renderItem:m=>{var x;const h=p(m);return h!=null&&h.address?o.jsx(Ct,{address:h.address,parameters:h.parameters,truncate:!0,padded:!1,className:"text-xs bg-transparent"}):o.jsxs(o.Fragment,{children:[o.jsx($t,{method:(x=e[m])==null?void 0:x.action,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"truncate",children:m})]})}},{id:"messages",label:"Messages",icon:Ka,items:Object.keys(t),itemKey:m=>m,targetId:m=>`message-${m}`,renderItem:m=>o.jsx("span",{className:"truncate",children:m})},Wa(n)]},[e,t,n,r,s,d]);return o.jsx(Ua,{sections:f,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u})}const Fr=["get","put","post","delete","options","head","patch","trace"],cd=(e,t)=>`${e} ${t}`;function Pi(e,t){const n=new Map;for(const r of(e==null?void 0:e.parameters)??[])n.set(`${r.in}:${r.name}`,r);for(const r of(t==null?void 0:t.parameters)??[])n.set(`${r.in}:${r.name}`,r);return Array.from(n.values())}function Nn(e){return Object.keys(e).sort().flatMap(t=>{const n=e[t];return n?Fr.filter(r=>n[r]).map(r=>({key:cd(r,t),method:r,path:t})):[]})}function mo({className:e}){return o.jsxs("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m7-7H5m10-3l-3 3 3 3m-6-6l3 3-3 3"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 6.873a9 9 0 011 4.127 9 9 0 01-1 4.127M5 6.873a9 9 0 00-1 4.127 9 9 0 001 4.127"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 8.873a6 6 0 011 3.127 6 6 0 01-1 3.127M8 8.873a6 6 0 00-1 3.127 6 6 0 001 3.127"})]})}const Di={},ud={},dd=[];function fd({paths:e=Di,webhooks:t=Di,schemas:n=ud,servers:r=dd,hasInfo:s=!0,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u}){const d=b.useMemo(()=>Nn(e),[e]),f=b.useMemo(()=>Nn(t),[t]),p=b.useMemo(()=>{const m=r.map((h,x)=>({key:`server-${x}`,url:h}));return[Ha(s),{id:"servers",label:"Servers",icon:Ga,isTab:!1,items:m,itemKey:h=>h.key,targetId:h=>h.key,renderItem:h=>o.jsx("span",{className:"truncate",children:h.url})},{id:"endpoints",label:"Endpoints",icon:Br,items:d,itemKey:h=>h.key,targetId:h=>`endpoint-${h.key}`,renderItem:h=>o.jsxs(o.Fragment,{children:[o.jsx($t,{method:h.method,size:"xs",className:"shrink-0"}),o.jsx(Ct,{address:h.path,className:"text-[10px] bg-transparent p-0"})]})},{id:"webhooks",label:"Webhooks",icon:mo,items:f,itemKey:h=>h.key,targetId:h=>`webhook-${h.key}`,renderItem:h=>o.jsxs(o.Fragment,{children:[o.jsx($t,{method:h.method,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"truncate",children:h.path})]})},Wa(n)]},[d,f,n,r,s]);return o.jsx(Ua,{sections:p,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u})}const pd=e=>o.jsxs("svg",{width:18,height:18,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("circle",{cx:"7",cy:"7",r:"5"}),o.jsx("path",{d:"M14 14l-3.5-3.5"})]});function Va({query:e,onQueryChange:t,results:n,onSelectResult:r,onOpenChange:s}){const i=b.useRef(null),a=b.useRef(null),[l,c]=b.useState(!1),[u,d]=b.useState(-1),f="asyncapi-search-results",{portalHost:p,rootElement:m,topOffset:h=0}=Ue(),x=()=>{c(!1),d(-1)};b.useEffect(()=>(s==null||s(l),()=>s==null?void 0:s(!1)),[l,s]);const k=b.useRef(!1),j=b.useRef(!1);b.useEffect(()=>{if(!m)return;const v=()=>{k.current=!0},y=()=>{k.current=!1};return m.addEventListener("mouseenter",v),m.addEventListener("mouseleave",y),()=>{m.removeEventListener("mouseenter",v),m.removeEventListener("mouseleave",y)}},[m]),b.useEffect(()=>{if(!m)return;const v=y=>{j.current=m.contains(y.target)};return document.addEventListener("mousedown",v,!0),()=>document.removeEventListener("mousedown",v,!0)},[m]),b.useEffect(()=>{if(!m)return;const v=y=>{!(y.metaKey||y.ctrlKey)||y.key.toLowerCase()!=="k"||!(m.contains(document.activeElement)||k.current||j.current)||(y.preventDefault(),c(!0))};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[m]),b.useEffect(()=>{if(!l)return;const v=requestAnimationFrame(()=>{var y;return(y=a.current)==null?void 0:y.focus()});return()=>cancelAnimationFrame(v)},[l]),b.useEffect(()=>{if(!(!l||!p))return Ba(uo(p))},[l,p]),b.useEffect(()=>{if(!l)return;const v=y=>{y.key==="Escape"&&x()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[l]),b.useEffect(()=>{if(!l)return;const v=y=>{i.current&&!i.current.contains(y.target)&&x()};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[l]),b.useEffect(()=>{u>=n.length&&d(n.length-1)},[u,n.length]);const C=l&&e.trim().length>0,E=v=>{x(),r(v)},R=v=>{if(v.key==="Escape"){v.preventDefault(),x();return}if(C){if(v.key==="ArrowDown"){v.preventDefault(),d(y=>n.length===0?-1:Math.min(y+1,n.length-1));return}if(v.key==="ArrowUp"){v.preventDefault(),d(y=>n.length===0?-1:y<=0?n.length-1:y-1);return}if(v.key==="Home"){v.preventDefault(),n.length>0&&d(0);return}if(v.key==="End"){v.preventDefault(),n.length>0&&d(n.length-1);return}if(v.key==="Enter"&&u>=0&&n[u]){v.preventDefault(),E(n[u]);return}}},D=v=>`asyncapi-search-result-${v}`,_=C?`${n.length} result${n.length===1?"":"s"} found`:"",A=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent);return o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>c(!0),title:"Search","aria-label":"Search",className:"panel-toggle-btn bg-neutral-100",children:o.jsx(pd,{})}),l&&p&&Pr.createPortal(o.jsxs("div",{className:"fixed inset-0 z-[60] flex justify-center px-4 pt-24",style:{top:h},children:[o.jsx("div",{className:"absolute inset-0 bg-black/30"}),o.jsxs("div",{ref:i,className:"relative h-fit w-full max-w-[36rem] overflow-hidden rounded-lg border border-border bg-surface shadow-xl",children:[o.jsx("div",{className:"p-4",children:o.jsx("input",{ref:a,id:"asyncapi-search",type:"search",value:e,onChange:v=>t(v.target.value),onKeyDown:R,placeholder:"Search document...","aria-label":"Search document",role:"combobox","aria-haspopup":"listbox","aria-expanded":C,"aria-controls":f,"aria-autocomplete":"list","aria-activedescendant":u>=0?D(u):void 0,className:"w-full rounded-md bg-surface px-4 py-3 text-sm text-foreground placeholder:text-foreground-muted focus:outline-none"})}),o.jsx("div",{"aria-live":"polite",className:"sr-only",children:_}),C&&o.jsx("div",{id:f,role:"listbox",className:"max-h-80 overflow-y-auto",children:n.length>0?o.jsx("ul",{className:"divide-y divide-border",children:n.map((v,y)=>o.jsx("li",{children:o.jsxs("button",{id:D(y),type:"button",role:"option","aria-selected":u===y,onClick:()=>E(v),className:"w-full text-left px-4 py-3 hover:bg-neutral-50 "+(u===y?"bg-neutral-100":""),children:[o.jsx("div",{className:"text-sm font-semibold text-foreground",children:v.name}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-foreground-muted",children:[o.jsx("span",{children:v.location}),v.subtitle&&o.jsxs("span",{children:["• ",v.subtitle]})]})]})},v.id))}):o.jsx("div",{className:"px-4 py-4 text-sm text-foreground-muted",children:"No results found."})}),o.jsxs("div",{className:"flex items-center justify-center gap-1 px-4 py-1.5 text-xs text-foreground-muted",children:["Press",o.jsx("kbd",{className:"rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]",children:A?"⌘ Cmd":"Ctrl"}),o.jsx("kbd",{className:"rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]",children:"K"}),"to search"]})]})]}),p)]})}function Ja({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),o.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function Ya({className:e}){return o.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"})})}function zr({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}function Ln({className:e}){return o.jsx("svg",{className:e,id:"Layer_1",version:"1.1",viewBox:"0 0 50 50",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:o.jsx("polygon",{points:"47.25,15 45.164,12.914 25,33.078 4.836,12.914 2.75,15 25,37.25 "})})}const hd=["The following is API documentation in Markdown.","Use it to answer questions about this API and help write client code.","Stick to what is documented below - do not invent endpoints, fields, or behavior."];function Xa(e){return`${["> ## Agent Instructions",...hd.map(n=>`> ${n}`)].join(`
3
+ immediately without an extra authorization code exchange step.`,Mu="Client Credentials",Lu="The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.",Pu="Password",Du="The Password grant type is a legacy way to exchange a user's credentials for an access token.",Bu="Authorization Code",Fu="The Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.",Ra="Connecting to a server",zu="",Ri=["text-blue-600","text-indigo-600","text-purple-600","text-pink-600","text-green-700"],Uu=[50,100,200,300,500,600,700],Hu={kafka:{label:"Kafka",color:"bg-primary-100 text-primary-700 border-primary-200"},mqtt:{label:"MQTT",color:"bg-purple-100 text-purple-700 border-purple-200"},http:{label:"HTTP",color:"bg-blue-100 text-blue-700 border-blue-200"},https:{label:"HTTPS",color:"bg-blue-100 text-blue-700 border-blue-200"},ws:{label:"WebSocket",color:"bg-green-100 text-green-700 border-green-200"},wss:{label:"WebSocket Secure",color:"bg-green-100 text-green-700 border-green-200"},amqp:{label:"AMQP",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},amqps:{label:"AMQPS",color:"bg-yellow-100 text-yellow-700 border-yellow-200"},ibmmq:{label:"IBM MQ",color:"bg-indigo-100 text-indigo-700 border-indigo-200"},solace:{label:"Solace",color:"bg-pink-100 text-pink-700 border-pink-200"},nats:{label:"NATS",color:"bg-teal-100 text-teal-700 border-teal-200"}},Wu=[{location:"path",label:"Path Parameters"},{location:"query",label:"Query Parameters"},{location:"header",label:"Header Parameters"},{location:"cookie",label:"Cookie Parameters"}],Gu={get:"bg-blue-100 text-blue-800",post:"bg-green-100 text-green-800",put:"bg-yellow-100 text-yellow-800",patch:"bg-orange-100 text-orange-800",delete:"bg-red-100 text-red-800",options:"bg-neutral-100 text-foreground-secondary",head:"bg-neutral-100 text-foreground-secondary",trace:"bg-neutral-100 text-foreground-secondary",[Er.SEND]:"bg-green-100 text-green-800",[Er.RECEIVE]:"bg-blue-100 text-blue-800"};function Ma(e){const t=e.replace("#","").padEnd(6,"0"),n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);return`${n} ${r} ${s}`}function bs(e,t,n){if(e)for(const r of Uu){const s=e[r];s&&(n[`--color-${t}-${r}`]=Ma(s))}}const Ku=[["background","--color-background"],["surface","--color-surface"],["border","--color-border"],["textPrimary","--color-text-primary"],["textSecondary","--color-text-secondary"],["textMuted","--color-text-muted"]],Vu={50:"15 23 42",100:"30 41 59",200:"51 65 85",300:"71 85 105",500:"148 163 184",600:"203 213 225",700:"226 232 240",800:"241 245 249",900:"248 250 252"};function Ju(e){const t={},n=e.light?"light":e.dark?"dark":null,r=n==="dark"?e.dark:n==="light"?e.light:void 0;if(n==="dark")for(const[s,i]of Object.entries(Vu))t[`--color-neutral-${s}`]=i;if(r)for(const[s,i]of Ku){const a=r[s];a&&(t[i]=Ma(a))}return e.colors&&(bs(e.colors.primary,"primary",t),bs(e.colors.secondary,"secondary",t),bs(e.colors.neutral,"neutral",t)),t}function La(e,t,n=an){var D,_,A,v,y,F,Z,N;const[r,s]=b.useState(null),[i,a]=b.useState(null),l=b.useMemo(()=>Mn(t),[t]),c=((D=n.expand)==null?void 0:D.schemas)===!0,u=(A=(_=n.theme)==null?void 0:_.depthColors)!=null&&A.length?n.theme.depthColors:so,d=((v=n.show)==null?void 0:v.extensions)!==!1,f=((y=n.show)==null?void 0:y.codeSamples)!==!1,p=n.topOffset,m=typeof p=="number"&&Number.isFinite(p)?Math.max(0,p):0,h=((F=n.sidePanel)==null?void 0:F.containment)??"viewport",x=(Z=n.sidePanel)==null?void 0:Z.topOffset,k=typeof x=="number"&&Number.isFinite(x)?Math.max(0,x):m,j=(N=n.markdown)==null?void 0:N.url,C=b.useMemo(()=>{if(typeof j=="function")return j;if(typeof j=="string")return()=>j},[j]),E=b.useMemo(()=>({specType:e,document:t,deref:l,portalHost:r,rootElement:i,topOffset:m,sidePanelContainment:h,sidePanelTopOffset:k,defaultSchemaExpanded:c,depthColors:u,showExtensions:d,showCodeSamples:f,markdownUrl:C}),[e,t,l,r,i,m,h,k,c,u,d,f,C]),R=n.theme?Ju(n.theme):{};return{contextValue:E,themeVars:R,setPortalHost:s,setRootElement:a}}function co({document:e,config:t=an,className:n="",children:r}){const{contextValue:s,themeVars:i,setPortalHost:a,setRootElement:l}=La("asyncapi",e,t);return o.jsx(Dr.Provider,{value:s,children:o.jsxs("div",{ref:l,style:i,className:`apiuikit-root relative @container bg-background text-foreground ${n}`,children:[o.jsx("div",{ref:a,className:"asyncapi-portal-root"}),r]})})}const Pa="@lg:mx-auto @lg:max-w-[calc(70ch+28rem)]";function Ot({title:e,content:t,sideContent:n,stickySideContent:r=!1,info:s=!1,reverseLayoutOnMobile:i=!1,mobileLeadContent:a,layout:l="columns"}){const c=l==="stacked",u=n!=null&&n!==!1,d=`${s?"text-4xl inline-block text-3xl font-extrabold text-foreground tracking-tight":"text-2xl"} mb-4 @lg:mb-0 font-bold`;return o.jsxs("div",{className:`w-full mt-6 ${c?"":Pa}`,children:[a&&o.jsx("div",{className:"@lg:hidden mb-3",children:a}),e&&o.jsx("div",{className:c?"w-full":"@lg:w-prose",children:o.jsx("h1",{className:d,children:e})}),o.jsxs("section",{className:`border-border text-lg flex gap-6 @lg:gap-0 ${c?"flex-col":u&&i?"flex-col-reverse @lg:flex-row":"flex-col @lg:flex-row"}`,children:[o.jsx("div",{className:`${c?"w-full":"@lg:w-prose"} min-w-0`,children:t}),c?u&&o.jsx("div",{className:r?"@lg:sticky @lg:top-4":void 0,children:n}):o.jsx("div",{className:"@lg:pl-12 @lg:w-[400px] shrink-0","data-testid":"section-side-column",children:o.jsx("div",{className:`${r&&"@lg:sticky @lg:top-4"}`,children:n})})]})]})}function en(...e){return e.filter(Boolean).join(" ")}function cn({className:e}){return o.jsx("svg",{className:e,id:"Layer_1",version:"1.1",viewBox:"0 0 50 50",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:o.jsx("polygon",{points:"47.25,15 45.164,12.914 25,33.078 4.836,12.914 2.75,15 25,37.25 "})})}function un({tabs:e,current:t,onChange:n=()=>{},ariaLabel:r="Tabs",selectLabel:s="Select a tab",placeholder:i}){var m;const a=b.useId(),l=b.useRef([]),c=t??(i?"":((m=e[0])==null?void 0:m.id)??""),u=e.some(h=>!!h.icon),d=t?e.findIndex(h=>h.id===t):-1,f=d>=0?d:0,p=(h,x)=>{var C;if(e.length===0)return;const k=E=>(E+e.length)%e.length;let j=x;if(h.key==="ArrowRight"&&(h.preventDefault(),j=k(x+1)),h.key==="ArrowLeft"&&(h.preventDefault(),j=k(x-1)),h.key==="Home"&&(h.preventDefault(),j=0),h.key==="End"&&(h.preventDefault(),j=e.length-1),j!==x){const E=e[j];n(E.id),(C=l.current[j])==null||C.focus()}};return e.length?o.jsxs("div",{children:[o.jsxs("div",{className:en("@sm:hidden relative",u?"mt-0":"mt-4"),children:[o.jsx("label",{htmlFor:a,className:"sr-only",children:s}),o.jsxs("select",{id:a,name:"tabs",value:c,onChange:h=>n(h.target.value),className:"block w-full appearance-none rounded-md border border-border bg-surface py-2 pl-3 pr-9 text-sm text-foreground-secondary focus:border-secondary-500 focus:outline-none focus:ring-1 focus:ring-secondary-500",children:[i&&o.jsx("option",{value:"",children:i}),e.map(h=>o.jsx("option",{value:h.id,children:h.name},h.id))]}),o.jsx(cn,{className:"pointer-events-none absolute right-3 top-1/2 h-3 w-3 -translate-y-1/2 text-foreground-muted"})]}),o.jsx("div",{className:en("hidden @sm:block",u?"":"mt-6"),children:u?o.jsx("div",{className:"border-b border-border",role:"tablist","aria-label":r,children:o.jsx("div",{className:"flex flex-wrap gap-6",children:e.map((h,x)=>{const k=h.id===t,j=h.icon;return o.jsx("button",{ref:C=>{l.current[x]=C},id:`tab-${h.id}`,type:"button",role:"tab",tabIndex:x===f?0:-1,"aria-selected":k,"aria-controls":`panel-${h.id}`,onClick:()=>n(h.id),onKeyDown:C=>p(C,x),className:en("cursor-pointer border-b-2 px-1 py-3 text-sm font-semibold transition-colors",k?"border-primary-500 text-primary-600":"border-transparent text-foreground-muted hover:text-foreground"),children:o.jsxs("span",{className:"inline-flex items-center gap-2",children:[j?o.jsx(j,{className:"h-4 w-4 shrink-0"}):null,o.jsx("span",{children:h.name})]})},h.id)})})}):o.jsx("nav",{className:"relative z-0 flex divide-x divide-border rounded-lg shadow",role:"tablist","aria-label":r,children:e.map((h,x)=>{const k=h.id===t;return o.jsxs("button",{ref:j=>{l.current[x]=j},id:`tab-${h.id}`,type:"button",role:"tab",tabIndex:x===f?0:-1,"aria-selected":k,"aria-controls":`panel-${h.id}`,onClick:()=>n(h.id),onKeyDown:j=>p(j,x),className:en(k?"text-foreground":"text-foreground-muted hover:text-foreground-secondary",x===0?"rounded-l-lg":"",x===e.length-1?"rounded-r-lg":"","group relative min-w-0 flex-1 cursor-pointer overflow-hidden bg-surface px-4 py-4 text-center text-sm font-medium hover:bg-neutral-50 focus:z-10"),children:[o.jsx("span",{children:h.name}),o.jsx("span",{"aria-hidden":"true",className:en(k?"bg-primary-500":"bg-transparent","absolute inset-x-0 bottom-0 h-0.5")})]},h.id)})})})]}):null}function Da(e){const t=getComputedStyle(e).overflowY;return(t==="auto"||t==="scroll")&&e.scrollHeight>e.clientHeight}function uo(e){let t=e;for(;t&&t!==document.body;){if(Da(t))return t;t=t.parentElement}return document.documentElement}function Yu(e,t){if(!e||!t||!t.contains(e))return null;let n=e;for(;n;){if(Da(n))return n;if(n===t)break;n=n.parentElement}return null}function Ba(e){const t=e.style.overflow,n=e.style.paddingRight,r=e.offsetWidth-e.clientWidth;if(e.style.overflow="hidden",r>0){const s=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${s+r}px`}return()=>{e.style.overflow=t,e.style.paddingRight=n}}function Fa({tabs:e,current:t,onChange:n}){const{rootElement:r,topOffset:s=0}=ln();if(!e.length)return null;const i=typeof document<"u"&&uo(r)===document.documentElement?s:0,a=o.jsx("div",{className:"w-full mt-10 @lg:mt-0",children:o.jsx(un,{tabs:e,current:t,onChange:n,ariaLabel:"AsyncAPI sections",selectLabel:"Select an AsyncAPI section"})});return o.jsx("div",{className:"sticky z-10 flex w-full justify-center bg-background",style:{top:i},children:o.jsx(Ot,{content:a,stickySideContent:!1})})}function Xu(e,t){const[n,r]=b.useState("docked"),s=b.useRef(t);return s.current=t,b.useEffect(()=>{if(!e)return;let i=null,a=null;const l=()=>{a=null;const u=e.getBoundingClientRect().top,d=i===null?0:u-i;i=u,u>=0?r("docked"):s.current||d>0?r("pinned"):d<0?r("hidden"):r(f=>f==="docked"?"hidden":f)},c=()=>{a===null&&(a=requestAnimationFrame(l))};return l(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{a!==null&&cancelAnimationFrame(a),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e]),b.useEffect(()=>{t&&r(i=>i==="hidden"?"pinned":i)},[t]),n}function fo(e,t){const[n,r]=b.useState(null);return b.useLayoutEffect(()=>{if(!e||!t){r(null);return}let s=null;const i=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,r(e.getBoundingClientRect())}))};r(e.getBoundingClientRect());const a=new ResizeObserver(i);return a.observe(e),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),()=>{s!==null&&cancelAnimationFrame(s),a.disconnect(),window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i)}},[e,t]),n}const ar=16;function za({logo:e,children:t,forceVisible:n=!1}){const{rootElement:r,topOffset:s=0}=ln(),i=Xu(r,n),a=i!=="docked",l=fo(r,a),c=typeof window>"u"?0:window.innerWidth,u=l?Math.max(l.left,0):0,d=l?Math.min(l.right,c):c,f={left:a?u+ar:ar,right:a?Math.max(c-d,0)+ar:ar,transform:`translateY(${i==="hidden"?"-150%":"0px"})`,...a?{position:"fixed",top:s+10,pointerEvents:i==="hidden"?"none":void 0}:{}};return o.jsx("header",{className:"document-topbar",style:f,"aria-label":"Document toolbar",children:o.jsxs("div",{className:`document-topbar-inner w-full ${Pa}`,children:[o.jsx("div",{className:"document-logo",children:e}),o.jsx("div",{className:"document-topbar-controls",children:t})]})})}function Zu(e){if(e.length===0)return o.jsx("span",{children:"No allowed values."});if(e.length===1)return o.jsxs("span",{children:["Allowed value is ",o.jsx("code",{children:e[0]})]});const t=e.slice(0,-1).map((r,s)=>o.jsxs(b.Fragment,{children:[o.jsx("code",{children:r}),", "," "]},s)),n=o.jsx("code",{children:e[e.length-1]},"last");return o.jsxs("span",{children:["Allowed values are ",t," and ",n]})}function Qu(e){return e.map(t=>`\`${t}\``).join(", ")}function qu(e){const t=[],n=/\{([^}]+)\}/g;let r=0,s;for(;(s=n.exec(e))!==null;)s.index>r&&t.push({type:"text",value:e.slice(r,s.index)}),t.push({type:"param",value:s[1]}),r=s.index+s[0].length;return r<e.length&&t.push({type:"text",value:e.slice(r)}),t}function Ct({address:e,parameters:t,className:n="text-xs",truncate:r=!1,padded:s=!0}){const{portalHost:i}=Ue(),[a,l]=b.useState(null),[c,u]=b.useState({top:0,left:0,placement:"top"}),[d,f]=b.useState(!1),p=b.useRef(null),m=qu(e);let h=0;const x=40;b.useEffect(()=>{if(!r)return;const R=p.current;if(!R)return;const D=()=>f(R.scrollWidth>R.clientWidth);D();const _=new ResizeObserver(D);return _.observe(R),()=>_.disconnect()},[r,e]);const k=(R,D)=>{const _=D.getBoundingClientRect(),A=_.top<x?"bottom":"top";u({top:A==="top"?_.top-8:_.bottom+8,left:_.left+_.width/2,placement:A}),l(R)},j=()=>l(null),C=m.map((R,D)=>{if(R.type==="text")return o.jsx("span",{children:R.value},D);const _=t==null?void 0:t[R.value],A=Ri[h++%Ri.length],v=a===D,y=!!_&&(_.description||_.type||_.default||_.enum&&_.enum.length>0||_.examples&&_.examples.length>0),F=`channel-address-tooltip-${D}`,Z=y&&v?F:void 0;return o.jsxs("span",{className:"inline-block",onMouseEnter:N=>y&&k(D,N.currentTarget),onMouseLeave:j,children:[o.jsx("span",{className:`font-semibold ${A} ${y?"cursor-help underline decoration-dotted":""}`,role:y?"button":void 0,tabIndex:y?0:void 0,"aria-expanded":y?v:void 0,"aria-describedby":Z,onFocus:N=>y&&k(D,N.currentTarget),onBlur:j,onKeyDown:N=>{y&&((N.key==="Enter"||N.key===" ")&&(N.preventDefault(),k(D,N.currentTarget)),N.key==="Escape"&&(N.preventDefault(),j(),N.currentTarget.blur()))},children:`{${R.value}}`}),y&&v&&i&&Pr.createPortal(o.jsxs("div",{id:F,className:`fixed -translate-x-1/2 max-w-xs px-2.5 py-1.5 bg-neutral-50 text-foreground-muted text-xs rounded pointer-events-none z-[60] shadow-lg text-left leading-snug ${c.placement==="top"?"-translate-y-full":""}`,style:{top:c.top,left:c.left},children:[_.description&&o.jsx("div",{children:_.description}),_.type&&o.jsx("div",{className:"mt-1",children:o.jsx("code",{children:_.type})}),_.default&&o.jsxs("div",{className:"mt-1",children:[o.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Default:"})," ",o.jsx("code",{children:_.default})]}),_.enum&&_.enum.length>0&&o.jsx("div",{className:"mt-1",children:Zu(_.enum)}),_.examples&&_.examples.length>0&&o.jsxs("div",{className:"mt-1",children:[o.jsx("span",{className:"font-semibold text-foreground-secondary",children:"Examples:"})," ",_.examples.join(", ")]})]}),i)]},D)}),E=s?"px-2 py-1 ":"";return r?o.jsxs("code",{className:`${E}rounded text-foreground-secondary flex items-center min-w-0 ${n}`,children:[o.jsx("span",{ref:p,className:"overflow-hidden whitespace-nowrap min-w-0",children:C}),d&&o.jsx("span",{"aria-hidden":!0,className:"shrink-0",children:"..."})]}):o.jsx("code",{className:`${E}rounded text-foreground-secondary break-all ${n}`,children:C})}const ed={sm:"px-2.5 py-1 rounded-md text-xs",xs:"px-1.5 py-0.5 rounded text-[10px]"};function $t({method:e,size:t="sm",className:n=""}){return e?o.jsx("span",{className:`inline-flex items-center justify-center font-medium uppercase ${ed[t]} ${Gu[e]} ${n}`,children:e}):null}const Mi=6,td=12,nd=8,rd=.7;function sd(e,t){if(e===0)return 1/0;const n=e*rd-nd*2,r=t*Mi+Math.max(0,t-1)*td;return Math.max(1,Math.floor((n-r)/Mi))}function od(e,t){const n=e.reduce((s,i)=>s+i,0);if(n<=t)return e;if(t<=e.length)return e.map(()=>1);const r=t-e.length;return e.map(s=>Math.min(s,1+Math.floor(s/n*r)))}const Li=20;function id({sections:e,activeSection:t,onTabChange:n,onItemSelect:r,selectedItem:s}){const[i,a]=b.useState(!1),[l,c]=b.useState(!1),u=i||l,{rootElement:d,portalHost:f,topOffset:p=0}=Ue(),m=b.useRef(null),h=b.useRef(null),x=b.useMemo(()=>e.filter(P=>P.items.length>0),[e]),k=b.useMemo(()=>x.filter(P=>P.isTab===!1||P.id===t),[x,t]),j=b.useMemo(()=>x.filter(P=>P.showInPopover!==!1),[x]),[C,E]=b.useState(null),R=b.useRef(null),D=b.useRef(null),_=b.useCallback((P,Y)=>{E({section:P,key:Y}),R.current={section:P,key:Y},D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{R.current=null},600)},[]);b.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]),b.useEffect(()=>{const Y=e.filter(G=>G.items.length>0).flatMap(G=>G.items.map(pe=>({section:G.id,key:G.itemKey(pe),id:G.targetId(pe)}))).map(G=>({...G,el:document.getElementById(G.id)})).filter(G=>!!G.el);if(Y.length===0)return;const O=new Map(Y.map(G=>[G.el,G])),q=new Map,le=new IntersectionObserver(G=>{for(const xe of G)xe.isIntersecting?q.set(xe.target,xe.boundingClientRect.top):q.delete(xe.target);if(q.size===0)return;let pe=null,we=-1/0;for(const[xe,He]of q)He>we&&(pe=xe,we=He);const fe=pe&&O.get(pe);if(!fe)return;const Me=R.current;if(Me){if(fe.section!==Me.section||fe.key!==Me.key)return;R.current=null}E({section:fe.section,key:fe.key})},{rootMargin:"-10% 0px -75% 0px",threshold:0});return Y.forEach(G=>le.observe(G.el)),()=>le.disconnect()},[e]);const A=(C==null?void 0:C.section)??t,v=C??s,y=fo(d,!0),F=typeof window>"u"?0:window.innerWidth,Z=typeof window>"u"?0:window.innerHeight,N=!!y&&y.bottom>p&&y.top<Z,W=Math.max(0,Z-p),ie=p+W/2,oe=!!y&&y.width<1024,S={opacity:N?1:0,pointerEvents:N?"auto":"none",transition:"opacity 0.2s ease"},T={position:"fixed",top:ie,left:((y==null?void 0:y.left)??0)+Li,transform:"translateY(-50%)",zIndex:51,...S},H=Math.min((y==null?void 0:y.right)??0,F)-60,V={position:"fixed",bottom:16,left:H,zIndex:51,...S},ae=oe?{position:"fixed",bottom:68,right:F-(H+44),zIndex:52}:{position:"fixed",top:ie,left:((y==null?void 0:y.left)??0)+Li,transform:"translateY(-50%)",maxHeight:`calc(100vh - ${p+32}px)`,zIndex:52};b.useEffect(()=>{if(!i)return;const P=O=>{O.key==="Escape"&&a(!1)},Y=O=>{var le,G;const q=O.target;(le=m.current)!=null&&le.contains(q)||(G=h.current)!=null&&G.contains(q)||a(!1)};return document.addEventListener("keydown",P),document.addEventListener("mousedown",Y),()=>{document.removeEventListener("keydown",P),document.removeEventListener("mousedown",Y)}},[i]);const ee=b.useCallback((P,Y)=>{P.isTab!==!1&&n(P.id),Y&&setTimeout(()=>{var O;(O=document.getElementById(Y))==null||O.scrollIntoView({behavior:"smooth",block:"start"})},50)},[n]),Te=b.useMemo(()=>j.map(P=>{const Y=A===P.id,O=(v==null?void 0:v.section)===P.id,q=P.icon;return o.jsxs("div",{className:"pb-1",children:[o.jsxs("button",{onClick:()=>{ee(P),_(P.id,""),oe&&a(!1)},className:`group flex w-full items-center gap-2 rounded-md px-2 py-2 text-left transition-colors ${Y?"bg-primary-50":"hover:bg-neutral-50"}`,children:[o.jsx(q,{className:`h-3.5 w-3.5 shrink-0 transition-colors ${Y?"text-primary-500":"text-foreground-muted group-hover:text-foreground-secondary"}`}),o.jsx("span",{className:`text-xs font-semibold uppercase tracking-wider transition-colors ${Y?"text-primary-600":"text-foreground-muted group-hover:text-foreground-secondary"}`,children:P.label}),o.jsx("span",{className:`ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 font-mono text-[10px] transition-colors ${Y?"border border-primary-200 bg-primary-100 text-primary-500":"bg-neutral-100 text-foreground-muted"}`,children:P.items.length})]}),P.items.length>0&&o.jsx("ul",{className:"ml-4 mt-0.5 border-l border-border pl-3",children:P.items.map(le=>{const G=P.itemKey(le),pe=O&&(v==null?void 0:v.key)===G;return o.jsx("li",{children:o.jsx("button",{onClick:()=>{ee(P,P.targetId(le)),r(P.id,G),_(P.id,G),oe&&a(!1)},className:`flex w-full items-center gap-2 rounded-md px-2 py-0.5 text-left text-xs transition-colors ${pe?"bg-primary-50 font-medium text-primary-500":Y?"text-foreground-secondary hover:bg-primary-50 hover:text-foreground":"text-foreground-muted hover:bg-neutral-50 hover:text-foreground-secondary"}`,children:P.renderItem(le,{isSelected:pe,isSectionActive:Y})})},G)})})]},P.id)}),[j,A,v,oe,ee,r,_]),Q=sd(W,k.length),ve=b.useMemo(()=>{const P=od(k.map(Y=>Y.items.length),Q);return k.map((Y,O)=>{const q=A===Y.id,le=Y.items.length,G=P[O];let pe=-1;if((v==null?void 0:v.section)===Y.id){const we=Y.items.findIndex(fe=>Y.itemKey(fe)===v.key);we>=0&&(pe=Math.min(G-1,Math.floor(we*G/le)))}return o.jsxs("div",{className:"flex flex-col items-start gap-1",children:[o.jsx("span",{className:`block h-[2px] rounded-full transition-all duration-150 ${q?"w-6 bg-foreground-secondary":"w-4 bg-neutral-300 group-hover:bg-neutral-400"}`}),o.jsx("div",{className:"flex flex-col items-start gap-1",children:Array.from({length:G},(we,fe)=>o.jsx("span",{className:`block h-[2px] w-3 rounded-full transition-colors duration-150 ${fe===pe?"bg-neutral-500":"bg-neutral-200 group-hover:bg-neutral-300"}`},fe))})]},Y.id)})},[k,A,v,Q]);return o.jsxs(o.Fragment,{children:[!oe&&o.jsx("button",{ref:m,onClick:()=>a(P=>!P),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),title:u?"Close navigation":"Open navigation","aria-label":u?"Close navigation":"Open navigation",className:"group flex flex-col items-start gap-3 p-2",style:T,children:ve}),oe&&o.jsx("button",{ref:m,onClick:()=>a(P=>!P),title:i?"Close navigation":"Open navigation","aria-label":i?"Close navigation":"Open navigation",className:"flex h-11 w-11 items-center justify-center rounded-full border border-border bg-background shadow-lg",style:V,children:o.jsxs("span",{className:"flex flex-col items-start gap-1",children:[o.jsx("span",{className:"block h-[2px] w-4 rounded-full bg-foreground-secondary"}),o.jsx("span",{className:"block h-[2px] w-3 rounded-full bg-neutral-400"}),o.jsx("span",{className:"block h-[2px] w-3 rounded-full bg-neutral-300"})]})}),f&&Pr.createPortal(o.jsx("div",{ref:h,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),className:`max-h-[70vh] w-96 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-xl border border-border bg-background p-2 shadow-xl transition-all duration-150 ${oe?"origin-bottom-right":""} ${u?"opacity-100 scale-100 pointer-events-auto":"opacity-0 scale-95 pointer-events-none"}`,style:ae,children:Te}),f)]})}function Ua({sections:e,activeTab:t,onTabChange:n,onItemSelect:r,onSelectServer:s,selectedItem:i}){return o.jsx(id,{sections:e,activeSection:t,onTabChange:a=>n(a),onItemSelect:(a,l)=>{a!=="info"&&(a==="servers"?s==null||s(l):r==null||r(a,l))},selectedItem:i?{section:i.tab,key:i.key}:null})}function po({className:e,children:t,...n}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...n,children:t})}function ad(e){return o.jsxs(po,{stroke:"url(#icon-book-open-gradient)",...e,children:[o.jsxs("linearGradient",{id:"icon-book-open-gradient",x2:"1",y2:"1",children:[o.jsx("stop",{offset:"0%",className:"primary-gradient-color-stop"}),o.jsx("stop",{offset:"100%",className:"secondary-gradient-color-stop"})]}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})]})}function ho({className:e}){return o.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[o.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M14 20C17.3137 20 20 17.3137 20 14C20 10.6863 17.3137 8 14 8C10.6863 8 8 10.6863 8 14C8 17.3137 10.6863 20 14 20ZM18 14C18 16.2091 16.2091 18 14 18C11.7909 18 10 16.2091 10 14C10 11.7909 11.7909 10 14 10C16.2091 10 18 11.7909 18 14Z"}),o.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M0 12.9996V14.9996C0 16.5478 1.17261 17.822 2.67809 17.9826C2.80588 18.3459 2.95062 18.7011 3.11133 19.0473C2.12484 20.226 2.18536 21.984 3.29291 23.0916L4.70712 24.5058C5.78946 25.5881 7.49305 25.6706 8.67003 24.7531C9.1044 24.9688 9.55383 25.159 10.0163 25.3218C10.1769 26.8273 11.4511 28 12.9993 28H14.9993C16.5471 28 17.8211 26.8279 17.9821 25.3228C18.4024 25.175 18.8119 25.0046 19.2091 24.8129C20.3823 25.6664 22.0344 25.564 23.0926 24.5058L24.5068 23.0916C25.565 22.0334 25.6674 20.3813 24.814 19.2081C25.0054 18.8113 25.1757 18.4023 25.3234 17.9824C26.8282 17.8211 28 16.5472 28 14.9996V12.9996C28 11.452 26.8282 10.1782 25.3234 10.0169C25.1605 9.55375 24.9701 9.10374 24.7541 8.66883C25.6708 7.49189 25.5882 5.78888 24.5061 4.70681L23.0919 3.29259C21.9846 2.18531 20.2271 2.12455 19.0485 3.1103C18.7017 2.94935 18.3459 2.80441 17.982 2.67647C17.8207 1.17177 16.5468 0 14.9993 0H12.9993C11.4514 0 10.1773 1.17231 10.0164 2.6775C9.60779 2.8213 9.20936 2.98653 8.82251 3.17181C7.64444 2.12251 5.83764 2.16276 4.70782 3.29259L3.2936 4.7068C2.16377 5.83664 2.12352 7.64345 3.17285 8.82152C2.98737 9.20877 2.82199 9.60763 2.67809 10.0167C1.17261 10.1773 0 11.4515 0 12.9996ZM15.9993 3C15.9993 2.44772 15.5516 2 14.9993 2H12.9993C12.447 2 11.9993 2.44772 11.9993 3V3.38269C11.9993 3.85823 11.6626 4.26276 11.2059 4.39542C10.4966 4.60148 9.81974 4.88401 9.18495 5.23348C8.76836 5.46282 8.24425 5.41481 7.90799 5.07855L7.53624 4.70681C7.14572 4.31628 6.51256 4.31628 6.12203 4.7068L4.70782 6.12102C4.31729 6.51154 4.31729 7.14471 4.70782 7.53523L5.07958 7.90699C5.41584 8.24325 5.46385 8.76736 5.23451 9.18395C4.88485 9.8191 4.6022 10.4963 4.39611 11.2061C4.2635 11.6629 3.85894 11.9996 3.38334 11.9996H3C2.44772 11.9996 2 12.4474 2 12.9996V14.9996C2 15.5519 2.44772 15.9996 3 15.9996H3.38334C3.85894 15.9996 4.26349 16.3364 4.39611 16.7931C4.58954 17.4594 4.85042 18.0969 5.17085 18.6979C5.39202 19.1127 5.34095 19.6293 5.00855 19.9617L4.70712 20.2632C4.3166 20.6537 4.3166 21.2868 4.70712 21.6774L6.12134 23.0916C6.51186 23.4821 7.14503 23.4821 7.53555 23.0916L7.77887 22.8483C8.11899 22.5081 8.65055 22.4633 9.06879 22.7008C9.73695 23.0804 10.4531 23.3852 11.2059 23.6039C11.6626 23.7365 11.9993 24.1411 11.9993 24.6166V25C11.9993 25.5523 12.447 26 12.9993 26H14.9993C15.5516 26 15.9993 25.5523 15.9993 25V24.6174C15.9993 24.1418 16.3361 23.7372 16.7929 23.6046C17.5032 23.3985 18.1809 23.1157 18.8164 22.7658C19.233 22.5365 19.7571 22.5845 20.0934 22.9208L20.2642 23.0916C20.6547 23.4821 21.2879 23.4821 21.6784 23.0916L23.0926 21.6774C23.4831 21.2868 23.4831 20.6537 23.0926 20.2632L22.9218 20.0924C22.5855 19.7561 22.5375 19.232 22.7669 18.8154C23.1166 18.1802 23.3992 17.503 23.6053 16.7931C23.7379 16.3364 24.1425 15.9996 24.6181 15.9996H25C25.5523 15.9996 26 15.5519 26 14.9996V12.9996C26 12.4474 25.5523 11.9996 25 11.9996H24.6181C24.1425 11.9996 23.7379 11.6629 23.6053 11.2061C23.3866 10.4529 23.0817 9.73627 22.7019 9.06773C22.4643 8.64949 22.5092 8.11793 22.8493 7.77781L23.0919 7.53523C23.4824 7.14471 23.4824 6.51154 23.0919 6.12102L21.6777 4.7068C21.2872 4.31628 20.654 4.31628 20.2635 4.7068L19.9628 5.00748C19.6304 5.33988 19.1137 5.39096 18.6989 5.16979C18.0976 4.84915 17.4596 4.58815 16.7929 4.39467C16.3361 4.2621 15.9993 3.85752 15.9993 3.38187V3Z"})]})}function Ha(e){return{id:"info",label:"Info",icon:ad,isTab:!1,showInPopover:!1,items:e?["info"]:[],itemKey:()=>"info",targetId:()=>"info-panel",renderItem:()=>o.jsx("span",{className:"truncate",children:"Overview"})}}function Wa(e){return{id:"schemas",label:"Schemas",icon:ho,items:Object.keys(e),itemKey:t=>t,targetId:t=>`schema-${t}`,renderItem:t=>o.jsx("span",{className:"truncate",children:t})}}function Ga({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.948 1.5H18.052C18.9505 1.49997 19.6997 1.49995 20.2945 1.57991C20.9223 1.66432 21.4891 1.84999 21.9445 2.30546C22.4 2.76093 22.5857 3.32773 22.6701 3.95552C22.7501 4.5503 22.75 5.29953 22.75 6.19801V6.302C22.75 7.20048 22.7501 7.9497 22.6701 8.54448C22.5857 9.17228 22.4 9.73907 21.9445 10.1945C21.4891 10.65 20.9223 10.8357 20.2945 10.9201C19.6997 11.0001 18.9505 11 18.052 11H5.94801C5.04953 11 4.3003 11.0001 3.70552 10.9201C3.07773 10.8357 2.51093 10.65 2.05546 10.1945C1.59999 9.73907 1.41432 9.17228 1.32991 8.54448C1.24995 7.9497 1.24997 7.20048 1.25 6.302V6.198C1.24997 5.29952 1.24995 4.5503 1.32991 3.95552C1.41432 3.32773 1.59999 2.76093 2.05546 2.30546C2.51093 1.84999 3.07773 1.66432 3.70552 1.57991C4.3003 1.49995 5.04952 1.49997 5.948 1.5ZM3.90539 3.06654C3.44393 3.12858 3.24644 3.2358 3.11612 3.36612C2.9858 3.49643 2.87858 3.69393 2.81654 4.15539C2.7516 4.63843 2.75 5.28599 2.75 6.25C2.75 7.21401 2.7516 7.86157 2.81654 8.34461C2.87858 8.80607 2.9858 9.00357 3.11612 9.13388C3.24644 9.2642 3.44393 9.37142 3.90539 9.43347C4.38843 9.49841 5.03599 9.5 6 9.5H18C18.964 9.5 19.6116 9.49841 20.0946 9.43347C20.5561 9.37142 20.7536 9.2642 20.8839 9.13388C21.0142 9.00357 21.1214 8.80607 21.1835 8.34461C21.2484 7.86157 21.25 7.21401 21.25 6.25C21.25 5.28599 21.2484 4.63843 21.1835 4.15539C21.1214 3.69393 21.0142 3.49643 20.8839 3.36612C20.7536 3.2358 20.5561 3.12858 20.0946 3.06654C19.6116 3.00159 18.964 3 18 3H6C5.03599 3 4.38843 3.00159 3.90539 3.06654ZM5.25 6.25C5.25 5.83579 5.58579 5.5 6 5.5H8C8.41422 5.5 8.75 5.83579 8.75 6.25C8.75 6.66422 8.41422 7 8 7H6C5.58579 7 5.25 6.66422 5.25 6.25ZM10.25 6.25C10.25 5.83579 10.5858 5.5 11 5.5H18C18.4142 5.5 18.75 5.83579 18.75 6.25C18.75 6.66422 18.4142 7 18 7H11C10.5858 7 10.25 6.66422 10.25 6.25ZM5.94801 12.5H18.052C18.9505 12.5 19.6997 12.4999 20.2945 12.5799C20.9223 12.6643 21.4891 12.85 21.9445 13.3055C22.4 13.7609 22.5857 14.3277 22.6701 14.9555C22.7501 15.5503 22.75 16.2995 22.75 17.198V17.302C22.75 18.2005 22.7501 18.9497 22.6701 19.5445C22.5857 20.1723 22.4 20.7391 21.9445 21.1945C21.4891 21.65 20.9223 21.8357 20.2945 21.9201C19.6997 22.0001 18.9505 22 18.052 22H5.94801C5.04953 22 4.30031 22.0001 3.70552 21.9201C3.07773 21.8357 2.51093 21.65 2.05546 21.1945C1.59999 20.7391 1.41432 20.1723 1.32991 19.5445C1.24995 18.9497 1.24997 18.2005 1.25 17.302V17.198C1.24997 16.2995 1.24995 15.5503 1.32991 14.9555C1.41432 14.3277 1.59999 13.7609 2.05546 13.3055C2.51093 12.85 3.07773 12.6643 3.70552 12.5799C4.30031 12.4999 5.04953 12.5 5.94801 12.5ZM3.90539 14.0665C3.44393 14.1286 3.24644 14.2358 3.11612 14.3661C2.9858 14.4964 2.87858 14.6939 2.81654 15.1554C2.7516 15.6384 2.75 16.286 2.75 17.25C2.75 18.214 2.7516 18.8616 2.81654 19.3446C2.87858 19.8061 2.9858 20.0036 3.11612 20.1339C3.24644 20.2642 3.44393 20.3714 3.90539 20.4335C4.38843 20.4984 5.03599 20.5 6 20.5H18C18.964 20.5 19.6116 20.4984 20.0946 20.4335C20.5561 20.3714 20.7536 20.2642 20.8839 20.1339C21.0142 20.0036 21.1214 19.8061 21.1835 19.3446C21.2484 18.8616 21.25 18.214 21.25 17.25C21.25 16.286 21.2484 15.6384 21.1835 15.1554C21.1214 14.6939 21.0142 14.4964 20.8839 14.3661C20.7536 14.2358 20.5561 14.1286 20.0946 14.0665C19.6116 14.0016 18.964 14 18 14H6C5.03599 14 4.38843 14.0016 3.90539 14.0665ZM5.25 17.25C5.25 16.8358 5.58579 16.5 6 16.5H8C8.41422 16.5 8.75 16.8358 8.75 17.25C8.75 17.6642 8.41422 18 8 18H6C5.58579 18 5.25 17.6642 5.25 17.25ZM10.25 17.25C10.25 16.8358 10.5858 16.5 11 16.5H18C18.4142 16.5 18.75 16.8358 18.75 17.25C18.75 17.6642 18.4142 18 18 18H11C10.5858 18 10.25 17.6642 10.25 17.25Z",fill:"currentColor"})})}function Br({className:e}){return o.jsx("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64h261.44zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64h453.44zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64h133.44z"})})}function Ka({className:e}){return o.jsxs("svg",{className:e||"inline-block",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",children:[o.jsx("path",{d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224H128zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64z"}),o.jsx("path",{d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224h784zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056z"})]})}const lr={};function ld({operations:e=lr,messages:t=lr,schemas:n=lr,servers:r=lr,hasInfo:s=!0,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u,sidebarConfig:d}){const f=b.useMemo(()=>{const p=m=>{var x;return d!=null&&d.useChannelAddressAsIdentifier?((x=e[m])==null?void 0:x.channel)??null:null};return[Ha(s),{id:"servers",label:"Servers",icon:Ga,isTab:!1,items:Object.keys(r),itemKey:m=>m,targetId:m=>`server-${m}`,renderItem:m=>o.jsx("span",{className:"truncate",children:m})},{id:"operations",label:"Operations",icon:Br,items:Object.keys(e),itemKey:m=>m,targetId:m=>`operation-${m}`,renderItem:m=>{var x;const h=p(m);return h!=null&&h.address?o.jsx(Ct,{address:h.address,parameters:h.parameters,truncate:!0,padded:!1,className:"text-xs bg-transparent"}):o.jsxs(o.Fragment,{children:[o.jsx($t,{method:(x=e[m])==null?void 0:x.action,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"truncate",children:m})]})}},{id:"messages",label:"Messages",icon:Ka,items:Object.keys(t),itemKey:m=>m,targetId:m=>`message-${m}`,renderItem:m=>o.jsx("span",{className:"truncate",children:m})},Wa(n)]},[e,t,n,r,s,d]);return o.jsx(Ua,{sections:f,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u})}const Fr=["get","put","post","delete","options","head","patch","trace"],cd=(e,t)=>`${e} ${t}`;function Pi(e,t){const n=new Map;for(const r of(e==null?void 0:e.parameters)??[])n.set(`${r.in}:${r.name}`,r);for(const r of(t==null?void 0:t.parameters)??[])n.set(`${r.in}:${r.name}`,r);return Array.from(n.values())}function Tn(e){return Object.keys(e).sort().flatMap(t=>{const n=e[t];return n?Fr.filter(r=>n[r]).map(r=>({key:cd(r,t),method:r,path:t})):[]})}function mo({className:e}){return o.jsxs("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m7-7H5m10-3l-3 3 3 3m-6-6l3 3-3 3"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 6.873a9 9 0 011 4.127 9 9 0 01-1 4.127M5 6.873a9 9 0 00-1 4.127 9 9 0 001 4.127"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 8.873a6 6 0 011 3.127 6 6 0 01-1 3.127M8 8.873a6 6 0 00-1 3.127 6 6 0 001 3.127"})]})}const Di={},ud={},dd=[];function fd({paths:e=Di,webhooks:t=Di,schemas:n=ud,servers:r=dd,hasInfo:s=!0,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u}){const d=b.useMemo(()=>Tn(e),[e]),f=b.useMemo(()=>Tn(t),[t]),p=b.useMemo(()=>{const m=r.map((h,x)=>({key:`server-${x}`,url:h}));return[Ha(s),{id:"servers",label:"Servers",icon:Ga,isTab:!1,items:m,itemKey:h=>h.key,targetId:h=>h.key,renderItem:h=>o.jsx("span",{className:"truncate",children:h.url})},{id:"endpoints",label:"Endpoints",icon:Br,items:d,itemKey:h=>h.key,targetId:h=>`endpoint-${h.key}`,renderItem:h=>o.jsxs(o.Fragment,{children:[o.jsx($t,{method:h.method,size:"xs",className:"shrink-0"}),o.jsx(Ct,{address:h.path,className:"text-[10px] bg-transparent p-0"})]})},{id:"webhooks",label:"Webhooks",icon:mo,items:f,itemKey:h=>h.key,targetId:h=>`webhook-${h.key}`,renderItem:h=>o.jsxs(o.Fragment,{children:[o.jsx($t,{method:h.method,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"truncate",children:h.path})]})},Wa(n)]},[d,f,n,r,s]);return o.jsx(Ua,{sections:p,activeTab:i,onTabChange:a,onItemSelect:l,onSelectServer:c,selectedItem:u})}const pd=e=>o.jsxs("svg",{width:18,height:18,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("circle",{cx:"7",cy:"7",r:"5"}),o.jsx("path",{d:"M14 14l-3.5-3.5"})]});function Va({query:e,onQueryChange:t,results:n,onSelectResult:r,onOpenChange:s}){const i=b.useRef(null),a=b.useRef(null),[l,c]=b.useState(!1),[u,d]=b.useState(-1),f="asyncapi-search-results",{portalHost:p,rootElement:m,topOffset:h=0}=Ue(),x=()=>{c(!1),d(-1)};b.useEffect(()=>(s==null||s(l),()=>s==null?void 0:s(!1)),[l,s]);const k=b.useRef(!1),j=b.useRef(!1);b.useEffect(()=>{if(!m)return;const v=()=>{k.current=!0},y=()=>{k.current=!1};return m.addEventListener("mouseenter",v),m.addEventListener("mouseleave",y),()=>{m.removeEventListener("mouseenter",v),m.removeEventListener("mouseleave",y)}},[m]),b.useEffect(()=>{if(!m)return;const v=y=>{j.current=m.contains(y.target)};return document.addEventListener("mousedown",v,!0),()=>document.removeEventListener("mousedown",v,!0)},[m]),b.useEffect(()=>{if(!m)return;const v=y=>{!(y.metaKey||y.ctrlKey)||y.key.toLowerCase()!=="k"||!(m.contains(document.activeElement)||k.current||j.current)||(y.preventDefault(),c(!0))};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[m]),b.useEffect(()=>{if(!l)return;const v=requestAnimationFrame(()=>{var y;return(y=a.current)==null?void 0:y.focus()});return()=>cancelAnimationFrame(v)},[l]),b.useEffect(()=>{if(!(!l||!p))return Ba(uo(p))},[l,p]),b.useEffect(()=>{if(!l)return;const v=y=>{y.key==="Escape"&&x()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[l]),b.useEffect(()=>{if(!l)return;const v=y=>{i.current&&!i.current.contains(y.target)&&x()};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[l]),b.useEffect(()=>{u>=n.length&&d(n.length-1)},[u,n.length]);const C=l&&e.trim().length>0,E=v=>{x(),r(v)},R=v=>{if(v.key==="Escape"){v.preventDefault(),x();return}if(C){if(v.key==="ArrowDown"){v.preventDefault(),d(y=>n.length===0?-1:Math.min(y+1,n.length-1));return}if(v.key==="ArrowUp"){v.preventDefault(),d(y=>n.length===0?-1:y<=0?n.length-1:y-1);return}if(v.key==="Home"){v.preventDefault(),n.length>0&&d(0);return}if(v.key==="End"){v.preventDefault(),n.length>0&&d(n.length-1);return}if(v.key==="Enter"&&u>=0&&n[u]){v.preventDefault(),E(n[u]);return}}},D=v=>`asyncapi-search-result-${v}`,_=C?`${n.length} result${n.length===1?"":"s"} found`:"",A=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent);return o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>c(!0),title:"Search","aria-label":"Search",className:"panel-toggle-btn bg-neutral-100",children:o.jsx(pd,{})}),l&&p&&Pr.createPortal(o.jsxs("div",{className:"fixed inset-0 z-[60] flex justify-center px-4 pt-24",style:{top:h},children:[o.jsx("div",{className:"absolute inset-0 bg-black/30"}),o.jsxs("div",{ref:i,className:"relative h-fit w-full max-w-[36rem] overflow-hidden rounded-lg border border-border bg-surface shadow-xl",children:[o.jsx("div",{className:"p-4",children:o.jsx("input",{ref:a,id:"asyncapi-search",type:"search",value:e,onChange:v=>t(v.target.value),onKeyDown:R,placeholder:"Search document...","aria-label":"Search document",role:"combobox","aria-haspopup":"listbox","aria-expanded":C,"aria-controls":f,"aria-autocomplete":"list","aria-activedescendant":u>=0?D(u):void 0,className:"w-full rounded-md bg-surface px-4 py-3 text-sm text-foreground placeholder:text-foreground-muted focus:outline-none"})}),o.jsx("div",{"aria-live":"polite",className:"sr-only",children:_}),C&&o.jsx("div",{id:f,role:"listbox",className:"max-h-80 overflow-y-auto",children:n.length>0?o.jsx("ul",{className:"divide-y divide-border",children:n.map((v,y)=>o.jsx("li",{children:o.jsxs("button",{id:D(y),type:"button",role:"option","aria-selected":u===y,onClick:()=>E(v),className:"w-full text-left px-4 py-3 hover:bg-neutral-50 "+(u===y?"bg-neutral-100":""),children:[o.jsx("div",{className:"text-sm font-semibold text-foreground",children:v.name}),o.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-foreground-muted",children:[o.jsx("span",{children:v.location}),v.subtitle&&o.jsxs("span",{children:["• ",v.subtitle]})]})]})},v.id))}):o.jsx("div",{className:"px-4 py-4 text-sm text-foreground-muted",children:"No results found."})}),o.jsxs("div",{className:"flex items-center justify-center gap-1 px-4 py-1.5 text-xs text-foreground-muted",children:["Press",o.jsx("kbd",{className:"rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]",children:A?"⌘ Cmd":"Ctrl"}),o.jsx("kbd",{className:"rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]",children:"K"}),"to search"]})]})]}),p)]})}function Ja({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),o.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function Ya({className:e}){return o.jsx("svg",{className:e||"inline-block",fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z"})})}function zr({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}const hd=["The following is API documentation in Markdown.","Use it to answer questions about this API and help write client code.","Stick to what is documented below - do not invent endpoints, fields, or behavior."];function Xa(e){return`${["> ## Agent Instructions",...hd.map(n=>`> ${n}`)].join(`
4
4
  `)}
5
5
 
6
- ${e.trimStart()}`}function Za({serialize:e,onOpenChange:t}){const[n,r]=b.useState(!1),[s,i]=b.useState(!1),a=b.useRef(null),l=b.useRef(void 0),{deref:c}=Ue(),u=()=>Xa(e(c));b.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),b.useEffect(()=>(t==null||t(n),()=>t==null?void 0:t(!1)),[n,t]),b.useEffect(()=>{if(!n)return;const p=m=>{m.key==="Escape"&&r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[n]),b.useEffect(()=>{if(!n)return;const p=m=>{a.current&&!a.current.contains(m.target)&&r(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[n]);const d=async()=>{const p=u();console.log("[MarkdownExportMenu] Copy for LLM clicked",{markdownLength:p.length,hasClipboardApi:!!navigator.clipboard,isSecureContext:window.isSecureContext});try{if(!navigator.clipboard)throw new Error("navigator.clipboard is unavailable (requires a secure context: https or localhost)");await navigator.clipboard.writeText(p),console.log("[MarkdownExportMenu] clipboard.writeText succeeded"),i(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>i(!1),2e3)}catch(m){console.error("[MarkdownExportMenu] Copy for LLM failed:",m)}r(!1)},f=()=>{const p=u(),m=new Blob([p],{type:"text/markdown"}),h=URL.createObjectURL(m);console.log("[MarkdownExportMenu] View as Markdown clicked",{markdownLength:p.length,blobUrl:h}),window.open(h,"_blank")||console.error("[MarkdownExportMenu] window.open returned null — the popup was likely blocked by the browser's popup blocker."),setTimeout(()=>URL.revokeObjectURL(h),3e4),r(!1)};return o.jsxs("div",{ref:a,className:"relative",children:[o.jsxs("button",{type:"button",onClick:()=>r(p=>!p),title:"Copy as Markdown","aria-label":"Copy as Markdown","aria-haspopup":"menu","aria-expanded":n,className:"panel-toggle-btn panel-toggle-btn--labeled bg-neutral-100 hover:bg-neutral-200",children:[s?o.jsx(Ya,{className:"w-4 h-4 shrink-0 text-green-600"}):o.jsx(Ja,{className:"w-4 h-4 shrink-0"}),o.jsx("span",{children:s?"Copied!":"Copy as Markdown"}),o.jsx(Ln,{className:`w-3 h-3 shrink-0 transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&o.jsxs("div",{role:"menu",className:"absolute right-0 top-11 z-[41] w-56 overflow-hidden rounded-lg border border-border bg-surface shadow-xl",children:[o.jsxs("button",{type:"button",role:"menuitem",onClick:d,className:"flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left hover:bg-neutral-100",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:s?"Copied!":"Copy for LLM"}),o.jsx("span",{className:"text-xs text-foreground-muted",children:"Copy page as Markdown"})]}),o.jsxs("button",{type:"button",role:"menuitem",onClick:f,className:"flex w-full items-start justify-between gap-2 px-3 py-2 text-left hover:bg-neutral-100 border-t border-border",children:[o.jsxs("span",{className:"flex flex-col items-start gap-0.5",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"View as Markdown"}),o.jsx("span",{className:"text-xs text-foreground-muted",children:"Open this page as Markdown"})]}),o.jsx(zr,{className:"w-3.5 h-3.5 mt-0.5 shrink-0 text-foreground-muted"})]})]})]})}const yt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),br=(e,t=new Set)=>e==null?"":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?e.map(n=>br(n,t)).join(" "):e instanceof Map?Array.from(e.entries()).flatMap(([n,r])=>[n,br(r,t)]).join(" "):yt(e)?t.has(e)?"":(t.add(e),Object.entries(e).flatMap(([n,r])=>[n,br(r,t)]).join(" ")):"",Ve=e=>br(e).trim().replace(/\s+/g," "),md=(e,t)=>t.length?`schema-${e}-${t.join("-")}`:`schema-${e}`,gd=new Set(["properties","items","allOf","oneOf","anyOf","additionalProperties","patternProperties","propertyNames","not","if","then","else","contains","additionalItems","prefixItems","definitions","$defs"]),xd=e=>{if(!yt(e))return e;const t={};for(const[n,r]of Object.entries(e))gd.has(n)||(t[n]=r);return t},Qa=(e,t,n,r)=>{const s=`schema-${n}`,i=(l,c,u,d)=>{const f=`components.schemas.${n}${c.length?`.${c.join(".")}`:""}`,p=`Schemas > ${r}${u.length?` > ${u.join(" > ")}`:""}`,m=yt(l)?l.description:void 0,h=c.length?`${r}.${c.join(".")}`:r;e.push({id:`schema-${n}-${c.join("-")||"root"}`,targetId:d?md(n,d):s,type:"schema",tab:"schemas",key:n,name:h,path:f,location:p,subtitle:m,text:Ve([xd(l)]),schemaFocusTokens:d&&d.length>0?d:void 0})},a=(l,c=[],u=[],d=[],f=new Set)=>{if(i(l,c,u,d),!yt(l)||f.has(l))return;if(f.add(l),yt(l.properties))for(const[m,h]of Object.entries(l.properties))a(h,[...c,"properties",m],[...u,m],d?[...d,"properties",m]:null,f);const p=l.items;yt(p)?a(p,[...c,"items"],[...u,"items"],d?[...d,"items"]:null,f):Array.isArray(p)&&p.forEach((m,h)=>{a(m,[...c,`items[${h}]`],[...u,`items[${h}]`],null,f)});for(const m of["allOf","oneOf","anyOf"]){const h=l[m];Array.isArray(h)&&h.forEach((x,k)=>{a(x,[...c,`${m}[${k}]`],[...u,`${m}[${k}]`],d&&m!=="allOf"?[...d,`${m}[${k}]`]:null,f)})}yt(l.additionalProperties)&&a(l.additionalProperties,[...c,"additionalProperties"],[...u,"additionalProperties"],null,f)};a(t)};function bd(e){var n,r;const t=[];if(e.info){const s=e.info.title??"Info",i=e.info.description??void 0;t.push({id:"info-panel",targetId:"info-panel",type:"info",tab:"info",key:"info",name:s,path:"info",location:"Info",subtitle:i,text:Ve([e.info,e.info.title,e.info.description,e.info.license,e.info.externalDocs,e.info.contact,e.info.tags])})}if(e.servers)for(const[s,i]of Object.entries(e.servers)){const a=i,l=a.description??s,c=[a.protocol,a.host].filter(Boolean).join(" ");t.push({id:`server-${s}`,targetId:`server-${s}`,type:"server",tab:"servers",key:s,name:s,path:`servers.${s}`,location:`Servers > ${s}`,subtitle:c,text:Ve([s,l,c,a.description,a.protocol,a.host,a.variables,a.security,a.bindings])});const u=a.security;Array.isArray(u)&&u.length>0&&t.push({id:`server-${s}-security`,targetId:`server-${s}-security`,type:"server",tab:"servers",key:s,name:`${s} > Authorization`,path:`servers.${s}.security`,location:`Servers > ${s} > Authorization`,focusSection:"security",text:Ve(u)});const d=a.bindings,f=yt(d)&&a.protocol?d[a.protocol]:void 0;f!=null&&t.push({id:`server-${s}-bindings`,targetId:`server-${s}-bindings`,type:"server",tab:"servers",key:s,name:`${s} > ${a.protocol} configuration`,path:`servers.${s}.bindings.${a.protocol}`,location:`Servers > ${s} > ${a.protocol} configuration`,focusSection:`binding:${a.protocol}`,text:Ve(f)})}if(e.operations)for(const[s,i]of Object.entries(e.operations)){const a=i.title??s,l=i.summary??i.description??i.action??"";t.push({id:`operation-${s}`,targetId:`operation-${s}-detail`,type:"operation",tab:"operations",key:s,name:a,path:`operations.${s}`,location:`Operations > ${a}`,subtitle:l,text:Ve([s,a,l,i.action,i.channel,i.messages,i.reply,i.traits,i.bindings,i.security,i.tags])});const c=i.security;Array.isArray(c)&&c.length>0&&t.push({id:`operation-${s}-security`,targetId:`operation-${s}-security`,type:"operation",tab:"operations",key:s,name:`${a} > Authorization`,path:`operations.${s}.security`,location:`Operations > ${a} > Authorization`,focusSection:"security",text:Ve(c)});const u=i.bindings;if(yt(u))for(const[d,f]of Object.entries(u))f!=null&&t.push({id:`operation-${s}-bindings-${d}`,targetId:`operation-${s}-bindings-${d}`,type:"operation",tab:"operations",key:s,name:`${a} > ${d} configuration`,path:`operations.${s}.bindings.${d}`,location:`Operations > ${a} > ${d} configuration`,focusSection:`binding:${d}`,text:Ve(f)})}if((n=e.components)!=null&&n.messages)for(const[s,i]of Object.entries(e.components.messages)){const a=i.title??i.name??s,l=i.summary??i.description??i.contentType??"";t.push({id:`message-${s}`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:a,path:`components.messages.${s}`,location:`Messages > ${a}`,subtitle:l,text:Ve([s,a,l,i.contentType,i.payload,i.headers,i.correlationId,i.tags,i.externalDocs,i.bindings])}),i.payload&&t.push({id:`message-${s}-payload`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:`${a} > Payload`,path:`components.messages.${s}.payload`,location:`Messages > ${a} > Payload`,focusSection:"payload",text:Ve(i.payload)}),i.headers&&t.push({id:`message-${s}-headers`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:`${a} > Headers`,path:`components.messages.${s}.headers`,location:`Messages > ${a} > Headers`,focusSection:"headers",text:Ve(i.headers)})}if((r=e.components)!=null&&r.schemas)for(const[s,i]of Object.entries(e.components.schemas))Qa(t,i,s,s);return t}function It(e){return Array.isArray?Array.isArray(e):el(e)==="[object Array]"}function yd(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rs(e){return e==null?"":yd(e)}function De(e){return typeof e=="string"}function yr(e){return typeof e=="number"}function wd(e){return e===!0||e===!1||kd(e)&&el(e)=="[object Boolean]"}function qa(e){return typeof e=="object"}function kd(e){return qa(e)&&e!==null}function Qe(e){return e!=null}function cr(e){return!e.trim().length}function el(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const vd="Incorrect 'index' type",Ms="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Sd=e=>`Invalid value for key ${e}`,Ed=e=>`Pattern length exceeds max of ${e}.`,jd=e=>`Missing ${e} property in key`,Ad=e=>`Property 'weight' in key '${e}' must be a positive integer`,Nd="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",Bi=Object.prototype.hasOwnProperty;var Td=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const r=tl(n);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function tl(e){let t=null,n=null,r=null,s=1,i=null;if(De(e)||It(e))r=e,t=Fi(e),n=wr(e);else{if(!Bi.call(e,"name"))throw new Error(jd("name"));const a=e.name;if(r=a,Bi.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(Ad(wr(a)));t=Fi(a),n=wr(a),i=e.getFn??null}return{path:t,id:n,weight:s,src:r,getFn:i}}function Fi(e){return It(e)?e:e.split(".")}function wr(e){return It(e)?e.join("."):e}function _d(e,t){const n=[];let r=!1;const s=(i,a,l,c)=>{if(Qe(i))if(!a[l])n.push(c!==void 0?{v:i,i:c}:i);else{const u=i[a[l]];if(!Qe(u))return;if(l===a.length-1&&(De(u)||yr(u)||wd(u)||typeof u=="bigint"))n.push(c!==void 0?{v:Rs(u),i:c}:Rs(u));else if(It(u)){r=!0;for(let d=0,f=u.length;d<f;d+=1)s(u[d],a,l+1,d)}else a.length&&s(u,a,l+1,c)}};return s(e,De(t)?t.split("."):t,0),r?n:n[0]}const Cd={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},$d={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Od={location:0,threshold:.6,distance:100},Id={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:_d,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},ne=Object.freeze({...$d,...Cd,...Od,...Id});function Rd(e){return e>=9&&e<=13||e===32||e===160}function Md(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(s){let i=0,a=!1;for(let c=0;c<s.length;c++)Rd(s.charCodeAt(c))?a=!1:a||(i++,a=!0);if(i===0&&(i=1),n.has(i))return n.get(i);const l=Math.round(r/Math.pow(i,.5*e))/r;return n.set(i,l),l},clear(){n.clear()}}}var go=class{constructor({getFn:e=ne.getFn,fieldNormWeight:t=ne.fieldNormWeight}={}){this.norm=Md(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(De(this.docs[0]))for(let n=0;n<e;n++){const r=this._createStringRecord(this.docs[n],n);r&&(this.records[t++]=r)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Ms);if(De(e)){const r=this._createStringRecord(e,t);return r&&this.records.push(r),r}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Ms);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const r of e)Number.isInteger(r)&&r>=0&&t.add(r);if(t.size===0)return;this.records=this.records.filter(r=>!t.has(r.i));const n=Array.from(t).sort((r,s)=>r-s);for(const r of this.records){let s=0,i=n.length;for(;s<i;){const a=s+i>>>1;n[a]<r.i?s=a+1:i=a}r.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!Qe(e)||cr(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let r=0,s=this.keys.length;r<s;r++){const i=this.keys[r],a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Qe(a)){if(It(a)){const l=[];for(let c=0,u=a.length;c<u;c+=1){const d=a[c];if(Qe(d)){if(De(d)){if(!cr(d)){const f={v:d,i:c,n:this.norm.get(d)};l.push(f)}}else if(Qe(d.v)){const f=De(d.v)?d.v:Rs(d.v);if(!cr(f)){const p={v:f,i:d.i,n:this.norm.get(f)};l.push(p)}}}}n.$[r]=l}else if(De(a)&&!cr(a)){const l={v:a,n:this.norm.get(a)};n.$[r]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function nl(e,t,{getFn:n=ne.getFn,fieldNormWeight:r=ne.fieldNormWeight}={}){const s=new go({getFn:n,fieldNormWeight:r});return s.setKeys(e.map(tl)),s.setSources(t),s.create(),s}function Ld(e,{getFn:t=ne.getFn,fieldNormWeight:n=ne.fieldNormWeight}={}){const{keys:r,records:s}=e,i=new go({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(s),i}function Pd(e=[],t=ne.minMatchCharLength){const n=[];let r=-1,s=-1,i=0;for(let a=e.length;i<a;i+=1){const l=e[i];l&&r===-1?r=i:!l&&r!==-1&&(s=i-1,s-r+1>=t&&n.push([r,s]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}function Dd(e,t,n,{location:r=ne.location,distance:s=ne.distance,threshold:i=ne.threshold,findAllMatches:a=ne.findAllMatches,minMatchCharLength:l=ne.minMatchCharLength,includeMatches:c=ne.includeMatches,ignoreLocation:u=ne.ignoreLocation}={}){if(t.length>32)throw new Error(Ed(32));const d=t.length,f=e.length,p=Math.max(0,Math.min(r,f));let m=i,h=p;const x=(y,F)=>{const Z=y/d;if(u)return Z;const N=Math.abs(p-F);return s?Z+N/s:N?1:Z},k=l>1||c,j=k?Array(f):[];let C;for(;(C=e.indexOf(t,h))>-1;){const y=x(0,C);if(m=Math.min(y,m),h=C+d,k){let F=0;for(;F<d;)j[C+F]=1,F+=1}}h=-1;let E=[],R=1,D=0,_=d+f;const A=1<<d-1;for(let y=0;y<d;y+=1){let F=0,Z=_;for(;F<Z;)x(y,p+Z)<=m?F=Z:_=Z,Z=Math.floor((_-F)/2+F);_=Z;let N=Math.max(1,p-Z+1);const W=a?f:Math.min(p+Z,f)+d,ie=Array(W+2);ie[W+1]=(1<<y)-1;for(let oe=W;oe>=N;oe-=1){const S=oe-1,T=n[e[S]];if(ie[oe]=(ie[oe+1]<<1|1)&T,y&&(ie[oe]|=(E[oe+1]|E[oe])<<1|1|E[oe+1]),ie[oe]&A&&(R=x(y,S),R<=m)){if(m=R,h=S,D=y,h<=p)break;N=Math.max(1,2*p-h)}}if(x(y+1,p)>m)break;E=ie}if(k&&h>=0){const y=Math.min(f-1,h+d-1+D);for(let F=h;F<=y;F+=1)n[e[F]]&&(j[F]=1)}const v={isMatch:h>=0,score:Math.max(.001,R)};if(k){const y=Pd(j,l);y.length?c&&(v.indices=y):v.isMatch=!1}return v}function Bd(e){const t={};for(let n=0,r=e.length;n<r;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<r-n-1}return t}function xo(e){if(e.length<=1)return e;e.sort((n,r)=>n[0]-r[0]||n[1]-r[1]);const t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){const s=t[t.length-1],i=e[n];i[0]<=s[1]+1?s[1]=Math.max(s[1],i[1]):t.push(i)}return t}const rl={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},Fd=new RegExp("["+Object.keys(rl).join("")+"]","g"),Tn=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(Fd,t=>rl[t]):e=>e;var bo=class{constructor(e,{location:t=ne.location,threshold:n=ne.threshold,distance:r=ne.distance,includeMatches:s=ne.includeMatches,findAllMatches:i=ne.findAllMatches,minMatchCharLength:a=ne.minMatchCharLength,isCaseSensitive:l=ne.isCaseSensitive,ignoreDiacritics:c=ne.ignoreDiacritics,ignoreLocation:u=ne.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:l,ignoreDiacritics:c,ignoreLocation:u},e=l?e:e.toLowerCase(),e=c?Tn(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(p,m)=>{this.chunks.push({pattern:p,alphabet:Bd(p),startIndex:m})},f=this.pattern.length;if(f>32){let p=0;const m=f%32,h=f-m;for(;p<h;)d(this.pattern.substr(p,32),p),p+=32;if(m){const x=f-32;d(this.pattern.substr(x),x)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Tn(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const h={isMatch:!0,score:0};return r&&(h.indices=[[0,e.length-1]]),h}const{location:s,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,ignoreLocation:u}=this.options,d=[];let f=0,p=!1;this.chunks.forEach(({pattern:h,alphabet:x,startIndex:k})=>{const{isMatch:j,score:C,indices:E}=Dd(e,h,x,{location:s+k,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,includeMatches:r,ignoreLocation:u});j&&(p=!0),f+=C,j&&E&&d.push(...E)});const m={isMatch:p,score:p?f/this.chunks.length:1};return p&&r&&(m.indices=xo(d)),m}};const zd=new Set(["fuzzy","include"]);function Ud(e){return e.startsWith("inverse")}const Ls=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,r;const s=[],i=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+i,s.push([r,n-1]);const a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new bo(e,{location:t.location??ne.location,threshold:t.threshold??ne.threshold,distance:t.distance??ne.distance,includeMatches:t.includeMatches??ne.includeMatches,findAllMatches:t.findAllMatches??ne.findAllMatches,minMatchCharLength:t.minMatchCharLength??ne.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??ne.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??ne.ignoreDiacritics,ignoreLocation:t.ignoreLocation??ne.ignoreLocation});return{type:"fuzzy",search(r){return n.searchIn(r)}}}}],zi=Ls.length,Hd="\0",Wd="|";function Gd(e){const t=[],n=e.length;let r=0;for(;r<n;){for(;r<n&&e[r]===" ";)r++;if(r>=n)break;let s=r;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const i=s+1;if(i>=n||e[i]===" "){s++;break}if(e[i]==="$"&&(i+1>=n||e[i+1]===" ")){s+=2;break}}s++}t.push(e.substring(r,s)),r=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(r,s)),r=s}}return t}function Ui(e,t){const n=e.match(t);return n?n[1]:null}function Kd(e,t={}){return e.replace(/\\\|/g,Hd).split(Wd).map(n=>{const r=Gd(n.replace(/\u0000/g,"|").trim()).filter(i=>i&&!!i.trim()),s=[];for(let i=0,a=r.length;i<a;i+=1){const l=r[i];let c=!1,u=-1;for(;!c&&++u<zi;){const d=Ls[u],f=Ui(l,d.multiRegex);f&&(s.push(d.create(f,t)),c=!0)}if(!c)for(u=-1;++u<zi;){const d=Ls[u],f=Ui(l,d.singleRegex);if(f){s.push(d.create(f,t));break}}}return s})}var Vd=class{constructor(e,{isCaseSensitive:t=ne.isCaseSensitive,ignoreDiacritics:n=ne.ignoreDiacritics,includeMatches:r=ne.includeMatches,minMatchCharLength:s=ne.minMatchCharLength,ignoreLocation:i=ne.ignoreLocation,findAllMatches:a=ne.findAllMatches,location:l=ne.location,threshold:c=ne.threshold,distance:u=ne.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:s,findAllMatches:a,ignoreLocation:i,location:l,threshold:c,distance:u},e=t?e:e.toLowerCase(),e=n?Tn(e):e,this.pattern=e,this.query=Kd(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:s}=this.options;e=r?e:e.toLowerCase(),e=s?Tn(e):e;let i=0;const a=[];let l=0,c=!1;for(let u=0,d=t.length;u<d;u+=1){const f=t[u];a.length=0,i=0,c=!1;for(let p=0,m=f.length;p<m;p+=1){const h=f[p],{isMatch:x,indices:k,score:j}=h.search(e);if(x)i+=1,l+=j,Ud(h.type)&&(c=!0),n&&(zd.has(h.type)?a.push(...k):a.push(k));else{l=0,i=0,a.length=0,c=!1;break}}if(i){const p={isMatch:!0,score:l/i};return c&&(p.hasInverse=!0),n&&(p.indices=xo(a)),p}}return{isMatch:!1,score:1}}};const Ps=[];function yo(...e){Ps.push(...e)}function jr(e,t){for(let n=0,r=Ps.length;n<r;n+=1){const s=Ps[n];if(s.condition(e,t))return new s(e,t)}return new bo(e,t)}const Ar={AND:"$and",OR:"$or"},Ds={PATH:"$path",PATTERN:"$val"},Bs=e=>!!(e[Ar.AND]||e[Ar.OR]),Jd=e=>!!e[Ds.PATH],Yd=e=>!It(e)&&qa(e)&&!Bs(e),Hi=e=>({[Ar.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function sl(e,t,{auto:n=!0}={}){const r=s=>{if(De(s)){const c={keyId:null,pattern:s};return n&&(c.searcher=jr(s,t)),c}const i=Object.keys(s),a=Jd(s);if(!a&&i.length>1&&!Bs(s))return r(Hi(s));if(Yd(s)){const c=a?s[Ds.PATH]:i[0],u=a?s[Ds.PATTERN]:s[c];if(!De(u))throw new Error(Sd(c));const d={keyId:wr(c),pattern:u};return n&&(d.searcher=jr(u,t)),d}const l={children:[],operator:i[0]};return i.forEach(c=>{const u=s[c];It(u)&&u.forEach(d=>{l.children.push(r(d))})}),l};return Bs(e)||(e=Hi(e)),r(e)}function Fs(e,{ignoreFieldNorm:t=ne.ignoreFieldNorm}){let n=1;return e.forEach(({key:r,norm:s,score:i})=>{const a=r?r.weight:null;n*=Math.pow(i===0&&a?Number.EPSILON:i,(a||1)*(t?1:s))}),n}function Xd(e,{ignoreFieldNorm:t=ne.ignoreFieldNorm}){e.forEach(n=>{n.score=Fs(n.matches,{ignoreFieldNorm:t})})}var Zd=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let r=e;do{e=r;const s=2*e+1,i=2*e+2;if(s<n&&this.comparator(t[s],t[r])>0&&(r=s),i<n&&this.comparator(t[i],t[r])>0&&(r=i),r!==e){const a=t[e];t[e]=t[r],t[r]=a}}while(r!==e)}};function Qd(e){const t=[];return e.matches.forEach(n=>{if(!Qe(n.indices)||!n.indices.length)return;const r={indices:n.indices,value:n.value};n.key&&(r.key=n.key.id),n.idx>-1&&(r.refIndex=n.idx),t.push(r)}),t}function qd(e,t,{includeMatches:n=ne.includeMatches,includeScore:r=ne.includeScore}={}){return e.map(s=>{const{idx:i}=s,a={item:t[i],refIndex:i};return n&&(a.matches=Qd(s)),r&&(a.score=s.score),a})}const ef=/[\p{L}\p{M}\p{N}_]+/gu,Wi=new WeakSet;function tf(e){Wi.has(e)||(Wi.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function nf(e){if(typeof e=="function"){let t=!1;return n=>{const r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?"array containing non-strings":typeof r}.`);return r}}return e instanceof RegExp?(e.global||tf(e),t=>t.match(e)||[]):t=>t.match(ef)||[]}function zs({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const r=nf(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=Tn(s)),r(s)}}}var rf=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=zs({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:r,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const i of n){this.termSearchers.push(new bo(i,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const a=r.get(i)||0,l=Math.log(1+(s-a+.5)/(a+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,r=0,s=0,i=0;const a=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const d=this.termSearchers[u].searchIn(e),f=this.idfWeights[u];r+=f,d.isMatch&&(s++,n+=f*(1-d.score),d.indices&&t.push(...d.indices),this.combineAll&&(this.useMask?i|=1<<u:a.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(c.indices=xo(t)),this.combineAll&&(this.useMask?c.matchedMask=i:c.matchedTerms=a,c.termCount=this.numTerms),c}};function ys(e,t,n,r){const s=r.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const i=new Set(s);let a=e.docTermFieldHits.get(n);a||(a=new Map,e.docTermFieldHits.set(n,a));for(const l of i)a.set(l,(a.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function ol(e,t,n,r){const{i:s,v:i,$:a}=t;if(i!==void 0){ys(e,i,s,r);return}if(a)for(let l=0;l<n;l++){const c=a[l];if(c)if(Array.isArray(c))for(const u of c)ys(e,u.v,s,r);else ys(e,c.v,s,r)}}function sf(e,t,n){const r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)ol(r,s,t,n);return r}function of(e,t,n,r){ol(e,t,n,r)}function af(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const r=e.docTermFieldHits.get(t);if(r){for(const[s,i]of r){const a=(e.df.get(s)||0)-i;a<=0?e.df.delete(s):e.df.set(s,a)}e.docTermFieldHits.delete(t)}}function Gi(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,c)=>l-c);for(const l of n)af(e,l);const r=l=>{let c=0,u=n.length;for(;c<u;){const d=c+u>>>1;n[d]<l?c=d+1:u=d}return l-c},s=n[0],i=new Map;for(const[l,c]of e.docFieldCount)i.set(l>s?r(l):l,c);e.docFieldCount=i;const a=new Map;for(const[l,c]of e.docTermFieldHits)a.set(l>s?r(l):l,c);e.docTermFieldHits=a}var Rt=class{constructor(e,t,n){this.options={...ne,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Td(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=jr(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof go))throw new Error(vd);if(this._myIndex=t||nl(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=zs({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=sf(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!Qe(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=zs({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});of(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let r=0,s=this._docs.length;r<s;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&Gi(this._invertedIndex,n);const r=new Set(n);this._docs=this._docs.filter((s,i)=>!r.has(i)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(Ms);this._invertedIndex&&Gi(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:r,includeScore:s,shouldSort:i,sortFn:a,ignoreFieldNorm:l}=this.options;if(De(e)&&!e.trim()){let p=this._docs.map((m,h)=>({item:m,refIndex:h}));return yr(n)&&n>-1&&(p=p.slice(0,n)),p}const c=i&&yr(n)&&n>0&&De(e),u=a,d=(p,m)=>u(p,m)||p.idx-m.idx;let f;if(c){const p=new Zd(n,d);De(this._docs[0])?this._searchStringList(e,{heap:p,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:p,ignoreFieldNorm:l}),f=p.extractSorted()}else f=De(e)?De(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Xd(f,{ignoreFieldNorm:l}),i&&f.sort(De(e)?d:u),yr(n)&&n>-1&&(f=f.slice(0,n));return qd(f,this._docs,{includeMatches:r,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:l,i:c,n:u})=>{if(!Qe(l))return;const d=r.searchIn(l);if(d.isMatch){const f={score:d.score,value:l,norm:u,indices:d.indices};s&&(f.matchedMask=d.matchedMask,f.matchedTerms=d.matchedTerms,f.termCount=d.termCount);const p=[f];if(!s||this._coversAllTokens(p)){const m={item:l,idx:c,matches:p};t?(m.score=Fs(m.matches,{ignoreFieldNorm:n}),t.insert(m)):a.push(m)}}}),a}_searchLogical(e){const t=sl(e,this.options),n=this._normalizedKeys(),r=(l,c,u)=>{if(!("children"in l)){const{keyId:m,searcher:h}=l;let x;return m===null?(x=[],n.forEach((k,j)=>{x.push(...this._findMatches({key:k,value:c[j],searcher:h}))})):x=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(c,m),searcher:h}),x&&x.length?[{idx:u,item:c,matches:x}]:[]}const{children:d,operator:f}=l,p=[];for(let m=0,h=d.length;m<h;m+=1){const x=d[m],k=r(x,c,u);if(k.length)p.push(...k);else if(f===Ar.AND)return[]}return p},s=this._myIndex.records,i=new Map,a=[];return s.forEach(({$:l,i:c})=>{if(Qe(l)){const u=r(t,l,c);u.length&&(i.has(c)||(i.set(c,{idx:c,item:l,matches:[]}),a.push(i.get(c))),u.forEach(({matches:d})=>{i.get(c).matches.push(...d)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:i}=this._myIndex,a=this._normalizedKeys(),l=t?null:[];return i.forEach(({$:c,i:u})=>{if(!Qe(c))return;const d=[];let f=!1,p=!1;if(a.forEach((m,h)=>{const x=this._findMatches({key:m,value:c[h],searcher:r});x.length?(d.push(...x),x[0].hasInverse&&(p=!0)):f=!0}),!(p&&f)&&d.length&&(!s||this._coversAllTokens(d))){const m={idx:u,item:c,matches:d};t?(m.score=Fs(m.matches,{ignoreFieldNorm:n}),t.insert(m)):l.push(m)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!Qe(t))return[];const r=[];if(It(t))t.forEach(({v:s,i,n:a})=>{if(!Qe(s))return;const l=n.searchIn(s);if(l.isMatch){const c={score:l.score,key:e,value:s,idx:i,norm:a,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(c.matchedMask=l.matchedMask,c.matchedTerms=l.matchedTerms,c.termCount=l.termCount),r.push(c)}});else{const{v:s,n:i}=t,a=n.searchIn(s);if(a.isMatch){const l={score:a.score,key:e,value:s,norm:i,indices:a.indices,hasInverse:a.hasInverse};a.termCount!==void 0&&(l.matchedMask=a.matchedMask,l.matchedTerms=a.matchedTerms,l.termCount=a.termCount),r.push(l)}}return r}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let r=0;for(let s=0;s<e.length;s++)r|=e[s].matchedMask||0;return r===2**t-1}const n=new Set;for(let r=0;r<e.length;r++){const s=e[r].matchedTerms;if(s)for(const i of s)n.add(i)}return n.size===t}};Rt.version="7.5.0";Rt.createIndex=nl;Rt.parseIndex=Ld;Rt.config=ne;Rt.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Nd);return jr(e,{...ne,...n}).searchIn(t)};Rt.parseQuery=sl;yo(Vd);yo(rf);Rt.use=function(...e){e.forEach(t=>yo(t))};var lf=Rt;function il(e,t,n={}){const[r,s]=b.useState(""),[i,a]=b.useState(""),l=n.debounceMs??150;b.useEffect(()=>{const f=setTimeout(()=>a(r),l);return()=>clearTimeout(f)},[r,l]);const c=b.useMemo(()=>t(e),[e,t]),u=b.useMemo(()=>new lf(c,{keys:[{name:"name",weight:2},{name:"text",weight:1}],threshold:n.threshold??.3,ignoreLocation:!0,ignoreFieldNorm:!0,includeScore:!0}),[c,n.threshold]),d=b.useMemo(()=>i.trim()?u.search(i.trim(),{limit:n.limit??20}).map(f=>f.item):[],[u,i,n.limit]);return{query:r,setQuery:s,results:d,searchIndex:c}}function cf(e,t={}){return il(e,bd,t)}const Us="search-match",al=()=>typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u";function uf(e,t){const n=t.trim().toLowerCase();if(!n)return[];const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let i=s.nextNode();i;i=s.nextNode()){const a=(i.textContent??"").toLowerCase();let l=0;for(let c=a.indexOf(n);c!==-1;c=a.indexOf(n,l)){const u=document.createRange();u.setStart(i,c),u.setEnd(i,c+n.length),r.push(u),l=c+n.length}}return r}function df(e,t){if(!al())return;const n=uf(e,t);if(!n.length){CSS.highlights.delete(Us);return}CSS.highlights.set(Us,new Highlight(...n))}function ws(){al()&&CSS.highlights.delete(Us)}function ff(e,t){const n=b.useRef(null);b.useEffect(()=>{if(!e)return;const{targetId:r,query:s,highlight:i}=e;let a=!1;const l=u=>{if(a)return;const d=document.getElementById(r);if(!d){u<40&&setTimeout(()=>l(u+1),50);return}if(n.current!==r){try{d.scrollIntoView({behavior:"smooth",block:"start"})}catch{}n.current=r}i&&c(0)},c=u=>{if(a)return;const d=document.getElementById(r);d&&df(d,s),u<6&&setTimeout(()=>c(u+1),100)};return setTimeout(()=>l(0),50),()=>{a=!0}},[e,...t])}function ll({tabs:e,defaultTab:t,isTabKey:n,sections:r,searchQuery:s}){var Z;const i=((Z=e[0])==null?void 0:Z.id)??t,[a,l]=b.useState(i),[c,u]=b.useState(null),d=N=>{l(N),u(N)},[f,p]=b.useState({}),m=e.some(N=>N.id===a)?a:i,h={};for(const N of r)h[N.id]=N.visible?f[N.id]??null:null;const x=(N,W)=>p(ie=>({...ie,[N]:W})),[k,j]=b.useState(null),[C,E]=b.useState(null),[R,D]=b.useState(null),_=N=>{n(N.tab)?d(N.tab):N.tab==="servers"&&u("servers");const W={};for(const ie of r)W[ie.id]=ie.id===N.tab?N.key:null;p(W),j(N.focusSection??null),E(N.tab==="schemas"&&N.schemaFocusTokens?{tokens:N.schemaFocusTokens,id:N.targetId}:null),N.tab==="schemas"&&ws(),D({targetId:N.targetId,query:s,highlight:N.tab!=="schemas"})},A=(N,W)=>{d(N),p(ie=>{const oe={...ie};for(const S of r)S.id!=="servers"&&(oe[S.id]=S.id===N?W:null);return oe})},v=N=>{u("servers");const W={};for(const ie of r)W[ie.id]=ie.id==="servers"?N:null;p(W)},y=N=>{n(N)&&d(N)},F=(()=>{for(const N of r){const W=h[N.id];if(W)return{tab:N.id,key:W}}return null})();return ff(R,[m,k,C,...r.map(N=>h[N.id])]),b.useEffect(()=>{s.trim()||(D(null),ws())},[s]),b.useEffect(()=>ws,[]),{effectiveTab:m,focusTab:d,navActiveSection:c??m,selected:h,setSelectedKey:x,selectedNavItem:F,handleSearchSelect:_,handleNavItemSelect:A,handleNavServerSelect:v,handleContentTabChange:y,focusSection:k,schemaFocusTarget:C}}const se=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),xt=e=>se(e)?e:null,Ki="^[\0-ÿ]*$",pf=Math.pow(-2,31),hf=Math.pow(2,31)-1,mf=Math.pow(-2,63),gf=Math.pow(2,63)-1,xf={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},wo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};function _n(e){const t=wo(e);if(typeof t.name=="string")return typeof t.namespace=="string"?`${t.namespace}.${t.name}`:t.name}function Hs(e,t,n){e.doc&&(t.description=e.doc),e.default!==void 0&&(t.default=e.default);const r=_n(e);r!==void 0&&n[r]&&(t["x-parser-schema-id"]=r)}function Vi(e,t,n){!(Array.isArray(e.type)&&e.type.includes("null"))&&!n&&(t.required=t.required||[],t.required.push(e.name))}function bf(e,t){let n=e,r=t;if(Array.isArray(e)&&e.length>0){const s=e.length>1&&e[0]==="null";n=e[+s],r.oneOf!==void 0&&(r=r.oneOf[0])}return{type:n,jsonSchema:r}}function yf(e,t,n){if(!(t===void 0||n.examples||Array.isArray(e)))switch(e){case"boolean":n.examples=[typeof t=="boolean"?t:t==="true"];break;case"int":n.examples=[parseInt(t,10)];break;default:n.examples=[t]}}function Ws(e){return Object.keys(e).some(t=>t!=="type"&&t!=="name"&&t!=="namespace")}function Gs(e,t,n){const{type:r,jsonSchema:s}=bf(e,n);yf(r,t.example,s);function i(...a){a.forEach(l=>{let c=!0;l==="minLength"||l==="maxLength"?c=t[l]>-1:l==="multipleOf"&&(c=t[l]>0),t[l]!==void 0&&c&&(s[l]=t[l])})}switch(r){case"int":case"long":case"float":case"double":i("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":t.logicalType&&(s.format=t.logicalType),i("pattern","minLength","maxLength");break;case"array":i("minItems","maxItems","uniqueItems");break}}function ko(e,t,n){t!==void 0&&(e[t]=n)}function Cn(e,t){let n={};if(Array.isArray(e))return kf(n,e,t);const r=wo(e),s=typeof e=="string"?e:r.type;switch(n.type=xf[s],s){case"int":{n.minimum=pf,n.maximum=hf;break}case"long":{n.minimum=mf,n.maximum=gf;break}case"bytes":{n.pattern=Ki;break}case"fixed":{n.pattern=Ki,n.minLength=r.size,n.maxLength=r.size;break}case"map":{n.additionalProperties=Cn(r.values,t);break}case"array":{n.items=Cn(r.items,t);break}case"enum":{n.enum=r.symbols;break}case"float":case"double":{n.format=s;break}case"record":{const i=wf(r,t,n);ko(t,_n(e),n),n.properties=Object.fromEntries(i.entries());break}default:{const i=t[_n(e)]??(typeof s=="string"?t[s]:void 0);i&&(n=Ws(r)?{...i}:i);break}}return Hs(r,n,t),Gs(s,r,n),n}function wf(e,t,n){const r=new Map;for(const s of e.fields??[]){const i=typeof s.type=="string"?t[s.type]:void 0;if(i){const a=Ws(s)?{...i}:i;Vi(s,n,s.default!==void 0),Ws(s)&&(Hs(s,a,t),Gs(s.type,s,a)),r.set(s.name,a)}else{const a=Cn(s.type,t);Vi(s,n,s.default!==void 0),Hs(s,a,t),Gs(s.type,s,a),r.set(s.name,a),ko(t,_n(s.type),a)}}return r}function kf(e,t,n){const r=[];let s=null;for(const i of t){const a=Cn(i,n);(typeof i=="string"?i:wo(i).type)==="null"?s=a:(r.push(a),ko(n,_n(i),a))}return s&&r.push(s),e.oneOf=r,e}function Ks(e){return Cn(e,{})}const Ji=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),vf=new Set(["record","enum","array","map","fixed"]),Yi=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function vo(e){const t=[];return tn(e,"schema",t,new Set),t}function tn(e,t,n,r){if(typeof e=="string"){!Ji.has(e)&&!Yi.test(e)&&n.push(`${t}: "${e}" is not a valid Avro type name`);return}if(Array.isArray(e)){e.length===0&&n.push(`${t}: union must have at least one alternative`),e.forEach((i,a)=>tn(i,`${t}[${a}]`,n,r));return}if(!se(e)){n.push(`${t}: expected an Avro type string, object, or union`);return}if(r.has(e))return;r.add(e);const s=e.type;if(typeof s!="string"){Array.isArray(s)||se(s)?tn(s,`${t}.type`,n,r):n.push(`${t}: missing "type"`);return}if(!Ji.has(s)&&!vf.has(s)&&!Yi.test(s)){n.push(`${t}: unknown Avro type "${s}"`);return}switch(s){case"record":{if(!Array.isArray(e.fields)){n.push(`${t}: record must have a "fields" array`);return}e.fields.forEach((i,a)=>{const l=`${t}.fields[${a}]`;if(!se(i)||typeof i.name!="string"){n.push(`${l}: field must have a string "name"`);return}tn(i.type,`${l}.type`,n,r)});break}case"enum":{const i=e.symbols;(!Array.isArray(i)||i.some(a=>typeof a!="string"))&&n.push(`${t}: enum must have a "symbols" array of strings`);break}case"array":{e.items===void 0?n.push(`${t}: array must have "items"`):tn(e.items,`${t}.items`,n,r);break}case"map":{e.values===void 0?n.push(`${t}: map must have "values"`):tn(e.values,`${t}.values`,n,r);break}case"fixed":{typeof e.size!="number"&&n.push(`${t}: fixed must have a numeric "size"`);break}}}let Nr=null,ks=null;const Vs=new Set;function Sf(){return ks||(ks=Promise.resolve().then(()=>require("./protoToJsonSchema-BBQdrLOM.cjs")).then(e=>{Nr=e.protoToJsonSchema,Vs.forEach(t=>t())})),ks}function Ef(){return Nr||Sf(),Nr}function jf(e){return Vs.add(e),()=>Vs.delete(e)}function Xi(){return Nr!==null}function So(){return b.useSyncExternalStore(jf,Xi,Xi)}const Af="x-parser-original-payload",Tr="x-lib-conversion-error",Nf=/^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i,Tf=/^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;function Pn(e){return typeof e=="string"&&Nf.test(e)}function Dn(e){return typeof e=="string"&&Tf.test(e)}function cl(e){return se(e)&&typeof e.schemaFormat=="string"&&"schema"in e}function ul(e){var t,n;if(typeof e!="string")return null;if(Pn(e)){const r=(t=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:t[1];return r?`avro ${r}`:"avro"}if(Dn(e)){const r=(n=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:n[1];return r?`protobuf ${r}`:"protobuf"}return e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")?null:e}function dl(e){return Pn(e)?"Avro":Dn(e)?"Protobuf":null}function _f(e,t){return t?!1:!e||Pn(e)||Dn(e)?!0:e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")}const Cf=["properties","oneOf","anyOf","allOf","not","$ref","additionalProperties","patternProperties","x-parser-schema-id"],$f=new Set(["record","enum","fixed","map","int","long","float","double","bytes","uuid"]);function Of(e){return typeof e=="string"||Array.isArray(e)?!0:se(e)?typeof e.type=="string"&&$f.has(e.type)||Array.isArray(e.fields)||Array.isArray(e.symbols)?!0:!Cf.some(t=>t in e):!1}function $n(e,t){let n=e;if(t&&se(n)&&typeof n.$ref=="string"){const a=t(n.$ref);a!==void 0&&(n=a)}const r=If(n),s=r.schema.description;if(typeof s=="string")return{...r,description:s};const i=cl(n)?n.description:void 0;return typeof i=="string"?{...r,description:i}:r}function If(e){var a;if(!cl(e))return{schema:xt(e)??e};const{schemaFormat:t}=e,n=e.schema,r=e[Af],s=(a=xt(n))==null?void 0:a[Tr];if(typeof s=="string")return{schema:xt(r)??{},schemaFormat:t,originalSchema:r,conversionError:s};if(r!==void 0)return{schema:xt(n)??{},schemaFormat:t,originalSchema:r};if(Pn(t)&&Of(n)){const l=vo(n);if(l.length>0)return{schema:xt(n)??{},schemaFormat:t,originalSchema:n,conversionError:l[0]};try{return{schema:Ks(n),schemaFormat:t,originalSchema:n}}catch(c){return{schema:xt(n)??{},schemaFormat:t,originalSchema:n,conversionError:c instanceof Error?c.message:"Failed to convert Avro schema"}}}if(Dn(t)&&typeof n=="string"){const l=Ef();if(!l)return{schema:{},schemaFormat:t,originalSchema:n,pendingConversion:!0};try{return{schema:l(n),schemaFormat:t,originalSchema:n}}catch(c){return{schema:{},schemaFormat:t,originalSchema:n,conversionError:c instanceof Error?c.message:"Failed to convert Protobuf schema"}}}const i=xt(n);return i?{schema:i,schemaFormat:t}:{schema:{},schemaFormat:t,originalSchema:n}}const Oe=(e,t)=>`${"#".repeat(e)} ${t}`,z=e=>typeof e=="string"?e.replace(/`/g,"'"):String(e??""),wn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Rf={objects:new Set,refs:new Set};function kr(e,t,n=Rf){if(e===null||typeof e!="object")return e;if(n.objects.has(e)||wn(e)&&typeof e.$ref=="string"&&n.refs.has(e.$ref)){const i=wn(e)?e["x-parser-schema-id"]:void 0;return typeof i=="string"?{$ref:`#/components/schemas/${i} (circular)`}:"[circular reference]"}const r={objects:new Set(n.objects).add(e),refs:wn(e)&&typeof e.$ref=="string"?new Set(n.refs).add(e.$ref):n.refs};if(Array.isArray(e))return e.map(i=>kr(i,t,r));if(wn(e)&&typeof e.$ref=="string"){const i=t==null?void 0:t(e.$ref);return wn(i)||Array.isArray(i)?kr(i,t,r):{$ref:e.$ref}}const s={};for(const[i,a]of Object.entries(e))s[i]=kr(a,t,r);return s}function _r(e,t,n){if(!t)return"";const r=kr(t,n);return`${Oe(4,`\`${z(e)}\``)}
6
+ ${e.trimStart()}`}function Za({serialize:e,onOpenChange:t}){const[n,r]=b.useState(!1),[s,i]=b.useState(!1),a=b.useRef(null),l=b.useRef(void 0),{deref:c}=Ue(),u=()=>Xa(e(c));b.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),b.useEffect(()=>(t==null||t(n),()=>t==null?void 0:t(!1)),[n,t]),b.useEffect(()=>{if(!n)return;const p=m=>{m.key==="Escape"&&r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[n]),b.useEffect(()=>{if(!n)return;const p=m=>{a.current&&!a.current.contains(m.target)&&r(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[n]);const d=async()=>{const p=u();console.log("[MarkdownExportMenu] Copy for LLM clicked",{markdownLength:p.length,hasClipboardApi:!!navigator.clipboard,isSecureContext:window.isSecureContext});try{if(!navigator.clipboard)throw new Error("navigator.clipboard is unavailable (requires a secure context: https or localhost)");await navigator.clipboard.writeText(p),console.log("[MarkdownExportMenu] clipboard.writeText succeeded"),i(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>i(!1),2e3)}catch(m){console.error("[MarkdownExportMenu] Copy for LLM failed:",m)}r(!1)},f=()=>{const p=u(),m=new Blob([p],{type:"text/markdown"}),h=URL.createObjectURL(m);console.log("[MarkdownExportMenu] View as Markdown clicked",{markdownLength:p.length,blobUrl:h}),window.open(h,"_blank")||console.error("[MarkdownExportMenu] window.open returned null — the popup was likely blocked by the browser's popup blocker."),setTimeout(()=>URL.revokeObjectURL(h),3e4),r(!1)};return o.jsxs("div",{ref:a,className:"relative",children:[o.jsxs("button",{type:"button",onClick:()=>r(p=>!p),title:"Copy as Markdown","aria-label":"Copy as Markdown","aria-haspopup":"menu","aria-expanded":n,className:"panel-toggle-btn panel-toggle-btn--labeled bg-neutral-100 hover:bg-neutral-200",children:[s?o.jsx(Ya,{className:"w-4 h-4 shrink-0 text-green-600"}):o.jsx(Ja,{className:"w-4 h-4 shrink-0"}),o.jsx("span",{children:s?"Copied!":"Copy as Markdown"}),o.jsx(cn,{className:`w-3 h-3 shrink-0 transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&o.jsxs("div",{role:"menu",className:"absolute right-0 top-11 z-[41] w-56 overflow-hidden rounded-lg border border-border bg-surface shadow-xl",children:[o.jsxs("button",{type:"button",role:"menuitem",onClick:d,className:"flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left hover:bg-neutral-100",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:s?"Copied!":"Copy for LLM"}),o.jsx("span",{className:"text-xs text-foreground-muted",children:"Copy page as Markdown"})]}),o.jsxs("button",{type:"button",role:"menuitem",onClick:f,className:"flex w-full items-start justify-between gap-2 px-3 py-2 text-left hover:bg-neutral-100 border-t border-border",children:[o.jsxs("span",{className:"flex flex-col items-start gap-0.5",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"View as Markdown"}),o.jsx("span",{className:"text-xs text-foreground-muted",children:"Open this page as Markdown"})]}),o.jsx(zr,{className:"w-3.5 h-3.5 mt-0.5 shrink-0 text-foreground-muted"})]})]})]})}const yt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),br=(e,t=new Set)=>e==null?"":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?e.map(n=>br(n,t)).join(" "):e instanceof Map?Array.from(e.entries()).flatMap(([n,r])=>[n,br(r,t)]).join(" "):yt(e)?t.has(e)?"":(t.add(e),Object.entries(e).flatMap(([n,r])=>[n,br(r,t)]).join(" ")):"",Ve=e=>br(e).trim().replace(/\s+/g," "),md=(e,t)=>t.length?`schema-${e}-${t.join("-")}`:`schema-${e}`,gd=new Set(["properties","items","allOf","oneOf","anyOf","additionalProperties","patternProperties","propertyNames","not","if","then","else","contains","additionalItems","prefixItems","definitions","$defs"]),xd=e=>{if(!yt(e))return e;const t={};for(const[n,r]of Object.entries(e))gd.has(n)||(t[n]=r);return t},Qa=(e,t,n,r)=>{const s=`schema-${n}`,i=(l,c,u,d)=>{const f=`components.schemas.${n}${c.length?`.${c.join(".")}`:""}`,p=`Schemas > ${r}${u.length?` > ${u.join(" > ")}`:""}`,m=yt(l)?l.description:void 0,h=c.length?`${r}.${c.join(".")}`:r;e.push({id:`schema-${n}-${c.join("-")||"root"}`,targetId:d?md(n,d):s,type:"schema",tab:"schemas",key:n,name:h,path:f,location:p,subtitle:m,text:Ve([xd(l)]),schemaFocusTokens:d&&d.length>0?d:void 0})},a=(l,c=[],u=[],d=[],f=new Set)=>{if(i(l,c,u,d),!yt(l)||f.has(l))return;if(f.add(l),yt(l.properties))for(const[m,h]of Object.entries(l.properties))a(h,[...c,"properties",m],[...u,m],d?[...d,"properties",m]:null,f);const p=l.items;yt(p)?a(p,[...c,"items"],[...u,"items"],d?[...d,"items"]:null,f):Array.isArray(p)&&p.forEach((m,h)=>{a(m,[...c,`items[${h}]`],[...u,`items[${h}]`],null,f)});for(const m of["allOf","oneOf","anyOf"]){const h=l[m];Array.isArray(h)&&h.forEach((x,k)=>{a(x,[...c,`${m}[${k}]`],[...u,`${m}[${k}]`],d&&m!=="allOf"?[...d,`${m}[${k}]`]:null,f)})}yt(l.additionalProperties)&&a(l.additionalProperties,[...c,"additionalProperties"],[...u,"additionalProperties"],null,f)};a(t)};function bd(e){var n,r;const t=[];if(e.info){const s=e.info.title??"Info",i=e.info.description??void 0;t.push({id:"info-panel",targetId:"info-panel",type:"info",tab:"info",key:"info",name:s,path:"info",location:"Info",subtitle:i,text:Ve([e.info,e.info.title,e.info.description,e.info.license,e.info.externalDocs,e.info.contact,e.info.tags])})}if(e.servers)for(const[s,i]of Object.entries(e.servers)){const a=i,l=a.description??s,c=[a.protocol,a.host].filter(Boolean).join(" ");t.push({id:`server-${s}`,targetId:`server-${s}`,type:"server",tab:"servers",key:s,name:s,path:`servers.${s}`,location:`Servers > ${s}`,subtitle:c,text:Ve([s,l,c,a.description,a.protocol,a.host,a.variables,a.security,a.bindings])});const u=a.security;Array.isArray(u)&&u.length>0&&t.push({id:`server-${s}-security`,targetId:`server-${s}-security`,type:"server",tab:"servers",key:s,name:`${s} > Authorization`,path:`servers.${s}.security`,location:`Servers > ${s} > Authorization`,focusSection:"security",text:Ve(u)});const d=a.bindings,f=yt(d)&&a.protocol?d[a.protocol]:void 0;f!=null&&t.push({id:`server-${s}-bindings`,targetId:`server-${s}-bindings`,type:"server",tab:"servers",key:s,name:`${s} > ${a.protocol} configuration`,path:`servers.${s}.bindings.${a.protocol}`,location:`Servers > ${s} > ${a.protocol} configuration`,focusSection:`binding:${a.protocol}`,text:Ve(f)})}if(e.operations)for(const[s,i]of Object.entries(e.operations)){const a=i.title??s,l=i.summary??i.description??i.action??"";t.push({id:`operation-${s}`,targetId:`operation-${s}-detail`,type:"operation",tab:"operations",key:s,name:a,path:`operations.${s}`,location:`Operations > ${a}`,subtitle:l,text:Ve([s,a,l,i.action,i.channel,i.messages,i.reply,i.traits,i.bindings,i.security,i.tags])});const c=i.security;Array.isArray(c)&&c.length>0&&t.push({id:`operation-${s}-security`,targetId:`operation-${s}-security`,type:"operation",tab:"operations",key:s,name:`${a} > Authorization`,path:`operations.${s}.security`,location:`Operations > ${a} > Authorization`,focusSection:"security",text:Ve(c)});const u=i.bindings;if(yt(u))for(const[d,f]of Object.entries(u))f!=null&&t.push({id:`operation-${s}-bindings-${d}`,targetId:`operation-${s}-bindings-${d}`,type:"operation",tab:"operations",key:s,name:`${a} > ${d} configuration`,path:`operations.${s}.bindings.${d}`,location:`Operations > ${a} > ${d} configuration`,focusSection:`binding:${d}`,text:Ve(f)})}if((n=e.components)!=null&&n.messages)for(const[s,i]of Object.entries(e.components.messages)){const a=i.title??i.name??s,l=i.summary??i.description??i.contentType??"";t.push({id:`message-${s}`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:a,path:`components.messages.${s}`,location:`Messages > ${a}`,subtitle:l,text:Ve([s,a,l,i.contentType,i.payload,i.headers,i.correlationId,i.tags,i.externalDocs,i.bindings])}),i.payload&&t.push({id:`message-${s}-payload`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:`${a} > Payload`,path:`components.messages.${s}.payload`,location:`Messages > ${a} > Payload`,focusSection:"payload",text:Ve(i.payload)}),i.headers&&t.push({id:`message-${s}-headers`,targetId:`message-${s}`,type:"message",tab:"messages",key:s,name:`${a} > Headers`,path:`components.messages.${s}.headers`,location:`Messages > ${a} > Headers`,focusSection:"headers",text:Ve(i.headers)})}if((r=e.components)!=null&&r.schemas)for(const[s,i]of Object.entries(e.components.schemas))Qa(t,i,s,s);return t}function It(e){return Array.isArray?Array.isArray(e):el(e)==="[object Array]"}function yd(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rs(e){return e==null?"":yd(e)}function De(e){return typeof e=="string"}function yr(e){return typeof e=="number"}function wd(e){return e===!0||e===!1||kd(e)&&el(e)=="[object Boolean]"}function qa(e){return typeof e=="object"}function kd(e){return qa(e)&&e!==null}function Qe(e){return e!=null}function cr(e){return!e.trim().length}function el(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const vd="Incorrect 'index' type",Ms="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Sd=e=>`Invalid value for key ${e}`,Ed=e=>`Pattern length exceeds max of ${e}.`,jd=e=>`Missing ${e} property in key`,Ad=e=>`Property 'weight' in key '${e}' must be a positive integer`,Nd="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",Bi=Object.prototype.hasOwnProperty;var Td=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const r=tl(n);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function tl(e){let t=null,n=null,r=null,s=1,i=null;if(De(e)||It(e))r=e,t=Fi(e),n=wr(e);else{if(!Bi.call(e,"name"))throw new Error(jd("name"));const a=e.name;if(r=a,Bi.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(Ad(wr(a)));t=Fi(a),n=wr(a),i=e.getFn??null}return{path:t,id:n,weight:s,src:r,getFn:i}}function Fi(e){return It(e)?e:e.split(".")}function wr(e){return It(e)?e.join("."):e}function _d(e,t){const n=[];let r=!1;const s=(i,a,l,c)=>{if(Qe(i))if(!a[l])n.push(c!==void 0?{v:i,i:c}:i);else{const u=i[a[l]];if(!Qe(u))return;if(l===a.length-1&&(De(u)||yr(u)||wd(u)||typeof u=="bigint"))n.push(c!==void 0?{v:Rs(u),i:c}:Rs(u));else if(It(u)){r=!0;for(let d=0,f=u.length;d<f;d+=1)s(u[d],a,l+1,d)}else a.length&&s(u,a,l+1,c)}};return s(e,De(t)?t.split("."):t,0),r?n:n[0]}const Cd={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},$d={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Od={location:0,threshold:.6,distance:100},Id={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:_d,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},ne=Object.freeze({...$d,...Cd,...Od,...Id});function Rd(e){return e>=9&&e<=13||e===32||e===160}function Md(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(s){let i=0,a=!1;for(let c=0;c<s.length;c++)Rd(s.charCodeAt(c))?a=!1:a||(i++,a=!0);if(i===0&&(i=1),n.has(i))return n.get(i);const l=Math.round(r/Math.pow(i,.5*e))/r;return n.set(i,l),l},clear(){n.clear()}}}var go=class{constructor({getFn:e=ne.getFn,fieldNormWeight:t=ne.fieldNormWeight}={}){this.norm=Md(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(De(this.docs[0]))for(let n=0;n<e;n++){const r=this._createStringRecord(this.docs[n],n);r&&(this.records[t++]=r)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Ms);if(De(e)){const r=this._createStringRecord(e,t);return r&&this.records.push(r),r}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Ms);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const r of e)Number.isInteger(r)&&r>=0&&t.add(r);if(t.size===0)return;this.records=this.records.filter(r=>!t.has(r.i));const n=Array.from(t).sort((r,s)=>r-s);for(const r of this.records){let s=0,i=n.length;for(;s<i;){const a=s+i>>>1;n[a]<r.i?s=a+1:i=a}r.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!Qe(e)||cr(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let r=0,s=this.keys.length;r<s;r++){const i=this.keys[r],a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Qe(a)){if(It(a)){const l=[];for(let c=0,u=a.length;c<u;c+=1){const d=a[c];if(Qe(d)){if(De(d)){if(!cr(d)){const f={v:d,i:c,n:this.norm.get(d)};l.push(f)}}else if(Qe(d.v)){const f=De(d.v)?d.v:Rs(d.v);if(!cr(f)){const p={v:f,i:d.i,n:this.norm.get(f)};l.push(p)}}}}n.$[r]=l}else if(De(a)&&!cr(a)){const l={v:a,n:this.norm.get(a)};n.$[r]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function nl(e,t,{getFn:n=ne.getFn,fieldNormWeight:r=ne.fieldNormWeight}={}){const s=new go({getFn:n,fieldNormWeight:r});return s.setKeys(e.map(tl)),s.setSources(t),s.create(),s}function Ld(e,{getFn:t=ne.getFn,fieldNormWeight:n=ne.fieldNormWeight}={}){const{keys:r,records:s}=e,i=new go({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(s),i}function Pd(e=[],t=ne.minMatchCharLength){const n=[];let r=-1,s=-1,i=0;for(let a=e.length;i<a;i+=1){const l=e[i];l&&r===-1?r=i:!l&&r!==-1&&(s=i-1,s-r+1>=t&&n.push([r,s]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}function Dd(e,t,n,{location:r=ne.location,distance:s=ne.distance,threshold:i=ne.threshold,findAllMatches:a=ne.findAllMatches,minMatchCharLength:l=ne.minMatchCharLength,includeMatches:c=ne.includeMatches,ignoreLocation:u=ne.ignoreLocation}={}){if(t.length>32)throw new Error(Ed(32));const d=t.length,f=e.length,p=Math.max(0,Math.min(r,f));let m=i,h=p;const x=(y,F)=>{const Z=y/d;if(u)return Z;const N=Math.abs(p-F);return s?Z+N/s:N?1:Z},k=l>1||c,j=k?Array(f):[];let C;for(;(C=e.indexOf(t,h))>-1;){const y=x(0,C);if(m=Math.min(y,m),h=C+d,k){let F=0;for(;F<d;)j[C+F]=1,F+=1}}h=-1;let E=[],R=1,D=0,_=d+f;const A=1<<d-1;for(let y=0;y<d;y+=1){let F=0,Z=_;for(;F<Z;)x(y,p+Z)<=m?F=Z:_=Z,Z=Math.floor((_-F)/2+F);_=Z;let N=Math.max(1,p-Z+1);const W=a?f:Math.min(p+Z,f)+d,ie=Array(W+2);ie[W+1]=(1<<y)-1;for(let oe=W;oe>=N;oe-=1){const S=oe-1,T=n[e[S]];if(ie[oe]=(ie[oe+1]<<1|1)&T,y&&(ie[oe]|=(E[oe+1]|E[oe])<<1|1|E[oe+1]),ie[oe]&A&&(R=x(y,S),R<=m)){if(m=R,h=S,D=y,h<=p)break;N=Math.max(1,2*p-h)}}if(x(y+1,p)>m)break;E=ie}if(k&&h>=0){const y=Math.min(f-1,h+d-1+D);for(let F=h;F<=y;F+=1)n[e[F]]&&(j[F]=1)}const v={isMatch:h>=0,score:Math.max(.001,R)};if(k){const y=Pd(j,l);y.length?c&&(v.indices=y):v.isMatch=!1}return v}function Bd(e){const t={};for(let n=0,r=e.length;n<r;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<r-n-1}return t}function xo(e){if(e.length<=1)return e;e.sort((n,r)=>n[0]-r[0]||n[1]-r[1]);const t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){const s=t[t.length-1],i=e[n];i[0]<=s[1]+1?s[1]=Math.max(s[1],i[1]):t.push(i)}return t}const rl={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},Fd=new RegExp("["+Object.keys(rl).join("")+"]","g"),_n=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(Fd,t=>rl[t]):e=>e;var bo=class{constructor(e,{location:t=ne.location,threshold:n=ne.threshold,distance:r=ne.distance,includeMatches:s=ne.includeMatches,findAllMatches:i=ne.findAllMatches,minMatchCharLength:a=ne.minMatchCharLength,isCaseSensitive:l=ne.isCaseSensitive,ignoreDiacritics:c=ne.ignoreDiacritics,ignoreLocation:u=ne.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:l,ignoreDiacritics:c,ignoreLocation:u},e=l?e:e.toLowerCase(),e=c?_n(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(p,m)=>{this.chunks.push({pattern:p,alphabet:Bd(p),startIndex:m})},f=this.pattern.length;if(f>32){let p=0;const m=f%32,h=f-m;for(;p<h;)d(this.pattern.substr(p,32),p),p+=32;if(m){const x=f-32;d(this.pattern.substr(x),x)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?_n(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const h={isMatch:!0,score:0};return r&&(h.indices=[[0,e.length-1]]),h}const{location:s,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,ignoreLocation:u}=this.options,d=[];let f=0,p=!1;this.chunks.forEach(({pattern:h,alphabet:x,startIndex:k})=>{const{isMatch:j,score:C,indices:E}=Dd(e,h,x,{location:s+k,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,includeMatches:r,ignoreLocation:u});j&&(p=!0),f+=C,j&&E&&d.push(...E)});const m={isMatch:p,score:p?f/this.chunks.length:1};return p&&r&&(m.indices=xo(d)),m}};const zd=new Set(["fuzzy","include"]);function Ud(e){return e.startsWith("inverse")}const Ls=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,r;const s=[],i=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+i,s.push([r,n-1]);const a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new bo(e,{location:t.location??ne.location,threshold:t.threshold??ne.threshold,distance:t.distance??ne.distance,includeMatches:t.includeMatches??ne.includeMatches,findAllMatches:t.findAllMatches??ne.findAllMatches,minMatchCharLength:t.minMatchCharLength??ne.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??ne.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??ne.ignoreDiacritics,ignoreLocation:t.ignoreLocation??ne.ignoreLocation});return{type:"fuzzy",search(r){return n.searchIn(r)}}}}],zi=Ls.length,Hd="\0",Wd="|";function Gd(e){const t=[],n=e.length;let r=0;for(;r<n;){for(;r<n&&e[r]===" ";)r++;if(r>=n)break;let s=r;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const i=s+1;if(i>=n||e[i]===" "){s++;break}if(e[i]==="$"&&(i+1>=n||e[i+1]===" ")){s+=2;break}}s++}t.push(e.substring(r,s)),r=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(r,s)),r=s}}return t}function Ui(e,t){const n=e.match(t);return n?n[1]:null}function Kd(e,t={}){return e.replace(/\\\|/g,Hd).split(Wd).map(n=>{const r=Gd(n.replace(/\u0000/g,"|").trim()).filter(i=>i&&!!i.trim()),s=[];for(let i=0,a=r.length;i<a;i+=1){const l=r[i];let c=!1,u=-1;for(;!c&&++u<zi;){const d=Ls[u],f=Ui(l,d.multiRegex);f&&(s.push(d.create(f,t)),c=!0)}if(!c)for(u=-1;++u<zi;){const d=Ls[u],f=Ui(l,d.singleRegex);if(f){s.push(d.create(f,t));break}}}return s})}var Vd=class{constructor(e,{isCaseSensitive:t=ne.isCaseSensitive,ignoreDiacritics:n=ne.ignoreDiacritics,includeMatches:r=ne.includeMatches,minMatchCharLength:s=ne.minMatchCharLength,ignoreLocation:i=ne.ignoreLocation,findAllMatches:a=ne.findAllMatches,location:l=ne.location,threshold:c=ne.threshold,distance:u=ne.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:s,findAllMatches:a,ignoreLocation:i,location:l,threshold:c,distance:u},e=t?e:e.toLowerCase(),e=n?_n(e):e,this.pattern=e,this.query=Kd(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:s}=this.options;e=r?e:e.toLowerCase(),e=s?_n(e):e;let i=0;const a=[];let l=0,c=!1;for(let u=0,d=t.length;u<d;u+=1){const f=t[u];a.length=0,i=0,c=!1;for(let p=0,m=f.length;p<m;p+=1){const h=f[p],{isMatch:x,indices:k,score:j}=h.search(e);if(x)i+=1,l+=j,Ud(h.type)&&(c=!0),n&&(zd.has(h.type)?a.push(...k):a.push(k));else{l=0,i=0,a.length=0,c=!1;break}}if(i){const p={isMatch:!0,score:l/i};return c&&(p.hasInverse=!0),n&&(p.indices=xo(a)),p}}return{isMatch:!1,score:1}}};const Ps=[];function yo(...e){Ps.push(...e)}function jr(e,t){for(let n=0,r=Ps.length;n<r;n+=1){const s=Ps[n];if(s.condition(e,t))return new s(e,t)}return new bo(e,t)}const Ar={AND:"$and",OR:"$or"},Ds={PATH:"$path",PATTERN:"$val"},Bs=e=>!!(e[Ar.AND]||e[Ar.OR]),Jd=e=>!!e[Ds.PATH],Yd=e=>!It(e)&&qa(e)&&!Bs(e),Hi=e=>({[Ar.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function sl(e,t,{auto:n=!0}={}){const r=s=>{if(De(s)){const c={keyId:null,pattern:s};return n&&(c.searcher=jr(s,t)),c}const i=Object.keys(s),a=Jd(s);if(!a&&i.length>1&&!Bs(s))return r(Hi(s));if(Yd(s)){const c=a?s[Ds.PATH]:i[0],u=a?s[Ds.PATTERN]:s[c];if(!De(u))throw new Error(Sd(c));const d={keyId:wr(c),pattern:u};return n&&(d.searcher=jr(u,t)),d}const l={children:[],operator:i[0]};return i.forEach(c=>{const u=s[c];It(u)&&u.forEach(d=>{l.children.push(r(d))})}),l};return Bs(e)||(e=Hi(e)),r(e)}function Fs(e,{ignoreFieldNorm:t=ne.ignoreFieldNorm}){let n=1;return e.forEach(({key:r,norm:s,score:i})=>{const a=r?r.weight:null;n*=Math.pow(i===0&&a?Number.EPSILON:i,(a||1)*(t?1:s))}),n}function Xd(e,{ignoreFieldNorm:t=ne.ignoreFieldNorm}){e.forEach(n=>{n.score=Fs(n.matches,{ignoreFieldNorm:t})})}var Zd=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let r=e;do{e=r;const s=2*e+1,i=2*e+2;if(s<n&&this.comparator(t[s],t[r])>0&&(r=s),i<n&&this.comparator(t[i],t[r])>0&&(r=i),r!==e){const a=t[e];t[e]=t[r],t[r]=a}}while(r!==e)}};function Qd(e){const t=[];return e.matches.forEach(n=>{if(!Qe(n.indices)||!n.indices.length)return;const r={indices:n.indices,value:n.value};n.key&&(r.key=n.key.id),n.idx>-1&&(r.refIndex=n.idx),t.push(r)}),t}function qd(e,t,{includeMatches:n=ne.includeMatches,includeScore:r=ne.includeScore}={}){return e.map(s=>{const{idx:i}=s,a={item:t[i],refIndex:i};return n&&(a.matches=Qd(s)),r&&(a.score=s.score),a})}const ef=/[\p{L}\p{M}\p{N}_]+/gu,Wi=new WeakSet;function tf(e){Wi.has(e)||(Wi.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function nf(e){if(typeof e=="function"){let t=!1;return n=>{const r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?"array containing non-strings":typeof r}.`);return r}}return e instanceof RegExp?(e.global||tf(e),t=>t.match(e)||[]):t=>t.match(ef)||[]}function zs({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const r=nf(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=_n(s)),r(s)}}}var rf=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=zs({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:r,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const i of n){this.termSearchers.push(new bo(i,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const a=r.get(i)||0,l=Math.log(1+(s-a+.5)/(a+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,r=0,s=0,i=0;const a=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const d=this.termSearchers[u].searchIn(e),f=this.idfWeights[u];r+=f,d.isMatch&&(s++,n+=f*(1-d.score),d.indices&&t.push(...d.indices),this.combineAll&&(this.useMask?i|=1<<u:a.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(c.indices=xo(t)),this.combineAll&&(this.useMask?c.matchedMask=i:c.matchedTerms=a,c.termCount=this.numTerms),c}};function ys(e,t,n,r){const s=r.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const i=new Set(s);let a=e.docTermFieldHits.get(n);a||(a=new Map,e.docTermFieldHits.set(n,a));for(const l of i)a.set(l,(a.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function ol(e,t,n,r){const{i:s,v:i,$:a}=t;if(i!==void 0){ys(e,i,s,r);return}if(a)for(let l=0;l<n;l++){const c=a[l];if(c)if(Array.isArray(c))for(const u of c)ys(e,u.v,s,r);else ys(e,c.v,s,r)}}function sf(e,t,n){const r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)ol(r,s,t,n);return r}function of(e,t,n,r){ol(e,t,n,r)}function af(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const r=e.docTermFieldHits.get(t);if(r){for(const[s,i]of r){const a=(e.df.get(s)||0)-i;a<=0?e.df.delete(s):e.df.set(s,a)}e.docTermFieldHits.delete(t)}}function Gi(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,c)=>l-c);for(const l of n)af(e,l);const r=l=>{let c=0,u=n.length;for(;c<u;){const d=c+u>>>1;n[d]<l?c=d+1:u=d}return l-c},s=n[0],i=new Map;for(const[l,c]of e.docFieldCount)i.set(l>s?r(l):l,c);e.docFieldCount=i;const a=new Map;for(const[l,c]of e.docTermFieldHits)a.set(l>s?r(l):l,c);e.docTermFieldHits=a}var Rt=class{constructor(e,t,n){this.options={...ne,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Td(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=jr(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof go))throw new Error(vd);if(this._myIndex=t||nl(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=zs({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=sf(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!Qe(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=zs({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});of(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let r=0,s=this._docs.length;r<s;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&Gi(this._invertedIndex,n);const r=new Set(n);this._docs=this._docs.filter((s,i)=>!r.has(i)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(Ms);this._invertedIndex&&Gi(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:r,includeScore:s,shouldSort:i,sortFn:a,ignoreFieldNorm:l}=this.options;if(De(e)&&!e.trim()){let p=this._docs.map((m,h)=>({item:m,refIndex:h}));return yr(n)&&n>-1&&(p=p.slice(0,n)),p}const c=i&&yr(n)&&n>0&&De(e),u=a,d=(p,m)=>u(p,m)||p.idx-m.idx;let f;if(c){const p=new Zd(n,d);De(this._docs[0])?this._searchStringList(e,{heap:p,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:p,ignoreFieldNorm:l}),f=p.extractSorted()}else f=De(e)?De(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Xd(f,{ignoreFieldNorm:l}),i&&f.sort(De(e)?d:u),yr(n)&&n>-1&&(f=f.slice(0,n));return qd(f,this._docs,{includeMatches:r,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:l,i:c,n:u})=>{if(!Qe(l))return;const d=r.searchIn(l);if(d.isMatch){const f={score:d.score,value:l,norm:u,indices:d.indices};s&&(f.matchedMask=d.matchedMask,f.matchedTerms=d.matchedTerms,f.termCount=d.termCount);const p=[f];if(!s||this._coversAllTokens(p)){const m={item:l,idx:c,matches:p};t?(m.score=Fs(m.matches,{ignoreFieldNorm:n}),t.insert(m)):a.push(m)}}}),a}_searchLogical(e){const t=sl(e,this.options),n=this._normalizedKeys(),r=(l,c,u)=>{if(!("children"in l)){const{keyId:m,searcher:h}=l;let x;return m===null?(x=[],n.forEach((k,j)=>{x.push(...this._findMatches({key:k,value:c[j],searcher:h}))})):x=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(c,m),searcher:h}),x&&x.length?[{idx:u,item:c,matches:x}]:[]}const{children:d,operator:f}=l,p=[];for(let m=0,h=d.length;m<h;m+=1){const x=d[m],k=r(x,c,u);if(k.length)p.push(...k);else if(f===Ar.AND)return[]}return p},s=this._myIndex.records,i=new Map,a=[];return s.forEach(({$:l,i:c})=>{if(Qe(l)){const u=r(t,l,c);u.length&&(i.has(c)||(i.set(c,{idx:c,item:l,matches:[]}),a.push(i.get(c))),u.forEach(({matches:d})=>{i.get(c).matches.push(...d)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const r=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:i}=this._myIndex,a=this._normalizedKeys(),l=t?null:[];return i.forEach(({$:c,i:u})=>{if(!Qe(c))return;const d=[];let f=!1,p=!1;if(a.forEach((m,h)=>{const x=this._findMatches({key:m,value:c[h],searcher:r});x.length?(d.push(...x),x[0].hasInverse&&(p=!0)):f=!0}),!(p&&f)&&d.length&&(!s||this._coversAllTokens(d))){const m={idx:u,item:c,matches:d};t?(m.score=Fs(m.matches,{ignoreFieldNorm:n}),t.insert(m)):l.push(m)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!Qe(t))return[];const r=[];if(It(t))t.forEach(({v:s,i,n:a})=>{if(!Qe(s))return;const l=n.searchIn(s);if(l.isMatch){const c={score:l.score,key:e,value:s,idx:i,norm:a,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(c.matchedMask=l.matchedMask,c.matchedTerms=l.matchedTerms,c.termCount=l.termCount),r.push(c)}});else{const{v:s,n:i}=t,a=n.searchIn(s);if(a.isMatch){const l={score:a.score,key:e,value:s,norm:i,indices:a.indices,hasInverse:a.hasInverse};a.termCount!==void 0&&(l.matchedMask=a.matchedMask,l.matchedTerms=a.matchedTerms,l.termCount=a.termCount),r.push(l)}}return r}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let r=0;for(let s=0;s<e.length;s++)r|=e[s].matchedMask||0;return r===2**t-1}const n=new Set;for(let r=0;r<e.length;r++){const s=e[r].matchedTerms;if(s)for(const i of s)n.add(i)}return n.size===t}};Rt.version="7.5.0";Rt.createIndex=nl;Rt.parseIndex=Ld;Rt.config=ne;Rt.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Nd);return jr(e,{...ne,...n}).searchIn(t)};Rt.parseQuery=sl;yo(Vd);yo(rf);Rt.use=function(...e){e.forEach(t=>yo(t))};var lf=Rt;function il(e,t,n={}){const[r,s]=b.useState(""),[i,a]=b.useState(""),l=n.debounceMs??150;b.useEffect(()=>{const f=setTimeout(()=>a(r),l);return()=>clearTimeout(f)},[r,l]);const c=b.useMemo(()=>t(e),[e,t]),u=b.useMemo(()=>new lf(c,{keys:[{name:"name",weight:2},{name:"text",weight:1}],threshold:n.threshold??.3,ignoreLocation:!0,ignoreFieldNorm:!0,includeScore:!0}),[c,n.threshold]),d=b.useMemo(()=>i.trim()?u.search(i.trim(),{limit:n.limit??20}).map(f=>f.item):[],[u,i,n.limit]);return{query:r,setQuery:s,results:d,searchIndex:c}}function cf(e,t={}){return il(e,bd,t)}const Us="search-match",al=()=>typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u";function uf(e,t){const n=t.trim().toLowerCase();if(!n)return[];const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let i=s.nextNode();i;i=s.nextNode()){const a=(i.textContent??"").toLowerCase();let l=0;for(let c=a.indexOf(n);c!==-1;c=a.indexOf(n,l)){const u=document.createRange();u.setStart(i,c),u.setEnd(i,c+n.length),r.push(u),l=c+n.length}}return r}function df(e,t){if(!al())return;const n=uf(e,t);if(!n.length){CSS.highlights.delete(Us);return}CSS.highlights.set(Us,new Highlight(...n))}function ws(){al()&&CSS.highlights.delete(Us)}function ff(e,t){const n=b.useRef(null);b.useEffect(()=>{if(!e)return;const{targetId:r,query:s,highlight:i}=e;let a=!1;const l=u=>{if(a)return;const d=document.getElementById(r);if(!d){u<40&&setTimeout(()=>l(u+1),50);return}if(n.current!==r){try{d.scrollIntoView({behavior:"smooth",block:"start"})}catch{}n.current=r}i&&c(0)},c=u=>{if(a)return;const d=document.getElementById(r);d&&df(d,s),u<6&&setTimeout(()=>c(u+1),100)};return setTimeout(()=>l(0),50),()=>{a=!0}},[e,...t])}function ll({tabs:e,defaultTab:t,isTabKey:n,sections:r,searchQuery:s}){var Z;const i=((Z=e[0])==null?void 0:Z.id)??t,[a,l]=b.useState(i),[c,u]=b.useState(null),d=N=>{l(N),u(N)},[f,p]=b.useState({}),m=e.some(N=>N.id===a)?a:i,h={};for(const N of r)h[N.id]=N.visible?f[N.id]??null:null;const x=(N,W)=>p(ie=>({...ie,[N]:W})),[k,j]=b.useState(null),[C,E]=b.useState(null),[R,D]=b.useState(null),_=N=>{n(N.tab)?d(N.tab):N.tab==="servers"&&u("servers");const W={};for(const ie of r)W[ie.id]=ie.id===N.tab?N.key:null;p(W),j(N.focusSection??null),E(N.tab==="schemas"&&N.schemaFocusTokens?{tokens:N.schemaFocusTokens,id:N.targetId}:null),N.tab==="schemas"&&ws(),D({targetId:N.targetId,query:s,highlight:N.tab!=="schemas"})},A=(N,W)=>{d(N),p(ie=>{const oe={...ie};for(const S of r)S.id!=="servers"&&(oe[S.id]=S.id===N?W:null);return oe})},v=N=>{u("servers");const W={};for(const ie of r)W[ie.id]=ie.id==="servers"?N:null;p(W)},y=N=>{n(N)&&d(N)},F=(()=>{for(const N of r){const W=h[N.id];if(W)return{tab:N.id,key:W}}return null})();return ff(R,[m,k,C,...r.map(N=>h[N.id])]),b.useEffect(()=>{s.trim()||(D(null),ws())},[s]),b.useEffect(()=>ws,[]),{effectiveTab:m,focusTab:d,navActiveSection:c??m,selected:h,setSelectedKey:x,selectedNavItem:F,handleSearchSelect:_,handleNavItemSelect:A,handleNavServerSelect:v,handleContentTabChange:y,focusSection:k,schemaFocusTarget:C}}const se=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),xt=e=>se(e)?e:null,Ki="^[\0-ÿ]*$",pf=Math.pow(-2,31),hf=Math.pow(2,31)-1,mf=Math.pow(-2,63),gf=Math.pow(2,63)-1,xf={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},wo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{};function Cn(e){const t=wo(e);if(typeof t.name=="string")return typeof t.namespace=="string"?`${t.namespace}.${t.name}`:t.name}function Hs(e,t,n){e.doc&&(t.description=e.doc),e.default!==void 0&&(t.default=e.default);const r=Cn(e);r!==void 0&&n[r]&&(t["x-parser-schema-id"]=r)}function Vi(e,t,n){!(Array.isArray(e.type)&&e.type.includes("null"))&&!n&&(t.required=t.required||[],t.required.push(e.name))}function bf(e,t){let n=e,r=t;if(Array.isArray(e)&&e.length>0){const s=e.length>1&&e[0]==="null";n=e[+s],r.oneOf!==void 0&&(r=r.oneOf[0])}return{type:n,jsonSchema:r}}function yf(e,t,n){if(!(t===void 0||n.examples||Array.isArray(e)))switch(e){case"boolean":n.examples=[typeof t=="boolean"?t:t==="true"];break;case"int":n.examples=[parseInt(t,10)];break;default:n.examples=[t]}}function Ws(e){return Object.keys(e).some(t=>t!=="type"&&t!=="name"&&t!=="namespace")}function Gs(e,t,n){const{type:r,jsonSchema:s}=bf(e,n);yf(r,t.example,s);function i(...a){a.forEach(l=>{let c=!0;l==="minLength"||l==="maxLength"?c=t[l]>-1:l==="multipleOf"&&(c=t[l]>0),t[l]!==void 0&&c&&(s[l]=t[l])})}switch(r){case"int":case"long":case"float":case"double":i("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":t.logicalType&&(s.format=t.logicalType),i("pattern","minLength","maxLength");break;case"array":i("minItems","maxItems","uniqueItems");break}}function ko(e,t,n){t!==void 0&&(e[t]=n)}function $n(e,t){let n={};if(Array.isArray(e))return kf(n,e,t);const r=wo(e),s=typeof e=="string"?e:r.type;switch(n.type=xf[s],s){case"int":{n.minimum=pf,n.maximum=hf;break}case"long":{n.minimum=mf,n.maximum=gf;break}case"bytes":{n.pattern=Ki;break}case"fixed":{n.pattern=Ki,n.minLength=r.size,n.maxLength=r.size;break}case"map":{n.additionalProperties=$n(r.values,t);break}case"array":{n.items=$n(r.items,t);break}case"enum":{n.enum=r.symbols;break}case"float":case"double":{n.format=s;break}case"record":{const i=wf(r,t,n);ko(t,Cn(e),n),n.properties=Object.fromEntries(i.entries());break}default:{const i=t[Cn(e)]??(typeof s=="string"?t[s]:void 0);i&&(n=Ws(r)?{...i}:i);break}}return Hs(r,n,t),Gs(s,r,n),n}function wf(e,t,n){const r=new Map;for(const s of e.fields??[]){const i=typeof s.type=="string"?t[s.type]:void 0;if(i){const a=Ws(s)?{...i}:i;Vi(s,n,s.default!==void 0),Ws(s)&&(Hs(s,a,t),Gs(s.type,s,a)),r.set(s.name,a)}else{const a=$n(s.type,t);Vi(s,n,s.default!==void 0),Hs(s,a,t),Gs(s.type,s,a),r.set(s.name,a),ko(t,Cn(s.type),a)}}return r}function kf(e,t,n){const r=[];let s=null;for(const i of t){const a=$n(i,n);(typeof i=="string"?i:wo(i).type)==="null"?s=a:(r.push(a),ko(n,Cn(i),a))}return s&&r.push(s),e.oneOf=r,e}function Ks(e){return $n(e,{})}const Ji=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),vf=new Set(["record","enum","array","map","fixed"]),Yi=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function vo(e){const t=[];return tn(e,"schema",t,new Set),t}function tn(e,t,n,r){if(typeof e=="string"){!Ji.has(e)&&!Yi.test(e)&&n.push(`${t}: "${e}" is not a valid Avro type name`);return}if(Array.isArray(e)){e.length===0&&n.push(`${t}: union must have at least one alternative`),e.forEach((i,a)=>tn(i,`${t}[${a}]`,n,r));return}if(!se(e)){n.push(`${t}: expected an Avro type string, object, or union`);return}if(r.has(e))return;r.add(e);const s=e.type;if(typeof s!="string"){Array.isArray(s)||se(s)?tn(s,`${t}.type`,n,r):n.push(`${t}: missing "type"`);return}if(!Ji.has(s)&&!vf.has(s)&&!Yi.test(s)){n.push(`${t}: unknown Avro type "${s}"`);return}switch(s){case"record":{if(!Array.isArray(e.fields)){n.push(`${t}: record must have a "fields" array`);return}e.fields.forEach((i,a)=>{const l=`${t}.fields[${a}]`;if(!se(i)||typeof i.name!="string"){n.push(`${l}: field must have a string "name"`);return}tn(i.type,`${l}.type`,n,r)});break}case"enum":{const i=e.symbols;(!Array.isArray(i)||i.some(a=>typeof a!="string"))&&n.push(`${t}: enum must have a "symbols" array of strings`);break}case"array":{e.items===void 0?n.push(`${t}: array must have "items"`):tn(e.items,`${t}.items`,n,r);break}case"map":{e.values===void 0?n.push(`${t}: map must have "values"`):tn(e.values,`${t}.values`,n,r);break}case"fixed":{typeof e.size!="number"&&n.push(`${t}: fixed must have a numeric "size"`);break}}}let Nr=null,ks=null;const Vs=new Set;function Sf(){return ks||(ks=Promise.resolve().then(()=>require("./protoToJsonSchema-DzAaINH9.cjs")).then(e=>{Nr=e.protoToJsonSchema,Vs.forEach(t=>t())})),ks}function Ef(){return Nr||Sf(),Nr}function jf(e){return Vs.add(e),()=>Vs.delete(e)}function Xi(){return Nr!==null}function So(){return b.useSyncExternalStore(jf,Xi,Xi)}const Af="x-parser-original-payload",Tr="x-lib-conversion-error",Nf=/^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i,Tf=/^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;function Pn(e){return typeof e=="string"&&Nf.test(e)}function Dn(e){return typeof e=="string"&&Tf.test(e)}function cl(e){return se(e)&&typeof e.schemaFormat=="string"&&"schema"in e}function ul(e){var t,n;if(typeof e!="string")return null;if(Pn(e)){const r=(t=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:t[1];return r?`avro ${r}`:"avro"}if(Dn(e)){const r=(n=/;\s*version=([^;\s]+)/.exec(e))==null?void 0:n[1];return r?`protobuf ${r}`:"protobuf"}return e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")?null:e}function dl(e){return Pn(e)?"Avro":Dn(e)?"Protobuf":null}function _f(e,t){return t?!1:!e||Pn(e)||Dn(e)?!0:e.startsWith("application/vnd.aai.asyncapi")||e.startsWith("application/schema")}const Cf=["properties","oneOf","anyOf","allOf","not","$ref","additionalProperties","patternProperties","x-parser-schema-id"],$f=new Set(["record","enum","fixed","map","int","long","float","double","bytes","uuid"]);function Of(e){return typeof e=="string"||Array.isArray(e)?!0:se(e)?typeof e.type=="string"&&$f.has(e.type)||Array.isArray(e.fields)||Array.isArray(e.symbols)?!0:!Cf.some(t=>t in e):!1}function On(e,t){let n=e;if(t&&se(n)&&typeof n.$ref=="string"){const a=t(n.$ref);a!==void 0&&(n=a)}const r=If(n),s=r.schema.description;if(typeof s=="string")return{...r,description:s};const i=cl(n)?n.description:void 0;return typeof i=="string"?{...r,description:i}:r}function If(e){var a;if(!cl(e))return{schema:xt(e)??e};const{schemaFormat:t}=e,n=e.schema,r=e[Af],s=(a=xt(n))==null?void 0:a[Tr];if(typeof s=="string")return{schema:xt(r)??{},schemaFormat:t,originalSchema:r,conversionError:s};if(r!==void 0)return{schema:xt(n)??{},schemaFormat:t,originalSchema:r};if(Pn(t)&&Of(n)){const l=vo(n);if(l.length>0)return{schema:xt(n)??{},schemaFormat:t,originalSchema:n,conversionError:l[0]};try{return{schema:Ks(n),schemaFormat:t,originalSchema:n}}catch(c){return{schema:xt(n)??{},schemaFormat:t,originalSchema:n,conversionError:c instanceof Error?c.message:"Failed to convert Avro schema"}}}if(Dn(t)&&typeof n=="string"){const l=Ef();if(!l)return{schema:{},schemaFormat:t,originalSchema:n,pendingConversion:!0};try{return{schema:l(n),schemaFormat:t,originalSchema:n}}catch(c){return{schema:{},schemaFormat:t,originalSchema:n,conversionError:c instanceof Error?c.message:"Failed to convert Protobuf schema"}}}const i=xt(n);return i?{schema:i,schemaFormat:t}:{schema:{},schemaFormat:t,originalSchema:n}}const Oe=(e,t)=>`${"#".repeat(e)} ${t}`,z=e=>typeof e=="string"?e.replace(/`/g,"'"):String(e??""),kn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Rf={objects:new Set,refs:new Set};function kr(e,t,n=Rf){if(e===null||typeof e!="object")return e;if(n.objects.has(e)||kn(e)&&typeof e.$ref=="string"&&n.refs.has(e.$ref)){const i=kn(e)?e["x-parser-schema-id"]:void 0;return typeof i=="string"?{$ref:`#/components/schemas/${i} (circular)`}:"[circular reference]"}const r={objects:new Set(n.objects).add(e),refs:kn(e)&&typeof e.$ref=="string"?new Set(n.refs).add(e.$ref):n.refs};if(Array.isArray(e))return e.map(i=>kr(i,t,r));if(kn(e)&&typeof e.$ref=="string"){const i=t==null?void 0:t(e.$ref);return kn(i)||Array.isArray(i)?kr(i,t,r):{$ref:e.$ref}}const s={};for(const[i,a]of Object.entries(e))s[i]=kr(a,t,r);return s}function _r(e,t,n){if(!t)return"";const r=kr(t,n);return`${Oe(4,`\`${z(e)}\``)}
7
7
 
8
8
  \`\`\`json
9
9
  ${JSON.stringify(r,null,2)}
10
- \`\`\``}function En(e,t,n){if(!t||typeof t=="boolean")return"";const{schema:r,description:s,conversionError:i,pendingConversion:a}=$n(t,n);if(a)return`${Oe(4,`\`${z(e)}\``)}
10
+ \`\`\``}function jn(e,t,n){if(!t||typeof t=="boolean")return"";const{schema:r,description:s,conversionError:i,pendingConversion:a}=On(t,n);if(a)return`${Oe(4,`\`${z(e)}\``)}
11
11
 
12
12
  _(schema conversion still in progress)_`;if(i)return`${Oe(4,`\`${z(e)}\``)}
13
13
 
@@ -18,15 +18,15 @@ _(could not convert schema: ${z(i)})_`;const l=s&&!r.description?{...r,descripti
18
18
  `)),n.description&&t.push(z(n.description)),e.servers&&Object.keys(e.servers).length){const s=[Oe(2,"Servers")];for(const[i,a]of Object.entries(e.servers)){s.push(Oe(3,z(i)));const l=[`**Host:** \`${z(a.host)}${a.pathname?z(a.pathname):""}\``];l.push(`**Protocol:** ${z(a.protocol)}${a.protocolVersion?` ${z(a.protocolVersion)}`:""}`),a.description&&l.push(z(a.description)),s.push(l.join(`
19
19
  `));const c=Mf(a.security);c&&s.push(c)}t.push(s.join(`
20
20
 
21
- `))}return t}function Eo(e,t=Rn(e)){var i,a,l;const n=pl(e);if(e.operations&&Object.keys(e.operations).length){const c=[Oe(2,"Operations")];for(const[u,d]of Object.entries(e.operations)){const f=d.channel;c.push(Oe(3,`${z((i=d.action)==null?void 0:i.toUpperCase())} \`${z(u)}\``));const p=[];f!=null&&f.address&&p.push(`**Channel:** \`${z(f.address)}\``),d.summary&&p.push(z(d.summary)),d.description&&p.push(z(d.description));const m=d.messages??[];m.length&&p.push(`**Messages:** ${m.map(h=>`\`${z(h.name??h.title??"message")}\``).join(", ")}`),c.push(p.join(`
21
+ `))}return t}function Eo(e,t=Mn(e)){var i,a,l;const n=pl(e);if(e.operations&&Object.keys(e.operations).length){const c=[Oe(2,"Operations")];for(const[u,d]of Object.entries(e.operations)){const f=d.channel;c.push(Oe(3,`${z((i=d.action)==null?void 0:i.toUpperCase())} \`${z(u)}\``));const p=[];f!=null&&f.address&&p.push(`**Channel:** \`${z(f.address)}\``),d.summary&&p.push(z(d.summary)),d.description&&p.push(z(d.description));const m=d.messages??[];m.length&&p.push(`**Messages:** ${m.map(h=>`\`${z(h.name??h.title??"message")}\``).join(", ")}`),c.push(p.join(`
22
22
 
23
23
  `))}n.push(c.join(`
24
24
 
25
25
  `))}const r=(a=e.components)==null?void 0:a.messages;if(r&&Object.keys(r).length){const c=[Oe(2,"Messages")];for(const[u,d]of Object.entries(r)){c.push(Oe(3,z(d.title??d.name??u)));const f=[];d.summary&&f.push(z(d.summary)),d.description&&f.push(z(d.description)),d.contentType&&f.push(`**Content-Type:** \`${z(d.contentType)}\``),c.push(f.join(`
26
26
 
27
- `)),d.payload&&c.push(En("payload",d.payload,t)),d.headers&&c.push(En("headers",d.headers,t))}n.push(c.join(`
27
+ `)),d.payload&&c.push(jn("payload",d.payload,t)),d.headers&&c.push(jn("headers",d.headers,t))}n.push(c.join(`
28
28
 
29
- `))}const s=(l=e.components)==null?void 0:l.schemas;if(s&&Object.keys(s).length){const c=[Oe(2,"Schemas")];for(const[u,d]of Object.entries(s))c.push(En(u,d,t));n.push(c.join(`
29
+ `))}const s=(l=e.components)==null?void 0:l.schemas;if(s&&Object.keys(s).length){const c=[Oe(2,"Schemas")];for(const[u,d]of Object.entries(s))c.push(jn(u,d,t));n.push(c.join(`
30
30
 
31
31
  `))}return n.filter(Boolean).join(`
32
32
 
@@ -36,9 +36,9 @@ _(could not convert schema: ${z(i)})_`;const l=s&&!r.description?{...r,descripti
36
36
 
37
37
  `)),s.push(u.join(`
38
38
 
39
- `)),c.payload&&s.push(En("payload",c.payload,n)),c.headers&&s.push(En("headers",c.headers,n))}return s.filter(Boolean).join(`
39
+ `)),c.payload&&s.push(jn("payload",c.payload,n)),c.headers&&s.push(jn("headers",c.headers,n))}return s.filter(Boolean).join(`
40
40
 
41
- `)}function hl(e,t,n=Rn(e)){var i;const r=(i=e.operations)==null?void 0:i[t];if(!r)return"";const s=pl(e);return s.push(Lf(t,r,n)),s.filter(Boolean).join(`
41
+ `)}function hl(e,t,n=Mn(e)){var i;const r=(i=e.operations)==null?void 0:i[t];if(!r)return"";const s=pl(e);return s.push(Lf(t,r,n)),s.filter(Boolean).join(`
42
42
 
43
43
  `)}function Pf(e,t){if(!e.length||!t)return"";const n=new Map;for(const i of e)for(const[a,l]of Object.entries(i)){if(!l.length)continue;const c=n.get(a)??[];n.set(a,Array.from(new Set([...c,...l])))}const r=Array.from(new Set(e.flatMap(i=>Object.keys(i)))),s=[];for(const i of r){const a=t[i];if(!a)continue;const l=n.get(i);if(s.push(`- **${fl(a)}** (\`${z(i)}\`)`),a.description&&s.push(` ${z(a.description)}`),a.type==="openIdConnect"&&a.openIdConnectUrl&&s.push(` - OpenID Connect URL: \`${z(a.openIdConnectUrl)}\``),a.type==="oauth2")for(const[c,u]of Object.entries(a.flows??{})){s.push(` - Flow \`${z(c)}\`:`),u.authorizationUrl&&s.push(` - Authorization URL: \`${z(u.authorizationUrl)}\``),u.tokenUrl&&s.push(` - Token URL: \`${z(u.tokenUrl)}\``),u.refreshUrl&&s.push(` - Refresh URL: \`${z(u.refreshUrl)}\``);const d=l!=null&&l.length?l:Object.keys(u.scopes??{});d.length&&s.push(` - ${l!=null&&l.length?"Required scopes":"Scopes"}: ${d.map(f=>`\`${z(f)}\``).join(", ")}`)}else l!=null&&l.length&&s.push(` - Required scopes: ${l.map(c=>`\`${z(c)}\``).join(", ")}`)}return s.length?["**Authorization:**",s.join(`
44
44
  `)].join(`
@@ -53,24 +53,24 @@ _(could not convert schema: ${z(i)})_`;const l=s&&!r.description?{...r,descripti
53
53
 
54
54
  `))}return a.join(`
55
55
 
56
- `)}function jo(e,t=Rn(e)){var a,l,c,u,d;const n=[],{info:r}=e;if(n.push(Oe(1,z(r.title))),n.push(`**Version:** ${z(r.version)}`),r.description&&n.push(z(r.description)),(a=e.servers)!=null&&a.length){const f=[Oe(2,"Servers")];for(const p of e.servers)f.push(`- \`${z(p.url)}\`${p.description?` — ${z(p.description)}`:""}`);n.push(f.join(`
57
- `))}const s=e.paths?Nn(e.paths):[];if(s.length){const f=[Oe(2,"Endpoints")];for(const{method:p,path:m}of s){const h=(c=(l=e.paths)==null?void 0:l[m])==null?void 0:c[p];h&&f.push(ml(p,m,h,t,(u=e.components)==null?void 0:u.securitySchemes,e.security))}n.push(f.join(`
56
+ `)}function jo(e,t=Mn(e)){var a,l,c,u,d;const n=[],{info:r}=e;if(n.push(Oe(1,z(r.title))),n.push(`**Version:** ${z(r.version)}`),r.description&&n.push(z(r.description)),(a=e.servers)!=null&&a.length){const f=[Oe(2,"Servers")];for(const p of e.servers)f.push(`- \`${z(p.url)}\`${p.description?` — ${z(p.description)}`:""}`);n.push(f.join(`
57
+ `))}const s=e.paths?Tn(e.paths):[];if(s.length){const f=[Oe(2,"Endpoints")];for(const{method:p,path:m}of s){const h=(c=(l=e.paths)==null?void 0:l[m])==null?void 0:c[p];h&&f.push(ml(p,m,h,t,(u=e.components)==null?void 0:u.securitySchemes,e.security))}n.push(f.join(`
58
58
 
59
59
  `))}const i=(d=e.components)==null?void 0:d.schemas;if(i&&Object.keys(i).length){const f=[Oe(2,"Schemas")];for(const[p,m]of Object.entries(i))f.push(_r(p,m,t));n.push(f.join(`
60
60
 
61
61
  `))}return n.filter(Boolean).join(`
62
62
 
63
- `)}function gl(e,t,n,r=Rn(e)){var l,c,u,d;const s=(c=(l=e.paths)==null?void 0:l[n])==null?void 0:c[t];if(!s)return"";const i=[],{info:a}=e;if(i.push(Oe(1,z(a.title))),i.push(`**Version:** ${z(a.version)}`),a.description&&i.push(z(a.description)),(u=e.servers)!=null&&u.length){const f=[Oe(2,"Servers")];for(const p of e.servers)f.push(`- \`${z(p.url)}\`${p.description?` — ${z(p.description)}`:""}`);i.push(f.join(`
63
+ `)}function gl(e,t,n,r=Mn(e)){var l,c,u,d;const s=(c=(l=e.paths)==null?void 0:l[n])==null?void 0:c[t];if(!s)return"";const i=[],{info:a}=e;if(i.push(Oe(1,z(a.title))),i.push(`**Version:** ${z(a.version)}`),a.description&&i.push(z(a.description)),(u=e.servers)!=null&&u.length){const f=[Oe(2,"Servers")];for(const p of e.servers)f.push(`- \`${z(p.url)}\`${p.description?` — ${z(p.description)}`:""}`);i.push(f.join(`
64
64
  `))}return i.push(ml(t,n,s,r,(d=e.components)==null?void 0:d.securitySchemes,e.security)),i.filter(Boolean).join(`
65
65
 
66
- `)}const Df=/^(https?:|data:image\/)/i;function Ao(e){const t=typeof e=="string";if(!t&&(typeof e!="object"||e===null))return null;const{url:n,altText:r,backgroundColor:s}=t?{url:e,altText:void 0,backgroundColor:void 0}:e;return typeof n!="string"||!Df.test(n)?null:{url:n,altText:typeof r=="string"&&r?r:void 0,backgroundColor:typeof s=="string"?s:void 0}}const xl={"x-x":()=>Promise.resolve().then(()=>require("./XExtension-jAiATfg-.cjs")),"x-linkedin":()=>Promise.resolve().then(()=>require("./LinkedInExtension-6xekO5bX.cjs"))},Bf=()=>Promise.resolve().then(()=>require("./LogoExtension-6P3B9CAh.cjs"));var Ff=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function No(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zf(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */var vs,Zi;function Qi(){if(Zi)return vs;Zi=1;function e($,I){(I==null||I>$.length)&&(I=$.length);for(var J=0,re=Array(I);J<I;J++)re[J]=$[J];return re}function t($){if(Array.isArray($))return $}function n($,I){var J=$==null?null:typeof Symbol<"u"&&$[Symbol.iterator]||$["@@iterator"];if(J!=null){var re,de,ke,Pe,dn=[],Je=!0,fn=!1;try{if(ke=(J=J.call($)).next,I!==0)for(;!(Je=(re=ke.call(J)).done)&&(dn.push(re.value),dn.length!==I);Je=!0);}catch(Xr){fn=!0,de=Xr}finally{try{if(!Je&&J.return!=null&&(Pe=J.return(),Object(Pe)!==Pe))return}finally{if(fn)throw de}}return dn}}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
67
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s($,I){return t($)||n($,I)||i($,I)||r()}function i($,I){if($){if(typeof $=="string")return e($,I);var J={}.toString.call($).slice(8,-1);return J==="Object"&&$.constructor&&(J=$.constructor.name),J==="Map"||J==="Set"?Array.from($):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?e($,I):void 0}}const a=Object.entries,l=Object.setPrototypeOf,c=Object.isFrozen,u=Object.getPrototypeOf,d=Object.getOwnPropertyDescriptor;let f=Object.freeze,p=Object.seal,m=Object.create,h=typeof Reflect<"u"&&Reflect,x=h.apply,k=h.construct;f||(f=function(I){return I}),p||(p=function(I){return I}),x||(x=function(I,J){for(var re=arguments.length,de=new Array(re>2?re-2:0),ke=2;ke<re;ke++)de[ke-2]=arguments[ke];return I.apply(J,de)}),k||(k=function(I){for(var J=arguments.length,re=new Array(J>1?J-1:0),de=1;de<J;de++)re[de-1]=arguments[de];return new I(...re)});const j=ee(Array.prototype.forEach),C=ee(Array.prototype.lastIndexOf),E=ee(Array.prototype.pop),R=ee(Array.prototype.push),D=ee(Array.prototype.splice),_=Array.isArray,A=ee(String.prototype.toLowerCase),v=ee(String.prototype.toString),y=ee(String.prototype.match),F=ee(String.prototype.replace),Z=ee(String.prototype.indexOf),N=ee(String.prototype.trim),W=ee(Number.prototype.toString),ie=ee(Boolean.prototype.toString),oe=typeof BigInt>"u"?null:ee(BigInt.prototype.toString),S=typeof Symbol>"u"?null:ee(Symbol.prototype.toString),T=ee(Object.prototype.hasOwnProperty),H=ee(Object.prototype.toString),V=ee(RegExp.prototype.test),ae=Te(TypeError);function ee($){return function(I){I instanceof RegExp&&(I.lastIndex=0);for(var J=arguments.length,re=new Array(J>1?J-1:0),de=1;de<J;de++)re[de-1]=arguments[de];return x($,I,re)}}function Te($){return function(){for(var I=arguments.length,J=new Array(I),re=0;re<I;re++)J[re]=arguments[re];return k($,J)}}function Q($,I){let J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A;if(l&&l($,null),!_(I))return $;let re=I.length;for(;re--;){let de=I[re];if(typeof de=="string"){const ke=J(de);ke!==de&&(c(I)||(I[re]=ke),de=ke)}$[de]=!0}return $}function ve($){for(let I=0;I<$.length;I++)T($,I)||($[I]=null);return $}function P($){const I=m(null);for(const re of a($)){var J=s(re,2);const de=J[0],ke=J[1];T($,de)&&(_(ke)?I[de]=ve(ke):ke&&typeof ke=="object"&&ke.constructor===Object?I[de]=P(ke):I[de]=ke)}return I}function Y($){switch(typeof $){case"string":return $;case"number":return W($);case"boolean":return ie($);case"bigint":return oe?oe($):"0";case"symbol":return S?S($):"Symbol()";case"undefined":return H($);case"function":case"object":{if($===null)return H($);const I=$,J=O(I,"toString");if(typeof J=="function"){const re=J(I);return typeof re=="string"?re:H(re)}return H($)}default:return H($)}}function O($,I){for(;$!==null;){const re=d($,I);if(re){if(re.get)return ee(re.get);if(typeof re.value=="function")return ee(re.value)}$=u($)}function J(){return null}return J}function q($){try{return V($,""),!0}catch{return!1}}const le=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),G=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pe=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),we=f(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fe=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Me=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xe=f(["#text"]),He=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Le=f(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X=f(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Se=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_e=p(/{{[\w\W]*|^[\w\W]*}}/g),me=p(/<%[\w\W]*|^[\w\W]*%>/g),mt=p(/\${[\w\W]*/g),et=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mt=p(/^aria-[\-\w]+$/),tt=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=p(/^(?:\w+script|data):/i),U=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),te=p(/^html$/i),ue=p(/^[a-z][.\w]*(-[.\w]+)+$/i),Ce=p(/<[/\w!]/g),rt=p(/<[/\w]/g),Jr=p(/<\/no(script|embed|frames)/i),Yr=p(/\/>/i),ut={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Gc=function(){return typeof window>"u"?null:window},Kc=function(I,J){if(typeof I!="object"||typeof I.createPolicy!="function")return null;let re=null;const de="data-tt-policy-suffix";J&&J.hasAttribute(de)&&(re=J.getAttribute(de));const ke="dompurify"+(re?"#"+re:"");try{return I.createPolicy(ke,{createHTML(Pe){return Pe},createScriptURL(Pe){return Pe}})}catch{return console.warn("TrustedTypes policy "+ke+" could not be created."),null}},Qo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},St=function(I,J,re,de){return T(I,J)&&_(I[J])?Q(de.base?P(de.base):{},I[J],de.transform):re};function qo(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gc();const I=L=>qo(L);if(I.version="3.4.11",I.removed=[],!$||!$.document||$.document.nodeType!==ut.document||!$.Element)return I.isSupported=!1,I;let J=$.document;const re=J,de=re.currentScript;$.DocumentFragment;const ke=$.HTMLTemplateElement,Pe=$.Node,dn=$.Element,Je=$.NodeFilter,fn=$.NamedNodeMap;fn===void 0&&($.NamedNodeMap||$.MozNamedAttrMap),$.HTMLFormElement;const Xr=$.DOMParser,Qn=$.trustedTypes,Lt=dn.prototype,Jc=O(Lt,"cloneNode"),ei=O(Lt,"remove"),Yc=O(Lt,"nextSibling"),pn=O(Lt,"childNodes"),hn=O(Lt,"parentNode"),ti=O(Lt,"shadowRoot"),Zr=O(Lt,"attributes"),Ye=Pe&&Pe.prototype?O(Pe.prototype,"nodeType"):null,Et=Pe&&Pe.prototype?O(Pe.prototype,"nodeName"):null;if(typeof ke=="function"){const L=J.createElement("template");L.content&&L.content.ownerDocument&&(J=L.content.ownerDocument)}let We,Pt="",Qr,ni=!1,mn=0;const ri=function(){if(mn>0)throw ae('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Vt=function(g){ri(),mn++;try{return We.createHTML(g)}finally{mn--}},Xc=function(g){ri(),mn++;try{return We.createScriptURL(g)}finally{mn--}},Zc=function(){return ni||(Qr=Kc(Qn,de),ni=!0),Qr},qn=J,qr=qn.implementation,si=qn.createNodeIterator,Qc=qn.createDocumentFragment,qc=qn.getElementsByTagName,eu=re.importNode;let $e=Qo();I.isSupported=typeof a=="function"&&typeof hn=="function"&&qr&&qr.createHTMLDocument!==void 0;const tu=_e,nu=me,ru=mt,su=et,ou=Mt,iu=B,oi=U,au=ue;let ii=tt,Ee=null;const ai=Q({},[...le,...G,...pe,...fe,...xe]);let je=null;const li=Q({},[...He,...Le,...X,...Se]);let Ae=Object.seal(m(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),gn=null,ci=null;const jt=Object.seal(m(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ui=!0,es=!0,di=!1,fi=!0,At=!1,xn=!0,Dt=!1,ts=!1,ns=null,rs=null,ss=!1,Jt=!1,er=!1,tr=!1,pi=!0,hi=!1;const mi="user-content-";let os=!0,is=!1,Yt={},dt=null;const as=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gi=null;const xi=Q({},["audio","video","img","source","image","track"]);let ls=null;const bi=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",rr="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let Xt=ft,cs=!1,us=null;const lu=Q({},[nr,rr,ft],v),yi=f(["mi","mo","mn","ms","mtext"]);let ds=Q({},yi);const wi=f(["annotation-xml"]);let fs=Q({},wi);const cu=Q({},["title","style","font","a","script"]);let bn=null;const uu=["application/xhtml+xml","text/html"],du="text/html";let Ne=null,Zt=null;const fu=J.createElement("form"),ki=function(g){return g instanceof RegExp||g instanceof Function},ps=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zt&&Zt===g)return;(!g||typeof g!="object")&&(g={}),g=P(g),bn=uu.indexOf(g.PARSER_MEDIA_TYPE)===-1?du:g.PARSER_MEDIA_TYPE,Ne=bn==="application/xhtml+xml"?v:A,Ee=St(g,"ALLOWED_TAGS",ai,{transform:Ne}),je=St(g,"ALLOWED_ATTR",li,{transform:Ne}),us=St(g,"ALLOWED_NAMESPACES",lu,{transform:v}),ls=St(g,"ADD_URI_SAFE_ATTR",bi,{transform:Ne,base:bi}),gi=St(g,"ADD_DATA_URI_TAGS",xi,{transform:Ne,base:xi}),dt=St(g,"FORBID_CONTENTS",as,{transform:Ne}),gn=St(g,"FORBID_TAGS",P({}),{transform:Ne}),ci=St(g,"FORBID_ATTR",P({}),{transform:Ne}),Yt=T(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?P(g.USE_PROFILES):g.USE_PROFILES:!1,ui=g.ALLOW_ARIA_ATTR!==!1,es=g.ALLOW_DATA_ATTR!==!1,di=g.ALLOW_UNKNOWN_PROTOCOLS||!1,fi=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,At=g.SAFE_FOR_TEMPLATES||!1,xn=g.SAFE_FOR_XML!==!1,Dt=g.WHOLE_DOCUMENT||!1,Jt=g.RETURN_DOM||!1,er=g.RETURN_DOM_FRAGMENT||!1,tr=g.RETURN_TRUSTED_TYPE||!1,ss=g.FORCE_BODY||!1,pi=g.SANITIZE_DOM!==!1,hi=g.SANITIZE_NAMED_PROPS||!1,os=g.KEEP_CONTENT!==!1,is=g.IN_PLACE||!1,ii=q(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:tt,Xt=typeof g.NAMESPACE=="string"?g.NAMESPACE:ft,ds=T(g,"MATHML_TEXT_INTEGRATION_POINTS")&&g.MATHML_TEXT_INTEGRATION_POINTS&&typeof g.MATHML_TEXT_INTEGRATION_POINTS=="object"?P(g.MATHML_TEXT_INTEGRATION_POINTS):Q({},yi),fs=T(g,"HTML_INTEGRATION_POINTS")&&g.HTML_INTEGRATION_POINTS&&typeof g.HTML_INTEGRATION_POINTS=="object"?P(g.HTML_INTEGRATION_POINTS):Q({},wi);const w=T(g,"CUSTOM_ELEMENT_HANDLING")&&g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING=="object"?P(g.CUSTOM_ELEMENT_HANDLING):m(null);if(Ae=m(null),T(w,"tagNameCheck")&&ki(w.tagNameCheck)&&(Ae.tagNameCheck=w.tagNameCheck),T(w,"attributeNameCheck")&&ki(w.attributeNameCheck)&&(Ae.attributeNameCheck=w.attributeNameCheck),T(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(Ae.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),p(Ae),At&&(es=!1),er&&(Jt=!0),Yt&&(Ee=Q({},xe),je=m(null),Yt.html===!0&&(Q(Ee,le),Q(je,He)),Yt.svg===!0&&(Q(Ee,G),Q(je,Le),Q(je,Se)),Yt.svgFilters===!0&&(Q(Ee,pe),Q(je,Le),Q(je,Se)),Yt.mathMl===!0&&(Q(Ee,fe),Q(je,X),Q(je,Se))),jt.tagCheck=null,jt.attributeCheck=null,T(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?jt.tagCheck=g.ADD_TAGS:_(g.ADD_TAGS)&&(Ee===ai&&(Ee=P(Ee)),Q(Ee,g.ADD_TAGS,Ne))),T(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?jt.attributeCheck=g.ADD_ATTR:_(g.ADD_ATTR)&&(je===li&&(je=P(je)),Q(je,g.ADD_ATTR,Ne))),T(g,"ADD_URI_SAFE_ATTR")&&_(g.ADD_URI_SAFE_ATTR)&&Q(ls,g.ADD_URI_SAFE_ATTR,Ne),T(g,"FORBID_CONTENTS")&&_(g.FORBID_CONTENTS)&&(dt===as&&(dt=P(dt)),Q(dt,g.FORBID_CONTENTS,Ne)),T(g,"ADD_FORBID_CONTENTS")&&_(g.ADD_FORBID_CONTENTS)&&(dt===as&&(dt=P(dt)),Q(dt,g.ADD_FORBID_CONTENTS,Ne)),os&&(Ee["#text"]=!0),Dt&&Q(Ee,["html","head","body"]),Ee.table&&(Q(Ee,["tbody"]),delete gn.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const M=We;We=g.TRUSTED_TYPES_POLICY;try{Pt=Vt("")}catch(K){throw We=M,K}}else g.TRUSTED_TYPES_POLICY===null?(We=void 0,Pt=""):(We===void 0&&(We=Zc()),We&&typeof Pt=="string"&&(Pt=Vt("")));f&&f(g),Zt=g},vi=Q({},[...G,...pe,...we]),Si=Q({},[...fe,...Me]),pu=function(g,w,M){return w.namespaceURI===ft?g==="svg":w.namespaceURI===nr?g==="svg"&&(M==="annotation-xml"||ds[M]):!!vi[g]},hu=function(g,w,M){return w.namespaceURI===ft?g==="math":w.namespaceURI===rr?g==="math"&&fs[M]:!!Si[g]},mu=function(g,w,M){return w.namespaceURI===rr&&!fs[M]||w.namespaceURI===nr&&!ds[M]?!1:!Si[g]&&(cu[g]||!vi[g])},gu=function(g){let w=hn(g);(!w||!w.tagName)&&(w={namespaceURI:Xt,tagName:"template"});const M=A(g.tagName),K=A(w.tagName);return us[g.namespaceURI]?g.namespaceURI===rr?pu(M,w,K):g.namespaceURI===nr?hu(M,w,K):g.namespaceURI===ft?mu(M,w,K):!!(bn==="application/xhtml+xml"&&us[g.namespaceURI]):!1},Nt=function(g){R(I.removed,{element:g});try{hn(g).removeChild(g)}catch{if(ei(g),!hn(g))throw ae("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ei=function(g){const w=pn(g);if(w){const K=[];j(w,ce=>{R(K,ce)}),j(K,ce=>{try{ei(ce)}catch{}})}const M=Zr(g);if(M)for(let K=M.length-1;K>=0;--K){const ce=M[K],he=ce&&ce.name;if(typeof he=="string")try{g.removeAttribute(he)}catch{}}},Bt=function(g,w){try{R(I.removed,{attribute:w.getAttributeNode(g),from:w})}catch{R(I.removed,{attribute:null,from:w})}if(w.removeAttribute(g),g==="is")if(Jt||er)try{Nt(w)}catch{}else try{w.setAttribute(g,"")}catch{}},xu=function(g){const w=Zr(g);if(w)for(let M=w.length-1;M>=0;--M){const K=w[M],ce=K&&K.name;if(!(typeof ce!="string"||je[Ne(ce)]))try{g.removeAttribute(ce)}catch{}}},bu=function(g){const w=[g];for(;w.length>0;){const M=w.pop();(Ye?Ye(M):M.nodeType)===ut.element&&xu(M);const ce=pn(M);if(ce)for(let he=ce.length-1;he>=0;--he)w.push(ce[he])}},ji=function(g){let w=null,M=null;if(ss)g="<remove></remove>"+g;else{const he=y(g,/^[\r\n\t ]+/);M=he&&he[0]}bn==="application/xhtml+xml"&&Xt===ft&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const K=We?Vt(g):g;if(Xt===ft)try{w=new Xr().parseFromString(K,bn)}catch{}if(!w||!w.documentElement){w=qr.createDocument(Xt,"template",null);try{w.documentElement.innerHTML=cs?Pt:K}catch{}}const ce=w.body||w.documentElement;return g&&M&&ce.insertBefore(J.createTextNode(M),ce.childNodes[0]||null),Xt===ft?qc.call(w,Dt?"html":"body")[0]:Dt?w.documentElement:ce},Ai=function(g){return si.call(g.ownerDocument||g,g,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT|Je.SHOW_PROCESSING_INSTRUCTION|Je.SHOW_CDATA_SECTION,null)},sr=function(g){return g=F(g,tu," "),g=F(g,nu," "),g=F(g,ru," "),g},hs=function(g){var w;g.normalize();const M=si.call(g.ownerDocument||g,g,Je.SHOW_TEXT|Je.SHOW_COMMENT|Je.SHOW_CDATA_SECTION|Je.SHOW_PROCESSING_INSTRUCTION,null);let K=M.nextNode();for(;K;)K.data=sr(K.data),K=M.nextNode();const ce=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");ce&&j(ce,he=>{Qt(he.content)&&hs(he.content)})},or=function(g){const w=Et?Et(g):null;return typeof w!="string"||Ne(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Zr(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==Ye(g)||g.childNodes!==pn(g)},Qt=function(g){if(!Ye||typeof g!="object"||g===null)return!1;try{return Ye(g)===ut.documentFragment}catch{return!1}},yn=function(g){if(!Ye||typeof g!="object"||g===null)return!1;try{return typeof Ye(g)=="number"}catch{return!1}};function gt(L,g,w){L.length!==0&&j(L,M=>{M.call(I,g,w,Zt)})}const yu=function(g,w){return!!(xn&&g.hasChildNodes()&&!yn(g.firstElementChild)&&V(Ce,g.textContent)&&V(Ce,g.innerHTML)||xn&&g.namespaceURI===ft&&w==="style"&&yn(g.firstElementChild)||g.nodeType===ut.processingInstruction||xn&&g.nodeType===ut.comment&&V(rt,g.data))},wu=function(g,w){if(!gn[w]&&_i(w)&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,w)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(w)))return!1;if(os&&!dt[w]){const M=hn(g),K=pn(g);if(K&&M){const ce=K.length;for(let he=ce-1;he>=0;--he){const Re=is?K[he]:Jc(K[he],!0);M.insertBefore(Re,Yc(g))}}}return Nt(g),!0},Ni=function(g){if(gt($e.beforeSanitizeElements,g,null),or(g))return Nt(g),!0;const w=Ne(Et?Et(g):g.nodeName);if(gt($e.uponSanitizeElement,g,{tagName:w,allowedTags:Ee}),yu(g,w))return Nt(g),!0;if(gn[w]||!(jt.tagCheck instanceof Function&&jt.tagCheck(w))&&!Ee[w])return wu(g,w);if((Ye?Ye(g):g.nodeType)===ut.element&&!gu(g)||(w==="noscript"||w==="noembed"||w==="noframes")&&V(Jr,g.innerHTML))return Nt(g),!0;if(At&&g.nodeType===ut.text){const K=sr(g.textContent);g.textContent!==K&&(R(I.removed,{element:g.cloneNode()}),g.textContent=K)}return gt($e.afterSanitizeElements,g,null),!1},Ti=function(g,w,M){if(ci[w]||pi&&(w==="id"||w==="name")&&(M in J||M in fu))return!1;const K=je[w]||jt.attributeCheck instanceof Function&&jt.attributeCheck(w,g);if(!(es&&V(su,w))){if(!(ui&&V(ou,w))){if(K){if(!ls[w]){if(!V(ii,F(M,oi,""))){if(!((w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Z(M,"data:")===0&&gi[g])){if(!(di&&!V(iu,F(M,oi,"")))){if(M)return!1}}}}}else if(!(_i(g)&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,g)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(g))&&(Ae.attributeNameCheck instanceof RegExp&&V(Ae.attributeNameCheck,w)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(w,g))||w==="is"&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,M)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(M))))return!1}}return!0},ku=Q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_i=function(g){return!ku[A(g)]&&V(au,g)},vu=function(g,w,M,K){if(We&&typeof Qn=="object"&&typeof Qn.getAttributeType=="function"&&!M)switch(Qn.getAttributeType(g,w)){case"TrustedHTML":return Vt(K);case"TrustedScriptURL":return Xc(K)}return K},Su=function(g,w,M,K){try{M?g.setAttributeNS(M,w,K):g.setAttribute(w,K),or(g)?Nt(g):E(I.removed)}catch{Bt(w,g)}},Ci=function(g){gt($e.beforeSanitizeAttributes,g,null);const w=g.attributes;if(!w||or(g))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:je,forceKeepAttr:void 0};let K=w.length;const ce=Ne(g.nodeName);for(;K--;){const he=w[K],Re=he.name,Ie=he.namespaceURI,nt=he.value,st=Ne(Re),gs=nt;let Be=Re==="value"?gs:N(gs);if(M.attrName=st,M.attrValue=Be,M.keepAttr=!0,M.forceKeepAttr=void 0,gt($e.uponSanitizeAttribute,g,M),Be=M.attrValue,hi&&(st==="id"||st==="name")&&Z(Be,mi)!==0&&(Bt(Re,g),Be=mi+Be),xn&&V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){Bt(Re,g);continue}if(st==="attributename"&&y(Be,"href")){Bt(Re,g);continue}if(!M.forceKeepAttr){if(!M.keepAttr){Bt(Re,g);continue}if(!fi&&V(Yr,Be)){Bt(Re,g);continue}if(At&&(Be=sr(Be)),!Ti(ce,st,Be)){Bt(Re,g);continue}Be=vu(ce,st,Ie,Be),Be!==gs&&Su(g,Re,Ie,Be)}}gt($e.afterSanitizeAttributes,g,null)},ir=function(g){let w=null;const M=Ai(g);for(gt($e.beforeSanitizeShadowDOM,g,null);w=M.nextNode();)if(gt($e.uponSanitizeShadowNode,w,null),Ni(w),Ci(w),Qt(w.content)&&ir(w.content),(Ye?Ye(w):w.nodeType)===ut.element){const ce=ti(w);Qt(ce)&&(ms(ce),ir(ce))}gt($e.afterSanitizeShadowDOM,g,null)},ms=function(g){const w=[{node:g,shadow:null}];for(;w.length>0;){const M=w.pop();if(M.shadow){ir(M.shadow);continue}const K=M.node,he=(Ye?Ye(K):K.nodeType)===ut.element,Re=pn(K);if(Re)for(let Ie=Re.length-1;Ie>=0;--Ie)w.push({node:Re[Ie],shadow:null});if(he){const Ie=Et?Et(K):null;if(typeof Ie=="string"&&Ne(Ie)==="template"){const nt=K.content;Qt(nt)&&w.push({node:nt,shadow:null})}}if(he){const Ie=ti(K);Qt(Ie)&&w.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return I.sanitize=function(L){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,M=null,K=null,ce=null;if(cs=!L,cs&&(L="<!-->"),typeof L!="string"&&!yn(L)&&(L=Y(L),typeof L!="string"))throw ae("dirty is not a string, aborting");if(!I.isSupported)return L;ts?(Ee=ns,je=rs):ps(g),($e.uponSanitizeElement.length>0||$e.uponSanitizeAttribute.length>0)&&(Ee=P(Ee)),$e.uponSanitizeAttribute.length>0&&(je=P(je)),I.removed=[];const he=is&&typeof L!="string"&&yn(L);if(he){const nt=Et?Et(L):L.nodeName;if(typeof nt=="string"){const st=Ne(nt);if(!Ee[st]||gn[st])throw ae("root node is forbidden and cannot be sanitized in-place")}if(or(L))throw ae("root node is clobbered and cannot be sanitized in-place");try{ms(L)}catch(st){throw Ei(L),st}}else if(yn(L))w=ji("<!---->"),M=w.ownerDocument.importNode(L,!0),M.nodeType===ut.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?w=M:w.appendChild(M),ms(M);else{if(!Jt&&!At&&!Dt&&L.indexOf("<")===-1)return We&&tr?Vt(L):L;if(w=ji(L),!w)return Jt?null:tr?Pt:""}w&&ss&&Nt(w.firstChild);const Re=Ai(he?L:w);try{for(;K=Re.nextNode();)Ni(K),Ci(K),Qt(K.content)&&ir(K.content)}catch(nt){throw he&&Ei(L),nt}if(he)return j(I.removed,nt=>{nt.element&&bu(nt.element)}),At&&hs(L),L;if(Jt){if(At&&hs(w),er)for(ce=Qc.call(w.ownerDocument);w.firstChild;)ce.appendChild(w.firstChild);else ce=w;return(je.shadowroot||je.shadowrootmode)&&(ce=eu.call(re,ce,!0)),ce}let Ie=Dt?w.outerHTML:w.innerHTML;return Dt&&Ee["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&V(te,w.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
68
- `+Ie),At&&(Ie=sr(Ie)),We&&tr?Vt(Ie):Ie},I.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ps(L),ts=!0,ns=Ee,rs=je},I.clearConfig=function(){Zt=null,ts=!1,ns=null,rs=null,We=Qr,Pt=""},I.isValidAttribute=function(L,g,w){Zt||ps({});const M=Ne(L),K=Ne(g);return Ti(M,K,w)},I.addHook=function(L,g){typeof g=="function"&&T($e,L)&&R($e[L],g)},I.removeHook=function(L,g){if(T($e,L)){if(g!==void 0){const w=C($e[L],g);return w===-1?void 0:D($e[L],w,1)[0]}return E($e[L])}},I.removeHooks=function(L){T($e,L)&&($e[L]=[])},I.removeAllHooks=function(){$e=Qo()},I}var Vc=qo();return vs=Vc,vs}var Uf=self.DOMPurify||(self.DOMPurify=Qi().default||Qi());const bl=No(Uf);function To(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=To();function yl(e){Gt=e}var jn={exec:()=>null};function ge(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(ze.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,t)};return r}var ze={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Hf=/^(?:[ \t]*(?:\n|$))+/,Wf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_o=/(?:[*+-]|\d{1,9}[.)])/,wl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kl=ge(wl).replace(/bull/g,_o).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vf=ge(wl).replace(/bull/g,_o).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Co=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jf=/^[^\n]+/,$o=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Yf=ge(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$o).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xf=ge(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_o).getRegex(),Ur="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",Oo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zf=ge("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Oo).replace("tag",Ur).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vl=ge(Co).replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex(),Qf=ge(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vl).getRegex(),Io={blockquote:Qf,code:Wf,def:Yf,fences:Gf,heading:Kf,hr:Bn,html:Zf,lheading:kl,list:Xf,newline:Hf,paragraph:vl,table:jn,text:Jf},qi=ge("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex(),qf={...Io,lheading:Vf,table:qi,paragraph:ge(Co).replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex()},ep={...Io,html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oo).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:jn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ge(Co).replace("hr",Bn).replace("heading",` *#{1,6} *[^
69
- ]`).replace("lheading",kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,np=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sl=/^( {2,}|\\)\n(?!\s*$)/,rp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Hr=/[\p{P}\p{S}]/u,Ro=/[\s\p{P}\p{S}]/u,El=/[^\s\p{P}\p{S}]/u,sp=ge(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ro).getRegex(),jl=/(?!~)[\p{P}\p{S}]/u,op=/(?!~)[\s\p{P}\p{S}]/u,ip=/(?:[^\s\p{P}\p{S}]|~)/u,ap=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Al=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lp=ge(Al,"u").replace(/punct/g,Hr).getRegex(),cp=ge(Al,"u").replace(/punct/g,jl).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",up=ge(Nl,"gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Ro).replace(/punct/g,Hr).getRegex(),dp=ge(Nl,"gu").replace(/notPunctSpace/g,ip).replace(/punctSpace/g,op).replace(/punct/g,jl).getRegex(),fp=ge("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Ro).replace(/punct/g,Hr).getRegex(),pp=ge(/\\(punct)/,"gu").replace(/punct/g,Hr).getRegex(),hp=ge(/^<(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(),mp=ge(Oo).replace("(?:-->|$)","-->").getRegex(),gp=ge("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xp=ge(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Cr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Tl=ge(/^!?\[(label)\]\[(ref)\]/).replace("label",Cr).replace("ref",$o).getRegex(),_l=ge(/^!?\[(ref)\](?:\[\])?/).replace("ref",$o).getRegex(),bp=ge("reflink|nolink(?!\\()","g").replace("reflink",Tl).replace("nolink",_l).getRegex(),Mo={_backpedal:jn,anyPunctuation:pp,autolink:hp,blockSkip:ap,br:Sl,code:np,del:jn,emStrongLDelim:lp,emStrongRDelimAst:up,emStrongRDelimUnd:fp,escape:tp,link:xp,nolink:_l,punctuation:sp,reflink:Tl,reflinkSearch:bp,tag:gp,text:rp,url:jn},yp={...Mo,link:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",Cr).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cr).getRegex()},Js={...Mo,emStrongRDelimAst:dp,emStrongLDelim:cp,url:ge(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wp={...Js,br:ge(Sl).replace("{2,}","*").getRegex(),text:ge(Js.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ur={normal:Io,gfm:qf,pedantic:ep},kn={normal:Mo,gfm:Js,breaks:wp,pedantic:yp},kp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ea=e=>kp[e];function pt(e,t){if(t){if(ze.escapeTest.test(e))return e.replace(ze.escapeReplace,ea)}else if(ze.escapeTestNoEncode.test(e))return e.replace(ze.escapeReplaceNoEncode,ea);return e}function ta(e){try{e=encodeURI(e).replace(ze.percentDecode,"%")}catch{return null}return e}function na(e,t){var i;const n=e.replace(ze.findPipe,(a,l,c)=>{let u=!1,d=l;for(;--d>=0&&c[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(ze.splitPipe);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(ze.slashPipe,"|");return r}function vn(e,t,n){const r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function vp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ra(e,t,n,r,s){const i=t.href,a=t.title||null,l=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,c}function Sp(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const s=r[1];return t.split(`
66
+ `)}const Df=/^(https?:|data:image\/)/i;function Ao(e){const t=typeof e=="string";if(!t&&(typeof e!="object"||e===null))return null;const{url:n,altText:r,backgroundColor:s}=t?{url:e,altText:void 0,backgroundColor:void 0}:e;return typeof n!="string"||!Df.test(n)?null:{url:n,altText:typeof r=="string"&&r?r:void 0,backgroundColor:typeof s=="string"?s:void 0}}const xl={"x-x":()=>Promise.resolve().then(()=>require("./XExtension-jAiATfg-.cjs")),"x-linkedin":()=>Promise.resolve().then(()=>require("./LinkedInExtension-6xekO5bX.cjs"))},Bf=()=>Promise.resolve().then(()=>require("./LogoExtension-CTOxzCC7.cjs"));var Ff=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function No(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zf(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */var vs,Zi;function Qi(){if(Zi)return vs;Zi=1;function e($,I){(I==null||I>$.length)&&(I=$.length);for(var J=0,re=Array(I);J<I;J++)re[J]=$[J];return re}function t($){if(Array.isArray($))return $}function n($,I){var J=$==null?null:typeof Symbol<"u"&&$[Symbol.iterator]||$["@@iterator"];if(J!=null){var re,de,ke,Pe,fn=[],Je=!0,pn=!1;try{if(ke=(J=J.call($)).next,I!==0)for(;!(Je=(re=ke.call(J)).done)&&(fn.push(re.value),fn.length!==I);Je=!0);}catch(Xr){pn=!0,de=Xr}finally{try{if(!Je&&J.return!=null&&(Pe=J.return(),Object(Pe)!==Pe))return}finally{if(pn)throw de}}return fn}}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s($,I){return t($)||n($,I)||i($,I)||r()}function i($,I){if($){if(typeof $=="string")return e($,I);var J={}.toString.call($).slice(8,-1);return J==="Object"&&$.constructor&&(J=$.constructor.name),J==="Map"||J==="Set"?Array.from($):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?e($,I):void 0}}const a=Object.entries,l=Object.setPrototypeOf,c=Object.isFrozen,u=Object.getPrototypeOf,d=Object.getOwnPropertyDescriptor;let f=Object.freeze,p=Object.seal,m=Object.create,h=typeof Reflect<"u"&&Reflect,x=h.apply,k=h.construct;f||(f=function(I){return I}),p||(p=function(I){return I}),x||(x=function(I,J){for(var re=arguments.length,de=new Array(re>2?re-2:0),ke=2;ke<re;ke++)de[ke-2]=arguments[ke];return I.apply(J,de)}),k||(k=function(I){for(var J=arguments.length,re=new Array(J>1?J-1:0),de=1;de<J;de++)re[de-1]=arguments[de];return new I(...re)});const j=ee(Array.prototype.forEach),C=ee(Array.prototype.lastIndexOf),E=ee(Array.prototype.pop),R=ee(Array.prototype.push),D=ee(Array.prototype.splice),_=Array.isArray,A=ee(String.prototype.toLowerCase),v=ee(String.prototype.toString),y=ee(String.prototype.match),F=ee(String.prototype.replace),Z=ee(String.prototype.indexOf),N=ee(String.prototype.trim),W=ee(Number.prototype.toString),ie=ee(Boolean.prototype.toString),oe=typeof BigInt>"u"?null:ee(BigInt.prototype.toString),S=typeof Symbol>"u"?null:ee(Symbol.prototype.toString),T=ee(Object.prototype.hasOwnProperty),H=ee(Object.prototype.toString),V=ee(RegExp.prototype.test),ae=Te(TypeError);function ee($){return function(I){I instanceof RegExp&&(I.lastIndex=0);for(var J=arguments.length,re=new Array(J>1?J-1:0),de=1;de<J;de++)re[de-1]=arguments[de];return x($,I,re)}}function Te($){return function(){for(var I=arguments.length,J=new Array(I),re=0;re<I;re++)J[re]=arguments[re];return k($,J)}}function Q($,I){let J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A;if(l&&l($,null),!_(I))return $;let re=I.length;for(;re--;){let de=I[re];if(typeof de=="string"){const ke=J(de);ke!==de&&(c(I)||(I[re]=ke),de=ke)}$[de]=!0}return $}function ve($){for(let I=0;I<$.length;I++)T($,I)||($[I]=null);return $}function P($){const I=m(null);for(const re of a($)){var J=s(re,2);const de=J[0],ke=J[1];T($,de)&&(_(ke)?I[de]=ve(ke):ke&&typeof ke=="object"&&ke.constructor===Object?I[de]=P(ke):I[de]=ke)}return I}function Y($){switch(typeof $){case"string":return $;case"number":return W($);case"boolean":return ie($);case"bigint":return oe?oe($):"0";case"symbol":return S?S($):"Symbol()";case"undefined":return H($);case"function":case"object":{if($===null)return H($);const I=$,J=O(I,"toString");if(typeof J=="function"){const re=J(I);return typeof re=="string"?re:H(re)}return H($)}default:return H($)}}function O($,I){for(;$!==null;){const re=d($,I);if(re){if(re.get)return ee(re.get);if(typeof re.value=="function")return ee(re.value)}$=u($)}function J(){return null}return J}function q($){try{return V($,""),!0}catch{return!1}}const le=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),G=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pe=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),we=f(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fe=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Me=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xe=f(["#text"]),He=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Le=f(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X=f(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Se=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_e=p(/{{[\w\W]*|^[\w\W]*}}/g),me=p(/<%[\w\W]*|^[\w\W]*%>/g),mt=p(/\${[\w\W]*/g),et=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mt=p(/^aria-[\-\w]+$/),tt=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=p(/^(?:\w+script|data):/i),U=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),te=p(/^html$/i),ue=p(/^[a-z][.\w]*(-[.\w]+)+$/i),Ce=p(/<[/\w!]/g),rt=p(/<[/\w]/g),Jr=p(/<\/no(script|embed|frames)/i),Yr=p(/\/>/i),ut={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Gc=function(){return typeof window>"u"?null:window},Kc=function(I,J){if(typeof I!="object"||typeof I.createPolicy!="function")return null;let re=null;const de="data-tt-policy-suffix";J&&J.hasAttribute(de)&&(re=J.getAttribute(de));const ke="dompurify"+(re?"#"+re:"");try{return I.createPolicy(ke,{createHTML(Pe){return Pe},createScriptURL(Pe){return Pe}})}catch{return console.warn("TrustedTypes policy "+ke+" could not be created."),null}},Qo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},St=function(I,J,re,de){return T(I,J)&&_(I[J])?Q(de.base?P(de.base):{},I[J],de.transform):re};function qo(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gc();const I=L=>qo(L);if(I.version="3.4.11",I.removed=[],!$||!$.document||$.document.nodeType!==ut.document||!$.Element)return I.isSupported=!1,I;let J=$.document;const re=J,de=re.currentScript;$.DocumentFragment;const ke=$.HTMLTemplateElement,Pe=$.Node,fn=$.Element,Je=$.NodeFilter,pn=$.NamedNodeMap;pn===void 0&&($.NamedNodeMap||$.MozNamedAttrMap),$.HTMLFormElement;const Xr=$.DOMParser,Qn=$.trustedTypes,Lt=fn.prototype,Jc=O(Lt,"cloneNode"),ei=O(Lt,"remove"),Yc=O(Lt,"nextSibling"),hn=O(Lt,"childNodes"),mn=O(Lt,"parentNode"),ti=O(Lt,"shadowRoot"),Zr=O(Lt,"attributes"),Ye=Pe&&Pe.prototype?O(Pe.prototype,"nodeType"):null,Et=Pe&&Pe.prototype?O(Pe.prototype,"nodeName"):null;if(typeof ke=="function"){const L=J.createElement("template");L.content&&L.content.ownerDocument&&(J=L.content.ownerDocument)}let We,Pt="",Qr,ni=!1,gn=0;const ri=function(){if(gn>0)throw ae('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Vt=function(g){ri(),gn++;try{return We.createHTML(g)}finally{gn--}},Xc=function(g){ri(),gn++;try{return We.createScriptURL(g)}finally{gn--}},Zc=function(){return ni||(Qr=Kc(Qn,de),ni=!0),Qr},qn=J,qr=qn.implementation,si=qn.createNodeIterator,Qc=qn.createDocumentFragment,qc=qn.getElementsByTagName,eu=re.importNode;let $e=Qo();I.isSupported=typeof a=="function"&&typeof mn=="function"&&qr&&qr.createHTMLDocument!==void 0;const tu=_e,nu=me,ru=mt,su=et,ou=Mt,iu=B,oi=U,au=ue;let ii=tt,Ee=null;const ai=Q({},[...le,...G,...pe,...fe,...xe]);let je=null;const li=Q({},[...He,...Le,...X,...Se]);let Ae=Object.seal(m(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xn=null,ci=null;const jt=Object.seal(m(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ui=!0,es=!0,di=!1,fi=!0,At=!1,bn=!0,Dt=!1,ts=!1,ns=null,rs=null,ss=!1,Jt=!1,er=!1,tr=!1,pi=!0,hi=!1;const mi="user-content-";let os=!0,is=!1,Yt={},dt=null;const as=Q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gi=null;const xi=Q({},["audio","video","img","source","image","track"]);let ls=null;const bi=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",rr="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let Xt=ft,cs=!1,us=null;const lu=Q({},[nr,rr,ft],v),yi=f(["mi","mo","mn","ms","mtext"]);let ds=Q({},yi);const wi=f(["annotation-xml"]);let fs=Q({},wi);const cu=Q({},["title","style","font","a","script"]);let yn=null;const uu=["application/xhtml+xml","text/html"],du="text/html";let Ne=null,Zt=null;const fu=J.createElement("form"),ki=function(g){return g instanceof RegExp||g instanceof Function},ps=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zt&&Zt===g)return;(!g||typeof g!="object")&&(g={}),g=P(g),yn=uu.indexOf(g.PARSER_MEDIA_TYPE)===-1?du:g.PARSER_MEDIA_TYPE,Ne=yn==="application/xhtml+xml"?v:A,Ee=St(g,"ALLOWED_TAGS",ai,{transform:Ne}),je=St(g,"ALLOWED_ATTR",li,{transform:Ne}),us=St(g,"ALLOWED_NAMESPACES",lu,{transform:v}),ls=St(g,"ADD_URI_SAFE_ATTR",bi,{transform:Ne,base:bi}),gi=St(g,"ADD_DATA_URI_TAGS",xi,{transform:Ne,base:xi}),dt=St(g,"FORBID_CONTENTS",as,{transform:Ne}),xn=St(g,"FORBID_TAGS",P({}),{transform:Ne}),ci=St(g,"FORBID_ATTR",P({}),{transform:Ne}),Yt=T(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?P(g.USE_PROFILES):g.USE_PROFILES:!1,ui=g.ALLOW_ARIA_ATTR!==!1,es=g.ALLOW_DATA_ATTR!==!1,di=g.ALLOW_UNKNOWN_PROTOCOLS||!1,fi=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,At=g.SAFE_FOR_TEMPLATES||!1,bn=g.SAFE_FOR_XML!==!1,Dt=g.WHOLE_DOCUMENT||!1,Jt=g.RETURN_DOM||!1,er=g.RETURN_DOM_FRAGMENT||!1,tr=g.RETURN_TRUSTED_TYPE||!1,ss=g.FORCE_BODY||!1,pi=g.SANITIZE_DOM!==!1,hi=g.SANITIZE_NAMED_PROPS||!1,os=g.KEEP_CONTENT!==!1,is=g.IN_PLACE||!1,ii=q(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:tt,Xt=typeof g.NAMESPACE=="string"?g.NAMESPACE:ft,ds=T(g,"MATHML_TEXT_INTEGRATION_POINTS")&&g.MATHML_TEXT_INTEGRATION_POINTS&&typeof g.MATHML_TEXT_INTEGRATION_POINTS=="object"?P(g.MATHML_TEXT_INTEGRATION_POINTS):Q({},yi),fs=T(g,"HTML_INTEGRATION_POINTS")&&g.HTML_INTEGRATION_POINTS&&typeof g.HTML_INTEGRATION_POINTS=="object"?P(g.HTML_INTEGRATION_POINTS):Q({},wi);const w=T(g,"CUSTOM_ELEMENT_HANDLING")&&g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING=="object"?P(g.CUSTOM_ELEMENT_HANDLING):m(null);if(Ae=m(null),T(w,"tagNameCheck")&&ki(w.tagNameCheck)&&(Ae.tagNameCheck=w.tagNameCheck),T(w,"attributeNameCheck")&&ki(w.attributeNameCheck)&&(Ae.attributeNameCheck=w.attributeNameCheck),T(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(Ae.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),p(Ae),At&&(es=!1),er&&(Jt=!0),Yt&&(Ee=Q({},xe),je=m(null),Yt.html===!0&&(Q(Ee,le),Q(je,He)),Yt.svg===!0&&(Q(Ee,G),Q(je,Le),Q(je,Se)),Yt.svgFilters===!0&&(Q(Ee,pe),Q(je,Le),Q(je,Se)),Yt.mathMl===!0&&(Q(Ee,fe),Q(je,X),Q(je,Se))),jt.tagCheck=null,jt.attributeCheck=null,T(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?jt.tagCheck=g.ADD_TAGS:_(g.ADD_TAGS)&&(Ee===ai&&(Ee=P(Ee)),Q(Ee,g.ADD_TAGS,Ne))),T(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?jt.attributeCheck=g.ADD_ATTR:_(g.ADD_ATTR)&&(je===li&&(je=P(je)),Q(je,g.ADD_ATTR,Ne))),T(g,"ADD_URI_SAFE_ATTR")&&_(g.ADD_URI_SAFE_ATTR)&&Q(ls,g.ADD_URI_SAFE_ATTR,Ne),T(g,"FORBID_CONTENTS")&&_(g.FORBID_CONTENTS)&&(dt===as&&(dt=P(dt)),Q(dt,g.FORBID_CONTENTS,Ne)),T(g,"ADD_FORBID_CONTENTS")&&_(g.ADD_FORBID_CONTENTS)&&(dt===as&&(dt=P(dt)),Q(dt,g.ADD_FORBID_CONTENTS,Ne)),os&&(Ee["#text"]=!0),Dt&&Q(Ee,["html","head","body"]),Ee.table&&(Q(Ee,["tbody"]),delete xn.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const M=We;We=g.TRUSTED_TYPES_POLICY;try{Pt=Vt("")}catch(K){throw We=M,K}}else g.TRUSTED_TYPES_POLICY===null?(We=void 0,Pt=""):(We===void 0&&(We=Zc()),We&&typeof Pt=="string"&&(Pt=Vt("")));f&&f(g),Zt=g},vi=Q({},[...G,...pe,...we]),Si=Q({},[...fe,...Me]),pu=function(g,w,M){return w.namespaceURI===ft?g==="svg":w.namespaceURI===nr?g==="svg"&&(M==="annotation-xml"||ds[M]):!!vi[g]},hu=function(g,w,M){return w.namespaceURI===ft?g==="math":w.namespaceURI===rr?g==="math"&&fs[M]:!!Si[g]},mu=function(g,w,M){return w.namespaceURI===rr&&!fs[M]||w.namespaceURI===nr&&!ds[M]?!1:!Si[g]&&(cu[g]||!vi[g])},gu=function(g){let w=mn(g);(!w||!w.tagName)&&(w={namespaceURI:Xt,tagName:"template"});const M=A(g.tagName),K=A(w.tagName);return us[g.namespaceURI]?g.namespaceURI===rr?pu(M,w,K):g.namespaceURI===nr?hu(M,w,K):g.namespaceURI===ft?mu(M,w,K):!!(yn==="application/xhtml+xml"&&us[g.namespaceURI]):!1},Nt=function(g){R(I.removed,{element:g});try{mn(g).removeChild(g)}catch{if(ei(g),!mn(g))throw ae("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ei=function(g){const w=hn(g);if(w){const K=[];j(w,ce=>{R(K,ce)}),j(K,ce=>{try{ei(ce)}catch{}})}const M=Zr(g);if(M)for(let K=M.length-1;K>=0;--K){const ce=M[K],he=ce&&ce.name;if(typeof he=="string")try{g.removeAttribute(he)}catch{}}},Bt=function(g,w){try{R(I.removed,{attribute:w.getAttributeNode(g),from:w})}catch{R(I.removed,{attribute:null,from:w})}if(w.removeAttribute(g),g==="is")if(Jt||er)try{Nt(w)}catch{}else try{w.setAttribute(g,"")}catch{}},xu=function(g){const w=Zr(g);if(w)for(let M=w.length-1;M>=0;--M){const K=w[M],ce=K&&K.name;if(!(typeof ce!="string"||je[Ne(ce)]))try{g.removeAttribute(ce)}catch{}}},bu=function(g){const w=[g];for(;w.length>0;){const M=w.pop();(Ye?Ye(M):M.nodeType)===ut.element&&xu(M);const ce=hn(M);if(ce)for(let he=ce.length-1;he>=0;--he)w.push(ce[he])}},ji=function(g){let w=null,M=null;if(ss)g="<remove></remove>"+g;else{const he=y(g,/^[\r\n\t ]+/);M=he&&he[0]}yn==="application/xhtml+xml"&&Xt===ft&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const K=We?Vt(g):g;if(Xt===ft)try{w=new Xr().parseFromString(K,yn)}catch{}if(!w||!w.documentElement){w=qr.createDocument(Xt,"template",null);try{w.documentElement.innerHTML=cs?Pt:K}catch{}}const ce=w.body||w.documentElement;return g&&M&&ce.insertBefore(J.createTextNode(M),ce.childNodes[0]||null),Xt===ft?qc.call(w,Dt?"html":"body")[0]:Dt?w.documentElement:ce},Ai=function(g){return si.call(g.ownerDocument||g,g,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT|Je.SHOW_PROCESSING_INSTRUCTION|Je.SHOW_CDATA_SECTION,null)},sr=function(g){return g=F(g,tu," "),g=F(g,nu," "),g=F(g,ru," "),g},hs=function(g){var w;g.normalize();const M=si.call(g.ownerDocument||g,g,Je.SHOW_TEXT|Je.SHOW_COMMENT|Je.SHOW_CDATA_SECTION|Je.SHOW_PROCESSING_INSTRUCTION,null);let K=M.nextNode();for(;K;)K.data=sr(K.data),K=M.nextNode();const ce=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");ce&&j(ce,he=>{Qt(he.content)&&hs(he.content)})},or=function(g){const w=Et?Et(g):null;return typeof w!="string"||Ne(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Zr(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==Ye(g)||g.childNodes!==hn(g)},Qt=function(g){if(!Ye||typeof g!="object"||g===null)return!1;try{return Ye(g)===ut.documentFragment}catch{return!1}},wn=function(g){if(!Ye||typeof g!="object"||g===null)return!1;try{return typeof Ye(g)=="number"}catch{return!1}};function gt(L,g,w){L.length!==0&&j(L,M=>{M.call(I,g,w,Zt)})}const yu=function(g,w){return!!(bn&&g.hasChildNodes()&&!wn(g.firstElementChild)&&V(Ce,g.textContent)&&V(Ce,g.innerHTML)||bn&&g.namespaceURI===ft&&w==="style"&&wn(g.firstElementChild)||g.nodeType===ut.processingInstruction||bn&&g.nodeType===ut.comment&&V(rt,g.data))},wu=function(g,w){if(!xn[w]&&_i(w)&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,w)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(w)))return!1;if(os&&!dt[w]){const M=mn(g),K=hn(g);if(K&&M){const ce=K.length;for(let he=ce-1;he>=0;--he){const Re=is?K[he]:Jc(K[he],!0);M.insertBefore(Re,Yc(g))}}}return Nt(g),!0},Ni=function(g){if(gt($e.beforeSanitizeElements,g,null),or(g))return Nt(g),!0;const w=Ne(Et?Et(g):g.nodeName);if(gt($e.uponSanitizeElement,g,{tagName:w,allowedTags:Ee}),yu(g,w))return Nt(g),!0;if(xn[w]||!(jt.tagCheck instanceof Function&&jt.tagCheck(w))&&!Ee[w])return wu(g,w);if((Ye?Ye(g):g.nodeType)===ut.element&&!gu(g)||(w==="noscript"||w==="noembed"||w==="noframes")&&V(Jr,g.innerHTML))return Nt(g),!0;if(At&&g.nodeType===ut.text){const K=sr(g.textContent);g.textContent!==K&&(R(I.removed,{element:g.cloneNode()}),g.textContent=K)}return gt($e.afterSanitizeElements,g,null),!1},Ti=function(g,w,M){if(ci[w]||pi&&(w==="id"||w==="name")&&(M in J||M in fu))return!1;const K=je[w]||jt.attributeCheck instanceof Function&&jt.attributeCheck(w,g);if(!(es&&V(su,w))){if(!(ui&&V(ou,w))){if(K){if(!ls[w]){if(!V(ii,F(M,oi,""))){if(!((w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Z(M,"data:")===0&&gi[g])){if(!(di&&!V(iu,F(M,oi,"")))){if(M)return!1}}}}}else if(!(_i(g)&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,g)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(g))&&(Ae.attributeNameCheck instanceof RegExp&&V(Ae.attributeNameCheck,w)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(w,g))||w==="is"&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&V(Ae.tagNameCheck,M)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(M))))return!1}}return!0},ku=Q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_i=function(g){return!ku[A(g)]&&V(au,g)},vu=function(g,w,M,K){if(We&&typeof Qn=="object"&&typeof Qn.getAttributeType=="function"&&!M)switch(Qn.getAttributeType(g,w)){case"TrustedHTML":return Vt(K);case"TrustedScriptURL":return Xc(K)}return K},Su=function(g,w,M,K){try{M?g.setAttributeNS(M,w,K):g.setAttribute(w,K),or(g)?Nt(g):E(I.removed)}catch{Bt(w,g)}},Ci=function(g){gt($e.beforeSanitizeAttributes,g,null);const w=g.attributes;if(!w||or(g))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:je,forceKeepAttr:void 0};let K=w.length;const ce=Ne(g.nodeName);for(;K--;){const he=w[K],Re=he.name,Ie=he.namespaceURI,nt=he.value,st=Ne(Re),gs=nt;let Be=Re==="value"?gs:N(gs);if(M.attrName=st,M.attrValue=Be,M.keepAttr=!0,M.forceKeepAttr=void 0,gt($e.uponSanitizeAttribute,g,M),Be=M.attrValue,hi&&(st==="id"||st==="name")&&Z(Be,mi)!==0&&(Bt(Re,g),Be=mi+Be),bn&&V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){Bt(Re,g);continue}if(st==="attributename"&&y(Be,"href")){Bt(Re,g);continue}if(!M.forceKeepAttr){if(!M.keepAttr){Bt(Re,g);continue}if(!fi&&V(Yr,Be)){Bt(Re,g);continue}if(At&&(Be=sr(Be)),!Ti(ce,st,Be)){Bt(Re,g);continue}Be=vu(ce,st,Ie,Be),Be!==gs&&Su(g,Re,Ie,Be)}}gt($e.afterSanitizeAttributes,g,null)},ir=function(g){let w=null;const M=Ai(g);for(gt($e.beforeSanitizeShadowDOM,g,null);w=M.nextNode();)if(gt($e.uponSanitizeShadowNode,w,null),Ni(w),Ci(w),Qt(w.content)&&ir(w.content),(Ye?Ye(w):w.nodeType)===ut.element){const ce=ti(w);Qt(ce)&&(ms(ce),ir(ce))}gt($e.afterSanitizeShadowDOM,g,null)},ms=function(g){const w=[{node:g,shadow:null}];for(;w.length>0;){const M=w.pop();if(M.shadow){ir(M.shadow);continue}const K=M.node,he=(Ye?Ye(K):K.nodeType)===ut.element,Re=hn(K);if(Re)for(let Ie=Re.length-1;Ie>=0;--Ie)w.push({node:Re[Ie],shadow:null});if(he){const Ie=Et?Et(K):null;if(typeof Ie=="string"&&Ne(Ie)==="template"){const nt=K.content;Qt(nt)&&w.push({node:nt,shadow:null})}}if(he){const Ie=ti(K);Qt(Ie)&&w.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return I.sanitize=function(L){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,M=null,K=null,ce=null;if(cs=!L,cs&&(L="<!-->"),typeof L!="string"&&!wn(L)&&(L=Y(L),typeof L!="string"))throw ae("dirty is not a string, aborting");if(!I.isSupported)return L;ts?(Ee=ns,je=rs):ps(g),($e.uponSanitizeElement.length>0||$e.uponSanitizeAttribute.length>0)&&(Ee=P(Ee)),$e.uponSanitizeAttribute.length>0&&(je=P(je)),I.removed=[];const he=is&&typeof L!="string"&&wn(L);if(he){const nt=Et?Et(L):L.nodeName;if(typeof nt=="string"){const st=Ne(nt);if(!Ee[st]||xn[st])throw ae("root node is forbidden and cannot be sanitized in-place")}if(or(L))throw ae("root node is clobbered and cannot be sanitized in-place");try{ms(L)}catch(st){throw Ei(L),st}}else if(wn(L))w=ji("<!---->"),M=w.ownerDocument.importNode(L,!0),M.nodeType===ut.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?w=M:w.appendChild(M),ms(M);else{if(!Jt&&!At&&!Dt&&L.indexOf("<")===-1)return We&&tr?Vt(L):L;if(w=ji(L),!w)return Jt?null:tr?Pt:""}w&&ss&&Nt(w.firstChild);const Re=Ai(he?L:w);try{for(;K=Re.nextNode();)Ni(K),Ci(K),Qt(K.content)&&ir(K.content)}catch(nt){throw he&&Ei(L),nt}if(he)return j(I.removed,nt=>{nt.element&&bu(nt.element)}),At&&hs(L),L;if(Jt){if(At&&hs(w),er)for(ce=Qc.call(w.ownerDocument);w.firstChild;)ce.appendChild(w.firstChild);else ce=w;return(je.shadowroot||je.shadowrootmode)&&(ce=eu.call(re,ce,!0)),ce}let Ie=Dt?w.outerHTML:w.innerHTML;return Dt&&Ee["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&V(te,w.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
68
+ `+Ie),At&&(Ie=sr(Ie)),We&&tr?Vt(Ie):Ie},I.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ps(L),ts=!0,ns=Ee,rs=je},I.clearConfig=function(){Zt=null,ts=!1,ns=null,rs=null,We=Qr,Pt=""},I.isValidAttribute=function(L,g,w){Zt||ps({});const M=Ne(L),K=Ne(g);return Ti(M,K,w)},I.addHook=function(L,g){typeof g=="function"&&T($e,L)&&R($e[L],g)},I.removeHook=function(L,g){if(T($e,L)){if(g!==void 0){const w=C($e[L],g);return w===-1?void 0:D($e[L],w,1)[0]}return E($e[L])}},I.removeHooks=function(L){T($e,L)&&($e[L]=[])},I.removeAllHooks=function(){$e=Qo()},I}var Vc=qo();return vs=Vc,vs}var Uf=self.DOMPurify||(self.DOMPurify=Qi().default||Qi());const bl=No(Uf);function To(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=To();function yl(e){Gt=e}var An={exec:()=>null};function ge(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(ze.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,t)};return r}var ze={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Hf=/^(?:[ \t]*(?:\n|$))+/,Wf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_o=/(?:[*+-]|\d{1,9}[.)])/,wl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kl=ge(wl).replace(/bull/g,_o).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vf=ge(wl).replace(/bull/g,_o).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Co=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jf=/^[^\n]+/,$o=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Yf=ge(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$o).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xf=ge(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_o).getRegex(),Ur="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",Oo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zf=ge("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Oo).replace("tag",Ur).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vl=ge(Co).replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex(),Qf=ge(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vl).getRegex(),Io={blockquote:Qf,code:Wf,def:Yf,fences:Gf,heading:Kf,hr:Bn,html:Zf,lheading:kl,list:Xf,newline:Hf,paragraph:vl,table:An,text:Jf},qi=ge("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex(),qf={...Io,lheading:Vf,table:qi,paragraph:ge(Co).replace("hr",Bn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ur).getRegex()},ep={...Io,html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oo).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:An,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ge(Co).replace("hr",Bn).replace("heading",` *#{1,6} *[^
69
+ ]`).replace("lheading",kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,np=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sl=/^( {2,}|\\)\n(?!\s*$)/,rp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Hr=/[\p{P}\p{S}]/u,Ro=/[\s\p{P}\p{S}]/u,El=/[^\s\p{P}\p{S}]/u,sp=ge(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ro).getRegex(),jl=/(?!~)[\p{P}\p{S}]/u,op=/(?!~)[\s\p{P}\p{S}]/u,ip=/(?:[^\s\p{P}\p{S}]|~)/u,ap=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Al=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lp=ge(Al,"u").replace(/punct/g,Hr).getRegex(),cp=ge(Al,"u").replace(/punct/g,jl).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",up=ge(Nl,"gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Ro).replace(/punct/g,Hr).getRegex(),dp=ge(Nl,"gu").replace(/notPunctSpace/g,ip).replace(/punctSpace/g,op).replace(/punct/g,jl).getRegex(),fp=ge("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Ro).replace(/punct/g,Hr).getRegex(),pp=ge(/\\(punct)/,"gu").replace(/punct/g,Hr).getRegex(),hp=ge(/^<(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(),mp=ge(Oo).replace("(?:-->|$)","-->").getRegex(),gp=ge("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xp=ge(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Cr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Tl=ge(/^!?\[(label)\]\[(ref)\]/).replace("label",Cr).replace("ref",$o).getRegex(),_l=ge(/^!?\[(ref)\](?:\[\])?/).replace("ref",$o).getRegex(),bp=ge("reflink|nolink(?!\\()","g").replace("reflink",Tl).replace("nolink",_l).getRegex(),Mo={_backpedal:An,anyPunctuation:pp,autolink:hp,blockSkip:ap,br:Sl,code:np,del:An,emStrongLDelim:lp,emStrongRDelimAst:up,emStrongRDelimUnd:fp,escape:tp,link:xp,nolink:_l,punctuation:sp,reflink:Tl,reflinkSearch:bp,tag:gp,text:rp,url:An},yp={...Mo,link:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",Cr).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cr).getRegex()},Js={...Mo,emStrongRDelimAst:dp,emStrongLDelim:cp,url:ge(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wp={...Js,br:ge(Sl).replace("{2,}","*").getRegex(),text:ge(Js.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ur={normal:Io,gfm:qf,pedantic:ep},vn={normal:Mo,gfm:Js,breaks:wp,pedantic:yp},kp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ea=e=>kp[e];function pt(e,t){if(t){if(ze.escapeTest.test(e))return e.replace(ze.escapeReplace,ea)}else if(ze.escapeTestNoEncode.test(e))return e.replace(ze.escapeReplaceNoEncode,ea);return e}function ta(e){try{e=encodeURI(e).replace(ze.percentDecode,"%")}catch{return null}return e}function na(e,t){var i;const n=e.replace(ze.findPipe,(a,l,c)=>{let u=!1,d=l;for(;--d>=0&&c[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(ze.splitPipe);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(ze.slashPipe,"|");return r}function Sn(e,t,n){const r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function vp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ra(e,t,n,r,s){const i=t.href,a=t.title||null,l=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,c}function Sp(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const s=r[1];return t.split(`
70
70
  `).map(i=>{const a=i.match(n.other.beginningSpace);if(a===null)return i;const[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
71
- `)}var $r=class{constructor(e){be(this,"options");be(this,"rules");be(this,"lexer");this.options=e||Gt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vn(n,`
72
- `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=Sp(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=vn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:vn(t[0],`
73
- `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=vn(t[0],`
71
+ `)}var $r=class{constructor(e){be(this,"options");be(this,"rules");be(this,"lexer");this.options=e||Gt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Sn(n,`
72
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=Sp(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=Sn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Sn(t[0],`
73
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Sn(t[0],`
74
74
  `).split(`
75
75
  `),r="",s="";const i=[];for(;n.length>0;){let a=!1;const l=[];let c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),a=!0;else if(!a)l.push(n[c]);else break;n=n.slice(c);const u=l.join(`
76
76
  `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
@@ -90,7 +90,7 @@ ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
90
90
  `+p}!m&&!p.trim()&&(m=!0),u+=_+`
91
91
  `,e=e.substring(_.length+1),f=A.slice(h)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,k;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(k=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!x,checked:k,loose:!1,text:d,tokens:[]}),s.raw+=u}const l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){const u=s.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=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:n,raw:t[0],href:r,title:s}}}table(e){var a;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=na(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
92
92
  `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const l of r)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(const l of s)i.rows.push(na(l,i.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[u]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
93
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const 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){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const i=vn(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=vp(t[2],"()");if(i===-2)return;if(i>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],s=i[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),ra(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return ra(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...r[0]].length-1;let a,l,c=i,u=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=[...a].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=[...r[0]][0].length,p=e.slice(0,i+r.index+f+l);if(Math.min(i,l)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const m=p.slice(2,-2);return{type:"strong",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,s;if(t[2]==="@")r=t[0],s="mailto:"+r;else{let i;do i=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(i!==t[0]);r=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},wt=class Ys{constructor(t){be(this,"tokens");be(this,"options");be(this,"state");be(this,"tokenizer");be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gt,this.options.tokenizer=this.options.tokenizer||new $r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:ze,block:ur.normal,inline:kn.normal};this.options.pedantic?(n.block=ur.pedantic,n.inline=kn.pedantic):this.options.gfm&&(n.block=ur.gfm,this.options.breaks?n.inline=kn.breaks:n.inline=kn.gfm),this.tokenizer.rules=n}static get rules(){return{block:ur,inline:kn}}static lex(t,n){return new Ys(n).lex(t)}static lexInline(t,n){return new Ys(n).inlineTokens(t)}lex(t){t=t.replace(ze.carriageReturn,`
93
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const 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){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const i=Sn(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=vp(t[2],"()");if(i===-2)return;if(i>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],s=i[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),ra(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return ra(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...r[0]].length-1;let a,l,c=i,u=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=[...a].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const f=[...r[0]][0].length,p=e.slice(0,i+r.index+f+l);if(Math.min(i,l)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const m=p.slice(2,-2);return{type:"strong",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,s;if(t[2]==="@")r=t[0],s="mailto:"+r;else{let i;do i=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(i!==t[0]);r=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},wt=class Ys{constructor(t){be(this,"tokens");be(this,"options");be(this,"state");be(this,"tokenizer");be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gt,this.options.tokenizer=this.options.tokenizer||new $r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:ze,block:ur.normal,inline:vn.normal};this.options.pedantic?(n.block=ur.pedantic,n.inline=vn.pedantic):this.options.gfm&&(n.block=ur.gfm,this.options.breaks?n.inline=vn.breaks:n.inline=vn.gfm),this.tokenizer.rules=n}static get rules(){return{block:ur,inline:vn}}static lex(t,n){return new Ys(n).lex(t)}static lexInline(t,n){return new Ys(n).inlineTokens(t)}lex(t){t=t.replace(ze.carriageReturn,`
94
94
  `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var s,i,a;for(this.options.pedantic&&(t=t.replace(ze.tabCharGlobal," ").replace(ze.spaceLine,""));t;){let l;if((i=(s=this.options.extensions)==null?void 0:s.block)!=null&&i.some(u=>(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const u=n.at(-1);l.raw.length===1&&u!==void 0?u.raw+=`
95
95
  `:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
96
96
  `+l.raw,u.text+=`
@@ -121,18 +121,18 @@ ${e}</tr>
121
121
  `}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>${pt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),s=ta(e);if(s===null)return r;e=s;let i='<a href="'+e+'"';return t&&(i+=' title="'+pt(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const s=ta(e);if(s===null)return pt(n);e=s;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${pt(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:pt(e.text)}},Lo=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},kt=class Xs{constructor(t){be(this,"options");be(this,"renderer");be(this,"textRenderer");this.options=t||Gt,this.options.renderer=this.options.renderer||new Or,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lo}static parse(t,n){return new Xs(n).parse(t)}static parseInline(t,n){return new Xs(n).parseInline(t)}parse(t,n=!0){var s,i;let r="";for(let a=0;a<t.length;a++){const l=t[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[l.type]){const u=l,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){r+=d||"";continue}}const c=l;switch(c.type){case"space":{r+=this.renderer.space(c);continue}case"hr":{r+=this.renderer.hr(c);continue}case"heading":{r+=this.renderer.heading(c);continue}case"code":{r+=this.renderer.code(c);continue}case"table":{r+=this.renderer.table(c);continue}case"blockquote":{r+=this.renderer.blockquote(c);continue}case"list":{r+=this.renderer.list(c);continue}case"html":{r+=this.renderer.html(c);continue}case"paragraph":{r+=this.renderer.paragraph(c);continue}case"text":{let u=c,d=this.renderer.text(u);for(;a+1<t.length&&t[a+1].type==="text";)u=t[++a],d+=`
122
122
  `+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):r+=d;continue}default:{const u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(t,n=this.renderer){var s,i;let r="";for(let a=0;a<t.length;a++){const l=t[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[l.type]){const u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){r+=u||"";continue}}const c=l;switch(c.type){case"escape":{r+=n.text(c);break}case"html":{r+=n.html(c);break}case"link":{r+=n.link(c);break}case"image":{r+=n.image(c);break}case"strong":{r+=n.strong(c);break}case"em":{r+=n.em(c);break}case"codespan":{r+=n.codespan(c);break}case"br":{r+=n.br(c);break}case"del":{r+=n.del(c);break}case"text":{r+=n.text(c);break}default:{const u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Is,vr=(Is=class{constructor(e){be(this,"options");be(this,"block");this.options=e||Gt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?wt.lex:wt.lexInline}provideParser(){return this.block?kt.parse:kt.parseInline}},be(Is,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Is),Cl=class{constructor(...e){be(this,"defaults",To());be(this,"options",this.setOptions);be(this,"parse",this.parseMarkdown(!0));be(this,"parseInline",this.parseMarkdown(!1));be(this,"Parser",kt);be(this,"Renderer",Or);be(this,"TextRenderer",Lo);be(this,"Lexer",wt);be(this,"Tokenizer",$r);be(this,"Hooks",vr);this.use(...e)}walkTokens(e,t){var r,s;let n=[];for(const i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{const a=i;for(const l of a.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of a.rows)for(const c of l)n=n.concat(this.walkTokens(c.tokens,t));break}case"list":{const a=i;n=n.concat(this.walkTokens(a.items,t));break}default:{const a=i;(s=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{const c=a[l].flat(1/0);n=n.concat(this.walkTokens(c,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const i=t.renderers[s.name];i?t.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[s.level];i?i.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)}),r.extensions=t),n.renderer){const s=this.defaults.renderer||new Or(this.defaults);for(const i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const a=i,l=n.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}r.renderer=s}if(n.tokenizer){const s=this.defaults.tokenizer||new $r(this.defaults);for(const i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const a=i,l=n.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}r.tokenizer=s}if(n.hooks){const s=this.defaults.hooks||new vr;for(const i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const a=i,l=n.hooks[a],c=s[a];vr.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>c.call(s,f));const d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}r.hooks=s}if(n.walkTokens){const s=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return wt.lex(e,t??this.defaults)}parser(e,t){return kt.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const s={...r},i={...this.defaults,...s},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(new 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 n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const l=i.hooks?i.hooks.provideLexer():e?wt.lex:wt.lexInline,c=i.hooks?i.hooks.provideParser():e?kt.parse:kt.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(n=i.hooks.preprocess(n));let u=l(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(e,t){return n=>{if(n.message+=`
123
123
  Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+pt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Ut=new Cl;function ye(e,t){return Ut.parse(e,t)}ye.options=ye.setOptions=function(e){return Ut.setOptions(e),ye.defaults=Ut.defaults,yl(ye.defaults),ye};ye.getDefaults=To;ye.defaults=Gt;ye.use=function(...e){return Ut.use(...e),ye.defaults=Ut.defaults,yl(ye.defaults),ye};ye.walkTokens=function(e,t){return Ut.walkTokens(e,t)};ye.parseInline=Ut.parseInline;ye.Parser=kt;ye.parser=kt.parse;ye.Renderer=Or;ye.TextRenderer=Lo;ye.Lexer=wt;ye.lexer=wt.lex;ye.Tokenizer=$r;ye.Hooks=vr;ye.parse=ye;ye.options;ye.setOptions;ye.use;ye.walkTokens;ye.parseInline;kt.parse;wt.lex;function Ep(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),typeof e.emptyLangClass!="string"&&(e.emptyLangClass=""),{async:!!e.async,walkTokens(t){if(t.type!=="code")return;const n=sa(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(oa(t));const r=e.highlight(t.text,n,t.lang||"");if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");oa(t)(r)},useNewRenderer:!0,renderer:{code(t,n,r){typeof t=="object"&&(r=t.escaped,n=t.lang,t=t.text);const s=sa(n),i=s?e.langPrefix+aa(s):e.emptyLangClass,a=i?` class="${i}"`:"";return t=t.replace(/\n$/,""),`<pre><code${a}>${r?t:aa(t,!0)}
124
- </code></pre>`}}}}function sa(e){return(e||"").match(/\S*/)[0]}function oa(e){return t=>{typeof t=="string"&&t!==e.text&&(e.escaped=!0,e.text=t)}}const $l=/[&<>"']/,jp=new RegExp($l.source,"g"),Ol=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ap=new RegExp(Ol.source,"g"),Np={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ia=e=>Np[e];function aa(e,t){if(t){if($l.test(e))return e.replace(jp,ia)}else if(Ol.test(e))return e.replace(Ap,ia);return e}function Il(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Il(n)}),e}class la{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Rl(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function _t(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const s in r)n[s]=r[s]}),n}const Tp="</span>",ca=e=>!!e.scope,_p=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class Cp{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Rl(t)}openNode(t){if(!ca(t))return;const n=_p(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){ca(t)&&(this.buffer+=Tp)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const ua=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Po{constructor(){this.rootNode=ua(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=ua({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Po._collapse(n)}))}}class $p extends Po{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Cp(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function On(e){return e?typeof e=="string"?e:e.source:null}function Ml(e){return Kt("(?=",e,")")}function Op(e){return Kt("(?:",e,")*")}function Ip(e){return Kt("(?:",e,")?")}function Kt(...e){return e.map(n=>On(n)).join("")}function Rp(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Do(...e){return"("+(Rp(e).capture?"":"?:")+e.map(r=>On(r)).join("|")+")"}function Ll(e){return new RegExp(e.toString()+"|").exec("").length-1}function Mp(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Lp=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Bo(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const s=n;let i=On(r),a="";for(;i.length>0;){const l=Lp.exec(i);if(!l){a+=i;break}a+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+s):(a+=l[0],l[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const Pp=/\b\B/,Pl="[a-zA-Z]\\w*",Fo="[a-zA-Z_]\\w*",Dl="\\b\\d+(\\.\\d+)?",Bl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Fl="\\b(0b[01]+)",Dp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Bp=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Kt(t,/.*\b/,e.binary,/\b.*/)),_t({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},In={begin:"\\\\[\\s\\S]",relevance:0},Fp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[In]},zp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[In]},Up={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Wr=function(e,t,n={}){const r=_t({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=Do("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Kt(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Hp=Wr("//","$"),Wp=Wr("/\\*","\\*/"),Gp=Wr("#","$"),Kp={scope:"number",begin:Dl,relevance:0},Vp={scope:"number",begin:Bl,relevance:0},Jp={scope:"number",begin:Fl,relevance:0},Yp={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[In,{begin:/\[/,end:/\]/,relevance:0,contains:[In]}]},Xp={scope:"title",begin:Pl,relevance:0},Zp={scope:"title",begin:Fo,relevance:0},Qp={begin:"\\.\\s*"+Fo,relevance:0},qp=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var dr=Object.freeze({__proto__:null,APOS_STRING_MODE:Fp,BACKSLASH_ESCAPE:In,BINARY_NUMBER_MODE:Jp,BINARY_NUMBER_RE:Fl,COMMENT:Wr,C_BLOCK_COMMENT_MODE:Wp,C_LINE_COMMENT_MODE:Hp,C_NUMBER_MODE:Vp,C_NUMBER_RE:Bl,END_SAME_AS_BEGIN:qp,HASH_COMMENT_MODE:Gp,IDENT_RE:Pl,MATCH_NOTHING_RE:Pp,METHOD_GUARD:Qp,NUMBER_MODE:Kp,NUMBER_RE:Dl,PHRASAL_WORDS_MODE:Up,QUOTE_STRING_MODE:zp,REGEXP_MODE:Yp,RE_STARTERS_RE:Dp,SHEBANG:Bp,TITLE_MODE:Xp,UNDERSCORE_IDENT_RE:Fo,UNDERSCORE_TITLE_MODE:Zp});function eh(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function th(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function nh(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=eh,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function rh(e,t){Array.isArray(e.illegal)&&(e.illegal=Do(...e.illegal))}function sh(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function oh(e,t){e.relevance===void 0&&(e.relevance=1)}const ih=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Kt(n.beforeMatch,Ml(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ah=["of","and","for","in","not","or","if","then","parent","list","value"],lh="keyword";function zl(e,t,n=lh){const r=Object.create(null);return typeof e=="string"?s(n,e.split(" ")):Array.isArray(e)?s(n,e):Object.keys(e).forEach(function(i){Object.assign(r,zl(e[i],t,i))}),r;function s(i,a){t&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const c=l.split("|");r[c[0]]=[i,ch(c[0],c[1])]})}}function ch(e,t){return t?Number(t):uh(e)?0:1}function uh(e){return ah.includes(e.toLowerCase())}const da={},zt=e=>{console.error(e)},fa=(e,...t)=>{console.log(`WARN: ${e}`,...t)},qt=(e,t)=>{da[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),da[`${e}/${t}`]=!0)},Ir=new Error;function Ul(e,t,{key:n}){let r=0;const s=e[n],i={},a={};for(let l=1;l<=t.length;l++)a[l+r]=s[l],i[l+r]=!0,r+=Ll(t[l-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function dh(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw zt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ir;if(typeof e.beginScope!="object"||e.beginScope===null)throw zt("beginScope must be object"),Ir;Ul(e,e.begin,{key:"beginScope"}),e.begin=Bo(e.begin,{joinWith:""})}}function fh(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw zt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ir;if(typeof e.endScope!="object"||e.endScope===null)throw zt("endScope must be object"),Ir;Ul(e,e.end,{key:"endScope"}),e.end=Bo(e.end,{joinWith:""})}}function ph(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function hh(e){ph(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),dh(e),fh(e)}function mh(e){function t(a,l){return new RegExp(On(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=Ll(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t(Bo(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const u=c.findIndex((f,p)=>p>0&&f!==void 0),d=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,d)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([u,d])=>c.addRule(u,d)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,u=d.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function s(a){const l=new r;return a.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function i(a,l){const c=a;if(a.isCompiled)return c;[th,sh,hh,ih].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[nh,rh,oh].forEach(d=>d(a,l)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=zl(a.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),l&&(a.begin||(a.begin=/\B|\b/),c.beginRe=t(c.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(c.endRe=t(c.end)),c.terminatorEnd=On(c.end)||"",a.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(c.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return gh(d==="self"?a:d)})),a.contains.forEach(function(d){i(d,c)}),a.starts&&i(a.starts,l),c.matcher=s(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=_t(e.classNameAliases||{}),i(e)}function Hl(e){return e?e.endsWithParent||Hl(e.starts):!1}function gh(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return _t(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Hl(e)?_t(e,{starts:e.starts?_t(e.starts):null}):Object.isFrozen(e)?_t(e):e}var xh="11.11.1";class bh extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ss=Rl,pa=_t,ha=Symbol("nomatch"),yh=7,Wl=function(e){const t=Object.create(null),n=Object.create(null),r=[];let s=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:$p};function c(S){return l.noHighlightRe.test(S)}function u(S){let T=S.className+" ";T+=S.parentNode?S.parentNode.className:"";const H=l.languageDetectRe.exec(T);if(H){const V=v(H[1]);return V||(fa(i.replace("{}",H[1])),fa("Falling back to no-highlight mode for this block.",S)),V?H[1]:"no-highlight"}return T.split(/\s+/).find(V=>c(V)||v(V))}function d(S,T,H){let V="",ae="";typeof T=="object"?(V=S,H=T.ignoreIllegals,ae=T.language):(qt("10.7.0","highlight(lang, code, ...args) has been deprecated."),qt("10.7.0",`Please use highlight(code, options) instead.
124
+ </code></pre>`}}}}function sa(e){return(e||"").match(/\S*/)[0]}function oa(e){return t=>{typeof t=="string"&&t!==e.text&&(e.escaped=!0,e.text=t)}}const $l=/[&<>"']/,jp=new RegExp($l.source,"g"),Ol=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ap=new RegExp(Ol.source,"g"),Np={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ia=e=>Np[e];function aa(e,t){if(t){if($l.test(e))return e.replace(jp,ia)}else if(Ol.test(e))return e.replace(Ap,ia);return e}function Il(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Il(n)}),e}class la{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Rl(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function _t(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const s in r)n[s]=r[s]}),n}const Tp="</span>",ca=e=>!!e.scope,_p=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,s)=>`${r}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class Cp{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Rl(t)}openNode(t){if(!ca(t))return;const n=_p(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){ca(t)&&(this.buffer+=Tp)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const ua=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Po{constructor(){this.rootNode=ua(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=ua({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Po._collapse(n)}))}}class $p extends Po{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Cp(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function In(e){return e?typeof e=="string"?e:e.source:null}function Ml(e){return Kt("(?=",e,")")}function Op(e){return Kt("(?:",e,")*")}function Ip(e){return Kt("(?:",e,")?")}function Kt(...e){return e.map(n=>In(n)).join("")}function Rp(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Do(...e){return"("+(Rp(e).capture?"":"?:")+e.map(r=>In(r)).join("|")+")"}function Ll(e){return new RegExp(e.toString()+"|").exec("").length-1}function Mp(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Lp=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Bo(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const s=n;let i=In(r),a="";for(;i.length>0;){const l=Lp.exec(i);if(!l){a+=i;break}a+=i.substring(0,l.index),i=i.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+s):(a+=l[0],l[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const Pp=/\b\B/,Pl="[a-zA-Z]\\w*",Fo="[a-zA-Z_]\\w*",Dl="\\b\\d+(\\.\\d+)?",Bl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Fl="\\b(0b[01]+)",Dp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Bp=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Kt(t,/.*\b/,e.binary,/\b.*/)),_t({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Rn={begin:"\\\\[\\s\\S]",relevance:0},Fp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Rn]},zp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Rn]},Up={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Wr=function(e,t,n={}){const r=_t({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=Do("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Kt(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Hp=Wr("//","$"),Wp=Wr("/\\*","\\*/"),Gp=Wr("#","$"),Kp={scope:"number",begin:Dl,relevance:0},Vp={scope:"number",begin:Bl,relevance:0},Jp={scope:"number",begin:Fl,relevance:0},Yp={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Rn,{begin:/\[/,end:/\]/,relevance:0,contains:[Rn]}]},Xp={scope:"title",begin:Pl,relevance:0},Zp={scope:"title",begin:Fo,relevance:0},Qp={begin:"\\.\\s*"+Fo,relevance:0},qp=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var dr=Object.freeze({__proto__:null,APOS_STRING_MODE:Fp,BACKSLASH_ESCAPE:Rn,BINARY_NUMBER_MODE:Jp,BINARY_NUMBER_RE:Fl,COMMENT:Wr,C_BLOCK_COMMENT_MODE:Wp,C_LINE_COMMENT_MODE:Hp,C_NUMBER_MODE:Vp,C_NUMBER_RE:Bl,END_SAME_AS_BEGIN:qp,HASH_COMMENT_MODE:Gp,IDENT_RE:Pl,MATCH_NOTHING_RE:Pp,METHOD_GUARD:Qp,NUMBER_MODE:Kp,NUMBER_RE:Dl,PHRASAL_WORDS_MODE:Up,QUOTE_STRING_MODE:zp,REGEXP_MODE:Yp,RE_STARTERS_RE:Dp,SHEBANG:Bp,TITLE_MODE:Xp,UNDERSCORE_IDENT_RE:Fo,UNDERSCORE_TITLE_MODE:Zp});function eh(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function th(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function nh(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=eh,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function rh(e,t){Array.isArray(e.illegal)&&(e.illegal=Do(...e.illegal))}function sh(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function oh(e,t){e.relevance===void 0&&(e.relevance=1)}const ih=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Kt(n.beforeMatch,Ml(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ah=["of","and","for","in","not","or","if","then","parent","list","value"],lh="keyword";function zl(e,t,n=lh){const r=Object.create(null);return typeof e=="string"?s(n,e.split(" ")):Array.isArray(e)?s(n,e):Object.keys(e).forEach(function(i){Object.assign(r,zl(e[i],t,i))}),r;function s(i,a){t&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const c=l.split("|");r[c[0]]=[i,ch(c[0],c[1])]})}}function ch(e,t){return t?Number(t):uh(e)?0:1}function uh(e){return ah.includes(e.toLowerCase())}const da={},zt=e=>{console.error(e)},fa=(e,...t)=>{console.log(`WARN: ${e}`,...t)},qt=(e,t)=>{da[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),da[`${e}/${t}`]=!0)},Ir=new Error;function Ul(e,t,{key:n}){let r=0;const s=e[n],i={},a={};for(let l=1;l<=t.length;l++)a[l+r]=s[l],i[l+r]=!0,r+=Ll(t[l-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function dh(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw zt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ir;if(typeof e.beginScope!="object"||e.beginScope===null)throw zt("beginScope must be object"),Ir;Ul(e,e.begin,{key:"beginScope"}),e.begin=Bo(e.begin,{joinWith:""})}}function fh(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw zt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ir;if(typeof e.endScope!="object"||e.endScope===null)throw zt("endScope must be object"),Ir;Ul(e,e.end,{key:"endScope"}),e.end=Bo(e.end,{joinWith:""})}}function ph(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function hh(e){ph(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),dh(e),fh(e)}function mh(e){function t(a,l){return new RegExp(In(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=Ll(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t(Bo(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const u=c.findIndex((f,p)=>p>0&&f!==void 0),d=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,d)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([u,d])=>c.addRule(u,d)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,u=d.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function s(a){const l=new r;return a.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function i(a,l){const c=a;if(a.isCompiled)return c;[th,sh,hh,ih].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[nh,rh,oh].forEach(d=>d(a,l)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=zl(a.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),l&&(a.begin||(a.begin=/\B|\b/),c.beginRe=t(c.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(c.endRe=t(c.end)),c.terminatorEnd=In(c.end)||"",a.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(c.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return gh(d==="self"?a:d)})),a.contains.forEach(function(d){i(d,c)}),a.starts&&i(a.starts,l),c.matcher=s(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=_t(e.classNameAliases||{}),i(e)}function Hl(e){return e?e.endsWithParent||Hl(e.starts):!1}function gh(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return _t(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Hl(e)?_t(e,{starts:e.starts?_t(e.starts):null}):Object.isFrozen(e)?_t(e):e}var xh="11.11.1";class bh extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ss=Rl,pa=_t,ha=Symbol("nomatch"),yh=7,Wl=function(e){const t=Object.create(null),n=Object.create(null),r=[];let s=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:$p};function c(S){return l.noHighlightRe.test(S)}function u(S){let T=S.className+" ";T+=S.parentNode?S.parentNode.className:"";const H=l.languageDetectRe.exec(T);if(H){const V=v(H[1]);return V||(fa(i.replace("{}",H[1])),fa("Falling back to no-highlight mode for this block.",S)),V?H[1]:"no-highlight"}return T.split(/\s+/).find(V=>c(V)||v(V))}function d(S,T,H){let V="",ae="";typeof T=="object"?(V=S,H=T.ignoreIllegals,ae=T.language):(qt("10.7.0","highlight(lang, code, ...args) has been deprecated."),qt("10.7.0",`Please use highlight(code, options) instead.
125
125
  https://github.com/highlightjs/highlight.js/issues/2277`),ae=S,V=T),H===void 0&&(H=!0);const ee={code:V,language:ae};ie("before:highlight",ee);const Te=ee.result?ee.result:f(ee.language,ee.code,H);return Te.code=ee.code,ie("after:highlight",Te),Te}function f(S,T,H,V){const ae=Object.create(null);function ee(B,U){return B.keywords[U]}function Te(){if(!X.keywords){_e.addText(me);return}let B=0;X.keywordPatternRe.lastIndex=0;let U=X.keywordPatternRe.exec(me),te="";for(;U;){te+=me.substring(B,U.index);const ue=xe.case_insensitive?U[0].toLowerCase():U[0],Ce=ee(X,ue);if(Ce){const[rt,Jr]=Ce;if(_e.addText(te),te="",ae[ue]=(ae[ue]||0)+1,ae[ue]<=yh&&(mt+=Jr),rt.startsWith("_"))te+=U[0];else{const Yr=xe.classNameAliases[rt]||rt;P(U[0],Yr)}}else te+=U[0];B=X.keywordPatternRe.lastIndex,U=X.keywordPatternRe.exec(me)}te+=me.substring(B),_e.addText(te)}function Q(){if(me==="")return;let B=null;if(typeof X.subLanguage=="string"){if(!t[X.subLanguage]){_e.addText(me);return}B=f(X.subLanguage,me,!0,Se[X.subLanguage]),Se[X.subLanguage]=B._top}else B=m(me,X.subLanguage.length?X.subLanguage:null);X.relevance>0&&(mt+=B.relevance),_e.__addSublanguage(B._emitter,B.language)}function ve(){X.subLanguage!=null?Q():Te(),me=""}function P(B,U){B!==""&&(_e.startScope(U),_e.addText(B),_e.endScope())}function Y(B,U){let te=1;const ue=U.length-1;for(;te<=ue;){if(!B._emit[te]){te++;continue}const Ce=xe.classNameAliases[B[te]]||B[te],rt=U[te];Ce?P(rt,Ce):(me=rt,Te(),me=""),te++}}function O(B,U){return B.scope&&typeof B.scope=="string"&&_e.openNode(xe.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(P(me,xe.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),me=""):B.beginScope._multi&&(Y(B.beginScope,U),me="")),X=Object.create(B,{parent:{value:X}}),X}function q(B,U,te){let ue=Mp(B.endRe,te);if(ue){if(B["on:end"]){const Ce=new la(B);B["on:end"](U,Ce),Ce.isMatchIgnored&&(ue=!1)}if(ue){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return q(B.parent,U,te)}function le(B){return X.matcher.regexIndex===0?(me+=B[0],1):(tt=!0,0)}function G(B){const U=B[0],te=B.rule,ue=new la(te),Ce=[te.__beforeBegin,te["on:begin"]];for(const rt of Ce)if(rt&&(rt(B,ue),ue.isMatchIgnored))return le(U);return te.skip?me+=U:(te.excludeBegin&&(me+=U),ve(),!te.returnBegin&&!te.excludeBegin&&(me=U)),O(te,B),te.returnBegin?0:U.length}function pe(B){const U=B[0],te=T.substring(B.index),ue=q(X,B,te);if(!ue)return ha;const Ce=X;X.endScope&&X.endScope._wrap?(ve(),P(U,X.endScope._wrap)):X.endScope&&X.endScope._multi?(ve(),Y(X.endScope,B)):Ce.skip?me+=U:(Ce.returnEnd||Ce.excludeEnd||(me+=U),ve(),Ce.excludeEnd&&(me=U));do X.scope&&_e.closeNode(),!X.skip&&!X.subLanguage&&(mt+=X.relevance),X=X.parent;while(X!==ue.parent);return ue.starts&&O(ue.starts,B),Ce.returnEnd?0:U.length}function we(){const B=[];for(let U=X;U!==xe;U=U.parent)U.scope&&B.unshift(U.scope);B.forEach(U=>_e.openNode(U))}let fe={};function Me(B,U){const te=U&&U[0];if(me+=B,te==null)return ve(),0;if(fe.type==="begin"&&U.type==="end"&&fe.index===U.index&&te===""){if(me+=T.slice(U.index,U.index+1),!s){const ue=new Error(`0 width match regex (${S})`);throw ue.languageName=S,ue.badRule=fe.rule,ue}return 1}if(fe=U,U.type==="begin")return G(U);if(U.type==="illegal"&&!H){const ue=new Error('Illegal lexeme "'+te+'" for mode "'+(X.scope||"<unnamed>")+'"');throw ue.mode=X,ue}else if(U.type==="end"){const ue=pe(U);if(ue!==ha)return ue}if(U.type==="illegal"&&te==="")return me+=`
126
- `,1;if(Mt>1e5&&Mt>U.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=te,te.length}const xe=v(S);if(!xe)throw zt(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');const He=mh(xe);let Le="",X=V||He;const Se={},_e=new l.__emitter(l);we();let me="",mt=0,et=0,Mt=0,tt=!1;try{if(xe.__emitTokens)xe.__emitTokens(T,_e);else{for(X.matcher.considerAll();;){Mt++,tt?tt=!1:X.matcher.considerAll(),X.matcher.lastIndex=et;const B=X.matcher.exec(T);if(!B)break;const U=T.substring(et,B.index),te=Me(U,B);et=B.index+te}Me(T.substring(et))}return _e.finalize(),Le=_e.toHTML(),{language:S,value:Le,relevance:mt,illegal:!1,_emitter:_e,_top:X}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:S,value:Ss(T),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:et,context:T.slice(et-100,et+100),mode:B.mode,resultSoFar:Le},_emitter:_e};if(s)return{language:S,value:Ss(T),illegal:!1,relevance:0,errorRaised:B,_emitter:_e,_top:X};throw B}}function p(S){const T={value:Ss(S),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return T._emitter.addText(S),T}function m(S,T){T=T||l.languages||Object.keys(t);const H=p(S),V=T.filter(v).filter(F).map(ve=>f(ve,S,!1));V.unshift(H);const ae=V.sort((ve,P)=>{if(ve.relevance!==P.relevance)return P.relevance-ve.relevance;if(ve.language&&P.language){if(v(ve.language).supersetOf===P.language)return 1;if(v(P.language).supersetOf===ve.language)return-1}return 0}),[ee,Te]=ae,Q=ee;return Q.secondBest=Te,Q}function h(S,T,H){const V=T&&n[T]||H;S.classList.add("hljs"),S.classList.add(`language-${V}`)}function x(S){let T=null;const H=u(S);if(c(H))return;if(ie("before:highlightElement",{el:S,language:H}),S.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",S);return}if(S.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(S)),l.throwUnescapedHTML))throw new bh("One of your code blocks includes unescaped HTML.",S.innerHTML);T=S;const V=T.textContent,ae=H?d(V,{language:H,ignoreIllegals:!0}):m(V);S.innerHTML=ae.value,S.dataset.highlighted="yes",h(S,H,ae.language),S.result={language:ae.language,re:ae.relevance,relevance:ae.relevance},ae.secondBest&&(S.secondBest={language:ae.secondBest.language,relevance:ae.secondBest.relevance}),ie("after:highlightElement",{el:S,result:ae,text:V})}function k(S){l=pa(l,S)}const j=()=>{R(),qt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function C(){R(),qt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function R(){function S(){R()}if(document.readyState==="loading"){E||window.addEventListener("DOMContentLoaded",S,!1),E=!0;return}document.querySelectorAll(l.cssSelector).forEach(x)}function D(S,T){let H=null;try{H=T(e)}catch(V){if(zt("Language definition for '{}' could not be registered.".replace("{}",S)),s)zt(V);else throw V;H=a}H.name||(H.name=S),t[S]=H,H.rawDefinition=T.bind(null,e),H.aliases&&y(H.aliases,{languageName:S})}function _(S){delete t[S];for(const T of Object.keys(n))n[T]===S&&delete n[T]}function A(){return Object.keys(t)}function v(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function y(S,{languageName:T}){typeof S=="string"&&(S=[S]),S.forEach(H=>{n[H.toLowerCase()]=T})}function F(S){const T=v(S);return T&&!T.disableAutodetect}function Z(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=T=>{S["before:highlightBlock"](Object.assign({block:T.el},T))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=T=>{S["after:highlightBlock"](Object.assign({block:T.el},T))})}function N(S){Z(S),r.push(S)}function W(S){const T=r.indexOf(S);T!==-1&&r.splice(T,1)}function ie(S,T){const H=S;r.forEach(function(V){V[H]&&V[H](T)})}function oe(S){return qt("10.7.0","highlightBlock will be removed entirely in v12.0"),qt("10.7.0","Please use highlightElement now."),x(S)}Object.assign(e,{highlight:d,highlightAuto:m,highlightAll:R,highlightElement:x,highlightBlock:oe,configure:k,initHighlighting:j,initHighlightingOnLoad:C,registerLanguage:D,unregisterLanguage:_,listLanguages:A,getLanguage:v,registerAliases:y,autoDetection:F,inherit:pa,addPlugin:N,removePlugin:W}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=xh,e.regex={concat:Kt,lookahead:Ml,either:Do,optional:Ip,anyNumberOfTimes:Op};for(const S in dr)typeof dr[S]=="object"&&Il(dr[S]);return Object.assign(e,dr),e},sn=Wl({});sn.newInstance=()=>Wl({});var wh=sn;sn.HighlightJS=sn;sn.default=sn;const at=No(wh);function kh(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vh(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},l=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},m={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[m],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[m],illegal:"\\n",relevance:0},k=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,x,i,a],j=[...k];return j.pop(),j.push(l),m.contains=j,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}function Sh(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(l);const c={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],j={match:/(\/[a-z._-]+)+/},C=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:k,built_in:[...C,...E,"set","shopt",...R,...D]},contains:[m,e.SHEBANG(),h,f,i,a,j,l,c,u,d,n]}}const ma="[A-Za-z$_][0-9A-Za-z$_]*",Eh=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],jh=["true","false","null","undefined","NaN","Infinity"],Gl=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Kl=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vl=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ah=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Nh=[].concat(Vl,Gl,Kl);function Th(e){const t=e.regex,n=(H,{after:V})=>{const ae="</"+H[0].slice(1);return H.input.indexOf(ae,V)!==-1},r=ma,s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,V)=>{const ae=H[0].length+H.index,ee=H.input[ae];if(ee==="<"||ee===","){V.ignoreMatch();return}ee===">"&&(n(H,{after:ae})||V.ignoreMatch());let Te;const Q=H.input.substring(ae);if(Te=Q.match(/^\s*=/)){V.ignoreMatch();return}if((Te=Q.match(/^\s+extends\s+/))&&Te.index===0){V.ignoreMatch();return}}},l={$pattern:ma,keyword:Eh,literal:jh,built_in:Nh,"variable.language":Ah},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},E=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,x,k,{match:/\$\d+/},f];p.contains=E.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(E)});const R=[].concat(C,p.contains),D=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(R)}]),_={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:D},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},v={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Gl,...Kl]}},y={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[_],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(H){return t.concat("(?!",H.join("|"),")")}const W={match:t.concat(/\b/,N([...Vl,"super","import"].map(H=>`${H}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ie={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},oe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},_]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[_]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,x,k,C,{match:/\$\d+/},f,v,{scope:"attr",match:r+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[_,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ie,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[_]},W,Z,A,oe,{match:/\$[(.]/}]}}function _h(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["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|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","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"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",m=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,h=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${m}))[eE][+-]?(${p})[jJ]?(?=${h})`},{begin:`(${m})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${p})[jJ](?=${h})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},j={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",c,x,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,x,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[c,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[j]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,j,f]}]}}at.registerLanguage("json",kh);at.registerLanguage("yaml",vh);at.registerLanguage("bash",Sh);at.registerLanguage("javascript",Th);at.registerLanguage("python",_h);const Jl=new Cl(Ep({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight(e,t){if(!at.getLanguage(t))return e;try{return at.highlight(e,{language:t}).value}catch{return e}}}));Jl.use({extensions:[{name:"link",renderer(e){return`<a class="hover:underline hover:text-secondary-600" href="${e.href}" rel="noopener noreferrer" target="_blank">${e.text}</a>`}}]});function Ch(e){return Jl.parse(e)}const $h={"--tw-prose-body":"rgb(var(--color-text-secondary) / 1)","--tw-prose-headings":"rgb(var(--color-text-primary) / 1)","--tw-prose-lead":"rgb(var(--color-text-secondary) / 1)","--tw-prose-links":"rgb(var(--color-primary-600) / 1)","--tw-prose-bold":"rgb(var(--color-text-primary) / 1)","--tw-prose-counters":"rgb(var(--color-text-muted) / 1)","--tw-prose-bullets":"rgb(var(--color-text-muted) / 1)","--tw-prose-hr":"rgb(var(--color-border) / 1)","--tw-prose-quotes":"rgb(var(--color-text-secondary) / 1)","--tw-prose-quote-borders":"rgb(var(--color-border) / 1)","--tw-prose-captions":"rgb(var(--color-text-muted) / 1)","--tw-prose-kbd":"rgb(var(--color-text-primary) / 1)","--tw-prose-code":"rgb(var(--color-text-secondary) / 1)","--tw-prose-th-borders":"rgb(var(--color-border) / 1)","--tw-prose-td-borders":"rgb(var(--color-border) / 1)"},lt=({children:e,className:t=""})=>e?typeof e!="string"?o.jsx(o.Fragment,{children:e}):o.jsx("div",{className:`prose max-w-none prose-code:before:content-none prose-code:after:content-none ${t}`,style:$h,dangerouslySetInnerHTML:{__html:bl.sanitize(Ch(e))}}):null;function Oh({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})}function Ih({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Rh({className:e,...t}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...t,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})})}function Mh({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}function Sn({IconClass:e,term:t,visibleTerm:n=!0,text:r,href:s,vertical:i=!1,className:a=""}){const l=s?c=>o.jsx("a",{href:s,target:"_blank",...c}):c=>o.jsx("div",{...c});return o.jsxs("div",{className:`${!i&&"flex"} ${a}`,children:[o.jsx("dt",{children:o.jsxs(l,{className:"flex",children:[e&&o.jsx(e,{className:"w-5 h-5",title:`${r}`,alt:`${r}`}),n?o.jsx("span",{className:"pl-2 text-sm",children:t}):o.jsx("span",{className:"sr-only",children:t})]})}),o.jsxs("dd",{className:`${i&&"pt-2"} pl-2 text-sm`,children:[!n&&o.jsx(l,{children:r}),i&&o.jsx(l,{children:r})]})]})}function zo({name:e,href:t,title:n}){return o.jsx("a",{className:`text-xs whitespace-nowrap break-all mt-2 rounded-md bg-neutral-300 py-[2px] px-[4px] mr-1 -mt-1 ${t&&"hover:bg-cyan-500 hover:text-white"}`,href:t,target:"_blank",title:n,children:e})}function Lh({license:e,externalDocs:t,contact:n,tags:r,logo:s}){const i={licenseName:(e==null?void 0:e.name)??null,licenseUrl:(e==null?void 0:e.url)??null,externalDocsTitle:(t==null?void 0:t.description)??"External documentation",externalDocsUrl:(t==null?void 0:t.url)??null,externalDocsDescription:(t==null?void 0:t.description)??null,contactName:(n==null?void 0:n.name)??null,contactUrl:(n==null?void 0:n.url)??null,contactEmail:(n==null?void 0:n.email)??null,tags:r};return o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:"hidden @lg:block mb-3",children:s}),o.jsxs("dl",{className:"flex flex-wrap @lg:flex-unwrap gap-2 ",children:[i.licenseName&&o.jsx(Sn,{IconClass:Rh,text:`${i.licenseName} ${Oi}`,term:Oi,visibleTerm:!i.licenseName,href:i.licenseUrl,className:"text-foreground-secondary hover:text-pink-500"}),i.externalDocsUrl&&o.jsx(Sn,{IconClass:zr,text:Ii,href:i.externalDocsUrl,term:Ii,visibleTerm:!i.externalDocsTitle,className:"text-foreground-secondary hover:text-secondary-500"}),i.contactEmail&&o.jsx(Sn,{IconClass:Oh,text:`${i.contactEmail}`,term:$u,visibleTerm:!i.contactEmail,href:`mailto:${i.contactEmail}`,className:"text-foreground-secondary hover:text-green-500"}),i.contactUrl&&o.jsx(Sn,{IconClass:Ih,text:`${i.contactName}`,term:Cu,visibleTerm:!i.contactName,href:i.contactUrl,className:"text-foreground-secondary hover:text-green-500"})]}),o.jsx("dl",{className:"mt-[10px]",children:i.tags&&o.jsx(Sn,{IconClass:Mh,term:Ou,className:"mb-2 text-foreground-secondary inline-block",vertical:!0,text:i.tags&&o.jsx("div",{className:"flex flex-wrap gap-1 -ml-2",children:i.tags.map((a,l)=>{const c=a,u=c.externalDocs;return o.jsx(zo,{href:u&&u.url,title:c.description||(u&&u.description?u.description:void 0),name:c.name},l)})})})})]})}const Ph=[/^x-parser-/i,/^x-lib-/i];function Dh(e){return Ph.some(t=>t.test(e))}const ga=new Map;function Bh(e){let t=ga.get(e);return t||(t=b.lazy(xl[e]),ga.set(e,t)),t}const Fh=e=>e.startsWith("x-"),Uo=(e,t)=>e?e[t]:void 0;function zh({source:e,pathPrefix:t}){const{showExtensions:n}=Ue();if(!n||!e)return null;const r=Object.keys(e).filter(s=>Fh(s)&&!Dh(s)&&Object.prototype.hasOwnProperty.call(xl,s));return r.length===0?null:o.jsx(o.Fragment,{children:r.map(s=>{const i=Bh(s);return o.jsx(b.Suspense,{fallback:null,children:o.jsx(i,{value:Uo(e,s),path:`${t}.${s}`})},s)})})}const Uh=b.lazy(Bf),Yl=e=>Ao(Uo(e,"x-logo"))!==null;function Ho({source:e}){const t=Uo(e,"x-logo");return Ao(t)?o.jsx(b.Suspense,{fallback:null,children:o.jsx(Uh,{value:t,path:"info.x-logo"})}):null}function Xl({title:e,description:t,license:n,contact:r,externalDocs:s,tags:i,extensionsSource:a,layout:l,showLogo:c=!0}){const u=c?o.jsx(Ho,{source:a}):null,d=o.jsx("div",{className:"mt-4 w-full",children:o.jsx(lt,{children:t})}),f=o.jsxs(o.Fragment,{children:[o.jsx(Lh,{logo:u,license:n,externalDocs:s,contact:r,tags:i}),a&&o.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:o.jsx(zh,{source:a,pathPrefix:"info"})})]});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:e,content:d,sideContent:f,stickySideContent:!0,reverseLayoutOnMobile:!0,info:!0,mobileLeadContent:u,layout:l})})}const Zl=({title:e,description:t,license:n,externalDocs:r,contact:s,tags:i,layout:a,showLogo:l,...c})=>o.jsx(Xl,{title:e,description:t,license:n,externalDocs:r,contact:s,tags:i,extensionsSource:c,layout:a,showLogo:l}),Hh=1500,Wh=320,Gh=48,Kh="#011627";function Vh(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(t)}}async function Jh(e){try{return await navigator.clipboard.writeText(e),!0}catch{return Vh(e)}}function Gr({code:e,className:t,language:n="json",collapsedMaxHeight:r=Wh}){const[s,i]=b.useState("idle"),a=b.useRef(void 0),[l,c]=b.useState(!1),[u,d]=b.useState(!1),[f,p]=b.useState(0),m=b.useRef(null),h=b.useRef(null),x=b.useId();b.useEffect(()=>()=>clearTimeout(a.current),[]),b.useEffect(()=>{const A=h.current;if(!A)return;const v=()=>{p(A.scrollHeight),d(A.scrollHeight>r+Gh)};v();const y=new ResizeObserver(v);return y.observe(A),()=>y.disconnect()},[e,n,r]);const k=()=>{Jh(e).then(A=>{i(A?"copied":"error"),clearTimeout(a.current),a.current=setTimeout(()=>i("idle"),Hh)})},C=at.getLanguage(n)?at.highlight(e,{language:n}).value:null,E=s==="copied"?"Copied":s==="error"?"Copy failed":"Copy to clipboard",R=u&&!l,D=e.replace(/\n+$/,"").split(`
127
- `).length,_=()=>{var A,v;l&&(((A=m.current)==null?void 0:A.getBoundingClientRect().top)??0)<0&&((v=m.current)==null||v.scrollIntoView({block:"nearest"})),c(y=>!y)};return o.jsxs("div",{ref:m,className:`relative ${t??""}`,children:[o.jsx("button",{type:"button",onClick:k,"aria-label":E,title:E,className:"absolute top-2 right-2 z-10 p-1 rounded text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-100 transition-colors",children:s==="copied"?o.jsx(Ya,{className:"w-4 h-4 text-green-600"}):o.jsx(Ja,{className:`w-4 h-4 ${s==="error"?"text-red-500":""}`})}),o.jsxs("div",{className:"relative",children:[o.jsx("pre",{ref:h,id:x,style:u?{maxHeight:l?f:r}:void 0,className:`text-xs rounded overflow-x-auto transition-[max-height] duration-300 ease-in-out ${u?"overflow-y-hidden":""}`,children:C!==null?o.jsx("code",{className:`hljs language-${n}`,dangerouslySetInnerHTML:{__html:bl.sanitize(C)}}):o.jsx("code",{className:"hljs",children:e})}),u&&o.jsx("div",{"aria-hidden":"true",className:`pointer-events-none absolute inset-x-0 bottom-0 h-16 rounded-b transition-opacity duration-300 ease-in-out ${R?"opacity-100":"opacity-0"}`,style:{background:`linear-gradient(to bottom, transparent, ${Kh})`}})]}),u&&o.jsxs("button",{type:"button",onClick:_,"aria-expanded":l,"aria-controls":x,className:"flex items-center gap-1 mt-1 px-1 py-0.5 rounded text-xs text-foreground-muted hover:text-foreground-secondary transition-colors",children:[l?"Show less":`Show all ${D} lines`,o.jsx(Ln,{className:`w-3 h-3 transition-transform ${l?"rotate-180":""}`})]})]})}const Yh=/^x-parser-/i;function Zs(e,t=new Set){if(e!==null&&typeof e=="object"){if(t.has(e))return"[circular]";t.add(e);try{if(Array.isArray(e))return e.map(r=>Zs(r,t));const n={};for(const[r,s]of Object.entries(e))Yh.test(r)||(n[r]=Zs(s,t));return n}finally{t.delete(e)}}return e}const Ql=({schema:e})=>{const t=typeof e=="string"?e:JSON.stringify(Zs(e),null,2);return o.jsx(Gr,{code:t})},xa=new Set,Wo=e=>e.replace(/^#\//,"").split("/").pop()??e,Qs=e=>{const t=e["x-parser-schema-id"];return typeof t=="string"&&!t.startsWith("<")?t:void 0},Xh={objects:new Set,refs:new Set},bt=(e,t,n)=>{if(!e.$ref)return{schema:e,refLabel:Qs(e)};const r=e.$ref,s=Wo(r);if(n.has(r))return{schema:e,refLabel:s,circular:!0};const i=xt(t(r));if(!i)return{schema:e,refLabel:s};const{schema:a}=$n(i);n.add(r);try{const l=bt(a,t,n);return{schema:l.schema,refLabel:l.circular?void 0:s,circular:l.circular}}finally{n.delete(r)}},Ht=e=>{const t=e.items,n=Array.isArray(t)?t[0]:t;return se(n)?n:null},ql=e=>{const t=e.items;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},Zh=e=>!Array.isArray(e.items)||e.additionalItems===void 0?null:typeof e.additionalItems=="boolean"||se(e.additionalItems)?e.additionalItems:null,Qh=e=>e.contains===void 0?null:typeof e.contains=="boolean"||se(e.contains)?e.contains:null,ec=e=>e.contains!==void 0,Rr=(e,t)=>{if(!(!e&&!t))return!t||e===t?e??t:e?`${e}
126
+ `,1;if(Mt>1e5&&Mt>U.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=te,te.length}const xe=v(S);if(!xe)throw zt(i.replace("{}",S)),new Error('Unknown language: "'+S+'"');const He=mh(xe);let Le="",X=V||He;const Se={},_e=new l.__emitter(l);we();let me="",mt=0,et=0,Mt=0,tt=!1;try{if(xe.__emitTokens)xe.__emitTokens(T,_e);else{for(X.matcher.considerAll();;){Mt++,tt?tt=!1:X.matcher.considerAll(),X.matcher.lastIndex=et;const B=X.matcher.exec(T);if(!B)break;const U=T.substring(et,B.index),te=Me(U,B);et=B.index+te}Me(T.substring(et))}return _e.finalize(),Le=_e.toHTML(),{language:S,value:Le,relevance:mt,illegal:!1,_emitter:_e,_top:X}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:S,value:Ss(T),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:et,context:T.slice(et-100,et+100),mode:B.mode,resultSoFar:Le},_emitter:_e};if(s)return{language:S,value:Ss(T),illegal:!1,relevance:0,errorRaised:B,_emitter:_e,_top:X};throw B}}function p(S){const T={value:Ss(S),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return T._emitter.addText(S),T}function m(S,T){T=T||l.languages||Object.keys(t);const H=p(S),V=T.filter(v).filter(F).map(ve=>f(ve,S,!1));V.unshift(H);const ae=V.sort((ve,P)=>{if(ve.relevance!==P.relevance)return P.relevance-ve.relevance;if(ve.language&&P.language){if(v(ve.language).supersetOf===P.language)return 1;if(v(P.language).supersetOf===ve.language)return-1}return 0}),[ee,Te]=ae,Q=ee;return Q.secondBest=Te,Q}function h(S,T,H){const V=T&&n[T]||H;S.classList.add("hljs"),S.classList.add(`language-${V}`)}function x(S){let T=null;const H=u(S);if(c(H))return;if(ie("before:highlightElement",{el:S,language:H}),S.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",S);return}if(S.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(S)),l.throwUnescapedHTML))throw new bh("One of your code blocks includes unescaped HTML.",S.innerHTML);T=S;const V=T.textContent,ae=H?d(V,{language:H,ignoreIllegals:!0}):m(V);S.innerHTML=ae.value,S.dataset.highlighted="yes",h(S,H,ae.language),S.result={language:ae.language,re:ae.relevance,relevance:ae.relevance},ae.secondBest&&(S.secondBest={language:ae.secondBest.language,relevance:ae.secondBest.relevance}),ie("after:highlightElement",{el:S,result:ae,text:V})}function k(S){l=pa(l,S)}const j=()=>{R(),qt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function C(){R(),qt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function R(){function S(){R()}if(document.readyState==="loading"){E||window.addEventListener("DOMContentLoaded",S,!1),E=!0;return}document.querySelectorAll(l.cssSelector).forEach(x)}function D(S,T){let H=null;try{H=T(e)}catch(V){if(zt("Language definition for '{}' could not be registered.".replace("{}",S)),s)zt(V);else throw V;H=a}H.name||(H.name=S),t[S]=H,H.rawDefinition=T.bind(null,e),H.aliases&&y(H.aliases,{languageName:S})}function _(S){delete t[S];for(const T of Object.keys(n))n[T]===S&&delete n[T]}function A(){return Object.keys(t)}function v(S){return S=(S||"").toLowerCase(),t[S]||t[n[S]]}function y(S,{languageName:T}){typeof S=="string"&&(S=[S]),S.forEach(H=>{n[H.toLowerCase()]=T})}function F(S){const T=v(S);return T&&!T.disableAutodetect}function Z(S){S["before:highlightBlock"]&&!S["before:highlightElement"]&&(S["before:highlightElement"]=T=>{S["before:highlightBlock"](Object.assign({block:T.el},T))}),S["after:highlightBlock"]&&!S["after:highlightElement"]&&(S["after:highlightElement"]=T=>{S["after:highlightBlock"](Object.assign({block:T.el},T))})}function N(S){Z(S),r.push(S)}function W(S){const T=r.indexOf(S);T!==-1&&r.splice(T,1)}function ie(S,T){const H=S;r.forEach(function(V){V[H]&&V[H](T)})}function oe(S){return qt("10.7.0","highlightBlock will be removed entirely in v12.0"),qt("10.7.0","Please use highlightElement now."),x(S)}Object.assign(e,{highlight:d,highlightAuto:m,highlightAll:R,highlightElement:x,highlightBlock:oe,configure:k,initHighlighting:j,initHighlightingOnLoad:C,registerLanguage:D,unregisterLanguage:_,listLanguages:A,getLanguage:v,registerAliases:y,autoDetection:F,inherit:pa,addPlugin:N,removePlugin:W}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=xh,e.regex={concat:Kt,lookahead:Ml,either:Do,optional:Ip,anyNumberOfTimes:Op};for(const S in dr)typeof dr[S]=="object"&&Il(dr[S]);return Object.assign(e,dr),e},sn=Wl({});sn.newInstance=()=>Wl({});var wh=sn;sn.HighlightJS=sn;sn.default=sn;const at=No(wh);function kh(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function vh(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},l=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},m={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[m],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[m],illegal:"\\n",relevance:0},k=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,x,i,a],j=[...k];return j.pop(),j.push(l),m.contains=j,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}function Sh(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(l);const c={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],j={match:/(\/[a-z._-]+)+/},C=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:k,built_in:[...C,...E,"set","shopt",...R,...D]},contains:[m,e.SHEBANG(),h,f,i,a,j,l,c,u,d,n]}}const ma="[A-Za-z$_][0-9A-Za-z$_]*",Eh=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],jh=["true","false","null","undefined","NaN","Infinity"],Gl=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Kl=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vl=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ah=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Nh=[].concat(Vl,Gl,Kl);function Th(e){const t=e.regex,n=(H,{after:V})=>{const ae="</"+H[0].slice(1);return H.input.indexOf(ae,V)!==-1},r=ma,s={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,V)=>{const ae=H[0].length+H.index,ee=H.input[ae];if(ee==="<"||ee===","){V.ignoreMatch();return}ee===">"&&(n(H,{after:ae})||V.ignoreMatch());let Te;const Q=H.input.substring(ae);if(Te=Q.match(/^\s*=/)){V.ignoreMatch();return}if((Te=Q.match(/^\s+extends\s+/))&&Te.index===0){V.ignoreMatch();return}}},l={$pattern:ma,keyword:Eh,literal:jh,built_in:Nh,"variable.language":Ah},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},E=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,x,k,{match:/\$\d+/},f];p.contains=E.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(E)});const R=[].concat(C,p.contains),D=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(R)}]),_={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:D},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},v={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Gl,...Kl]}},y={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[_],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function N(H){return t.concat("(?!",H.join("|"),")")}const W={match:t.concat(/\b/,N([...Vl,"super","import"].map(H=>`${H}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ie={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},oe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},_]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[_]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:v},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,x,k,C,{match:/\$\d+/},f,v,{scope:"attr",match:r+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:i},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[_,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ie,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[_]},W,Z,A,oe,{match:/\$[(.]/}]}}function _h(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["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|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","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"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",m=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,h=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${m}))[eE][+-]?(${p})[jJ]?(?=${h})`},{begin:`(${m})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${p})[jJ](?=${h})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},j={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",c,x,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,x,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[c,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[j]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,j,f]}]}}at.registerLanguage("json",kh);at.registerLanguage("yaml",vh);at.registerLanguage("bash",Sh);at.registerLanguage("javascript",Th);at.registerLanguage("python",_h);const Jl=new Cl(Ep({emptyLangClass:"hljs",langPrefix:"hljs language-",highlight(e,t){if(!at.getLanguage(t))return e;try{return at.highlight(e,{language:t}).value}catch{return e}}}));Jl.use({extensions:[{name:"link",renderer(e){return`<a class="hover:underline hover:text-secondary-600" href="${e.href}" rel="noopener noreferrer" target="_blank">${e.text}</a>`}}]});function Ch(e){return Jl.parse(e)}const $h={"--tw-prose-body":"rgb(var(--color-text-secondary) / 1)","--tw-prose-headings":"rgb(var(--color-text-primary) / 1)","--tw-prose-lead":"rgb(var(--color-text-secondary) / 1)","--tw-prose-links":"rgb(var(--color-primary-600) / 1)","--tw-prose-bold":"rgb(var(--color-text-primary) / 1)","--tw-prose-counters":"rgb(var(--color-text-muted) / 1)","--tw-prose-bullets":"rgb(var(--color-text-muted) / 1)","--tw-prose-hr":"rgb(var(--color-border) / 1)","--tw-prose-quotes":"rgb(var(--color-text-secondary) / 1)","--tw-prose-quote-borders":"rgb(var(--color-border) / 1)","--tw-prose-captions":"rgb(var(--color-text-muted) / 1)","--tw-prose-kbd":"rgb(var(--color-text-primary) / 1)","--tw-prose-code":"rgb(var(--color-text-secondary) / 1)","--tw-prose-th-borders":"rgb(var(--color-border) / 1)","--tw-prose-td-borders":"rgb(var(--color-border) / 1)"},lt=({children:e,className:t=""})=>e?typeof e!="string"?o.jsx(o.Fragment,{children:e}):o.jsx("div",{className:`prose max-w-none prose-code:before:content-none prose-code:after:content-none ${t}`,style:$h,dangerouslySetInnerHTML:{__html:bl.sanitize(Ch(e))}}):null;function Oh({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})}function Ih({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Rh({className:e,...t}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...t,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})})}function Mh({className:e}){return o.jsx("svg",{className:e||"inline-block",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}function En({IconClass:e,term:t,visibleTerm:n=!0,text:r,href:s,vertical:i=!1,className:a=""}){const l=s?c=>o.jsx("a",{href:s,target:"_blank",...c}):c=>o.jsx("div",{...c});return o.jsxs("div",{className:`${!i&&"flex"} ${a}`,children:[o.jsx("dt",{children:o.jsxs(l,{className:"flex",children:[e&&o.jsx(e,{className:"w-5 h-5",title:`${r}`,alt:`${r}`}),n?o.jsx("span",{className:"pl-2 text-sm",children:t}):o.jsx("span",{className:"sr-only",children:t})]})}),o.jsxs("dd",{className:`${i&&"pt-2"} pl-2 text-sm`,children:[!n&&o.jsx(l,{children:r}),i&&o.jsx(l,{children:r})]})]})}function zo({name:e,href:t,title:n}){return o.jsx("a",{className:`text-xs whitespace-nowrap break-all mt-2 rounded-md bg-neutral-300 py-[2px] px-[4px] mr-1 -mt-1 ${t&&"hover:bg-cyan-500 hover:text-white"}`,href:t,target:"_blank",title:n,children:e})}function Lh({license:e,externalDocs:t,contact:n,tags:r,logo:s}){const i={licenseName:(e==null?void 0:e.name)??null,licenseUrl:(e==null?void 0:e.url)??null,externalDocsTitle:(t==null?void 0:t.description)??"External documentation",externalDocsUrl:(t==null?void 0:t.url)??null,externalDocsDescription:(t==null?void 0:t.description)??null,contactName:(n==null?void 0:n.name)??null,contactUrl:(n==null?void 0:n.url)??null,contactEmail:(n==null?void 0:n.email)??null,tags:r};return o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:"hidden @lg:block mb-3",children:s}),o.jsxs("dl",{className:"flex flex-wrap @lg:flex-unwrap gap-2 ",children:[i.licenseName&&o.jsx(En,{IconClass:Rh,text:`${i.licenseName} ${Oi}`,term:Oi,visibleTerm:!i.licenseName,href:i.licenseUrl,className:"text-foreground-secondary hover:text-pink-500"}),i.externalDocsUrl&&o.jsx(En,{IconClass:zr,text:Ii,href:i.externalDocsUrl,term:Ii,visibleTerm:!i.externalDocsTitle,className:"text-foreground-secondary hover:text-secondary-500"}),i.contactEmail&&o.jsx(En,{IconClass:Oh,text:`${i.contactEmail}`,term:$u,visibleTerm:!i.contactEmail,href:`mailto:${i.contactEmail}`,className:"text-foreground-secondary hover:text-green-500"}),i.contactUrl&&o.jsx(En,{IconClass:Ih,text:`${i.contactName}`,term:Cu,visibleTerm:!i.contactName,href:i.contactUrl,className:"text-foreground-secondary hover:text-green-500"})]}),o.jsx("dl",{className:"mt-[10px]",children:i.tags&&o.jsx(En,{IconClass:Mh,term:Ou,className:"mb-2 text-foreground-secondary inline-block",vertical:!0,text:i.tags&&o.jsx("div",{className:"flex flex-wrap gap-1 -ml-2",children:i.tags.map((a,l)=>{const c=a,u=c.externalDocs;return o.jsx(zo,{href:u&&u.url,title:c.description||(u&&u.description?u.description:void 0),name:c.name},l)})})})})]})}const Ph=[/^x-parser-/i,/^x-lib-/i];function Dh(e){return Ph.some(t=>t.test(e))}const ga=new Map;function Bh(e){let t=ga.get(e);return t||(t=b.lazy(xl[e]),ga.set(e,t)),t}const Fh=e=>e.startsWith("x-"),Uo=(e,t)=>e?e[t]:void 0;function zh({source:e,pathPrefix:t}){const{showExtensions:n}=Ue();if(!n||!e)return null;const r=Object.keys(e).filter(s=>Fh(s)&&!Dh(s)&&Object.prototype.hasOwnProperty.call(xl,s));return r.length===0?null:o.jsx(o.Fragment,{children:r.map(s=>{const i=Bh(s);return o.jsx(b.Suspense,{fallback:null,children:o.jsx(i,{value:Uo(e,s),path:`${t}.${s}`})},s)})})}const Uh=b.lazy(Bf),Yl=e=>Ao(Uo(e,"x-logo"))!==null;function Ho({source:e}){const t=Uo(e,"x-logo");return Ao(t)?o.jsx(b.Suspense,{fallback:null,children:o.jsx(Uh,{value:t,path:"info.x-logo"})}):null}function Xl({title:e,description:t,license:n,contact:r,externalDocs:s,tags:i,extensionsSource:a,layout:l,showLogo:c=!0}){const u=c?o.jsx(Ho,{source:a}):null,d=o.jsx("div",{className:"mt-4 w-full",children:o.jsx(lt,{children:t})}),f=o.jsxs(o.Fragment,{children:[o.jsx(Lh,{logo:u,license:n,externalDocs:s,contact:r,tags:i}),a&&o.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:o.jsx(zh,{source:a,pathPrefix:"info"})})]});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:e,content:d,sideContent:f,stickySideContent:!0,reverseLayoutOnMobile:!0,info:!0,mobileLeadContent:u,layout:l})})}const Zl=({title:e,description:t,license:n,externalDocs:r,contact:s,tags:i,layout:a,showLogo:l,...c})=>o.jsx(Xl,{title:e,description:t,license:n,externalDocs:r,contact:s,tags:i,extensionsSource:c,layout:a,showLogo:l}),Hh=1500,Wh=320,Gh=48,Kh="#011627";function Vh(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(t)}}async function Jh(e){try{return await navigator.clipboard.writeText(e),!0}catch{return Vh(e)}}function Gr({code:e,className:t,language:n="json",collapsedMaxHeight:r=Wh}){const[s,i]=b.useState("idle"),a=b.useRef(void 0),[l,c]=b.useState(!1),[u,d]=b.useState(!1),[f,p]=b.useState(0),m=b.useRef(null),h=b.useRef(null),x=b.useId();b.useEffect(()=>()=>clearTimeout(a.current),[]),b.useEffect(()=>{const A=h.current;if(!A)return;const v=()=>{p(A.scrollHeight),d(A.scrollHeight>r+Gh)};v();const y=new ResizeObserver(v);return y.observe(A),()=>y.disconnect()},[e,n,r]);const k=()=>{Jh(e).then(A=>{i(A?"copied":"error"),clearTimeout(a.current),a.current=setTimeout(()=>i("idle"),Hh)})},C=at.getLanguage(n)?at.highlight(e,{language:n}).value:null,E=s==="copied"?"Copied":s==="error"?"Copy failed":"Copy to clipboard",R=u&&!l,D=e.replace(/\n+$/,"").split(`
127
+ `).length,_=()=>{var A,v;l&&(((A=m.current)==null?void 0:A.getBoundingClientRect().top)??0)<0&&((v=m.current)==null||v.scrollIntoView({block:"nearest"})),c(y=>!y)};return o.jsxs("div",{ref:m,className:`relative ${t??""}`,children:[o.jsx("button",{type:"button",onClick:k,"aria-label":E,title:E,className:"absolute top-2 right-2 z-10 p-1 rounded text-foreground-muted hover:text-foreground-secondary hover:bg-neutral-100 transition-colors",children:s==="copied"?o.jsx(Ya,{className:"w-4 h-4 text-green-600"}):o.jsx(Ja,{className:`w-4 h-4 ${s==="error"?"text-red-500":""}`})}),o.jsxs("div",{className:"relative",children:[o.jsx("pre",{ref:h,id:x,style:u?{maxHeight:l?f:r}:void 0,className:`text-xs rounded overflow-x-auto transition-[max-height] duration-300 ease-in-out ${u?"overflow-y-hidden":""}`,children:C!==null?o.jsx("code",{className:`hljs language-${n}`,dangerouslySetInnerHTML:{__html:bl.sanitize(C)}}):o.jsx("code",{className:"hljs",children:e})}),u&&o.jsx("div",{"aria-hidden":"true",className:`pointer-events-none absolute inset-x-0 bottom-0 h-16 rounded-b transition-opacity duration-300 ease-in-out ${R?"opacity-100":"opacity-0"}`,style:{background:`linear-gradient(to bottom, transparent, ${Kh})`}})]}),u&&o.jsxs("button",{type:"button",onClick:_,"aria-expanded":l,"aria-controls":x,className:"flex items-center gap-1 mt-1 px-1 py-0.5 rounded text-xs text-foreground-muted hover:text-foreground-secondary transition-colors",children:[l?"Show less":`Show all ${D} lines`,o.jsx(cn,{className:`w-3 h-3 transition-transform ${l?"rotate-180":""}`})]})]})}const Yh=/^x-parser-/i;function Zs(e,t=new Set){if(e!==null&&typeof e=="object"){if(t.has(e))return"[circular]";t.add(e);try{if(Array.isArray(e))return e.map(r=>Zs(r,t));const n={};for(const[r,s]of Object.entries(e))Yh.test(r)||(n[r]=Zs(s,t));return n}finally{t.delete(e)}}return e}const Ql=({schema:e})=>{const t=typeof e=="string"?e:JSON.stringify(Zs(e),null,2);return o.jsx(Gr,{code:t})},xa=new Set,Wo=e=>e.replace(/^#\//,"").split("/").pop()??e,Qs=e=>{const t=e["x-parser-schema-id"];return typeof t=="string"&&!t.startsWith("<")?t:void 0},Xh={objects:new Set,refs:new Set},bt=(e,t,n)=>{if(!e.$ref)return{schema:e,refLabel:Qs(e)};const r=e.$ref,s=Wo(r);if(n.has(r))return{schema:e,refLabel:s,circular:!0};const i=xt(t(r));if(!i)return{schema:e,refLabel:s};const{schema:a}=On(i);n.add(r);try{const l=bt(a,t,n);return{schema:l.schema,refLabel:l.circular?void 0:s,circular:l.circular}}finally{n.delete(r)}},Ht=e=>{const t=e.items,n=Array.isArray(t)?t[0]:t;return se(n)?n:null},ql=e=>{const t=e.items;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},Zh=e=>!Array.isArray(e.items)||e.additionalItems===void 0?null:typeof e.additionalItems=="boolean"||se(e.additionalItems)?e.additionalItems:null,Qh=e=>e.contains===void 0?null:typeof e.contains=="boolean"||se(e.contains)?e.contains:null,ec=e=>e.contains!==void 0,Rr=(e,t)=>{if(!(!e&&!t))return!t||e===t?e??t:e?`${e}
128
128
 
129
- ${t}`:t},qh=new Set(["allOf","oneOf","anyOf","not","if","then","else","_allOfConditionals","$ref","properties","patternProperties","propertyNames","additionalProperties","required","description","items"]),Tt=(e,t,n,r)=>{if(e===t)return e;const s={...e};if(t.description&&(s.description=Rr(typeof s.description=="string"?s.description:void 0,typeof t.description=="string"?t.description:void 0)),t.required&&(s.required=Array.from(new Set([...s.required??[],...t.required]))),t.properties){s.properties={...s.properties??{}};for(const[i,a]of Object.entries(t.properties)){if(!se(a))continue;const l=s.properties[i];se(l)?s.properties[i]=Tt(l,a):s.properties[i]=a}}if(t.items)if(Array.isArray(t.items))Array.isArray(s.items)?s.items=t.items.map((i,a)=>{const l=s.items[a];return se(i)&&se(l)?Tt(l,i):se(i)?i:l}):s.items=t.items;else{const i=Ht(t),a=Ht(s);i&&a?s.items=Tt(a,i):i&&(s.items=t.items)}if(t.patternProperties&&se(t.patternProperties)){const i={...se(s.patternProperties)?s.patternProperties:{}};for(const[a,l]of Object.entries(t.patternProperties)){if(!se(l)){i[a]=l;continue}const c=i[a];se(c)?i[a]=Tt(c,l):i[a]=l}s.patternProperties=i}if(t.propertyNames!==void 0)if(se(t.propertyNames)){const i=s.propertyNames;s.propertyNames=se(i)?Tt(i,t.propertyNames):t.propertyNames}else s.propertyNames=t.propertyNames;if(t.additionalProperties!==void 0)if(se(t.additionalProperties)){const i=s.additionalProperties;s.additionalProperties=se(i)?Tt(i,t.additionalProperties):t.additionalProperties}else s.additionalProperties=t.additionalProperties;for(const[i,a]of Object.entries(t))qh.has(i)||a===void 0||(s[i]=a);return s},ba=(e,t,n,r)=>{const s={...e};delete s.allOf,s.properties&&(s.properties=Object.fromEntries(Object.entries(s.properties).map(([u,d])=>se(d)?[u,Fe(d,t,n,r)]:[u,d])));const i=Ht(s);i&&(s.items=Fe(i,t,n,r));const a=Un(s);a!==null&&se(a)&&(s.propertyNames=Fe(a,t,n,r));const l=un(s);l!==null&&se(l)&&(s.additionalProperties=Fe(l,t,n,r));const c=Go(s);return c.length>0&&(s.patternProperties=Object.fromEntries(c.map(([u,d])=>[u,Fe(d,t,n,r)]))),s},Fe=(e,t,n,r=new Set)=>{if(r.has(e))return e;r.add(e);try{const s=e.allOf;if(Array.isArray(s)&&s.length>0){const i=[];let a={};for(const d of s){if(!se(d))continue;const{schema:f,circular:p}=bt(d,t,n);if(p)continue;const m=Fe(f,t,n,r);if(m.if!==void 0){const h={if:m.if};m.then!==void 0&&(h.then=m.then),m.else!==void 0&&(h.else=m.else),i.push(h)}i.push(...rc(m)),a=Tt(a,m,t,n)}if(e.if!==void 0){const d={if:e.if};e.then!==void 0&&(d.then=e.then),e.else!==void 0&&(d.else=e.else),i.push(d)}const l={...e};delete l.allOf;const c=Object.keys(l).length>0?Tt(a,l,t,n):a,u=ba(c,t,n,r);if(i.length===1){const d=i[0];u.if=d.if,d.then!==void 0&&(u.then=d.then),d.else!==void 0&&(u.else=d.else)}else i.length>1&&(u._allOfConditionals=i);return u}return ba(e,t,n,r)}finally{r.delete(e)}},Fn=e=>{const t=e.oneOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},zn=e=>{const t=e.anyOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},tc=e=>e.not===void 0?null:typeof e.not=="boolean"||se(e.not)?e.not:null,Ke=e=>tc(e)!==null,nc=e=>{const{not:t,...n}=e;return n},em=e=>{const{if:t,then:n,else:r,...s}=e;return s},Xe=e=>e.if!==void 0,Es=e=>e===void 0?null:typeof e=="boolean"||se(e)?e:null,rc=e=>Array.isArray(e._allOfConditionals)?e._allOfConditionals.filter(t=>se(t)):[],Ze=e=>Array.isArray(e._allOfConditionals)&&e._allOfConditionals.length>0,Un=e=>e.propertyNames===void 0?null:typeof e.propertyNames=="boolean"||se(e.propertyNames)?e.propertyNames:null,un=e=>e.additionalProperties===void 0?null:typeof e.additionalProperties=="boolean"||se(e.additionalProperties)?e.additionalProperties:null,Go=e=>{const t=e.patternProperties;return se(t)?Object.entries(t).flatMap(([n,r])=>se(r)?[[n,r]]:[]):[]},tm=(e,t)=>`${e}.[pattern:${t}]`,Hn=e=>e.properties!==void 0&&Object.keys(e.properties).length>0,Kr=e=>{const t=Un(e);if(t!==null&&se(t))return!0;const n=un(e);return n!==null&&se(n)?!0:Go(e).length>0},sc=e=>!!(Fn(e)||zn(e)||Hn(e)||Kr(e)||e.type==="array"||e.items||e.type!==void 0),it=e=>!(Ke(e)||Xe(e)||Ze(e)||Fn(e)||zn(e)||Hn(e)||Kr(e)||e.items||ec(e)||e.type==="array"||e.type==="object");function nm(e){if(typeof un(e)=="boolean")return!0;const n=Un(e);return!!(typeof n=="boolean"||n!==null&&se(n)&&it(n)&&typeof n.pattern=="string"&&n.pattern.length>0)}function ya(e){return typeof e.multipleOf=="number"||typeof e.minimum=="number"||typeof e.exclusiveMinimum=="number"||typeof e.maximum=="number"||typeof e.exclusiveMaximum=="number"||typeof e.minLength=="number"||typeof e.maxLength=="number"||typeof e.minItems=="number"||typeof e.maxItems=="number"||typeof e.minProperties=="number"||typeof e.maxProperties=="number"||typeof e.pattern=="string"&&e.pattern.length>0||Array.isArray(e.enum)&&e.enum.length>0||e.const!==void 0||e.uniqueItems===!0||nm(e)}const oc=(e,t)=>ya(e)?!0:t?ya(t):!1,rm=(e,t)=>{if(Ke(e)||Xe(e)||Ze(e)||Fn(e)||zn(e)||Hn(e)||Kr(e))return!0;if(e.type==="array"||e.items){if(ec(e)||ql(e)!==null)return!0;const n=Ht(e);if(!n)return!1;if(n.$ref&&t){const{schema:r}=bt(n,t,xa),s=Fe(r,t,xa);return!it(s)}return!it(n)}return!1};function ic(e){return JSON.stringify(e)}function wa(e){return typeof e=="string"?e:JSON.stringify(e)}function qe({children:e}){return o.jsx("span",{className:"text-xs text-foreground-muted",children:e})}function ac({children:e,mono:t=!1,title:n}){return o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",title:n,children:t?o.jsx("span",{className:"font-mono text-foreground",children:e}):e})}function sm(e){return typeof e.exclusiveMinimum=="number"?{value:e.exclusiveMinimum,op:"<"}:typeof e.minimum=="number"?{value:e.minimum,op:"≤"}:null}function om(e){return typeof e.exclusiveMaximum=="number"?{value:e.exclusiveMaximum,op:"<"}:typeof e.maximum=="number"?{value:e.maximum,op:"≤"}:null}function im(e){return typeof e.minLength=="number"?{value:e.minLength,op:"≤"}:null}function am(e){return typeof e.maxLength=="number"?{value:e.maxLength,op:"≤"}:null}function ka(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function va(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function fr({name:e,lower:t,upper:n,suffix:r}){return!t&&!n?null:o.jsxs("span",{className:"inline-flex items-center gap-1",children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:String(t.value)}),o.jsx(qe,{children:t.op})]}),o.jsx(qe,{children:e}),n&&o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:n.op}),o.jsx(qe,{children:String(n.value)})]}),r&&o.jsx(qe,{children:r})]})}function Sr({value:e,displayValue:t}){const n=()=>{var i;(i=window.getSelection())!=null&&i.toString()||navigator.clipboard.writeText(wa(e))},r=s=>{s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),navigator.clipboard.writeText(wa(e)))};return o.jsx("span",{role:"button",tabIndex:0,className:"inline-flex cursor-pointer select-text items-center rounded-md bg-neutral-100 px-2 py-1 font-mono text-xs font-medium text-foreground hover:bg-neutral-200",title:"Click to copy",onClick:n,onKeyDown:r,children:t??ic(e)})}function lm({schema:e}){const t=un(e);return typeof t!="boolean"?null:o.jsx(qe,{children:t?"additional properties allowed":"additional properties not allowed"})}function cm({schema:e}){const t=Un(e);return typeof t=="boolean"?o.jsx(ac,{children:t?"any property name":"no property names"}):t!==null&&se(t)&&it(t)&&typeof t.pattern=="string"&&t.pattern.length>0?o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"property name pattern:"}),o.jsx(Sr,{value:t.pattern,displayValue:t.pattern})]}):null}function Sa({schema:e,rangeName:t="value"}){const n=Array.isArray(e.enum)&&e.enum.length>0?e.enum:null,r=sm(e),s=om(e),i=im(e),a=am(e),l=ka(e,"minItems"),c=va(e,"maxItems"),u=ka(e,"minProperties"),d=va(e,"maxProperties");return o.jsxs(o.Fragment,{children:[typeof e.multipleOf=="number"&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"multiple of :"}),o.jsx(ac,{children:String(e.multipleOf)})]}),(r||s)&&o.jsx(fr,{name:t,lower:r,upper:s}),(i||a)&&o.jsx(fr,{name:t,lower:i,upper:a,suffix:"chars"}),(l||c)&&o.jsx(fr,{name:t,lower:l,upper:c,suffix:"items"}),(u||d)&&o.jsx(fr,{name:t,lower:u,upper:d,suffix:"props"}),typeof e.pattern=="string"&&e.pattern.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"regex pattern:"}),o.jsx(Sr,{value:e.pattern,displayValue:e.pattern})]}),n&&o.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[o.jsx(qe,{children:"enum values:"}),n.map((f,p)=>o.jsx(Sr,{value:f},`${p}-${ic(f)}`))]}),e.const!==void 0&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"const value:"}),o.jsx(Sr,{value:e.const})]}),e.uniqueItems===!0&&o.jsx(qe,{children:"unique"}),o.jsx(lm,{schema:e}),o.jsx(cm,{schema:e})]})}function lc({schema:e,itemSchema:t,fieldName:n,className:r="flex flex-col gap-1"}){const s=t!=null&&it(t),i=n??"value";return o.jsxs("div",{className:r,children:[o.jsx(Sa,{schema:e,rangeName:i}),s&&o.jsx(Sa,{schema:t,rangeName:"item"})]})}const cc=(e,t)=>{const n=Fn(e);if(n)return{text:`one of (${n.length})`};const r=zn(e);if(r)return{text:`any of (${r.length})`};if(Ke(e)&&!sc(nc(e)))return{text:"not"};if(e.type==="array"||e.items){const u=Ht(e);if(u){const d=u.type;if(d==="object"){const f=u.$ref?Wo(u.$ref):t;return f?{text:"Array of objects",refHint:f}:{text:"Array of objects"}}if(typeof d=="string"){const f=typeof u.format=="string"?u.format:void 0;return{text:`Array of ${d}`,format:f}}}return{text:"array"}}const s=Array.isArray(e.type)?e.type.join(" | "):e.type;let i=s?`${s}`:"type: unknown";const a=un(e);!Hn(e)&&a!==null&&se(a)&&(s==="object"||i==="type: unknown")&&(i=s==="object"?"object (map)":"map");const l=typeof e.format=="string"?e.format:void 0,c=t&&(s==="object"||i.startsWith("object"))?t:void 0;return{text:i,format:l,refHint:c}},um=(e,t)=>{if(!t)return!1;const n=cc(e,t);return!n.refHint&&!n.text.includes(`(${t})`)};function uc({schema:e,refLabel:t,className:n="text-xs text-foreground-muted"}){const{text:r,format:s,refHint:i}=cc(e,t);return o.jsxs("span",{className:n,children:[s??r,i&&!r.includes(`(${i})`)&&o.jsxs("span",{className:"text-foreground-muted",children:[" (",i,")"]})]})}const Ea="ml-6";function pr({schema:e,showBorder:t=!0}){const n=typeof e.description=="string"?e.description:void 0;return o.jsxs("div",{className:`py-2 ${t?"border-b border-border last:border-b-0":""}`,children:[o.jsxs("div",{className:"flex items-center gap-2 min-h-[24px]",children:[o.jsx("span",{className:"w-4 shrink-0","aria-hidden":"true"}),o.jsx(uc,{schema:e})]}),oc(e)&&o.jsx(lc,{schema:e,className:`flex flex-col gap-1 mt-1 ${Ea}`}),n&&n.split(`
129
+ ${t}`:t},qh=new Set(["allOf","oneOf","anyOf","not","if","then","else","_allOfConditionals","$ref","properties","patternProperties","propertyNames","additionalProperties","required","description","items"]),Tt=(e,t,n,r)=>{if(e===t)return e;const s={...e};if(t.description&&(s.description=Rr(typeof s.description=="string"?s.description:void 0,typeof t.description=="string"?t.description:void 0)),t.required&&(s.required=Array.from(new Set([...s.required??[],...t.required]))),t.properties){s.properties={...s.properties??{}};for(const[i,a]of Object.entries(t.properties)){if(!se(a))continue;const l=s.properties[i];se(l)?s.properties[i]=Tt(l,a):s.properties[i]=a}}if(t.items)if(Array.isArray(t.items))Array.isArray(s.items)?s.items=t.items.map((i,a)=>{const l=s.items[a];return se(i)&&se(l)?Tt(l,i):se(i)?i:l}):s.items=t.items;else{const i=Ht(t),a=Ht(s);i&&a?s.items=Tt(a,i):i&&(s.items=t.items)}if(t.patternProperties&&se(t.patternProperties)){const i={...se(s.patternProperties)?s.patternProperties:{}};for(const[a,l]of Object.entries(t.patternProperties)){if(!se(l)){i[a]=l;continue}const c=i[a];se(c)?i[a]=Tt(c,l):i[a]=l}s.patternProperties=i}if(t.propertyNames!==void 0)if(se(t.propertyNames)){const i=s.propertyNames;s.propertyNames=se(i)?Tt(i,t.propertyNames):t.propertyNames}else s.propertyNames=t.propertyNames;if(t.additionalProperties!==void 0)if(se(t.additionalProperties)){const i=s.additionalProperties;s.additionalProperties=se(i)?Tt(i,t.additionalProperties):t.additionalProperties}else s.additionalProperties=t.additionalProperties;for(const[i,a]of Object.entries(t))qh.has(i)||a===void 0||(s[i]=a);return s},ba=(e,t,n,r)=>{const s={...e};delete s.allOf,s.properties&&(s.properties=Object.fromEntries(Object.entries(s.properties).map(([u,d])=>se(d)?[u,Fe(d,t,n,r)]:[u,d])));const i=Ht(s);i&&(s.items=Fe(i,t,n,r));const a=Un(s);a!==null&&se(a)&&(s.propertyNames=Fe(a,t,n,r));const l=dn(s);l!==null&&se(l)&&(s.additionalProperties=Fe(l,t,n,r));const c=Go(s);return c.length>0&&(s.patternProperties=Object.fromEntries(c.map(([u,d])=>[u,Fe(d,t,n,r)]))),s},Fe=(e,t,n,r=new Set)=>{if(r.has(e))return e;r.add(e);try{const s=e.allOf;if(Array.isArray(s)&&s.length>0){const i=[];let a={};for(const d of s){if(!se(d))continue;const{schema:f,circular:p}=bt(d,t,n);if(p)continue;const m=Fe(f,t,n,r);if(m.if!==void 0){const h={if:m.if};m.then!==void 0&&(h.then=m.then),m.else!==void 0&&(h.else=m.else),i.push(h)}i.push(...rc(m)),a=Tt(a,m,t,n)}if(e.if!==void 0){const d={if:e.if};e.then!==void 0&&(d.then=e.then),e.else!==void 0&&(d.else=e.else),i.push(d)}const l={...e};delete l.allOf;const c=Object.keys(l).length>0?Tt(a,l,t,n):a,u=ba(c,t,n,r);if(i.length===1){const d=i[0];u.if=d.if,d.then!==void 0&&(u.then=d.then),d.else!==void 0&&(u.else=d.else)}else i.length>1&&(u._allOfConditionals=i);return u}return ba(e,t,n,r)}finally{r.delete(e)}},Fn=e=>{const t=e.oneOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},zn=e=>{const t=e.anyOf;if(!Array.isArray(t)||t.length===0)return null;const n=t.filter(r=>se(r));return n.length>0?n:null},tc=e=>e.not===void 0?null:typeof e.not=="boolean"||se(e.not)?e.not:null,Ke=e=>tc(e)!==null,nc=e=>{const{not:t,...n}=e;return n},em=e=>{const{if:t,then:n,else:r,...s}=e;return s},Xe=e=>e.if!==void 0,Es=e=>e===void 0?null:typeof e=="boolean"||se(e)?e:null,rc=e=>Array.isArray(e._allOfConditionals)?e._allOfConditionals.filter(t=>se(t)):[],Ze=e=>Array.isArray(e._allOfConditionals)&&e._allOfConditionals.length>0,Un=e=>e.propertyNames===void 0?null:typeof e.propertyNames=="boolean"||se(e.propertyNames)?e.propertyNames:null,dn=e=>e.additionalProperties===void 0?null:typeof e.additionalProperties=="boolean"||se(e.additionalProperties)?e.additionalProperties:null,Go=e=>{const t=e.patternProperties;return se(t)?Object.entries(t).flatMap(([n,r])=>se(r)?[[n,r]]:[]):[]},tm=(e,t)=>`${e}.[pattern:${t}]`,Hn=e=>e.properties!==void 0&&Object.keys(e.properties).length>0,Kr=e=>{const t=Un(e);if(t!==null&&se(t))return!0;const n=dn(e);return n!==null&&se(n)?!0:Go(e).length>0},sc=e=>!!(Fn(e)||zn(e)||Hn(e)||Kr(e)||e.type==="array"||e.items||e.type!==void 0),it=e=>!(Ke(e)||Xe(e)||Ze(e)||Fn(e)||zn(e)||Hn(e)||Kr(e)||e.items||ec(e)||e.type==="array"||e.type==="object");function nm(e){if(typeof dn(e)=="boolean")return!0;const n=Un(e);return!!(typeof n=="boolean"||n!==null&&se(n)&&it(n)&&typeof n.pattern=="string"&&n.pattern.length>0)}function ya(e){return typeof e.multipleOf=="number"||typeof e.minimum=="number"||typeof e.exclusiveMinimum=="number"||typeof e.maximum=="number"||typeof e.exclusiveMaximum=="number"||typeof e.minLength=="number"||typeof e.maxLength=="number"||typeof e.minItems=="number"||typeof e.maxItems=="number"||typeof e.minProperties=="number"||typeof e.maxProperties=="number"||typeof e.pattern=="string"&&e.pattern.length>0||Array.isArray(e.enum)&&e.enum.length>0||e.const!==void 0||e.uniqueItems===!0||nm(e)}const oc=(e,t)=>ya(e)?!0:t?ya(t):!1,rm=(e,t)=>{if(Ke(e)||Xe(e)||Ze(e)||Fn(e)||zn(e)||Hn(e)||Kr(e))return!0;if(e.type==="array"||e.items){if(ec(e)||ql(e)!==null)return!0;const n=Ht(e);if(!n)return!1;if(n.$ref&&t){const{schema:r}=bt(n,t,xa),s=Fe(r,t,xa);return!it(s)}return!it(n)}return!1};function ic(e){return JSON.stringify(e)}function wa(e){return typeof e=="string"?e:JSON.stringify(e)}function qe({children:e}){return o.jsx("span",{className:"text-xs text-foreground-muted",children:e})}function ac({children:e,mono:t=!1,title:n}){return o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",title:n,children:t?o.jsx("span",{className:"font-mono text-foreground",children:e}):e})}function sm(e){return typeof e.exclusiveMinimum=="number"?{value:e.exclusiveMinimum,op:"<"}:typeof e.minimum=="number"?{value:e.minimum,op:"≤"}:null}function om(e){return typeof e.exclusiveMaximum=="number"?{value:e.exclusiveMaximum,op:"<"}:typeof e.maximum=="number"?{value:e.maximum,op:"≤"}:null}function im(e){return typeof e.minLength=="number"?{value:e.minLength,op:"≤"}:null}function am(e){return typeof e.maxLength=="number"?{value:e.maxLength,op:"≤"}:null}function ka(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function va(e,t){const n=e[t];return typeof n=="number"?{value:n,op:"≤"}:null}function fr({name:e,lower:t,upper:n,suffix:r}){return!t&&!n?null:o.jsxs("span",{className:"inline-flex items-center gap-1",children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:String(t.value)}),o.jsx(qe,{children:t.op})]}),o.jsx(qe,{children:e}),n&&o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:n.op}),o.jsx(qe,{children:String(n.value)})]}),r&&o.jsx(qe,{children:r})]})}function Sr({value:e,displayValue:t}){const n=()=>{var i;(i=window.getSelection())!=null&&i.toString()||navigator.clipboard.writeText(wa(e))},r=s=>{s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),navigator.clipboard.writeText(wa(e)))};return o.jsx("span",{role:"button",tabIndex:0,className:"inline-flex cursor-pointer select-text items-center rounded-md bg-neutral-100 px-2 py-1 font-mono text-xs font-medium text-foreground hover:bg-neutral-200",title:"Click to copy",onClick:n,onKeyDown:r,children:t??ic(e)})}function lm({schema:e}){const t=dn(e);return typeof t!="boolean"?null:o.jsx(qe,{children:t?"additional properties allowed":"additional properties not allowed"})}function cm({schema:e}){const t=Un(e);return typeof t=="boolean"?o.jsx(ac,{children:t?"any property name":"no property names"}):t!==null&&se(t)&&it(t)&&typeof t.pattern=="string"&&t.pattern.length>0?o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"property name pattern:"}),o.jsx(Sr,{value:t.pattern,displayValue:t.pattern})]}):null}function Sa({schema:e,rangeName:t="value"}){const n=Array.isArray(e.enum)&&e.enum.length>0?e.enum:null,r=sm(e),s=om(e),i=im(e),a=am(e),l=ka(e,"minItems"),c=va(e,"maxItems"),u=ka(e,"minProperties"),d=va(e,"maxProperties");return o.jsxs(o.Fragment,{children:[typeof e.multipleOf=="number"&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"multiple of :"}),o.jsx(ac,{children:String(e.multipleOf)})]}),(r||s)&&o.jsx(fr,{name:t,lower:r,upper:s}),(i||a)&&o.jsx(fr,{name:t,lower:i,upper:a,suffix:"chars"}),(l||c)&&o.jsx(fr,{name:t,lower:l,upper:c,suffix:"items"}),(u||d)&&o.jsx(fr,{name:t,lower:u,upper:d,suffix:"props"}),typeof e.pattern=="string"&&e.pattern.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"regex pattern:"}),o.jsx(Sr,{value:e.pattern,displayValue:e.pattern})]}),n&&o.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[o.jsx(qe,{children:"enum values:"}),n.map((f,p)=>o.jsx(Sr,{value:f},`${p}-${ic(f)}`))]}),e.const!==void 0&&o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(qe,{children:"const value:"}),o.jsx(Sr,{value:e.const})]}),e.uniqueItems===!0&&o.jsx(qe,{children:"unique"}),o.jsx(lm,{schema:e}),o.jsx(cm,{schema:e})]})}function lc({schema:e,itemSchema:t,fieldName:n,className:r="flex flex-col gap-1"}){const s=t!=null&&it(t),i=n??"value";return o.jsxs("div",{className:r,children:[o.jsx(Sa,{schema:e,rangeName:i}),s&&o.jsx(Sa,{schema:t,rangeName:"item"})]})}const cc=(e,t)=>{const n=Fn(e);if(n)return{text:`one of (${n.length})`};const r=zn(e);if(r)return{text:`any of (${r.length})`};if(Ke(e)&&!sc(nc(e)))return{text:"not"};if(e.type==="array"||e.items){const u=Ht(e);if(u){const d=u.type;if(d==="object"){const f=u.$ref?Wo(u.$ref):t;return f?{text:"Array of objects",refHint:f}:{text:"Array of objects"}}if(typeof d=="string"){const f=typeof u.format=="string"?u.format:void 0;return{text:`Array of ${d}`,format:f}}}return{text:"array"}}const s=Array.isArray(e.type)?e.type.join(" | "):e.type;let i=s?`${s}`:"type: unknown";const a=dn(e);!Hn(e)&&a!==null&&se(a)&&(s==="object"||i==="type: unknown")&&(i=s==="object"?"object (map)":"map");const l=typeof e.format=="string"?e.format:void 0,c=t&&(s==="object"||i.startsWith("object"))?t:void 0;return{text:i,format:l,refHint:c}},um=(e,t)=>{if(!t)return!1;const n=cc(e,t);return!n.refHint&&!n.text.includes(`(${t})`)};function uc({schema:e,refLabel:t,className:n="text-xs text-foreground-muted"}){const{text:r,format:s,refHint:i}=cc(e,t);return o.jsxs("span",{className:n,children:[s??r,i&&!r.includes(`(${i})`)&&o.jsxs("span",{className:"text-foreground-muted",children:[" (",i,")"]})]})}const Ea="ml-6";function pr({schema:e,showBorder:t=!0}){const n=typeof e.description=="string"?e.description:void 0;return o.jsxs("div",{className:`py-2 ${t?"border-b border-border last:border-b-0":""}`,children:[o.jsxs("div",{className:"flex items-center gap-2 min-h-[24px]",children:[o.jsx("span",{className:"w-4 shrink-0","aria-hidden":"true"}),o.jsx(uc,{schema:e})]}),oc(e)&&o.jsx(lc,{schema:e,className:`flex flex-col gap-1 mt-1 ${Ea}`}),n&&n.split(`
130
130
 
131
131
  `).map((r,s)=>o.jsx("p",{className:`text-xs text-foreground-muted mt-1 ${Ea} leading-relaxed`,children:r},s))]})}function js({children:e}){return o.jsxs("div",{className:"py-2",children:[o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border border-border rounded-md bg-surface",children:"Should Not match:"}),o.jsx("div",{className:"w-px h-3 bg-border ml-[1.125rem]","aria-hidden":"true"})]}),e]})}function dm({value:e}){const t=e?"any value":"false schema";return o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",children:t})}function dc({tabs:e,selected:t,onChange:n,ariaLabel:r}){const s=b.useRef([]),i=l=>(l+e.length)%e.length,a=(l,c)=>{var d;let u=c;l.key==="ArrowRight"&&(l.preventDefault(),u=i(c+1)),l.key==="ArrowLeft"&&(l.preventDefault(),u=i(c-1)),l.key==="Home"&&(l.preventDefault(),u=0),l.key==="End"&&(l.preventDefault(),u=e.length-1),u!==c&&(n(e[u].id),(d=s.current[u])==null||d.focus())};return o.jsx("div",{className:"inline-flex items-center gap-0.5 p-0.5 bg-neutral-100 rounded-md border border-border",role:"tablist","aria-label":r,children:e.map(({id:l,label:c},u)=>{const d=l===t;return o.jsx("button",{ref:f=>{s.current[u]=f},type:"button",role:"tab","aria-selected":d,tabIndex:0,onClick:()=>n(l),onKeyDown:f=>a(f,u),className:d?"px-3 py-1 text-xs font-semibold text-foreground bg-surface rounded-md shadow-sm border border-border":"px-3 py-1 text-xs font-medium text-foreground-muted hover:text-foreground-secondary rounded-md",children:c},l)})})}function fm({variant:e="oneOf",caseCount:t,caseLabels:n,selectedCase:r,onSelectCase:s,children:i}){if(t===0)return null;const a=(n==null?void 0:n.length)===t?n:Array.from({length:t},(u,d)=>`case ${d+1}`),l=e==="anyOf"?"Any of:":"One of:",c=e==="anyOf"?"Any of cases":"One of cases";return o.jsxs("div",{className:"py-2",children:[o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border border-border rounded-md bg-surface",children:l}),o.jsx("div",{className:"w-px h-3 bg-border ml-[1.125rem]","aria-hidden":"true"})]}),o.jsx(dc,{tabs:a.map((u,d)=>({id:String(d),label:u})),selected:String(r),onChange:u=>s(Number(u)),ariaLabel:c}),o.jsx("div",{role:"tabpanel",className:"mt-2",children:i})]})}const pm="ml-0 border-dashed border-border";function Ft({depth:e,children:t,lineVariant:n="depth"}){const{depthColors:r}=Ue();return n==="none"?o.jsx("div",{children:t}):n==="muted"?o.jsx("div",{className:`pl-3 border-l-2 ${pm}`,children:t}):o.jsx("div",{className:"pl-3 border-l-2 ml-1.5",style:{borderColor:oo(e,r)},children:t})}function hm({depth:e,expanded:t,onToggle:n}){const{depthColors:r}=Ue(),s=oo(e,r);return o.jsxs("button",{type:"button",onClick:n,"aria-expanded":t,"aria-label":t?"Hide details":void 0,className:"cursor-pointer mt-1 flex items-center gap-1.5 shrink-0 text-left hover:opacity-80",children:[o.jsx("span",{"aria-hidden":"true",className:"w-4 h-4 rounded-full border-2 flex items-center justify-center text-[10px] leading-none font-bold hover:bg-neutral-100",style:{borderColor:s,color:s},children:t?"−":"+"}),!t&&o.jsx("span",{className:"text-xs text-foreground-muted",children:"Show details"})]})}const mm="ml-6";function Ge({id:e,path:t,depth:n,schema:r,refLabel:s,itemSchema:i,typeLabelOverride:a,required:l,description:c,expandable:u,expanded:d,onToggle:f,showBorder:p=!0}){const{depthColors:m}=Ue(),h=oo(n,m),x=r&&um(r,s),k=u?mm:"";let j="",C=t;if(t.endsWith("[]")){const E=t.slice(0,-2),R=E.lastIndexOf(".");R>=0?(j=E.slice(0,R+1),C=`${E.slice(R+1)}[]`):C=t}else{const E=t.lastIndexOf("."),R=t.lastIndexOf("[]"),D=Math.max(E,R);D>=0&&(j=t.slice(0,D+(t[D]==="."?1:2)),C=t.slice(D+(t[D]==="."?1:2)))}return p=p&&!d,o.jsxs("div",{id:e,className:`py-2 ${p?"border-b border-border last:border-b-0":""}`,children:[o.jsxs("div",{className:"flex items-center gap-2 min-h-[24px]",children:[o.jsxs("span",{className:"text-xs font-mono flex-1 min-w-0 flex items-center",children:[o.jsxs("span",{className:"truncate min-w-0",children:[j&&o.jsx("span",{className:"text-foreground-muted",children:j}),o.jsx("span",{className:"font-semibold",style:{color:h},children:C})]}),l&&o.jsx("span",{className:"shrink-0 text-red-500 ml-2 text-[10px]",children:"required"}),(r==null?void 0:r.readOnly)===!0&&o.jsx("span",{className:"shrink-0 text-foreground-muted ml-2 text-[10px]",children:"readOnly"}),(r==null?void 0:r.writeOnly)===!0&&o.jsx("span",{className:"shrink-0 text-foreground-muted ml-2 text-[10px]",children:"writeOnly"}),(r==null?void 0:r.deprecated)===!0&&o.jsx("span",{className:"shrink-0 text-amber-600 ml-2 text-[10px]",children:"deprecated"})]}),r?o.jsxs("div",{className:"shrink-0 text-right",children:[o.jsx(uc,{schema:r,refLabel:s}),x&&o.jsxs("span",{className:"text-xs text-foreground-muted",children:[" (ref: ",s,")"]})]}):a&&o.jsx("span",{className:"text-xs text-foreground-muted shrink-0",children:a})]}),r&&oc(r,i)&&o.jsx(lc,{schema:r,itemSchema:i,fieldName:C,className:`flex flex-col gap-1 mt-1 ${k}`}),c&&c.split(`
132
132
 
133
- `).map((E,R)=>o.jsx("p",{className:`text-xs text-foreground-muted mt-1 ${k} leading-relaxed`,children:E},R)),u&&o.jsx(hm,{depth:n,expanded:d,onToggle:f})]})}function As({label:e,children:t}){return o.jsxs("div",{children:[o.jsx("div",{className:"pt-2 pb-0.5 first:pt-0",children:o.jsx("span",{className:"text-xs font-medium text-foreground-secondary",children:e})}),o.jsx("div",{children:t})]})}function gm({ifContent:e,thenContent:t,elseContent:n}){return o.jsxs("div",{className:"py-2 pt-5 px-1",children:[o.jsx("div",{className:"flex flex-col items-start",children:o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border-2 border-dashed border-border rounded-md bg-surface",children:"Conditions apply:"})}),o.jsx(Ft,{depth:0,lineVariant:"muted",children:o.jsxs("div",{className:"divide-y divide-border",children:[o.jsx(As,{label:"If schema matches:",children:e}),t!=null&&o.jsx(As,{label:"Then schema should follow:",children:t}),n!=null&&o.jsx(As,{label:"Else schema should follow:",children:n})]})})]})}function hr({label:e,children:t}){return o.jsxs("div",{className:"py-2",children:[o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border border-border rounded-md bg-surface",children:e}),o.jsx("div",{className:"w-px h-3 bg-border ml-[1.125rem]","aria-hidden":"true"})]}),t]})}const xm=e=>e==="none"?"depth":e;function ot({schema:e,path:t,depth:n,required:r,refStack:s,deref:i,suppressRow:a=!1,branchLineVariant:l="depth",defaultExpanded:c=!1,ancestors:u=Xh,focusTokens:d=null,focusId:f=null}){var Y;const p=xm(l),m=d!=null,x=m&&d.length===0?f??void 0:void 0,[k,j]=b.useState(c||m),[C,E]=b.useState(c);C!==c&&(E(c),j(c||m)),b.useEffect(()=>{m&&j(!0)},[m]);const[R,D]=b.useState(0),_=(Y=d==null?void 0:d[0])==null?void 0:Y.match(/^(?:oneOf|anyOf)\[(\d+)\]$/),A=_?Number(_[1]):-1;b.useEffect(()=>{A>=0&&D(A)},[A]);const v=So(),{schema:y,refLabel:F,circular:Z}=b.useMemo(()=>{if(u.objects.has(e)||typeof e.$ref=="string"&&u.refs.has(e.$ref))return{schema:e,refLabel:Qs(e),circular:!0};const O=bt(e,i,s);return O.circular?O:{...O,schema:Fe(O.schema,i,s)}},[e,i,s,u,v]),N=b.useMemo(()=>({objects:new Set(u.objects).add(e),refs:typeof e.$ref=="string"?new Set(u.refs).add(e.$ref):u.refs}),[u,e]),W=nc(em(y)),ie=!sc(W)&&(Ke(y)||Xe(y)||Ze(y)),oe=()=>{const O=tc(y);if(O===null)return null;if(typeof O=="boolean")return o.jsx(js,{children:o.jsx(dm,{value:O})});const q=bt(O,i,s);if(q.circular)return o.jsx(js,{children:o.jsx(Ge,{path:t,depth:n+1,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1})});const le=Fe(q.schema,i,s),G=it(le);return o.jsx(js,{children:G?o.jsx(pr,{schema:le,showBorder:!1}):o.jsx(ot,{schema:O,path:t,depth:n+1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:p,defaultExpanded:c})})},S=(O,q)=>{if(typeof O=="boolean")return o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",children:O?"any value":"false schema"});const le=bt(O,i,s);if(le.circular)return o.jsx(Ge,{path:q,depth:n+1,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const G=Fe(le.schema,i,s);return it(G)?o.jsx(pr,{schema:G,showBorder:!1}):o.jsx(ot,{schema:O,path:q,depth:n+1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:"none",defaultExpanded:c})},T=O=>{const q=Es(O.if);if(q===null)return null;const le=Es(O.then),G=Es(O.else);return o.jsx(gm,{ifContent:S(q,t),thenContent:le!==null?S(le,t):void 0,elseContent:G!==null?S(G,t):void 0})},H=()=>{const O=rc(y);return O.length===0?null:o.jsx(o.Fragment,{children:O.map((q,le)=>o.jsx("div",{children:T(q)},le))})};if(Z)return o.jsx(Ge,{id:x,path:t,depth:n,typeLabelOverride:`↩ ${e.$ref??F??"circular"}`,expandable:!1,expanded:!1,onToggle:()=>{}});if(ie){const O=o.jsxs(o.Fragment,{children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?O:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(q=>!q)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:O})]})}const V=Fn(W),ae=zn(W),ee=V??ae,Te=V?"oneOf":"anyOf";if(ee){const O=ee.map((Le,X)=>typeof Le.title=="string"?Le.title:`case ${X+1}`),q=a?1:n+1,le=ee[R],G=bt(le,i,s),pe=G.circular?G.schema:Fe(G.schema,i,s),we=!G.circular&&it(pe),fe=d&&A===R?d.slice(1):null,Me=we?o.jsx(pr,{schema:pe,showBorder:!1}):o.jsx(ot,{schema:le,path:t,depth:q-1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:"none",defaultExpanded:c,focusTokens:fe,focusId:f},R),xe=o.jsx(fm,{variant:Te,caseCount:ee.length,caseLabels:O,selectedCase:R,onSelectCase:D,children:Me}),He=o.jsxs(o.Fragment,{children:[xe,Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?He:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(Le=>!Le)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:He})]})}const Q=(O,q,le)=>{const G=bt(O,i,s);if(G.circular)return o.jsx(Ge,{path:q,depth:le,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const pe=Fe(G.schema,i,s);return it(pe)?o.jsx(pr,{schema:pe,showBorder:!1}):o.jsx(ot,{schema:O,path:q,depth:le,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c})},ve=O=>{const q=W.properties??{},le=new Set(W.required??[]),G=Un(W),pe=un(W),we=Go(W);return o.jsxs(o.Fragment,{children:[Object.entries(q).map(([fe,Me])=>{if(!se(Me))return null;const xe=d&&d[0]==="properties"&&d[1]===fe?d.slice(2):null;return o.jsx(ot,{schema:Me,path:`${t}.${fe}`,depth:O,required:le.has(fe),refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c,focusTokens:xe,focusId:f},fe)}),G!==null&&se(G)&&o.jsx(hr,{label:"Property names must adhere to:",children:Q(G,`${t}.[propertyName]`,O)}),we.map(([fe,Me])=>o.jsx(ot,{schema:Me,path:tm(t,fe),depth:O,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c},fe)),pe!==null&&se(pe)&&o.jsx(hr,{label:"Additional properties must adhere to:",children:Q(pe,`${t}.[additionalProperty]`,O)}),Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]})};if(Hn(W)||Kr(W))return a?ve(n+1):o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(O=>!O)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:ve(n+1)})]});if(W.type==="array"||W.items){const O=ql(W),q=O!==null,le=q?Zh(W):null,G=Qh(W),pe=G!==null,we=q?null:Ht(W),fe=we!==null,Me=q||fe||pe||Ke(y)||Xe(y)||Ze(y),xe=`${t}[]`,He=a?t:xe,Le=fe?bt(we,i,s):null,X=(Le==null?void 0:Le.schema)??null,Se=X?Fe(X,i,s):null,_e=X!==null&&(N.objects.has(X)||typeof(we==null?void 0:we.$ref)=="string"&&N.refs.has(we.$ref)),me=X!==null?{objects:new Set(N.objects).add(X),refs:typeof(we==null?void 0:we.$ref)=="string"?new Set(N.refs).add(we.$ref):N.refs}:N,mt=!q&&!pe&&Se!==null&&it(Se),et=Se!=null&&Se.properties?Object.entries(Se.properties).filter(([,U])=>se(U)):[],Mt=new Set(Se&&Array.isArray(Se.required)?Se.required:[]),tt=!q&&d&&d[0]==="items"?d.slice(1):null,B=U=>o.jsxs(o.Fragment,{children:[q?o.jsxs(o.Fragment,{children:[O.map((te,ue)=>o.jsx(ot,{schema:te,path:`${t}[${ue}]`,depth:U,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c},ue)),le!==null&&typeof le!="boolean"&&o.jsx(hr,{label:"Additional items:",children:Q(le,`${t}[*]`,U)}),le===!1&&o.jsx("div",{className:"py-1 pl-6 text-xs text-foreground-muted",children:"no additional items allowed"})]}):fe&&(_e?o.jsx(Ge,{path:He,depth:U,typeLabelOverride:`↩ ${we.$ref??Qs(X)??"circular"}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1}):et.length>0?et.map(([te,ue])=>{const Ce=tt&&tt[0]==="properties"&&tt[1]===te?tt.slice(2):null;return o.jsx(ot,{schema:ue,path:`${He}.${te}`,depth:U,required:Mt.has(te),refStack:s,deref:i,ancestors:me,branchLineVariant:p,defaultExpanded:c,focusTokens:Ce,focusId:f},te)}):o.jsx(ot,{schema:we,path:He,depth:U,refStack:s,deref:i,ancestors:me,branchLineVariant:p,defaultExpanded:c,focusTokens:tt,focusId:f})),pe&&o.jsx(hr,{label:"Contains at least one:",children:typeof G=="boolean"?o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",children:G?"any item":"impossible constraint"}):Q(G,`${t}[contains]`,U)}),Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return mt&&!Ke(y)&&!Xe(y)&&!Ze(y)?o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:Rr(y.description,Se.description),expandable:!1,expanded:!1,onToggle:()=>{}}):mt?o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:Rr(y.description,Se.description),expandable:!0,expanded:k,onToggle:()=>j(U=>!U)}),k&&o.jsxs(Ft,{depth:n,lineVariant:l,children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]})]}):a?Me?B(n+1):null:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:y.description,expandable:q||fe||pe||Ke(y)||Xe(y)||Ze(y),expanded:k,onToggle:()=>j(U=>!U)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:B(n+1)})]})}if(Ke(y)||Xe(y)||Ze(y)){const O=o.jsxs(o.Fragment,{children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?O:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(q=>!q)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:O})]})}return a?null:o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!1,expanded:!1,onToggle:()=>{}})}function Ko({schema:e,rootName:t,className:n="",focusTokens:r=null,focusId:s=null}){const{deref:i,defaultSchemaExpanded:a=!1}=Ue(),l=b.useMemo(()=>new Set,[]),c=xt(e),u=b.useMemo(()=>c?Fe(c,i,l):null,[c,i,l]);if(!c||!u)return o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No schema details available."});const d=t??(c.$ref?Wo(c.$ref):void 0)??"schema",f=!!t;if(!rm(u,i)&&!c.$ref){if(f)return u.type==="array"||u.items?o.jsx("div",{className:n,children:o.jsx(ot,{schema:c,path:d,depth:0,refStack:l,deref:i,defaultExpanded:a,focusTokens:r,focusId:s})}):null;const m=u.type==="array"||u.items?`${d}[]`:d,h=Ht(u),x=h?Fe(h,i,l):null,k=x!==null&&it(x);return o.jsx("div",{className:n,children:o.jsx(Ge,{path:m,depth:0,schema:u,itemSchema:k?x:void 0,description:u.type==="array"||u.items?Rr(u.description,h==null?void 0:h.description):u.description,expandable:!1,expanded:!1,onToggle:()=>{}})})}return o.jsx("div",{className:n,children:o.jsx(ot,{schema:c,path:d,depth:f?-1:0,refStack:l,deref:i,suppressRow:f,defaultExpanded:a,focusTokens:r,focusId:s})})}const bm=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function mr(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function nn(e,t=()=>{},n=new Set,r=new Set){if(typeof e.$ref=="string"){const s=e.$ref,i=t(s);return bm(i)?r.has(s)?mr(i,"null")?{type:"null"}:{}:nn(i,t,new Set,new Set(r).add(s)):{}}if(n.has(e))return mr(e,"null")?{type:"null"}:{};if(Array.isArray(e.oneOf)&&e.oneOf.length>0){const{oneOf:s,...i}=e;return nn({...i,...s[0]},t,n,r)}if(Array.isArray(e.anyOf)&&e.anyOf.length>0){const{anyOf:s,...i}=e;return nn({...i,...s[0]},t,n,r)}if(mr(e,"object")&&e.properties&&typeof e.properties=="object"){n.add(e);try{const s={};for(const[i,a]of Object.entries(e.properties)){const l=/id$/i.test(i)&&a.type==="string"&&!a.format&&!a.examples,c=a.type==="string"&&!a.format&&!a.examples&&!a.enum;s[i]=l?{...a,format:"uuid"}:c?{...a,examples:["string"]}:nn(a,t,n,r)}return{...e,properties:s}}finally{n.delete(e)}}if(mr(e,"array")&&e.items&&typeof e.items=="object"){n.add(e);try{return{...e,items:nn(e.items,t,n,r)}}finally{n.delete(e)}}return e}function ym({schema:e,providedExample:t}){const n=t!==void 0,[r,s]=b.useState(n?t:null),{deref:i}=Ue();if(b.useEffect(()=>{if(n){s(t);return}let l=!1;return Promise.resolve().then(()=>require("./index-d8kJa7YD.cjs")).then(({generate:c})=>c(nn(e,i),{seed:42,useExamplesValue:!0,optionalsProbability:1})).then(c=>{l||s(c)}).catch(()=>{}),()=>{l=!0}},[e,i,n,t]),r===null)return null;const a=JSON.stringify(r,null,2);return o.jsxs("div",{children:[o.jsx(Gr,{code:a}),!n&&o.jsx("span",{className:"text-xs text-foreground-muted italic mt-2 font-bold inline-block",children:"This example is auto generated"})]})}function Wt({schema:e,label:t,rootName:n,description:r,schemaFormat:s,originalSchema:i,conversionError:a,pendingConversion:l,example:c,defaultView:u="example"}){const d=ul(s),f=!l&&_f(s,a),[p,m]=b.useState(f&&u==="example"?"example":"schema");return b.useEffect(()=>{!f&&p==="example"&&m("schema")},[f,p]),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider",children:t}),d&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",title:s,children:d})]}),r&&o.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed mt-2 mb-2",children:r})]}),o.jsx(dc,{tabs:[...f?[{id:"example",label:"Example"}]:[],{id:"schema",label:"Schema"},{id:"json",label:"JSON"}],selected:p,onChange:h=>m(h),ariaLabel:"Schema view toggle"})]}),a&&o.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5 mb-2",children:["Could not convert ",dl(s)??"the"," schema, showing raw definition. ",a]}),l?o.jsx("p",{className:"text-xs text-foreground-muted",children:"Loading Protobuf definition…"}):o.jsxs(o.Fragment,{children:[p==="schema"&&o.jsx(Ko,{schema:e,rootName:n??(typeof t=="string"?t:void 0)}),p==="json"&&o.jsx(Ql,{schema:i??e}),p==="example"&&f&&o.jsx(ym,{schema:e,providedExample:c})]})]})}function fc({message:e,expanded:t,onToggleExpanded:n,paddingX:r="px-4",focusSection:s=null}){var m;const[i,a]=b.useState("payload");b.useEffect(()=>{(s==="headers"||s==="payload")&&a(s)},[s]);const{deref:l}=Ue(),c=So(),u=b.useMemo(()=>e.payload?$n(e.payload,l):null,[e.payload,l,c]),d=b.useMemo(()=>e.headers?$n(e.headers,l):null,[e.headers,l,c]),f=(m=e.examples)==null?void 0:m[0],p=e.description||e.payload||e.headers||e.deprecated||e.tags&&e.tags.length>0;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:o.jsx("div",{className:"overflow-hidden",children:o.jsxs("div",{className:`${r} pb-4 space-y-4 border-t border-border pt-3`,children:[e.description&&o.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed",children:e.description}),(e.payload||e.headers)&&o.jsxs("div",{children:[e.payload&&e.headers&&o.jsx(cn,{tabs:[{id:"payload",name:"Payload"},{id:"headers",name:"Headers"}],current:i,onChange:h=>a(h)}),o.jsxs("div",{className:"mt-4",children:[(i==="payload"||!e.headers)&&u&&o.jsx(Wt,{schema:u.schema,label:"Payload",description:u.description,schemaFormat:u.schemaFormat,originalSchema:u.originalSchema,conversionError:u.conversionError,pendingConversion:u.pendingConversion,example:f==null?void 0:f.payload}),(i==="headers"||!e.payload)&&d&&o.jsx(Wt,{schema:d.schema,label:"Headers",description:d.description,schemaFormat:d.schemaFormat,originalSchema:d.originalSchema,conversionError:d.conversionError,pendingConversion:d.pendingConversion,example:f==null?void 0:f.headers})]})]}),e.tags&&e.tags.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map((h,x)=>o.jsx(zo,{name:`#${h.name}`},x))})]})})}),p&&o.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-1.5 py-2 border-t border-border bg-neutral-50 hover:bg-neutral-100 transition-colors text-xs text-foreground-muted hover:text-foreground-secondary",children:[o.jsx("span",{children:t?"Show less":"Show more"}),o.jsx(Ln,{className:`w-3 h-3 transition-transform duration-200 ${t?"rotate-180":""}`})]})]})}function wm({messageKey:e,message:t,first:n,isSelected:r,focusSection:s}){const[i,a]=b.useState(!1);return b.useEffect(()=>{r&&a(!0)},[r]),o.jsxs("tbody",{id:`message-${e}`,className:`${n?"":"border-t border-border"} ${r?"bg-primary-50/60 outline outline-1 outline-primary-300":""}`,children:[o.jsxs("tr",{className:"",children:[o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.title??t.name??e}),o.jsx("span",{className:"w-fit text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 px-1.5 py-0.5 rounded",children:e})]})}),o.jsx("td",{className:"px-6 py-4 text-sm text-foreground-muted",children:t.summary??"—"}),o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[o.jsxs("div",{className:"flex justify-between w-full",children:[o.jsx("div",{}),o.jsx("div",{children:t.contentType&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:t.contentType??"—"})})]}),t.deprecated&&o.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"}),o.jsxs("div",{className:"flex justify-between w-full",children:[o.jsx("div",{}),o.jsx("div",{children:t.correlationId&&o.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:t.correlationId.description??t.correlationId.location,children:t.correlationId.location})})]})]})})]}),o.jsx("tr",{children:o.jsx("td",{colSpan:3,className:"p-0",children:o.jsx(fc,{message:t,expanded:i,onToggleExpanded:()=>a(l=>!l),paddingX:"px-6",focusSection:r?s:null})})})]})}function pc({messages:e,selectedKey:t,focusSection:n,layout:r}){const s=Object.entries(e),i=s.length?o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Message"}),o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Summary"}),o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Details"})]})}),s.map(([a,l],c)=>o.jsx(wm,{messageKey:a,message:l,first:c===0,isSelected:t===a,focusSection:n},a))]})}):o.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No messages defined in this AsyncAPI document."});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:i,stickySideContent:!1,layout:r})})}function hc({serverNames:e=[],current:t,setCurrent:n}){return o.jsx("nav",{className:"space-y-1 w-max mt-10 @lg:mt-0","aria-label":"Sidebar",children:e.map(r=>o.jsx("button",{type:"button",onClick:()=>n(r),"aria-current":t===r?"page":void 0,className:en(t===r?"border-l-4 border-neutral-300 text-foreground":"text-foreground-secondary hover:text-foreground","flex items-center px-3 py-2 text-sm font-medium cursor-pointer w-full text-left"),children:o.jsx("span",{className:"truncate",children:r})},r))})}function mc(e){return o.jsx(po,{...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}function km(e){return o.jsx(po,{...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}function gc({address:e,variables:t,children:n}){return o.jsxs("div",{className:"font-bold text-foreground-secondary mt-8 mb-4 bg-neutral-200 border border-neutral-500 p-4 rounded-lg",children:[o.jsxs("div",{className:"border border-dotted border-black p-2 rounded-lg bg-surface",children:[o.jsx(km,{className:"inline-block mr-1 -mt-1 h-6 text-foreground-muted"}),e&&o.jsx(Ct,{address:e,parameters:t,className:"font-bold leading-tight tracking-tight px-0"})]}),n]})}function xc({className:e}){return o.jsx("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"currentColor",children:o.jsx("path",{d:"M202.1,450a15,15,0,0,1-10.6-25.61L365.79,250.1,191.5,75.81A15,15,0,0,1,212.71,54.6l184.9,184.9a15,15,0,0,1,0,21.21l-184.9,184.9A15,15,0,0,1,202.1,450Z"})})}function Wn({trigger:e,children:t,defaultExpanded:n=!1,forceExpanded:r=!1,ariaLabelledBy:s,className:i=""}){const[a,l]=b.useState(n),c=b.useId();return b.useEffect(()=>{r&&l(!0)},[r]),o.jsxs("div",{className:`rounded-lg border border-border overflow-hidden ${i}`,children:[o.jsxs("button",{type:"button","aria-expanded":a,"aria-controls":c,"aria-labelledby":s,onClick:()=>l(u=>!u),className:"flex w-full items-center justify-between px-4 py-3 bg-neutral-50 text-left hover:bg-neutral-100 transition-colors",children:[e,a?o.jsx(Ln,{className:"w-4 h-4 text-foreground-muted shrink-0"}):o.jsx(xc,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),o.jsx("div",{id:c,className:`grid transition-all duration-200 ease-in-out ${a?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:o.jsx("div",{className:"overflow-hidden",children:t})})]})}const Ns={userPassword:"User/Password",oauth2:"OAuth2",apiKey:"API key",bearer:"Bearer Token",openIdConnect:"OpenID",X509:"X.509 certificate",scramSha256:"SASL",scramSha512:"SASL",plain:"SASL",gssapi:"SASL"};function Ts(e){var n,r;const t=(n=e.type)==null?void 0:n.toLowerCase();if(t==="httpapikey")return"apiKey";if(t==="http"){const s=(r=e.scheme)==null?void 0:r.toLowerCase();return s==="basic"?"userPassword":s!=null&&s.includes("mutual")||s!=null&&s.includes("tls")?"X509":"bearer"}return e.type}function vm(e){return e.name||e.scheme||e.bearerFormat||e.type||void 0}function Sm(e){const t=(e??[]).filter(s=>Ns[Ts(s)]),n=new Map;for(const s of t){const i=Ns[Ts(s)];n.set(i,(n.get(i)??0)+1)}const r=new Set;return t.map((s,i)=>{const a=Ts(s),l=Ns[a],c=(n.get(l)??0)>1?vm(s):void 0;let u=c?`${l} (${c})`:l;return r.has(u)&&(u=`${u} #${i+1}`),r.add(u),{id:`${a}-${i}`,name:u,kind:a,scheme:s}})}function Vo({securities:e}){var u;const t=b.useMemo(()=>Sm(e),[e]),n=t.length>1,[r,s]=b.useState(n?null:((u=t[0])==null?void 0:u.id)??null);b.useEffect(()=>{if(t.length===0){s(null);return}if(t.length===1){s(t[0].id);return}s(d=>d&&t.some(f=>f.id===d)?d:null)},[t]);const i=t.find(d=>d.id===r),a=i==null?void 0:i.kind,l=i==null?void 0:i.scheme,c=l==null?void 0:l.description;return o.jsxs("div",{children:[n&&o.jsx(cn,{tabs:t,current:r,onChange:d=>s(f=>d&&f===d?null:d||null),placeholder:"Select an authorization method"}),o.jsxs("div",{className:"py-4 prose text-foreground-muted",children:[a==="userPassword"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide user and password"})," ","to connect to this server."]}),a&&["scramSha256","scramSha512","plain"].includes(a)&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide username and password"})," ","to connect to this server."]}),a==="gssapi"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"authenticate using Kerberos (GSSAPI)"})," ","to connect to this server."]}),a==="X509"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"download the certificate file"})," ","from the service provider to connect to this server."]}),a==="bearer"&&o.jsx(Em,{security:l}),a==="apiKey"&&o.jsx(jm,{security:l}),a==="openIdConnect"&&o.jsx(Am,{security:l}),a==="oauth2"&&o.jsx(Nm,{security:l})]})]})}const gr=({description:e,children:t})=>e?o.jsx(o.Fragment,{children:o.jsx(lt,{children:e})}):o.jsx("span",{children:t}),Em=({security:e})=>e!=null&&e.description?o.jsx(lt,{children:e.description}):o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide a bearer token"})," ","in the ",o.jsx("code",{children:"Authorization"})," header",e!=null&&e.bearerFormat?o.jsxs(o.Fragment,{children:[" (format: ",e.bearerFormat,")"]}):null," to connect to this server."]}),jm=({security:e})=>{if(e!=null&&e.description)return o.jsx(lt,{children:e.description});const t=e==null?void 0:e.in;return t==="header"||t==="query"||t==="cookie"?o.jsxs("span",{children:["You have to"," ",o.jsxs("strong",{className:"text-foreground-secondary",children:["provide your API key in the ",t," parameter",e!=null&&e.name?o.jsxs(o.Fragment,{children:[" named ",o.jsx("code",{children:e.name})]}):null]})," ","to connect to this server."]}):t==="password"?o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the password and leave the user name empty"})," ","to connect to this server."]}):o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the user name and leave the password empty"})," ","to connect to this server."]})},Am=({security:e})=>{var n,r;const t=(n=e.requiredScopes)!=null&&n.length?e.requiredScopes:e.scopes;return o.jsxs(o.Fragment,{children:[e!=null&&e.description?o.jsx(lt,{children:e.description}):o.jsx("p",{children:"You can use OpenID to connect to this server."}),o.jsxs("p",{children:["The OpenID Connect URL is"," ",o.jsx("a",{href:e.openIdConnectUrl,target:"_blank",rel:"noreferrer",children:e.openIdConnectUrl}),"."]}),t&&t.length>0&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 items-center @sm:gap-4",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:(r=e.requiredScopes)!=null&&r.length?"Required scopes":"Scopes"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("code",{children:Qu(t)})})]})]})},Nm=({security:e})=>{const t=e==null?void 0:e.flows;return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.description)&&o.jsx(lt,{children:e.description}),t&&Object.entries(t).map(([n,r])=>{var c,u;let s="",i="";switch(n){case"clientCredentials":s=Mu,i=Lu;break;case"implicit":s=Iu,i=Ru;break;case"password":s=Pu,i=Du;break;case"authorizationCode":s=Bu,i=Fu;break}const a=(c=e.requiredScopes)!=null&&c.length?e.requiredScopes:r.availableScopes??r.scopes,l=(u=e.requiredScopes)!=null&&u.length?"Required scopes":"Available scopes";return o.jsxs("div",{children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-lg leading-6 font-bold text-foreground",children:s}),o.jsx("p",{className:"mt-1 max-w-2xl text-sm text-foreground-muted",children:i})]}),o.jsx("div",{className:"mt-5 border-t border-border",children:o.jsxs("dl",{className:"@sm:divide-y @sm:divide-border",children:[r.authorizationUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Authorization URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.authorizationUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.authorizationUrl})})]}),r.tokenUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Token URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.tokenUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.tokenUrl})})]}),r.refreshUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Refresh URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.refreshUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.refreshUrl})})]}),a&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:l}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("div",{className:"flex flex-wrap gap-1.5",children:(Array.isArray(a)?a:Object.keys(a)).map(d=>o.jsx("code",{className:"text-xs bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:d},d))})})]})]})})]},n)})]})};function Tm(e){return e.startsWith("http://")||e.startsWith("https://")}function bc(e){return e.replace(/([A-Z])/g," $1").replace(/^(.)/,t=>t.toUpperCase()).trim()}function yc({value:e}){if(e==null)return null;if(typeof e=="string"&&Tm(e))return o.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 underline underline-offset-2 break-all hover:text-blue-800",children:e});if(typeof e=="boolean")return o.jsx("span",{className:`text-xs font-medium ${e?"text-green-600":"text-red-500"}`,children:e?"true":"false"});if(typeof e=="number")return o.jsx("span",{className:"text-xs font-mono text-blue-600",children:e});if(typeof e=="object"){const t=e;return"type"in t&&Array.isArray(t.enum)?o.jsx("div",{className:"flex flex-wrap gap-1",children:t.enum.map((n,r)=>o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:String(n)},r))}):typeof t.type=="string"&&typeof t.description=="string"&&Object.keys(t).length===2?o.jsx(lt,{className:"prose-sm",children:t.description}):o.jsx("div",{className:"mt-1 border-l-2 border-border pl-3 space-y-2",children:Object.entries(t).map(([n,r])=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-xs text-foreground-muted shrink-0 w-36",children:bc(n)}),o.jsx(yc,{value:r})]},n))})}return o.jsx("span",{className:"text-xs text-foreground-secondary",children:String(e)})}function wc({bindings:e,expand:t=!1,protocol:n,focused:r}){const s=Hu[n.toLowerCase()]??{label:n,color:"bg-neutral-100 text-foreground-secondary border-border"},i=Object.entries(e??{}).filter(([a,l])=>a!=="bindingVersion"&&l!==void 0&&l!==null);return i.length===0?null:o.jsx(Wn,{className:"mt-2",defaultExpanded:t,forceExpanded:r,trigger:o.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${s.color}`,children:s.label}),children:o.jsx("div",{className:"divide-y divide-neutral-100",children:i.length===0?o.jsx("p",{className:"px-4 py-3 text-xs text-foreground-muted italic",children:"No binding properties defined."}):i.map(([a,l])=>o.jsxs("div",{className:"flex items-center items-start gap-4 px-4 py-3",children:[o.jsx("span",{className:"text-xs font-medium text-foreground-muted w-40 shrink-0 pt-0.5",children:bc(a)}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(yc,{value:l})})]},a))})})}function _m({host:e,protocol:t,description:n,tags:r,variables:s,security:i,bindings:a,serverKey:l,focusSection:c=null}){const u=s,d=b.useId();return o.jsxs("div",{children:[o.jsx(gc,{address:e,variables:u,children:o.jsx("div",{className:"mt-2",children:r&&r.map((f,p)=>{const m=f,h=m.externalDocs;return o.jsx(zo,{href:h&&h.url,title:m.description||(h&&h.description?h.description:void 0),name:m.name},p)})})}),o.jsx(lt,{children:n}),i&&i.length>0&&o.jsxs("div",{id:l?`server-${l}-security`:void 0,children:[o.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[o.jsx(mc,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Authorization"]}),o.jsxs("p",{className:"prose text-foreground-muted mt-4",children:["This server accepts the following authorization mechanism",i.length>1?"s":"",":"]}),o.jsx(Wn,{className:"mt-4",ariaLabelledBy:d,forceExpanded:c==="security",trigger:o.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:i.length}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:i})})})]}),(()=>{const f=a==null?void 0:a[t];return f&&Object.keys(f).some(m=>m!=="bindingVersion")?o.jsxs("div",{id:l?`server-${l}-bindings`:void 0,children:[o.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[o.jsx(mo,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Connection Settings"]}),o.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following connection configuration:"}),o.jsx(wc,{bindings:f,protocol:t,focused:c===`binding:${t}`})]}):null})()]})}function kc({servers:e,selectedServer:t,onSelectServer:n,focusSection:r=null,layout:s}){const i=Object.keys(e),[a,l]=b.useState(void 0),c=[t,a].find(f=>!!f&&i.includes(f))??i[0],u=f=>{l(f),n==null||n(f)},d=o.jsx(_m,{...e[c],serverKey:c,focusSection:t||a?r:null});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:Ra,content:d,sideContent:o.jsx(hc,{serverNames:i,current:c,setCurrent:u}),stickySideContent:!0,reverseLayoutOnMobile:!0,layout:s})})}const vc=b.forwardRef(function({isOpen:t,side:n,onClose:r,title:s,headerActions:i,children:a,width:l="w-[50rem]"},c){b.useEffect(()=>{const C=E=>{E.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]);const u=n==="right"?"right-0":"left-0",d=n==="right"?"translateX(100%)":"translateX(-100%)",{portalHost:f,rootElement:p,sidePanelContainment:m,sidePanelTopOffset:h=0}=Ue(),x=m==="component";b.useEffect(()=>{if(!t||!f)return;const C=x?Yu(f,p):uo(f);if(C)return Ba(C)},[x,t,f,p]);const k=fo(p,x),j=(()=>{if(!x)return{position:"fixed",inset:0};if(!k)return{position:"fixed",inset:0};const C=Math.max(h,k.top),E=Math.max(0,k.left),R=Math.min(window.innerHeight,k.bottom),D=Math.min(window.innerWidth,k.right);return{position:"fixed",top:C,left:E,width:Math.max(0,D-E),height:Math.max(0,R-C)}})();return f?Pr.createPortal(o.jsxs("div",{className:"z-50 overflow-hidden",style:{...j,pointerEvents:t?"auto":"none"},children:[o.jsx("div",{onClick:r,className:`absolute inset-0 bg-black/30 transition-opacity duration-300 ${t?"opacity-100":"opacity-0"}`,style:{pointerEvents:t?"auto":"none"}}),o.jsxs("div",{ref:c,className:`absolute top-0 ${u} h-full ${l} max-w-[100cqw] bg-background ${t?"shadow-xl":""} flex flex-col transition-transform duration-300 ease-in-out`,style:{transform:t?"translateX(0)":d},children:[s&&o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[o.jsx("div",{className:"text-sm font-semibold text-foreground min-w-0 flex-1 overflow-hidden",children:typeof s=="string"?o.jsx("span",{className:"truncate block",children:s}):s}),i,o.jsx("button",{onClick:r,className:"ml-4 p-1 rounded hover:bg-neutral-100 text-foreground-muted hover:text-foreground-secondary transition-colors","aria-label":"Close panel",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M2 2l12 12M14 2L2 14"})})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:a})]})]}),f):null});function Sc({message:e,messageId:t,i:n}){const[r,s]=b.useState(!1);return o.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-3",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:e.title??e.name??`Message ${n+1}`}),(t??e.name)&&o.jsx("span",{className:"text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 p-0.5 rounded shrink-0",children:t??e.name})]}),e.summary&&o.jsx("p",{className:"text-xs text-foreground-muted mt-1.5 leading-relaxed",children:e.summary}),o.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 mt-4",children:[e.contentType&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:e.contentType}),e.correlationId&&o.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:e.correlationId.description??e.correlationId.location,children:e.correlationId.location}),e.deprecated&&o.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"})]})]}),o.jsx(fc,{message:e,expanded:r,onToggleExpanded:()=>s(i=>!i)})]})}function Cm({requestMessages:e,reply:t,isSend:n,operationId:r}){const[s,i]=b.useState("request"),a=t.messages??[],l=t.channel,c=t.address,u=s==="request"?e:a,d=s==="request"?n?"accepts":"expects":o.jsxs(o.Fragment,{children:["replies to"," ",c?o.jsxs(o.Fragment,{children:["a channel in"," ",o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:c.location})]}):(l==null?void 0:l.address)&&o.jsx(Ct,{address:l.address,parameters:l.parameters,className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary"})]});return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-end gap-0.5 -ml-2",children:["request","reply"].map(f=>o.jsx("button",{onClick:()=>i(f),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize
133
+ `).map((E,R)=>o.jsx("p",{className:`text-xs text-foreground-muted mt-1 ${k} leading-relaxed`,children:E},R)),u&&o.jsx(hm,{depth:n,expanded:d,onToggle:f})]})}function As({label:e,children:t}){return o.jsxs("div",{children:[o.jsx("div",{className:"pt-2 pb-0.5 first:pt-0",children:o.jsx("span",{className:"text-xs font-medium text-foreground-secondary",children:e})}),o.jsx("div",{children:t})]})}function gm({ifContent:e,thenContent:t,elseContent:n}){return o.jsxs("div",{className:"py-2 pt-5 px-1",children:[o.jsx("div",{className:"flex flex-col items-start",children:o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border-2 border-dashed border-border rounded-md bg-surface",children:"Conditions apply:"})}),o.jsx(Ft,{depth:0,lineVariant:"muted",children:o.jsxs("div",{className:"divide-y divide-border",children:[o.jsx(As,{label:"If schema matches:",children:e}),t!=null&&o.jsx(As,{label:"Then schema should follow:",children:t}),n!=null&&o.jsx(As,{label:"Else schema should follow:",children:n})]})})]})}function hr({label:e,children:t}){return o.jsxs("div",{className:"py-2",children:[o.jsxs("div",{className:"flex flex-col items-start",children:[o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs font-medium text-foreground-secondary border border-border rounded-md bg-surface",children:e}),o.jsx("div",{className:"w-px h-3 bg-border ml-[1.125rem]","aria-hidden":"true"})]}),t]})}const xm=e=>e==="none"?"depth":e;function ot({schema:e,path:t,depth:n,required:r,refStack:s,deref:i,suppressRow:a=!1,branchLineVariant:l="depth",defaultExpanded:c=!1,ancestors:u=Xh,focusTokens:d=null,focusId:f=null}){var Y;const p=xm(l),m=d!=null,x=m&&d.length===0?f??void 0:void 0,[k,j]=b.useState(c||m),[C,E]=b.useState(c);C!==c&&(E(c),j(c||m)),b.useEffect(()=>{m&&j(!0)},[m]);const[R,D]=b.useState(0),_=(Y=d==null?void 0:d[0])==null?void 0:Y.match(/^(?:oneOf|anyOf)\[(\d+)\]$/),A=_?Number(_[1]):-1;b.useEffect(()=>{A>=0&&D(A)},[A]);const v=So(),{schema:y,refLabel:F,circular:Z}=b.useMemo(()=>{if(u.objects.has(e)||typeof e.$ref=="string"&&u.refs.has(e.$ref))return{schema:e,refLabel:Qs(e),circular:!0};const O=bt(e,i,s);return O.circular?O:{...O,schema:Fe(O.schema,i,s)}},[e,i,s,u,v]),N=b.useMemo(()=>({objects:new Set(u.objects).add(e),refs:typeof e.$ref=="string"?new Set(u.refs).add(e.$ref):u.refs}),[u,e]),W=nc(em(y)),ie=!sc(W)&&(Ke(y)||Xe(y)||Ze(y)),oe=()=>{const O=tc(y);if(O===null)return null;if(typeof O=="boolean")return o.jsx(js,{children:o.jsx(dm,{value:O})});const q=bt(O,i,s);if(q.circular)return o.jsx(js,{children:o.jsx(Ge,{path:t,depth:n+1,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1})});const le=Fe(q.schema,i,s),G=it(le);return o.jsx(js,{children:G?o.jsx(pr,{schema:le,showBorder:!1}):o.jsx(ot,{schema:O,path:t,depth:n+1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:p,defaultExpanded:c})})},S=(O,q)=>{if(typeof O=="boolean")return o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",children:O?"any value":"false schema"});const le=bt(O,i,s);if(le.circular)return o.jsx(Ge,{path:q,depth:n+1,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const G=Fe(le.schema,i,s);return it(G)?o.jsx(pr,{schema:G,showBorder:!1}):o.jsx(ot,{schema:O,path:q,depth:n+1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:"none",defaultExpanded:c})},T=O=>{const q=Es(O.if);if(q===null)return null;const le=Es(O.then),G=Es(O.else);return o.jsx(gm,{ifContent:S(q,t),thenContent:le!==null?S(le,t):void 0,elseContent:G!==null?S(G,t):void 0})},H=()=>{const O=rc(y);return O.length===0?null:o.jsx(o.Fragment,{children:O.map((q,le)=>o.jsx("div",{children:T(q)},le))})};if(Z)return o.jsx(Ge,{id:x,path:t,depth:n,typeLabelOverride:`↩ ${e.$ref??F??"circular"}`,expandable:!1,expanded:!1,onToggle:()=>{}});if(ie){const O=o.jsxs(o.Fragment,{children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?O:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(q=>!q)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:O})]})}const V=Fn(W),ae=zn(W),ee=V??ae,Te=V?"oneOf":"anyOf";if(ee){const O=ee.map((Le,X)=>typeof Le.title=="string"?Le.title:`case ${X+1}`),q=a?1:n+1,le=ee[R],G=bt(le,i,s),pe=G.circular?G.schema:Fe(G.schema,i,s),we=!G.circular&&it(pe),fe=d&&A===R?d.slice(1):null,Me=we?o.jsx(pr,{schema:pe,showBorder:!1}):o.jsx(ot,{schema:le,path:t,depth:q-1,refStack:s,deref:i,ancestors:N,suppressRow:!0,branchLineVariant:"none",defaultExpanded:c,focusTokens:fe,focusId:f},R),xe=o.jsx(fm,{variant:Te,caseCount:ee.length,caseLabels:O,selectedCase:R,onSelectCase:D,children:Me}),He=o.jsxs(o.Fragment,{children:[xe,Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?He:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(Le=>!Le)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:He})]})}const Q=(O,q,le)=>{const G=bt(O,i,s);if(G.circular)return o.jsx(Ge,{path:q,depth:le,typeLabelOverride:`↩ ${O.$ref}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1});const pe=Fe(G.schema,i,s);return it(pe)?o.jsx(pr,{schema:pe,showBorder:!1}):o.jsx(ot,{schema:O,path:q,depth:le,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c})},ve=O=>{const q=W.properties??{},le=new Set(W.required??[]),G=Un(W),pe=dn(W),we=Go(W);return o.jsxs(o.Fragment,{children:[Object.entries(q).map(([fe,Me])=>{if(!se(Me))return null;const xe=d&&d[0]==="properties"&&d[1]===fe?d.slice(2):null;return o.jsx(ot,{schema:Me,path:`${t}.${fe}`,depth:O,required:le.has(fe),refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c,focusTokens:xe,focusId:f},fe)}),G!==null&&se(G)&&o.jsx(hr,{label:"Property names must adhere to:",children:Q(G,`${t}.[propertyName]`,O)}),we.map(([fe,Me])=>o.jsx(ot,{schema:Me,path:tm(t,fe),depth:O,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c},fe)),pe!==null&&se(pe)&&o.jsx(hr,{label:"Additional properties must adhere to:",children:Q(pe,`${t}.[additionalProperty]`,O)}),Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]})};if(Hn(W)||Kr(W))return a?ve(n+1):o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(O=>!O)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:ve(n+1)})]});if(W.type==="array"||W.items){const O=ql(W),q=O!==null,le=q?Zh(W):null,G=Qh(W),pe=G!==null,we=q?null:Ht(W),fe=we!==null,Me=q||fe||pe||Ke(y)||Xe(y)||Ze(y),xe=`${t}[]`,He=a?t:xe,Le=fe?bt(we,i,s):null,X=(Le==null?void 0:Le.schema)??null,Se=X?Fe(X,i,s):null,_e=X!==null&&(N.objects.has(X)||typeof(we==null?void 0:we.$ref)=="string"&&N.refs.has(we.$ref)),me=X!==null?{objects:new Set(N.objects).add(X),refs:typeof(we==null?void 0:we.$ref)=="string"?new Set(N.refs).add(we.$ref):N.refs}:N,mt=!q&&!pe&&Se!==null&&it(Se),et=Se!=null&&Se.properties?Object.entries(Se.properties).filter(([,U])=>se(U)):[],Mt=new Set(Se&&Array.isArray(Se.required)?Se.required:[]),tt=!q&&d&&d[0]==="items"?d.slice(1):null,B=U=>o.jsxs(o.Fragment,{children:[q?o.jsxs(o.Fragment,{children:[O.map((te,ue)=>o.jsx(ot,{schema:te,path:`${t}[${ue}]`,depth:U,refStack:s,deref:i,ancestors:N,branchLineVariant:p,defaultExpanded:c},ue)),le!==null&&typeof le!="boolean"&&o.jsx(hr,{label:"Additional items:",children:Q(le,`${t}[*]`,U)}),le===!1&&o.jsx("div",{className:"py-1 pl-6 text-xs text-foreground-muted",children:"no additional items allowed"})]}):fe&&(_e?o.jsx(Ge,{path:He,depth:U,typeLabelOverride:`↩ ${we.$ref??Qs(X)??"circular"}`,expandable:!1,expanded:!1,onToggle:()=>{},showBorder:!1}):et.length>0?et.map(([te,ue])=>{const Ce=tt&&tt[0]==="properties"&&tt[1]===te?tt.slice(2):null;return o.jsx(ot,{schema:ue,path:`${He}.${te}`,depth:U,required:Mt.has(te),refStack:s,deref:i,ancestors:me,branchLineVariant:p,defaultExpanded:c,focusTokens:Ce,focusId:f},te)}):o.jsx(ot,{schema:we,path:He,depth:U,refStack:s,deref:i,ancestors:me,branchLineVariant:p,defaultExpanded:c,focusTokens:tt,focusId:f})),pe&&o.jsx(hr,{label:"Contains at least one:",children:typeof G=="boolean"?o.jsx("span",{className:"inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary",children:G?"any item":"impossible constraint"}):Q(G,`${t}[contains]`,U)}),Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return mt&&!Ke(y)&&!Xe(y)&&!Ze(y)?o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:Rr(y.description,Se.description),expandable:!1,expanded:!1,onToggle:()=>{}}):mt?o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:Rr(y.description,Se.description),expandable:!0,expanded:k,onToggle:()=>j(U=>!U)}),k&&o.jsxs(Ft,{depth:n,lineVariant:l,children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]})]}):a?Me?B(n+1):null:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:xe,depth:n,schema:y,itemSchema:Se,refLabel:F,required:r,description:y.description,expandable:q||fe||pe||Ke(y)||Xe(y)||Ze(y),expanded:k,onToggle:()=>j(U=>!U)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:B(n+1)})]})}if(Ke(y)||Xe(y)||Ze(y)){const O=o.jsxs(o.Fragment,{children:[Ke(y)&&oe(),Xe(y)&&T(y),Ze(y)&&H()]});return a?O:o.jsxs(o.Fragment,{children:[o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!0,expanded:k,onToggle:()=>j(q=>!q)}),k&&o.jsx(Ft,{depth:n,lineVariant:l,children:O})]})}return a?null:o.jsx(Ge,{id:x,path:t,depth:n,schema:y,refLabel:F,required:r,description:y.description,expandable:!1,expanded:!1,onToggle:()=>{}})}function Ko({schema:e,rootName:t,className:n="",focusTokens:r=null,focusId:s=null}){const{deref:i,defaultSchemaExpanded:a=!1}=Ue(),l=b.useMemo(()=>new Set,[]),c=xt(e),u=b.useMemo(()=>c?Fe(c,i,l):null,[c,i,l]);if(!c||!u)return o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No schema details available."});const d=t??(c.$ref?Wo(c.$ref):void 0)??"schema",f=!!t;if(!rm(u,i)&&!c.$ref){if(f)return u.type==="array"||u.items?o.jsx("div",{className:n,children:o.jsx(ot,{schema:c,path:d,depth:0,refStack:l,deref:i,defaultExpanded:a,focusTokens:r,focusId:s})}):null;const m=u.type==="array"||u.items?`${d}[]`:d,h=Ht(u),x=h?Fe(h,i,l):null,k=x!==null&&it(x);return o.jsx("div",{className:n,children:o.jsx(Ge,{path:m,depth:0,schema:u,itemSchema:k?x:void 0,description:u.type==="array"||u.items?Rr(u.description,h==null?void 0:h.description):u.description,expandable:!1,expanded:!1,onToggle:()=>{}})})}return o.jsx("div",{className:n,children:o.jsx(ot,{schema:c,path:d,depth:f?-1:0,refStack:l,deref:i,suppressRow:f,defaultExpanded:a,focusTokens:r,focusId:s})})}const bm=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function mr(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function nn(e,t=()=>{},n=new Set,r=new Set){if(typeof e.$ref=="string"){const s=e.$ref,i=t(s);return bm(i)?r.has(s)?mr(i,"null")?{type:"null"}:{}:nn(i,t,new Set,new Set(r).add(s)):{}}if(n.has(e))return mr(e,"null")?{type:"null"}:{};if(Array.isArray(e.oneOf)&&e.oneOf.length>0){const{oneOf:s,...i}=e;return nn({...i,...s[0]},t,n,r)}if(Array.isArray(e.anyOf)&&e.anyOf.length>0){const{anyOf:s,...i}=e;return nn({...i,...s[0]},t,n,r)}if(mr(e,"object")&&e.properties&&typeof e.properties=="object"){n.add(e);try{const s={};for(const[i,a]of Object.entries(e.properties)){const l=/id$/i.test(i)&&a.type==="string"&&!a.format&&!a.examples,c=a.type==="string"&&!a.format&&!a.examples&&!a.enum;s[i]=l?{...a,format:"uuid"}:c?{...a,examples:["string"]}:nn(a,t,n,r)}return{...e,properties:s}}finally{n.delete(e)}}if(mr(e,"array")&&e.items&&typeof e.items=="object"){n.add(e);try{return{...e,items:nn(e.items,t,n,r)}}finally{n.delete(e)}}return e}function ym({schema:e,providedExample:t}){const n=t!==void 0,[r,s]=b.useState(n?t:null),{deref:i}=Ue();if(b.useEffect(()=>{if(n){s(t);return}let l=!1;return Promise.resolve().then(()=>require("./index-d8kJa7YD.cjs")).then(({generate:c})=>c(nn(e,i),{seed:42,useExamplesValue:!0,optionalsProbability:1})).then(c=>{l||s(c)}).catch(()=>{}),()=>{l=!0}},[e,i,n,t]),r===null)return null;const a=JSON.stringify(r,null,2);return o.jsxs("div",{children:[o.jsx(Gr,{code:a}),!n&&o.jsx("span",{className:"text-xs text-foreground-muted italic mt-2 font-bold inline-block",children:"This example is auto generated"})]})}function Wt({schema:e,label:t,rootName:n,description:r,schemaFormat:s,originalSchema:i,conversionError:a,pendingConversion:l,example:c,defaultView:u="example"}){const d=ul(s),f=!l&&_f(s,a),[p,m]=b.useState(f&&u==="example"?"example":"schema");return b.useEffect(()=>{!f&&p==="example"&&m("schema")},[f,p]),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider",children:t}),d&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",title:s,children:d})]}),r&&o.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed mt-2 mb-2",children:r})]}),o.jsx(dc,{tabs:[...f?[{id:"example",label:"Example"}]:[],{id:"schema",label:"Schema"},{id:"json",label:"JSON"}],selected:p,onChange:h=>m(h),ariaLabel:"Schema view toggle"})]}),a&&o.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5 mb-2",children:["Could not convert ",dl(s)??"the"," schema, showing raw definition. ",a]}),l?o.jsx("p",{className:"text-xs text-foreground-muted",children:"Loading Protobuf definition…"}):o.jsxs(o.Fragment,{children:[p==="schema"&&o.jsx(Ko,{schema:e,rootName:n??(typeof t=="string"?t:void 0)}),p==="json"&&o.jsx(Ql,{schema:i??e}),p==="example"&&f&&o.jsx(ym,{schema:e,providedExample:c})]})]})}function fc({message:e,expanded:t,onToggleExpanded:n,paddingX:r="px-4",focusSection:s=null}){var m;const[i,a]=b.useState("payload");b.useEffect(()=>{(s==="headers"||s==="payload")&&a(s)},[s]);const{deref:l}=Ue(),c=So(),u=b.useMemo(()=>e.payload?On(e.payload,l):null,[e.payload,l,c]),d=b.useMemo(()=>e.headers?On(e.headers,l):null,[e.headers,l,c]),f=(m=e.examples)==null?void 0:m[0],p=e.description||e.payload||e.headers||e.deprecated||e.tags&&e.tags.length>0;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:o.jsx("div",{className:"overflow-hidden",children:o.jsxs("div",{className:`${r} pb-4 space-y-4 border-t border-border pt-3`,children:[e.description&&o.jsx("p",{className:"text-sm text-foreground-secondary leading-relaxed",children:e.description}),(e.payload||e.headers)&&o.jsxs("div",{children:[e.payload&&e.headers&&o.jsx(un,{tabs:[{id:"payload",name:"Payload"},{id:"headers",name:"Headers"}],current:i,onChange:h=>a(h)}),o.jsxs("div",{className:"mt-4",children:[(i==="payload"||!e.headers)&&u&&o.jsx(Wt,{schema:u.schema,label:"Payload",description:u.description,schemaFormat:u.schemaFormat,originalSchema:u.originalSchema,conversionError:u.conversionError,pendingConversion:u.pendingConversion,example:f==null?void 0:f.payload}),(i==="headers"||!e.payload)&&d&&o.jsx(Wt,{schema:d.schema,label:"Headers",description:d.description,schemaFormat:d.schemaFormat,originalSchema:d.originalSchema,conversionError:d.conversionError,pendingConversion:d.pendingConversion,example:f==null?void 0:f.headers})]})]}),e.tags&&e.tags.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map((h,x)=>o.jsx(zo,{name:`#${h.name}`},x))})]})})}),p&&o.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-1.5 py-2 border-t border-border bg-neutral-50 hover:bg-neutral-100 transition-colors text-xs text-foreground-muted hover:text-foreground-secondary",children:[o.jsx("span",{children:t?"Show less":"Show more"}),o.jsx(cn,{className:`w-3 h-3 transition-transform duration-200 ${t?"rotate-180":""}`})]})]})}function wm({messageKey:e,message:t,first:n,isSelected:r,focusSection:s}){const[i,a]=b.useState(!1);return b.useEffect(()=>{r&&a(!0)},[r]),o.jsxs("tbody",{id:`message-${e}`,className:`${n?"":"border-t border-border"} ${r?"bg-primary-50/60 outline outline-1 outline-primary-300":""}`,children:[o.jsxs("tr",{className:"",children:[o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex flex-col gap-1.5",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.title??t.name??e}),o.jsx("span",{className:"w-fit text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 px-1.5 py-0.5 rounded",children:e})]})}),o.jsx("td",{className:"px-6 py-4 text-sm text-foreground-muted",children:t.summary??"—"}),o.jsx("td",{className:"px-6 py-4",children:o.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[o.jsxs("div",{className:"flex justify-between w-full",children:[o.jsx("div",{}),o.jsx("div",{children:t.contentType&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:t.contentType??"—"})})]}),t.deprecated&&o.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"}),o.jsxs("div",{className:"flex justify-between w-full",children:[o.jsx("div",{}),o.jsx("div",{children:t.correlationId&&o.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:t.correlationId.description??t.correlationId.location,children:t.correlationId.location})})]})]})})]}),o.jsx("tr",{children:o.jsx("td",{colSpan:3,className:"p-0",children:o.jsx(fc,{message:t,expanded:i,onToggleExpanded:()=>a(l=>!l),paddingX:"px-6",focusSection:r?s:null})})})]})}function pc({messages:e,selectedKey:t,focusSection:n,layout:r}){const s=Object.entries(e),i=s.length?o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Message"}),o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Summary"}),o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Details"})]})}),s.map(([a,l],c)=>o.jsx(wm,{messageKey:a,message:l,first:c===0,isSelected:t===a,focusSection:n},a))]})})}):o.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No messages defined in this AsyncAPI document."});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:i,stickySideContent:!1,layout:r})})}function hc({serverNames:e=[],current:t,setCurrent:n}){return o.jsx("nav",{className:"space-y-1 w-max mt-10 @lg:mt-0","aria-label":"Sidebar",children:e.map(r=>o.jsx("button",{type:"button",onClick:()=>n(r),"aria-current":t===r?"page":void 0,className:en(t===r?"border-l-4 border-neutral-300 text-foreground":"text-foreground-secondary hover:text-foreground","flex items-center px-3 py-2 text-sm font-medium cursor-pointer w-full text-left"),children:o.jsx("span",{className:"truncate",children:r})},r))})}function mc(e){return o.jsx(po,{...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})}function km(e){return o.jsx(po,{...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}function gc({address:e,variables:t,children:n}){return o.jsxs("div",{className:"font-bold text-foreground-secondary mt-8 mb-4 bg-neutral-200 border border-neutral-500 p-4 rounded-lg",children:[o.jsxs("div",{className:"border border-dotted border-black p-2 rounded-lg bg-surface",children:[o.jsx(km,{className:"inline-block mr-1 -mt-1 h-6 text-foreground-muted"}),e&&o.jsx(Ct,{address:e,parameters:t,className:"font-bold leading-tight tracking-tight px-0"})]}),n]})}function xc({className:e}){return o.jsx("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"currentColor",children:o.jsx("path",{d:"M202.1,450a15,15,0,0,1-10.6-25.61L365.79,250.1,191.5,75.81A15,15,0,0,1,212.71,54.6l184.9,184.9a15,15,0,0,1,0,21.21l-184.9,184.9A15,15,0,0,1,202.1,450Z"})})}function Wn({trigger:e,children:t,defaultExpanded:n=!1,forceExpanded:r=!1,ariaLabelledBy:s,className:i=""}){const[a,l]=b.useState(n),c=b.useId();return b.useEffect(()=>{r&&l(!0)},[r]),o.jsxs("div",{className:`rounded-lg border border-border overflow-hidden ${i}`,children:[o.jsxs("button",{type:"button","aria-expanded":a,"aria-controls":c,"aria-labelledby":s,onClick:()=>l(u=>!u),className:"flex w-full items-center justify-between px-4 py-3 bg-neutral-50 text-left hover:bg-neutral-100 transition-colors",children:[e,a?o.jsx(cn,{className:"w-4 h-4 text-foreground-muted shrink-0"}):o.jsx(xc,{className:"w-4 h-4 text-foreground-muted shrink-0"})]}),o.jsx("div",{id:c,className:`grid transition-all duration-200 ease-in-out ${a?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:o.jsx("div",{className:"overflow-hidden",children:t})})]})}const Ns={userPassword:"User/Password",oauth2:"OAuth2",apiKey:"API key",bearer:"Bearer Token",openIdConnect:"OpenID",X509:"X.509 certificate",scramSha256:"SASL",scramSha512:"SASL",plain:"SASL",gssapi:"SASL"};function Ts(e){var n,r;const t=(n=e.type)==null?void 0:n.toLowerCase();if(t==="httpapikey")return"apiKey";if(t==="http"){const s=(r=e.scheme)==null?void 0:r.toLowerCase();return s==="basic"?"userPassword":s!=null&&s.includes("mutual")||s!=null&&s.includes("tls")?"X509":"bearer"}return e.type}function vm(e){return e.name||e.scheme||e.bearerFormat||e.type||void 0}function Sm(e){const t=(e??[]).filter(s=>Ns[Ts(s)]),n=new Map;for(const s of t){const i=Ns[Ts(s)];n.set(i,(n.get(i)??0)+1)}const r=new Set;return t.map((s,i)=>{const a=Ts(s),l=Ns[a],c=(n.get(l)??0)>1?vm(s):void 0;let u=c?`${l} (${c})`:l;return r.has(u)&&(u=`${u} #${i+1}`),r.add(u),{id:`${a}-${i}`,name:u,kind:a,scheme:s}})}function Vo({securities:e}){var u;const t=b.useMemo(()=>Sm(e),[e]),n=t.length>1,[r,s]=b.useState(n?null:((u=t[0])==null?void 0:u.id)??null);b.useEffect(()=>{if(t.length===0){s(null);return}if(t.length===1){s(t[0].id);return}s(d=>d&&t.some(f=>f.id===d)?d:null)},[t]);const i=t.find(d=>d.id===r),a=i==null?void 0:i.kind,l=i==null?void 0:i.scheme,c=l==null?void 0:l.description;return o.jsxs("div",{children:[n&&o.jsx(un,{tabs:t,current:r,onChange:d=>s(f=>d&&f===d?null:d||null),placeholder:"Select an authorization method"}),o.jsxs("div",{className:"py-4 prose text-foreground-muted",children:[a==="userPassword"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide user and password"})," ","to connect to this server."]}),a&&["scramSha256","scramSha512","plain"].includes(a)&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide username and password"})," ","to connect to this server."]}),a==="gssapi"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"authenticate using Kerberos (GSSAPI)"})," ","to connect to this server."]}),a==="X509"&&o.jsxs(gr,{description:c,children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"download the certificate file"})," ","from the service provider to connect to this server."]}),a==="bearer"&&o.jsx(Em,{security:l}),a==="apiKey"&&o.jsx(jm,{security:l}),a==="openIdConnect"&&o.jsx(Am,{security:l}),a==="oauth2"&&o.jsx(Nm,{security:l})]})]})}const gr=({description:e,children:t})=>e?o.jsx(o.Fragment,{children:o.jsx(lt,{children:e})}):o.jsx("span",{children:t}),Em=({security:e})=>e!=null&&e.description?o.jsx(lt,{children:e.description}):o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide a bearer token"})," ","in the ",o.jsx("code",{children:"Authorization"})," header",e!=null&&e.bearerFormat?o.jsxs(o.Fragment,{children:[" (format: ",e.bearerFormat,")"]}):null," to connect to this server."]}),jm=({security:e})=>{if(e!=null&&e.description)return o.jsx(lt,{children:e.description});const t=e==null?void 0:e.in;return t==="header"||t==="query"||t==="cookie"?o.jsxs("span",{children:["You have to"," ",o.jsxs("strong",{className:"text-foreground-secondary",children:["provide your API key in the ",t," parameter",e!=null&&e.name?o.jsxs(o.Fragment,{children:[" named ",o.jsx("code",{children:e.name})]}):null]})," ","to connect to this server."]}):t==="password"?o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the password and leave the user name empty"})," ","to connect to this server."]}):o.jsxs("span",{children:["You have to"," ",o.jsx("strong",{className:"text-foreground-secondary",children:"provide your API key as the user name and leave the password empty"})," ","to connect to this server."]})},Am=({security:e})=>{var n,r;const t=(n=e.requiredScopes)!=null&&n.length?e.requiredScopes:e.scopes;return o.jsxs(o.Fragment,{children:[e!=null&&e.description?o.jsx(lt,{children:e.description}):o.jsx("p",{children:"You can use OpenID to connect to this server."}),o.jsxs("p",{children:["The OpenID Connect URL is"," ",o.jsx("a",{href:e.openIdConnectUrl,target:"_blank",rel:"noreferrer",children:e.openIdConnectUrl}),"."]}),t&&t.length>0&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 items-center @sm:gap-4",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:(r=e.requiredScopes)!=null&&r.length?"Required scopes":"Scopes"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("code",{children:Qu(t)})})]})]})},Nm=({security:e})=>{const t=e==null?void 0:e.flows;return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.description)&&o.jsx(lt,{children:e.description}),t&&Object.entries(t).map(([n,r])=>{var c,u;let s="",i="";switch(n){case"clientCredentials":s=Mu,i=Lu;break;case"implicit":s=Iu,i=Ru;break;case"password":s=Pu,i=Du;break;case"authorizationCode":s=Bu,i=Fu;break}const a=(c=e.requiredScopes)!=null&&c.length?e.requiredScopes:r.availableScopes??r.scopes,l=(u=e.requiredScopes)!=null&&u.length?"Required scopes":"Available scopes";return o.jsxs("div",{children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-lg leading-6 font-bold text-foreground",children:s}),o.jsx("p",{className:"mt-1 max-w-2xl text-sm text-foreground-muted",children:i})]}),o.jsx("div",{className:"mt-5 border-t border-border",children:o.jsxs("dl",{className:"@sm:divide-y @sm:divide-border",children:[r.authorizationUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Authorization URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.authorizationUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.authorizationUrl})})]}),r.tokenUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Token URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.tokenUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.tokenUrl})})]}),r.refreshUrl&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:"Refresh URL"}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("a",{href:r.refreshUrl,target:"_blank",rel:"noreferrer",className:"text-foreground",children:r.refreshUrl})})]}),a&&o.jsxs("div",{className:"py-4 @sm:py-5 @sm:grid @sm:grid-cols-3 @sm:gap-4 items-center",children:[o.jsx("dt",{className:"text-sm font-medium text-foreground-muted",children:l}),o.jsx("dd",{className:"mt-1 text-sm text-foreground @sm:mt-0 @sm:col-span-2",children:o.jsx("div",{className:"flex flex-wrap gap-1.5",children:(Array.isArray(a)?a:Object.keys(a)).map(d=>o.jsx("code",{className:"text-xs bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:d},d))})})]})]})})]},n)})]})};function Tm(e){return e.startsWith("http://")||e.startsWith("https://")}function bc(e){return e.replace(/([A-Z])/g," $1").replace(/^(.)/,t=>t.toUpperCase()).trim()}function yc({value:e}){if(e==null)return null;if(typeof e=="string"&&Tm(e))return o.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 underline underline-offset-2 break-all hover:text-blue-800",children:e});if(typeof e=="boolean")return o.jsx("span",{className:`text-xs font-medium ${e?"text-green-600":"text-red-500"}`,children:e?"true":"false"});if(typeof e=="number")return o.jsx("span",{className:"text-xs font-mono text-blue-600",children:e});if(typeof e=="object"){const t=e;return"type"in t&&Array.isArray(t.enum)?o.jsx("div",{className:"flex flex-wrap gap-1",children:t.enum.map((n,r)=>o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-secondary px-1.5 py-0.5 rounded",children:String(n)},r))}):typeof t.type=="string"&&typeof t.description=="string"&&Object.keys(t).length===2?o.jsx(lt,{className:"prose-sm",children:t.description}):o.jsx("div",{className:"mt-1 border-l-2 border-border pl-3 space-y-2",children:Object.entries(t).map(([n,r])=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-xs text-foreground-muted shrink-0 w-36",children:bc(n)}),o.jsx(yc,{value:r})]},n))})}return o.jsx("span",{className:"text-xs text-foreground-secondary",children:String(e)})}function wc({bindings:e,expand:t=!1,protocol:n,focused:r}){const s=Hu[n.toLowerCase()]??{label:n,color:"bg-neutral-100 text-foreground-secondary border-border"},i=Object.entries(e??{}).filter(([a,l])=>a!=="bindingVersion"&&l!==void 0&&l!==null);return i.length===0?null:o.jsx(Wn,{className:"mt-2",defaultExpanded:t,forceExpanded:r,trigger:o.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${s.color}`,children:s.label}),children:o.jsx("div",{className:"divide-y divide-neutral-100",children:i.length===0?o.jsx("p",{className:"px-4 py-3 text-xs text-foreground-muted italic",children:"No binding properties defined."}):i.map(([a,l])=>o.jsxs("div",{className:"flex items-center items-start gap-4 px-4 py-3",children:[o.jsx("span",{className:"text-xs font-medium text-foreground-muted w-40 shrink-0 pt-0.5",children:bc(a)}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(yc,{value:l})})]},a))})})}function _m({host:e,protocol:t,description:n,tags:r,variables:s,security:i,bindings:a,serverKey:l,focusSection:c=null}){const u=s,d=b.useId();return o.jsxs("div",{children:[o.jsx(gc,{address:e,variables:u,children:o.jsx("div",{className:"mt-2",children:r&&r.map((f,p)=>{const m=f,h=m.externalDocs;return o.jsx(zo,{href:h&&h.url,title:m.description||(h&&h.description?h.description:void 0),name:m.name},p)})})}),o.jsx(lt,{children:n}),i&&i.length>0&&o.jsxs("div",{id:l?`server-${l}-security`:void 0,children:[o.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[o.jsx(mc,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Authorization"]}),o.jsxs("p",{className:"prose text-foreground-muted mt-4",children:["This server accepts the following authorization mechanism",i.length>1?"s":"",":"]}),o.jsx(Wn,{className:"mt-4",ariaLabelledBy:d,forceExpanded:c==="security",trigger:o.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:i.length}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:i})})})]}),(()=>{const f=a==null?void 0:a[t];return f&&Object.keys(f).some(m=>m!=="bindingVersion")?o.jsxs("div",{id:l?`server-${l}-bindings`:void 0,children:[o.jsxs("h3",{className:"font-bold text-foreground-secondary mt-8",children:[o.jsx(mo,{className:"inline-block mr-2 -mt-1 h-6 text-foreground-muted"}),"Connection Settings"]}),o.jsx("p",{className:"prose text-foreground-muted mt-4",children:"This server accepts the following connection configuration:"}),o.jsx(wc,{bindings:f,protocol:t,focused:c===`binding:${t}`})]}):null})()]})}function kc({servers:e,selectedServer:t,onSelectServer:n,focusSection:r=null,layout:s}){const i=Object.keys(e),[a,l]=b.useState(void 0),c=[t,a].find(f=>!!f&&i.includes(f))??i[0],u=f=>{l(f),n==null||n(f)},d=o.jsx(_m,{...e[c],serverKey:c,focusSection:t||a?r:null});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:Ra,content:d,sideContent:o.jsx(hc,{serverNames:i,current:c,setCurrent:u}),stickySideContent:!0,reverseLayoutOnMobile:!0,layout:s})})}const vc=b.forwardRef(function({isOpen:t,side:n,onClose:r,title:s,headerActions:i,children:a,width:l="w-[50rem]"},c){b.useEffect(()=>{const C=E=>{E.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]);const u=n==="right"?"right-0":"left-0",d=n==="right"?"translateX(100%)":"translateX(-100%)",{portalHost:f,rootElement:p,sidePanelContainment:m,sidePanelTopOffset:h=0}=Ue(),x=m==="component";b.useEffect(()=>{if(!t||!f)return;const C=x?Yu(f,p):uo(f);if(C)return Ba(C)},[x,t,f,p]);const k=fo(p,x),j=(()=>{if(!x)return{position:"fixed",inset:0};if(!k)return{position:"fixed",inset:0};const C=Math.max(h,k.top),E=Math.max(0,k.left),R=Math.min(window.innerHeight,k.bottom),D=Math.min(window.innerWidth,k.right);return{position:"fixed",top:C,left:E,width:Math.max(0,D-E),height:Math.max(0,R-C)}})();return f?Pr.createPortal(o.jsxs("div",{className:"z-50 overflow-hidden",style:{...j,pointerEvents:t?"auto":"none"},children:[o.jsx("div",{onClick:r,className:`absolute inset-0 bg-black/30 transition-opacity duration-300 ${t?"opacity-100":"opacity-0"}`,style:{pointerEvents:t?"auto":"none"}}),o.jsxs("div",{ref:c,className:`absolute top-0 ${u} h-full ${l} max-w-[100cqw] bg-background ${t?"shadow-xl":""} flex flex-col transition-transform duration-300 ease-in-out`,style:{transform:t?"translateX(0)":d},children:[s&&o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[o.jsx("div",{className:"text-sm font-semibold text-foreground min-w-0 flex-1 overflow-hidden",children:typeof s=="string"?o.jsx("span",{className:"truncate block",children:s}):s}),i,o.jsx("button",{onClick:r,className:"ml-4 p-1 rounded hover:bg-neutral-100 text-foreground-muted hover:text-foreground-secondary transition-colors","aria-label":"Close panel",children:o.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M2 2l12 12M14 2L2 14"})})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:a})]})]}),f):null});function Sc({message:e,messageId:t,i:n}){const[r,s]=b.useState(!1);return o.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-3",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:e.title??e.name??`Message ${n+1}`}),(t??e.name)&&o.jsx("span",{className:"text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200 p-0.5 rounded shrink-0",children:t??e.name})]}),e.summary&&o.jsx("p",{className:"text-xs text-foreground-muted mt-1.5 leading-relaxed",children:e.summary}),o.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 mt-4",children:[e.contentType&&o.jsx("span",{className:"text-xs font-mono bg-neutral-100 text-foreground-muted px-1.5 py-0.5 rounded",children:e.contentType}),e.correlationId&&o.jsx("span",{className:"text-xs bg-secondary-50 text-secondary-500 px-1.5 py-0.5 rounded border border-secondary-200",title:e.correlationId.description??e.correlationId.location,children:e.correlationId.location}),e.deprecated&&o.jsx("span",{className:"text-xs bg-red-50 text-red-500 px-1.5 py-0.5 rounded border border-red-200",children:"deprecated"})]})]}),o.jsx(fc,{message:e,expanded:r,onToggleExpanded:()=>s(i=>!i)})]})}function Cm({requestMessages:e,reply:t,isSend:n,operationId:r}){const[s,i]=b.useState("request"),a=t.messages??[],l=t.channel,c=t.address,u=s==="request"?e:a,d=s==="request"?n?"accepts":"expects":o.jsxs(o.Fragment,{children:["replies to"," ",c?o.jsxs(o.Fragment,{children:["a channel in"," ",o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:c.location})]}):(l==null?void 0:l.address)&&o.jsx(Ct,{address:l.address,parameters:l.parameters,className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary"})]});return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-end gap-0.5 -ml-2",children:["request","reply"].map(f=>o.jsx("button",{onClick:()=>i(f),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize
134
134
  ${s===f?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:f},f))}),o.jsx("div",{className:"-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32",children:u.length>0?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-sm text-foreground-secondary mb-3",children:[o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-semibold bg-surface border border-border text-foreground-secondary",children:r})," ",d,u.length>1?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 font-bold text-foreground-secondary",children:"one of"}),"the following messages:"]}):o.jsxs("span",{children:[" "," with the following message:"]})]}),o.jsx("div",{className:"space-y-2",children:u.map((f,p)=>o.jsx(Sc,{message:f,messageId:f.name,i:p},p))})]}):o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No messages defined."})})]})}const $m="",Om=`
135
- `;var ht=class{constructor({indent:e,join:t}={}){this.code=[],this.indentLine=(n,r=0)=>`${this.indentationCharacter.repeat(r)}${n}`,this.push=(n,r=0)=>{this.code.push(this.indentLine(n,r))},this.blank=()=>{this.code.push("")},this.join=()=>this.code.join(this.lineJoin),this.indentationCharacter=e??$m,this.lineJoin=t??Om}},Gn=class extends Error{constructor(e){super(e),this.name="AsyncSnippetError"}},Im=class extends Gn{constructor(e){super(`No operation found with id "${e}"`),this.name="UnknownOperationError"}},Rm=class extends Gn{constructor(e,t,n=[]){const r=n.length>0?` Registered targetId/clientId pairs: ${n.join(", ")}.`:" No targets are registered — did you forget to import a client module?";super(`Unsupported target "${e}/${t}".${r}`),this.name="UnsupportedTargetError"}},Mm=class extends Gn{constructor(e){super(`Operation "${e}" has no channels`),this.name="MissingChannelError"}},Lm=class extends Gn{constructor(e,t){super(`Operation "${e}" is not reachable over "${t}": no server it's associated with declares that protocol (or a secure variant of it), and its channel has no explicit "${t}" binding`),this.name="MissingBindingError"}},ja=class extends Gn{constructor(e){super(`Operation "${e}"'s message has no "examples" entry, and no "payload" schema to generate one from (or its schema has no recognizable type — composition keywords like oneOf/anyOf/allOf aren't resolved into an example).`),this.name="MissingExampleError"}};const Aa=10;function Pm(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function Dm(e,t){if(!t.startsWith("#/"))throw new Error(`Unsupported $ref "${t}": only local refs (starting with "#/") are supported`);const n=t.slice(2).split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(const s of n){if(typeof r!="object"||r===null)throw new Error(`Cannot resolve $ref "${t}": no value at "${s}"`);r=r[s]}return r}function vt(e,t){let n=t;for(let r=0;Pm(n);r++){if(r>=Aa)throw new Error(`Exceeded max $ref depth (${Aa}) resolving "${n.$ref}" — possible cycle`);n=Dm(e,n.$ref)}return n}const Bm=10;function Fm(e){switch(e){case"date-time":return"2024-01-01T00:00:00Z";case"date":return"2024-01-01";case"time":return"00:00:00Z";case"email":return"user@example.com";case"uuid":return"00000000-0000-0000-0000-000000000000";case"uri":case"url":return"https://example.com";case"hostname":return"example.com";case"ipv4":return"192.0.2.1";case"ipv6":return"::1";default:return"string"}}function zm(e){return Array.isArray(e)?e.find(t=>t!=="null")??e[0]:e}function qs(e,t,n=0){if(n>Bm)return;const r=vt(e,t);if(!r||typeof r!="object")return;const s=r;if(s.examples&&s.examples.length>0)return s.examples[0];if(s.default!==void 0)return s.default;if(s.const!==void 0)return s.const;if(s.enum&&s.enum.length>0)return s.enum[0];switch(zm(s.type)){case"object":{const i={};for(const[a,l]of Object.entries(s.properties??{})){const c=qs(e,l,n+1);c!==void 0&&(i[a]=c)}return i}case"array":{if(s.items===void 0)return[];const i=qs(e,s.items,n+1);return i!==void 0?[i]:[]}case"string":return Fm(s.format);case"integer":case"number":return 0;case"boolean":return!1;case"null":return null;default:return}}const Um=10;function Hm(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function An(e,t,n=0){if(n>=Um||t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>An(e,s,n+1));if(Hm(t))return An(e,vt(e,t),n+1);const r={};for(const[s,i]of Object.entries(t))r[s]=An(e,i,n+1);return r}function Ec(e,t,n){return e!==void 0?{value:String(e),isPlaceholder:!1}:t&&t.length>0?{value:String(t[0]),isPlaceholder:!1}:{value:`<${n}>`,isPlaceholder:!0}}function xr(e,t){return e?Ec(e.default,e.examples,t):{value:`<${t}>`,isPlaceholder:!0}}function Na(e){const t={},n=[];for(const[r,s]of Object.entries((e==null?void 0:e.properties)??{})){const i=Ec(s.default,s.examples,r);t[r]=i.value,i.isPlaceholder&&n.push(r)}return{values:t,placeholders:n}}function Ta(e,t){return t!=null&&t.length?t.map(n=>vt(e,n)).filter(n=>!!(n!=null&&n.type)):[]}const Wm={"kafka-secure":"kafka",wss:"ws"};function Gm(e){return Wm[e]??e}function Km(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function Vm(e){return e.slice(e.lastIndexOf("/")+1)}function Jm(e,t){return t&&t.length>0?t.map(n=>{const r=vt(e,n);if(r)return{name:Km(n)?Vm(n.$ref):"",server:r}}).filter(n=>!!n):Object.entries(e.servers??{}).map(([n,r])=>{const s=vt(e,r);return s?{name:n,server:s}:void 0}).filter(n=>!!n)}function jc(e,t){var i;const n=(i=e.operations)==null?void 0:i[t],r=n&&vt(e,n);if(!r)throw new Im(t);const s=vt(e,r.channel);if(!s)throw new Mm(t);return{operation:r,channel:s}}function Ac(e,t,n,r){var l;const s=Jm(e,n.servers??t.servers),i=s.find(c=>Gm(c.server.protocol)===r),a=(l=t.bindings)==null?void 0:l[r];return{servers:s,matchedServer:i,eligible:!!(i||a)}}function Ym(e,t,n){try{const{operation:r,channel:s}=jc(e,t);return Ac(e,s,r,n).eligible}catch{return!1}}function Xm(e,t,n){var Z,N,W,ie,oe,S,T,H,V,ae,ee,Te,Q,ve;const{operation:r,channel:s}=jc(e,t),{servers:i,matchedServer:a,eligible:l}=Ac(e,s,r,n);if(!l)throw new Lm(t,n);const c=[];let u={},d={},f;if(n==="ws"){const P=Na((N=(Z=s.bindings)==null?void 0:Z.ws)==null?void 0:N.query),Y=Na((ie=(W=s.bindings)==null?void 0:W.ws)==null?void 0:ie.headers);u=P.values,d=Y.values,c.push(...P.placeholders.map(O=>`query param "${O}"`)),c.push(...Y.placeholders.map(O=>`header "${O}"`))}else n==="kafka"&&(f=(S=(oe=s.bindings)==null?void 0:oe.kafka)==null?void 0:S.topic);const p=s.address??"";let m=p;for(const[P,Y]of Object.entries(s.parameters??{})){const O=xr(Y,P);m=m.replace(`{${P}}`,O.value),O.isPlaceholder&&c.push(`channel parameter "${P}"`)}n==="kafka"&&f&&(m=f);const h=(T=a??i[0])==null?void 0:T.server,x=h?`${h.protocol}://${h.host}${h.pathname??""}`:"",k=(h==null?void 0:h.host)??"",j=Ta(e,h==null?void 0:h.security),C=i.map(({name:P,server:Y})=>({name:P,host:Y.host,protocol:Y.protocol,pathname:Y.pathname,url:`${Y.protocol}://${Y.host}${Y.pathname??""}`,description:Y.description,security:Ta(e,Y.security)})),E=r.messages!==void 0?vt(e,r.messages[0]):vt(e,Object.values(s.messages??{})[0]),R=(H=E==null?void 0:E.examples)==null?void 0:H[0];let D,_;if(R)D=R.name,_=R.payload;else if((E==null?void 0:E.payload)!==void 0){if(_=qs(e,E.payload),_===void 0)throw new ja(t);c.push("message payload (no explicit example — generated from its schema)")}else throw new ja(t);const A=(E==null?void 0:E.payload)!==void 0?An(e,E.payload):void 0,v=(E==null?void 0:E.headers)!==void 0?An(e,E.headers):void 0,y=r.action==="send"?"send":"receive";let F;if(n==="kafka"){const P=(ae=(V=E==null?void 0:E.bindings)==null?void 0:V.kafka)==null?void 0:ae.key,Y=P?xr(P,"kafka message key"):void 0;Y!=null&&Y.isPlaceholder&&c.push("kafka message key");const O=xr((Te=(ee=r.bindings)==null?void 0:ee.kafka)==null?void 0:Te.clientId,"kafka clientId");O.isPlaceholder&&c.push("kafka clientId");let q;y==="receive"&&(q=xr((ve=(Q=r.bindings)==null?void 0:Q.kafka)==null?void 0:ve.groupId,"kafka consumer group id"),q.isPlaceholder&&c.push("kafka consumer group id")),F={key:Y==null?void 0:Y.value,groupId:q==null?void 0:q.value,clientId:O.value}}return{operationId:t,action:y,protocol:n,serverUrl:x,serverHost:k,servers:C,channelAddress:m,channelTemplate:p,query:u,headers:d,operationSummary:r.summary,operationDescription:r.description,message:{name:D,payload:_,title:(E==null?void 0:E.title)??(E==null?void 0:E.name),summary:E==null?void 0:E.summary,description:E==null?void 0:E.description,contentType:E==null?void 0:E.contentType,payloadSchema:A,headersSchema:v},placeholders:c,info:e.info,security:j,...F?{kafka:F}:{}}}function Zm(e){switch(e.type){case"apiKey":case"httpApiKey":return`API key${e.in?` (in ${e.in}${e.name?`: \`${e.name}\``:""})`:""}`;case"http":return e.scheme?`HTTP ${e.scheme}`:"HTTP authentication";case"oauth2":return"OAuth2";case"openIdConnect":return"OpenID Connect";case"userPassword":return"Username/password";case"X509":return"X.509 certificate";case"symmetricEncryption":return"Symmetric encryption";case"asymmetricEncryption":return"Asymmetric encryption";case"plain":return"SASL/PLAIN";case"scramSha256":return"SASL/SCRAM-SHA-256";case"scramSha512":return"SASL/SCRAM-SHA-512";case"gssapi":return"SASL/GSSAPI (Kerberos)";default:return e.type}}function Qm(e,t){if(t.length!==0){e("**Authorization:**");for(const n of t)if(e(`- **${Zm(n)}**`),n.description&&e(n.description,1),n.type==="openIdConnect"&&n.openIdConnectUrl&&e(`- OpenID Connect URL: \`${n.openIdConnectUrl}\``,1),n.type==="oauth2")for(const[r,s]of Object.entries(n.flows??{})){e(`- Flow \`${r}\`:`,1),s.authorizationUrl&&e(`- Authorization URL: \`${s.authorizationUrl}\``,2),s.tokenUrl&&e(`- Token URL: \`${s.tokenUrl}\``,2),s.refreshUrl&&e(`- Refresh URL: \`${s.refreshUrl}\``,2);const i=Object.keys(s.scopes??{});i.length>0&&e(`- Scopes: ${i.map(a=>`\`${a}\``).join(", ")}`,2)}}}function qm(e,t,n){e(`### ${n.name||n.host}`),t(),e(`**Host:** \`${n.host}${n.pathname??""}\``),e(`**Protocol:** ${n.protocol}`),n.description&&e(n.description),t(),n.security.length>0&&(Qm(e,n.security),t())}function _a(e,t,n,r){e(`#### \`${n}\``),t(),e("```json");for(const s of JSON.stringify(r,null,2).split(`
135
+ `;var ht=class{constructor({indent:e,join:t}={}){this.code=[],this.indentLine=(n,r=0)=>`${this.indentationCharacter.repeat(r)}${n}`,this.push=(n,r=0)=>{this.code.push(this.indentLine(n,r))},this.blank=()=>{this.code.push("")},this.join=()=>this.code.join(this.lineJoin),this.indentationCharacter=e??$m,this.lineJoin=t??Om}},Gn=class extends Error{constructor(e){super(e),this.name="AsyncSnippetError"}},Im=class extends Gn{constructor(e){super(`No operation found with id "${e}"`),this.name="UnknownOperationError"}},Rm=class extends Gn{constructor(e,t,n=[]){const r=n.length>0?` Registered targetId/clientId pairs: ${n.join(", ")}.`:" No targets are registered — did you forget to import a client module?";super(`Unsupported target "${e}/${t}".${r}`),this.name="UnsupportedTargetError"}},Mm=class extends Gn{constructor(e){super(`Operation "${e}" has no channels`),this.name="MissingChannelError"}},Lm=class extends Gn{constructor(e,t){super(`Operation "${e}" is not reachable over "${t}": no server it's associated with declares that protocol (or a secure variant of it), and its channel has no explicit "${t}" binding`),this.name="MissingBindingError"}},ja=class extends Gn{constructor(e){super(`Operation "${e}"'s message has no "examples" entry, and no "payload" schema to generate one from (or its schema has no recognizable type — composition keywords like oneOf/anyOf/allOf aren't resolved into an example).`),this.name="MissingExampleError"}};const Aa=10;function Pm(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function Dm(e,t){if(!t.startsWith("#/"))throw new Error(`Unsupported $ref "${t}": only local refs (starting with "#/") are supported`);const n=t.slice(2).split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(const s of n){if(typeof r!="object"||r===null)throw new Error(`Cannot resolve $ref "${t}": no value at "${s}"`);r=r[s]}return r}function vt(e,t){let n=t;for(let r=0;Pm(n);r++){if(r>=Aa)throw new Error(`Exceeded max $ref depth (${Aa}) resolving "${n.$ref}" — possible cycle`);n=Dm(e,n.$ref)}return n}const Bm=10;function Fm(e){switch(e){case"date-time":return"2024-01-01T00:00:00Z";case"date":return"2024-01-01";case"time":return"00:00:00Z";case"email":return"user@example.com";case"uuid":return"00000000-0000-0000-0000-000000000000";case"uri":case"url":return"https://example.com";case"hostname":return"example.com";case"ipv4":return"192.0.2.1";case"ipv6":return"::1";default:return"string"}}function zm(e){return Array.isArray(e)?e.find(t=>t!=="null")??e[0]:e}function qs(e,t,n=0){if(n>Bm)return;const r=vt(e,t);if(!r||typeof r!="object")return;const s=r;if(s.examples&&s.examples.length>0)return s.examples[0];if(s.default!==void 0)return s.default;if(s.const!==void 0)return s.const;if(s.enum&&s.enum.length>0)return s.enum[0];switch(zm(s.type)){case"object":{const i={};for(const[a,l]of Object.entries(s.properties??{})){const c=qs(e,l,n+1);c!==void 0&&(i[a]=c)}return i}case"array":{if(s.items===void 0)return[];const i=qs(e,s.items,n+1);return i!==void 0?[i]:[]}case"string":return Fm(s.format);case"integer":case"number":return 0;case"boolean":return!1;case"null":return null;default:return}}const Um=10;function Hm(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function Nn(e,t,n=0){if(n>=Um||t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Nn(e,s,n+1));if(Hm(t))return Nn(e,vt(e,t),n+1);const r={};for(const[s,i]of Object.entries(t))r[s]=Nn(e,i,n+1);return r}function Ec(e,t,n){return e!==void 0?{value:String(e),isPlaceholder:!1}:t&&t.length>0?{value:String(t[0]),isPlaceholder:!1}:{value:`<${n}>`,isPlaceholder:!0}}function xr(e,t){return e?Ec(e.default,e.examples,t):{value:`<${t}>`,isPlaceholder:!0}}function Na(e){const t={},n=[];for(const[r,s]of Object.entries((e==null?void 0:e.properties)??{})){const i=Ec(s.default,s.examples,r);t[r]=i.value,i.isPlaceholder&&n.push(r)}return{values:t,placeholders:n}}function Ta(e,t){return t!=null&&t.length?t.map(n=>vt(e,n)).filter(n=>!!(n!=null&&n.type)):[]}const Wm={"kafka-secure":"kafka",wss:"ws"};function Gm(e){return Wm[e]??e}function Km(e){return typeof e=="object"&&e!==null&&typeof e.$ref=="string"}function Vm(e){return e.slice(e.lastIndexOf("/")+1)}function Jm(e,t){return t&&t.length>0?t.map(n=>{const r=vt(e,n);if(r)return{name:Km(n)?Vm(n.$ref):"",server:r}}).filter(n=>!!n):Object.entries(e.servers??{}).map(([n,r])=>{const s=vt(e,r);return s?{name:n,server:s}:void 0}).filter(n=>!!n)}function jc(e,t){var i;const n=(i=e.operations)==null?void 0:i[t],r=n&&vt(e,n);if(!r)throw new Im(t);const s=vt(e,r.channel);if(!s)throw new Mm(t);return{operation:r,channel:s}}function Ac(e,t,n,r){var l;const s=Jm(e,n.servers??t.servers),i=s.find(c=>Gm(c.server.protocol)===r),a=(l=t.bindings)==null?void 0:l[r];return{servers:s,matchedServer:i,eligible:!!(i||a)}}function Ym(e,t,n){try{const{operation:r,channel:s}=jc(e,t);return Ac(e,s,r,n).eligible}catch{return!1}}function Xm(e,t,n){var Z,N,W,ie,oe,S,T,H,V,ae,ee,Te,Q,ve;const{operation:r,channel:s}=jc(e,t),{servers:i,matchedServer:a,eligible:l}=Ac(e,s,r,n);if(!l)throw new Lm(t,n);const c=[];let u={},d={},f;if(n==="ws"){const P=Na((N=(Z=s.bindings)==null?void 0:Z.ws)==null?void 0:N.query),Y=Na((ie=(W=s.bindings)==null?void 0:W.ws)==null?void 0:ie.headers);u=P.values,d=Y.values,c.push(...P.placeholders.map(O=>`query param "${O}"`)),c.push(...Y.placeholders.map(O=>`header "${O}"`))}else n==="kafka"&&(f=(S=(oe=s.bindings)==null?void 0:oe.kafka)==null?void 0:S.topic);const p=s.address??"";let m=p;for(const[P,Y]of Object.entries(s.parameters??{})){const O=xr(Y,P);m=m.replace(`{${P}}`,O.value),O.isPlaceholder&&c.push(`channel parameter "${P}"`)}n==="kafka"&&f&&(m=f);const h=(T=a??i[0])==null?void 0:T.server,x=h?`${h.protocol}://${h.host}${h.pathname??""}`:"",k=(h==null?void 0:h.host)??"",j=Ta(e,h==null?void 0:h.security),C=i.map(({name:P,server:Y})=>({name:P,host:Y.host,protocol:Y.protocol,pathname:Y.pathname,url:`${Y.protocol}://${Y.host}${Y.pathname??""}`,description:Y.description,security:Ta(e,Y.security)})),E=r.messages!==void 0?vt(e,r.messages[0]):vt(e,Object.values(s.messages??{})[0]),R=(H=E==null?void 0:E.examples)==null?void 0:H[0];let D,_;if(R)D=R.name,_=R.payload;else if((E==null?void 0:E.payload)!==void 0){if(_=qs(e,E.payload),_===void 0)throw new ja(t);c.push("message payload (no explicit example — generated from its schema)")}else throw new ja(t);const A=(E==null?void 0:E.payload)!==void 0?Nn(e,E.payload):void 0,v=(E==null?void 0:E.headers)!==void 0?Nn(e,E.headers):void 0,y=r.action==="send"?"send":"receive";let F;if(n==="kafka"){const P=(ae=(V=E==null?void 0:E.bindings)==null?void 0:V.kafka)==null?void 0:ae.key,Y=P?xr(P,"kafka message key"):void 0;Y!=null&&Y.isPlaceholder&&c.push("kafka message key");const O=xr((Te=(ee=r.bindings)==null?void 0:ee.kafka)==null?void 0:Te.clientId,"kafka clientId");O.isPlaceholder&&c.push("kafka clientId");let q;y==="receive"&&(q=xr((ve=(Q=r.bindings)==null?void 0:Q.kafka)==null?void 0:ve.groupId,"kafka consumer group id"),q.isPlaceholder&&c.push("kafka consumer group id")),F={key:Y==null?void 0:Y.value,groupId:q==null?void 0:q.value,clientId:O.value}}return{operationId:t,action:y,protocol:n,serverUrl:x,serverHost:k,servers:C,channelAddress:m,channelTemplate:p,query:u,headers:d,operationSummary:r.summary,operationDescription:r.description,message:{name:D,payload:_,title:(E==null?void 0:E.title)??(E==null?void 0:E.name),summary:E==null?void 0:E.summary,description:E==null?void 0:E.description,contentType:E==null?void 0:E.contentType,payloadSchema:A,headersSchema:v},placeholders:c,info:e.info,security:j,...F?{kafka:F}:{}}}function Zm(e){switch(e.type){case"apiKey":case"httpApiKey":return`API key${e.in?` (in ${e.in}${e.name?`: \`${e.name}\``:""})`:""}`;case"http":return e.scheme?`HTTP ${e.scheme}`:"HTTP authentication";case"oauth2":return"OAuth2";case"openIdConnect":return"OpenID Connect";case"userPassword":return"Username/password";case"X509":return"X.509 certificate";case"symmetricEncryption":return"Symmetric encryption";case"asymmetricEncryption":return"Asymmetric encryption";case"plain":return"SASL/PLAIN";case"scramSha256":return"SASL/SCRAM-SHA-256";case"scramSha512":return"SASL/SCRAM-SHA-512";case"gssapi":return"SASL/GSSAPI (Kerberos)";default:return e.type}}function Qm(e,t){if(t.length!==0){e("**Authorization:**");for(const n of t)if(e(`- **${Zm(n)}**`),n.description&&e(n.description,1),n.type==="openIdConnect"&&n.openIdConnectUrl&&e(`- OpenID Connect URL: \`${n.openIdConnectUrl}\``,1),n.type==="oauth2")for(const[r,s]of Object.entries(n.flows??{})){e(`- Flow \`${r}\`:`,1),s.authorizationUrl&&e(`- Authorization URL: \`${s.authorizationUrl}\``,2),s.tokenUrl&&e(`- Token URL: \`${s.tokenUrl}\``,2),s.refreshUrl&&e(`- Refresh URL: \`${s.refreshUrl}\``,2);const i=Object.keys(s.scopes??{});i.length>0&&e(`- Scopes: ${i.map(a=>`\`${a}\``).join(", ")}`,2)}}}function qm(e,t,n){e(`### ${n.name||n.host}`),t(),e(`**Host:** \`${n.host}${n.pathname??""}\``),e(`**Protocol:** ${n.protocol}`),n.description&&e(n.description),t(),n.security.length>0&&(Qm(e,n.security),t())}function _a(e,t,n,r){e(`#### \`${n}\``),t(),e("```json");for(const s of JSON.stringify(r,null,2).split(`
136
136
  `))e(s);e("```"),t()}function Nc(e,t){var u,d,f,p,m,h,x;const n={indent:" ",...t},{push:r,blank:s,join:i}=new ht({indent:n.indent});r(`# ${((u=e.info)==null?void 0:u.title)??e.operationId}`),s();const a=(d=e.info)==null?void 0:d.license;if(r(`**Version:** ${((f=e.info)==null?void 0:f.version)??"unknown"}${a?" ":""}`),a&&r(`**License:** ${a.name??""}${a.url?` (${a.url})`:""}`),s(),(p=e.info)!=null&&p.description&&(r(e.info.description),s()),r(`You are an AI agent that needs to ${e.action==="send"?"send a message to":"receive messages from"} an asynchronous (${e.protocol}) API operation ("${e.operationId}"). Use only the details below — do not invent field names, URLs, topics, or values that aren't given here.`),s(),e.servers.length>0){r("## Servers"),s();for(const k of e.servers)qm(r,s,k)}r(`### ${e.action.toUpperCase()} \`${e.operationId}\``),s(),r(`**Channel:** \`${e.channelTemplate}\``);const l=Object.keys(e.query),c=Object.keys(e.headers);if(l.length>0&&r(`**Query parameters:** ${l.map(k=>`\`${k}=${e.query[k]}\``).join(", ")}`),c.length>0&&r(`**Headers:** ${c.map(k=>`\`${k}: ${e.headers[k]}\``).join(", ")}`),((m=e.kafka)==null?void 0:m.clientId)!==void 0&&r(`**Kafka client ID:** \`${e.kafka.clientId}\``),e.action==="receive"&&((h=e.kafka)==null?void 0:h.groupId)!==void 0&&r(`**Kafka consumer group ID:** \`${e.kafka.groupId}\``),((x=e.kafka)==null?void 0:x.key)!==void 0&&r(`**Kafka message key:** \`${e.kafka.key}\``),s(),e.operationSummary&&(r(e.operationSummary),s()),e.operationDescription&&(r(e.operationDescription),s()),r(`#### ${e.message.title??e.operationId}`),s(),e.message.summary&&(r(e.message.summary),s()),e.message.description&&(r(e.message.description),s()),e.message.contentType&&(r(`**Content-Type:** \`${e.message.contentType}\``),s()),e.message.payloadSchema!==void 0&&_a(r,s,"payload",e.message.payloadSchema),e.message.headersSchema!==void 0&&_a(r,s,"headers",e.message.headersSchema),r("## Instructions"),s(),e.action==="send"?(r("1. Construct a JSON payload that conforms to the `payload` schema above."),r(`2. Send it to the channel/topic \`${e.channelAddress}\` on the server described above, using the authorization details given (if any).`)):(r(`1. Subscribe/listen on the channel/topic \`${e.channelAddress}\` on the server described above, using the authorization details given (if any).`),r("2. Expect incoming messages conforming to the `payload` schema above.")),e.placeholders.length>0){r("3. Some values above could not be resolved from the AsyncAPI document's `default`/`examples` and are placeholders — replace them with real values before acting:");for(const k of e.placeholders)r(`- ${k}`,1)}return i()}const eg={info:{key:"kafka",title:"Agent Prompt (Kafka)",description:"Self-contained Markdown prompt describing this operation — intro, broker, authorization, and an example payload — for an LLM agent to act on directly, instead of a runnable code snippet.",link:"https://www.asyncapi.com/",extname:".md",protocol:"kafka"},convert:(e,t)=>Nc(e,t)},tg={info:{key:"ws",title:"Agent Prompt (WebSocket)",description:"Self-contained Markdown prompt describing this operation — intro, server, authorization, and an example payload — for an LLM agent to act on directly, instead of a runnable code snippet.",link:"https://www.asyncapi.com/",extname:".md",protocol:"ws"},convert:(e,t)=>Nc(e,t)};function Kn(e,t,n){const r=e.replace(/\/$/,""),s=t.startsWith("/")?t:`/${t}`,i=new URLSearchParams(n).toString();return i?`${r}${s}?${i}`:`${r}${s}`}const ng={info:{key:"tokio-tungstenite",title:"tokio-tungstenite",description:"Rust WebSocket client built on tokio-tungstenite, driven with async/await on the Tokio runtime.",link:"https://github.com/snapview/tokio-tungstenite",extname:".rs",protocol:"ws"},convert:(e,t)=>{const n={indent:" ",...t},{push:r,blank:s,join:i}=new ht({indent:n.indent});if(e.placeholders.length>0){r("// NOTE: some values could not be resolved from the AsyncAPI document's"),r("// default/examples and were filled with a placeholder — replace them"),r("// with real values before running this snippet:");for(const c of e.placeholders)r(`// - ${c}`);s()}const a=Kn(e.serverUrl,e.channelAddress,e.query),l=Object.entries(e.headers);if(r("use futures_util::{SinkExt, StreamExt};"),l.length>0?r("use tokio_tungstenite::{connect_async, tungstenite::client::IntoClientRequest, tungstenite::Message};"):r("use tokio_tungstenite::{connect_async, tungstenite::Message};"),s(),s(),r("#[tokio::main]"),r("async fn main() {"),r(`let url = ${JSON.stringify(a)};`,1),s(),l.length>0){r('let mut request = url.into_client_request().expect("Invalid URL");',1);for(const[c,u]of l)r("request",1),r(".headers_mut()",2),r(`.insert(${JSON.stringify(c)}, ${JSON.stringify(u)}.parse().expect("Invalid header value"));`,2);s(),r('let (ws_stream, _) = connect_async(request).await.expect("Failed to connect");',1)}else r('let (ws_stream, _) = connect_async(url).await.expect("Failed to connect");',1);if(r(`let (${e.action==="send"?"mut write":"_write"}, mut read) = ws_stream.split();`,1),s(),e.action==="send"){const c=JSON.stringify(e.message.payload,null,2).split(`
137
137
  `);c[c.length-1]+=");",r(`let payload = serde_json::json!(${c[0]}`,1);for(const u of c.slice(1))r(u,1);s(),r("write",1),r(".send(Message::Text(payload.to_string().into()))",2),r(".await",2),r('.expect("Failed to send message");',2),s(),r("if let Some(msg) = read.next().await {",1),r('println!("{}", msg.expect("Failed to read message"));',2),r("}",1)}else{r(`// Example message shape for this operation${e.message.name?` ("${e.message.name}")`:""}:`,1);for(const c of JSON.stringify(e.message.payload,null,2).split(`
138
138
  `))r(`// ${c}`,1);s(),r("while let Some(msg) = read.next().await {",1),r('println!("{}", msg.expect("Failed to read message"));',2),r("}",1)}return r("}"),i()}},rg={info:{key:"rdkafka",title:"rdkafka",description:"Kafka producer/consumer client using the rdkafka crate, a librdkafka binding driven with async/await on the Tokio runtime.",link:"https://github.com/fede1024/rust-rdkafka",extname:".rs",protocol:"kafka"},convert:(e,t)=>{var l,c,u;const n={indent:" ",...t},{push:r,blank:s,join:i}=new ht({indent:n.indent});if(e.placeholders.length>0){r("// NOTE: some values could not be resolved from the AsyncAPI document's"),r("// default/examples and were filled with a placeholder — replace them"),r("// with real values before running this snippet:");for(const d of e.placeholders)r(`// - ${d}`);s()}const a=((l=e.kafka)==null?void 0:l.clientId)??"";if(e.action==="send"){r("use rdkafka::config::ClientConfig;"),r("use rdkafka::producer::{FutureProducer, FutureRecord};"),r("use std::time::Duration;"),s(),s(),r("#[tokio::main]"),r("async fn main() {"),r("let producer: FutureProducer = ClientConfig::new()",1),r(`.set("bootstrap.servers", ${JSON.stringify(e.serverHost)})`,2),r(`.set("client.id", ${JSON.stringify(a)})`,2),r(".create()",2),r('.expect("Failed to create producer");',2),s();const d=JSON.stringify(e.message.payload,null,2).split(`
@@ -175,6 +175,6 @@ ${r}}`}const cg={info:{key:"kafka-go",title:"kafka-go",description:"Kafka produc
175
175
  `);r(`payload := ${u[0]}`,1);for(const d of u.slice(1))r(d,1);s(),r("data, err := json.Marshal(payload)",1),r("if err != nil {",1),r('log.Fatal("marshal:", err)',2),r("}",1),s(),r("message := kafka.Message{Value: data}",1),((l=e.kafka)==null?void 0:l.key)!==void 0&&r(`message.Key = []byte(${JSON.stringify(e.kafka.key)})`,1),s(),r("if err := writer.WriteMessages(context.Background(), message); err != nil {",1),r('log.Fatal("write:", err)',2),r("}",1)}else{const u=((c=e.kafka)==null?void 0:c.groupId)??"";r("reader := kafka.NewReader(kafka.ReaderConfig{",1),r(`Brokers: []string{${a.map(d=>JSON.stringify(d)).join(", ")}},`,2),r(`Topic: ${JSON.stringify(e.channelAddress)},`,2),r(`GroupID: ${JSON.stringify(u)},`,2),r("})",1),r("defer reader.Close()",1),s(),r(`// Example message shape for this operation${e.message.name?` ("${e.message.name}")`:""}:`,1);for(const d of JSON.stringify(e.message.payload,null,2).split(`
176
176
  `))r(`// ${d}`,1);s(),r("for {",1),r("message, err := reader.ReadMessage(context.Background())",2),r("if err != nil {",2),r('log.Println("read:", err)',3),r("return",3),r("}",2),r("log.Println(string(message.Value))",2),r("}",1)}return r("}"),i()}},ug={info:{key:"ws",title:"ws",description:"WebSocket client for Node.js — chosen over the browser-native WebSocket API because it supports custom handshake headers",link:"https://github.com/websockets/ws",extname:".js",protocol:"ws"},convert:(e,t)=>{const n={indent:" ",...t},{push:r,blank:s,join:i}=new ht({indent:n.indent});if(e.placeholders.length>0){r("// NOTE: some values could not be resolved from the AsyncAPI document's"),r("// default/examples and were filled with a placeholder — replace them"),r("// with real values before running this snippet:");for(const l of e.placeholders)r(`// - ${l}`);s()}r("import WebSocket from 'ws';"),s();const a=Kn(e.serverUrl,e.channelAddress,e.query);if(Object.keys(e.headers).length>0){r(`const socket = new WebSocket('${a}', {`),r("headers: {",1);const l=Object.entries(e.headers);l.forEach(([c,u],d)=>{const f=d<l.length-1?",":"";r(`'${c}': '${u}'${f}`,2)}),r("},",1),r("});")}else r(`const socket = new WebSocket('${a}');`);if(s(),e.action==="send"){r("socket.on('open', () => {");const l=JSON.stringify(e.message.payload,null,2).split(`
177
177
  `);l[l.length-1]+="));",r(`socket.send(JSON.stringify(${l[0]}`,1);for(const c of l.slice(1))r(c,1);r("});"),s(),r("socket.on('message', (data) => {"),r("console.log(data.toString());",1),r("});")}else{r(`// Example message shape for this operation${e.message.name?` ("${e.message.name}")`:""}:`);for(const l of JSON.stringify(e.message.payload,null,2).split(`
178
- `))r(`// ${l}`);s(),r("socket.on('message', (data) => {"),r("console.log(data.toString());",1),r("});")}return i()}},on={};function Vn(e){if(on[e.info.key])throw new Error(`Target "${e.info.key}" is already registered`);on[e.info.key]={...e,clientsById:{...e.clientsById}}}function ct(e,t){const n=on[e];if(!n)throw new Error(`Cannot register client "${t.info.key}": target "${e}" is not registered. Call addTarget() first.`);if(n.clientsById[t.info.key])throw new Error(`Client "${t.info.key}" is already registered for target "${e}"`);n.clientsById[t.info.key]=t}function dg(){return Object.values(on).map(e=>({key:e.info.key,title:e.info.title,default:e.info.default,clients:Object.values(e.clientsById).map(t=>t.info)}))}function fg(e,t){const n=[];for(const r of dg()){const s=r.clients.filter(i=>Ym(e,t,i.protocol));s.length>0&&n.push({...r,default:s[0].key,clients:s})}return n}Vn({info:{key:"agent",title:"Agent Prompt",default:"ws"},clientsById:{}});ct("agent",tg);ct("agent",eg);Vn({info:{key:"javascript",title:"JavaScript",default:"ws"},clientsById:{}});ct("javascript",ug);ct("javascript",ig);ct("javascript",ag);Vn({info:{key:"python",title:"Python",default:"websockets"},clientsById:{}});ct("python",sg);ct("python",og);Vn({info:{key:"rust",title:"Rust",default:"tokio-tungstenite"},clientsById:{}});ct("rust",ng);ct("rust",rg);Vn({info:{key:"go",title:"Go",default:"gorilla"},clientsById:{}});ct("go",lg);ct("go",cg);var pg=class{constructor(e){this.document=e}convert(e,t,n,r={}){var a;const s=(a=on[t])==null?void 0:a.clientsById[n];if(!s){const l=Object.values(on).flatMap(c=>Object.keys(c.clientsById).map(u=>`${c.info.key}/${u}`));throw new Rm(t,n,l)}const i=Xm(this.document,e,s.info.protocol);return s.convert(i,r)}};const hg="javascript",mg="ws";function gg(e,t){return fg(e,t)}function Tc(e,t,n,r){try{return new pg(e).convert(t,n,r)}catch{return null}}function xg(e,t,n){if(t){for(const r of n)for(const s of r.clients)if(Tc(e,t,r.key,s.key)!==null)return`${r.key}:${s.key}`}return`${hg}:${mg}`}const bg={agent:"plaintext",c:"c",clojure:"clojure",crystal:"crystal",csharp:"csharp",go:"go",http:"http",java:"java",javascript:"javascript",json:"json",kotlin:"kotlin",node:"javascript",objc:"objectivec",ocaml:"ocaml",php:"php",powershell:"powershell",python:"python",r:"r",ruby:"ruby",rust:"rust",shell:"bash",swift:"swift"};function _c(e){return bg[e]??"plaintext"}const yg={c:()=>Promise.resolve().then(()=>require("./c-C_Sx7N-F.cjs")),clojure:()=>Promise.resolve().then(()=>require("./clojure-DWYEZwCD.cjs")),crystal:()=>Promise.resolve().then(()=>require("./crystal-BcGgviMR.cjs")),csharp:()=>Promise.resolve().then(()=>require("./csharp-yuAGIuP4.cjs")),go:()=>Promise.resolve().then(()=>require("./go-BpetKc7b.cjs")),http:()=>Promise.resolve().then(()=>require("./http--XH4hLDt.cjs")),java:()=>Promise.resolve().then(()=>require("./java-BIk0G-rH.cjs")),kotlin:()=>Promise.resolve().then(()=>require("./kotlin-kGuORR5a.cjs")),objectivec:()=>Promise.resolve().then(()=>require("./objectivec-CoeV81Tz.cjs")),ocaml:()=>Promise.resolve().then(()=>require("./ocaml-0j7KDjso.cjs")),php:()=>Promise.resolve().then(()=>require("./php-DF4zG2hq.cjs")),powershell:()=>Promise.resolve().then(()=>require("./powershell-CvydS3ek.cjs")),r:()=>Promise.resolve().then(()=>require("./r-CYaZnHkA.cjs")),ruby:()=>Promise.resolve().then(()=>require("./ruby-nPcbuC2a.cjs")),rust:()=>Promise.resolve().then(()=>require("./rust-DKnYCg2f.cjs")),swift:()=>Promise.resolve().then(()=>require("./swift-CAnH__EC.cjs"))};function Mr(e){return e==="plaintext"||!!at.getLanguage(e)}async function Cc(e){if(Mr(e))return;const t=yg[e];if(!t)return;const n=await t();at.registerLanguage(e,n.default)}function wg({operationId:e}){const{document:t,showCodeSamples:n}=ln(),r=b.useId(),s=b.useMemo(()=>e?gg(t,e):[],[t,e]),i=b.useMemo(()=>xg(t,e,s),[t,e,s]),[a,l]=b.useState(null),c=(a==null?void 0:a.document)===t&&a.operationId===e?a.selection:i,[u,d]=c.split(":"),f=_c(u),[,p]=b.useState(()=>Mr(f));b.useEffect(()=>{p(Mr(f));let h=!1;return Cc(f).then(()=>{h||p(!0)}),()=>{h=!0}},[f]);const m=b.useMemo(()=>e?Tc(t,e,u,d):null,[t,e,u,d]);return!n||!m?null:o.jsxs("div",{id:`operation-${e}-code-sample`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("label",{htmlFor:r,className:"text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Example"}),o.jsx("select",{id:r,value:c,onChange:h=>l({document:t,operationId:e,selection:h.target.value}),"aria-label":"Code sample language",className:"text-xs font-medium rounded-md border border-border bg-surface px-2 py-1 text-foreground-secondary focus:border-secondary-500 focus:ring-secondary-500",children:s.map(h=>o.jsx("optgroup",{label:h.title,children:h.clients.map(x=>o.jsx("option",{value:`${h.key}:${x.key}`,children:x.title},x.key))},h.key))})]}),o.jsx(Gr,{code:m,language:f})]})}function kg({op:e,id:t,focusSection:n=null}){var h;const r=b.useId(),s=e.messages??[],i=e.tags??[],a=e.bindings,l=e.traits,c=e.reply,u=e.externalDocs,d=e.security,f=a??(Array.isArray(l)?(h=l.find(x=>x.bindings))==null?void 0:h.bindings:void 0),p=e.action===Er.SEND,m=o.jsx("div",{className:"flex flex-col gap-2",children:s.map((x,k)=>o.jsx(Sc,{message:x,messageId:x.name,i:k},k))});return o.jsxs("div",{className:"flex flex-col gap-6",id:`operation-${t}-detail`,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200",children:["ID: ",t]}),(u==null?void 0:u.url)&&o.jsxs("a",{href:u.url,target:"_blank",rel:"noreferrer",title:u.description||u.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",o.jsx(zr,{className:"w-3.5 h-3.5"})]})]}),e.description&&o.jsx("div",{children:o.jsx(lt,{children:e.description})}),e.summary&&o.jsx("div",{children:o.jsx("p",{className:"text-sm text-foreground-secondary",children:e.summary})}),o.jsx(wg,{operationId:t}),d&&d.length>0&&o.jsxs("div",{id:`operation-${t}-security`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Operation Authorization"}),o.jsx(Wn,{ariaLabelledBy:r,forceExpanded:n==="security",trigger:o.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:d.length}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:d})})})]}),f&&Object.entries(f).map(([x,k])=>k?o.jsxs("div",{id:`operation-${t}-bindings-${x}`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-1",children:"Operation configuration"}),o.jsx(wc,{protocol:x,bindings:k,focused:n===`binding:${x}`})]},x):null),c?o.jsx(Cm,{requestMessages:s,reply:c,isSend:p,operationId:t}):s.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:[o.jsx("span",{className:"font-bold",children:t})," ",p?"accepts":"expects",s.length>1?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold text-foreground-mute",children:"one of"}),"the following messages:"]}):" the following message:"]}),m]}),i.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Tags"}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map((x,k)=>o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-neutral-100 text-foreground-secondary",children:x.name},k))})]})]})}function $c({operations:e,selectedKey:t=null,onSelectKey:n,focusSection:r=null,layout:s}){const i=f=>n==null?void 0:n(f);if(!Object.keys(e).length)return null;const a=t?e[t]:null,l=Object.keys(e).map(f=>{var C;const p=e[f],m=p.channel,h=m==null?void 0:m.address,x=m==null?void 0:m.parameters,k=((C=p.action)==null?void 0:C.toUpperCase())??"",j=t===f;return o.jsxs("tr",{id:`operation-${f}`,onClick:()=>i(f),role:"button",tabIndex:0,"aria-label":`${k||"Operation"} ${h??f}`,"aria-current":j?"true":void 0,onKeyDown:E=>{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),i(f))},className:`group cursor-pointer ${j?"bg-neutral-50":""}`,children:[o.jsx("td",{className:"px-6 py-4 max-w-0 w-full group-hover:bg-neutral-50",children:h&&o.jsx(Ct,{address:h,parameters:x,truncate:!0})}),o.jsx("td",{className:"px-6 py-4 w-32 group-hover:bg-neutral-50",children:o.jsx($t,{method:p.action,className:"w-24"})}),o.jsx("td",{className:"group-hover:bg-neutral-50"})]},f)}),c=a?a.channel:null,u=a&&(c!=null&&c.address)?o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx($t,{method:a.action}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:o.jsx(Ct,{address:c.address,parameters:c.parameters})})]}):t??"Operation",d=o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100 w-full",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Operation"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider"})]})}),o.jsx("tbody",{className:"bg-surface divide-y divide-border",children:l})]})});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:zu,content:d,stickySideContent:!1,layout:s})}),o.jsx(vc,{isOpen:!!a,side:"right",onClose:()=>i(null),title:u,children:a&&o.jsx(kg,{op:a,id:t,focusSection:r})})]})}function Vr({schemas:e,selectedKey:t,focusTarget:n,layout:r}){const{deref:s}=Ue(),i=So(),a=b.useMemo(()=>Object.entries(e).map(([c,u])=>[c,$n(u,s)]),[e,s,i]),l=a.length?o.jsx("div",{className:"grid gap-6 w-full",children:a.map(([c,u])=>{const d=u.schema,f=ul(u.schemaFormat),p=d.properties?Object.keys(d.properties).length:0;return o.jsxs("article",{id:`schema-${c}`,className:`rounded-xl border bg-surface p-5 shadow-sm transition-colors ${t===c?"border-primary-300 ring-1 ring-primary-200":"border-border"}`,children:[o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-base font-semibold text-foreground",children:c}),u.description&&o.jsx("p",{className:"mt-1 text-sm text-foreground-secondary",children:u.description})]}),o.jsx("span",{className:"inline-flex rounded-full bg-neutral-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-foreground-secondary",children:d.type??"unknown"})]}),(d.format||f||p>0)&&o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-foreground-secondary",children:[d.format&&o.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:["Format: ",d.format]}),f&&o.jsx("span",{className:"rounded-full bg-neutral-100 px-3 py-1",title:u.schemaFormat,children:f}),p>0&&o.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:[p," properties"]})]}),u.conversionError&&o.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5",children:["Could not convert"," ",dl(u.schemaFormat)??"the"," schema — showing raw definition. ",u.conversionError]}),u.pendingConversion&&o.jsx("p",{className:"mt-4 text-xs text-foreground-muted",children:"Loading Protobuf definition…"}),u.pendingConversion?null:u.conversionError&&typeof u.originalSchema=="string"?o.jsx("div",{className:"mt-4",children:o.jsx(Ql,{schema:u.originalSchema})}):o.jsx(Ko,{schema:d,rootName:c,className:"mt-4",focusTokens:c===t?(n==null?void 0:n.tokens)??null:null,focusId:c===t?(n==null?void 0:n.id)??null:null})]},c)})}):o.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No schemas defined in this AsyncAPI document."});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:l,stickySideContent:!1,layout:r})})}const vg=e=>e==="operations"||e==="messages"||e==="schemas";function Sg({asyncapi:e,config:t}){var N,W,ie,oe;const n=t.show??{},[r,s]=b.useState(!1),[i,a]=b.useState(!1),l=n.search!==!1||n.copyMarkdown!==!1,c=n.info!==!1&&Yl(e.info),u=l||c,d=[...n.operations!==!1?[{id:"operations",name:"Operations",icon:Br}]:[],...n.messages!==!1?[{id:"messages",name:"Messages",icon:Ka}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:ho}]:[]],{query:f,setQuery:p,results:m}=cf(e,{threshold:.3,limit:20}),{effectiveTab:h,focusTab:x,navActiveSection:k,selected:j,setSelectedKey:C,selectedNavItem:E,handleSearchSelect:R,handleNavItemSelect:D,handleNavServerSelect:_,handleContentTabChange:A,focusSection:v,schemaFocusTarget:y}=ll({tabs:d,defaultTab:"operations",isTabKey:vg,sections:[{id:"operations",visible:n.operations!==!1},{id:"messages",visible:n.messages!==!1},{id:"schemas",visible:n.schemas!==!1},{id:"servers",visible:n.servers!==!1}],searchQuery:f}),F=e.servers?Object.keys(e.servers):[],Z=h==="operations"?o.jsx($c,{operations:e.operations??{},selectedKey:j.operations,onSelectKey:S=>C("operations",S),focusSection:v}):h==="messages"?o.jsx(pc,{messages:((N=e.components)==null?void 0:N.messages)??{},selectedKey:j.messages,focusSection:v}):h==="schemas"?o.jsx(Vr,{schemas:((W=e.components)==null?void 0:W.schemas)??{},selectedKey:j.schemas,focusTarget:y}):null;return o.jsx(co,{document:e,config:t,children:o.jsxs("div",{className:`px-4 ${u&&d.length>0?"pt-14":""}`,children:[u&&o.jsxs(za,{logo:c?o.jsx(Ho,{source:e.info}):void 0,forceVisible:r||i,children:[n.search!==!1&&o.jsx(Va,{query:f,onQueryChange:p,results:m,onSelectResult:R,onOpenChange:s}),n.copyMarkdown!==!1&&o.jsx(Za,{serialize:S=>Eo(e,S),onOpenChange:a})]}),n.info!==!1&&o.jsx("div",{id:"info-panel",children:o.jsx(Zl,{...e.info,showLogo:!1})}),n.servers!==!1&&F.length>0&&o.jsx("div",{id:`server-${j.servers??F[0]}`,children:o.jsx(kc,{servers:e.servers,selectedServer:j.servers,onSelectServer:S=>C("servers",S),focusSection:v})}),n.sidebar!==!1&&o.jsx(ld,{operations:n.operations!==!1?e.operations:void 0,messages:n.messages!==!1?(ie=e.components)==null?void 0:ie.messages:void 0,schemas:n.schemas!==!1?(oe=e.components)==null?void 0:oe.schemas:void 0,servers:n.servers!==!1?e.servers:void 0,hasInfo:n.info!==!1,sidebarConfig:t.sidebar,activeTab:k,onTabChange:x,onItemSelect:D,onSelectServer:_,selectedItem:E}),o.jsx(Fa,{tabs:d,current:h,onChange:A}),h&&o.jsx("div",{id:`panel-${h}`,role:"tabpanel","aria-labelledby":`tab-${h}`,children:Z})]})})}const Jo=e=>o.jsx(lo,{fallback:e.errorFallback,onError:e.onError,children:o.jsx(Eg,{...e})}),Eg=e=>{const t=e.asyncapi,n=b.useMemo(()=>Mn(t),[t]),r=e.kind;b.useEffect(()=>{r==="resolved"&&n!==t&&ao(t)&&console.warn('[apiuikit] <AsyncAPI kind="resolved"> received a document that still contains $ref nodes. They were resolved anyway; fix the upstream resolution or drop the kind prop.')},[r,t,n]);const s=e.config??an;return o.jsx(Sg,{asyncapi:n,config:s})};function Yo({document:e,config:t=an,className:n="",children:r}){const{contextValue:s,themeVars:i,setPortalHost:a,setRootElement:l}=La("openapi",e,t);return o.jsx(Dr.Provider,{value:s,children:o.jsxs("div",{ref:l,style:i,className:`apiuikit-root relative @container bg-background text-foreground ${n}`,children:[o.jsx("div",{ref:a,className:"openapi-portal-root"}),r]})})}function jg(e){var r;const t=[];if(e.info){const s=e.info.title??"Info";t.push({id:"info-panel",targetId:"info-panel",type:"info",tab:"info",key:"info",name:s,path:"info",location:"Info",subtitle:e.info.description,text:Ve([e.info,e.tags,e.externalDocs])})}e.servers&&e.servers.forEach((s,i)=>{const a=`server-${i}`;t.push({id:a,targetId:a,type:"server",tab:"servers",key:a,name:s.description??s.url??a,path:`servers[${i}]`,location:`Servers > ${s.url??a}`,subtitle:s.url,text:Ve([s.url,s.description,s.variables])})});const n=(s,{tab:i,type:a,idPrefix:l,docKey:c,sectionLabel:u})=>{for(const d of Object.keys(s)){const f=s[d];if(f)for(const p of Fr){const m=f[p];if(!m)continue;const h=`${p} ${d}`,x=m.summary??`${p.toUpperCase()} ${d}`;t.push({id:`${l}-${h}`,targetId:`${l}-${h}-detail`,type:a,tab:i,key:h,name:x,path:`${c}.${d}.${p}`,location:`${u} > ${p.toUpperCase()} ${d}`,subtitle:m.description,text:Ve([p,d,m.summary,m.description,m.operationId,m.tags,m.parameters,m.security])})}}};if(e.paths&&n(e.paths,{tab:"endpoints",type:"endpoint",idPrefix:"endpoint",docKey:"paths",sectionLabel:"Endpoints"}),e.webhooks&&n(e.webhooks,{tab:"webhooks",type:"webhook",idPrefix:"webhook",docKey:"webhooks",sectionLabel:"Webhooks"}),(r=e.components)!=null&&r.schemas)for(const[s,i]of Object.entries(e.components.schemas))Qa(t,i,s,s);return t}function Ag(e,t={}){return il(e,jg,t)}function Oc({info:e,tags:t,externalDocs:n,layout:r,showLogo:s}){const{title:i,description:a,license:l,contact:c}=e;return o.jsx(Xl,{title:i,description:a,license:l,contact:c,externalDocs:n,tags:t,extensionsSource:e,layout:r,showLogo:s})}function Ng({url:e,description:t,variables:n}){return o.jsxs("div",{children:[o.jsx(gc,{address:e,variables:n}),t&&o.jsx(lt,{children:t})]})}const _s=e=>`server-${e}`,Cs=e=>Number(e.slice(7));function Ic({servers:e,selectedServer:t,onSelectServer:n,layout:r}){const s=e.map((p,m)=>p.url||_s(m)),[i,a]=b.useState(void 0),l=p=>!!p&&Cs(p)>=0&&Cs(p)<e.length,c=l(t)?t:l(i)?i:_s(0),u=e[Cs(c)],d=p=>{a(p),n==null||n(p)},f=u?o.jsx(Ng,{...u}):null;return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:Ra,content:f,sideContent:o.jsx(hc,{serverNames:s,current:(u==null?void 0:u.url)||c,setCurrent:p=>{const m=s.indexOf(p);d(m>=0?_s(m):p)}}),stickySideContent:!0,reverseLayoutOnMobile:!0,layout:r})})}function Tg({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 11v5"}),o.jsx("path",{d:"M12 8h.01"})]})}function Rc(e){return typeof e!="string"?JSON.stringify(e):e.startsWith("$")?e.slice(1).replace(/#\//g,".").replace(/\//g,"."):e}function _g(e){return e.replace(/\{\$([^}]+)\}/g,(t,n)=>`{${Rc(`$${n}`)}}`)}function Cg(e){return e.operationId??e.operationRef??null}const $g=e=>e.trim().replace(/[.:;]+$/,""),$s=({children:e})=>o.jsx("code",{className:"font-mono text-foreground-secondary",children:e});function Og({links:e,onFollowOperation:t,isOperationKnown:n}){return o.jsx("div",{className:"mt-3 space-y-1",children:Object.entries(e).map(([r,s])=>{var d;const i=Cg(s),a=Object.entries(s.parameters??{}),l=s.description?$g(s.description):null,c=!!s.operationId&&!!t&&!!(n!=null&&n(s.operationId)),u=l??i??r;return o.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-foreground-muted leading-relaxed",children:[o.jsx(Tg,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),o.jsxs("span",{children:[c?o.jsx("button",{type:"button",onClick:()=>t(s.operationId),className:"text-primary-600 underline underline-offset-2 hover:text-primary-500",children:u}):o.jsx("span",{className:"text-foreground-secondary",children:u}),a.length>0&&o.jsxs(o.Fragment,{children:[" using ",a.map(([f,p],m)=>o.jsxs(b.Fragment,{children:[m>0&&(m===a.length-1?" and ":", "),o.jsx($s,{children:f})," from ",o.jsx($s,{children:Rc(p)})]},f))]}),(d=s.server)!=null&&d.url?o.jsxs(o.Fragment,{children:[" via ",o.jsx($s,{children:s.server.url})]}):null,"."]})]},r)})})}function Ig(e){return Object.entries(e).flatMap(([t,n])=>Object.entries(n??{}).flatMap(([r,s],i)=>Fr.filter(a=>s==null?void 0:s[a]).map(a=>({name:t,url:r,method:a,op:s[a],urlIndex:i}))))}function Rg({callbacks:e,id:t,renderOperation:n,depth:r}){const s=Ig(e);return s.length===0?null:o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-foreground-muted mb-3",children:"Requests the API sends to you after this operation, not ones you call."}),o.jsx("div",{className:"space-y-2",children:s.map(({name:i,url:a,method:l,op:c,urlIndex:u})=>o.jsx(Wn,{trigger:o.jsxs("span",{className:"flex items-center gap-2 text-xs font-normal min-w-0",children:[o.jsx($t,{method:l,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"font-medium text-foreground-secondary shrink-0",children:i}),o.jsx("code",{className:"font-mono text-foreground-muted truncate",children:_g(a)})]}),children:o.jsx("div",{className:"px-4 py-3 border-t border-border",children:o.jsx(n,{method:l,path:a,op:c,id:`${t}-${i}-${u}-${l}`,idPrefix:"callback",depth:r+1})})},`${i}-${u}-${l}`))})]})}const Mg=b.lazy(()=>Promise.resolve().then(()=>require("./CodeSamples-D5_WV4f3.cjs")).then(({CodeSamples:e})=>({default:e})));function Lg(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Mc({prefix:e,mediaTypes:t,selected:n,onChange:r}){return t.length<=1?o.jsx(o.Fragment,{children:t[0]?`${e} (${t[0]})`:e}):o.jsxs(o.Fragment,{children:[e," (",o.jsx("select",{"aria-label":`${e} media type`,value:n,onChange:s=>r(s.target.value),className:"bg-transparent border-0 p-0 cursor-pointer underline decoration-dotted focus:outline-none",children:t.map(s=>o.jsx("option",{value:s,children:s},s))}),")"]})}function Lc(e){if(!e)return;if(e.example!==void 0)return e.example;const t=e.examples?Object.values(e.examples)[0]:void 0;return t&&"value"in t?t.value:void 0}function Pg(e){return e.startsWith("2")?"bg-green-100 text-green-800":e.startsWith("4")||e.startsWith("5")?"bg-red-100 text-red-800":"bg-neutral-100 text-foreground-secondary"}function Dg({responses:e,onFollowOperation:t,isOperationKnown:n}){var _,A;const r=Object.keys(e),[s,i]=b.useState(r[0]),a=e[s],l=Object.keys((a==null?void 0:a.content)??{}),[c,u]=b.useState(l[0]),d=c?(_=a==null?void 0:a.content)==null?void 0:_[c]:void 0,f=(a==null?void 0:a.headers)??{},p=(a==null?void 0:a.links)??{},[m,h]=b.useState("body"),x=l.length>0&&!!d,k=Object.keys(f).length>0,j=Object.keys(p).length>0,C=[...x?[{id:"body",name:"Body"}]:[],...k?[{id:"headers",name:"Headers"}]:[]],E=C.length>1,R=C.some(v=>v.id===m)?m:(A=C[0])==null?void 0:A.id,D=C.length>0;return b.useEffect(()=>{u(Object.keys((a==null?void 0:a.content)??{})[0]),h("body")},[s]),o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center gap-1.5 flex-wrap mb-3",role:"tablist","aria-label":"Response status",children:r.map(v=>o.jsx("button",{role:"tab","aria-selected":s===v,onClick:()=>i(v),className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-mono transition-all ${Pg(v)} ${s===v?"ring-1 ring-inset ring-foreground-muted/40":"opacity-50 hover:opacity-80"}`,children:v},v))}),(a==null?void 0:a.description)&&o.jsx("p",{className:"text-sm text-foreground-secondary mb-3",children:a.description}),D?o.jsxs(o.Fragment,{children:[E&&o.jsx(cn,{tabs:C,current:R,onChange:v=>h(v)}),o.jsx("div",{className:E?"mt-4":void 0,children:R==="headers"?o.jsx(Wt,{schema:Fg(f),label:"Headers",rootName:"Headers",defaultView:"schema"},"headers"):o.jsx(Wt,{schema:(d==null?void 0:d.schema)??{},label:o.jsx(Mc,{prefix:"Body",mediaTypes:l,selected:c,onChange:u}),rootName:"Body",example:Lc(d)},"body")})]}):o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No response body."}),j&&o.jsx(Og,{links:p,onFollowOperation:t,isOperationKnown:n})]})}function Pc(e){const t={},n=[];for(const r of e){const s=r.schema??{};t[r.name]={...s,description:s.description??r.description},r.required&&n.push(r.name)}return{type:"object",properties:t,...n.length>0?{required:n}:{}}}const Bg=e=>Pc(e),Fg=e=>Pc(Object.entries(e).map(([t,n])=>({name:t,...n})));function zg({parameters:e}){var l;const t=Wu.filter(({location:c})=>e.some(u=>u.in===c)),[n,r]=b.useState(((l=t[0])==null?void 0:l.location)??null);if(t.length===0)return null;const s=t.some(c=>c.location===n)?n:t[0].location,i=t.find(c=>c.location===s),a=Bg(e.filter(c=>c.in===s));return o.jsxs("div",{children:[t.length>1&&o.jsx(cn,{tabs:t.map(({location:c,label:u})=>({id:c,name:u.replace(/ Parameters$/,"")})),current:s,onChange:r}),o.jsx("div",{className:t.length>1?"mt-4":void 0,children:o.jsx(Wt,{schema:a,label:i.label,rootName:i.label,defaultView:"schema"})})]})}function Ug({label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r}){const s=t.length>0,i=Object.keys(n),a=i.length>0,[l,c]=b.useState(s?"parameters":"body"),[u,d]=b.useState(i[0]),f=u?n[u]:void 0;if(!s&&!a)return o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No request body or parameters."});const p=[a?"request body":null,t.some(m=>m.in==="header")?"headers":null,t.some(m=>m.in==="cookie")?"cookie":null].filter(m=>!!m);return o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-3",children:[o.jsx("span",{className:"font-bold",children:e})," expects the following ",Hg(p),":"]}),s&&a&&o.jsx(cn,{tabs:[{id:"parameters",name:"Parameters"},{id:"body",name:"Request Body"}],current:l,onChange:m=>c(m)}),o.jsxs("div",{className:s&&a?"mt-4":void 0,children:[(l==="parameters"||!a)&&s&&o.jsx(zg,{parameters:t}),(l==="body"||!s)&&a&&f&&o.jsx(Wt,{schema:f.schema??{},label:o.jsx(Mc,{prefix:"Request Body",mediaTypes:i,selected:u,onChange:d}),rootName:"Body ",description:r,example:Lc(f)})]})]})}function Hg(e){return e.length<=1?e[0]??"request":e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function Wg({label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r,responses:s,callbacks:i,id:a,depth:l,fillHeight:c=!1,onFollowOperation:u,isOperationKnown:d}){const f=t.length>0||Object.keys(n).length>0,p=Object.keys(s).length>0,m=!!i&&Object.keys(i).length>0&&l<Gg,h=[...f?["request"]:[],...p?["response"]:[],...m?["callbacks"]:[]],[x,k]=b.useState(h[0]??"request");if(h.length===0)return null;const j=h.includes(x)?x:h[0];return o.jsxs("div",{className:c?"flex-1 flex flex-col min-h-0":void 0,children:[o.jsx("div",{className:"flex items-end gap-0.5 -ml-2",role:"tablist","aria-label":"Operation exchange",children:h.map(C=>o.jsx("button",{role:"tab","aria-selected":j===C,onClick:()=>k(C),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize ${j===C?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:C},C))}),o.jsxs("div",{className:`-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32 ${c?"flex-1 -mb-4":""}`,children:[j==="request"&&o.jsx(Ug,{label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r}),j==="response"&&o.jsx(Dg,{responses:s,onFollowOperation:u,isOperationKnown:d}),j==="callbacks"&&i&&o.jsx(Rg,{callbacks:i,id:a,depth:l,renderOperation:Dc})]})]})}const Gg=1;function Dc({method:e,path:t,op:n,id:r,idPrefix:s="endpoint",globalSecurity:i,securitySchemes:a,onFollowOperation:l,isOperationKnown:c,depth:u=0}){var C,E,R;const d=(n.parameters??[]).filter(D=>D.in!=="query"&&D.in!=="path"),f=n.security??i??[],p=n.responses??{},m=((C=n.requestBody)==null?void 0:C.content)??{},h=n.operationId?Lg(n.operationId):`${e.toUpperCase()} ${t}`,x=new Map;for(const D of f)for(const[_,A]of Object.entries(D)){if(A.length===0)continue;const v=x.get(_)??[];x.set(_,Array.from(new Set([...v,...A])))}const k=Array.from(new Set(f.flatMap(D=>Object.keys(D)))).map(D=>{const _=a==null?void 0:a[D];if(!_)return null;const A=x.get(D);return A?{..._,requiredScopes:A}:_}).filter(D=>!!D),j=u===0;return o.jsxs("div",{className:`flex flex-col gap-6 ${j?"min-h-full":""}`,id:`${s}-${r}-detail`,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[n.deprecated&&o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-amber-100 text-amber-800",children:"Deprecated"}),((E=n.externalDocs)==null?void 0:E.url)&&o.jsxs("a",{href:n.externalDocs.url,target:"_blank",rel:"noreferrer",title:n.externalDocs.description||n.externalDocs.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",o.jsx(zr,{className:"w-3.5 h-3.5"})]})]}),n.summary&&o.jsx("p",{className:"text-sm text-foreground-secondary",children:n.summary}),n.description&&o.jsx(lt,{children:n.description}),o.jsx(b.Suspense,{fallback:null,children:o.jsx(Mg,{method:e,path:t,parameters:d,requestBody:n.requestBody,security:f,id:r})}),f.length>0&&o.jsxs("div",{id:`${s}-${r}-security`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Authorization"}),k.length>0&&o.jsx(Wn,{className:"mt-3",trigger:o.jsxs("span",{className:"flex items-center gap-2 text-xs font-normal text-foreground-muted",children:[o.jsx(mc,{className:"h-4 w-4 text-foreground-muted"}),o.jsx("span",{className:"bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:k.length})]}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:k})})})]}),o.jsx(Wg,{label:h,parameters:d,requestBodyContent:m,requestBodyDescription:(R=n.requestBody)==null?void 0:R.description,responses:p,callbacks:n.callbacks,id:r,depth:u,fillHeight:j,onFollowOperation:l,isOperationKnown:c})]})}function Kg(e,t){const n=t.filter(r=>r.in==="query");return n.length===0?e:`${e}?${n.map(r=>`${r.name}={${r.name}}`).join("&")}`}function Ca(e){var n;const t={};for(const r of e){const s=r.schema;t[r.name]={description:r.description,type:s==null?void 0:s.type,default:(s==null?void 0:s.default)!==void 0?String(s.default):void 0,enum:(n=s==null?void 0:s.enum)==null?void 0:n.map(String),examples:"example"in r&&r.example!==void 0?[String(r.example)]:void 0}}return t}function Lr({paths:e,security:t,securitySchemes:n,selectedKey:r=null,onSelectKey:s,columnLabel:i="Path",idPrefix:a="endpoint",layout:l}){var _;const c=A=>s==null?void 0:s(A),u=b.useMemo(()=>Nn(e),[e]),d=b.useMemo(()=>{var v,y,F;const A=new Map;for(const Z of u){const N=((F=(y=(v=e[Z.path])==null?void 0:v[Z.method])==null?void 0:y.tags)==null?void 0:F[0])||"Other",W=A.get(N)??[];W.push(Z),A.set(N,W)}return Array.from(A,([Z,N])=>({label:Z,items:N}))},[u,e]),[f,p]=b.useState(()=>new Set),m=f.size===0;b.useEffect(()=>{if(!r)return;const A=d.find(({items:v})=>v.some(({key:y})=>y===r));A&&p(v=>{if(!v.has(A.label))return v;const y=new Set(v);return y.delete(A.label),y})},[d,r]);const h=b.useMemo(()=>{var v,y;const A=new Map;for(const{key:F,method:Z,path:N}of u){const W=(y=(v=e[N])==null?void 0:v[Z])==null?void 0:y.operationId;W&&A.set(W,F)}return A},[u,e]);if(u.length===0)return null;const x=r?u.find(A=>A.key===r):null,k=x?(_=e[x.path])==null?void 0:_[x.method]:null,j=({key:A,method:v,path:y},F)=>{var W;const Z=r===A,N=Pi(e[y],(W=e[y])==null?void 0:W[v]);return o.jsxs("tr",{id:`${a}-${A}`,onClick:()=>c(A),role:"button",tabIndex:F?0:-1,"aria-hidden":!F,"aria-label":`${v.toUpperCase()} ${y}`,"aria-current":Z?"true":void 0,onKeyDown:ie=>{ie.key!=="Enter"&&ie.key!==" "||(ie.preventDefault(),c(A))},className:`group transition-[opacity,visibility] duration-300 ease-in-out ${F?`cursor-pointer opacity-100 visible ${Z?"bg-neutral-50":""}`:"pointer-events-none invisible opacity-0"}`,children:[o.jsx("td",{className:`px-6 max-w-0 w-full group-hover:bg-neutral-50 transition-[padding] duration-300 ease-in-out ${F?"py-2":"py-0"}`,children:o.jsx("div",{className:`overflow-hidden transition-[max-height] duration-300 ease-in-out ${F?"max-h-12":"max-h-0"}`,children:o.jsx(Ct,{address:y,parameters:Ca(N),truncate:!0,className:"text-xs"})})}),o.jsx("td",{className:`px-6 w-28 group-hover:bg-neutral-50 transition-[padding] duration-300 ease-in-out ${F?"py-2":"py-0"}`,children:o.jsx("div",{className:`overflow-hidden transition-[max-height] duration-300 ease-in-out ${F?"max-h-12":"max-h-0"}`,children:o.jsx($t,{method:v,className:"w-20"})})})]},A)},C=d.map(({label:A,items:v},y)=>{const F=!f.has(A),Z=`${a}-group-${y}-${A.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;return o.jsxs(b.Fragment,{children:[o.jsx("tbody",{className:"border-y border-border first:border-t-0",children:o.jsx("tr",{className:"bg-neutral-50/70",children:o.jsx("th",{colSpan:2,scope:"rowgroup",className:"p-0 text-left",children:o.jsxs("button",{type:"button","aria-label":`${A} endpoints (${v.length})`,"aria-expanded":F,"aria-controls":Z,onClick:()=>p(N=>{const W=new Set(N);return F?W.add(A):W.delete(A),W}),className:"group/header flex w-full items-center gap-3 px-6 py-3.5 text-left hover:bg-neutral-100/80 transition-colors",children:[o.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-surface text-foreground-muted shadow-sm transition-colors group-hover/header:border-neutral-300 group-hover/header:text-foreground-secondary",children:F?o.jsx(Ln,{className:"h-2.5 w-2.5"}):o.jsx(xc,{className:"h-2.5 w-2.5"})}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold tracking-wide text-foreground-secondary",children:A}),o.jsx("span",{className:"inline-flex min-w-6 items-center justify-center rounded-full bg-neutral-200/70 px-2 py-0.5 text-xs font-medium tabular-nums text-foreground-muted",children:v.length})]})})})}),o.jsx("tbody",{id:Z,"aria-hidden":!F,className:`bg-surface ${F?"divide-y divide-border":""}`,children:v.map(N=>j(N,F))})]},A)}),E=Pi(x?e[x.path]:void 0,k),R=x?o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx($t,{method:x.method}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:o.jsx(Ct,{address:Kg(x.path,E),parameters:Ca(E),className:"text-xs"})})]}):r,D=o.jsxs("div",{children:[o.jsx("div",{className:"mb-3 flex justify-end",children:o.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-foreground-secondary",children:[o.jsx("input",{type:"checkbox",checked:m,onChange:A=>p(A.target.checked?new Set:new Set(d.map(({label:v})=>v))),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),p(m?new Set(d.map(({label:v})=>v)):new Set))},className:"h-3.5 w-3.5 cursor-pointer rounded border-border"}),o.jsx("span",{children:"Expand all"})]})}),o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100 w-full",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:i}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"})]})}),C]})})]});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:D,stickySideContent:!1,layout:l})}),o.jsx(vc,{isOpen:!!x,side:"right",onClose:()=>c(null),title:R,children:x&&k&&o.jsx(Dc,{method:x.method,path:x.path,op:{...k,parameters:E},id:x.key,idPrefix:a,globalSecurity:t,securitySchemes:n,isOperationKnown:A=>h.has(A),onFollowOperation:A=>{const v=h.get(A);v&&c(v)}})})]})}const Vg=e=>e==="endpoints"||e==="webhooks"||e==="schemas";function Jg({openapi:e,config:t}){var W,ie,oe,S;const n=t.show??{},[r,s]=b.useState(!1),[i,a]=b.useState(!1),l=n.search!==!1||n.copyMarkdown!==!1,c=n.info!==!1&&Yl(e.info),u=l||c,d=e.webhooks??{},f=Object.keys(d).length>0,p=[...n.endpoints!==!1?[{id:"endpoints",name:"Endpoints",icon:Br}]:[],...f&&n.webhooks!==!1?[{id:"webhooks",name:"Webhooks",icon:mo}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:ho}]:[]],{query:m,setQuery:h,results:x}=Ag(e,{threshold:.3,limit:20}),{effectiveTab:k,focusTab:j,navActiveSection:C,selected:E,setSelectedKey:R,selectedNavItem:D,handleSearchSelect:_,handleNavItemSelect:A,handleNavServerSelect:v,handleContentTabChange:y,schemaFocusTarget:F}=ll({tabs:p,defaultTab:"endpoints",isTabKey:Vg,sections:[{id:"endpoints",visible:n.endpoints!==!1},{id:"webhooks",visible:f&&n.webhooks!==!1},{id:"schemas",visible:n.schemas!==!1},{id:"servers",visible:n.servers!==!1}],searchQuery:m}),Z=(e.servers??[]).map(T=>T.url),N=k==="endpoints"?o.jsx(Lr,{paths:e.paths??{},security:e.security,securitySchemes:(W=e.components)==null?void 0:W.securitySchemes,selectedKey:E.endpoints,onSelectKey:T=>R("endpoints",T)}):k==="webhooks"?o.jsx(Lr,{paths:d,security:e.security,securitySchemes:(ie=e.components)==null?void 0:ie.securitySchemes,selectedKey:E.webhooks,onSelectKey:T=>R("webhooks",T),columnLabel:"Webhook",idPrefix:"webhook"}):k==="schemas"?o.jsx(Vr,{schemas:((oe=e.components)==null?void 0:oe.schemas)??{},selectedKey:E.schemas,focusTarget:F}):null;return o.jsx(Yo,{document:e,config:t,children:o.jsxs("div",{className:`px-4 ${u&&p.length>0?"pt-14":""}`,children:[u&&o.jsxs(za,{logo:c?o.jsx(Ho,{source:e.info}):void 0,forceVisible:r||i,children:[n.search!==!1&&o.jsx(Va,{query:m,onQueryChange:h,results:x,onSelectResult:_,onOpenChange:s}),n.copyMarkdown!==!1&&o.jsx(Za,{serialize:T=>jo(e,T),onOpenChange:a})]}),n.info!==!1&&o.jsx("div",{id:"info-panel",children:o.jsx(Oc,{info:e.info,tags:e.tags,externalDocs:e.externalDocs,showLogo:!1})}),n.servers!==!1&&Z.length>0&&o.jsx("div",{id:E.servers??"server-0",children:o.jsx(Ic,{servers:e.servers,selectedServer:E.servers,onSelectServer:T=>R("servers",T)})}),n.sidebar!==!1&&o.jsx(fd,{paths:n.endpoints!==!1?e.paths:void 0,webhooks:f&&n.webhooks!==!1?d:void 0,schemas:n.schemas!==!1?(S=e.components)==null?void 0:S.schemas:void 0,servers:n.servers!==!1?Z:void 0,hasInfo:n.info!==!1,activeTab:C,onTabChange:j,onItemSelect:A,onSelectServer:v,selectedItem:D}),o.jsx(Fa,{tabs:p,current:k,onChange:y}),k&&o.jsx("div",{id:`panel-${k}`,role:"tabpanel","aria-labelledby":`tab-${k}`,children:N})]})})}const Xo=e=>o.jsx(lo,{fallback:e.errorFallback,onError:e.onError,children:o.jsx(Yg,{...e})}),Yg=e=>{const t=e.openapi,n=b.useMemo(()=>Mn(t),[t]),r=e.kind;b.useEffect(()=>{r==="resolved"&&n!==t&&ao(t)&&console.warn('[apiuikit] <OpenAPI kind="resolved"> received a document that still contains $ref nodes. They were resolved anyway; fix the upstream resolution or drop the kind prop.')},[r,t,n]);const s=e.config??an;return o.jsx(Jg,{openapi:n,config:s})};function Bc(e){return{...e,title:t=>e.title(t),summary:t=>e.summary(t),targets:t=>e.targets(t),toMarkdown:(t,n)=>e.toMarkdown(t,n)}}const rn=e=>{var n;return typeof e!="string"?void 0:((n=e.trim().split(`
179
- `)[0])==null?void 0:n.trim())||void 0},Xg=e=>Fr.some(t=>t===e),Zg=Bc({name:"OpenAPI",matches:e=>typeof e.openapi=="string"||typeof e.swagger=="string",sectionTitle:"Endpoints",title:e=>{var t;return((t=e.info)==null?void 0:t.title)??"API"},summary:e=>{var t;return rn((t=e.info)==null?void 0:t.description)},targets:e=>Nn(e.paths??{}).map(({key:t,method:n,path:r})=>{var i,a;const s=(a=(i=e.paths)==null?void 0:i[r])==null?void 0:a[n];return{key:t,label:`${n.toUpperCase()} ${r}`,summary:rn(s==null?void 0:s.summary)??rn(s==null?void 0:s.description),target:{kind:"operation",document:e,method:n,path:r}}}),toMarkdown:(e,t)=>{if(!t||t.kind==="document")return jo(e);if(typeof t.path!="string"||!Xg(t.method))throw new Error("[apiuikit] An OpenAPI operation target requires a valid method and path.");return gl(e,t.method,t.path)}}),Qg=Bc({name:"AsyncAPI",matches:e=>typeof e.asyncapi=="string",sectionTitle:"Operations",title:e=>{var t;return((t=e.info)==null?void 0:t.title)??"API"},summary:e=>{var t;return rn((t=e.info)==null?void 0:t.description)},targets:e=>Object.entries(e.operations??{}).map(([t,n])=>({key:t,label:n!=null&&n.action?`${n.action.toUpperCase()} ${t}`:t,summary:rn(n==null?void 0:n.summary)??rn(n==null?void 0:n.description),target:{kind:"operation",document:e,id:t}})),toMarkdown:(e,t)=>{if(!t||t.kind==="document")return Eo(e);if(typeof t.id!="string"||!t.id)throw new Error("[apiuikit] An AsyncAPI operation target requires an operation id.");return hl(e,t.id)}}),$a=[Zg,Qg];function Zo(e){const t=typeof e=="object"&&e!==null?e:{},n=$a.find(r=>r.matches(t));if(!n)throw new Error(`[apiuikit] Unrecognized document: expected a top-level "openapi", "swagger", or "asyncapi" version key. Supported specs: ${$a.map(r=>r.name).join(", ")}.`);return n}function Fc(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function qg(e){return Zo(e).targets(e)}function ex(e,t){const n=Zo(e);if(t&&t.document!==e)throw new Error("[apiuikit] Markdown target belongs to a different document.");return n.toMarkdown(e,t)}function tx(e,t={}){const n=Zo(e),{baseUrl:r,url:s,optional:i}=t,a=(r==null?void 0:r.replace(/\/+$/,""))??"",c=s??(p=>`${a}/${Fc(p.key)}.md`),u=[`# ${t.title??n.title(e)}`],d=t.summary??n.summary(e);d&&u.push("",`> ${d}`);const f=n.targets(e).map(p=>({entry:p,href:c(p)})).filter(p=>!!p.href);if(f.length){u.push("",`## ${n.sectionTitle}`,"");for(const{entry:p,href:m}of f)u.push(`- [${p.label}](${m})${p.summary?`: ${p.summary}`:""}`)}if(i!=null&&i.length){u.push("","## Optional","");for(const p of i)u.push(`- [${p.label}](${p.url})${p.description?`: ${p.description}`:""}`)}return u.push(""),u.join(`
180
- `)}function zc(e,t,n){e.registerSchemaParser(t);const r=e.parserRegistry,s=r.get.bind(r);r.get=i=>{const a=s(i);return a!==void 0?a:n(i)?t:void 0}}const nx=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/vnd.apache.avro;version=1.8.2","application/vnd.apache.avro+json;version=1.8.2","application/vnd.apache.avro+yaml;version=1.8.2"];function rx(){return{validate:ox,parse:ix,getMimeTypes:()=>nx}}function sx(e){zc(e,rx(),Pn)}function ox(e){return vo(e.data).map(t=>({message:t,path:e.path}))}function ix(e){var n,r;const t=vo(e.data);if(t.length>0)return{[Tr]:t[0]};try{const s=Ks(e.data),i=e.meta.message,a=(r=(n=i==null?void 0:i.bindings)==null?void 0:n.kafka)==null?void 0:r.key;return a&&i&&(i["x-parser-original-bindings-kafka-key"]=a,i.bindings.kafka.key=Ks(a)),s}catch(s){return{[Tr]:s instanceof Error?s.message:"Failed to convert Avro schema"}}}async function ax(){try{const e=await Promise.resolve().then(()=>require("./index-BbfpKZY1.cjs")).then(n=>n.index),t=e.default??e;if(typeof t!="function")throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");return t}catch(e){throw console.error("[apiuikit] Failed to load '@asyncapi/parser/browser':",e),new Error("[apiuikit] The parsed entry requires '@asyncapi/parser'. Install it (`npm i @asyncapi/parser`), or use the `AsyncAPI` component with a pre-resolved document instead.")}}async function Uc(e){try{const t=await ax(),n=new t;sx(n);const{registerProtobufSchemaParser:r}=await Promise.resolve().then(()=>require("./protobufSchemaParser-DBjKEuyJ.cjs"));r(n);const{document:s,diagnostics:i}=await n.parse(e);return{diagnostics:i,document:s?cx(s):null}}catch(t){return{diagnostics:[{message:t instanceof Error?t.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function lx(e,t){const{diagnostics:n,document:r}=await Uc(e);return{diagnostics:n,view:r?o.jsx(Jo,{kind:"resolved",asyncapi:r,config:t}):null}}function cx(e){return e.json()}function ux({raw:e,config:t,onDiagnostics:n,errorFallback:r,onError:s}){const[i,a]=b.useState(null),l=b.useRef(n);return l.current=n,b.useEffect(()=>{let c=!0;return Uc(e).then(({document:u,diagnostics:d})=>{var f;c&&(a(u),(f=l.current)==null||f.call(l,d))}),()=>{c=!1}},[e]),i?o.jsx(Jo,{kind:"resolved",asyncapi:i,config:t,errorFallback:r,onError:s}):null}async function dx(){try{return await Promise.resolve().then(()=>require("./index-cEBLn6v9.cjs"))}catch(e){throw console.error("[apiuikit] Failed to load '@scalar/openapi-parser':",e),new Error("[apiuikit] The parsed entry requires '@scalar/openapi-parser'. Install it (`npm i @scalar/openapi-parser`), or use the `OpenAPI` component with a pre-resolved document instead.")}}const Os=(e,t)=>({message:e.message,path:Array.isArray(e.path)?e.path:[],severity:t});async function Hc(e){try{const{validate:t,dereference:n}=await dx(),r=await t(e);if(!r.valid)return{diagnostics:r.errors.map(l=>Os(l,0)),document:null};const s=(r.errors??[]).map(l=>Os(l,1)),{schema:i,errors:a}=n(e);return a!=null&&a.length&&s.push(...a.map(l=>Os(l,0))),{diagnostics:s,document:i??null}}catch(t){return{diagnostics:[{message:t instanceof Error?t.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function fx(e,t){const{diagnostics:n,document:r}=await Hc(e);return{diagnostics:n,view:r?o.jsx(Xo,{kind:"resolved",openapi:r,config:t}):null}}function px({raw:e,config:t,onDiagnostics:n,errorFallback:r,onError:s}){const[i,a]=b.useState(null),l=b.useRef(n);return l.current=n,b.useEffect(()=>{let c=!0;return Hc(e).then(({document:u,diagnostics:d})=>{var f;c&&(a(u),(f=l.current)==null||f.call(l,d))}),()=>{c=!1}},[e]),i?o.jsx(Xo,{kind:"resolved",openapi:i,config:t,errorFallback:r,onError:s}):null}function Wc(e,t,n){return function({document:s,config:i,children:a}){const l=b.useContext(Dr),c=b.useMemo(()=>s?Mn(s):null,[s]),u=!!l&&l.specType!==n;if(b.useEffect(()=>{u&&console.warn(`[apiuikit] A ${t} section is rendered inside a ${l.specType} document provider, which cannot supply the document it needs. `+(c?"Using the section's own `document` prop instead.":`Wrap it in <${t}Provider> or pass it a \`document\` prop.`))},[l,u,c]),l&&!u)return o.jsx(o.Fragment,{children:a});if(!c){if(l)return o.jsx(o.Fragment,{children:a});throw new Error(`This ${t} section needs a \`document\` prop unless it is rendered inside <${t}Provider>.`)}return o.jsx(e,{document:c,config:i,children:a})}}function hx({document:e,config:t,children:n}){const r=b.useMemo(()=>Mn(e),[e]);return o.jsx(co,{document:r,config:t,children:n})}const Jn=Wc(co,"AsyncAPI","asyncapi");function Yn(){const e=Ue();return e.specType==="asyncapi",e.document}function mx({layout:e}){const t=Yn();return!t.servers||Object.keys(t.servers).length===0?null:o.jsx(kc,{servers:t.servers,layout:e})}function gx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(mx,{layout:e})})}function xx({layout:e}){const t=Yn(),[n,r]=b.useState(null);return o.jsx($c,{operations:t.operations??{},selectedKey:n,onSelectKey:r,layout:e})}function bx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(xx,{layout:e})})}function yx({layout:e}){var n;const t=Yn();return o.jsx(pc,{messages:((n=t.components)==null?void 0:n.messages)??{},layout:e})}function wx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(yx,{layout:e})})}function kx({layout:e}){var n;const t=Yn();return o.jsx(Vr,{schemas:((n=t.components)==null?void 0:n.schemas)??{},layout:e})}function vx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(kx,{layout:e})})}function Sx({layout:e}){const t=Yn();return t.info?o.jsx(Zl,{...t.info,layout:e}):null}function Ex({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(Sx,{layout:e})})}function jx({document:e,config:t,children:n}){const r=b.useMemo(()=>Mn(e),[e]);return o.jsx(Yo,{document:r,config:t,children:n})}const Xn=Wc(Yo,"OpenAPI","openapi");function Zn(){const e=ln();return e.specType==="openapi",e.document}function Ax({layout:e}){const t=Zn();return!t.servers||t.servers.length===0?null:o.jsx(Ic,{servers:t.servers,layout:e})}function Nx({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Ax,{layout:e})})}function Tx({layout:e}){var s;const t=Zn(),[n,r]=b.useState(null);return o.jsx(Lr,{paths:t.paths??{},security:t.security,securitySchemes:(s=t.components)==null?void 0:s.securitySchemes,selectedKey:n,onSelectKey:r,layout:e})}function _x({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Tx,{layout:e})})}function Cx({layout:e}){var i;const t=Zn(),[n,r]=b.useState(null),s=t.webhooks??{};return Object.keys(s).length===0?null:o.jsx(Lr,{paths:s,security:t.security,securitySchemes:(i=t.components)==null?void 0:i.securitySchemes,selectedKey:n,onSelectKey:r,columnLabel:"Webhook",idPrefix:"webhook",layout:e})}function $x({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Cx,{layout:e})})}function Ox({layout:e}){var n;const t=Zn();return o.jsx(Vr,{schemas:((n=t.components)==null?void 0:n.schemas)??{},layout:e})}function Ix({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Ox,{layout:e})})}function Rx({layout:e}){const t=Zn();return t.info?o.jsx(Oc,{info:t.info,tags:t.tags,externalDocs:t.externalDocs,layout:e}):null}function Mx({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Rx,{layout:e})})}exports.AsyncAPI=Jo;exports.AsyncAPIProvider=hx;exports.AsyncAPIRenderer=ux;exports.CodeBlock=Gr;exports.ErrorBoundary=lo;exports.Info=Ex;exports.Messages=wx;exports.OpenAPI=Xo;exports.OpenAPIEndpoints=_x;exports.OpenAPIInfo=Mx;exports.OpenAPIProvider=jx;exports.OpenAPIRenderer=px;exports.OpenAPISchemas=Ix;exports.OpenAPIServers=Nx;exports.OpenAPIWebhooks=$x;exports.Operations=bx;exports.SchemaTabs=Wt;exports.SchemaTree=Ko;exports.Schemas=vx;exports.Servers=gx;exports.X_LIB_CONVERSION_ERROR=Tr;exports.asyncApiOperationToMarkdown=hl;exports.asyncApiToMarkdown=Eo;exports.commonjsGlobal=Ff;exports.defaultConfig=an;exports.documentToLlmsTxt=tx;exports.documentToMarkdown=ex;exports.ensureHljsLanguage=Cc;exports.getAugmentedNamespace=zf;exports.getDefaultExportFromCjs=No;exports.hljsLanguageForTarget=_c;exports.isHljsLanguageReady=Mr;exports.isProtobufSchemaFormat=Dn;exports.listDocumentTargets=qg;exports.markdownForLlm=Xa;exports.openApiEndpointToMarkdown=gl;exports.openApiToMarkdown=jo;exports.parseAndRender=lx;exports.parseAndRender$1=fx;exports.registerSchemaParserWithFallback=zc;exports.resolveLogo=Ao;exports.targetSlug=Fc;exports.useAsyncAPIDocument=Ue;exports.useDocumentContext=ln;
178
+ `))r(`// ${l}`);s(),r("socket.on('message', (data) => {"),r("console.log(data.toString());",1),r("});")}return i()}},on={};function Vn(e){if(on[e.info.key])throw new Error(`Target "${e.info.key}" is already registered`);on[e.info.key]={...e,clientsById:{...e.clientsById}}}function ct(e,t){const n=on[e];if(!n)throw new Error(`Cannot register client "${t.info.key}": target "${e}" is not registered. Call addTarget() first.`);if(n.clientsById[t.info.key])throw new Error(`Client "${t.info.key}" is already registered for target "${e}"`);n.clientsById[t.info.key]=t}function dg(){return Object.values(on).map(e=>({key:e.info.key,title:e.info.title,default:e.info.default,clients:Object.values(e.clientsById).map(t=>t.info)}))}function fg(e,t){const n=[];for(const r of dg()){const s=r.clients.filter(i=>Ym(e,t,i.protocol));s.length>0&&n.push({...r,default:s[0].key,clients:s})}return n}Vn({info:{key:"agent",title:"Agent Prompt",default:"ws"},clientsById:{}});ct("agent",tg);ct("agent",eg);Vn({info:{key:"javascript",title:"JavaScript",default:"ws"},clientsById:{}});ct("javascript",ug);ct("javascript",ig);ct("javascript",ag);Vn({info:{key:"python",title:"Python",default:"websockets"},clientsById:{}});ct("python",sg);ct("python",og);Vn({info:{key:"rust",title:"Rust",default:"tokio-tungstenite"},clientsById:{}});ct("rust",ng);ct("rust",rg);Vn({info:{key:"go",title:"Go",default:"gorilla"},clientsById:{}});ct("go",lg);ct("go",cg);var pg=class{constructor(e){this.document=e}convert(e,t,n,r={}){var a;const s=(a=on[t])==null?void 0:a.clientsById[n];if(!s){const l=Object.values(on).flatMap(c=>Object.keys(c.clientsById).map(u=>`${c.info.key}/${u}`));throw new Rm(t,n,l)}const i=Xm(this.document,e,s.info.protocol);return s.convert(i,r)}};const hg="javascript",mg="ws";function gg(e,t){return fg(e,t)}function Tc(e,t,n,r){try{return new pg(e).convert(t,n,r)}catch{return null}}function xg(e,t,n){if(t){for(const r of n)for(const s of r.clients)if(Tc(e,t,r.key,s.key)!==null)return`${r.key}:${s.key}`}return`${hg}:${mg}`}const bg={agent:"plaintext",c:"c",clojure:"clojure",crystal:"crystal",csharp:"csharp",go:"go",http:"http",java:"java",javascript:"javascript",json:"json",kotlin:"kotlin",node:"javascript",objc:"objectivec",ocaml:"ocaml",php:"php",powershell:"powershell",python:"python",r:"r",ruby:"ruby",rust:"rust",shell:"bash",swift:"swift"};function _c(e){return bg[e]??"plaintext"}const yg={c:()=>Promise.resolve().then(()=>require("./c-C_Sx7N-F.cjs")),clojure:()=>Promise.resolve().then(()=>require("./clojure-DWYEZwCD.cjs")),crystal:()=>Promise.resolve().then(()=>require("./crystal-BcGgviMR.cjs")),csharp:()=>Promise.resolve().then(()=>require("./csharp-yuAGIuP4.cjs")),go:()=>Promise.resolve().then(()=>require("./go-BpetKc7b.cjs")),http:()=>Promise.resolve().then(()=>require("./http--XH4hLDt.cjs")),java:()=>Promise.resolve().then(()=>require("./java-BIk0G-rH.cjs")),kotlin:()=>Promise.resolve().then(()=>require("./kotlin-kGuORR5a.cjs")),objectivec:()=>Promise.resolve().then(()=>require("./objectivec-CoeV81Tz.cjs")),ocaml:()=>Promise.resolve().then(()=>require("./ocaml-0j7KDjso.cjs")),php:()=>Promise.resolve().then(()=>require("./php-DF4zG2hq.cjs")),powershell:()=>Promise.resolve().then(()=>require("./powershell-CvydS3ek.cjs")),r:()=>Promise.resolve().then(()=>require("./r-CYaZnHkA.cjs")),ruby:()=>Promise.resolve().then(()=>require("./ruby-nPcbuC2a.cjs")),rust:()=>Promise.resolve().then(()=>require("./rust-DKnYCg2f.cjs")),swift:()=>Promise.resolve().then(()=>require("./swift-CAnH__EC.cjs"))};function Mr(e){return e==="plaintext"||!!at.getLanguage(e)}async function Cc(e){if(Mr(e))return;const t=yg[e];if(!t)return;const n=await t();at.registerLanguage(e,n.default)}function wg({operationId:e}){const{document:t,showCodeSamples:n}=ln(),r=b.useId(),s=b.useMemo(()=>e?gg(t,e):[],[t,e]),i=b.useMemo(()=>xg(t,e,s),[t,e,s]),[a,l]=b.useState(null),c=(a==null?void 0:a.document)===t&&a.operationId===e?a.selection:i,[u,d]=c.split(":"),f=_c(u),[,p]=b.useState(()=>Mr(f));b.useEffect(()=>{p(Mr(f));let h=!1;return Cc(f).then(()=>{h||p(!0)}),()=>{h=!0}},[f]);const m=b.useMemo(()=>e?Tc(t,e,u,d):null,[t,e,u,d]);return!n||!m?null:o.jsxs("div",{id:`operation-${e}-code-sample`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("label",{htmlFor:r,className:"text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Example"}),o.jsx("select",{id:r,value:c,onChange:h=>l({document:t,operationId:e,selection:h.target.value}),"aria-label":"Code sample language",className:"text-xs font-medium rounded-md border border-border bg-surface px-2 py-1 text-foreground-secondary focus:border-secondary-500 focus:ring-secondary-500",children:s.map(h=>o.jsx("optgroup",{label:h.title,children:h.clients.map(x=>o.jsx("option",{value:`${h.key}:${x.key}`,children:x.title},x.key))},h.key))})]}),o.jsx(Gr,{code:m,language:f})]})}function kg({op:e,id:t,focusSection:n=null}){var h;const r=b.useId(),s=e.messages??[],i=e.tags??[],a=e.bindings,l=e.traits,c=e.reply,u=e.externalDocs,d=e.security,f=a??(Array.isArray(l)?(h=l.find(x=>x.bindings))==null?void 0:h.bindings:void 0),p=e.action===Er.SEND,m=o.jsx("div",{className:"flex flex-col gap-2",children:s.map((x,k)=>o.jsx(Sc,{message:x,messageId:x.name,i:k},k))});return o.jsxs("div",{className:"flex flex-col gap-6",id:`operation-${t}-detail`,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono bg-primary-50 text-primary-600 border border-primary-200",children:["ID: ",t]}),(u==null?void 0:u.url)&&o.jsxs("a",{href:u.url,target:"_blank",rel:"noreferrer",title:u.description||u.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",o.jsx(zr,{className:"w-3.5 h-3.5"})]})]}),e.description&&o.jsx("div",{children:o.jsx(lt,{children:e.description})}),e.summary&&o.jsx("div",{children:o.jsx("p",{className:"text-sm text-foreground-secondary",children:e.summary})}),o.jsx(wg,{operationId:t}),d&&d.length>0&&o.jsxs("div",{id:`operation-${t}-security`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Operation Authorization"}),o.jsx(Wn,{ariaLabelledBy:r,forceExpanded:n==="security",trigger:o.jsx("span",{className:"text-xs font-normal text-foreground-muted bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:d.length}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:d})})})]}),f&&Object.entries(f).map(([x,k])=>k?o.jsxs("div",{id:`operation-${t}-bindings-${x}`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-1",children:"Operation configuration"}),o.jsx(wc,{protocol:x,bindings:k,focused:n===`binding:${x}`})]},x):null),c?o.jsx(Cm,{requestMessages:s,reply:c,isSend:p,operationId:t}):s.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:[o.jsx("span",{className:"font-bold",children:t})," ",p?"accepts":"expects",s.length>1?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold text-foreground-mute",children:"one of"}),"the following messages:"]}):" the following message:"]}),m]}),i.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Tags"}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map((x,k)=>o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-neutral-100 text-foreground-secondary",children:x.name},k))})]})]})}function $c({operations:e,selectedKey:t=null,onSelectKey:n,focusSection:r=null,layout:s}){const i=f=>n==null?void 0:n(f);if(!Object.keys(e).length)return null;const a=t?e[t]:null,l=Object.keys(e).map(f=>{var C;const p=e[f],m=p.channel,h=m==null?void 0:m.address,x=m==null?void 0:m.parameters,k=((C=p.action)==null?void 0:C.toUpperCase())??"",j=t===f;return o.jsxs("tr",{id:`operation-${f}`,onClick:()=>i(f),role:"button",tabIndex:0,"aria-label":`${k||"Operation"} ${h??f}`,"aria-current":j?"true":void 0,onKeyDown:E=>{E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),i(f))},className:`cursor-pointer hover:bg-neutral-50 ${j?"bg-neutral-50":""}`,children:[o.jsx("td",{className:"px-6 py-4 max-w-0 w-full",children:h&&o.jsx(Ct,{address:h,parameters:x,truncate:!0})}),o.jsx("td",{className:"px-6 py-4 w-32",children:o.jsx($t,{method:p.action,className:"w-24"})})]},f)}),c=a?a.channel:null,u=a&&(c!=null&&c.address)?o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx($t,{method:a.action}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:o.jsx(Ct,{address:c.address,parameters:c.parameters})})]}):t??"Operation",d=o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100 w-full",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Operation"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"})]})}),o.jsx("tbody",{className:"bg-surface divide-y divide-border",children:l})]})});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:zu,content:d,stickySideContent:!1,layout:s})}),o.jsx(vc,{isOpen:!!a,side:"right",onClose:()=>i(null),title:u,children:a&&o.jsx(kg,{op:a,id:t,focusSection:r})})]})}function Vr({schemas:e,selectedKey:t,focusTarget:n,layout:r}){const{deref:s}=Ue(),i=So(),a=b.useMemo(()=>Object.entries(e).map(([c,u])=>[c,On(u,s)]),[e,s,i]),l=a.length?o.jsx("div",{className:"grid gap-6 w-full",children:a.map(([c,u])=>{const d=u.schema,f=ul(u.schemaFormat),p=d.properties?Object.keys(d.properties).length:0;return o.jsxs("article",{id:`schema-${c}`,className:`rounded-xl border bg-surface p-5 shadow-sm transition-colors ${t===c?"border-primary-300 ring-1 ring-primary-200":"border-border"}`,children:[o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-base font-semibold text-foreground",children:c}),u.description&&o.jsx("p",{className:"mt-1 text-sm text-foreground-secondary",children:u.description})]}),o.jsx("span",{className:"inline-flex rounded-full bg-neutral-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-foreground-secondary",children:d.type??"unknown"})]}),(d.format||f||p>0)&&o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-foreground-secondary",children:[d.format&&o.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:["Format: ",d.format]}),f&&o.jsx("span",{className:"rounded-full bg-neutral-100 px-3 py-1",title:u.schemaFormat,children:f}),p>0&&o.jsxs("span",{className:"rounded-full bg-neutral-100 px-3 py-1",children:[p," properties"]})]}),u.conversionError&&o.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded px-2 py-1.5",children:["Could not convert"," ",dl(u.schemaFormat)??"the"," schema — showing raw definition. ",u.conversionError]}),u.pendingConversion&&o.jsx("p",{className:"mt-4 text-xs text-foreground-muted",children:"Loading Protobuf definition…"}),u.pendingConversion?null:u.conversionError&&typeof u.originalSchema=="string"?o.jsx("div",{className:"mt-4",children:o.jsx(Ql,{schema:u.originalSchema})}):o.jsx(Ko,{schema:d,rootName:c,className:"mt-4",focusTokens:c===t?(n==null?void 0:n.tokens)??null:null,focusId:c===t?(n==null?void 0:n.id)??null:null})]},c)})}):o.jsx("div",{className:"mt-10 rounded-xl border border-dashed border-neutral-300 bg-surface p-8 text-center text-sm text-foreground-muted",children:"No schemas defined in this AsyncAPI document."});return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:l,stickySideContent:!1,layout:r})})}const vg=e=>e==="operations"||e==="messages"||e==="schemas";function Sg({asyncapi:e,config:t}){var N,W,ie,oe;const n=t.show??{},[r,s]=b.useState(!1),[i,a]=b.useState(!1),l=n.search!==!1||n.copyMarkdown!==!1,c=n.info!==!1&&Yl(e.info),u=l||c,d=[...n.operations!==!1?[{id:"operations",name:"Operations",icon:Br}]:[],...n.messages!==!1?[{id:"messages",name:"Messages",icon:Ka}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:ho}]:[]],{query:f,setQuery:p,results:m}=cf(e,{threshold:.3,limit:20}),{effectiveTab:h,focusTab:x,navActiveSection:k,selected:j,setSelectedKey:C,selectedNavItem:E,handleSearchSelect:R,handleNavItemSelect:D,handleNavServerSelect:_,handleContentTabChange:A,focusSection:v,schemaFocusTarget:y}=ll({tabs:d,defaultTab:"operations",isTabKey:vg,sections:[{id:"operations",visible:n.operations!==!1},{id:"messages",visible:n.messages!==!1},{id:"schemas",visible:n.schemas!==!1},{id:"servers",visible:n.servers!==!1}],searchQuery:f}),F=e.servers?Object.keys(e.servers):[],Z=h==="operations"?o.jsx($c,{operations:e.operations??{},selectedKey:j.operations,onSelectKey:S=>C("operations",S),focusSection:v}):h==="messages"?o.jsx(pc,{messages:((N=e.components)==null?void 0:N.messages)??{},selectedKey:j.messages,focusSection:v}):h==="schemas"?o.jsx(Vr,{schemas:((W=e.components)==null?void 0:W.schemas)??{},selectedKey:j.schemas,focusTarget:y}):null;return o.jsx(co,{document:e,config:t,children:o.jsxs("div",{className:`px-4 ${u&&d.length>0?"pt-14":""}`,children:[u&&o.jsxs(za,{logo:c?o.jsx(Ho,{source:e.info}):void 0,forceVisible:r||i,children:[n.search!==!1&&o.jsx(Va,{query:f,onQueryChange:p,results:m,onSelectResult:R,onOpenChange:s}),n.copyMarkdown!==!1&&o.jsx(Za,{serialize:S=>Eo(e,S),onOpenChange:a})]}),n.info!==!1&&o.jsx("div",{id:"info-panel",children:o.jsx(Zl,{...e.info,showLogo:!1})}),n.servers!==!1&&F.length>0&&o.jsx("div",{id:`server-${j.servers??F[0]}`,children:o.jsx(kc,{servers:e.servers,selectedServer:j.servers,onSelectServer:S=>C("servers",S),focusSection:v})}),n.sidebar!==!1&&o.jsx(ld,{operations:n.operations!==!1?e.operations:void 0,messages:n.messages!==!1?(ie=e.components)==null?void 0:ie.messages:void 0,schemas:n.schemas!==!1?(oe=e.components)==null?void 0:oe.schemas:void 0,servers:n.servers!==!1?e.servers:void 0,hasInfo:n.info!==!1,sidebarConfig:t.sidebar,activeTab:k,onTabChange:x,onItemSelect:D,onSelectServer:_,selectedItem:E}),o.jsx(Fa,{tabs:d,current:h,onChange:A}),h&&o.jsx("div",{id:`panel-${h}`,role:"tabpanel","aria-labelledby":`tab-${h}`,children:Z})]})})}const Jo=e=>o.jsx(lo,{fallback:e.errorFallback,onError:e.onError,children:o.jsx(Eg,{...e})}),Eg=e=>{const t=e.asyncapi,n=b.useMemo(()=>Ln(t),[t]),r=e.kind;b.useEffect(()=>{r==="resolved"&&n!==t&&ao(t)&&console.warn('[apiuikit] <AsyncAPI kind="resolved"> received a document that still contains $ref nodes. They were resolved anyway; fix the upstream resolution or drop the kind prop.')},[r,t,n]);const s=e.config??an;return o.jsx(Sg,{asyncapi:n,config:s})};function Yo({document:e,config:t=an,className:n="",children:r}){const{contextValue:s,themeVars:i,setPortalHost:a,setRootElement:l}=La("openapi",e,t);return o.jsx(Dr.Provider,{value:s,children:o.jsxs("div",{ref:l,style:i,className:`apiuikit-root relative @container bg-background text-foreground ${n}`,children:[o.jsx("div",{ref:a,className:"openapi-portal-root"}),r]})})}function jg(e){var r;const t=[];if(e.info){const s=e.info.title??"Info";t.push({id:"info-panel",targetId:"info-panel",type:"info",tab:"info",key:"info",name:s,path:"info",location:"Info",subtitle:e.info.description,text:Ve([e.info,e.tags,e.externalDocs])})}e.servers&&e.servers.forEach((s,i)=>{const a=`server-${i}`;t.push({id:a,targetId:a,type:"server",tab:"servers",key:a,name:s.description??s.url??a,path:`servers[${i}]`,location:`Servers > ${s.url??a}`,subtitle:s.url,text:Ve([s.url,s.description,s.variables])})});const n=(s,{tab:i,type:a,idPrefix:l,docKey:c,sectionLabel:u})=>{for(const d of Object.keys(s)){const f=s[d];if(f)for(const p of Fr){const m=f[p];if(!m)continue;const h=`${p} ${d}`,x=m.summary??`${p.toUpperCase()} ${d}`;t.push({id:`${l}-${h}`,targetId:`${l}-${h}-detail`,type:a,tab:i,key:h,name:x,path:`${c}.${d}.${p}`,location:`${u} > ${p.toUpperCase()} ${d}`,subtitle:m.description,text:Ve([p,d,m.summary,m.description,m.operationId,m.tags,m.parameters,m.security])})}}};if(e.paths&&n(e.paths,{tab:"endpoints",type:"endpoint",idPrefix:"endpoint",docKey:"paths",sectionLabel:"Endpoints"}),e.webhooks&&n(e.webhooks,{tab:"webhooks",type:"webhook",idPrefix:"webhook",docKey:"webhooks",sectionLabel:"Webhooks"}),(r=e.components)!=null&&r.schemas)for(const[s,i]of Object.entries(e.components.schemas))Qa(t,i,s,s);return t}function Ag(e,t={}){return il(e,jg,t)}function Oc({info:e,tags:t,externalDocs:n,layout:r,showLogo:s}){const{title:i,description:a,license:l,contact:c}=e;return o.jsx(Xl,{title:i,description:a,license:l,contact:c,externalDocs:n,tags:t,extensionsSource:e,layout:r,showLogo:s})}function Ng({url:e,description:t,variables:n}){return o.jsxs("div",{children:[o.jsx(gc,{address:e,variables:n}),t&&o.jsx(lt,{children:t})]})}const _s=e=>`server-${e}`,Cs=e=>Number(e.slice(7));function Ic({servers:e,selectedServer:t,onSelectServer:n,layout:r}){const s=e.map((p,m)=>p.url||_s(m)),[i,a]=b.useState(void 0),l=p=>!!p&&Cs(p)>=0&&Cs(p)<e.length,c=l(t)?t:l(i)?i:_s(0),u=e[Cs(c)],d=p=>{a(p),n==null||n(p)},f=u?o.jsx(Ng,{...u}):null;return o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{title:Ra,content:f,sideContent:o.jsx(hc,{serverNames:s,current:(u==null?void 0:u.url)||c,setCurrent:p=>{const m=s.indexOf(p);d(m>=0?_s(m):p)}}),stickySideContent:!0,reverseLayoutOnMobile:!0,layout:r})})}function Tg({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 11v5"}),o.jsx("path",{d:"M12 8h.01"})]})}function Rc(e){return typeof e!="string"?JSON.stringify(e):e.startsWith("$")?e.slice(1).replace(/#\//g,".").replace(/\//g,"."):e}function _g(e){return e.replace(/\{\$([^}]+)\}/g,(t,n)=>`{${Rc(`$${n}`)}}`)}function Cg(e){return e.operationId??e.operationRef??null}const $g=e=>e.trim().replace(/[.:;]+$/,""),$s=({children:e})=>o.jsx("code",{className:"font-mono text-foreground-secondary",children:e});function Og({links:e,onFollowOperation:t,isOperationKnown:n}){return o.jsx("div",{className:"mt-3 space-y-1",children:Object.entries(e).map(([r,s])=>{var d;const i=Cg(s),a=Object.entries(s.parameters??{}),l=s.description?$g(s.description):null,c=!!s.operationId&&!!t&&!!(n!=null&&n(s.operationId)),u=l??i??r;return o.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-foreground-muted leading-relaxed",children:[o.jsx(Tg,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),o.jsxs("span",{children:[c?o.jsx("button",{type:"button",onClick:()=>t(s.operationId),className:"text-primary-600 underline underline-offset-2 hover:text-primary-500",children:u}):o.jsx("span",{className:"text-foreground-secondary",children:u}),a.length>0&&o.jsxs(o.Fragment,{children:[" using ",a.map(([f,p],m)=>o.jsxs(b.Fragment,{children:[m>0&&(m===a.length-1?" and ":", "),o.jsx($s,{children:f})," from ",o.jsx($s,{children:Rc(p)})]},f))]}),(d=s.server)!=null&&d.url?o.jsxs(o.Fragment,{children:[" via ",o.jsx($s,{children:s.server.url})]}):null,"."]})]},r)})})}function Ig(e){return Object.entries(e).flatMap(([t,n])=>Object.entries(n??{}).flatMap(([r,s],i)=>Fr.filter(a=>s==null?void 0:s[a]).map(a=>({name:t,url:r,method:a,op:s[a],urlIndex:i}))))}function Rg({callbacks:e,id:t,renderOperation:n,depth:r}){const s=Ig(e);return s.length===0?null:o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-foreground-muted mb-3",children:"Requests the API sends to you after this operation, not ones you call."}),o.jsx("div",{className:"space-y-2",children:s.map(({name:i,url:a,method:l,op:c,urlIndex:u})=>o.jsx(Wn,{trigger:o.jsxs("span",{className:"flex items-center gap-2 text-xs font-normal min-w-0",children:[o.jsx($t,{method:l,size:"xs",className:"shrink-0"}),o.jsx("span",{className:"font-medium text-foreground-secondary shrink-0",children:i}),o.jsx("code",{className:"font-mono text-foreground-muted truncate",children:_g(a)})]}),children:o.jsx("div",{className:"px-4 py-3 border-t border-border",children:o.jsx(n,{method:l,path:a,op:c,id:`${t}-${i}-${u}-${l}`,idPrefix:"callback",depth:r+1})})},`${i}-${u}-${l}`))})]})}const Mg=b.lazy(()=>Promise.resolve().then(()=>require("./CodeSamples-2SM4kvQP.cjs")).then(({CodeSamples:e})=>({default:e})));function Lg(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Mc({prefix:e,mediaTypes:t,selected:n,onChange:r}){return t.length<=1?o.jsx(o.Fragment,{children:t[0]?`${e} (${t[0]})`:e}):o.jsxs(o.Fragment,{children:[e," (",o.jsx("select",{"aria-label":`${e} media type`,value:n,onChange:s=>r(s.target.value),className:"bg-transparent border-0 p-0 cursor-pointer underline decoration-dotted focus:outline-none",children:t.map(s=>o.jsx("option",{value:s,children:s},s))}),")"]})}function Lc(e){if(!e)return;if(e.example!==void 0)return e.example;const t=e.examples?Object.values(e.examples)[0]:void 0;return t&&"value"in t?t.value:void 0}function Pg(e){return e.startsWith("2")?"bg-green-100 text-green-800":e.startsWith("4")||e.startsWith("5")?"bg-red-100 text-red-800":"bg-neutral-100 text-foreground-secondary"}function Dg({responses:e,onFollowOperation:t,isOperationKnown:n}){var _,A;const r=Object.keys(e),[s,i]=b.useState(r[0]),a=e[s],l=Object.keys((a==null?void 0:a.content)??{}),[c,u]=b.useState(l[0]),d=c?(_=a==null?void 0:a.content)==null?void 0:_[c]:void 0,f=(a==null?void 0:a.headers)??{},p=(a==null?void 0:a.links)??{},[m,h]=b.useState("body"),x=l.length>0&&!!d,k=Object.keys(f).length>0,j=Object.keys(p).length>0,C=[...x?[{id:"body",name:"Body"}]:[],...k?[{id:"headers",name:"Headers"}]:[]],E=C.length>1,R=C.some(v=>v.id===m)?m:(A=C[0])==null?void 0:A.id,D=C.length>0;return b.useEffect(()=>{u(Object.keys((a==null?void 0:a.content)??{})[0]),h("body")},[s]),o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center gap-1.5 flex-wrap mb-3",role:"tablist","aria-label":"Response status",children:r.map(v=>o.jsx("button",{role:"tab","aria-selected":s===v,onClick:()=>i(v),className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-mono transition-all ${Pg(v)} ${s===v?"ring-1 ring-inset ring-foreground-muted/40":"opacity-50 hover:opacity-80"}`,children:v},v))}),(a==null?void 0:a.description)&&o.jsx("p",{className:"text-sm text-foreground-secondary mb-3",children:a.description}),D?o.jsxs(o.Fragment,{children:[E&&o.jsx(un,{tabs:C,current:R,onChange:v=>h(v)}),o.jsx("div",{className:E?"mt-4":void 0,children:R==="headers"?o.jsx(Wt,{schema:Fg(f),label:"Headers",rootName:"Headers",defaultView:"schema"},"headers"):o.jsx(Wt,{schema:(d==null?void 0:d.schema)??{},label:o.jsx(Mc,{prefix:"Body",mediaTypes:l,selected:c,onChange:u}),rootName:"Body",example:Lc(d)},"body")})]}):o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No response body."}),j&&o.jsx(Og,{links:p,onFollowOperation:t,isOperationKnown:n})]})}function Pc(e){const t={},n=[];for(const r of e){const s=r.schema??{};t[r.name]={...s,description:s.description??r.description},r.required&&n.push(r.name)}return{type:"object",properties:t,...n.length>0?{required:n}:{}}}const Bg=e=>Pc(e),Fg=e=>Pc(Object.entries(e).map(([t,n])=>({name:t,...n})));function zg({parameters:e}){var l;const t=Wu.filter(({location:c})=>e.some(u=>u.in===c)),[n,r]=b.useState(((l=t[0])==null?void 0:l.location)??null);if(t.length===0)return null;const s=t.some(c=>c.location===n)?n:t[0].location,i=t.find(c=>c.location===s),a=Bg(e.filter(c=>c.in===s));return o.jsxs("div",{children:[t.length>1&&o.jsx(un,{tabs:t.map(({location:c,label:u})=>({id:c,name:u.replace(/ Parameters$/,"")})),current:s,onChange:r}),o.jsx("div",{className:t.length>1?"mt-4":void 0,children:o.jsx(Wt,{schema:a,label:i.label,rootName:i.label,defaultView:"schema"})})]})}function Ug({label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r}){const s=t.length>0,i=Object.keys(n),a=i.length>0,[l,c]=b.useState(s?"parameters":"body"),[u,d]=b.useState(i[0]),f=u?n[u]:void 0;if(!s&&!a)return o.jsx("p",{className:"text-xs text-foreground-muted italic",children:"No request body or parameters."});const p=[a?"request body":null,t.some(m=>m.in==="header")?"headers":null,t.some(m=>m.in==="cookie")?"cookie":null].filter(m=>!!m);return o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-3",children:[o.jsx("span",{className:"font-bold",children:e})," expects the following ",Hg(p),":"]}),s&&a&&o.jsx(un,{tabs:[{id:"parameters",name:"Parameters"},{id:"body",name:"Request Body"}],current:l,onChange:m=>c(m)}),o.jsxs("div",{className:s&&a?"mt-4":void 0,children:[(l==="parameters"||!a)&&s&&o.jsx(zg,{parameters:t}),(l==="body"||!s)&&a&&f&&o.jsx(Wt,{schema:f.schema??{},label:o.jsx(Mc,{prefix:"Request Body",mediaTypes:i,selected:u,onChange:d}),rootName:"Body ",description:r,example:Lc(f)})]})]})}function Hg(e){return e.length<=1?e[0]??"request":e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function Wg({label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r,responses:s,callbacks:i,id:a,depth:l,fillHeight:c=!1,onFollowOperation:u,isOperationKnown:d}){const f=t.length>0||Object.keys(n).length>0,p=Object.keys(s).length>0,m=!!i&&Object.keys(i).length>0&&l<Gg,h=[...f?["request"]:[],...p?["response"]:[],...m?["callbacks"]:[]],[x,k]=b.useState(h[0]??"request");if(h.length===0)return null;const j=h.includes(x)?x:h[0];return o.jsxs("div",{className:c?"flex-1 flex flex-col min-h-0":void 0,children:[o.jsx("div",{className:"flex items-end gap-0.5 -ml-2",role:"tablist","aria-label":"Operation exchange",children:h.map(C=>o.jsx("button",{role:"tab","aria-selected":j===C,onClick:()=>k(C),className:`px-3 py-1.5 text-sm font-medium rounded-t-md transition-colors capitalize ${j===C?"bg-neutral-100 text-foreground border border-b-0 border-border":"text-foreground-muted hover:text-foreground-secondary"}`,children:C},C))}),o.jsxs("div",{className:`-mx-5 px-5 py-4 bg-neutral-100 border-t border-border min-h-32 ${c?"flex-1 -mb-4":""}`,children:[j==="request"&&o.jsx(Ug,{label:e,parameters:t,requestBodyContent:n,requestBodyDescription:r}),j==="response"&&o.jsx(Dg,{responses:s,onFollowOperation:u,isOperationKnown:d}),j==="callbacks"&&i&&o.jsx(Rg,{callbacks:i,id:a,depth:l,renderOperation:Dc})]})]})}const Gg=1;function Dc({method:e,path:t,op:n,id:r,idPrefix:s="endpoint",globalSecurity:i,securitySchemes:a,onFollowOperation:l,isOperationKnown:c,depth:u=0}){var C,E,R;const d=(n.parameters??[]).filter(D=>D.in!=="query"&&D.in!=="path"),f=n.security??i??[],p=n.responses??{},m=((C=n.requestBody)==null?void 0:C.content)??{},h=n.operationId?Lg(n.operationId):`${e.toUpperCase()} ${t}`,x=new Map;for(const D of f)for(const[_,A]of Object.entries(D)){if(A.length===0)continue;const v=x.get(_)??[];x.set(_,Array.from(new Set([...v,...A])))}const k=Array.from(new Set(f.flatMap(D=>Object.keys(D)))).map(D=>{const _=a==null?void 0:a[D];if(!_)return null;const A=x.get(D);return A?{..._,requiredScopes:A}:_}).filter(D=>!!D),j=u===0;return o.jsxs("div",{className:`flex flex-col gap-6 ${j?"min-h-full":""}`,id:`${s}-${r}-detail`,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[n.deprecated&&o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-amber-100 text-amber-800",children:"Deprecated"}),((E=n.externalDocs)==null?void 0:E.url)&&o.jsxs("a",{href:n.externalDocs.url,target:"_blank",rel:"noreferrer",title:n.externalDocs.description||n.externalDocs.url,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-neutral-100 text-foreground-secondary border border-border hover:bg-neutral-200 transition-colors",children:["External Documentation",o.jsx(zr,{className:"w-3.5 h-3.5"})]})]}),n.summary&&o.jsx("p",{className:"text-sm text-foreground-secondary",children:n.summary}),n.description&&o.jsx(lt,{children:n.description}),o.jsx(b.Suspense,{fallback:null,children:o.jsx(Mg,{method:e,path:t,parameters:d,requestBody:n.requestBody,security:f,id:r})}),f.length>0&&o.jsxs("div",{id:`${s}-${r}-security`,children:[o.jsx("p",{className:"text-xs font-medium text-foreground-muted uppercase tracking-wider mb-2",children:"Authorization"}),k.length>0&&o.jsx(Wn,{className:"mt-3",trigger:o.jsxs("span",{className:"flex items-center gap-2 text-xs font-normal text-foreground-muted",children:[o.jsx(mc,{className:"h-4 w-4 text-foreground-muted"}),o.jsx("span",{className:"bg-neutral-100 border border-border rounded-full px-2 py-0.5",children:k.length})]}),children:o.jsx("div",{className:"px-4 py-2 border-t border-border",children:o.jsx(Vo,{securities:k})})})]}),o.jsx(Wg,{label:h,parameters:d,requestBodyContent:m,requestBodyDescription:(R=n.requestBody)==null?void 0:R.description,responses:p,callbacks:n.callbacks,id:r,depth:u,fillHeight:j,onFollowOperation:l,isOperationKnown:c})]})}function Kg(e,t){const n=t.filter(r=>r.in==="query");return n.length===0?e:`${e}?${n.map(r=>`${r.name}={${r.name}}`).join("&")}`}function Ca(e){var n;const t={};for(const r of e){const s=r.schema;t[r.name]={description:r.description,type:s==null?void 0:s.type,default:(s==null?void 0:s.default)!==void 0?String(s.default):void 0,enum:(n=s==null?void 0:s.enum)==null?void 0:n.map(String),examples:"example"in r&&r.example!==void 0?[String(r.example)]:void 0}}return t}function Lr({paths:e,security:t,securitySchemes:n,selectedKey:r=null,onSelectKey:s,columnLabel:i="Path",idPrefix:a="endpoint",layout:l}){var _;const c=A=>s==null?void 0:s(A),u=b.useMemo(()=>Tn(e),[e]),d=b.useMemo(()=>{var v,y,F;const A=new Map;for(const Z of u){const N=((F=(y=(v=e[Z.path])==null?void 0:v[Z.method])==null?void 0:y.tags)==null?void 0:F[0])||"Other",W=A.get(N)??[];W.push(Z),A.set(N,W)}return Array.from(A,([Z,N])=>({label:Z,items:N}))},[u,e]),[f,p]=b.useState(()=>new Set),m=f.size===0;b.useEffect(()=>{if(!r)return;const A=d.find(({items:v})=>v.some(({key:y})=>y===r));A&&p(v=>{if(!v.has(A.label))return v;const y=new Set(v);return y.delete(A.label),y})},[d,r]);const h=b.useMemo(()=>{var v,y;const A=new Map;for(const{key:F,method:Z,path:N}of u){const W=(y=(v=e[N])==null?void 0:v[Z])==null?void 0:y.operationId;W&&A.set(W,F)}return A},[u,e]);if(u.length===0)return null;const x=r?u.find(A=>A.key===r):null,k=x?(_=e[x.path])==null?void 0:_[x.method]:null,j=({key:A,method:v,path:y},F)=>{var W;const Z=r===A,N=Pi(e[y],(W=e[y])==null?void 0:W[v]);return o.jsxs("tr",{id:`${a}-${A}`,onClick:()=>c(A),role:"button",tabIndex:F?0:-1,"aria-hidden":!F,"aria-label":`${v.toUpperCase()} ${y}`,"aria-current":Z?"true":void 0,onKeyDown:ie=>{ie.key!=="Enter"&&ie.key!==" "||(ie.preventDefault(),c(A))},className:`group transition-[opacity,visibility] duration-300 ease-in-out ${F?`cursor-pointer opacity-100 visible ${Z?"bg-neutral-50":""}`:"pointer-events-none invisible opacity-0"}`,children:[o.jsx("td",{className:`px-6 max-w-0 w-full group-hover:bg-neutral-50 transition-[padding] duration-300 ease-in-out ${F?"py-2":"py-0"}`,children:o.jsx("div",{className:`overflow-hidden transition-[max-height] duration-300 ease-in-out ${F?"max-h-12":"max-h-0"}`,children:o.jsx(Ct,{address:y,parameters:Ca(N),truncate:!0,className:"text-xs"})})}),o.jsx("td",{className:`px-6 w-28 group-hover:bg-neutral-50 transition-[padding] duration-300 ease-in-out ${F?"py-2":"py-0"}`,children:o.jsx("div",{className:`overflow-hidden transition-[max-height] duration-300 ease-in-out ${F?"max-h-12":"max-h-0"}`,children:o.jsx($t,{method:v,className:"w-20"})})})]},A)},C=d.map(({label:A,items:v},y)=>{const F=!f.has(A),Z=`${a}-group-${y}-${A.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;return o.jsxs(b.Fragment,{children:[o.jsx("tbody",{className:"border-y border-border first:border-t-0",children:o.jsx("tr",{className:"bg-neutral-50/70",children:o.jsx("th",{colSpan:2,scope:"rowgroup",className:"p-0 text-left",children:o.jsxs("button",{type:"button","aria-label":`${A} endpoints (${v.length})`,"aria-expanded":F,"aria-controls":Z,onClick:()=>p(N=>{const W=new Set(N);return F?W.add(A):W.delete(A),W}),className:"group/header flex w-full items-center gap-3 px-6 py-3.5 text-left hover:bg-neutral-100/80 transition-colors",children:[o.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-surface text-foreground-muted shadow-sm transition-colors group-hover/header:border-neutral-300 group-hover/header:text-foreground-secondary",children:F?o.jsx(cn,{className:"h-2.5 w-2.5"}):o.jsx(xc,{className:"h-2.5 w-2.5"})}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold tracking-wide text-foreground-secondary",children:A}),o.jsx("span",{className:"inline-flex min-w-6 items-center justify-center rounded-full bg-neutral-200/70 px-2 py-0.5 text-xs font-medium tabular-nums text-foreground-muted",children:v.length})]})})})}),o.jsx("tbody",{id:Z,"aria-hidden":!F,className:`bg-surface ${F?"divide-y divide-border":""}`,children:v.map(N=>j(N,F))})]},A)}),E=Pi(x?e[x.path]:void 0,k),R=x?o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx($t,{method:x.method}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:o.jsx(Ct,{address:Kg(x.path,E),parameters:Ca(E),className:"text-xs"})})]}):r,D=o.jsxs("div",{children:[o.jsx("div",{className:"mb-3 flex justify-end",children:o.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-foreground-secondary",children:[o.jsx("input",{type:"checkbox",checked:m,onChange:A=>p(A.target.checked?new Set:new Set(d.map(({label:v})=>v))),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),p(m?new Set(d.map(({label:v})=>v)):new Set))},className:"h-3.5 w-3.5 cursor-pointer rounded border-border"}),o.jsx("span",{children:"Expand all"})]})}),o.jsx("div",{className:"bg-surface rounded-lg border border-border overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-neutral-100 w-full",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-5 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:i}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-foreground-muted uppercase tracking-wider",children:"Method"})]})}),C]})})]});return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex justify-center w-full",children:o.jsx(Ot,{content:D,stickySideContent:!1,layout:l})}),o.jsx(vc,{isOpen:!!x,side:"right",onClose:()=>c(null),title:R,children:x&&k&&o.jsx(Dc,{method:x.method,path:x.path,op:{...k,parameters:E},id:x.key,idPrefix:a,globalSecurity:t,securitySchemes:n,isOperationKnown:A=>h.has(A),onFollowOperation:A=>{const v=h.get(A);v&&c(v)}})})]})}const Vg=e=>e==="endpoints"||e==="webhooks"||e==="schemas";function Jg({openapi:e,config:t}){var W,ie,oe,S;const n=t.show??{},[r,s]=b.useState(!1),[i,a]=b.useState(!1),l=n.search!==!1||n.copyMarkdown!==!1,c=n.info!==!1&&Yl(e.info),u=l||c,d=e.webhooks??{},f=Object.keys(d).length>0,p=[...n.endpoints!==!1?[{id:"endpoints",name:"Endpoints",icon:Br}]:[],...f&&n.webhooks!==!1?[{id:"webhooks",name:"Webhooks",icon:mo}]:[],...n.schemas!==!1?[{id:"schemas",name:"Schemas",icon:ho}]:[]],{query:m,setQuery:h,results:x}=Ag(e,{threshold:.3,limit:20}),{effectiveTab:k,focusTab:j,navActiveSection:C,selected:E,setSelectedKey:R,selectedNavItem:D,handleSearchSelect:_,handleNavItemSelect:A,handleNavServerSelect:v,handleContentTabChange:y,schemaFocusTarget:F}=ll({tabs:p,defaultTab:"endpoints",isTabKey:Vg,sections:[{id:"endpoints",visible:n.endpoints!==!1},{id:"webhooks",visible:f&&n.webhooks!==!1},{id:"schemas",visible:n.schemas!==!1},{id:"servers",visible:n.servers!==!1}],searchQuery:m}),Z=(e.servers??[]).map(T=>T.url),N=k==="endpoints"?o.jsx(Lr,{paths:e.paths??{},security:e.security,securitySchemes:(W=e.components)==null?void 0:W.securitySchemes,selectedKey:E.endpoints,onSelectKey:T=>R("endpoints",T)}):k==="webhooks"?o.jsx(Lr,{paths:d,security:e.security,securitySchemes:(ie=e.components)==null?void 0:ie.securitySchemes,selectedKey:E.webhooks,onSelectKey:T=>R("webhooks",T),columnLabel:"Webhook",idPrefix:"webhook"}):k==="schemas"?o.jsx(Vr,{schemas:((oe=e.components)==null?void 0:oe.schemas)??{},selectedKey:E.schemas,focusTarget:F}):null;return o.jsx(Yo,{document:e,config:t,children:o.jsxs("div",{className:`px-4 ${u&&p.length>0?"pt-14":""}`,children:[u&&o.jsxs(za,{logo:c?o.jsx(Ho,{source:e.info}):void 0,forceVisible:r||i,children:[n.search!==!1&&o.jsx(Va,{query:m,onQueryChange:h,results:x,onSelectResult:_,onOpenChange:s}),n.copyMarkdown!==!1&&o.jsx(Za,{serialize:T=>jo(e,T),onOpenChange:a})]}),n.info!==!1&&o.jsx("div",{id:"info-panel",children:o.jsx(Oc,{info:e.info,tags:e.tags,externalDocs:e.externalDocs,showLogo:!1})}),n.servers!==!1&&Z.length>0&&o.jsx("div",{id:E.servers??"server-0",children:o.jsx(Ic,{servers:e.servers,selectedServer:E.servers,onSelectServer:T=>R("servers",T)})}),n.sidebar!==!1&&o.jsx(fd,{paths:n.endpoints!==!1?e.paths:void 0,webhooks:f&&n.webhooks!==!1?d:void 0,schemas:n.schemas!==!1?(S=e.components)==null?void 0:S.schemas:void 0,servers:n.servers!==!1?Z:void 0,hasInfo:n.info!==!1,activeTab:C,onTabChange:j,onItemSelect:A,onSelectServer:v,selectedItem:D}),o.jsx(Fa,{tabs:p,current:k,onChange:y}),k&&o.jsx("div",{id:`panel-${k}`,role:"tabpanel","aria-labelledby":`tab-${k}`,children:N})]})})}const Xo=e=>o.jsx(lo,{fallback:e.errorFallback,onError:e.onError,children:o.jsx(Yg,{...e})}),Yg=e=>{const t=e.openapi,n=b.useMemo(()=>Ln(t),[t]),r=e.kind;b.useEffect(()=>{r==="resolved"&&n!==t&&ao(t)&&console.warn('[apiuikit] <OpenAPI kind="resolved"> received a document that still contains $ref nodes. They were resolved anyway; fix the upstream resolution or drop the kind prop.')},[r,t,n]);const s=e.config??an;return o.jsx(Jg,{openapi:n,config:s})};function Bc(e){return{...e,title:t=>e.title(t),summary:t=>e.summary(t),targets:t=>e.targets(t),toMarkdown:(t,n)=>e.toMarkdown(t,n)}}const rn=e=>{var n;return typeof e!="string"?void 0:((n=e.trim().split(`
179
+ `)[0])==null?void 0:n.trim())||void 0},Xg=e=>Fr.some(t=>t===e),Zg=Bc({name:"OpenAPI",matches:e=>typeof e.openapi=="string"||typeof e.swagger=="string",sectionTitle:"Endpoints",title:e=>{var t;return((t=e.info)==null?void 0:t.title)??"API"},summary:e=>{var t;return rn((t=e.info)==null?void 0:t.description)},targets:e=>Tn(e.paths??{}).map(({key:t,method:n,path:r})=>{var i,a;const s=(a=(i=e.paths)==null?void 0:i[r])==null?void 0:a[n];return{key:t,label:`${n.toUpperCase()} ${r}`,summary:rn(s==null?void 0:s.summary)??rn(s==null?void 0:s.description),target:{kind:"operation",document:e,method:n,path:r}}}),toMarkdown:(e,t)=>{if(!t||t.kind==="document")return jo(e);if(typeof t.path!="string"||!Xg(t.method))throw new Error("[apiuikit] An OpenAPI operation target requires a valid method and path.");return gl(e,t.method,t.path)}}),Qg=Bc({name:"AsyncAPI",matches:e=>typeof e.asyncapi=="string",sectionTitle:"Operations",title:e=>{var t;return((t=e.info)==null?void 0:t.title)??"API"},summary:e=>{var t;return rn((t=e.info)==null?void 0:t.description)},targets:e=>Object.entries(e.operations??{}).map(([t,n])=>({key:t,label:n!=null&&n.action?`${n.action.toUpperCase()} ${t}`:t,summary:rn(n==null?void 0:n.summary)??rn(n==null?void 0:n.description),target:{kind:"operation",document:e,id:t}})),toMarkdown:(e,t)=>{if(!t||t.kind==="document")return Eo(e);if(typeof t.id!="string"||!t.id)throw new Error("[apiuikit] An AsyncAPI operation target requires an operation id.");return hl(e,t.id)}}),$a=[Zg,Qg];function Zo(e){const t=typeof e=="object"&&e!==null?e:{},n=$a.find(r=>r.matches(t));if(!n)throw new Error(`[apiuikit] Unrecognized document: expected a top-level "openapi", "swagger", or "asyncapi" version key. Supported specs: ${$a.map(r=>r.name).join(", ")}.`);return n}function Fc(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function qg(e){return Zo(e).targets(e)}function ex(e,t){const n=Zo(e);if(t&&t.document!==e)throw new Error("[apiuikit] Markdown target belongs to a different document.");return n.toMarkdown(e,t)}function tx(e,t={}){const n=Zo(e),{baseUrl:r,url:s,optional:i}=t,a=(r==null?void 0:r.replace(/\/+$/,""))??"",c=s??(p=>`${a}/${Fc(p.key)}.md`),u=[`# ${t.title??n.title(e)}`],d=t.summary??n.summary(e);d&&u.push("",`> ${d}`);const f=n.targets(e).map(p=>({entry:p,href:c(p)})).filter(p=>!!p.href);if(f.length){u.push("",`## ${n.sectionTitle}`,"");for(const{entry:p,href:m}of f)u.push(`- [${p.label}](${m})${p.summary?`: ${p.summary}`:""}`)}if(i!=null&&i.length){u.push("","## Optional","");for(const p of i)u.push(`- [${p.label}](${p.url})${p.description?`: ${p.description}`:""}`)}return u.push(""),u.join(`
180
+ `)}function zc(e,t,n){e.registerSchemaParser(t);const r=e.parserRegistry,s=r.get.bind(r);r.get=i=>{const a=s(i);return a!==void 0?a:n(i)?t:void 0}}const nx=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml","application/vnd.apache.avro;version=1.9.0","application/vnd.apache.avro+json;version=1.9.0","application/vnd.apache.avro+yaml;version=1.9.0","application/vnd.apache.avro;version=1.8.2","application/vnd.apache.avro+json;version=1.8.2","application/vnd.apache.avro+yaml;version=1.8.2"];function rx(){return{validate:ox,parse:ix,getMimeTypes:()=>nx}}function sx(e){zc(e,rx(),Pn)}function ox(e){return vo(e.data).map(t=>({message:t,path:e.path}))}function ix(e){var n,r;const t=vo(e.data);if(t.length>0)return{[Tr]:t[0]};try{const s=Ks(e.data),i=e.meta.message,a=(r=(n=i==null?void 0:i.bindings)==null?void 0:n.kafka)==null?void 0:r.key;return a&&i&&(i["x-parser-original-bindings-kafka-key"]=a,i.bindings.kafka.key=Ks(a)),s}catch(s){return{[Tr]:s instanceof Error?s.message:"Failed to convert Avro schema"}}}async function ax(){try{const e=await Promise.resolve().then(()=>require("./index-D3hVSXsF.cjs")).then(n=>n.index),t=e.default??e;if(typeof t!="function")throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");return t}catch(e){throw console.error("[apiuikit] Failed to load '@asyncapi/parser/browser':",e),new Error("[apiuikit] The parsed entry requires '@asyncapi/parser'. Install it (`npm i @asyncapi/parser`), or use the `AsyncAPI` component with a pre-resolved document instead.")}}async function Uc(e){try{const t=await ax(),n=new t;sx(n);const{registerProtobufSchemaParser:r}=await Promise.resolve().then(()=>require("./protobufSchemaParser-DrkCKPhq.cjs"));r(n);const{document:s,diagnostics:i}=await n.parse(e);return{diagnostics:i,document:s?cx(s):null}}catch(t){return{diagnostics:[{message:t instanceof Error?t.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function lx(e,t){const{diagnostics:n,document:r}=await Uc(e);return{diagnostics:n,view:r?o.jsx(Jo,{kind:"resolved",asyncapi:r,config:t}):null}}function cx(e){return e.json()}function ux({raw:e,config:t,onDiagnostics:n,errorFallback:r,onError:s}){const[i,a]=b.useState(null),l=b.useRef(n);return l.current=n,b.useEffect(()=>{let c=!0;return Uc(e).then(({document:u,diagnostics:d})=>{var f;c&&(a(u),(f=l.current)==null||f.call(l,d))}),()=>{c=!1}},[e]),i?o.jsx(Jo,{kind:"resolved",asyncapi:i,config:t,errorFallback:r,onError:s}):null}async function dx(){try{return await Promise.resolve().then(()=>require("./index-C6_eBw5_.cjs"))}catch(e){throw console.error("[apiuikit] Failed to load '@scalar/openapi-parser':",e),new Error("[apiuikit] The parsed entry requires '@scalar/openapi-parser'. Install it (`npm i @scalar/openapi-parser`), or use the `OpenAPI` component with a pre-resolved document instead.")}}const Os=(e,t)=>({message:e.message,path:Array.isArray(e.path)?e.path:[],severity:t});async function Hc(e){try{const{validate:t,dereference:n}=await dx(),r=await t(e);if(!r.valid)return{diagnostics:r.errors.map(l=>Os(l,0)),document:null};const s=(r.errors??[]).map(l=>Os(l,1)),{schema:i,errors:a}=n(e);return a!=null&&a.length&&s.push(...a.map(l=>Os(l,0))),{diagnostics:s,document:i??null}}catch(t){return{diagnostics:[{message:t instanceof Error?t.message:"Failed to parse document",path:[],severity:0}],document:null}}}async function fx(e,t){const{diagnostics:n,document:r}=await Hc(e);return{diagnostics:n,view:r?o.jsx(Xo,{kind:"resolved",openapi:r,config:t}):null}}function px({raw:e,config:t,onDiagnostics:n,errorFallback:r,onError:s}){const[i,a]=b.useState(null),l=b.useRef(n);return l.current=n,b.useEffect(()=>{let c=!0;return Hc(e).then(({document:u,diagnostics:d})=>{var f;c&&(a(u),(f=l.current)==null||f.call(l,d))}),()=>{c=!1}},[e]),i?o.jsx(Xo,{kind:"resolved",openapi:i,config:t,errorFallback:r,onError:s}):null}function Wc(e,t,n){return function({document:s,config:i,children:a}){const l=b.useContext(Dr),c=b.useMemo(()=>s?Ln(s):null,[s]),u=!!l&&l.specType!==n;if(b.useEffect(()=>{u&&console.warn(`[apiuikit] A ${t} section is rendered inside a ${l.specType} document provider, which cannot supply the document it needs. `+(c?"Using the section's own `document` prop instead.":`Wrap it in <${t}Provider> or pass it a \`document\` prop.`))},[l,u,c]),l&&!u)return o.jsx(o.Fragment,{children:a});if(!c){if(l)return o.jsx(o.Fragment,{children:a});throw new Error(`This ${t} section needs a \`document\` prop unless it is rendered inside <${t}Provider>.`)}return o.jsx(e,{document:c,config:i,children:a})}}function hx({document:e,config:t,children:n}){const r=b.useMemo(()=>Ln(e),[e]);return o.jsx(co,{document:r,config:t,children:n})}const Jn=Wc(co,"AsyncAPI","asyncapi");function Yn(){const e=Ue();return e.specType==="asyncapi",e.document}function mx({layout:e}){const t=Yn();return!t.servers||Object.keys(t.servers).length===0?null:o.jsx(kc,{servers:t.servers,layout:e})}function gx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(mx,{layout:e})})}function xx({layout:e}){const t=Yn(),[n,r]=b.useState(null);return o.jsx($c,{operations:t.operations??{},selectedKey:n,onSelectKey:r,layout:e})}function bx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(xx,{layout:e})})}function yx({layout:e}){var n;const t=Yn();return o.jsx(pc,{messages:((n=t.components)==null?void 0:n.messages)??{},layout:e})}function wx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(yx,{layout:e})})}function kx({layout:e}){var n;const t=Yn();return o.jsx(Vr,{schemas:((n=t.components)==null?void 0:n.schemas)??{},layout:e})}function vx({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(kx,{layout:e})})}function Sx({layout:e}){const t=Yn();return t.info?o.jsx(Zl,{...t.info,layout:e}):null}function Ex({layout:e,...t}){return o.jsx(Jn,{...t,children:o.jsx(Sx,{layout:e})})}function jx({document:e,config:t,children:n}){const r=b.useMemo(()=>Ln(e),[e]);return o.jsx(Yo,{document:r,config:t,children:n})}const Xn=Wc(Yo,"OpenAPI","openapi");function Zn(){const e=ln();return e.specType==="openapi",e.document}function Ax({layout:e}){const t=Zn();return!t.servers||t.servers.length===0?null:o.jsx(Ic,{servers:t.servers,layout:e})}function Nx({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Ax,{layout:e})})}function Tx({layout:e}){var s;const t=Zn(),[n,r]=b.useState(null);return o.jsx(Lr,{paths:t.paths??{},security:t.security,securitySchemes:(s=t.components)==null?void 0:s.securitySchemes,selectedKey:n,onSelectKey:r,layout:e})}function _x({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Tx,{layout:e})})}function Cx({layout:e}){var i;const t=Zn(),[n,r]=b.useState(null),s=t.webhooks??{};return Object.keys(s).length===0?null:o.jsx(Lr,{paths:s,security:t.security,securitySchemes:(i=t.components)==null?void 0:i.securitySchemes,selectedKey:n,onSelectKey:r,columnLabel:"Webhook",idPrefix:"webhook",layout:e})}function $x({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Cx,{layout:e})})}function Ox({layout:e}){var n;const t=Zn();return o.jsx(Vr,{schemas:((n=t.components)==null?void 0:n.schemas)??{},layout:e})}function Ix({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Ox,{layout:e})})}function Rx({layout:e}){const t=Zn();return t.info?o.jsx(Oc,{info:t.info,tags:t.tags,externalDocs:t.externalDocs,layout:e}):null}function Mx({layout:e,...t}){return o.jsx(Xn,{...t,children:o.jsx(Rx,{layout:e})})}exports.AsyncAPI=Jo;exports.AsyncAPIProvider=hx;exports.AsyncAPIRenderer=ux;exports.CodeBlock=Gr;exports.ErrorBoundary=lo;exports.Info=Ex;exports.Messages=wx;exports.OpenAPI=Xo;exports.OpenAPIEndpoints=_x;exports.OpenAPIInfo=Mx;exports.OpenAPIProvider=jx;exports.OpenAPIRenderer=px;exports.OpenAPISchemas=Ix;exports.OpenAPIServers=Nx;exports.OpenAPIWebhooks=$x;exports.Operations=bx;exports.SchemaTabs=Wt;exports.SchemaTree=Ko;exports.Schemas=vx;exports.Servers=gx;exports.X_LIB_CONVERSION_ERROR=Tr;exports.asyncApiOperationToMarkdown=hl;exports.asyncApiToMarkdown=Eo;exports.commonjsGlobal=Ff;exports.defaultConfig=an;exports.documentToLlmsTxt=tx;exports.documentToMarkdown=ex;exports.ensureHljsLanguage=Cc;exports.getAugmentedNamespace=zf;exports.getDefaultExportFromCjs=No;exports.hljsLanguageForTarget=_c;exports.isHljsLanguageReady=Mr;exports.isProtobufSchemaFormat=Dn;exports.listDocumentTargets=qg;exports.markdownForLlm=Xa;exports.openApiEndpointToMarkdown=gl;exports.openApiToMarkdown=jo;exports.parseAndRender=lx;exports.parseAndRender$1=fx;exports.registerSchemaParserWithFallback=zc;exports.resolveLogo=Ao;exports.targetSlug=Fc;exports.useAsyncAPIDocument=Ue;exports.useDocumentContext=ln;