@redocly/openapi-docs 3.18.0-next.2 → 3.18.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10428,7 +10428,7 @@ ${a}`).join(`\r
|
|
|
10428
10428
|
# See https://redocly.com/docs/cli/ for more information.
|
|
10429
10429
|
`,kae="configBundler",wtt="pluginsCollector";function Ott(e){if(e)return fae(e)?Ra.join(Ra.dirname(e),h7):Ra.join(e,h7)}class Pw{constructor(t,a={}){this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.resolvedConfig=t,this.configPath=a.configPath,this.document=a.document,this.resolvedRefMap=a.resolvedRefMap,this.resolve=vae(this.resolvedConfig.resolve),this._alias=a.alias,this.plugins=a.plugins||[],this.doNotResolveExamples=!!t.resolve?.doNotResolveExamples;const r=n=>ktt({rules:n},this.plugins);this.rules={oas2:r({...t.rules,...t.oas2Rules}),oas3_0:r({...t.rules,...t.oas3_0Rules}),oas3_1:r({...t.rules,...t.oas3_1Rules}),oas3_2:r({...t.rules,...t.oas3_2Rules}),async2:r({...t.rules,...t.async2Rules}),async3:r({...t.rules,...t.async3Rules}),arazzo1:r({...t.rules,...t.arazzo1Rules}),overlay1:r({...t.rules,...t.overlay1Rules}),openrpc1:r({...t.rules,...t.openrpc1Rules})},this.preprocessors={oas2:{...t.preprocessors,...t.oas2Preprocessors},oas3_0:{...t.preprocessors,...t.oas3_0Preprocessors},oas3_1:{...t.preprocessors,...t.oas3_1Preprocessors},oas3_2:{...t.preprocessors,...t.oas3_2Preprocessors},async2:{...t.preprocessors,...t.async2Preprocessors},async3:{...t.preprocessors,...t.async3Preprocessors},arazzo1:{...t.preprocessors,...t.arazzo1Preprocessors},overlay1:{...t.preprocessors,...t.overlay1Preprocessors},openrpc1:{...t.preprocessors,...t.openrpc1Preprocessors}},this.decorators={oas2:{...t.decorators,...t.oas2Decorators},oas3_0:{...t.decorators,...t.oas3_0Decorators},oas3_1:{...t.decorators,...t.oas3_1Decorators},oas3_2:{...t.decorators,...t.oas3_2Decorators},async2:{...t.decorators,...t.async2Decorators},async3:{...t.decorators,...t.async3Decorators},arazzo1:{...t.decorators,...t.arazzo1Decorators},overlay1:{...t.decorators,...t.overlay1Decorators},openrpc1:{...t.decorators,...t.openrpc1Decorators}},this.resolveIgnore(Ott(a.configPath))}forAlias(t){if(t===void 0||!Ca(this.resolvedConfig?.apis?.[t]))return this;const{apis:a,...r}=this.resolvedConfig,{root:n,output:i,...o}=a[t];return new Pw({...r,...o},{configPath:this.configPath,document:this.document,resolvedRefMap:this.resolvedRefMap,alias:t,plugins:this.plugins})}resolveIgnore(t){!t||fae(t)}saveIgnore(){const t=this.configPath?Ra.dirname(this.configPath):process.cwd(),a=Ra.join(t,h7),r={};for(const n of Object.keys(this.ignore)){const i=Hi(n)?n:mtt(Ra.relative(t,n)),o=r[i]=this.ignore[n];for(const s of Object.keys(o))o[s]=Array.from(o[s])}(void 0)(a,xtt+yXe(r))}addIgnore(t){const a=this.ignore,r=t.location[0];if(r.pointer===void 0)return;const n=a[r.source.absoluteRef]=a[r.source.absoluteRef]||{};(n[t.ruleId]=n[t.ruleId]||new Set).add(r.pointer)}addProblemToIgnore(t){const a=t.location[0];if(a.pointer===void 0)return t;const r=(this.ignore[a.source.absoluteRef]||{})[t.ruleId],n=r&&r.has(a.pointer);return n?{...t,ignored:n}:t}extendTypes(t,a){let r=t;for(const n of this.plugins)if(n.typeExtension!==void 0)switch(a){case"oas3_0":case"oas3_1":case"oas3_2":if(!n.typeExtension.oas3)continue;r=n.typeExtension.oas3(r,a);break;case"oas2":if(!n.typeExtension.oas2)continue;r=n.typeExtension.oas2(r,a);break;case"async2":if(!n.typeExtension.async2)continue;r=n.typeExtension.async2(r,a);break;case"async3":if(!n.typeExtension.async3)continue;r=n.typeExtension.async3(r,a);break;case"arazzo1":if(!n.typeExtension.arazzo1)continue;r=n.typeExtension.arazzo1(r,a);break;case"overlay1":if(!n.typeExtension.overlay1)continue;r=n.typeExtension.overlay1(r,a);break;case"openrpc1":if(!n.typeExtension.openrpc1)continue;r=n.typeExtension.openrpc1(r,a);break;default:throw new Error("Not implemented")}return r}getRuleSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.rules[a][t]||"off";return typeof r=="string"?{severity:r}:{severity:"error",...r}}getPreprocessorSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.preprocessors[a][t]||"off";return typeof r=="string"?{severity:r==="on"?"error":r}:{severity:"error",...r}}getDecoratorSettings(t,a){this._usedRules.add(t),this._usedVersions.add(a);const r=this.decorators[a][t]||"off";return typeof r=="string"?{severity:r==="on"?"error":r}:{severity:"error",...r}}getUnusedRules(){const t=[],a=[],r=[];for(const n of Array.from(this._usedVersions))t.push(...Object.keys(this.rules[n]).filter(i=>!this._usedRules.has(i))),a.push(...Object.keys(this.decorators[n]).filter(i=>!this._usedRules.has(i))),r.push(...Object.keys(this.preprocessors[n]).filter(i=>!this._usedRules.has(i)));return{rules:t,preprocessors:r,decorators:a}}getRulesForSpecVersion(t){switch(t){case"oas3":const a=[];return this.plugins.forEach(c=>c.preprocessors?.oas3&&a.push(c.preprocessors.oas3)),this.plugins.forEach(c=>c.rules?.oas3&&a.push(c.rules.oas3)),this.plugins.forEach(c=>c.decorators?.oas3&&a.push(c.decorators.oas3)),a;case"oas2":const r=[];return this.plugins.forEach(c=>c.preprocessors?.oas2&&r.push(c.preprocessors.oas2)),this.plugins.forEach(c=>c.rules?.oas2&&r.push(c.rules.oas2)),this.plugins.forEach(c=>c.decorators?.oas2&&r.push(c.decorators.oas2)),r;case"async2":const n=[];return this.plugins.forEach(c=>c.preprocessors?.async2&&n.push(c.preprocessors.async2)),this.plugins.forEach(c=>c.rules?.async2&&n.push(c.rules.async2)),this.plugins.forEach(c=>c.decorators?.async2&&n.push(c.decorators.async2)),n;case"async3":const i=[];return this.plugins.forEach(c=>c.preprocessors?.async3&&i.push(c.preprocessors.async3)),this.plugins.forEach(c=>c.rules?.async3&&i.push(c.rules.async3)),this.plugins.forEach(c=>c.decorators?.async3&&i.push(c.decorators.async3)),i;case"arazzo1":const o=[];return this.plugins.forEach(c=>c.preprocessors?.arazzo1&&o.push(c.preprocessors.arazzo1)),this.plugins.forEach(c=>c.rules?.arazzo1&&o.push(c.rules.arazzo1)),this.plugins.forEach(c=>c.decorators?.arazzo1&&o.push(c.decorators.arazzo1)),o;case"overlay1":const s=[];return this.plugins.forEach(c=>c.preprocessors?.overlay1&&s.push(c.preprocessors.overlay1)),this.plugins.forEach(c=>c.rules?.overlay1&&s.push(c.rules.overlay1)),this.plugins.forEach(c=>c.decorators?.overlay1&&s.push(c.decorators.overlay1)),s;case"openrpc1":const l=[];return this.plugins.forEach(c=>c.preprocessors?.openrpc1&&l.push(c.preprocessors.openrpc1)),this.plugins.forEach(c=>c.rules?.openrpc1&&l.push(c.rules.openrpc1)),this.plugins.forEach(c=>c.decorators?.openrpc1&&l.push(c.decorators.openrpc1)),l}}skipRules(t){for(const a of t||[])for(const r of d7)if(this.rules[r][a])this.rules[r][a]="off";else if(Array.isArray(this.rules[r].assertions))for(const n of this.rules[r].assertions)n.assertionId===a&&(n.severity="off")}skipPreprocessors(t){for(const a of t||[])for(const r of d7)this.preprocessors[r][a]&&(this.preprocessors[r][a]="off")}skipDecorators(t){for(const a of t||[])for(const r of d7)this.decorators[r][a]&&(this.decorators[r][a]="off")}}async function ztt(e){const{ref:t,doc:a,externalRefResolver:r=new O1(e.config.resolve),base:n=null}=e;if(!(t||a))throw new Error(`Document or reference is required.
|
|
10430
10430
|
`);const i=a===void 0?await r.resolveDocument(n,t,!0):a;if(i instanceof Error)throw i;const o=C1(i.parsed);let s;switch(o){case"oas2":s=mae;break;case"oas3_0":s=M1;break;case"oas3_1":s=fn;break;case"oas3_2":s=lo;break;default:throw new Error(`Unsupported OpenAPI version: ${o}`)}return hae({document:i,...e,externalRefResolver:r,types:s})}function yae(e={}){return new Pw({rules:{},preprocessors:{},decorators:{},plugins:[]},{configPath:e.configPath})}const Stt={isatty:()=>{},createRequire:()=>{}},xae=Object.freeze(Object.defineProperty({__proto__:null,default:Stt},Symbol.toStringTag,{value:"Module"})),kv=GG(xae);var Hm={},XS={exports:{}},Ctt=XS.exports,wae;function jtt(){return wae||(wae=1,(function(e,t){(function(a){var r=t&&!t.nodeType&&t,n=e&&!e.nodeType&&e,i=typeof globalThis=="object"&&globalThis;(i.global===i||i.window===i||i.self===i)&&(a=i);var o,s=2147483647,l=36,c=1,u=26,d=38,h=700,m=72,v=128,f="-",y=/^xn--/,k=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-c,w=Math.floor,C=String.fromCharCode,j;function M(Z){throw RangeError(z[Z])}function E(Z,V){for(var Y=Z.length,U=[];Y--;)U[Y]=V(Z[Y]);return U}function L(Z,V){var Y=Z.split("@"),U="";Y.length>1&&(U=Y[0]+"@",Z=Y[1]),Z=Z.replace(x,".");var _=Z.split("."),G=E(_,V).join(".");return U+G}function D(Z){for(var V=[],Y=0,U=Z.length,_,G;Y<U;)_=Z.charCodeAt(Y++),_>=55296&&_<=56319&&Y<U?(G=Z.charCodeAt(Y++),(G&64512)==56320?V.push(((_&1023)<<10)+(G&1023)+65536):(V.push(_),Y--)):V.push(_);return V}function R(Z){return E(Z,function(V){var Y="";return V>65535&&(V-=65536,Y+=C(V>>>10&1023|55296),V=56320|V&1023),Y+=C(V),Y}).join("")}function F(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:l}function N(Z,V){return Z+22+75*(Z<26)-((V!=0)<<5)}function te(Z,V,Y){var U=0;for(Z=Y?w(Z/h):Z>>1,Z+=w(Z/V);Z>S*u>>1;U+=l)Z=w(Z/S);return w(U+(S+1)*Z/(Z+d))}function X(Z){var V=[],Y=Z.length,U,_=0,G=v,Q=m,ne,ue,ye,Ce,B,K,le,q,pe;for(ne=Z.lastIndexOf(f),ne<0&&(ne=0),ue=0;ue<ne;++ue)Z.charCodeAt(ue)>=128&&M("not-basic"),V.push(Z.charCodeAt(ue));for(ye=ne>0?ne+1:0;ye<Y;){for(Ce=_,B=1,K=l;ye>=Y&&M("invalid-input"),le=F(Z.charCodeAt(ye++)),(le>=l||le>w((s-_)/B))&&M("overflow"),_+=le*B,q=K<=Q?c:K>=Q+u?u:K-Q,!(le<q);K+=l)pe=l-q,B>w(s/pe)&&M("overflow"),B*=pe;U=V.length+1,Q=te(_-Ce,U,Ce==0),w(_/U)>s-G&&M("overflow"),G+=w(_/U),_%=U,V.splice(_++,0,G)}return R(V)}function ie(Z){var V,Y,U,_,G,Q,ne,ue,ye,Ce,B,K=[],le,q,pe,he;for(Z=D(Z),le=Z.length,V=v,Y=0,G=m,Q=0;Q<le;++Q)B=Z[Q],B<128&&K.push(C(B));for(U=_=K.length,_&&K.push(f);U<le;){for(ne=s,Q=0;Q<le;++Q)B=Z[Q],B>=V&&B<ne&&(ne=B);for(q=U+1,ne-V>w((s-Y)/q)&&M("overflow"),Y+=(ne-V)*q,V=ne,Q=0;Q<le;++Q)if(B=Z[Q],B<V&&++Y>s&&M("overflow"),B==V){for(ue=Y,ye=l;Ce=ye<=G?c:ye>=G+u?u:ye-G,!(ue<Ce);ye+=l)he=ue-Ce,pe=l-Ce,K.push(C(N(Ce+he%pe,0))),ue=w(he/pe);K.push(C(N(ue,0))),G=te(Y,q,U==_),Y=0,++U}++Y,++V}return K.join("")}function ee(Z){return L(Z,function(V){return y.test(V)?X(V.slice(4).toLowerCase()):V})}function ce(Z){return L(Z,function(V){return k.test(V)?"xn--"+ie(V):V})}if(o={version:"1.3.2",ucs2:{decode:D,encode:R},decode:X,encode:ie,toASCII:ce,toUnicode:ee},r&&n)if(e.exports==r)n.exports=o;else for(j in o)o.hasOwnProperty(j)&&(r[j]=o[j]);else a.punycode=o})(Ctt)})(XS,XS.exports)),XS.exports}var Oae,zae;function Ptt(){return zae||(zae=1,Oae={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}}),Oae}var T1={},m7,Sae;function Att(){if(Sae)return m7;Sae=1;function e(t,a){return Object.prototype.hasOwnProperty.call(t,a)}return m7=function(t,a,r,n){a=a||"&",r=r||"=";var i={};if(typeof t!="string"||t.length===0)return i;var o=/\+/g;t=t.split(a);var s=1e3;n&&typeof n.maxKeys=="number"&&(s=n.maxKeys);var l=t.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u=t[c].replace(o,"%20"),d=u.indexOf(r),h,m,v,f;d>=0?(h=u.substr(0,d),m=u.substr(d+1)):(h=u,m=""),v=decodeURIComponent(h),f=decodeURIComponent(m),e(i,v)?Array.isArray(i[v])?i[v].push(f):i[v]=[i[v],f]:i[v]=f}return i},m7}var g7,Cae;function Mtt(){if(Cae)return g7;Cae=1;var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};return g7=function(t,a,r,n){return a=a||"&",r=r||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(i){var o=encodeURIComponent(e(i))+r;return Array.isArray(t[i])?t[i].map(function(s){return o+encodeURIComponent(e(s))}).join(a):o+encodeURIComponent(e(t[i]))}).join(a):n?encodeURIComponent(e(n))+r+encodeURIComponent(e(t)):""},g7}var jae;function Ttt(){return jae||(jae=1,T1.decode=T1.parse=Att(),T1.encode=T1.stringify=Mtt()),T1}var Pae;function f7(){if(Pae)return Hm;Pae=1;var e=jtt(),t=Ptt();Hm.parse=x,Hm.resolve=S,Hm.resolveObject=w,Hm.format=z,Hm.Url=a;function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
|
|
10431
|
-
`," "],s=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(s),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=Ttt();function x(C,j,M){if(C&&t.isObject(C)&&C instanceof a)return C;var E=new a;return E.parse(C,j,M),E}a.prototype.parse=function(C,j,M){if(!t.isString(C))throw new TypeError("Parameter 'url' must be a string, not "+typeof C);var E=C.indexOf("?"),L=E!==-1&&E<C.indexOf("#")?"?":"#",D=C.split(L),R=/\\/g;D[0]=D[0].replace(R,"/"),C=D.join(L);var F=C;if(F=F.trim(),!M&&C.split("#").length===1){var N=i.exec(F);if(N)return this.path=F,this.href=F,this.pathname=N[1],N[2]?(this.search=N[2],j?this.query=k.parse(this.search.substr(1)):this.query=this.search.substr(1)):j&&(this.search="",this.query={}),this}var te=r.exec(F);if(te){te=te[0];var X=te.toLowerCase();this.protocol=X,F=F.substr(te.length)}if(M||te||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var ie=F.substr(0,2)==="//";ie&&!(te&&f[te])&&(F=F.substr(2),this.slashes=!0)}if(!f[te]&&(ie||te&&!y[te])){for(var ee=-1,ce=0;ce<u.length;ce++){var Z=F.indexOf(u[ce]);Z!==-1&&(ee===-1||Z<ee)&&(ee=Z)}var V,Y;ee===-1?Y=F.lastIndexOf("@"):Y=F.lastIndexOf("@",ee),Y!==-1&&(V=F.slice(0,Y),F=F.slice(Y+1),this.auth=decodeURIComponent(V)),ee=-1;for(var ce=0;ce<c.length;ce++){var Z=F.indexOf(c[ce]);Z!==-1&&(ee===-1||Z<ee)&&(ee=Z)}ee===-1&&(ee=F.length),this.host=F.slice(0,ee),F=F.slice(ee),this.parseHost(),this.hostname=this.hostname||"";var U=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!U)for(var _=this.hostname.split(/\./),ce=0,G=_.length;ce<G;ce++){var Q=_[ce];if(Q&&!Q.match(h)){for(var ne="",ue=0,ye=Q.length;ue<ye;ue++)Q.charCodeAt(ue)>127?ne+="x":ne+=Q[ue];if(!ne.match(h)){var Ce=_.slice(0,ce),B=_.slice(ce+1),K=Q.match(m);K&&(Ce.push(K[1]),B.unshift(K[2])),B.length&&(F="/"+B.join(".")+F),this.hostname=Ce.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=e.toASCII(this.hostname));var le=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+le,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!v[X])for(var ce=0,G=l.length;ce<G;ce++){var pe=l[ce];if(F.indexOf(pe)!==-1){var he=encodeURIComponent(pe);he===pe&&(he=escape(pe)),F=F.split(pe).join(he)}}var W=F.indexOf("#");W!==-1&&(this.hash=F.substr(W),F=F.slice(0,W));var ae=F.indexOf("?");if(ae!==-1?(this.search=F.substr(ae),this.query=F.substr(ae+1),j&&(this.query=k.parse(this.query)),F=F.slice(0,ae)):j&&(this.search="",this.query={}),F&&(this.pathname=F),y[X]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var le=this.pathname||"",se=this.search||"";this.path=le+se}return this.href=this.format(),this};function z(C){return t.isString(C)&&(C=x(C)),C instanceof a?C.format():a.prototype.format.call(C)}a.prototype.format=function(){var C=this.auth||"";C&&(C=encodeURIComponent(C),C=C.replace(/%3A/i,":"),C+="@");var j=this.protocol||"",M=this.pathname||"",E=this.hash||"",L=!1,D="";this.host?L=C+this.host:this.hostname&&(L=C+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(L+=":"+this.port)),this.query&&t.isObject(this.query)&&Object.keys(this.query).length&&(D=k.stringify(this.query));var R=this.search||D&&"?"+D||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||y[j])&&L!==!1?(L="//"+(L||""),M&&M.charAt(0)!=="/"&&(M="/"+M)):L||(L=""),E&&E.charAt(0)!=="#"&&(E="#"+E),R&&R.charAt(0)!=="?"&&(R="?"+R),M=M.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),R=R.replace("#","%23"),j+L+M+R+E};function S(C,j){return x(C,!1,!0).resolve(j)}a.prototype.resolve=function(C){return this.resolveObject(x(C,!1,!0)).format()};function w(C,j){return C?x(C,!1,!0).resolveObject(j):j}return a.prototype.resolveObject=function(C){if(t.isString(C)){var j=new a;j.parse(C,!1,!0),C=j}for(var M=new a,E=Object.keys(this),L=0;L<E.length;L++){var D=E[L];M[D]=this[D]}if(M.hash=C.hash,C.href==="")return M.href=M.format(),M;if(C.slashes&&!C.protocol){for(var R=Object.keys(C),F=0;F<R.length;F++){var N=R[F];N!=="protocol"&&(M[N]=C[N])}return y[M.protocol]&&M.hostname&&!M.pathname&&(M.path=M.pathname="/"),M.href=M.format(),M}if(C.protocol&&C.protocol!==M.protocol){if(!y[C.protocol]){for(var te=Object.keys(C),X=0;X<te.length;X++){var ie=te[X];M[ie]=C[ie]}return M.href=M.format(),M}if(M.protocol=C.protocol,!C.host&&!f[C.protocol]){for(var G=(C.pathname||"").split("/");G.length&&!(C.host=G.shift()););C.host||(C.host=""),C.hostname||(C.hostname=""),G[0]!==""&&G.unshift(""),G.length<2&&G.unshift(""),M.pathname=G.join("/")}else M.pathname=C.pathname;if(M.search=C.search,M.query=C.query,M.host=C.host||"",M.auth=C.auth,M.hostname=C.hostname||C.host,M.port=C.port,M.pathname||M.search){var ee=M.pathname||"",ce=M.search||"";M.path=ee+ce}return M.slashes=M.slashes||C.slashes,M.href=M.format(),M}var Z=M.pathname&&M.pathname.charAt(0)==="/",V=C.host||C.pathname&&C.pathname.charAt(0)==="/",Y=V||Z||M.host&&C.pathname,U=Y,_=M.pathname&&M.pathname.split("/")||[],G=C.pathname&&C.pathname.split("/")||[],Q=M.protocol&&!y[M.protocol];if(Q&&(M.hostname="",M.port=null,M.host&&(_[0]===""?_[0]=M.host:_.unshift(M.host)),M.host="",C.protocol&&(C.hostname=null,C.port=null,C.host&&(G[0]===""?G[0]=C.host:G.unshift(C.host)),C.host=null),Y=Y&&(G[0]===""||_[0]==="")),V)M.host=C.host||C.host===""?C.host:M.host,M.hostname=C.hostname||C.hostname===""?C.hostname:M.hostname,M.search=C.search,M.query=C.query,_=G;else if(G.length)_||(_=[]),_.pop(),_=_.concat(G),M.search=C.search,M.query=C.query;else if(!t.isNullOrUndefined(C.search)){if(Q){M.hostname=M.host=_.shift();var ne=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ne&&(M.auth=ne.shift(),M.host=M.hostname=ne.shift())}return M.search=C.search,M.query=C.query,(!t.isNull(M.pathname)||!t.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.href=M.format(),M}if(!_.length)return M.pathname=null,M.search?M.path="/"+M.search:M.path=null,M.href=M.format(),M;for(var ue=_.slice(-1)[0],ye=(M.host||C.host||_.length>1)&&(ue==="."||ue==="..")||ue==="",Ce=0,B=_.length;B>=0;B--)ue=_[B],ue==="."?_.splice(B,1):ue===".."?(_.splice(B,1),Ce++):Ce&&(_.splice(B,1),Ce--);if(!Y&&!U)for(;Ce--;Ce)_.unshift("..");Y&&_[0]!==""&&(!_[0]||_[0].charAt(0)!=="/")&&_.unshift(""),ye&&_.join("/").substr(-1)!=="/"&&_.push("");var K=_[0]===""||_[0]&&_[0].charAt(0)==="/";if(Q){M.hostname=M.host=K?"":_.length?_.shift():"";var ne=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ne&&(M.auth=ne.shift(),M.host=M.hostname=ne.shift())}return Y=Y||M.host&&_.length,Y&&!K&&_.unshift(""),_.length?M.pathname=_.join("/"):(M.pathname=null,M.path=null),(!t.isNull(M.pathname)||!t.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.auth=C.auth||M.auth,M.slashes=M.slashes||C.slashes,M.href=M.format(),M},a.prototype.parseHost=function(){var C=this.host,j=n.exec(C);j&&(j=j[0],j!==":"&&(this.port=j.substr(1)),C=C.substr(0,C.length-j.length)),C&&(this.hostname=C)},Hm}var v7,Aae;function Btt(){if(Aae)return v7;Aae=1;function e(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}return v7=e(),v7}var b7,Mae;function Ett(){if(Mae)return b7;Mae=1;var e=Btt();return b7=function(t,a){if(t){a.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})});return}else return a},b7}var k7,Tae;function e2(){if(Tae)return k7;Tae=1;function e(r){return r.replace(/\~/g,"~0").replace(/\//g,"~1")}function t(r){return r.replace(/\~1/g,"/").replace(/~0/g,"~")}function a(r,n,i){if(typeof r>"u")return!1;if(!n||typeof n!="string"||n==="#")return typeof i<"u"?i:r;if(n.indexOf("#")>=0){let s=n.split("#");if(s[0])return!1;n=s[1],n=decodeURIComponent(n.slice(1).split("+").join(" "))}n.startsWith("/")&&(n=n.slice(1));let o=n.split("/");for(let s=0;s<o.length;s++){o[s]=t(o[s]);let l=typeof i<"u"&&s==o.length-1,c=parseInt(o[s],10);if(!Array.isArray(r)||isNaN(c)||c.toString()!==o[s]?c=Array.isArray(r)&&o[s]==="-"?-2:-1:o[s]=s>0?o[s-1]:"",c!=-1||r&&r.hasOwnProperty(o[s]))if(c>=0)l&&(r[c]=i),r=r[c];else{if(c===-2)return l?(Array.isArray(r)&&r.push(i),i):void 0;l&&(r[o[s]]=i),r=r[o[s]]}else if(typeof i<"u"&&typeof r=="object"&&!Array.isArray(r))r[o[s]]=l?i:o[s+1]==="0"||o[s+1]==="-"?[]:{},r=r[o[s]];else return!1}return r}return k7={jptr:a,jpescape:e,jpunescape:t},k7}var y7,Bae;function x7(){if(Bae)return y7;Bae=1;function e(t,a){return a==="$ref"&&!!t&&typeof t[a]=="string"}return y7={isRef:e},y7}var w7,Eae;function t2(){if(Eae)return w7;Eae=1;function e(o){return o}function t(o){return JSON.parse(JSON.stringify(o))}function a(o){let s={};for(let l in o)o.hasOwnProperty(l)&&(s[l]=o[l]);return s}function r(o){let s=Array.isArray(o)?[]:{};for(let l in o)(o.hasOwnProperty(l)||Array.isArray(o))&&(s[l]=typeof o[l]=="object"?r(o[l]):o[l]);return s}function n(o){return Object.assign({},o)}function i(o,s){if(s||(s=new WeakMap),Object(o)!==o||o instanceof Function)return o;if(s.has(o))return s.get(o);try{var l=new o.constructor}catch{l=Object.create(Object.getPrototypeOf(o))}return s.set(o,l),Object.assign(l,...Object.keys(o).map(c=>({[c]:i(o[c],s)})))}return w7={nop:e,clone:t,shallowClone:a,deepClone:r,fastClone:n,circularClone:i},w7}var O7,Rae;function z7(){if(Rae)return O7;Rae=1;const e=e2().jpescape;function t(){return{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1}}function a(r,n,i){if(n||(n={depth:0}),n.depth||(n=Object.assign({},t(),n)),typeof r!="object")return;let o=n.path;for(let s in r){if(n.key=s,n.path=n.path+"/"+encodeURIComponent(e(s)),n.identityPath=n.seen.get(r[s]),n.identity=typeof n.identityPath<"u",r.hasOwnProperty(s)&&i(r,s,n),typeof r[s]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(r[s])&&r[s]!==null&&n.seen.set(r[s],n.path);let l={};l.parent=r,l.path=n.path,l.depth=n.depth?n.depth+1:1,l.pkey=s,l.payload=n.payload,l.seen=n.seen,l.identity=!1,l.identityDetection=n.identityDetection,a(r[s],l,i)}n.path=o}}return O7={recurse:a},O7}var S7,_ae;function Rtt(){if(_ae)return S7;_ae=1;const e=z7().recurse,t=t2().shallowClone,a=e2().jptr,r=x7().isRef;var n=function(o){return o&&o.verbose?{warn:function(){var s=Array.prototype.slice.call(arguments);console.warn.apply(console,s)}}:{warn:function(){}}};function i(o,s,l){l||(l={}),l.cache||(l.cache={}),l.state||(l.state={}),l.state.identityDetection=!0,l.depth=l.depth?l.depth+1:1;let c=l.depth>1?o:t(o),u={data:c},d=l.depth>1?s:t(s);l.master||(l.master=c);let h=n(l),m=1;for(;m>0;)m=0,e(u,l.state,function(v,f,y){if(r(v,f)){let k=v[f];if(m++,l.cache[k]){let x=l.cache[k];if(x.resolved)h.warn("Patching %s for %s",k,x.path),y.parent[y.pkey]=x.data,l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=k);else{if(k===x.path)throw new Error(`Tight circle at ${x.path}`);h.warn("Unresolved ref"),y.parent[y.pkey]=a(x.source,x.path),y.parent[y.pkey]===!1&&(y.parent[y.pkey]=a(x.source,x.key)),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[l.$ref]=k)}}else{let x={};x.path=y.path.split("/$ref")[0],x.key=k,h.warn("Dereffing %s at %s",k,x.path),x.source=d,x.data=a(x.source,x.key),x.data===!1&&(x.data=a(l.master,x.key),x.source=l.master),x.data===!1&&h.warn("Missing $ref target",x.key),l.cache[k]=x,x.data=y.parent[y.pkey]=i(a(x.source,x.key),x.source,l),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=k),x.resolved=!0}}});return u.data}return S7={dereference:i},S7}var C7,Lae;function _tt(){if(Lae)return C7;Lae=1,C7=i,i.default=i,i.stable=c,i.stableStringify=c;var e="[...]",t="[Circular]",a=[],r=[];function n(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(h,m,v,f){typeof f>"u"&&(f=n()),s(h,"",0,[],void 0,0,f);var y;try{r.length===0?y=JSON.stringify(h,m,v):y=JSON.stringify(h,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var k=a.pop();k.length===4?Object.defineProperty(k[0],k[1],k[3]):k[0][k[1]]=k[2]}}return y}function o(h,m,v,f){var y=Object.getOwnPropertyDescriptor(f,v);y.get!==void 0?y.configurable?(Object.defineProperty(f,v,{value:h}),a.push([f,v,m,y])):r.push([m,v,h]):(f[v]=h,a.push([f,v,m]))}function s(h,m,v,f,y,k,x){k+=1;var z;if(typeof h=="object"&&h!==null){for(z=0;z<f.length;z++)if(f[z]===h){o(t,h,m,y);return}if(typeof x.depthLimit<"u"&&k>x.depthLimit){o(e,h,m,y);return}if(typeof x.edgesLimit<"u"&&v+1>x.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(z=0;z<h.length;z++)s(h[z],z,z,f,h,k,x);else{var S=Object.keys(h);for(z=0;z<S.length;z++){var w=S[z];s(h[w],w,z,f,h,k,x)}}f.pop()}}function l(h,m){return h<m?-1:h>m?1:0}function c(h,m,v,f){typeof f>"u"&&(f=n());var y=u(h,"",0,[],void 0,0,f)||h,k;try{r.length===0?k=JSON.stringify(y,m,v):k=JSON.stringify(y,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var x=a.pop();x.length===4?Object.defineProperty(x[0],x[1],x[3]):x[0][x[1]]=x[2]}}return k}function u(h,m,v,f,y,k,x){k+=1;var z;if(typeof h=="object"&&h!==null){for(z=0;z<f.length;z++)if(f[z]===h){o(t,h,m,y);return}try{if(typeof h.toJSON=="function")return}catch{return}if(typeof x.depthLimit<"u"&&k>x.depthLimit){o(e,h,m,y);return}if(typeof x.edgesLimit<"u"&&v+1>x.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(z=0;z<h.length;z++)u(h[z],z,z,f,h,k,x);else{var S={},w=Object.keys(h).sort(l);for(z=0;z<w.length;z++){var C=w[z];u(h[C],C,z,f,h,k,x),S[C]=h[C]}if(typeof y<"u")a.push([y,m,h]),y[m]=S;else return S}f.pop()}}function d(h){return h=typeof h<"u"?h:function(m,v){return v},function(m,v){if(r.length>0)for(var f=0;f<r.length;f++){var y=r[f];if(y[1]===m&&y[0]===v){v=y[2],r.splice(f,1);break}}return h.call(this,m,v)}}return C7}var j7,Nae;function Iae(){if(Nae)return j7;Nae=1;var e={};const t=_tt(),a=e.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1B[31m",yellow:"\x1B[33;1m",green:"\x1B[32m",normal:"\x1B[0m"};function r(y,k,x){return x.indexOf(y)===k}function n(y){return new Set(y).size!==y.length}function i(y){return new Set(y).size<=1}function o(y,k){function x(z,S){return t.stringify(z)===t.stringify(Object.assign({},z,S))}return x(y,k)&&x(k,y)}function s(y){let k=[];for(let x of y)k.find(function(z,S,w){return o(z,x)})||k.push(x);return k}function l(y){return y.length===s(y).length}function c(y){return y.find(function(k,x,z){return y.indexOf(k)<x})}function u(y){let k=0,x;if(y.length===0)return k;for(let z=0;z<y.length;z++)x=y.charCodeAt(z),k=(k<<5)-k+x,k|=0;return k}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,function(y,k){return k.toUpperCase()})};const d=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],h=["items","minItems","maxItems","uniqueItems"],m=["get","post","put","delete","patch","head","options","trace"];function v(y){y=y.replace("[]","Array");let k=y.split("/");return k[0]=k[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),k.join("/")}function f(y){return v(y.split("/").join("_"))}return j7={colour:a,uniqueOnly:r,hasDuplicates:n,allSame:i,distinctArray:l,firstDupe:c,hash:u,parameterTypeProperties:d,arrayProperties:h,httpMethods:m,sanitise:v,sanitiseAll:f},j7}var P7,$ae;function Ltt(){if($ae)return P7;$ae=1;const e=kv,t=UQ(),a=f7(),r=kv,n=kv,i=e2().jptr,o=z7().recurse,s=t2().clone,l=Rtt().dereference,c=x7().isRef,u=Iae();function d(M){return[...new Set(M)]}function h(M,E,L,D,R){return new Promise(function(F,N){e.readFile(M,E,function(te,X){te?L.ignoreIOErrors&&R?(L.verbose&&console.warn("FAILED",D),L.externalRefs[D].failed=!0,F(R)):N(te):F(X)})})}function m(M,E,L,D,R,F){let N=F.externalRefs[L+D].paths[0],te=a.parse(R),X={},ie=1;for(;ie;)ie=0,o(M,{identityDetection:!0},function(ee,ce,Z){if(c(ee,ce)){if(ee[ce].startsWith("#")){if(!X[ee[ce]]&&!ee.$fixed){let V=s(i(E,ee[ce]));if(F.verbose>1&&console.warn((V===!1?u.colour.red:u.colour.green)+"Fragment resolution",ee[ce],u.colour.normal),V===!1){if(Z.parent[Z.pkey]={},F.fatal){let Y=new Error("Fragment $ref resolution failed "+ee[ce]);if(F.promise)F.promise.reject(Y);else throw Y}}else ie++,Z.parent[Z.pkey]=V,X[ee[ce]]=Z.path.replace("/%24ref","")}else if(!ee.$fixed){let V=(N+"/"+X[ee[ce]]).split("/#/").join("/");Z.parent[Z.pkey]={$ref:V,"x-miro":ee[ce],$fixed:!0},F.verbose>1&&console.warn("Replacing with",V),ie++}}else if(te.protocol){let V=a.resolve(R,ee[ce]).toString();F.verbose>1&&console.warn(u.colour.yellow+"Rewriting external url ref",ee[ce],"as",V,u.colour.normal),ee["x-miro"]=ee[ce],F.externalRefs[ee[ce]]&&(F.externalRefs[V]||(F.externalRefs[V]=F.externalRefs[ee[ce]]),F.externalRefs[V].failed=F.externalRefs[ee[ce]].failed),ee[ce]=V}else if(!ee["x-miro"]){let V=a.resolve(R,ee[ce]).toString(),Y=!1;F.externalRefs[ee[ce]]&&(Y=F.externalRefs[ee[ce]].failed),Y||(F.verbose>1&&console.warn(u.colour.yellow+"Rewriting external ref",ee[ce],"as",V,u.colour.normal),ee["x-miro"]=ee[ce],ee[ce]=V)}}});return o(M,{},function(ee,ce,Z){c(ee,ce)&&typeof ee.$fixed<"u"&&delete ee.$fixed}),F.verbose>1&&console.warn("Finished fragment resolution"),M}function v(M,E){if(!E.filters||!E.filters.length)return M;for(let L of E.filters)M=L(M,E);return M}function f(M,E){return M&&M.length>2?M:E&&E.length>2?E:"file:"}function y(M,E,L,D){var R=a.parse(L.source),F=L.source.split("\\").join("/").split("/");F.pop()||F.pop();let N="",te=E.split("#");te.length>1&&(N="#"+te[1],E=te[0]),F=F.join("/");let X=a.parse(E),ie=f(X.protocol,R.protocol),ee;if(ie==="file:"?ee=t.resolve(F?F+"/":"",E):ee=a.resolve(F?F+"/":"",E),L.cache[ee]){L.verbose&&console.warn("CACHED",ee,N);let ce=s(L.cache[ee]),Z=L.externalRef=ce;if(N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let V=new Error("Cached $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(V);else throw V}return Z=m(Z,ce,E,N,ee,L),Z=v(Z,L),D(s(Z),ee,L),Promise.resolve(Z)}if(L.verbose&&console.warn("GET",ee,N),L.handlers&&L.handlers[ie])return L.handlers[ie](F,E,N,L).then(function(ce){return L.externalRef=ce,ce=v(ce,L),L.cache[ee]=ce,D(ce,ee,L),ce}).catch(function(ce){throw L.verbose&&console.warn(ce),ce});if(ie&&ie.startsWith("http")){const ce=Object.assign({},L.fetchOptions,{agent:L.agent});return L.fetch(ee,ce).then(function(Z){if(Z.status!==200){if(L.ignoreIOErrors)return L.verbose&&console.warn("FAILED",E),L.externalRefs[E].failed=!0,'{"$ref":"'+E+'"}';throw new Error(`Received status code ${Z.status}: ${ee}`)}return Z.text()}).then(function(Z){try{let V=n.parse(Z,{schema:"core",prettyErrors:!0});if(Z=L.externalRef=V,L.cache[ee]=s(Z),N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let Y=new Error("Remote $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(Y);else throw Y}Z=m(Z,V,E,N,ee,L),Z=v(Z,L)}catch(V){if(L.verbose&&console.warn(V),L.promise&&L.fatal)L.promise.reject(V);else throw V}return D(Z,ee,L),Z}).catch(function(Z){if(L.verbose&&console.warn(Z),L.cache[ee]={},L.promise&&L.fatal)L.promise.reject(Z);else throw Z})}else{const ce='{"$ref":"'+E+'"}';return h(ee,L.encoding||"utf8",L,E,ce).then(function(Z){try{let V=n.parse(Z,{schema:"core",prettyErrors:!0});if(Z=L.externalRef=V,L.cache[ee]=s(Z),N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let Y=new Error("File $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(Y);else throw Y}Z=m(Z,V,E,N,ee,L),Z=v(Z,L)}catch(V){if(L.verbose&&console.warn(V),L.promise&&L.fatal)L.promise.reject(V);else throw V}return D(Z,ee,L),Z}).catch(function(Z){if(L.verbose&&console.warn(Z),L.promise&&L.fatal)L.promise.reject(Z);else throw Z})}}function k(M){return new Promise(function(E,L){function D(F,N,te){if(F[N]&&c(F[N],"$ref")){let X=F[N].$ref;if(!X.startsWith("#")){let ie="";if(!R[X]){let ee=Object.keys(R).find(function(ce,Z,V){return X.startsWith(ce+"/")});ee&&(M.verbose&&console.warn("Found potential subschema at",ee),ie="/"+(X.split("#")[1]||"").replace(ee.split("#")[1]||""),ie=ie.split("/undefined").join(""),X=ee)}if(R[X]||(R[X]={resolved:!1,paths:[],extras:{},description:F[N].description}),R[X].resolved){if(!R[X].failed)if(M.rewriteRefs){let ee=R[X].resolvedAt;M.verbose>1&&console.warn("Rewriting ref",X,ee),F[N]["x-miro"]=X,F[N].$ref=ee+ie}else F[N]=s(R[X].data)}else R[X].paths.push(te.path),R[X].extras[te.path]=ie}}}let R=M.externalRefs;if(M.resolver.depth>0&&M.source===M.resolver.base)return E(R);o(M.openapi.definitions,{identityDetection:!0,path:"#/definitions"},D),o(M.openapi.components,{identityDetection:!0,path:"#/components"},D),o(M.openapi,{identityDetection:!0},D),E(R)})}function x(M){return new Promise(function(E,L){k(M).then(function(R){for(let F in R)if(!R[F].resolved){let N=M.resolver.depth;N>0&&N++,M.resolver.actions[N].push(function(){return y(M.openapi,F,M,function(te,X,ie){if(!R[F].resolved){let Z={};Z.context=R[F],Z.$ref=F,Z.original=s(te),Z.updated=te,Z.source=X,ie.externals.push(Z),R[F].resolved=!0}let ee=Object.assign({},ie,{source:"",resolver:{actions:ie.resolver.actions,depth:ie.resolver.actions.length-1,base:ie.resolver.base}});ie.patch&&R[F].description&&!te.description&&typeof te=="object"&&(te.description=R[F].description),R[F].data=te;let ce=d(R[F].paths);ce=ce.sort(function(Z,V){const Y=Z.startsWith("#/components/")||Z.startsWith("#/definitions/"),U=V.startsWith("#/components/")||V.startsWith("#/definitions/");return Y&&!U?-1:U&&!Y?1:0});for(let Z of ce)if(R[F].resolvedAt&&Z!==R[F].resolvedAt&&Z.indexOf("x-ms-examples/")<0)ie.verbose>1&&console.warn("Creating pointer to data at",Z),i(ie.openapi,Z,{$ref:R[F].resolvedAt+R[F].extras[Z],"x-miro":F+R[F].extras[Z]});else{R[F].resolvedAt?ie.verbose>1&&console.warn("Avoiding circular reference"):(R[F].resolvedAt=Z,ie.verbose>1&&console.warn("Creating initial clone of data at",Z));let V=s(te);i(ie.openapi,Z,V)}ie.resolver.actions[ee.resolver.depth].length===0&&ie.resolver.actions[ee.resolver.depth].push(function(){return x(ee)})})})}}).catch(function(R){M.verbose&&console.warn(R),L(R)});let D={options:M};D.actions=M.resolver.actions[M.resolver.depth],E(D)})}const z=M=>M.reduce((E,L)=>E.then(D=>L().then(Array.prototype.concat.bind(D))),Promise.resolve([]));function S(M,E,L){M.resolver.actions.push([]),x(M).then(function(D){z(D.actions).then(function(){if(M.resolver.depth>=M.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),E(!0);M.resolver.depth++,M.resolver.actions[M.resolver.depth].length?setTimeout(function(){S(D.options,E,L)},0):(M.verbose>1&&console.warn(u.colour.yellow+"Finished external resolution!",u.colour.normal),M.resolveInternal&&(M.verbose>1&&console.warn(u.colour.yellow+"Starting internal resolution!",u.colour.normal),M.openapi=l(M.openapi,M.original,{verbose:M.verbose-1}),M.verbose>1&&console.warn(u.colour.yellow+"Finished internal resolution!",u.colour.normal)),o(M.openapi,{},function(R,F,N){c(R,F)&&(M.preserveMiro||delete R["x-miro"])}),E(M))}).catch(function(R){M.verbose&&console.warn(R),L(R)})}).catch(function(D){M.verbose&&console.warn(D),L(D)})}function w(M){if(M.cache||(M.cache={}),M.fetch||(M.fetch=r),M.source){let E=a.parse(M.source);(!E.protocol||E.protocol.length<=2)&&(M.source=t.resolve(M.source))}M.externals=[],M.externalRefs={},M.rewriteRefs=!0,M.resolver={},M.resolver.depth=0,M.resolver.base=M.source,M.resolver.actions=[[]]}function C(M){return w(M),new Promise(function(E,L){M.resolve?S(M,E,L):E(M)})}function j(M,E,L){return L||(L={}),L.openapi=M,L.source=E,L.resolve=!0,w(L),new Promise(function(D,R){S(L,D,R)})}return P7={optionalResolve:C,resolve:j},P7}var A7,Dae;function Ntt(){if(Dae)return A7;Dae=1;function e(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}function t(a,r,n,i){if(typeof n.depth>"u"&&(n=e()),a===null||typeof a>"u")return a;if(typeof a.$ref<"u"){let o={$ref:a.$ref};return n.allowRefSiblings&&a.description&&(o.description=a.description),i(o,r,n),o}if(n.combine&&(a.allOf&&Array.isArray(a.allOf)&&a.allOf.length===1&&(a=Object.assign({},a.allOf[0],a),delete a.allOf),a.anyOf&&Array.isArray(a.anyOf)&&a.anyOf.length===1&&(a=Object.assign({},a.anyOf[0],a),delete a.anyOf),a.oneOf&&Array.isArray(a.oneOf)&&a.oneOf.length===1&&(a=Object.assign({},a.oneOf[0],a),delete a.oneOf)),i(a,r,n),n.seen.has(a))return a;if(typeof a=="object"&&a!==null&&n.seen.set(a,!0),n.top=!1,n.depth++,typeof a.items<"u"&&(n.property="items",t(a.items,a,n,i)),a.additionalItems&&typeof a.additionalItems=="object"&&(n.property="additionalItems",t(a.additionalItems,a,n,i)),a.additionalProperties&&typeof a.additionalProperties=="object"&&(n.property="additionalProperties",t(a.additionalProperties,a,n,i)),a.properties)for(let o in a.properties){let s=a.properties[o];n.property="properties/"+o,t(s,a,n,i)}if(a.patternProperties)for(let o in a.patternProperties){let s=a.patternProperties[o];n.property="patternProperties/"+o,t(s,a,n,i)}if(a.allOf)for(let o in a.allOf){let s=a.allOf[o];n.property="allOf/"+o,t(s,a,n,i)}if(a.anyOf)for(let o in a.anyOf){let s=a.anyOf[o];n.property="anyOf/"+o,t(s,a,n,i)}if(a.oneOf)for(let o in a.oneOf){let s=a.oneOf[o];n.property="oneOf/"+o,t(s,a,n,i)}return a.not&&(n.property="not",t(a.not,a,n,i)),n.depth--,a}return A7={getDefaultState:e,walkSchema:t},A7}var Kae={},M7={exports:{}},Vae={},Hae;function Gae(){return Hae||(Hae=1,(function(e){e.fetch=n(globalThis.fetch)&&n(globalThis.ReadableStream),e.writableStream=n(globalThis.WritableStream),e.abortController=n(globalThis.AbortController);var t;function a(){if(t!==void 0)return t;if(globalThis.XMLHttpRequest){t=new globalThis.XMLHttpRequest;try{t.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function r(i){var o=a();if(!o)return!1;try{return o.responseType=i,o.responseType===i}catch{}return!1}e.arraybuffer=e.fetch||r("arraybuffer"),e.msstream=!e.fetch&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(a()?n(a().overrideMimeType):!1);function n(i){return typeof i=="function"}t=null})(Vae)),Vae}var a2={},T7={exports:{}},r2={exports:{}},Fae;function Itt(){if(Fae)return r2.exports;Fae=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(S,w,C){return Function.prototype.apply.call(S,w,C)},a;e&&typeof e.ownKeys=="function"?a=e.ownKeys:Object.getOwnPropertySymbols?a=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:a=function(S){return Object.getOwnPropertyNames(S)};function r(S){console&&console.warn&&console.warn(S)}var n=Number.isNaN||function(S){return S!==S};function i(){i.init.call(this)}r2.exports=i,r2.exports.once=k,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");o=S}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function l(S){return S._maxListeners===void 0?i.defaultMaxListeners:S._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(S){for(var w=[],C=1;C<arguments.length;C++)w.push(arguments[C]);var j=S==="error",M=this._events;if(M!==void 0)j=j&&M.error===void 0;else if(!j)return!1;if(j){var E;if(w.length>0&&(E=w[0]),E instanceof Error)throw E;var L=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw L.context=E,L}var D=M[S];if(D===void 0)return!1;if(typeof D=="function")t(D,this,w);else for(var R=D.length,F=v(D,R),C=0;C<R;++C)t(F[C],this,w);return!0};function c(S,w,C,j){var M,E,L;if(s(C),E=S._events,E===void 0?(E=S._events=Object.create(null),S._eventsCount=0):(E.newListener!==void 0&&(S.emit("newListener",w,C.listener?C.listener:C),E=S._events),L=E[w]),L===void 0)L=E[w]=C,++S._eventsCount;else if(typeof L=="function"?L=E[w]=j?[C,L]:[L,C]:j?L.unshift(C):L.push(C),M=l(S),M>0&&L.length>M&&!L.warned){L.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=S,D.type=w,D.count=L.length,r(D)}return S}i.prototype.addListener=function(S,w){return c(this,S,w,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(S,w){return c(this,S,w,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(S,w,C){var j={fired:!1,wrapFn:void 0,target:S,type:w,listener:C},M=u.bind(j);return M.listener=C,j.wrapFn=M,M}i.prototype.once=function(S,w){return s(w),this.on(S,d(this,S,w)),this},i.prototype.prependOnceListener=function(S,w){return s(w),this.prependListener(S,d(this,S,w)),this},i.prototype.removeListener=function(S,w){var C,j,M,E,L;if(s(w),j=this._events,j===void 0)return this;if(C=j[S],C===void 0)return this;if(C===w||C.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete j[S],j.removeListener&&this.emit("removeListener",S,C.listener||w));else if(typeof C!="function"){for(M=-1,E=C.length-1;E>=0;E--)if(C[E]===w||C[E].listener===w){L=C[E].listener,M=E;break}if(M<0)return this;M===0?C.shift():f(C,M),C.length===1&&(j[S]=C[0]),j.removeListener!==void 0&&this.emit("removeListener",S,L||w)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(S){var w,C,j;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[S]),this;if(arguments.length===0){var M=Object.keys(C),E;for(j=0;j<M.length;++j)E=M[j],E!=="removeListener"&&this.removeAllListeners(E);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(w=C[S],typeof w=="function")this.removeListener(S,w);else if(w!==void 0)for(j=w.length-1;j>=0;j--)this.removeListener(S,w[j]);return this};function h(S,w,C){var j=S._events;if(j===void 0)return[];var M=j[w];return M===void 0?[]:typeof M=="function"?C?[M.listener||M]:[M]:C?y(M):v(M,M.length)}i.prototype.listeners=function(S){return h(this,S,!0)},i.prototype.rawListeners=function(S){return h(this,S,!1)},i.listenerCount=function(S,w){return typeof S.listenerCount=="function"?S.listenerCount(w):m.call(S,w)},i.prototype.listenerCount=m;function m(S){var w=this._events;if(w!==void 0){var C=w[S];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function v(S,w){for(var C=new Array(w),j=0;j<w;++j)C[j]=S[j];return C}function f(S,w){for(;w+1<S.length;w++)S[w]=S[w+1];S.pop()}function y(S){for(var w=new Array(S.length),C=0;C<w.length;++C)w[C]=S[C].listener||S[C];return w}function k(S,w){return new Promise(function(C,j){function M(L){S.removeListener(w,E),j(L)}function E(){typeof S.removeListener=="function"&&S.removeListener("error",M),C([].slice.call(arguments))}z(S,w,E,{once:!0}),w!=="error"&&x(S,M,{once:!0})})}function x(S,w,C){typeof S.on=="function"&&z(S,"error",w,C)}function z(S,w,C,j){if(typeof S.on=="function")j.once?S.once(w,C):S.on(w,C);else if(typeof S.addEventListener=="function")S.addEventListener(w,function M(E){j.once&&S.removeEventListener(w,M),C(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return r2.exports}var qae,Qae;function Uae(){return Qae||(Qae=1,qae=Itt().EventEmitter),qae}var Wae={},B1={},Zae;function $tt(){if(Zae)return B1;Zae=1,B1.byteLength=s,B1.toByteArray=c,B1.fromByteArray=h;for(var e=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,i=r.length;n<i;++n)e[n]=r[n],t[r.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=m.indexOf("=");f===-1&&(f=v);var y=f===v?0:4-f%4;return[f,y]}function s(m){var v=o(m),f=v[0],y=v[1];return(f+y)*3/4-y}function l(m,v,f){return(v+f)*3/4-f}function c(m){var v,f=o(m),y=f[0],k=f[1],x=new a(l(m,y,k)),z=0,S=k>0?y-4:y,w;for(w=0;w<S;w+=4)v=t[m.charCodeAt(w)]<<18|t[m.charCodeAt(w+1)]<<12|t[m.charCodeAt(w+2)]<<6|t[m.charCodeAt(w+3)],x[z++]=v>>16&255,x[z++]=v>>8&255,x[z++]=v&255;return k===2&&(v=t[m.charCodeAt(w)]<<2|t[m.charCodeAt(w+1)]>>4,x[z++]=v&255),k===1&&(v=t[m.charCodeAt(w)]<<10|t[m.charCodeAt(w+1)]<<4|t[m.charCodeAt(w+2)]>>2,x[z++]=v>>8&255,x[z++]=v&255),x}function u(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function d(m,v,f){for(var y,k=[],x=v;x<f;x+=3)y=(m[x]<<16&16711680)+(m[x+1]<<8&65280)+(m[x+2]&255),k.push(u(y));return k.join("")}function h(m){for(var v,f=m.length,y=f%3,k=[],x=16383,z=0,S=f-y;z<S;z+=x)k.push(d(m,z,z+x>S?S:z+x));return y===1?(v=m[f-1],k.push(e[v>>2]+e[v<<4&63]+"==")):y===2&&(v=(m[f-2]<<8)+m[f-1],k.push(e[v>>10]+e[v>>4&63]+e[v<<2&63]+"=")),k.join("")}return B1}var B7={},Jae;function Dtt(){return Jae||(Jae=1,B7.read=function(e,t,a,r,n){var i,o,s=n*8-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=a?n-1:0,h=a?-1:1,m=e[t+d];for(d+=h,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=i*256+e[t+d],d+=h,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(m?-1:1)*o*Math.pow(2,i-r)},B7.write=function(e,t,a,r,n,i){var o,s,l,c=i*8-n-1,u=(1<<c)-1,d=u>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,v=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o=o+d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[a+m]=s&255,m+=v,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[a+m]=o&255,m+=v,o/=256,c-=8);e[a+m-v]|=f*128}),B7}var Yae;function E1(){return Yae||(Yae=1,(function(e){const t=$tt(),a=Dtt(),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 T=new Uint8Array(1),J={foo:function(){return 42}};return Object.setPrototypeOf(J,Uint8Array.prototype),Object.setPrototypeOf(T,J),T.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(T){if(T>n)throw new RangeError('The value "'+T+'" is invalid for option "size"');const J=new Uint8Array(T);return Object.setPrototypeOf(J,s.prototype),J}function s(T,J,oe){if(typeof T=="number"){if(typeof J=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(T)}return l(T,J,oe)}s.poolSize=8192;function l(T,J,oe){if(typeof T=="string")return h(T,J);if(ArrayBuffer.isView(T))return v(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(fe(T,ArrayBuffer)||T&&fe(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(T,SharedArrayBuffer)||T&&fe(T.buffer,SharedArrayBuffer)))return f(T,J,oe);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Se=T.valueOf&&T.valueOf();if(Se!=null&&Se!==T)return s.from(Se,J,oe);const Me=y(T);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return s.from(T[Symbol.toPrimitive]("string"),J,oe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}s.from=function(T,J,oe){return l(T,J,oe)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function u(T,J,oe){return c(T),T<=0?o(T):J!==void 0?typeof oe=="string"?o(T).fill(J,oe):o(T).fill(J):o(T)}s.alloc=function(T,J,oe){return u(T,J,oe)};function d(T){return c(T),o(T<0?0:k(T)|0)}s.allocUnsafe=function(T){return d(T)},s.allocUnsafeSlow=function(T){return d(T)};function h(T,J){if((typeof J!="string"||J==="")&&(J="utf8"),!s.isEncoding(J))throw new TypeError("Unknown encoding: "+J);const oe=z(T,J)|0;let Se=o(oe);const Me=Se.write(T,J);return Me!==oe&&(Se=Se.slice(0,Me)),Se}function m(T){const J=T.length<0?0:k(T.length)|0,oe=o(J);for(let Se=0;Se<J;Se+=1)oe[Se]=T[Se]&255;return oe}function v(T){if(fe(T,Uint8Array)){const J=new Uint8Array(T);return f(J.buffer,J.byteOffset,J.byteLength)}return m(T)}function f(T,J,oe){if(J<0||T.byteLength<J)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<J+(oe||0))throw new RangeError('"length" is outside of buffer bounds');let Se;return J===void 0&&oe===void 0?Se=new Uint8Array(T):oe===void 0?Se=new Uint8Array(T,J):Se=new Uint8Array(T,J,oe),Object.setPrototypeOf(Se,s.prototype),Se}function y(T){if(s.isBuffer(T)){const J=k(T.length)|0,oe=o(J);return oe.length===0||T.copy(oe,0,0,J),oe}if(T.length!==void 0)return typeof T.length!="number"||ke(T.length)?o(0):m(T);if(T.type==="Buffer"&&Array.isArray(T.data))return m(T.data)}function k(T){if(T>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return T|0}function x(T){return+T!=T&&(T=0),s.alloc(+T)}s.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==s.prototype},s.compare=function(T,J){if(fe(T,Uint8Array)&&(T=s.from(T,T.offset,T.byteLength)),fe(J,Uint8Array)&&(J=s.from(J,J.offset,J.byteLength)),!s.isBuffer(T)||!s.isBuffer(J))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===J)return 0;let oe=T.length,Se=J.length;for(let Me=0,Te=Math.min(oe,Se);Me<Te;++Me)if(T[Me]!==J[Me]){oe=T[Me],Se=J[Me];break}return oe<Se?-1:Se<oe?1:0},s.isEncoding=function(T){switch(String(T).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(T,J){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return s.alloc(0);let oe;if(J===void 0)for(J=0,oe=0;oe<T.length;++oe)J+=T[oe].length;const Se=s.allocUnsafe(J);let Me=0;for(oe=0;oe<T.length;++oe){let Te=T[oe];if(fe(Te,Uint8Array))Me+Te.length>Se.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Se,Me)):Uint8Array.prototype.set.call(Se,Te,Me);else if(s.isBuffer(Te))Te.copy(Se,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Se};function z(T,J){if(s.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||fe(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);const oe=T.length,Se=arguments.length>2&&arguments[2]===!0;if(!Se&&oe===0)return 0;let Me=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":return W(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return ve(T).length;default:if(Me)return Se?-1:W(T).length;J=(""+J).toLowerCase(),Me=!0}}s.byteLength=z;function S(T,J,oe){let Se=!1;if((J===void 0||J<0)&&(J=0),J>this.length||((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)||(oe>>>=0,J>>>=0,oe<=J))return"";for(T||(T="utf8");;)switch(T){case"hex":return ce(this,J,oe);case"utf8":case"utf-8":return N(this,J,oe);case"ascii":return ie(this,J,oe);case"latin1":case"binary":return ee(this,J,oe);case"base64":return F(this,J,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,J,oe);default:if(Se)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),Se=!0}}s.prototype._isBuffer=!0;function w(T,J,oe){const Se=T[J];T[J]=T[oe],T[oe]=Se}s.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let J=0;J<T;J+=2)w(this,J,J+1);return this},s.prototype.swap32=function(){const T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let J=0;J<T;J+=4)w(this,J,J+3),w(this,J+1,J+2);return this},s.prototype.swap64=function(){const T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let J=0;J<T;J+=8)w(this,J,J+7),w(this,J+1,J+6),w(this,J+2,J+5),w(this,J+3,J+4);return this},s.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?N(this,0,T):S.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(T){if(!s.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:s.compare(this,T)===0},s.prototype.inspect=function(){let T="";const J=e.INSPECT_MAX_BYTES;return T=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J&&(T+=" ... "),"<Buffer "+T+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(T,J,oe,Se,Me){if(fe(T,Uint8Array)&&(T=s.from(T,T.offset,T.byteLength)),!s.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(J===void 0&&(J=0),oe===void 0&&(oe=T?T.length:0),Se===void 0&&(Se=0),Me===void 0&&(Me=this.length),J<0||oe>T.length||Se<0||Me>this.length)throw new RangeError("out of range index");if(Se>=Me&&J>=oe)return 0;if(Se>=Me)return-1;if(J>=oe)return 1;if(J>>>=0,oe>>>=0,Se>>>=0,Me>>>=0,this===T)return 0;let Te=Me-Se,Ne=oe-J;const at=Math.min(Te,Ne),dt=this.slice(Se,Me),gt=T.slice(J,oe);for(let ct=0;ct<at;++ct)if(dt[ct]!==gt[ct]){Te=dt[ct],Ne=gt[ct];break}return Te<Ne?-1:Ne<Te?1:0};function C(T,J,oe,Se,Me){if(T.length===0)return-1;if(typeof oe=="string"?(Se=oe,oe=0):oe>2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,ke(oe)&&(oe=Me?0:T.length-1),oe<0&&(oe=T.length+oe),oe>=T.length){if(Me)return-1;oe=T.length-1}else if(oe<0)if(Me)oe=0;else return-1;if(typeof J=="string"&&(J=s.from(J,Se)),s.isBuffer(J))return J.length===0?-1:j(T,J,oe,Se,Me);if(typeof J=="number")return J=J&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(T,J,oe):Uint8Array.prototype.lastIndexOf.call(T,J,oe):j(T,[J],oe,Se,Me);throw new TypeError("val must be string, number or Buffer")}function j(T,J,oe,Se,Me){let Te=1,Ne=T.length,at=J.length;if(Se!==void 0&&(Se=String(Se).toLowerCase(),Se==="ucs2"||Se==="ucs-2"||Se==="utf16le"||Se==="utf-16le")){if(T.length<2||J.length<2)return-1;Te=2,Ne/=2,at/=2,oe/=2}function dt(ct,Ot){return Te===1?ct[Ot]:ct.readUInt16BE(Ot*Te)}let gt;if(Me){let ct=-1;for(gt=oe;gt<Ne;gt++)if(dt(T,gt)===dt(J,ct===-1?0:gt-ct)){if(ct===-1&&(ct=gt),gt-ct+1===at)return ct*Te}else ct!==-1&&(gt-=gt-ct),ct=-1}else for(oe+at>Ne&&(oe=Ne-at),gt=oe;gt>=0;gt--){let ct=!0;for(let Ot=0;Ot<at;Ot++)if(dt(T,gt+Ot)!==dt(J,Ot)){ct=!1;break}if(ct)return gt}return-1}s.prototype.includes=function(T,J,oe){return this.indexOf(T,J,oe)!==-1},s.prototype.indexOf=function(T,J,oe){return C(this,T,J,oe,!0)},s.prototype.lastIndexOf=function(T,J,oe){return C(this,T,J,oe,!1)};function M(T,J,oe,Se){oe=Number(oe)||0;const Me=T.length-oe;Se?(Se=Number(Se),Se>Me&&(Se=Me)):Se=Me;const Te=J.length;Se>Te/2&&(Se=Te/2);let Ne;for(Ne=0;Ne<Se;++Ne){const at=parseInt(J.substr(Ne*2,2),16);if(ke(at))return Ne;T[oe+Ne]=at}return Ne}function E(T,J,oe,Se){return ge(W(J,T.length-oe),T,oe,Se)}function L(T,J,oe,Se){return ge(ae(J),T,oe,Se)}function D(T,J,oe,Se){return ge(ve(J),T,oe,Se)}function R(T,J,oe,Se){return ge(se(J,T.length-oe),T,oe,Se)}s.prototype.write=function(T,J,oe,Se){if(J===void 0)Se="utf8",oe=this.length,J=0;else if(oe===void 0&&typeof J=="string")Se=J,oe=this.length,J=0;else if(isFinite(J))J=J>>>0,isFinite(oe)?(oe=oe>>>0,Se===void 0&&(Se="utf8")):(Se=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-J;if((oe===void 0||oe>Me)&&(oe=Me),T.length>0&&(oe<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");Se||(Se="utf8");let Te=!1;for(;;)switch(Se){case"hex":return M(this,T,J,oe);case"utf8":case"utf-8":return E(this,T,J,oe);case"ascii":case"latin1":case"binary":return L(this,T,J,oe);case"base64":return D(this,T,J,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,T,J,oe);default:if(Te)throw new TypeError("Unknown encoding: "+Se);Se=(""+Se).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(T,J,oe){return J===0&&oe===T.length?t.fromByteArray(T):t.fromByteArray(T.slice(J,oe))}function N(T,J,oe){oe=Math.min(T.length,oe);const Se=[];let Me=J;for(;Me<oe;){const Te=T[Me];let Ne=null,at=Te>239?4:Te>223?3:Te>191?2:1;if(Me+at<=oe){let dt,gt,ct,Ot;switch(at){case 1:Te<128&&(Ne=Te);break;case 2:dt=T[Me+1],(dt&192)===128&&(Ot=(Te&31)<<6|dt&63,Ot>127&&(Ne=Ot));break;case 3:dt=T[Me+1],gt=T[Me+2],(dt&192)===128&&(gt&192)===128&&(Ot=(Te&15)<<12|(dt&63)<<6|gt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(Ne=Ot));break;case 4:dt=T[Me+1],gt=T[Me+2],ct=T[Me+3],(dt&192)===128&&(gt&192)===128&&(ct&192)===128&&(Ot=(Te&15)<<18|(dt&63)<<12|(gt&63)<<6|ct&63,Ot>65535&&Ot<1114112&&(Ne=Ot))}}Ne===null?(Ne=65533,at=1):Ne>65535&&(Ne-=65536,Se.push(Ne>>>10&1023|55296),Ne=56320|Ne&1023),Se.push(Ne),Me+=at}return X(Se)}const te=4096;function X(T){const J=T.length;if(J<=te)return String.fromCharCode.apply(String,T);let oe="",Se=0;for(;Se<J;)oe+=String.fromCharCode.apply(String,T.slice(Se,Se+=te));return oe}function ie(T,J,oe){let Se="";oe=Math.min(T.length,oe);for(let Me=J;Me<oe;++Me)Se+=String.fromCharCode(T[Me]&127);return Se}function ee(T,J,oe){let Se="";oe=Math.min(T.length,oe);for(let Me=J;Me<oe;++Me)Se+=String.fromCharCode(T[Me]);return Se}function ce(T,J,oe){const Se=T.length;(!J||J<0)&&(J=0),(!oe||oe<0||oe>Se)&&(oe=Se);let Me="";for(let Te=J;Te<oe;++Te)Me+=ze[T[Te]];return Me}function Z(T,J,oe){const Se=T.slice(J,oe);let Me="";for(let Te=0;Te<Se.length-1;Te+=2)Me+=String.fromCharCode(Se[Te]+Se[Te+1]*256);return Me}s.prototype.slice=function(T,J){const oe=this.length;T=~~T,J=J===void 0?oe:~~J,T<0?(T+=oe,T<0&&(T=0)):T>oe&&(T=oe),J<0?(J+=oe,J<0&&(J=0)):J>oe&&(J=oe),J<T&&(J=T);const Se=this.subarray(T,J);return Object.setPrototypeOf(Se,s.prototype),Se};function V(T,J,oe){if(T%1!==0||T<0)throw new RangeError("offset is not uint");if(T+J>oe)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T],Me=1,Te=0;for(;++Te<J&&(Me*=256);)Se+=this[T+Te]*Me;return Se},s.prototype.readUintBE=s.prototype.readUIntBE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T+--J],Me=1;for(;J>0&&(Me*=256);)Se+=this[T+--J]*Me;return Se},s.prototype.readUint8=s.prototype.readUInt8=function(T,J){return T=T>>>0,J||V(T,1,this.length),this[T]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(T,J){return T=T>>>0,J||V(T,2,this.length),this[T]|this[T+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(T,J){return T=T>>>0,J||V(T,2,this.length),this[T]<<8|this[T+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(T,J){return T=T>>>0,J||V(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},s.prototype.readBigUInt64LE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=J+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,Me=this[++T]+this[++T]*2**8+this[++T]*2**16+oe*2**24;return BigInt(Se)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=J*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],Me=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+oe;return(BigInt(Se)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T],Me=1,Te=0;for(;++Te<J&&(Me*=256);)Se+=this[T+Te]*Me;return Me*=128,Se>=Me&&(Se-=Math.pow(2,8*J)),Se},s.prototype.readIntBE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=J,Me=1,Te=this[T+--Se];for(;Se>0&&(Me*=256);)Te+=this[T+--Se]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*J)),Te},s.prototype.readInt8=function(T,J){return T=T>>>0,J||V(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},s.prototype.readInt16LE=function(T,J){T=T>>>0,J||V(T,2,this.length);const oe=this[T]|this[T+1]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt16BE=function(T,J){T=T>>>0,J||V(T,2,this.length);const oe=this[T+1]|this[T]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt32LE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},s.prototype.readInt32BE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},s.prototype.readBigInt64LE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(oe<<24);return(BigInt(Se)<<BigInt(32))+BigInt(J+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),s.prototype.readBigInt64BE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=(J<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(Se)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+oe)}),s.prototype.readFloatLE=function(T,J){return T=T>>>0,J||V(T,4,this.length),a.read(this,T,!0,23,4)},s.prototype.readFloatBE=function(T,J){return T=T>>>0,J||V(T,4,this.length),a.read(this,T,!1,23,4)},s.prototype.readDoubleLE=function(T,J){return T=T>>>0,J||V(T,8,this.length),a.read(this,T,!0,52,8)},s.prototype.readDoubleBE=function(T,J){return T=T>>>0,J||V(T,8,this.length),a.read(this,T,!1,52,8)};function Y(T,J,oe,Se,Me,Te){if(!s.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>Me||J<Te)throw new RangeError('"value" argument is out of bounds');if(oe+Se>T.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(T,J,oe,Se){if(T=+T,J=J>>>0,oe=oe>>>0,!Se){const Ne=Math.pow(2,8*oe)-1;Y(this,T,J,oe,Ne,0)}let Me=1,Te=0;for(this[J]=T&255;++Te<oe&&(Me*=256);)this[J+Te]=T/Me&255;return J+oe},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(T,J,oe,Se){if(T=+T,J=J>>>0,oe=oe>>>0,!Se){const Ne=Math.pow(2,8*oe)-1;Y(this,T,J,oe,Ne,0)}let Me=oe-1,Te=1;for(this[J+Me]=T&255;--Me>=0&&(Te*=256);)this[J+Me]=T/Te&255;return J+oe},s.prototype.writeUint8=s.prototype.writeUInt8=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,1,255,0),this[J]=T&255,J+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,65535,0),this[J]=T&255,this[J+1]=T>>>8,J+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,65535,0),this[J]=T>>>8,this[J+1]=T&255,J+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,4294967295,0),this[J+3]=T>>>24,this[J+2]=T>>>16,this[J+1]=T>>>8,this[J]=T&255,J+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,4294967295,0),this[J]=T>>>24,this[J+1]=T>>>16,this[J+2]=T>>>8,this[J+3]=T&255,J+4};function U(T,J,oe,Se,Me){K(J,Se,Me,T,oe,7);let Te=Number(J&BigInt(4294967295));T[oe++]=Te,Te=Te>>8,T[oe++]=Te,Te=Te>>8,T[oe++]=Te,Te=Te>>8,T[oe++]=Te;let Ne=Number(J>>BigInt(32)&BigInt(4294967295));return T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,oe}function _(T,J,oe,Se,Me){K(J,Se,Me,T,oe,7);let Te=Number(J&BigInt(4294967295));T[oe+7]=Te,Te=Te>>8,T[oe+6]=Te,Te=Te>>8,T[oe+5]=Te,Te=Te>>8,T[oe+4]=Te;let Ne=Number(J>>BigInt(32)&BigInt(4294967295));return T[oe+3]=Ne,Ne=Ne>>8,T[oe+2]=Ne,Ne=Ne>>8,T[oe+1]=Ne,Ne=Ne>>8,T[oe]=Ne,oe+8}s.prototype.writeBigUInt64LE=Be(function(T,J=0){return U(this,T,J,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Be(function(T,J=0){return _(this,T,J,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(T,J,oe,Se){if(T=+T,J=J>>>0,!Se){const at=Math.pow(2,8*oe-1);Y(this,T,J,oe,at-1,-at)}let Me=0,Te=1,Ne=0;for(this[J]=T&255;++Me<oe&&(Te*=256);)T<0&&Ne===0&&this[J+Me-1]!==0&&(Ne=1),this[J+Me]=(T/Te>>0)-Ne&255;return J+oe},s.prototype.writeIntBE=function(T,J,oe,Se){if(T=+T,J=J>>>0,!Se){const at=Math.pow(2,8*oe-1);Y(this,T,J,oe,at-1,-at)}let Me=oe-1,Te=1,Ne=0;for(this[J+Me]=T&255;--Me>=0&&(Te*=256);)T<0&&Ne===0&&this[J+Me+1]!==0&&(Ne=1),this[J+Me]=(T/Te>>0)-Ne&255;return J+oe},s.prototype.writeInt8=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,1,127,-128),T<0&&(T=255+T+1),this[J]=T&255,J+1},s.prototype.writeInt16LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,32767,-32768),this[J]=T&255,this[J+1]=T>>>8,J+2},s.prototype.writeInt16BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,32767,-32768),this[J]=T>>>8,this[J+1]=T&255,J+2},s.prototype.writeInt32LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,2147483647,-2147483648),this[J]=T&255,this[J+1]=T>>>8,this[J+2]=T>>>16,this[J+3]=T>>>24,J+4},s.prototype.writeInt32BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[J]=T>>>24,this[J+1]=T>>>16,this[J+2]=T>>>8,this[J+3]=T&255,J+4},s.prototype.writeBigInt64LE=Be(function(T,J=0){return U(this,T,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Be(function(T,J=0){return _(this,T,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(T,J,oe,Se,Me,Te){if(oe+Se>T.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function Q(T,J,oe,Se,Me){return J=+J,oe=oe>>>0,Me||G(T,J,oe,4),a.write(T,J,oe,Se,23,4),oe+4}s.prototype.writeFloatLE=function(T,J,oe){return Q(this,T,J,!0,oe)},s.prototype.writeFloatBE=function(T,J,oe){return Q(this,T,J,!1,oe)};function ne(T,J,oe,Se,Me){return J=+J,oe=oe>>>0,Me||G(T,J,oe,8),a.write(T,J,oe,Se,52,8),oe+8}s.prototype.writeDoubleLE=function(T,J,oe){return ne(this,T,J,!0,oe)},s.prototype.writeDoubleBE=function(T,J,oe){return ne(this,T,J,!1,oe)},s.prototype.copy=function(T,J,oe,Se){if(!s.isBuffer(T))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!Se&&Se!==0&&(Se=this.length),J>=T.length&&(J=T.length),J||(J=0),Se>0&&Se<oe&&(Se=oe),Se===oe||T.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("sourceEnd out of bounds");Se>this.length&&(Se=this.length),T.length-J<Se-oe&&(Se=T.length-J+oe);const Me=Se-oe;return this===T&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(J,oe,Se):Uint8Array.prototype.set.call(T,this.subarray(oe,Se),J),Me},s.prototype.fill=function(T,J,oe,Se){if(typeof T=="string"){if(typeof J=="string"?(Se=J,J=0,oe=this.length):typeof oe=="string"&&(Se=oe,oe=this.length),Se!==void 0&&typeof Se!="string")throw new TypeError("encoding must be a string");if(typeof Se=="string"&&!s.isEncoding(Se))throw new TypeError("Unknown encoding: "+Se);if(T.length===1){const Te=T.charCodeAt(0);(Se==="utf8"&&Te<128||Se==="latin1")&&(T=Te)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(J<0||this.length<J||this.length<oe)throw new RangeError("Out of range index");if(oe<=J)return this;J=J>>>0,oe=oe===void 0?this.length:oe>>>0,T||(T=0);let Me;if(typeof T=="number")for(Me=J;Me<oe;++Me)this[Me]=T;else{const Te=s.isBuffer(T)?T:s.from(T,Se),Ne=Te.length;if(Ne===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(Me=0;Me<oe-J;++Me)this[Me+J]=Te[Me%Ne]}return this};const ue={};function ye(T,J,oe){ue[T]=class extends oe{constructor(){super(),Object.defineProperty(this,"message",{value:J.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${T}]`,delete this.name}get code(){return T}set code(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}toString(){return`${this.name} [${T}]: ${this.message}`}}}ye("ERR_BUFFER_OUT_OF_BOUNDS",function(T){return T?`${T} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ye("ERR_INVALID_ARG_TYPE",function(T,J){return`The "${T}" argument must be of type number. Received type ${typeof J}`},TypeError),ye("ERR_OUT_OF_RANGE",function(T,J,oe){let Se=`The value of "${T}" is out of range.`,Me=oe;return Number.isInteger(oe)&&Math.abs(oe)>2**32?Me=Ce(String(oe)):typeof oe=="bigint"&&(Me=String(oe),(oe>BigInt(2)**BigInt(32)||oe<-(BigInt(2)**BigInt(32)))&&(Me=Ce(Me)),Me+="n"),Se+=` It must be ${J}. Received ${Me}`,Se},RangeError);function Ce(T){let J="",oe=T.length;const Se=T[0]==="-"?1:0;for(;oe>=Se+4;oe-=3)J=`_${T.slice(oe-3,oe)}${J}`;return`${T.slice(0,oe)}${J}`}function B(T,J,oe){le(J,"offset"),(T[J]===void 0||T[J+oe]===void 0)&&q(J,T.length-(oe+1))}function K(T,J,oe,Se,Me,Te){if(T>oe||T<J){const Ne=typeof J=="bigint"?"n":"";let at;throw J===0||J===BigInt(0)?at=`>= 0${Ne} and < 2${Ne} ** ${(Te+1)*8}${Ne}`:at=`>= -(2${Ne} ** ${(Te+1)*8-1}${Ne}) and < 2 ** ${(Te+1)*8-1}${Ne}`,new ue.ERR_OUT_OF_RANGE("value",at,T)}B(Se,Me,Te)}function le(T,J){if(typeof T!="number")throw new ue.ERR_INVALID_ARG_TYPE(J,"number",T)}function q(T,J,oe){throw Math.floor(T)!==T?(le(T,oe),new ue.ERR_OUT_OF_RANGE("offset","an integer",T)):J<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${J}`,T)}const pe=/[^+/0-9A-Za-z-_]/g;function he(T){if(T=T.split("=")[0],T=T.trim().replace(pe,""),T.length<2)return"";for(;T.length%4!==0;)T=T+"=";return T}function W(T,J){J=J||1/0;let oe;const Se=T.length;let Me=null;const Te=[];for(let Ne=0;Ne<Se;++Ne){if(oe=T.charCodeAt(Ne),oe>55295&&oe<57344){if(!Me){if(oe>56319){(J-=3)>-1&&Te.push(239,191,189);continue}else if(Ne+1===Se){(J-=3)>-1&&Te.push(239,191,189);continue}Me=oe;continue}if(oe<56320){(J-=3)>-1&&Te.push(239,191,189),Me=oe;continue}oe=(Me-55296<<10|oe-56320)+65536}else Me&&(J-=3)>-1&&Te.push(239,191,189);if(Me=null,oe<128){if((J-=1)<0)break;Te.push(oe)}else if(oe<2048){if((J-=2)<0)break;Te.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((J-=3)<0)break;Te.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((J-=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(T){const J=[];for(let oe=0;oe<T.length;++oe)J.push(T.charCodeAt(oe)&255);return J}function se(T,J){let oe,Se,Me;const Te=[];for(let Ne=0;Ne<T.length&&!((J-=2)<0);++Ne)oe=T.charCodeAt(Ne),Se=oe>>8,Me=oe%256,Te.push(Me),Te.push(Se);return Te}function ve(T){return t.toByteArray(he(T))}function ge(T,J,oe,Se){let Me;for(Me=0;Me<Se&&!(Me+oe>=J.length||Me>=T.length);++Me)J[Me+oe]=T[Me];return Me}function fe(T,J){return T instanceof J||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===J.name}function ke(T){return T!==T}const ze=(function(){const T="0123456789abcdef",J=new Array(256);for(let oe=0;oe<16;++oe){const Se=oe*16;for(let Me=0;Me<16;++Me)J[Se+Me]=T[oe]+T[Me]}return J})();function Be(T){return typeof BigInt>"u"?tt:T}function tt(){throw new Error("BigInt not supported")}})(Wae)),Wae}const Xae=GG(Dee);var E7,ere;function Ktt(){if(ere)return E7;ere=1;function e(v,f){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(v);f&&(k=k.filter(function(x){return Object.getOwnPropertyDescriptor(v,x).enumerable})),y.push.apply(y,k)}return y}function t(v){for(var f=1;f<arguments.length;f++){var y=arguments[f]!=null?arguments[f]:{};f%2?e(Object(y),!0).forEach(function(k){a(v,k,y[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(k){Object.defineProperty(v,k,Object.getOwnPropertyDescriptor(y,k))})}return v}function a(v,f,y){return f=o(f),f in v?Object.defineProperty(v,f,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[f]=y,v}function r(v,f){if(!(v instanceof f))throw new TypeError("Cannot call a class as a function")}function n(v,f){for(var y=0;y<f.length;y++){var k=f[y];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(v,o(k.key),k)}}function i(v,f,y){return f&&n(v.prototype,f),Object.defineProperty(v,"prototype",{writable:!1}),v}function o(v){var f=s(v,"string");return typeof f=="symbol"?f:String(f)}function s(v,f){if(typeof v!="object"||v===null)return v;var y=v[Symbol.toPrimitive];if(y!==void 0){var k=y.call(v,f);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(v)}var l=E1(),c=l.Buffer,u=Xae,d=u.inspect,h=d&&d.custom||"inspect";function m(v,f,y){c.prototype.copy.call(v,f,y)}return E7=(function(){function v(){r(this,v),this.head=null,this.tail=null,this.length=0}return i(v,[{key:"push",value:function(f){var y={data:f,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(f){var y={data:f,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var y=this.head,k=""+y.data;y=y.next;)k+=f+y.data;return k}},{key:"concat",value:function(f){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(f>>>0),k=this.head,x=0;k;)m(k.data,y,x),x+=k.data.length,k=k.next;return y}},{key:"consume",value:function(f,y){var k;return f<this.head.data.length?(k=this.head.data.slice(0,f),this.head.data=this.head.data.slice(f)):f===this.head.data.length?k=this.shift():k=y?this._getString(f):this._getBuffer(f),k}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(f){var y=this.head,k=1,x=y.data;for(f-=x.length;y=y.next;){var z=y.data,S=f>z.length?z.length:f;if(S===z.length?x+=z:x+=z.slice(0,f),f-=S,f===0){S===z.length?(++k,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(S));break}++k}return this.length-=k,x}},{key:"_getBuffer",value:function(f){var y=c.allocUnsafe(f),k=this.head,x=1;for(k.data.copy(y),f-=k.data.length;k=k.next;){var z=k.data,S=f>z.length?z.length:f;if(z.copy(y,y.length-f,0,S),f-=S,f===0){S===z.length?(++x,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=z.slice(S));break}++x}return this.length-=x,y}},{key:h,value:function(f,y){return d(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),v})(),E7}var R7,tre;function are(){if(tre)return R7;tre=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(a,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,d)):process.nextTick(t,l,d):s?(process.nextTick(a,l),s(d)):process.nextTick(a,l)}),this)}function t(o,s){n(o,s),a(o)}function a(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 R7={destroy:e,undestroy:r,errorOrDestroy:i},R7}var _7={},rre;function yv(){if(rre)return _7;rre=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function a(s,l,c){c||(c=Error);function u(h,m,v){return typeof l=="string"?l:l(h,m,v)}var d=(function(h){e(m,h);function m(v,f,y){return h.call(this,u(v,f,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,t[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 a("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),a("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),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_7.codes=t,_7}var L7,nre;function ire(){if(nre)return L7;nre=1;var e=yv().codes.ERR_INVALID_OPT_VALUE;function t(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function a(r,n,i,o){var s=t(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 L7={getHighWaterMark:a},L7}var N7,ore;function Vtt(){if(ore)return N7;ore=1,N7=e;function e(a,r){if(t("noDeprecation"))return a;var n=!1;function i(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return a.apply(this,arguments)}return i}function t(a){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[a];return r==null?!1:String(r).toLowerCase()==="true"}return N7}var I7,sre;function lre(){if(sre)return I7;sre=1,I7=M;function e(Q){var ne=this;this.next=null,this.entry=null,this.finish=function(){G(ne,Q)}}var t;M.WritableState=C;var a={deprecate:Vtt()},r=Uae(),n=E1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Q){return n.from(Q)}function s(Q){return n.isBuffer(Q)||Q instanceof i}var l=are(),c=ire(),u=c.getHighWaterMark,d=yv().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_MULTIPLE_CALLBACK,f=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,k=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,S=l.errorOrDestroy;function w(){}function C(Q,ne,ue){t=t||xv(),Q=Q||{},typeof ue!="boolean"&&(ue=ne instanceof t),this.objectMode=!!Q.objectMode,ue&&(this.objectMode=this.objectMode||!!Q.writableObjectMode),this.highWaterMark=u(this,Q,"writableHighWaterMark",ue),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ye=Q.decodeStrings===!1;this.decodeStrings=!ye,this.defaultEncoding=Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ce){X(ne,Ce)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Q.emitClose!==!1,this.autoDestroy=!!Q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}C.prototype.getBuffer=function(){for(var Q=this.bufferedRequest,ne=[];Q;)ne.push(Q),Q=Q.next;return ne},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(Q){return j.call(this,Q)?!0:this!==M?!1:Q&&Q._writableState instanceof C}})):j=function(Q){return Q instanceof this};function M(Q){t=t||xv();var ne=this instanceof t;if(!ne&&!j.call(M,this))return new M(Q);this._writableState=new C(Q,this,ne),this.writable=!0,Q&&(typeof Q.write=="function"&&(this._write=Q.write),typeof Q.writev=="function"&&(this._writev=Q.writev),typeof Q.destroy=="function"&&(this._destroy=Q.destroy),typeof Q.final=="function"&&(this._final=Q.final)),r.call(this)}M.prototype.pipe=function(){S(this,new f)};function E(Q,ne){var ue=new x;S(Q,ue),process.nextTick(ne,ue)}function L(Q,ne,ue,ye){var Ce;return ue===null?Ce=new k:typeof ue!="string"&&!ne.objectMode&&(Ce=new h("chunk",["string","Buffer"],ue)),Ce?(S(Q,Ce),process.nextTick(ye,Ce),!1):!0}M.prototype.write=function(Q,ne,ue){var ye=this._writableState,Ce=!1,B=!ye.objectMode&&s(Q);return B&&!n.isBuffer(Q)&&(Q=o(Q)),typeof ne=="function"&&(ue=ne,ne=null),B?ne="buffer":ne||(ne=ye.defaultEncoding),typeof ue!="function"&&(ue=w),ye.ending?E(this,ue):(B||L(this,ye,Q,ue))&&(ye.pendingcb++,Ce=R(this,ye,B,Q,ne,ue)),Ce},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var Q=this._writableState;Q.corked&&(Q.corked--,!Q.writing&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&ce(this,Q))},M.prototype.setDefaultEncoding=function(Q){if(typeof Q=="string"&&(Q=Q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Q+"").toLowerCase())>-1))throw new z(Q);return this._writableState.defaultEncoding=Q,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(Q,ne,ue){return!Q.objectMode&&Q.decodeStrings!==!1&&typeof ne=="string"&&(ne=n.from(ne,ue)),ne}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(Q,ne,ue,ye,Ce,B){if(!ue){var K=D(ne,ye,Ce);ye!==K&&(ue=!0,Ce="buffer",ye=K)}var le=ne.objectMode?1:ye.length;ne.length+=le;var q=ne.length<ne.highWaterMark;if(q||(ne.needDrain=!0),ne.writing||ne.corked){var pe=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:ye,encoding:Ce,isBuf:ue,callback:B,next:null},pe?pe.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else F(Q,ne,!1,le,ye,Ce,B);return q}function F(Q,ne,ue,ye,Ce,B,K){ne.writelen=ye,ne.writecb=K,ne.writing=!0,ne.sync=!0,ne.destroyed?ne.onwrite(new y("write")):ue?Q._writev(Ce,ne.onwrite):Q._write(Ce,B,ne.onwrite),ne.sync=!1}function N(Q,ne,ue,ye,Ce){--ne.pendingcb,ue?(process.nextTick(Ce,ye),process.nextTick(U,Q,ne),Q._writableState.errorEmitted=!0,S(Q,ye)):(Ce(ye),Q._writableState.errorEmitted=!0,S(Q,ye),U(Q,ne))}function te(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}function X(Q,ne){var ue=Q._writableState,ye=ue.sync,Ce=ue.writecb;if(typeof Ce!="function")throw new v;if(te(ue),ne)N(Q,ue,ye,ne,Ce);else{var B=Z(ue)||Q.destroyed;!B&&!ue.corked&&!ue.bufferProcessing&&ue.bufferedRequest&&ce(Q,ue),ye?process.nextTick(ie,Q,ue,B,Ce):ie(Q,ue,B,Ce)}}function ie(Q,ne,ue,ye){ue||ee(Q,ne),ne.pendingcb--,ye(),U(Q,ne)}function ee(Q,ne){ne.length===0&&ne.needDrain&&(ne.needDrain=!1,Q.emit("drain"))}function ce(Q,ne){ne.bufferProcessing=!0;var ue=ne.bufferedRequest;if(Q._writev&&ue&&ue.next){var ye=ne.bufferedRequestCount,Ce=new Array(ye),B=ne.corkedRequestsFree;B.entry=ue;for(var K=0,le=!0;ue;)Ce[K]=ue,ue.isBuf||(le=!1),ue=ue.next,K+=1;Ce.allBuffers=le,F(Q,ne,!0,ne.length,Ce,"",B.finish),ne.pendingcb++,ne.lastBufferedRequest=null,B.next?(ne.corkedRequestsFree=B.next,B.next=null):ne.corkedRequestsFree=new e(ne),ne.bufferedRequestCount=0}else{for(;ue;){var q=ue.chunk,pe=ue.encoding,he=ue.callback,W=ne.objectMode?1:q.length;if(F(Q,ne,!1,W,q,pe,he),ue=ue.next,ne.bufferedRequestCount--,ne.writing)break}ue===null&&(ne.lastBufferedRequest=null)}ne.bufferedRequest=ue,ne.bufferProcessing=!1}M.prototype._write=function(Q,ne,ue){ue(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(Q,ne,ue){var ye=this._writableState;return typeof Q=="function"?(ue=Q,Q=null,ne=null):typeof ne=="function"&&(ue=ne,ne=null),Q!=null&&this.write(Q,ne),ye.corked&&(ye.corked=1,this.uncork()),ye.ending||_(this,ye,ue),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Z(Q){return Q.ending&&Q.length===0&&Q.bufferedRequest===null&&!Q.finished&&!Q.writing}function V(Q,ne){Q._final(function(ue){ne.pendingcb--,ue&&S(Q,ue),ne.prefinished=!0,Q.emit("prefinish"),U(Q,ne)})}function Y(Q,ne){!ne.prefinished&&!ne.finalCalled&&(typeof Q._final=="function"&&!ne.destroyed?(ne.pendingcb++,ne.finalCalled=!0,process.nextTick(V,Q,ne)):(ne.prefinished=!0,Q.emit("prefinish")))}function U(Q,ne){var ue=Z(ne);if(ue&&(Y(Q,ne),ne.pendingcb===0&&(ne.finished=!0,Q.emit("finish"),ne.autoDestroy))){var ye=Q._readableState;(!ye||ye.autoDestroy&&ye.endEmitted)&&Q.destroy()}return ue}function _(Q,ne,ue){ne.ending=!0,U(Q,ne),ue&&(ne.finished?process.nextTick(ue):Q.once("finish",ue)),ne.ended=!0,Q.writable=!1}function G(Q,ne,ue){var ye=Q.entry;for(Q.entry=null;ye;){var Ce=ye.callback;ne.pendingcb--,Ce(ue),ye=ye.next}ne.corkedRequestsFree.next=Q}return Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Q){this._writableState&&(this._writableState.destroyed=Q)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(Q,ne){ne(Q)},I7}var $7,cre;function xv(){if(cre)return $7;cre=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};$7=o;for(var t=bre(),a=lre(),r=e(a.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=a.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),a.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)}}),$7}var D7={},K7={exports:{}},ure;function Htt(){return ure||(ure=1,(function(e,t){var a=E1(),r=a.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=a:(n(a,t),t.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 a.SlowBuffer(o)}})(K7,K7.exports)),K7.exports}var dre;function pre(){if(dre)return D7;dre=1;var e=Htt().Buffer,t=e.isEncoding||function(k){switch(k=""+k,k&&k.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 a(k){if(!k)return"utf8";for(var x;;)switch(k){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 k;default:if(x)return;k=(""+k).toLowerCase(),x=!0}}function r(k){var x=a(k);if(typeof x!="string"&&(e.isEncoding===t||!t(k)))throw new Error("Unknown encoding: "+k);return x||k}D7.StringDecoder=n;function n(k){this.encoding=r(k);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=v,x=3;break;default:this.write=f,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(x)}n.prototype.write=function(k){if(k.length===0)return"";var x,z;if(this.lastNeed){if(x=this.fillLast(k),x===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<k.length?x?x+this.text(k,z):this.text(k,z):x||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(k){if(this.lastNeed<=k.length)return k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,k.length),this.lastNeed-=k.length};function i(k){return k<=127?0:k>>5===6?2:k>>4===14?3:k>>3===30?4:k>>6===2?-1:-2}function o(k,x,z){var S=x.length-1;if(S<z)return 0;var w=i(x[S]);return w>=0?(w>0&&(k.lastNeed=w-1),w):--S<z||w===-2?0:(w=i(x[S]),w>=0?(w>0&&(k.lastNeed=w-2),w):--S<z||w===-2?0:(w=i(x[S]),w>=0?(w>0&&(w===2?w=0:k.lastNeed=w-3),w):0))}function s(k,x,z){if((x[0]&192)!==128)return k.lastNeed=0,"\uFFFD";if(k.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return k.lastNeed=1,"\uFFFD";if(k.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return k.lastNeed=2,"\uFFFD"}}function l(k){var x=this.lastTotal-this.lastNeed,z=s(this,k);if(z!==void 0)return z;if(this.lastNeed<=k.length)return k.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,x,0,k.length),this.lastNeed-=k.length}function c(k,x){var z=o(this,k,x);if(!this.lastNeed)return k.toString("utf8",x);this.lastTotal=z;var S=k.length-(z-this.lastNeed);return k.copy(this.lastChar,0,S),k.toString("utf8",x,S)}function u(k){var x=k&&k.length?this.write(k):"";return this.lastNeed?x+"\uFFFD":x}function d(k,x){if((k.length-x)%2===0){var z=k.toString("utf16le",x);if(z){var S=z.charCodeAt(z.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",x,k.length-1)}function h(k){var x=k&&k.length?this.write(k):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,z)}return x}function m(k,x){var z=(k.length-x)%3;return z===0?k.toString("base64",x):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=k[k.length-1]:(this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1]),k.toString("base64",x,k.length-z))}function v(k){var x=k&&k.length?this.write(k):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function f(k){return k.toString(this.encoding)}function y(k){return k&&k.length?this.write(k):""}return D7}var V7,hre;function H7(){if(hre)return V7;hre=1;var e=yv().codes.ERR_STREAM_PREMATURE_CLOSE;function t(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 a(){}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=t(s||a);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,v=function(){l=!1,m=!0,c||s.call(i)},f=function(x){s.call(i,x)},y=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)},k=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",y),i.req?k():i.on("request",k)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",v),i.on("finish",h),o.error!==!1&&i.on("error",f),i.on("close",y),function(){i.removeListener("complete",h),i.removeListener("abort",y),i.removeListener("request",k),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",v),i.removeListener("error",f),i.removeListener("close",y)}}return V7=n,V7}var G7,mre;function Gtt(){if(mre)return G7;mre=1;var e;function t(z,S,w){return S=a(S),S in z?Object.defineProperty(z,S,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[S]=w,z}function a(z){var S=r(z,"string");return typeof S=="symbol"?S:String(S)}function r(z,S){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var C=w.call(z,S);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(z)}var n=H7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(z,S){return{value:z,done:S}}function m(z){var S=z[i];if(S!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,S(h(w,!1)))}}function v(z){process.nextTick(m,z)}function f(z,S){return function(w,C){z.then(function(){if(S[l]){w(h(void 0,!0));return}S[u](w,C)},C)}}var y=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,S=this[s];if(S!==null)return Promise.reject(S);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(M,E){process.nextTick(function(){z[s]?E(z[s]):M(h(void 0,!0))})});var w=this[c],C;if(w)C=new Promise(f(w,this));else{var j=this[d].read();if(j!==null)return Promise.resolve(h(j,!1));C=new Promise(this[u])}return this[c]=C,C}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var z=this;return new Promise(function(S,w){z[d].destroy(null,function(C){if(C){w(C);return}S(h(void 0,!0))})})}),e),y),x=function(z){var S,w=Object.create(k,(S={},t(S,d,{value:z,writable:!0}),t(S,i,{value:null,writable:!0}),t(S,o,{value:null,writable:!0}),t(S,s,{value:null,writable:!0}),t(S,l,{value:z._readableState.endEmitted,writable:!0}),t(S,u,{value:function(C,j){var M=w[d].read();M?(w[c]=null,w[i]=null,w[o]=null,C(h(M,!1))):(w[i]=C,w[o]=j)},writable:!0}),S));return w[c]=null,n(z,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var j=w[o];j!==null&&(w[c]=null,w[i]=null,w[o]=null,j(C)),w[s]=C;return}var M=w[i];M!==null&&(w[c]=null,w[i]=null,w[o]=null,M(h(void 0,!0))),w[l]=!0}),z.on("readable",v.bind(null,w)),w};return G7=x,G7}var gre,fre;function Ftt(){return fre||(fre=1,gre=function(){throw new Error("Readable.from is not available in the browser")}),gre}var F7,vre;function bre(){if(vre)return F7;vre=1,F7=E;var e;E.ReadableState=M;var t=function(B,K){return B.listeners(K).length},a=Uae(),r=E1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(B){return r.from(B)}function o(B){return r.isBuffer(B)||B instanceof n}var s=Xae,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Ktt(),u=are(),d=ire(),h=d.getHighWaterMark,m=yv().codes,v=m.ERR_INVALID_ARG_TYPE,f=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,k=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,z,S,w=u.errorOrDestroy,C=["error","close","destroy","pause","resume"];function j(B,K,le){if(typeof B.prependListener=="function")return B.prependListener(K,le);!B._events||!B._events[K]?B.on(K,le):Array.isArray(B._events[K])?B._events[K].unshift(le):B._events[K]=[le,B._events[K]]}function M(B,K,le){e=e||xv(),B=B||{},typeof le!="boolean"&&(le=K instanceof e),this.objectMode=!!B.objectMode,le&&(this.objectMode=this.objectMode||!!B.readableObjectMode),this.highWaterMark=h(this,B,"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=B.emitClose!==!1,this.autoDestroy=!!B.autoDestroy,this.destroyed=!1,this.defaultEncoding=B.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,B.encoding&&(x||(x=pre().StringDecoder),this.decoder=new x(B.encoding),this.encoding=B.encoding)}function E(B){if(e=e||xv(),!(this instanceof E))return new E(B);var K=this instanceof e;this._readableState=new M(B,this,K),this.readable=!0,B&&(typeof B.read=="function"&&(this._read=B.read),typeof B.destroy=="function"&&(this._destroy=B.destroy)),a.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(B,K){K(B)},E.prototype.push=function(B,K){var le=this._readableState,q;return le.objectMode?q=!0:typeof B=="string"&&(K=K||le.defaultEncoding,K!==le.encoding&&(B=r.from(B,K),K=""),q=!0),L(this,B,K,!1,q)},E.prototype.unshift=function(B){return L(this,B,null,!0,!1)};function L(B,K,le,q,pe){l("readableAddChunk",K);var he=B._readableState;if(K===null)he.reading=!1,X(B,he);else{var W;if(pe||(W=R(he,K)),W)w(B,W);else if(he.objectMode||K&&K.length>0)if(typeof K!="string"&&!he.objectMode&&Object.getPrototypeOf(K)!==r.prototype&&(K=i(K)),q)he.endEmitted?w(B,new k):D(B,he,K,!0);else if(he.ended)w(B,new f);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!le?(K=he.decoder.write(K),he.objectMode||K.length!==0?D(B,he,K,!1):ce(B,he)):D(B,he,K,!1)}else q||(he.reading=!1,ce(B,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function D(B,K,le,q){K.flowing&&K.length===0&&!K.sync?(K.awaitDrain=0,B.emit("data",le)):(K.length+=K.objectMode?1:le.length,q?K.buffer.unshift(le):K.buffer.push(le),K.needReadable&&ie(B)),ce(B,K)}function R(B,K){var le;return!o(K)&&typeof K!="string"&&K!==void 0&&!B.objectMode&&(le=new v("chunk",["string","Buffer","Uint8Array"],K)),le}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(B){x||(x=pre().StringDecoder);var K=new x(B);this._readableState.decoder=K,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,q="";le!==null;)q+=K.write(le.data),le=le.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var F=1073741824;function N(B){return B>=F?B=F:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}function te(B,K){return B<=0||K.length===0&&K.ended?0:K.objectMode?1:B!==B?K.flowing&&K.length?K.buffer.head.data.length:K.length:(B>K.highWaterMark&&(K.highWaterMark=N(B)),B<=K.length?B:K.ended?K.length:(K.needReadable=!0,0))}E.prototype.read=function(B){l("read",B),B=parseInt(B,10);var K=this._readableState,le=B;if(B!==0&&(K.emittedReadable=!1),B===0&&K.needReadable&&((K.highWaterMark!==0?K.length>=K.highWaterMark:K.length>0)||K.ended))return l("read: emitReadable",K.length,K.ended),K.length===0&&K.ended?ue(this):ie(this),null;if(B=te(B,K),B===0&&K.ended)return K.length===0&&ue(this),null;var q=K.needReadable;l("need readable",q),(K.length===0||K.length-B<K.highWaterMark)&&(q=!0,l("length less than watermark",q)),K.ended||K.reading?(q=!1,l("reading or ended",q)):q&&(l("do read"),K.reading=!0,K.sync=!0,K.length===0&&(K.needReadable=!0),this._read(K.highWaterMark),K.sync=!1,K.reading||(B=te(le,K)));var pe;return B>0?pe=ne(B,K):pe=null,pe===null?(K.needReadable=K.length<=K.highWaterMark,B=0):(K.length-=B,K.awaitDrain=0),K.length===0&&(K.ended||(K.needReadable=!0),le!==B&&K.ended&&ue(this)),pe!==null&&this.emit("data",pe),pe};function X(B,K){if(l("onEofChunk"),!K.ended){if(K.decoder){var le=K.decoder.end();le&&le.length&&(K.buffer.push(le),K.length+=K.objectMode?1:le.length)}K.ended=!0,K.sync?ie(B):(K.needReadable=!1,K.emittedReadable||(K.emittedReadable=!0,ee(B)))}}function ie(B){var K=B._readableState;l("emitReadable",K.needReadable,K.emittedReadable),K.needReadable=!1,K.emittedReadable||(l("emitReadable",K.flowing),K.emittedReadable=!0,process.nextTick(ee,B))}function ee(B){var K=B._readableState;l("emitReadable_",K.destroyed,K.length,K.ended),!K.destroyed&&(K.length||K.ended)&&(B.emit("readable"),K.emittedReadable=!1),K.needReadable=!K.flowing&&!K.ended&&K.length<=K.highWaterMark,Q(B)}function ce(B,K){K.readingMore||(K.readingMore=!0,process.nextTick(Z,B,K))}function Z(B,K){for(;!K.reading&&!K.ended&&(K.length<K.highWaterMark||K.flowing&&K.length===0);){var le=K.length;if(l("maybeReadMore read 0"),B.read(0),le===K.length)break}K.readingMore=!1}E.prototype._read=function(B){w(this,new y("_read()"))},E.prototype.pipe=function(B,K){var le=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=B;break;case 1:q.pipes=[q.pipes,B];break;default:q.pipes.push(B);break}q.pipesCount+=1,l("pipe count=%d opts=%j",q.pipesCount,K);var pe=(!K||K.end!==!1)&&B!==null&&B!==process.stderr,he=pe?ae:tt;q.endEmitted?process.nextTick(he):le.once("end",he),B.on("unpipe",W);function W(T,J){l("onunpipe"),T===le&&J&&J.hasUnpiped===!1&&(J.hasUnpiped=!0,ge())}function ae(){l("onend"),B.end()}var se=V(le);B.on("drain",se);var ve=!1;function ge(){l("cleanup"),B.removeListener("close",ze),B.removeListener("finish",Be),B.removeListener("drain",se),B.removeListener("error",ke),B.removeListener("unpipe",W),le.removeListener("end",ae),le.removeListener("end",tt),le.removeListener("data",fe),ve=!0,q.awaitDrain&&(!B._writableState||B._writableState.needDrain)&&se()}le.on("data",fe);function fe(T){l("ondata");var J=B.write(T);l("dest.write",J),J===!1&&((q.pipesCount===1&&q.pipes===B||q.pipesCount>1&&Ce(q.pipes,B)!==-1)&&!ve&&(l("false write response, pause",q.awaitDrain),q.awaitDrain++),le.pause())}function ke(T){l("onerror",T),tt(),B.removeListener("error",ke),t(B,"error")===0&&w(B,T)}j(B,"error",ke);function ze(){B.removeListener("finish",Be),tt()}B.once("close",ze);function Be(){l("onfinish"),B.removeListener("close",ze),tt()}B.once("finish",Be);function tt(){l("unpipe"),le.unpipe(B)}return B.emit("pipe",le),q.flowing||(l("pipe resume"),le.resume()),B};function V(B){return function(){var K=B._readableState;l("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&t(B,"data")&&(K.flowing=!0,Q(B))}}E.prototype.unpipe=function(B){var K=this._readableState,le={hasUnpiped:!1};if(K.pipesCount===0)return this;if(K.pipesCount===1)return B&&B!==K.pipes?this:(B||(B=K.pipes),K.pipes=null,K.pipesCount=0,K.flowing=!1,B&&B.emit("unpipe",this,le),this);if(!B){var q=K.pipes,pe=K.pipesCount;K.pipes=null,K.pipesCount=0,K.flowing=!1;for(var he=0;he<pe;he++)q[he].emit("unpipe",this,{hasUnpiped:!1});return this}var W=Ce(K.pipes,B);return W===-1?this:(K.pipes.splice(W,1),K.pipesCount-=1,K.pipesCount===1&&(K.pipes=K.pipes[0]),B.emit("unpipe",this,le),this)},E.prototype.on=function(B,K){var le=a.prototype.on.call(this,B,K),q=this._readableState;return B==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):B==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,l("on readable",q.length,q.reading),q.length?ie(this):q.reading||process.nextTick(U,this)),le},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(B,K){var le=a.prototype.removeListener.call(this,B,K);return B==="readable"&&process.nextTick(Y,this),le},E.prototype.removeAllListeners=function(B){var K=a.prototype.removeAllListeners.apply(this,arguments);return(B==="readable"||B===void 0)&&process.nextTick(Y,this),K};function Y(B){var K=B._readableState;K.readableListening=B.listenerCount("readable")>0,K.resumeScheduled&&!K.paused?K.flowing=!0:B.listenerCount("data")>0&&B.resume()}function U(B){l("readable nexttick read 0"),B.read(0)}E.prototype.resume=function(){var B=this._readableState;return B.flowing||(l("resume"),B.flowing=!B.readableListening,_(this,B)),B.paused=!1,this};function _(B,K){K.resumeScheduled||(K.resumeScheduled=!0,process.nextTick(G,B,K))}function G(B,K){l("resume",K.reading),K.reading||B.read(0),K.resumeScheduled=!1,B.emit("resume"),Q(B),K.flowing&&!K.reading&&B.read(0)}E.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 Q(B){var K=B._readableState;for(l("flow",K.flowing);K.flowing&&B.read()!==null;);}E.prototype.wrap=function(B){var K=this,le=this._readableState,q=!1;B.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var W=le.decoder.end();W&&W.length&&K.push(W)}K.push(null)}),B.on("data",function(W){if(l("wrapped data"),le.decoder&&(W=le.decoder.write(W)),!(le.objectMode&&W==null)&&!(!le.objectMode&&(!W||!W.length))){var ae=K.push(W);ae||(q=!0,B.pause())}});for(var pe in B)this[pe]===void 0&&typeof B[pe]=="function"&&(this[pe]=(function(W){return function(){return B[W].apply(B,arguments)}})(pe));for(var he=0;he<C.length;he++)B.on(C[he],this.emit.bind(this,C[he]));return this._read=function(W){l("wrapped _read",W),q&&(q=!1,B.resume())},this},typeof Symbol=="function"&&(E.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Gtt()),z(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){this._readableState&&(this._readableState.flowing=B)}}),E._fromList=ne,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ne(B,K){if(K.length===0)return null;var le;return K.objectMode?le=K.buffer.shift():!B||B>=K.length?(K.decoder?le=K.buffer.join(""):K.buffer.length===1?le=K.buffer.first():le=K.buffer.concat(K.length),K.buffer.clear()):le=K.buffer.consume(B,K.decoder),le}function ue(B){var K=B._readableState;l("endReadable",K.endEmitted),K.endEmitted||(K.ended=!0,process.nextTick(ye,K,B))}function ye(B,K){if(l("endReadableNT",B.endEmitted,B.length),!B.endEmitted&&B.length===0&&(B.endEmitted=!0,K.readable=!1,K.emit("end"),B.autoDestroy)){var le=K._writableState;(!le||le.autoDestroy&&le.finished)&&K.destroy()}}typeof Symbol=="function"&&(E.from=function(B,K){return S===void 0&&(S=Ftt()),S(E,B,K)});function Ce(B,K){for(var le=0,q=B.length;le<q;le++)if(B[le]===K)return le;return-1}return F7}var q7,kre;function yre(){if(kre)return q7;kre=1,q7=s;var e=yv().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,a=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=xv();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new a);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.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 t("_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 v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.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 q7}var Q7,xre;function qtt(){if(xre)return Q7;xre=1,Q7=t;var e=yre();function t(a){if(!(this instanceof t))return new t(a);e.call(this,a)}return t.prototype._transform=function(a,r,n){n(null,a)},Q7}var U7,wre;function Qtt(){if(wre)return U7;wre=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var a=yv().codes,r=a.ERR_MISSING_ARGS,n=a.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,v,f){f=t(f);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=H7()),e(h,{readable:m,writable:v},function(x){if(x)return f(x);y=!0,f()});var k=!1;return function(x){if(!y&&!k){if(k=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();f(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),v=0;v<h;v++)m[v]=arguments[v];var f=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,k=m.map(function(x,z){var S=z<m.length-1,w=z>0;return s(x,S,w,function(C){y||(y=C),C&&k.forEach(l),!S&&(k.forEach(l),f(y))})});return m.reduce(c)}return U7=d,U7}var Ore;function zre(){return Ore||(Ore=1,(function(e,t){t=e.exports=bre(),t.Stream=t,t.Readable=t,t.Writable=lre(),t.Duplex=xv(),t.Transform=yre(),t.PassThrough=qtt(),t.finished=H7(),t.pipeline=Qtt()})(T7,T7.exports)),T7.exports}var Sre;function Cre(){if(Sre)return a2;Sre=1;var e=Gae(),t=C9(),a=zre(),r=a2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=a2.IncomingMessage=function(i,o,s,l){var c=this;if(a.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 f=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),f()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,k){c.headers[k.toLowerCase()]=y,c.rawHeaders.push(k,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(k,x){c._destroyed?x():c.push(Buffer.from(y))?k():c._resumeFetch=k})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();f()}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(f){var y=f.match(/^([^:]+):\s*(.*)/);if(y){var k=y[1].toLowerCase();k==="set-cookie"?(c.headers[k]===void 0&&(c.headers[k]=[]),c.headers[k].push(y[2])):c.headers[k]!==void 0?c.headers[k]+=", "+y[2]:c.headers[k]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var v=m.match(/;\s*charset=([^;])(;|$)/);v&&(c._charset=v[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return t(n,a.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))},a2}var jre;function Utt(){if(jre)return M7.exports;jre=1;var e=Gae(),t=C9(),a=Cre(),r=zre(),n=a.IncomingMessage,i=a.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=M7.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(v){d.setHeader(v,u.headers[v])});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()})};t(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 v=[];if(Object.keys(h).forEach(function(x){var z=h[x].name,S=h[x].value;Array.isArray(S)?S.forEach(function(w){v.push([z,w])}):v.push([z,S])}),u._mode==="fetch"){var f=null;if(e.abortController){var y=new AbortController;f=y.signal,u._fetchAbortController=y,"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:v,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:f}).then(function(x){u._fetchResponse=x,u._resetTimers(!1),u._connect()},function(x){u._resetTimers(!0),u._destroyed||u.emit("error",x)})}else{var k=u._xhr=new globalThis.XMLHttpRequest;try{k.open(u._opts.method,u._opts.url,!0)}catch(x){process.nextTick(function(){u.emit("error",x)});return}"responseType"in k&&(k.responseType=u._mode),"withCredentials"in k&&(k.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in k&&k.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(k.timeout=d.requestTimeout,k.ontimeout=function(){u.emit("requestTimeout")}),v.forEach(function(x){k.setRequestHeader(x[0],x[1])}),u._response=null,k.onreadystatechange=function(){switch(k.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(k.onprogress=function(){u._onXHRProgress()}),k.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{k.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 M7.exports}var W7,Pre;function Wtt(){if(Pre)return W7;Pre=1,W7=t;var e=Object.prototype.hasOwnProperty;function t(){for(var a={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(a[i]=n[i])}return a}return W7}var Are,Mre;function Ztt(){return Mre||(Mre=1,Are={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"}),Are}var Tre;function Jtt(){return Tre||(Tre=1,(function(e){var t=Utt(),a=Cre(),r=Wtt(),n=Ztt(),i=f7(),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 v=new t(s);return l&&v.on("response",l),v},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=t,o.IncomingMessage=a.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"]})(Kae)),Kae}var Bre,Ere;function Ytt(){return Ere||(Ere=1,Bre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Jtt().STATUS_CODES)}),Bre}const Xtt="7.0.8",eat={version:Xtt};var Z7,Rre;function tat(){if(Rre)return Z7;Rre=1;const e=kv,t=f7(),a=Ett(),r=kv,n=kv,i=e2(),o=i.jptr,s=x7().isRef,l=t2().clone,c=t2().circularClone,u=z7().recurse,d=Ltt(),h=Ntt(),m=Iae(),v=Ytt().statusCodes,f=eat.version,y="3.0.0";let k;class x extends Error{constructor(K){super(K),this.name="S2OError"}}function z(B,K){let le=new x(B);if(le.options=K,K.promise)K.promise.reject(le);else throw le}function S(B,K,le){le.warnOnly?K[le.warnProperty||"x-s2o-warning"]=B:z(B,le)}function w(B,K,le){if(B.nullable&&le.patches++,B.discriminator&&typeof B.discriminator=="string"&&(B.discriminator={propertyName:B.discriminator}),B.items&&Array.isArray(B.items)&&(B.items.length===0?B.items={}:B.items.length===1?B.items=B.items[0]:B.items={anyOf:B.items}),B.type&&Array.isArray(B.type))if(le.patch){if(le.patches++,B.type.length===0)delete B.type;else{B.oneOf||(B.oneOf=[]);for(let q of B.type){let pe={};if(q==="null")B.nullable=!0;else{pe.type=q;for(let he of m.arrayProperties)typeof B.prop<"u"&&(pe[he]=B[he],delete B[he])}pe.type&&B.oneOf.push(pe)}delete B.type,B.oneOf.length===0?delete B.oneOf:B.oneOf.length<2&&(B.type=B.oneOf[0].type,Object.keys(B.oneOf[0]).length>1&&S("Lost properties from oneOf",B,le),delete B.oneOf)}B.type&&Array.isArray(B.type)&&B.type.length===1&&(B.type=B.type[0])}else z("(Patchable) schema type must not be an array",le);B.type&&B.type==="null"&&(delete B.type,B.nullable=!0),B.type==="array"&&!B.items&&(B.items={}),B.type==="file"&&(B.type="string",B.format="binary"),typeof B.required=="boolean"&&(B.required&&B.name&&(typeof K.required>"u"&&(K.required=[]),Array.isArray(K.required)&&K.required.push(B.name)),delete B.required),B.xml&&typeof B.xml.namespace=="string"&&(B.xml.namespace||delete B.xml.namespace),typeof B.allowEmptyValue<"u"&&(le.patches++,delete B.allowEmptyValue)}function C(B,K){if(B["x-required"]&&Array.isArray(B["x-required"])&&(B.required||(B.required=[]),B.required=B.required.concat(B["x-required"]),delete B["x-required"]),B["x-anyOf"]&&(B.anyOf=B["x-anyOf"],delete B["x-anyOf"]),B["x-oneOf"]&&(B.oneOf=B["x-oneOf"],delete B["x-oneOf"]),B["x-not"]&&(B.not=B["x-not"],delete B["x-not"]),typeof B["x-nullable"]=="boolean"&&(B.nullable=B["x-nullable"],delete B["x-nullable"]),typeof B["x-discriminator"]=="object"&&typeof B["x-discriminator"].propertyName=="string"){B.discriminator=B["x-discriminator"],delete B["x-discriminator"];for(let le in B.discriminator.mapping){let q=B.discriminator.mapping[le];q.startsWith("#/definitions/")&&(B.discriminator.mapping[le]=q.replace("#/definitions/","#/components/schemas/"))}}}function j(B,K){h.walkSchema(B,{},{},function(le,q,pe){C(le),w(le,q,K)})}function M(B){return B.indexOf("#")>=0?B=B.split("#")[1].split("/").pop():B=B.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(B))}function E(B,K,le){let q=le.payload.options;if(s(B,K)){if(!B[K].startsWith("#/components/")){if(B[K]==="#/consumes")delete B[K],le.parent[le.pkey]=l(q.openapi.consumes);else if(B[K]==="#/produces")delete B[K],le.parent[le.pkey]=l(q.openapi.produces);else if(B[K].startsWith("#/definitions/")){let pe=B[K].replace("#/definitions/","").split("/");const he=i.jpunescape(pe[0]);let W=k.schemas[decodeURIComponent(he)];W?pe[0]=W:S("Could not resolve reference "+B[K],B,q),B[K]="#/components/schemas/"+pe.join("/")}else if(B[K].startsWith("#/parameters/"))B[K]="#/components/parameters/"+m.sanitise(B[K].replace("#/parameters/",""));else if(B[K].startsWith("#/responses/"))B[K]="#/components/responses/"+m.sanitise(B[K].replace("#/responses/",""));else if(B[K].startsWith("#")){let pe=l(i.jptr(q.openapi,B[K]));if(pe===!1)S("direct $ref not found "+B[K],B,q);else if(q.refmap[B[K]])B[K]=q.refmap[B[K]];else{let he=B[K];he=he.replace("/properties/headers/",""),he=he.replace("/properties/responses/",""),he=he.replace("/properties/parameters/",""),he=he.replace("/properties/schemas/","");let W="schemas",ae=he.lastIndexOf("/schema");if(W=he.indexOf("/headers/")>ae?"headers":he.indexOf("/responses/")>ae?"responses":he.indexOf("/example")>ae?"examples":he.indexOf("/x-")>ae?"extensions":he.indexOf("/parameters/")>ae?"parameters":"schemas",W==="schemas"&&j(pe,q),W!=="responses"&&W!=="extensions"){let se=W.substr(0,W.length-1);se==="parameter"&&pe.name&&pe.name===m.sanitise(pe.name)&&(se=encodeURIComponent(pe.name));let ve=1;for(B["x-miro"]&&(se=M(B["x-miro"]),ve="");i.jptr(q.openapi,"#/components/"+W+"/"+se+ve);)ve=ve===""?2:++ve;let ge="#/components/"+W+"/"+se+ve,fe="";W==="examples"&&(pe={value:pe},fe="/value"),i.jptr(q.openapi,ge,pe),q.refmap[B[K]]=ge+fe,B[K]=ge+fe}}}}if(delete B["x-miro"],Object.keys(B).length>1){const pe=B[K],he=le.path.indexOf("/schema")>=0;q.refSiblings==="preserve"||(he&&q.refSiblings==="allOf"?(delete B.$ref,le.parent[le.pkey]={allOf:[{$ref:pe},B]}):le.parent[le.pkey]={$ref:pe})}}if(K==="x-ms-odata"&&typeof B[K]=="string"&&B[K].startsWith("#/")){let pe=B[K].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),he=k.schemas[decodeURIComponent(pe[0])];he?pe[0]=he:S("Could not resolve reference "+B[K],B,q),B[K]="#/components/schemas/"+pe.join("/")}}function L(B,K){for(let le in K.refmap)i.jptr(B,le,{$ref:K.refmap[le]})}function D(B){for(let K in B)for(let le in B[K]){let q=m.sanitise(le);le!==q&&(B[K][q]=B[K][le],delete B[K][le])}}function R(B,K){if(B.type==="basic"&&(B.type="http",B.scheme="basic"),B.type==="oauth2"){let le={},q=B.flow;B.flow==="application"&&(q="clientCredentials"),B.flow==="accessCode"&&(q="authorizationCode"),typeof B.authorizationUrl<"u"&&(le.authorizationUrl=B.authorizationUrl.split("?")[0].trim()||"/"),typeof B.tokenUrl=="string"&&(le.tokenUrl=B.tokenUrl.split("?")[0].trim()||"/"),le.scopes=B.scopes||{},B.flows={},B.flows[q]=le,delete B.flow,delete B.authorizationUrl,delete B.tokenUrl,delete B.scopes,typeof B.name<"u"&&(K.patch?(K.patches++,delete B.name):z("(Patchable) oauth2 securitySchemes should not have name property",K))}}function F(B){return B&&!B["x-s2o-delete"]}function N(B,K){if(B.$ref)B.$ref=B.$ref.replace("#/responses/","#/components/responses/");else{B.type&&!B.schema&&(B.schema={}),B.type&&(B.schema.type=B.type),B.items&&B.items.type!=="array"&&(B.items.collectionFormat!==B.collectionFormat&&S("Nested collectionFormats are not supported",B,K),delete B.items.collectionFormat),B.type==="array"?(B.collectionFormat==="ssv"?S("collectionFormat:ssv is no longer supported for headers",B,K):B.collectionFormat==="pipes"?S("collectionFormat:pipes is no longer supported for headers",B,K):B.collectionFormat==="multi"?B.explode=!0:B.collectionFormat==="tsv"?(S("collectionFormat:tsv is no longer supported",B,K),B["x-collectionFormat"]="tsv"):B.style="simple",delete B.collectionFormat):B.collectionFormat&&(K.patch?(K.patches++,delete B.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",K)),delete B.type;for(let le of m.parameterTypeProperties)typeof B[le]<"u"&&(B.schema[le]=B[le],delete B[le]);for(let le of m.arrayProperties)typeof B[le]<"u"&&(B.schema[le]=B[le],delete B[le])}}function te(B,K){if(B.$ref.indexOf("#/parameters/")>=0){let le=B.$ref.split("#/parameters/");B.$ref=le[0]+"#/components/parameters/"+m.sanitise(le[1])}B.$ref.indexOf("#/definitions/")>=0&&S("Definition used as parameter",B,K)}function X(B,K){let le={};for(let q of Object.keys(B))le[q]=B[q],q==="parameters"&&(le.requestBody={},K.rbname&&(le[K.rbname]=""));return le.requestBody={},le}function ie(B,K,le,q,pe,he,W){let ae={},se=!0,ve;if(K&&K.consumes&&typeof K.consumes=="string")if(W.patch)W.patches++,K.consumes=[K.consumes];else return z("(Patchable) operation.consumes must be an array",W);Array.isArray(he.consumes)||delete he.consumes;let ge=((K?K.consumes:null)||he.consumes||[]).filter(m.uniqueOnly);if(B&&B.$ref&&typeof B.$ref=="string"){te(B,W);let fe=decodeURIComponent(B.$ref.replace("#/components/parameters/","")),ke=!1,ze=he.components.parameters[fe];if((!ze||ze["x-s2o-delete"])&&B.$ref.startsWith("#/")&&(B["x-s2o-delete"]=!0,ke=!0),ke){let Be=B.$ref,tt=o(he,B.$ref);!tt&&Be.startsWith("#/")?S("Could not resolve reference "+Be,B,W):tt&&(B=tt)}}if(B&&(B.name||B.in)){typeof B["x-deprecated"]=="boolean"&&(B.deprecated=B["x-deprecated"],delete B["x-deprecated"]),typeof B["x-example"]<"u"&&(B.example=B["x-example"],delete B["x-example"]),B.in!=="body"&&!B.type&&(W.patch?(W.patches++,B.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",W)),B.type&&typeof B.type=="object"&&B.type.$ref&&(B.type=o(he,B.type.$ref)),B.type==="file"&&(B["x-s2o-originalType"]=B.type,ve=B.type),B.description&&typeof B.description=="object"&&B.description.$ref&&(B.description=o(he,B.description.$ref)),B.description===null&&delete B.description;let fe=B.collectionFormat;if(B.type==="array"&&!fe&&(fe="csv"),fe&&(B.type!=="array"&&(W.patch?(W.patches++,delete B.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",W)),fe==="csv"&&(B.in==="query"||B.in==="cookie")&&(B.style="form",B.explode=!1),fe==="csv"&&(B.in==="path"||B.in==="header")&&(B.style="simple"),fe==="ssv"&&(B.in==="query"?B.style="spaceDelimited":S("collectionFormat:ssv is no longer supported except for in:query parameters",B,W)),fe==="pipes"&&(B.in==="query"?B.style="pipeDelimited":S("collectionFormat:pipes is no longer supported except for in:query parameters",B,W)),fe==="multi"&&(B.explode=!0),fe==="tsv"&&(S("collectionFormat:tsv is no longer supported",B,W),B["x-collectionFormat"]="tsv"),delete B.collectionFormat),B.type&&B.type!=="body"&&B.in!=="formData")if(B.items&&B.schema)S("parameter has array,items and schema",B,W);else{B.schema&&W.patches++,(!B.schema||typeof B.schema!="object")&&(B.schema={}),B.schema.type=B.type,B.items&&(B.schema.items=B.items,delete B.items,u(B.schema.items,null,function(ke,ze,Be){ze==="collectionFormat"&&typeof ke[ze]=="string"&&(fe&&ke[ze]!==fe&&S("Nested collectionFormats are not supported",B,W),delete ke[ze])}));for(let ke of m.parameterTypeProperties)typeof B[ke]<"u"&&(B.schema[ke]=B[ke]),delete B[ke]}B.schema&&j(B.schema,W),B["x-ms-skip-url-encoding"]&&B.in==="query"&&(B.allowReserved=!0,delete B["x-ms-skip-url-encoding"])}if(B&&B.in==="formData"){se=!1,ae.content={};let fe="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(fe="multipart/form-data"),ae.content[fe]={},B.schema)ae.content[fe].schema=B.schema,B.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(B.schema.$ref.replace("#/components/schemas/","")));else{ae.content[fe].schema={},ae.content[fe].schema.type="object",ae.content[fe].schema.properties={},ae.content[fe].schema.properties[B.name]={};let ke=ae.content[fe].schema,ze=ae.content[fe].schema.properties[B.name];B.description&&(ze.description=B.description),B.example&&(ze.example=B.example),B.type&&(ze.type=B.type);for(let Be of m.parameterTypeProperties)typeof B[Be]<"u"&&(ze[Be]=B[Be]);B.required===!0&&(ke.required||(ke.required=[]),ke.required.push(B.name),ae.required=!0),typeof B.default<"u"&&(ze.default=B.default),ze.properties&&(ze.properties=B.properties),B.allOf&&(ze.allOf=B.allOf),B.type==="array"&&B.items&&(ze.items=B.items,ze.items.collectionFormat&&delete ze.items.collectionFormat),(ve==="file"||B["x-s2o-originalType"]==="file")&&(ze.type="string",ze.format="binary"),ee(B,ze)}}else B&&B.type==="file"&&(B.required&&(ae.required=B.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",ee(B,ae));if(B&&B.in==="body"){ae.content={},B.name&&(ae["x-s2o-name"]=(K&&K.operationId?m.sanitiseAll(K.operationId):"")+("_"+B.name).toCamelCase()),B.description&&(ae.description=B.description),B.required&&(ae.required=B.required),K&&W.rbname&&B.name&&(K[W.rbname]=B.name),B.schema&&B.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(B.schema.$ref.replace("#/components/schemas/","")):B.schema&&B.schema.type==="array"&&B.schema.items&&B.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(B.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let fe of ge)ae.content[fe]={},ae.content[fe].schema=l(B.schema||{}),j(ae.content[fe].schema,W);ee(B,ae)}if(Object.keys(ae).length>0&&(B["x-s2o-delete"]=!0,K))if(K.requestBody&&se){K.requestBody["x-s2o-overloaded"]=!0;let fe=K.operationId||pe;S("Operation "+fe+" has multiple requestBodies",K,W)}else K.requestBody||(K=le[q]=X(K,W)),K.requestBody.content&&K.requestBody.content["multipart/form-data"]&&K.requestBody.content["multipart/form-data"].schema&&K.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?(K.requestBody.content["multipart/form-data"].schema.properties=Object.assign(K.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),K.requestBody.content["multipart/form-data"].schema.required=(K.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),K.requestBody.content["multipart/form-data"].schema.required.length||delete K.requestBody.content["multipart/form-data"].schema.required):K.requestBody.content&&K.requestBody.content["application/x-www-form-urlencoded"]&&K.requestBody.content["application/x-www-form-urlencoded"].schema&&K.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?(K.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(K.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),K.requestBody.content["application/x-www-form-urlencoded"].schema.required=(K.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),K.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete K.requestBody.content["application/x-www-form-urlencoded"].schema.required):(K.requestBody=Object.assign(K.requestBody,ae),K.requestBody["x-s2o-name"]||(K.requestBody.schema&&K.requestBody.schema.$ref?K.requestBody["x-s2o-name"]=decodeURIComponent(K.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):K.operationId&&(K.requestBody["x-s2o-name"]=m.sanitiseAll(K.operationId))));if(B&&!B["x-s2o-delete"]){delete B.type;for(let fe of m.parameterTypeProperties)delete B[fe];B.in==="path"&&(typeof B.required>"u"||B.required!==!0)&&(W.patch?(W.patches++,B.required=!0):z("(Patchable) path parameters must be required:true ["+B.name+" in "+pe+"]",W))}return K}function ee(B,K){for(let le in B)le.startsWith("x-")&&!le.startsWith("x-s2o")&&(K[le]=B[le])}function ce(B,K,le,q,pe){if(!B)return!1;if(B.$ref&&typeof B.$ref=="string")B.$ref.indexOf("#/definitions/")>=0?S("definition used as response: "+B.$ref,B,pe):B.$ref.startsWith("#/responses/")&&(B.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(B.$ref.replace("#/responses/",""))));else{if((typeof B.description>"u"||B.description===null||B.description===""&&pe.patch)&&(pe.patch?typeof B=="object"&&!Array.isArray(B)&&(pe.patches++,B.description=v[B]||""):z("(Patchable) response.description is mandatory",pe)),typeof B.schema<"u"){if(j(B.schema,pe),B.schema.$ref&&typeof B.schema.$ref=="string"&&B.schema.$ref.startsWith("#/responses/")&&(B.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(B.schema.$ref.replace("#/responses/","")))),le&&le.produces&&typeof le.produces=="string")if(pe.patch)pe.patches++,le.produces=[le.produces];else return z("(Patchable) operation.produces must be an array",pe);q.produces&&!Array.isArray(q.produces)&&delete q.produces;let he=((le?le.produces:null)||q.produces||[]).filter(m.uniqueOnly);he.length||he.push("*/*"),B.content={};for(let W of he){if(B.content[W]={},B.content[W].schema=l(B.schema),B.examples&&B.examples[W]){let ae={};ae.value=B.examples[W],B.content[W].examples={},B.content[W].examples.response=ae,delete B.examples[W]}B.content[W].schema.type==="file"&&(B.content[W].schema={type:"string",format:"binary"})}delete B.schema}for(let he in B.examples)B.content||(B.content={}),B.content[he]||(B.content[he]={}),B.content[he].examples={},B.content[he].examples.response={},B.content[he].examples.response.value=B.examples[he];if(delete B.examples,B.headers)for(let he in B.headers)he.toLowerCase()==="status code"?pe.patch?(pe.patches++,delete B.headers[he]):z('(Patchable) "Status Code" is not a valid header',pe):N(B.headers[he],pe)}}function Z(B,K,le,q,pe){for(let he in B){let W=B[he];W&&W["x-trace"]&&typeof W["x-trace"]=="object"&&(W.trace=W["x-trace"],delete W["x-trace"]),W&&W["x-summary"]&&typeof W["x-summary"]=="string"&&(W.summary=W["x-summary"],delete W["x-summary"]),W&&W["x-description"]&&typeof W["x-description"]=="string"&&(W.description=W["x-description"],delete W["x-description"]),W&&W["x-servers"]&&Array.isArray(W["x-servers"])&&(W.servers=W["x-servers"],delete W["x-servers"]);for(let ae in W)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let se=W[ae];if(se&&se.parameters&&Array.isArray(se.parameters)){if(W.parameters)for(let ve of W.parameters)typeof ve.$ref=="string"&&(te(ve,le),ve=o(pe,ve.$ref)),!se.parameters.find(function(ge,fe,ke){return ge.name===ve.name&&ge.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(se=ie(ve,se,W,ae,he,pe,le),le.rbname&&se[le.rbname]===""&&delete se[le.rbname]);for(let ve of se.parameters)se=ie(ve,se,W,ae,ae+":"+he,pe,le);le.rbname&&se[le.rbname]===""&&delete se[le.rbname],le.debug||se.parameters&&(se.parameters=se.parameters.filter(F))}if(se&&se.security&&D(se.security),typeof se=="object"){if(!se.responses){let ve={};ve.description="Default response",se.responses={default:ve}}for(let ve in se.responses){let ge=se.responses[ve];ce(ge,ve,se,pe,le)}}if(se&&se["x-servers"]&&Array.isArray(se["x-servers"]))se.servers=se["x-servers"],delete se["x-servers"];else if(se&&se.schemes&&se.schemes.length){for(let ve of se.schemes)if((!pe.schemes||pe.schemes.indexOf(ve)<0)&&(se.servers||(se.servers=[]),Array.isArray(pe.servers)))for(let ge of pe.servers){let fe=l(ge),ke=t.parse(fe.url);ke.protocol=ve,fe.url=ke.format(),se.servers.push(fe)}}if(le.debug&&(se["x-s2o-consumes"]=se.consumes||[],se["x-s2o-produces"]=se.produces||[]),se){if(delete se.consumes,delete se.produces,delete se.schemes,se["x-ms-examples"]){for(let ve in se["x-ms-examples"]){let ge=se["x-ms-examples"][ve],fe=m.sanitiseAll(ve);if(ge.parameters)for(let ke in ge.parameters){let ze=ge.parameters[ke];for(let Be of(se.parameters||[]).concat(W.parameters||[]))Be.$ref&&(Be=i.jptr(pe,Be.$ref)),Be.name===ke&&!Be.example&&(Be.examples||(Be.examples={}),Be.examples[ve]={value:ze})}if(ge.responses)for(let ke in ge.responses){if(ge.responses[ke].headers)for(let ze in ge.responses[ke].headers){let Be=ge.responses[ke].headers[ze];for(let tt in se.responses[ke].headers)if(tt===ze){let T=se.responses[ke].headers[tt];T.example=Be}}if(ge.responses[ke].body&&(pe.components.examples[fe]={value:l(ge.responses[ke].body)},se.responses[ke]&&se.responses[ke].content))for(let ze in se.responses[ke].content){let Be=se.responses[ke].content[ze];Be.examples||(Be.examples={}),Be.examples[ve]={$ref:"#/components/examples/"+fe}}}}delete se["x-ms-examples"]}if(se.parameters&&se.parameters.length===0&&delete se.parameters,se.requestBody){let ve=se.operationId?m.sanitiseAll(se.operationId):m.sanitiseAll(ae+he).toCamelCase(),ge=m.sanitise(se.requestBody["x-s2o-name"]||ve||"");delete se.requestBody["x-s2o-name"];let fe=JSON.stringify(se.requestBody),ke=m.hash(fe);if(!q[ke]){let Be={};Be.name=ge,Be.body=se.requestBody,Be.refs=[],q[ke]=Be}let ze="#/"+K+"/"+encodeURIComponent(i.jpescape(he))+"/"+ae+"/requestBody";q[ke].refs.push(ze)}}}if(W&&W.parameters){for(let ae in W.parameters){let se=W.parameters[ae];ie(se,null,W,null,he,pe,le)}!le.debug&&Array.isArray(W.parameters)&&(W.parameters=W.parameters.filter(F))}}}function V(B,K){let le={};k={schemas:{}},B.security&&D(B.security);for(let pe in B.components.securitySchemes){let he=m.sanitise(pe);pe!==he&&(B.components.securitySchemes[he]&&z("Duplicate sanitised securityScheme name "+he,K),B.components.securitySchemes[he]=B.components.securitySchemes[pe],delete B.components.securitySchemes[pe]),R(B.components.securitySchemes[he],K)}for(let pe in B.components.schemas){let he=m.sanitiseAll(pe),W="";if(pe!==he){for(;B.components.schemas[he+W];)W=W?++W:2;B.components.schemas[he+W]=B.components.schemas[pe],delete B.components.schemas[pe]}k.schemas[pe]=he+W,j(B.components.schemas[he+W],K)}K.refmap={},u(B,{payload:{options:K}},E),L(B,K);for(let pe in B.components.parameters){let he=m.sanitise(pe);pe!==he&&(B.components.parameters[he]&&z("Duplicate sanitised parameter name "+he,K),B.components.parameters[he]=B.components.parameters[pe],delete B.components.parameters[pe]);let W=B.components.parameters[he];ie(W,null,null,null,he,B,K)}for(let pe in B.components.responses){let he=m.sanitise(pe);pe!==he&&(B.components.responses[he]&&z("Duplicate sanitised response name "+he,K),B.components.responses[he]=B.components.responses[pe],delete B.components.responses[pe]);let W=B.components.responses[he];if(ce(W,he,null,B,K),W.headers)for(let ae in W.headers)ae.toLowerCase()==="status code"?K.patch?(K.patches++,delete W.headers[ae]):z('(Patchable) "Status Code" is not a valid header',K):N(W.headers[ae],K)}for(let pe in B.components.requestBodies){let he=B.components.requestBodies[pe],W=JSON.stringify(he),ae=m.hash(W),se={};se.name=pe,se.body=he,se.refs=[],le[ae]=se}if(Z(B.paths,"paths",K,le,B),B["x-ms-paths"]&&Z(B["x-ms-paths"],"x-ms-paths",K,le,B),!K.debug)for(let pe in B.components.parameters)B.components.parameters[pe]["x-s2o-delete"]&&delete B.components.parameters[pe];K.debug&&(B["x-s2o-consumes"]=B.consumes||[],B["x-s2o-produces"]=B.produces||[]),delete B.consumes,delete B.produces,delete B.schemes;let q=[];if(B.components.requestBodies={},!K.resolveInternal){let pe=1;for(let he in le){let W=le[he];if(W.refs.length>1){let ae="";for(W.name||(W.name="requestBody",ae=pe++);q.indexOf(W.name+ae)>=0;)ae=ae?++ae:2;W.name=W.name+ae,q.push(W.name),B.components.requestBodies[W.name]=l(W.body);for(let se in W.refs){let ve={};ve.$ref="#/components/requestBodies/"+W.name,i.jptr(B,W.refs[se],ve)}}}}return B.components.responses&&Object.keys(B.components.responses).length===0&&delete B.components.responses,B.components.parameters&&Object.keys(B.components.parameters).length===0&&delete B.components.parameters,B.components.examples&&Object.keys(B.components.examples).length===0&&delete B.components.examples,B.components.requestBodies&&Object.keys(B.components.requestBodies).length===0&&delete B.components.requestBodies,B.components.securitySchemes&&Object.keys(B.components.securitySchemes).length===0&&delete B.components.securitySchemes,B.components.headers&&Object.keys(B.components.headers).length===0&&delete B.components.headers,B.components.schemas&&Object.keys(B.components.schemas).length===0&&delete B.components.schemas,B.components&&Object.keys(B.components).length===0&&delete B.components,B}function Y(B){return!B||!B.url||typeof B.url!="string"||(B.url=B.url.split("{{").join("{"),B.url=B.url.split("}}").join("}"),B.url.replace(/\{(.+?)\}/g,function(K,le){B.variables||(B.variables={}),B.variables[le]={default:"unknown"}})),B}function U(B,K,le){if(typeof B.info>"u"||B.info===null)if(K.patch)K.patches++,B.info={version:"",title:""};else return le(new x("(Patchable) info object is mandatory"));if(typeof B.info!="object"||Array.isArray(B.info))return le(new x("info must be an object"));if(typeof B.info.title>"u"||B.info.title===null)if(K.patch)K.patches++,B.info.title="";else return le(new x("(Patchable) info.title cannot be null"));if(typeof B.info.version>"u"||B.info.version===null)if(K.patch)K.patches++,B.info.version="";else return le(new x("(Patchable) info.version cannot be null"));if(typeof B.info.version!="string")if(K.patch)K.patches++,B.info.version=B.info.version.toString();else return le(new x("(Patchable) info.version must be a string"));if(typeof B.info.logo<"u")if(K.patch)K.patches++,B.info["x-logo"]=B.info.logo,delete B.info.logo;else return le(new x("(Patchable) info should not have logo property"));if(typeof B.info.termsOfService<"u"){if(B.info.termsOfService===null)if(K.patch)K.patches++,B.info.termsOfService="";else return le(new x("(Patchable) info.termsOfService cannot be null"));try{new URL(B.info.termsOfService)}catch{if(K.patch)K.patches++,delete B.info.termsOfService;else return le(new x("(Patchable) info.termsOfService must be a URL"))}}}function _(B,K,le){if(typeof B.paths>"u")if(K.patch)K.patches++,B.paths={};else return le(new x("(Patchable) paths object is mandatory"))}function G(B,K){const le=new WeakSet;u(B,{identityDetection:!0},function(q,pe,he){typeof q[pe]=="object"&&q[pe]!==null&&(le.has(q[pe])?K.anchors?q[pe]=l(q[pe]):z("YAML anchor or merge key at "+he.path,K):le.add(q[pe]))})}function Q(B,K,le){return a(le,new Promise(function(q,pe){if(B||(B={}),K.original=B,K.text||(K.text=n.stringify(B)),K.externals=[],K.externalRefs={},K.rewriteRefs=!0,K.preserveMiro=!0,K.promise={},K.promise.resolve=q,K.promise.reject=pe,K.patches=0,K.cache||(K.cache={}),K.source&&(K.cache[K.source]=K.original),G(B,K),B.openapi&&typeof B.openapi=="string"&&B.openapi.startsWith("3.")){K.openapi=c(B),U(K.openapi,K,pe),_(K.openapi,K,pe),d.optionalResolve(K).then(function(){return K.direct?q(K.openapi):q(K)}).catch(function(W){console.warn(W),pe(W)});return}if(!B.swagger||B.swagger!="2.0")return pe(new x("Unsupported swagger/OpenAPI version: "+(B.openapi?B.openapi:B.swagger)));let he=K.openapi={};if(he.openapi=typeof K.targetVersion=="string"&&K.targetVersion.startsWith("3.")?K.targetVersion:y,K.origin){he["x-origin"]||(he["x-origin"]=[]);let W={};W.url=K.source||K.origin,W.format="swagger",W.version=B.swagger,W.converter={},W.converter.url="https://github.com/mermade/oas-kit",W.converter.version=f,he["x-origin"].push(W)}if(he=Object.assign(he,c(B)),delete he.swagger,u(he,{},function(W,ae,se){W[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&se.path.indexOf("/example")<0&&delete W[ae]}),B.host)for(let W of Array.isArray(B.schemes)?B.schemes:[""]){let ae={},se=(B.basePath||"").replace(/\/$/,"");ae.url=(W?W+":":"")+"//"+B.host+se,Y(ae),he.servers||(he.servers=[]),he.servers.push(ae)}else if(B.basePath){let W={};W.url=B.basePath,Y(W),he.servers||(he.servers=[]),he.servers.push(W)}if(delete he.host,delete he.basePath,he["x-servers"]&&Array.isArray(he["x-servers"])&&(he.servers=he["x-servers"],delete he["x-servers"]),B["x-ms-parameterized-host"]){let W=B["x-ms-parameterized-host"],ae={};ae.url=W.hostTemplate+(B.basePath?B.basePath:""),ae.variables={};const se=ae.url.match(/\{\w+\}/g);for(let ve in W.parameters){let ge=W.parameters[ve];ge.$ref&&(ge=l(o(he,ge.$ref))),ve.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=se[ve].replace("{","").replace("}","")),ae.variables[ge.name]=ge,delete ge.name)}he.servers||(he.servers=[]),W.useSchemePrefix===!1?he.servers.push(ae):B.schemes.forEach(ve=>{he.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete he["x-ms-parameterized-host"]}U(he,K,pe),_(he,K,pe),typeof he.consumes=="string"&&(he.consumes=[he.consumes]),typeof he.produces=="string"&&(he.produces=[he.produces]),he.components={},he["x-callbacks"]&&(he.components.callbacks=he["x-callbacks"],delete he["x-callbacks"]),he.components.examples={},he.components.headers={},he["x-links"]&&(he.components.links=he["x-links"],delete he["x-links"]),he.components.parameters=he.parameters||{},he.components.responses=he.responses||{},he.components.requestBodies={},he.components.securitySchemes=he.securityDefinitions||{},he.components.schemas=he.definitions||{},delete he.definitions,delete he.responses,delete he.parameters,delete he.securityDefinitions,d.optionalResolve(K).then(function(){V(K.openapi,K),K.direct?q(K.openapi):q(K)}).catch(function(W){console.warn(W),pe(W)})}))}function ne(B,K,le){return a(le,new Promise(function(q,pe){let he=null,W=null;try{he=JSON.parse(B),K.text=JSON.stringify(he,null,2)}catch(ae){W=ae;try{he=n.parse(B,{schema:"core",prettyErrors:!0}),K.sourceYaml=!0,K.text=B}catch(se){W=se}}he?Q(he,K).then(ae=>q(ae)).catch(ae=>pe(ae)):pe(new x(W?W.message:"Could not parse string"))}))}function ue(B,K,le){return a(le,new Promise(function(q,pe){K.origin=!0,K.source||(K.source=B),K.verbose&&console.warn("GET "+B),K.fetch||(K.fetch=r);const he=Object.assign({},K.fetchOptions,{agent:K.agent});K.fetch(B,he).then(function(W){if(W.status!==200)throw new x(`Received status code ${W.status}: ${B}`);return W.text()}).then(function(W){ne(W,K).then(ae=>q(ae)).catch(ae=>pe(ae))}).catch(function(W){pe(W)})}))}function ye(B,K,le){return a(le,new Promise(function(q,pe){e.readFile(B,K.encoding||"utf8",function(he,W){he?pe(he):(K.sourceFile=B,ne(W,K).then(ae=>q(ae)).catch(ae=>pe(ae)))})}))}function Ce(B,K,le){return a(le,new Promise(function(q,pe){let he="";B.on("data",function(W){he+=W}).on("end",function(){ne(he,K).then(W=>q(W)).catch(W=>pe(W))})}))}return Z7={S2OError:x,targetVersion:y,convert:Q,convertObj:Q,convertUrl:ue,convertStr:ne,convertFile:ye,convertStream:Ce},Z7}var aat=tat();const rat=Ur(aat);function nat(e){return e.paths||(e.paths={}),new Promise((t,a)=>rat.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return a(r);t(n?.openapi)}))}async function iat(){try{return(await yae())?.resolvedConfig.openapi||{}}catch{return{}}}async function oat(e){const t=await yae(),a={config:t,base:ou?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};ou&&(t.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?a.doc=sat(e):a.ref=e;const{bundle:{parsed:r}}=await ztt(a);return r.swagger!==void 0?nat(r):r}function sat(e){return{source:{absoluteRef:""},parsed:e}}async function lat(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await oat(e||t);try{HGe(r)}catch{}return r}const cat=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=A.useState(),[s,l]=A.useState(!0),[c,u]=A.useState(null),[d,h]=A.useState(e||{});A.useEffect(()=>{async function v(){l(!0);try{const f=await iat();h({...e,...f}),u(await lat(a,t,e))}catch(f){o(f.message)}}v()},[a,t,e]);const m=A.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},GGe([c,t,d]));return A.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?dl(e?.hideLoading,!1)?null:p.jsx(QZe,{color:"--loading-spinner-color"}):A.isValidElement(n)?A.cloneElement(n,{store:m}):null};function uat({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(cat,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(Iee,{withCommonStyles:!0,router:o||"hash"})})}function dat(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function pat(e){const t=dat(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function hat(e,t=document.querySelector("redoc")){oF.hydrateRoot(t,p.jsx(Iee,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function _re(e,t={},a=UT("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...t,...pat(a)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),oF.createRoot(a).render(A.createElement(uat,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const mat="3.18.0-next.2",gat="dd5355ebe5";function fat(){const e=UT("redoc");if(!e)return;const t=e.getAttribute("spec-url");t&&_re(t,{},e)}fat();function R1(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 Lre={exports:{}},Nre;function vat(){return Nre||(Nre=1,(function(e,t){(function(a){e.exports=a()})(function(){return(function a(r,n,i){function o(c,u){if(!n[c]){if(!r[c]){var d=typeof R1=="function"&&R1;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[c]={exports:{}};r[c][0].call(m.exports,function(v){var f=r[c][1][v];return o(f||v)},m,m.exports,a,r,n,i)}return n[c].exports}for(var s=typeof R1=="function"&&R1,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(a,r,n){var i=a("./utils"),o=a("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(l){for(var c,u,d,h,m,v,f,y=[],k=0,x=l.length,z=x,S=i.getTypeOf(l)!=="string";k<l.length;)z=x-k,d=S?(c=l[k++],u=k<x?l[k++]:0,k<x?l[k++]:0):(c=l.charCodeAt(k++),u=k<x?l.charCodeAt(k++):0,k<x?l.charCodeAt(k++):0),h=c>>2,m=(3&c)<<4|u>>4,v=1<z?(15&u)<<2|d>>6:64,f=2<z?63&d:64,y.push(s.charAt(h)+s.charAt(m)+s.charAt(v)+s.charAt(f));return y.join("")},n.decode=function(l){var c,u,d,h,m,v,f=0,y=0,k="data:";if(l.substr(0,k.length)===k)throw new Error("Invalid base64 input, it looks like a data url.");var x,z=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===s.charAt(64)&&z--,l.charAt(l.length-2)===s.charAt(64)&&z--,z%1!=0)throw new Error("Invalid base64 input, bad content length.");for(x=o.uint8array?new Uint8Array(0|z):new Array(0|z);f<l.length;)c=s.indexOf(l.charAt(f++))<<2|(h=s.indexOf(l.charAt(f++)))>>4,u=(15&h)<<4|(m=s.indexOf(l.charAt(f++)))>>2,d=(3&m)<<6|(v=s.indexOf(l.charAt(f++))),x[y++]=c,m!==64&&(x[y++]=u),v!==64&&(x[y++]=d);return x}},{"./support":30,"./utils":32}],2:[function(a,r,n){var i=a("./external"),o=a("./stream/DataWorker"),s=a("./stream/Crc32Probe"),l=a("./stream/DataLengthProbe");function c(u,d,h,m,v){this.compressedSize=u,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=v}c.prototype={getContentWorker:function(){var u=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return u.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,d,h){return u.pipe(new s).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,r,n){var i=a("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,r,n){var i=a("./utils"),o=(function(){for(var s,l=[],c=0;c<256;c++){s=c;for(var u=0;u<8;u++)s=1&s?3988292384^s>>>1:s>>>1;l[c]=s}return l})();r.exports=function(s,l){return s!==void 0&&s.length?i.getTypeOf(s)!=="string"?(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u[f])];return-1^c})(0|l,s,s.length,0):(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u.charCodeAt(f))];return-1^c})(0|l,s,s.length,0):0}},{"./utils":32}],5:[function(a,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(a,r,n){var i=null;i=typeof Promise<"u"?Promise:a("lie"),r.exports={Promise:i}},{lie:37}],7:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=a("pako"),s=a("./utils"),l=a("./stream/GenericWorker"),c=i?"uint8array":"array";function u(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}n.magic="\b\0",s.inherits(u,l),u.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(c,d.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},n.compressWorker=function(d){return new u("Deflate",d)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,r,n){function i(m,v){var f,y="";for(f=0;f<v;f++)y+=String.fromCharCode(255&m),m>>>=8;return y}function o(m,v,f,y,k,x){var z,S,w=m.file,C=m.compression,j=x!==c.utf8encode,M=s.transformTo("string",x(w.name)),E=s.transformTo("string",c.utf8encode(w.name)),L=w.comment,D=s.transformTo("string",x(L)),R=s.transformTo("string",c.utf8encode(L)),F=E.length!==w.name.length,N=R.length!==L.length,te="",X="",ie="",ee=w.dir,ce=w.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};v&&!f||(Z.crc32=m.crc32,Z.compressedSize=m.compressedSize,Z.uncompressedSize=m.uncompressedSize);var V=0;v&&(V|=8),j||!F&&!N||(V|=2048);var Y=0,U=0;ee&&(Y|=16),k==="UNIX"?(U=798,Y|=(function(G,Q){var ne=G;return G||(ne=Q?16893:33204),(65535&ne)<<16})(w.unixPermissions,ee)):(U=20,Y|=(function(G){return 63&(G||0)})(w.dosPermissions)),z=ce.getUTCHours(),z<<=6,z|=ce.getUTCMinutes(),z<<=5,z|=ce.getUTCSeconds()/2,S=ce.getUTCFullYear()-1980,S<<=4,S|=ce.getUTCMonth()+1,S<<=5,S|=ce.getUTCDate(),F&&(X=i(1,1)+i(u(M),4)+E,te+="up"+i(X.length,2)+X),N&&(ie=i(1,1)+i(u(D),4)+R,te+="uc"+i(ie.length,2)+ie);var _="";return _+=`
|
|
10431
|
+
`," "],s=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(s),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],d=255,h=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=Ttt();function x(C,j,M){if(C&&t.isObject(C)&&C instanceof a)return C;var E=new a;return E.parse(C,j,M),E}a.prototype.parse=function(C,j,M){if(!t.isString(C))throw new TypeError("Parameter 'url' must be a string, not "+typeof C);var E=C.indexOf("?"),L=E!==-1&&E<C.indexOf("#")?"?":"#",D=C.split(L),R=/\\/g;D[0]=D[0].replace(R,"/"),C=D.join(L);var F=C;if(F=F.trim(),!M&&C.split("#").length===1){var N=i.exec(F);if(N)return this.path=F,this.href=F,this.pathname=N[1],N[2]?(this.search=N[2],j?this.query=k.parse(this.search.substr(1)):this.query=this.search.substr(1)):j&&(this.search="",this.query={}),this}var te=r.exec(F);if(te){te=te[0];var X=te.toLowerCase();this.protocol=X,F=F.substr(te.length)}if(M||te||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var ie=F.substr(0,2)==="//";ie&&!(te&&f[te])&&(F=F.substr(2),this.slashes=!0)}if(!f[te]&&(ie||te&&!y[te])){for(var ee=-1,ce=0;ce<u.length;ce++){var Z=F.indexOf(u[ce]);Z!==-1&&(ee===-1||Z<ee)&&(ee=Z)}var V,Y;ee===-1?Y=F.lastIndexOf("@"):Y=F.lastIndexOf("@",ee),Y!==-1&&(V=F.slice(0,Y),F=F.slice(Y+1),this.auth=decodeURIComponent(V)),ee=-1;for(var ce=0;ce<c.length;ce++){var Z=F.indexOf(c[ce]);Z!==-1&&(ee===-1||Z<ee)&&(ee=Z)}ee===-1&&(ee=F.length),this.host=F.slice(0,ee),F=F.slice(ee),this.parseHost(),this.hostname=this.hostname||"";var U=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!U)for(var _=this.hostname.split(/\./),ce=0,G=_.length;ce<G;ce++){var Q=_[ce];if(Q&&!Q.match(h)){for(var ne="",ue=0,ye=Q.length;ue<ye;ue++)Q.charCodeAt(ue)>127?ne+="x":ne+=Q[ue];if(!ne.match(h)){var Ce=_.slice(0,ce),B=_.slice(ce+1),K=Q.match(m);K&&(Ce.push(K[1]),B.unshift(K[2])),B.length&&(F="/"+B.join(".")+F),this.hostname=Ce.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=e.toASCII(this.hostname));var le=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+le,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!v[X])for(var ce=0,G=l.length;ce<G;ce++){var pe=l[ce];if(F.indexOf(pe)!==-1){var he=encodeURIComponent(pe);he===pe&&(he=escape(pe)),F=F.split(pe).join(he)}}var W=F.indexOf("#");W!==-1&&(this.hash=F.substr(W),F=F.slice(0,W));var ae=F.indexOf("?");if(ae!==-1?(this.search=F.substr(ae),this.query=F.substr(ae+1),j&&(this.query=k.parse(this.query)),F=F.slice(0,ae)):j&&(this.search="",this.query={}),F&&(this.pathname=F),y[X]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var le=this.pathname||"",se=this.search||"";this.path=le+se}return this.href=this.format(),this};function z(C){return t.isString(C)&&(C=x(C)),C instanceof a?C.format():a.prototype.format.call(C)}a.prototype.format=function(){var C=this.auth||"";C&&(C=encodeURIComponent(C),C=C.replace(/%3A/i,":"),C+="@");var j=this.protocol||"",M=this.pathname||"",E=this.hash||"",L=!1,D="";this.host?L=C+this.host:this.hostname&&(L=C+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(L+=":"+this.port)),this.query&&t.isObject(this.query)&&Object.keys(this.query).length&&(D=k.stringify(this.query));var R=this.search||D&&"?"+D||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||y[j])&&L!==!1?(L="//"+(L||""),M&&M.charAt(0)!=="/"&&(M="/"+M)):L||(L=""),E&&E.charAt(0)!=="#"&&(E="#"+E),R&&R.charAt(0)!=="?"&&(R="?"+R),M=M.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),R=R.replace("#","%23"),j+L+M+R+E};function S(C,j){return x(C,!1,!0).resolve(j)}a.prototype.resolve=function(C){return this.resolveObject(x(C,!1,!0)).format()};function w(C,j){return C?x(C,!1,!0).resolveObject(j):j}return a.prototype.resolveObject=function(C){if(t.isString(C)){var j=new a;j.parse(C,!1,!0),C=j}for(var M=new a,E=Object.keys(this),L=0;L<E.length;L++){var D=E[L];M[D]=this[D]}if(M.hash=C.hash,C.href==="")return M.href=M.format(),M;if(C.slashes&&!C.protocol){for(var R=Object.keys(C),F=0;F<R.length;F++){var N=R[F];N!=="protocol"&&(M[N]=C[N])}return y[M.protocol]&&M.hostname&&!M.pathname&&(M.path=M.pathname="/"),M.href=M.format(),M}if(C.protocol&&C.protocol!==M.protocol){if(!y[C.protocol]){for(var te=Object.keys(C),X=0;X<te.length;X++){var ie=te[X];M[ie]=C[ie]}return M.href=M.format(),M}if(M.protocol=C.protocol,!C.host&&!f[C.protocol]){for(var G=(C.pathname||"").split("/");G.length&&!(C.host=G.shift()););C.host||(C.host=""),C.hostname||(C.hostname=""),G[0]!==""&&G.unshift(""),G.length<2&&G.unshift(""),M.pathname=G.join("/")}else M.pathname=C.pathname;if(M.search=C.search,M.query=C.query,M.host=C.host||"",M.auth=C.auth,M.hostname=C.hostname||C.host,M.port=C.port,M.pathname||M.search){var ee=M.pathname||"",ce=M.search||"";M.path=ee+ce}return M.slashes=M.slashes||C.slashes,M.href=M.format(),M}var Z=M.pathname&&M.pathname.charAt(0)==="/",V=C.host||C.pathname&&C.pathname.charAt(0)==="/",Y=V||Z||M.host&&C.pathname,U=Y,_=M.pathname&&M.pathname.split("/")||[],G=C.pathname&&C.pathname.split("/")||[],Q=M.protocol&&!y[M.protocol];if(Q&&(M.hostname="",M.port=null,M.host&&(_[0]===""?_[0]=M.host:_.unshift(M.host)),M.host="",C.protocol&&(C.hostname=null,C.port=null,C.host&&(G[0]===""?G[0]=C.host:G.unshift(C.host)),C.host=null),Y=Y&&(G[0]===""||_[0]==="")),V)M.host=C.host||C.host===""?C.host:M.host,M.hostname=C.hostname||C.hostname===""?C.hostname:M.hostname,M.search=C.search,M.query=C.query,_=G;else if(G.length)_||(_=[]),_.pop(),_=_.concat(G),M.search=C.search,M.query=C.query;else if(!t.isNullOrUndefined(C.search)){if(Q){M.hostname=M.host=_.shift();var ne=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ne&&(M.auth=ne.shift(),M.host=M.hostname=ne.shift())}return M.search=C.search,M.query=C.query,(!t.isNull(M.pathname)||!t.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.href=M.format(),M}if(!_.length)return M.pathname=null,M.search?M.path="/"+M.search:M.path=null,M.href=M.format(),M;for(var ue=_.slice(-1)[0],ye=(M.host||C.host||_.length>1)&&(ue==="."||ue==="..")||ue==="",Ce=0,B=_.length;B>=0;B--)ue=_[B],ue==="."?_.splice(B,1):ue===".."?(_.splice(B,1),Ce++):Ce&&(_.splice(B,1),Ce--);if(!Y&&!U)for(;Ce--;Ce)_.unshift("..");Y&&_[0]!==""&&(!_[0]||_[0].charAt(0)!=="/")&&_.unshift(""),ye&&_.join("/").substr(-1)!=="/"&&_.push("");var K=_[0]===""||_[0]&&_[0].charAt(0)==="/";if(Q){M.hostname=M.host=K?"":_.length?_.shift():"";var ne=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ne&&(M.auth=ne.shift(),M.host=M.hostname=ne.shift())}return Y=Y||M.host&&_.length,Y&&!K&&_.unshift(""),_.length?M.pathname=_.join("/"):(M.pathname=null,M.path=null),(!t.isNull(M.pathname)||!t.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.auth=C.auth||M.auth,M.slashes=M.slashes||C.slashes,M.href=M.format(),M},a.prototype.parseHost=function(){var C=this.host,j=n.exec(C);j&&(j=j[0],j!==":"&&(this.port=j.substr(1)),C=C.substr(0,C.length-j.length)),C&&(this.hostname=C)},Hm}var v7,Aae;function Btt(){if(Aae)return v7;Aae=1;function e(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}return v7=e(),v7}var b7,Mae;function Ett(){if(Mae)return b7;Mae=1;var e=Btt();return b7=function(t,a){if(t){a.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})});return}else return a},b7}var k7,Tae;function e2(){if(Tae)return k7;Tae=1;function e(r){return r.replace(/\~/g,"~0").replace(/\//g,"~1")}function t(r){return r.replace(/\~1/g,"/").replace(/~0/g,"~")}function a(r,n,i){if(typeof r>"u")return!1;if(!n||typeof n!="string"||n==="#")return typeof i<"u"?i:r;if(n.indexOf("#")>=0){let s=n.split("#");if(s[0])return!1;n=s[1],n=decodeURIComponent(n.slice(1).split("+").join(" "))}n.startsWith("/")&&(n=n.slice(1));let o=n.split("/");for(let s=0;s<o.length;s++){o[s]=t(o[s]);let l=typeof i<"u"&&s==o.length-1,c=parseInt(o[s],10);if(!Array.isArray(r)||isNaN(c)||c.toString()!==o[s]?c=Array.isArray(r)&&o[s]==="-"?-2:-1:o[s]=s>0?o[s-1]:"",c!=-1||r&&r.hasOwnProperty(o[s]))if(c>=0)l&&(r[c]=i),r=r[c];else{if(c===-2)return l?(Array.isArray(r)&&r.push(i),i):void 0;l&&(r[o[s]]=i),r=r[o[s]]}else if(typeof i<"u"&&typeof r=="object"&&!Array.isArray(r))r[o[s]]=l?i:o[s+1]==="0"||o[s+1]==="-"?[]:{},r=r[o[s]];else return!1}return r}return k7={jptr:a,jpescape:e,jpunescape:t},k7}var y7,Bae;function x7(){if(Bae)return y7;Bae=1;function e(t,a){return a==="$ref"&&!!t&&typeof t[a]=="string"}return y7={isRef:e},y7}var w7,Eae;function t2(){if(Eae)return w7;Eae=1;function e(o){return o}function t(o){return JSON.parse(JSON.stringify(o))}function a(o){let s={};for(let l in o)o.hasOwnProperty(l)&&(s[l]=o[l]);return s}function r(o){let s=Array.isArray(o)?[]:{};for(let l in o)(o.hasOwnProperty(l)||Array.isArray(o))&&(s[l]=typeof o[l]=="object"?r(o[l]):o[l]);return s}function n(o){return Object.assign({},o)}function i(o,s){if(s||(s=new WeakMap),Object(o)!==o||o instanceof Function)return o;if(s.has(o))return s.get(o);try{var l=new o.constructor}catch{l=Object.create(Object.getPrototypeOf(o))}return s.set(o,l),Object.assign(l,...Object.keys(o).map(c=>({[c]:i(o[c],s)})))}return w7={nop:e,clone:t,shallowClone:a,deepClone:r,fastClone:n,circularClone:i},w7}var O7,Rae;function z7(){if(Rae)return O7;Rae=1;const e=e2().jpescape;function t(){return{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1}}function a(r,n,i){if(n||(n={depth:0}),n.depth||(n=Object.assign({},t(),n)),typeof r!="object")return;let o=n.path;for(let s in r){if(n.key=s,n.path=n.path+"/"+encodeURIComponent(e(s)),n.identityPath=n.seen.get(r[s]),n.identity=typeof n.identityPath<"u",r.hasOwnProperty(s)&&i(r,s,n),typeof r[s]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(r[s])&&r[s]!==null&&n.seen.set(r[s],n.path);let l={};l.parent=r,l.path=n.path,l.depth=n.depth?n.depth+1:1,l.pkey=s,l.payload=n.payload,l.seen=n.seen,l.identity=!1,l.identityDetection=n.identityDetection,a(r[s],l,i)}n.path=o}}return O7={recurse:a},O7}var S7,_ae;function Rtt(){if(_ae)return S7;_ae=1;const e=z7().recurse,t=t2().shallowClone,a=e2().jptr,r=x7().isRef;var n=function(o){return o&&o.verbose?{warn:function(){var s=Array.prototype.slice.call(arguments);console.warn.apply(console,s)}}:{warn:function(){}}};function i(o,s,l){l||(l={}),l.cache||(l.cache={}),l.state||(l.state={}),l.state.identityDetection=!0,l.depth=l.depth?l.depth+1:1;let c=l.depth>1?o:t(o),u={data:c},d=l.depth>1?s:t(s);l.master||(l.master=c);let h=n(l),m=1;for(;m>0;)m=0,e(u,l.state,function(v,f,y){if(r(v,f)){let k=v[f];if(m++,l.cache[k]){let x=l.cache[k];if(x.resolved)h.warn("Patching %s for %s",k,x.path),y.parent[y.pkey]=x.data,l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=k);else{if(k===x.path)throw new Error(`Tight circle at ${x.path}`);h.warn("Unresolved ref"),y.parent[y.pkey]=a(x.source,x.path),y.parent[y.pkey]===!1&&(y.parent[y.pkey]=a(x.source,x.key)),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[l.$ref]=k)}}else{let x={};x.path=y.path.split("/$ref")[0],x.key=k,h.warn("Dereffing %s at %s",k,x.path),x.source=d,x.data=a(x.source,x.key),x.data===!1&&(x.data=a(l.master,x.key),x.source=l.master),x.data===!1&&h.warn("Missing $ref target",x.key),l.cache[k]=x,x.data=y.parent[y.pkey]=i(a(x.source,x.key),x.source,l),l.$ref&&typeof y.parent[y.pkey]=="object"&&y.parent[y.pkey]!==null&&(y.parent[y.pkey][l.$ref]=k),x.resolved=!0}}});return u.data}return S7={dereference:i},S7}var C7,Lae;function _tt(){if(Lae)return C7;Lae=1,C7=i,i.default=i,i.stable=c,i.stableStringify=c;var e="[...]",t="[Circular]",a=[],r=[];function n(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(h,m,v,f){typeof f>"u"&&(f=n()),s(h,"",0,[],void 0,0,f);var y;try{r.length===0?y=JSON.stringify(h,m,v):y=JSON.stringify(h,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var k=a.pop();k.length===4?Object.defineProperty(k[0],k[1],k[3]):k[0][k[1]]=k[2]}}return y}function o(h,m,v,f){var y=Object.getOwnPropertyDescriptor(f,v);y.get!==void 0?y.configurable?(Object.defineProperty(f,v,{value:h}),a.push([f,v,m,y])):r.push([m,v,h]):(f[v]=h,a.push([f,v,m]))}function s(h,m,v,f,y,k,x){k+=1;var z;if(typeof h=="object"&&h!==null){for(z=0;z<f.length;z++)if(f[z]===h){o(t,h,m,y);return}if(typeof x.depthLimit<"u"&&k>x.depthLimit){o(e,h,m,y);return}if(typeof x.edgesLimit<"u"&&v+1>x.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(z=0;z<h.length;z++)s(h[z],z,z,f,h,k,x);else{var S=Object.keys(h);for(z=0;z<S.length;z++){var w=S[z];s(h[w],w,z,f,h,k,x)}}f.pop()}}function l(h,m){return h<m?-1:h>m?1:0}function c(h,m,v,f){typeof f>"u"&&(f=n());var y=u(h,"",0,[],void 0,0,f)||h,k;try{r.length===0?k=JSON.stringify(y,m,v):k=JSON.stringify(y,d(m),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;a.length!==0;){var x=a.pop();x.length===4?Object.defineProperty(x[0],x[1],x[3]):x[0][x[1]]=x[2]}}return k}function u(h,m,v,f,y,k,x){k+=1;var z;if(typeof h=="object"&&h!==null){for(z=0;z<f.length;z++)if(f[z]===h){o(t,h,m,y);return}try{if(typeof h.toJSON=="function")return}catch{return}if(typeof x.depthLimit<"u"&&k>x.depthLimit){o(e,h,m,y);return}if(typeof x.edgesLimit<"u"&&v+1>x.edgesLimit){o(e,h,m,y);return}if(f.push(h),Array.isArray(h))for(z=0;z<h.length;z++)u(h[z],z,z,f,h,k,x);else{var S={},w=Object.keys(h).sort(l);for(z=0;z<w.length;z++){var C=w[z];u(h[C],C,z,f,h,k,x),S[C]=h[C]}if(typeof y<"u")a.push([y,m,h]),y[m]=S;else return S}f.pop()}}function d(h){return h=typeof h<"u"?h:function(m,v){return v},function(m,v){if(r.length>0)for(var f=0;f<r.length;f++){var y=r[f];if(y[1]===m&&y[0]===v){v=y[2],r.splice(f,1);break}}return h.call(this,m,v)}}return C7}var j7,Nae;function Iae(){if(Nae)return j7;Nae=1;var e={};const t=_tt(),a=e.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1B[31m",yellow:"\x1B[33;1m",green:"\x1B[32m",normal:"\x1B[0m"};function r(y,k,x){return x.indexOf(y)===k}function n(y){return new Set(y).size!==y.length}function i(y){return new Set(y).size<=1}function o(y,k){function x(z,S){return t.stringify(z)===t.stringify(Object.assign({},z,S))}return x(y,k)&&x(k,y)}function s(y){let k=[];for(let x of y)k.find(function(z,S,w){return o(z,x)})||k.push(x);return k}function l(y){return y.length===s(y).length}function c(y){return y.find(function(k,x,z){return y.indexOf(k)<x})}function u(y){let k=0,x;if(y.length===0)return k;for(let z=0;z<y.length;z++)x=y.charCodeAt(z),k=(k<<5)-k+x,k|=0;return k}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,function(y,k){return k.toUpperCase()})};const d=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],h=["items","minItems","maxItems","uniqueItems"],m=["get","post","put","delete","patch","head","options","trace"];function v(y){y=y.replace("[]","Array");let k=y.split("/");return k[0]=k[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),k.join("/")}function f(y){return v(y.split("/").join("_"))}return j7={colour:a,uniqueOnly:r,hasDuplicates:n,allSame:i,distinctArray:l,firstDupe:c,hash:u,parameterTypeProperties:d,arrayProperties:h,httpMethods:m,sanitise:v,sanitiseAll:f},j7}var P7,$ae;function Ltt(){if($ae)return P7;$ae=1;const e=kv,t=UQ(),a=f7(),r=kv,n=kv,i=e2().jptr,o=z7().recurse,s=t2().clone,l=Rtt().dereference,c=x7().isRef,u=Iae();function d(M){return[...new Set(M)]}function h(M,E,L,D,R){return new Promise(function(F,N){e.readFile(M,E,function(te,X){te?L.ignoreIOErrors&&R?(L.verbose&&console.warn("FAILED",D),L.externalRefs[D].failed=!0,F(R)):N(te):F(X)})})}function m(M,E,L,D,R,F){let N=F.externalRefs[L+D].paths[0],te=a.parse(R),X={},ie=1;for(;ie;)ie=0,o(M,{identityDetection:!0},function(ee,ce,Z){if(c(ee,ce)){if(ee[ce].startsWith("#")){if(!X[ee[ce]]&&!ee.$fixed){let V=s(i(E,ee[ce]));if(F.verbose>1&&console.warn((V===!1?u.colour.red:u.colour.green)+"Fragment resolution",ee[ce],u.colour.normal),V===!1){if(Z.parent[Z.pkey]={},F.fatal){let Y=new Error("Fragment $ref resolution failed "+ee[ce]);if(F.promise)F.promise.reject(Y);else throw Y}}else ie++,Z.parent[Z.pkey]=V,X[ee[ce]]=Z.path.replace("/%24ref","")}else if(!ee.$fixed){let V=(N+"/"+X[ee[ce]]).split("/#/").join("/");Z.parent[Z.pkey]={$ref:V,"x-miro":ee[ce],$fixed:!0},F.verbose>1&&console.warn("Replacing with",V),ie++}}else if(te.protocol){let V=a.resolve(R,ee[ce]).toString();F.verbose>1&&console.warn(u.colour.yellow+"Rewriting external url ref",ee[ce],"as",V,u.colour.normal),ee["x-miro"]=ee[ce],F.externalRefs[ee[ce]]&&(F.externalRefs[V]||(F.externalRefs[V]=F.externalRefs[ee[ce]]),F.externalRefs[V].failed=F.externalRefs[ee[ce]].failed),ee[ce]=V}else if(!ee["x-miro"]){let V=a.resolve(R,ee[ce]).toString(),Y=!1;F.externalRefs[ee[ce]]&&(Y=F.externalRefs[ee[ce]].failed),Y||(F.verbose>1&&console.warn(u.colour.yellow+"Rewriting external ref",ee[ce],"as",V,u.colour.normal),ee["x-miro"]=ee[ce],ee[ce]=V)}}});return o(M,{},function(ee,ce,Z){c(ee,ce)&&typeof ee.$fixed<"u"&&delete ee.$fixed}),F.verbose>1&&console.warn("Finished fragment resolution"),M}function v(M,E){if(!E.filters||!E.filters.length)return M;for(let L of E.filters)M=L(M,E);return M}function f(M,E){return M&&M.length>2?M:E&&E.length>2?E:"file:"}function y(M,E,L,D){var R=a.parse(L.source),F=L.source.split("\\").join("/").split("/");F.pop()||F.pop();let N="",te=E.split("#");te.length>1&&(N="#"+te[1],E=te[0]),F=F.join("/");let X=a.parse(E),ie=f(X.protocol,R.protocol),ee;if(ie==="file:"?ee=t.resolve(F?F+"/":"",E):ee=a.resolve(F?F+"/":"",E),L.cache[ee]){L.verbose&&console.warn("CACHED",ee,N);let ce=s(L.cache[ee]),Z=L.externalRef=ce;if(N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let V=new Error("Cached $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(V);else throw V}return Z=m(Z,ce,E,N,ee,L),Z=v(Z,L),D(s(Z),ee,L),Promise.resolve(Z)}if(L.verbose&&console.warn("GET",ee,N),L.handlers&&L.handlers[ie])return L.handlers[ie](F,E,N,L).then(function(ce){return L.externalRef=ce,ce=v(ce,L),L.cache[ee]=ce,D(ce,ee,L),ce}).catch(function(ce){throw L.verbose&&console.warn(ce),ce});if(ie&&ie.startsWith("http")){const ce=Object.assign({},L.fetchOptions,{agent:L.agent});return L.fetch(ee,ce).then(function(Z){if(Z.status!==200){if(L.ignoreIOErrors)return L.verbose&&console.warn("FAILED",E),L.externalRefs[E].failed=!0,'{"$ref":"'+E+'"}';throw new Error(`Received status code ${Z.status}: ${ee}`)}return Z.text()}).then(function(Z){try{let V=n.parse(Z,{schema:"core",prettyErrors:!0});if(Z=L.externalRef=V,L.cache[ee]=s(Z),N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let Y=new Error("Remote $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(Y);else throw Y}Z=m(Z,V,E,N,ee,L),Z=v(Z,L)}catch(V){if(L.verbose&&console.warn(V),L.promise&&L.fatal)L.promise.reject(V);else throw V}return D(Z,ee,L),Z}).catch(function(Z){if(L.verbose&&console.warn(Z),L.cache[ee]={},L.promise&&L.fatal)L.promise.reject(Z);else throw Z})}else{const ce='{"$ref":"'+E+'"}';return h(ee,L.encoding||"utf8",L,E,ce).then(function(Z){try{let V=n.parse(Z,{schema:"core",prettyErrors:!0});if(Z=L.externalRef=V,L.cache[ee]=s(Z),N&&(Z=i(Z,N),Z===!1&&(Z={},L.fatal))){let Y=new Error("File $ref resolution failed "+ee+N);if(L.promise)L.promise.reject(Y);else throw Y}Z=m(Z,V,E,N,ee,L),Z=v(Z,L)}catch(V){if(L.verbose&&console.warn(V),L.promise&&L.fatal)L.promise.reject(V);else throw V}return D(Z,ee,L),Z}).catch(function(Z){if(L.verbose&&console.warn(Z),L.promise&&L.fatal)L.promise.reject(Z);else throw Z})}}function k(M){return new Promise(function(E,L){function D(F,N,te){if(F[N]&&c(F[N],"$ref")){let X=F[N].$ref;if(!X.startsWith("#")){let ie="";if(!R[X]){let ee=Object.keys(R).find(function(ce,Z,V){return X.startsWith(ce+"/")});ee&&(M.verbose&&console.warn("Found potential subschema at",ee),ie="/"+(X.split("#")[1]||"").replace(ee.split("#")[1]||""),ie=ie.split("/undefined").join(""),X=ee)}if(R[X]||(R[X]={resolved:!1,paths:[],extras:{},description:F[N].description}),R[X].resolved){if(!R[X].failed)if(M.rewriteRefs){let ee=R[X].resolvedAt;M.verbose>1&&console.warn("Rewriting ref",X,ee),F[N]["x-miro"]=X,F[N].$ref=ee+ie}else F[N]=s(R[X].data)}else R[X].paths.push(te.path),R[X].extras[te.path]=ie}}}let R=M.externalRefs;if(M.resolver.depth>0&&M.source===M.resolver.base)return E(R);o(M.openapi.definitions,{identityDetection:!0,path:"#/definitions"},D),o(M.openapi.components,{identityDetection:!0,path:"#/components"},D),o(M.openapi,{identityDetection:!0},D),E(R)})}function x(M){return new Promise(function(E,L){k(M).then(function(R){for(let F in R)if(!R[F].resolved){let N=M.resolver.depth;N>0&&N++,M.resolver.actions[N].push(function(){return y(M.openapi,F,M,function(te,X,ie){if(!R[F].resolved){let Z={};Z.context=R[F],Z.$ref=F,Z.original=s(te),Z.updated=te,Z.source=X,ie.externals.push(Z),R[F].resolved=!0}let ee=Object.assign({},ie,{source:"",resolver:{actions:ie.resolver.actions,depth:ie.resolver.actions.length-1,base:ie.resolver.base}});ie.patch&&R[F].description&&!te.description&&typeof te=="object"&&(te.description=R[F].description),R[F].data=te;let ce=d(R[F].paths);ce=ce.sort(function(Z,V){const Y=Z.startsWith("#/components/")||Z.startsWith("#/definitions/"),U=V.startsWith("#/components/")||V.startsWith("#/definitions/");return Y&&!U?-1:U&&!Y?1:0});for(let Z of ce)if(R[F].resolvedAt&&Z!==R[F].resolvedAt&&Z.indexOf("x-ms-examples/")<0)ie.verbose>1&&console.warn("Creating pointer to data at",Z),i(ie.openapi,Z,{$ref:R[F].resolvedAt+R[F].extras[Z],"x-miro":F+R[F].extras[Z]});else{R[F].resolvedAt?ie.verbose>1&&console.warn("Avoiding circular reference"):(R[F].resolvedAt=Z,ie.verbose>1&&console.warn("Creating initial clone of data at",Z));let V=s(te);i(ie.openapi,Z,V)}ie.resolver.actions[ee.resolver.depth].length===0&&ie.resolver.actions[ee.resolver.depth].push(function(){return x(ee)})})})}}).catch(function(R){M.verbose&&console.warn(R),L(R)});let D={options:M};D.actions=M.resolver.actions[M.resolver.depth],E(D)})}const z=M=>M.reduce((E,L)=>E.then(D=>L().then(Array.prototype.concat.bind(D))),Promise.resolve([]));function S(M,E,L){M.resolver.actions.push([]),x(M).then(function(D){z(D.actions).then(function(){if(M.resolver.depth>=M.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),E(!0);M.resolver.depth++,M.resolver.actions[M.resolver.depth].length?setTimeout(function(){S(D.options,E,L)},0):(M.verbose>1&&console.warn(u.colour.yellow+"Finished external resolution!",u.colour.normal),M.resolveInternal&&(M.verbose>1&&console.warn(u.colour.yellow+"Starting internal resolution!",u.colour.normal),M.openapi=l(M.openapi,M.original,{verbose:M.verbose-1}),M.verbose>1&&console.warn(u.colour.yellow+"Finished internal resolution!",u.colour.normal)),o(M.openapi,{},function(R,F,N){c(R,F)&&(M.preserveMiro||delete R["x-miro"])}),E(M))}).catch(function(R){M.verbose&&console.warn(R),L(R)})}).catch(function(D){M.verbose&&console.warn(D),L(D)})}function w(M){if(M.cache||(M.cache={}),M.fetch||(M.fetch=r),M.source){let E=a.parse(M.source);(!E.protocol||E.protocol.length<=2)&&(M.source=t.resolve(M.source))}M.externals=[],M.externalRefs={},M.rewriteRefs=!0,M.resolver={},M.resolver.depth=0,M.resolver.base=M.source,M.resolver.actions=[[]]}function C(M){return w(M),new Promise(function(E,L){M.resolve?S(M,E,L):E(M)})}function j(M,E,L){return L||(L={}),L.openapi=M,L.source=E,L.resolve=!0,w(L),new Promise(function(D,R){S(L,D,R)})}return P7={optionalResolve:C,resolve:j},P7}var A7,Dae;function Ntt(){if(Dae)return A7;Dae=1;function e(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}function t(a,r,n,i){if(typeof n.depth>"u"&&(n=e()),a===null||typeof a>"u")return a;if(typeof a.$ref<"u"){let o={$ref:a.$ref};return n.allowRefSiblings&&a.description&&(o.description=a.description),i(o,r,n),o}if(n.combine&&(a.allOf&&Array.isArray(a.allOf)&&a.allOf.length===1&&(a=Object.assign({},a.allOf[0],a),delete a.allOf),a.anyOf&&Array.isArray(a.anyOf)&&a.anyOf.length===1&&(a=Object.assign({},a.anyOf[0],a),delete a.anyOf),a.oneOf&&Array.isArray(a.oneOf)&&a.oneOf.length===1&&(a=Object.assign({},a.oneOf[0],a),delete a.oneOf)),i(a,r,n),n.seen.has(a))return a;if(typeof a=="object"&&a!==null&&n.seen.set(a,!0),n.top=!1,n.depth++,typeof a.items<"u"&&(n.property="items",t(a.items,a,n,i)),a.additionalItems&&typeof a.additionalItems=="object"&&(n.property="additionalItems",t(a.additionalItems,a,n,i)),a.additionalProperties&&typeof a.additionalProperties=="object"&&(n.property="additionalProperties",t(a.additionalProperties,a,n,i)),a.properties)for(let o in a.properties){let s=a.properties[o];n.property="properties/"+o,t(s,a,n,i)}if(a.patternProperties)for(let o in a.patternProperties){let s=a.patternProperties[o];n.property="patternProperties/"+o,t(s,a,n,i)}if(a.allOf)for(let o in a.allOf){let s=a.allOf[o];n.property="allOf/"+o,t(s,a,n,i)}if(a.anyOf)for(let o in a.anyOf){let s=a.anyOf[o];n.property="anyOf/"+o,t(s,a,n,i)}if(a.oneOf)for(let o in a.oneOf){let s=a.oneOf[o];n.property="oneOf/"+o,t(s,a,n,i)}return a.not&&(n.property="not",t(a.not,a,n,i)),n.depth--,a}return A7={getDefaultState:e,walkSchema:t},A7}var Kae={},M7={exports:{}},Vae={},Hae;function Gae(){return Hae||(Hae=1,(function(e){e.fetch=n(globalThis.fetch)&&n(globalThis.ReadableStream),e.writableStream=n(globalThis.WritableStream),e.abortController=n(globalThis.AbortController);var t;function a(){if(t!==void 0)return t;if(globalThis.XMLHttpRequest){t=new globalThis.XMLHttpRequest;try{t.open("GET",globalThis.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function r(i){var o=a();if(!o)return!1;try{return o.responseType=i,o.responseType===i}catch{}return!1}e.arraybuffer=e.fetch||r("arraybuffer"),e.msstream=!e.fetch&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(a()?n(a().overrideMimeType):!1);function n(i){return typeof i=="function"}t=null})(Vae)),Vae}var a2={},T7={exports:{}},r2={exports:{}},Fae;function Itt(){if(Fae)return r2.exports;Fae=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(S,w,C){return Function.prototype.apply.call(S,w,C)},a;e&&typeof e.ownKeys=="function"?a=e.ownKeys:Object.getOwnPropertySymbols?a=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:a=function(S){return Object.getOwnPropertyNames(S)};function r(S){console&&console.warn&&console.warn(S)}var n=Number.isNaN||function(S){return S!==S};function i(){i.init.call(this)}r2.exports=i,r2.exports.once=k,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function s(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");o=S}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||n(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function l(S){return S._maxListeners===void 0?i.defaultMaxListeners:S._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(S){for(var w=[],C=1;C<arguments.length;C++)w.push(arguments[C]);var j=S==="error",M=this._events;if(M!==void 0)j=j&&M.error===void 0;else if(!j)return!1;if(j){var E;if(w.length>0&&(E=w[0]),E instanceof Error)throw E;var L=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw L.context=E,L}var D=M[S];if(D===void 0)return!1;if(typeof D=="function")t(D,this,w);else for(var R=D.length,F=v(D,R),C=0;C<R;++C)t(F[C],this,w);return!0};function c(S,w,C,j){var M,E,L;if(s(C),E=S._events,E===void 0?(E=S._events=Object.create(null),S._eventsCount=0):(E.newListener!==void 0&&(S.emit("newListener",w,C.listener?C.listener:C),E=S._events),L=E[w]),L===void 0)L=E[w]=C,++S._eventsCount;else if(typeof L=="function"?L=E[w]=j?[C,L]:[L,C]:j?L.unshift(C):L.push(C),M=l(S),M>0&&L.length>M&&!L.warned){L.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=S,D.type=w,D.count=L.length,r(D)}return S}i.prototype.addListener=function(S,w){return c(this,S,w,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(S,w){return c(this,S,w,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(S,w,C){var j={fired:!1,wrapFn:void 0,target:S,type:w,listener:C},M=u.bind(j);return M.listener=C,j.wrapFn=M,M}i.prototype.once=function(S,w){return s(w),this.on(S,d(this,S,w)),this},i.prototype.prependOnceListener=function(S,w){return s(w),this.prependListener(S,d(this,S,w)),this},i.prototype.removeListener=function(S,w){var C,j,M,E,L;if(s(w),j=this._events,j===void 0)return this;if(C=j[S],C===void 0)return this;if(C===w||C.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete j[S],j.removeListener&&this.emit("removeListener",S,C.listener||w));else if(typeof C!="function"){for(M=-1,E=C.length-1;E>=0;E--)if(C[E]===w||C[E].listener===w){L=C[E].listener,M=E;break}if(M<0)return this;M===0?C.shift():f(C,M),C.length===1&&(j[S]=C[0]),j.removeListener!==void 0&&this.emit("removeListener",S,L||w)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(S){var w,C,j;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[S]),this;if(arguments.length===0){var M=Object.keys(C),E;for(j=0;j<M.length;++j)E=M[j],E!=="removeListener"&&this.removeAllListeners(E);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(w=C[S],typeof w=="function")this.removeListener(S,w);else if(w!==void 0)for(j=w.length-1;j>=0;j--)this.removeListener(S,w[j]);return this};function h(S,w,C){var j=S._events;if(j===void 0)return[];var M=j[w];return M===void 0?[]:typeof M=="function"?C?[M.listener||M]:[M]:C?y(M):v(M,M.length)}i.prototype.listeners=function(S){return h(this,S,!0)},i.prototype.rawListeners=function(S){return h(this,S,!1)},i.listenerCount=function(S,w){return typeof S.listenerCount=="function"?S.listenerCount(w):m.call(S,w)},i.prototype.listenerCount=m;function m(S){var w=this._events;if(w!==void 0){var C=w[S];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function v(S,w){for(var C=new Array(w),j=0;j<w;++j)C[j]=S[j];return C}function f(S,w){for(;w+1<S.length;w++)S[w]=S[w+1];S.pop()}function y(S){for(var w=new Array(S.length),C=0;C<w.length;++C)w[C]=S[C].listener||S[C];return w}function k(S,w){return new Promise(function(C,j){function M(L){S.removeListener(w,E),j(L)}function E(){typeof S.removeListener=="function"&&S.removeListener("error",M),C([].slice.call(arguments))}z(S,w,E,{once:!0}),w!=="error"&&x(S,M,{once:!0})})}function x(S,w,C){typeof S.on=="function"&&z(S,"error",w,C)}function z(S,w,C,j){if(typeof S.on=="function")j.once?S.once(w,C):S.on(w,C);else if(typeof S.addEventListener=="function")S.addEventListener(w,function M(E){j.once&&S.removeEventListener(w,M),C(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return r2.exports}var qae,Qae;function Uae(){return Qae||(Qae=1,qae=Itt().EventEmitter),qae}var Wae={},B1={},Zae;function $tt(){if(Zae)return B1;Zae=1,B1.byteLength=s,B1.toByteArray=c,B1.fromByteArray=h;for(var e=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,i=r.length;n<i;++n)e[n]=r[n],t[r.charCodeAt(n)]=n;t[45]=62,t[95]=63;function o(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=m.indexOf("=");f===-1&&(f=v);var y=f===v?0:4-f%4;return[f,y]}function s(m){var v=o(m),f=v[0],y=v[1];return(f+y)*3/4-y}function l(m,v,f){return(v+f)*3/4-f}function c(m){var v,f=o(m),y=f[0],k=f[1],x=new a(l(m,y,k)),z=0,S=k>0?y-4:y,w;for(w=0;w<S;w+=4)v=t[m.charCodeAt(w)]<<18|t[m.charCodeAt(w+1)]<<12|t[m.charCodeAt(w+2)]<<6|t[m.charCodeAt(w+3)],x[z++]=v>>16&255,x[z++]=v>>8&255,x[z++]=v&255;return k===2&&(v=t[m.charCodeAt(w)]<<2|t[m.charCodeAt(w+1)]>>4,x[z++]=v&255),k===1&&(v=t[m.charCodeAt(w)]<<10|t[m.charCodeAt(w+1)]<<4|t[m.charCodeAt(w+2)]>>2,x[z++]=v>>8&255,x[z++]=v&255),x}function u(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function d(m,v,f){for(var y,k=[],x=v;x<f;x+=3)y=(m[x]<<16&16711680)+(m[x+1]<<8&65280)+(m[x+2]&255),k.push(u(y));return k.join("")}function h(m){for(var v,f=m.length,y=f%3,k=[],x=16383,z=0,S=f-y;z<S;z+=x)k.push(d(m,z,z+x>S?S:z+x));return y===1?(v=m[f-1],k.push(e[v>>2]+e[v<<4&63]+"==")):y===2&&(v=(m[f-2]<<8)+m[f-1],k.push(e[v>>10]+e[v>>4&63]+e[v<<2&63]+"=")),k.join("")}return B1}var B7={},Jae;function Dtt(){return Jae||(Jae=1,B7.read=function(e,t,a,r,n){var i,o,s=n*8-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=a?n-1:0,h=a?-1:1,m=e[t+d];for(d+=h,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=i*256+e[t+d],d+=h,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=h,u-=8);if(i===0)i=1-c;else{if(i===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-c}return(m?-1:1)*o*Math.pow(2,i-r)},B7.write=function(e,t,a,r,n,i){var o,s,l,c=i*8-n-1,u=(1<<c)-1,d=u>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,v=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o=o+d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[a+m]=s&255,m+=v,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[a+m]=o&255,m+=v,o/=256,c-=8);e[a+m-v]|=f*128}),B7}var Yae;function E1(){return Yae||(Yae=1,(function(e){const t=$tt(),a=Dtt(),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 T=new Uint8Array(1),J={foo:function(){return 42}};return Object.setPrototypeOf(J,Uint8Array.prototype),Object.setPrototypeOf(T,J),T.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(T){if(T>n)throw new RangeError('The value "'+T+'" is invalid for option "size"');const J=new Uint8Array(T);return Object.setPrototypeOf(J,s.prototype),J}function s(T,J,oe){if(typeof T=="number"){if(typeof J=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(T)}return l(T,J,oe)}s.poolSize=8192;function l(T,J,oe){if(typeof T=="string")return h(T,J);if(ArrayBuffer.isView(T))return v(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(fe(T,ArrayBuffer)||T&&fe(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(T,SharedArrayBuffer)||T&&fe(T.buffer,SharedArrayBuffer)))return f(T,J,oe);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Se=T.valueOf&&T.valueOf();if(Se!=null&&Se!==T)return s.from(Se,J,oe);const Me=y(T);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return s.from(T[Symbol.toPrimitive]("string"),J,oe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}s.from=function(T,J,oe){return l(T,J,oe)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function u(T,J,oe){return c(T),T<=0?o(T):J!==void 0?typeof oe=="string"?o(T).fill(J,oe):o(T).fill(J):o(T)}s.alloc=function(T,J,oe){return u(T,J,oe)};function d(T){return c(T),o(T<0?0:k(T)|0)}s.allocUnsafe=function(T){return d(T)},s.allocUnsafeSlow=function(T){return d(T)};function h(T,J){if((typeof J!="string"||J==="")&&(J="utf8"),!s.isEncoding(J))throw new TypeError("Unknown encoding: "+J);const oe=z(T,J)|0;let Se=o(oe);const Me=Se.write(T,J);return Me!==oe&&(Se=Se.slice(0,Me)),Se}function m(T){const J=T.length<0?0:k(T.length)|0,oe=o(J);for(let Se=0;Se<J;Se+=1)oe[Se]=T[Se]&255;return oe}function v(T){if(fe(T,Uint8Array)){const J=new Uint8Array(T);return f(J.buffer,J.byteOffset,J.byteLength)}return m(T)}function f(T,J,oe){if(J<0||T.byteLength<J)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<J+(oe||0))throw new RangeError('"length" is outside of buffer bounds');let Se;return J===void 0&&oe===void 0?Se=new Uint8Array(T):oe===void 0?Se=new Uint8Array(T,J):Se=new Uint8Array(T,J,oe),Object.setPrototypeOf(Se,s.prototype),Se}function y(T){if(s.isBuffer(T)){const J=k(T.length)|0,oe=o(J);return oe.length===0||T.copy(oe,0,0,J),oe}if(T.length!==void 0)return typeof T.length!="number"||ke(T.length)?o(0):m(T);if(T.type==="Buffer"&&Array.isArray(T.data))return m(T.data)}function k(T){if(T>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return T|0}function x(T){return+T!=T&&(T=0),s.alloc(+T)}s.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==s.prototype},s.compare=function(T,J){if(fe(T,Uint8Array)&&(T=s.from(T,T.offset,T.byteLength)),fe(J,Uint8Array)&&(J=s.from(J,J.offset,J.byteLength)),!s.isBuffer(T)||!s.isBuffer(J))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===J)return 0;let oe=T.length,Se=J.length;for(let Me=0,Te=Math.min(oe,Se);Me<Te;++Me)if(T[Me]!==J[Me]){oe=T[Me],Se=J[Me];break}return oe<Se?-1:Se<oe?1:0},s.isEncoding=function(T){switch(String(T).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(T,J){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return s.alloc(0);let oe;if(J===void 0)for(J=0,oe=0;oe<T.length;++oe)J+=T[oe].length;const Se=s.allocUnsafe(J);let Me=0;for(oe=0;oe<T.length;++oe){let Te=T[oe];if(fe(Te,Uint8Array))Me+Te.length>Se.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Se,Me)):Uint8Array.prototype.set.call(Se,Te,Me);else if(s.isBuffer(Te))Te.copy(Se,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Se};function z(T,J){if(s.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||fe(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);const oe=T.length,Se=arguments.length>2&&arguments[2]===!0;if(!Se&&oe===0)return 0;let Me=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":return W(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return ve(T).length;default:if(Me)return Se?-1:W(T).length;J=(""+J).toLowerCase(),Me=!0}}s.byteLength=z;function S(T,J,oe){let Se=!1;if((J===void 0||J<0)&&(J=0),J>this.length||((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)||(oe>>>=0,J>>>=0,oe<=J))return"";for(T||(T="utf8");;)switch(T){case"hex":return ce(this,J,oe);case"utf8":case"utf-8":return N(this,J,oe);case"ascii":return ie(this,J,oe);case"latin1":case"binary":return ee(this,J,oe);case"base64":return F(this,J,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,J,oe);default:if(Se)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),Se=!0}}s.prototype._isBuffer=!0;function w(T,J,oe){const Se=T[J];T[J]=T[oe],T[oe]=Se}s.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let J=0;J<T;J+=2)w(this,J,J+1);return this},s.prototype.swap32=function(){const T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let J=0;J<T;J+=4)w(this,J,J+3),w(this,J+1,J+2);return this},s.prototype.swap64=function(){const T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let J=0;J<T;J+=8)w(this,J,J+7),w(this,J+1,J+6),w(this,J+2,J+5),w(this,J+3,J+4);return this},s.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?N(this,0,T):S.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(T){if(!s.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:s.compare(this,T)===0},s.prototype.inspect=function(){let T="";const J=e.INSPECT_MAX_BYTES;return T=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J&&(T+=" ... "),"<Buffer "+T+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(T,J,oe,Se,Me){if(fe(T,Uint8Array)&&(T=s.from(T,T.offset,T.byteLength)),!s.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(J===void 0&&(J=0),oe===void 0&&(oe=T?T.length:0),Se===void 0&&(Se=0),Me===void 0&&(Me=this.length),J<0||oe>T.length||Se<0||Me>this.length)throw new RangeError("out of range index");if(Se>=Me&&J>=oe)return 0;if(Se>=Me)return-1;if(J>=oe)return 1;if(J>>>=0,oe>>>=0,Se>>>=0,Me>>>=0,this===T)return 0;let Te=Me-Se,Ne=oe-J;const at=Math.min(Te,Ne),dt=this.slice(Se,Me),gt=T.slice(J,oe);for(let ct=0;ct<at;++ct)if(dt[ct]!==gt[ct]){Te=dt[ct],Ne=gt[ct];break}return Te<Ne?-1:Ne<Te?1:0};function C(T,J,oe,Se,Me){if(T.length===0)return-1;if(typeof oe=="string"?(Se=oe,oe=0):oe>2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,ke(oe)&&(oe=Me?0:T.length-1),oe<0&&(oe=T.length+oe),oe>=T.length){if(Me)return-1;oe=T.length-1}else if(oe<0)if(Me)oe=0;else return-1;if(typeof J=="string"&&(J=s.from(J,Se)),s.isBuffer(J))return J.length===0?-1:j(T,J,oe,Se,Me);if(typeof J=="number")return J=J&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(T,J,oe):Uint8Array.prototype.lastIndexOf.call(T,J,oe):j(T,[J],oe,Se,Me);throw new TypeError("val must be string, number or Buffer")}function j(T,J,oe,Se,Me){let Te=1,Ne=T.length,at=J.length;if(Se!==void 0&&(Se=String(Se).toLowerCase(),Se==="ucs2"||Se==="ucs-2"||Se==="utf16le"||Se==="utf-16le")){if(T.length<2||J.length<2)return-1;Te=2,Ne/=2,at/=2,oe/=2}function dt(ct,Ot){return Te===1?ct[Ot]:ct.readUInt16BE(Ot*Te)}let gt;if(Me){let ct=-1;for(gt=oe;gt<Ne;gt++)if(dt(T,gt)===dt(J,ct===-1?0:gt-ct)){if(ct===-1&&(ct=gt),gt-ct+1===at)return ct*Te}else ct!==-1&&(gt-=gt-ct),ct=-1}else for(oe+at>Ne&&(oe=Ne-at),gt=oe;gt>=0;gt--){let ct=!0;for(let Ot=0;Ot<at;Ot++)if(dt(T,gt+Ot)!==dt(J,Ot)){ct=!1;break}if(ct)return gt}return-1}s.prototype.includes=function(T,J,oe){return this.indexOf(T,J,oe)!==-1},s.prototype.indexOf=function(T,J,oe){return C(this,T,J,oe,!0)},s.prototype.lastIndexOf=function(T,J,oe){return C(this,T,J,oe,!1)};function M(T,J,oe,Se){oe=Number(oe)||0;const Me=T.length-oe;Se?(Se=Number(Se),Se>Me&&(Se=Me)):Se=Me;const Te=J.length;Se>Te/2&&(Se=Te/2);let Ne;for(Ne=0;Ne<Se;++Ne){const at=parseInt(J.substr(Ne*2,2),16);if(ke(at))return Ne;T[oe+Ne]=at}return Ne}function E(T,J,oe,Se){return ge(W(J,T.length-oe),T,oe,Se)}function L(T,J,oe,Se){return ge(ae(J),T,oe,Se)}function D(T,J,oe,Se){return ge(ve(J),T,oe,Se)}function R(T,J,oe,Se){return ge(se(J,T.length-oe),T,oe,Se)}s.prototype.write=function(T,J,oe,Se){if(J===void 0)Se="utf8",oe=this.length,J=0;else if(oe===void 0&&typeof J=="string")Se=J,oe=this.length,J=0;else if(isFinite(J))J=J>>>0,isFinite(oe)?(oe=oe>>>0,Se===void 0&&(Se="utf8")):(Se=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-J;if((oe===void 0||oe>Me)&&(oe=Me),T.length>0&&(oe<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");Se||(Se="utf8");let Te=!1;for(;;)switch(Se){case"hex":return M(this,T,J,oe);case"utf8":case"utf-8":return E(this,T,J,oe);case"ascii":case"latin1":case"binary":return L(this,T,J,oe);case"base64":return D(this,T,J,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,T,J,oe);default:if(Te)throw new TypeError("Unknown encoding: "+Se);Se=(""+Se).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(T,J,oe){return J===0&&oe===T.length?t.fromByteArray(T):t.fromByteArray(T.slice(J,oe))}function N(T,J,oe){oe=Math.min(T.length,oe);const Se=[];let Me=J;for(;Me<oe;){const Te=T[Me];let Ne=null,at=Te>239?4:Te>223?3:Te>191?2:1;if(Me+at<=oe){let dt,gt,ct,Ot;switch(at){case 1:Te<128&&(Ne=Te);break;case 2:dt=T[Me+1],(dt&192)===128&&(Ot=(Te&31)<<6|dt&63,Ot>127&&(Ne=Ot));break;case 3:dt=T[Me+1],gt=T[Me+2],(dt&192)===128&&(gt&192)===128&&(Ot=(Te&15)<<12|(dt&63)<<6|gt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(Ne=Ot));break;case 4:dt=T[Me+1],gt=T[Me+2],ct=T[Me+3],(dt&192)===128&&(gt&192)===128&&(ct&192)===128&&(Ot=(Te&15)<<18|(dt&63)<<12|(gt&63)<<6|ct&63,Ot>65535&&Ot<1114112&&(Ne=Ot))}}Ne===null?(Ne=65533,at=1):Ne>65535&&(Ne-=65536,Se.push(Ne>>>10&1023|55296),Ne=56320|Ne&1023),Se.push(Ne),Me+=at}return X(Se)}const te=4096;function X(T){const J=T.length;if(J<=te)return String.fromCharCode.apply(String,T);let oe="",Se=0;for(;Se<J;)oe+=String.fromCharCode.apply(String,T.slice(Se,Se+=te));return oe}function ie(T,J,oe){let Se="";oe=Math.min(T.length,oe);for(let Me=J;Me<oe;++Me)Se+=String.fromCharCode(T[Me]&127);return Se}function ee(T,J,oe){let Se="";oe=Math.min(T.length,oe);for(let Me=J;Me<oe;++Me)Se+=String.fromCharCode(T[Me]);return Se}function ce(T,J,oe){const Se=T.length;(!J||J<0)&&(J=0),(!oe||oe<0||oe>Se)&&(oe=Se);let Me="";for(let Te=J;Te<oe;++Te)Me+=ze[T[Te]];return Me}function Z(T,J,oe){const Se=T.slice(J,oe);let Me="";for(let Te=0;Te<Se.length-1;Te+=2)Me+=String.fromCharCode(Se[Te]+Se[Te+1]*256);return Me}s.prototype.slice=function(T,J){const oe=this.length;T=~~T,J=J===void 0?oe:~~J,T<0?(T+=oe,T<0&&(T=0)):T>oe&&(T=oe),J<0?(J+=oe,J<0&&(J=0)):J>oe&&(J=oe),J<T&&(J=T);const Se=this.subarray(T,J);return Object.setPrototypeOf(Se,s.prototype),Se};function V(T,J,oe){if(T%1!==0||T<0)throw new RangeError("offset is not uint");if(T+J>oe)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T],Me=1,Te=0;for(;++Te<J&&(Me*=256);)Se+=this[T+Te]*Me;return Se},s.prototype.readUintBE=s.prototype.readUIntBE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T+--J],Me=1;for(;J>0&&(Me*=256);)Se+=this[T+--J]*Me;return Se},s.prototype.readUint8=s.prototype.readUInt8=function(T,J){return T=T>>>0,J||V(T,1,this.length),this[T]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(T,J){return T=T>>>0,J||V(T,2,this.length),this[T]|this[T+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(T,J){return T=T>>>0,J||V(T,2,this.length),this[T]<<8|this[T+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(T,J){return T=T>>>0,J||V(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},s.prototype.readBigUInt64LE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=J+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,Me=this[++T]+this[++T]*2**8+this[++T]*2**16+oe*2**24;return BigInt(Se)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=J*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],Me=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+oe;return(BigInt(Se)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=this[T],Me=1,Te=0;for(;++Te<J&&(Me*=256);)Se+=this[T+Te]*Me;return Me*=128,Se>=Me&&(Se-=Math.pow(2,8*J)),Se},s.prototype.readIntBE=function(T,J,oe){T=T>>>0,J=J>>>0,oe||V(T,J,this.length);let Se=J,Me=1,Te=this[T+--Se];for(;Se>0&&(Me*=256);)Te+=this[T+--Se]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*J)),Te},s.prototype.readInt8=function(T,J){return T=T>>>0,J||V(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},s.prototype.readInt16LE=function(T,J){T=T>>>0,J||V(T,2,this.length);const oe=this[T]|this[T+1]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt16BE=function(T,J){T=T>>>0,J||V(T,2,this.length);const oe=this[T+1]|this[T]<<8;return oe&32768?oe|4294901760:oe},s.prototype.readInt32LE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},s.prototype.readInt32BE=function(T,J){return T=T>>>0,J||V(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},s.prototype.readBigInt64LE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(oe<<24);return(BigInt(Se)<<BigInt(32))+BigInt(J+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),s.prototype.readBigInt64BE=Be(function(T){T=T>>>0,le(T,"offset");const J=this[T],oe=this[T+7];(J===void 0||oe===void 0)&&q(T,this.length-8);const Se=(J<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(Se)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+oe)}),s.prototype.readFloatLE=function(T,J){return T=T>>>0,J||V(T,4,this.length),a.read(this,T,!0,23,4)},s.prototype.readFloatBE=function(T,J){return T=T>>>0,J||V(T,4,this.length),a.read(this,T,!1,23,4)},s.prototype.readDoubleLE=function(T,J){return T=T>>>0,J||V(T,8,this.length),a.read(this,T,!0,52,8)},s.prototype.readDoubleBE=function(T,J){return T=T>>>0,J||V(T,8,this.length),a.read(this,T,!1,52,8)};function Y(T,J,oe,Se,Me,Te){if(!s.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>Me||J<Te)throw new RangeError('"value" argument is out of bounds');if(oe+Se>T.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(T,J,oe,Se){if(T=+T,J=J>>>0,oe=oe>>>0,!Se){const Ne=Math.pow(2,8*oe)-1;Y(this,T,J,oe,Ne,0)}let Me=1,Te=0;for(this[J]=T&255;++Te<oe&&(Me*=256);)this[J+Te]=T/Me&255;return J+oe},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(T,J,oe,Se){if(T=+T,J=J>>>0,oe=oe>>>0,!Se){const Ne=Math.pow(2,8*oe)-1;Y(this,T,J,oe,Ne,0)}let Me=oe-1,Te=1;for(this[J+Me]=T&255;--Me>=0&&(Te*=256);)this[J+Me]=T/Te&255;return J+oe},s.prototype.writeUint8=s.prototype.writeUInt8=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,1,255,0),this[J]=T&255,J+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,65535,0),this[J]=T&255,this[J+1]=T>>>8,J+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,65535,0),this[J]=T>>>8,this[J+1]=T&255,J+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,4294967295,0),this[J+3]=T>>>24,this[J+2]=T>>>16,this[J+1]=T>>>8,this[J]=T&255,J+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,4294967295,0),this[J]=T>>>24,this[J+1]=T>>>16,this[J+2]=T>>>8,this[J+3]=T&255,J+4};function U(T,J,oe,Se,Me){K(J,Se,Me,T,oe,7);let Te=Number(J&BigInt(4294967295));T[oe++]=Te,Te=Te>>8,T[oe++]=Te,Te=Te>>8,T[oe++]=Te,Te=Te>>8,T[oe++]=Te;let Ne=Number(J>>BigInt(32)&BigInt(4294967295));return T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,Ne=Ne>>8,T[oe++]=Ne,oe}function _(T,J,oe,Se,Me){K(J,Se,Me,T,oe,7);let Te=Number(J&BigInt(4294967295));T[oe+7]=Te,Te=Te>>8,T[oe+6]=Te,Te=Te>>8,T[oe+5]=Te,Te=Te>>8,T[oe+4]=Te;let Ne=Number(J>>BigInt(32)&BigInt(4294967295));return T[oe+3]=Ne,Ne=Ne>>8,T[oe+2]=Ne,Ne=Ne>>8,T[oe+1]=Ne,Ne=Ne>>8,T[oe]=Ne,oe+8}s.prototype.writeBigUInt64LE=Be(function(T,J=0){return U(this,T,J,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Be(function(T,J=0){return _(this,T,J,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(T,J,oe,Se){if(T=+T,J=J>>>0,!Se){const at=Math.pow(2,8*oe-1);Y(this,T,J,oe,at-1,-at)}let Me=0,Te=1,Ne=0;for(this[J]=T&255;++Me<oe&&(Te*=256);)T<0&&Ne===0&&this[J+Me-1]!==0&&(Ne=1),this[J+Me]=(T/Te>>0)-Ne&255;return J+oe},s.prototype.writeIntBE=function(T,J,oe,Se){if(T=+T,J=J>>>0,!Se){const at=Math.pow(2,8*oe-1);Y(this,T,J,oe,at-1,-at)}let Me=oe-1,Te=1,Ne=0;for(this[J+Me]=T&255;--Me>=0&&(Te*=256);)T<0&&Ne===0&&this[J+Me+1]!==0&&(Ne=1),this[J+Me]=(T/Te>>0)-Ne&255;return J+oe},s.prototype.writeInt8=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,1,127,-128),T<0&&(T=255+T+1),this[J]=T&255,J+1},s.prototype.writeInt16LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,32767,-32768),this[J]=T&255,this[J+1]=T>>>8,J+2},s.prototype.writeInt16BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,2,32767,-32768),this[J]=T>>>8,this[J+1]=T&255,J+2},s.prototype.writeInt32LE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,2147483647,-2147483648),this[J]=T&255,this[J+1]=T>>>8,this[J+2]=T>>>16,this[J+3]=T>>>24,J+4},s.prototype.writeInt32BE=function(T,J,oe){return T=+T,J=J>>>0,oe||Y(this,T,J,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[J]=T>>>24,this[J+1]=T>>>16,this[J+2]=T>>>8,this[J+3]=T&255,J+4},s.prototype.writeBigInt64LE=Be(function(T,J=0){return U(this,T,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Be(function(T,J=0){return _(this,T,J,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(T,J,oe,Se,Me,Te){if(oe+Se>T.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function Q(T,J,oe,Se,Me){return J=+J,oe=oe>>>0,Me||G(T,J,oe,4),a.write(T,J,oe,Se,23,4),oe+4}s.prototype.writeFloatLE=function(T,J,oe){return Q(this,T,J,!0,oe)},s.prototype.writeFloatBE=function(T,J,oe){return Q(this,T,J,!1,oe)};function ne(T,J,oe,Se,Me){return J=+J,oe=oe>>>0,Me||G(T,J,oe,8),a.write(T,J,oe,Se,52,8),oe+8}s.prototype.writeDoubleLE=function(T,J,oe){return ne(this,T,J,!0,oe)},s.prototype.writeDoubleBE=function(T,J,oe){return ne(this,T,J,!1,oe)},s.prototype.copy=function(T,J,oe,Se){if(!s.isBuffer(T))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!Se&&Se!==0&&(Se=this.length),J>=T.length&&(J=T.length),J||(J=0),Se>0&&Se<oe&&(Se=oe),Se===oe||T.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("sourceEnd out of bounds");Se>this.length&&(Se=this.length),T.length-J<Se-oe&&(Se=T.length-J+oe);const Me=Se-oe;return this===T&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(J,oe,Se):Uint8Array.prototype.set.call(T,this.subarray(oe,Se),J),Me},s.prototype.fill=function(T,J,oe,Se){if(typeof T=="string"){if(typeof J=="string"?(Se=J,J=0,oe=this.length):typeof oe=="string"&&(Se=oe,oe=this.length),Se!==void 0&&typeof Se!="string")throw new TypeError("encoding must be a string");if(typeof Se=="string"&&!s.isEncoding(Se))throw new TypeError("Unknown encoding: "+Se);if(T.length===1){const Te=T.charCodeAt(0);(Se==="utf8"&&Te<128||Se==="latin1")&&(T=Te)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(J<0||this.length<J||this.length<oe)throw new RangeError("Out of range index");if(oe<=J)return this;J=J>>>0,oe=oe===void 0?this.length:oe>>>0,T||(T=0);let Me;if(typeof T=="number")for(Me=J;Me<oe;++Me)this[Me]=T;else{const Te=s.isBuffer(T)?T:s.from(T,Se),Ne=Te.length;if(Ne===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(Me=0;Me<oe-J;++Me)this[Me+J]=Te[Me%Ne]}return this};const ue={};function ye(T,J,oe){ue[T]=class extends oe{constructor(){super(),Object.defineProperty(this,"message",{value:J.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${T}]`,delete this.name}get code(){return T}set code(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}toString(){return`${this.name} [${T}]: ${this.message}`}}}ye("ERR_BUFFER_OUT_OF_BOUNDS",function(T){return T?`${T} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ye("ERR_INVALID_ARG_TYPE",function(T,J){return`The "${T}" argument must be of type number. Received type ${typeof J}`},TypeError),ye("ERR_OUT_OF_RANGE",function(T,J,oe){let Se=`The value of "${T}" is out of range.`,Me=oe;return Number.isInteger(oe)&&Math.abs(oe)>2**32?Me=Ce(String(oe)):typeof oe=="bigint"&&(Me=String(oe),(oe>BigInt(2)**BigInt(32)||oe<-(BigInt(2)**BigInt(32)))&&(Me=Ce(Me)),Me+="n"),Se+=` It must be ${J}. Received ${Me}`,Se},RangeError);function Ce(T){let J="",oe=T.length;const Se=T[0]==="-"?1:0;for(;oe>=Se+4;oe-=3)J=`_${T.slice(oe-3,oe)}${J}`;return`${T.slice(0,oe)}${J}`}function B(T,J,oe){le(J,"offset"),(T[J]===void 0||T[J+oe]===void 0)&&q(J,T.length-(oe+1))}function K(T,J,oe,Se,Me,Te){if(T>oe||T<J){const Ne=typeof J=="bigint"?"n":"";let at;throw J===0||J===BigInt(0)?at=`>= 0${Ne} and < 2${Ne} ** ${(Te+1)*8}${Ne}`:at=`>= -(2${Ne} ** ${(Te+1)*8-1}${Ne}) and < 2 ** ${(Te+1)*8-1}${Ne}`,new ue.ERR_OUT_OF_RANGE("value",at,T)}B(Se,Me,Te)}function le(T,J){if(typeof T!="number")throw new ue.ERR_INVALID_ARG_TYPE(J,"number",T)}function q(T,J,oe){throw Math.floor(T)!==T?(le(T,oe),new ue.ERR_OUT_OF_RANGE("offset","an integer",T)):J<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${J}`,T)}const pe=/[^+/0-9A-Za-z-_]/g;function he(T){if(T=T.split("=")[0],T=T.trim().replace(pe,""),T.length<2)return"";for(;T.length%4!==0;)T=T+"=";return T}function W(T,J){J=J||1/0;let oe;const Se=T.length;let Me=null;const Te=[];for(let Ne=0;Ne<Se;++Ne){if(oe=T.charCodeAt(Ne),oe>55295&&oe<57344){if(!Me){if(oe>56319){(J-=3)>-1&&Te.push(239,191,189);continue}else if(Ne+1===Se){(J-=3)>-1&&Te.push(239,191,189);continue}Me=oe;continue}if(oe<56320){(J-=3)>-1&&Te.push(239,191,189),Me=oe;continue}oe=(Me-55296<<10|oe-56320)+65536}else Me&&(J-=3)>-1&&Te.push(239,191,189);if(Me=null,oe<128){if((J-=1)<0)break;Te.push(oe)}else if(oe<2048){if((J-=2)<0)break;Te.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((J-=3)<0)break;Te.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((J-=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(T){const J=[];for(let oe=0;oe<T.length;++oe)J.push(T.charCodeAt(oe)&255);return J}function se(T,J){let oe,Se,Me;const Te=[];for(let Ne=0;Ne<T.length&&!((J-=2)<0);++Ne)oe=T.charCodeAt(Ne),Se=oe>>8,Me=oe%256,Te.push(Me),Te.push(Se);return Te}function ve(T){return t.toByteArray(he(T))}function ge(T,J,oe,Se){let Me;for(Me=0;Me<Se&&!(Me+oe>=J.length||Me>=T.length);++Me)J[Me+oe]=T[Me];return Me}function fe(T,J){return T instanceof J||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===J.name}function ke(T){return T!==T}const ze=(function(){const T="0123456789abcdef",J=new Array(256);for(let oe=0;oe<16;++oe){const Se=oe*16;for(let Me=0;Me<16;++Me)J[Se+Me]=T[oe]+T[Me]}return J})();function Be(T){return typeof BigInt>"u"?tt:T}function tt(){throw new Error("BigInt not supported")}})(Wae)),Wae}const Xae=GG(Dee);var E7,ere;function Ktt(){if(ere)return E7;ere=1;function e(v,f){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(v);f&&(k=k.filter(function(x){return Object.getOwnPropertyDescriptor(v,x).enumerable})),y.push.apply(y,k)}return y}function t(v){for(var f=1;f<arguments.length;f++){var y=arguments[f]!=null?arguments[f]:{};f%2?e(Object(y),!0).forEach(function(k){a(v,k,y[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(k){Object.defineProperty(v,k,Object.getOwnPropertyDescriptor(y,k))})}return v}function a(v,f,y){return f=o(f),f in v?Object.defineProperty(v,f,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[f]=y,v}function r(v,f){if(!(v instanceof f))throw new TypeError("Cannot call a class as a function")}function n(v,f){for(var y=0;y<f.length;y++){var k=f[y];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(v,o(k.key),k)}}function i(v,f,y){return f&&n(v.prototype,f),Object.defineProperty(v,"prototype",{writable:!1}),v}function o(v){var f=s(v,"string");return typeof f=="symbol"?f:String(f)}function s(v,f){if(typeof v!="object"||v===null)return v;var y=v[Symbol.toPrimitive];if(y!==void 0){var k=y.call(v,f);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(v)}var l=E1(),c=l.Buffer,u=Xae,d=u.inspect,h=d&&d.custom||"inspect";function m(v,f,y){c.prototype.copy.call(v,f,y)}return E7=(function(){function v(){r(this,v),this.head=null,this.tail=null,this.length=0}return i(v,[{key:"push",value:function(f){var y={data:f,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(f){var y={data:f,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var y=this.head,k=""+y.data;y=y.next;)k+=f+y.data;return k}},{key:"concat",value:function(f){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(f>>>0),k=this.head,x=0;k;)m(k.data,y,x),x+=k.data.length,k=k.next;return y}},{key:"consume",value:function(f,y){var k;return f<this.head.data.length?(k=this.head.data.slice(0,f),this.head.data=this.head.data.slice(f)):f===this.head.data.length?k=this.shift():k=y?this._getString(f):this._getBuffer(f),k}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(f){var y=this.head,k=1,x=y.data;for(f-=x.length;y=y.next;){var z=y.data,S=f>z.length?z.length:f;if(S===z.length?x+=z:x+=z.slice(0,f),f-=S,f===0){S===z.length?(++k,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(S));break}++k}return this.length-=k,x}},{key:"_getBuffer",value:function(f){var y=c.allocUnsafe(f),k=this.head,x=1;for(k.data.copy(y),f-=k.data.length;k=k.next;){var z=k.data,S=f>z.length?z.length:f;if(z.copy(y,y.length-f,0,S),f-=S,f===0){S===z.length?(++x,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=z.slice(S));break}++x}return this.length-=x,y}},{key:h,value:function(f,y){return d(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),v})(),E7}var R7,tre;function are(){if(tre)return R7;tre=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(a,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,d)):process.nextTick(t,l,d):s?(process.nextTick(a,l),s(d)):process.nextTick(a,l)}),this)}function t(o,s){n(o,s),a(o)}function a(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 R7={destroy:e,undestroy:r,errorOrDestroy:i},R7}var _7={},rre;function yv(){if(rre)return _7;rre=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function a(s,l,c){c||(c=Error);function u(h,m,v){return typeof l=="string"?l:l(h,m,v)}var d=(function(h){e(m,h);function m(v,f,y){return h.call(this,u(v,f,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,t[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 a("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),a("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),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_7.codes=t,_7}var L7,nre;function ire(){if(nre)return L7;nre=1;var e=yv().codes.ERR_INVALID_OPT_VALUE;function t(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function a(r,n,i,o){var s=t(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 L7={getHighWaterMark:a},L7}var N7,ore;function Vtt(){if(ore)return N7;ore=1,N7=e;function e(a,r){if(t("noDeprecation"))return a;var n=!1;function i(){if(!n){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return a.apply(this,arguments)}return i}function t(a){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[a];return r==null?!1:String(r).toLowerCase()==="true"}return N7}var I7,sre;function lre(){if(sre)return I7;sre=1,I7=M;function e(Q){var ne=this;this.next=null,this.entry=null,this.finish=function(){G(ne,Q)}}var t;M.WritableState=C;var a={deprecate:Vtt()},r=Uae(),n=E1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Q){return n.from(Q)}function s(Q){return n.isBuffer(Q)||Q instanceof i}var l=are(),c=ire(),u=c.getHighWaterMark,d=yv().codes,h=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_MULTIPLE_CALLBACK,f=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,k=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,S=l.errorOrDestroy;function w(){}function C(Q,ne,ue){t=t||xv(),Q=Q||{},typeof ue!="boolean"&&(ue=ne instanceof t),this.objectMode=!!Q.objectMode,ue&&(this.objectMode=this.objectMode||!!Q.writableObjectMode),this.highWaterMark=u(this,Q,"writableHighWaterMark",ue),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ye=Q.decodeStrings===!1;this.decodeStrings=!ye,this.defaultEncoding=Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ce){X(ne,Ce)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Q.emitClose!==!1,this.autoDestroy=!!Q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}C.prototype.getBuffer=function(){for(var Q=this.bufferedRequest,ne=[];Q;)ne.push(Q),Q=Q.next;return ne},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(Q){return j.call(this,Q)?!0:this!==M?!1:Q&&Q._writableState instanceof C}})):j=function(Q){return Q instanceof this};function M(Q){t=t||xv();var ne=this instanceof t;if(!ne&&!j.call(M,this))return new M(Q);this._writableState=new C(Q,this,ne),this.writable=!0,Q&&(typeof Q.write=="function"&&(this._write=Q.write),typeof Q.writev=="function"&&(this._writev=Q.writev),typeof Q.destroy=="function"&&(this._destroy=Q.destroy),typeof Q.final=="function"&&(this._final=Q.final)),r.call(this)}M.prototype.pipe=function(){S(this,new f)};function E(Q,ne){var ue=new x;S(Q,ue),process.nextTick(ne,ue)}function L(Q,ne,ue,ye){var Ce;return ue===null?Ce=new k:typeof ue!="string"&&!ne.objectMode&&(Ce=new h("chunk",["string","Buffer"],ue)),Ce?(S(Q,Ce),process.nextTick(ye,Ce),!1):!0}M.prototype.write=function(Q,ne,ue){var ye=this._writableState,Ce=!1,B=!ye.objectMode&&s(Q);return B&&!n.isBuffer(Q)&&(Q=o(Q)),typeof ne=="function"&&(ue=ne,ne=null),B?ne="buffer":ne||(ne=ye.defaultEncoding),typeof ue!="function"&&(ue=w),ye.ending?E(this,ue):(B||L(this,ye,Q,ue))&&(ye.pendingcb++,Ce=R(this,ye,B,Q,ne,ue)),Ce},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var Q=this._writableState;Q.corked&&(Q.corked--,!Q.writing&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&ce(this,Q))},M.prototype.setDefaultEncoding=function(Q){if(typeof Q=="string"&&(Q=Q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Q+"").toLowerCase())>-1))throw new z(Q);return this._writableState.defaultEncoding=Q,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(Q,ne,ue){return!Q.objectMode&&Q.decodeStrings!==!1&&typeof ne=="string"&&(ne=n.from(ne,ue)),ne}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(Q,ne,ue,ye,Ce,B){if(!ue){var K=D(ne,ye,Ce);ye!==K&&(ue=!0,Ce="buffer",ye=K)}var le=ne.objectMode?1:ye.length;ne.length+=le;var q=ne.length<ne.highWaterMark;if(q||(ne.needDrain=!0),ne.writing||ne.corked){var pe=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:ye,encoding:Ce,isBuf:ue,callback:B,next:null},pe?pe.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else F(Q,ne,!1,le,ye,Ce,B);return q}function F(Q,ne,ue,ye,Ce,B,K){ne.writelen=ye,ne.writecb=K,ne.writing=!0,ne.sync=!0,ne.destroyed?ne.onwrite(new y("write")):ue?Q._writev(Ce,ne.onwrite):Q._write(Ce,B,ne.onwrite),ne.sync=!1}function N(Q,ne,ue,ye,Ce){--ne.pendingcb,ue?(process.nextTick(Ce,ye),process.nextTick(U,Q,ne),Q._writableState.errorEmitted=!0,S(Q,ye)):(Ce(ye),Q._writableState.errorEmitted=!0,S(Q,ye),U(Q,ne))}function te(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}function X(Q,ne){var ue=Q._writableState,ye=ue.sync,Ce=ue.writecb;if(typeof Ce!="function")throw new v;if(te(ue),ne)N(Q,ue,ye,ne,Ce);else{var B=Z(ue)||Q.destroyed;!B&&!ue.corked&&!ue.bufferProcessing&&ue.bufferedRequest&&ce(Q,ue),ye?process.nextTick(ie,Q,ue,B,Ce):ie(Q,ue,B,Ce)}}function ie(Q,ne,ue,ye){ue||ee(Q,ne),ne.pendingcb--,ye(),U(Q,ne)}function ee(Q,ne){ne.length===0&&ne.needDrain&&(ne.needDrain=!1,Q.emit("drain"))}function ce(Q,ne){ne.bufferProcessing=!0;var ue=ne.bufferedRequest;if(Q._writev&&ue&&ue.next){var ye=ne.bufferedRequestCount,Ce=new Array(ye),B=ne.corkedRequestsFree;B.entry=ue;for(var K=0,le=!0;ue;)Ce[K]=ue,ue.isBuf||(le=!1),ue=ue.next,K+=1;Ce.allBuffers=le,F(Q,ne,!0,ne.length,Ce,"",B.finish),ne.pendingcb++,ne.lastBufferedRequest=null,B.next?(ne.corkedRequestsFree=B.next,B.next=null):ne.corkedRequestsFree=new e(ne),ne.bufferedRequestCount=0}else{for(;ue;){var q=ue.chunk,pe=ue.encoding,he=ue.callback,W=ne.objectMode?1:q.length;if(F(Q,ne,!1,W,q,pe,he),ue=ue.next,ne.bufferedRequestCount--,ne.writing)break}ue===null&&(ne.lastBufferedRequest=null)}ne.bufferedRequest=ue,ne.bufferProcessing=!1}M.prototype._write=function(Q,ne,ue){ue(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(Q,ne,ue){var ye=this._writableState;return typeof Q=="function"?(ue=Q,Q=null,ne=null):typeof ne=="function"&&(ue=ne,ne=null),Q!=null&&this.write(Q,ne),ye.corked&&(ye.corked=1,this.uncork()),ye.ending||_(this,ye,ue),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Z(Q){return Q.ending&&Q.length===0&&Q.bufferedRequest===null&&!Q.finished&&!Q.writing}function V(Q,ne){Q._final(function(ue){ne.pendingcb--,ue&&S(Q,ue),ne.prefinished=!0,Q.emit("prefinish"),U(Q,ne)})}function Y(Q,ne){!ne.prefinished&&!ne.finalCalled&&(typeof Q._final=="function"&&!ne.destroyed?(ne.pendingcb++,ne.finalCalled=!0,process.nextTick(V,Q,ne)):(ne.prefinished=!0,Q.emit("prefinish")))}function U(Q,ne){var ue=Z(ne);if(ue&&(Y(Q,ne),ne.pendingcb===0&&(ne.finished=!0,Q.emit("finish"),ne.autoDestroy))){var ye=Q._readableState;(!ye||ye.autoDestroy&&ye.endEmitted)&&Q.destroy()}return ue}function _(Q,ne,ue){ne.ending=!0,U(Q,ne),ue&&(ne.finished?process.nextTick(ue):Q.once("finish",ue)),ne.ended=!0,Q.writable=!1}function G(Q,ne,ue){var ye=Q.entry;for(Q.entry=null;ye;){var Ce=ye.callback;ne.pendingcb--,Ce(ue),ye=ye.next}ne.corkedRequestsFree.next=Q}return Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Q){this._writableState&&(this._writableState.destroyed=Q)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(Q,ne){ne(Q)},I7}var $7,cre;function xv(){if(cre)return $7;cre=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};$7=o;for(var t=bre(),a=lre(),r=e(a.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=a.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),a.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)}}),$7}var D7={},K7={exports:{}},ure;function Htt(){return ure||(ure=1,(function(e,t){var a=E1(),r=a.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=a:(n(a,t),t.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 a.SlowBuffer(o)}})(K7,K7.exports)),K7.exports}var dre;function pre(){if(dre)return D7;dre=1;var e=Htt().Buffer,t=e.isEncoding||function(k){switch(k=""+k,k&&k.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 a(k){if(!k)return"utf8";for(var x;;)switch(k){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 k;default:if(x)return;k=(""+k).toLowerCase(),x=!0}}function r(k){var x=a(k);if(typeof x!="string"&&(e.isEncoding===t||!t(k)))throw new Error("Unknown encoding: "+k);return x||k}D7.StringDecoder=n;function n(k){this.encoding=r(k);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=v,x=3;break;default:this.write=f,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(x)}n.prototype.write=function(k){if(k.length===0)return"";var x,z;if(this.lastNeed){if(x=this.fillLast(k),x===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<k.length?x?x+this.text(k,z):this.text(k,z):x||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(k){if(this.lastNeed<=k.length)return k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,k.length),this.lastNeed-=k.length};function i(k){return k<=127?0:k>>5===6?2:k>>4===14?3:k>>3===30?4:k>>6===2?-1:-2}function o(k,x,z){var S=x.length-1;if(S<z)return 0;var w=i(x[S]);return w>=0?(w>0&&(k.lastNeed=w-1),w):--S<z||w===-2?0:(w=i(x[S]),w>=0?(w>0&&(k.lastNeed=w-2),w):--S<z||w===-2?0:(w=i(x[S]),w>=0?(w>0&&(w===2?w=0:k.lastNeed=w-3),w):0))}function s(k,x,z){if((x[0]&192)!==128)return k.lastNeed=0,"\uFFFD";if(k.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return k.lastNeed=1,"\uFFFD";if(k.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return k.lastNeed=2,"\uFFFD"}}function l(k){var x=this.lastTotal-this.lastNeed,z=s(this,k);if(z!==void 0)return z;if(this.lastNeed<=k.length)return k.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,x,0,k.length),this.lastNeed-=k.length}function c(k,x){var z=o(this,k,x);if(!this.lastNeed)return k.toString("utf8",x);this.lastTotal=z;var S=k.length-(z-this.lastNeed);return k.copy(this.lastChar,0,S),k.toString("utf8",x,S)}function u(k){var x=k&&k.length?this.write(k):"";return this.lastNeed?x+"\uFFFD":x}function d(k,x){if((k.length-x)%2===0){var z=k.toString("utf16le",x);if(z){var S=z.charCodeAt(z.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",x,k.length-1)}function h(k){var x=k&&k.length?this.write(k):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,z)}return x}function m(k,x){var z=(k.length-x)%3;return z===0?k.toString("base64",x):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=k[k.length-1]:(this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1]),k.toString("base64",x,k.length-z))}function v(k){var x=k&&k.length?this.write(k):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function f(k){return k.toString(this.encoding)}function y(k){return k&&k.length?this.write(k):""}return D7}var V7,hre;function H7(){if(hre)return V7;hre=1;var e=yv().codes.ERR_STREAM_PREMATURE_CLOSE;function t(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 a(){}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=t(s||a);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,v=function(){l=!1,m=!0,c||s.call(i)},f=function(x){s.call(i,x)},y=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)},k=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",y),i.req?k():i.on("request",k)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",v),i.on("finish",h),o.error!==!1&&i.on("error",f),i.on("close",y),function(){i.removeListener("complete",h),i.removeListener("abort",y),i.removeListener("request",k),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",v),i.removeListener("error",f),i.removeListener("close",y)}}return V7=n,V7}var G7,mre;function Gtt(){if(mre)return G7;mre=1;var e;function t(z,S,w){return S=a(S),S in z?Object.defineProperty(z,S,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[S]=w,z}function a(z){var S=r(z,"string");return typeof S=="symbol"?S:String(S)}function r(z,S){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var C=w.call(z,S);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(z)}var n=H7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(z,S){return{value:z,done:S}}function m(z){var S=z[i];if(S!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,S(h(w,!1)))}}function v(z){process.nextTick(m,z)}function f(z,S){return function(w,C){z.then(function(){if(S[l]){w(h(void 0,!0));return}S[u](w,C)},C)}}var y=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,S=this[s];if(S!==null)return Promise.reject(S);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(M,E){process.nextTick(function(){z[s]?E(z[s]):M(h(void 0,!0))})});var w=this[c],C;if(w)C=new Promise(f(w,this));else{var j=this[d].read();if(j!==null)return Promise.resolve(h(j,!1));C=new Promise(this[u])}return this[c]=C,C}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var z=this;return new Promise(function(S,w){z[d].destroy(null,function(C){if(C){w(C);return}S(h(void 0,!0))})})}),e),y),x=function(z){var S,w=Object.create(k,(S={},t(S,d,{value:z,writable:!0}),t(S,i,{value:null,writable:!0}),t(S,o,{value:null,writable:!0}),t(S,s,{value:null,writable:!0}),t(S,l,{value:z._readableState.endEmitted,writable:!0}),t(S,u,{value:function(C,j){var M=w[d].read();M?(w[c]=null,w[i]=null,w[o]=null,C(h(M,!1))):(w[i]=C,w[o]=j)},writable:!0}),S));return w[c]=null,n(z,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var j=w[o];j!==null&&(w[c]=null,w[i]=null,w[o]=null,j(C)),w[s]=C;return}var M=w[i];M!==null&&(w[c]=null,w[i]=null,w[o]=null,M(h(void 0,!0))),w[l]=!0}),z.on("readable",v.bind(null,w)),w};return G7=x,G7}var gre,fre;function Ftt(){return fre||(fre=1,gre=function(){throw new Error("Readable.from is not available in the browser")}),gre}var F7,vre;function bre(){if(vre)return F7;vre=1,F7=E;var e;E.ReadableState=M;var t=function(B,K){return B.listeners(K).length},a=Uae(),r=E1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(B){return r.from(B)}function o(B){return r.isBuffer(B)||B instanceof n}var s=Xae,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Ktt(),u=are(),d=ire(),h=d.getHighWaterMark,m=yv().codes,v=m.ERR_INVALID_ARG_TYPE,f=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,k=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,z,S,w=u.errorOrDestroy,C=["error","close","destroy","pause","resume"];function j(B,K,le){if(typeof B.prependListener=="function")return B.prependListener(K,le);!B._events||!B._events[K]?B.on(K,le):Array.isArray(B._events[K])?B._events[K].unshift(le):B._events[K]=[le,B._events[K]]}function M(B,K,le){e=e||xv(),B=B||{},typeof le!="boolean"&&(le=K instanceof e),this.objectMode=!!B.objectMode,le&&(this.objectMode=this.objectMode||!!B.readableObjectMode),this.highWaterMark=h(this,B,"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=B.emitClose!==!1,this.autoDestroy=!!B.autoDestroy,this.destroyed=!1,this.defaultEncoding=B.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,B.encoding&&(x||(x=pre().StringDecoder),this.decoder=new x(B.encoding),this.encoding=B.encoding)}function E(B){if(e=e||xv(),!(this instanceof E))return new E(B);var K=this instanceof e;this._readableState=new M(B,this,K),this.readable=!0,B&&(typeof B.read=="function"&&(this._read=B.read),typeof B.destroy=="function"&&(this._destroy=B.destroy)),a.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(B){this._readableState&&(this._readableState.destroyed=B)}}),E.prototype.destroy=u.destroy,E.prototype._undestroy=u.undestroy,E.prototype._destroy=function(B,K){K(B)},E.prototype.push=function(B,K){var le=this._readableState,q;return le.objectMode?q=!0:typeof B=="string"&&(K=K||le.defaultEncoding,K!==le.encoding&&(B=r.from(B,K),K=""),q=!0),L(this,B,K,!1,q)},E.prototype.unshift=function(B){return L(this,B,null,!0,!1)};function L(B,K,le,q,pe){l("readableAddChunk",K);var he=B._readableState;if(K===null)he.reading=!1,X(B,he);else{var W;if(pe||(W=R(he,K)),W)w(B,W);else if(he.objectMode||K&&K.length>0)if(typeof K!="string"&&!he.objectMode&&Object.getPrototypeOf(K)!==r.prototype&&(K=i(K)),q)he.endEmitted?w(B,new k):D(B,he,K,!0);else if(he.ended)w(B,new f);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!le?(K=he.decoder.write(K),he.objectMode||K.length!==0?D(B,he,K,!1):ce(B,he)):D(B,he,K,!1)}else q||(he.reading=!1,ce(B,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function D(B,K,le,q){K.flowing&&K.length===0&&!K.sync?(K.awaitDrain=0,B.emit("data",le)):(K.length+=K.objectMode?1:le.length,q?K.buffer.unshift(le):K.buffer.push(le),K.needReadable&&ie(B)),ce(B,K)}function R(B,K){var le;return!o(K)&&typeof K!="string"&&K!==void 0&&!B.objectMode&&(le=new v("chunk",["string","Buffer","Uint8Array"],K)),le}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(B){x||(x=pre().StringDecoder);var K=new x(B);this._readableState.decoder=K,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,q="";le!==null;)q+=K.write(le.data),le=le.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var F=1073741824;function N(B){return B>=F?B=F:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}function te(B,K){return B<=0||K.length===0&&K.ended?0:K.objectMode?1:B!==B?K.flowing&&K.length?K.buffer.head.data.length:K.length:(B>K.highWaterMark&&(K.highWaterMark=N(B)),B<=K.length?B:K.ended?K.length:(K.needReadable=!0,0))}E.prototype.read=function(B){l("read",B),B=parseInt(B,10);var K=this._readableState,le=B;if(B!==0&&(K.emittedReadable=!1),B===0&&K.needReadable&&((K.highWaterMark!==0?K.length>=K.highWaterMark:K.length>0)||K.ended))return l("read: emitReadable",K.length,K.ended),K.length===0&&K.ended?ue(this):ie(this),null;if(B=te(B,K),B===0&&K.ended)return K.length===0&&ue(this),null;var q=K.needReadable;l("need readable",q),(K.length===0||K.length-B<K.highWaterMark)&&(q=!0,l("length less than watermark",q)),K.ended||K.reading?(q=!1,l("reading or ended",q)):q&&(l("do read"),K.reading=!0,K.sync=!0,K.length===0&&(K.needReadable=!0),this._read(K.highWaterMark),K.sync=!1,K.reading||(B=te(le,K)));var pe;return B>0?pe=ne(B,K):pe=null,pe===null?(K.needReadable=K.length<=K.highWaterMark,B=0):(K.length-=B,K.awaitDrain=0),K.length===0&&(K.ended||(K.needReadable=!0),le!==B&&K.ended&&ue(this)),pe!==null&&this.emit("data",pe),pe};function X(B,K){if(l("onEofChunk"),!K.ended){if(K.decoder){var le=K.decoder.end();le&&le.length&&(K.buffer.push(le),K.length+=K.objectMode?1:le.length)}K.ended=!0,K.sync?ie(B):(K.needReadable=!1,K.emittedReadable||(K.emittedReadable=!0,ee(B)))}}function ie(B){var K=B._readableState;l("emitReadable",K.needReadable,K.emittedReadable),K.needReadable=!1,K.emittedReadable||(l("emitReadable",K.flowing),K.emittedReadable=!0,process.nextTick(ee,B))}function ee(B){var K=B._readableState;l("emitReadable_",K.destroyed,K.length,K.ended),!K.destroyed&&(K.length||K.ended)&&(B.emit("readable"),K.emittedReadable=!1),K.needReadable=!K.flowing&&!K.ended&&K.length<=K.highWaterMark,Q(B)}function ce(B,K){K.readingMore||(K.readingMore=!0,process.nextTick(Z,B,K))}function Z(B,K){for(;!K.reading&&!K.ended&&(K.length<K.highWaterMark||K.flowing&&K.length===0);){var le=K.length;if(l("maybeReadMore read 0"),B.read(0),le===K.length)break}K.readingMore=!1}E.prototype._read=function(B){w(this,new y("_read()"))},E.prototype.pipe=function(B,K){var le=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=B;break;case 1:q.pipes=[q.pipes,B];break;default:q.pipes.push(B);break}q.pipesCount+=1,l("pipe count=%d opts=%j",q.pipesCount,K);var pe=(!K||K.end!==!1)&&B!==null&&B!==process.stderr,he=pe?ae:tt;q.endEmitted?process.nextTick(he):le.once("end",he),B.on("unpipe",W);function W(T,J){l("onunpipe"),T===le&&J&&J.hasUnpiped===!1&&(J.hasUnpiped=!0,ge())}function ae(){l("onend"),B.end()}var se=V(le);B.on("drain",se);var ve=!1;function ge(){l("cleanup"),B.removeListener("close",ze),B.removeListener("finish",Be),B.removeListener("drain",se),B.removeListener("error",ke),B.removeListener("unpipe",W),le.removeListener("end",ae),le.removeListener("end",tt),le.removeListener("data",fe),ve=!0,q.awaitDrain&&(!B._writableState||B._writableState.needDrain)&&se()}le.on("data",fe);function fe(T){l("ondata");var J=B.write(T);l("dest.write",J),J===!1&&((q.pipesCount===1&&q.pipes===B||q.pipesCount>1&&Ce(q.pipes,B)!==-1)&&!ve&&(l("false write response, pause",q.awaitDrain),q.awaitDrain++),le.pause())}function ke(T){l("onerror",T),tt(),B.removeListener("error",ke),t(B,"error")===0&&w(B,T)}j(B,"error",ke);function ze(){B.removeListener("finish",Be),tt()}B.once("close",ze);function Be(){l("onfinish"),B.removeListener("close",ze),tt()}B.once("finish",Be);function tt(){l("unpipe"),le.unpipe(B)}return B.emit("pipe",le),q.flowing||(l("pipe resume"),le.resume()),B};function V(B){return function(){var K=B._readableState;l("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&t(B,"data")&&(K.flowing=!0,Q(B))}}E.prototype.unpipe=function(B){var K=this._readableState,le={hasUnpiped:!1};if(K.pipesCount===0)return this;if(K.pipesCount===1)return B&&B!==K.pipes?this:(B||(B=K.pipes),K.pipes=null,K.pipesCount=0,K.flowing=!1,B&&B.emit("unpipe",this,le),this);if(!B){var q=K.pipes,pe=K.pipesCount;K.pipes=null,K.pipesCount=0,K.flowing=!1;for(var he=0;he<pe;he++)q[he].emit("unpipe",this,{hasUnpiped:!1});return this}var W=Ce(K.pipes,B);return W===-1?this:(K.pipes.splice(W,1),K.pipesCount-=1,K.pipesCount===1&&(K.pipes=K.pipes[0]),B.emit("unpipe",this,le),this)},E.prototype.on=function(B,K){var le=a.prototype.on.call(this,B,K),q=this._readableState;return B==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):B==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,l("on readable",q.length,q.reading),q.length?ie(this):q.reading||process.nextTick(U,this)),le},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(B,K){var le=a.prototype.removeListener.call(this,B,K);return B==="readable"&&process.nextTick(Y,this),le},E.prototype.removeAllListeners=function(B){var K=a.prototype.removeAllListeners.apply(this,arguments);return(B==="readable"||B===void 0)&&process.nextTick(Y,this),K};function Y(B){var K=B._readableState;K.readableListening=B.listenerCount("readable")>0,K.resumeScheduled&&!K.paused?K.flowing=!0:B.listenerCount("data")>0&&B.resume()}function U(B){l("readable nexttick read 0"),B.read(0)}E.prototype.resume=function(){var B=this._readableState;return B.flowing||(l("resume"),B.flowing=!B.readableListening,_(this,B)),B.paused=!1,this};function _(B,K){K.resumeScheduled||(K.resumeScheduled=!0,process.nextTick(G,B,K))}function G(B,K){l("resume",K.reading),K.reading||B.read(0),K.resumeScheduled=!1,B.emit("resume"),Q(B),K.flowing&&!K.reading&&B.read(0)}E.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 Q(B){var K=B._readableState;for(l("flow",K.flowing);K.flowing&&B.read()!==null;);}E.prototype.wrap=function(B){var K=this,le=this._readableState,q=!1;B.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var W=le.decoder.end();W&&W.length&&K.push(W)}K.push(null)}),B.on("data",function(W){if(l("wrapped data"),le.decoder&&(W=le.decoder.write(W)),!(le.objectMode&&W==null)&&!(!le.objectMode&&(!W||!W.length))){var ae=K.push(W);ae||(q=!0,B.pause())}});for(var pe in B)this[pe]===void 0&&typeof B[pe]=="function"&&(this[pe]=(function(W){return function(){return B[W].apply(B,arguments)}})(pe));for(var he=0;he<C.length;he++)B.on(C[he],this.emit.bind(this,C[he]));return this._read=function(W){l("wrapped _read",W),q&&(q=!1,B.resume())},this},typeof Symbol=="function"&&(E.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Gtt()),z(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){this._readableState&&(this._readableState.flowing=B)}}),E._fromList=ne,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ne(B,K){if(K.length===0)return null;var le;return K.objectMode?le=K.buffer.shift():!B||B>=K.length?(K.decoder?le=K.buffer.join(""):K.buffer.length===1?le=K.buffer.first():le=K.buffer.concat(K.length),K.buffer.clear()):le=K.buffer.consume(B,K.decoder),le}function ue(B){var K=B._readableState;l("endReadable",K.endEmitted),K.endEmitted||(K.ended=!0,process.nextTick(ye,K,B))}function ye(B,K){if(l("endReadableNT",B.endEmitted,B.length),!B.endEmitted&&B.length===0&&(B.endEmitted=!0,K.readable=!1,K.emit("end"),B.autoDestroy)){var le=K._writableState;(!le||le.autoDestroy&&le.finished)&&K.destroy()}}typeof Symbol=="function"&&(E.from=function(B,K){return S===void 0&&(S=Ftt()),S(E,B,K)});function Ce(B,K){for(var le=0,q=B.length;le<q;le++)if(B[le]===K)return le;return-1}return F7}var q7,kre;function yre(){if(kre)return q7;kre=1,q7=s;var e=yv().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,a=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=xv();function o(u,d){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new a);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),m(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.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 t("_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 v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.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 q7}var Q7,xre;function qtt(){if(xre)return Q7;xre=1,Q7=t;var e=yre();function t(a){if(!(this instanceof t))return new t(a);e.call(this,a)}return t.prototype._transform=function(a,r,n){n(null,a)},Q7}var U7,wre;function Qtt(){if(wre)return U7;wre=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var a=yv().codes,r=a.ERR_MISSING_ARGS,n=a.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,v,f){f=t(f);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=H7()),e(h,{readable:m,writable:v},function(x){if(x)return f(x);y=!0,f()});var k=!1;return function(x){if(!y&&!k){if(k=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();f(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),v=0;v<h;v++)m[v]=arguments[v];var f=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,k=m.map(function(x,z){var S=z<m.length-1,w=z>0;return s(x,S,w,function(C){y||(y=C),C&&k.forEach(l),!S&&(k.forEach(l),f(y))})});return m.reduce(c)}return U7=d,U7}var Ore;function zre(){return Ore||(Ore=1,(function(e,t){t=e.exports=bre(),t.Stream=t,t.Readable=t,t.Writable=lre(),t.Duplex=xv(),t.Transform=yre(),t.PassThrough=qtt(),t.finished=H7(),t.pipeline=Qtt()})(T7,T7.exports)),T7.exports}var Sre;function Cre(){if(Sre)return a2;Sre=1;var e=Gae(),t=C9(),a=zre(),r=a2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=a2.IncomingMessage=function(i,o,s,l){var c=this;if(a.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 f=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),f()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,k){c.headers[k.toLowerCase()]=y,c.rawHeaders.push(k,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(k,x){c._destroyed?x():c.push(Buffer.from(y))?k():c._resumeFetch=k})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();f()}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(f){var y=f.match(/^([^:]+):\s*(.*)/);if(y){var k=y[1].toLowerCase();k==="set-cookie"?(c.headers[k]===void 0&&(c.headers[k]=[]),c.headers[k].push(y[2])):c.headers[k]!==void 0?c.headers[k]+=", "+y[2]:c.headers[k]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var v=m.match(/;\s*charset=([^;])(;|$)/);v&&(c._charset=v[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return t(n,a.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))},a2}var jre;function Utt(){if(jre)return M7.exports;jre=1;var e=Gae(),t=C9(),a=Cre(),r=zre(),n=a.IncomingMessage,i=a.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=M7.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(v){d.setHeader(v,u.headers[v])});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()})};t(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 v=[];if(Object.keys(h).forEach(function(x){var z=h[x].name,S=h[x].value;Array.isArray(S)?S.forEach(function(w){v.push([z,w])}):v.push([z,S])}),u._mode==="fetch"){var f=null;if(e.abortController){var y=new AbortController;f=y.signal,u._fetchAbortController=y,"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:v,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:f}).then(function(x){u._fetchResponse=x,u._resetTimers(!1),u._connect()},function(x){u._resetTimers(!0),u._destroyed||u.emit("error",x)})}else{var k=u._xhr=new globalThis.XMLHttpRequest;try{k.open(u._opts.method,u._opts.url,!0)}catch(x){process.nextTick(function(){u.emit("error",x)});return}"responseType"in k&&(k.responseType=u._mode),"withCredentials"in k&&(k.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in k&&k.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(k.timeout=d.requestTimeout,k.ontimeout=function(){u.emit("requestTimeout")}),v.forEach(function(x){k.setRequestHeader(x[0],x[1])}),u._response=null,k.onreadystatechange=function(){switch(k.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(k.onprogress=function(){u._onXHRProgress()}),k.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{k.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 M7.exports}var W7,Pre;function Wtt(){if(Pre)return W7;Pre=1,W7=t;var e=Object.prototype.hasOwnProperty;function t(){for(var a={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(a[i]=n[i])}return a}return W7}var Are,Mre;function Ztt(){return Mre||(Mre=1,Are={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"}),Are}var Tre;function Jtt(){return Tre||(Tre=1,(function(e){var t=Utt(),a=Cre(),r=Wtt(),n=Ztt(),i=f7(),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 v=new t(s);return l&&v.on("response",l),v},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=t,o.IncomingMessage=a.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"]})(Kae)),Kae}var Bre,Ere;function Ytt(){return Ere||(Ere=1,Bre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Jtt().STATUS_CODES)}),Bre}const Xtt="7.0.8",eat={version:Xtt};var Z7,Rre;function tat(){if(Rre)return Z7;Rre=1;const e=kv,t=f7(),a=Ett(),r=kv,n=kv,i=e2(),o=i.jptr,s=x7().isRef,l=t2().clone,c=t2().circularClone,u=z7().recurse,d=Ltt(),h=Ntt(),m=Iae(),v=Ytt().statusCodes,f=eat.version,y="3.0.0";let k;class x extends Error{constructor(K){super(K),this.name="S2OError"}}function z(B,K){let le=new x(B);if(le.options=K,K.promise)K.promise.reject(le);else throw le}function S(B,K,le){le.warnOnly?K[le.warnProperty||"x-s2o-warning"]=B:z(B,le)}function w(B,K,le){if(B.nullable&&le.patches++,B.discriminator&&typeof B.discriminator=="string"&&(B.discriminator={propertyName:B.discriminator}),B.items&&Array.isArray(B.items)&&(B.items.length===0?B.items={}:B.items.length===1?B.items=B.items[0]:B.items={anyOf:B.items}),B.type&&Array.isArray(B.type))if(le.patch){if(le.patches++,B.type.length===0)delete B.type;else{B.oneOf||(B.oneOf=[]);for(let q of B.type){let pe={};if(q==="null")B.nullable=!0;else{pe.type=q;for(let he of m.arrayProperties)typeof B.prop<"u"&&(pe[he]=B[he],delete B[he])}pe.type&&B.oneOf.push(pe)}delete B.type,B.oneOf.length===0?delete B.oneOf:B.oneOf.length<2&&(B.type=B.oneOf[0].type,Object.keys(B.oneOf[0]).length>1&&S("Lost properties from oneOf",B,le),delete B.oneOf)}B.type&&Array.isArray(B.type)&&B.type.length===1&&(B.type=B.type[0])}else z("(Patchable) schema type must not be an array",le);B.type&&B.type==="null"&&(delete B.type,B.nullable=!0),B.type==="array"&&!B.items&&(B.items={}),B.type==="file"&&(B.type="string",B.format="binary"),typeof B.required=="boolean"&&(B.required&&B.name&&(typeof K.required>"u"&&(K.required=[]),Array.isArray(K.required)&&K.required.push(B.name)),delete B.required),B.xml&&typeof B.xml.namespace=="string"&&(B.xml.namespace||delete B.xml.namespace),typeof B.allowEmptyValue<"u"&&(le.patches++,delete B.allowEmptyValue)}function C(B,K){if(B["x-required"]&&Array.isArray(B["x-required"])&&(B.required||(B.required=[]),B.required=B.required.concat(B["x-required"]),delete B["x-required"]),B["x-anyOf"]&&(B.anyOf=B["x-anyOf"],delete B["x-anyOf"]),B["x-oneOf"]&&(B.oneOf=B["x-oneOf"],delete B["x-oneOf"]),B["x-not"]&&(B.not=B["x-not"],delete B["x-not"]),typeof B["x-nullable"]=="boolean"&&(B.nullable=B["x-nullable"],delete B["x-nullable"]),typeof B["x-discriminator"]=="object"&&typeof B["x-discriminator"].propertyName=="string"){B.discriminator=B["x-discriminator"],delete B["x-discriminator"];for(let le in B.discriminator.mapping){let q=B.discriminator.mapping[le];q.startsWith("#/definitions/")&&(B.discriminator.mapping[le]=q.replace("#/definitions/","#/components/schemas/"))}}}function j(B,K){h.walkSchema(B,{},{},function(le,q,pe){C(le),w(le,q,K)})}function M(B){return B.indexOf("#")>=0?B=B.split("#")[1].split("/").pop():B=B.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(B))}function E(B,K,le){let q=le.payload.options;if(s(B,K)){if(!B[K].startsWith("#/components/")){if(B[K]==="#/consumes")delete B[K],le.parent[le.pkey]=l(q.openapi.consumes);else if(B[K]==="#/produces")delete B[K],le.parent[le.pkey]=l(q.openapi.produces);else if(B[K].startsWith("#/definitions/")){let pe=B[K].replace("#/definitions/","").split("/");const he=i.jpunescape(pe[0]);let W=k.schemas[decodeURIComponent(he)];W?pe[0]=W:S("Could not resolve reference "+B[K],B,q),B[K]="#/components/schemas/"+pe.join("/")}else if(B[K].startsWith("#/parameters/"))B[K]="#/components/parameters/"+m.sanitise(B[K].replace("#/parameters/",""));else if(B[K].startsWith("#/responses/"))B[K]="#/components/responses/"+m.sanitise(B[K].replace("#/responses/",""));else if(B[K].startsWith("#")){let pe=l(i.jptr(q.openapi,B[K]));if(pe===!1)S("direct $ref not found "+B[K],B,q);else if(q.refmap[B[K]])B[K]=q.refmap[B[K]];else{let he=B[K];he=he.replace("/properties/headers/",""),he=he.replace("/properties/responses/",""),he=he.replace("/properties/parameters/",""),he=he.replace("/properties/schemas/","");let W="schemas",ae=he.lastIndexOf("/schema");if(W=he.indexOf("/headers/")>ae?"headers":he.indexOf("/responses/")>ae?"responses":he.indexOf("/example")>ae?"examples":he.indexOf("/x-")>ae?"extensions":he.indexOf("/parameters/")>ae?"parameters":"schemas",W==="schemas"&&j(pe,q),W!=="responses"&&W!=="extensions"){let se=W.substr(0,W.length-1);se==="parameter"&&pe.name&&pe.name===m.sanitise(pe.name)&&(se=encodeURIComponent(pe.name));let ve=1;for(B["x-miro"]&&(se=M(B["x-miro"]),ve="");i.jptr(q.openapi,"#/components/"+W+"/"+se+ve);)ve=ve===""?2:++ve;let ge="#/components/"+W+"/"+se+ve,fe="";W==="examples"&&(pe={value:pe},fe="/value"),i.jptr(q.openapi,ge,pe),q.refmap[B[K]]=ge+fe,B[K]=ge+fe}}}}if(delete B["x-miro"],Object.keys(B).length>1){const pe=B[K],he=le.path.indexOf("/schema")>=0;q.refSiblings==="preserve"||(he&&q.refSiblings==="allOf"?(delete B.$ref,le.parent[le.pkey]={allOf:[{$ref:pe},B]}):le.parent[le.pkey]={$ref:pe})}}if(K==="x-ms-odata"&&typeof B[K]=="string"&&B[K].startsWith("#/")){let pe=B[K].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),he=k.schemas[decodeURIComponent(pe[0])];he?pe[0]=he:S("Could not resolve reference "+B[K],B,q),B[K]="#/components/schemas/"+pe.join("/")}}function L(B,K){for(let le in K.refmap)i.jptr(B,le,{$ref:K.refmap[le]})}function D(B){for(let K in B)for(let le in B[K]){let q=m.sanitise(le);le!==q&&(B[K][q]=B[K][le],delete B[K][le])}}function R(B,K){if(B.type==="basic"&&(B.type="http",B.scheme="basic"),B.type==="oauth2"){let le={},q=B.flow;B.flow==="application"&&(q="clientCredentials"),B.flow==="accessCode"&&(q="authorizationCode"),typeof B.authorizationUrl<"u"&&(le.authorizationUrl=B.authorizationUrl.split("?")[0].trim()||"/"),typeof B.tokenUrl=="string"&&(le.tokenUrl=B.tokenUrl.split("?")[0].trim()||"/"),le.scopes=B.scopes||{},B.flows={},B.flows[q]=le,delete B.flow,delete B.authorizationUrl,delete B.tokenUrl,delete B.scopes,typeof B.name<"u"&&(K.patch?(K.patches++,delete B.name):z("(Patchable) oauth2 securitySchemes should not have name property",K))}}function F(B){return B&&!B["x-s2o-delete"]}function N(B,K){if(B.$ref)B.$ref=B.$ref.replace("#/responses/","#/components/responses/");else{B.type&&!B.schema&&(B.schema={}),B.type&&(B.schema.type=B.type),B.items&&B.items.type!=="array"&&(B.items.collectionFormat!==B.collectionFormat&&S("Nested collectionFormats are not supported",B,K),delete B.items.collectionFormat),B.type==="array"?(B.collectionFormat==="ssv"?S("collectionFormat:ssv is no longer supported for headers",B,K):B.collectionFormat==="pipes"?S("collectionFormat:pipes is no longer supported for headers",B,K):B.collectionFormat==="multi"?B.explode=!0:B.collectionFormat==="tsv"?(S("collectionFormat:tsv is no longer supported",B,K),B["x-collectionFormat"]="tsv"):B.style="simple",delete B.collectionFormat):B.collectionFormat&&(K.patch?(K.patches++,delete B.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",K)),delete B.type;for(let le of m.parameterTypeProperties)typeof B[le]<"u"&&(B.schema[le]=B[le],delete B[le]);for(let le of m.arrayProperties)typeof B[le]<"u"&&(B.schema[le]=B[le],delete B[le])}}function te(B,K){if(B.$ref.indexOf("#/parameters/")>=0){let le=B.$ref.split("#/parameters/");B.$ref=le[0]+"#/components/parameters/"+m.sanitise(le[1])}B.$ref.indexOf("#/definitions/")>=0&&S("Definition used as parameter",B,K)}function X(B,K){let le={};for(let q of Object.keys(B))le[q]=B[q],q==="parameters"&&(le.requestBody={},K.rbname&&(le[K.rbname]=""));return le.requestBody={},le}function ie(B,K,le,q,pe,he,W){let ae={},se=!0,ve;if(K&&K.consumes&&typeof K.consumes=="string")if(W.patch)W.patches++,K.consumes=[K.consumes];else return z("(Patchable) operation.consumes must be an array",W);Array.isArray(he.consumes)||delete he.consumes;let ge=((K?K.consumes:null)||he.consumes||[]).filter(m.uniqueOnly);if(B&&B.$ref&&typeof B.$ref=="string"){te(B,W);let fe=decodeURIComponent(B.$ref.replace("#/components/parameters/","")),ke=!1,ze=he.components.parameters[fe];if((!ze||ze["x-s2o-delete"])&&B.$ref.startsWith("#/")&&(B["x-s2o-delete"]=!0,ke=!0),ke){let Be=B.$ref,tt=o(he,B.$ref);!tt&&Be.startsWith("#/")?S("Could not resolve reference "+Be,B,W):tt&&(B=tt)}}if(B&&(B.name||B.in)){typeof B["x-deprecated"]=="boolean"&&(B.deprecated=B["x-deprecated"],delete B["x-deprecated"]),typeof B["x-example"]<"u"&&(B.example=B["x-example"],delete B["x-example"]),B.in!=="body"&&!B.type&&(W.patch?(W.patches++,B.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",W)),B.type&&typeof B.type=="object"&&B.type.$ref&&(B.type=o(he,B.type.$ref)),B.type==="file"&&(B["x-s2o-originalType"]=B.type,ve=B.type),B.description&&typeof B.description=="object"&&B.description.$ref&&(B.description=o(he,B.description.$ref)),B.description===null&&delete B.description;let fe=B.collectionFormat;if(B.type==="array"&&!fe&&(fe="csv"),fe&&(B.type!=="array"&&(W.patch?(W.patches++,delete B.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",W)),fe==="csv"&&(B.in==="query"||B.in==="cookie")&&(B.style="form",B.explode=!1),fe==="csv"&&(B.in==="path"||B.in==="header")&&(B.style="simple"),fe==="ssv"&&(B.in==="query"?B.style="spaceDelimited":S("collectionFormat:ssv is no longer supported except for in:query parameters",B,W)),fe==="pipes"&&(B.in==="query"?B.style="pipeDelimited":S("collectionFormat:pipes is no longer supported except for in:query parameters",B,W)),fe==="multi"&&(B.explode=!0),fe==="tsv"&&(S("collectionFormat:tsv is no longer supported",B,W),B["x-collectionFormat"]="tsv"),delete B.collectionFormat),B.type&&B.type!=="body"&&B.in!=="formData")if(B.items&&B.schema)S("parameter has array,items and schema",B,W);else{B.schema&&W.patches++,(!B.schema||typeof B.schema!="object")&&(B.schema={}),B.schema.type=B.type,B.items&&(B.schema.items=B.items,delete B.items,u(B.schema.items,null,function(ke,ze,Be){ze==="collectionFormat"&&typeof ke[ze]=="string"&&(fe&&ke[ze]!==fe&&S("Nested collectionFormats are not supported",B,W),delete ke[ze])}));for(let ke of m.parameterTypeProperties)typeof B[ke]<"u"&&(B.schema[ke]=B[ke]),delete B[ke]}B.schema&&j(B.schema,W),B["x-ms-skip-url-encoding"]&&B.in==="query"&&(B.allowReserved=!0,delete B["x-ms-skip-url-encoding"])}if(B&&B.in==="formData"){se=!1,ae.content={};let fe="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(fe="multipart/form-data"),ae.content[fe]={},B.schema)ae.content[fe].schema=B.schema,B.schema.$ref&&(ae["x-s2o-name"]=decodeURIComponent(B.schema.$ref.replace("#/components/schemas/","")));else{ae.content[fe].schema={},ae.content[fe].schema.type="object",ae.content[fe].schema.properties={},ae.content[fe].schema.properties[B.name]={};let ke=ae.content[fe].schema,ze=ae.content[fe].schema.properties[B.name];B.description&&(ze.description=B.description),B.example&&(ze.example=B.example),B.type&&(ze.type=B.type);for(let Be of m.parameterTypeProperties)typeof B[Be]<"u"&&(ze[Be]=B[Be]);B.required===!0&&(ke.required||(ke.required=[]),ke.required.push(B.name),ae.required=!0),typeof B.default<"u"&&(ze.default=B.default),ze.properties&&(ze.properties=B.properties),B.allOf&&(ze.allOf=B.allOf),B.type==="array"&&B.items&&(ze.items=B.items,ze.items.collectionFormat&&delete ze.items.collectionFormat),(ve==="file"||B["x-s2o-originalType"]==="file")&&(ze.type="string",ze.format="binary"),ee(B,ze)}}else B&&B.type==="file"&&(B.required&&(ae.required=B.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",ee(B,ae));if(B&&B.in==="body"){ae.content={},B.name&&(ae["x-s2o-name"]=(K&&K.operationId?m.sanitiseAll(K.operationId):"")+("_"+B.name).toCamelCase()),B.description&&(ae.description=B.description),B.required&&(ae.required=B.required),K&&W.rbname&&B.name&&(K[W.rbname]=B.name),B.schema&&B.schema.$ref?ae["x-s2o-name"]=decodeURIComponent(B.schema.$ref.replace("#/components/schemas/","")):B.schema&&B.schema.type==="array"&&B.schema.items&&B.schema.items.$ref&&(ae["x-s2o-name"]=decodeURIComponent(B.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let fe of ge)ae.content[fe]={},ae.content[fe].schema=l(B.schema||{}),j(ae.content[fe].schema,W);ee(B,ae)}if(Object.keys(ae).length>0&&(B["x-s2o-delete"]=!0,K))if(K.requestBody&&se){K.requestBody["x-s2o-overloaded"]=!0;let fe=K.operationId||pe;S("Operation "+fe+" has multiple requestBodies",K,W)}else K.requestBody||(K=le[q]=X(K,W)),K.requestBody.content&&K.requestBody.content["multipart/form-data"]&&K.requestBody.content["multipart/form-data"].schema&&K.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?(K.requestBody.content["multipart/form-data"].schema.properties=Object.assign(K.requestBody.content["multipart/form-data"].schema.properties,ae.content["multipart/form-data"].schema.properties),K.requestBody.content["multipart/form-data"].schema.required=(K.requestBody.content["multipart/form-data"].schema.required||[]).concat(ae.content["multipart/form-data"].schema.required||[]),K.requestBody.content["multipart/form-data"].schema.required.length||delete K.requestBody.content["multipart/form-data"].schema.required):K.requestBody.content&&K.requestBody.content["application/x-www-form-urlencoded"]&&K.requestBody.content["application/x-www-form-urlencoded"].schema&&K.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?(K.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(K.requestBody.content["application/x-www-form-urlencoded"].schema.properties,ae.content["application/x-www-form-urlencoded"].schema.properties),K.requestBody.content["application/x-www-form-urlencoded"].schema.required=(K.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(ae.content["application/x-www-form-urlencoded"].schema.required||[]),K.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete K.requestBody.content["application/x-www-form-urlencoded"].schema.required):(K.requestBody=Object.assign(K.requestBody,ae),K.requestBody["x-s2o-name"]||(K.requestBody.schema&&K.requestBody.schema.$ref?K.requestBody["x-s2o-name"]=decodeURIComponent(K.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):K.operationId&&(K.requestBody["x-s2o-name"]=m.sanitiseAll(K.operationId))));if(B&&!B["x-s2o-delete"]){delete B.type;for(let fe of m.parameterTypeProperties)delete B[fe];B.in==="path"&&(typeof B.required>"u"||B.required!==!0)&&(W.patch?(W.patches++,B.required=!0):z("(Patchable) path parameters must be required:true ["+B.name+" in "+pe+"]",W))}return K}function ee(B,K){for(let le in B)le.startsWith("x-")&&!le.startsWith("x-s2o")&&(K[le]=B[le])}function ce(B,K,le,q,pe){if(!B)return!1;if(B.$ref&&typeof B.$ref=="string")B.$ref.indexOf("#/definitions/")>=0?S("definition used as response: "+B.$ref,B,pe):B.$ref.startsWith("#/responses/")&&(B.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(B.$ref.replace("#/responses/",""))));else{if((typeof B.description>"u"||B.description===null||B.description===""&&pe.patch)&&(pe.patch?typeof B=="object"&&!Array.isArray(B)&&(pe.patches++,B.description=v[B]||""):z("(Patchable) response.description is mandatory",pe)),typeof B.schema<"u"){if(j(B.schema,pe),B.schema.$ref&&typeof B.schema.$ref=="string"&&B.schema.$ref.startsWith("#/responses/")&&(B.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(B.schema.$ref.replace("#/responses/","")))),le&&le.produces&&typeof le.produces=="string")if(pe.patch)pe.patches++,le.produces=[le.produces];else return z("(Patchable) operation.produces must be an array",pe);q.produces&&!Array.isArray(q.produces)&&delete q.produces;let he=((le?le.produces:null)||q.produces||[]).filter(m.uniqueOnly);he.length||he.push("*/*"),B.content={};for(let W of he){if(B.content[W]={},B.content[W].schema=l(B.schema),B.examples&&B.examples[W]){let ae={};ae.value=B.examples[W],B.content[W].examples={},B.content[W].examples.response=ae,delete B.examples[W]}B.content[W].schema.type==="file"&&(B.content[W].schema={type:"string",format:"binary"})}delete B.schema}for(let he in B.examples)B.content||(B.content={}),B.content[he]||(B.content[he]={}),B.content[he].examples={},B.content[he].examples.response={},B.content[he].examples.response.value=B.examples[he];if(delete B.examples,B.headers)for(let he in B.headers)he.toLowerCase()==="status code"?pe.patch?(pe.patches++,delete B.headers[he]):z('(Patchable) "Status Code" is not a valid header',pe):N(B.headers[he],pe)}}function Z(B,K,le,q,pe){for(let he in B){let W=B[he];W&&W["x-trace"]&&typeof W["x-trace"]=="object"&&(W.trace=W["x-trace"],delete W["x-trace"]),W&&W["x-summary"]&&typeof W["x-summary"]=="string"&&(W.summary=W["x-summary"],delete W["x-summary"]),W&&W["x-description"]&&typeof W["x-description"]=="string"&&(W.description=W["x-description"],delete W["x-description"]),W&&W["x-servers"]&&Array.isArray(W["x-servers"])&&(W.servers=W["x-servers"],delete W["x-servers"]);for(let ae in W)if(m.httpMethods.indexOf(ae)>=0||ae==="x-amazon-apigateway-any-method"){let se=W[ae];if(se&&se.parameters&&Array.isArray(se.parameters)){if(W.parameters)for(let ve of W.parameters)typeof ve.$ref=="string"&&(te(ve,le),ve=o(pe,ve.$ref)),!se.parameters.find(function(ge,fe,ke){return ge.name===ve.name&&ge.in===ve.in})&&(ve.in==="formData"||ve.in==="body"||ve.type==="file")&&(se=ie(ve,se,W,ae,he,pe,le),le.rbname&&se[le.rbname]===""&&delete se[le.rbname]);for(let ve of se.parameters)se=ie(ve,se,W,ae,ae+":"+he,pe,le);le.rbname&&se[le.rbname]===""&&delete se[le.rbname],le.debug||se.parameters&&(se.parameters=se.parameters.filter(F))}if(se&&se.security&&D(se.security),typeof se=="object"){if(!se.responses){let ve={};ve.description="Default response",se.responses={default:ve}}for(let ve in se.responses){let ge=se.responses[ve];ce(ge,ve,se,pe,le)}}if(se&&se["x-servers"]&&Array.isArray(se["x-servers"]))se.servers=se["x-servers"],delete se["x-servers"];else if(se&&se.schemes&&se.schemes.length){for(let ve of se.schemes)if((!pe.schemes||pe.schemes.indexOf(ve)<0)&&(se.servers||(se.servers=[]),Array.isArray(pe.servers)))for(let ge of pe.servers){let fe=l(ge),ke=t.parse(fe.url);ke.protocol=ve,fe.url=ke.format(),se.servers.push(fe)}}if(le.debug&&(se["x-s2o-consumes"]=se.consumes||[],se["x-s2o-produces"]=se.produces||[]),se){if(delete se.consumes,delete se.produces,delete se.schemes,se["x-ms-examples"]){for(let ve in se["x-ms-examples"]){let ge=se["x-ms-examples"][ve],fe=m.sanitiseAll(ve);if(ge.parameters)for(let ke in ge.parameters){let ze=ge.parameters[ke];for(let Be of(se.parameters||[]).concat(W.parameters||[]))Be.$ref&&(Be=i.jptr(pe,Be.$ref)),Be.name===ke&&!Be.example&&(Be.examples||(Be.examples={}),Be.examples[ve]={value:ze})}if(ge.responses)for(let ke in ge.responses){if(ge.responses[ke].headers)for(let ze in ge.responses[ke].headers){let Be=ge.responses[ke].headers[ze];for(let tt in se.responses[ke].headers)if(tt===ze){let T=se.responses[ke].headers[tt];T.example=Be}}if(ge.responses[ke].body&&(pe.components.examples[fe]={value:l(ge.responses[ke].body)},se.responses[ke]&&se.responses[ke].content))for(let ze in se.responses[ke].content){let Be=se.responses[ke].content[ze];Be.examples||(Be.examples={}),Be.examples[ve]={$ref:"#/components/examples/"+fe}}}}delete se["x-ms-examples"]}if(se.parameters&&se.parameters.length===0&&delete se.parameters,se.requestBody){let ve=se.operationId?m.sanitiseAll(se.operationId):m.sanitiseAll(ae+he).toCamelCase(),ge=m.sanitise(se.requestBody["x-s2o-name"]||ve||"");delete se.requestBody["x-s2o-name"];let fe=JSON.stringify(se.requestBody),ke=m.hash(fe);if(!q[ke]){let Be={};Be.name=ge,Be.body=se.requestBody,Be.refs=[],q[ke]=Be}let ze="#/"+K+"/"+encodeURIComponent(i.jpescape(he))+"/"+ae+"/requestBody";q[ke].refs.push(ze)}}}if(W&&W.parameters){for(let ae in W.parameters){let se=W.parameters[ae];ie(se,null,W,null,he,pe,le)}!le.debug&&Array.isArray(W.parameters)&&(W.parameters=W.parameters.filter(F))}}}function V(B,K){let le={};k={schemas:{}},B.security&&D(B.security);for(let pe in B.components.securitySchemes){let he=m.sanitise(pe);pe!==he&&(B.components.securitySchemes[he]&&z("Duplicate sanitised securityScheme name "+he,K),B.components.securitySchemes[he]=B.components.securitySchemes[pe],delete B.components.securitySchemes[pe]),R(B.components.securitySchemes[he],K)}for(let pe in B.components.schemas){let he=m.sanitiseAll(pe),W="";if(pe!==he){for(;B.components.schemas[he+W];)W=W?++W:2;B.components.schemas[he+W]=B.components.schemas[pe],delete B.components.schemas[pe]}k.schemas[pe]=he+W,j(B.components.schemas[he+W],K)}K.refmap={},u(B,{payload:{options:K}},E),L(B,K);for(let pe in B.components.parameters){let he=m.sanitise(pe);pe!==he&&(B.components.parameters[he]&&z("Duplicate sanitised parameter name "+he,K),B.components.parameters[he]=B.components.parameters[pe],delete B.components.parameters[pe]);let W=B.components.parameters[he];ie(W,null,null,null,he,B,K)}for(let pe in B.components.responses){let he=m.sanitise(pe);pe!==he&&(B.components.responses[he]&&z("Duplicate sanitised response name "+he,K),B.components.responses[he]=B.components.responses[pe],delete B.components.responses[pe]);let W=B.components.responses[he];if(ce(W,he,null,B,K),W.headers)for(let ae in W.headers)ae.toLowerCase()==="status code"?K.patch?(K.patches++,delete W.headers[ae]):z('(Patchable) "Status Code" is not a valid header',K):N(W.headers[ae],K)}for(let pe in B.components.requestBodies){let he=B.components.requestBodies[pe],W=JSON.stringify(he),ae=m.hash(W),se={};se.name=pe,se.body=he,se.refs=[],le[ae]=se}if(Z(B.paths,"paths",K,le,B),B["x-ms-paths"]&&Z(B["x-ms-paths"],"x-ms-paths",K,le,B),!K.debug)for(let pe in B.components.parameters)B.components.parameters[pe]["x-s2o-delete"]&&delete B.components.parameters[pe];K.debug&&(B["x-s2o-consumes"]=B.consumes||[],B["x-s2o-produces"]=B.produces||[]),delete B.consumes,delete B.produces,delete B.schemes;let q=[];if(B.components.requestBodies={},!K.resolveInternal){let pe=1;for(let he in le){let W=le[he];if(W.refs.length>1){let ae="";for(W.name||(W.name="requestBody",ae=pe++);q.indexOf(W.name+ae)>=0;)ae=ae?++ae:2;W.name=W.name+ae,q.push(W.name),B.components.requestBodies[W.name]=l(W.body);for(let se in W.refs){let ve={};ve.$ref="#/components/requestBodies/"+W.name,i.jptr(B,W.refs[se],ve)}}}}return B.components.responses&&Object.keys(B.components.responses).length===0&&delete B.components.responses,B.components.parameters&&Object.keys(B.components.parameters).length===0&&delete B.components.parameters,B.components.examples&&Object.keys(B.components.examples).length===0&&delete B.components.examples,B.components.requestBodies&&Object.keys(B.components.requestBodies).length===0&&delete B.components.requestBodies,B.components.securitySchemes&&Object.keys(B.components.securitySchemes).length===0&&delete B.components.securitySchemes,B.components.headers&&Object.keys(B.components.headers).length===0&&delete B.components.headers,B.components.schemas&&Object.keys(B.components.schemas).length===0&&delete B.components.schemas,B.components&&Object.keys(B.components).length===0&&delete B.components,B}function Y(B){return!B||!B.url||typeof B.url!="string"||(B.url=B.url.split("{{").join("{"),B.url=B.url.split("}}").join("}"),B.url.replace(/\{(.+?)\}/g,function(K,le){B.variables||(B.variables={}),B.variables[le]={default:"unknown"}})),B}function U(B,K,le){if(typeof B.info>"u"||B.info===null)if(K.patch)K.patches++,B.info={version:"",title:""};else return le(new x("(Patchable) info object is mandatory"));if(typeof B.info!="object"||Array.isArray(B.info))return le(new x("info must be an object"));if(typeof B.info.title>"u"||B.info.title===null)if(K.patch)K.patches++,B.info.title="";else return le(new x("(Patchable) info.title cannot be null"));if(typeof B.info.version>"u"||B.info.version===null)if(K.patch)K.patches++,B.info.version="";else return le(new x("(Patchable) info.version cannot be null"));if(typeof B.info.version!="string")if(K.patch)K.patches++,B.info.version=B.info.version.toString();else return le(new x("(Patchable) info.version must be a string"));if(typeof B.info.logo<"u")if(K.patch)K.patches++,B.info["x-logo"]=B.info.logo,delete B.info.logo;else return le(new x("(Patchable) info should not have logo property"));if(typeof B.info.termsOfService<"u"){if(B.info.termsOfService===null)if(K.patch)K.patches++,B.info.termsOfService="";else return le(new x("(Patchable) info.termsOfService cannot be null"));try{new URL(B.info.termsOfService)}catch{if(K.patch)K.patches++,delete B.info.termsOfService;else return le(new x("(Patchable) info.termsOfService must be a URL"))}}}function _(B,K,le){if(typeof B.paths>"u")if(K.patch)K.patches++,B.paths={};else return le(new x("(Patchable) paths object is mandatory"))}function G(B,K){const le=new WeakSet;u(B,{identityDetection:!0},function(q,pe,he){typeof q[pe]=="object"&&q[pe]!==null&&(le.has(q[pe])?K.anchors?q[pe]=l(q[pe]):z("YAML anchor or merge key at "+he.path,K):le.add(q[pe]))})}function Q(B,K,le){return a(le,new Promise(function(q,pe){if(B||(B={}),K.original=B,K.text||(K.text=n.stringify(B)),K.externals=[],K.externalRefs={},K.rewriteRefs=!0,K.preserveMiro=!0,K.promise={},K.promise.resolve=q,K.promise.reject=pe,K.patches=0,K.cache||(K.cache={}),K.source&&(K.cache[K.source]=K.original),G(B,K),B.openapi&&typeof B.openapi=="string"&&B.openapi.startsWith("3.")){K.openapi=c(B),U(K.openapi,K,pe),_(K.openapi,K,pe),d.optionalResolve(K).then(function(){return K.direct?q(K.openapi):q(K)}).catch(function(W){console.warn(W),pe(W)});return}if(!B.swagger||B.swagger!="2.0")return pe(new x("Unsupported swagger/OpenAPI version: "+(B.openapi?B.openapi:B.swagger)));let he=K.openapi={};if(he.openapi=typeof K.targetVersion=="string"&&K.targetVersion.startsWith("3.")?K.targetVersion:y,K.origin){he["x-origin"]||(he["x-origin"]=[]);let W={};W.url=K.source||K.origin,W.format="swagger",W.version=B.swagger,W.converter={},W.converter.url="https://github.com/mermade/oas-kit",W.converter.version=f,he["x-origin"].push(W)}if(he=Object.assign(he,c(B)),delete he.swagger,u(he,{},function(W,ae,se){W[ae]===null&&!ae.startsWith("x-")&&ae!=="default"&&se.path.indexOf("/example")<0&&delete W[ae]}),B.host)for(let W of Array.isArray(B.schemes)?B.schemes:[""]){let ae={},se=(B.basePath||"").replace(/\/$/,"");ae.url=(W?W+":":"")+"//"+B.host+se,Y(ae),he.servers||(he.servers=[]),he.servers.push(ae)}else if(B.basePath){let W={};W.url=B.basePath,Y(W),he.servers||(he.servers=[]),he.servers.push(W)}if(delete he.host,delete he.basePath,he["x-servers"]&&Array.isArray(he["x-servers"])&&(he.servers=he["x-servers"],delete he["x-servers"]),B["x-ms-parameterized-host"]){let W=B["x-ms-parameterized-host"],ae={};ae.url=W.hostTemplate+(B.basePath?B.basePath:""),ae.variables={};const se=ae.url.match(/\{\w+\}/g);for(let ve in W.parameters){let ge=W.parameters[ve];ge.$ref&&(ge=l(o(he,ge.$ref))),ve.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=se[ve].replace("{","").replace("}","")),ae.variables[ge.name]=ge,delete ge.name)}he.servers||(he.servers=[]),W.useSchemePrefix===!1?he.servers.push(ae):B.schemes.forEach(ve=>{he.servers.push(Object.assign({},ae,{url:ve+"://"+ae.url}))}),delete he["x-ms-parameterized-host"]}U(he,K,pe),_(he,K,pe),typeof he.consumes=="string"&&(he.consumes=[he.consumes]),typeof he.produces=="string"&&(he.produces=[he.produces]),he.components={},he["x-callbacks"]&&(he.components.callbacks=he["x-callbacks"],delete he["x-callbacks"]),he.components.examples={},he.components.headers={},he["x-links"]&&(he.components.links=he["x-links"],delete he["x-links"]),he.components.parameters=he.parameters||{},he.components.responses=he.responses||{},he.components.requestBodies={},he.components.securitySchemes=he.securityDefinitions||{},he.components.schemas=he.definitions||{},delete he.definitions,delete he.responses,delete he.parameters,delete he.securityDefinitions,d.optionalResolve(K).then(function(){V(K.openapi,K),K.direct?q(K.openapi):q(K)}).catch(function(W){console.warn(W),pe(W)})}))}function ne(B,K,le){return a(le,new Promise(function(q,pe){let he=null,W=null;try{he=JSON.parse(B),K.text=JSON.stringify(he,null,2)}catch(ae){W=ae;try{he=n.parse(B,{schema:"core",prettyErrors:!0}),K.sourceYaml=!0,K.text=B}catch(se){W=se}}he?Q(he,K).then(ae=>q(ae)).catch(ae=>pe(ae)):pe(new x(W?W.message:"Could not parse string"))}))}function ue(B,K,le){return a(le,new Promise(function(q,pe){K.origin=!0,K.source||(K.source=B),K.verbose&&console.warn("GET "+B),K.fetch||(K.fetch=r);const he=Object.assign({},K.fetchOptions,{agent:K.agent});K.fetch(B,he).then(function(W){if(W.status!==200)throw new x(`Received status code ${W.status}: ${B}`);return W.text()}).then(function(W){ne(W,K).then(ae=>q(ae)).catch(ae=>pe(ae))}).catch(function(W){pe(W)})}))}function ye(B,K,le){return a(le,new Promise(function(q,pe){e.readFile(B,K.encoding||"utf8",function(he,W){he?pe(he):(K.sourceFile=B,ne(W,K).then(ae=>q(ae)).catch(ae=>pe(ae)))})}))}function Ce(B,K,le){return a(le,new Promise(function(q,pe){let he="";B.on("data",function(W){he+=W}).on("end",function(){ne(he,K).then(W=>q(W)).catch(W=>pe(W))})}))}return Z7={S2OError:x,targetVersion:y,convert:Q,convertObj:Q,convertUrl:ue,convertStr:ne,convertFile:ye,convertStream:Ce},Z7}var aat=tat();const rat=Ur(aat);function nat(e){return e.paths||(e.paths={}),new Promise((t,a)=>rat.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return a(r);t(n?.openapi)}))}async function iat(){try{return(await yae())?.resolvedConfig.openapi||{}}catch{return{}}}async function oat(e){const t=await yae(),a={config:t,base:ou?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};ou&&(t.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?a.doc=sat(e):a.ref=e;const{bundle:{parsed:r}}=await ztt(a);return r.swagger!==void 0?nat(r):r}function sat(e){return{source:{absoluteRef:""},parsed:e}}async function lat(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await oat(e||t);try{HGe(r)}catch{}return r}const cat=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=A.useState(),[s,l]=A.useState(!0),[c,u]=A.useState(null),[d,h]=A.useState(e||{});A.useEffect(()=>{async function v(){l(!0);try{const f=await iat();h({...e,...f}),u(await lat(a,t,e))}catch(f){o(f.message)}}v()},[a,t,e]);const m=A.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},GGe([c,t,d]));return A.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?dl(e?.hideLoading,!1)?null:p.jsx(QZe,{color:"--loading-spinner-color"}):A.isValidElement(n)?A.cloneElement(n,{store:m}):null};function uat({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return p.jsx(cat,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:p.jsx(Iee,{withCommonStyles:!0,router:o||"hash"})})}function dat(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function pat(e){const t=dat(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function hat(e,t=document.querySelector("redoc")){oF.hydrateRoot(t,p.jsx(Iee,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function _re(e,t={},a=UT("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...t,...pat(a)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),oF.createRoot(a).render(A.createElement(uat,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const mat="3.18.0-next.3",gat="6955c3e318";function fat(){const e=UT("redoc");if(!e)return;const t=e.getAttribute("spec-url");t&&_re(t,{},e)}fat();function R1(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 Lre={exports:{}},Nre;function vat(){return Nre||(Nre=1,(function(e,t){(function(a){e.exports=a()})(function(){return(function a(r,n,i){function o(c,u){if(!n[c]){if(!r[c]){var d=typeof R1=="function"&&R1;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[c]={exports:{}};r[c][0].call(m.exports,function(v){var f=r[c][1][v];return o(f||v)},m,m.exports,a,r,n,i)}return n[c].exports}for(var s=typeof R1=="function"&&R1,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(a,r,n){var i=a("./utils"),o=a("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(l){for(var c,u,d,h,m,v,f,y=[],k=0,x=l.length,z=x,S=i.getTypeOf(l)!=="string";k<l.length;)z=x-k,d=S?(c=l[k++],u=k<x?l[k++]:0,k<x?l[k++]:0):(c=l.charCodeAt(k++),u=k<x?l.charCodeAt(k++):0,k<x?l.charCodeAt(k++):0),h=c>>2,m=(3&c)<<4|u>>4,v=1<z?(15&u)<<2|d>>6:64,f=2<z?63&d:64,y.push(s.charAt(h)+s.charAt(m)+s.charAt(v)+s.charAt(f));return y.join("")},n.decode=function(l){var c,u,d,h,m,v,f=0,y=0,k="data:";if(l.substr(0,k.length)===k)throw new Error("Invalid base64 input, it looks like a data url.");var x,z=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===s.charAt(64)&&z--,l.charAt(l.length-2)===s.charAt(64)&&z--,z%1!=0)throw new Error("Invalid base64 input, bad content length.");for(x=o.uint8array?new Uint8Array(0|z):new Array(0|z);f<l.length;)c=s.indexOf(l.charAt(f++))<<2|(h=s.indexOf(l.charAt(f++)))>>4,u=(15&h)<<4|(m=s.indexOf(l.charAt(f++)))>>2,d=(3&m)<<6|(v=s.indexOf(l.charAt(f++))),x[y++]=c,m!==64&&(x[y++]=u),v!==64&&(x[y++]=d);return x}},{"./support":30,"./utils":32}],2:[function(a,r,n){var i=a("./external"),o=a("./stream/DataWorker"),s=a("./stream/Crc32Probe"),l=a("./stream/DataLengthProbe");function c(u,d,h,m,v){this.compressedSize=u,this.uncompressedSize=d,this.crc32=h,this.compression=m,this.compressedContent=v}c.prototype={getContentWorker:function(){var u=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return u.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,d,h){return u.pipe(new s).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,r,n){var i=a("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,r,n){var i=a("./utils"),o=(function(){for(var s,l=[],c=0;c<256;c++){s=c;for(var u=0;u<8;u++)s=1&s?3988292384^s>>>1:s>>>1;l[c]=s}return l})();r.exports=function(s,l){return s!==void 0&&s.length?i.getTypeOf(s)!=="string"?(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u[f])];return-1^c})(0|l,s,s.length,0):(function(c,u,d,h){var m=o,v=h+d;c^=-1;for(var f=h;f<v;f++)c=c>>>8^m[255&(c^u.charCodeAt(f))];return-1^c})(0|l,s,s.length,0):0}},{"./utils":32}],5:[function(a,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(a,r,n){var i=null;i=typeof Promise<"u"?Promise:a("lie"),r.exports={Promise:i}},{lie:37}],7:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=a("pako"),s=a("./utils"),l=a("./stream/GenericWorker"),c=i?"uint8array":"array";function u(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}n.magic="\b\0",s.inherits(u,l),u.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(c,d.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},n.compressWorker=function(d){return new u("Deflate",d)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,r,n){function i(m,v){var f,y="";for(f=0;f<v;f++)y+=String.fromCharCode(255&m),m>>>=8;return y}function o(m,v,f,y,k,x){var z,S,w=m.file,C=m.compression,j=x!==c.utf8encode,M=s.transformTo("string",x(w.name)),E=s.transformTo("string",c.utf8encode(w.name)),L=w.comment,D=s.transformTo("string",x(L)),R=s.transformTo("string",c.utf8encode(L)),F=E.length!==w.name.length,N=R.length!==L.length,te="",X="",ie="",ee=w.dir,ce=w.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};v&&!f||(Z.crc32=m.crc32,Z.compressedSize=m.compressedSize,Z.uncompressedSize=m.uncompressedSize);var V=0;v&&(V|=8),j||!F&&!N||(V|=2048);var Y=0,U=0;ee&&(Y|=16),k==="UNIX"?(U=798,Y|=(function(G,Q){var ne=G;return G||(ne=Q?16893:33204),(65535&ne)<<16})(w.unixPermissions,ee)):(U=20,Y|=(function(G){return 63&(G||0)})(w.dosPermissions)),z=ce.getUTCHours(),z<<=6,z|=ce.getUTCMinutes(),z<<=5,z|=ce.getUTCSeconds()/2,S=ce.getUTCFullYear()-1980,S<<=4,S|=ce.getUTCMonth()+1,S<<=5,S|=ce.getUTCDate(),F&&(X=i(1,1)+i(u(M),4)+E,te+="up"+i(X.length,2)+X),N&&(ie=i(1,1)+i(u(D),4)+R,te+="uc"+i(ie.length,2)+ie);var _="";return _+=`
|
|
10432
10432
|
\0`,_+=i(V,2),_+=C.magic,_+=i(z,2),_+=i(S,2),_+=i(Z.crc32,4),_+=i(Z.compressedSize,4),_+=i(Z.uncompressedSize,4),_+=i(M.length,2),_+=i(te.length,2),{fileRecord:d.LOCAL_FILE_HEADER+_+M+te,dirRecord:d.CENTRAL_FILE_HEADER+i(U,2)+_+i(D.length,2)+"\0\0\0\0"+i(Y,4)+i(y,4)+M+te+D}}var s=a("../utils"),l=a("../stream/GenericWorker"),c=a("../utf8"),u=a("../crc32"),d=a("../signature");function h(m,v,f,y){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=f,this.encodeFileName=y,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,l),h.prototype.push=function(m){var v=m.meta.percent||0,f=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:f?(v+100*(f-y-1))/f:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var v=this.streamFiles&&!m.file.dir;if(v){var f=o(m,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var v=this.streamFiles&&!m.file.dir,f=o(m,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),v)this.push({data:(function(y){return d.DATA_DESCRIPTOR+i(y.crc32,4)+i(y.compressedSize,4)+i(y.uncompressedSize,4)})(m),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var f=this.bytesWritten-m,y=(function(k,x,z,S,w){var C=s.transformTo("string",w(S));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(k,2)+i(k,2)+i(x,4)+i(z,4)+i(C.length,2)+C})(this.dirRecords.length,f,m,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(m){this._sources.push(m);var v=this;return m.on("data",function(f){v.processChunk(f)}),m.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),m.on("error",function(f){v.error(f)}),this},h.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(m){var v=this._sources;if(!l.prototype.error.call(this,m))return!1;for(var f=0;f<v.length;f++)try{v[f].error(m)}catch{}return!0},h.prototype.lock=function(){l.prototype.lock.call(this);for(var m=this._sources,v=0;v<m.length;v++)m[v].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,r,n){var i=a("../compressions"),o=a("./ZipFileWorker");n.generateWorker=function(s,l,c){var u=new o(l.streamFiles,c,l.platform,l.encodeFileName),d=0;try{s.forEach(function(h,m){d++;var v=(function(x,z){var S=x||z,w=i[S];if(!w)throw new Error(S+" is not a valid compression method !");return w})(m.options.compression,l.compression),f=m.options.compressionOptions||l.compressionOptions||{},y=m.dir,k=m.date;m._compressWorker(v,f).withStreamInfo("file",{name:h,dir:y,date:k,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(u)}),u.entriesCount=d}catch(h){u.error(h)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,r,n){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var s in this)typeof this[s]!="function"&&(o[s]=this[s]);return o}}(i.prototype=a("./object")).loadAsync=a("./load"),i.support=a("./support"),i.defaults=a("./defaults"),i.version="3.10.1",i.loadAsync=function(o,s){return new i().loadAsync(o,s)},i.external=a("./external"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,r,n){var i=a("./utils"),o=a("./external"),s=a("./utf8"),l=a("./zipEntries"),c=a("./stream/Crc32Probe"),u=a("./nodejsUtils");function d(h){return new o.Promise(function(m,v){var f=h.decompressed.getContentWorker().pipe(new c);f.on("error",function(y){v(y)}).on("end",function(){f.streamInfo.crc32!==h.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var v=this;return m=i.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),u.isNode&&u.isStream(h)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,m.optimizedBinaryString,m.base64).then(function(f){var y=new l(m);return y.load(f),y}).then(function(f){var y=[o.Promise.resolve(f)],k=f.files;if(m.checkCRC32)for(var x=0;x<k.length;x++)y.push(d(k[x]));return o.Promise.all(y)}).then(function(f){for(var y=f.shift(),k=y.files,x=0;x<k.length;x++){var z=k[x],S=z.fileNameStr,w=i.resolve(z.fileNameStr);v.file(w,z.decompressed,{binary:!0,optimizedBinaryString:!0,date:z.date,dir:z.dir,comment:z.fileCommentStr.length?z.fileCommentStr:null,unixPermissions:z.unixPermissions,dosPermissions:z.dosPermissions,createFolders:m.createFolders}),z.dir||(v.file(w).unsafeOriginalName=S)}return y.zipComment.length&&(v.comment=y.zipComment),v})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,r,n){var i=a("../utils"),o=a("../stream/GenericWorker");function s(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(s,o),s.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},s.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,r,n){var i=a("readable-stream").Readable;function o(s,l,c){i.call(this,l),this._helper=s;var u=this;s.on("data",function(d,h){u.push(d)||u._helper.pause(),c&&c(h)}).on("error",function(d){u.emit("error",d)}).on("end",function(){u.push(null)})}a("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},r.exports=o},{"../utils":32,"readable-stream":16}],14:[function(a,r,n){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(a,r,n){function i(w,C,j){var M,E=s.getTypeOf(C),L=s.extend(j||{},u);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(w=k(w)),L.createFolders&&(M=y(w))&&x.call(this,M,!0);var D=E==="string"&&L.binary===!1&&L.base64===!1;j&&j.binary!==void 0||(L.binary=!D),(C instanceof d&&C.uncompressedSize===0||L.dir||!C||C.length===0)&&(L.base64=!1,L.binary=!0,C="",L.compression="STORE",E="string");var R=null;R=C instanceof d||C instanceof l?C:v.isNode&&v.isStream(C)?new f(w,C):s.prepareContent(w,C,L.binary,L.optimizedBinaryString,L.base64);var F=new h(w,R,L);this.files[w]=F}var o=a("./utf8"),s=a("./utils"),l=a("./stream/GenericWorker"),c=a("./stream/StreamHelper"),u=a("./defaults"),d=a("./compressedObject"),h=a("./zipObject"),m=a("./generate"),v=a("./nodejsUtils"),f=a("./nodejs/NodejsStreamInputAdapter"),y=function(w){w.slice(-1)==="/"&&(w=w.substring(0,w.length-1));var C=w.lastIndexOf("/");return 0<C?w.substring(0,C):""},k=function(w){return w.slice(-1)!=="/"&&(w+="/"),w},x=function(w,C){return C=C!==void 0?C:u.createFolders,w=k(w),this.files[w]||i.call(this,w,null,{dir:!0,createFolders:C}),this.files[w]};function z(w){return Object.prototype.toString.call(w)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(w){var C,j,M;for(C in this.files)M=this.files[C],(j=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&w(j,M)},filter:function(w){var C=[];return this.forEach(function(j,M){w(j,M)&&C.push(M)}),C},file:function(w,C,j){if(arguments.length!==1)return w=this.root+w,i.call(this,w,C,j),this;if(z(w)){var M=w;return this.filter(function(L,D){return!D.dir&&M.test(L)})}var E=this.files[this.root+w];return E&&!E.dir?E:null},folder:function(w){if(!w)return this;if(z(w))return this.filter(function(E,L){return L.dir&&w.test(E)});var C=this.root+w,j=x.call(this,C),M=this.clone();return M.root=j.name,M},remove:function(w){w=this.root+w;var C=this.files[w];if(C||(w.slice(-1)!=="/"&&(w+="/"),C=this.files[w]),C&&!C.dir)delete this.files[w];else for(var j=this.filter(function(E,L){return L.name.slice(0,w.length)===w}),M=0;M<j.length;M++)delete this.files[j[M].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(w){var C,j={};try{if((j=s.extend(w||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");s.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var M=j.comment||this.comment||"";C=m.generateWorker(this,j,M)}catch(E){(C=new l("error")).error(E)}return new c(C,j.type||"string",j.mimeType)},generateAsync:function(w,C){return this.generateInternalStream(w).accumulate(C)},generateNodeStream:function(w,C){return(w=w||{}).type||(w.type="nodebuffer"),this.generateInternalStream(w).toNodejsStream(C)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(a,r,n){r.exports=a("stream")},{stream:void 0}],17:[function(a,r,n){var i=a("./DataReader");function o(s){i.call(this,s);for(var l=0;l<this.data.length;l++)s[l]=255&s[l]}a("../utils").inherits(o,i),o.prototype.byteAt=function(s){return this.data[this.zero+s]},o.prototype.lastIndexOfSignature=function(s){for(var l=s.charCodeAt(0),c=s.charCodeAt(1),u=s.charCodeAt(2),d=s.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===l&&this.data[h+1]===c&&this.data[h+2]===u&&this.data[h+3]===d)return h-this.zero;return-1},o.prototype.readAndCheckSignature=function(s){var l=s.charCodeAt(0),c=s.charCodeAt(1),u=s.charCodeAt(2),d=s.charCodeAt(3),h=this.readData(4);return l===h[0]&&c===h[1]&&u===h[2]&&d===h[3]},o.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./DataReader":18}],18:[function(a,r,n){var i=a("../utils");function o(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var l,c=0;for(this.checkOffset(s),l=this.index+s-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=s,c},readString:function(s){return i.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},r.exports=o},{"../utils":32}],19:[function(a,r,n){var i=a("./Uint8ArrayReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,r,n){var i=a("./DataReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},o.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},o.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},o.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(a,r,n){var i=a("./ArrayReader");function o(s){i.call(this,s)}a("../utils").inherits(o,i),o.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(a,r,n){var i=a("../utils"),o=a("../support"),s=a("./ArrayReader"),l=a("./StringReader"),c=a("./NodeBufferReader"),u=a("./Uint8ArrayReader");r.exports=function(d){var h=i.getTypeOf(d);return i.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new c(d):o.uint8array?new u(i.transformTo("uint8array",d)):new s(i.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,r,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(a,r,n){var i=a("./GenericWorker"),o=a("../utils");function s(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(s,i),s.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(a,r,n){var i=a("./GenericWorker"),o=a("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}a("../utils").inherits(s,i),s.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,r,n){var i=a("../utils"),o=a("./GenericWorker");function s(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(s,o),s.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(a,r,n){var i=a("../utils"),o=a("./GenericWorker");function s(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=i.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}i.inherits(s,o),s.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(a,r,n){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,s){return this._listeners[o].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,s){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,s)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var s=this;return o.on("data",function(l){s.processChunk(l)}),o.on("end",function(){s.end()}),o.on("error",function(l){s.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,s){return this.extraStreamInfo[o]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},r.exports=i},{}],29:[function(a,r,n){var i=a("../utils"),o=a("./ConvertWorker"),s=a("./GenericWorker"),l=a("../base64"),c=a("../support"),u=a("../external"),d=null;if(c.nodestream)try{d=a("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(v,f){return new u.Promise(function(y,k){var x=[],z=v._internalType,S=v._outputType,w=v._mimeType;v.on("data",function(C,j){x.push(C),f&&f(j)}).on("error",function(C){x=[],k(C)}).on("end",function(){try{var C=(function(j,M,E){switch(j){case"blob":return i.newBlob(i.transformTo("arraybuffer",M),E);case"base64":return l.encode(M);default:return i.transformTo(j,M)}})(S,(function(j,M){var E,L=0,D=null,R=0;for(E=0;E<M.length;E++)R+=M[E].length;switch(j){case"string":return M.join("");case"array":return Array.prototype.concat.apply([],M);case"uint8array":for(D=new Uint8Array(R),E=0;E<M.length;E++)D.set(M[E],L),L+=M[E].length;return D;case"nodebuffer":return Buffer.concat(M);default:throw new Error("concat : unsupported type '"+j+"'")}})(z,x),w);y(C)}catch(j){k(j)}x=[]}).resume()})}function m(v,f,y){var k=f;switch(f){case"blob":case"arraybuffer":k="uint8array";break;case"base64":k="string"}try{this._internalType=k,this._outputType=f,this._mimeType=y,i.checkSupport(k),this._worker=v.pipe(new o(k)),v.lock()}catch(x){this._worker=new s("error"),this._worker.error(x)}}m.prototype={accumulate:function(v){return h(this,v)},on:function(v,f){var y=this;return v==="data"?this._worker.on(v,function(k){f.call(y,k.data,k.meta)}):this._worker.on(v,function(){i.delay(f,arguments,y)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},v)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,r,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var i=new ArrayBuffer(0);try{n.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),n.blob=o.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!a("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(a,r,n){for(var i=a("./utils"),o=a("./support"),s=a("./nodejsUtils"),l=a("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}n.utf8encode=function(m){return o.nodebuffer?s.newBufferFrom(m,"utf-8"):(function(v){var f,y,k,x,z,S=v.length,w=0;for(x=0;x<S;x++)(64512&(y=v.charCodeAt(x)))==55296&&x+1<S&&(64512&(k=v.charCodeAt(x+1)))==56320&&(y=65536+(y-55296<<10)+(k-56320),x++),w+=y<128?1:y<2048?2:y<65536?3:4;for(f=o.uint8array?new Uint8Array(w):new Array(w),x=z=0;z<w;x++)(64512&(y=v.charCodeAt(x)))==55296&&x+1<S&&(64512&(k=v.charCodeAt(x+1)))==56320&&(y=65536+(y-55296<<10)+(k-56320),x++),y<128?f[z++]=y:(y<2048?f[z++]=192|y>>>6:(y<65536?f[z++]=224|y>>>12:(f[z++]=240|y>>>18,f[z++]=128|y>>>12&63),f[z++]=128|y>>>6&63),f[z++]=128|63&y);return f})(m)},n.utf8decode=function(m){return o.nodebuffer?i.transformTo("nodebuffer",m).toString("utf-8"):(function(v){var f,y,k,x,z=v.length,S=new Array(2*z);for(f=y=0;f<z;)if((k=v[f++])<128)S[y++]=k;else if(4<(x=c[k]))S[y++]=65533,f+=x-1;else{for(k&=x===2?31:x===3?15:7;1<x&&f<z;)k=k<<6|63&v[f++],x--;1<x?S[y++]=65533:k<65536?S[y++]=k:(k-=65536,S[y++]=55296|k>>10&1023,S[y++]=56320|1023&k)}return S.length!==y&&(S.subarray?S=S.subarray(0,y):S.length=y),i.applyFromCharCode(S)})(m=i.transformTo(o.uint8array?"uint8array":"array",m))},i.inherits(d,l),d.prototype.processChunk=function(m){var v=i.transformTo(o.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=v;(v=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),v.set(f,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var y=(function(x,z){var S;for((z=z||x.length)>x.length&&(z=x.length),S=z-1;0<=S&&(192&x[S])==128;)S--;return S<0||S===0?z:S+c[x[S]]>z?S:z})(v),k=v;y!==v.length&&(o.uint8array?(k=v.subarray(0,y),this.leftOver=v.subarray(y,v.length)):(k=v.slice(0,y),this.leftOver=v.slice(y,v.length))),this.push({data:n.utf8decode(k),meta:m.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=d,i.inherits(h,l),h.prototype.processChunk=function(m){this.push({data:n.utf8encode(m.data),meta:m.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,r,n){var i=a("./support"),o=a("./base64"),s=a("./nodejsUtils"),l=a("./external");function c(f){return f}function u(f,y){for(var k=0;k<f.length;++k)y[k]=255&f.charCodeAt(k);return y}a("setimmediate"),n.newBlob=function(f,y){n.checkSupport("blob");try{return new Blob([f],{type:y})}catch{try{var k=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return k.append(f),k.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(f,y,k){var x=[],z=0,S=f.length;if(S<=k)return String.fromCharCode.apply(null,f);for(;z<S;)y==="array"||y==="nodebuffer"?x.push(String.fromCharCode.apply(null,f.slice(z,Math.min(z+k,S)))):x.push(String.fromCharCode.apply(null,f.subarray(z,Math.min(z+k,S)))),z+=k;return x.join("")},stringifyByChar:function(f){for(var y="",k=0;k<f.length;k++)y+=String.fromCharCode(f[k]);return y},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,s.allocBuffer(1)).length===1}catch{return!1}})()}};function h(f){var y=65536,k=n.getTypeOf(f),x=!0;if(k==="uint8array"?x=d.applyCanBeUsed.uint8array:k==="nodebuffer"&&(x=d.applyCanBeUsed.nodebuffer),x)for(;1<y;)try{return d.stringifyByChunk(f,k,y)}catch{y=Math.floor(y/2)}return d.stringifyByChar(f)}function m(f,y){for(var k=0;k<f.length;k++)y[k]=f[k];return y}n.applyFromCharCode=h;var v={};v.string={string:c,array:function(f){return u(f,new Array(f.length))},arraybuffer:function(f){return v.string.uint8array(f).buffer},uint8array:function(f){return u(f,new Uint8Array(f.length))},nodebuffer:function(f){return u(f,s.allocBuffer(f.length))}},v.array={string:h,array:c,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return s.newBufferFrom(f)}},v.arraybuffer={string:function(f){return h(new Uint8Array(f))},array:function(f){return m(new Uint8Array(f),new Array(f.byteLength))},arraybuffer:c,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return s.newBufferFrom(new Uint8Array(f))}},v.uint8array={string:h,array:function(f){return m(f,new Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:c,nodebuffer:function(f){return s.newBufferFrom(f)}},v.nodebuffer={string:h,array:function(f){return m(f,new Array(f.length))},arraybuffer:function(f){return v.nodebuffer.uint8array(f).buffer},uint8array:function(f){return m(f,new Uint8Array(f.length))},nodebuffer:c},n.transformTo=function(f,y){if(y=y||"",!f)return y;n.checkSupport(f);var k=n.getTypeOf(y);return v[k][f](y)},n.resolve=function(f){for(var y=f.split("/"),k=[],x=0;x<y.length;x++){var z=y[x];z==="."||z===""&&x!==0&&x!==y.length-1||(z===".."?k.pop():k.push(z))}return k.join("/")},n.getTypeOf=function(f){return typeof f=="string"?"string":Object.prototype.toString.call(f)==="[object Array]"?"array":i.nodebuffer&&s.isBuffer(f)?"nodebuffer":i.uint8array&&f instanceof Uint8Array?"uint8array":i.arraybuffer&&f instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(f){if(!i[f.toLowerCase()])throw new Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var y,k,x="";for(k=0;k<(f||"").length;k++)x+="\\x"+((y=f.charCodeAt(k))<16?"0":"")+y.toString(16).toUpperCase();return x},n.delay=function(f,y,k){setImmediate(function(){f.apply(k||null,y||[])})},n.inherits=function(f,y){function k(){}k.prototype=y.prototype,f.prototype=new k},n.extend=function(){var f,y,k={};for(f=0;f<arguments.length;f++)for(y in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],y)&&k[y]===void 0&&(k[y]=arguments[f][y]);return k},n.prepareContent=function(f,y,k,x,z){return l.Promise.resolve(y).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(w,C){var j=new FileReader;j.onload=function(M){w(M.target.result)},j.onerror=function(M){C(M.target.error)},j.readAsArrayBuffer(S)}):S}).then(function(S){var w=n.getTypeOf(S);return w?(w==="arraybuffer"?S=n.transformTo("uint8array",S):w==="string"&&(z?S=o.decode(S):k&&x!==!0&&(S=(function(C){return u(C,i.uint8array?new Uint8Array(C.length):new Array(C.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(a,r,n){var i=a("./reader/readerFor"),o=a("./utils"),s=a("./signature"),l=a("./zipEntry"),c=a("./support");function u(d){this.files=[],this.loadOptions=d}u.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(h)+", expected "+o.pretty(d)+")")}},isSignature:function(d,h){var m=this.reader.index;this.reader.setIndex(d);var v=this.reader.readString(4)===h;return this.reader.setIndex(m),v},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var d=this.reader.readData(this.zipCommentLength),h=c.uint8array?"uint8array":"array",m=o.transformTo(h,d);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var d,h,m,v=this.zip64EndOfCentralSize-44;0<v;)d=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[d]={id:d,length:h,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var d,h;for(d=0;d<this.files.length;d++)h=this.files[d],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(d=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var d=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(d<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(d);var h=d;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(d=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(d),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var v=h-m;if(0<v)this.isSignature(h,s.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(d){this.reader=i(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(a,r,n){var i=a("./reader/readerFor"),o=a("./utils"),s=a("./compressedObject"),l=a("./crc32"),c=a("./utf8"),u=a("./compressions"),d=a("./support");function h(m,v){this.options=m,this.loadOptions=v}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var v,f;if(m.skip(22),this.fileNameLength=m.readInt(2),f=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((v=(function(y){for(var k in u)if(Object.prototype.hasOwnProperty.call(u,k)&&u[k].magic===y)return u[k];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,v,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var v=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(v),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var v,f,y,k=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<k;)v=m.readInt(2),f=m.readInt(2),y=m.readData(f),this.extraFields[v]={id:v,length:f,value:y};m.setIndex(k)},handleUTF8:function(){var m=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var f=o.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var k=o.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(k)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var v=i(m.value);return v.readInt(1)!==1||l(this.fileName)!==v.readInt(4)?null:c.utf8decode(v.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var v=i(m.value);return v.readInt(1)!==1||l(this.fileComment)!==v.readInt(4)?null:c.utf8decode(v.readData(m.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,r,n){function i(v,f,y){this.name=v,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=f,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var o=a("./stream/StreamHelper"),s=a("./stream/DataWorker"),l=a("./utf8"),c=a("./compressedObject"),u=a("./stream/GenericWorker");i.prototype={internalStream:function(v){var f=null,y="string";try{if(!v)throw new Error("No output type specified.");var k=(y=v.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),f=this._decompressWorker();var x=!this._dataBinary;x&&!k&&(f=f.pipe(new l.Utf8EncodeWorker)),!x&&k&&(f=f.pipe(new l.Utf8DecodeWorker))}catch(z){(f=new u("error")).error(z)}return new o(f,y,"")},async:function(v,f){return this.internalStream(v).accumulate(f)},nodeStream:function(v,f){return this.internalStream(v||"nodebuffer").toNodejsStream(f)},_compressWorker:function(v,f){if(this._data instanceof c&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(y,v,f)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new s(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<d.length;m++)i.prototype[d[m]]=h;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,r,n){(function(i){var o,s,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,u=new l(v),d=i.document.createTextNode("");u.observe(d,{characterData:!0}),o=function(){d.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var f=i.document.createElement("script");f.onreadystatechange=function(){v(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},i.document.documentElement.appendChild(f)}:function(){setTimeout(v,0)};else{var h=new i.MessageChannel;h.port1.onmessage=v,o=function(){h.port2.postMessage(0)}}var m=[];function v(){var f,y;s=!0;for(var k=m.length;k;){for(y=m,m=[],f=-1;++f<k;)y[f]();k=m.length}s=!1}r.exports=function(f){m.push(f)!==1||s||o()}}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(a,r,n){var i=a("immediate");function o(){}var s={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function d(k){if(typeof k!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,k!==o&&f(this,k)}function h(k,x,z){this.promise=k,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof z=="function"&&(this.onRejected=z,this.callRejected=this.otherCallRejected)}function m(k,x,z){i(function(){var S;try{S=x(z)}catch(w){return s.reject(k,w)}S===k?s.reject(k,new TypeError("Cannot resolve promise with itself")):s.resolve(k,S)})}function v(k){var x=k&&k.then;if(k&&(typeof k=="object"||typeof k=="function")&&typeof x=="function")return function(){x.apply(k,arguments)}}function f(k,x){var z=!1;function S(j){z||(z=!0,s.reject(k,j))}function w(j){z||(z=!0,s.resolve(k,j))}var C=y(function(){x(w,S)});C.status==="error"&&S(C.value)}function y(k,x){var z={};try{z.value=k(x),z.status="success"}catch(S){z.status="error",z.value=S}return z}(r.exports=d).prototype.finally=function(k){if(typeof k!="function")return this;var x=this.constructor;return this.then(function(z){return x.resolve(k()).then(function(){return z})},function(z){return x.resolve(k()).then(function(){throw z})})},d.prototype.catch=function(k){return this.then(null,k)},d.prototype.then=function(k,x){if(typeof k!="function"&&this.state===c||typeof x!="function"&&this.state===l)return this;var z=new this.constructor(o);return this.state!==u?m(z,this.state===c?k:x,this.outcome):this.queue.push(new h(z,k,x)),z},h.prototype.callFulfilled=function(k){s.resolve(this.promise,k)},h.prototype.otherCallFulfilled=function(k){m(this.promise,this.onFulfilled,k)},h.prototype.callRejected=function(k){s.reject(this.promise,k)},h.prototype.otherCallRejected=function(k){m(this.promise,this.onRejected,k)},s.resolve=function(k,x){var z=y(v,x);if(z.status==="error")return s.reject(k,z.value);var S=z.value;if(S)f(k,S);else{k.state=c,k.outcome=x;for(var w=-1,C=k.queue.length;++w<C;)k.queue[w].callFulfilled(x)}return k},s.reject=function(k,x){k.state=l,k.outcome=x;for(var z=-1,S=k.queue.length;++z<S;)k.queue[z].callRejected(x);return k},d.resolve=function(k){return k instanceof this?k:s.resolve(new this(o),k)},d.reject=function(k){var x=new this(o);return s.reject(x,k)},d.all=function(k){var x=this;if(Object.prototype.toString.call(k)!=="[object Array]")return this.reject(new TypeError("must be an array"));var z=k.length,S=!1;if(!z)return this.resolve([]);for(var w=new Array(z),C=0,j=-1,M=new this(o);++j<z;)E(k[j],j);return M;function E(L,D){x.resolve(L).then(function(R){w[D]=R,++C!==z||S||(S=!0,s.resolve(M,w))},function(R){S||(S=!0,s.reject(M,R))})}},d.race=function(k){var x=this;if(Object.prototype.toString.call(k)!=="[object Array]")return this.reject(new TypeError("must be an array"));var z=k.length,S=!1;if(!z)return this.resolve([]);for(var w=-1,C=new this(o);++w<z;)j=k[w],x.resolve(j).then(function(M){S||(S=!0,s.resolve(C,M))},function(M){S||(S=!0,s.reject(C,M))});var j;return C}},{immediate:36}],38:[function(a,r,n){var i={};(0,a("./lib/utils/common").assign)(i,a("./lib/deflate"),a("./lib/inflate"),a("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(a,r,n){var i=a("./zlib/deflate"),o=a("./utils/common"),s=a("./utils/strings"),l=a("./zlib/messages"),c=a("./zlib/zstream"),u=Object.prototype.toString,d=0,h=-1,m=0,v=8;function f(k){if(!(this instanceof f))return new f(k);this.options=o.assign({level:h,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},k||{});var x=this.options;x.raw&&0<x.windowBits?x.windowBits=-x.windowBits:x.gzip&&0<x.windowBits&&x.windowBits<16&&(x.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var z=i.deflateInit2(this.strm,x.level,x.method,x.windowBits,x.memLevel,x.strategy);if(z!==d)throw new Error(l[z]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var S;if(S=typeof x.dictionary=="string"?s.string2buf(x.dictionary):u.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(z=i.deflateSetDictionary(this.strm,S))!==d)throw new Error(l[z]);this._dict_set=!0}}function y(k,x){var z=new f(x);if(z.push(k,!0),z.err)throw z.msg||l[z.err];return z.result}f.prototype.push=function(k,x){var z,S,w=this.strm,C=this.options.chunkSize;if(this.ended)return!1;S=x===~~x?x:x===!0?4:0,typeof k=="string"?w.input=s.string2buf(k):u.call(k)==="[object ArrayBuffer]"?w.input=new Uint8Array(k):w.input=k,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new o.Buf8(C),w.next_out=0,w.avail_out=C),(z=i.deflate(w,S))!==1&&z!==d)return this.onEnd(z),!(this.ended=!0);w.avail_out!==0&&(w.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(o.shrinkBuf(w.output,w.next_out))):this.onData(o.shrinkBuf(w.output,w.next_out)))}while((0<w.avail_in||w.avail_out===0)&&z!==1);return S===4?(z=i.deflateEnd(this.strm),this.onEnd(z),this.ended=!0,z===d):S!==2||(this.onEnd(d),!(w.avail_out=0))},f.prototype.onData=function(k){this.chunks.push(k)},f.prototype.onEnd=function(k){k===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg},n.Deflate=f,n.deflate=y,n.deflateRaw=function(k,x){return(x=x||{}).raw=!0,y(k,x)},n.gzip=function(k,x){return(x=x||{}).gzip=!0,y(k,x)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(a,r,n){var i=a("./zlib/inflate"),o=a("./utils/common"),s=a("./utils/strings"),l=a("./zlib/constants"),c=a("./zlib/messages"),u=a("./zlib/zstream"),d=a("./zlib/gzheader"),h=Object.prototype.toString;function m(f){if(!(this instanceof m))return new m(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||f&&f.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var k=i.inflateInit2(this.strm,y.windowBits);if(k!==l.Z_OK)throw new Error(c[k]);this.header=new d,i.inflateGetHeader(this.strm,this.header)}function v(f,y){var k=new m(y);if(k.push(f,!0),k.err)throw k.msg||c[k.err];return k.result}m.prototype.push=function(f,y){var k,x,z,S,w,C,j=this.strm,M=this.options.chunkSize,E=this.options.dictionary,L=!1;if(this.ended)return!1;x=y===~~y?y:y===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof f=="string"?j.input=s.binstring2buf(f):h.call(f)==="[object ArrayBuffer]"?j.input=new Uint8Array(f):j.input=f,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new o.Buf8(M),j.next_out=0,j.avail_out=M),(k=i.inflate(j,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&E&&(C=typeof E=="string"?s.string2buf(E):h.call(E)==="[object ArrayBuffer]"?new Uint8Array(E):E,k=i.inflateSetDictionary(this.strm,C)),k===l.Z_BUF_ERROR&&L===!0&&(k=l.Z_OK,L=!1),k!==l.Z_STREAM_END&&k!==l.Z_OK)return this.onEnd(k),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&k!==l.Z_STREAM_END&&(j.avail_in!==0||x!==l.Z_FINISH&&x!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(z=s.utf8border(j.output,j.next_out),S=j.next_out-z,w=s.buf2string(j.output,z),j.next_out=S,j.avail_out=M-S,S&&o.arraySet(j.output,j.output,z,S,0),this.onData(w)):this.onData(o.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(L=!0)}while((0<j.avail_in||j.avail_out===0)&&k!==l.Z_STREAM_END);return k===l.Z_STREAM_END&&(x=l.Z_FINISH),x===l.Z_FINISH?(k=i.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===l.Z_OK):x!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(j.avail_out=0))},m.prototype.onData=function(f){this.chunks.push(f)},m.prototype.onEnd=function(f){f===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=m,n.inflate=v,n.inflateRaw=function(f,y){return(y=y||{}).raw=!0,v(f,y)},n.ungzip=v},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(a,r,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var d in u)u.hasOwnProperty(d)&&(l[d]=u[d])}}return l},n.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,u,d,h){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+d),h);else for(var m=0;m<d;m++)l[h+m]=c[u+m]},flattenChunks:function(l){var c,u,d,h,m,v;for(c=d=0,u=l.length;c<u;c++)d+=l[c].length;for(v=new Uint8Array(d),c=h=0,u=l.length;c<u;c++)m=l[c],v.set(m,h),h+=m.length;return v}},s={arraySet:function(l,c,u,d,h){for(var m=0;m<d;m++)l[h+m]=c[u+m]},flattenChunks:function(l){return[].concat.apply([],l)}};n.setTyped=function(l){l?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(i)},{}],42:[function(a,r,n){var i=a("./common"),o=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(d,h){if(h<65537&&(d.subarray&&s||!d.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(d,h));for(var m="",v=0;v<h;v++)m+=String.fromCharCode(d[v]);return m}l[254]=l[254]=1,n.string2buf=function(d){var h,m,v,f,y,k=d.length,x=0;for(f=0;f<k;f++)(64512&(m=d.charCodeAt(f)))==55296&&f+1<k&&(64512&(v=d.charCodeAt(f+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),f++),x+=m<128?1:m<2048?2:m<65536?3:4;for(h=new i.Buf8(x),f=y=0;y<x;f++)(64512&(m=d.charCodeAt(f)))==55296&&f+1<k&&(64512&(v=d.charCodeAt(f+1)))==56320&&(m=65536+(m-55296<<10)+(v-56320),f++),m<128?h[y++]=m:(m<2048?h[y++]=192|m>>>6:(m<65536?h[y++]=224|m>>>12:(h[y++]=240|m>>>18,h[y++]=128|m>>>12&63),h[y++]=128|m>>>6&63),h[y++]=128|63&m);return h},n.buf2binstring=function(d){return u(d,d.length)},n.binstring2buf=function(d){for(var h=new i.Buf8(d.length),m=0,v=h.length;m<v;m++)h[m]=d.charCodeAt(m);return h},n.buf2string=function(d,h){var m,v,f,y,k=h||d.length,x=new Array(2*k);for(m=v=0;m<k;)if((f=d[m++])<128)x[v++]=f;else if(4<(y=l[f]))x[v++]=65533,m+=y-1;else{for(f&=y===2?31:y===3?15:7;1<y&&m<k;)f=f<<6|63&d[m++],y--;1<y?x[v++]=65533:f<65536?x[v++]=f:(f-=65536,x[v++]=55296|f>>10&1023,x[v++]=56320|1023&f)}return u(x,v)},n.utf8border=function(d,h){var m;for((h=h||d.length)>d.length&&(h=d.length),m=h-1;0<=m&&(192&d[m])==128;)m--;return m<0||m===0?h:m+l[d[m]]>h?m:h}},{"./common":41}],43:[function(a,r,n){r.exports=function(i,o,s,l){for(var c=65535&i|0,u=i>>>16&65535|0,d=0;s!==0;){for(s-=d=2e3<s?2e3:s;u=u+(c=c+o[l++]|0)|0,--d;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(a,r,n){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(a,r,n){var i=(function(){for(var o,s=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;s[l]=o}return s})();r.exports=function(o,s,l,c){var u=i,d=c+l;o^=-1;for(var h=c;h<d;h++)o=o>>>8^u[255&(o^s[h])];return-1^o}},{}],46:[function(a,r,n){var i,o=a("../utils/common"),s=a("./trees"),l=a("./adler32"),c=a("./crc32"),u=a("./messages"),d=0,h=4,m=0,v=-2,f=-1,y=4,k=2,x=8,z=9,S=286,w=30,C=19,j=2*S+1,M=15,E=3,L=258,D=L+E+1,R=42,F=113,N=1,te=2,X=3,ie=4;function ee(q,pe){return q.msg=u[pe],pe}function ce(q){return(q<<1)-(4<q?9:0)}function Z(q){for(var pe=q.length;0<=--pe;)q[pe]=0}function V(q){var pe=q.state,he=pe.pending;he>q.avail_out&&(he=q.avail_out),he!==0&&(o.arraySet(q.output,pe.pending_buf,pe.pending_out,he,q.next_out),q.next_out+=he,pe.pending_out+=he,q.total_out+=he,q.avail_out-=he,pe.pending-=he,pe.pending===0&&(pe.pending_out=0))}function Y(q,pe){s._tr_flush_block(q,0<=q.block_start?q.block_start:-1,q.strstart-q.block_start,pe),q.block_start=q.strstart,V(q.strm)}function U(q,pe){q.pending_buf[q.pending++]=pe}function _(q,pe){q.pending_buf[q.pending++]=pe>>>8&255,q.pending_buf[q.pending++]=255&pe}function G(q,pe){var he,W,ae=q.max_chain_length,se=q.strstart,ve=q.prev_length,ge=q.nice_match,fe=q.strstart>q.w_size-D?q.strstart-(q.w_size-D):0,ke=q.window,ze=q.w_mask,Be=q.prev,tt=q.strstart+L,T=ke[se+ve-1],J=ke[se+ve];q.prev_length>=q.good_match&&(ae>>=2),ge>q.lookahead&&(ge=q.lookahead);do if(ke[(he=pe)+ve]===J&&ke[he+ve-1]===T&&ke[he]===ke[se]&&ke[++he]===ke[se+1]){se+=2,he++;do;while(ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&ke[++se]===ke[++he]&&se<tt);if(W=L-(tt-se),se=tt-L,ve<W){if(q.match_start=pe,ge<=(ve=W))break;T=ke[se+ve-1],J=ke[se+ve]}}while((pe=Be[pe&ze])>fe&&--ae!=0);return ve<=q.lookahead?ve:q.lookahead}function Q(q){var pe,he,W,ae,se,ve,ge,fe,ke,ze,Be=q.w_size;do{if(ae=q.window_size-q.lookahead-q.strstart,q.strstart>=Be+(Be-D)){for(o.arraySet(q.window,q.window,Be,Be,0),q.match_start-=Be,q.strstart-=Be,q.block_start-=Be,pe=he=q.hash_size;W=q.head[--pe],q.head[pe]=Be<=W?W-Be:0,--he;);for(pe=he=Be;W=q.prev[--pe],q.prev[pe]=Be<=W?W-Be:0,--he;);ae+=Be}if(q.strm.avail_in===0)break;if(ve=q.strm,ge=q.window,fe=q.strstart+q.lookahead,ke=ae,ze=void 0,ze=ve.avail_in,ke<ze&&(ze=ke),he=ze===0?0:(ve.avail_in-=ze,o.arraySet(ge,ve.input,ve.next_in,ze,fe),ve.state.wrap===1?ve.adler=l(ve.adler,ge,ze,fe):ve.state.wrap===2&&(ve.adler=c(ve.adler,ge,ze,fe)),ve.next_in+=ze,ve.total_in+=ze,ze),q.lookahead+=he,q.lookahead+q.insert>=E)for(se=q.strstart-q.insert,q.ins_h=q.window[se],q.ins_h=(q.ins_h<<q.hash_shift^q.window[se+1])&q.hash_mask;q.insert&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[se+E-1])&q.hash_mask,q.prev[se&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=se,se++,q.insert--,!(q.lookahead+q.insert<E)););}while(q.lookahead<D&&q.strm.avail_in!==0)}function ne(q,pe){for(var he,W;;){if(q.lookahead<D){if(Q(q),q.lookahead<D&&pe===d)return N;if(q.lookahead===0)break}if(he=0,q.lookahead>=E&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+E-1])&q.hash_mask,he=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),he!==0&&q.strstart-he<=q.w_size-D&&(q.match_length=G(q,he)),q.match_length>=E)if(W=s._tr_tally(q,q.strstart-q.match_start,q.match_length-E),q.lookahead-=q.match_length,q.match_length<=q.max_lazy_match&&q.lookahead>=E){for(q.match_length--;q.strstart++,q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+E-1])&q.hash_mask,he=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart,--q.match_length!=0;);q.strstart++}else q.strstart+=q.match_length,q.match_length=0,q.ins_h=q.window[q.strstart],q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+1])&q.hash_mask;else W=s._tr_tally(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++;if(W&&(Y(q,!1),q.strm.avail_out===0))return N}return q.insert=q.strstart<E-1?q.strstart:E-1,pe===h?(Y(q,!0),q.strm.avail_out===0?X:ie):q.last_lit&&(Y(q,!1),q.strm.avail_out===0)?N:te}function ue(q,pe){for(var he,W,ae;;){if(q.lookahead<D){if(Q(q),q.lookahead<D&&pe===d)return N;if(q.lookahead===0)break}if(he=0,q.lookahead>=E&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+E-1])&q.hash_mask,he=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),q.prev_length=q.match_length,q.prev_match=q.match_start,q.match_length=E-1,he!==0&&q.prev_length<q.max_lazy_match&&q.strstart-he<=q.w_size-D&&(q.match_length=G(q,he),q.match_length<=5&&(q.strategy===1||q.match_length===E&&4096<q.strstart-q.match_start)&&(q.match_length=E-1)),q.prev_length>=E&&q.match_length<=q.prev_length){for(ae=q.strstart+q.lookahead-E,W=s._tr_tally(q,q.strstart-1-q.prev_match,q.prev_length-E),q.lookahead-=q.prev_length-1,q.prev_length-=2;++q.strstart<=ae&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+E-1])&q.hash_mask,he=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),--q.prev_length!=0;);if(q.match_available=0,q.match_length=E-1,q.strstart++,W&&(Y(q,!1),q.strm.avail_out===0))return N}else if(q.match_available){if((W=s._tr_tally(q,0,q.window[q.strstart-1]))&&Y(q,!1),q.strstart++,q.lookahead--,q.strm.avail_out===0)return N}else q.match_available=1,q.strstart++,q.lookahead--}return q.match_available&&(W=s._tr_tally(q,0,q.window[q.strstart-1]),q.match_available=0),q.insert=q.strstart<E-1?q.strstart:E-1,pe===h?(Y(q,!0),q.strm.avail_out===0?X:ie):q.last_lit&&(Y(q,!1),q.strm.avail_out===0)?N:te}function ye(q,pe,he,W,ae){this.good_length=q,this.max_lazy=pe,this.nice_length=he,this.max_chain=W,this.func=ae}function Ce(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*j),this.dyn_dtree=new o.Buf16(2*(2*w+1)),this.bl_tree=new o.Buf16(2*(2*C+1)),Z(this.dyn_ltree),Z(this.dyn_dtree),Z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(M+1),this.heap=new o.Buf16(2*S+1),Z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*S+1),Z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function B(q){var pe;return q&&q.state?(q.total_in=q.total_out=0,q.data_type=k,(pe=q.state).pending=0,pe.pending_out=0,pe.wrap<0&&(pe.wrap=-pe.wrap),pe.status=pe.wrap?R:F,q.adler=pe.wrap===2?0:1,pe.last_flush=d,s._tr_init(pe),m):ee(q,v)}function K(q){var pe=B(q);return pe===m&&(function(he){he.window_size=2*he.w_size,Z(he.head),he.max_lazy_match=i[he.level].max_lazy,he.good_match=i[he.level].good_length,he.nice_match=i[he.level].nice_length,he.max_chain_length=i[he.level].max_chain,he.strstart=0,he.block_start=0,he.lookahead=0,he.insert=0,he.match_length=he.prev_length=E-1,he.match_available=0,he.ins_h=0})(q.state),pe}function le(q,pe,he,W,ae,se){if(!q)return v;var ve=1;if(pe===f&&(pe=6),W<0?(ve=0,W=-W):15<W&&(ve=2,W-=16),ae<1||z<ae||he!==x||W<8||15<W||pe<0||9<pe||se<0||y<se)return ee(q,v);W===8&&(W=9);var ge=new Ce;return(q.state=ge).strm=q,ge.wrap=ve,ge.gzhead=null,ge.w_bits=W,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=ae+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+E-1)/E),ge.window=new o.Buf8(2*ge.w_size),ge.head=new o.Buf16(ge.hash_size),ge.prev=new o.Buf16(ge.w_size),ge.lit_bufsize=1<<ae+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new o.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=pe,ge.strategy=se,ge.method=he,K(q)}i=[new ye(0,0,0,0,function(q,pe){var he=65535;for(he>q.pending_buf_size-5&&(he=q.pending_buf_size-5);;){if(q.lookahead<=1){if(Q(q),q.lookahead===0&&pe===d)return N;if(q.lookahead===0)break}q.strstart+=q.lookahead,q.lookahead=0;var W=q.block_start+he;if((q.strstart===0||q.strstart>=W)&&(q.lookahead=q.strstart-W,q.strstart=W,Y(q,!1),q.strm.avail_out===0)||q.strstart-q.block_start>=q.w_size-D&&(Y(q,!1),q.strm.avail_out===0))return N}return q.insert=0,pe===h?(Y(q,!0),q.strm.avail_out===0?X:ie):(q.strstart>q.block_start&&(Y(q,!1),q.strm.avail_out),N)}),new ye(4,4,8,4,ne),new ye(4,5,16,8,ne),new ye(4,6,32,32,ne),new ye(4,4,16,16,ue),new ye(8,16,32,32,ue),new ye(8,16,128,128,ue),new ye(8,32,128,256,ue),new ye(32,128,258,1024,ue),new ye(32,258,258,4096,ue)],n.deflateInit=function(q,pe){return le(q,pe,x,15,8,0)},n.deflateInit2=le,n.deflateReset=K,n.deflateResetKeep=B,n.deflateSetHeader=function(q,pe){return q&&q.state?q.state.wrap!==2?v:(q.state.gzhead=pe,m):v},n.deflate=function(q,pe){var he,W,ae,se;if(!q||!q.state||5<pe||pe<0)return q?ee(q,v):v;if(W=q.state,!q.output||!q.input&&q.avail_in!==0||W.status===666&&pe!==h)return ee(q,q.avail_out===0?-5:v);if(W.strm=q,he=W.last_flush,W.last_flush=pe,W.status===R)if(W.wrap===2)q.adler=0,U(W,31),U(W,139),U(W,8),W.gzhead?(U(W,(W.gzhead.text?1:0)+(W.gzhead.hcrc?2:0)+(W.gzhead.extra?4:0)+(W.gzhead.name?8:0)+(W.gzhead.comment?16:0)),U(W,255&W.gzhead.time),U(W,W.gzhead.time>>8&255),U(W,W.gzhead.time>>16&255),U(W,W.gzhead.time>>24&255),U(W,W.level===9?2:2<=W.strategy||W.level<2?4:0),U(W,255&W.gzhead.os),W.gzhead.extra&&W.gzhead.extra.length&&(U(W,255&W.gzhead.extra.length),U(W,W.gzhead.extra.length>>8&255)),W.gzhead.hcrc&&(q.adler=c(q.adler,W.pending_buf,W.pending,0)),W.gzindex=0,W.status=69):(U(W,0),U(W,0),U(W,0),U(W,0),U(W,0),U(W,W.level===9?2:2<=W.strategy||W.level<2?4:0),U(W,3),W.status=F);else{var ve=x+(W.w_bits-8<<4)<<8;ve|=(2<=W.strategy||W.level<2?0:W.level<6?1:W.level===6?2:3)<<6,W.strstart!==0&&(ve|=32),ve+=31-ve%31,W.status=F,_(W,ve),W.strstart!==0&&(_(W,q.adler>>>16),_(W,65535&q.adler)),q.adler=1}if(W.status===69)if(W.gzhead.extra){for(ae=W.pending;W.gzindex<(65535&W.gzhead.extra.length)&&(W.pending!==W.pending_buf_size||(W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),V(q),ae=W.pending,W.pending!==W.pending_buf_size));)U(W,255&W.gzhead.extra[W.gzindex]),W.gzindex++;W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),W.gzindex===W.gzhead.extra.length&&(W.gzindex=0,W.status=73)}else W.status=73;if(W.status===73)if(W.gzhead.name){ae=W.pending;do{if(W.pending===W.pending_buf_size&&(W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),V(q),ae=W.pending,W.pending===W.pending_buf_size)){se=1;break}se=W.gzindex<W.gzhead.name.length?255&W.gzhead.name.charCodeAt(W.gzindex++):0,U(W,se)}while(se!==0);W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),se===0&&(W.gzindex=0,W.status=91)}else W.status=91;if(W.status===91)if(W.gzhead.comment){ae=W.pending;do{if(W.pending===W.pending_buf_size&&(W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),V(q),ae=W.pending,W.pending===W.pending_buf_size)){se=1;break}se=W.gzindex<W.gzhead.comment.length?255&W.gzhead.comment.charCodeAt(W.gzindex++):0,U(W,se)}while(se!==0);W.gzhead.hcrc&&W.pending>ae&&(q.adler=c(q.adler,W.pending_buf,W.pending-ae,ae)),se===0&&(W.status=103)}else W.status=103;if(W.status===103&&(W.gzhead.hcrc?(W.pending+2>W.pending_buf_size&&V(q),W.pending+2<=W.pending_buf_size&&(U(W,255&q.adler),U(W,q.adler>>8&255),q.adler=0,W.status=F)):W.status=F),W.pending!==0){if(V(q),q.avail_out===0)return W.last_flush=-1,m}else if(q.avail_in===0&&ce(pe)<=ce(he)&&pe!==h)return ee(q,-5);if(W.status===666&&q.avail_in!==0)return ee(q,-5);if(q.avail_in!==0||W.lookahead!==0||pe!==d&&W.status!==666){var ge=W.strategy===2?(function(fe,ke){for(var ze;;){if(fe.lookahead===0&&(Q(fe),fe.lookahead===0)){if(ke===d)return N;break}if(fe.match_length=0,ze=s._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++,ze&&(Y(fe,!1),fe.strm.avail_out===0))return N}return fe.insert=0,ke===h?(Y(fe,!0),fe.strm.avail_out===0?X:ie):fe.last_lit&&(Y(fe,!1),fe.strm.avail_out===0)?N:te})(W,pe):W.strategy===3?(function(fe,ke){for(var ze,Be,tt,T,J=fe.window;;){if(fe.lookahead<=L){if(Q(fe),fe.lookahead<=L&&ke===d)return N;if(fe.lookahead===0)break}if(fe.match_length=0,fe.lookahead>=E&&0<fe.strstart&&(Be=J[tt=fe.strstart-1])===J[++tt]&&Be===J[++tt]&&Be===J[++tt]){T=fe.strstart+L;do;while(Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&Be===J[++tt]&&tt<T);fe.match_length=L-(T-tt),fe.match_length>fe.lookahead&&(fe.match_length=fe.lookahead)}if(fe.match_length>=E?(ze=s._tr_tally(fe,1,fe.match_length-E),fe.lookahead-=fe.match_length,fe.strstart+=fe.match_length,fe.match_length=0):(ze=s._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++),ze&&(Y(fe,!1),fe.strm.avail_out===0))return N}return fe.insert=0,ke===h?(Y(fe,!0),fe.strm.avail_out===0?X:ie):fe.last_lit&&(Y(fe,!1),fe.strm.avail_out===0)?N:te})(W,pe):i[W.level].func(W,pe);if(ge!==X&&ge!==ie||(W.status=666),ge===N||ge===X)return q.avail_out===0&&(W.last_flush=-1),m;if(ge===te&&(pe===1?s._tr_align(W):pe!==5&&(s._tr_stored_block(W,0,0,!1),pe===3&&(Z(W.head),W.lookahead===0&&(W.strstart=0,W.block_start=0,W.insert=0))),V(q),q.avail_out===0))return W.last_flush=-1,m}return pe!==h?m:W.wrap<=0?1:(W.wrap===2?(U(W,255&q.adler),U(W,q.adler>>8&255),U(W,q.adler>>16&255),U(W,q.adler>>24&255),U(W,255&q.total_in),U(W,q.total_in>>8&255),U(W,q.total_in>>16&255),U(W,q.total_in>>24&255)):(_(W,q.adler>>>16),_(W,65535&q.adler)),V(q),0<W.wrap&&(W.wrap=-W.wrap),W.pending!==0?m:1)},n.deflateEnd=function(q){var pe;return q&&q.state?(pe=q.state.status)!==R&&pe!==69&&pe!==73&&pe!==91&&pe!==103&&pe!==F&&pe!==666?ee(q,v):(q.state=null,pe===F?ee(q,-3):m):v},n.deflateSetDictionary=function(q,pe){var he,W,ae,se,ve,ge,fe,ke,ze=pe.length;if(!q||!q.state||(se=(he=q.state).wrap)===2||se===1&&he.status!==R||he.lookahead)return v;for(se===1&&(q.adler=l(q.adler,pe,ze,0)),he.wrap=0,ze>=he.w_size&&(se===0&&(Z(he.head),he.strstart=0,he.block_start=0,he.insert=0),ke=new o.Buf8(he.w_size),o.arraySet(ke,pe,ze-he.w_size,he.w_size,0),pe=ke,ze=he.w_size),ve=q.avail_in,ge=q.next_in,fe=q.input,q.avail_in=ze,q.next_in=0,q.input=pe,Q(he);he.lookahead>=E;){for(W=he.strstart,ae=he.lookahead-(E-1);he.ins_h=(he.ins_h<<he.hash_shift^he.window[W+E-1])&he.hash_mask,he.prev[W&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=W,W++,--ae;);he.strstart=W,he.lookahead=E-1,Q(he)}return he.strstart+=he.lookahead,he.block_start=he.strstart,he.insert=he.lookahead,he.lookahead=0,he.match_length=he.prev_length=E-1,he.match_available=0,q.next_in=ge,q.input=fe,q.avail_in=ve,he.wrap=se,m},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(a,r,n){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(a,r,n){r.exports=function(i,o){var s,l,c,u,d,h,m,v,f,y,k,x,z,S,w,C,j,M,E,L,D,R,F,N,te;s=i.state,l=i.next_in,N=i.input,c=l+(i.avail_in-5),u=i.next_out,te=i.output,d=u-(o-i.avail_out),h=u+(i.avail_out-257),m=s.dmax,v=s.wsize,f=s.whave,y=s.wnext,k=s.window,x=s.hold,z=s.bits,S=s.lencode,w=s.distcode,C=(1<<s.lenbits)-1,j=(1<<s.distbits)-1;e:do{z<15&&(x+=N[l++]<<z,z+=8,x+=N[l++]<<z,z+=8),M=S[x&C];t:for(;;){if(x>>>=E=M>>>24,z-=E,(E=M>>>16&255)===0)te[u++]=65535&M;else{if(!(16&E)){if((64&E)==0){M=S[(65535&M)+(x&(1<<E)-1)];continue t}if(32&E){s.mode=12;break e}i.msg="invalid literal/length code",s.mode=30;break e}L=65535&M,(E&=15)&&(z<E&&(x+=N[l++]<<z,z+=8),L+=x&(1<<E)-1,x>>>=E,z-=E),z<15&&(x+=N[l++]<<z,z+=8,x+=N[l++]<<z,z+=8),M=w[x&j];a:for(;;){if(x>>>=E=M>>>24,z-=E,!(16&(E=M>>>16&255))){if((64&E)==0){M=w[(65535&M)+(x&(1<<E)-1)];continue a}i.msg="invalid distance code",s.mode=30;break e}if(D=65535&M,z<(E&=15)&&(x+=N[l++]<<z,(z+=8)<E&&(x+=N[l++]<<z,z+=8)),m<(D+=x&(1<<E)-1)){i.msg="invalid distance too far back",s.mode=30;break e}if(x>>>=E,z-=E,(E=u-d)<D){if(f<(E=D-E)&&s.sane){i.msg="invalid distance too far back",s.mode=30;break e}if(F=k,(R=0)===y){if(R+=v-E,E<L){for(L-=E;te[u++]=k[R++],--E;);R=u-D,F=te}}else if(y<E){if(R+=v+y-E,(E-=y)<L){for(L-=E;te[u++]=k[R++],--E;);if(R=0,y<L){for(L-=E=y;te[u++]=k[R++],--E;);R=u-D,F=te}}}else if(R+=y-E,E<L){for(L-=E;te[u++]=k[R++],--E;);R=u-D,F=te}for(;2<L;)te[u++]=F[R++],te[u++]=F[R++],te[u++]=F[R++],L-=3;L&&(te[u++]=F[R++],1<L&&(te[u++]=F[R++]))}else{for(R=u-D;te[u++]=te[R++],te[u++]=te[R++],te[u++]=te[R++],2<(L-=3););L&&(te[u++]=te[R++],1<L&&(te[u++]=te[R++]))}break}}break}}while(l<c&&u<h);l-=L=z>>3,x&=(1<<(z-=L<<3))-1,i.next_in=l,i.next_out=u,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=u<h?h-u+257:257-(u-h),s.hold=x,s.bits=z}},{}],49:[function(a,r,n){var i=a("../utils/common"),o=a("./adler32"),s=a("./crc32"),l=a("./inffast"),c=a("./inftrees"),u=1,d=2,h=0,m=-2,v=1,f=852,y=592;function k(R){return(R>>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function x(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function z(R){var F;return R&&R.state?(F=R.state,R.total_in=R.total_out=F.total=0,R.msg="",F.wrap&&(R.adler=1&F.wrap),F.mode=v,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(f),F.distcode=F.distdyn=new i.Buf32(y),F.sane=1,F.back=-1,h):m}function S(R){var F;return R&&R.state?((F=R.state).wsize=0,F.whave=0,F.wnext=0,z(R)):m}function w(R,F){var N,te;return R&&R.state?(te=R.state,F<0?(N=0,F=-F):(N=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?m:(te.window!==null&&te.wbits!==F&&(te.window=null),te.wrap=N,te.wbits=F,S(R))):m}function C(R,F){var N,te;return R?(te=new x,(R.state=te).window=null,(N=w(R,F))!==h&&(R.state=null),N):m}var j,M,E=!0;function L(R){if(E){var F;for(j=new i.Buf32(512),M=new i.Buf32(32),F=0;F<144;)R.lens[F++]=8;for(;F<256;)R.lens[F++]=9;for(;F<280;)R.lens[F++]=7;for(;F<288;)R.lens[F++]=8;for(c(u,R.lens,0,288,j,0,R.work,{bits:9}),F=0;F<32;)R.lens[F++]=5;c(d,R.lens,0,32,M,0,R.work,{bits:5}),E=!1}R.lencode=j,R.lenbits=9,R.distcode=M,R.distbits=5}function D(R,F,N,te){var X,ie=R.state;return ie.window===null&&(ie.wsize=1<<ie.wbits,ie.wnext=0,ie.whave=0,ie.window=new i.Buf8(ie.wsize)),te>=ie.wsize?(i.arraySet(ie.window,F,N-ie.wsize,ie.wsize,0),ie.wnext=0,ie.whave=ie.wsize):(te<(X=ie.wsize-ie.wnext)&&(X=te),i.arraySet(ie.window,F,N-te,X,ie.wnext),(te-=X)?(i.arraySet(ie.window,F,N-te,te,0),ie.wnext=te,ie.whave=ie.wsize):(ie.wnext+=X,ie.wnext===ie.wsize&&(ie.wnext=0),ie.whave<ie.wsize&&(ie.whave+=X))),0}n.inflateReset=S,n.inflateReset2=w,n.inflateResetKeep=z,n.inflateInit=function(R){return C(R,15)},n.inflateInit2=C,n.inflate=function(R,F){var N,te,X,ie,ee,ce,Z,V,Y,U,_,G,Q,ne,ue,ye,Ce,B,K,le,q,pe,he,W,ae=0,se=new i.Buf8(4),ve=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!R||!R.state||!R.output||!R.input&&R.avail_in!==0)return m;(N=R.state).mode===12&&(N.mode=13),ee=R.next_out,X=R.output,Z=R.avail_out,ie=R.next_in,te=R.input,ce=R.avail_in,V=N.hold,Y=N.bits,U=ce,_=Z,pe=h;e:for(;;)switch(N.mode){case v:if(N.wrap===0){N.mode=13;break}for(;Y<16;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(2&N.wrap&&V===35615){se[N.check=0]=255&V,se[1]=V>>>8&255,N.check=s(N.check,se,2,0),Y=V=0,N.mode=2;break}if(N.flags=0,N.head&&(N.head.done=!1),!(1&N.wrap)||(((255&V)<<8)+(V>>8))%31){R.msg="incorrect header check",N.mode=30;break}if((15&V)!=8){R.msg="unknown compression method",N.mode=30;break}if(Y-=4,q=8+(15&(V>>>=4)),N.wbits===0)N.wbits=q;else if(q>N.wbits){R.msg="invalid window size",N.mode=30;break}N.dmax=1<<q,R.adler=N.check=1,N.mode=512&V?10:12,Y=V=0;break;case 2:for(;Y<16;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(N.flags=V,(255&N.flags)!=8){R.msg="unknown compression method",N.mode=30;break}if(57344&N.flags){R.msg="unknown header flags set",N.mode=30;break}N.head&&(N.head.text=V>>8&1),512&N.flags&&(se[0]=255&V,se[1]=V>>>8&255,N.check=s(N.check,se,2,0)),Y=V=0,N.mode=3;case 3:for(;Y<32;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.head&&(N.head.time=V),512&N.flags&&(se[0]=255&V,se[1]=V>>>8&255,se[2]=V>>>16&255,se[3]=V>>>24&255,N.check=s(N.check,se,4,0)),Y=V=0,N.mode=4;case 4:for(;Y<16;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.head&&(N.head.xflags=255&V,N.head.os=V>>8),512&N.flags&&(se[0]=255&V,se[1]=V>>>8&255,N.check=s(N.check,se,2,0)),Y=V=0,N.mode=5;case 5:if(1024&N.flags){for(;Y<16;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.length=V,N.head&&(N.head.extra_len=V),512&N.flags&&(se[0]=255&V,se[1]=V>>>8&255,N.check=s(N.check,se,2,0)),Y=V=0}else N.head&&(N.head.extra=null);N.mode=6;case 6:if(1024&N.flags&&(ce<(G=N.length)&&(G=ce),G&&(N.head&&(q=N.head.extra_len-N.length,N.head.extra||(N.head.extra=new Array(N.head.extra_len)),i.arraySet(N.head.extra,te,ie,G,q)),512&N.flags&&(N.check=s(N.check,te,G,ie)),ce-=G,ie+=G,N.length-=G),N.length))break e;N.length=0,N.mode=7;case 7:if(2048&N.flags){if(ce===0)break e;for(G=0;q=te[ie+G++],N.head&&q&&N.length<65536&&(N.head.name+=String.fromCharCode(q)),q&&G<ce;);if(512&N.flags&&(N.check=s(N.check,te,G,ie)),ce-=G,ie+=G,q)break e}else N.head&&(N.head.name=null);N.length=0,N.mode=8;case 8:if(4096&N.flags){if(ce===0)break e;for(G=0;q=te[ie+G++],N.head&&q&&N.length<65536&&(N.head.comment+=String.fromCharCode(q)),q&&G<ce;);if(512&N.flags&&(N.check=s(N.check,te,G,ie)),ce-=G,ie+=G,q)break e}else N.head&&(N.head.comment=null);N.mode=9;case 9:if(512&N.flags){for(;Y<16;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(V!==(65535&N.check)){R.msg="header crc mismatch",N.mode=30;break}Y=V=0}N.head&&(N.head.hcrc=N.flags>>9&1,N.head.done=!0),R.adler=N.check=0,N.mode=12;break;case 10:for(;Y<32;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}R.adler=N.check=k(V),Y=V=0,N.mode=11;case 11:if(N.havedict===0)return R.next_out=ee,R.avail_out=Z,R.next_in=ie,R.avail_in=ce,N.hold=V,N.bits=Y,2;R.adler=N.check=1,N.mode=12;case 12:if(F===5||F===6)break e;case 13:if(N.last){V>>>=7&Y,Y-=7&Y,N.mode=27;break}for(;Y<3;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}switch(N.last=1&V,Y-=1,3&(V>>>=1)){case 0:N.mode=14;break;case 1:if(L(N),N.mode=20,F!==6)break;V>>>=2,Y-=2;break e;case 2:N.mode=17;break;case 3:R.msg="invalid block type",N.mode=30}V>>>=2,Y-=2;break;case 14:for(V>>>=7&Y,Y-=7&Y;Y<32;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if((65535&V)!=(V>>>16^65535)){R.msg="invalid stored block lengths",N.mode=30;break}if(N.length=65535&V,Y=V=0,N.mode=15,F===6)break e;case 15:N.mode=16;case 16:if(G=N.length){if(ce<G&&(G=ce),Z<G&&(G=Z),G===0)break e;i.arraySet(X,te,ie,G,ee),ce-=G,ie+=G,Z-=G,ee+=G,N.length-=G;break}N.mode=12;break;case 17:for(;Y<14;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(N.nlen=257+(31&V),V>>>=5,Y-=5,N.ndist=1+(31&V),V>>>=5,Y-=5,N.ncode=4+(15&V),V>>>=4,Y-=4,286<N.nlen||30<N.ndist){R.msg="too many length or distance symbols",N.mode=30;break}N.have=0,N.mode=18;case 18:for(;N.have<N.ncode;){for(;Y<3;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.lens[ve[N.have++]]=7&V,V>>>=3,Y-=3}for(;N.have<19;)N.lens[ve[N.have++]]=0;if(N.lencode=N.lendyn,N.lenbits=7,he={bits:N.lenbits},pe=c(0,N.lens,0,19,N.lencode,0,N.work,he),N.lenbits=he.bits,pe){R.msg="invalid code lengths set",N.mode=30;break}N.have=0,N.mode=19;case 19:for(;N.have<N.nlen+N.ndist;){for(;ye=(ae=N.lencode[V&(1<<N.lenbits)-1])>>>16&255,Ce=65535&ae,!((ue=ae>>>24)<=Y);){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(Ce<16)V>>>=ue,Y-=ue,N.lens[N.have++]=Ce;else{if(Ce===16){for(W=ue+2;Y<W;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(V>>>=ue,Y-=ue,N.have===0){R.msg="invalid bit length repeat",N.mode=30;break}q=N.lens[N.have-1],G=3+(3&V),V>>>=2,Y-=2}else if(Ce===17){for(W=ue+3;Y<W;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}Y-=ue,q=0,G=3+(7&(V>>>=ue)),V>>>=3,Y-=3}else{for(W=ue+7;Y<W;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}Y-=ue,q=0,G=11+(127&(V>>>=ue)),V>>>=7,Y-=7}if(N.have+G>N.nlen+N.ndist){R.msg="invalid bit length repeat",N.mode=30;break}for(;G--;)N.lens[N.have++]=q}}if(N.mode===30)break;if(N.lens[256]===0){R.msg="invalid code -- missing end-of-block",N.mode=30;break}if(N.lenbits=9,he={bits:N.lenbits},pe=c(u,N.lens,0,N.nlen,N.lencode,0,N.work,he),N.lenbits=he.bits,pe){R.msg="invalid literal/lengths set",N.mode=30;break}if(N.distbits=6,N.distcode=N.distdyn,he={bits:N.distbits},pe=c(d,N.lens,N.nlen,N.ndist,N.distcode,0,N.work,he),N.distbits=he.bits,pe){R.msg="invalid distances set",N.mode=30;break}if(N.mode=20,F===6)break e;case 20:N.mode=21;case 21:if(6<=ce&&258<=Z){R.next_out=ee,R.avail_out=Z,R.next_in=ie,R.avail_in=ce,N.hold=V,N.bits=Y,l(R,_),ee=R.next_out,X=R.output,Z=R.avail_out,ie=R.next_in,te=R.input,ce=R.avail_in,V=N.hold,Y=N.bits,N.mode===12&&(N.back=-1);break}for(N.back=0;ye=(ae=N.lencode[V&(1<<N.lenbits)-1])>>>16&255,Ce=65535&ae,!((ue=ae>>>24)<=Y);){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(ye&&(240&ye)==0){for(B=ue,K=ye,le=Ce;ye=(ae=N.lencode[le+((V&(1<<B+K)-1)>>B)])>>>16&255,Ce=65535&ae,!(B+(ue=ae>>>24)<=Y);){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}V>>>=B,Y-=B,N.back+=B}if(V>>>=ue,Y-=ue,N.back+=ue,N.length=Ce,ye===0){N.mode=26;break}if(32&ye){N.back=-1,N.mode=12;break}if(64&ye){R.msg="invalid literal/length code",N.mode=30;break}N.extra=15&ye,N.mode=22;case 22:if(N.extra){for(W=N.extra;Y<W;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.length+=V&(1<<N.extra)-1,V>>>=N.extra,Y-=N.extra,N.back+=N.extra}N.was=N.length,N.mode=23;case 23:for(;ye=(ae=N.distcode[V&(1<<N.distbits)-1])>>>16&255,Ce=65535&ae,!((ue=ae>>>24)<=Y);){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if((240&ye)==0){for(B=ue,K=ye,le=Ce;ye=(ae=N.distcode[le+((V&(1<<B+K)-1)>>B)])>>>16&255,Ce=65535&ae,!(B+(ue=ae>>>24)<=Y);){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}V>>>=B,Y-=B,N.back+=B}if(V>>>=ue,Y-=ue,N.back+=ue,64&ye){R.msg="invalid distance code",N.mode=30;break}N.offset=Ce,N.extra=15&ye,N.mode=24;case 24:if(N.extra){for(W=N.extra;Y<W;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}N.offset+=V&(1<<N.extra)-1,V>>>=N.extra,Y-=N.extra,N.back+=N.extra}if(N.offset>N.dmax){R.msg="invalid distance too far back",N.mode=30;break}N.mode=25;case 25:if(Z===0)break e;if(G=_-Z,N.offset>G){if((G=N.offset-G)>N.whave&&N.sane){R.msg="invalid distance too far back",N.mode=30;break}Q=G>N.wnext?(G-=N.wnext,N.wsize-G):N.wnext-G,G>N.length&&(G=N.length),ne=N.window}else ne=X,Q=ee-N.offset,G=N.length;for(Z<G&&(G=Z),Z-=G,N.length-=G;X[ee++]=ne[Q++],--G;);N.length===0&&(N.mode=21);break;case 26:if(Z===0)break e;X[ee++]=N.length,Z--,N.mode=21;break;case 27:if(N.wrap){for(;Y<32;){if(ce===0)break e;ce--,V|=te[ie++]<<Y,Y+=8}if(_-=Z,R.total_out+=_,N.total+=_,_&&(R.adler=N.check=N.flags?s(N.check,X,_,ee-_):o(N.check,X,_,ee-_)),_=Z,(N.flags?V:k(V))!==N.check){R.msg="incorrect data check",N.mode=30;break}Y=V=0}N.mode=28;case 28:if(N.wrap&&N.flags){for(;Y<32;){if(ce===0)break e;ce--,V+=te[ie++]<<Y,Y+=8}if(V!==(4294967295&N.total)){R.msg="incorrect length check",N.mode=30;break}Y=V=0}N.mode=29;case 29:pe=1;break e;case 30:pe=-3;break e;case 31:return-4;case 32:default:return m}return R.next_out=ee,R.avail_out=Z,R.next_in=ie,R.avail_in=ce,N.hold=V,N.bits=Y,(N.wsize||_!==R.avail_out&&N.mode<30&&(N.mode<27||F!==4))&&D(R,R.output,R.next_out,_-R.avail_out)?(N.mode=31,-4):(U-=R.avail_in,_-=R.avail_out,R.total_in+=U,R.total_out+=_,N.total+=_,N.wrap&&_&&(R.adler=N.check=N.flags?s(N.check,X,_,R.next_out-_):o(N.check,X,_,R.next_out-_)),R.data_type=N.bits+(N.last?64:0)+(N.mode===12?128:0)+(N.mode===20||N.mode===15?256:0),(U==0&&_===0||F===4)&&pe===h&&(pe=-5),pe)},n.inflateEnd=function(R){if(!R||!R.state)return m;var F=R.state;return F.window&&(F.window=null),R.state=null,h},n.inflateGetHeader=function(R,F){var N;return R&&R.state?(2&(N=R.state).wrap)==0?m:((N.head=F).done=!1,h):m},n.inflateSetDictionary=function(R,F){var N,te=F.length;return R&&R.state?(N=R.state).wrap!==0&&N.mode!==11?m:N.mode===11&&o(1,F,te,0)!==N.check?-3:D(R,F,te,te)?(N.mode=31,-4):(N.havedict=1,h):m},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(a,r,n){var i=a("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,d,h,m,v,f,y,k){var x,z,S,w,C,j,M,E,L,D=k.bits,R=0,F=0,N=0,te=0,X=0,ie=0,ee=0,ce=0,Z=0,V=0,Y=null,U=0,_=new i.Buf16(16),G=new i.Buf16(16),Q=null,ne=0;for(R=0;R<=15;R++)_[R]=0;for(F=0;F<m;F++)_[d[h+F]]++;for(X=D,te=15;1<=te&&_[te]===0;te--);if(te<X&&(X=te),te===0)return v[f++]=20971520,v[f++]=20971520,k.bits=1,0;for(N=1;N<te&&_[N]===0;N++);for(X<N&&(X=N),R=ce=1;R<=15;R++)if(ce<<=1,(ce-=_[R])<0)return-1;if(0<ce&&(u===0||te!==1))return-1;for(G[1]=0,R=1;R<15;R++)G[R+1]=G[R]+_[R];for(F=0;F<m;F++)d[h+F]!==0&&(y[G[d[h+F]]++]=F);if(j=u===0?(Y=Q=y,19):u===1?(Y=o,U-=257,Q=s,ne-=257,256):(Y=l,Q=c,-1),R=N,C=f,ee=F=V=0,S=-1,w=(Z=1<<(ie=X))-1,u===1&&852<Z||u===2&&592<Z)return 1;for(;;){for(M=R-ee,L=y[F]<j?(E=0,y[F]):y[F]>j?(E=Q[ne+y[F]],Y[U+y[F]]):(E=96,0),x=1<<R-ee,N=z=1<<ie;v[C+(V>>ee)+(z-=x)]=M<<24|E<<16|L|0,z!==0;);for(x=1<<R-1;V&x;)x>>=1;if(x!==0?(V&=x-1,V+=x):V=0,F++,--_[R]==0){if(R===te)break;R=d[h+y[F]]}if(X<R&&(V&w)!==S){for(ee===0&&(ee=X),C+=N,ce=1<<(ie=R-ee);ie+ee<te&&!((ce-=_[ie+ee])<=0);)ie++,ce<<=1;if(Z+=1<<ie,u===1&&852<Z||u===2&&592<Z)return 1;v[S=V&w]=X<<24|ie<<16|C-f|0}}return V!==0&&(v[C+V]=R-ee<<24|64<<16|0),k.bits=X,0}},{"../utils/common":41}],51:[function(a,r,n){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(a,r,n){var i=a("../utils/common"),o=0,s=1;function l(ae){for(var se=ae.length;0<=--se;)ae[se]=0}var c=0,u=29,d=256,h=d+1+u,m=30,v=19,f=2*h+1,y=15,k=16,x=7,z=256,S=16,w=17,C=18,j=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=new Array(2*(h+2));l(D);var R=new Array(2*m);l(R);var F=new Array(512);l(F);var N=new Array(256);l(N);var te=new Array(u);l(te);var X,ie,ee,ce=new Array(m);function Z(ae,se,ve,ge,fe){this.static_tree=ae,this.extra_bits=se,this.extra_base=ve,this.elems=ge,this.max_length=fe,this.has_stree=ae&&ae.length}function V(ae,se){this.dyn_tree=ae,this.max_code=0,this.stat_desc=se}function Y(ae){return ae<256?F[ae]:F[256+(ae>>>7)]}function U(ae,se){ae.pending_buf[ae.pending++]=255&se,ae.pending_buf[ae.pending++]=se>>>8&255}function _(ae,se,ve){ae.bi_valid>k-ve?(ae.bi_buf|=se<<ae.bi_valid&65535,U(ae,ae.bi_buf),ae.bi_buf=se>>k-ae.bi_valid,ae.bi_valid+=ve-k):(ae.bi_buf|=se<<ae.bi_valid&65535,ae.bi_valid+=ve)}function G(ae,se,ve){_(ae,ve[2*se],ve[2*se+1])}function Q(ae,se){for(var ve=0;ve|=1&ae,ae>>>=1,ve<<=1,0<--se;);return ve>>>1}function ne(ae,se,ve){var ge,fe,ke=new Array(y+1),ze=0;for(ge=1;ge<=y;ge++)ke[ge]=ze=ze+ve[ge-1]<<1;for(fe=0;fe<=se;fe++){var Be=ae[2*fe+1];Be!==0&&(ae[2*fe]=Q(ke[Be]++,Be))}}function ue(ae){var se;for(se=0;se<h;se++)ae.dyn_ltree[2*se]=0;for(se=0;se<m;se++)ae.dyn_dtree[2*se]=0;for(se=0;se<v;se++)ae.bl_tree[2*se]=0;ae.dyn_ltree[2*z]=1,ae.opt_len=ae.static_len=0,ae.last_lit=ae.matches=0}function ye(ae){8<ae.bi_valid?U(ae,ae.bi_buf):0<ae.bi_valid&&(ae.pending_buf[ae.pending++]=ae.bi_buf),ae.bi_buf=0,ae.bi_valid=0}function Ce(ae,se,ve,ge){var fe=2*se,ke=2*ve;return ae[fe]<ae[ke]||ae[fe]===ae[ke]&&ge[se]<=ge[ve]}function B(ae,se,ve){for(var ge=ae.heap[ve],fe=ve<<1;fe<=ae.heap_len&&(fe<ae.heap_len&&Ce(se,ae.heap[fe+1],ae.heap[fe],ae.depth)&&fe++,!Ce(se,ge,ae.heap[fe],ae.depth));)ae.heap[ve]=ae.heap[fe],ve=fe,fe<<=1;ae.heap[ve]=ge}function K(ae,se,ve){var ge,fe,ke,ze,Be=0;if(ae.last_lit!==0)for(;ge=ae.pending_buf[ae.d_buf+2*Be]<<8|ae.pending_buf[ae.d_buf+2*Be+1],fe=ae.pending_buf[ae.l_buf+Be],Be++,ge===0?G(ae,fe,se):(G(ae,(ke=N[fe])+d+1,se),(ze=j[ke])!==0&&_(ae,fe-=te[ke],ze),G(ae,ke=Y(--ge),ve),(ze=M[ke])!==0&&_(ae,ge-=ce[ke],ze)),Be<ae.last_lit;);G(ae,z,se)}function le(ae,se){var ve,ge,fe,ke=se.dyn_tree,ze=se.stat_desc.static_tree,Be=se.stat_desc.has_stree,tt=se.stat_desc.elems,T=-1;for(ae.heap_len=0,ae.heap_max=f,ve=0;ve<tt;ve++)ke[2*ve]!==0?(ae.heap[++ae.heap_len]=T=ve,ae.depth[ve]=0):ke[2*ve+1]=0;for(;ae.heap_len<2;)ke[2*(fe=ae.heap[++ae.heap_len]=T<2?++T:0)]=1,ae.depth[fe]=0,ae.opt_len--,Be&&(ae.static_len-=ze[2*fe+1]);for(se.max_code=T,ve=ae.heap_len>>1;1<=ve;ve--)B(ae,ke,ve);for(fe=tt;ve=ae.heap[1],ae.heap[1]=ae.heap[ae.heap_len--],B(ae,ke,1),ge=ae.heap[1],ae.heap[--ae.heap_max]=ve,ae.heap[--ae.heap_max]=ge,ke[2*fe]=ke[2*ve]+ke[2*ge],ae.depth[fe]=(ae.depth[ve]>=ae.depth[ge]?ae.depth[ve]:ae.depth[ge])+1,ke[2*ve+1]=ke[2*ge+1]=fe,ae.heap[1]=fe++,B(ae,ke,1),2<=ae.heap_len;);ae.heap[--ae.heap_max]=ae.heap[1],(function(J,oe){var Se,Me,Te,Ne,at,dt,gt=oe.dyn_tree,ct=oe.max_code,Ot=oe.stat_desc.static_tree,ra=oe.stat_desc.has_stree,ft=oe.stat_desc.extra_bits,Bt=oe.stat_desc.extra_base,Gt=oe.stat_desc.max_length,pa=0;for(Ne=0;Ne<=y;Ne++)J.bl_count[Ne]=0;for(gt[2*J.heap[J.heap_max]+1]=0,Se=J.heap_max+1;Se<f;Se++)Gt<(Ne=gt[2*gt[2*(Me=J.heap[Se])+1]+1]+1)&&(Ne=Gt,pa++),gt[2*Me+1]=Ne,ct<Me||(J.bl_count[Ne]++,at=0,Bt<=Me&&(at=ft[Me-Bt]),dt=gt[2*Me],J.opt_len+=dt*(Ne+at),ra&&(J.static_len+=dt*(Ot[2*Me+1]+at)));if(pa!==0){do{for(Ne=Gt-1;J.bl_count[Ne]===0;)Ne--;J.bl_count[Ne]--,J.bl_count[Ne+1]+=2,J.bl_count[Gt]--,pa-=2}while(0<pa);for(Ne=Gt;Ne!==0;Ne--)for(Me=J.bl_count[Ne];Me!==0;)ct<(Te=J.heap[--Se])||(gt[2*Te+1]!==Ne&&(J.opt_len+=(Ne-gt[2*Te+1])*gt[2*Te],gt[2*Te+1]=Ne),Me--)}})(ae,se),ne(ke,T,ae.bl_count)}function q(ae,se,ve){var ge,fe,ke=-1,ze=se[1],Be=0,tt=7,T=4;for(ze===0&&(tt=138,T=3),se[2*(ve+1)+1]=65535,ge=0;ge<=ve;ge++)fe=ze,ze=se[2*(ge+1)+1],++Be<tt&&fe===ze||(Be<T?ae.bl_tree[2*fe]+=Be:fe!==0?(fe!==ke&&ae.bl_tree[2*fe]++,ae.bl_tree[2*S]++):Be<=10?ae.bl_tree[2*w]++:ae.bl_tree[2*C]++,ke=fe,T=(Be=0)===ze?(tt=138,3):fe===ze?(tt=6,3):(tt=7,4))}function pe(ae,se,ve){var ge,fe,ke=-1,ze=se[1],Be=0,tt=7,T=4;for(ze===0&&(tt=138,T=3),ge=0;ge<=ve;ge++)if(fe=ze,ze=se[2*(ge+1)+1],!(++Be<tt&&fe===ze)){if(Be<T)for(;G(ae,fe,ae.bl_tree),--Be!=0;);else fe!==0?(fe!==ke&&(G(ae,fe,ae.bl_tree),Be--),G(ae,S,ae.bl_tree),_(ae,Be-3,2)):Be<=10?(G(ae,w,ae.bl_tree),_(ae,Be-3,3)):(G(ae,C,ae.bl_tree),_(ae,Be-11,7));ke=fe,T=(Be=0)===ze?(tt=138,3):fe===ze?(tt=6,3):(tt=7,4)}}l(ce);var he=!1;function W(ae,se,ve,ge){_(ae,(c<<1)+(ge?1:0),3),(function(fe,ke,ze,Be){ye(fe),U(fe,ze),U(fe,~ze),i.arraySet(fe.pending_buf,fe.window,ke,ze,fe.pending),fe.pending+=ze})(ae,se,ve)}n._tr_init=function(ae){he||((function(){var se,ve,ge,fe,ke,ze=new Array(y+1);for(fe=ge=0;fe<u-1;fe++)for(te[fe]=ge,se=0;se<1<<j[fe];se++)N[ge++]=fe;for(N[ge-1]=fe,fe=ke=0;fe<16;fe++)for(ce[fe]=ke,se=0;se<1<<M[fe];se++)F[ke++]=fe;for(ke>>=7;fe<m;fe++)for(ce[fe]=ke<<7,se=0;se<1<<M[fe]-7;se++)F[256+ke++]=fe;for(ve=0;ve<=y;ve++)ze[ve]=0;for(se=0;se<=143;)D[2*se+1]=8,se++,ze[8]++;for(;se<=255;)D[2*se+1]=9,se++,ze[9]++;for(;se<=279;)D[2*se+1]=7,se++,ze[7]++;for(;se<=287;)D[2*se+1]=8,se++,ze[8]++;for(ne(D,h+1,ze),se=0;se<m;se++)R[2*se+1]=5,R[2*se]=Q(se,5);X=new Z(D,j,d+1,h,y),ie=new Z(R,M,0,m,y),ee=new Z(new Array(0),E,0,v,x)})(),he=!0),ae.l_desc=new V(ae.dyn_ltree,X),ae.d_desc=new V(ae.dyn_dtree,ie),ae.bl_desc=new V(ae.bl_tree,ee),ae.bi_buf=0,ae.bi_valid=0,ue(ae)},n._tr_stored_block=W,n._tr_flush_block=function(ae,se,ve,ge){var fe,ke,ze=0;0<ae.level?(ae.strm.data_type===2&&(ae.strm.data_type=(function(Be){var tt,T=4093624447;for(tt=0;tt<=31;tt++,T>>>=1)if(1&T&&Be.dyn_ltree[2*tt]!==0)return o;if(Be.dyn_ltree[18]!==0||Be.dyn_ltree[20]!==0||Be.dyn_ltree[26]!==0)return s;for(tt=32;tt<d;tt++)if(Be.dyn_ltree[2*tt]!==0)return s;return o})(ae)),le(ae,ae.l_desc),le(ae,ae.d_desc),ze=(function(Be){var tt;for(q(Be,Be.dyn_ltree,Be.l_desc.max_code),q(Be,Be.dyn_dtree,Be.d_desc.max_code),le(Be,Be.bl_desc),tt=v-1;3<=tt&&Be.bl_tree[2*L[tt]+1]===0;tt--);return Be.opt_len+=3*(tt+1)+5+5+4,tt})(ae),fe=ae.opt_len+3+7>>>3,(ke=ae.static_len+3+7>>>3)<=fe&&(fe=ke)):fe=ke=ve+5,ve+4<=fe&&se!==-1?W(ae,se,ve,ge):ae.strategy===4||ke===fe?(_(ae,2+(ge?1:0),3),K(ae,D,R)):(_(ae,4+(ge?1:0),3),(function(Be,tt,T,J){var oe;for(_(Be,tt-257,5),_(Be,T-1,5),_(Be,J-4,4),oe=0;oe<J;oe++)_(Be,Be.bl_tree[2*L[oe]+1],3);pe(Be,Be.dyn_ltree,tt-1),pe(Be,Be.dyn_dtree,T-1)})(ae,ae.l_desc.max_code+1,ae.d_desc.max_code+1,ze+1),K(ae,ae.dyn_ltree,ae.dyn_dtree)),ue(ae),ge&&ye(ae)},n._tr_tally=function(ae,se,ve){return ae.pending_buf[ae.d_buf+2*ae.last_lit]=se>>>8&255,ae.pending_buf[ae.d_buf+2*ae.last_lit+1]=255&se,ae.pending_buf[ae.l_buf+ae.last_lit]=255&ve,ae.last_lit++,se===0?ae.dyn_ltree[2*ve]++:(ae.matches++,se--,ae.dyn_ltree[2*(N[ve]+d+1)]++,ae.dyn_dtree[2*Y(se)]++),ae.last_lit===ae.lit_bufsize-1},n._tr_align=function(ae){_(ae,2,3),G(ae,z,D),(function(se){se.bi_valid===16?(U(se,se.bi_buf),se.bi_buf=0,se.bi_valid=0):8<=se.bi_valid&&(se.pending_buf[se.pending++]=255&se.bi_buf,se.bi_buf>>=8,se.bi_valid-=8)})(ae)}},{"../utils/common":41}],53:[function(a,r,n){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(a,r,n){(function(i){(function(o,s){if(!o.setImmediate){var l,c,u,d,h=1,m={},v=!1,f=o.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(o);y=y&&y.setTimeout?y:o,l={}.toString.call(o.process)==="[object process]"?function(S){process.nextTick(function(){x(S)})}:(function(){if(o.postMessage&&!o.importScripts){var S=!0,w=o.onmessage;return o.onmessage=function(){S=!1},o.postMessage("","*"),o.onmessage=w,S}})()?(d="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",z,!1):o.attachEvent("onmessage",z),function(S){o.postMessage(d+S,"*")}):o.MessageChannel?((u=new MessageChannel).port1.onmessage=function(S){x(S.data)},function(S){u.port2.postMessage(S)}):f&&"onreadystatechange"in f.createElement("script")?(c=f.documentElement,function(S){var w=f.createElement("script");w.onreadystatechange=function(){x(S),w.onreadystatechange=null,c.removeChild(w),w=null},c.appendChild(w)}):function(S){setTimeout(x,0,S)},y.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var w=new Array(arguments.length-1),C=0;C<w.length;C++)w[C]=arguments[C+1];var j={callback:S,args:w};return m[h]=j,l(h),h++},y.clearImmediate=k}function k(S){delete m[S]}function x(S){if(v)setTimeout(x,0,S);else{var w=m[S];if(w){v=!0;try{(function(C){var j=C.callback,M=C.args;switch(M.length){case 0:j();break;case 1:j(M[0]);break;case 2:j(M[0],M[1]);break;case 3:j(M[0],M[1],M[2]);break;default:j.apply(s,M)}})(w)}finally{k(S),v=!1}}}}function z(S){S.source===o&&typeof S.data=="string"&&S.data.indexOf(d)===0&&x(+S.data.slice(d.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Lre)),Lre.exports}var bat=vat();const kat=Ur(bat),yat=Object.freeze(Object.defineProperty({__proto__:null,default:kat},Symbol.toStringTag,{value:"Module"}));function Ire({value:e=!1,disabled:t=!1,onChange:a,onFocus:r,stopPropagation:n=!1,className:i}){const o=l=>{t||(n&&l.stopPropagation(),a(!e))},s=l=>{n&&l.stopPropagation(),r?.()};return p.jsx(xat,{tabIndex:t?-1:0,onFocus:s,onClick:o,role:"switch","aria-checked":e,"aria-disabled":t,selected:e,disabled:t,className:i,children:p.jsx(wat,{selected:e,disabled:t})})}const xat=$.div`
|
|
10433
10433
|
width: var(--switch-width);
|
|
10434
10434
|
height: var(--switch-height);
|
|
@@ -12026,7 +12026,7 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Yxa(e){return e.
|
|
|
12026
12026
|
`];let k=-1,x=0;for(const z of y){const S=e.indexOf(z,u);if(S!==-1&&S<l.start){k=S,x=z.length;break}}if(k!==-1)d=k+x;else{const z=[`
|
|
12027
12027
|
`,`\r
|
|
12028
12028
|
`];for(const S of z){const w=e.indexOf(S,u);if(w!==-1&&w<l.start){d=w+S.length;break}}}}const f=l.start;t.push({boundaryStart:s.start,boundaryEnd:s.end,headersStart:c,headersEnd:u,bodyStart:d,bodyEnd:f,contentType:h})}return t}const Lwa=()=>on.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Tt.mark({attributes:{style:"color: var(--color-carrot-8); font-weight: var(--font-weight-semibold);"}}),n=Tt.mark({attributes:{style:"color: var(--color-blue-8);"}}),i=Tt.mark({attributes:{style:"color: var(--color-purple-8);"}}),o=_wa(t),s=/^--[a-zA-Z0-9_\-\.]+(?:--)?(?:\r?\n|$)/gm,l=[];let c;for(;(c=s.exec(t))!==null;)l.push({start:c.index,end:c.index+c[0].length});for(const v of l)e.visibleRanges.some(f=>Math.max(f.from,v.start)<Math.min(f.to,v.end))&&a.push({from:v.start,to:v.end,value:r});const u=/^([a-zA-Z0-9\-]+):\s*(.+?)(?:\r?\n|$)/gm;for(const v of o){u.lastIndex=v.headersStart;let f;for(;(f=u.exec(t))!==null&&f.index<v.headersEnd;){const y=f.index+f[1].length+1+(f[2].match(/^\s*/)?.[0]?.length||0),k=f.index+f[0].length-(f[0].match(/\r?\n$/)?.[0]?.length||0);e.visibleRanges.some(x=>Math.max(x.from,y)<Math.min(x.to,k))&&k>y&&a.push({from:y,to:k,value:n})}}const d=/\[Binary\s+Data\]/gi;let h;for(;(h=d.exec(t))!==null;){const v=h.index,f=h[0].length;e.visibleRanges.some(y=>Math.max(y.from,v)<Math.min(y.to,v+f))&&a.push({from:v,to:v+f,value:i})}const m=Tt.mark({attributes:{style:"color: var(--color-blue-8);"}});for(const v of o)if(v.contentType?.includes("json")){const f=t.slice(v.bodyStart,v.bodyEnd),y=f.trim();if(!y)continue;const k=f.length-f.trimStart().length,x=v.bodyStart+k;let z;try{const w=Eb.create("inmemory://model.json","json",0,y),C=Bwa.parseJSONDocument(w)?.root;z=Ewa(C)?C:void 0}catch{z=void 0}if(!z)continue;const S=Rwa(z);for(const w of S){const C=x+w.from,j=x+w.to;if(!e.visibleRanges.some(L=>Math.max(L.from,C)<Math.min(L.to,j))||!(t[C]==='"'&&t[j-1]==='"'))continue;const M=C+1,E=j-1;E<=M||a.push({from:M,to:E,value:m})}}return Tt.set(a,!0)}},{decorations:e=>e.decorations}),Nwa=()=>on.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Tt.mark({attributes:{style:"color: var(--color-blue-8);"}}),n=/^([a-zA-Z0-9\-]+):\s*(.+?)(?:\r?\n|$)/gm;let i;for(;(i=n.exec(t))!==null;){let o=i.index+i[1].length+1;for(;o<t.length&&/\s/.test(t[o]);)o++;const s=i.index+i[0].length-(i[0].match(/\r?\n$/)?.[0]?.length||0);s<=o||!e.visibleRanges.some(l=>Math.max(l.from,o)<Math.min(l.to,s))||a.push({from:o,to:s,value:r})}return Tt.set(a,!0)}},{decorations:e=>e.decorations}),Iwa=DA({});function $wa(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.type=="string"&&typeof t.offset=="number"&&typeof t.length=="number"}function Dwa(e){const t=[];if(!e)return t;const a=[e];for(;a.length>0;){const r=a.pop();if(r.type==="property"){r.valueNode&&a.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&t.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)a.push(n)}return t}const TI=()=>on.fromClass(class{decorations;constructor(e){this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const t=e.state.doc.toString(),a=[],r=Tt.mark({attributes:{style:"color: var(--color-blue-8);"}}),n=Tt.mark({attributes:{style:"color: var(--code-block-tokens-keyword-color); font-weight: var(--font-weight-bold);"}}),i=t.split(/\r?\n/);let o=0;for(let s=0;s<i.length;s++){const l=i[s],c=o,u=o+l.length;if(!l.trim()){o=u+(t[o+l.length]==="\r"?2:1);continue}let d=c,h=l;l.startsWith("0x1E")?(d=c+4,h=l.substring(4),a.push({from:c,to:c+4,value:n})):l.charCodeAt(0)===30&&(d=c+1,h=l.substring(1),a.push({from:c,to:c+1,value:n})),l.endsWith("0x0A")?(h=h.substring(0,h.length-4),a.push({from:u-4,to:u,value:n})):l.charCodeAt(l.length-1)===10&&(h=h.substring(0,h.length-1),a.push({from:u-1,to:u,value:n}));let m;try{const f=Eb.create("inmemory://model.json","json",0,h),y=Iwa.parseJSONDocument(f)?.root;m=$wa(y)?y:void 0}catch{m=void 0}if(!m){o=u+(t[o+l.length]==="\r"?2:1);continue}const v=Dwa(m);for(const f of v){const y=d+f.from,k=d+f.to;if(!e.visibleRanges.some(S=>Math.max(S.from,y)<Math.min(S.to,k))||!(t[y]==='"'&&t[k-1]==='"'))continue;const x=y+1,z=k-1;z<=x||a.push({from:x,to:z,value:r})}o=u+(t[o+l.length]==="\r"?2:1)}return Tt.set(a,!0)}},{decorations:e=>e.decorations}),Nb={[ei.Text]:{name:"Text",extensions:[wt.lineWrapping],stateExtensions:[MI]},[ei.JSON]:{name:"JSON",extensions:[Lye(),p1a(Owa(),{delay:0,needsRefresh:e=>e.transactions.some(t=>t.effects.some(a=>a.is(Wwe)))}),_ye.data.of({autocomplete:Swa()}),zwa],stateExtensions:[wwa,Twa]},[ei.XML]:{name:"XML",extensions:[e1a()],stateExtensions:[MI]}},Zwe={[ei.MultipartMixed]:{name:"Multipart Mixed",extensions:[wt.lineWrapping],stateExtensions:[Lwa]},[ei.JSONL]:{name:"JSON Lines",extensions:[wt.lineWrapping],stateExtensions:[TI]},[ei.NDJSON]:{name:"NDJSON",extensions:[Lye(),wt.lineWrapping],stateExtensions:[TI]},[ei.JSONSeq]:{name:"JSON Sequence",extensions:[wt.lineWrapping],stateExtensions:[TI]},[ei.TextStream]:{name:"SSE",extensions:[wt.lineWrapping],stateExtensions:[Nwa]}},Jwe={[ei.Image]:{name:"Image",extensions:[],stateExtensions:[]}},Ywe={[ei.HTML]:{name:"HTML",extensions:[Mya()],stateExtensions:[MI]}},Ex={...Nb,...Jwe,...Ywe,...Zwe},BI={...Nb,...Jwe,...Ywe},Bg={...Nb,...Zwe},Xwe={[ei.FormData]:{name:"form-data",extensions:void 0},[ei["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},eOe={[ei.Binary]:{name:"Binary",extensions:void 0}},Eg={...Nb,...Xwe,...eOe},Kwa=Object.keys(Nb),VA=Object.keys(Xwe),tOe=Object.keys(eOe);function aOe(e=[],t){const a={};return e.forEach(r=>{const n=String(r[t]);a[n]||(a[n]=[]),a[n].push(r)}),a}const Rx={active:!0,key:"",value:""};function Qh(e,t){return[...e.map(a=>({id:crypto.randomUUID(),key:a.name,value:t.initializeWithInputs?`$inputs.${a.name}`:a.example?String(a.example):"",active:t.initializeWithInputs?!0:!!a.example,in:a.in})),un(t.in)]}function _x(e,t){const[a]=e.split("?"),r=t.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${a}${r?`?${r}`:""}`}function nc(){return{id:crypto.randomUUID(),...Rx}}function Ys(){return{id:crypto.randomUUID(),...Rx,description:""}}function un(e){return{...Rx,id:crypto.randomUUID(),in:e}}function tp(){return{id:crypto.randomUUID(),...Rx,type:"text",files:null}}function EI(){return{id:crypto.randomUUID(),...Rx,sendIn:$o.URL}}function RI(e){return e.map(t=>({id:crypto.randomUUID(),key:"",value:t,active:!0}))}function HA(e,t){return e.filter(a=>a.active&&a.value).map(({value:a})=>(t?Rr(a,t):a).trim())}function Uh(e,t){const a=t.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(a.map(r=>[r.key,r])).values()):a}function Vwa(e,t){return e.map(({value:a,...r})=>({...r,value:Rr(a,t)}))}function Hwa(e,t){if(!e.startsWith("$components.parameters."))return null;const a=e.replace("$components.parameters.","");return a&&t[a]||null}function En(e=[],t={}){const a=[];for(const r of e)if(mh(r)){const n=Hwa(r.reference,t);n&&a.push({...n,active:r.active,value:r.value||n.value})}else a.push(r);return a}function Wh(e){return Object.entries(e).map(([t,a])=>({id:crypto.randomUUID(),key:"",value:t,active:!0,description:a}))}function Gwa(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const rOe={documentedOAuth2Types:[],grantType:Ue.ClientCredentials,authRequestExtraParams:[nc()],tokenRequestExtraParams:[EI()],[Ue.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],accessToken:""},[Ue.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ys()]}},Fwa={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:ml.Header,name:"",key:""},[qe.OAuth2]:rOe,[qe.OpenIDConnect]:{...rOe,openIdConnectUrl:"",userInfoUrl:""}},_I="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",qwa={[Fo.SIMPLE]:{condition:"",type:Fo.SIMPLE},[Fo.REGEX]:{condition:"",type:Fo.REGEX,context:""},[Fo.JSONPATH]:{condition:"",type:Fo.JSONPATH,context:""},[Fo.XPATH]:{condition:"",type:Fo.XPATH,context:""}};function GA(){return structuredClone({type:Bi.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[tp()],"application/x-www-form-urlencoded":[tp()]},binary:null})}const Qwa={method:"GET",url:"",security:[Hc()],body:GA(),queryParameters:[nc()],headers:[nc()],cookies:[nc()],pathParameters:[nc()]};function nOe(){return structuredClone(Qwa)}function Hc(){return Hd(Fwa)}function Uwa(e){return Hd({id:crypto.randomUUID(),...qwa[e]})}function iOe(e,t,a){for(const r of a){const n=oOe(e,r),i=oOe(t,r);if(typeof n=="object"&&typeof i=="object"){if(!iOe(n,i,a))return!1}else if(n!==i)return!1}return!0}function oOe(e,t){const a=t.split("/");let r=e;for(const n of a)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function Wwa(e,t){return e.length===t.length&&e.sort().join()===t.sort().join()}function Zwa(e,t){return e.every(a=>t.includes(a))}function Jwa(e){switch(e){case"query":return ml.Query;case"cookie":return ml.Cookie;case"header":return ml.Header;default:return}}function Ywa(e,t,a){const{security:r}=t,n=rca(e);if(!a)return!1;const i=LI(a),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!Wwa(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,h=o.includes(u),m=i.find(k=>k.securityType===u),v=!m||iOe(c,m,eOa(u,d)),f=Xwa(c,u,c[qe.OAuth2]?.grantType,n),y=!!(h&&m&&v&&f);l.push(!a.security?.length||y)}),l.includes(!1)}function Xwa(e,t,a,r){if(t===qe.OAuth2&&(a===Ue.AuthorizationCode||a===Ue.AuthorizationCodeWithPkce||a===Ue.Implicit)){const n=e[qe.OAuth2][a]?.availableScopes,i=HA(e[qe.OAuth2][a]?.scopes,r);return Zwa(i,n)}return!0}function eOa(e,t){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...tOa(t)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function tOa(e){return e===Ue.ClientCredentials?[`${qe.OAuth2}/${Ue.ClientCredentials}/tokenUrl`]:e===Ue.Password?[`${qe.OAuth2}/${Ue.Password}/tokenUrl`]:e===Ue.Implicit?[`${qe.OAuth2}/${Ue.Implicit}/authorizationUrl`]:e===Ue.AuthorizationCode?[`${qe.OAuth2}/${Ue.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCode}/authorizationUrl`]:e===Ue.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function aOa(e){return e.map(t=>{const a=t.map(r=>r.id).join("_");return t.map(r=>({...r,schemeId:a}))})}function rOa(e){const t=e.security||[],a=t.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(NI(o))}),{id:n,security:i}});return t.length?a:[]}function nOa(e,t){const a=e.security||[];return a?.length?dOe(a).map((r,n)=>NI(r)):[]}function LI(e){const t=(e.security||[])[0];return t?t.map(a=>NI(a)):[Hc()]}function NI(e,t){const a={...Hc(),securitySchemeId:e.id},r=FA(e);a.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(a[r].schemeName=e.id),r===qe.BasicAuth&&(a[qe.BasicAuth].username||(a[qe.BasicAuth].username=zn(n+la.Username)),a[qe.BasicAuth].password||(a[qe.BasicAuth].password=zn(n+la.Password))),r===qe.DigestAuth&&(a[qe.DigestAuth].username||(a[qe.DigestAuth].username=zn(n+la.Username)),a[qe.DigestAuth].password||(a[qe.DigestAuth].password=zn(n+la.Password))),r===qe.JWT&&!a[qe.JWT].token&&(a[qe.JWT].token=zn(n+la.JWTToken)),r===qe.APIKey&&!a[qe.APIKey].key){a[qe.APIKey].name=e.name||"",a[qe.APIKey].key=zn(n+la.APIKey);const i=Jwa(e.in);i&&(a[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=DI(e),o=zn(n+la.Token),s=a[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===Ue.AuthorizationCode&&!s[Ue.AuthorizationCode].accessToken&&(s[Ue.AuthorizationCode].accessToken=o,s[Ue.AuthorizationCode].clientId=zn(n+la.ClientId),s[Ue.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCode].clientSecret=zn(n+la.ClientSecret),s[Ue.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCode].scopes=[...Wh(e.flows?.authorizationCode?.scopes||{})||[],Ys()]),l===Ue.AuthorizationCodeWithPkce&&!s[Ue.AuthorizationCodeWithPkce].accessToken&&(s[Ue.AuthorizationCodeWithPkce].accessToken=o,s[Ue.AuthorizationCodeWithPkce].clientId=zn(n+la.ClientId),s[Ue.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCodeWithPkce].clientSecret=zn(n+la.ClientSecret),s[Ue.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCodeWithPkce].scopes=[...Wh(e.flows?.authorizationCode?.scopes||{}),Ys()]),l===Ue.ClientCredentials&&!s[Ue.ClientCredentials].accessToken&&(s[Ue.ClientCredentials].accessToken=o,s[Ue.ClientCredentials].clientId=zn(n+la.ClientId),s[Ue.ClientCredentials].clientSecret=zn(n+la.ClientSecret),s[Ue.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[Ue.ClientCredentials].scopes=[...Wh(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.ClientCredentialsWithJwtAssertion&&!s[Ue.ClientCredentialsWithJwtAssertion].accessToken&&(s[Ue.ClientCredentialsWithJwtAssertion].accessToken=o,s[Ue.ClientCredentialsWithJwtAssertion].clientId=zn(n+la.ClientId),s[Ue.ClientCredentialsWithJwtAssertion].clientAssertion=zn(n+la.ClientAssertion),s[Ue.ClientCredentialsWithJwtAssertion].scopes=[...Wh(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.Implicit&&!s[Ue.Implicit].accessToken&&(s[Ue.Implicit].accessToken=o,s[Ue.Implicit].clientId=zn(n+la.ClientId),s[Ue.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[Ue.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[Ue.Implicit].scopes=[...Wh(e.flows?.implicit?.scopes||{}),Ys()]),l===Ue.Password&&!s[Ue.Password].accessToken&&(s[Ue.Password].accessToken=o,s[Ue.Password].clientId=zn(n+la.ClientId),s[Ue.Password].clientSecret=zn(n+la.ClientSecret),s[Ue.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[Ue.Password].scopes=[...Wh(e.flows?.password?.scopes||{}),Ys()])})}if(r===qe.OpenIDConnect){const i=zn(n+la.Token),o=a[qe.OpenIDConnect];o[Ue.AuthorizationCode].accessToken||(o[Ue.AuthorizationCode].accessToken=i,o[Ue.AuthorizationCode].clientId=zn(n+la.ClientId),o[Ue.AuthorizationCode].clientSecret=zn(n+la.ClientSecret),o[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.AuthorizationCodeWithPkce].accessToken||(o[Ue.AuthorizationCodeWithPkce].accessToken=i,o[Ue.AuthorizationCodeWithPkce].clientId=zn(n+la.ClientId),o[Ue.AuthorizationCodeWithPkce].clientSecret=zn(n+la.ClientSecret),o[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.Implicit].accessToken||(o[Ue.Implicit].accessToken=i,o[Ue.Implicit].clientId=zn(n+la.ClientId))}return a}function sOe(e){try{const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return console.error({error:t}),e}}function iOa(e,t=!1,a="",r){const n=aOe(e.parameters,"in"),i=lOe(e),o=LI(e),s=Qh(n.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:r,apiPath:{path:e.path,method:e.method},apiId:a,isAdditionalOperation:t,request:{pathParameters:Qh(n.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:_x(Gwa(e.path),s),headers:Qh(n.header||[],{in:"header"}),queryParameters:s,cookies:Qh(n.cookie||[],{in:"cookie"}),body:i,security:o},response:null}}function II(e){const t=aOe(e.parameters,"in"),a=lOe(e),r=LI(e);return{parameters:{queryParameters:Qh(t.query||[],{in:"query"}),headers:Qh(t.header||[],{in:"header"}),cookies:Qh(t.cookie||[],{in:"cookie"}),pathParameters:Qh(t.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:a,security:r}}function oOa(e,t){const a=new Pd({format:!0});if(typeof e=="string")return t?.includes("json")?sOe(e):e;if(typeof e=="object"&&e!==null&&t?.includes("xml")){const r=Array.isArray(e)?e:{root:e};return a.build(r)}return JSON.stringify(e,null,2)}function lOe(e){const t=e.body?.mediaTypes;if(!t||!Object.keys(t).length)return GA();const a=sOa(t,e),r=a?.name||"",n=!VA.includes(r)&&!tOe.includes(r),i=$I(a),o=i.find(({key:l})=>l===e.body?.activeExampleName)?.value??i[0]?.value,s=n&&o?oOa(o,r):"";return{...GA(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...a&&{type:a.name},content:s,formData:{"multipart/form-data":uOe(t[ei.FormData]),"application/x-www-form-urlencoded":uOe(t[ei["application/x-www-form-urlencoded"]])}}}function cOe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((t,a)=>(t[a]={name:a,extensions:void 0},t),{}),...Eg}:Eg}function uOe(e){if(!e)return[tp()];if(!e.parameters)return[tp()];const t=e.parameters.map(a=>({id:crypto.randomUUID(),key:a.name,value:String(a.example)||"",active:!0,type:a.inputType,files:null}));return t.push(tp()),t}function $I(e){const t=e?.examples;return Object.keys(t||{}).map(a=>{const r=t?.[a];return{name:zm(r?.summary)?r?.summary:r?.summary?.raw||a,key:a,value:t?.[a].value}})}function sOa(e,t){const a=cOe(t),r=Object.keys(e).find(n=>!!a[n]);return r?e[r]:null}function lOa(e){return!e?.security?.length||!e?[]:nOa(e)}function dOe(e){const t=new Set;return e.flat().filter(a=>t.has(a.id)?!1:(t.add(a.id),!0))}function FA(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function cOa(e,t){if(e==="clientCredentials"&&t&&"x-assertionType"in t&&t["x-assertionType"]===_I)return Ue.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&t&&"x-usePkce"in t&&t["x-usePkce"])return Ue.AuthorizationCodeWithPkce;switch(e){case"implicit":return Ue.Implicit;case"password":return Ue.Password;case"clientCredentials":return Ue.ClientCredentials;case"authorizationCode":return Ue.AuthorizationCode;default:return Ue.AuthorizationCode}}function uOa(e,t){const a=e?.security;if(!a?.length)return[];const r=aOa(a).flat().filter(n=>n.schemeId===t).find(n=>FA(n)===qe.OAuth2);return DI(r)}function DI(e){return Object.entries(e?.flows||{}).map(([t,a])=>cOa(t,a)).filter(Boolean)}async function Lx(e){try{const t=await Jfe(e),a=await C_(e);return{absolutePath:e,file:new File([t],a)}}catch(t){return console.error("Failed to init replay file",t),null}}async function pOe(e){return(await Promise.allSettled(e.map(t=>Lx(t)))).map(t=>t.status==="fulfilled"?t.value:null).filter(t=>t!==null)}function qA(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function KI(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function dOa(e){try{const t=new URL(e);return t.search="",t.hash="",t.toString()}catch{return e}}function QA(e){return/^https?:\/\//i.test(e)}function pOa(e,t){let a;if(t.startsWith("//")){const{protocol:r}=new URL(e);a=`${r||"https:"}${t}`}else if(qA(t))a=t;else if(!t.startsWith("/"))a=KI(e)+"/"+t;else{const r=new URL(e);r.pathname=t,a=r.toString()}return KI(a)}function hOe(e,t){let a=e;return t.forEach(({key:r,value:n,active:i})=>{n&&i&&(a=a.replaceAll(`{${r}}`,n))}),a}function mOe(e,t){let a=e;return t.forEach(({name:r,value:n})=>{n&&(a=a.replaceAll(`{${r}}`,n))}),a}function hOa(e){return e.startsWith("http://")||e.startsWith("https://")}function UA({url:e,serverUrl:t,corsProxyUrl:a}){let r;if(hOa(e)||!t)r=e;else{const n=new URL(t);n.pathname=e,n.search="",n.hash="",r=n.toString()}return a?`${a}${r}`:r}async function mOa(e,t,a,r,n,i){const o=await Promise.all(e.sourceDescriptions?.map(async l=>({...l,apiId:await gOe({projectPath:r,apiUrl:l.url,collectionId:t})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:t,srcType:a,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:COe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:zOe(l.outputs),security:xOe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=COe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=_x(d.url,u.queryParameters.filter(xne)));const h=gOa(c,o,n);let m;if(h&&i){const f=n?.find(y=>y.id===h.apiId);try{m=i(h.path,h.method,f)}catch(y){console.error("Failed to convert operation to replay value",y),m=void 0}}delete c.operationId,delete c["x-operation"];const v=await xOa(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:zOe(c.outputs),successCriteria:c.successCriteria?.map(f=>({...f,type:f.type??Fo.SIMPLE}))||[],requestBody:v,xOperation:d,security:xOe(c["x-security"],m),operation:h}}))})))}}async function gOe({projectPath:e,apiUrl:t,collectionId:a}){if(QA(t))return t;if(await qr.isAbsolute(t))return await qr.relative(e,t);const r=await qr.resolve(await qr.join(e,a,"..",t));return await qr.relative(e,r)}function gOa(e,t,a){if(e["x-operation"])return null;const{path:r,method:n,apiId:i,isAdditionalOperation:o}=vOe({operationPath:e.operationPath,parsedSourceDescriptions:t}),{operationId:s,apiId:l}=fOa({operationId:e.operationId,parsedSourceDescriptions:t}),c=l||i||t[0]?.apiId||"",u=a?.find(d=>d.id===c);if(s&&u&&!r&&!n){const d=OOa(s,u);return{apiId:c,path:d?.path??"",method:d?.method??"",operationId:s,isAdditionalOperation:d?.isAdditionalOperation??!1}}return{apiId:c,path:r??"",method:n??"",operationId:s,isAdditionalOperation:o}}function fOa({operationId:e,parsedSourceDescriptions:t}){if(!e)return{operationId:"",apiId:null};const a=e.split(".");if(a.length===1)return{operationId:e,apiId:t[0]?.apiId??""};const[,r,n=""]=a,i=t.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function fOe(e){return"reference"in e&&typeof e.reference=="string"}function vOe({operationPath:e,parsedSourceDescriptions:t}){if(!e)return{apiId:null,path:"",method:"",isAdditionalOperation:!1};try{const a=e.split("#"),r=a.length>1?a[1]:a[0],n=a.length>1?a[0]:"";if(!r)return{path:"",method:"",apiId:null,isAdditionalOperation:!1};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const h=t.find(({name:m})=>m===i);h&&(o=h.apiId)}const c=r.split("/"),u=c.pop()||"",d=c[c.length-1]==="additionalOperations";return d&&c.pop(),{path:Ai.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o,isAdditionalOperation:d}}catch{return{path:"",method:"",apiId:null,isAdditionalOperation:!1}}}function vOa(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function bOe(e,t){const a={clientCredentials:Ue.ClientCredentials,authorizationCode:Ue.AuthorizationCode,implicit:Ue.Implicit,password:Ue.Password,clientCredentialsWithJwtAssertion:Ue.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:Ue.AuthorizationCodeWithPkce};return e==="clientCredentials"&&t["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?Ue.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&t["x-usePkce"]?Ue.AuthorizationCodeWithPkce:a[e]??null}function bOa(e){return{query:ml.Query,header:ml.Header,cookie:ml.Cookie}[e.toLowerCase()]||ml.Header}function kOa(e){return{body:$o.Body,header:$o.Header,url:$o.URL}[e.toLowerCase()]||$o.URL}function kOe(e,t,a){return Object.keys(e).reduce((r,n)=>{const i=bOe(n,e[n]);if(!i)return r;switch(i){case Ue.ClientCredentials:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:Rg(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.AuthorizationCode:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:Rg(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Implicit:r[i]={...a[i],clientId:t.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:Rg(e[n].availableScopes),scopes:Rg(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Password:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",username:t.username??"",password:t.password??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.ClientCredentialsWithJwtAssertion:r[i]={...a[i],clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:Rg(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.AuthorizationCodeWithPkce:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:Rg(e[n].availableScopes),scopes:Rg(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:t.codeVerifier??"",codeChallenge:t.codeChallenge??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break}return r},a)}function yOe(e,t,a){const r={...Hc(),securityType:e},n=Object.keys(t.flows||{})[0],i=bOe(n,t.flows?.[n])??Ue.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:a.username,password:a.password,schemeName:t.id}};case qe.JWT:return{...r,[qe.JWT]:{token:a.token,schemeName:t.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:a.username,password:a.password,schemeName:t.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:bOa(t.in),name:t.name,key:a.apiKey,schemeName:t.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...kOe(t.flows||{},a||{},r[qe.OAuth2]),authRequestExtraParams:wOe(a.authRequestExtraParams),tokenRequestExtraParams:OOe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...kOe(a.flows||{},a||{},r[qe.OpenIDConnect]),openIdConnectUrl:a.openIdConnectUrl,userInfoUrl:a.userInfoUrl,authRequestExtraParams:wOe(a.authRequestExtraParams),tokenRequestExtraParams:OOe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};default:return r}}function yOa(e,t){return[...e.map(a=>{if("scheme"in a){const n=vOa(a.scheme);return yOe(n,a.scheme,a.values)}const r=t.find(n=>n.id===a.schemeName);if(r){const n=FA(r),i=yOe(n,r,a.values);return i.securitySchemeId=r.id,i}return Hc()})]}function xOe(e=[],t){const a=dOe(t?.security||[]);return e.length?yOa(e,a):[Hc()]}function Rg(e,t){const a=Wh(e||{}),r=Wh(t||{});return[...a,...r,Ys()]}function wOe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0})).concat(nc())}function OOe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0,sendIn:kOa(t.in)})).concat(EI())}function zOe(e){if(!e)return[nc()];const t=[];for(const a in e)t.push({id:crypto.randomUUID(),key:a,value:e[a],active:!0});return t.push(nc()),t}const Ib={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function SOe(e,t){const a="$components.parameters.";if(e.reference.startsWith(a)){const r=e.reference.replace(a,"");return t?.[r]}}function COe(e,t,a){if(!e&&!t)return{pathParameters:[un("path")],queryParameters:[un("query")],headers:[un("header")],cookies:[un("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(fOe(n)){const i=SOe(n,a),o=Ib[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else Ib[n.in]&&r[Ib[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(t)for(const n of t)if(fOe(n)){const i=SOe(n,a),o=Ib[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else Ib[n.in]&&r[Ib[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(un("path")),r.queryParameters.push(un("query")),r.headers.push(un("header")),r.cookies.push(un("cookie")),r}async function xOa(e,t){const a=nOe().body;if(!e)return a;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...a,type:e.contentType,formData:await wOa(e,t)};case"application/octet-stream":const r=e.payload?await AOe(e.payload,t):[],n=r.length>0?await Lx(r[0]):null;return{...a,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...a,type:e.contentType,content:POe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...a,type:o,content:i?e.payload:POe(e.payload)}}}}async function jOe(e,t,a,r){const n=await AOe(t,r),i=n.length>0||Array.isArray(t),o=i?await pOe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":t,type:i?"file":"text",active:a,files:o}}async function wOa(e,t){const a=nOe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>jOe(o,s,!0,t))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>jOe(o,s,!1,t))):[];return{...a,[r]:[...n,...i,tp()]}}function POe(e){return e?JSON.stringify(e,null,2):""}function OOa(e,t){for(const a of Object.keys(t.paths)){const r=t.paths[a];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:a,isAdditionalOperation:!1}}if(r.additionalOperations){for(const[n,i]of Object.entries(r.additionalOperations))if(i?.operationId===e)return{method:n.toLowerCase(),path:a,isAdditionalOperation:!0}}}return null}async function AOe(e,t){return Array.isArray(e)?(await Promise.all(e.map(a=>MOe(a,t)))).flat():typeof e=="string"?await MOe(e,t):[]}async function MOe(e,t){const a=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(a));return Promise.all(r.map(n=>zOa(n[1],t)))}async function zOa(e,t){return await qr.isAbsolute(e)?e:await qr.resolve(await qr.join(t,e))}const Os=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},TOe=(e,t,a)=>{if(!e.properties)return e;const r=e.properties[t],n=Os(r);return{...e,properties:{...e.properties,[t]:{...n,...a}}}},SOa=(e,t,a)=>{if(!e.properties||t===a||!a.trim())return null;const r={...e.properties};return r[a]?null:(r[a]=r[t],delete r[t],{...e,properties:r})},COa=(e,t)=>{if(!e.properties)return e;const a={...e.properties};return delete a[t],{...e,properties:a}},jOa=(e,t,a={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[t]:a}}};function BOe(e){const t=Object.assign({},...(e||[]).filter(({key:a,active:r})=>a&&r).map(a=>({[a.key]:a.value})));if(Object.keys(t).length!==0)return t}function EOe(e){if(!e)return{};const t={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},a=[],r=[];return Object.keys(t).forEach(n=>{const i=n;e[i].forEach(o=>{if(mh(o)){const s={reference:o.reference,value:o.value||void 0};o.active?a.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:t[i],value:o.value};o.active?a.push(s):r.push(s)}})}),{parameters:a.length>0?a:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function POa(e){const t=e?.map(a=>({condition:a.condition,context:a.context,type:a.type==Fo.SIMPLE?void 0:a.type}));if(t?.length!==0)return t}function AOa(e){if(!(!e||e.length===0))return[...e]}async function ROe(e,t){return e.absolutePath?`$file('${await qr.relative(t,e.absolutePath)}')`:null}async function MOa(e,t){const{type:a,value:r,files:n}=e;switch(a){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>ROe(o,t)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function TOa(e,t){const a=e.type,r=e.formData[a],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await MOa(o,t);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function BOa(e){if(!e)return e;try{const t=JSON.parse(e);return typeof t=="object"?t:e}catch{return e}}async function EOa(e,t){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await TOa(e,t)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await ROe(e.binary,t):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:BOa(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function ROa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function _Oa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function LOa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function NOa(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function IOa(e){const{flows:t,values:a}=NOe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:t}},values:{...a,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:_Oe(e.authRequestExtraParams),tokenRequestExtraParams:LOe(e.tokenRequestExtraParams)}}}function $Oa(e){const{flows:t,values:a}=NOe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:t}},values:{...a,authRequestExtraParams:_Oe(e.authRequestExtraParams),tokenRequestExtraParams:LOe(e.tokenRequestExtraParams)}}}function $b(e){const t={},a={};return e.forEach(r=>{r.value&&(r.active?t[r.value]=r.description:a[r.value]=r.description)}),{scopes:t,"x-replay-disabled-scopes":Object.keys(a).length>0?a:void 0}}function _Oe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active}))}function LOe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active,in:t.sendIn.toLowerCase()}))}function NOe(e){let t;switch(e.grantType){case Ue.ClientCredentials:return t=e[Ue.ClientCredentials],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...$b(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken}};case Ue.Implicit:return t=e[Ue.Implicit],{flows:{implicit:{authorizationUrl:t.authorizationUrl,...$b(t.scopes)}},values:{clientId:t.clientId,accessToken:t.accessToken,callbackUrl:t.callbackUrl}};case Ue.Password:return t=e[Ue.Password],{flows:{password:{tokenUrl:t.tokenUrl,...$b(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,username:t.username,password:t.password,accessToken:t.accessToken}};case Ue.AuthorizationCode:return t=e[Ue.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...$b(t.scopes)}},values:{accessToken:t.accessToken,clientId:t.clientId,callbackUrl:t.callbackUrl}};case Ue.ClientCredentialsWithJwtAssertion:return t=e[Ue.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...$b(t.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:t.clientId,clientAssertion:t.clientAssertion,accessToken:t.accessToken}};case Ue.AuthorizationCodeWithPkce:return t=e[Ue.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...$b(t.scopes),"x-usePkce":!0}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge,callbackUrl:t.callbackUrl}}}}function IOe(e){const t=e.map(a=>{switch(a.securityType){case qe.OpenIDConnect:{const r=a[qe.OpenIDConnect];return IOa(r)}case qe.OAuth2:{const r=a[qe.OAuth2];return $Oa(r)}case qe.APIKey:{const r=a[qe.APIKey];return _Oa(r)}case qe.BasicAuth:{const r=a[qe.BasicAuth];return ROa(r)}case qe.DigestAuth:{const r=a[qe.DigestAuth];return NOa(r)}case qe.JWT:{const r=a[qe.JWT];return LOa(r)}default:return null}}).filter(a=>a!==null);return{"x-security":t.length?t:void 0}}function DOa(e){const{inputs:t,parameters:a,...r}=e;let n=r;return Object.keys(t).length&&(n.inputs=t),Object.keys(a).length&&(n.parameters=Object.fromEntries(Object.entries(a).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function KOa(e,t){const{id:a,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({...c,name:c.name,url:c.url,type:c.type||"openapi",apiId:void 0})),components:DOa(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:h,state:m,steps:v,inputs:f,...y})=>({...y,dependsOn:AOa(d),outputs:BOe(h),inputs:f?Os(f):void 0,...IOe(u),...EOe(c),steps:await Promise.all(v.map(async({parameters:k,security:x,operation:z,requestBody:S,successCriteria:w,outputs:C,state:j,xOperation:M,...E})=>{const L={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const D=e.sourceDescriptions.find(({apiId:R})=>R===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const R=e.sourceDescriptions.length<=1;L.operationId=R?z.operationId:`$sourceDescriptions.${D.name}.${z.operationId}`}else L.operationPath=z.isAdditionalOperation?`{$sourceDescriptions.${D.name}.url}#/paths/${Ai.escape(z.path)}/additionalOperations/${z.method}`:`{$sourceDescriptions.${D.name}.url}#/paths/${Ai.escape(z.path)}/${z.method}`}else M&&(L["x-operation"]={...M,url:M.url.split("?")[0]});return{...E,...L,...IOe(x),...EOe(k),requestBody:await EOa(S,t),successCriteria:POa(w),outputs:BOe(C)}}))})))}}}class VOa extends ive{constructor(t,a){super(t),this.convertOperationToReplayValue=a}parse(t,a){return mOa(t.content,t.uri,t.type,this.storage.baseDir,a,this.convertOperationToReplayValue)}async stringify(t){const{arazzoObject:a}=await KOa(t,this.storage.baseDir);return await qr.extname(t.id)===".json"?JSON.stringify(a,null,2):Md.dump(a)}}class HOa{constructor(t,a){this.storage=t,this.localStorageSecretsProvider=a}default=[];async read(){const t=await this.storage.get("replay-environments.yaml"),a=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!t)return this.default;try{r=Md.load(t),n=a?JSON.parse(a):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:sr.Normal})):this.default}async write(t){const a=await this.localStorageSecretsProvider.get(),r=a?JSON.parse(a):{},n=t.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Md.dump(n))}}class GOa{constructor(t,a,r){this.storage=t,this.filePath=a,this.defaultValue=r}async parse(t){return JSON.parse(t)}stringify(t){return JSON.stringify(t)}async read(){const t=await this.storage.get(this.filePath);return t?await this.parse(t):this.defaultValue}async write(t){return this.storage.set(this.filePath,this.stringify(t))}}const FOa=(e,t)=>({data:e,version:t});class VI extends GOa{constructor(t,a,r,n){super(t,a,r),this.version=n}migrationMap={};migrate(t){if(!this.migrationMap[t.version])return this.defaultValue;const a=this.migrationMap[t.version](t);return a.version===this.version?a:this.migrate(a)}async parse(t){const a=JSON.parse(t);if(a.version!==this.version){const r=this.migrate(a);return await this.write(r.data),r.data}return a.data}stringify(t){return JSON.stringify(FOa(t,this.version))}}function qOa(e){return{data:{...e.data,tabs:e.data.tabs.map(t=>t.data.type===Wt.Step?{...t,data:{...t.data,draftStep:{...t.data.step,security:t.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:t)},version:2}}const $Oe=2,QOa="tabs.json";class UOa extends VI{migrationMap={1:qOa};constructor(t){super(t,QOa,Hd(Ufe),$Oe)}async parse(t){let a=JSON.parse(t);a.version!==$Oe&&(a=this.migrate(a));const r=await Promise.all(a.data.tabs.map(async n=>{if(n.data.type===Wt.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await DOe(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await DOe(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await Lx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...a.data,tabs:r}}stringify(t){return super.stringify({...t,tabs:t.tabs.map(a=>a.data.type===Wt.Step?{...a,data:{...a.data,response:null}}:a.data.type===Wt.WorkflowRun?{...a,data:{...a.data,result:null}}:a)})}}async function DOe(e){return Promise.all(e.map(async t=>{const a={...t};if(t.files){const r=t.files.map(n=>n.absolutePath).filter(n=>n!==null);a.files=await pOe(r)}return a}))}function WOa(e){return{data:e.data.map(t=>({...t,step:{...t.step,security:t.step.security.securities}})),version:2}}const ZOa=2,JOa="history.json";class YOa extends VI{migrationMap={1:WOa};constructor(t){super(t,JOa,[],ZOa)}}const XOa=1;class KOe{constructor(t,a,r,n,i,o){this.systemFilesStorage=t,this.userFilesStorage=a,this.project=r,this.isApiPersisted=n,this.convertOperationToReplayValue=i,this.telemetry=o,this.localStorageSecretsProvider=new mha(this.project.id);const s=new hha;this.historyStorage=new YOa(this.systemFilesStorage),this.activeEnvironmentIdStorage=new VI(this.systemFilesStorage,"active_environment_id.json",$0,XOa),this.tabsStateStorage=new UOa(this.systemFilesStorage),this.environmentsStorage=new HOa(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new VOa(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new gha(this.isApiPersisted?this.userFilesStorage:s)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;localStorageSecretsProvider;async update(t,a){switch(t.path[0]){case"history":this.historyStorage.write(a.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(a.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(a.tabsState.get());break;case"environments":this.environmentsStorage.write(a.environments.get());break;case"apis":this.isApiPersisted&&await this.apisStorage.update(t,a.apis.get());break;case"collections":await this.collectionsStorage.update(t,a.collections.get());break}}}var VOe={exports:{}},HOe;function eza(){return HOe||(HOe=1,(function(e){var t=Object.prototype.hasOwnProperty,a="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(a=!1));function n(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new n(u,d||l,h),v=a?a+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],m]:l._events[v].push(m):(l._events[v]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,u;if(this._eventsCount===0)return l;for(u in c=this._events)t.call(c,u)&&l.push(a?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=a?a+l:l,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,m=new Array(h);d<h;d++)m[d]=u[d].fn;return m},s.prototype.listenerCount=function(l){var c=a?a+l:l,u=this._events[c];return u?u.fn?1:u.length:0},s.prototype.emit=function(l,c,u,d,h,m){var v=a?a+l:l;if(!this._events[v])return!1;var f=this._events[v],y=arguments.length,k,x;if(f.fn){switch(f.once&&this.removeListener(l,f.fn,void 0,!0),y){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,c),!0;case 3:return f.fn.call(f.context,c,u),!0;case 4:return f.fn.call(f.context,c,u,d),!0;case 5:return f.fn.call(f.context,c,u,d,h),!0;case 6:return f.fn.call(f.context,c,u,d,h,m),!0}for(x=1,k=new Array(y-1);x<y;x++)k[x-1]=arguments[x];f.fn.apply(f.context,k)}else{var z=f.length,S;for(x=0;x<z;x++)switch(f[x].once&&this.removeListener(l,f[x].fn,void 0,!0),y){case 1:f[x].fn.call(f[x].context);break;case 2:f[x].fn.call(f[x].context,c);break;case 3:f[x].fn.call(f[x].context,c,u);break;case 4:f[x].fn.call(f[x].context,c,u,d);break;default:if(!k)for(S=1,k=new Array(y-1);S<y;S++)k[S-1]=arguments[S];f[x].fn.apply(f[x].context,k)}}return!0},s.prototype.on=function(l,c,u){return i(this,l,c,u,!1)},s.prototype.once=function(l,c,u){return i(this,l,c,u,!0)},s.prototype.removeListener=function(l,c,u,d){var h=a?a+l:l;if(!this._events[h])return this;if(!c)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===c&&(!d||m.once)&&(!u||m.context===u)&&o(this,h);else{for(var v=0,f=[],y=m.length;v<y;v++)(m[v].fn!==c||d&&!m[v].once||u&&m[v].context!==u)&&f.push(m[v]);f.length?this._events[h]=f.length===1?f[0]:f:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var c;return l?(c=a?a+l:l,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=a,s.EventEmitter=s,e.exports=s})(VOe)),VOe.exports}var tza=eza();const aza=Ur(tza);class GOe extends Error{constructor(t){super(t),this.name="TimeoutError"}}let rza=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}};const FOe=e=>globalThis.DOMException===void 0?new rza(e):new DOMException(e),qOe=e=>{const t=e.reason===void 0?FOe("This operation was aborted."):e.reason;return t instanceof Error?t:FOe(t)};function nza(e,t,a,r){let n;const i=new Promise((o,s)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){const{signal:l}=r;l.aborted&&s(qOe(l)),l.addEventListener("abort",()=>{s(qOe(l))})}n=r.customTimers.setTimeout.call(void 0,()=>{const l=`Promise timed out after ${t} milliseconds`,c=a instanceof Error?a:new GOe(l);typeof e.cancel=="function"&&e.cancel(),s(c)},t),(async()=>{try{o(await e)}catch(l){s(l)}finally{r.customTimers.clearTimeout.call(void 0,n)}})()});return i.clear=()=>{clearTimeout(n),n=void 0},i}function iza(e,t,a){let r=0,n=e.length;for(;n>0;){const i=Math.trunc(n/2);let o=r+i;a(e[o],t)<=0?(r=++o,n-=i+1):n=i}return r}var _g=function(e,t,a,r){if(a==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?r:a==="a"?r.call(e):r?r.value:t.get(e)},ap;class oza{constructor(){ap.set(this,[])}enqueue(t,a){a={priority:0,...a};const r={priority:a.priority,run:t};if(this.size&&_g(this,ap,"f")[this.size-1].priority>=a.priority){_g(this,ap,"f").push(r);return}const n=iza(_g(this,ap,"f"),r,(i,o)=>o.priority-i.priority);_g(this,ap,"f").splice(n,0,r)}dequeue(){return _g(this,ap,"f").shift()?.run}filter(t){return _g(this,ap,"f").filter(a=>a.priority===t.priority).map(a=>a.run)}get size(){return _g(this,ap,"f").length}}ap=new WeakMap;var Rn=function(e,t,a,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,a):n?n.value=a:t.set(e,a),a},Ht=function(e,t,a,r){if(a==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?r:a==="a"?r.call(e):r?r.value:t.get(e)},ri,Nx,Ix,Zh,WA,$x,ZA,Gc,Dx,Pl,JA,Al,Kx,Jh,YA,QOe,UOe,WOe,ZOe,JOe,XA,HI,GI,e5,YOe,t5;class XOe extends Error{}class sza extends aza{constructor(t){var a,r,n,i;if(super(),ri.add(this),Nx.set(this,void 0),Ix.set(this,void 0),Zh.set(this,0),WA.set(this,void 0),$x.set(this,void 0),ZA.set(this,0),Gc.set(this,void 0),Dx.set(this,void 0),Pl.set(this,void 0),JA.set(this,void 0),Al.set(this,0),Kx.set(this,void 0),Jh.set(this,void 0),YA.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:oza,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(a=t.intervalCap)===null||a===void 0?void 0:a.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);Rn(this,Nx,t.carryoverConcurrencyCount,"f"),Rn(this,Ix,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),Rn(this,WA,t.intervalCap,"f"),Rn(this,$x,t.interval,"f"),Rn(this,Pl,new t.queueClass,"f"),Rn(this,JA,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,Rn(this,YA,t.throwOnTimeout===!0,"f"),Rn(this,Jh,t.autoStart===!1,"f")}get concurrency(){return Ht(this,Kx,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);Rn(this,Kx,t,"f"),Ht(this,ri,"m",e5).call(this)}async add(t,a={}){return a={timeout:this.timeout,throwOnTimeout:Ht(this,YA,"f"),...a},new Promise((r,n)=>{Ht(this,Pl,"f").enqueue(async()=>{var i,o,s;Rn(this,Al,(o=Ht(this,Al,"f"),o++,o),"f"),Rn(this,Zh,(s=Ht(this,Zh,"f"),s++,s),"f");try{if(!((i=a.signal)===null||i===void 0)&&i.aborted)throw new XOe("The task was aborted.");let l=t({signal:a.signal});a.timeout&&(l=nza(Promise.resolve(l),a.timeout)),a.signal&&(l=Promise.race([l,Ht(this,ri,"m",YOe).call(this,a.signal)]));const c=await l;r(c),this.emit("completed",c)}catch(l){if(l instanceof GOe&&!a.throwOnTimeout){r();return}n(l),this.emit("error",l)}finally{Ht(this,ri,"m",WOe).call(this)}},a),this.emit("add"),Ht(this,ri,"m",XA).call(this)})}async addAll(t,a){return Promise.all(t.map(async r=>this.add(r,a)))}start(){return Ht(this,Jh,"f")?(Rn(this,Jh,!1,"f"),Ht(this,ri,"m",e5).call(this),this):this}pause(){Rn(this,Jh,!0,"f")}clear(){Rn(this,Pl,new(Ht(this,JA,"f")),"f")}async onEmpty(){Ht(this,Pl,"f").size!==0&&await Ht(this,ri,"m",t5).call(this,"empty")}async onSizeLessThan(t){Ht(this,Pl,"f").size<t||await Ht(this,ri,"m",t5).call(this,"next",()=>Ht(this,Pl,"f").size<t)}async onIdle(){Ht(this,Al,"f")===0&&Ht(this,Pl,"f").size===0||await Ht(this,ri,"m",t5).call(this,"idle")}get size(){return Ht(this,Pl,"f").size}sizeBy(t){return Ht(this,Pl,"f").filter(t).length}get pending(){return Ht(this,Al,"f")}get isPaused(){return Ht(this,Jh,"f")}}Nx=new WeakMap,Ix=new WeakMap,Zh=new WeakMap,WA=new WeakMap,$x=new WeakMap,ZA=new WeakMap,Gc=new WeakMap,Dx=new WeakMap,Pl=new WeakMap,JA=new WeakMap,Al=new WeakMap,Kx=new WeakMap,Jh=new WeakMap,YA=new WeakMap,ri=new WeakSet,QOe=function(){return Ht(this,Ix,"f")||Ht(this,Zh,"f")<Ht(this,WA,"f")},UOe=function(){return Ht(this,Al,"f")<Ht(this,Kx,"f")},WOe=function(){var e;Rn(this,Al,(e=Ht(this,Al,"f"),e--,e),"f"),Ht(this,ri,"m",XA).call(this),this.emit("next")},ZOe=function(){Ht(this,ri,"m",GI).call(this),Ht(this,ri,"m",HI).call(this),Rn(this,Dx,void 0,"f")},JOe=function(){const e=Date.now();if(Ht(this,Gc,"f")===void 0){const t=Ht(this,ZA,"f")-e;if(t<0)Rn(this,Zh,Ht(this,Nx,"f")?Ht(this,Al,"f"):0,"f");else return Ht(this,Dx,"f")===void 0&&Rn(this,Dx,setTimeout(()=>{Ht(this,ri,"m",ZOe).call(this)},t),"f"),!0}return!1},XA=function(){if(Ht(this,Pl,"f").size===0)return Ht(this,Gc,"f")&&clearInterval(Ht(this,Gc,"f")),Rn(this,Gc,void 0,"f"),this.emit("empty"),Ht(this,Al,"f")===0&&this.emit("idle"),!1;if(!Ht(this,Jh,"f")){const e=!Ht(this,ri,"a",JOe);if(Ht(this,ri,"a",QOe)&&Ht(this,ri,"a",UOe)){const t=Ht(this,Pl,"f").dequeue();return t?(this.emit("active"),t(),e&&Ht(this,ri,"m",HI).call(this),!0):!1}}return!1},HI=function(){Ht(this,Ix,"f")||Ht(this,Gc,"f")!==void 0||(Rn(this,Gc,setInterval(()=>{Ht(this,ri,"m",GI).call(this)},Ht(this,$x,"f")),"f"),Rn(this,ZA,Date.now()+Ht(this,$x,"f"),"f"))},GI=function(){Ht(this,Zh,"f")===0&&Ht(this,Al,"f")===0&&Ht(this,Gc,"f")&&(clearInterval(Ht(this,Gc,"f")),Rn(this,Gc,void 0,"f")),Rn(this,Zh,Ht(this,Nx,"f")?Ht(this,Al,"f"):0,"f"),Ht(this,ri,"m",e5).call(this)},e5=function(){for(;Ht(this,ri,"m",XA).call(this););},YOe=async function(e){return new Promise((t,a)=>{e.addEventListener("abort",()=>{a(new XOe("The task was aborted."))},{once:!0})})},t5=async function(e,t){return new Promise(a=>{const r=()=>{t&&!t()||(this.off(e,r),a())};this.on(e,r)})};const rp=window.__TAURI__?.http.fetch??globalThis.fetch;class eze extends O1{constructor(){super()}resolveExternalRef(t,a){return qA(a)?a:t&&qA(t)?new URL(a,t).href:t?Am.resolve(Am.dirname(t),a):a}async loadExternalRef(t){if(qA(t)){const{body:a,mimeType:r}=await Jee(t,{...this.config.http,customFetch:rp});return new vv(t,a,r)}else{if(!await z_(t))throw new Error(`File not found at ${t}.`);try{throw await O_(t),new Error(`Expected a file but received a folder at ${t}.`)}catch(r){if(r instanceof Error&&r.message.includes("Expected a file but received a folder"))throw r}const a=await mP(t);return new vv(t,a.replace(/\r\n/g,`
|
|
12029
|
-
`))}}}async function FI(e,t){const a=new Pw({});a.getRulesForSpecVersion=()=>[];const r=await qr.dirname(e),n={config:a,base:r,externalRefResolver:new eze,dereference:!0};t?n.doc={source:{absoluteRef:e},parsed:t}:n.ref=e;const{bundle:{parsed:i}}=await aE(n);return i}class lza{constructor(t){this.apisStorage=t}data=new Map;loading=new Set;pQueue=new sza({concurrency:20});async get(t){return this.data.has(t)?this.data.get(t):(await this.loadAndParse(t),this.data.get(t))}async load(t){this.data.has(t)||await this.loadAndParse(t)}async loadAndParse(t){if(this.loading.has(t))return await this.pQueue.add(()=>this.get(t));this.loading.add(t),await this.pQueue.add(async()=>{const a=QA(t)?ys.WEB:ys.FS,r=a===ys.WEB?t:await this.apisStorage.getAbsolutePath(t);try{const n=await FI(r);if(!n){this.data.set(t,void 0);return}const i=this.apisStorage.parse({uri:t,type:a,content:n});this.data.set(t,i)}catch(n){console.error("Error loading api "+t,n),this.data.set(t,void 0);return}}),this.loading.delete(t)}get size(){return this.data.size}delete(t){this.data.delete(t)}getAll(){return Array.from(this.data.values()).filter(t=>t!==void 0)}clear(){this.data.clear(),this.loading.clear()}}class cza extends KOe{apiLoader;constructor(t,a,r){const n=new nve(t.systemFilesDir),i=new nve(t.userFilesDir);super(n,i,t,!0,a,r),this.apiLoader=new lza(this.apisStorage)}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ho.OK),a?.end();const{apiFiles:s,collectionFiles:l}=await this.detectProjectFiles(t);await this.loadAndParseApis(s,t);const c=await this.loadAndParseCollections(l,t);this.collectionsStorage.setItemIds(c.map(d=>d.id));const u=this.apiLoader.getAll();return this.apisStorage.setItemIds(u.map(d=>d.id)),this.apiLoader.clear(),t?.setAttribute("status","completed"),t?.setStatus(ho.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:u,collections:c}}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),{api_files:r,collection_files:n}=await Bh("fs_scan",{dir:this.project.userFilesDir});return a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length+n.length),a?.setAttribute("apiFilesCount",r.length),a?.setAttribute("collectionFilesCount",n.length),a?.setStatus(ho.OK),a?.end(),{apiFiles:r,collectionFiles:n}}async loadAndParseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx);await Zfe(t,20,async n=>{try{await this.apiLoader.load(n.relative_path)}catch(i){return console.error(`Error parsing YAML/JSON file ${n.absolute_path}:`,i),null}}),r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",this.apiLoader.size),r?.setStatus(ho.OK),r?.end()}async loadAndParseCollections(t,a){const r=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},a?.parentCtx),n=await Zfe(t,20,async i=>{try{const o=await this.userFilesStorage.get(i.relative_path);if(!o)return null;const s=Md.load(o??"");if(typeof s!="object"||s===null||typeof s.arazzo!="string")return null;const l=[];return await Promise.all(s.sourceDescriptions?.map(async c=>{const u=c.type,d=c.url,h=!u||u==="openapi",m=await gOe({projectPath:this.project.userFilesDir,apiUrl:d,collectionId:i.relative_path});if(h){const v=await this.apiLoader.get(m);v&&l.push(v)}})),await this.collectionsStorage.parse({uri:i.relative_path,type:ys.FS,content:s},l)}catch(o){return console.error(`Error parsing Arazzo file ${i.relative_path}:`,o),null}});return r?.setAttribute("status","completed"),r?.setAttribute("parsedCollectionsCount",n.length),r?.setStatus(ho.OK),r?.end(),n.filter(i=>i!==null)}}class tze{constructor(t){this.baseDir=t}async ls(t=""){const a=this.makeKey(t);return Object.keys(localStorage).filter(r=>r.startsWith(a)).map(r=>r.replace(a,""))}async get(t){const a=this.makeKey(t);return localStorage.getItem(a)??null}async set(t,a){const r=this.makeKey(t);localStorage.setItem(r,a)}async remove(t){const a=this.makeKey(t);localStorage.removeItem(a)}makeKey(t){return`replay:fs:${this.baseDir}/${t}`}}class uza extends KOe{constructor(t,a,r){const n=new tze(t.systemFilesDir),i=new tze(t.userFilesDir);super(n,i,t,!1,a,r)}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),r=(await this.userFilesStorage.ls()).filter(s=>/\.(ya?ml|json)$/.test(s)),n=[],i=[],o=new Set;return await Promise.all(r.map(async s=>{const l=await this.userFilesStorage.get(s);if(l)try{const c=Md.load(l);if(typeof c=="object"&&c!==null)if(typeof c.openapi=="string"){const u=await qr.resolve(await qr.join(this.userFilesStorage.baseDir,s)),d=await FI(u,c);n.push({uri:s,type:ys.FS,content:d})}else typeof c.arazzo=="string"&&(i.push({uri:s,type:ys.FS,content:c}),c.sourceDescriptions?.forEach(u=>{const d=u.type,h=u.url,m=!d||d==="openapi",v=typeof h=="string"&&QA(h);m&&v&&o.add(h)}))}catch(c){console.error(`Error parsing YAML/JSON file ${s}:`,c)}})),a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length),a?.setAttribute("apiFilesCount",n.length),a?.setAttribute("collectionFilesCount",i.length),a?.setAttribute("apiUrlsCount",o.size),a?.setStatus(ho.OK),a?.end(),{apiFiles:n,collectionFiles:i,apiUrls:o}}async loadApis(t,a){const r=this.telemetry?.startSpan("storage.loadApis",{apiUrlsCount:t.size},a?.parentCtx),n=[];return await Promise.all(Array.from(t).map(async i=>{try{const o=await FI(i);n.push({uri:i,type:ys.WEB,content:o})}catch(o){console.error(`Error parsing YAML from ${i}:`,o)}})),r?.setAttribute("status","completed"),r?.setStatus(ho.OK),r?.end(),n}async parseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx),n=await this.apisStorage.parseMany(t);return r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",n.length),r?.setStatus(ho.OK),r?.end(),n}async parseCollections(t,a,r){const n=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},r?.parentCtx),i=await this.collectionsStorage.parseMany(t,a);return n?.setAttribute("status","completed"),n?.setAttribute("parsedCollectionsCount",i.length),n?.setStatus(ho.OK),n?.end(),i}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ho.OK),a?.end();const{apiFiles:s,collectionFiles:l,apiUrls:c}=await this.detectProjectFiles(t),u=await this.loadApis(c,t),d=await this.parseApis([...s,...u],t);this.apisStorage.setItemIds(d.map(m=>m.id));const h=await this.parseCollections(l,d,t);return this.collectionsStorage.setItemIds(h.map(m=>m.id)),t?.setAttribute("status","completed"),t?.setStatus(ho.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:d,collections:h}}}function dza(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i,o)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=Gd()?new cza(n,i,o):new uza(n,i,o);const s=await t.read();r.merge(s)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function pza({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Hd(Ufe),activeEnvironmentId:$0,environments:e||Qfe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Lu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const hza=Bit(pza(),Eit(cha({key:"replay-root-store"}),dza())),aze=A.createContext(hza);function Aa(){const e=A.useContext(aze);return kne(e)}function mza(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1}}const gza=mza(),fza=A.createContext(gza);function Fc(){const e=A.useContext(fza);return kne(e)}function vza(e,t){const{apps:{apiId:a}}=Aa(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Fc();r.set(e?.corsProxyUrl??iha),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),A.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const rze=A.createContext({});function Lg(){return A.useContext(rze)||{}}const bza="0.21.0-next.2",kza={version:bza};class nze{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(t=>{this._initResolve=t});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new nha}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(t){this._client.updateCloudEventData(t)}enrichGlobalAttributes(t){this._globalAttributes={...this._globalAttributes,...t}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(t){if(this.isInitialized)return;const a=!0,r=t?.tracerName||"desktop",n=t?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:kza.version,version:"1.0.0",tracerName:r,collectorUrl:"",isProd:a,enableErrorInstrumentation:n};this._client.init({otel:{...i,...t}}),this._initResolve?.(this),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r={...this._globalAttributes,...a};try{this.client.send(t,r)}catch(n){console.error("Failed to send telemetry event:",n)}}startSpan(t,a,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{return this._client.startSpan(t,{...this._globalAttributes,...a},r)}catch(n){console.error("Failed to start telemetry span:",n);return}}}const a5=new nze;function da(){const{telemetry:e}=Lg();return a5.isInitialized||a5.init(e),{sendEvent:(t,a)=>{a5.sendEvent(t,a)},startSpan:(t,a,r)=>a5.startSpan(t,a,r)}}const Uo=800,Xs=$(Ye).attrs({variant:"text",size:"small",tone:"danger"})`
|
|
12029
|
+
`))}}}async function FI(e,t){const a=new Pw({});a.getRulesForSpecVersion=()=>[];const r=await qr.dirname(e),n={config:a,base:r,externalRefResolver:new eze,dereference:!0};t?n.doc={source:{absoluteRef:e},parsed:t}:n.ref=e;const{bundle:{parsed:i}}=await aE(n);return i}class lza{constructor(t){this.apisStorage=t}data=new Map;loading=new Set;pQueue=new sza({concurrency:20});async get(t){return this.data.has(t)?this.data.get(t):(await this.loadAndParse(t),this.data.get(t))}async load(t){this.data.has(t)||await this.loadAndParse(t)}async loadAndParse(t){if(this.loading.has(t))return await this.pQueue.add(()=>this.get(t));this.loading.add(t),await this.pQueue.add(async()=>{const a=QA(t)?ys.WEB:ys.FS,r=a===ys.WEB?t:await this.apisStorage.getAbsolutePath(t);try{const n=await FI(r);if(!n){this.data.set(t,void 0);return}const i=this.apisStorage.parse({uri:t,type:a,content:n});this.data.set(t,i)}catch(n){console.error("Error loading api "+t,n),this.data.set(t,void 0);return}}),this.loading.delete(t)}get size(){return this.data.size}delete(t){this.data.delete(t)}getAll(){return Array.from(this.data.values()).filter(t=>t!==void 0)}clear(){this.data.clear(),this.loading.clear()}}class cza extends KOe{apiLoader;constructor(t,a,r){const n=new nve(t.systemFilesDir),i=new nve(t.userFilesDir);super(n,i,t,!0,a,r),this.apiLoader=new lza(this.apisStorage)}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ho.OK),a?.end();const{apiFiles:s,collectionFiles:l}=await this.detectProjectFiles(t);await this.loadAndParseApis(s,t);const c=await this.loadAndParseCollections(l,t);this.collectionsStorage.setItemIds(c.map(d=>d.id));const u=this.apiLoader.getAll();return this.apisStorage.setItemIds(u.map(d=>d.id)),this.apiLoader.clear(),t?.setAttribute("status","completed"),t?.setStatus(ho.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:u,collections:c}}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),{api_files:r,collection_files:n}=await Bh("fs_scan",{dir:this.project.userFilesDir});return a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length+n.length),a?.setAttribute("apiFilesCount",r.length),a?.setAttribute("collectionFilesCount",n.length),a?.setStatus(ho.OK),a?.end(),{apiFiles:r,collectionFiles:n}}async loadAndParseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx);await Zfe(t,20,async n=>{try{await this.apiLoader.load(n.relative_path)}catch(i){return console.error(`Error parsing YAML/JSON file ${n.absolute_path}:`,i),null}}),r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",this.apiLoader.size),r?.setStatus(ho.OK),r?.end()}async loadAndParseCollections(t,a){const r=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},a?.parentCtx),n=await Zfe(t,20,async i=>{try{const o=await this.userFilesStorage.get(i.relative_path);if(!o)return null;const s=Md.load(o??"");if(typeof s!="object"||s===null||typeof s.arazzo!="string")return null;const l=[];return await Promise.all(s.sourceDescriptions?.map(async c=>{const u=c.type,d=c.url,h=!u||u==="openapi",m=await gOe({projectPath:this.project.userFilesDir,apiUrl:d,collectionId:i.relative_path});if(h){const v=await this.apiLoader.get(m);v&&l.push(v)}})),await this.collectionsStorage.parse({uri:i.relative_path,type:ys.FS,content:s},l)}catch(o){return console.error(`Error parsing Arazzo file ${i.relative_path}:`,o),null}});return r?.setAttribute("status","completed"),r?.setAttribute("parsedCollectionsCount",n.length),r?.setStatus(ho.OK),r?.end(),n.filter(i=>i!==null)}}class tze{constructor(t){this.baseDir=t}async ls(t=""){const a=this.makeKey(t);return Object.keys(localStorage).filter(r=>r.startsWith(a)).map(r=>r.replace(a,""))}async get(t){const a=this.makeKey(t);return localStorage.getItem(a)??null}async set(t,a){const r=this.makeKey(t);localStorage.setItem(r,a)}async remove(t){const a=this.makeKey(t);localStorage.removeItem(a)}makeKey(t){return`replay:fs:${this.baseDir}/${t}`}}class uza extends KOe{constructor(t,a,r){const n=new tze(t.systemFilesDir),i=new tze(t.userFilesDir);super(n,i,t,!1,a,r)}async detectProjectFiles(t){const a=this.telemetry?.startSpan("storage.detectFiles",{},t?.parentCtx),r=(await this.userFilesStorage.ls()).filter(s=>/\.(ya?ml|json)$/.test(s)),n=[],i=[],o=new Set;return await Promise.all(r.map(async s=>{const l=await this.userFilesStorage.get(s);if(l)try{const c=Md.load(l);if(typeof c=="object"&&c!==null)if(typeof c.openapi=="string"){const u=await qr.resolve(await qr.join(this.userFilesStorage.baseDir,s)),d=await FI(u,c);n.push({uri:s,type:ys.FS,content:d})}else typeof c.arazzo=="string"&&(i.push({uri:s,type:ys.FS,content:c}),c.sourceDescriptions?.forEach(u=>{const d=u.type,h=u.url,m=!d||d==="openapi",v=typeof h=="string"&&QA(h);m&&v&&o.add(h)}))}catch(c){console.error(`Error parsing YAML/JSON file ${s}:`,c)}})),a?.setAttribute("status","completed"),a?.setAttribute("filesCount",r.length),a?.setAttribute("apiFilesCount",n.length),a?.setAttribute("collectionFilesCount",i.length),a?.setAttribute("apiUrlsCount",o.size),a?.setStatus(ho.OK),a?.end(),{apiFiles:n,collectionFiles:i,apiUrls:o}}async loadApis(t,a){const r=this.telemetry?.startSpan("storage.loadApis",{apiUrlsCount:t.size},a?.parentCtx),n=[];return await Promise.all(Array.from(t).map(async i=>{try{const o=await FI(i);n.push({uri:i,type:ys.WEB,content:o})}catch(o){console.error(`Error parsing YAML from ${i}:`,o)}})),r?.setAttribute("status","completed"),r?.setStatus(ho.OK),r?.end(),n}async parseApis(t,a){const r=this.telemetry?.startSpan("storage.parseApis",{apisCount:t.length},a?.parentCtx),n=await this.apisStorage.parseMany(t);return r?.setAttribute("status","completed"),r?.setAttribute("parsedApisCount",n.length),r?.setStatus(ho.OK),r?.end(),n}async parseCollections(t,a,r){const n=this.telemetry?.startSpan("storage.parseCollections",{collectionsCount:t.length},r?.parentCtx),i=await this.collectionsStorage.parseMany(t,a);return n?.setAttribute("status","completed"),n?.setAttribute("parsedCollectionsCount",i.length),n?.setStatus(ho.OK),n?.end(),i}async read(){const t=this.telemetry?.startSpan("storage.read",void 0,void 0),a=this.telemetry?.startSpan("storage.loadUserState",{},t?.parentCtx),[r,n,i,o]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]);a?.setAttribute("status","completed"),a?.setAttribute("historyCount",r.length),a?.setAttribute("environmentCount",o.length),a?.setStatus(ho.OK),a?.end();const{apiFiles:s,collectionFiles:l,apiUrls:c}=await this.detectProjectFiles(t),u=await this.loadApis(c,t),d=await this.parseApis([...s,...u],t);this.apisStorage.setItemIds(d.map(m=>m.id));const h=await this.parseCollections(l,d,t);return this.collectionsStorage.setItemIds(h.map(m=>m.id)),t?.setAttribute("status","completed"),t?.setStatus(ho.OK),t?.end(),{project:this.project,history:r,activeEnvironmentId:n,tabsState:i,environments:o,apis:d,collections:h}}}function dza(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i,o)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=Gd()?new cza(n,i,o):new uza(n,i,o);const s=await t.read();r.merge(s)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function pza({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Hd(Ufe),activeEnvironmentId:$0,environments:e||Qfe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Lu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const hza=Bit(pza(),Eit(cha({key:"replay-root-store"}),dza())),aze=A.createContext(hza);function Aa(){const e=A.useContext(aze);return kne(e)}function mza(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1}}const gza=mza(),fza=A.createContext(gza);function Fc(){const e=A.useContext(fza);return kne(e)}function vza(e,t){const{apps:{apiId:a}}=Aa(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Fc();r.set(e?.corsProxyUrl??iha),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),A.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const rze=A.createContext({});function Lg(){return A.useContext(rze)||{}}const bza="0.21.0-next.3",kza={version:bza};class nze{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(t=>{this._initResolve=t});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new nha}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(t){this._client.updateCloudEventData(t)}enrichGlobalAttributes(t){this._globalAttributes={...this._globalAttributes,...t}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(t){if(this.isInitialized)return;const a=!0,r=t?.tracerName||"desktop",n=t?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:kza.version,version:"1.0.0",tracerName:r,collectorUrl:"",isProd:a,enableErrorInstrumentation:n};this._client.init({otel:{...i,...t}}),this._initResolve?.(this),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r={...this._globalAttributes,...a};try{this.client.send(t,r)}catch(n){console.error("Failed to send telemetry event:",n)}}startSpan(t,a,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{return this._client.startSpan(t,{...this._globalAttributes,...a},r)}catch(n){console.error("Failed to start telemetry span:",n);return}}}const a5=new nze;function da(){const{telemetry:e}=Lg();return a5.isInitialized||a5.init(e),{sendEvent:(t,a)=>{a5.sendEvent(t,a)},startSpan:(t,a,r)=>a5.startSpan(t,a,r)}}const Uo=800,Xs=$(Ye).attrs({variant:"text",size:"small",tone:"danger"})`
|
|
12030
12030
|
border: none;
|
|
12031
12031
|
margin: 0;
|
|
12032
12032
|
|