@redocly/openapi-docs 3.15.0-next.10 → 3.15.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2025 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: 3.15.0-next.
|
|
5
|
+
* Version: 3.15.0-next.11
|
|
6
6
|
**/function AF(e,a){for(var t=0;t<a.length;t++){const r=a[t];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PF(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var t=function r(){var n=!1;try{n=this instanceof r}catch{}return n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};t.prototype=a.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var MF={exports:{}},Yy={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -2662,6 +2662,11 @@ Error generating stack: `+j.message+`
|
|
|
2662
2662
|
--search-ai-conversation-input-send-button-border-radius: var(--border-radius);
|
|
2663
2663
|
--search-ai-conversation-input-send-button-border-disabled: 1px solid var(--button-border-color-disabled);
|
|
2664
2664
|
|
|
2665
|
+
--search-ai-conversation-input-min-height: 48px;
|
|
2666
|
+
--search-ai-conversation-input-max-height: 120px;
|
|
2667
|
+
--search-ai-conversation-input-padding-right: calc(var(--search-ai-conversation-input-send-button-right) + 30px);
|
|
2668
|
+
--search-ai-conversation-input-send-button-bottom: calc(var(--search-ai-conversation-input-min-height) / 2);
|
|
2669
|
+
|
|
2665
2670
|
// @tokens End
|
|
2666
2671
|
`,v4e=Je`
|
|
2667
2672
|
/**
|
|
@@ -10187,7 +10192,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:_t.PHP});p.len
|
|
|
10187
10192
|
*
|
|
10188
10193
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10189
10194
|
* @license MIT
|
|
10190
|
-
*/var vte;function i1(){return vte||(vte=1,(function(e){const a=haa(),t=maa(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=b,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 E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.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(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return k(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return k(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function k(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function b(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).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(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let oa=0;oa<ra;++oa)if(pa[oa]!==va[oa]){Te=pa[oa],De=va[oa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(oa,ka){return Te===1?oa[ka]:oa.readUInt16BE(ka*Te)}let va;if(Me){let oa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,oa===-1?0:va-oa)){if(oa===-1&&(oa=va),va-oa+1===ra)return oa*Te}else oa!==-1&&(va-=va-oa),oa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let oa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){oa=!1;break}if(oa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function _(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return _(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,oa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],oa=E[Me+3],(pa&192)===128&&(va&192)===128&&(oa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|oa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const X=4096;function te(E){const ae=E.length;if(ae<=X)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=X));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=Le(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Le(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=Le(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Le(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function L(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||L(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||L(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=Y(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=Y(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function Y(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function Le(E){return typeof BigInt>"u"?Xe:E}function Xe(){throw new Error("BigInt not supported")}})(mte)),mte}const bte=PF(uee);var iE,yte;function faa(){if(yte)return iE;yte=1;function e(g,k){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);k&&(v=v.filter(function(b){return Object.getOwnPropertyDescriptor(g,b).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var k=1;k<arguments.length;k++){var y=arguments[k]!=null?arguments[k]:{};k%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,k,y){return k=o(k),k in g?Object.defineProperty(g,k,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[k]=y,g}function r(g,k){if(!(g instanceof k))throw new TypeError("Cannot call a class as a function")}function n(g,k){for(var y=0;y<k.length;y++){var v=k[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,k,y){return k&&n(g.prototype,k),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var k=s(g,"string");return typeof k=="symbol"?k:String(k)}function s(g,k){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,k);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=i1(),c=l.Buffer,u=bte,d=u.inspect,p=d&&d.custom||"inspect";function m(g,k,y){c.prototype.copy.call(g,k,y)}return iE=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(k){var y={data:k,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(k){var y={data:k,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var k=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,k}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(k){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=k+y.data;return v}},{key:"concat",value:function(k){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(k>>>0),v=this.head,b=0;v;)m(v.data,y,b),b+=v.data.length,v=v.next;return y}},{key:"consume",value:function(k,y){var v;return k<this.head.data.length?(v=this.head.data.slice(0,k),this.head.data=this.head.data.slice(k)):k===this.head.data.length?v=this.shift():v=y?this._getString(k):this._getBuffer(k),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(k){var y=this.head,v=1,b=y.data;for(k-=b.length;y=y.next;){var z=y.data,C=k>z.length?z.length:k;if(C===z.length?b+=z:b+=z.slice(0,k),k-=C,k===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,b}},{key:"_getBuffer",value:function(k){var y=c.allocUnsafe(k),v=this.head,b=1;for(v.data.copy(y),k-=v.data.length;v=v.next;){var z=v.data,C=k>z.length?z.length:k;if(z.copy(y,y.length-k,0,C),k-=C,k===0){C===z.length?(++b,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++b}return this.length-=b,y}},{key:p,value:function(k,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),iE}var oE,kte;function xte(){if(kte)return oE;kte=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return oE={destroy:e,undestroy:r,errorOrDestroy:i},oE}var sE={},wte;function Jg(){if(wte)return sE;wte=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,k,y){return p.call(this,u(g,k,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),sE.codes=a,sE}var lE,zte;function Ste(){if(zte)return lE;zte=1;var e=Jg().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return lE={getHighWaterMark:t},lE}var cE,Cte;function gaa(){if(Cte)return cE;Cte=1,cE=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return cE}var uE,jte;function Ote(){if(jte)return uE;jte=1,uE=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){L(ee,F)}}var a;A.WritableState=S;var t={deprecate:gaa()},r=hte(),n=i1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=xte(),c=Ste(),u=c.getHighWaterMark,d=Jg().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,k=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,b=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||Ug(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){te(ee,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||Ug();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}A.prototype.pipe=function(){C(this,new k)};function B(F,ee){var ie=new b;C(F,ie),process.nextTick(ee,ie)}function _(F,ee,ie,be){var Y;return ie===null?Y=new v:typeof ie!="string"&&!ee.objectMode&&(Y=new p("chunk",["string","Buffer"],ie)),Y?(C(F,Y),process.nextTick(be,Y),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,Y=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||_(this,be,F,ie))&&(be.pendingcb++,Y=N(this,be,M,F,ee,ie)),Y},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,Y,M){if(!ie){var $=q(ee,be,Y);be!==$&&(ie=!0,Y="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:Y,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,Y,M);return G}function U(F,ee,ie,be,Y,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(Y,ee.onwrite):F._write(Y,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,Y){--ee.pendingcb,ie?(process.nextTick(Y,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(Y(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function X(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,Y=ie.writecb;if(typeof Y!="function")throw new g;if(X(ie),ee)D(F,ie,be,ee,Y);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,Y):ue(F,ie,M,Y)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,Y=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)Y[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;Y.allBuffers=oe,U(F,ee,!0,ee.length,Y,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function L(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var Y=be.callback;ee.pendingcb--,Y(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},uE}var dE,Ate;function Ug(){if(Ate)return dE;Ate=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};dE=o;for(var a=Nte(),t=Ote(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),dE}var pE={},hE={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Pte;function vaa(){return Pte||(Pte=1,(function(e,a){var t=i1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(hE,hE.exports)),hE.exports}var Mte;function Tte(){if(Mte)return pE;Mte=1;var e=vaa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var b;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(b)return;v=(""+v).toLowerCase(),b=!0}}function r(v){var b=t(v);if(typeof b!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return b||v}pE.StringDecoder=n;function n(v){this.encoding=r(v);var b;switch(this.encoding){case"utf16le":this.text=d,this.end=p,b=4;break;case"utf8":this.fillLast=l,b=4;break;case"base64":this.text=m,this.end=g,b=3;break;default:this.write=k,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(b)}n.prototype.write=function(v){if(v.length===0)return"";var b,z;if(this.lastNeed){if(b=this.fillLast(v),b===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?b?b+this.text(v,z):this.text(v,z):b||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,b,z){var C=b.length-1;if(C<z)return 0;var w=i(b[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(b[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(b[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,b,z){if((b[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var b=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,b,0,v.length),this.lastNeed-=v.length}function c(v,b){var z=o(this,v,b);if(!this.lastNeed)return v.toString("utf8",b);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",b,C)}function u(v){var b=v&&v.length?this.write(v):"";return this.lastNeed?b+"\uFFFD":b}function d(v,b){if((v.length-b)%2===0){var z=v.toString("utf16le",b);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",b,v.length-1)}function p(v){var b=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,z)}return b}function m(v,b){var z=(v.length-b)%3;return z===0?v.toString("base64",b):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",b,v.length-z))}function g(v){var b=v&&v.length?this.write(v):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function k(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return pE}var mE,Bte;function fE(){if(Bte)return mE;Bte=1;var e=Jg().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},k=function(b){s.call(i,b)},y=function(){var b;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(b=new e),s.call(i,b);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(b=new e),s.call(i,b)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",k),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",k),i.removeListener("close",y)}}return mE=n,mE}var gE,Ete;function baa(){if(Ete)return gE;Ete=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=fE(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function k(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(k(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),b=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return gE=b,gE}var Lte,_te;function yaa(){return _te||(_te=1,Lte=function(){throw new Error("Readable.from is not available in the browser")}),Lte}var vE,Rte;function Nte(){if(Rte)return vE;Rte=1,vE=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=hte(),r=i1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=bte,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=faa(),u=xte(),d=Ste(),p=d.getHighWaterMark,m=Jg().codes,g=m.ERR_INVALID_ARG_TYPE,k=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||Ug(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),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=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(b||(b=Tte().StringDecoder),this.decoder=new b(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||Ug(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),_(this,M,$,!1,G)},B.prototype.unshift=function(M){return _(this,M,null,!0,!1)};function _(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new k);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){b||(b=Tte().StringDecoder);var $=new b(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function X(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=X(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=X(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Xe;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",Le),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Xe),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&Y(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Xe(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",Le),Xe()}M.once("close",Oe);function Le(){l("onfinish"),M.removeListener("close",Oe),Xe()}M.once("finish",Le);function Xe(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=Y($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(L,M,$))}function L(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=baa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=yaa()),C(B,M,$)});function Y(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return vE}var bE,Dte;function $te(){if(Dte)return bE;Dte=1,bE=s;var e=Jg().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Ug();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.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,p){c(u,d,p)}):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,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.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(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return bE}var yE,Ite;function kaa(){if(Ite)return yE;Ite=1,yE=a;var e=$te();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},yE}var kE,Kte;function xaa(){if(Kte)return kE;Kte=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=Jg().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,k){k=a(k);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=fE()),e(p,{readable:m,writable:g},function(b){if(b)return k(b);y=!0,k()});var v=!1;return function(b){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();k(b||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var k=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(b,z){var C=z<m.length-1,w=z>0;return s(b,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),k(y))})});return m.reduce(c)}return kE=d,kE}var Vte;function Hte(){return Vte||(Vte=1,(function(e,a){a=e.exports=Nte(),a.Stream=a,a.Readable=a,a.Writable=Ote(),a.Duplex=Ug(),a.Transform=$te(),a.PassThrough=kaa(),a.finished=fE(),a.pipeline=xaa()})(rE,rE.exports)),rE.exports}var Fte;function Gte(){if(Fte)return y2;Fte=1;var e=cte(),a=J8(),t=Hte(),r=y2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=y2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let k=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)),k()}}).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,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,b){c._destroyed?b():c.push(Buffer.from(y))?v():c._resumeFetch=v})},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();k()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(k){var y=k.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=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 g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},y2}var qte;function waa(){if(qte)return tE.exports;qte=1;var e=cte(),a=J8(),t=Gte(),r=Hte(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=tE.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(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._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 p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(b){var z=p[b].name,C=p[b].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var k=null;if(e.abortController){var y=new AbortController;k=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:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:k}).then(function(b){u._fetchResponse=b,u._resetTimers(!1),u._connect()},function(b){u._resetTimers(!0),u._destroyed||u.emit("error",b)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(b){process.nextTick(function(){u.emit("error",b)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(b){v.setRequestHeader(b[0],b[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(b){process.nextTick(function(){u.emit("error",b)});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,p){var m=this;m._body.push(u),p()},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,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._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 tE.exports}var xE,Jte;function zaa(){if(Jte)return xE;Jte=1,xE=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return xE}var Ute,Wte;function Saa(){return Wte||(Wte=1,Ute={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"}),Ute}var Zte;function Caa(){return Zte||(Zte=1,(function(e){var a=waa(),t=Gte(),r=zaa(),n=Saa(),i=VB(),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,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(ote)),ote}var Qte,Yte;function jaa(){return Yte||(Yte=1,Qte={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Caa().STATUS_CODES)}),Qte}const Oaa="7.0.8",Aaa={version:Oaa};var wE,Xte;function Paa(){if(Xte)return wE;Xte=1;const e=qg,a=VB(),t=saa(),r=qg,n=qg,i=v2(),o=i.jptr,s=JB().isRef,l=b2().clone,c=b2().circularClone,u=ZB().recurse,d=uaa(),p=daa(),m=rte(),g=jaa().statusCodes,k=Aaa.version,y="3.0.0";let v;class b extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new b(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function _(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function X(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){X(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let Le=M.$ref,Xe=o(pe,M.$ref);!Xe&&Le.startsWith("#/")?C("Could not resolve reference "+Le,M,Q):Xe&&(M=Xe)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,Le){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let Le of m.parameterTypeProperties)typeof M[Le]<"u"&&(Oe[Le]=M[Le]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,re.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(re.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,re),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(X(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let Le of(de.parameters||[]).concat(Q.parameters||[]))Le.$ref&&(Le=i.jptr(ce,Le.$ref)),Le.name===xe&&!Le.example&&(Le.examples||(Le.examples={}),Le.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let Le=ge.responses[xe].headers[Oe];for(let Xe in de.responses[xe].headers)if(Xe===Oe){let E=de.responses[xe].headers[Xe];E.example=Le}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let Le=de.responses[xe].content[Oe];Le.examples||(Le.examples={}),Le.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let Le={};Le.name=ge,Le.body=de.requestBody,Le.refs=[],G[xe]=Le}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),_(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new b("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new b("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new b("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new b("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new b("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new b("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new b("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new b("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new b("(Patchable) paths object is mandatory"))}function L(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),L(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new b("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=k,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.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=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new b(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new b(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function Y(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return wE={S2OError:b,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:Y},wE}var Maa=Paa();const Taa=Vr(Maa);function Baa(e){return e.paths||(e.paths={}),new Promise((a,t)=>Taa.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function Eaa(){try{return(await $ae())?.resolvedConfig.openapi||{}}catch{return{}}}async function Laa(e){const a=await $ae(),t={config:a,base:qc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};qc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=_aa(e):t.ref=e;const{bundle:{parsed:r}}=await Yea(t);return r.swagger!==void 0?Baa(r):r}function _aa(e){return{source:{absoluteRef:""},parsed:e}}async function Raa(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await Laa(e||a);try{hFe(r)}catch{}return r}const Naa=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const k=await Eaa();p({...e,...k}),u(await Raa(t,a,e))}catch(k){o(k.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},mFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:h.jsx(gZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function Daa({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(Naa,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(lee,{withCommonStyles:!0,router:o||"hash"})})}function $aa(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function Iaa(e){const a=$aa(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function Kaa(e,a=document.querySelector("redoc")){GF.hydrateRoot(a,h.jsx(lee,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function ere(e,a={},t=x4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...Iaa(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),GF.createRoot(t).render(R.createElement(Daa,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const Vaa="3.15.0-next.10",Haa="6b68f2bd";function Faa(){const e=x4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&ere(a,{},e)}Faa();function o1(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 are={exports:{}};/*!
|
|
10195
|
+
*/var vte;function i1(){return vte||(vte=1,(function(e){const a=haa(),t=maa(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=b,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 E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.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(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return k(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return k(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function k(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function b(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).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(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let oa=0;oa<ra;++oa)if(pa[oa]!==va[oa]){Te=pa[oa],De=va[oa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(oa,ka){return Te===1?oa[ka]:oa.readUInt16BE(ka*Te)}let va;if(Me){let oa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,oa===-1?0:va-oa)){if(oa===-1&&(oa=va),va-oa+1===ra)return oa*Te}else oa!==-1&&(va-=va-oa),oa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let oa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){oa=!1;break}if(oa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function _(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return _(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,oa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],oa=E[Me+3],(pa&192)===128&&(va&192)===128&&(oa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|oa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const X=4096;function te(E){const ae=E.length;if(ae<=X)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=X));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=Le(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=Le(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Le(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=Le(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Le(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function L(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||L(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||L(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=Y(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=Y(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function Y(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function Le(E){return typeof BigInt>"u"?Xe:E}function Xe(){throw new Error("BigInt not supported")}})(mte)),mte}const bte=PF(uee);var iE,yte;function faa(){if(yte)return iE;yte=1;function e(g,k){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);k&&(v=v.filter(function(b){return Object.getOwnPropertyDescriptor(g,b).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var k=1;k<arguments.length;k++){var y=arguments[k]!=null?arguments[k]:{};k%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,k,y){return k=o(k),k in g?Object.defineProperty(g,k,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[k]=y,g}function r(g,k){if(!(g instanceof k))throw new TypeError("Cannot call a class as a function")}function n(g,k){for(var y=0;y<k.length;y++){var v=k[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,k,y){return k&&n(g.prototype,k),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var k=s(g,"string");return typeof k=="symbol"?k:String(k)}function s(g,k){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,k);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=i1(),c=l.Buffer,u=bte,d=u.inspect,p=d&&d.custom||"inspect";function m(g,k,y){c.prototype.copy.call(g,k,y)}return iE=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(k){var y={data:k,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(k){var y={data:k,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var k=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,k}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(k){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=k+y.data;return v}},{key:"concat",value:function(k){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(k>>>0),v=this.head,b=0;v;)m(v.data,y,b),b+=v.data.length,v=v.next;return y}},{key:"consume",value:function(k,y){var v;return k<this.head.data.length?(v=this.head.data.slice(0,k),this.head.data=this.head.data.slice(k)):k===this.head.data.length?v=this.shift():v=y?this._getString(k):this._getBuffer(k),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(k){var y=this.head,v=1,b=y.data;for(k-=b.length;y=y.next;){var z=y.data,C=k>z.length?z.length:k;if(C===z.length?b+=z:b+=z.slice(0,k),k-=C,k===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,b}},{key:"_getBuffer",value:function(k){var y=c.allocUnsafe(k),v=this.head,b=1;for(v.data.copy(y),k-=v.data.length;v=v.next;){var z=v.data,C=k>z.length?z.length:k;if(z.copy(y,y.length-k,0,C),k-=C,k===0){C===z.length?(++b,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++b}return this.length-=b,y}},{key:p,value:function(k,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),iE}var oE,kte;function xte(){if(kte)return oE;kte=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return oE={destroy:e,undestroy:r,errorOrDestroy:i},oE}var sE={},wte;function Jg(){if(wte)return sE;wte=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,k,y){return p.call(this,u(g,k,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),sE.codes=a,sE}var lE,zte;function Ste(){if(zte)return lE;zte=1;var e=Jg().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return lE={getHighWaterMark:t},lE}var cE,Cte;function gaa(){if(Cte)return cE;Cte=1,cE=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return cE}var uE,jte;function Ote(){if(jte)return uE;jte=1,uE=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){L(ee,F)}}var a;A.WritableState=S;var t={deprecate:gaa()},r=hte(),n=i1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=xte(),c=Ste(),u=c.getHighWaterMark,d=Jg().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,k=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,b=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||Ug(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){te(ee,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||Ug();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}A.prototype.pipe=function(){C(this,new k)};function B(F,ee){var ie=new b;C(F,ie),process.nextTick(ee,ie)}function _(F,ee,ie,be){var Y;return ie===null?Y=new v:typeof ie!="string"&&!ee.objectMode&&(Y=new p("chunk",["string","Buffer"],ie)),Y?(C(F,Y),process.nextTick(be,Y),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,Y=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||_(this,be,F,ie))&&(be.pendingcb++,Y=N(this,be,M,F,ee,ie)),Y},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,Y,M){if(!ie){var $=q(ee,be,Y);be!==$&&(ie=!0,Y="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:Y,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,Y,M);return G}function U(F,ee,ie,be,Y,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(Y,ee.onwrite):F._write(Y,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,Y){--ee.pendingcb,ie?(process.nextTick(Y,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(Y(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function X(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,Y=ie.writecb;if(typeof Y!="function")throw new g;if(X(ie),ee)D(F,ie,be,ee,Y);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,Y):ue(F,ie,M,Y)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,Y=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)Y[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;Y.allBuffers=oe,U(F,ee,!0,ee.length,Y,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function L(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var Y=be.callback;ee.pendingcb--,Y(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},uE}var dE,Ate;function Ug(){if(Ate)return dE;Ate=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};dE=o;for(var a=Nte(),t=Ote(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),dE}var pE={},hE={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Pte;function vaa(){return Pte||(Pte=1,(function(e,a){var t=i1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(hE,hE.exports)),hE.exports}var Mte;function Tte(){if(Mte)return pE;Mte=1;var e=vaa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var b;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(b)return;v=(""+v).toLowerCase(),b=!0}}function r(v){var b=t(v);if(typeof b!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return b||v}pE.StringDecoder=n;function n(v){this.encoding=r(v);var b;switch(this.encoding){case"utf16le":this.text=d,this.end=p,b=4;break;case"utf8":this.fillLast=l,b=4;break;case"base64":this.text=m,this.end=g,b=3;break;default:this.write=k,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(b)}n.prototype.write=function(v){if(v.length===0)return"";var b,z;if(this.lastNeed){if(b=this.fillLast(v),b===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?b?b+this.text(v,z):this.text(v,z):b||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,b,z){var C=b.length-1;if(C<z)return 0;var w=i(b[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(b[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(b[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,b,z){if((b[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var b=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,b,0,v.length),this.lastNeed-=v.length}function c(v,b){var z=o(this,v,b);if(!this.lastNeed)return v.toString("utf8",b);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",b,C)}function u(v){var b=v&&v.length?this.write(v):"";return this.lastNeed?b+"\uFFFD":b}function d(v,b){if((v.length-b)%2===0){var z=v.toString("utf16le",b);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",b,v.length-1)}function p(v){var b=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,z)}return b}function m(v,b){var z=(v.length-b)%3;return z===0?v.toString("base64",b):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",b,v.length-z))}function g(v){var b=v&&v.length?this.write(v):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function k(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return pE}var mE,Bte;function fE(){if(Bte)return mE;Bte=1;var e=Jg().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},k=function(b){s.call(i,b)},y=function(){var b;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(b=new e),s.call(i,b);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(b=new e),s.call(i,b)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",k),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",k),i.removeListener("close",y)}}return mE=n,mE}var gE,Ete;function baa(){if(Ete)return gE;Ete=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=fE(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function k(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(k(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),b=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return gE=b,gE}var Lte,_te;function yaa(){return _te||(_te=1,Lte=function(){throw new Error("Readable.from is not available in the browser")}),Lte}var vE,Rte;function Nte(){if(Rte)return vE;Rte=1,vE=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=hte(),r=i1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=bte,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=faa(),u=xte(),d=Ste(),p=d.getHighWaterMark,m=Jg().codes,g=m.ERR_INVALID_ARG_TYPE,k=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||Ug(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),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=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(b||(b=Tte().StringDecoder),this.decoder=new b(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||Ug(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),_(this,M,$,!1,G)},B.prototype.unshift=function(M){return _(this,M,null,!0,!1)};function _(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new k);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){b||(b=Tte().StringDecoder);var $=new b(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function X(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=X(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=X(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Xe;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",Le),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Xe),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&Y(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Xe(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",Le),Xe()}M.once("close",Oe);function Le(){l("onfinish"),M.removeListener("close",Oe),Xe()}M.once("finish",Le);function Xe(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=Y($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(L,M,$))}function L(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=baa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=yaa()),C(B,M,$)});function Y(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return vE}var bE,Dte;function $te(){if(Dte)return bE;Dte=1,bE=s;var e=Jg().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=Ug();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.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,p){c(u,d,p)}):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,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.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(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return bE}var yE,Ite;function kaa(){if(Ite)return yE;Ite=1,yE=a;var e=$te();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},yE}var kE,Kte;function xaa(){if(Kte)return kE;Kte=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=Jg().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,k){k=a(k);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=fE()),e(p,{readable:m,writable:g},function(b){if(b)return k(b);y=!0,k()});var v=!1;return function(b){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();k(b||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var k=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(b,z){var C=z<m.length-1,w=z>0;return s(b,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),k(y))})});return m.reduce(c)}return kE=d,kE}var Vte;function Hte(){return Vte||(Vte=1,(function(e,a){a=e.exports=Nte(),a.Stream=a,a.Readable=a,a.Writable=Ote(),a.Duplex=Ug(),a.Transform=$te(),a.PassThrough=kaa(),a.finished=fE(),a.pipeline=xaa()})(rE,rE.exports)),rE.exports}var Fte;function Gte(){if(Fte)return y2;Fte=1;var e=cte(),a=J8(),t=Hte(),r=y2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=y2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let k=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)),k()}}).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,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,b){c._destroyed?b():c.push(Buffer.from(y))?v():c._resumeFetch=v})},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();k()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(k){var y=k.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=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 g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},y2}var qte;function waa(){if(qte)return tE.exports;qte=1;var e=cte(),a=J8(),t=Gte(),r=Hte(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=tE.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(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._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 p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(b){var z=p[b].name,C=p[b].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var k=null;if(e.abortController){var y=new AbortController;k=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:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:k}).then(function(b){u._fetchResponse=b,u._resetTimers(!1),u._connect()},function(b){u._resetTimers(!0),u._destroyed||u.emit("error",b)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(b){process.nextTick(function(){u.emit("error",b)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(b){v.setRequestHeader(b[0],b[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(b){process.nextTick(function(){u.emit("error",b)});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,p){var m=this;m._body.push(u),p()},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,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._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 tE.exports}var xE,Jte;function zaa(){if(Jte)return xE;Jte=1,xE=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return xE}var Ute,Wte;function Saa(){return Wte||(Wte=1,Ute={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"}),Ute}var Zte;function Caa(){return Zte||(Zte=1,(function(e){var a=waa(),t=Gte(),r=zaa(),n=Saa(),i=VB(),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,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(ote)),ote}var Qte,Yte;function jaa(){return Yte||(Yte=1,Qte={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},Caa().STATUS_CODES)}),Qte}const Oaa="7.0.8",Aaa={version:Oaa};var wE,Xte;function Paa(){if(Xte)return wE;Xte=1;const e=qg,a=VB(),t=saa(),r=qg,n=qg,i=v2(),o=i.jptr,s=JB().isRef,l=b2().clone,c=b2().circularClone,u=ZB().recurse,d=uaa(),p=daa(),m=rte(),g=jaa().statusCodes,k=Aaa.version,y="3.0.0";let v;class b extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new b(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function _(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function X(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){X(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let Le=M.$ref,Xe=o(pe,M.$ref);!Xe&&Le.startsWith("#/")?C("Could not resolve reference "+Le,M,Q):Xe&&(M=Xe)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,Le){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let Le of m.parameterTypeProperties)typeof M[Le]<"u"&&(Oe[Le]=M[Le]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,re.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(re.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,re),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(X(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let Le of(de.parameters||[]).concat(Q.parameters||[]))Le.$ref&&(Le=i.jptr(ce,Le.$ref)),Le.name===xe&&!Le.example&&(Le.examples||(Le.examples={}),Le.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let Le=ge.responses[xe].headers[Oe];for(let Xe in de.responses[xe].headers)if(Xe===Oe){let E=de.responses[xe].headers[Xe];E.example=Le}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let Le=de.responses[xe].content[Oe];Le.examples||(Le.examples={}),Le.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let Le={};Le.name=ge,Le.body=de.requestBody,Le.refs=[],G[xe]=Le}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),_(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new b("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new b("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new b("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new b("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new b("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new b("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new b("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new b("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new b("(Patchable) paths object is mandatory"))}function L(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),L(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new b("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=k,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.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=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new b(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new b(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function Y(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return wE={S2OError:b,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:Y},wE}var Maa=Paa();const Taa=Vr(Maa);function Baa(e){return e.paths||(e.paths={}),new Promise((a,t)=>Taa.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function Eaa(){try{return(await $ae())?.resolvedConfig.openapi||{}}catch{return{}}}async function Laa(e){const a=await $ae(),t={config:a,base:qc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};qc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=_aa(e):t.ref=e;const{bundle:{parsed:r}}=await Yea(t);return r.swagger!==void 0?Baa(r):r}function _aa(e){return{source:{absoluteRef:""},parsed:e}}async function Raa(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await Laa(e||a);try{hFe(r)}catch{}return r}const Naa=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const k=await Eaa();p({...e,...k}),u(await Raa(t,a,e))}catch(k){o(k.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},mFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Qs(e?.hideLoading,!1)?null:h.jsx(gZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function Daa({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(Naa,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(lee,{withCommonStyles:!0,router:o||"hash"})})}function $aa(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function Iaa(e){const a=$aa(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function Kaa(e,a=document.querySelector("redoc")){GF.hydrateRoot(a,h.jsx(lee,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function ere(e,a={},t=x4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...Iaa(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),GF.createRoot(t).render(R.createElement(Daa,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const Vaa="3.15.0-next.11",Haa="d5f5fcd0";function Faa(){const e=x4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&ere(a,{},e)}Faa();function o1(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 are={exports:{}};/*!
|
|
10191
10196
|
|
|
10192
10197
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
10193
10198
|
<http://stuartk.com/jszip>
|
|
@@ -11771,7 +11776,7 @@ html body {
|
|
|
11771
11776
|
`),C+="`"+Bwt(z)+"`: "+b),c([C])}return null})},e})();function PD(e){if(e){var a=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
11772
11777
|
|
|
11773
11778
|
$3`);return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Bwt(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ewt=(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},e(a,t)};return function(a,t){e(a,t);function r(){this.constructor=a}a.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Yn,px;if(typeof process=="object")px=!1;else if(typeof navigator=="object"){var Lwt=navigator.userAgent;px=Lwt.indexOf("Windows")>=0}var _wt=/^\w[\w\d+.-]*$/,Rwt=/^\//,Nwt=/^\/\//;function Dwt(e,a){if(!e.scheme&&a)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!_wt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Rwt.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Nwt.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function $wt(e,a){return!e&&!a?"file":e}function Iwt(e,a){switch(e){case"https":case"http":case"file":a?a[0]!==Tc&&(a=Tc+a):a=Tc;break}return a}var Jr="",Tc="/",Kwt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,MD=(function(){function e(a,t,r,n,i,o){o===void 0&&(o=!1),typeof a=="object"?(this.scheme=a.scheme||Jr,this.authority=a.authority||Jr,this.path=a.path||Jr,this.query=a.query||Jr,this.fragment=a.fragment||Jr):(this.scheme=$wt(a,o),this.authority=t||Jr,this.path=Iwt(this.scheme,r||Jr),this.query=n||Jr,this.fragment=i||Jr,Dwt(this,o))}return e.isUri=function(a){return a instanceof e?!0:a?typeof a.authority=="string"&&typeof a.fragment=="string"&&typeof a.path=="string"&&typeof a.query=="string"&&typeof a.scheme=="string"&&typeof a.fsPath=="function"&&typeof a.with=="function"&&typeof a.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Ize(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(a){if(!a)return this;var t=a.scheme,r=a.authority,n=a.path,i=a.query,o=a.fragment;return t===void 0?t=this.scheme:t===null&&(t=Jr),r===void 0?r=this.authority:r===null&&(r=Jr),n===void 0?n=this.path:n===null&&(n=Jr),i===void 0?i=this.query:i===null&&(i=Jr),o===void 0?o=this.fragment:o===null&&(o=Jr),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new bb(t,r,n,i,o)},e.parse=function(a,t){t===void 0&&(t=!1);var r=Kwt.exec(a);return r?new bb(r[2]||Jr,MM(r[4]||Jr),MM(r[5]||Jr),MM(r[7]||Jr),MM(r[9]||Jr),t):new bb(Jr,Jr,Jr,Jr,Jr)},e.file=function(a){var t=Jr;if(px&&(a=a.replace(/\\/g,Tc)),a[0]===Tc&&a[1]===Tc){var r=a.indexOf(Tc,2);r===-1?(t=a.substring(2),a=Tc):(t=a.substring(2,r),a=a.substring(r)||Tc)}return new bb("file",t,a,Jr,Jr)},e.from=function(a){return new bb(a.scheme,a.authority,a.path,a.query,a.fragment)},e.prototype.toString=function(a){return a===void 0&&(a=!1),TD(this,a)},e.prototype.toJSON=function(){return this},e.revive=function(a){if(a){if(a instanceof e)return a;var t=new bb(a);return t._formatted=a.external,t._fsPath=a._sep===Nze?a.fsPath:null,t}else return a},e})(),Nze=px?1:void 0,bb=(function(e){Ewt(a,e);function a(){var t=e!==null&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return Object.defineProperty(a.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Ize(this)),this._fsPath},enumerable:!0,configurable:!0}),a.prototype.toString=function(t){return t===void 0&&(t=!1),t?TD(this,!0):(this._formatted||(this._formatted=TD(this,!1)),this._formatted)},a.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Nze),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},a})(MD),Dze=(Yn={},Yn[58]="%3A",Yn[47]="%2F",Yn[63]="%3F",Yn[35]="%23",Yn[91]="%5B",Yn[93]="%5D",Yn[64]="%40",Yn[33]="%21",Yn[36]="%24",Yn[38]="%26",Yn[39]="%27",Yn[40]="%28",Yn[41]="%29",Yn[42]="%2A",Yn[43]="%2B",Yn[44]="%2C",Yn[59]="%3B",Yn[61]="%3D",Yn[32]="%20",Yn);function $ze(e,a){for(var t=void 0,r=-1,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||a&&i===47)r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t!==void 0&&(t+=e.charAt(n));else{t===void 0&&(t=e.substr(0,n));var o=Dze[i];o!==void 0?(r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t+=o):r===-1&&(r=n)}}return r!==-1&&(t+=encodeURIComponent(e.substring(r))),t!==void 0?t:e}function Vwt(e){for(var a=void 0,t=0;t<e.length;t++){var r=e.charCodeAt(t);r===35||r===63?(a===void 0&&(a=e.substr(0,t)),a+=Dze[r]):a!==void 0&&(a+=e[t])}return a!==void 0?a:e}function Ize(e,a){var t;return e.authority&&e.path.length>1&&e.scheme==="file"?t="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t=e.path[1].toLowerCase()+e.path.substr(2):t=e.path,px&&(t=t.replace(/\//g,"\\")),t}function TD(e,a){var t=a?Vwt:$ze,r="",n=e.scheme,i=e.authority,o=e.path,s=e.query,l=e.fragment;if(n&&(r+=n,r+=":"),(i||n==="file")&&(r+=Tc,r+=Tc),i){var c=i.indexOf("@");if(c!==-1){var u=i.substr(0,c);i=i.substr(c+1),c=u.indexOf(":"),c===-1?r+=t(u,!1):(r+=t(u.substr(0,c),!1),r+=":",r+=t(u.substr(c+1),!1)),r+="@"}i=i.toLowerCase(),c=i.indexOf(":"),c===-1?r+=t(i,!1):(r+=t(i.substr(0,c),!1),r+=i.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){var d=o.charCodeAt(1);d>=65&&d<=90&&(o="/"+String.fromCharCode(d+32)+":"+o.substr(3))}else if(o.length>=2&&o.charCodeAt(1)===58){var d=o.charCodeAt(0);d>=65&&d<=90&&(o=String.fromCharCode(d+32)+":"+o.substr(2))}r+=t(o,!0)}return s&&(r+="?",r+=t(s,!1)),l&&(r+="#",r+=a?l:$ze(l,!1)),r}function Kze(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Kze(e.substr(3)):e}}var Vze=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function MM(e){return e.match(Vze)?e.replace(Vze,function(a){return Kze(a)}):e}var Hwt=(function(){function e(a){try{this.patternRegExp=new RegExp(Owt(a)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(a){this.schemas.push(a)},e.prototype.matchesPattern=function(a){return this.patternRegExp&&this.patternRegExp.test(a)},e.prototype.getSchemas=function(){return this.schemas},e})(),Fwt=(function(){function e(a,t,r){this.service=a,this.url=t,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new yb(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var a=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return a.service.resolveSchemaContent(t,a.url,a.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e})(),yb=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e})(),Hze=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e.prototype.getSection=function(a){return _s(this.getSectionRecursive(a,this.schema))},e.prototype.getSectionRecursive=function(a,t){if(!t||typeof t=="boolean"||a.length===0)return t;var r=a.shift();if(t.properties&&typeof t.properties[r])return this.getSectionRecursive(a,t.properties[r]);if(t.patternProperties)for(var n=0,i=Object.keys(t.patternProperties);n<i.length;n++){var o=i[n],s=new RegExp(o);if(s.test(r))return this.getSectionRecursive(a,t.patternProperties[o])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(a,t.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(t.items)){var l=parseInt(r,10);if(!isNaN(l)&&t.items[l])return this.getSectionRecursive(a,t.items[l])}else if(t.items)return this.getSectionRecursive(a,t.items)}}return null},e})(),Gwt=(function(){function e(a,t,r){this.contextService=t,this.requestService=a,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(a){return Object.keys(this.registeredSchemasIds).filter(function(t){var r=MD.parse(t).scheme;return r!=="schemaservice"&&(!a||a(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(a){var t=this,r=!1;a=this.normalizeId(a);for(var n=[a],i=Object.keys(this.schemasById).map(function(c){return t.schemasById[c]});n.length;)for(var o=n.pop(),s=0;s<i.length;s++){var l=i[s];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),i[s]=void 0,r=!0)}return r},e.prototype.normalizeId=function(a){try{return MD.parse(a).toString()}catch{return a}},e.prototype.setSchemaContributions=function(a){if(a.schemas){var t=a.schemas;for(var r in t){var n=this.normalizeId(r);this.contributionSchemas[n]=this.addSchemaHandle(n,t[r])}}if(a.schemaAssociations){var i=a.schemaAssociations;for(var o in i){var s=i[o];this.contributionAssociations[o]=s;for(var l=this.getOrAddFilePatternAssociation(o),c=0,u=s;c<u.length;c++){var d=u[c],r=this.normalizeId(d);l.addSchema(r)}}}},e.prototype.addSchemaHandle=function(a,t){var r=new Fwt(this,a,t);return this.schemasById[a]=r,r},e.prototype.getOrAddSchemaHandle=function(a,t){return this.schemasById[a]||this.addSchemaHandle(a,t)},e.prototype.getOrAddFilePatternAssociation=function(a){var t=this.filePatternAssociationById[a];return t||(t=new Hwt(a),this.filePatternAssociationById[a]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(a,t,r){t===void 0&&(t=null);var n=this.normalizeId(a);if(this.registeredSchemasIds[n]=!0,t)for(var i=0,o=t;i<o.length;i++){var s=o[i];this.getOrAddFilePatternAssociation(s).addSchema(n)}return r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var a in this.contributionSchemas)this.schemasById[a]=this.contributionSchemas[a],this.registeredSchemasIds[a]=!0;for(var t in this.contributionAssociations)for(var r=this.getOrAddFilePatternAssociation(t),n=0,i=this.contributionAssociations[t];n<i.length;n++){var o=i[n],a=this.normalizeId(o);r.addSchema(a)}},e.prototype.getResolvedSchema=function(a){var t=this.normalizeId(a),r=this.schemasById[t];return r?r.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(a){if(!this.requestService){var t="Unable to load schema from '"+a+"'. No schema request service available";return this.promise.resolve(new yb({},[t]))}return this.requestService(a).then(function(r){if(!r){var n="Unable to load schema from '"+a+"': No content.";return new yb({},[n])}var i={},o=[];i=cwt(r,o);var s=o.length?["Unable to parse content from '"+a+"': Parse error at offset "+o[0].offset]:[];return new yb(i,s)},function(r){var n="Unable to load schema from '"+a+"': "+r.toString();return new yb({},[n])})},e.prototype.resolveSchemaContent=function(a,t,r){var n=this,i=a.errors.slice(0),o=a.schema;if(o.$schema){var s=this.normalizeId(o.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Hze({},["Draft-03 schemas are not supported."]));s==="https://json-schema.org/draft/2019-09/schema"&&a.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var l=this.contextService,c=function(m,g){if(!g)return m;var k=m;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(y){return k=k[y],!k}),k},u=function(m,g,k,y){var v=c(g,y);if(v)for(var b in v)v.hasOwnProperty(b)&&!m.hasOwnProperty(b)&&(m[b]=v[b]);else i.push("$ref '"+y+"' in '"+k+"' can not be resolved.")},d=function(m,g,k,y,v){l&&!/^\w+:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,y)),g=n.normalizeId(g);var b=n.getOrAddSchemaHandle(g);return b.getUnresolvedSchema().then(function(z){if(v[g]=!0,z.errors.length){var C=k?g+"#"+k:g;i.push("Problems loading reference '"+C+"': "+z.errors[0]+".")}return u(m,z.schema,g,k),p(m,z.schema,g,b.dependencies)})},p=function(m,g,k,y){if(!m||typeof m!="object")return Promise.resolve(null);for(var v=[m],b=[],z=[],C=function(){for(var B=[],_=0;_<arguments.length;_++)B[_]=arguments[_];for(var q=0,N=B;q<N.length;q++){var U=N[q];typeof U=="object"&&v.push(U)}},w=function(){for(var B=[],_=0;_<arguments.length;_++)B[_]=arguments[_];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(typeof U=="object")for(var D in U){var X=U[D];typeof X=="object"&&v.push(X)}}},S=function(){for(var B=[],_=0;_<arguments.length;_++)B[_]=arguments[_];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(Array.isArray(U))for(var D=0,X=U;D<X.length;D++){var te=X[D];typeof te=="object"&&v.push(te)}}},O=function(B){for(var _=[];B.$ref;){var q=B.$ref,N=q.split("#",2);if(delete B.$ref,N[0].length>0){z.push(d(B,N[0],N[1],k,y));return}else _.indexOf(q)===-1&&(u(B,g,k,N[1]),_.push(q))}C(B.items,B.additionalProperties,B.not,B.contains,B.propertyNames,B.if,B.then,B.else),w(B.definitions,B.properties,B.patternProperties,B.dependencies),S(B.anyOf,B.allOf,B.oneOf,B.items)};v.length;){var A=v.pop();b.indexOf(A)>=0||(b.push(A),O(A))}return n.promise.all(z)};return p(o,o,t,r).then(function(m){return new Hze(o,i)})},e.prototype.getSchemaForResource=function(a,t){if(t&&t.root&&t.root.type==="object"){var r=t.root.properties.filter(function(g){return g.keyNode.value==="$schema"&&g.valueNode&&g.valueNode.type==="string"});if(r.length>0){var n=xh(r[0].valueNode);if(n&&jwt(n,".")&&this.contextService&&(n=this.contextService.resolveRelativePath(n,a)),n){var i=this.normalizeId(n);return this.getOrAddSchemaHandle(i).getResolvedSchema()}}}for(var o=Object.create(null),s=[],l=0,c=this.filePatternAssociations;l<c.length;l++){var u=c[l];if(u.matchesPattern(a))for(var d=0,p=u.getSchemas();d<p.length;d++){var m=p[d];o[m]||(s.push(m),o[m]=!0)}}return s.length>0?this.createCombinedSchema(a,s).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(a,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(a),n={allOf:t.map(function(i){return{$ref:i}})};return this.addSchemaHandle(r,n)},e})(),qwt=(function(){function e(a,t){this.jsonSchemaService=a,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(a){a&&(this.validationEnabled=a.validate,this.commentSeverity=a.allowComments?void 0:St.Error)},e.prototype.doValidation=function(a,t,r,n){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},l=function(d){var p=d.range.start.line+" "+d.range.start.character+" "+d.message;s[p]||(s[p]=!0,o.push(d))},c=function(d){var p=r?qze(r.trailingCommas):St.Error,m=r?qze(r.comments):i.commentSeverity;if(d){if(d.errors.length&&t.root){var g=t.root,k=g.type==="object"?g.properties[0]:null;if(k&&k.keyNode.value==="$schema"){var y=k.valueNode||k,v=lr.create(a.positionAt(y.offset),a.positionAt(y.offset+y.length));l(_d.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}else{var v=lr.create(a.positionAt(g.offset),a.positionAt(g.offset+1));l(_d.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}}else{var b=t.validate(a,d.schema);b&&b.forEach(l)}Fze(d.schema)&&(m=void 0),Gze(d.schema)&&(p=void 0)}for(var z=0,C=t.syntaxErrors;z<C.length;z++){var w=C[z];if(w.code===rr.TrailingComma){if(typeof p!="number")continue;w.severity=p}l(w)}if(typeof m=="number"){var S="Comments are not permitted in JSON.";t.comments.forEach(function(O){l(_d.create(O,S,m,rr.CommentNotPermitted))})}return o};if(n){var u=n.id||"schemaservice://untitled/"+Jwt++;return this.jsonSchemaService.resolveSchemaContent(new yb(n),u,{}).then(function(d){return c(d)})}return this.jsonSchemaService.getSchemaForResource(a.uri,t).then(function(d){return c(d)})},e})(),Jwt=0;function Fze(e){if(e&&typeof e=="object"){if(Tu(e.allowComments))return e.allowComments;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=Fze(r);if(Tu(n))return n}}}function Gze(e){if(e&&typeof e=="object"){if(Tu(e.allowTrailingCommas))return e.allowTrailingCommas;if(Tu(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=Gze(r);if(Tu(n))return n}}}function qze(e){switch(e){case"error":return St.Error;case"warning":return St.Warning;case"ignore":return}}var Jze=48,Uwt=57,Wwt=65,TM=97,Zwt=102;function Xn(e){return e<Jze?0:e<=Uwt?e-Jze:(e<TM&&(e+=TM-Wwt),e>=TM&&e<=Zwt?e-TM+10:0)}function Qwt(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Xn(e.charCodeAt(1))*17/255,green:Xn(e.charCodeAt(2))*17/255,blue:Xn(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Xn(e.charCodeAt(1))*17/255,green:Xn(e.charCodeAt(2))*17/255,blue:Xn(e.charCodeAt(3))*17/255,alpha:Xn(e.charCodeAt(4))*17/255};case 7:return{red:(Xn(e.charCodeAt(1))*16+Xn(e.charCodeAt(2)))/255,green:(Xn(e.charCodeAt(3))*16+Xn(e.charCodeAt(4)))/255,blue:(Xn(e.charCodeAt(5))*16+Xn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Xn(e.charCodeAt(1))*16+Xn(e.charCodeAt(2)))/255,green:(Xn(e.charCodeAt(3))*16+Xn(e.charCodeAt(4)))/255,blue:(Xn(e.charCodeAt(5))*16+Xn(e.charCodeAt(6)))/255,alpha:(Xn(e.charCodeAt(7))*16+Xn(e.charCodeAt(8)))/255}}return null}var Ywt=(function(){function e(a){this.schemaService=a}return e.prototype.findDocumentSymbols=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||AD(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var k=fb.create(a.uri,wh(a,d));if(l.push({name:xh(g.valueNode),kind:Bu.Function,location:k}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var y=function(b,z,C){return o>=0&&(z.type==="array"?z.items.forEach(function(w){return y(b,w,C)}):z.type==="object"&&z.properties.forEach(function(w){if(o>=0){var S=w.valueNode;if(S){o--;var O=fb.create(a.uri,wh(a,w)),A=C?C+"."+w.keyNode.value:w.keyNode.value;b.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),location:O,containerName:C}),y(b,S,A)}}})),b},v=y([],i,void 0);return o<0&&(v.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),v},e.prototype.findDocumentSymbols2=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||AD(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var k=wh(a,d),y=wh(a,g.keyNode);if(l.push({name:xh(g.valueNode),kind:Bu.Function,range:k,selectionRange:y}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var v=function(z,C){return o>=0&&(C.type==="array"?C.items.forEach(function(w,S){if(w&&o>=0){o--;var O=wh(a,w),A=O,B=String(S),_=v([],w);z.push({name:B,kind:n.getSymbolKind(w.type),range:O,selectionRange:A,children:_})}}):C.type==="object"&&C.properties.forEach(function(w){var S=w.valueNode;if(S&&o>=0){o--;var O=wh(a,w),A=wh(a,w.keyNode),B=v([],S);z.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),range:O,selectionRange:A,children:B})}})),z},b=v([],i);return o<0&&(b.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),b},e.prototype.getSymbolKind=function(a){switch(a){case"object":return Bu.Module;case"string":return Bu.String;case"number":return Bu.Number;case"array":return Bu.Array;case"boolean":return Bu.Boolean;default:return Bu.Variable}},e.prototype.getKeyLabel=function(a){var t=a.keyNode.value;return t&&(t=t.replace(/[\n]/g,"\u21B5")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(a,t,r){return this.schemaService.getSchemaForResource(a.uri,t).then(function(n){var i=[];if(n)for(var o=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,s=t.getMatchingSchemas(n.schema),l={},c=0,u=s;c<u.length;c++){var d=u[c];if(!d.inverted&&d.schema&&(d.schema.format==="color"||d.schema.format==="color-hex")&&d.node&&d.node.type==="string"){var p=String(d.node.offset);if(!l[p]){var m=Qwt(xh(d.node));if(m){var g=wh(a,d.node);i.push({color:m,range:g})}if(l[p]=!0,o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a.uri),i}}}return i})},e.prototype.getColorPresentations=function(a,t,r,n){var i=[],o=Math.round(r.red*255),s=Math.round(r.green*255),l=Math.round(r.blue*255);function c(d){var p=d.toString(16);return p.length!==2?"0"+p:p}var u;return r.alpha===1?u="#"+c(o)+c(s)+c(l):u="#"+c(o)+c(s)+c(l)+c(Math.round(r.alpha*255)),i.push({label:u,textEdit:Rd.replace(n,JSON.stringify(u))}),i},e})();function wh(e,a){return lr.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length))}var Xwt={schemaAssociations:{},schemas:{}};function ezt(e,a){var t=[],r=[],n=[],i=-1,o=mb(e.getText(),!1),s=o.scan();function l(_){t.push(_),r.push(n.length)}for(;s!==17;){switch(s){case 1:case 3:{var c=e.positionAt(o.getTokenOffset()).line,u={startLine:c,endLine:c,kind:s===1?"object":"array"};n.push(u);break}case 2:case 4:{var d=s===2?"object":"array";if(n.length>0&&n[n.length-1].kind===d){var u=n.pop(),p=e.positionAt(o.getTokenOffset()).line;u&&p>u.startLine+1&&i!==u.startLine&&(u.endLine=p-1,l(u),i=u.startLine)}break}case 13:{var c=e.positionAt(o.getTokenOffset()).line,m=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&c+1<e.lineCount?o.setPosition(e.offsetAt(ql.create(c+1,0))):c<m&&(l({startLine:c,endLine:m,kind:ux.Comment}),i=c);break}case 12:{var g=e.getText().substr(o.getTokenOffset(),o.getTokenLength()),k=g.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(k){var p=e.positionAt(o.getTokenOffset()).line;if(k[1]){var u={startLine:p,endLine:p,kind:ux.Region};n.push(u)}else{for(var y=n.length-1;y>=0&&n[y].kind!==ux.Region;)y--;if(y>=0){var u=n[y];n.length=y,p>u.startLine&&i!==u.startLine&&(u.endLine=p,l(u),i=u.startLine)}}}break}}s=o.scan()}var v=a&&a.rangeLimit;if(typeof v!="number"||t.length<=v)return t;a&&a.onRangeLimitExceeded&&a.onRangeLimitExceeded(e.uri);for(var b=[],z=0,C=r;z<C.length;z++){var w=C[z];w<30&&(b[w]=(b[w]||0)+1)}for(var S=0,O=0,y=0;y<b.length;y++){var A=b[y];if(A){if(A+S>v){O=y;break}S+=A}}for(var B=[],y=0;y<t.length;y++){var w=r[y];typeof w=="number"&&(w<O||w===O&&S++<v)&&B.push(t[y])}return B}function azt(e,a,t){function r(s){for(var l=e.offsetAt(s),c=t.getNodeFromOffset(l,!0),u=[];c;){switch(c.type){case"string":case"object":case"array":var d=c.offset+1,p=c.offset+c.length-1;d<p&&l>=d&&l<=p&&u.push(n(d,p)),u.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":u.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var m=o(c.offset+c.length,5);m!==-1&&u.push(n(c.offset,m))}c=c.parent}for(var g=void 0,k=u.length-1;k>=0;k--)g=AM.create(u[k],g);return g||(g=AM.create(lr.create(s,s))),g}function n(s,l){return lr.create(e.positionAt(s),e.positionAt(l))}var i=mb(e.getText(),!0);function o(s,l){i.setPosition(s);var c=i.scan();return c===l?i.getTokenOffset()+i.getTokenLength():-1}return a.map(r)}function Uze(e){var a=e.promiseConstructor||Promise,t=new Gwt(e.schemaRequestService,e.workspaceContext,a);t.setSchemaContributions(Xwt);var r=new Mwt(t,e.contributions,a,e.clientCapabilities),n=new Twt(t,e.contributions,a),i=new Ywt(t),o=new qwt(t,a);return{configure:function(s){t.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(l){t.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),o.configure(s)},resetSchema:function(s){return t.onResourceChange(s)},doValidation:o.doValidation.bind(o),parseJSONDocument:function(s){return Cwt(s,{collectComments:!0})},newJSONDocument:function(s,l){return Swt(s,l)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(s,l){return i.findDocumentColors(s,l).then(function(c){return c.map(function(u){return u.range})})},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:n.doHover.bind(n),getFoldingRanges:ezt,getSelectionRanges:azt,format:function(s,l,c){var u=void 0;if(l){var d=s.offsetAt(l.start),p=s.offsetAt(l.end)-d;u={offset:d,length:p}}var m={tabSize:c?c.tabSize:4,insertSpaces:c?c.insertSpaces:!0,eol:`
|
|
11774
|
-
`};return hwt(s.getText(),u,m).map(function(g){return Rd.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function lf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const BM=Uze({});let Wze=null;function Zze(e){Wze!==e&&(Wze=e,BM.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function Qze(e){const a=PM.create("stub.json","json",0,e),t=BM.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const Yze=Ai.define({create(){},update(e){return e}}),Xze=e=>e.field(Yze,!1),tzt=({store:e,isResponse:a,apiOperation:t})=>{const r=z$(e).data.get();let n=t?.body?.mediaTypes?.[_o.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[_o.JSON]?.schema)}return[Yze.init(()=>({schema:Pd(n||{}),store:e}))]};function rzt(){return async e=>{const{schema:a}=Xze(e.state)||{};if(!a)return[];Zze(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=Qze(t.toString());return(await BM.doValidation(r,n))?.map(i=>({from:BD(t,i.range.start),to:BD(t,i.range.end),message:i.message,severity:ozt[i.severity||3]}))}}const nzt=xu.highest(eb.of([{key:"Tab",run:e=>O0e(e)}]));function izt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=Xze(e.state)||{};if(!t)return a;Zze(t);const r=e.state.doc,n=BD.bind(null,r),{textDoc:i,jsonDoc:o}=Qze(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await BM.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||szt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:k=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let b=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-b.length;k.dispatch({changes:{from:n(y.start),to:n(y.end),insert:b}});const C=b.length-(y.end.character-y.start.character);k.dispatch({selection:sa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const ozt={1:"error",2:"warning",3:"info",4:"hint"};function BD(e,a){return e.line(a.line+1).from+a.character}function szt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const eSe=ht.define();function kb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const ED=e=>xn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=kb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=OA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=o_(d.match),k=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(k)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),lzt=Uze({});function czt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function uzt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const dzt=e=>xn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=PM.create("inmemory://model.json","json",0,r),d=lzt.parseJSONDocument(u)?.root;n=czt(d)?d:void 0}catch{n=void 0}const i=kb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=uzt(n);for(const u of c){if(!a.visibleRanges.some(k=>Math.max(k.from,u.from)<Math.min(k.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=OA(m);for(const k of g){const y=d+k.start,v=d+k.end;if(!(y>=v))if(k.prefix==="inputs"){const b=o_(k.match),z=!i?.find(C=>C.name===b)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[_o.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[ED]},[_o.JSON]:{name:"JSON",extensions:[vbt(),J1t(rzt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(eSe)))}),$1e.data.of({autocomplete:izt()}),nzt],stateExtensions:[tzt,dzt]},[_o.XML]:{name:"XML",extensions:[_1t()],stateExtensions:[ED]}},pzt={[_o.Image]:{name:"Image",extensions:[],stateExtensions:[]}},hzt={[_o.HTML]:{name:"HTML",extensions:[d1t()],stateExtensions:[ED]}},zh={...Eu,...pzt,...hzt},aSe={[_o.FormData]:{name:"form-data",extensions:void 0},[_o["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},tSe={[_o.Binary]:{name:"Binary",extensions:void 0}},cf={...Eu,...aSe,...tSe},mzt=Object.keys(Eu),LD=Object.keys(aSe),rSe=Object.keys(tSe);function nSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const hx={active:!0,key:"",value:""};function Sh(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),En(a.in)]}function mx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Jl(){return{id:crypto.randomUUID(),...hx}}function Ns(){return{id:crypto.randomUUID(),...hx,description:""}}function En(e){return{...hx,id:crypto.randomUUID(),in:e}}function uf(){return{id:crypto.randomUUID(),...hx,type:"text",files:null}}function _D(){return{id:crypto.randomUUID(),...hx,sendIn:Co.URL}}function RD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function EM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Ch(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function iSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function fzt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Ln(e=[],a={}){const t=[];for(const r of e)if(Hp(r)){const n=fzt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function jh(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function gzt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const oSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Jl()],tokenRequestExtraParams:[_D()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ns()]}},vzt={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:tl.Header,name:"",key:""},[qe.OAuth2]:oSe,[qe.OpenIDConnect]:{...oSe,openIdConnectUrl:"",userInfoUrl:""}},ND="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",bzt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function LM(){return structuredClone({type:Gi.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[uf()],"application/x-www-form-urlencoded":[uf()]},binary:null})}const yzt={method:"GET",url:"",security:[Lu()],body:LM(),queryParameters:[Jl()],headers:[Jl()],cookies:[Jl()],pathParameters:[Jl()]};function sSe(){return structuredClone(yzt)}function Lu(){return Pd(vzt)}function kzt(e){return Pd({id:crypto.randomUUID(),...bzt[e]})}function lSe(e,a,t){for(const r of t){const n=cSe(e,r),i=cSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!lSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function cSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function xzt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function wzt(e,a){return e.every(t=>a.includes(t))}function zzt(e){switch(e){case"query":return tl.Query;case"cookie":return tl.Cookie;case"header":return tl.Header;default:return}}function Szt(e,a,t){const{security:r}=a,n=Ect(e);if(!t)return!1;const i=DD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!xzt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||lSe(c,m,jzt(u,d)),k=Czt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&k);l.push(!t.security?.length||y)}),l.includes(!1)}function Czt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=EM(e[qe.OAuth2][t]?.scopes,r);return wzt(i,n)}return!0}function jzt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...Ozt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function Ozt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function Azt(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function Pzt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push($D(o))}),{id:n,security:i}});return a.length?t:[]}function Mzt(e,a){const t=e.security||[];return t?.length?hSe(t).map((r,n)=>$D(r)):[]}function DD(e){const a=(e.security||[])[0];return a?a.map(t=>$D(t)):[Lu()]}function $D(e,a){const t={...Lu(),securitySchemeId:e.id},r=_M(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=bn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=bn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=bn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=bn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=bn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=bn(n+tt.APIKey);const i=zzt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=VD(e),o=bn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=bn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=bn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...jh(e.flows?.authorizationCode?.scopes||{})||[],Ns()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=bn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=bn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...jh(e.flows?.authorizationCode?.scopes||{}),Ns()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=bn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=bn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...jh(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=bn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=bn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...jh(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=bn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...jh(e.flows?.implicit?.scopes||{}),Ns()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=bn(n+tt.ClientId),s[We.Password].clientSecret=bn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...jh(e.flows?.password?.scopes||{}),Ns()])})}if(r===qe.OpenIDConnect){const i=bn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=bn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=bn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=bn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=bn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=bn(n+tt.ClientId))}return t}function Tzt(e,a="",t){const r=nSe(e.parameters,"in"),n=uSe(e),i=DD(e),o=Sh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Sh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:mx(gzt(e.path),o),headers:Sh(r.header||[],{in:"header"}),queryParameters:o,cookies:Sh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function ID(e){const a=nSe(e.parameters,"in"),t=uSe(e),r=DD(e);return{parameters:{queryParameters:Sh(a.query||[],{in:"query"}),headers:Sh(a.header||[],{in:"header"}),cookies:Sh(a.cookie||[],{in:"cookie"}),pathParameters:Sh(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function uSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return LM();const t=Bzt(a,e),r=t?.name||"",n=!LD.includes(r)&&!rSe.includes(r),i=KD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...LM(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":pSe(a[_o.FormData]),"application/x-www-form-urlencoded":pSe(a[_o["application/x-www-form-urlencoded"]])}}}function dSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...cf}:cf}function pSe(e){if(!e)return[uf()];if(!e.parameters)return[uf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(uf()),a}function KD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:am(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function Bzt(e,a){const t=dSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function Ezt(e){return!e?.security?.length||!e?[]:Mzt(e)}function hSe(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function _M(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 Lzt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===ND)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function _zt(e,a){const t=e?.security;if(!t?.length)return[];const r=Azt(t).flat().filter(n=>n.schemeId===a).find(n=>_M(n)===qe.OAuth2);return VD(r)}function VD(e){return Object.entries(e?.flows||{}).map(([a,t])=>Lzt(a,t)).filter(Boolean)}async function fx(e){try{const a=await Fht(e),t=await ube(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function mSe(e){return(await Promise.allSettled(e.map(a=>fx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function Rzt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await Nzt({projectPath:r,apiUrl:l.url,collectionId:a})}))),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:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:CSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:zSe(l.outputs),security:kSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=CSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=mx(d.url,u.queryParameters.filter(Bre)));const p=Dzt(c,o,n);let m;if(p&&i){const k=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,k)}delete c.operationId,delete c["x-operation"];const g=await Fzt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:zSe(c.outputs),successCriteria:c.successCriteria?.map(k=>({...k,type:k.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:kSe(c["x-security"],m),operation:p}}))})))}}async function Nzt({projectPath:e,apiUrl:a,collectionId:t}){if(sbe(a))return a;if(await Hn.isAbsolute(a))return await Hn.relative(e,a);const r=await Hn.resolve(await Hn.join(e,t,"..",a));return await Hn.relative(e,r)}function Dzt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=gSe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=$zt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=qzt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function $zt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function fSe(e){return"reference"in e&&typeof e.reference=="string"}function gSe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function Izt(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 vSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function Kzt(e){return{query:tl.Query,header:tl.Header,cookie:tl.Cookie}[e.toLowerCase()]||tl.Header}function Vzt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function bSe(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=vSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:df(e[n].availableScopes),scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:df(e[n].availableScopes),scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function ySe(e,a,t){const r={...Lu(),securityType:e},n=Object.keys(a.flows||{})[0],i=vSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:Kzt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...bSe(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:xSe(t.authRequestExtraParams),tokenRequestExtraParams:wSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...bSe(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:xSe(t.authRequestExtraParams),tokenRequestExtraParams:wSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function Hzt(e,a){return[...e.map(t=>{if("scheme"in t){const n=Izt(t.scheme);return ySe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=_M(r),i=ySe(n,r,t.values);return i.securitySchemeId=r.id,i}return Lu()})]}function kSe(e=[],a){const t=hSe(a?.security||[]);return e.length?Hzt(e,t):[Lu()]}function df(e,a){const t=jh(e||{}),r=jh(a||{});return[...t,...r,Ns()]}function xSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Jl())}function wSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:Vzt(a.in)})).concat(_D())}function zSe(e){if(!e)return[Jl()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Jl()),a}const RM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function SSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function CSe(e,a,t){if(!e&&!a)return{pathParameters:[En("path")],queryParameters:[En("query")],headers:[En("header")],cookies:[En("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(fSe(n)){const i=SSe(n,t),o=RM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[RM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(fSe(n)){const i=SSe(n,t),o=RM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[RM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(En("path")),r.queryParameters.push(En("query")),r.headers.push(En("header")),r.cookies.push(En("cookie")),r}async function Fzt(e,a){const t=sSe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await Gzt(e,a)};case"application/octet-stream":const r=e.payload?await ASe(e.payload,a):[],n=r.length>0?await fx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:OSe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:OSe(e.payload)}}}}async function jSe(e,a,t,r){const n=await ASe(a,r),i=n.length>0||Array.isArray(a),o=i?await mSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function Gzt(e,a){const t=sSe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>jSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>jSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,uf()]}}function OSe(e){return e?JSON.stringify(e,null,2):""}function qzt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];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:t}}}return null}async function ASe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>PSe(t,a)))).flat():typeof e=="string"?await PSe(e,a):[]}async function PSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>Jzt(n[1],a)))}async function Jzt(e,a){return await Hn.isAbsolute(e)?e:await Hn.resolve(await Hn.join(a,e))}const ps=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},MSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=ps(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},Uzt=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},Wzt=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},Zzt=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function TSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function BSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(Hp(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function Qzt(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function Yzt(e){if(!(!e||e.length===0))return[...e]}async function ESe(e,a){return e.absolutePath?`$file('${await Hn.relative(a,e.absolutePath)}')`:null}async function Xzt(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>ESe(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function eSt(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await Xzt(o,a);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 aSt(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function tSt(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await eSt(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await ESe(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:aSt(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function rSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function nSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function iSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function oSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function sSt(e){const{flows:a,values:t}=RSe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:LSe(e.authRequestExtraParams),tokenRequestExtraParams:_Se(e.tokenRequestExtraParams)}}}function lSt(e){const{flows:a,values:t}=RSe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:LSe(e.authRequestExtraParams),tokenRequestExtraParams:_Se(e.tokenRequestExtraParams)}}}function xb(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function LSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function _Se(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function RSe(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...xb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...xb(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...xb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...xb(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...xb(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...xb(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function NSe(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return sSt(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return lSt(r)}case qe.APIKey:{const r=t[qe.APIKey];return nSt(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return rSt(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return oSt(r)}case qe.JWT:{const r=t[qe.JWT];return iSt(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function cSt(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function uSt(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:cSt(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:k,...y})=>({...y,dependsOn:Yzt(d),outputs:TSe(p),inputs:k?ps(k):void 0,...NSe(u),...BSe(c),steps:await Promise.all(g.map(async({parameters:v,security:b,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const _={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;_.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else _.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(_["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,..._,...NSe(b),...BSe(v),requestBody:await tSt(C,a),successCriteria:Qzt(w),outputs:TSe(S)}}))})))}}}class dSt extends gbe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return Rzt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await uSt(a,this.storage.baseDir);return await Hn.extname(a.id)===".json"?JSON.stringify(t,null,2):md.dump(t)}}class pSt{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=md.load(a),n=t?JSON.parse(t):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(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.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 hSt{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const mSt=(e,a)=>({data:e,version:a});class HD extends hSt{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(mSt(a,this.version))}}function fSt(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const DSe=2,gSt="tabs.json";class vSt extends HD{migrationMap={1:fSt};constructor(a){super(a,gSt,Pd(ibe),DSe)}async parse(a){let t=JSON.parse(a);t.version!==DSe&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await $Se(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await $Se(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await fx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function $Se(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await mSe(r)}return t}))}const bSt=1,ySt=1;class kSt{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Uht(this.project.id),this.systemFilesStorage=this.isTauriApp?new fbe(this.project.systemFilesDir):new lbe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new fbe(this.project.userFilesDir):new lbe(this.project.userFilesDir);const r=new Iht;this.historyStorage=new HD(this.systemFilesStorage,"history.json",[],bSt),this.activeEnvironmentIdStorage=new HD(this.systemFilesStorage,"active_environment_id.json",x0,ySt),this.tabsStateStorage=new vSt(this.systemFilesStorage),this.environmentsStorage=new pSt(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new dSt(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Wht(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Hv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=md.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?t.push({uri:i,type:fu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:fu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&sbe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{let n="";try{const i=await gu(ACe({proxyUrl:Xve,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=md.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&t.push({uri:r,type:fu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function xSt(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new kSt(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function wSt({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Pd(ibe),activeEnvironmentId:x0,environments:e||nbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:mu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const zSt=nia(wSt(),iia(_ht({key:"replay-root-store"}),xSt())),ISe=R.createContext(zSt);function Ft(){const e=R.useContext(ISe);return Mre(e)}function SSt(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const CSt=SSt(),jSt=R.createContext(CSt);function Nd(){const e=R.useContext(jSt);return Mre(e)}function OSt(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Nd();r.set(e?.corsProxyUrl??Xve),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const KSe=R.createContext({});function gx(){return R.useContext(KSe)||{}}const ASt="0.18.0-next.10",PSt={version:ASt};class MSt{client;_isInitialized=!1;constructor(){this.client=new Mht}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t={serviceName:"replay",serviceVersion:PSt.version,version:"1.0.0",tracerName:a?.tracerName||"desktop",collectorUrl:a?.collectorUrl||"",isProd:!0};this.client.init({otel:{...t,...a}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const FD=new MSt;function Tt(){const{telemetry:e}=gx();return FD.isInitialized||FD.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(a,t)=>{FD.sendEvent(a,t)}}}const Ro=800;function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},pf(e)}function TSt(e,a){if(pf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function VSe(e){var a=TSt(e,"string");return pf(a)=="symbol"?a:a+""}function vx(e,a,t){return(a=VSe(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function HSe(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Xa(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?HSe(Object(t),!0).forEach(function(r){vx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HSe(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function BSt(e){if(Array.isArray(e))return e}function ESt(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function GD(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function FSe(e,a){if(e){if(typeof e=="string")return GD(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?GD(e,a):void 0}}function LSt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11779
|
+
`};return hwt(s.getText(),u,m).map(function(g){return Rd.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function lf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const BM=Uze({});let Wze=null;function Zze(e){Wze!==e&&(Wze=e,BM.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function Qze(e){const a=PM.create("stub.json","json",0,e),t=BM.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const Yze=Ai.define({create(){},update(e){return e}}),Xze=e=>e.field(Yze,!1),tzt=({store:e,isResponse:a,apiOperation:t})=>{const r=z$(e).data.get();let n=t?.body?.mediaTypes?.[_o.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[_o.JSON]?.schema)}return[Yze.init(()=>({schema:Pd(n||{}),store:e}))]};function rzt(){return async e=>{const{schema:a}=Xze(e.state)||{};if(!a)return[];Zze(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=Qze(t.toString());return(await BM.doValidation(r,n))?.map(i=>({from:BD(t,i.range.start),to:BD(t,i.range.end),message:i.message,severity:ozt[i.severity||3]}))}}const nzt=xu.highest(eb.of([{key:"Tab",run:e=>O0e(e)}]));function izt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=Xze(e.state)||{};if(!t)return a;Zze(t);const r=e.state.doc,n=BD.bind(null,r),{textDoc:i,jsonDoc:o}=Qze(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await BM.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||szt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:k=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let b=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-b.length;k.dispatch({changes:{from:n(y.start),to:n(y.end),insert:b}});const C=b.length-(y.end.character-y.start.character);k.dispatch({selection:sa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const ozt={1:"error",2:"warning",3:"info",4:"hint"};function BD(e,a){return e.line(a.line+1).from+a.character}function szt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const eSe=ht.define();function kb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const ED=e=>xn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=kb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=OA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=o_(d.match),k=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(k)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),lzt=Uze({});function czt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function uzt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const dzt=e=>xn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=PM.create("inmemory://model.json","json",0,r),d=lzt.parseJSONDocument(u)?.root;n=czt(d)?d:void 0}catch{n=void 0}const i=kb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=uzt(n);for(const u of c){if(!a.visibleRanges.some(k=>Math.max(k.from,u.from)<Math.min(k.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=OA(m);for(const k of g){const y=d+k.start,v=d+k.end;if(!(y>=v))if(k.prefix==="inputs"){const b=o_(k.match),z=!i?.find(C=>C.name===b)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[_o.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[ED]},[_o.JSON]:{name:"JSON",extensions:[vbt(),J1t(rzt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(eSe)))}),$1e.data.of({autocomplete:izt()}),nzt],stateExtensions:[tzt,dzt]},[_o.XML]:{name:"XML",extensions:[_1t()],stateExtensions:[ED]}},pzt={[_o.Image]:{name:"Image",extensions:[],stateExtensions:[]}},hzt={[_o.HTML]:{name:"HTML",extensions:[d1t()],stateExtensions:[ED]}},zh={...Eu,...pzt,...hzt},aSe={[_o.FormData]:{name:"form-data",extensions:void 0},[_o["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},tSe={[_o.Binary]:{name:"Binary",extensions:void 0}},cf={...Eu,...aSe,...tSe},mzt=Object.keys(Eu),LD=Object.keys(aSe),rSe=Object.keys(tSe);function nSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const hx={active:!0,key:"",value:""};function Sh(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),En(a.in)]}function mx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Jl(){return{id:crypto.randomUUID(),...hx}}function Ns(){return{id:crypto.randomUUID(),...hx,description:""}}function En(e){return{...hx,id:crypto.randomUUID(),in:e}}function uf(){return{id:crypto.randomUUID(),...hx,type:"text",files:null}}function _D(){return{id:crypto.randomUUID(),...hx,sendIn:Co.URL}}function RD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function EM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Ch(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function iSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function fzt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Ln(e=[],a={}){const t=[];for(const r of e)if(Hp(r)){const n=fzt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function jh(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function gzt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const oSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Jl()],tokenRequestExtraParams:[_D()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ns()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ns()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ns()]}},vzt={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:tl.Header,name:"",key:""},[qe.OAuth2]:oSe,[qe.OpenIDConnect]:{...oSe,openIdConnectUrl:"",userInfoUrl:""}},ND="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",bzt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function LM(){return structuredClone({type:Gi.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[uf()],"application/x-www-form-urlencoded":[uf()]},binary:null})}const yzt={method:"GET",url:"",security:[Lu()],body:LM(),queryParameters:[Jl()],headers:[Jl()],cookies:[Jl()],pathParameters:[Jl()]};function sSe(){return structuredClone(yzt)}function Lu(){return Pd(vzt)}function kzt(e){return Pd({id:crypto.randomUUID(),...bzt[e]})}function lSe(e,a,t){for(const r of t){const n=cSe(e,r),i=cSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!lSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function cSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function xzt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function wzt(e,a){return e.every(t=>a.includes(t))}function zzt(e){switch(e){case"query":return tl.Query;case"cookie":return tl.Cookie;case"header":return tl.Header;default:return}}function Szt(e,a,t){const{security:r}=a,n=Ect(e);if(!t)return!1;const i=DD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!xzt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||lSe(c,m,jzt(u,d)),k=Czt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&k);l.push(!t.security?.length||y)}),l.includes(!1)}function Czt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=EM(e[qe.OAuth2][t]?.scopes,r);return wzt(i,n)}return!0}function jzt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...Ozt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function Ozt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function Azt(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function Pzt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push($D(o))}),{id:n,security:i}});return a.length?t:[]}function Mzt(e,a){const t=e.security||[];return t?.length?hSe(t).map((r,n)=>$D(r)):[]}function DD(e){const a=(e.security||[])[0];return a?a.map(t=>$D(t)):[Lu()]}function $D(e,a){const t={...Lu(),securitySchemeId:e.id},r=_M(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=bn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=bn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=bn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=bn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=bn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=bn(n+tt.APIKey);const i=zzt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=VD(e),o=bn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=bn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=bn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...jh(e.flows?.authorizationCode?.scopes||{})||[],Ns()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=bn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=bn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...jh(e.flows?.authorizationCode?.scopes||{}),Ns()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=bn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=bn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...jh(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=bn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=bn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...jh(e.flows?.clientCredentials?.scopes||{}),Ns()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=bn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...jh(e.flows?.implicit?.scopes||{}),Ns()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=bn(n+tt.ClientId),s[We.Password].clientSecret=bn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...jh(e.flows?.password?.scopes||{}),Ns()])})}if(r===qe.OpenIDConnect){const i=bn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=bn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=bn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=bn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=bn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=bn(n+tt.ClientId))}return t}function Tzt(e,a="",t){const r=nSe(e.parameters,"in"),n=uSe(e),i=DD(e),o=Sh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Sh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:mx(gzt(e.path),o),headers:Sh(r.header||[],{in:"header"}),queryParameters:o,cookies:Sh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function ID(e){const a=nSe(e.parameters,"in"),t=uSe(e),r=DD(e);return{parameters:{queryParameters:Sh(a.query||[],{in:"query"}),headers:Sh(a.header||[],{in:"header"}),cookies:Sh(a.cookie||[],{in:"cookie"}),pathParameters:Sh(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function uSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return LM();const t=Bzt(a,e),r=t?.name||"",n=!LD.includes(r)&&!rSe.includes(r),i=KD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...LM(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":pSe(a[_o.FormData]),"application/x-www-form-urlencoded":pSe(a[_o["application/x-www-form-urlencoded"]])}}}function dSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...cf}:cf}function pSe(e){if(!e)return[uf()];if(!e.parameters)return[uf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(uf()),a}function KD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:am(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function Bzt(e,a){const t=dSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function Ezt(e){return!e?.security?.length||!e?[]:Mzt(e)}function hSe(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function _M(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 Lzt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===ND)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function _zt(e,a){const t=e?.security;if(!t?.length)return[];const r=Azt(t).flat().filter(n=>n.schemeId===a).find(n=>_M(n)===qe.OAuth2);return VD(r)}function VD(e){return Object.entries(e?.flows||{}).map(([a,t])=>Lzt(a,t)).filter(Boolean)}async function fx(e){try{const a=await Fht(e),t=await ube(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function mSe(e){return(await Promise.allSettled(e.map(a=>fx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function Rzt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await Nzt({projectPath:r,apiUrl:l.url,collectionId:a})}))),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:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:CSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:zSe(l.outputs),security:kSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=CSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=mx(d.url,u.queryParameters.filter(Bre)));const p=Dzt(c,o,n);let m;if(p&&i){const k=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,k)}delete c.operationId,delete c["x-operation"];const g=await Fzt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:zSe(c.outputs),successCriteria:c.successCriteria?.map(k=>({...k,type:k.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:kSe(c["x-security"],m),operation:p}}))})))}}async function Nzt({projectPath:e,apiUrl:a,collectionId:t}){if(sbe(a))return a;if(await Hn.isAbsolute(a))return await Hn.relative(e,a);const r=await Hn.resolve(await Hn.join(e,t,"..",a));return await Hn.relative(e,r)}function Dzt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=gSe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=$zt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=qzt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function $zt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function fSe(e){return"reference"in e&&typeof e.reference=="string"}function gSe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function Izt(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 vSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function Kzt(e){return{query:tl.Query,header:tl.Header,cookie:tl.Cookie}[e.toLowerCase()]||tl.Header}function Vzt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function bSe(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=vSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:df(e[n].availableScopes),scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:df(e[n].availableScopes),scopes:df(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function ySe(e,a,t){const r={...Lu(),securityType:e},n=Object.keys(a.flows||{})[0],i=vSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:Kzt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...bSe(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:xSe(t.authRequestExtraParams),tokenRequestExtraParams:wSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...bSe(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:xSe(t.authRequestExtraParams),tokenRequestExtraParams:wSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function Hzt(e,a){return[...e.map(t=>{if("scheme"in t){const n=Izt(t.scheme);return ySe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=_M(r),i=ySe(n,r,t.values);return i.securitySchemeId=r.id,i}return Lu()})]}function kSe(e=[],a){const t=hSe(a?.security||[]);return e.length?Hzt(e,t):[Lu()]}function df(e,a){const t=jh(e||{}),r=jh(a||{});return[...t,...r,Ns()]}function xSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Jl())}function wSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:Vzt(a.in)})).concat(_D())}function zSe(e){if(!e)return[Jl()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Jl()),a}const RM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function SSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function CSe(e,a,t){if(!e&&!a)return{pathParameters:[En("path")],queryParameters:[En("query")],headers:[En("header")],cookies:[En("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(fSe(n)){const i=SSe(n,t),o=RM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[RM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(fSe(n)){const i=SSe(n,t),o=RM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[RM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(En("path")),r.queryParameters.push(En("query")),r.headers.push(En("header")),r.cookies.push(En("cookie")),r}async function Fzt(e,a){const t=sSe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await Gzt(e,a)};case"application/octet-stream":const r=e.payload?await ASe(e.payload,a):[],n=r.length>0?await fx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:OSe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:OSe(e.payload)}}}}async function jSe(e,a,t,r){const n=await ASe(a,r),i=n.length>0||Array.isArray(a),o=i?await mSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function Gzt(e,a){const t=sSe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>jSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>jSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,uf()]}}function OSe(e){return e?JSON.stringify(e,null,2):""}function qzt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];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:t}}}return null}async function ASe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>PSe(t,a)))).flat():typeof e=="string"?await PSe(e,a):[]}async function PSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>Jzt(n[1],a)))}async function Jzt(e,a){return await Hn.isAbsolute(e)?e:await Hn.resolve(await Hn.join(a,e))}const ps=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},MSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=ps(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},Uzt=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},Wzt=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},Zzt=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function TSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function BSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(Hp(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function Qzt(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function Yzt(e){if(!(!e||e.length===0))return[...e]}async function ESe(e,a){return e.absolutePath?`$file('${await Hn.relative(a,e.absolutePath)}')`:null}async function Xzt(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>ESe(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function eSt(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await Xzt(o,a);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 aSt(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function tSt(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await eSt(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await ESe(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:aSt(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function rSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function nSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function iSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function oSt(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function sSt(e){const{flows:a,values:t}=RSe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:LSe(e.authRequestExtraParams),tokenRequestExtraParams:_Se(e.tokenRequestExtraParams)}}}function lSt(e){const{flows:a,values:t}=RSe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:LSe(e.authRequestExtraParams),tokenRequestExtraParams:_Se(e.tokenRequestExtraParams)}}}function xb(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function LSe(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function _Se(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function RSe(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...xb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...xb(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...xb(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...xb(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...xb(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...xb(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function NSe(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return sSt(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return lSt(r)}case qe.APIKey:{const r=t[qe.APIKey];return nSt(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return rSt(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return oSt(r)}case qe.JWT:{const r=t[qe.JWT];return iSt(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function cSt(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function uSt(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:cSt(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:k,...y})=>({...y,dependsOn:Yzt(d),outputs:TSe(p),inputs:k?ps(k):void 0,...NSe(u),...BSe(c),steps:await Promise.all(g.map(async({parameters:v,security:b,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const _={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;_.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else _.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(_["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,..._,...NSe(b),...BSe(v),requestBody:await tSt(C,a),successCriteria:Qzt(w),outputs:TSe(S)}}))})))}}}class dSt extends gbe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return Rzt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await uSt(a,this.storage.baseDir);return await Hn.extname(a.id)===".json"?JSON.stringify(t,null,2):md.dump(t)}}class pSt{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=md.load(a),n=t?JSON.parse(t):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(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.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 hSt{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const mSt=(e,a)=>({data:e,version:a});class HD extends hSt{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(mSt(a,this.version))}}function fSt(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const DSe=2,gSt="tabs.json";class vSt extends HD{migrationMap={1:fSt};constructor(a){super(a,gSt,Pd(ibe),DSe)}async parse(a){let t=JSON.parse(a);t.version!==DSe&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await $Se(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await $Se(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await fx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function $Se(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await mSe(r)}return t}))}const bSt=1,ySt=1;class kSt{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Uht(this.project.id),this.systemFilesStorage=this.isTauriApp?new fbe(this.project.systemFilesDir):new lbe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new fbe(this.project.userFilesDir):new lbe(this.project.userFilesDir);const r=new Iht;this.historyStorage=new HD(this.systemFilesStorage,"history.json",[],bSt),this.activeEnvironmentIdStorage=new HD(this.systemFilesStorage,"active_environment_id.json",x0,ySt),this.tabsStateStorage=new vSt(this.systemFilesStorage),this.environmentsStorage=new pSt(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new dSt(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Wht(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Hv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=md.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?t.push({uri:i,type:fu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:fu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&sbe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{let n="";try{const i=await gu(ACe({proxyUrl:Xve,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=md.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&t.push({uri:r,type:fu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function xSt(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new kSt(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function wSt({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Pd(ibe),activeEnvironmentId:x0,environments:e||nbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:mu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const zSt=nia(wSt(),iia(_ht({key:"replay-root-store"}),xSt())),ISe=R.createContext(zSt);function Ft(){const e=R.useContext(ISe);return Mre(e)}function SSt(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const CSt=SSt(),jSt=R.createContext(CSt);function Nd(){const e=R.useContext(jSt);return Mre(e)}function OSt(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Nd();r.set(e?.corsProxyUrl??Xve),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const KSe=R.createContext({});function gx(){return R.useContext(KSe)||{}}const ASt="0.18.0-next.11",PSt={version:ASt};class MSt{client;_isInitialized=!1;constructor(){this.client=new Mht}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t={serviceName:"replay",serviceVersion:PSt.version,version:"1.0.0",tracerName:a?.tracerName||"desktop",collectorUrl:a?.collectorUrl||"",isProd:!0};this.client.init({otel:{...t,...a}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const FD=new MSt;function Tt(){const{telemetry:e}=gx();return FD.isInitialized||FD.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(a,t)=>{FD.sendEvent(a,t)}}}const Ro=800;function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},pf(e)}function TSt(e,a){if(pf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function VSe(e){var a=TSt(e,"string");return pf(a)=="symbol"?a:a+""}function vx(e,a,t){return(a=VSe(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function HSe(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Xa(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?HSe(Object(t),!0).forEach(function(r){vx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HSe(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function BSt(e){if(Array.isArray(e))return e}function ESt(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function GD(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function FSe(e,a){if(e){if(typeof e=="string")return GD(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?GD(e,a):void 0}}function LSt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11775
11780
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dd(e,a){return BSt(e)||ESt(e,a)||FSe(e,a)||LSt()}function _St(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}function $d(e,a){if(e==null)return{};var t,r,n=_St(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var RSt=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function NSt(e){var a=e.defaultInputValue,t=a===void 0?"":a,r=e.defaultMenuIsOpen,n=r===void 0?!1:r,i=e.defaultValue,o=i===void 0?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,g=$d(e,RSt),k=R.useState(s!==void 0?s:t),y=Dd(k,2),v=y[0],b=y[1],z=R.useState(l!==void 0?l:n),C=Dd(z,2),w=C[0],S=C[1],O=R.useState(m!==void 0?m:o),A=Dd(O,2),B=A[0],_=A[1],q=R.useCallback(function(ne,me){typeof c=="function"&&c(ne,me),_(ne)},[c]),N=R.useCallback(function(ne,me){var I;typeof u=="function"&&(I=u(ne,me)),b(I!==void 0?I:ne)},[u]),U=R.useCallback(function(){typeof p=="function"&&p(),S(!0)},[p]),D=R.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),X=s!==void 0?s:v,te=l!==void 0?l:w,ue=m!==void 0?m:B;return Xa(Xa({},g),{},{inputValue:X,menuIsOpen:te,onChange:q,onInputChange:N,onMenuClose:D,onMenuOpen:U,value:ue})}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ot.apply(null,arguments)}function DSt(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function GSe(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VSe(r.key),r)}}function $St(e,a,t){return a&&GSe(e.prototype,a),t&&GSe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qD(e,a){return qD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},qD(e,a)}function ISt(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&qD(e,a)}function NM(e){return NM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},NM(e)}function qSe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qSe=function(){return!!e})()}function KSt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VSt(e,a){if(a&&(pf(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KSt(e)}function HSt(e){var a=qSe();return function(){var t,r=NM(e);if(a){var n=NM(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return VSt(this,t)}}function FSt(e){if(Array.isArray(e))return GD(e)}function GSt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qSt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11776
11781
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JD(e){return FSt(e)||GSt(e)||FSe(e)||qSt()}function JSt(e){if(e.sheet)return e.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===e)return document.styleSheets[a]}function USt(e){var a=document.createElement("style");return a.setAttribute("data-emotion",e.key),e.nonce!==void 0&&a.setAttribute("nonce",e.nonce),a.appendChild(document.createTextNode("")),a.setAttribute("data-s",""),a}var WSt=(function(){function e(t){var r=this;this._insertTag=function(n){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(n,i),r.tags.push(n)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var a=e.prototype;return a.hydrate=function(t){t.forEach(this._insertTag)},a.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(USt(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=JSt(r);try{n.insertRule(t,n.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(t));this.ctr++},a.flush=function(){this.tags.forEach(function(t){return t.parentNode&&t.parentNode.removeChild(t)}),this.tags=[],this.ctr=0},e})(),No="-ms-",DM="-moz-",br="-webkit-",JSe="comm",UD="rule",WD="decl",ZSt="@import",USe="@keyframes",QSt=Math.abs,$M=String.fromCharCode,YSt=Object.assign;function XSt(e,a){return oo(e,0)^45?(((a<<2^oo(e,0))<<2^oo(e,1))<<2^oo(e,2))<<2^oo(e,3):0}function WSe(e){return e.trim()}function e2t(e,a){return(e=a.exec(e))?e[0]:e}function Cr(e,a,t){return e.replace(a,t)}function ZD(e,a){return e.indexOf(a)}function oo(e,a){return e.charCodeAt(a)|0}function bx(e,a,t){return e.slice(a,t)}function _u(e){return e.length}function QD(e){return e.length}function IM(e,a){return a.push(e),e}function a2t(e,a){return e.map(a).join("")}var KM=1,wb=1,ZSe=0,Ds=0,gi=0,zb="";function VM(e,a,t,r,n,i,o){return{value:e,root:a,parent:t,type:r,props:n,children:i,line:KM,column:wb,length:o,return:""}}function yx(e,a){return YSt(VM("",null,null,"",null,null,0),e,{length:-e.length},a)}function t2t(){return gi}function r2t(){return gi=Ds>0?oo(zb,--Ds):0,wb--,gi===10&&(wb=1,KM--),gi}function ml(){return gi=Ds<ZSe?oo(zb,Ds++):0,wb++,gi===10&&(wb=1,KM++),gi}function Ru(){return oo(zb,Ds)}function HM(){return Ds}function kx(e,a){return bx(zb,e,a)}function xx(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function QSe(e){return KM=wb=1,ZSe=_u(zb=e),Ds=0,[]}function YSe(e){return zb="",e}function FM(e){return WSe(kx(Ds-1,YD(e===91?e+2:e===40?e+1:e)))}function n2t(e){for(;(gi=Ru())&&gi<33;)ml();return xx(e)>2||xx(gi)>3?"":" "}function i2t(e,a){for(;--a&&ml()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return kx(e,HM()+(a<6&&Ru()==32&&ml()==32))}function YD(e){for(;ml();)switch(gi){case e:return Ds;case 34:case 39:e!==34&&e!==39&&YD(gi);break;case 40:e===41&&YD(e);break;case 92:ml();break}return Ds}function o2t(e,a){for(;ml()&&e+gi!==57&&!(e+gi===84&&Ru()===47););return"/*"+kx(a,Ds-1)+"*"+$M(e===47?e:ml())}function s2t(e){for(;!xx(Ru());)ml();return kx(e,Ds)}function l2t(e){return YSe(GM("",null,null,null,[""],e=QSe(e),0,[0],e))}function GM(e,a,t,r,n,i,o,s,l){for(var c=0,u=0,d=o,p=0,m=0,g=0,k=1,y=1,v=1,b=0,z="",C=n,w=i,S=r,O=z;y;)switch(g=b,b=ml()){case 40:if(g!=108&&oo(O,d-1)==58){ZD(O+=Cr(FM(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=FM(b);break;case 9:case 10:case 13:case 32:O+=n2t(g);break;case 92:O+=i2t(HM()-1,7);continue;case 47:switch(Ru()){case 42:case 47:IM(c2t(o2t(ml(),HM()),a,t),l);break;default:O+="/"}break;case 123*k:s[c++]=_u(O)*v;case 125*k:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:m>0&&_u(O)-d&&IM(m>32?e2e(O+";",r,t,d-1):e2e(Cr(O," ","")+";",r,t,d-2),l);break;case 59:O+=";";default:if(IM(S=XSe(O,a,t,c,u,n,s,z,C=[],w=[],d),i),b===123)if(u===0)GM(O,a,S,S,C,i,d,s,w);else switch(p===99&&oo(O,3)===110?100:p){case 100:case 109:case 115:GM(e,S,S,r&&IM(XSe(e,S,S,0,0,n,s,z,n,C=[],d),w),n,w,d,s,r?C:w);break;default:GM(O,S,S,S,[""],w,0,s,w)}}c=u=m=0,k=v=1,z=O="",d=o;break;case 58:d=1+_u(O),m=g;default:if(k<1){if(b==123)--k;else if(b==125&&k++==0&&r2t()==125)continue}switch(O+=$M(b),b*k){case 38:v=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(_u(O)-1)*v,v=1;break;case 64:Ru()===45&&(O+=FM(ml())),p=Ru(),u=d=_u(z=O+=s2t(HM())),b++;break;case 45:g===45&&_u(O)==2&&(k=0)}}return i}function XSe(e,a,t,r,n,i,o,s,l,c,u){for(var d=n-1,p=n===0?i:[""],m=QD(p),g=0,k=0,y=0;g<r;++g)for(var v=0,b=bx(e,d+1,d=QSt(k=o[g])),z=e;v<m;++v)(z=WSe(k>0?p[v]+" "+b:Cr(b,/&\f/g,p[v])))&&(l[y++]=z);return VM(e,a,t,n===0?UD:s,l,c,u)}function c2t(e,a,t){return VM(e,a,t,JSe,$M(t2t()),bx(e,2,-2),0)}function e2e(e,a,t,r){return VM(e,a,t,WD,bx(e,0,r),bx(e,r+1,-1),r)}function Sb(e,a){for(var t="",r=QD(e),n=0;n<r;n++)t+=a(e[n],n,e,a)||"";return t}function u2t(e,a,t,r){switch(e.type){case ZSt:case WD:return e.return=e.return||e.value;case JSe:return"";case USe:return e.return=e.value+"{"+Sb(e.children,r)+"}";case UD:e.value=e.props.join(",")}return _u(t=Sb(e.children,r))?e.return=e.value+"{"+t+"}":""}function d2t(e){var a=QD(e);return function(t,r,n,i){for(var o="",s=0;s<a;s++)o+=e[s](t,r,n,i)||"";return o}}function p2t(e){return function(a){a.root||(a=a.return)&&e(a)}}function h2t(e){var a=Object.create(null);return function(t){return a[t]===void 0&&(a[t]=e(t)),a[t]}}var m2t=function(e,a,t){for(var r=0,n=0;r=n,n=Ru(),r===38&&n===12&&(a[t]=1),!xx(n);)ml();return kx(e,Ds)},f2t=function(e,a){var t=-1,r=44;do switch(xx(r)){case 0:r===38&&Ru()===12&&(a[t]=1),e[t]+=m2t(Ds-1,a,t);break;case 2:e[t]+=FM(r);break;case 4:if(r===44){e[++t]=Ru()===58?"&\f":"",a[t]=e[t].length;break}default:e[t]+=$M(r)}while(r=ml());return e},g2t=function(e,a){return YSe(f2t(QSe(e),a))},a2e=new WeakMap,v2t=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var a=e.value,t=e.parent,r=e.column===t.column&&e.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(e.props.length===1&&a.charCodeAt(0)!==58&&!a2e.get(t))&&!r){a2e.set(e,!0);for(var n=[],i=g2t(a,n),o=t.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=n[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},b2t=function(e){if(e.type==="decl"){var a=e.value;a.charCodeAt(0)===108&&a.charCodeAt(2)===98&&(e.return="",e.value="")}};function t2e(e,a){switch(XSt(e,a)){case 5103:return br+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return br+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return br+e+DM+e+No+e+e;case 6828:case 4268:return br+e+No+e+e;case 6165:return br+e+No+"flex-"+e+e;case 5187:return br+e+Cr(e,/(\w+).+(:[^]+)/,br+"box-$1$2"+No+"flex-$1$2")+e;case 5443:return br+e+No+"flex-item-"+Cr(e,/flex-|-self/,"")+e;case 4675:return br+e+No+"flex-line-pack"+Cr(e,/align-content|flex-|-self/,"")+e;case 5548:return br+e+No+Cr(e,"shrink","negative")+e;case 5292:return br+e+No+Cr(e,"basis","preferred-size")+e;case 6060:return br+"box-"+Cr(e,"-grow","")+br+e+No+Cr(e,"grow","positive")+e;case 4554:return br+Cr(e,/([^-])(transform)/g,"$1"+br+"$2")+e;case 6187:return Cr(Cr(Cr(e,/(zoom-|grab)/,br+"$1"),/(image-set)/,br+"$1"),e,"")+e;case 5495:case 3959:return Cr(e,/(image-set\([^]*)/,br+"$1$`$1");case 4968:return Cr(Cr(e,/(.+:)(flex-)?(.*)/,br+"box-pack:$3"+No+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+br+e+e;case 4095:case 3583:case 4068:case 2532:return Cr(e,/(.+)-inline(.+)/,br+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_u(e)-1-a>6)switch(oo(e,a+1)){case 109:if(oo(e,a+4)!==45)break;case 102:return Cr(e,/(.+:)(.+)-([^]+)/,"$1"+br+"$2-$3$1"+DM+(oo(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~ZD(e,"stretch")?t2e(Cr(e,"stretch","fill-available"),a)+e:e}break;case 4949:if(oo(e,a+1)!==115)break;case 6444:switch(oo(e,_u(e)-3-(~ZD(e,"!important")&&10))){case 107:return Cr(e,":",":"+br)+e;case 101:return Cr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+br+(oo(e,14)===45?"inline-":"")+"box$3$1"+br+"$2$3$1"+No+"$2box$3")+e}break;case 5936:switch(oo(e,a+11)){case 114:return br+e+No+Cr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return br+e+No+Cr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return br+e+No+Cr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return br+e+No+e+e}return e}var y2t=function(e,a,t,r){if(e.length>-1&&!e.return)switch(e.type){case WD:e.return=t2e(e.value,e.length);break;case USe:return Sb([yx(e,{value:Cr(e.value,"@","@"+br)})],r);case UD:if(e.length)return a2t(e.props,function(n){switch(e2t(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Sb([yx(e,{props:[Cr(n,/:(read-\w+)/,":"+DM+"$1")]})],r);case"::placeholder":return Sb([yx(e,{props:[Cr(n,/:(plac\w+)/,":"+br+"input-$1")]}),yx(e,{props:[Cr(n,/:(plac\w+)/,":"+DM+"$1")]}),yx(e,{props:[Cr(n,/:(plac\w+)/,No+"input-$1")]})],r)}return""})}},k2t=[y2t],x2t=function(e){var a=e.key;if(a==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(g){var k=g.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||k2t,n={},i,o=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(g){for(var k=g.getAttribute("data-emotion").split(" "),y=1;y<k.length;y++)n[k[y]]=!0;o.push(g)});var s,l=[v2t,b2t];{var c,u=[u2t,p2t(function(g){c.insert(g)})],d=d2t(l.concat(r,u)),p=function(g){return Sb(l2t(g),d)};s=function(g,k,y,v){c=y,p(g?g+"{"+k.styles+"}":k.styles),v&&(m.inserted[k.name]=!0)}}var m={key:a,sheet:new WSt({key:a,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:s};return m.sheet.hydrate(o),m},w2t=!0;function z2t(e,a,t){var r="";return t.split(" ").forEach(function(n){e[n]!==void 0?a.push(e[n]+";"):r+=n+" "}),r}var r2e=function(e,a,t){var r=e.key+"-"+a.name;(t===!1||w2t===!1)&&e.registered[r]===void 0&&(e.registered[r]=a.styles)},S2t=function(e,a,t){r2e(e,a,t);var r=e.key+"-"+a.name;if(e.inserted[a.name]===void 0){var n=a;do e.insert(a===n?"."+r:"",n,e.sheet,!0),n=n.next;while(n!==void 0)}};function C2t(e){for(var a=0,t,r=0,n=e.length;n>=4;++r,n-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,a=(t&65535)*1540483477+((t>>>16)*59797<<16)^(a&65535)*1540483477+((a>>>16)*59797<<16);switch(n){case 3:a^=(e.charCodeAt(r+2)&255)<<16;case 2:a^=(e.charCodeAt(r+1)&255)<<8;case 1:a^=e.charCodeAt(r)&255,a=(a&65535)*1540483477+((a>>>16)*59797<<16)}return a^=a>>>13,a=(a&65535)*1540483477+((a>>>16)*59797<<16),((a^a>>>15)>>>0).toString(36)}var j2t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},O2t=/[A-Z]|^ms/g,A2t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,n2e=function(e){return e.charCodeAt(1)===45},i2e=function(e){return e!=null&&typeof e!="boolean"},XD=h2t(function(e){return n2e(e)?e:e.replace(O2t,"-$&").toLowerCase()}),o2e=function(e,a){switch(e){case"animation":case"animationName":if(typeof a=="string")return a.replace(A2t,function(t,r,n){return Nu={name:r,styles:n,next:Nu},r})}return j2t[e]!==1&&!n2e(e)&&typeof a=="number"&&a!==0?a+"px":a};function wx(e,a,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Nu={name:t.name,styles:t.styles,next:Nu},t.name;if(t.styles!==void 0){var r=t.next;if(r!==void 0)for(;r!==void 0;)Nu={name:r.name,styles:r.styles,next:Nu},r=r.next;var n=t.styles+";";return n}return P2t(e,a,t)}case"function":{if(e!==void 0){var i=Nu,o=t(e);return Nu=i,wx(e,a,o)}break}}return t}function P2t(e,a,t){var r="";if(Array.isArray(t))for(var n=0;n<t.length;n++)r+=wx(e,a,t[n])+";";else for(var i in t){var o=t[i];if(typeof o!="object")i2e(o)&&(r+=XD(i)+":"+o2e(i,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&a==null)for(var s=0;s<o.length;s++)i2e(o[s])&&(r+=XD(i)+":"+o2e(i,o[s])+";");else{var l=wx(e,a,o);switch(i){case"animation":case"animationName":{r+=XD(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var s2e=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Nu,l2e=function(e,a,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,n="";Nu=void 0;var i=e[0];i==null||i.raw===void 0?(r=!1,n+=wx(t,a,i)):n+=i[0];for(var o=1;o<e.length;o++)n+=wx(t,a,e[o]),r&&(n+=i[o]);s2e.lastIndex=0;for(var s="",l;(l=s2e.exec(n))!==null;)s+="-"+l[1];var c=C2t(n)+s;return{name:c,styles:n,next:Nu}},M2t=function(e){return e()},T2t=Qh.useInsertionEffect?Qh.useInsertionEffect:!1,B2t=T2t||M2t,e$={}.hasOwnProperty,E2t=R.createContext(typeof HTMLElement<"u"?x2t({key:"css"}):null),L2t=function(e){return R.forwardRef(function(a,t){var r=R.useContext(E2t);return e(a,r,t)})},_2t=R.createContext({}),a$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",R2t=function(e,a){var t={};for(var r in a)e$.call(a,r)&&(t[r]=a[r]);return t[a$]=e,t},N2t=function(e){var a=e.cache,t=e.serialized,r=e.isStringTag;return r2e(a,t,r),B2t(function(){return S2t(a,t,r)}),null},D2t=L2t(function(e,a,t){var r=e.css;typeof r=="string"&&a.registered[r]!==void 0&&(r=a.registered[r]);var n=e[a$],i=[r],o="";typeof e.className=="string"?o=z2t(a.registered,i,e.className):e.className!=null&&(o=e.className+" ");var s=l2e(i,void 0,R.useContext(_2t));o+=a.key+"-"+s.name;var l={};for(var c in e)e$.call(e,c)&&c!=="css"&&c!==a$&&(l[c]=e[c]);return l.ref=t,l.className=o,R.createElement(R.Fragment,null,R.createElement(N2t,{cache:a,serialized:s,isStringTag:typeof n=="string"}),R.createElement(n,l))}),Qa=function(e,a){var t=arguments;if(a==null||!e$.call(a,"css"))return R.createElement.apply(void 0,t);var r=t.length,n=new Array(r);n[0]=D2t,n[1]=R2t(e,a);for(var i=2;i<r;i++)n[i]=t[i];return R.createElement.apply(null,n)};function t$(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return l2e(a)}var $2t=function(){var e=t$.apply(void 0,arguments),a="animation-"+e.name;return{name:a,styles:"@keyframes "+a+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function I2t(e,a){return a||(a=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(a)}}))}const K2t=Math.min,V2t=Math.max,qM=Math.round,JM=Math.floor,UM=e=>({x:e,y:e});function H2t(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function c2e(e){return d2e(e)?(e.nodeName||"").toLowerCase():"#document"}function Id(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function u2e(e){var a;return(a=(d2e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function d2e(e){return e instanceof Node||e instanceof Id(e).Node}function F2t(e){return e instanceof Element||e instanceof Id(e).Element}function r$(e){return e instanceof HTMLElement||e instanceof Id(e).HTMLElement}function p2e(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Id(e).ShadowRoot}function h2e(e){const{overflow:a,overflowX:t,overflowY:r,display:n}=n$(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+t)&&!["inline","contents"].includes(n)}function G2t(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function q2t(e){return["html","body","#document"].includes(c2e(e))}function n$(e){return Id(e).getComputedStyle(e)}function J2t(e){if(c2e(e)==="html")return e;const a=e.assignedSlot||e.parentNode||p2e(e)&&e.host||u2e(e);return p2e(a)?a.host:a}function m2e(e){const a=J2t(e);return q2t(a)?e.ownerDocument?e.ownerDocument.body:e.body:r$(a)&&h2e(a)?a:m2e(a)}function WM(e,a,t){var r;a===void 0&&(a=[]),t===void 0&&(t=!0);const n=m2e(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Id(n);return i?a.concat(o,o.visualViewport||[],h2e(n)?n:[],o.frameElement&&t?WM(o.frameElement):[]):a.concat(n,WM(n,[],t))}function U2t(e){const a=n$(e);let t=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const n=r$(e),i=n?e.offsetWidth:t,o=n?e.offsetHeight:r,s=qM(t)!==i||qM(r)!==o;return s&&(t=i,r=o),{width:t,height:r,$:s}}function i$(e){return F2t(e)?e:e.contextElement}function f2e(e){const a=i$(e);if(!r$(a))return UM(1);const t=a.getBoundingClientRect(),{width:r,height:n,$:i}=U2t(a);let o=(i?qM(t.width):t.width)/r,s=(i?qM(t.height):t.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const W2t=UM(0);function Z2t(e){const a=Id(e);return!G2t()||!a.visualViewport?W2t:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Q2t(e,a,t){return!1}function g2e(e,a,t,r){a===void 0&&(a=!1);const n=e.getBoundingClientRect(),i=i$(e);let o=UM(1);a&&(o=f2e(e));const s=Q2t()?Z2t(i):UM(0);let l=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(i){const p=Id(i),m=r;let g=p.frameElement;for(;g&&r&&m!==p;){const k=f2e(g),y=g.getBoundingClientRect(),v=n$(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*k.x,z=y.top+(g.clientTop+parseFloat(v.paddingTop))*k.y;l*=k.x,c*=k.y,u*=k.x,d*=k.y,l+=b,c+=z,g=Id(g).frameElement}}return H2t({width:u,height:d,x:l,y:c})}function Y2t(e,a){let t=null,r;const n=u2e(e);function i(){clearTimeout(r),t&&t.disconnect(),t=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||a(),!d||!p)return;const m=JM(u),g=JM(n.clientWidth-(c+d)),k=JM(n.clientHeight-(u+p)),y=JM(c),v={rootMargin:-m+"px "+-g+"px "+-k+"px "+-y+"px",threshold:V2t(0,K2t(1,l))||1};let b=!0;function z(C){const w=C[0].intersectionRatio;if(w!==l){if(!b)return o();w?o(!1,w):r=setTimeout(()=>{o(!1,1e-7)},100)}b=!1}try{t=new IntersectionObserver(z,{...v,root:n.ownerDocument})}catch{t=new IntersectionObserver(z,v)}t.observe(e)}return o(!0),i}function X2t(e,a,t,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=i$(e),u=n||i?[...c?WM(c):[],...WM(a)]:[];u.forEach(v=>{n&&v.addEventListener("scroll",t,{passive:!0}),i&&v.addEventListener("resize",t)});const d=c&&s?Y2t(c,t):null;let p=-1,m=null;o&&(m=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&m&&(m.unobserve(a),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(a)})),t()}),c&&!l&&m.observe(c),m.observe(a));let g,k=l?g2e(e):null;l&&y();function y(){const v=g2e(e);k&&(v.x!==k.x||v.y!==k.y||v.width!==k.width||v.height!==k.height)&&t(),k=v,g=requestAnimationFrame(y)}return t(),()=>{u.forEach(v=>{n&&v.removeEventListener("scroll",t),i&&v.removeEventListener("resize",t)}),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(g)}}var o$=R.useLayoutEffect,eCt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ZM=function(){};function aCt(e,a){return a?a[0]==="-"?e+a:e+"__"+a:e}function tCt(e,a){for(var t=arguments.length,r=new Array(t>2?t-2:0),n=2;n<t;n++)r[n-2]=arguments[n];var i=[].concat(r);if(a&&e)for(var o in a)a.hasOwnProperty(o)&&a[o]&&i.push("".concat(aCt(e,o)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var v2e=function(e){return dCt(e)?e.filter(Boolean):pf(e)==="object"&&e!==null?[e]:[]},b2e=function(e){var a=$d(e,eCt);return Xa({},a)},Vn=function(e,a,t){var r=e.cx,n=e.getStyles,i=e.getClassNames,o=e.className;return{css:n(a,e),className:r(t??{},i(a,e),o)}};function QM(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function rCt(e){return QM(e)?window.innerHeight:e.clientHeight}function y2e(e){return QM(e)?window.pageYOffset:e.scrollTop}function YM(e,a){if(QM(e)){window.scrollTo(0,a);return}e.scrollTop=a}function nCt(e){var a=getComputedStyle(e),t=a.position==="absolute",r=/(auto|scroll)/;if(a.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(a=getComputedStyle(n),!(t&&a.position==="static")&&r.test(a.overflow+a.overflowY+a.overflowX))return n;return document.documentElement}function iCt(e,a,t,r){return t*((e=e/r-1)*e*e+1)+a}function XM(e,a){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ZM,n=y2e(e),i=a-n,o=10,s=0;function l(){s+=o;var c=iCt(s,n,i,t);YM(e,c),s<t?window.requestAnimationFrame(l):r(e)}l()}function k2e(e,a){var t=e.getBoundingClientRect(),r=a.getBoundingClientRect(),n=a.offsetHeight/3;r.bottom+n>t.bottom?YM(e,Math.min(a.offsetTop+a.clientHeight-e.offsetHeight+n,e.scrollHeight)):r.top-n<t.top&&YM(e,Math.max(a.offsetTop-n,0))}function oCt(e){var a=e.getBoundingClientRect();return{bottom:a.bottom,height:a.height,left:a.left,right:a.right,top:a.top,width:a.width}}function x2e(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function sCt(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var w2e=!1,lCt={get passive(){return w2e=!0}},e5=typeof window<"u"?window:{};e5.addEventListener&&e5.removeEventListener&&(e5.addEventListener("p",ZM,lCt),e5.removeEventListener("p",ZM,!1));var cCt=w2e;function uCt(e){return e!=null}function dCt(e){return Array.isArray(e)}function a5(e,a,t){return e?a:t}var pCt=function(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r<a;r++)t[r-1]=arguments[r];var n=Object.entries(e).filter(function(i){var o=Dd(i,1),s=o[0];return!t.includes(s)});return n.reduce(function(i,o){var s=Dd(o,2),l=s[0],c=s[1];return i[l]=c,i},{})},hCt=["children","innerProps"],mCt=["children","innerProps"];function fCt(e){var a=e.maxHeight,t=e.menuEl,r=e.minHeight,n=e.placement,i=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=nCt(t),c={placement:"bottom",maxHeight:a};if(!t||!t.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,p=t.getBoundingClientRect(),m=p.bottom,g=p.height,k=p.top,y=t.offsetParent.getBoundingClientRect(),v=y.top,b=o?window.innerHeight:rCt(l),z=y2e(l),C=parseInt(getComputedStyle(t).marginBottom,10),w=parseInt(getComputedStyle(t).marginTop,10),S=v-w,O=b-k,A=S+z,B=d-z-k,_=m-b+z+C,q=z+k-w,N=160;switch(n){case"auto":case"bottom":if(O>=g)return{placement:"bottom",maxHeight:a};if(B>=g&&!o)return i&&XM(l,_,N),{placement:"bottom",maxHeight:a};if(!o&&B>=r||o&&O>=r){i&&XM(l,_,N);var U=o?O-C:B-C;return{placement:"bottom",maxHeight:U}}if(n==="auto"||o){var D=a,X=o?S:A;return X>=r&&(D=Math.min(X-C-s,a)),{placement:"top",maxHeight:D}}if(n==="bottom")return i&&YM(l,_),{placement:"bottom",maxHeight:a};break;case"top":if(S>=g)return{placement:"top",maxHeight:a};if(A>=g&&!o)return i&&XM(l,q,N),{placement:"top",maxHeight:a};if(!o&&A>=r||o&&S>=r){var te=a;return(!o&&A>=r||o&&S>=r)&&(te=o?S-w:A-w),i&&XM(l,q,N),{placement:"top",maxHeight:te}}return{placement:"bottom",maxHeight:a};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return c}function gCt(e){var a={bottom:"top",top:"bottom"};return e?a[e]:"bottom"}var z2e=function(e){return e==="auto"?"bottom":e},vCt=function(e,a){var t,r=e.placement,n=e.theme,i=n.borderRadius,o=n.spacing,s=n.colors;return Xa((t={label:"menu"},vx(t,gCt(r),"100%"),vx(t,"position","absolute"),vx(t,"width","100%"),vx(t,"zIndex",1),t),a?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},S2e=R.createContext(null),bCt=function(e){var a=e.children,t=e.minMenuHeight,r=e.maxMenuHeight,n=e.menuPlacement,i=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,l=R.useContext(S2e)||{},c=l.setPortalPlacement,u=R.useRef(null),d=R.useState(r),p=Dd(d,2),m=p[0],g=p[1],k=R.useState(null),y=Dd(k,2),v=y[0],b=y[1],z=s.spacing.controlHeight;return o$(function(){var C=u.current;if(C){var w=i==="fixed",S=o&&!w,O=fCt({maxHeight:r,menuEl:C,minHeight:t,placement:n,shouldScroll:S,isFixedPosition:w,controlHeight:z});g(O.maxHeight),b(O.placement),c?.(O.placement)}},[r,n,i,o,t,c,z]),a({ref:u,placerProps:Xa(Xa({},e),{},{placement:v||z2e(n),maxHeight:m})})},yCt=function(e){var a=e.children,t=e.innerRef,r=e.innerProps;return Qa("div",ot({},Vn(e,"menu",{menu:!0}),{ref:t},r),a)},kCt=yCt,xCt=function(e,a){var t=e.maxHeight,r=e.theme.spacing.baseUnit;return Xa({maxHeight:t,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},a?{}:{paddingBottom:r,paddingTop:r})},wCt=function(e){var a=e.children,t=e.innerProps,r=e.innerRef,n=e.isMulti;return Qa("div",ot({},Vn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":n}),{ref:r},t),a)},C2e=function(e,a){var t=e.theme,r=t.spacing.baseUnit,n=t.colors;return Xa({textAlign:"center"},a?{}:{color:n.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},zCt=C2e,SCt=C2e,CCt=function(e){var a=e.children,t=a===void 0?"No options":a,r=e.innerProps,n=$d(e,hCt);return Qa("div",ot({},Vn(Xa(Xa({},n),{},{children:t,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),t)},jCt=function(e){var a=e.children,t=a===void 0?"Loading...":a,r=e.innerProps,n=$d(e,mCt);return Qa("div",ot({},Vn(Xa(Xa({},n),{},{children:t,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),t)},OCt=function(e){var a=e.rect,t=e.offset,r=e.position;return{left:a.left,position:r,top:t,width:a.width,zIndex:1}},ACt=function(e){var a=e.appendTo,t=e.children,r=e.controlElement,n=e.innerProps,i=e.menuPlacement,o=e.menuPosition,s=R.useRef(null),l=R.useRef(null),c=R.useState(z2e(i)),u=Dd(c,2),d=u[0],p=u[1],m=R.useMemo(function(){return{setPortalPlacement:p}},[]),g=R.useState(null),k=Dd(g,2),y=k[0],v=k[1],b=R.useCallback(function(){if(r){var S=oCt(r),O=o==="fixed"?0:window.pageYOffset,A=S[d]+O;(A!==y?.offset||S.left!==y?.rect.left||S.width!==y?.rect.width)&&v({offset:A,rect:S})}},[r,o,d,y?.offset,y?.rect.left,y?.rect.width]);o$(function(){b()},[b]);var z=R.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=X2t(r,s.current,b,{elementResize:"ResizeObserver"in window}))},[r,b]);o$(function(){z()},[z]);var C=R.useCallback(function(S){s.current=S,z()},[z]);if(!a&&o!=="fixed"||!y)return null;var w=Qa("div",ot({ref:C},Vn(Xa(Xa({},e),{},{offset:y.offset,position:o,rect:y.rect}),"menuPortal",{"menu-portal":!0}),n),t);return Qa(S2e.Provider,{value:m},a?Fz.createPortal(w,a):w)},PCt=function(e){var a=e.isDisabled,t=e.isRtl;return{label:"container",direction:t?"rtl":void 0,pointerEvents:a?"none":void 0,position:"relative"}},MCt=function(e){var a=e.children,t=e.innerProps,r=e.isDisabled,n=e.isRtl;return Qa("div",ot({},Vn(e,"container",{"--is-disabled":r,"--is-rtl":n}),t),a)},TCt=function(e,a){var t=e.theme.spacing,r=e.isMulti,n=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Xa({alignItems:"center",display:r&&n&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},a?{}:{padding:"".concat(t.baseUnit/2,"px ").concat(t.baseUnit*2,"px")})},BCt=function(e){var a=e.children,t=e.innerProps,r=e.isMulti,n=e.hasValue;return Qa("div",ot({},Vn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":n}),t),a)},ECt=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},LCt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"indicatorsContainer",{indicators:!0}),t),a)},j2e,_Ct=["size"],RCt=["innerProps","isRtl","size"],NCt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},O2e=function(e){var a=e.size,t=$d(e,_Ct);return Qa("svg",ot({height:a,width:a,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:NCt},t))},s$=function(e){return Qa(O2e,ot({size:20},e),Qa("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},A2e=function(e){return Qa(O2e,ot({size:20},e),Qa("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},P2e=function(e,a){var t=e.isFocused,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Xa({label:"indicatorContainer",display:"flex",transition:"color 150ms"},a?{}:{color:t?i.neutral60:i.neutral20,padding:n*2,":hover":{color:t?i.neutral80:i.neutral40}})},DCt=P2e,$Ct=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),t),a||Qa(A2e,null))},ICt=P2e,KCt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Vn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),t),a||Qa(s$,null))},VCt=function(e,a){var t=e.isDisabled,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Xa({label:"indicatorSeparator",alignSelf:"stretch",width:1},a?{}:{backgroundColor:t?i.neutral10:i.neutral20,marginBottom:n*2,marginTop:n*2})},HCt=function(e){var a=e.innerProps;return Qa("span",ot({},a,Vn(e,"indicatorSeparator",{"indicator-separator":!0})))},FCt=$2t(j2e||(j2e=I2t([`
|
|
11777
11782
|
0%, 80%, 100% { opacity: 0; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.15.0-next.
|
|
3
|
+
"version": "3.15.0-next.11",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
39
|
"@redocly/config": "0.36.2",
|
|
40
|
-
"@redocly/replay": "0.18.0-next.
|
|
40
|
+
"@redocly/replay": "0.18.0-next.11"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/jest-when": "3.5.5",
|
|
50
50
|
"@types/json-pointer": "1.0.34",
|
|
51
51
|
"@types/json-schema": "^7.0.15",
|
|
52
|
-
"@types/node": "22.
|
|
52
|
+
"@types/node": "22.18.13",
|
|
53
53
|
"@types/react": "^19.1.4",
|
|
54
54
|
"@types/react-dom": "^19.1.4",
|
|
55
55
|
"@types/styled-components": "5.1.34",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "5.9.3",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
77
|
"vite": "7.1.9",
|
|
78
|
-
"@redocly/theme": "0.59.0-next.
|
|
78
|
+
"@redocly/theme": "0.59.0-next.10"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"start": "npm run copy-highlight-hook && vite",
|