@redocly/openapi-docs 3.16.0-custom.5 → 3.16.0-custom.6

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.
@@ -2,7 +2,7 @@
2
2
  * @license Redocly OpenAPI Docs
3
3
  * (c) Copyright 2025 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: 3.16.0-custom.5
5
+ * Version: 3.16.0-custom.6
6
6
  **/function RV(e,a){for(var t=0;t<a.length;t++){const r=a[t];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LV(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var t=function r(){var n=!1;try{n=this instanceof r}catch{}return n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};t.prototype=a.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var NV={exports:{}},Jk={};/**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -6087,7 +6087,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:Lt.PHP});h.len
6087
6087
  `}const jf=1,RLe=function(e,a,{target:t,client:r}){const n=Object.assign({indent:" ",showBoilerplate:!0,printBody:!0},a),i=new Ss({indentation:n.indent,variablesPrefix:n.variablesPrefix,lang:Lt.R}),o=e.method.toUpperCase(),s=e.securityOAuth2ExtraCalls?.[0];if(n.showBoilerplate&&i.push("library(httr)").blank(),s){const h="oauth2_",m=new el(s).convert(t,r,{...n,variablesPrefix:h,showBoilerplate:!1}),f=`${h}data_req`;i.push(m),s.flowType==="deviceAuthorization"?qRe(i,{tokenUrl:s.tokenUrl??"YOUR_TOKEN_URL",clientId:s.clientId??"YOUR_CLIENT_ID",level:0,responseVariable:f}):(i.push(`access_token = content(${f}, "parsed")$access_token`),i.blank()),e.allHeaders.Authorization='paste("Bearer", access_token)'}let l,c="";if(e?.postData)switch(un(e?.postData?.mimeType)){case ga.URL_ENCODED:{l="form",c=i.var("body");const h=BZ(e.postData.params,n);i.push(`${c} <- list(${h})`).blank();break}case ga.JSON:{l="json",c=i.var("body");const h=TZ(e.postData.jsonObj,n);i.push(`${c} = '${h}'`).blank();break}case ga.MULTIPART:{l="multipart",c=i.var("body");const h=BZ(e.postData.params,n);i.push(`${c} <- list(${h})`).blank();break}default:e.postData?.text&&(c=i.var("body"),l="raw",i.push(`${c} = ${TZ(e.postData?.text)}`).blank())}cc(e,i),Object.keys({...e.pathParameters,...e.serverVariables}).length&&i.blank().push("# create you own operator").push('"%&%" <- function(x, y)paste0(x,y)').blank();const u=Ys(e,i);i.push(`url = ${u}`).blank();const d=i.var("data_req");if(i.push(`${d} <- ${o}(`),i.push(jf,"url,"),e.basicAuth){const{username:h,password:m}=e.basicAuth;i.push(jf,`authenticate("${h}", "${m}")`)}if(Object.keys(e.allHeaders).length){const h=`${Object.keys(e.allHeaders).map(m=>`"${m}" = ${e.allHeaders[m].startsWith("paste")?e.allHeaders[m]:`"${e.allHeaders[m]}"`}`).join(", ")}`;h&&i.push(jf,`add_headers(${h}),`)}return c&&(i.push(jf,`body = ${c},`),i.push(jf,`encode = "${l}",`)),i.push(jf,"verbose()"),i.push(")"),n.printBody&&i.blank().push(`content(${d}${l==="raw"?', "text"':""})`),i.join()},LLe={info:{key:"r",title:"R",extname:".r",default:"httr"},httr:RLe},Ey={javascript:QRe,node:eLe,python:rLe,shell:iLe,java8:cLe,java:hLe,csharp:bLe,csharpNewtonsoft:zLe,go:CLe,php:MLe,ruby:_Le,r:LLe};function EZ(e,a){if(e[a.name]===void 0)return e[a.name]=a.value,e;if(e[a.name]instanceof Array)return e[a.name].push(a.value),e;const t=[e[a.name],a.value];return e[a.name]=t,e}class el{request;constructor(a){const t={...a};this.request=this.prepare({...t,httpVersion:t.httpVersion||"HTTP/1.1",queryString:t.queryString||[],headers:t.headers||[],cookies:t.cookies||[],postData:t.postData?{...t.postData,jsonObj:void 0,paramsObj:void 0}:void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:t.pathParameters||{},serverVariables:t.serverVariables||{}})}prepare(a){if(a.queryString&&a.queryString.length&&(a.queryObj=a.queryString.reduce(EZ,{})),a.headers&&a.headers.length){const n=/^HTTP\/2/;a.headersObj=a.headers.reduce(function(i,o){let s=o.name;return a.httpVersion.match(n)&&(s=s.toLowerCase()),i[s]=o.value,i},{})}a.cookies&&a.cookies.length&&(a.cookiesObj=a.cookies.reduceRight(function(n,i){return n[i.name]=i.value,n},{}));const t=a.cookies.map(function(n){return encodeURIComponent(n.name)+"="+encodeURIComponent(n.value)});if(t.length&&(a.allHeaders.cookie=t.join("; ")),a.postData)switch(un(a.postData.mimeType)){case"multipart/mixed":case"multipart/related":case ga.MULTIPART:case"multipart/alternative":break;case ga.URL_ENCODED:a.postData?.params?(a.postData.paramsObj=a.postData.params.reduce(EZ,{}),a.postData.text=jy.stringify(a.postData.paramsObj)):a.postData.text="";break;case"text/json":case"text/x-json":case ga.JSON:case"application/x-json":if(a.postData.text)try{a.postData.jsonObj=JSON.parse(a.postData.text)}catch{a.postData.mimeType="text/plain"}break}if(a.allHeaders=Object.assign(a.allHeaders,a.headersObj),a.uriObj=L6(a.url,!0),!a.uriObj)return{...a,uriObj:{protocol:"",path:"",queryObj:{},query:{}}};if(a.queryObj)for(const[n,i]of Object.entries(a.queryObj))a.uriObj.searchParams.has(n,i)||a.uriObj.searchParams.set(n,i);a.uriObj.query=Object.fromEntries(a.uriObj.searchParams.entries()),a.queryObj=a.uriObj.query,a.uriObj.path=a.uriObj.pathname=d9(a.uriObj.pathname);const r=new URL(a.uriObj.toString());return r.search="",a.url=d9(r.toString()),a.uriObj.search&&(a.uriObj.path=a.uriObj.pathname+"?"+a.uriObj.search),a.fullUrl=d9(a.uriObj.toString()),a}convert(a,t,r){!r&&t&&(r=t);const n=this._matchTarget(a,t);if(n){const i=n(this.request,r,{target:a,client:t});return i.length===1?i[0]:i}throw new Error("Cannot match target")}_matchTarget(a,t){return Object.prototype.hasOwnProperty.call(Ey,a)?typeof t=="string"&&typeof Ey[a][t]=="function"?Ey[a][t]:Ey[a][Ey[a].info.default]:!1}}function Ep(e,a,t){try{return cW(e,a,t)}catch(r){return console.error(`Error sampling schema: ${r.message}`),null}}function NLe(e,a){return e.find(t=>{const r=t.schemes.map(n=>n.id);return oEe(r,a||[])})}function DLe(e,{exampleName:a="",skipOptionalParameters:t=!1,withOAuth2Call:r=!1,spec:n,generatedPayloadSamplesMaxDepth:i=8,pathParams:o={},properties:s={},activeMimeName:l=""},{environment:c,requestValues:u,activeSecuritySchemeIds:d}){const h=c.server,m=e.servers.find(te=>te.url===h)||e.servers[0],f=NLe(e.security,d),{securityHeaders:b,securityCookies:k,securityQueries:v,securityOAuth2ExtraCalls:x,basicAuth:z}=$Le(f||e.security?.[0],r,c),j=e?.requestBody?.content&&_p(e.requestBody.content,l),w={skipNonRequired:t,skipReadOnly:!0,maxSampleDepth:i,quiet:!0},C=u;let O=!1;const P=e.parameters.filter(te=>te.in==="header").filter(te=>!(t&&!te.required)).map(te=>({name:te.name,value:C.header?.[te.name]||xU("header",te.name)||te.serverValues?.[h]?.example||te.example||cS(te,Ep(te.schema.rawSchema,w,n))})).map(te=>(j?.name&&te.name.toLowerCase()==="content-type"&&(O=!0,te.value=j.name),te)).concat(b);!O&&j?.name&&P.unshift({name:"Content-Type",value:j?.name});const B=e.parameters.filter(te=>te.in==="cookie").filter(te=>!(t&&!te.required)).map(te=>jy.parse(cS(te,te.serverValues?.[h]?.example||te.example||Ep(te.schema.rawSchema,w,n)))).reduce((te,ie)=>{for(const[ye,de]of Object.entries(ie))te.push({name:ye,value:String(C.cookie?.[ye]||de)});return te},[]).concat(k),R=e.parameters.filter(te=>te.in==="query").filter(te=>!(t&&!te.required)).map(te=>jy.parse(cS(te,te.serverValues?.[h]?.example||te.example||Ep(te.schema.rawSchema,w,n)))).reduce((te,ie)=>{for(const[ye,de]of Object.entries(ie))te.push({name:ye,value:Gq(C.query?.[ye])&&JSON.stringify(qq(C.query?.[ye]))||String(C.query?.[ye]||de)});return te},[]).concat(v),q=m?.url.replace(/\/$/,""),L=e.path.replace(/^\//,""),W=`${q}/${L}`,N=e.parameters.filter(te=>te.in==="path").reduce((te,ie)=>{const{in:ye,name:de}=ie;return te[de]=C.path?.[de]||ie.serverValues?.[h]?.example||ie.example||o[de]||xU(ye,de),te},{}),X=j?.name.toLowerCase(),ee=X===ga.MULTIPART||X===ga.URL_ENCODED,se=ee?j?.formExamples?.[a]:j?.examples?.[a],re=ee?j?.formExamples||{}:j?.examples||{},[me]=Object.values(re),K=se?.serverValues?.[h]?.value||me?.serverValues?.[h]?.value,F=te=>!te||typeof te!="object"||!j?.schema?.rawSchema?null:Ep(FLe(j.schema.rawSchema,te),{...w,format:"xml"},n),Q=(()=>{if(C?.body)return C.body;if(X===ga.XML){const te=F(K)||F(se?.value)||F(me?.value);if(te)return te;if(j?.schema)return Ep(j.schema.rawSchema,{...w,format:"xml"},n)}else{const te=j?.schema&&Ep(j.schema.rawSchema,{...w,format:"json"},n);return K||se?.value||me?.value||te}return""})();let H="",E=[];switch(un(X)){case ga.JSON:H=JSON.stringify(s8(Q,s));break;case ga.XML:H=Q;break;case ga.URL_ENCODED:case ga.MULTIPART:H=jy.stringify(s8(Q,s)),E=_Z(s8(Q,s));break;default:H=String(Q||"")}const D=H?{mimeType:j?.name||ga.OCTET_STREAM,text:H,params:E}:void 0,U=e.responses.map(te=>te.code);return{method:e.httpVerb,url:W,httpVersion:"HTTP/1.1",cookies:B,headers:P,queryString:R,postData:D,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:x,basicAuth:z,pathParameters:N,serverVariables:c,allResponseCodes:U}}const Tl={withImports:!0,withComments:!1},CS={curl:{code:"shell",defaultTarget:"curl",defaultOptions:{...Tl,short:!0}},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:{...Tl,withImports:!1}},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:{...Tl}},Python:{code:"python",defaultTarget:"requests",defaultOptions:{...Tl}},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:{...Tl}},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:{...Tl}},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:{...Tl}},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:{...Tl}},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:{...Tl}},PHP:{code:"php",defaultTarget:"curl",defaultOptions:{...Tl}},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:{...Tl}},R:{code:"r",defaultTarget:"httr",defaultOptions:{...Tl}}};function ILe({lang:e,operation:a,exampleName:t,pathParams:r,properties:n,options:i={},environment:o,translate:s}){try{const{skipOptionalParameters:l,withOAuth2Call:c,spec:u,generatedPayloadSamplesMaxDepth:d,store:h,activeMimeName:m}=i,f=DLe(a,{exampleName:t,pathParams:r,properties:n,skipOptionalParameters:l,withOAuth2Call:c,spec:u,generatedPayloadSamplesMaxDepth:d,activeMimeName:m},{environment:o,requestValues:h.requestValues,activeSecuritySchemeIds:h.activeSecuritySchemeIds}),b=new el(f);return CS[e]?b.convert(CS[e].code,CS[e].defaultTarget,{...CS[e].defaultOptions,...i}):s("openapi.unsupportedLanguage","Language is not supported.")}catch(l){return console.error(l),s("openapi.failedToGenerateCodeSample","Failed to generate code sample.")}}function $Le(e,a,t){const r={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0},n=t?.server;for(const i of e?.schemes||[]){const o=Y7e(i.id,t),s=n&&i.serverValues&&i.serverValues[n],l={access_token:s?.["x-defaultAccessToken"]||i["x-defaultAccessToken"],token_type:s?.["x-defaultTokenType"]||i["x-defaultTokenType"],client_id:s?.["x-defaultClientId"]||i["x-defaultClientId"],client_secret:s?.["x-defaultClientSecret"]||i["x-defaultClientSecret"]},c=s?.["x-defaultUsername"]||i["x-defaultUsername"],u=s?.["x-defaultPassword"]||i["x-defaultPassword"],d=s&&"scopes"in s?s.scopes||[]:i.scopes||[];switch(i.type){case"openIdConnect":r.securityHeaders?.push({name:"Authorization",value:l.access_token?`${l.token_type||"Bearer"} ${l.access_token}`:o.token?`${l.token_type||o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const h=l.access_token?`${l.token_type||"Bearer"} ${l.access_token}`:o.token?`${o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";i.flows.deviceAuthorization&&a?r.securityOAuth2ExtraCalls.push(KLe(i.flows.deviceAuthorization,d)):i.flows.clientCredentials&&a?r.securityOAuth2ExtraCalls.push(VLe(i.flows.clientCredentials,d,{client_id:l.client_id||o.client_id,client_secret:l.client_secret||o.client_secret})):i.flows.password&&a&&r.securityOAuth2ExtraCalls.push(HLe(i.flows.password,d,{...o,client_id:l.client_id||o.client_id,client_secret:l.client_secret||o.client_secret})),r.securityHeaders?.push({name:"Authorization",value:h});break}case"apiKey":{const h=l.access_token||o.raw||"YOUR_API_KEY_HERE";i.in==="header"&&r.securityHeaders?.push({name:i.name,value:h}),i.in==="cookie"&&r.securityCookies.push({name:i.name,value:h}),i.in==="query"&&r.securityQueries.push({name:i.name,value:h});break}case"http":if(i.scheme==="basic")r.basicAuth={username:c||o.username||`<${Sf.toSnakeCase("Username")}>`,password:u||o.password||`<${Sf.toSnakeCase("Password")}>`};else{const h=l?.access_token||o.token?.access_token||`<YOUR_${i.bearerFormat||"TOKEN"}_HERE>`;r.securityHeaders?.push({name:"Authorization",value:`${jS(i.scheme||"bearer")} ${h}`})}break}}return r}function KLe(e,a){const t=e["x-defaultClientId"]??"YOUR_CLIENT_ID",{tokenUrl:r,deviceAuthorizationUrl:n}=e;return{method:"POST",url:n,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:ga.URL_ENCODED},{name:"Accept",value:ga.JSON}],queryString:[],postData:{mimeType:ga.URL_ENCODED,text:"",params:[{name:"client_id",value:t},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(l8)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[],flowType:"deviceAuthorization",tokenUrl:r,clientId:t}}function HLe(e,a,t){const{tokenUrl:r}=e,n=t.client_id??"YOUR_CLIENT_ID";return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:ga.URL_ENCODED},{name:"Accept",value:ga.JSON}],queryString:[],postData:{mimeType:ga.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:n},{name:"client_secret",value:t.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:t.username||"<username>"},{name:"password",value:t.password||"<password>"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(l8)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[],flowType:"password",tokenUrl:r,clientId:n}}function VLe(e,a,t){const{tokenUrl:r}=e,n=t.client_id??"YOUR_CLIENT_ID";return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:ga.URL_ENCODED},{name:"Accept",value:ga.JSON}],queryString:[],postData:{mimeType:ga.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:n},{name:"client_secret",value:t.client_secret||"YOUR_CLIENT_SECRET"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(l8)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[],flowType:"clientCredentials",tokenUrl:r,clientId:n}}function s8(e,a){if(e){if(Wo(e))return Object.keys(e).length>0&&Object.keys(a).length===0?e:xf(e,a,{arrayMerge:vS});try{return xf(JSON.parse(e),a,{arrayMerge:vS})}catch{return!1}}return!1}function _Z(e,a=""){const t=[];for(const[r,n]of Object.entries(e)){const i=a?`${a}[${r}]`:r;if(typeof n=="object"&&n!==null)t.push(..._Z(n,i));else{const o=Array.isArray(e)&&typeof n=="string"&&a?a:i;t.push({name:o,value:String(n)})}}return t}function l8(e){return e!==void 0}function jS(e){return e.charAt(0).toUpperCase()+e.slice(1)}function FLe(e,a){if(!e||typeof e!="object"||!a||typeof a!="object")return e;const t=JSON.parse(JSON.stringify(e));function r(n,i){if(!(!n||!i||typeof n!="object"||typeof i!="object")&&n.properties){for(const o in n.properties)if(i[o]!==void 0){const s=n.properties[o],l=i[o];if(s.type==="object"&&typeof l=="object"&&!Array.isArray(l))r(s,l);else if(s.type==="array"&&Array.isArray(l)&&l.length>0){const c=l[0];s.items&&s.items.properties&&r(s.items,c)}else s.example=l}}}return r(t,a),t}function RZ({parser:e,info:{encoding:a,schema:t},schema:r,mime:n,options:{isRequestType:i,onlyRequiredInSamples:o,generatedSamplesMaxDepth:s,format:l="json"}}){const c={skipReadOnly:i,skipWriteOnly:!i,skipNonRequired:i&&o,maxSampleDepth:s,quiet:!0,format:l};let u={};if(r&&r.oneOf)for(const d of r.oneOf){const h=Ep(d.rawSchema,c,e.definition);h!==null&&(r.discriminatorProp&&typeof h=="object"&&h&&h[r.discriminatorProp]&&!d.isDefaultMapping&&(h[r.discriminatorProp]=d.title),u[d.title]=Oy({parser:e,infoOrRef:{value:h},mime:n,encoding:a}))}else if(r){const d=Ep(t,c,e.definition);d!==null?u={default:Oy({parser:e,infoOrRef:{value:d},mime:n,encoding:a})}:u={default:{value:null,rawValue:"null"}}}else u={default:{value:null,rawValue:"null"}};return u}function LZ(e,a,t,r,n,{operation:i,type:o,response:s,absolutePointer:l=""}){let c,u;const d=r.schema&&um({parser:e,schemaOrRef:r.schema,pointer:"",absolutePointer:vr.join(l,["content",a,"schema"]),options:n,deps:{operation:i,type:o,response:s}}),{onlyRequiredInSamples:h,generatedSamplesMaxDepth:m}=n,{encoding:f,examples:b,example:k}=r;return n.unstable_skipSamples||(b!==void 0?c=Vq(b,v=>Oy({parser:e,infoOrRef:v,mime:a,encoding:f})):k!==void 0?c={default:Oy({parser:e,infoOrRef:{value:e.deref(k).resolved},mime:a,encoding:f})}:V6(a)||oU(a)?c=RZ({parser:e,info:r,schema:d,mime:a,options:{isRequestType:t,onlyRequiredInSamples:h,generatedSamplesMaxDepth:m,format:oU(a)?"xml":"json"}}):(sU(a)||L7e(a))&&(u=RZ({parser:e,info:r,schema:d,mime:a,options:{isRequestType:t,onlyRequiredInSamples:h,generatedSamplesMaxDepth:m}}))),{examples:c,schema:d,name:a,isRequestType:t,formExamples:u,onlyRequiredInSamples:h,operation:i}}function OS({parser:e,info:a,isRequestType:t,options:r,data:{operation:n,type:i,response:o,absolutePointer:s=""}}){const l=Object.keys(a).map(u=>LZ(e,u,t,a[u],r,{operation:n,type:i,response:o,absolutePointer:s})),c=l.filter(u=>!!u.examples||!!u.formExamples).length>0;return{mediaTypes:l,isRequestType:t,hasSample:c,operation:n}}function _p(e,a){return a&&e.mediaTypes.find(t=>t.name===a)||e.mediaTypes[0]||{}}function GLe(e,a){if(!e.in){if(e.deps.type==="request"&&e.deps.operation?.requestBody?.content?.mediaTypes)return e.deps.operation?.requestBody?.content?.mediaTypes.length>1?e.deps.operation?.requestBody?.content&&_p(e.deps.operation.requestBody.content,a).name:void 0;if(e.deps.type==="response"&&e.deps.response?.content?.mediaTypes)return e.deps.response?.content?.mediaTypes.length>1?e.deps.response?.content&&_p(e.deps.response.content,a).name:void 0}}function qLe(e,a){if(!e)return"";const t={t:e.deps.type,in:e.in||e.deps.in,c:e.deps.type==="response"?e.deps.response?.code:void 0,cb:e.deps.operation?.isCallback?e.deps.operation.callbackId:void 0,ct:GLe(e,a),path:e.fieldFullPath};return jy.stringify(t,{encode:!1,sort:!1})}function Ii(e="",a="",t="/"){return e.endsWith(t)&&e!==t&&(e=e.slice(0,-t.length)),a.startsWith(t)&&(a=a.slice(t.length)),!e||!a||e===t?e+a:e+t+a}function Wc(e,a){return e=xy(e),(`/${e}#`+Ii(e,a)).toLowerCase()}function NZ(e,a,t){if(a.operations.length===0)return[];const r=[],n=[];for(const i of a.operations){const o=rU(i,e),s={id:o,type:"operation",parent:e,operationDefinition:i,depth:t,name:tU(i),httpVerb:i.httpVerb,path:i.pathName,items:[],isAdditionalOperation:i.isAdditionalOperation,isWebhook:i.isWebhook,isRpc:i.isRpc||!!i["x-redocly-openrpc"],operationId:i.operationId,badges:i["x-badges"]||[],href:c8({id:o}),deprecated:!!i.deprecated,[ys]:i[ys]||e?.[ys]};i.isWebhook?n.push(s):r.push(s)}return[...r.sort((i,o)=>Number(i.deprecated)-Number(o.deprecated)||Number(i.isAdditionalOperation)-Number(o.isAdditionalOperation)),...n.sort((i,o)=>Number(i.deprecated)-Number(o.deprecated))]}function c8({id:e}){return xy(`/${e}`.toLowerCase())}function _y(e,a,t){let r;t?.id&&(e==="schema"||e==="tool"||e==="rsrc"||e==="prompt")?r=Ii(t.id,kf(a.name)):r=a.id||kf(a.name);const n=a["x-displayName"]||a.name,i=a.level||1,o=a.isSchema,s=a.ast||void 0,l=U6(li(a,"description")||""),c=a.items||[],u=a.externalDocs;return{id:r.toLowerCase(),type:e,parent:t,name:n,level:i,badges:a["x-badges"]||[],depth:0,isSchema:o,description:l,items:c,ast:s,externalDocs:u,href:c8({id:r}),[ys]:a[ys]||t?.[ys],keywords:e==="tag"?a["x-keywords"]:void 0}}function ULe(e){return{}}function WLe(e,a,t,r,n,i,o,s){const{resolved:l}=e.deref(t),c=[];for(const u of Object.keys(l)){const d=l[u],h=Object.keys(d).filter(aU);for(const m of h){const f=d[m],b=u8(e,{...f,pathName:u,pointer:vr.join(r,["callbacks",a,m]),httpVerb:m,pathParameters:d.parameters||[],pathServers:d.servers},o,n,i,{isCallback:!0,id:Ii(a,m)});c.push(b)}}return{name:a,operations:c}}function JLe({parser:e,infoOrRef:a,options:t,isEvent:r,operation:n}){const{resolved:i}=e.deref(a),o=li(i,"description")||"",s=i.required;let l;const c=!r,u=vU(i);return u!==void 0&&(l=OS({parser:e,info:u,isRequestType:c,options:t,data:{operation:n,type:"request",absolutePointer:a.$ref||vr.join(n.pointer,["requestBody"])}})),{description:o,required:s,content:l}}function Ry(e=[],a){return e.map(t=>ZLe({requirement:t,parser:a})).filter(({schemes:t})=>t.length>0)}function ZLe({requirement:e,parser:a}){const t=a.definition.components&&a.definition.components.securitySchemes||{};return{schemes:Object.keys(e||{}).map(r=>{const n=a.deref(t[r]).resolved,i=e[r]||[];if(n)return{...n,id:r,sectionId:r,scopes:i}}).filter(Boolean)}}function QLe({parser:e,code:a,defaultAsError:t,infoOrRef:r,options:n,isEvent:i,operation:o}){const s=!!i,{resolved:l}=e.deref(r),c={code:a};l["x-summary"]!==void 0?(c.summary=li(l,"x-summary"),c.description=li(l,"description")||""):(c.summary=li(l,"description")||"",c.description=""),c.type=eU(a,t,o.isRpc);const u=l.headers,d=r.$ref||vr.join(o?.pointer||"",["responses",a]);u!==void 0&&(c.headers=Object.keys(u).map(m=>{const f=u[m];return Mp(e,{...f,name:m},vr.join(d,["headers",m]),n,{operation:o,type:"response",response:c})}));const h=vU(l);return h!==void 0&&(c.content=OS({parser:e,info:h,isRequestType:s,options:n,data:{operation:o,type:"response",response:c,absolutePointer:d}})),c}function XLe(e){return e.lang==="Payload"&&"requestBodyContent"in e}function u8(e,a,t,r,n,i,o,s){const l=a.isWebhook,c={operationDefinition:a,parent:t,pointer:a.pointer,description:li(a,"description"),externalDocs:a.externalDocs,deprecated:!!a.deprecated,httpVerb:a.httpVerb,operationId:a.operationId,path:a.pathName,isWebhook:l,isRpc:a.isRpc||!!a["x-redocly-openrpc"]||!!e.definition["x-redocly-openrpc"],isAdditionalOperation:a.isAdditionalOperation,isCallback:!!i?.isCallback,isEvent:i?.isCallback||l,name:tU(a),defaultExampleName:a.defaultSampleName,[ys]:a[ys]||t?.[ys],type:"operation",callbackId:i?.id,href:n,get callbacks(){return Object.keys(a.callbacks||[]).map(m=>WLe(e,m,a.callbacks?.[m],c.pointer,r,n,t))},get responses(){let m=!1;return Object.keys(a.responses||[]).filter(f=>f==="default"?!0:(eU(f,!1,c.isRpc)==="success"&&(m=!0),E7e(f))).map(f=>QLe({parser:e,code:f,defaultAsError:m,infoOrRef:a.responses[f],options:r,isEvent:c.isEvent,operation:c}))},get parameters(){return YLe(e,a,c,r,h)}};if(i?.isCallback)c.security=Ry(a.security,e),c.servers=zy("",a.servers||a.pathServers||[]),c.id=Gc(n);else{c.id=rU(a,t),c.href=c.href||c8(c),c.security=Ry(a.security||e.definition.security,e);const m=a.servers||(a.pathServers?.length?a.pathServers:null)||e.definition.servers||[];c.servers=zy(e.definitionUrl,d8(m,r.mockServer))}r.showExtensions&&(c.extensions=G6(a,r.showExtensions)),c.requestBody=a.requestBody?JLe({parser:e,infoOrRef:a.requestBody,options:r,operation:c,isEvent:c.isEvent}):void 0;const u=c.requestBody?.content;c.payload={lang:"Payload",source:"",requestBodyContent:u?.hasSample?u:void 0},c.definitionSamples=a["x-codeSamples"]||[],c.badges=a["x-badges"]?.map(({name:m,color:f,position:b})=>({name:m,color:f||"var(--color-info-base)",position:b||"after"}))||[],c.hasSamples=u?.hasSample||c.definitionSamples.length>0,c.hideReplay=a["x-hideReplay"]===!0;const d=ULe()||{},h=s||d.requestValues||{};return sEe(c,h),c}function YLe(e,a,t,r,n){let i=G7e(e,a.pathParameters,a.parameters,{pathPointer:vr.dirName(t.pointer),operationPointer:t.pointer}).map(({paramOrRef:o,pointer:s})=>{const l=Mp(e,o,s,r,{operation:t,type:"request"});return lEe(l,n),l});return r.sortRequiredPropsFirst&&(i=gU(i)),fU(i)}function d8(e,a){if(!a)return e;const t={url:a.url,description:a.description};switch(a.position){case"first":return[t,...e];case"last":return[...e,t];case"replace":return[t];default:return e}}function p8(e,a,t){const r=rm(e)?Pr.parse(e):Pr.Ast.fromJSON(JSON.stringify(e?.result)),n=[];let i;const o=(c,u,d=n,h,m)=>{c=x7e(c);let f;h.attributes.id?f=h.attributes.id:(f=m?`${m}/${kf(c)}`:`section/${kf(c)}`,h.attributes.id=f);const b={id:f.toLowerCase(),name:c,level:u,items:[],ast:[h]};return d.push(b),b},s=(c,u)=>{c[c.length-1]?.ast?.push(u)},l=c=>{const u=IZ(c)||"",d=a&&a.type==="tag"?a.id:void 0;c.type==="heading"&&c.attributes.level===1?i=o(u,c.attributes.level,void 0,c,d):c.attributes.level?o(u,c.attributes.level,i?.items,c,i?.id??d):i?.items?.length?s(i?.items,c):n?.length&&s(n,c)};if(Array.isArray(r))for(const c of r)l(c);else l(r);return DZ(a,n,t)}function DZ(e,a,t=1){return a.map(r=>{const n=_y("section",r,e);return n.depth=t,r.items&&(n.items=DZ(n,r.items,t+1)),n})}function IZ(e){if(typeof e?.attributes?.content=="string")return e.attributes?.content;if(e?.children)return IZ(e.children[0])}const $Z=["tools","resources","prompts"];function KZ(e,a,t,r,n){let i;if(r===void 0?i=Object.keys(a):i=r.tags,!Array.isArray(i))return console.warn("Unexpected values of tags. Check tags or x-tagGroups in your definition."),[];const o=i.map(l=>a[l]?(a[l].used=!0,a[l]):(console.warn(`Non-existing tag "${l}" is added to the group "${r?.name}"`),null)),s=[];for(const l of o){if(!l)continue;const c=_y("tag",l,t);if(c.depth=Jq+1,l.name===""){const h=[...p8(li(l,"description")||"",c,c.depth+1),...NZ(void 0,l,c.depth+1)];s.push(...h);continue}const u=aNe({definition:e.definition,tag:l,parent:c,schemaDefinitionsTagName:n.schemaDefinitionsTagName}),d=tNe(e.definition,l,c);c.items=[...u,...d,...p8(li(l,"description")||"",c,c.depth+1),...NZ(c,l,c.depth+1)],s.push(c)}return s.filter(({name:l,items:c})=>l!==yy||c.length>0)}function eNe(e,a,t,r,n){const i=[];for(const o of t){const s=_y("group",o,a);s.depth=Jq,s.items=KZ(e,r,s,o,n),i.push(s)}return i}function aNe({definition:e,tag:a,parent:t,schemaDefinitionsTagName:r}){const n=r?[r]:[];return Object.entries(e.components?.schemas||{}).map(([i,o])=>{if(!(o["x-tags"]||n).includes(a.name))return null;const s=_y("schema",{name:i,"x-displayName":`${o.title||i}`,description:`{% schemaDefinition showWriteOnly="true" schemaRef="#/components/schemas/${i}" /%}`,isSchema:!0,level:2},t);return s.depth=t.depth+1,s}).filter(Boolean)}function tNe(e,a,t){const r=[];for(const n of $Z)if(e["x-mcp"]?.[n]){const i=VZ(n),o=[i];for(const s of e["x-mcp"]?.[n]||[])if((s.tags?.length?s.tags:o).includes(a.name)){const l=Ii(t.id,kf(s.name)),c=n==="tools"?`Tool name: \`${s.name}\`
6088
6088
 
6089
6089
  `:"",u=_y(n==="tools"?"tool":n==="resources"?"rsrc":"prompt",{name:s.name,"x-displayName":s.title||s.name,description:`${c}${s.description||""}
6090
- {% mcp${i.slice(0,-1)} name="${s.name}" id="${l}" /%}`,isSchema:!0,level:2},t);u.depth=t.depth+1,r.push(u)}}return r}function rNe(e,a){const{definition:t}=e,r={},n=t["x-webhooks"]||t.webhooks,i=t["x-mcp"];for(const o of a||[])r[o.name]={...o,operations:[]};return t.paths&&h8(e,t.paths,r),n&&h8(e,n,r,!0),i&&nNe(i,r),r}function nNe(e,a){for(const t of $Z)if(e[t])for(const r of e[t]){const n=r.tags&&r.tags.length?r.tags:[VZ(t)];for(const i of n){let o=a[i];o===void 0&&(o={name:i,operations:[],used:!0},a[i]=o)}}}function HZ(e,a,t,r,n,i,o,s){if(n.$ref){const{resolved:c}=e.deref(n);h8(e,{[r]:c},i,o);return}let l=t?.tags;(!l||!l.length)&&(l=o?[yy]:[""]);for(const c of l){let u=i[c];if(u===void 0&&(u={name:c,operations:[]},i[c]=u),u["x-traitTag"])continue;const d=t.isRpc||!!t["x-redocly-openrpc"]||!!e.definition["x-redocly-openrpc"],h=!t.responses[200]?.content?.["application/json"];u.operations.push({...t,pathName:r,pointer:vr.compile(["paths",r,a]),httpVerb:d?h?"NOTIF":"CALL":a,pathParameters:n.parameters||[],pathServers:n.servers,isWebhook:!!o,isRpc:d,isAdditionalOperation:!!s,keywords:t["x-keywords"]})}}function h8(e,a,t,r){for(const n of Object.keys(a||{})){const i=a[n],o=Object.keys(i).filter(aU);for(const s of o){const l=i[s];HZ(e,s,l,n,i,t,r)}if(i.additionalOperations)for(const[s,l]of Object.entries(i.additionalOperations))HZ(e,s,l,n,i,t,r,!0)}}function VZ(e){return e.charAt(0).toUpperCase()+e.slice(1)}function iNe(e,a){const{definition:t}=e,{schemaDefinitionsTagName:r}=a,n=[{id:"",name:t?.info?.["x-seo"]?.title||t?.info?.title||"Overview",href:"/",depth:1,level:1,type:"section",infoDefinition:t.info,items:[],keywords:t["x-keywords"]}],i=[...t.tags||[]];if(i.some(l=>l.name===yy)||i.push({name:yy}),!i.find(l=>l?.name===r)&&r&&i.push({name:r}),t["x-mcp"])for(const l of["Tools","Resources","Prompts"])t["x-mcp"][l]&&(i.find(c=>c?.name===l)||i.push({name:l}));const o=rNe(e,i),s=t["x-tagGroups"];return n.push(...p8(li(t.info,"description")||"",void 0,1)),s&&s.length>0?n.push(...eNe(e,void 0,s,o,a)):n.push(...KZ(e,o,void 0,void 0,a)),n}function oNe(e,a){const t=iNe(e,a),r=f7e(t||[],"items");return{contentItems:t,flatItems:r}}const m8={},sNe=Symbol((m8?"production":void 0)!=="production"?"RESET":"");function lNe(e,a){let t=null;const r=new Map,n=new Set,i=s=>{let l;if(a===void 0)l=r.get(s);else for(const[u,d]of r)if(a(u,s)){l=d;break}if(l!==void 0)if(t?.(l[1],s))i.remove(s);else return l[0];const c=e(s);return r.set(s,[c,Date.now()]),o("CREATE",s,c),c},o=(s,l,c)=>{for(const u of n)u({type:s,param:l,atom:c})};return i.unstable_listen=s=>(n.add(s),()=>{n.delete(s)}),i.getParams=()=>r.keys(),i.remove=s=>{{if(!r.has(s))return;const[l]=r.get(s);r.delete(s),o("REMOVE",s,l)}},i.setShouldRemove=s=>{if(t=s,!!t)for(const[l,[c,u]]of r)t(u,l)&&(r.delete(l),o("REMOVE",l,c))},i}const FZ=e=>typeof e?.then=="function";function GZ(e=()=>{try{return window.localStorage}catch(t){(m8?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(t);return}},a){var t;let r,n;const i={getItem:(l,c)=>{var u,d;const h=f=>{if(f=f||"",r!==f){try{n=JSON.parse(f,void 0)}catch{return c}r=f}return n},m=(d=(u=e())==null?void 0:u.getItem(l))!=null?d:null;return FZ(m)?m.then(h):h(m)},setItem:(l,c)=>{var u;return(u=e())==null?void 0:u.setItem(l,JSON.stringify(c,void 0))},removeItem:l=>{var c;return(c=e())==null?void 0:c.removeItem(l)}},o=l=>(c,u,d)=>l(c,h=>{let m;try{m=JSON.parse(h||"")}catch{m=d}u(m)});let s;try{s=(t=e())==null?void 0:t.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(l,c)=>{if(!(e()instanceof window.Storage))return()=>{};const u=d=>{d.storageArea===e()&&d.key===l&&c(d.newValue)};return window.addEventListener("storage",u),()=>{window.removeEventListener("storage",u)}}),s&&(i.subscribe=o(s)),i}const cNe=GZ();function qZ(e,a,t=cNe,r){const n=oi(a);return(m8?"production":void 0)!=="production"&&(n.debugPrivate=!0),n.onMount=i=>{i(t.getItem(e,a));let o;return t.subscribe&&(o=t.subscribe(e,i,a)),o},oi(i=>i(n),(i,o,s)=>{const l=typeof s=="function"?s(i(n)):s;return l===sNe?(o(n,a),t.removeItem(e)):FZ(l)?l.then(c=>(o(n,c),t.setItem(e,c))):(o(n,l),t.setItem(e,l))})}function uNe(e,a){const t=_.useMemo(()=>oi(null,(r,n,...i)=>e(r,n,...i)),[e]);return Yk(t)}const dNe=()=>uNe(_.useCallback((e,a)=>a,[]))(),Ee=typeof V=="function"?V:V.default,pNe=({className:e,style:a,handleClear:t})=>p.jsx("button",{className:e,style:a,onClick:t,children:"\u2715"}),hNe=_.memo(pNe),mNe=Ee(hNe)`
6090
+ {% mcp${i.slice(0,-1)} name="${s.name}" id="${l}" /%}`,isSchema:!0,level:2},t);u.depth=t.depth+1,r.push(u)}}return r}function rNe(e,a){const{definition:t}=e,r={},n=t["x-webhooks"]||t.webhooks,i=t["x-mcp"];for(const o of a||[])r[o.name]={...o,operations:[]};return t.paths&&h8(e,t.paths,r),n&&h8(e,n,r,!0),i&&nNe(i,r),r}function nNe(e,a){for(const t of $Z)if(e[t])for(const r of e[t]){const n=r.tags&&r.tags.length?r.tags:[VZ(t)];for(const i of n){let o=a[i];o===void 0&&(o={name:i,operations:[],used:!0},a[i]=o)}}}function HZ(e,a,t,r,n,i,o,s){if(n.$ref){const{resolved:c}=e.deref(n);h8(e,{[r]:c},i,o);return}let l=t?.tags;(!l||!l.length)&&(l=o?[yy]:[""]);for(const c of l){let u=i[c];if(u===void 0&&(u={name:c,operations:[]},i[c]=u),u["x-traitTag"])continue;const d=t.isRpc||!!t["x-redocly-openrpc"]||!!e.definition["x-redocly-openrpc"],h=!!t.responses?.["200"]?.content?.["application/json"];u.operations.push({...t,pathName:r,pointer:vr.compile(["paths",r,a]),httpVerb:d?h?"NOTIF":"CALL":a,pathParameters:n.parameters||[],pathServers:n.servers,isWebhook:!!o,isRpc:d,isAdditionalOperation:!!s,keywords:t["x-keywords"]})}}function h8(e,a,t,r){for(const n of Object.keys(a||{})){const i=a[n],o=Object.keys(i).filter(aU);for(const s of o){const l=i[s];HZ(e,s,l,n,i,t,r)}if(i.additionalOperations)for(const[s,l]of Object.entries(i.additionalOperations))HZ(e,s,l,n,i,t,r,!0)}}function VZ(e){return e.charAt(0).toUpperCase()+e.slice(1)}function iNe(e,a){const{definition:t}=e,{schemaDefinitionsTagName:r}=a,n=[{id:"",name:t?.info?.["x-seo"]?.title||t?.info?.title||"Overview",href:"/",depth:1,level:1,type:"section",infoDefinition:t.info,items:[],keywords:t["x-keywords"]}],i=[...t.tags||[]];if(i.some(l=>l.name===yy)||i.push({name:yy}),!i.find(l=>l?.name===r)&&r&&i.push({name:r}),t["x-mcp"])for(const l of["Tools","Resources","Prompts"])t["x-mcp"][l]&&(i.find(c=>c?.name===l)||i.push({name:l}));const o=rNe(e,i),s=t["x-tagGroups"];return n.push(...p8(li(t.info,"description")||"",void 0,1)),s&&s.length>0?n.push(...eNe(e,void 0,s,o,a)):n.push(...KZ(e,o,void 0,void 0,a)),n}function oNe(e,a){const t=iNe(e,a),r=f7e(t||[],"items");return{contentItems:t,flatItems:r}}const m8={},sNe=Symbol((m8?"production":void 0)!=="production"?"RESET":"");function lNe(e,a){let t=null;const r=new Map,n=new Set,i=s=>{let l;if(a===void 0)l=r.get(s);else for(const[u,d]of r)if(a(u,s)){l=d;break}if(l!==void 0)if(t?.(l[1],s))i.remove(s);else return l[0];const c=e(s);return r.set(s,[c,Date.now()]),o("CREATE",s,c),c},o=(s,l,c)=>{for(const u of n)u({type:s,param:l,atom:c})};return i.unstable_listen=s=>(n.add(s),()=>{n.delete(s)}),i.getParams=()=>r.keys(),i.remove=s=>{{if(!r.has(s))return;const[l]=r.get(s);r.delete(s),o("REMOVE",s,l)}},i.setShouldRemove=s=>{if(t=s,!!t)for(const[l,[c,u]]of r)t(u,l)&&(r.delete(l),o("REMOVE",l,c))},i}const FZ=e=>typeof e?.then=="function";function GZ(e=()=>{try{return window.localStorage}catch(t){(m8?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(t);return}},a){var t;let r,n;const i={getItem:(l,c)=>{var u,d;const h=f=>{if(f=f||"",r!==f){try{n=JSON.parse(f,void 0)}catch{return c}r=f}return n},m=(d=(u=e())==null?void 0:u.getItem(l))!=null?d:null;return FZ(m)?m.then(h):h(m)},setItem:(l,c)=>{var u;return(u=e())==null?void 0:u.setItem(l,JSON.stringify(c,void 0))},removeItem:l=>{var c;return(c=e())==null?void 0:c.removeItem(l)}},o=l=>(c,u,d)=>l(c,h=>{let m;try{m=JSON.parse(h||"")}catch{m=d}u(m)});let s;try{s=(t=e())==null?void 0:t.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(l,c)=>{if(!(e()instanceof window.Storage))return()=>{};const u=d=>{d.storageArea===e()&&d.key===l&&c(d.newValue)};return window.addEventListener("storage",u),()=>{window.removeEventListener("storage",u)}}),s&&(i.subscribe=o(s)),i}const cNe=GZ();function qZ(e,a,t=cNe,r){const n=oi(a);return(m8?"production":void 0)!=="production"&&(n.debugPrivate=!0),n.onMount=i=>{i(t.getItem(e,a));let o;return t.subscribe&&(o=t.subscribe(e,i,a)),o},oi(i=>i(n),(i,o,s)=>{const l=typeof s=="function"?s(i(n)):s;return l===sNe?(o(n,a),t.removeItem(e)):FZ(l)?l.then(c=>(o(n,c),t.setItem(e,c))):(o(n,l),t.setItem(e,l))})}function uNe(e,a){const t=_.useMemo(()=>oi(null,(r,n,...i)=>e(r,n,...i)),[e]);return Yk(t)}const dNe=()=>uNe(_.useCallback((e,a)=>a,[]))(),Ee=typeof V=="function"?V:V.default,pNe=({className:e,style:a,handleClear:t})=>p.jsx("button",{className:e,style:a,onClick:t,children:"\u2715"}),hNe=_.memo(pNe),mNe=Ee(hNe)`
6091
6091
  z-index: 1;
6092
6092
  position: absolute;
6093
6093
  right: 24px;
@@ -9548,7 +9548,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:Lt.PHP});h.len
9548
9548
  > * {
9549
9549
  justify-self: start;
9550
9550
  }
9551
- `,eGe=({item:{infoDefinition:e}})=>{const a=xt(),{options:{hideDownloadButtons:t,downloadUrls:r,mockServer:n},parser:{definition:i,definitionUrl:o}}=Na(zi),{languages:s,activeLanguage:l}=Na(DS),c=FFe({downloadUrls:r}),u=zy(o,d8(i.servers||[],n)).sort((b,k)=>b["x-isLive"]&&!k["x-isLive"]?-1:!b["x-isLive"]&&k["x-isLive"]?1:0),d=!!i?.["x-redocly-openrpc"],h=i?.["x-mcp"],m=zy(o,h?.servers||i.servers||[]),f=!(Object.keys(i.paths||{}).length>0)&&h;return p.jsxs(p.Fragment,{children:[!t&&c&&p.jsx(Rp,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:p.jsx($Ve,{downloadObjects:c})}),e&&p.jsx(aGe,{className:"panel-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:p.jsx(dc,{children:p.jsx(XVe,{info:e,translate:a})})}),!!h&&p.jsx(Rp,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:p.jsx(ZFe,{mcpInfo:h,mcpServers:m})}),!!s?.length&&!f&&!d&&p.jsx(Rp,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:p.jsx(HFe,{languages:s,activeLanguage:l})}),!!u.length&&!f&&p.jsx(Rp,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:p.jsx(aFe,{servers:u,path:"/",translate:a})})]})},aGe=Ee(Rp)`
9551
+ `,eGe=({item:{infoDefinition:e}})=>{const a=xt(),{options:{hideDownloadButtons:t,downloadUrls:r,mockServer:n},parser:{definition:i,definitionUrl:o}}=Na(zi),{languages:s,activeLanguage:l}=Na(DS),c=FFe({downloadUrls:r}),u=zy(o,d8(i.servers||[],n)).sort((b,k)=>b["x-isLive"]&&!k["x-isLive"]?-1:!b["x-isLive"]&&k["x-isLive"]?1:0),d=!!i?.["x-redocly-openrpc"],h=i?.["x-mcp"],m=zy(o,h?.servers||i.servers||[]),f=!(Object.keys(i.paths||{}).length>0)&&h;return p.jsxs(p.Fragment,{children:[!t&&c&&p.jsx(Rp,{className:"panel-download",header:a(d?"openrpc.download.description.title":"openapi.download.description.title",d?"Download OpenRPC description":"Download OpenAPI description"),isExpandable:!1,children:p.jsx($Ve,{downloadObjects:c})}),e&&p.jsx(aGe,{className:"panel-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:p.jsx(dc,{children:p.jsx(XVe,{info:e,translate:a})})}),!!h&&p.jsx(Rp,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:p.jsx(ZFe,{mcpInfo:h,mcpServers:m})}),!!s?.length&&!f&&!d&&p.jsx(Rp,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:p.jsx(HFe,{languages:s,activeLanguage:l})}),!!u.length&&!f&&p.jsx(Rp,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:p.jsx(aFe,{servers:u,path:"/",translate:a})})]})},aGe=Ee(Rp)`
9552
9552
  &:has(${iT}:empty) {
9553
9553
  display: none;
9554
9554
  }
@@ -10324,7 +10324,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:Lt.PHP});h.len
10324
10324
  *
10325
10325
  * @author Feross Aboukhadijeh <https://feross.org>
10326
10326
  * @license MIT
10327
- */var Pae;function l1(){return Pae||(Pae=1,(function(e){const a=PYe(),t=AYe(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=x,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const M=new Uint8Array(1),Y={foo:function(){return 42}};return Object.setPrototypeOf(Y,Uint8Array.prototype),Object.setPrototypeOf(M,Y),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(M){if(M>n)throw new RangeError('The value "'+M+'" is invalid for option "size"');const Y=new Uint8Array(M);return Object.setPrototypeOf(Y,s.prototype),Y}function s(M,Y,oe){if(typeof M=="number"){if(typeof Y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(M)}return l(M,Y,oe)}s.poolSize=8192;function l(M,Y,oe){if(typeof M=="string")return h(M,Y);if(ArrayBuffer.isView(M))return f(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(he(M,ArrayBuffer)||M&&he(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(M,SharedArrayBuffer)||M&&he(M.buffer,SharedArrayBuffer)))return b(M,Y,oe);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const je=M.valueOf&&M.valueOf();if(je!=null&&je!==M)return s.from(je,Y,oe);const Me=k(M);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),Y,oe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,Y,oe){return l(M,Y,oe)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function u(M,Y,oe){return c(M),M<=0?o(M):Y!==void 0?typeof oe=="string"?o(M).fill(Y,oe):o(M).fill(Y):o(M)}s.alloc=function(M,Y,oe){return u(M,Y,oe)};function d(M){return c(M),o(M<0?0:v(M)|0)}s.allocUnsafe=function(M){return d(M)},s.allocUnsafeSlow=function(M){return d(M)};function h(M,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!s.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);const oe=z(M,Y)|0;let je=o(oe);const Me=je.write(M,Y);return Me!==oe&&(je=je.slice(0,Me)),je}function m(M){const Y=M.length<0?0:v(M.length)|0,oe=o(Y);for(let je=0;je<Y;je+=1)oe[je]=M[je]&255;return oe}function f(M){if(he(M,Uint8Array)){const Y=new Uint8Array(M);return b(Y.buffer,Y.byteOffset,Y.byteLength)}return m(M)}function b(M,Y,oe){if(Y<0||M.byteLength<Y)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<Y+(oe||0))throw new RangeError('"length" is outside of buffer bounds');let je;return Y===void 0&&oe===void 0?je=new Uint8Array(M):oe===void 0?je=new Uint8Array(M,Y):je=new Uint8Array(M,Y,oe),Object.setPrototypeOf(je,s.prototype),je}function k(M){if(s.isBuffer(M)){const Y=v(M.length)|0,oe=o(Y);return oe.length===0||M.copy(oe,0,0,Y),oe}if(M.length!==void 0)return typeof M.length!="number"||we(M.length)?o(0):m(M);if(M.type==="Buffer"&&Array.isArray(M.data))return m(M.data)}function v(M){if(M>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return M|0}function x(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,Y){if(he(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),he(Y,Uint8Array)&&(Y=s.from(Y,Y.offset,Y.byteLength)),!s.isBuffer(M)||!s.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===Y)return 0;let oe=M.length,je=Y.length;for(let Me=0,Te=Math.min(oe,je);Me<Te;++Me)if(M[Me]!==Y[Me]){oe=M[Me],je=Y[Me];break}return oe<je?-1:je<oe?1:0},s.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(M,Y){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return s.alloc(0);let oe;if(Y===void 0)for(Y=0,oe=0;oe<M.length;++oe)Y+=M[oe].length;const je=s.allocUnsafe(Y);let Me=0;for(oe=0;oe<M.length;++oe){let Te=M[oe];if(he(Te,Uint8Array))Me+Te.length>je.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(je,Me)):Uint8Array.prototype.set.call(je,Te,Me);else if(s.isBuffer(Te))Te.copy(je,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return je};function z(M,Y){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||he(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const oe=M.length,je=arguments.length>2&&arguments[2]===!0;if(!je&&oe===0)return 0;let Me=!1;for(;;)switch(Y){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":return Z(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return ve(M).length;default:if(Me)return je?-1:Z(M).length;Y=(""+Y).toLowerCase(),Me=!0}}s.byteLength=z;function j(M,Y,oe){let je=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length||((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)||(oe>>>=0,Y>>>=0,oe<=Y))return"";for(M||(M="utf8");;)switch(M){case"hex":return me(this,Y,oe);case"utf8":case"utf-8":return N(this,Y,oe);case"ascii":return se(this,Y,oe);case"latin1":case"binary":return re(this,Y,oe);case"base64":return W(this,Y,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,Y,oe);default:if(je)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),je=!0}}s.prototype._isBuffer=!0;function w(M,Y,oe){const je=M[Y];M[Y]=M[oe],M[oe]=je}s.prototype.swap16=function(){const M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<M;Y+=2)w(this,Y,Y+1);return this},s.prototype.swap32=function(){const M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<M;Y+=4)w(this,Y,Y+3),w(this,Y+1,Y+2);return this},s.prototype.swap64=function(){const M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<M;Y+=8)w(this,Y,Y+7),w(this,Y+1,Y+6),w(this,Y+2,Y+5),w(this,Y+3,Y+4);return this},s.prototype.toString=function(){const M=this.length;return M===0?"":arguments.length===0?N(this,0,M):j.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(M){if(!s.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:s.compare(this,M)===0},s.prototype.inspect=function(){let M="";const Y=e.INSPECT_MAX_BYTES;return M=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(M+=" ... "),"<Buffer "+M+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(M,Y,oe,je,Me){if(he(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(Y===void 0&&(Y=0),oe===void 0&&(oe=M?M.length:0),je===void 0&&(je=0),Me===void 0&&(Me=this.length),Y<0||oe>M.length||je<0||Me>this.length)throw new RangeError("out of range index");if(je>=Me&&Y>=oe)return 0;if(je>=Me)return-1;if(Y>=oe)return 1;if(Y>>>=0,oe>>>=0,je>>>=0,Me>>>=0,this===M)return 0;let Te=Me-je,De=oe-Y;const ra=Math.min(Te,De),pa=this.slice(je,Me),va=M.slice(Y,oe);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function C(M,Y,oe,je,Me){if(M.length===0)return-1;if(typeof oe=="string"?(je=oe,oe=0):oe>2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,we(oe)&&(oe=Me?0:M.length-1),oe<0&&(oe=M.length+oe),oe>=M.length){if(Me)return-1;oe=M.length-1}else if(oe<0)if(Me)oe=0;else return-1;if(typeof Y=="string"&&(Y=s.from(Y,je)),s.isBuffer(Y))return Y.length===0?-1:O(M,Y,oe,je,Me);if(typeof Y=="number")return Y=Y&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(M,Y,oe):Uint8Array.prototype.lastIndexOf.call(M,Y,oe):O(M,[Y],oe,je,Me);throw new TypeError("val must be string, number or Buffer")}function O(M,Y,oe,je,Me){let Te=1,De=M.length,ra=Y.length;if(je!==void 0&&(je=String(je).toLowerCase(),je==="ucs2"||je==="ucs-2"||je==="utf16le"||je==="utf-16le")){if(M.length<2||Y.length<2)return-1;Te=2,De/=2,ra/=2,oe/=2}function pa(sa,ya){return Te===1?sa[ya]:sa.readUInt16BE(ya*Te)}let va;if(Me){let sa=-1;for(va=oe;va<De;va++)if(pa(M,va)===pa(Y,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(oe+ra>De&&(oe=De-ra),va=oe;va>=0;va--){let sa=!0;for(let ya=0;ya<ra;ya++)if(pa(M,va+ya)!==pa(Y,ya)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(M,Y,oe){return this.indexOf(M,Y,oe)!==-1},s.prototype.indexOf=function(M,Y,oe){return C(this,M,Y,oe,!0)},s.prototype.lastIndexOf=function(M,Y,oe){return C(this,M,Y,oe,!1)};function P(M,Y,oe,je){oe=Number(oe)||0;const Me=M.length-oe;je?(je=Number(je),je>Me&&(je=Me)):je=Me;const Te=Y.length;je>Te/2&&(je=Te/2);let De;for(De=0;De<je;++De){const ra=parseInt(Y.substr(De*2,2),16);if(we(ra))return De;M[oe+De]=ra}return De}function B(M,Y,oe,je){return fe(Z(Y,M.length-oe),M,oe,je)}function R(M,Y,oe,je){return fe(ae(Y),M,oe,je)}function q(M,Y,oe,je){return fe(ve(Y),M,oe,je)}function L(M,Y,oe,je){return fe(ce(Y,M.length-oe),M,oe,je)}s.prototype.write=function(M,Y,oe,je){if(Y===void 0)je="utf8",oe=this.length,Y=0;else if(oe===void 0&&typeof Y=="string")je=Y,oe=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(oe)?(oe=oe>>>0,je===void 0&&(je="utf8")):(je=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-Y;if((oe===void 0||oe>Me)&&(oe=Me),M.length>0&&(oe<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");je||(je="utf8");let Te=!1;for(;;)switch(je){case"hex":return P(this,M,Y,oe);case"utf8":case"utf-8":return B(this,M,Y,oe);case"ascii":case"latin1":case"binary":return R(this,M,Y,oe);case"base64":return q(this,M,Y,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,M,Y,oe);default:if(Te)throw new TypeError("Unknown encoding: "+je);je=(""+je).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(M,Y,oe){return Y===0&&oe===M.length?a.fromByteArray(M):a.fromByteArray(M.slice(Y,oe))}function N(M,Y,oe){oe=Math.min(M.length,oe);const je=[];let Me=Y;for(;Me<oe;){const Te=M[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=oe){let pa,va,sa,ya;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=M[Me+1],(pa&192)===128&&(ya=(Te&31)<<6|pa&63,ya>127&&(De=ya));break;case 3:pa=M[Me+1],va=M[Me+2],(pa&192)===128&&(va&192)===128&&(ya=(Te&15)<<12|(pa&63)<<6|va&63,ya>2047&&(ya<55296||ya>57343)&&(De=ya));break;case 4:pa=M[Me+1],va=M[Me+2],sa=M[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ya=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ya>65535&&ya<1114112&&(De=ya))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,je.push(De>>>10&1023|55296),De=56320|De&1023),je.push(De),Me+=ra}return ee(je)}const X=4096;function ee(M){const Y=M.length;if(Y<=X)return String.fromCharCode.apply(String,M);let oe="",je=0;for(;je<Y;)oe+=String.fromCharCode.apply(String,M.slice(je,je+=X));return oe}function se(M,Y,oe){let je="";oe=Math.min(M.length,oe);for(let Me=Y;Me<oe;++Me)je+=String.fromCharCode(M[Me]&127);return je}function re(M,Y,oe){let je="";oe=Math.min(M.length,oe);for(let Me=Y;Me<oe;++Me)je+=String.fromCharCode(M[Me]);return je}function me(M,Y,oe){const je=M.length;(!Y||Y<0)&&(Y=0),(!oe||oe<0||oe>je)&&(oe=je);let Me="";for(let Te=Y;Te<oe;++Te)Me+=Oe[M[Te]];return Me}function K(M,Y,oe){const je=M.slice(Y,oe);let Me="";for(let Te=0;Te<je.length-1;Te+=2)Me+=String.fromCharCode(je[Te]+je[Te+1]*256);return Me}s.prototype.slice=function(M,Y){const oe=this.length;M=~~M,Y=Y===void 0?oe:~~Y,M<0?(M+=oe,M<0&&(M=0)):M>oe&&(M=oe),Y<0?(Y+=oe,Y<0&&(Y=0)):Y>oe&&(Y=oe),Y<M&&(Y=M);const je=this.subarray(M,Y);return Object.setPrototypeOf(je,s.prototype),je};function F(M,Y,oe){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+Y>oe)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M],Me=1,Te=0;for(;++Te<Y&&(Me*=256);)je+=this[M+Te]*Me;return je},s.prototype.readUintBE=s.prototype.readUIntBE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M+--Y],Me=1;for(;Y>0&&(Me*=256);)je+=this[M+--Y]*Me;return je},s.prototype.readUint8=s.prototype.readUInt8=function(M,Y){return M=M>>>0,Y||F(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,Y){return M=M>>>0,Y||F(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,Y){return M=M>>>0,Y||F(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readBigUInt64LE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=Y+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24,Me=this[++M]+this[++M]*2**8+this[++M]*2**16+oe*2**24;return BigInt(je)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=Y*2**24+this[++M]*2**16+this[++M]*2**8+this[++M],Me=this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+oe;return(BigInt(je)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M],Me=1,Te=0;for(;++Te<Y&&(Me*=256);)je+=this[M+Te]*Me;return Me*=128,je>=Me&&(je-=Math.pow(2,8*Y)),je},s.prototype.readIntBE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=Y,Me=1,Te=this[M+--je];for(;je>0&&(Me*=256);)Te+=this[M+--je]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*Y)),Te},s.prototype.readInt8=function(M,Y){return M=M>>>0,Y||F(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,Y){M=M>>>0,Y||F(M,2,this.length);const oe=this[M]|this[M+1]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt16BE=function(M,Y){M=M>>>0,Y||F(M,2,this.length);const oe=this[M+1]|this[M]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt32LE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readBigInt64LE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=this[M+4]+this[M+5]*2**8+this[M+6]*2**16+(oe<<24);return(BigInt(je)<<BigInt(32))+BigInt(Y+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24)}),s.prototype.readBigInt64BE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=(Y<<24)+this[++M]*2**16+this[++M]*2**8+this[++M];return(BigInt(je)<<BigInt(32))+BigInt(this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+oe)}),s.prototype.readFloatLE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),t.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),t.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,Y){return M=M>>>0,Y||F(M,8,this.length),t.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,Y){return M=M>>>0,Y||F(M,8,this.length),t.read(this,M,!1,52,8)};function Q(M,Y,oe,je,Me,Te){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>Me||Y<Te)throw new RangeError('"value" argument is out of bounds');if(oe+je>M.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,oe=oe>>>0,!je){const De=Math.pow(2,8*oe)-1;Q(this,M,Y,oe,De,0)}let Me=1,Te=0;for(this[Y]=M&255;++Te<oe&&(Me*=256);)this[Y+Te]=M/Me&255;return Y+oe},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,oe=oe>>>0,!je){const De=Math.pow(2,8*oe)-1;Q(this,M,Y,oe,De,0)}let Me=oe-1,Te=1;for(this[Y+Me]=M&255;--Me>=0&&(Te*=256);)this[Y+Me]=M/Te&255;return Y+oe},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,1,255,0),this[Y]=M&255,Y+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,65535,0),this[Y]=M&255,this[Y+1]=M>>>8,Y+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,65535,0),this[Y]=M>>>8,this[Y+1]=M&255,Y+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,4294967295,0),this[Y+3]=M>>>24,this[Y+2]=M>>>16,this[Y+1]=M>>>8,this[Y]=M&255,Y+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,4294967295,0),this[Y]=M>>>24,this[Y+1]=M>>>16,this[Y+2]=M>>>8,this[Y+3]=M&255,Y+4};function H(M,Y,oe,je,Me){$(Y,je,Me,M,oe,7);let Te=Number(Y&BigInt(4294967295));M[oe++]=Te,Te=Te>>8,M[oe++]=Te,Te=Te>>8,M[oe++]=Te,Te=Te>>8,M[oe++]=Te;let De=Number(Y>>BigInt(32)&BigInt(4294967295));return M[oe++]=De,De=De>>8,M[oe++]=De,De=De>>8,M[oe++]=De,De=De>>8,M[oe++]=De,oe}function E(M,Y,oe,je,Me){$(Y,je,Me,M,oe,7);let Te=Number(Y&BigInt(4294967295));M[oe+7]=Te,Te=Te>>8,M[oe+6]=Te,Te=Te>>8,M[oe+5]=Te,Te=Te>>8,M[oe+4]=Te;let De=Number(Y>>BigInt(32)&BigInt(4294967295));return M[oe+3]=De,De=De>>8,M[oe+2]=De,De=De>>8,M[oe+1]=De,De=De>>8,M[oe]=De,oe+8}s.prototype.writeBigUInt64LE=Re(function(M,Y=0){return H(this,M,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Re(function(M,Y=0){return E(this,M,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,!je){const ra=Math.pow(2,8*oe-1);Q(this,M,Y,oe,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[Y]=M&255;++Me<oe&&(Te*=256);)M<0&&De===0&&this[Y+Me-1]!==0&&(De=1),this[Y+Me]=(M/Te>>0)-De&255;return Y+oe},s.prototype.writeIntBE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,!je){const ra=Math.pow(2,8*oe-1);Q(this,M,Y,oe,ra-1,-ra)}let Me=oe-1,Te=1,De=0;for(this[Y+Me]=M&255;--Me>=0&&(Te*=256);)M<0&&De===0&&this[Y+Me+1]!==0&&(De=1),this[Y+Me]=(M/Te>>0)-De&255;return Y+oe},s.prototype.writeInt8=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,1,127,-128),M<0&&(M=255+M+1),this[Y]=M&255,Y+1},s.prototype.writeInt16LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,32767,-32768),this[Y]=M&255,this[Y+1]=M>>>8,Y+2},s.prototype.writeInt16BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,32767,-32768),this[Y]=M>>>8,this[Y+1]=M&255,Y+2},s.prototype.writeInt32LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,2147483647,-2147483648),this[Y]=M&255,this[Y+1]=M>>>8,this[Y+2]=M>>>16,this[Y+3]=M>>>24,Y+4},s.prototype.writeInt32BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[Y]=M>>>24,this[Y+1]=M>>>16,this[Y+2]=M>>>8,this[Y+3]=M&255,Y+4},s.prototype.writeBigInt64LE=Re(function(M,Y=0){return H(this,M,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Re(function(M,Y=0){return E(this,M,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function D(M,Y,oe,je,Me,Te){if(oe+je>M.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function U(M,Y,oe,je,Me){return Y=+Y,oe=oe>>>0,Me||D(M,Y,oe,4),t.write(M,Y,oe,je,23,4),oe+4}s.prototype.writeFloatLE=function(M,Y,oe){return U(this,M,Y,!0,oe)},s.prototype.writeFloatBE=function(M,Y,oe){return U(this,M,Y,!1,oe)};function te(M,Y,oe,je,Me){return Y=+Y,oe=oe>>>0,Me||D(M,Y,oe,8),t.write(M,Y,oe,je,52,8),oe+8}s.prototype.writeDoubleLE=function(M,Y,oe){return te(this,M,Y,!0,oe)},s.prototype.writeDoubleBE=function(M,Y,oe){return te(this,M,Y,!1,oe)},s.prototype.copy=function(M,Y,oe,je){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!je&&je!==0&&(je=this.length),Y>=M.length&&(Y=M.length),Y||(Y=0),je>0&&je<oe&&(je=oe),je===oe||M.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(je<0)throw new RangeError("sourceEnd out of bounds");je>this.length&&(je=this.length),M.length-Y<je-oe&&(je=M.length-Y+oe);const Me=je-oe;return this===M&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Y,oe,je):Uint8Array.prototype.set.call(M,this.subarray(oe,je),Y),Me},s.prototype.fill=function(M,Y,oe,je){if(typeof M=="string"){if(typeof Y=="string"?(je=Y,Y=0,oe=this.length):typeof oe=="string"&&(je=oe,oe=this.length),je!==void 0&&typeof je!="string")throw new TypeError("encoding must be a string");if(typeof je=="string"&&!s.isEncoding(je))throw new TypeError("Unknown encoding: "+je);if(M.length===1){const Te=M.charCodeAt(0);(je==="utf8"&&Te<128||je==="latin1")&&(M=Te)}}else typeof M=="number"?M=M&255:typeof M=="boolean"&&(M=Number(M));if(Y<0||this.length<Y||this.length<oe)throw new RangeError("Out of range index");if(oe<=Y)return this;Y=Y>>>0,oe=oe===void 0?this.length:oe>>>0,M||(M=0);let Me;if(typeof M=="number")for(Me=Y;Me<oe;++Me)this[Me]=M;else{const Te=s.isBuffer(M)?M:s.from(M,je),De=Te.length;if(De===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(Me=0;Me<oe-Y;++Me)this[Me+Y]=Te[Me%De]}return this};const ie={};function ye(M,Y,oe){ie[M]=class extends oe{constructor(){super(),Object.defineProperty(this,"message",{value:Y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,delete this.name}get code(){return M}set code(je){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:je,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}ye("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ye("ERR_INVALID_ARG_TYPE",function(M,Y){return`The "${M}" argument must be of type number. Received type ${typeof Y}`},TypeError),ye("ERR_OUT_OF_RANGE",function(M,Y,oe){let je=`The value of "${M}" is out of range.`,Me=oe;return Number.isInteger(oe)&&Math.abs(oe)>2**32?Me=de(String(oe)):typeof oe=="bigint"&&(Me=String(oe),(oe>BigInt(2)**BigInt(32)||oe<-(BigInt(2)**BigInt(32)))&&(Me=de(Me)),Me+="n"),je+=` It must be ${Y}. Received ${Me}`,je},RangeError);function de(M){let Y="",oe=M.length;const je=M[0]==="-"?1:0;for(;oe>=je+4;oe-=3)Y=`_${M.slice(oe-3,oe)}${Y}`;return`${M.slice(0,oe)}${Y}`}function T(M,Y,oe){le(Y,"offset"),(M[Y]===void 0||M[Y+oe]===void 0)&&G(Y,M.length-(oe+1))}function $(M,Y,oe,je,Me,Te){if(M>oe||M<Y){const De=typeof Y=="bigint"?"n":"";let ra;throw Y===0||Y===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,M)}T(je,Me,Te)}function le(M,Y){if(typeof M!="number")throw new ie.ERR_INVALID_ARG_TYPE(Y,"number",M)}function G(M,Y,oe){throw Math.floor(M)!==M?(le(M,oe),new ie.ERR_OUT_OF_RANGE("offset","an integer",M)):Y<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Y}`,M)}const ue=/[^+/0-9A-Za-z-_]/g;function pe(M){if(M=M.split("=")[0],M=M.trim().replace(ue,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Z(M,Y){Y=Y||1/0;let oe;const je=M.length;let Me=null;const Te=[];for(let De=0;De<je;++De){if(oe=M.charCodeAt(De),oe>55295&&oe<57344){if(!Me){if(oe>56319){(Y-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===je){(Y-=3)>-1&&Te.push(239,191,189);continue}Me=oe;continue}if(oe<56320){(Y-=3)>-1&&Te.push(239,191,189),Me=oe;continue}oe=(Me-55296<<10|oe-56320)+65536}else Me&&(Y-=3)>-1&&Te.push(239,191,189);if(Me=null,oe<128){if((Y-=1)<0)break;Te.push(oe)}else if(oe<2048){if((Y-=2)<0)break;Te.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((Y-=3)<0)break;Te.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((Y-=4)<0)break;Te.push(oe>>18|240,oe>>12&63|128,oe>>6&63|128,oe&63|128)}else throw new Error("Invalid code point")}return Te}function ae(M){const Y=[];for(let oe=0;oe<M.length;++oe)Y.push(M.charCodeAt(oe)&255);return Y}function ce(M,Y){let oe,je,Me;const Te=[];for(let De=0;De<M.length&&!((Y-=2)<0);++De)oe=M.charCodeAt(De),je=oe>>8,Me=oe%256,Te.push(Me),Te.push(je);return Te}function ve(M){return a.toByteArray(pe(M))}function fe(M,Y,oe,je){let Me;for(Me=0;Me<je&&!(Me+oe>=Y.length||Me>=M.length);++Me)Y[Me+oe]=M[Me];return Me}function he(M,Y){return M instanceof Y||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===Y.name}function we(M){return M!==M}const Oe=(function(){const M="0123456789abcdef",Y=new Array(256);for(let oe=0;oe<16;++oe){const je=oe*16;for(let Me=0;Me<16;++Me)Y[je+Me]=M[oe]+M[Me]}return Y})();function Re(M){return typeof BigInt>"u"?ta:M}function ta(){throw new Error("BigInt not supported")}})(Cae)),Cae}const Aae=LV(xY);var sB,Mae;function MYe(){if(Mae)return sB;Mae=1;function e(f,b){var k=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);b&&(v=v.filter(function(x){return Object.getOwnPropertyDescriptor(f,x).enumerable})),k.push.apply(k,v)}return k}function a(f){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?e(Object(k),!0).forEach(function(v){t(f,v,k[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(k)):e(Object(k)).forEach(function(v){Object.defineProperty(f,v,Object.getOwnPropertyDescriptor(k,v))})}return f}function t(f,b,k){return b=o(b),b in f?Object.defineProperty(f,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):f[b]=k,f}function r(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function n(f,b){for(var k=0;k<b.length;k++){var v=b[k];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,o(v.key),v)}}function i(f,b,k){return b&&n(f.prototype,b),Object.defineProperty(f,"prototype",{writable:!1}),f}function o(f){var b=s(f,"string");return typeof b=="symbol"?b:String(b)}function s(f,b){if(typeof f!="object"||f===null)return f;var k=f[Symbol.toPrimitive];if(k!==void 0){var v=k.call(f,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}var l=l1(),c=l.Buffer,u=Aae,d=u.inspect,h=d&&d.custom||"inspect";function m(f,b,k){c.prototype.copy.call(f,b,k)}return sB=(function(){function f(){r(this,f),this.head=null,this.tail=null,this.length=0}return i(f,[{key:"push",value:function(b){var k={data:b,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(b){var k={data:b,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var k=this.head,v=""+k.data;k=k.next;)v+=b+k.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var k=c.allocUnsafe(b>>>0),v=this.head,x=0;v;)m(v.data,k,x),x+=v.data.length,v=v.next;return k}},{key:"consume",value:function(b,k){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=k?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var k=this.head,v=1,x=k.data;for(b-=x.length;k=k.next;){var z=k.data,j=b>z.length?z.length:b;if(j===z.length?x+=z:x+=z.slice(0,b),b-=j,b===0){j===z.length?(++v,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=z.slice(j));break}++v}return this.length-=v,x}},{key:"_getBuffer",value:function(b){var k=c.allocUnsafe(b),v=this.head,x=1;for(v.data.copy(k),b-=v.data.length;v=v.next;){var z=v.data,j=b>z.length?z.length:b;if(z.copy(k,k.length-b,0,j),b-=j,b===0){j===z.length?(++x,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(j));break}++x}return this.length-=x,k}},{key:h,value:function(b,k){return d(this,a(a({},k),{},{depth:0,customInspect:!1}))}}]),f})(),sB}var lB,Tae;function Bae(){if(Tae)return lB;Tae=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return lB={destroy:e,undestroy:r,errorOrDestroy:i},lB}var cB={},Eae;function qf(){if(Eae)return cB;Eae=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(h,m,f){return typeof l=="string"?l:l(h,m,f)}var d=(function(h){e(m,h);function m(f,b,k){return h.call(this,u(f,b,k))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),cB.codes=a,cB}var uB,_ae;function Rae(){if(_ae)return uB;_ae=1;var e=qf().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return uB={getHighWaterMark:t},uB}var dB,Lae;function TYe(){if(Lae)return dB;Lae=1,dB=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return dB}var pB,Nae;function Dae(){if(Nae)return pB;Nae=1,pB=P;function e(U){var te=this;this.next=null,this.entry=null,this.finish=function(){D(te,U)}}var a;P.WritableState=C;var t={deprecate:TYe()},r=Sae(),n=l1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(U){return n.from(U)}function s(U){return n.isBuffer(U)||U instanceof i}var l=Bae(),c=Rae(),u=c.getHighWaterMark,d=qf().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,f=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,k=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,j=l.errorOrDestroy;function w(){}function C(U,te,ie){a=a||Uf(),U=U||{},typeof ie!="boolean"&&(ie=te instanceof a),this.objectMode=!!U.objectMode,ie&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=u(this,U,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ye=U.decodeStrings===!1;this.decodeStrings=!ye,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(de){ee(te,de)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}C.prototype.getBuffer=function(){for(var U=this.bufferedRequest,te=[];U;)te.push(U),U=U.next;return te},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(U){return O.call(this,U)?!0:this!==P?!1:U&&U._writableState instanceof C}})):O=function(U){return U instanceof this};function P(U){a=a||Uf();var te=this instanceof a;if(!te&&!O.call(P,this))return new P(U);this._writableState=new C(U,this,te),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),r.call(this)}P.prototype.pipe=function(){j(this,new b)};function B(U,te){var ie=new x;j(U,ie),process.nextTick(te,ie)}function R(U,te,ie,ye){var de;return ie===null?de=new v:typeof ie!="string"&&!te.objectMode&&(de=new h("chunk",["string","Buffer"],ie)),de?(j(U,de),process.nextTick(ye,de),!1):!0}P.prototype.write=function(U,te,ie){var ye=this._writableState,de=!1,T=!ye.objectMode&&s(U);return T&&!n.isBuffer(U)&&(U=o(U)),typeof te=="function"&&(ie=te,te=null),T?te="buffer":te||(te=ye.defaultEncoding),typeof ie!="function"&&(ie=w),ye.ending?B(this,ie):(T||R(this,ye,U,ie))&&(ye.pendingcb++,de=L(this,ye,T,U,te,ie)),de},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&me(this,U))},P.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new z(U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(U,te,ie){return!U.objectMode&&U.decodeStrings!==!1&&typeof te=="string"&&(te=n.from(te,ie)),te}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(U,te,ie,ye,de,T){if(!ie){var $=q(te,ye,de);ye!==$&&(ie=!0,de="buffer",ye=$)}var le=te.objectMode?1:ye.length;te.length+=le;var G=te.length<te.highWaterMark;if(G||(te.needDrain=!0),te.writing||te.corked){var ue=te.lastBufferedRequest;te.lastBufferedRequest={chunk:ye,encoding:de,isBuf:ie,callback:T,next:null},ue?ue.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else W(U,te,!1,le,ye,de,T);return G}function W(U,te,ie,ye,de,T,$){te.writelen=ye,te.writecb=$,te.writing=!0,te.sync=!0,te.destroyed?te.onwrite(new k("write")):ie?U._writev(de,te.onwrite):U._write(de,T,te.onwrite),te.sync=!1}function N(U,te,ie,ye,de){--te.pendingcb,ie?(process.nextTick(de,ye),process.nextTick(H,U,te),U._writableState.errorEmitted=!0,j(U,ye)):(de(ye),U._writableState.errorEmitted=!0,j(U,ye),H(U,te))}function X(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function ee(U,te){var ie=U._writableState,ye=ie.sync,de=ie.writecb;if(typeof de!="function")throw new f;if(X(ie),te)N(U,ie,ye,te,de);else{var T=K(ie)||U.destroyed;!T&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(U,ie),ye?process.nextTick(se,U,ie,T,de):se(U,ie,T,de)}}function se(U,te,ie,ye){ie||re(U,te),te.pendingcb--,ye(),H(U,te)}function re(U,te){te.length===0&&te.needDrain&&(te.needDrain=!1,U.emit("drain"))}function me(U,te){te.bufferProcessing=!0;var ie=te.bufferedRequest;if(U._writev&&ie&&ie.next){var ye=te.bufferedRequestCount,de=new Array(ye),T=te.corkedRequestsFree;T.entry=ie;for(var $=0,le=!0;ie;)de[$]=ie,ie.isBuf||(le=!1),ie=ie.next,$+=1;de.allBuffers=le,W(U,te,!0,te.length,de,"",T.finish),te.pendingcb++,te.lastBufferedRequest=null,T.next?(te.corkedRequestsFree=T.next,T.next=null):te.corkedRequestsFree=new e(te),te.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ue=ie.encoding,pe=ie.callback,Z=te.objectMode?1:G.length;if(W(U,te,!1,Z,G,ue,pe),ie=ie.next,te.bufferedRequestCount--,te.writing)break}ie===null&&(te.lastBufferedRequest=null)}te.bufferedRequest=ie,te.bufferProcessing=!1}P.prototype._write=function(U,te,ie){ie(new m("_write()"))},P.prototype._writev=null,P.prototype.end=function(U,te,ie){var ye=this._writableState;return typeof U=="function"?(ie=U,U=null,te=null):typeof te=="function"&&(ie=te,te=null),U!=null&&this.write(U,te),ye.corked&&(ye.corked=1,this.uncork()),ye.ending||E(this,ye,ie),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function F(U,te){U._final(function(ie){te.pendingcb--,ie&&j(U,ie),te.prefinished=!0,U.emit("prefinish"),H(U,te)})}function Q(U,te){!te.prefinished&&!te.finalCalled&&(typeof U._final=="function"&&!te.destroyed?(te.pendingcb++,te.finalCalled=!0,process.nextTick(F,U,te)):(te.prefinished=!0,U.emit("prefinish")))}function H(U,te){var ie=K(te);if(ie&&(Q(U,te),te.pendingcb===0&&(te.finished=!0,U.emit("finish"),te.autoDestroy))){var ye=U._readableState;(!ye||ye.autoDestroy&&ye.endEmitted)&&U.destroy()}return ie}function E(U,te,ie){te.ending=!0,H(U,te),ie&&(te.finished?process.nextTick(ie):U.once("finish",ie)),te.ended=!0,U.writable=!1}function D(U,te,ie){var ye=U.entry;for(U.entry=null;ye;){var de=ye.callback;te.pendingcb--,de(ie),ye=ye.next}te.corkedRequestsFree.next=U}return Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(U){this._writableState&&(this._writableState.destroyed=U)}}),P.prototype.destroy=l.destroy,P.prototype._undestroy=l.undestroy,P.prototype._destroy=function(U,te){te(U)},pB}var hB,Iae;function Uf(){if(Iae)return hB;Iae=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};hB=o;for(var a=Wae(),t=Dae(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),hB}var mB={},gB={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var $ae;function BYe(){return $ae||($ae=1,(function(e,a){var t=l1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(gB,gB.exports)),gB.exports}var Kae;function Hae(){if(Kae)return mB;Kae=1;var e=BYe().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var x;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(x)return;v=(""+v).toLowerCase(),x=!0}}function r(v){var x=t(v);if(typeof x!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return x||v}mB.StringDecoder=n;function n(v){this.encoding=r(v);var x;switch(this.encoding){case"utf16le":this.text=d,this.end=h,x=4;break;case"utf8":this.fillLast=l,x=4;break;case"base64":this.text=m,this.end=f,x=3;break;default:this.write=b,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(x)}n.prototype.write=function(v){if(v.length===0)return"";var x,z;if(this.lastNeed){if(x=this.fillLast(v),x===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?x?x+this.text(v,z):this.text(v,z):x||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,x,z){var j=x.length-1;if(j<z)return 0;var w=i(x[j]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--j<z||w===-2?0:(w=i(x[j]),w>=0?(w>0&&(v.lastNeed=w-2),w):--j<z||w===-2?0:(w=i(x[j]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,x,z){if((x[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var x=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,x,0,v.length),this.lastNeed-=v.length}function c(v,x){var z=o(this,v,x);if(!this.lastNeed)return v.toString("utf8",x);this.lastTotal=z;var j=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,j),v.toString("utf8",x,j)}function u(v){var x=v&&v.length?this.write(v):"";return this.lastNeed?x+"\uFFFD":x}function d(v,x){if((v.length-x)%2===0){var z=v.toString("utf16le",x);if(z){var j=z.charCodeAt(z.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",x,v.length-1)}function h(v){var x=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,z)}return x}function m(v,x){var z=(v.length-x)%3;return z===0?v.toString("base64",x):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",x,v.length-z))}function f(v){var x=v&&v.length?this.write(v):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function b(v){return v.toString(this.encoding)}function k(v){return v&&v.length?this.write(v):""}return mB}var fB,Vae;function vB(){if(Vae)return fB;Vae=1;var e=qf().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||h()},d=i._writableState&&i._writableState.finished,h=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,f=function(){l=!1,m=!0,c||s.call(i)},b=function(x){s.call(i,x)},k=function(){var x;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(x=new e),s.call(i,x);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(x=new e),s.call(i,x)},v=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",k),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",f),i.on("finish",h),o.error!==!1&&i.on("error",b),i.on("close",k),function(){i.removeListener("complete",h),i.removeListener("abort",k),i.removeListener("request",v),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",f),i.removeListener("error",b),i.removeListener("close",k)}}return fB=n,fB}var bB,Fae;function EYe(){if(Fae)return bB;Fae=1;var e;function a(z,j,w){return j=t(j),j in z?Object.defineProperty(z,j,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[j]=w,z}function t(z){var j=r(z,"string");return typeof j=="symbol"?j:String(j)}function r(z,j){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var C=w.call(z,j);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(z)}var n=vB(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(z,j){return{value:z,done:j}}function m(z){var j=z[i];if(j!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,j(h(w,!1)))}}function f(z){process.nextTick(m,z)}function b(z,j){return function(w,C){z.then(function(){if(j[l]){w(h(void 0,!0));return}j[u](w,C)},C)}}var k=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,j=this[s];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(P,B){process.nextTick(function(){z[s]?B(z[s]):P(h(void 0,!0))})});var w=this[c],C;if(w)C=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(h(O,!1));C=new Promise(this[u])}return this[c]=C,C}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(j,w){z[d].destroy(null,function(C){if(C){w(C);return}j(h(void 0,!0))})})}),e),k),x=function(z){var j,w=Object.create(v,(j={},a(j,d,{value:z,writable:!0}),a(j,i,{value:null,writable:!0}),a(j,o,{value:null,writable:!0}),a(j,s,{value:null,writable:!0}),a(j,l,{value:z._readableState.endEmitted,writable:!0}),a(j,u,{value:function(C,O){var P=w[d].read();P?(w[c]=null,w[i]=null,w[o]=null,C(h(P,!1))):(w[i]=C,w[o]=O)},writable:!0}),j));return w[c]=null,n(z,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(C)),w[s]=C;return}var P=w[i];P!==null&&(w[c]=null,w[i]=null,w[o]=null,P(h(void 0,!0))),w[l]=!0}),z.on("readable",f.bind(null,w)),w};return bB=x,bB}var Gae,qae;function _Ye(){return qae||(qae=1,Gae=function(){throw new Error("Readable.from is not available in the browser")}),Gae}var kB,Uae;function Wae(){if(Uae)return kB;Uae=1,kB=B;var e;B.ReadableState=P;var a=function(T,$){return T.listeners($).length},t=Sae(),r=l1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(T){return r.from(T)}function o(T){return r.isBuffer(T)||T instanceof n}var s=Aae,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=MYe(),u=Bae(),d=Rae(),h=d.getHighWaterMark,m=qf().codes,f=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,k=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,z,j,w=u.errorOrDestroy,C=["error","close","destroy","pause","resume"];function O(T,$,le){if(typeof T.prependListener=="function")return T.prependListener($,le);!T._events||!T._events[$]?T.on($,le):Array.isArray(T._events[$])?T._events[$].unshift(le):T._events[$]=[le,T._events[$]]}function P(T,$,le){e=e||Uf(),T=T||{},typeof le!="boolean"&&(le=$ instanceof e),this.objectMode=!!T.objectMode,le&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=h(this,T,"readableHighWaterMark",le),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(x||(x=Hae().StringDecoder),this.decoder=new x(T.encoding),this.encoding=T.encoding)}function B(T){if(e=e||Uf(),!(this instanceof B))return new B(T);var $=this instanceof e;this._readableState=new P(T,this,$),this.readable=!0,T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(T,$){$(T)},B.prototype.push=function(T,$){var le=this._readableState,G;return le.objectMode?G=!0:typeof T=="string"&&($=$||le.defaultEncoding,$!==le.encoding&&(T=r.from(T,$),$=""),G=!0),R(this,T,$,!1,G)},B.prototype.unshift=function(T){return R(this,T,null,!0,!1)};function R(T,$,le,G,ue){l("readableAddChunk",$);var pe=T._readableState;if($===null)pe.reading=!1,ee(T,pe);else{var Z;if(ue||(Z=L(pe,$)),Z)w(T,Z);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(T,new v):q(T,pe,$,!0);else if(pe.ended)w(T,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!le?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(T,pe,$,!1):me(T,pe)):q(T,pe,$,!1)}else G||(pe.reading=!1,me(T,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(T,$,le,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,T.emit("data",le)):($.length+=$.objectMode?1:le.length,G?$.buffer.unshift(le):$.buffer.push(le),$.needReadable&&se(T)),me(T,$)}function L(T,$){var le;return!o($)&&typeof $!="string"&&$!==void 0&&!T.objectMode&&(le=new f("chunk",["string","Buffer","Uint8Array"],$)),le}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(T){x||(x=Hae().StringDecoder);var $=new x(T);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,G="";le!==null;)G+=$.write(le.data),le=le.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var W=1073741824;function N(T){return T>=W?T=W:(T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++),T}function X(T,$){return T<=0||$.length===0&&$.ended?0:$.objectMode?1:T!==T?$.flowing&&$.length?$.buffer.head.data.length:$.length:(T>$.highWaterMark&&($.highWaterMark=N(T)),T<=$.length?T:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(T){l("read",T),T=parseInt(T,10);var $=this._readableState,le=T;if(T!==0&&($.emittedReadable=!1),T===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):se(this),null;if(T=X(T,$),T===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-T<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(T=X(le,$)));var ue;return T>0?ue=te(T,$):ue=null,ue===null?($.needReadable=$.length<=$.highWaterMark,T=0):($.length-=T,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),le!==T&&$.ended&&ie(this)),ue!==null&&this.emit("data",ue),ue};function ee(T,$){if(l("onEofChunk"),!$.ended){if($.decoder){var le=$.decoder.end();le&&le.length&&($.buffer.push(le),$.length+=$.objectMode?1:le.length)}$.ended=!0,$.sync?se(T):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,re(T)))}}function se(T){var $=T._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(re,T))}function re(T){var $=T._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(T.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,U(T)}function me(T,$){$.readingMore||($.readingMore=!0,process.nextTick(K,T,$))}function K(T,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var le=$.length;if(l("maybeReadMore read 0"),T.read(0),le===$.length)break}$.readingMore=!1}B.prototype._read=function(T){w(this,new k("_read()"))},B.prototype.pipe=function(T,$){var le=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=T;break;case 1:G.pipes=[G.pipes,T];break;default:G.pipes.push(T);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ue=(!$||$.end!==!1)&&T!==null&&T!==process.stderr,pe=ue?ae:ta;G.endEmitted?process.nextTick(pe):le.once("end",pe),T.on("unpipe",Z);function Z(M,Y){l("onunpipe"),M===le&&Y&&Y.hasUnpiped===!1&&(Y.hasUnpiped=!0,fe())}function ae(){l("onend"),T.end()}var ce=F(le);T.on("drain",ce);var ve=!1;function fe(){l("cleanup"),T.removeListener("close",Oe),T.removeListener("finish",Re),T.removeListener("drain",ce),T.removeListener("error",we),T.removeListener("unpipe",Z),le.removeListener("end",ae),le.removeListener("end",ta),le.removeListener("data",he),ve=!0,G.awaitDrain&&(!T._writableState||T._writableState.needDrain)&&ce()}le.on("data",he);function he(M){l("ondata");var Y=T.write(M);l("dest.write",Y),Y===!1&&((G.pipesCount===1&&G.pipes===T||G.pipesCount>1&&de(G.pipes,T)!==-1)&&!ve&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),le.pause())}function we(M){l("onerror",M),ta(),T.removeListener("error",we),a(T,"error")===0&&w(T,M)}O(T,"error",we);function Oe(){T.removeListener("finish",Re),ta()}T.once("close",Oe);function Re(){l("onfinish"),T.removeListener("close",Oe),ta()}T.once("finish",Re);function ta(){l("unpipe"),le.unpipe(T)}return T.emit("pipe",le),G.flowing||(l("pipe resume"),le.resume()),T};function F(T){return function(){var $=T._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(T,"data")&&($.flowing=!0,U(T))}}B.prototype.unpipe=function(T){var $=this._readableState,le={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return T&&T!==$.pipes?this:(T||(T=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,T&&T.emit("unpipe",this,le),this);if(!T){var G=$.pipes,ue=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ue;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Z=de($.pipes,T);return Z===-1?this:($.pipes.splice(Z,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),T.emit("unpipe",this,le),this)},B.prototype.on=function(T,$){var le=t.prototype.on.call(this,T,$),G=this._readableState;return T==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):T==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?se(this):G.reading||process.nextTick(H,this)),le},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(T,$){var le=t.prototype.removeListener.call(this,T,$);return T==="readable"&&process.nextTick(Q,this),le},B.prototype.removeAllListeners=function(T){var $=t.prototype.removeAllListeners.apply(this,arguments);return(T==="readable"||T===void 0)&&process.nextTick(Q,this),$};function Q(T){var $=T._readableState;$.readableListening=T.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:T.listenerCount("data")>0&&T.resume()}function H(T){l("readable nexttick read 0"),T.read(0)}B.prototype.resume=function(){var T=this._readableState;return T.flowing||(l("resume"),T.flowing=!T.readableListening,E(this,T)),T.paused=!1,this};function E(T,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(D,T,$))}function D(T,$){l("resume",$.reading),$.reading||T.read(0),$.resumeScheduled=!1,T.emit("resume"),U(T),$.flowing&&!$.reading&&T.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(T){var $=T._readableState;for(l("flow",$.flowing);$.flowing&&T.read()!==null;);}B.prototype.wrap=function(T){var $=this,le=this._readableState,G=!1;T.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var Z=le.decoder.end();Z&&Z.length&&$.push(Z)}$.push(null)}),T.on("data",function(Z){if(l("wrapped data"),le.decoder&&(Z=le.decoder.write(Z)),!(le.objectMode&&Z==null)&&!(!le.objectMode&&(!Z||!Z.length))){var ae=$.push(Z);ae||(G=!0,T.pause())}});for(var ue in T)this[ue]===void 0&&typeof T[ue]=="function"&&(this[ue]=(function(Z){return function(){return T[Z].apply(T,arguments)}})(ue));for(var pe=0;pe<C.length;pe++)T.on(C[pe],this.emit.bind(this,C[pe]));return this._read=function(Z){l("wrapped _read",Z),G&&(G=!1,T.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=EYe()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),B._fromList=te,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function te(T,$){if($.length===0)return null;var le;return $.objectMode?le=$.buffer.shift():!T||T>=$.length?($.decoder?le=$.buffer.join(""):$.buffer.length===1?le=$.buffer.first():le=$.buffer.concat($.length),$.buffer.clear()):le=$.buffer.consume(T,$.decoder),le}function ie(T){var $=T._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(ye,$,T))}function ye(T,$){if(l("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&T.length===0&&(T.endEmitted=!0,$.readable=!1,$.emit("end"),T.autoDestroy)){var le=$._writableState;(!le||le.autoDestroy&&le.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(T,$){return j===void 0&&(j=_Ye()),j(B,T,$)});function de(T,$){for(var le=0,G=T.length;le<G;le++)if(T[le]===$)return le;return-1}return kB}var yB,Jae;function Zae(){if(Jae)return yB;Jae=1,yB=s;var e=qf().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Uf();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new t);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var f=this._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,h){c(u,d,h)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,h){h(new a("_transform()"))},s.prototype._write=function(u,d,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=d,!m.transforming){var f=this._readableState;(m.needTransform||f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(h){d(h)})};function c(u,d,h){if(d)return u.emit("error",d);if(h!=null&&u.push(h),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return yB}var xB,Qae;function RYe(){if(Qae)return xB;Qae=1,xB=a;var e=Zae();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},xB}var wB,Xae;function LYe(){if(Xae)return wB;Xae=1;var e;function a(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var t=qf().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,f,b){b=a(b);var k=!1;h.on("close",function(){k=!0}),e===void 0&&(e=vB()),e(h,{readable:m,writable:f},function(x){if(x)return b(x);k=!0,b()});var v=!1;return function(x){if(!k&&!v){if(v=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(x||new n("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function d(){for(var h=arguments.length,m=new Array(h),f=0;f<h;f++)m[f]=arguments[f];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var k,v=m.map(function(x,z){var j=z<m.length-1,w=z>0;return s(x,j,w,function(C){k||(k=C),C&&v.forEach(l),!j&&(v.forEach(l),b(k))})});return m.reduce(c)}return wB=d,wB}var Yae;function ete(){return Yae||(Yae=1,(function(e,a){a=e.exports=Wae(),a.Stream=a,a.Readable=a,a.Writable=Dae(),a.Duplex=Uf(),a.Transform=Zae(),a.PassThrough=RYe(),a.finished=vB(),a.pipeline=LYe()})(iB,iB.exports)),iB.exports}var ate;function tte(){if(ate)return f2;ate=1;var e=yae(),a=Z9(),t=ete(),r=f2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=f2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let b=function(){d.read().then(function(k){if(!c._destroyed){if(l(k.done),k.done){c.push(null);return}c.push(Buffer.from(k.value)),b()}}).catch(function(k){l(!0),c._destroyed||c.emit("error",k)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(k,v){c.headers[v.toLowerCase()]=k,c.rawHeaders.push(v,k)}),e.writableStream){var u=new WritableStream({write:function(k){return l(!1),new Promise(function(v,x){c._destroyed?x():c.push(Buffer.from(k))?v():c._resumeFetch=v})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(k){l(!0),c._destroyed||c.emit("error",k)}});try{o.body.pipeTo(u).catch(function(k){l(!0),c._destroyed||c.emit("error",k)});return}catch{}}var d=o.body.getReader();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var h=i.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(b){var k=b.match(/^([^:]+):\s*(.*)/);if(k){var v=k[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(k[2])):c.headers[v]!==void 0?c.headers[v]+=", "+k[2]:c.headers[v]=k[2],c.rawHeaders.push(k[1],k[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var f=m.match(/;\s*charset=([^;])(;|$)/);f&&(c._charset=f[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var h=new globalThis.MSStreamReader;h.onprogress=function(){h.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(h.result.slice(o._pos)))),o._pos=h.result.byteLength)},h.onload=function(){i(!0),o.push(null)},h.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},f2}var rte;function NYe(){if(rte)return nB.exports;rte=1;var e=yae(),a=Z9(),t=tte(),r=ete(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=nB.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(f){d.setHeader(f,u.headers[f])});var h,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,h=!0;else if(u.mode==="prefer-streaming")h=!1;else if(u.mode==="allow-wrong-content-type")h=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(h,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var h=this,m=u.toLowerCase();c.indexOf(m)===-1&&(h._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var h=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(h["content-type"]||{}).value||""}));var f=[];if(Object.keys(h).forEach(function(x){var z=h[x].name,j=h[x].value;Array.isArray(j)?j.forEach(function(w){f.push([z,w])}):f.push([z,j])}),u._mode==="fetch"){var b=null;if(e.abortController){var k=new AbortController;b=k.signal,u._fetchAbortController=k,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:f,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(x){u._fetchResponse=x,u._resetTimers(!1),u._connect()},function(x){u._resetTimers(!0),u._destroyed||u.emit("error",x)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(x){process.nextTick(function(){u.emit("error",x)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),f.forEach(function(x){v.setRequestHeader(x[0],x[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(x){process.nextTick(function(){u.emit("error",x)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,h){var m=this;m._body.push(u),h()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,h){var m=this;typeof u=="function"&&(h=u,u=void 0),r.Writable.prototype.end.call(m,u,d,h)},s.prototype.setTimeout=function(u,d){var h=this;d&&h.once("timeout",d),h._socketTimeout=u,h._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return nB.exports}var zB,nte;function DYe(){if(nte)return zB;nte=1,zB=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return zB}var ite,ote;function IYe(){return ote||(ote=1,ite={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),ite}var ste;function $Ye(){return ste||(ste=1,(function(e){var a=NYe(),t=tte(),r=DYe(),n=IYe(),i=FT(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,h=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(h?":"+h:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var f=new a(s);return l&&f.on("response",l),f},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(vae)),vae}var lte,cte;function KYe(){return cte||(cte=1,lte={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},$Ye().STATUS_CODES)}),lte}const HYe="7.0.8",VYe={version:HYe};var SB,ute;function FYe(){if(ute)return SB;ute=1;const e=Gf,a=FT(),t=wYe(),r=Gf,n=Gf,i=m2(),o=i.jptr,s=JT().isRef,l=g2().clone,c=g2().circularClone,u=XT().recurse,d=CYe(),h=jYe(),m=mae(),f=KYe().statusCodes,b=VYe.version,k="3.0.0";let v;class x extends Error{constructor($){super($),this.name="S2OError"}}function z(T,$){let le=new x(T);if(le.options=$,$.promise)$.promise.reject(le);else throw le}function j(T,$,le){le.warnOnly?$[le.warnProperty||"x-s2o-warning"]=T:z(T,le)}function w(T,$,le){if(T.nullable&&le.patches++,T.discriminator&&typeof T.discriminator=="string"&&(T.discriminator={propertyName:T.discriminator}),T.items&&Array.isArray(T.items)&&(T.items.length===0?T.items={}:T.items.length===1?T.items=T.items[0]:T.items={anyOf:T.items}),T.type&&Array.isArray(T.type))if(le.patch){if(le.patches++,T.type.length===0)delete T.type;else{T.oneOf||(T.oneOf=[]);for(let G of T.type){let ue={};if(G==="null")T.nullable=!0;else{ue.type=G;for(let pe of m.arrayProperties)typeof T.prop<"u"&&(ue[pe]=T[pe],delete T[pe])}ue.type&&T.oneOf.push(ue)}delete T.type,T.oneOf.length===0?delete T.oneOf:T.oneOf.length<2&&(T.type=T.oneOf[0].type,Object.keys(T.oneOf[0]).length>1&&j("Lost properties from oneOf",T,le),delete T.oneOf)}T.type&&Array.isArray(T.type)&&T.type.length===1&&(T.type=T.type[0])}else z("(Patchable) schema type must not be an array",le);T.type&&T.type==="null"&&(delete T.type,T.nullable=!0),T.type==="array"&&!T.items&&(T.items={}),T.type==="file"&&(T.type="string",T.format="binary"),typeof T.required=="boolean"&&(T.required&&T.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(T.name)),delete T.required),T.xml&&typeof T.xml.namespace=="string"&&(T.xml.namespace||delete T.xml.namespace),typeof T.allowEmptyValue<"u"&&(le.patches++,delete T.allowEmptyValue)}function C(T,$){if(T["x-required"]&&Array.isArray(T["x-required"])&&(T.required||(T.required=[]),T.required=T.required.concat(T["x-required"]),delete T["x-required"]),T["x-anyOf"]&&(T.anyOf=T["x-anyOf"],delete T["x-anyOf"]),T["x-oneOf"]&&(T.oneOf=T["x-oneOf"],delete T["x-oneOf"]),T["x-not"]&&(T.not=T["x-not"],delete T["x-not"]),typeof T["x-nullable"]=="boolean"&&(T.nullable=T["x-nullable"],delete T["x-nullable"]),typeof T["x-discriminator"]=="object"&&typeof T["x-discriminator"].propertyName=="string"){T.discriminator=T["x-discriminator"],delete T["x-discriminator"];for(let le in T.discriminator.mapping){let G=T.discriminator.mapping[le];G.startsWith("#/definitions/")&&(T.discriminator.mapping[le]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(T,$){h.walkSchema(T,{},{},function(le,G,ue){C(le),w(le,G,$)})}function P(T){return T.indexOf("#")>=0?T=T.split("#")[1].split("/").pop():T=T.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(T))}function B(T,$,le){let G=le.payload.options;if(s(T,$)){if(!T[$].startsWith("#/components/")){if(T[$]==="#/consumes")delete T[$],le.parent[le.pkey]=l(G.openapi.consumes);else if(T[$]==="#/produces")delete T[$],le.parent[le.pkey]=l(G.openapi.produces);else if(T[$].startsWith("#/definitions/")){let ue=T[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ue[0]);let Z=v.schemas[decodeURIComponent(pe)];Z?ue[0]=Z:j("Could not resolve reference "+T[$],T,G),T[$]="#/components/schemas/"+ue.join("/")}else if(T[$].startsWith("#/parameters/"))T[$]="#/components/parameters/"+m.sanitise(T[$].replace("#/parameters/",""));else if(T[$].startsWith("#/responses/"))T[$]="#/components/responses/"+m.sanitise(T[$].replace("#/responses/",""));else if(T[$].startsWith("#")){let ue=l(i.jptr(G.openapi,T[$]));if(ue===!1)j("direct $ref not found "+T[$],T,G);else if(G.refmap[T[$]])T[$]=G.refmap[T[$]];else{let pe=T[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Z="schemas",ae=pe.lastIndexOf("/schema");if(Z=pe.indexOf("/headers/")>ae?"headers":pe.indexOf("/responses/")>ae?"responses":pe.indexOf("/example")>ae?"examples":pe.indexOf("/x-")>ae?"extensions":pe.indexOf("/parameters/")>ae?"parameters":"schemas",Z==="schemas"&&O(ue,G),Z!=="responses"&&Z!=="extensions"){let ce=Z.substr(0,Z.length-1);ce==="parameter"&&ue.name&&ue.name===m.sanitise(ue.name)&&(ce=encodeURIComponent(ue.name));let ve=1;for(T["x-miro"]&&(ce=P(T["x-miro"]),ve="");i.jptr(G.openapi,"#/components/"+Z+"/"+ce+ve);)ve=ve===""?2:++ve;let fe="#/components/"+Z+"/"+ce+ve,he="";Z==="examples"&&(ue={value:ue},he="/value"),i.jptr(G.openapi,fe,ue),G.refmap[T[$]]=fe+he,T[$]=fe+he}}}}if(delete T["x-miro"],Object.keys(T).length>1){const ue=T[$],pe=le.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete T.$ref,le.parent[le.pkey]={allOf:[{$ref:ue},T]}):le.parent[le.pkey]={$ref:ue})}}if($==="x-ms-odata"&&typeof T[$]=="string"&&T[$].startsWith("#/")){let ue=T[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ue[0])];pe?ue[0]=pe:j("Could not resolve reference "+T[$],T,G),T[$]="#/components/schemas/"+ue.join("/")}}function R(T,$){for(let le in $.refmap)i.jptr(T,le,{$ref:$.refmap[le]})}function q(T){for(let $ in T)for(let le in T[$]){let G=m.sanitise(le);le!==G&&(T[$][G]=T[$][le],delete T[$][le])}}function L(T,$){if(T.type==="basic"&&(T.type="http",T.scheme="basic"),T.type==="oauth2"){let le={},G=T.flow;T.flow==="application"&&(G="clientCredentials"),T.flow==="accessCode"&&(G="authorizationCode"),typeof T.authorizationUrl<"u"&&(le.authorizationUrl=T.authorizationUrl.split("?")[0].trim()||"/"),typeof T.tokenUrl=="string"&&(le.tokenUrl=T.tokenUrl.split("?")[0].trim()||"/"),le.scopes=T.scopes||{},T.flows={},T.flows[G]=le,delete T.flow,delete T.authorizationUrl,delete T.tokenUrl,delete T.scopes,typeof T.name<"u"&&($.patch?($.patches++,delete T.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function W(T){return T&&!T["x-s2o-delete"]}function N(T,$){if(T.$ref)T.$ref=T.$ref.replace("#/responses/","#/components/responses/");else{T.type&&!T.schema&&(T.schema={}),T.type&&(T.schema.type=T.type),T.items&&T.items.type!=="array"&&(T.items.collectionFormat!==T.collectionFormat&&j("Nested collectionFormats are not supported",T,$),delete T.items.collectionFormat),T.type==="array"?(T.collectionFormat==="ssv"?j("collectionFormat:ssv is no longer supported for headers",T,$):T.collectionFormat==="pipes"?j("collectionFormat:pipes is no longer supported for headers",T,$):T.collectionFormat==="multi"?T.explode=!0:T.collectionFormat==="tsv"?(j("collectionFormat:tsv is no longer supported",T,$),T["x-collectionFormat"]="tsv"):T.style="simple",delete T.collectionFormat):T.collectionFormat&&($.patch?($.patches++,delete T.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete T.type;for(let le of m.parameterTypeProperties)typeof T[le]<"u"&&(T.schema[le]=T[le],delete T[le]);for(let le of m.arrayProperties)typeof T[le]<"u"&&(T.schema[le]=T[le],delete T[le])}}function X(T,$){if(T.$ref.indexOf("#/parameters/")>=0){let le=T.$ref.split("#/parameters/");T.$ref=le[0]+"#/components/parameters/"+m.sanitise(le[1])}T.$ref.indexOf("#/definitions/")>=0&&j("Definition used as parameter",T,$)}function ee(T,$){let le={};for(let G of Object.keys(T))le[G]=T[G],G==="parameters"&&(le.requestBody={},$.rbname&&(le[$.rbname]=""));return le.requestBody={},le}function se(T,$,le,G,ue,pe,Z){let ae={},ce=!0,ve;if($&&$.consumes&&typeof $.consumes=="string")if(Z.patch)Z.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Z);Array.isArray(pe.consumes)||delete pe.consumes;let fe=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(T&&T.$ref&&typeof T.$ref=="string"){X(T,Z);let he=decodeURIComponent(T.$ref.replace("#/components/parameters/","")),we=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&T.$ref.startsWith("#/")&&(T["x-s2o-delete"]=!0,we=!0),we){let Re=T.$ref,ta=o(pe,T.$ref);!ta&&Re.startsWith("#/")?j("Could not resolve reference "+Re,T,Z):ta&&(T=ta)}}if(T&&(T.name||T.in)){typeof T["x-deprecated"]=="boolean"&&(T.deprecated=T["x-deprecated"],delete T["x-deprecated"]),typeof T["x-example"]<"u"&&(T.example=T["x-example"],delete T["x-example"]),T.in!=="body"&&!T.type&&(Z.patch?(Z.patches++,T.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Z)),T.type&&typeof T.type=="object"&&T.type.$ref&&(T.type=o(pe,T.type.$ref)),T.type==="file"&&(T["x-s2o-originalType"]=T.type,ve=T.type),T.description&&typeof T.description=="object"&&T.description.$ref&&(T.description=o(pe,T.description.$ref)),T.description===null&&delete T.description;let he=T.collectionFormat;if(T.type==="array"&&!he&&(he="csv"),he&&(T.type!=="array"&&(Z.patch?(Z.patches++,delete T.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Z)),he==="csv"&&(T.in==="query"||T.in==="cookie")&&(T.style="form",T.explode=!1),he==="csv"&&(T.in==="path"||T.in==="header")&&(T.style="simple"),he==="ssv"&&(T.in==="query"?T.style="spaceDelimited":j("collectionFormat:ssv is no longer supported except for in:query parameters",T,Z)),he==="pipes"&&(T.in==="query"?T.style="pipeDelimited":j("collectionFormat:pipes is no longer supported except for in:query parameters",T,Z)),he==="multi"&&(T.explode=!0),he==="tsv"&&(j("collectionFormat:tsv is no longer supported",T,Z),T["x-collectionFormat"]="tsv"),delete T.collectionFormat),T.type&&T.type!=="body"&&T.in!=="formData")if(T.items&&T.schema)j("parameter has array,items and schema",T,Z);else{T.schema&&Z.patches++,(!T.schema||typeof T.schema!="object")&&(T.schema={}),T.schema.type=T.type,T.items&&(T.schema.items=T.items,delete T.items,u(T.schema.items,null,function(we,Oe,Re){Oe==="collectionFormat"&&typeof we[Oe]=="string"&&(he&&we[Oe]!==he&&j("Nested collectionFormats are not supported",T,Z),delete we[Oe])}));for(let we of m.parameterTypeProperties)typeof T[we]<"u"&&(T.schema[we]=T[we]),delete T[we]}T.schema&&O(T.schema,Z),T["x-ms-skip-url-encoding"]&&T.in==="query"&&(T.allowReserved=!0,delete T["x-ms-skip-url-encoding"])}if(T&&T.in==="formData"){ce=!1,ae.content={};let he="application/x-www-form-urlencoded";if(fe.length&&fe.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),ae.content[he]={},T.schema)ae.content[he].schema=T.schema,T.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(T.schema.$ref.replace("#/components/schemas/","")));else{ae.content[he].schema={},ae.content[he].schema.type="object",ae.content[he].schema.properties={},ae.content[he].schema.properties[T.name]={};let we=ae.content[he].schema,Oe=ae.content[he].schema.properties[T.name];T.description&&(Oe.description=T.description),T.example&&(Oe.example=T.example),T.type&&(Oe.type=T.type);for(let Re of m.parameterTypeProperties)typeof T[Re]<"u"&&(Oe[Re]=T[Re]);T.required===!0&&(we.required||(we.required=[]),we.required.push(T.name),ae.required=!0),typeof T.default<"u"&&(Oe.default=T.default),Oe.properties&&(Oe.properties=T.properties),T.allOf&&(Oe.allOf=T.allOf),T.type==="array"&&T.items&&(Oe.items=T.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(ve==="file"||T["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),re(T,Oe)}}else T&&T.type==="file"&&(T.required&&(ae.required=T.required),ae.content={},ae.content["application/octet-stream"]={},ae.content["application/octet-stream"].schema={},ae.content["application/octet-stream"].schema.type="string",ae.content["application/octet-stream"].schema.format="binary",re(T,ae));if(T&&T.in==="body"){ae.content={},T.name&&(ae["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+T.name).toCamelCase()),T.description&&(ae.description=T.description),T.required&&(ae.required=T.required),$&&Z.rbname&&T.name&&($[Z.rbname]=T.name),T.schema&&T.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(T.schema.$ref.replace("#/components/schemas/","")):T.schema&&T.schema.type==="array"&&T.schema.items&&T.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(T.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),fe.length||fe.push("application/json");for(let he of fe)ae.content[he]={},ae.content[he].schema=l(T.schema||{}),O(ae.content[he].schema,Z);re(T,ae)}if(Object.keys(ae).length>0&&(T["x-s2o-delete"]=!0,$))if($.requestBody&&ce){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ue;j("Operation "+he+" has multiple requestBodies",$,Z)}else $.requestBody||($=le[G]=ee($,Z)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&ae.content["multipart/form-data"]&&ae.content["multipart/form-data"].schema&&ae.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&ae.content["application/x-www-form-urlencoded"]&&ae.content["application/x-www-form-urlencoded"].schema&&ae.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,ae),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(T&&!T["x-s2o-delete"]){delete T.type;for(let he of m.parameterTypeProperties)delete T[he];T.in==="path"&&(typeof T.required>"u"||T.required!==!0)&&(Z.patch?(Z.patches++,T.required=!0):z("(Patchable) path parameters must be required:true ["+T.name+" in "+ue+"]",Z))}return $}function re(T,$){for(let le in T)le.startsWith("x-")&&!le.startsWith("x-s2o")&&($[le]=T[le])}function me(T,$,le,G,ue){if(!T)return!1;if(T.$ref&&typeof T.$ref=="string")T.$ref.indexOf("#/definitions/")>=0?j("definition used as response: "+T.$ref,T,ue):T.$ref.startsWith("#/responses/")&&(T.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(T.$ref.replace("#/responses/",""))));else{if((typeof T.description>"u"||T.description===null||T.description===""&&ue.patch)&&(ue.patch?typeof T=="object"&&!Array.isArray(T)&&(ue.patches++,T.description=f[T]||""):z("(Patchable) response.description is mandatory",ue)),typeof T.schema<"u"){if(O(T.schema,ue),T.schema.$ref&&typeof T.schema.$ref=="string"&&T.schema.$ref.startsWith("#/responses/")&&(T.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(T.schema.$ref.replace("#/responses/","")))),le&&le.produces&&typeof le.produces=="string")if(ue.patch)ue.patches++,le.produces=[le.produces];else return z("(Patchable) operation.produces must be an array",ue);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((le?le.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),T.content={};for(let Z of pe){if(T.content[Z]={},T.content[Z].schema=l(T.schema),T.examples&&T.examples[Z]){let ae={};ae.value=T.examples[Z],T.content[Z].examples={},T.content[Z].examples.response=ae,delete T.examples[Z]}T.content[Z].schema.type==="file"&&(T.content[Z].schema={type:"string",format:"binary"})}delete T.schema}for(let pe in T.examples)T.content||(T.content={}),T.content[pe]||(T.content[pe]={}),T.content[pe].examples={},T.content[pe].examples.response={},T.content[pe].examples.response.value=T.examples[pe];if(delete T.examples,T.headers)for(let pe in T.headers)pe.toLowerCase()==="status code"?ue.patch?(ue.patches++,delete T.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ue):N(T.headers[pe],ue)}}function K(T,$,le,G,ue){for(let pe in T){let Z=T[pe];Z&&Z["x-trace"]&&typeof Z["x-trace"]=="object"&&(Z.trace=Z["x-trace"],delete Z["x-trace"]),Z&&Z["x-summary"]&&typeof Z["x-summary"]=="string"&&(Z.summary=Z["x-summary"],delete Z["x-summary"]),Z&&Z["x-description"]&&typeof Z["x-description"]=="string"&&(Z.description=Z["x-description"],delete Z["x-description"]),Z&&Z["x-servers"]&&Array.isArray(Z["x-servers"])&&(Z.servers=Z["x-servers"],delete Z["x-servers"]);for(let ae in Z)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let ce=Z[ae];if(ce&&ce.parameters&&Array.isArray(ce.parameters)){if(Z.parameters)for(let ve of Z.parameters)typeof ve.$ref=="string"&&(X(ve,le),ve=o(ue,ve.$ref)),!ce.parameters.find(function(fe,he,we){return fe.name===ve.name&&fe.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(ce=se(ve,ce,Z,ae,pe,ue,le),le.rbname&&ce[le.rbname]===""&&delete ce[le.rbname]);for(let ve of ce.parameters)ce=se(ve,ce,Z,ae,ae+":"+pe,ue,le);le.rbname&&ce[le.rbname]===""&&delete ce[le.rbname],le.debug||ce.parameters&&(ce.parameters=ce.parameters.filter(W))}if(ce&&ce.security&&q(ce.security),typeof ce=="object"){if(!ce.responses){let ve={};ve.description="Default response",ce.responses={default:ve}}for(let ve in ce.responses){let fe=ce.responses[ve];me(fe,ve,ce,ue,le)}}if(ce&&ce["x-servers"]&&Array.isArray(ce["x-servers"]))ce.servers=ce["x-servers"],delete ce["x-servers"];else if(ce&&ce.schemes&&ce.schemes.length){for(let ve of ce.schemes)if((!ue.schemes||ue.schemes.indexOf(ve)<0)&&(ce.servers||(ce.servers=[]),Array.isArray(ue.servers)))for(let fe of ue.servers){let he=l(fe),we=a.parse(he.url);we.protocol=ve,he.url=we.format(),ce.servers.push(he)}}if(le.debug&&(ce["x-s2o-consumes"]=ce.consumes||[],ce["x-s2o-produces"]=ce.produces||[]),ce){if(delete ce.consumes,delete ce.produces,delete ce.schemes,ce["x-ms-examples"]){for(let ve in ce["x-ms-examples"]){let fe=ce["x-ms-examples"][ve],he=m.sanitiseAll(ve);if(fe.parameters)for(let we in fe.parameters){let Oe=fe.parameters[we];for(let Re of(ce.parameters||[]).concat(Z.parameters||[]))Re.$ref&&(Re=i.jptr(ue,Re.$ref)),Re.name===we&&!Re.example&&(Re.examples||(Re.examples={}),Re.examples[ve]={value:Oe})}if(fe.responses)for(let we in fe.responses){if(fe.responses[we].headers)for(let Oe in fe.responses[we].headers){let Re=fe.responses[we].headers[Oe];for(let ta in ce.responses[we].headers)if(ta===Oe){let M=ce.responses[we].headers[ta];M.example=Re}}if(fe.responses[we].body&&(ue.components.examples[he]={value:l(fe.responses[we].body)},ce.responses[we]&&ce.responses[we].content))for(let Oe in ce.responses[we].content){let Re=ce.responses[we].content[Oe];Re.examples||(Re.examples={}),Re.examples[ve]={$ref:"#/components/examples/"+he}}}}delete ce["x-ms-examples"]}if(ce.parameters&&ce.parameters.length===0&&delete ce.parameters,ce.requestBody){let ve=ce.operationId?m.sanitiseAll(ce.operationId):m.sanitiseAll(ae+pe).toCamelCase(),fe=m.sanitise(ce.requestBody["x-s2o-name"]||ve||"");delete ce.requestBody["x-s2o-name"];let he=JSON.stringify(ce.requestBody),we=m.hash(he);if(!G[we]){let Re={};Re.name=fe,Re.body=ce.requestBody,Re.refs=[],G[we]=Re}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+ae+"/requestBody";G[we].refs.push(Oe)}}}if(Z&&Z.parameters){for(let ae in Z.parameters){let ce=Z.parameters[ae];se(ce,null,Z,null,pe,ue,le)}!le.debug&&Array.isArray(Z.parameters)&&(Z.parameters=Z.parameters.filter(W))}}}function F(T,$){let le={};v={schemas:{}},T.security&&q(T.security);for(let ue in T.components.securitySchemes){let pe=m.sanitise(ue);ue!==pe&&(T.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),T.components.securitySchemes[pe]=T.components.securitySchemes[ue],delete T.components.securitySchemes[ue]),L(T.components.securitySchemes[pe],$)}for(let ue in T.components.schemas){let pe=m.sanitiseAll(ue),Z="";if(ue!==pe){for(;T.components.schemas[pe+Z];)Z=Z?++Z:2;T.components.schemas[pe+Z]=T.components.schemas[ue],delete T.components.schemas[ue]}v.schemas[ue]=pe+Z,O(T.components.schemas[pe+Z],$)}$.refmap={},u(T,{payload:{options:$}},B),R(T,$);for(let ue in T.components.parameters){let pe=m.sanitise(ue);ue!==pe&&(T.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),T.components.parameters[pe]=T.components.parameters[ue],delete T.components.parameters[ue]);let Z=T.components.parameters[pe];se(Z,null,null,null,pe,T,$)}for(let ue in T.components.responses){let pe=m.sanitise(ue);ue!==pe&&(T.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),T.components.responses[pe]=T.components.responses[ue],delete T.components.responses[ue]);let Z=T.components.responses[pe];if(me(Z,pe,null,T,$),Z.headers)for(let ae in Z.headers)ae.toLowerCase()==="status code"?$.patch?($.patches++,delete Z.headers[ae]):z('(Patchable) "Status Code" is not a valid header',$):N(Z.headers[ae],$)}for(let ue in T.components.requestBodies){let pe=T.components.requestBodies[ue],Z=JSON.stringify(pe),ae=m.hash(Z),ce={};ce.name=ue,ce.body=pe,ce.refs=[],le[ae]=ce}if(K(T.paths,"paths",$,le,T),T["x-ms-paths"]&&K(T["x-ms-paths"],"x-ms-paths",$,le,T),!$.debug)for(let ue in T.components.parameters)T.components.parameters[ue]["x-s2o-delete"]&&delete T.components.parameters[ue];$.debug&&(T["x-s2o-consumes"]=T.consumes||[],T["x-s2o-produces"]=T.produces||[]),delete T.consumes,delete T.produces,delete T.schemes;let G=[];if(T.components.requestBodies={},!$.resolveInternal){let ue=1;for(let pe in le){let Z=le[pe];if(Z.refs.length>1){let ae="";for(Z.name||(Z.name="requestBody",ae=ue++);G.indexOf(Z.name+ae)>=0;)ae=ae?++ae:2;Z.name=Z.name+ae,G.push(Z.name),T.components.requestBodies[Z.name]=l(Z.body);for(let ce in Z.refs){let ve={};ve.$ref="#/components/requestBodies/"+Z.name,i.jptr(T,Z.refs[ce],ve)}}}}return T.components.responses&&Object.keys(T.components.responses).length===0&&delete T.components.responses,T.components.parameters&&Object.keys(T.components.parameters).length===0&&delete T.components.parameters,T.components.examples&&Object.keys(T.components.examples).length===0&&delete T.components.examples,T.components.requestBodies&&Object.keys(T.components.requestBodies).length===0&&delete T.components.requestBodies,T.components.securitySchemes&&Object.keys(T.components.securitySchemes).length===0&&delete T.components.securitySchemes,T.components.headers&&Object.keys(T.components.headers).length===0&&delete T.components.headers,T.components.schemas&&Object.keys(T.components.schemas).length===0&&delete T.components.schemas,T.components&&Object.keys(T.components).length===0&&delete T.components,T}function Q(T){return!T||!T.url||typeof T.url!="string"||(T.url=T.url.split("{{").join("{"),T.url=T.url.split("}}").join("}"),T.url.replace(/\{(.+?)\}/g,function($,le){T.variables||(T.variables={}),T.variables[le]={default:"unknown"}})),T}function H(T,$,le){if(typeof T.info>"u"||T.info===null)if($.patch)$.patches++,T.info={version:"",title:""};else return le(new x("(Patchable) info object is mandatory"));if(typeof T.info!="object"||Array.isArray(T.info))return le(new x("info must be an object"));if(typeof T.info.title>"u"||T.info.title===null)if($.patch)$.patches++,T.info.title="";else return le(new x("(Patchable) info.title cannot be null"));if(typeof T.info.version>"u"||T.info.version===null)if($.patch)$.patches++,T.info.version="";else return le(new x("(Patchable) info.version cannot be null"));if(typeof T.info.version!="string")if($.patch)$.patches++,T.info.version=T.info.version.toString();else return le(new x("(Patchable) info.version must be a string"));if(typeof T.info.logo<"u")if($.patch)$.patches++,T.info["x-logo"]=T.info.logo,delete T.info.logo;else return le(new x("(Patchable) info should not have logo property"));if(typeof T.info.termsOfService<"u"){if(T.info.termsOfService===null)if($.patch)$.patches++,T.info.termsOfService="";else return le(new x("(Patchable) info.termsOfService cannot be null"));try{new URL(T.info.termsOfService)}catch{if($.patch)$.patches++,delete T.info.termsOfService;else return le(new x("(Patchable) info.termsOfService must be a URL"))}}}function E(T,$,le){if(typeof T.paths>"u")if($.patch)$.patches++,T.paths={};else return le(new x("(Patchable) paths object is mandatory"))}function D(T,$){const le=new WeakSet;u(T,{identityDetection:!0},function(G,ue,pe){typeof G[ue]=="object"&&G[ue]!==null&&(le.has(G[ue])?$.anchors?G[ue]=l(G[ue]):z("YAML anchor or merge key at "+pe.path,$):le.add(G[ue]))})}function U(T,$,le){return t(le,new Promise(function(G,ue){if(T||(T={}),$.original=T,$.text||($.text=n.stringify(T)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ue,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),D(T,$),T.openapi&&typeof T.openapi=="string"&&T.openapi.startsWith("3.")){$.openapi=c(T),H($.openapi,$,ue),E($.openapi,$,ue),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Z){console.warn(Z),ue(Z)});return}if(!T.swagger||T.swagger!="2.0")return ue(new x("Unsupported swagger/OpenAPI version: "+(T.openapi?T.openapi:T.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:k,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Z={};Z.url=$.source||$.origin,Z.format="swagger",Z.version=T.swagger,Z.converter={},Z.converter.url="https://github.com/mermade/oas-kit",Z.converter.version=b,pe["x-origin"].push(Z)}if(pe=Object.assign(pe,c(T)),delete pe.swagger,u(pe,{},function(Z,ae,ce){Z[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&ce.path.indexOf("/example")<0&&delete Z[ae]}),T.host)for(let Z of Array.isArray(T.schemes)?T.schemes:[""]){let ae={},ce=(T.basePath||"").replace(/\/$/,"");ae.url=(Z?Z+":":"")+"//"+T.host+ce,Q(ae),pe.servers||(pe.servers=[]),pe.servers.push(ae)}else if(T.basePath){let Z={};Z.url=T.basePath,Q(Z),pe.servers||(pe.servers=[]),pe.servers.push(Z)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),T["x-ms-parameterized-host"]){let Z=T["x-ms-parameterized-host"],ae={};ae.url=Z.hostTemplate+(T.basePath?T.basePath:""),ae.variables={};const ce=ae.url.match(/\{\w+\}/g);for(let ve in Z.parameters){let fe=Z.parameters[ve];fe.$ref&&(fe=l(o(pe,fe.$ref))),ve.startsWith("x-")||(delete fe.required,delete fe.type,delete fe.in,typeof fe.default>"u"&&(fe.enum?fe.default=fe.enum[0]:fe.default="none"),fe.name||(fe.name=ce[ve].replace("{","").replace("}","")),ae.variables[fe.name]=fe,delete fe.name)}pe.servers||(pe.servers=[]),Z.useSchemePrefix===!1?pe.servers.push(ae):T.schemes.forEach(ve=>{pe.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete pe["x-ms-parameterized-host"]}H(pe,$,ue),E(pe,$,ue),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){F($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Z){console.warn(Z),ue(Z)})}))}function te(T,$,le){return t(le,new Promise(function(G,ue){let pe=null,Z=null;try{pe=JSON.parse(T),$.text=JSON.stringify(pe,null,2)}catch(ae){Z=ae;try{pe=n.parse(T,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=T}catch(ce){Z=ce}}pe?U(pe,$).then(ae=>G(ae)).catch(ae=>ue(ae)):ue(new x(Z?Z.message:"Could not parse string"))}))}function ie(T,$,le){return t(le,new Promise(function(G,ue){$.origin=!0,$.source||($.source=T),$.verbose&&console.warn("GET "+T),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(T,pe).then(function(Z){if(Z.status!==200)throw new x(`Received status code ${Z.status}: ${T}`);return Z.text()}).then(function(Z){te(Z,$).then(ae=>G(ae)).catch(ae=>ue(ae))}).catch(function(Z){ue(Z)})}))}function ye(T,$,le){return t(le,new Promise(function(G,ue){e.readFile(T,$.encoding||"utf8",function(pe,Z){pe?ue(pe):($.sourceFile=T,te(Z,$).then(ae=>G(ae)).catch(ae=>ue(ae)))})}))}function de(T,$,le){return t(le,new Promise(function(G,ue){let pe="";T.on("data",function(Z){pe+=Z}).on("end",function(){te(pe,$).then(Z=>G(Z)).catch(Z=>ue(Z))})}))}return SB={S2OError:x,targetVersion:k,convert:U,convertObj:U,convertUrl:ie,convertStr:te,convertFile:ye,convertStream:de},SB}var GYe=FYe();const qYe=en(GYe);function UYe(e){return e.paths||(e.paths={}),new Promise((a,t)=>qYe.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function WYe(){try{return(await Zee())?.resolvedConfig.openapi||{}}catch{return{}}}async function JYe(e){const a=await Zee(),t={config:a,base:Hc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Hc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=ZYe(e):t.ref=e;const{bundle:{parsed:r}}=await hYe(t);return r.swagger!==void 0?UYe(r):r}function ZYe(e){return{source:{absoluteRef:""},parsed:e}}async function QYe(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await JYe(e||a);try{PHe(r)}catch{}return r}const XYe=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=_.useState(),[s,l]=_.useState(!0),[c,u]=_.useState(null),[d,h]=_.useState(e||{});_.useEffect(()=>{async function f(){l(!0);try{const b=await WYe();h({...e,...b}),u(await QYe(t,a,e))}catch(b){o(b.message)}}f()},[t,a,e]);const m=_.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},AHe([c,a,d]));return _.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:p.jsx(TWe,{color:"--loading-spinner-color"}):_.isValidElement(n)?_.cloneElement(n,{store:m}):null};function YYe({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(XYe,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(kY,{withCommonStyles:!0,router:o||"hash"})})}function eea(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function aea(e){const a=eea(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function tea(e,a=document.querySelector("redoc")){XV.hydrateRoot(a,p.jsx(kY,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function dte(e,a={},t=x4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...aea(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),XV.createRoot(t).render(_.createElement(YYe,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const rea="3.16.0-custom.5",nea="8e48a530f9";function iea(){const e=x4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&dte(a,{},e)}iea();function c1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pte={exports:{}};/*!
10327
+ */var Pae;function l1(){return Pae||(Pae=1,(function(e){const a=PYe(),t=AYe(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=x,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const M=new Uint8Array(1),Y={foo:function(){return 42}};return Object.setPrototypeOf(Y,Uint8Array.prototype),Object.setPrototypeOf(M,Y),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(M){if(M>n)throw new RangeError('The value "'+M+'" is invalid for option "size"');const Y=new Uint8Array(M);return Object.setPrototypeOf(Y,s.prototype),Y}function s(M,Y,oe){if(typeof M=="number"){if(typeof Y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(M)}return l(M,Y,oe)}s.poolSize=8192;function l(M,Y,oe){if(typeof M=="string")return h(M,Y);if(ArrayBuffer.isView(M))return f(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(he(M,ArrayBuffer)||M&&he(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(M,SharedArrayBuffer)||M&&he(M.buffer,SharedArrayBuffer)))return b(M,Y,oe);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const je=M.valueOf&&M.valueOf();if(je!=null&&je!==M)return s.from(je,Y,oe);const Me=k(M);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),Y,oe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,Y,oe){return l(M,Y,oe)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function u(M,Y,oe){return c(M),M<=0?o(M):Y!==void 0?typeof oe=="string"?o(M).fill(Y,oe):o(M).fill(Y):o(M)}s.alloc=function(M,Y,oe){return u(M,Y,oe)};function d(M){return c(M),o(M<0?0:v(M)|0)}s.allocUnsafe=function(M){return d(M)},s.allocUnsafeSlow=function(M){return d(M)};function h(M,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!s.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);const oe=z(M,Y)|0;let je=o(oe);const Me=je.write(M,Y);return Me!==oe&&(je=je.slice(0,Me)),je}function m(M){const Y=M.length<0?0:v(M.length)|0,oe=o(Y);for(let je=0;je<Y;je+=1)oe[je]=M[je]&255;return oe}function f(M){if(he(M,Uint8Array)){const Y=new Uint8Array(M);return b(Y.buffer,Y.byteOffset,Y.byteLength)}return m(M)}function b(M,Y,oe){if(Y<0||M.byteLength<Y)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<Y+(oe||0))throw new RangeError('"length" is outside of buffer bounds');let je;return Y===void 0&&oe===void 0?je=new Uint8Array(M):oe===void 0?je=new Uint8Array(M,Y):je=new Uint8Array(M,Y,oe),Object.setPrototypeOf(je,s.prototype),je}function k(M){if(s.isBuffer(M)){const Y=v(M.length)|0,oe=o(Y);return oe.length===0||M.copy(oe,0,0,Y),oe}if(M.length!==void 0)return typeof M.length!="number"||we(M.length)?o(0):m(M);if(M.type==="Buffer"&&Array.isArray(M.data))return m(M.data)}function v(M){if(M>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return M|0}function x(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,Y){if(he(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),he(Y,Uint8Array)&&(Y=s.from(Y,Y.offset,Y.byteLength)),!s.isBuffer(M)||!s.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===Y)return 0;let oe=M.length,je=Y.length;for(let Me=0,Te=Math.min(oe,je);Me<Te;++Me)if(M[Me]!==Y[Me]){oe=M[Me],je=Y[Me];break}return oe<je?-1:je<oe?1:0},s.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(M,Y){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return s.alloc(0);let oe;if(Y===void 0)for(Y=0,oe=0;oe<M.length;++oe)Y+=M[oe].length;const je=s.allocUnsafe(Y);let Me=0;for(oe=0;oe<M.length;++oe){let Te=M[oe];if(he(Te,Uint8Array))Me+Te.length>je.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(je,Me)):Uint8Array.prototype.set.call(je,Te,Me);else if(s.isBuffer(Te))Te.copy(je,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return je};function z(M,Y){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||he(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const oe=M.length,je=arguments.length>2&&arguments[2]===!0;if(!je&&oe===0)return 0;let Me=!1;for(;;)switch(Y){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":return Z(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return ve(M).length;default:if(Me)return je?-1:Z(M).length;Y=(""+Y).toLowerCase(),Me=!0}}s.byteLength=z;function j(M,Y,oe){let je=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length||((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)||(oe>>>=0,Y>>>=0,oe<=Y))return"";for(M||(M="utf8");;)switch(M){case"hex":return me(this,Y,oe);case"utf8":case"utf-8":return N(this,Y,oe);case"ascii":return se(this,Y,oe);case"latin1":case"binary":return re(this,Y,oe);case"base64":return W(this,Y,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,Y,oe);default:if(je)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),je=!0}}s.prototype._isBuffer=!0;function w(M,Y,oe){const je=M[Y];M[Y]=M[oe],M[oe]=je}s.prototype.swap16=function(){const M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<M;Y+=2)w(this,Y,Y+1);return this},s.prototype.swap32=function(){const M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<M;Y+=4)w(this,Y,Y+3),w(this,Y+1,Y+2);return this},s.prototype.swap64=function(){const M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<M;Y+=8)w(this,Y,Y+7),w(this,Y+1,Y+6),w(this,Y+2,Y+5),w(this,Y+3,Y+4);return this},s.prototype.toString=function(){const M=this.length;return M===0?"":arguments.length===0?N(this,0,M):j.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(M){if(!s.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:s.compare(this,M)===0},s.prototype.inspect=function(){let M="";const Y=e.INSPECT_MAX_BYTES;return M=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(M+=" ... "),"<Buffer "+M+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(M,Y,oe,je,Me){if(he(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(Y===void 0&&(Y=0),oe===void 0&&(oe=M?M.length:0),je===void 0&&(je=0),Me===void 0&&(Me=this.length),Y<0||oe>M.length||je<0||Me>this.length)throw new RangeError("out of range index");if(je>=Me&&Y>=oe)return 0;if(je>=Me)return-1;if(Y>=oe)return 1;if(Y>>>=0,oe>>>=0,je>>>=0,Me>>>=0,this===M)return 0;let Te=Me-je,De=oe-Y;const ra=Math.min(Te,De),pa=this.slice(je,Me),va=M.slice(Y,oe);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function C(M,Y,oe,je,Me){if(M.length===0)return-1;if(typeof oe=="string"?(je=oe,oe=0):oe>2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,we(oe)&&(oe=Me?0:M.length-1),oe<0&&(oe=M.length+oe),oe>=M.length){if(Me)return-1;oe=M.length-1}else if(oe<0)if(Me)oe=0;else return-1;if(typeof Y=="string"&&(Y=s.from(Y,je)),s.isBuffer(Y))return Y.length===0?-1:O(M,Y,oe,je,Me);if(typeof Y=="number")return Y=Y&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(M,Y,oe):Uint8Array.prototype.lastIndexOf.call(M,Y,oe):O(M,[Y],oe,je,Me);throw new TypeError("val must be string, number or Buffer")}function O(M,Y,oe,je,Me){let Te=1,De=M.length,ra=Y.length;if(je!==void 0&&(je=String(je).toLowerCase(),je==="ucs2"||je==="ucs-2"||je==="utf16le"||je==="utf-16le")){if(M.length<2||Y.length<2)return-1;Te=2,De/=2,ra/=2,oe/=2}function pa(sa,ya){return Te===1?sa[ya]:sa.readUInt16BE(ya*Te)}let va;if(Me){let sa=-1;for(va=oe;va<De;va++)if(pa(M,va)===pa(Y,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(oe+ra>De&&(oe=De-ra),va=oe;va>=0;va--){let sa=!0;for(let ya=0;ya<ra;ya++)if(pa(M,va+ya)!==pa(Y,ya)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(M,Y,oe){return this.indexOf(M,Y,oe)!==-1},s.prototype.indexOf=function(M,Y,oe){return C(this,M,Y,oe,!0)},s.prototype.lastIndexOf=function(M,Y,oe){return C(this,M,Y,oe,!1)};function P(M,Y,oe,je){oe=Number(oe)||0;const Me=M.length-oe;je?(je=Number(je),je>Me&&(je=Me)):je=Me;const Te=Y.length;je>Te/2&&(je=Te/2);let De;for(De=0;De<je;++De){const ra=parseInt(Y.substr(De*2,2),16);if(we(ra))return De;M[oe+De]=ra}return De}function B(M,Y,oe,je){return fe(Z(Y,M.length-oe),M,oe,je)}function R(M,Y,oe,je){return fe(ae(Y),M,oe,je)}function q(M,Y,oe,je){return fe(ve(Y),M,oe,je)}function L(M,Y,oe,je){return fe(ce(Y,M.length-oe),M,oe,je)}s.prototype.write=function(M,Y,oe,je){if(Y===void 0)je="utf8",oe=this.length,Y=0;else if(oe===void 0&&typeof Y=="string")je=Y,oe=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(oe)?(oe=oe>>>0,je===void 0&&(je="utf8")):(je=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-Y;if((oe===void 0||oe>Me)&&(oe=Me),M.length>0&&(oe<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");je||(je="utf8");let Te=!1;for(;;)switch(je){case"hex":return P(this,M,Y,oe);case"utf8":case"utf-8":return B(this,M,Y,oe);case"ascii":case"latin1":case"binary":return R(this,M,Y,oe);case"base64":return q(this,M,Y,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,M,Y,oe);default:if(Te)throw new TypeError("Unknown encoding: "+je);je=(""+je).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(M,Y,oe){return Y===0&&oe===M.length?a.fromByteArray(M):a.fromByteArray(M.slice(Y,oe))}function N(M,Y,oe){oe=Math.min(M.length,oe);const je=[];let Me=Y;for(;Me<oe;){const Te=M[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=oe){let pa,va,sa,ya;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=M[Me+1],(pa&192)===128&&(ya=(Te&31)<<6|pa&63,ya>127&&(De=ya));break;case 3:pa=M[Me+1],va=M[Me+2],(pa&192)===128&&(va&192)===128&&(ya=(Te&15)<<12|(pa&63)<<6|va&63,ya>2047&&(ya<55296||ya>57343)&&(De=ya));break;case 4:pa=M[Me+1],va=M[Me+2],sa=M[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ya=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ya>65535&&ya<1114112&&(De=ya))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,je.push(De>>>10&1023|55296),De=56320|De&1023),je.push(De),Me+=ra}return ee(je)}const X=4096;function ee(M){const Y=M.length;if(Y<=X)return String.fromCharCode.apply(String,M);let oe="",je=0;for(;je<Y;)oe+=String.fromCharCode.apply(String,M.slice(je,je+=X));return oe}function se(M,Y,oe){let je="";oe=Math.min(M.length,oe);for(let Me=Y;Me<oe;++Me)je+=String.fromCharCode(M[Me]&127);return je}function re(M,Y,oe){let je="";oe=Math.min(M.length,oe);for(let Me=Y;Me<oe;++Me)je+=String.fromCharCode(M[Me]);return je}function me(M,Y,oe){const je=M.length;(!Y||Y<0)&&(Y=0),(!oe||oe<0||oe>je)&&(oe=je);let Me="";for(let Te=Y;Te<oe;++Te)Me+=Oe[M[Te]];return Me}function K(M,Y,oe){const je=M.slice(Y,oe);let Me="";for(let Te=0;Te<je.length-1;Te+=2)Me+=String.fromCharCode(je[Te]+je[Te+1]*256);return Me}s.prototype.slice=function(M,Y){const oe=this.length;M=~~M,Y=Y===void 0?oe:~~Y,M<0?(M+=oe,M<0&&(M=0)):M>oe&&(M=oe),Y<0?(Y+=oe,Y<0&&(Y=0)):Y>oe&&(Y=oe),Y<M&&(Y=M);const je=this.subarray(M,Y);return Object.setPrototypeOf(je,s.prototype),je};function F(M,Y,oe){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+Y>oe)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M],Me=1,Te=0;for(;++Te<Y&&(Me*=256);)je+=this[M+Te]*Me;return je},s.prototype.readUintBE=s.prototype.readUIntBE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M+--Y],Me=1;for(;Y>0&&(Me*=256);)je+=this[M+--Y]*Me;return je},s.prototype.readUint8=s.prototype.readUInt8=function(M,Y){return M=M>>>0,Y||F(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,Y){return M=M>>>0,Y||F(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,Y){return M=M>>>0,Y||F(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readBigUInt64LE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=Y+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24,Me=this[++M]+this[++M]*2**8+this[++M]*2**16+oe*2**24;return BigInt(je)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=Y*2**24+this[++M]*2**16+this[++M]*2**8+this[++M],Me=this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+oe;return(BigInt(je)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=this[M],Me=1,Te=0;for(;++Te<Y&&(Me*=256);)je+=this[M+Te]*Me;return Me*=128,je>=Me&&(je-=Math.pow(2,8*Y)),je},s.prototype.readIntBE=function(M,Y,oe){M=M>>>0,Y=Y>>>0,oe||F(M,Y,this.length);let je=Y,Me=1,Te=this[M+--je];for(;je>0&&(Me*=256);)Te+=this[M+--je]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*Y)),Te},s.prototype.readInt8=function(M,Y){return M=M>>>0,Y||F(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,Y){M=M>>>0,Y||F(M,2,this.length);const oe=this[M]|this[M+1]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt16BE=function(M,Y){M=M>>>0,Y||F(M,2,this.length);const oe=this[M+1]|this[M]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt32LE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readBigInt64LE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=this[M+4]+this[M+5]*2**8+this[M+6]*2**16+(oe<<24);return(BigInt(je)<<BigInt(32))+BigInt(Y+this[++M]*2**8+this[++M]*2**16+this[++M]*2**24)}),s.prototype.readBigInt64BE=Re(function(M){M=M>>>0,le(M,"offset");const Y=this[M],oe=this[M+7];(Y===void 0||oe===void 0)&&G(M,this.length-8);const je=(Y<<24)+this[++M]*2**16+this[++M]*2**8+this[++M];return(BigInt(je)<<BigInt(32))+BigInt(this[++M]*2**24+this[++M]*2**16+this[++M]*2**8+oe)}),s.prototype.readFloatLE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),t.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,Y){return M=M>>>0,Y||F(M,4,this.length),t.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,Y){return M=M>>>0,Y||F(M,8,this.length),t.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,Y){return M=M>>>0,Y||F(M,8,this.length),t.read(this,M,!1,52,8)};function Q(M,Y,oe,je,Me,Te){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>Me||Y<Te)throw new RangeError('"value" argument is out of bounds');if(oe+je>M.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,oe=oe>>>0,!je){const De=Math.pow(2,8*oe)-1;Q(this,M,Y,oe,De,0)}let Me=1,Te=0;for(this[Y]=M&255;++Te<oe&&(Me*=256);)this[Y+Te]=M/Me&255;return Y+oe},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,oe=oe>>>0,!je){const De=Math.pow(2,8*oe)-1;Q(this,M,Y,oe,De,0)}let Me=oe-1,Te=1;for(this[Y+Me]=M&255;--Me>=0&&(Te*=256);)this[Y+Me]=M/Te&255;return Y+oe},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,1,255,0),this[Y]=M&255,Y+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,65535,0),this[Y]=M&255,this[Y+1]=M>>>8,Y+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,65535,0),this[Y]=M>>>8,this[Y+1]=M&255,Y+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,4294967295,0),this[Y+3]=M>>>24,this[Y+2]=M>>>16,this[Y+1]=M>>>8,this[Y]=M&255,Y+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,4294967295,0),this[Y]=M>>>24,this[Y+1]=M>>>16,this[Y+2]=M>>>8,this[Y+3]=M&255,Y+4};function H(M,Y,oe,je,Me){$(Y,je,Me,M,oe,7);let Te=Number(Y&BigInt(4294967295));M[oe++]=Te,Te=Te>>8,M[oe++]=Te,Te=Te>>8,M[oe++]=Te,Te=Te>>8,M[oe++]=Te;let De=Number(Y>>BigInt(32)&BigInt(4294967295));return M[oe++]=De,De=De>>8,M[oe++]=De,De=De>>8,M[oe++]=De,De=De>>8,M[oe++]=De,oe}function E(M,Y,oe,je,Me){$(Y,je,Me,M,oe,7);let Te=Number(Y&BigInt(4294967295));M[oe+7]=Te,Te=Te>>8,M[oe+6]=Te,Te=Te>>8,M[oe+5]=Te,Te=Te>>8,M[oe+4]=Te;let De=Number(Y>>BigInt(32)&BigInt(4294967295));return M[oe+3]=De,De=De>>8,M[oe+2]=De,De=De>>8,M[oe+1]=De,De=De>>8,M[oe]=De,oe+8}s.prototype.writeBigUInt64LE=Re(function(M,Y=0){return H(this,M,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Re(function(M,Y=0){return E(this,M,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,!je){const ra=Math.pow(2,8*oe-1);Q(this,M,Y,oe,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[Y]=M&255;++Me<oe&&(Te*=256);)M<0&&De===0&&this[Y+Me-1]!==0&&(De=1),this[Y+Me]=(M/Te>>0)-De&255;return Y+oe},s.prototype.writeIntBE=function(M,Y,oe,je){if(M=+M,Y=Y>>>0,!je){const ra=Math.pow(2,8*oe-1);Q(this,M,Y,oe,ra-1,-ra)}let Me=oe-1,Te=1,De=0;for(this[Y+Me]=M&255;--Me>=0&&(Te*=256);)M<0&&De===0&&this[Y+Me+1]!==0&&(De=1),this[Y+Me]=(M/Te>>0)-De&255;return Y+oe},s.prototype.writeInt8=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,1,127,-128),M<0&&(M=255+M+1),this[Y]=M&255,Y+1},s.prototype.writeInt16LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,32767,-32768),this[Y]=M&255,this[Y+1]=M>>>8,Y+2},s.prototype.writeInt16BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,2,32767,-32768),this[Y]=M>>>8,this[Y+1]=M&255,Y+2},s.prototype.writeInt32LE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,2147483647,-2147483648),this[Y]=M&255,this[Y+1]=M>>>8,this[Y+2]=M>>>16,this[Y+3]=M>>>24,Y+4},s.prototype.writeInt32BE=function(M,Y,oe){return M=+M,Y=Y>>>0,oe||Q(this,M,Y,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[Y]=M>>>24,this[Y+1]=M>>>16,this[Y+2]=M>>>8,this[Y+3]=M&255,Y+4},s.prototype.writeBigInt64LE=Re(function(M,Y=0){return H(this,M,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Re(function(M,Y=0){return E(this,M,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function D(M,Y,oe,je,Me,Te){if(oe+je>M.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function U(M,Y,oe,je,Me){return Y=+Y,oe=oe>>>0,Me||D(M,Y,oe,4),t.write(M,Y,oe,je,23,4),oe+4}s.prototype.writeFloatLE=function(M,Y,oe){return U(this,M,Y,!0,oe)},s.prototype.writeFloatBE=function(M,Y,oe){return U(this,M,Y,!1,oe)};function te(M,Y,oe,je,Me){return Y=+Y,oe=oe>>>0,Me||D(M,Y,oe,8),t.write(M,Y,oe,je,52,8),oe+8}s.prototype.writeDoubleLE=function(M,Y,oe){return te(this,M,Y,!0,oe)},s.prototype.writeDoubleBE=function(M,Y,oe){return te(this,M,Y,!1,oe)},s.prototype.copy=function(M,Y,oe,je){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!je&&je!==0&&(je=this.length),Y>=M.length&&(Y=M.length),Y||(Y=0),je>0&&je<oe&&(je=oe),je===oe||M.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(je<0)throw new RangeError("sourceEnd out of bounds");je>this.length&&(je=this.length),M.length-Y<je-oe&&(je=M.length-Y+oe);const Me=je-oe;return this===M&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Y,oe,je):Uint8Array.prototype.set.call(M,this.subarray(oe,je),Y),Me},s.prototype.fill=function(M,Y,oe,je){if(typeof M=="string"){if(typeof Y=="string"?(je=Y,Y=0,oe=this.length):typeof oe=="string"&&(je=oe,oe=this.length),je!==void 0&&typeof je!="string")throw new TypeError("encoding must be a string");if(typeof je=="string"&&!s.isEncoding(je))throw new TypeError("Unknown encoding: "+je);if(M.length===1){const Te=M.charCodeAt(0);(je==="utf8"&&Te<128||je==="latin1")&&(M=Te)}}else typeof M=="number"?M=M&255:typeof M=="boolean"&&(M=Number(M));if(Y<0||this.length<Y||this.length<oe)throw new RangeError("Out of range index");if(oe<=Y)return this;Y=Y>>>0,oe=oe===void 0?this.length:oe>>>0,M||(M=0);let Me;if(typeof M=="number")for(Me=Y;Me<oe;++Me)this[Me]=M;else{const Te=s.isBuffer(M)?M:s.from(M,je),De=Te.length;if(De===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(Me=0;Me<oe-Y;++Me)this[Me+Y]=Te[Me%De]}return this};const ie={};function ye(M,Y,oe){ie[M]=class extends oe{constructor(){super(),Object.defineProperty(this,"message",{value:Y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,delete this.name}get code(){return M}set code(je){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:je,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}ye("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ye("ERR_INVALID_ARG_TYPE",function(M,Y){return`The "${M}" argument must be of type number. Received type ${typeof Y}`},TypeError),ye("ERR_OUT_OF_RANGE",function(M,Y,oe){let je=`The value of "${M}" is out of range.`,Me=oe;return Number.isInteger(oe)&&Math.abs(oe)>2**32?Me=de(String(oe)):typeof oe=="bigint"&&(Me=String(oe),(oe>BigInt(2)**BigInt(32)||oe<-(BigInt(2)**BigInt(32)))&&(Me=de(Me)),Me+="n"),je+=` It must be ${Y}. Received ${Me}`,je},RangeError);function de(M){let Y="",oe=M.length;const je=M[0]==="-"?1:0;for(;oe>=je+4;oe-=3)Y=`_${M.slice(oe-3,oe)}${Y}`;return`${M.slice(0,oe)}${Y}`}function T(M,Y,oe){le(Y,"offset"),(M[Y]===void 0||M[Y+oe]===void 0)&&G(Y,M.length-(oe+1))}function $(M,Y,oe,je,Me,Te){if(M>oe||M<Y){const De=typeof Y=="bigint"?"n":"";let ra;throw Y===0||Y===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,M)}T(je,Me,Te)}function le(M,Y){if(typeof M!="number")throw new ie.ERR_INVALID_ARG_TYPE(Y,"number",M)}function G(M,Y,oe){throw Math.floor(M)!==M?(le(M,oe),new ie.ERR_OUT_OF_RANGE("offset","an integer",M)):Y<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Y}`,M)}const ue=/[^+/0-9A-Za-z-_]/g;function pe(M){if(M=M.split("=")[0],M=M.trim().replace(ue,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Z(M,Y){Y=Y||1/0;let oe;const je=M.length;let Me=null;const Te=[];for(let De=0;De<je;++De){if(oe=M.charCodeAt(De),oe>55295&&oe<57344){if(!Me){if(oe>56319){(Y-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===je){(Y-=3)>-1&&Te.push(239,191,189);continue}Me=oe;continue}if(oe<56320){(Y-=3)>-1&&Te.push(239,191,189),Me=oe;continue}oe=(Me-55296<<10|oe-56320)+65536}else Me&&(Y-=3)>-1&&Te.push(239,191,189);if(Me=null,oe<128){if((Y-=1)<0)break;Te.push(oe)}else if(oe<2048){if((Y-=2)<0)break;Te.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((Y-=3)<0)break;Te.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((Y-=4)<0)break;Te.push(oe>>18|240,oe>>12&63|128,oe>>6&63|128,oe&63|128)}else throw new Error("Invalid code point")}return Te}function ae(M){const Y=[];for(let oe=0;oe<M.length;++oe)Y.push(M.charCodeAt(oe)&255);return Y}function ce(M,Y){let oe,je,Me;const Te=[];for(let De=0;De<M.length&&!((Y-=2)<0);++De)oe=M.charCodeAt(De),je=oe>>8,Me=oe%256,Te.push(Me),Te.push(je);return Te}function ve(M){return a.toByteArray(pe(M))}function fe(M,Y,oe,je){let Me;for(Me=0;Me<je&&!(Me+oe>=Y.length||Me>=M.length);++Me)Y[Me+oe]=M[Me];return Me}function he(M,Y){return M instanceof Y||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===Y.name}function we(M){return M!==M}const Oe=(function(){const M="0123456789abcdef",Y=new Array(256);for(let oe=0;oe<16;++oe){const je=oe*16;for(let Me=0;Me<16;++Me)Y[je+Me]=M[oe]+M[Me]}return Y})();function Re(M){return typeof BigInt>"u"?ta:M}function ta(){throw new Error("BigInt not supported")}})(Cae)),Cae}const Aae=LV(xY);var sB,Mae;function MYe(){if(Mae)return sB;Mae=1;function e(f,b){var k=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);b&&(v=v.filter(function(x){return Object.getOwnPropertyDescriptor(f,x).enumerable})),k.push.apply(k,v)}return k}function a(f){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?e(Object(k),!0).forEach(function(v){t(f,v,k[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(k)):e(Object(k)).forEach(function(v){Object.defineProperty(f,v,Object.getOwnPropertyDescriptor(k,v))})}return f}function t(f,b,k){return b=o(b),b in f?Object.defineProperty(f,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):f[b]=k,f}function r(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function n(f,b){for(var k=0;k<b.length;k++){var v=b[k];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,o(v.key),v)}}function i(f,b,k){return b&&n(f.prototype,b),Object.defineProperty(f,"prototype",{writable:!1}),f}function o(f){var b=s(f,"string");return typeof b=="symbol"?b:String(b)}function s(f,b){if(typeof f!="object"||f===null)return f;var k=f[Symbol.toPrimitive];if(k!==void 0){var v=k.call(f,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}var l=l1(),c=l.Buffer,u=Aae,d=u.inspect,h=d&&d.custom||"inspect";function m(f,b,k){c.prototype.copy.call(f,b,k)}return sB=(function(){function f(){r(this,f),this.head=null,this.tail=null,this.length=0}return i(f,[{key:"push",value:function(b){var k={data:b,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(b){var k={data:b,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var k=this.head,v=""+k.data;k=k.next;)v+=b+k.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var k=c.allocUnsafe(b>>>0),v=this.head,x=0;v;)m(v.data,k,x),x+=v.data.length,v=v.next;return k}},{key:"consume",value:function(b,k){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=k?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var k=this.head,v=1,x=k.data;for(b-=x.length;k=k.next;){var z=k.data,j=b>z.length?z.length:b;if(j===z.length?x+=z:x+=z.slice(0,b),b-=j,b===0){j===z.length?(++v,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=z.slice(j));break}++v}return this.length-=v,x}},{key:"_getBuffer",value:function(b){var k=c.allocUnsafe(b),v=this.head,x=1;for(v.data.copy(k),b-=v.data.length;v=v.next;){var z=v.data,j=b>z.length?z.length:b;if(z.copy(k,k.length-b,0,j),b-=j,b===0){j===z.length?(++x,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(j));break}++x}return this.length-=x,k}},{key:h,value:function(b,k){return d(this,a(a({},k),{},{depth:0,customInspect:!1}))}}]),f})(),sB}var lB,Tae;function Bae(){if(Tae)return lB;Tae=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return lB={destroy:e,undestroy:r,errorOrDestroy:i},lB}var cB={},Eae;function qf(){if(Eae)return cB;Eae=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(h,m,f){return typeof l=="string"?l:l(h,m,f)}var d=(function(h){e(m,h);function m(f,b,k){return h.call(this,u(f,b,k))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),cB.codes=a,cB}var uB,_ae;function Rae(){if(_ae)return uB;_ae=1;var e=qf().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return uB={getHighWaterMark:t},uB}var dB,Lae;function TYe(){if(Lae)return dB;Lae=1,dB=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return dB}var pB,Nae;function Dae(){if(Nae)return pB;Nae=1,pB=P;function e(U){var te=this;this.next=null,this.entry=null,this.finish=function(){D(te,U)}}var a;P.WritableState=C;var t={deprecate:TYe()},r=Sae(),n=l1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(U){return n.from(U)}function s(U){return n.isBuffer(U)||U instanceof i}var l=Bae(),c=Rae(),u=c.getHighWaterMark,d=qf().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,f=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,k=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,j=l.errorOrDestroy;function w(){}function C(U,te,ie){a=a||Uf(),U=U||{},typeof ie!="boolean"&&(ie=te instanceof a),this.objectMode=!!U.objectMode,ie&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=u(this,U,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ye=U.decodeStrings===!1;this.decodeStrings=!ye,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(de){ee(te,de)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}C.prototype.getBuffer=function(){for(var U=this.bufferedRequest,te=[];U;)te.push(U),U=U.next;return te},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(U){return O.call(this,U)?!0:this!==P?!1:U&&U._writableState instanceof C}})):O=function(U){return U instanceof this};function P(U){a=a||Uf();var te=this instanceof a;if(!te&&!O.call(P,this))return new P(U);this._writableState=new C(U,this,te),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),r.call(this)}P.prototype.pipe=function(){j(this,new b)};function B(U,te){var ie=new x;j(U,ie),process.nextTick(te,ie)}function R(U,te,ie,ye){var de;return ie===null?de=new v:typeof ie!="string"&&!te.objectMode&&(de=new h("chunk",["string","Buffer"],ie)),de?(j(U,de),process.nextTick(ye,de),!1):!0}P.prototype.write=function(U,te,ie){var ye=this._writableState,de=!1,T=!ye.objectMode&&s(U);return T&&!n.isBuffer(U)&&(U=o(U)),typeof te=="function"&&(ie=te,te=null),T?te="buffer":te||(te=ye.defaultEncoding),typeof ie!="function"&&(ie=w),ye.ending?B(this,ie):(T||R(this,ye,U,ie))&&(ye.pendingcb++,de=L(this,ye,T,U,te,ie)),de},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&me(this,U))},P.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new z(U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(U,te,ie){return!U.objectMode&&U.decodeStrings!==!1&&typeof te=="string"&&(te=n.from(te,ie)),te}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(U,te,ie,ye,de,T){if(!ie){var $=q(te,ye,de);ye!==$&&(ie=!0,de="buffer",ye=$)}var le=te.objectMode?1:ye.length;te.length+=le;var G=te.length<te.highWaterMark;if(G||(te.needDrain=!0),te.writing||te.corked){var ue=te.lastBufferedRequest;te.lastBufferedRequest={chunk:ye,encoding:de,isBuf:ie,callback:T,next:null},ue?ue.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else W(U,te,!1,le,ye,de,T);return G}function W(U,te,ie,ye,de,T,$){te.writelen=ye,te.writecb=$,te.writing=!0,te.sync=!0,te.destroyed?te.onwrite(new k("write")):ie?U._writev(de,te.onwrite):U._write(de,T,te.onwrite),te.sync=!1}function N(U,te,ie,ye,de){--te.pendingcb,ie?(process.nextTick(de,ye),process.nextTick(H,U,te),U._writableState.errorEmitted=!0,j(U,ye)):(de(ye),U._writableState.errorEmitted=!0,j(U,ye),H(U,te))}function X(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function ee(U,te){var ie=U._writableState,ye=ie.sync,de=ie.writecb;if(typeof de!="function")throw new f;if(X(ie),te)N(U,ie,ye,te,de);else{var T=K(ie)||U.destroyed;!T&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(U,ie),ye?process.nextTick(se,U,ie,T,de):se(U,ie,T,de)}}function se(U,te,ie,ye){ie||re(U,te),te.pendingcb--,ye(),H(U,te)}function re(U,te){te.length===0&&te.needDrain&&(te.needDrain=!1,U.emit("drain"))}function me(U,te){te.bufferProcessing=!0;var ie=te.bufferedRequest;if(U._writev&&ie&&ie.next){var ye=te.bufferedRequestCount,de=new Array(ye),T=te.corkedRequestsFree;T.entry=ie;for(var $=0,le=!0;ie;)de[$]=ie,ie.isBuf||(le=!1),ie=ie.next,$+=1;de.allBuffers=le,W(U,te,!0,te.length,de,"",T.finish),te.pendingcb++,te.lastBufferedRequest=null,T.next?(te.corkedRequestsFree=T.next,T.next=null):te.corkedRequestsFree=new e(te),te.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ue=ie.encoding,pe=ie.callback,Z=te.objectMode?1:G.length;if(W(U,te,!1,Z,G,ue,pe),ie=ie.next,te.bufferedRequestCount--,te.writing)break}ie===null&&(te.lastBufferedRequest=null)}te.bufferedRequest=ie,te.bufferProcessing=!1}P.prototype._write=function(U,te,ie){ie(new m("_write()"))},P.prototype._writev=null,P.prototype.end=function(U,te,ie){var ye=this._writableState;return typeof U=="function"?(ie=U,U=null,te=null):typeof te=="function"&&(ie=te,te=null),U!=null&&this.write(U,te),ye.corked&&(ye.corked=1,this.uncork()),ye.ending||E(this,ye,ie),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function F(U,te){U._final(function(ie){te.pendingcb--,ie&&j(U,ie),te.prefinished=!0,U.emit("prefinish"),H(U,te)})}function Q(U,te){!te.prefinished&&!te.finalCalled&&(typeof U._final=="function"&&!te.destroyed?(te.pendingcb++,te.finalCalled=!0,process.nextTick(F,U,te)):(te.prefinished=!0,U.emit("prefinish")))}function H(U,te){var ie=K(te);if(ie&&(Q(U,te),te.pendingcb===0&&(te.finished=!0,U.emit("finish"),te.autoDestroy))){var ye=U._readableState;(!ye||ye.autoDestroy&&ye.endEmitted)&&U.destroy()}return ie}function E(U,te,ie){te.ending=!0,H(U,te),ie&&(te.finished?process.nextTick(ie):U.once("finish",ie)),te.ended=!0,U.writable=!1}function D(U,te,ie){var ye=U.entry;for(U.entry=null;ye;){var de=ye.callback;te.pendingcb--,de(ie),ye=ye.next}te.corkedRequestsFree.next=U}return Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(U){this._writableState&&(this._writableState.destroyed=U)}}),P.prototype.destroy=l.destroy,P.prototype._undestroy=l.undestroy,P.prototype._destroy=function(U,te){te(U)},pB}var hB,Iae;function Uf(){if(Iae)return hB;Iae=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};hB=o;for(var a=Wae(),t=Dae(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),hB}var mB={},gB={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var $ae;function BYe(){return $ae||($ae=1,(function(e,a){var t=l1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(gB,gB.exports)),gB.exports}var Kae;function Hae(){if(Kae)return mB;Kae=1;var e=BYe().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var x;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(x)return;v=(""+v).toLowerCase(),x=!0}}function r(v){var x=t(v);if(typeof x!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return x||v}mB.StringDecoder=n;function n(v){this.encoding=r(v);var x;switch(this.encoding){case"utf16le":this.text=d,this.end=h,x=4;break;case"utf8":this.fillLast=l,x=4;break;case"base64":this.text=m,this.end=f,x=3;break;default:this.write=b,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(x)}n.prototype.write=function(v){if(v.length===0)return"";var x,z;if(this.lastNeed){if(x=this.fillLast(v),x===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?x?x+this.text(v,z):this.text(v,z):x||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,x,z){var j=x.length-1;if(j<z)return 0;var w=i(x[j]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--j<z||w===-2?0:(w=i(x[j]),w>=0?(w>0&&(v.lastNeed=w-2),w):--j<z||w===-2?0:(w=i(x[j]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,x,z){if((x[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var x=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,x,0,v.length),this.lastNeed-=v.length}function c(v,x){var z=o(this,v,x);if(!this.lastNeed)return v.toString("utf8",x);this.lastTotal=z;var j=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,j),v.toString("utf8",x,j)}function u(v){var x=v&&v.length?this.write(v):"";return this.lastNeed?x+"\uFFFD":x}function d(v,x){if((v.length-x)%2===0){var z=v.toString("utf16le",x);if(z){var j=z.charCodeAt(z.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",x,v.length-1)}function h(v){var x=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,z)}return x}function m(v,x){var z=(v.length-x)%3;return z===0?v.toString("base64",x):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",x,v.length-z))}function f(v){var x=v&&v.length?this.write(v):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function b(v){return v.toString(this.encoding)}function k(v){return v&&v.length?this.write(v):""}return mB}var fB,Vae;function vB(){if(Vae)return fB;Vae=1;var e=qf().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||h()},d=i._writableState&&i._writableState.finished,h=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,f=function(){l=!1,m=!0,c||s.call(i)},b=function(x){s.call(i,x)},k=function(){var x;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(x=new e),s.call(i,x);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(x=new e),s.call(i,x)},v=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",k),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",f),i.on("finish",h),o.error!==!1&&i.on("error",b),i.on("close",k),function(){i.removeListener("complete",h),i.removeListener("abort",k),i.removeListener("request",v),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",f),i.removeListener("error",b),i.removeListener("close",k)}}return fB=n,fB}var bB,Fae;function EYe(){if(Fae)return bB;Fae=1;var e;function a(z,j,w){return j=t(j),j in z?Object.defineProperty(z,j,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[j]=w,z}function t(z){var j=r(z,"string");return typeof j=="symbol"?j:String(j)}function r(z,j){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var C=w.call(z,j);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(z)}var n=vB(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(z,j){return{value:z,done:j}}function m(z){var j=z[i];if(j!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,j(h(w,!1)))}}function f(z){process.nextTick(m,z)}function b(z,j){return function(w,C){z.then(function(){if(j[l]){w(h(void 0,!0));return}j[u](w,C)},C)}}var k=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,j=this[s];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(P,B){process.nextTick(function(){z[s]?B(z[s]):P(h(void 0,!0))})});var w=this[c],C;if(w)C=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(h(O,!1));C=new Promise(this[u])}return this[c]=C,C}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(j,w){z[d].destroy(null,function(C){if(C){w(C);return}j(h(void 0,!0))})})}),e),k),x=function(z){var j,w=Object.create(v,(j={},a(j,d,{value:z,writable:!0}),a(j,i,{value:null,writable:!0}),a(j,o,{value:null,writable:!0}),a(j,s,{value:null,writable:!0}),a(j,l,{value:z._readableState.endEmitted,writable:!0}),a(j,u,{value:function(C,O){var P=w[d].read();P?(w[c]=null,w[i]=null,w[o]=null,C(h(P,!1))):(w[i]=C,w[o]=O)},writable:!0}),j));return w[c]=null,n(z,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(C)),w[s]=C;return}var P=w[i];P!==null&&(w[c]=null,w[i]=null,w[o]=null,P(h(void 0,!0))),w[l]=!0}),z.on("readable",f.bind(null,w)),w};return bB=x,bB}var Gae,qae;function _Ye(){return qae||(qae=1,Gae=function(){throw new Error("Readable.from is not available in the browser")}),Gae}var kB,Uae;function Wae(){if(Uae)return kB;Uae=1,kB=B;var e;B.ReadableState=P;var a=function(T,$){return T.listeners($).length},t=Sae(),r=l1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(T){return r.from(T)}function o(T){return r.isBuffer(T)||T instanceof n}var s=Aae,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=MYe(),u=Bae(),d=Rae(),h=d.getHighWaterMark,m=qf().codes,f=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,k=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,z,j,w=u.errorOrDestroy,C=["error","close","destroy","pause","resume"];function O(T,$,le){if(typeof T.prependListener=="function")return T.prependListener($,le);!T._events||!T._events[$]?T.on($,le):Array.isArray(T._events[$])?T._events[$].unshift(le):T._events[$]=[le,T._events[$]]}function P(T,$,le){e=e||Uf(),T=T||{},typeof le!="boolean"&&(le=$ instanceof e),this.objectMode=!!T.objectMode,le&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=h(this,T,"readableHighWaterMark",le),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(x||(x=Hae().StringDecoder),this.decoder=new x(T.encoding),this.encoding=T.encoding)}function B(T){if(e=e||Uf(),!(this instanceof B))return new B(T);var $=this instanceof e;this._readableState=new P(T,this,$),this.readable=!0,T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(T,$){$(T)},B.prototype.push=function(T,$){var le=this._readableState,G;return le.objectMode?G=!0:typeof T=="string"&&($=$||le.defaultEncoding,$!==le.encoding&&(T=r.from(T,$),$=""),G=!0),R(this,T,$,!1,G)},B.prototype.unshift=function(T){return R(this,T,null,!0,!1)};function R(T,$,le,G,ue){l("readableAddChunk",$);var pe=T._readableState;if($===null)pe.reading=!1,ee(T,pe);else{var Z;if(ue||(Z=L(pe,$)),Z)w(T,Z);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(T,new v):q(T,pe,$,!0);else if(pe.ended)w(T,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!le?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(T,pe,$,!1):me(T,pe)):q(T,pe,$,!1)}else G||(pe.reading=!1,me(T,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(T,$,le,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,T.emit("data",le)):($.length+=$.objectMode?1:le.length,G?$.buffer.unshift(le):$.buffer.push(le),$.needReadable&&se(T)),me(T,$)}function L(T,$){var le;return!o($)&&typeof $!="string"&&$!==void 0&&!T.objectMode&&(le=new f("chunk",["string","Buffer","Uint8Array"],$)),le}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(T){x||(x=Hae().StringDecoder);var $=new x(T);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,G="";le!==null;)G+=$.write(le.data),le=le.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var W=1073741824;function N(T){return T>=W?T=W:(T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++),T}function X(T,$){return T<=0||$.length===0&&$.ended?0:$.objectMode?1:T!==T?$.flowing&&$.length?$.buffer.head.data.length:$.length:(T>$.highWaterMark&&($.highWaterMark=N(T)),T<=$.length?T:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(T){l("read",T),T=parseInt(T,10);var $=this._readableState,le=T;if(T!==0&&($.emittedReadable=!1),T===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):se(this),null;if(T=X(T,$),T===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-T<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(T=X(le,$)));var ue;return T>0?ue=te(T,$):ue=null,ue===null?($.needReadable=$.length<=$.highWaterMark,T=0):($.length-=T,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),le!==T&&$.ended&&ie(this)),ue!==null&&this.emit("data",ue),ue};function ee(T,$){if(l("onEofChunk"),!$.ended){if($.decoder){var le=$.decoder.end();le&&le.length&&($.buffer.push(le),$.length+=$.objectMode?1:le.length)}$.ended=!0,$.sync?se(T):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,re(T)))}}function se(T){var $=T._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(re,T))}function re(T){var $=T._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(T.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,U(T)}function me(T,$){$.readingMore||($.readingMore=!0,process.nextTick(K,T,$))}function K(T,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var le=$.length;if(l("maybeReadMore read 0"),T.read(0),le===$.length)break}$.readingMore=!1}B.prototype._read=function(T){w(this,new k("_read()"))},B.prototype.pipe=function(T,$){var le=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=T;break;case 1:G.pipes=[G.pipes,T];break;default:G.pipes.push(T);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ue=(!$||$.end!==!1)&&T!==null&&T!==process.stderr,pe=ue?ae:ta;G.endEmitted?process.nextTick(pe):le.once("end",pe),T.on("unpipe",Z);function Z(M,Y){l("onunpipe"),M===le&&Y&&Y.hasUnpiped===!1&&(Y.hasUnpiped=!0,fe())}function ae(){l("onend"),T.end()}var ce=F(le);T.on("drain",ce);var ve=!1;function fe(){l("cleanup"),T.removeListener("close",Oe),T.removeListener("finish",Re),T.removeListener("drain",ce),T.removeListener("error",we),T.removeListener("unpipe",Z),le.removeListener("end",ae),le.removeListener("end",ta),le.removeListener("data",he),ve=!0,G.awaitDrain&&(!T._writableState||T._writableState.needDrain)&&ce()}le.on("data",he);function he(M){l("ondata");var Y=T.write(M);l("dest.write",Y),Y===!1&&((G.pipesCount===1&&G.pipes===T||G.pipesCount>1&&de(G.pipes,T)!==-1)&&!ve&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),le.pause())}function we(M){l("onerror",M),ta(),T.removeListener("error",we),a(T,"error")===0&&w(T,M)}O(T,"error",we);function Oe(){T.removeListener("finish",Re),ta()}T.once("close",Oe);function Re(){l("onfinish"),T.removeListener("close",Oe),ta()}T.once("finish",Re);function ta(){l("unpipe"),le.unpipe(T)}return T.emit("pipe",le),G.flowing||(l("pipe resume"),le.resume()),T};function F(T){return function(){var $=T._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(T,"data")&&($.flowing=!0,U(T))}}B.prototype.unpipe=function(T){var $=this._readableState,le={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return T&&T!==$.pipes?this:(T||(T=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,T&&T.emit("unpipe",this,le),this);if(!T){var G=$.pipes,ue=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ue;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Z=de($.pipes,T);return Z===-1?this:($.pipes.splice(Z,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),T.emit("unpipe",this,le),this)},B.prototype.on=function(T,$){var le=t.prototype.on.call(this,T,$),G=this._readableState;return T==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):T==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?se(this):G.reading||process.nextTick(H,this)),le},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(T,$){var le=t.prototype.removeListener.call(this,T,$);return T==="readable"&&process.nextTick(Q,this),le},B.prototype.removeAllListeners=function(T){var $=t.prototype.removeAllListeners.apply(this,arguments);return(T==="readable"||T===void 0)&&process.nextTick(Q,this),$};function Q(T){var $=T._readableState;$.readableListening=T.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:T.listenerCount("data")>0&&T.resume()}function H(T){l("readable nexttick read 0"),T.read(0)}B.prototype.resume=function(){var T=this._readableState;return T.flowing||(l("resume"),T.flowing=!T.readableListening,E(this,T)),T.paused=!1,this};function E(T,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(D,T,$))}function D(T,$){l("resume",$.reading),$.reading||T.read(0),$.resumeScheduled=!1,T.emit("resume"),U(T),$.flowing&&!$.reading&&T.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(T){var $=T._readableState;for(l("flow",$.flowing);$.flowing&&T.read()!==null;);}B.prototype.wrap=function(T){var $=this,le=this._readableState,G=!1;T.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var Z=le.decoder.end();Z&&Z.length&&$.push(Z)}$.push(null)}),T.on("data",function(Z){if(l("wrapped data"),le.decoder&&(Z=le.decoder.write(Z)),!(le.objectMode&&Z==null)&&!(!le.objectMode&&(!Z||!Z.length))){var ae=$.push(Z);ae||(G=!0,T.pause())}});for(var ue in T)this[ue]===void 0&&typeof T[ue]=="function"&&(this[ue]=(function(Z){return function(){return T[Z].apply(T,arguments)}})(ue));for(var pe=0;pe<C.length;pe++)T.on(C[pe],this.emit.bind(this,C[pe]));return this._read=function(Z){l("wrapped _read",Z),G&&(G=!1,T.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=EYe()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),B._fromList=te,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function te(T,$){if($.length===0)return null;var le;return $.objectMode?le=$.buffer.shift():!T||T>=$.length?($.decoder?le=$.buffer.join(""):$.buffer.length===1?le=$.buffer.first():le=$.buffer.concat($.length),$.buffer.clear()):le=$.buffer.consume(T,$.decoder),le}function ie(T){var $=T._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(ye,$,T))}function ye(T,$){if(l("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&T.length===0&&(T.endEmitted=!0,$.readable=!1,$.emit("end"),T.autoDestroy)){var le=$._writableState;(!le||le.autoDestroy&&le.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(T,$){return j===void 0&&(j=_Ye()),j(B,T,$)});function de(T,$){for(var le=0,G=T.length;le<G;le++)if(T[le]===$)return le;return-1}return kB}var yB,Jae;function Zae(){if(Jae)return yB;Jae=1,yB=s;var e=qf().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Uf();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new t);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var f=this._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,h){c(u,d,h)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,h){h(new a("_transform()"))},s.prototype._write=function(u,d,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=d,!m.transforming){var f=this._readableState;(m.needTransform||f.needReadable||f.length<f.highWaterMark)&&this._read(f.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(h){d(h)})};function c(u,d,h){if(d)return u.emit("error",d);if(h!=null&&u.push(h),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return yB}var xB,Qae;function RYe(){if(Qae)return xB;Qae=1,xB=a;var e=Zae();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},xB}var wB,Xae;function LYe(){if(Xae)return wB;Xae=1;var e;function a(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var t=qf().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,f,b){b=a(b);var k=!1;h.on("close",function(){k=!0}),e===void 0&&(e=vB()),e(h,{readable:m,writable:f},function(x){if(x)return b(x);k=!0,b()});var v=!1;return function(x){if(!k&&!v){if(v=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(x||new n("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function d(){for(var h=arguments.length,m=new Array(h),f=0;f<h;f++)m[f]=arguments[f];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var k,v=m.map(function(x,z){var j=z<m.length-1,w=z>0;return s(x,j,w,function(C){k||(k=C),C&&v.forEach(l),!j&&(v.forEach(l),b(k))})});return m.reduce(c)}return wB=d,wB}var Yae;function ete(){return Yae||(Yae=1,(function(e,a){a=e.exports=Wae(),a.Stream=a,a.Readable=a,a.Writable=Dae(),a.Duplex=Uf(),a.Transform=Zae(),a.PassThrough=RYe(),a.finished=vB(),a.pipeline=LYe()})(iB,iB.exports)),iB.exports}var ate;function tte(){if(ate)return f2;ate=1;var e=yae(),a=Z9(),t=ete(),r=f2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=f2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let b=function(){d.read().then(function(k){if(!c._destroyed){if(l(k.done),k.done){c.push(null);return}c.push(Buffer.from(k.value)),b()}}).catch(function(k){l(!0),c._destroyed||c.emit("error",k)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(k,v){c.headers[v.toLowerCase()]=k,c.rawHeaders.push(v,k)}),e.writableStream){var u=new WritableStream({write:function(k){return l(!1),new Promise(function(v,x){c._destroyed?x():c.push(Buffer.from(k))?v():c._resumeFetch=v})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(k){l(!0),c._destroyed||c.emit("error",k)}});try{o.body.pipeTo(u).catch(function(k){l(!0),c._destroyed||c.emit("error",k)});return}catch{}}var d=o.body.getReader();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var h=i.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(b){var k=b.match(/^([^:]+):\s*(.*)/);if(k){var v=k[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(k[2])):c.headers[v]!==void 0?c.headers[v]+=", "+k[2]:c.headers[v]=k[2],c.rawHeaders.push(k[1],k[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var f=m.match(/;\s*charset=([^;])(;|$)/);f&&(c._charset=f[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var h=new globalThis.MSStreamReader;h.onprogress=function(){h.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(h.result.slice(o._pos)))),o._pos=h.result.byteLength)},h.onload=function(){i(!0),o.push(null)},h.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},f2}var rte;function NYe(){if(rte)return nB.exports;rte=1;var e=yae(),a=Z9(),t=tte(),r=ete(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=nB.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(f){d.setHeader(f,u.headers[f])});var h,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,h=!0;else if(u.mode==="prefer-streaming")h=!1;else if(u.mode==="allow-wrong-content-type")h=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(h,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var h=this,m=u.toLowerCase();c.indexOf(m)===-1&&(h._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var h=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(h["content-type"]||{}).value||""}));var f=[];if(Object.keys(h).forEach(function(x){var z=h[x].name,j=h[x].value;Array.isArray(j)?j.forEach(function(w){f.push([z,w])}):f.push([z,j])}),u._mode==="fetch"){var b=null;if(e.abortController){var k=new AbortController;b=k.signal,u._fetchAbortController=k,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:f,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(x){u._fetchResponse=x,u._resetTimers(!1),u._connect()},function(x){u._resetTimers(!0),u._destroyed||u.emit("error",x)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(x){process.nextTick(function(){u.emit("error",x)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),f.forEach(function(x){v.setRequestHeader(x[0],x[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(x){process.nextTick(function(){u.emit("error",x)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,h){var m=this;m._body.push(u),h()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,h){var m=this;typeof u=="function"&&(h=u,u=void 0),r.Writable.prototype.end.call(m,u,d,h)},s.prototype.setTimeout=function(u,d){var h=this;d&&h.once("timeout",d),h._socketTimeout=u,h._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return nB.exports}var zB,nte;function DYe(){if(nte)return zB;nte=1,zB=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return zB}var ite,ote;function IYe(){return ote||(ote=1,ite={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),ite}var ste;function $Ye(){return ste||(ste=1,(function(e){var a=NYe(),t=tte(),r=DYe(),n=IYe(),i=FT(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,h=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(h?":"+h:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var f=new a(s);return l&&f.on("response",l),f},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(vae)),vae}var lte,cte;function KYe(){return cte||(cte=1,lte={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},$Ye().STATUS_CODES)}),lte}const HYe="7.0.8",VYe={version:HYe};var SB,ute;function FYe(){if(ute)return SB;ute=1;const e=Gf,a=FT(),t=wYe(),r=Gf,n=Gf,i=m2(),o=i.jptr,s=JT().isRef,l=g2().clone,c=g2().circularClone,u=XT().recurse,d=CYe(),h=jYe(),m=mae(),f=KYe().statusCodes,b=VYe.version,k="3.0.0";let v;class x extends Error{constructor($){super($),this.name="S2OError"}}function z(T,$){let le=new x(T);if(le.options=$,$.promise)$.promise.reject(le);else throw le}function j(T,$,le){le.warnOnly?$[le.warnProperty||"x-s2o-warning"]=T:z(T,le)}function w(T,$,le){if(T.nullable&&le.patches++,T.discriminator&&typeof T.discriminator=="string"&&(T.discriminator={propertyName:T.discriminator}),T.items&&Array.isArray(T.items)&&(T.items.length===0?T.items={}:T.items.length===1?T.items=T.items[0]:T.items={anyOf:T.items}),T.type&&Array.isArray(T.type))if(le.patch){if(le.patches++,T.type.length===0)delete T.type;else{T.oneOf||(T.oneOf=[]);for(let G of T.type){let ue={};if(G==="null")T.nullable=!0;else{ue.type=G;for(let pe of m.arrayProperties)typeof T.prop<"u"&&(ue[pe]=T[pe],delete T[pe])}ue.type&&T.oneOf.push(ue)}delete T.type,T.oneOf.length===0?delete T.oneOf:T.oneOf.length<2&&(T.type=T.oneOf[0].type,Object.keys(T.oneOf[0]).length>1&&j("Lost properties from oneOf",T,le),delete T.oneOf)}T.type&&Array.isArray(T.type)&&T.type.length===1&&(T.type=T.type[0])}else z("(Patchable) schema type must not be an array",le);T.type&&T.type==="null"&&(delete T.type,T.nullable=!0),T.type==="array"&&!T.items&&(T.items={}),T.type==="file"&&(T.type="string",T.format="binary"),typeof T.required=="boolean"&&(T.required&&T.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(T.name)),delete T.required),T.xml&&typeof T.xml.namespace=="string"&&(T.xml.namespace||delete T.xml.namespace),typeof T.allowEmptyValue<"u"&&(le.patches++,delete T.allowEmptyValue)}function C(T,$){if(T["x-required"]&&Array.isArray(T["x-required"])&&(T.required||(T.required=[]),T.required=T.required.concat(T["x-required"]),delete T["x-required"]),T["x-anyOf"]&&(T.anyOf=T["x-anyOf"],delete T["x-anyOf"]),T["x-oneOf"]&&(T.oneOf=T["x-oneOf"],delete T["x-oneOf"]),T["x-not"]&&(T.not=T["x-not"],delete T["x-not"]),typeof T["x-nullable"]=="boolean"&&(T.nullable=T["x-nullable"],delete T["x-nullable"]),typeof T["x-discriminator"]=="object"&&typeof T["x-discriminator"].propertyName=="string"){T.discriminator=T["x-discriminator"],delete T["x-discriminator"];for(let le in T.discriminator.mapping){let G=T.discriminator.mapping[le];G.startsWith("#/definitions/")&&(T.discriminator.mapping[le]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(T,$){h.walkSchema(T,{},{},function(le,G,ue){C(le),w(le,G,$)})}function P(T){return T.indexOf("#")>=0?T=T.split("#")[1].split("/").pop():T=T.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(T))}function B(T,$,le){let G=le.payload.options;if(s(T,$)){if(!T[$].startsWith("#/components/")){if(T[$]==="#/consumes")delete T[$],le.parent[le.pkey]=l(G.openapi.consumes);else if(T[$]==="#/produces")delete T[$],le.parent[le.pkey]=l(G.openapi.produces);else if(T[$].startsWith("#/definitions/")){let ue=T[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ue[0]);let Z=v.schemas[decodeURIComponent(pe)];Z?ue[0]=Z:j("Could not resolve reference "+T[$],T,G),T[$]="#/components/schemas/"+ue.join("/")}else if(T[$].startsWith("#/parameters/"))T[$]="#/components/parameters/"+m.sanitise(T[$].replace("#/parameters/",""));else if(T[$].startsWith("#/responses/"))T[$]="#/components/responses/"+m.sanitise(T[$].replace("#/responses/",""));else if(T[$].startsWith("#")){let ue=l(i.jptr(G.openapi,T[$]));if(ue===!1)j("direct $ref not found "+T[$],T,G);else if(G.refmap[T[$]])T[$]=G.refmap[T[$]];else{let pe=T[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Z="schemas",ae=pe.lastIndexOf("/schema");if(Z=pe.indexOf("/headers/")>ae?"headers":pe.indexOf("/responses/")>ae?"responses":pe.indexOf("/example")>ae?"examples":pe.indexOf("/x-")>ae?"extensions":pe.indexOf("/parameters/")>ae?"parameters":"schemas",Z==="schemas"&&O(ue,G),Z!=="responses"&&Z!=="extensions"){let ce=Z.substr(0,Z.length-1);ce==="parameter"&&ue.name&&ue.name===m.sanitise(ue.name)&&(ce=encodeURIComponent(ue.name));let ve=1;for(T["x-miro"]&&(ce=P(T["x-miro"]),ve="");i.jptr(G.openapi,"#/components/"+Z+"/"+ce+ve);)ve=ve===""?2:++ve;let fe="#/components/"+Z+"/"+ce+ve,he="";Z==="examples"&&(ue={value:ue},he="/value"),i.jptr(G.openapi,fe,ue),G.refmap[T[$]]=fe+he,T[$]=fe+he}}}}if(delete T["x-miro"],Object.keys(T).length>1){const ue=T[$],pe=le.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete T.$ref,le.parent[le.pkey]={allOf:[{$ref:ue},T]}):le.parent[le.pkey]={$ref:ue})}}if($==="x-ms-odata"&&typeof T[$]=="string"&&T[$].startsWith("#/")){let ue=T[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ue[0])];pe?ue[0]=pe:j("Could not resolve reference "+T[$],T,G),T[$]="#/components/schemas/"+ue.join("/")}}function R(T,$){for(let le in $.refmap)i.jptr(T,le,{$ref:$.refmap[le]})}function q(T){for(let $ in T)for(let le in T[$]){let G=m.sanitise(le);le!==G&&(T[$][G]=T[$][le],delete T[$][le])}}function L(T,$){if(T.type==="basic"&&(T.type="http",T.scheme="basic"),T.type==="oauth2"){let le={},G=T.flow;T.flow==="application"&&(G="clientCredentials"),T.flow==="accessCode"&&(G="authorizationCode"),typeof T.authorizationUrl<"u"&&(le.authorizationUrl=T.authorizationUrl.split("?")[0].trim()||"/"),typeof T.tokenUrl=="string"&&(le.tokenUrl=T.tokenUrl.split("?")[0].trim()||"/"),le.scopes=T.scopes||{},T.flows={},T.flows[G]=le,delete T.flow,delete T.authorizationUrl,delete T.tokenUrl,delete T.scopes,typeof T.name<"u"&&($.patch?($.patches++,delete T.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function W(T){return T&&!T["x-s2o-delete"]}function N(T,$){if(T.$ref)T.$ref=T.$ref.replace("#/responses/","#/components/responses/");else{T.type&&!T.schema&&(T.schema={}),T.type&&(T.schema.type=T.type),T.items&&T.items.type!=="array"&&(T.items.collectionFormat!==T.collectionFormat&&j("Nested collectionFormats are not supported",T,$),delete T.items.collectionFormat),T.type==="array"?(T.collectionFormat==="ssv"?j("collectionFormat:ssv is no longer supported for headers",T,$):T.collectionFormat==="pipes"?j("collectionFormat:pipes is no longer supported for headers",T,$):T.collectionFormat==="multi"?T.explode=!0:T.collectionFormat==="tsv"?(j("collectionFormat:tsv is no longer supported",T,$),T["x-collectionFormat"]="tsv"):T.style="simple",delete T.collectionFormat):T.collectionFormat&&($.patch?($.patches++,delete T.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete T.type;for(let le of m.parameterTypeProperties)typeof T[le]<"u"&&(T.schema[le]=T[le],delete T[le]);for(let le of m.arrayProperties)typeof T[le]<"u"&&(T.schema[le]=T[le],delete T[le])}}function X(T,$){if(T.$ref.indexOf("#/parameters/")>=0){let le=T.$ref.split("#/parameters/");T.$ref=le[0]+"#/components/parameters/"+m.sanitise(le[1])}T.$ref.indexOf("#/definitions/")>=0&&j("Definition used as parameter",T,$)}function ee(T,$){let le={};for(let G of Object.keys(T))le[G]=T[G],G==="parameters"&&(le.requestBody={},$.rbname&&(le[$.rbname]=""));return le.requestBody={},le}function se(T,$,le,G,ue,pe,Z){let ae={},ce=!0,ve;if($&&$.consumes&&typeof $.consumes=="string")if(Z.patch)Z.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Z);Array.isArray(pe.consumes)||delete pe.consumes;let fe=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(T&&T.$ref&&typeof T.$ref=="string"){X(T,Z);let he=decodeURIComponent(T.$ref.replace("#/components/parameters/","")),we=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&T.$ref.startsWith("#/")&&(T["x-s2o-delete"]=!0,we=!0),we){let Re=T.$ref,ta=o(pe,T.$ref);!ta&&Re.startsWith("#/")?j("Could not resolve reference "+Re,T,Z):ta&&(T=ta)}}if(T&&(T.name||T.in)){typeof T["x-deprecated"]=="boolean"&&(T.deprecated=T["x-deprecated"],delete T["x-deprecated"]),typeof T["x-example"]<"u"&&(T.example=T["x-example"],delete T["x-example"]),T.in!=="body"&&!T.type&&(Z.patch?(Z.patches++,T.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Z)),T.type&&typeof T.type=="object"&&T.type.$ref&&(T.type=o(pe,T.type.$ref)),T.type==="file"&&(T["x-s2o-originalType"]=T.type,ve=T.type),T.description&&typeof T.description=="object"&&T.description.$ref&&(T.description=o(pe,T.description.$ref)),T.description===null&&delete T.description;let he=T.collectionFormat;if(T.type==="array"&&!he&&(he="csv"),he&&(T.type!=="array"&&(Z.patch?(Z.patches++,delete T.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Z)),he==="csv"&&(T.in==="query"||T.in==="cookie")&&(T.style="form",T.explode=!1),he==="csv"&&(T.in==="path"||T.in==="header")&&(T.style="simple"),he==="ssv"&&(T.in==="query"?T.style="spaceDelimited":j("collectionFormat:ssv is no longer supported except for in:query parameters",T,Z)),he==="pipes"&&(T.in==="query"?T.style="pipeDelimited":j("collectionFormat:pipes is no longer supported except for in:query parameters",T,Z)),he==="multi"&&(T.explode=!0),he==="tsv"&&(j("collectionFormat:tsv is no longer supported",T,Z),T["x-collectionFormat"]="tsv"),delete T.collectionFormat),T.type&&T.type!=="body"&&T.in!=="formData")if(T.items&&T.schema)j("parameter has array,items and schema",T,Z);else{T.schema&&Z.patches++,(!T.schema||typeof T.schema!="object")&&(T.schema={}),T.schema.type=T.type,T.items&&(T.schema.items=T.items,delete T.items,u(T.schema.items,null,function(we,Oe,Re){Oe==="collectionFormat"&&typeof we[Oe]=="string"&&(he&&we[Oe]!==he&&j("Nested collectionFormats are not supported",T,Z),delete we[Oe])}));for(let we of m.parameterTypeProperties)typeof T[we]<"u"&&(T.schema[we]=T[we]),delete T[we]}T.schema&&O(T.schema,Z),T["x-ms-skip-url-encoding"]&&T.in==="query"&&(T.allowReserved=!0,delete T["x-ms-skip-url-encoding"])}if(T&&T.in==="formData"){ce=!1,ae.content={};let he="application/x-www-form-urlencoded";if(fe.length&&fe.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),ae.content[he]={},T.schema)ae.content[he].schema=T.schema,T.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(T.schema.$ref.replace("#/components/schemas/","")));else{ae.content[he].schema={},ae.content[he].schema.type="object",ae.content[he].schema.properties={},ae.content[he].schema.properties[T.name]={};let we=ae.content[he].schema,Oe=ae.content[he].schema.properties[T.name];T.description&&(Oe.description=T.description),T.example&&(Oe.example=T.example),T.type&&(Oe.type=T.type);for(let Re of m.parameterTypeProperties)typeof T[Re]<"u"&&(Oe[Re]=T[Re]);T.required===!0&&(we.required||(we.required=[]),we.required.push(T.name),ae.required=!0),typeof T.default<"u"&&(Oe.default=T.default),Oe.properties&&(Oe.properties=T.properties),T.allOf&&(Oe.allOf=T.allOf),T.type==="array"&&T.items&&(Oe.items=T.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(ve==="file"||T["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),re(T,Oe)}}else T&&T.type==="file"&&(T.required&&(ae.required=T.required),ae.content={},ae.content["application/octet-stream"]={},ae.content["application/octet-stream"].schema={},ae.content["application/octet-stream"].schema.type="string",ae.content["application/octet-stream"].schema.format="binary",re(T,ae));if(T&&T.in==="body"){ae.content={},T.name&&(ae["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+T.name).toCamelCase()),T.description&&(ae.description=T.description),T.required&&(ae.required=T.required),$&&Z.rbname&&T.name&&($[Z.rbname]=T.name),T.schema&&T.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(T.schema.$ref.replace("#/components/schemas/","")):T.schema&&T.schema.type==="array"&&T.schema.items&&T.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(T.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),fe.length||fe.push("application/json");for(let he of fe)ae.content[he]={},ae.content[he].schema=l(T.schema||{}),O(ae.content[he].schema,Z);re(T,ae)}if(Object.keys(ae).length>0&&(T["x-s2o-delete"]=!0,$))if($.requestBody&&ce){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ue;j("Operation "+he+" has multiple requestBodies",$,Z)}else $.requestBody||($=le[G]=ee($,Z)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&ae.content["multipart/form-data"]&&ae.content["multipart/form-data"].schema&&ae.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&ae.content["application/x-www-form-urlencoded"]&&ae.content["application/x-www-form-urlencoded"].schema&&ae.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,ae),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(T&&!T["x-s2o-delete"]){delete T.type;for(let he of m.parameterTypeProperties)delete T[he];T.in==="path"&&(typeof T.required>"u"||T.required!==!0)&&(Z.patch?(Z.patches++,T.required=!0):z("(Patchable) path parameters must be required:true ["+T.name+" in "+ue+"]",Z))}return $}function re(T,$){for(let le in T)le.startsWith("x-")&&!le.startsWith("x-s2o")&&($[le]=T[le])}function me(T,$,le,G,ue){if(!T)return!1;if(T.$ref&&typeof T.$ref=="string")T.$ref.indexOf("#/definitions/")>=0?j("definition used as response: "+T.$ref,T,ue):T.$ref.startsWith("#/responses/")&&(T.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(T.$ref.replace("#/responses/",""))));else{if((typeof T.description>"u"||T.description===null||T.description===""&&ue.patch)&&(ue.patch?typeof T=="object"&&!Array.isArray(T)&&(ue.patches++,T.description=f[T]||""):z("(Patchable) response.description is mandatory",ue)),typeof T.schema<"u"){if(O(T.schema,ue),T.schema.$ref&&typeof T.schema.$ref=="string"&&T.schema.$ref.startsWith("#/responses/")&&(T.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(T.schema.$ref.replace("#/responses/","")))),le&&le.produces&&typeof le.produces=="string")if(ue.patch)ue.patches++,le.produces=[le.produces];else return z("(Patchable) operation.produces must be an array",ue);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((le?le.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),T.content={};for(let Z of pe){if(T.content[Z]={},T.content[Z].schema=l(T.schema),T.examples&&T.examples[Z]){let ae={};ae.value=T.examples[Z],T.content[Z].examples={},T.content[Z].examples.response=ae,delete T.examples[Z]}T.content[Z].schema.type==="file"&&(T.content[Z].schema={type:"string",format:"binary"})}delete T.schema}for(let pe in T.examples)T.content||(T.content={}),T.content[pe]||(T.content[pe]={}),T.content[pe].examples={},T.content[pe].examples.response={},T.content[pe].examples.response.value=T.examples[pe];if(delete T.examples,T.headers)for(let pe in T.headers)pe.toLowerCase()==="status code"?ue.patch?(ue.patches++,delete T.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ue):N(T.headers[pe],ue)}}function K(T,$,le,G,ue){for(let pe in T){let Z=T[pe];Z&&Z["x-trace"]&&typeof Z["x-trace"]=="object"&&(Z.trace=Z["x-trace"],delete Z["x-trace"]),Z&&Z["x-summary"]&&typeof Z["x-summary"]=="string"&&(Z.summary=Z["x-summary"],delete Z["x-summary"]),Z&&Z["x-description"]&&typeof Z["x-description"]=="string"&&(Z.description=Z["x-description"],delete Z["x-description"]),Z&&Z["x-servers"]&&Array.isArray(Z["x-servers"])&&(Z.servers=Z["x-servers"],delete Z["x-servers"]);for(let ae in Z)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let ce=Z[ae];if(ce&&ce.parameters&&Array.isArray(ce.parameters)){if(Z.parameters)for(let ve of Z.parameters)typeof ve.$ref=="string"&&(X(ve,le),ve=o(ue,ve.$ref)),!ce.parameters.find(function(fe,he,we){return fe.name===ve.name&&fe.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(ce=se(ve,ce,Z,ae,pe,ue,le),le.rbname&&ce[le.rbname]===""&&delete ce[le.rbname]);for(let ve of ce.parameters)ce=se(ve,ce,Z,ae,ae+":"+pe,ue,le);le.rbname&&ce[le.rbname]===""&&delete ce[le.rbname],le.debug||ce.parameters&&(ce.parameters=ce.parameters.filter(W))}if(ce&&ce.security&&q(ce.security),typeof ce=="object"){if(!ce.responses){let ve={};ve.description="Default response",ce.responses={default:ve}}for(let ve in ce.responses){let fe=ce.responses[ve];me(fe,ve,ce,ue,le)}}if(ce&&ce["x-servers"]&&Array.isArray(ce["x-servers"]))ce.servers=ce["x-servers"],delete ce["x-servers"];else if(ce&&ce.schemes&&ce.schemes.length){for(let ve of ce.schemes)if((!ue.schemes||ue.schemes.indexOf(ve)<0)&&(ce.servers||(ce.servers=[]),Array.isArray(ue.servers)))for(let fe of ue.servers){let he=l(fe),we=a.parse(he.url);we.protocol=ve,he.url=we.format(),ce.servers.push(he)}}if(le.debug&&(ce["x-s2o-consumes"]=ce.consumes||[],ce["x-s2o-produces"]=ce.produces||[]),ce){if(delete ce.consumes,delete ce.produces,delete ce.schemes,ce["x-ms-examples"]){for(let ve in ce["x-ms-examples"]){let fe=ce["x-ms-examples"][ve],he=m.sanitiseAll(ve);if(fe.parameters)for(let we in fe.parameters){let Oe=fe.parameters[we];for(let Re of(ce.parameters||[]).concat(Z.parameters||[]))Re.$ref&&(Re=i.jptr(ue,Re.$ref)),Re.name===we&&!Re.example&&(Re.examples||(Re.examples={}),Re.examples[ve]={value:Oe})}if(fe.responses)for(let we in fe.responses){if(fe.responses[we].headers)for(let Oe in fe.responses[we].headers){let Re=fe.responses[we].headers[Oe];for(let ta in ce.responses[we].headers)if(ta===Oe){let M=ce.responses[we].headers[ta];M.example=Re}}if(fe.responses[we].body&&(ue.components.examples[he]={value:l(fe.responses[we].body)},ce.responses[we]&&ce.responses[we].content))for(let Oe in ce.responses[we].content){let Re=ce.responses[we].content[Oe];Re.examples||(Re.examples={}),Re.examples[ve]={$ref:"#/components/examples/"+he}}}}delete ce["x-ms-examples"]}if(ce.parameters&&ce.parameters.length===0&&delete ce.parameters,ce.requestBody){let ve=ce.operationId?m.sanitiseAll(ce.operationId):m.sanitiseAll(ae+pe).toCamelCase(),fe=m.sanitise(ce.requestBody["x-s2o-name"]||ve||"");delete ce.requestBody["x-s2o-name"];let he=JSON.stringify(ce.requestBody),we=m.hash(he);if(!G[we]){let Re={};Re.name=fe,Re.body=ce.requestBody,Re.refs=[],G[we]=Re}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+ae+"/requestBody";G[we].refs.push(Oe)}}}if(Z&&Z.parameters){for(let ae in Z.parameters){let ce=Z.parameters[ae];se(ce,null,Z,null,pe,ue,le)}!le.debug&&Array.isArray(Z.parameters)&&(Z.parameters=Z.parameters.filter(W))}}}function F(T,$){let le={};v={schemas:{}},T.security&&q(T.security);for(let ue in T.components.securitySchemes){let pe=m.sanitise(ue);ue!==pe&&(T.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),T.components.securitySchemes[pe]=T.components.securitySchemes[ue],delete T.components.securitySchemes[ue]),L(T.components.securitySchemes[pe],$)}for(let ue in T.components.schemas){let pe=m.sanitiseAll(ue),Z="";if(ue!==pe){for(;T.components.schemas[pe+Z];)Z=Z?++Z:2;T.components.schemas[pe+Z]=T.components.schemas[ue],delete T.components.schemas[ue]}v.schemas[ue]=pe+Z,O(T.components.schemas[pe+Z],$)}$.refmap={},u(T,{payload:{options:$}},B),R(T,$);for(let ue in T.components.parameters){let pe=m.sanitise(ue);ue!==pe&&(T.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),T.components.parameters[pe]=T.components.parameters[ue],delete T.components.parameters[ue]);let Z=T.components.parameters[pe];se(Z,null,null,null,pe,T,$)}for(let ue in T.components.responses){let pe=m.sanitise(ue);ue!==pe&&(T.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),T.components.responses[pe]=T.components.responses[ue],delete T.components.responses[ue]);let Z=T.components.responses[pe];if(me(Z,pe,null,T,$),Z.headers)for(let ae in Z.headers)ae.toLowerCase()==="status code"?$.patch?($.patches++,delete Z.headers[ae]):z('(Patchable) "Status Code" is not a valid header',$):N(Z.headers[ae],$)}for(let ue in T.components.requestBodies){let pe=T.components.requestBodies[ue],Z=JSON.stringify(pe),ae=m.hash(Z),ce={};ce.name=ue,ce.body=pe,ce.refs=[],le[ae]=ce}if(K(T.paths,"paths",$,le,T),T["x-ms-paths"]&&K(T["x-ms-paths"],"x-ms-paths",$,le,T),!$.debug)for(let ue in T.components.parameters)T.components.parameters[ue]["x-s2o-delete"]&&delete T.components.parameters[ue];$.debug&&(T["x-s2o-consumes"]=T.consumes||[],T["x-s2o-produces"]=T.produces||[]),delete T.consumes,delete T.produces,delete T.schemes;let G=[];if(T.components.requestBodies={},!$.resolveInternal){let ue=1;for(let pe in le){let Z=le[pe];if(Z.refs.length>1){let ae="";for(Z.name||(Z.name="requestBody",ae=ue++);G.indexOf(Z.name+ae)>=0;)ae=ae?++ae:2;Z.name=Z.name+ae,G.push(Z.name),T.components.requestBodies[Z.name]=l(Z.body);for(let ce in Z.refs){let ve={};ve.$ref="#/components/requestBodies/"+Z.name,i.jptr(T,Z.refs[ce],ve)}}}}return T.components.responses&&Object.keys(T.components.responses).length===0&&delete T.components.responses,T.components.parameters&&Object.keys(T.components.parameters).length===0&&delete T.components.parameters,T.components.examples&&Object.keys(T.components.examples).length===0&&delete T.components.examples,T.components.requestBodies&&Object.keys(T.components.requestBodies).length===0&&delete T.components.requestBodies,T.components.securitySchemes&&Object.keys(T.components.securitySchemes).length===0&&delete T.components.securitySchemes,T.components.headers&&Object.keys(T.components.headers).length===0&&delete T.components.headers,T.components.schemas&&Object.keys(T.components.schemas).length===0&&delete T.components.schemas,T.components&&Object.keys(T.components).length===0&&delete T.components,T}function Q(T){return!T||!T.url||typeof T.url!="string"||(T.url=T.url.split("{{").join("{"),T.url=T.url.split("}}").join("}"),T.url.replace(/\{(.+?)\}/g,function($,le){T.variables||(T.variables={}),T.variables[le]={default:"unknown"}})),T}function H(T,$,le){if(typeof T.info>"u"||T.info===null)if($.patch)$.patches++,T.info={version:"",title:""};else return le(new x("(Patchable) info object is mandatory"));if(typeof T.info!="object"||Array.isArray(T.info))return le(new x("info must be an object"));if(typeof T.info.title>"u"||T.info.title===null)if($.patch)$.patches++,T.info.title="";else return le(new x("(Patchable) info.title cannot be null"));if(typeof T.info.version>"u"||T.info.version===null)if($.patch)$.patches++,T.info.version="";else return le(new x("(Patchable) info.version cannot be null"));if(typeof T.info.version!="string")if($.patch)$.patches++,T.info.version=T.info.version.toString();else return le(new x("(Patchable) info.version must be a string"));if(typeof T.info.logo<"u")if($.patch)$.patches++,T.info["x-logo"]=T.info.logo,delete T.info.logo;else return le(new x("(Patchable) info should not have logo property"));if(typeof T.info.termsOfService<"u"){if(T.info.termsOfService===null)if($.patch)$.patches++,T.info.termsOfService="";else return le(new x("(Patchable) info.termsOfService cannot be null"));try{new URL(T.info.termsOfService)}catch{if($.patch)$.patches++,delete T.info.termsOfService;else return le(new x("(Patchable) info.termsOfService must be a URL"))}}}function E(T,$,le){if(typeof T.paths>"u")if($.patch)$.patches++,T.paths={};else return le(new x("(Patchable) paths object is mandatory"))}function D(T,$){const le=new WeakSet;u(T,{identityDetection:!0},function(G,ue,pe){typeof G[ue]=="object"&&G[ue]!==null&&(le.has(G[ue])?$.anchors?G[ue]=l(G[ue]):z("YAML anchor or merge key at "+pe.path,$):le.add(G[ue]))})}function U(T,$,le){return t(le,new Promise(function(G,ue){if(T||(T={}),$.original=T,$.text||($.text=n.stringify(T)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ue,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),D(T,$),T.openapi&&typeof T.openapi=="string"&&T.openapi.startsWith("3.")){$.openapi=c(T),H($.openapi,$,ue),E($.openapi,$,ue),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Z){console.warn(Z),ue(Z)});return}if(!T.swagger||T.swagger!="2.0")return ue(new x("Unsupported swagger/OpenAPI version: "+(T.openapi?T.openapi:T.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:k,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Z={};Z.url=$.source||$.origin,Z.format="swagger",Z.version=T.swagger,Z.converter={},Z.converter.url="https://github.com/mermade/oas-kit",Z.converter.version=b,pe["x-origin"].push(Z)}if(pe=Object.assign(pe,c(T)),delete pe.swagger,u(pe,{},function(Z,ae,ce){Z[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&ce.path.indexOf("/example")<0&&delete Z[ae]}),T.host)for(let Z of Array.isArray(T.schemes)?T.schemes:[""]){let ae={},ce=(T.basePath||"").replace(/\/$/,"");ae.url=(Z?Z+":":"")+"//"+T.host+ce,Q(ae),pe.servers||(pe.servers=[]),pe.servers.push(ae)}else if(T.basePath){let Z={};Z.url=T.basePath,Q(Z),pe.servers||(pe.servers=[]),pe.servers.push(Z)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),T["x-ms-parameterized-host"]){let Z=T["x-ms-parameterized-host"],ae={};ae.url=Z.hostTemplate+(T.basePath?T.basePath:""),ae.variables={};const ce=ae.url.match(/\{\w+\}/g);for(let ve in Z.parameters){let fe=Z.parameters[ve];fe.$ref&&(fe=l(o(pe,fe.$ref))),ve.startsWith("x-")||(delete fe.required,delete fe.type,delete fe.in,typeof fe.default>"u"&&(fe.enum?fe.default=fe.enum[0]:fe.default="none"),fe.name||(fe.name=ce[ve].replace("{","").replace("}","")),ae.variables[fe.name]=fe,delete fe.name)}pe.servers||(pe.servers=[]),Z.useSchemePrefix===!1?pe.servers.push(ae):T.schemes.forEach(ve=>{pe.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete pe["x-ms-parameterized-host"]}H(pe,$,ue),E(pe,$,ue),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){F($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Z){console.warn(Z),ue(Z)})}))}function te(T,$,le){return t(le,new Promise(function(G,ue){let pe=null,Z=null;try{pe=JSON.parse(T),$.text=JSON.stringify(pe,null,2)}catch(ae){Z=ae;try{pe=n.parse(T,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=T}catch(ce){Z=ce}}pe?U(pe,$).then(ae=>G(ae)).catch(ae=>ue(ae)):ue(new x(Z?Z.message:"Could not parse string"))}))}function ie(T,$,le){return t(le,new Promise(function(G,ue){$.origin=!0,$.source||($.source=T),$.verbose&&console.warn("GET "+T),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(T,pe).then(function(Z){if(Z.status!==200)throw new x(`Received status code ${Z.status}: ${T}`);return Z.text()}).then(function(Z){te(Z,$).then(ae=>G(ae)).catch(ae=>ue(ae))}).catch(function(Z){ue(Z)})}))}function ye(T,$,le){return t(le,new Promise(function(G,ue){e.readFile(T,$.encoding||"utf8",function(pe,Z){pe?ue(pe):($.sourceFile=T,te(Z,$).then(ae=>G(ae)).catch(ae=>ue(ae)))})}))}function de(T,$,le){return t(le,new Promise(function(G,ue){let pe="";T.on("data",function(Z){pe+=Z}).on("end",function(){te(pe,$).then(Z=>G(Z)).catch(Z=>ue(Z))})}))}return SB={S2OError:x,targetVersion:k,convert:U,convertObj:U,convertUrl:ie,convertStr:te,convertFile:ye,convertStream:de},SB}var GYe=FYe();const qYe=en(GYe);function UYe(e){return e.paths||(e.paths={}),new Promise((a,t)=>qYe.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function WYe(){try{return(await Zee())?.resolvedConfig.openapi||{}}catch{return{}}}async function JYe(e){const a=await Zee(),t={config:a,base:Hc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Hc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=ZYe(e):t.ref=e;const{bundle:{parsed:r}}=await hYe(t);return r.swagger!==void 0?UYe(r):r}function ZYe(e){return{source:{absoluteRef:""},parsed:e}}async function QYe(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await JYe(e||a);try{PHe(r)}catch{}return r}const XYe=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=_.useState(),[s,l]=_.useState(!0),[c,u]=_.useState(null),[d,h]=_.useState(e||{});_.useEffect(()=>{async function f(){l(!0);try{const b=await WYe();h({...e,...b}),u(await QYe(t,a,e))}catch(b){o(b.message)}}f()},[t,a,e]);const m=_.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},AHe([c,a,d]));return _.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:p.jsx(TWe,{color:"--loading-spinner-color"}):_.isValidElement(n)?_.cloneElement(n,{store:m}):null};function YYe({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(XYe,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(kY,{withCommonStyles:!0,router:o||"hash"})})}function eea(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function aea(e){const a=eea(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function tea(e,a=document.querySelector("redoc")){XV.hydrateRoot(a,p.jsx(kY,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function dte(e,a={},t=x4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...aea(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),XV.createRoot(t).render(_.createElement(YYe,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const rea="3.16.0-custom.6",nea="26dd6e01f7";function iea(){const e=x4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&dte(a,{},e)}iea();function c1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pte={exports:{}};/*!
10328
10328
 
10329
10329
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
10330
10330
  <http://stuartk.com/jszip>
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as S,jsxs as b}from"react/jsx-runtime";import{useAtomValue as f}from"jotai";import{Panel as o}from"@redocly/theme/components/Panel/Panel";import{Markdown as I}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as P}from"../Download/index.js";import{Overview as j}from"../Overview/index.js";import{ServerList as O}from"../ServerList/index.js";import{globalStoreAtom as y}from"../../jotai/store.js";import{normalizeServers as v}from"../../utils/index.js";import{LanguageList as M}from"../Language/index.js";import{mergeInMockServer as k}from"../../models/operation.js";import{languageAtom as D}from"../../jotai/app.js";import{useTranslate as E}from"../../hooks/index.js";import{styled as N}from"../../styled-components.js";import{PanelItemsList as A}from"../PanelItem/styled.js";import{useDownloadInfo as _}from"../Download/useDownloadInfo.js";import{McpOverview as F}from"../McpOverview/McpOverview.js";const re=({item:{infoDefinition:n}})=>{const r=E(),{options:{hideDownloadButtons:g,downloadUrls:h,mockServer:u},parser:{definition:a,definitionUrl:t}}=f(y),{languages:i,activeLanguage:w}=f(D),l=_({downloadUrls:h}),p=v(t,k(a.servers||[],u)).sort((c,d)=>c["x-isLive"]&&!d["x-isLive"]?-1:!c["x-isLive"]&&d["x-isLive"]?1:0),x=!!a?.["x-redocly-openrpc"],s=a?.["x-mcp"],L=v(t,s?.servers||a.servers||[]),m=!(Object.keys(a.paths||{}).length>0)&&s;return b(S,{children:[!g&&l&&e(o,{className:"panel-download",header:r("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(P,{downloadObjects:l})}),n&&e(R,{className:"panel-overview",header:r("openapi.info.title","Overview"),isExpandable:!1,children:e(I,{children:e(j,{info:n,translate:r})})}),!!s&&e(o,{className:"panel-download",header:r("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(F,{mcpInfo:s,mcpServers:L})}),!!i?.length&&!m&&!x&&e(o,{className:"panel-language-list",header:r("openapi.languages.title","Languages"),isExpandable:!1,children:e(M,{languages:i,activeLanguage:w})}),!!p.length&&!m&&e(o,{className:"panel-servers-list",header:r("openapi.servers.title","Servers"),isExpandable:!1,children:e(O,{servers:p,path:"/",translate:r})})]})},R=N(o)`
1
+ import{jsx as e,Fragment as P,jsxs as S}from"react/jsx-runtime";import{useAtomValue as v}from"jotai";import{Panel as a}from"@redocly/theme/components/Panel/Panel";import{Markdown as b}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as I}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as y}from"../../jotai/store.js";import{normalizeServers as g}from"../../utils/index.js";import{LanguageList as D}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as k}from"../../jotai/app.js";import{useTranslate as E}from"../../hooks/index.js";import{styled as N}from"../../styled-components.js";import{PanelItemsList as A}from"../PanelItem/styled.js";import{useDownloadInfo as R}from"../Download/useDownloadInfo.js";import{McpOverview as _}from"../McpOverview/McpOverview.js";const re=({item:{infoDefinition:t}})=>{const r=E(),{options:{hideDownloadButtons:h,downloadUrls:u,mockServer:w},parser:{definition:o,definitionUrl:i}}=v(y),{languages:l,activeLanguage:x}=v(k),p=R({downloadUrls:u}),m=g(i,M(o.servers||[],w)).sort((d,f)=>d["x-isLive"]&&!f["x-isLive"]?-1:!d["x-isLive"]&&f["x-isLive"]?1:0),n=!!o?.["x-redocly-openrpc"],s=o?.["x-mcp"],L=g(i,s?.servers||o.servers||[]),c=!(Object.keys(o.paths||{}).length>0)&&s;return S(P,{children:[!h&&p&&e(a,{className:"panel-download",header:r(n?"openrpc.download.description.title":"openapi.download.description.title",n?"Download OpenRPC description":"Download OpenAPI description"),isExpandable:!1,children:e(I,{downloadObjects:p})}),t&&e(C,{className:"panel-overview",header:r("openapi.info.title","Overview"),isExpandable:!1,children:e(b,{children:e(O,{info:t,translate:r})})}),!!s&&e(a,{className:"panel-download",header:r("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(_,{mcpInfo:s,mcpServers:L})}),!!l?.length&&!c&&!n&&e(a,{className:"panel-language-list",header:r("openapi.languages.title","Languages"),isExpandable:!1,children:e(D,{languages:l,activeLanguage:x})}),!!m.length&&!c&&e(a,{className:"panel-servers-list",header:r("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,path:"/",translate:r})})]})},C=N(a)`
2
2
  &:has(${A}:empty) {
3
3
  display: none;
4
4
  }
@@ -1,4 +1,4 @@
1
1
  import{getTagOrGroup as l}from"../../models/group.js";import{DEFAULT_WEBHOOKS_TAG_NAME as g,GROUP_DEPTH as h}from"../../constants.js";import{getValueFromMdParsedExtension as T,isOperationName as S,JsonPointer as w,safeSlugify as k}from"../../utils/index.js";import{getOperationsItems as x}from"./operation.js";import{addMarkdownItems as y}from"./markdown.js";import{joinWithSeparator as A}from"../history/helpers.js";const O=["tools","resources","prompts"];function R(s,f,e,n,i){let t;if(n===void 0?t=Object.keys(f):t=n.tags,!Array.isArray(t))return console.warn("Unexpected values of tags. Check tags or x-tagGroups in your definition."),[];const c=t.map(o=>f[o]?(f[o].used=!0,f[o]):(console.warn(`Non-existing tag "${o}" is added to the group "${n?.name}"`),null)),r=[];for(const o of c){if(!o)continue;const a=l("tag",o,e);if(a.depth=h+1,o.name===""){const m=[...y(T(o,"description")||"",a,a.depth+1),...x(void 0,o,a.depth+1)];r.push(...m);continue}const p=b({definition:s.definition,tag:o,parent:a,schemaDefinitionsTagName:i.schemaDefinitionsTagName}),d=j(s.definition,o,a);a.items=[...p,...d,...y(T(o,"description")||"",a,a.depth+1),...x(a,o,a.depth+1)],r.push(a)}return r.filter(({name:o,items:a})=>o!==g||a.length>0)}function C(s,f,e,n,i){const t=[];for(const c of e){const r=l("group",c,f);r.depth=h,r.items=R(s,n,r,c,i),t.push(r)}return t}function b({definition:s,tag:f,parent:e,schemaDefinitionsTagName:n}){const i=n?[n]:[];return Object.entries(s.components?.schemas||{}).map(([t,c])=>{if(!(c["x-tags"]||i).includes(f.name))return null;const o=l("schema",{name:t,"x-displayName":`${c.title||t}`,description:`{% schemaDefinition showWriteOnly="true" schemaRef="#/components/schemas/${t}" /%}`,isSchema:!0,level:2},e);return o.depth=e.depth+1,o}).filter(Boolean)}function j(s,f,e){const n=[];for(const i of O)if(s["x-mcp"]?.[i]){const t=P(i),c=[t];for(const r of s["x-mcp"]?.[i]||[])if((r.tags?.length?r.tags:c).includes(f.name)){const a=A(e.id,k(r.name)),p=i==="tools"?`Tool name: \`${r.name}\`
2
2
 
3
3
  `:"",m=l(i==="tools"?"tool":i==="resources"?"rsrc":"prompt",{name:r.name,"x-displayName":r.title||r.name,description:`${p}${r.description||""}
4
- {% mcp${t.slice(0,-1)} name="${r.name}" id="${a}" /%}`,isSchema:!0,level:2},e);m.depth=e.depth+1,n.push(m)}}return n}function M(s,f){const{definition:e}=s,n={},i=e["x-webhooks"]||e.webhooks,t=e["x-mcp"];for(const c of f||[])n[c.name]={...c,operations:[]};return e.paths&&u(s,e.paths,n),i&&u(s,i,n,!0),t&&v(t,n),n}function v(s,f){for(const e of O)if(s[e])for(const n of s[e]){const i=n.tags&&n.tags.length?n.tags:[P(e)];for(const t of i){let c=f[t];c===void 0&&(c={name:t,operations:[],used:!0},f[t]=c)}}}function $(s,f,e,n,i,t,c,r){if(i.$ref){const{resolved:a}=s.deref(i);u(s,{[n]:a},t,c);return}let o=e?.tags;(!o||!o.length)&&(o=c?[g]:[""]);for(const a of o){let p=t[a];if(p===void 0&&(p={name:a,operations:[]},t[a]=p),p["x-traitTag"])continue;const d=e.isRpc||!!e["x-redocly-openrpc"]||!!s.definition["x-redocly-openrpc"],m=!e.responses[200]?.content?.["application/json"];p.operations.push({...e,pathName:n,pointer:w.compile(["paths",n,f]),httpVerb:d?m?"NOTIF":"CALL":f,pathParameters:i.parameters||[],pathServers:i.servers,isWebhook:!!c,isRpc:d,isAdditionalOperation:!!r,keywords:e["x-keywords"]})}}function u(s,f,e,n){for(const i of Object.keys(f||{})){const t=f[i],c=Object.keys(t).filter(S);for(const r of c){const o=t[r];$(s,r,o,i,t,e,n)}if(t.additionalOperations)for(const[r,o]of Object.entries(t.additionalOperations))$(s,r,o,i,t,e,n,!0)}}function P(s){return s.charAt(0).toUpperCase()+s.slice(1)}export{P as capitalize,C as getTagGroupsItems,R as getTagsItems,M as getTagsWithOperations,$ as processOperation};
4
+ {% mcp${t.slice(0,-1)} name="${r.name}" id="${a}" /%}`,isSchema:!0,level:2},e);m.depth=e.depth+1,n.push(m)}}return n}function M(s,f){const{definition:e}=s,n={},i=e["x-webhooks"]||e.webhooks,t=e["x-mcp"];for(const c of f||[])n[c.name]={...c,operations:[]};return e.paths&&u(s,e.paths,n),i&&u(s,i,n,!0),t&&v(t,n),n}function v(s,f){for(const e of O)if(s[e])for(const n of s[e]){const i=n.tags&&n.tags.length?n.tags:[P(e)];for(const t of i){let c=f[t];c===void 0&&(c={name:t,operations:[],used:!0},f[t]=c)}}}function $(s,f,e,n,i,t,c,r){if(i.$ref){const{resolved:a}=s.deref(i);u(s,{[n]:a},t,c);return}let o=e?.tags;(!o||!o.length)&&(o=c?[g]:[""]);for(const a of o){let p=t[a];if(p===void 0&&(p={name:a,operations:[]},t[a]=p),p["x-traitTag"])continue;const d=e.isRpc||!!e["x-redocly-openrpc"]||!!s.definition["x-redocly-openrpc"],m=!!e.responses?.["200"]?.content?.["application/json"];p.operations.push({...e,pathName:n,pointer:w.compile(["paths",n,f]),httpVerb:d?m?"NOTIF":"CALL":f,pathParameters:i.parameters||[],pathServers:i.servers,isWebhook:!!c,isRpc:d,isAdditionalOperation:!!r,keywords:e["x-keywords"]})}}function u(s,f,e,n){for(const i of Object.keys(f||{})){const t=f[i],c=Object.keys(t).filter(S);for(const r of c){const o=t[r];$(s,r,o,i,t,e,n)}if(t.additionalOperations)for(const[r,o]of Object.entries(t.additionalOperations))$(s,r,o,i,t,e,n,!0)}}function P(s){return s.charAt(0).toUpperCase()+s.slice(1)}export{P as capitalize,C as getTagGroupsItems,R as getTagsItems,M as getTagsWithOperations,$ as processOperation};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.16.0-custom.5",
3
+ "version": "3.16.0-custom.6",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -36,8 +36,8 @@
36
36
  "url-template": "^2.0.8",
37
37
  "util": "~0.12.5",
38
38
  "web-vitals": "3.3.1",
39
- "@redocly/config": "0.38.0-custom.0",
40
- "@redocly/replay": "0.19.0-custom.4"
39
+ "@redocly/replay": "0.19.0-custom.4",
40
+ "@redocly/config": "0.38.0-custom.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@jest/globals": "29.5.0",