@fern-api/typescript-dynamic-snippets 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DynamicSnippetsGenerator.cjs +5 -5
- package/cjs/EndpointSnippetGenerator.cjs +6 -6
- package/cjs/EndpointSnippetGenerator.d.cts +1 -0
- package/cjs/index.cjs +10 -10
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/EndpointSnippetGenerator.d.ts +1 -0
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-3SA25SVX.js → chunk-PXWPOKCJ.js} +1 -1
- package/esm/chunk-XXAPM4QI.js +1 -0
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/esm/chunk-DJQMPRPJ.js +0 -1
package/cjs/index.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";var lp=Object.create;var Xe=Object.defineProperty,cp=Object.defineProperties,yp=Object.getOwnPropertyDescriptor,dp=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertyNames,Or=Object.getOwnPropertySymbols,hp=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty,lo=Object.prototype.propertyIsEnumerable;var Ot=(t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,co=(t,e)=>{for(var r in e||(e={}))Lt.call(e,r)&&Ot(t,r,e[r]);if(Or)for(var r of Or(e))lo.call(e,r)&&Ot(t,r,e[r]);return t},yo=(t,e)=>cp(t,dp(e));var mo=t=>typeof t=="symbol"?t:t+"",ho=(t,e)=>{var r={};for(var n in t)Lt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Or)for(var n of Or(t))e.indexOf(n)<0&&lo.call(t,n)&&(r[n]=t[n]);return r};var Ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bt=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},go=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mp(e))!Lt.call(t,o)&&o!==r&&Xe(t,o,{get:()=>e[o],enumerable:!(n=yp(e,o))||n.enumerable});return t};var gp=(t,e,r)=>(r=t!=null?lp(hp(t)):{},go(e||!t||!t.__esModule?Xe(r,"default",{value:t,enumerable:!0}):r,t)),xo=t=>go(Xe({},"__esModule",{value:!0}),t);var v=(t,e,r)=>Ot(t,typeof e!="symbol"?e+"":e,r);function wo(){throw new Error("setTimeout has not been defined")}function bo(){throw new Error("clearTimeout has not been defined")}function Ao(t){if(re===setTimeout)return setTimeout(t,0);if((re===wo||!re)&&setTimeout)return re=setTimeout,setTimeout(t,0);try{return re(t,0)}catch(e){try{return re.call(null,t,0)}catch(r){return re.call(this,t,0)}}}function xp(t){if(te===clearTimeout)return clearTimeout(t);if((te===bo||!te)&&clearTimeout)return te=clearTimeout,clearTimeout(t);try{return te(t)}catch(e){try{return te.call(null,t)}catch(r){return te.call(this,t)}}}function vp(){!Pe||!pe||(Pe=!1,pe.length?Y=pe.concat(Y):Lr=-1,Y.length&&So())}function So(){if(!Pe){var t=Ao(vp);Pe=!0;for(var e=Y.length;e;){for(pe=Y,Y=[];++Lr<e;)pe&&pe[Lr].run();Lr=-1,e=Y.length}pe=null,Pe=!1,xp(t)}}function wp(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Y.push(new Eo(t,e)),Y.length===1&&!Pe&&Ao(So)}function Eo(t,e){this.fun=t,this.array=e}function le(){}function qp(t){throw new Error("process.binding is not supported")}function $p(){return"/"}function _p(t){throw new Error("process.chdir is not supported")}function Mp(){return 0}function jp(t){var e=Dp.call(Re)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Gp(){var t=new Date,e=t-Wp;return e/1e3}var re,te,Y,Pe,pe,Lr,bp,Ap,Sp,Ep,Tp,Ip,Rp,Pp,Fp,Np,Op,Lp,Bp,Up,Cp,kp,Re,Dp,Wp,l,vo,s=Ie(()=>{"use strict";re=wo,te=bo;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(te=clearTimeout);Y=[],Pe=!1,Lr=-1;Eo.prototype.run=function(){this.fun.apply(null,this.array)};bp="browser",Ap="browser",Sp=!0,Ep={},Tp=[],Ip="",Rp={},Pp={},Fp={};Np=le,Op=le,Lp=le,Bp=le,Up=le,Cp=le,kp=le;Re=globalThis.performance||{},Dp=Re.now||Re.mozNow||Re.msNow||Re.oNow||Re.webkitNow||function(){return new Date().getTime()};Wp=new Date;l={nextTick:wp,title:bp,browser:Sp,env:Ep,argv:Tp,version:Ip,versions:Rp,on:Np,addListener:Op,once:Lp,off:Bp,removeListener:Up,removeAllListeners:Cp,emit:kp,binding:qp,cwd:$p,chdir:_p,umask:Mp,hrtime:jp,platform:Ap,release:Pp,config:Fp,uptime:Gp},vo={};Object.keys(vo).forEach(t=>{let e=t.split("."),r=l;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=vo[t]:r=r[o]||(r[o]={})}})});function Po(){Ct=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)$[e]=t[e],k[t.charCodeAt(e)]=e;k[45]=62,k[95]=63}function zp(t){Ct||Po();var e,r,n,o,i,a,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[p-2]==="="?2:t[p-1]==="="?1:0,a=new Vp(p*3/4-i),n=i>0?p-4:p;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)o=k[t.charCodeAt(e)]<<18|k[t.charCodeAt(e+1)]<<12|k[t.charCodeAt(e+2)]<<6|k[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=o&255;return i===2?(o=k[t.charCodeAt(e)]<<2|k[t.charCodeAt(e+1)]>>4,a[c++]=o&255):i===1&&(o=k[t.charCodeAt(e)]<<10|k[t.charCodeAt(e+1)]<<4|k[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=o&255),a}function Yp(t){return $[t>>18&63]+$[t>>12&63]+$[t>>6&63]+$[t&63]}function Hp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(Yp(n));return o.join("")}function To(t){Ct||Po();for(var e,r=t.length,n=r%3,o="",i=[],a=16383,p=0,c=r-n;p<c;p+=a)i.push(Hp(t,p,p+a>c?c:p+a));return n===1?(e=t[r-1],o+=$[e>>2],o+=$[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=$[e>>10],o+=$[e>>4&63],o+=$[e<<2&63],o+="="),i.push(o),i.join("")}function Br(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(t,e){if(Br()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return kt(this,t)}return Fo(this,t,e,r)}function Fo(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Zp(t,e,r,n):typeof e=="string"?Kp(t,e,r):Qp(t,e)}function No(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Jp(t,e,r,n){return No(e),e<=0?H(t,e):r!==void 0?typeof n=="string"?H(t,e).fill(r,n):H(t,e).fill(r):H(t,e)}function kt(t,e){if(No(e),t=H(t,e<0?0:qt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Kp(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Oo(e,r)|0;t=H(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ut(t,e){var r=e.length<0?0:qt(e.length)|0;t=H(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Zp(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=Ut(t,e),t}function Qp(t,e){if(_(e)){var r=qt(e.length)|0;return t=H(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gl(e.length)?H(t,0):Ut(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ut(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function qt(t){if(t>=Br())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br().toString(16)+" bytes");return t|0}function _(t){return!!(t!=null&&t._isBuffer)}function Oo(t,e){if(_(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ur(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $o(t).length;default:if(n)return Ur(t).length;e=(""+e).toLowerCase(),n=!0}}function Xp(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return fl(this,e,r);case"utf8":case"utf-8":return Uo(this,e,r);case"ascii":return sl(this,e,r);case"latin1":case"binary":return ul(this,e,r);case"base64":return il(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pl(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ce(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Lo(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),_(e))return e.length===0?-1:Io(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Io(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Io(t,e,r,n,o){var i=1,a=t.length,p=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,a/=2,p/=2,r/=2}function c(w,E){return i===1?w[E]:w.readUInt16BE(E*i)}var d;if(o){var m=-1;for(d=r;d<a;d++)if(c(t,d)===c(e,m===-1?0:d-m)){if(m===-1&&(m=d),d-m+1===p)return m*i}else m!==-1&&(d-=d-m),m=-1}else for(r+p>a&&(r=a-p),d=r;d>=0;d--){for(var y=!0,x=0;x<p;x++)if(c(t,d+x)!==c(e,x)){y=!1;break}if(y)return d}return-1}function el(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var p=parseInt(e.substr(a*2,2),16);if(isNaN(p))return a;t[r+a]=p}return a}function rl(t,e,r,n){return qr(Ur(e,t.length-r),t,r,n)}function Bo(t,e,r,n){return qr(ml(e),t,r,n)}function tl(t,e,r,n){return Bo(t,e,r,n)}function nl(t,e,r,n){return qr($o(e),t,r,n)}function ol(t,e,r,n){return qr(hl(e,t.length-r),t,r,n)}function il(t,e,r){return e===0&&r===t.length?To(t):To(t.slice(e,r))}function Uo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],a=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,d,m,y;switch(p){case 1:i<128&&(a=i);break;case 2:c=t[o+1],(c&192)===128&&(y=(i&31)<<6|c&63,y>127&&(a=y));break;case 3:c=t[o+1],d=t[o+2],(c&192)===128&&(d&192)===128&&(y=(i&15)<<12|(c&63)<<6|d&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:c=t[o+1],d=t[o+2],m=t[o+3],(c&192)===128&&(d&192)===128&&(m&192)===128&&(y=(i&15)<<18|(c&63)<<12|(d&63)<<6|m&63,y>65535&&y<1114112&&(a=y))}}a===null?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=p}return al(n)}function al(t){var e=t.length;if(e<=Ro)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Ro));return r}function sl(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function ul(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function fl(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=dl(t[i]);return o}function pl(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function F(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!_(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Cr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function kr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function Co(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ko(t,e,r,n,o){return o||Co(t,e,r,4,34028234663852886e22,-34028234663852886e22),Mo(t,e,r,n,23,4),r+4}function qo(t,e,r,n,o){return o||Co(t,e,r,8,17976931348623157e292,-17976931348623157e292),Mo(t,e,r,n,52,8),r+8}function cl(t){if(t=yl(t).replace(ll,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function yl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function dl(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ur(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function ml(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function hl(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function $o(t){return zp(cl(t))}function qr(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function gl(t){return t!==t}function xl(t){return t!=null&&(!!t._isBuffer||_o(t)||vl(t))}function _o(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&_o(t.slice(0,0))}function $r(t,e,r,n,o){var i,a,p=o*8-n-1,c=(1<<p)-1,d=c>>1,m=-7,y=r?o-1:0,x=r?-1:1,w=t[e+y];for(y+=x,i=w&(1<<-m)-1,w>>=-m,m+=p;m>0;i=i*256+t[e+y],y+=x,m-=8);for(a=i&(1<<-m)-1,i>>=-m,m+=n;m>0;a=a*256+t[e+y],y+=x,m-=8);if(i===0)i=1-d;else{if(i===c)return a?NaN:(w?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-d}return(w?-1:1)*a*Math.pow(2,i-n)}function Mo(t,e,r,n,o,i){var a,p,c,d=i*8-o-1,m=(1<<d)-1,y=m>>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,E=n?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,a=m):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+y>=1?e+=x/c:e+=x*Math.pow(2,1-y),e*c>=2&&(a++,c/=2),a+y>=m?(p=0,a=m):a+y>=1?(p=(e*c-1)*Math.pow(2,o),a=a+y):(p=e*Math.pow(2,y-1)*Math.pow(2,o),a=0));o>=8;t[r+w]=p&255,w+=E,p/=256,o-=8);for(a=a<<o|p,d+=o;d>0;t[r+w]=a&255,w+=E,a/=256,d-=8);t[r+w-E]|=I*128}var $,k,Vp,Ct,Ro,ll,Do=Ie(()=>{"use strict";s();u();$=[],k=[],Vp=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return Fo(null,t,e,r)};f.kMaxLength=Br();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return Jp(null,t,e,r)};f.allocUnsafe=function(t){return kt(null,t)};f.allocUnsafeSlow=function(t){return kt(null,t)};f.isBuffer=xl;f.compare=function(e,r){if(!_(e)||!_(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.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}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!_(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o};f.byteLength=Oo;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)ce(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)ce(this,r,r+3),ce(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)ce(this,r,r+7),ce(this,r+1,r+6),ce(this,r+2,r+5),ce(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Uo(this,0,e):Xp.apply(this,arguments)};f.prototype.equals=function(e){if(!_(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!_(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,p=n-r,c=Math.min(a,p),d=this.slice(o,i),m=e.slice(r,n),y=0;y<c;++y)if(d[y]!==m[y]){a=d[y],p=m[y];break}return a<p?-1:p<a?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return Lo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return Lo(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var a=!1;;)switch(o){case"hex":return el(this,e,r,n);case"utf8":case"utf-8":return rl(this,e,r,n);case"ascii":return Bo(this,e,r,n);case"latin1":case"binary":return tl(this,e,r,n);case"base64":return nl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ol(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ro=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var a=0;a<i;++a)o[a]=this[a+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||F(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||F(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||F(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||F(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=r,i=1,a=this[e+--o];o>0&&(i*=256);)a+=this[e+--o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};f.prototype.readInt8=function(e,r){return r||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||F(e,4,this.length),$r(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||F(e,4,this.length),$r(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||F(e,8,this.length),$r(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||F(e,8,this.length),$r(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=1,p=0;for(this[r]=e&255;++p<n&&(a*=256);)this[r+p]=e/a&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=n-1,p=1;for(this[r+a]=e&255;--a>=0&&(p*=256);)this[r+a]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):kr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=0,p=1,c=0;for(this[r]=e&255;++a<n&&(p*=256);)e<0&&c===0&&this[r+a-1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=n-1,p=1,c=0;for(this[r+a]=e&255;--a>=0&&(p*=256);)e<0&&c===0&&this[r+a+1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):kr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return ko(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return ko(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return qo(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return qo(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,a;if(this===e&&n<r&&r<o)for(a=i-1;a>=0;--a)e[a+r]=this[a+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var p=_(e)?e:Ur(new f(e,o).toString()),c=p.length;for(a=0;a<n-r;++a)this[a+r]=p[a%c]}return this};ll=/[^+\/0-9A-Za-z-_]/g});var u=Ie(()=>{"use strict";Do()});var Go=h((lx,Wo)=>{"use strict";s();u();var wl="Function.prototype.bind called on incompatible ",bl=Object.prototype.toString,Al=Math.max,Sl="[object Function]",jo=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},El=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Tl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};Wo.exports=function(e){var r=this;if(typeof r!="function"||bl.apply(r)!==Sl)throw new TypeError(wl+r);for(var n=El(arguments,1),o,i=function(){if(this instanceof o){var m=r.apply(this,jo(n,arguments));return Object(m)===m?m:this}return r.apply(e,jo(n,arguments))},a=Al(0,r.length-n.length),p=[],c=0;c<a;c++)p[c]="$"+c;if(o=Function("binder","return function ("+Tl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=function(){};d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o}});var ye=h((dx,Vo)=>{"use strict";s();u();var Il=Go();Vo.exports=Function.prototype.bind||Il});var $t=h((gx,zo)=>{"use strict";s();u();zo.exports=Error});var _t=h((wx,Yo)=>{"use strict";s();u();Yo.exports=EvalError});var Mt=h((Sx,Ho)=>{"use strict";s();u();Ho.exports=RangeError});var Dt=h((Ix,Jo)=>{"use strict";s();u();Jo.exports=ReferenceError});var _r=h((Fx,Ko)=>{"use strict";s();u();Ko.exports=SyntaxError});var P=h((Lx,Zo)=>{"use strict";s();u();Zo.exports=TypeError});var jt=h((Cx,Qo)=>{"use strict";s();u();Qo.exports=URIError});var ei=h(($x,Xo)=>{"use strict";s();u();Xo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var Wt=h((Dx,ti)=>{"use strict";s();u();var ri=typeof Symbol!="undefined"&&Symbol,Rl=ei();ti.exports=function(){return typeof ri!="function"||typeof Symbol!="function"||typeof ri("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Rl()}});var oi=h((Gx,ni)=>{"use strict";s();u();var Gt={__proto__:null,foo:{}},Pl=Object;ni.exports=function(){return{__proto__:Gt}.foo===Gt.foo&&!(Gt instanceof Pl)}});var Vt=h((Yx,ii)=>{"use strict";s();u();var Fl=Function.prototype.call,Nl=Object.prototype.hasOwnProperty,Ol=ye();ii.exports=Ol.call(Fl,Nl)});var M=h((Kx,pi)=>{"use strict";s();u();var b,Ll=$t(),Bl=_t(),Ul=Mt(),Cl=Dt(),Le=_r(),Oe=P(),kl=jt(),fi=Function,zt=function(t){try{return fi('"use strict"; return ('+t+").constructor;")()}catch(e){}},de=Object.getOwnPropertyDescriptor;if(de)try{de({},"")}catch(t){de=null}var Yt=function(){throw new Oe},ql=de?function(){try{return arguments.callee,Yt}catch(t){try{return de(arguments,"callee").get}catch(e){return Yt}}}():Yt,Fe=Wt()(),$l=oi()(),N=Object.getPrototypeOf||($l?function(t){return t.__proto__}:null),Ne={},_l=typeof Uint8Array=="undefined"||!N?b:N(Uint8Array),me={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Fe&&N?N([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Ne,"%AsyncGenerator%":Ne,"%AsyncGeneratorFunction%":Ne,"%AsyncIteratorPrototype%":Ne,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ll,"%eval%":eval,"%EvalError%":Bl,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":fi,"%GeneratorFunction%":Ne,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fe&&N?N(N([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Fe||!N?b:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":Ul,"%ReferenceError%":Cl,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Fe||!N?b:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fe&&N?N(""[Symbol.iterator]()):b,"%Symbol%":Fe?Symbol:b,"%SyntaxError%":Le,"%ThrowTypeError%":ql,"%TypedArray%":_l,"%TypeError%":Oe,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":kl,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet};if(N)try{null.error}catch(t){ai=N(N(t)),me["%Error.prototype%"]=ai}var ai,Ml=function t(e){var r;if(e==="%AsyncFunction%")r=zt("async function () {}");else if(e==="%GeneratorFunction%")r=zt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=zt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&N&&(r=N(o.prototype))}return me[e]=r,r},si={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},er=ye(),Mr=Vt(),Dl=er.call(Function.call,Array.prototype.concat),jl=er.call(Function.apply,Array.prototype.splice),ui=er.call(Function.call,String.prototype.replace),Dr=er.call(Function.call,String.prototype.slice),Wl=er.call(Function.call,RegExp.prototype.exec),Gl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vl=/\\(\\)?/g,zl=function(e){var r=Dr(e,0,1),n=Dr(e,-1);if(r==="%"&&n!=="%")throw new Le("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Le("invalid intrinsic syntax, expected opening `%`");var o=[];return ui(e,Gl,function(i,a,p,c){o[o.length]=p?ui(c,Vl,"$1"):a||i}),o},Yl=function(e,r){var n=e,o;if(Mr(si,n)&&(o=si[n],n="%"+o[0]+"%"),Mr(me,n)){var i=me[n];if(i===Ne&&(i=Ml(n)),typeof i=="undefined"&&!r)throw new Oe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Le("intrinsic "+e+" does not exist!")};pi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Oe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Oe('"allowMissing" argument must be a boolean');if(Wl(/^%?[^%]*%?$/,e)===null)throw new Le("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=zl(e),o=n.length>0?n[0]:"",i=Yl("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],jl(n,Dl([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Dr(x,0,1),E=Dr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new Le("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",Mr(me,a))p=me[a];else if(p!=null){if(!(x in p)){if(!r)throw new Oe("base intrinsic for "+e+" exists, but the property is not available.");return}if(de&&m+1>=n.length){var I=de(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=Mr(p,x),p=p[x];y&&!c&&(me[a]=p)}}return p}});var Ht=h((Xx,li)=>{"use strict";s();u();li.exports=Object});var yi=h((tv,ci)=>{"use strict";s();u();ci.exports=Math.abs});var mi=h((iv,di)=>{"use strict";s();u();di.exports=Math.floor});var gi=h((uv,hi)=>{"use strict";s();u();hi.exports=Math.max});var vi=h((lv,xi)=>{"use strict";s();u();xi.exports=Math.min});var bi=h((dv,wi)=>{"use strict";s();u();wi.exports=Math.pow});var Si=h((gv,Ai)=>{"use strict";s();u();Ai.exports=Math.round});var Ti=h((wv,Ei)=>{"use strict";s();u();Ei.exports=Number.isNaN||function(e){return e!==e}});var Ri=h((Sv,Ii)=>{"use strict";s();u();var Hl=Ti();Ii.exports=function(e){return Hl(e)||e===0?e:e<0?-1:1}});var Fi=h((Iv,Pi)=>{"use strict";s();u();Pi.exports=Object.getOwnPropertyDescriptor});var rr=h((Fv,Ni)=>{"use strict";s();u();var jr=Fi();if(jr)try{jr([],"length")}catch(t){jr=null}Ni.exports=jr});var Gr=h((Lv,Oi)=>{"use strict";s();u();var Wr=Object.defineProperty||!1;if(Wr)try{Wr({},"a",{value:1})}catch(t){Wr=!1}Oi.exports=Wr});var Jt=h((Cv,Li)=>{"use strict";s();u();Li.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var Ci=h(($v,Ui)=>{"use strict";s();u();var Bi=typeof Symbol!="undefined"&&Symbol,Jl=Jt();Ui.exports=function(){return typeof Bi!="function"||typeof Symbol!="function"||typeof Bi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Jl()}});var Kt=h((Dv,ki)=>{"use strict";s();u();ki.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Zt=h((Gv,qi)=>{"use strict";s();u();var Kl=Ht();qi.exports=Kl.getPrototypeOf||null});var Vr=h((Yv,$i)=>{"use strict";s();u();$i.exports=Function.prototype.call});var Qt=h((Kv,_i)=>{"use strict";s();u();_i.exports=Function.prototype.apply});var Di=h((Xv,Mi)=>{"use strict";s();u();Mi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Wi=h((t0,ji)=>{"use strict";s();u();var Zl=ye(),Ql=Qt(),Xl=Vr(),ec=Di();ji.exports=ec||Zl.call(Xl,Ql)});var Vi=h((i0,Gi)=>{"use strict";s();u();var rc=ye(),tc=P(),nc=Vr(),oc=Wi();Gi.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new tc("a function is required");return oc(rc,nc,e)}});var Zi=h((u0,Ki)=>{"use strict";s();u();var ic=Vi(),zi=rr(),Hi;try{Hi=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Xt=!!Hi&&zi&&zi(Object.prototype,"__proto__"),Ji=Object,Yi=Ji.getPrototypeOf;Ki.exports=Xt&&typeof Xt.get=="function"?ic([Xt.get]):typeof Yi=="function"?function(e){return Yi(e==null?e:Ji(e))}:!1});var ta=h((l0,ra)=>{"use strict";s();u();var Qi=Kt(),Xi=Zt(),ea=Zi();ra.exports=Qi?function(e){return Qi(e)}:Xi?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Xi(e)}:ea?function(e){return ea(e)}:null});var tn=h((d0,ua)=>{"use strict";s();u();var A,ac=Ht(),sc=$t(),uc=_t(),fc=Mt(),pc=Dt(),ke=_r(),Ce=P(),lc=jt(),cc=yi(),yc=mi(),dc=gi(),mc=vi(),hc=bi(),gc=Si(),xc=Ri(),aa=Function,en=function(t){try{return aa('"use strict"; return ('+t+").constructor;")()}catch(e){}},tr=rr(),vc=Gr(),rn=function(){throw new Ce},wc=tr?function(){try{return arguments.callee,rn}catch(t){try{return tr(arguments,"callee").get}catch(e){return rn}}}():rn,Be=Ci()(),O=ta(),bc=Zt(),Ac=Kt(),sa=Qt(),nr=Vr(),Ue={},Sc=typeof Uint8Array=="undefined"||!O?A:O(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":Be&&O?O([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics=="undefined"?A:Atomics,"%BigInt%":typeof BigInt=="undefined"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sc,"%eval%":eval,"%EvalError%":uc,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":aa,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be&&O?O(O([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Be||!O?A:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ac,"%Object.getOwnPropertyDescriptor%":tr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":fc,"%ReferenceError%":pc,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Be||!O?A:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be&&O?O(""[Symbol.iterator]()):A,"%Symbol%":Be?Symbol:A,"%SyntaxError%":ke,"%ThrowTypeError%":wc,"%TypedArray%":Sc,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?A:Uint32Array,"%URIError%":lc,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet,"%Function.prototype.call%":nr,"%Function.prototype.apply%":sa,"%Object.defineProperty%":vc,"%Object.getPrototypeOf%":bc,"%Math.abs%":cc,"%Math.floor%":yc,"%Math.max%":dc,"%Math.min%":mc,"%Math.pow%":hc,"%Math.round%":gc,"%Math.sign%":xc,"%Reflect.getPrototypeOf%":Ac};if(O)try{null.error}catch(t){na=O(O(t)),he["%Error.prototype%"]=na}var na,Ec=function t(e){var r;if(e==="%AsyncFunction%")r=en("async function () {}");else if(e==="%GeneratorFunction%")r=en("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=en("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return he[e]=r,r},oa={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=ye(),zr=Vt(),Tc=or.call(nr,Array.prototype.concat),Ic=or.call(sa,Array.prototype.splice),ia=or.call(nr,String.prototype.replace),Yr=or.call(nr,String.prototype.slice),Rc=or.call(nr,RegExp.prototype.exec),Pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fc=/\\(\\)?/g,Nc=function(e){var r=Yr(e,0,1),n=Yr(e,-1);if(r==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var o=[];return ia(e,Pc,function(i,a,p,c){o[o.length]=p?ia(c,Fc,"$1"):a||i}),o},Oc=function(e,r){var n=e,o;if(zr(oa,n)&&(o=oa[n],n="%"+o[0]+"%"),zr(he,n)){var i=he[n];if(i===Ue&&(i=Ec(n)),typeof i=="undefined"&&!r)throw new Ce("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ke("intrinsic "+e+" does not exist!")};ua.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(Rc(/^%?[^%]*%?$/,e)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Nc(e),o=n.length>0?n[0]:"",i=Oc("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],Ic(n,Tc([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Yr(x,0,1),E=Yr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new ke("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",zr(he,a))p=he[a];else if(p!=null){if(!(x in p)){if(!r)throw new Ce("base intrinsic for "+e+" exists, but the property is not available.");return}if(tr&&m+1>=n.length){var I=tr(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=zr(p,x),p=p[x];y&&!c&&(he[a]=p)}}return p}});var nn=h((g0,la)=>{"use strict";s();u();var fa=Gr(),Lc=_r(),qe=P(),pa=rr();la.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new qe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new qe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!pa&&pa(e,r);if(fa)fa(e,r,{configurable:a===null&&c?c.configurable:!a,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!a)e[r]=n;else throw new Lc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var an=h((w0,ya)=>{"use strict";s();u();var on=Gr(),ca=function(){return!!on};ca.hasArrayLengthDefineBug=function(){if(!on)return null;try{return on([],"length",{value:1}).length!==1}catch(e){return!0}};ya.exports=ca});var xa=h((S0,ga)=>{"use strict";s();u();var Bc=tn(),da=nn(),Uc=an()(),ma=rr(),ha=P(),Cc=Bc("%Math.floor%");ga.exports=function(e,r){if(typeof e!="function")throw new ha("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Cc(r)!==r)throw new ha("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&ma){var a=ma(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!n)&&(Uc?da(e,"length",r,!0,!0):da(e,"length",r)),e}});var wa=h((I0,va)=>{"use strict";s();u();var kc=tn(),Hr=kc("%Object.defineProperty%",!0)||!1;if(Hr)try{Hr({},"a",{value:1})}catch(t){Hr=!1}va.exports=Hr});var Zr=h((F0,Jr)=>{"use strict";s();u();var sn=ye(),Kr=M(),qc=xa(),$c=P(),Sa=Kr("%Function.prototype.apply%"),Ea=Kr("%Function.prototype.call%"),Ta=Kr("%Reflect.apply%",!0)||sn.call(Ea,Sa),ba=wa(),_c=Kr("%Math.max%");Jr.exports=function(e){if(typeof e!="function")throw new $c("a function is required");var r=Ta(sn,Ea,arguments);return qc(r,1+_c(0,e.length-(arguments.length-1)),!0)};var Aa=function(){return Ta(sn,Sa,arguments)};ba?ba(Jr.exports,"apply",{value:Aa}):Jr.exports.apply=Aa});var un=h((L0,Ra)=>{"use strict";s();u();var Ia=Object.prototype.toString;Ra.exports=function(e){var r=Ia.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ia.call(e.callee)==="[object Function]"),n}});var ka=h((C0,Ca)=>{"use strict";s();u();var Ua;Object.keys||(ir=Object.prototype.hasOwnProperty,fn=Object.prototype.toString,Pa=un(),pn=Object.prototype.propertyIsEnumerable,Fa=!pn.call({toString:null},"toString"),Na=pn.call(function(){},"prototype"),ar=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Qr=function(t){var e=t.constructor;return e&&e.prototype===t},Oa={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},La=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Oa["$"+t]&&ir.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{Qr(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ba=function(t){if(typeof window=="undefined"||!La)return Qr(t);try{return Qr(t)}catch(e){return!1}},Ua=function(e){var r=e!==null&&typeof e=="object",n=fn.call(e)==="[object Function]",o=Pa(e),i=r&&fn.call(e)==="[object String]",a=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Na&&n;if(i&&e.length>0&&!ir.call(e,0))for(var c=0;c<e.length;++c)a.push(String(c));if(o&&e.length>0)for(var d=0;d<e.length;++d)a.push(String(d));else for(var m in e)!(p&&m==="prototype")&&ir.call(e,m)&&a.push(String(m));if(Fa)for(var y=Ba(e),x=0;x<ar.length;++x)!(y&&ar[x]==="constructor")&&ir.call(e,ar[x])&&a.push(ar[x]);return a});var ir,fn,Pa,pn,Fa,Na,ar,Qr,Oa,La,Ba;Ca.exports=Ua});var Ma=h(($0,_a)=>{"use strict";s();u();var Mc=Array.prototype.slice,Dc=un(),qa=Object.keys,Xr=qa?function(e){return qa(e)}:ka(),$a=Object.keys;Xr.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return Dc(n)?$a(Mc.call(n)):$a(n)})}else Object.keys=Xr;return Object.keys||Xr};_a.exports=Xr});var sr=h((D0,Ga)=>{"use strict";s();u();var jc=Ma(),Wc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Gc=Object.prototype.toString,Vc=Array.prototype.concat,Da=nn(),zc=function(t){return typeof t=="function"&&Gc.call(t)==="[object Function]"},ja=an()(),Yc=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!zc(n)||!n())return}ja?Da(t,e,r,!0):Da(t,e,r)},Wa=function(t,e){var r=arguments.length>2?arguments[2]:{},n=jc(e);Wc&&(n=Vc.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Yc(t,n[o],e[n[o]],r[n[o]])};Wa.supportsDescriptors=!!ja;Ga.exports=Wa});var q=h((G0,Ya)=>{"use strict";s();u();var Va=M(),za=Zr(),Hc=za(Va("String.prototype.indexOf"));Ya.exports=function(e,r){var n=Va(e,!!r);return typeof n=="function"&&Hc(e,".prototype.")>-1?za(n):n}});var Ka=h((Y0,Ja)=>{"use strict";s();u();var Jc=M(),Ha=Jc("%Array%"),Kc=!Ha.isArray&&q()("Object.prototype.toString");Ja.exports=Ha.isArray||function(e){return Kc(e)==="[object Array]"}});var ln=h((K0,Za)=>{"use strict";s();u();Za.exports=Ka()});var Xa=h((X0,Qa)=>{"use strict";s();u();var Zc=M(),Qc=q(),Xc=P(),ey=ln(),ry=Zc("%Reflect.apply%",!0)||Qc("Function.prototype.apply");Qa.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!ey(n))throw new Xc("Assertion failed: optional `argumentsList`, if provided, must be a List");return ry(e,r,n)}});function es(){throw new Error("setTimeout has not been defined")}function rs(){throw new Error("clearTimeout has not been defined")}function ts(t){if(ne===setTimeout)return setTimeout(t,0);if((ne===es||!ne)&&setTimeout)return ne=setTimeout,setTimeout(t,0);try{return ne(t,0)}catch(e){try{return ne.call(null,t,0)}catch(r){return ne.call(this,t,0)}}}function ty(t){if(oe===clearTimeout)return clearTimeout(t);if((oe===rs||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(t);try{return oe(t)}catch(e){try{return oe.call(null,t)}catch(r){return oe.call(this,t)}}}function ny(){!_e||!ge||(_e=!1,ge.length?J=ge.concat(J):et=-1,J.length&&ns())}function ns(){if(!_e){var t=ts(ny);_e=!0;for(var e=J.length;e;){for(ge=J,J=[];++et<e;)ge&&ge[et].run();et=-1,e=J.length}ge=null,_e=!1,ty(t)}}function oy(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];J.push(new os(t,e)),J.length===1&&!_e&&ts(ns)}function os(t,e){this.fun=t,this.array=e}function xe(){}function by(t){throw new Error("process.binding is not supported")}function Ay(){return"/"}function Sy(t){throw new Error("process.chdir is not supported")}function Ey(){return 0}function Iy(t){var e=Ty.call($e)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Py(){var t=new Date,e=t-Ry;return e/1e3}var ne,oe,J,_e,ge,et,iy,ay,sy,uy,fy,py,ly,cy,yy,dy,my,hy,gy,xy,vy,wy,$e,Ty,Ry,Fy,ur,is=Ie(()=>{"use strict";s();u();ne=es,oe=rs;typeof globalThis.setTimeout=="function"&&(ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);J=[],_e=!1,et=-1;os.prototype.run=function(){this.fun.apply(null,this.array)};iy="browser",ay="browser",sy=!0,uy={},fy=[],py="",ly={},cy={},yy={};dy=xe,my=xe,hy=xe,gy=xe,xy=xe,vy=xe,wy=xe;$e=globalThis.performance||{},Ty=$e.now||$e.mozNow||$e.msNow||$e.oNow||$e.webkitNow||function(){return new Date().getTime()};Ry=new Date;Fy={nextTick:oy,title:iy,browser:sy,env:uy,argv:fy,version:py,versions:ly,on:dy,addListener:my,once:hy,off:gy,removeListener:xy,removeAllListeners:vy,emit:wy,binding:by,cwd:Ay,chdir:Sy,umask:Ey,hrtime:Iy,platform:ay,release:cy,config:yy,uptime:Py},ur=Fy});var cn,yn,as=Ie(()=>{"use strict";s();u();typeof Object.create=="function"?cn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:cn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};yn=cn});var ds={};Bt(ds,{_extend:()=>An,debuglog:()=>ss,default:()=>_y,deprecate:()=>xn,format:()=>ot,inherits:()=>yn,inspect:()=>j,isArray:()=>vn,isBoolean:()=>it,isBuffer:()=>ls,isDate:()=>nt,isError:()=>pr,isFunction:()=>lr,isNull:()=>cr,isNullOrUndefined:()=>us,isNumber:()=>wn,isObject:()=>ve,isPrimitive:()=>ps,isRegExp:()=>fr,isString:()=>yr,isSymbol:()=>fs,isUndefined:()=>D,log:()=>cs});function ot(t){if(!yr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(j(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Ny,function(p){if(p==="%%")return"%";if(r>=o)return p;switch(p){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(c){return"[Circular]"}default:return p}}),a=n[r];r<o;a=n[++r])cr(a)||!ve(a)?i+=" "+a:i+=" "+j(a);return i}function xn(t,e){if(D(globalThis.process))return function(){return xn(t,e).apply(this,arguments)};if(ur.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(ur.throwDeprecation)throw new Error(e);ur.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function ss(t){if(D(dn)&&(dn=ur.env.NODE_DEBUG||""),t=t.toUpperCase(),!rt[t])if(new RegExp("\\b"+t+"\\b","i").test(dn)){var e=0;rt[t]=function(){var r=ot.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else rt[t]=function(){};return rt[t]}function j(t,e){var r={seen:[],stylize:Ly};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),it(e)?r.showHidden=e:e&&An(r,e),D(r.showHidden)&&(r.showHidden=!1),D(r.depth)&&(r.depth=2),D(r.colors)&&(r.colors=!1),D(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Oy),tt(r,t,r.depth)}function Oy(t,e){var r=j.styles[e];return r?"\x1B["+j.colors[r][0]+"m"+t+"\x1B["+j.colors[r][1]+"m":t}function Ly(t,e){return t}function By(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function tt(t,e,r){if(t.customInspect&&e&&lr(e.inspect)&&e.inspect!==j&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return yr(n)||(n=tt(t,n,r)),n}var o=Uy(t,e);if(o)return o;var i=Object.keys(e),a=By(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),pr(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return mn(e);if(i.length===0){if(lr(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(fr(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(nt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(pr(e))return mn(e)}var c="",d=!1,m=["{","}"];if(vn(e)&&(d=!0,m=["[","]"]),lr(e)){var y=e.name?": "+e.name:"";c=" [Function"+y+"]"}if(fr(e)&&(c=" "+RegExp.prototype.toString.call(e)),nt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),pr(e)&&(c=" "+mn(e)),i.length===0&&(!d||e.length==0))return m[0]+c+m[1];if(r<0)return fr(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var x;return d?x=Cy(t,e,r,a,i):x=i.map(function(w){return gn(t,e,r,a,w,d)}),t.seen.pop(),ky(x,c,m)}function Uy(t,e){if(D(e))return t.stylize("undefined","undefined");if(yr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(wn(e))return t.stylize(""+e,"number");if(it(e))return t.stylize(""+e,"boolean");if(cr(e))return t.stylize("null","null")}function mn(t){return"["+Error.prototype.toString.call(t)+"]"}function Cy(t,e,r,n,o){for(var i=[],a=0,p=e.length;a<p;++a)ys(e,String(a))?i.push(gn(t,e,r,n,String(a),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(gn(t,e,r,n,c,!0))}),i}function gn(t,e,r,n,o,i){var a,p,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):c.set&&(p=t.stylize("[Setter]","special")),ys(n,o)||(a="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(cr(r)?p=tt(t,c.value,null):p=tt(t,c.value,r-1),p.indexOf(`
|
|
1
|
+
"use strict";var lp=Object.create;var Xe=Object.defineProperty,cp=Object.defineProperties,yp=Object.getOwnPropertyDescriptor,dp=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertyNames,Nr=Object.getOwnPropertySymbols,hp=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty,lo=Object.prototype.propertyIsEnumerable;var Nt=(t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,co=(t,e)=>{for(var r in e||(e={}))Lt.call(e,r)&&Nt(t,r,e[r]);if(Nr)for(var r of Nr(e))lo.call(e,r)&&Nt(t,r,e[r]);return t},yo=(t,e)=>cp(t,dp(e));var mo=t=>typeof t=="symbol"?t:t+"",ho=(t,e)=>{var r={};for(var n in t)Lt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Nr)for(var n of Nr(t))e.indexOf(n)<0&&lo.call(t,n)&&(r[n]=t[n]);return r};var Ie=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bt=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},go=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mp(e))!Lt.call(t,o)&&o!==r&&Xe(t,o,{get:()=>e[o],enumerable:!(n=yp(e,o))||n.enumerable});return t};var gp=(t,e,r)=>(r=t!=null?lp(hp(t)):{},go(e||!t||!t.__esModule?Xe(r,"default",{value:t,enumerable:!0}):r,t)),xo=t=>go(Xe({},"__esModule",{value:!0}),t);var v=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);function wo(){throw new Error("setTimeout has not been defined")}function bo(){throw new Error("clearTimeout has not been defined")}function Ao(t){if(re===setTimeout)return setTimeout(t,0);if((re===wo||!re)&&setTimeout)return re=setTimeout,setTimeout(t,0);try{return re(t,0)}catch(e){try{return re.call(null,t,0)}catch(r){return re.call(this,t,0)}}}function xp(t){if(te===clearTimeout)return clearTimeout(t);if((te===bo||!te)&&clearTimeout)return te=clearTimeout,clearTimeout(t);try{return te(t)}catch(e){try{return te.call(null,t)}catch(r){return te.call(this,t)}}}function vp(){!Pe||!pe||(Pe=!1,pe.length?Y=pe.concat(Y):Lr=-1,Y.length&&So())}function So(){if(!Pe){var t=Ao(vp);Pe=!0;for(var e=Y.length;e;){for(pe=Y,Y=[];++Lr<e;)pe&&pe[Lr].run();Lr=-1,e=Y.length}pe=null,Pe=!1,xp(t)}}function wp(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Y.push(new Eo(t,e)),Y.length===1&&!Pe&&Ao(So)}function Eo(t,e){this.fun=t,this.array=e}function le(){}function qp(t){throw new Error("process.binding is not supported")}function $p(){return"/"}function _p(t){throw new Error("process.chdir is not supported")}function Mp(){return 0}function jp(t){var e=Dp.call(Re)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Gp(){var t=new Date,e=t-Wp;return e/1e3}var re,te,Y,Pe,pe,Lr,bp,Ap,Sp,Ep,Tp,Ip,Rp,Pp,Fp,Op,Np,Lp,Bp,Up,Cp,kp,Re,Dp,Wp,l,vo,s=Ie(()=>{"use strict";re=wo,te=bo;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(te=clearTimeout);Y=[],Pe=!1,Lr=-1;Eo.prototype.run=function(){this.fun.apply(null,this.array)};bp="browser",Ap="browser",Sp=!0,Ep={},Tp=[],Ip="",Rp={},Pp={},Fp={};Op=le,Np=le,Lp=le,Bp=le,Up=le,Cp=le,kp=le;Re=globalThis.performance||{},Dp=Re.now||Re.mozNow||Re.msNow||Re.oNow||Re.webkitNow||function(){return new Date().getTime()};Wp=new Date;l={nextTick:wp,title:bp,browser:Sp,env:Ep,argv:Tp,version:Ip,versions:Rp,on:Op,addListener:Np,once:Lp,off:Bp,removeListener:Up,removeAllListeners:Cp,emit:kp,binding:qp,cwd:$p,chdir:_p,umask:Mp,hrtime:jp,platform:Ap,release:Pp,config:Fp,uptime:Gp},vo={};Object.keys(vo).forEach(t=>{let e=t.split("."),r=l;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=vo[t]:r=r[o]||(r[o]={})}})});function Po(){Ct=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)_[e]=t[e],k[t.charCodeAt(e)]=e;k[45]=62,k[95]=63}function zp(t){Ct||Po();var e,r,n,o,i,a,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[p-2]==="="?2:t[p-1]==="="?1:0,a=new Vp(p*3/4-i),n=i>0?p-4:p;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)o=k[t.charCodeAt(e)]<<18|k[t.charCodeAt(e+1)]<<12|k[t.charCodeAt(e+2)]<<6|k[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=o&255;return i===2?(o=k[t.charCodeAt(e)]<<2|k[t.charCodeAt(e+1)]>>4,a[c++]=o&255):i===1&&(o=k[t.charCodeAt(e)]<<10|k[t.charCodeAt(e+1)]<<4|k[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=o&255),a}function Yp(t){return _[t>>18&63]+_[t>>12&63]+_[t>>6&63]+_[t&63]}function Hp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(Yp(n));return o.join("")}function To(t){Ct||Po();for(var e,r=t.length,n=r%3,o="",i=[],a=16383,p=0,c=r-n;p<c;p+=a)i.push(Hp(t,p,p+a>c?c:p+a));return n===1?(e=t[r-1],o+=_[e>>2],o+=_[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=_[e>>10],o+=_[e>>4&63],o+=_[e<<2&63],o+="="),i.push(o),i.join("")}function Br(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(t,e){if(Br()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return kt(this,t)}return Fo(this,t,e,r)}function Fo(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Zp(t,e,r,n):typeof e=="string"?Kp(t,e,r):Qp(t,e)}function Oo(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Jp(t,e,r,n){return Oo(e),e<=0?H(t,e):r!==void 0?typeof n=="string"?H(t,e).fill(r,n):H(t,e).fill(r):H(t,e)}function kt(t,e){if(Oo(e),t=H(t,e<0?0:qt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Kp(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=No(e,r)|0;t=H(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ut(t,e){var r=e.length<0?0:qt(e.length)|0;t=H(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Zp(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=Ut(t,e),t}function Qp(t,e){if(M(e)){var r=qt(e.length)|0;return t=H(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gl(e.length)?H(t,0):Ut(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ut(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function qt(t){if(t>=Br())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br().toString(16)+" bytes");return t|0}function M(t){return!!(t!=null&&t._isBuffer)}function No(t,e){if(M(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ur(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $o(t).length;default:if(n)return Ur(t).length;e=(""+e).toLowerCase(),n=!0}}function Xp(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return fl(this,e,r);case"utf8":case"utf-8":return Uo(this,e,r);case"ascii":return sl(this,e,r);case"latin1":case"binary":return ul(this,e,r);case"base64":return il(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pl(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ce(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Lo(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),M(e))return e.length===0?-1:Io(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Io(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Io(t,e,r,n,o){var i=1,a=t.length,p=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,a/=2,p/=2,r/=2}function c(w,E){return i===1?w[E]:w.readUInt16BE(E*i)}var d;if(o){var m=-1;for(d=r;d<a;d++)if(c(t,d)===c(e,m===-1?0:d-m)){if(m===-1&&(m=d),d-m+1===p)return m*i}else m!==-1&&(d-=d-m),m=-1}else for(r+p>a&&(r=a-p),d=r;d>=0;d--){for(var y=!0,x=0;x<p;x++)if(c(t,d+x)!==c(e,x)){y=!1;break}if(y)return d}return-1}function el(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var p=parseInt(e.substr(a*2,2),16);if(isNaN(p))return a;t[r+a]=p}return a}function rl(t,e,r,n){return qr(Ur(e,t.length-r),t,r,n)}function Bo(t,e,r,n){return qr(ml(e),t,r,n)}function tl(t,e,r,n){return Bo(t,e,r,n)}function nl(t,e,r,n){return qr($o(e),t,r,n)}function ol(t,e,r,n){return qr(hl(e,t.length-r),t,r,n)}function il(t,e,r){return e===0&&r===t.length?To(t):To(t.slice(e,r))}function Uo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],a=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,d,m,y;switch(p){case 1:i<128&&(a=i);break;case 2:c=t[o+1],(c&192)===128&&(y=(i&31)<<6|c&63,y>127&&(a=y));break;case 3:c=t[o+1],d=t[o+2],(c&192)===128&&(d&192)===128&&(y=(i&15)<<12|(c&63)<<6|d&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:c=t[o+1],d=t[o+2],m=t[o+3],(c&192)===128&&(d&192)===128&&(m&192)===128&&(y=(i&15)<<18|(c&63)<<12|(d&63)<<6|m&63,y>65535&&y<1114112&&(a=y))}}a===null?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=p}return al(n)}function al(t){var e=t.length;if(e<=Ro)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Ro));return r}function sl(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function ul(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function fl(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=dl(t[i]);return o}function pl(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function F(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!M(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Cr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function kr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function Co(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ko(t,e,r,n,o){return o||Co(t,e,r,4,34028234663852886e22,-34028234663852886e22),Mo(t,e,r,n,23,4),r+4}function qo(t,e,r,n,o){return o||Co(t,e,r,8,17976931348623157e292,-17976931348623157e292),Mo(t,e,r,n,52,8),r+8}function cl(t){if(t=yl(t).replace(ll,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function yl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function dl(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ur(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function ml(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function hl(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function $o(t){return zp(cl(t))}function qr(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function gl(t){return t!==t}function xl(t){return t!=null&&(!!t._isBuffer||_o(t)||vl(t))}function _o(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&_o(t.slice(0,0))}function $r(t,e,r,n,o){var i,a,p=o*8-n-1,c=(1<<p)-1,d=c>>1,m=-7,y=r?o-1:0,x=r?-1:1,w=t[e+y];for(y+=x,i=w&(1<<-m)-1,w>>=-m,m+=p;m>0;i=i*256+t[e+y],y+=x,m-=8);for(a=i&(1<<-m)-1,i>>=-m,m+=n;m>0;a=a*256+t[e+y],y+=x,m-=8);if(i===0)i=1-d;else{if(i===c)return a?NaN:(w?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-d}return(w?-1:1)*a*Math.pow(2,i-n)}function Mo(t,e,r,n,o,i){var a,p,c,d=i*8-o-1,m=(1<<d)-1,y=m>>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,E=n?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,a=m):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+y>=1?e+=x/c:e+=x*Math.pow(2,1-y),e*c>=2&&(a++,c/=2),a+y>=m?(p=0,a=m):a+y>=1?(p=(e*c-1)*Math.pow(2,o),a=a+y):(p=e*Math.pow(2,y-1)*Math.pow(2,o),a=0));o>=8;t[r+w]=p&255,w+=E,p/=256,o-=8);for(a=a<<o|p,d+=o;d>0;t[r+w]=a&255,w+=E,a/=256,d-=8);t[r+w-E]|=I*128}var _,k,Vp,Ct,Ro,ll,Do=Ie(()=>{"use strict";s();u();_=[],k=[],Vp=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return Fo(null,t,e,r)};f.kMaxLength=Br();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return Jp(null,t,e,r)};f.allocUnsafe=function(t){return kt(null,t)};f.allocUnsafeSlow=function(t){return kt(null,t)};f.isBuffer=xl;f.compare=function(e,r){if(!M(e)||!M(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.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}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!M(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i),i+=a.length}return o};f.byteLength=No;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)ce(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)ce(this,r,r+3),ce(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)ce(this,r,r+7),ce(this,r+1,r+6),ce(this,r+2,r+5),ce(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Uo(this,0,e):Xp.apply(this,arguments)};f.prototype.equals=function(e){if(!M(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!M(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,p=n-r,c=Math.min(a,p),d=this.slice(o,i),m=e.slice(r,n),y=0;y<c;++y)if(d[y]!==m[y]){a=d[y],p=m[y];break}return a<p?-1:p<a?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return Lo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return Lo(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var a=!1;;)switch(o){case"hex":return el(this,e,r,n);case"utf8":case"utf-8":return rl(this,e,r,n);case"ascii":return Bo(this,e,r,n);case"latin1":case"binary":return tl(this,e,r,n);case"base64":return nl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ol(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Ro=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var a=0;a<i;++a)o[a]=this[a+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||F(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||F(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||F(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||F(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=this[e],i=1,a=0;++a<r&&(i*=256);)o+=this[e+a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||F(e,r,this.length);for(var o=r,i=1,a=this[e+--o];o>0&&(i*=256);)a+=this[e+--o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};f.prototype.readInt8=function(e,r){return r||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||F(e,4,this.length),$r(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||F(e,4,this.length),$r(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||F(e,8,this.length),$r(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||F(e,8,this.length),$r(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=1,p=0;for(this[r]=e&255;++p<n&&(a*=256);)this[r+p]=e/a&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;U(this,e,r,n,i,0)}var a=n-1,p=1;for(this[r+a]=e&255;--a>=0&&(p*=256);)this[r+a]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):kr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=0,p=1,c=0;for(this[r]=e&255;++a<n&&(p*=256);)e<0&&c===0&&this[r+a-1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);U(this,e,r,n,i-1,-i)}var a=n-1,p=1,c=0;for(this[r+a]=e&255;--a>=0&&(p*=256);)e<0&&c===0&&this[r+a+1]!==0&&(c=1),this[r+a]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Cr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Cr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):kr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||U(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):kr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return ko(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return ko(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return qo(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return qo(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,a;if(this===e&&n<r&&r<o)for(a=i-1;a>=0;--a)e[a+r]=this[a+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var p=M(e)?e:Ur(new f(e,o).toString()),c=p.length;for(a=0;a<n-r;++a)this[a+r]=p[a%c]}return this};ll=/[^+\/0-9A-Za-z-_]/g});var u=Ie(()=>{"use strict";Do()});var Go=h((lx,Wo)=>{"use strict";s();u();var wl="Function.prototype.bind called on incompatible ",bl=Object.prototype.toString,Al=Math.max,Sl="[object Function]",jo=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},El=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Tl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};Wo.exports=function(e){var r=this;if(typeof r!="function"||bl.apply(r)!==Sl)throw new TypeError(wl+r);for(var n=El(arguments,1),o,i=function(){if(this instanceof o){var m=r.apply(this,jo(n,arguments));return Object(m)===m?m:this}return r.apply(e,jo(n,arguments))},a=Al(0,r.length-n.length),p=[],c=0;c<a;c++)p[c]="$"+c;if(o=Function("binder","return function ("+Tl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=function(){};d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o}});var ye=h((dx,Vo)=>{"use strict";s();u();var Il=Go();Vo.exports=Function.prototype.bind||Il});var $t=h((gx,zo)=>{"use strict";s();u();zo.exports=Error});var _t=h((wx,Yo)=>{"use strict";s();u();Yo.exports=EvalError});var Mt=h((Sx,Ho)=>{"use strict";s();u();Ho.exports=RangeError});var Dt=h((Ix,Jo)=>{"use strict";s();u();Jo.exports=ReferenceError});var _r=h((Fx,Ko)=>{"use strict";s();u();Ko.exports=SyntaxError});var P=h((Lx,Zo)=>{"use strict";s();u();Zo.exports=TypeError});var jt=h((Cx,Qo)=>{"use strict";s();u();Qo.exports=URIError});var ei=h(($x,Xo)=>{"use strict";s();u();Xo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var Wt=h((Dx,ti)=>{"use strict";s();u();var ri=typeof Symbol!="undefined"&&Symbol,Rl=ei();ti.exports=function(){return typeof ri!="function"||typeof Symbol!="function"||typeof ri("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Rl()}});var oi=h((Gx,ni)=>{"use strict";s();u();var Gt={__proto__:null,foo:{}},Pl=Object;ni.exports=function(){return{__proto__:Gt}.foo===Gt.foo&&!(Gt instanceof Pl)}});var Vt=h((Yx,ii)=>{"use strict";s();u();var Fl=Function.prototype.call,Ol=Object.prototype.hasOwnProperty,Nl=ye();ii.exports=Nl.call(Fl,Ol)});var D=h((Kx,pi)=>{"use strict";s();u();var b,Ll=$t(),Bl=_t(),Ul=Mt(),Cl=Dt(),Le=_r(),Ne=P(),kl=jt(),fi=Function,zt=function(t){try{return fi('"use strict"; return ('+t+").constructor;")()}catch(e){}},de=Object.getOwnPropertyDescriptor;if(de)try{de({},"")}catch(t){de=null}var Yt=function(){throw new Ne},ql=de?function(){try{return arguments.callee,Yt}catch(t){try{return de(arguments,"callee").get}catch(e){return Yt}}}():Yt,Fe=Wt()(),$l=oi()(),O=Object.getPrototypeOf||($l?function(t){return t.__proto__}:null),Oe={},_l=typeof Uint8Array=="undefined"||!O?b:O(Uint8Array),me={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Fe&&O?O([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Oe,"%AsyncGenerator%":Oe,"%AsyncGeneratorFunction%":Oe,"%AsyncIteratorPrototype%":Oe,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ll,"%eval%":eval,"%EvalError%":Bl,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":fi,"%GeneratorFunction%":Oe,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fe&&O?O(O([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Fe||!O?b:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":Ul,"%ReferenceError%":Cl,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Fe||!O?b:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fe&&O?O(""[Symbol.iterator]()):b,"%Symbol%":Fe?Symbol:b,"%SyntaxError%":Le,"%ThrowTypeError%":ql,"%TypedArray%":_l,"%TypeError%":Ne,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":kl,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet};if(O)try{null.error}catch(t){ai=O(O(t)),me["%Error.prototype%"]=ai}var ai,Ml=function t(e){var r;if(e==="%AsyncFunction%")r=zt("async function () {}");else if(e==="%GeneratorFunction%")r=zt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=zt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return me[e]=r,r},si={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},er=ye(),Mr=Vt(),Dl=er.call(Function.call,Array.prototype.concat),jl=er.call(Function.apply,Array.prototype.splice),ui=er.call(Function.call,String.prototype.replace),Dr=er.call(Function.call,String.prototype.slice),Wl=er.call(Function.call,RegExp.prototype.exec),Gl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vl=/\\(\\)?/g,zl=function(e){var r=Dr(e,0,1),n=Dr(e,-1);if(r==="%"&&n!=="%")throw new Le("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Le("invalid intrinsic syntax, expected opening `%`");var o=[];return ui(e,Gl,function(i,a,p,c){o[o.length]=p?ui(c,Vl,"$1"):a||i}),o},Yl=function(e,r){var n=e,o;if(Mr(si,n)&&(o=si[n],n="%"+o[0]+"%"),Mr(me,n)){var i=me[n];if(i===Oe&&(i=Ml(n)),typeof i=="undefined"&&!r)throw new Ne("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Le("intrinsic "+e+" does not exist!")};pi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ne("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ne('"allowMissing" argument must be a boolean');if(Wl(/^%?[^%]*%?$/,e)===null)throw new Le("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=zl(e),o=n.length>0?n[0]:"",i=Yl("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],jl(n,Dl([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Dr(x,0,1),E=Dr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new Le("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",Mr(me,a))p=me[a];else if(p!=null){if(!(x in p)){if(!r)throw new Ne("base intrinsic for "+e+" exists, but the property is not available.");return}if(de&&m+1>=n.length){var I=de(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=Mr(p,x),p=p[x];y&&!c&&(me[a]=p)}}return p}});var Ht=h((Xx,li)=>{"use strict";s();u();li.exports=Object});var yi=h((tv,ci)=>{"use strict";s();u();ci.exports=Math.abs});var mi=h((iv,di)=>{"use strict";s();u();di.exports=Math.floor});var gi=h((uv,hi)=>{"use strict";s();u();hi.exports=Math.max});var vi=h((lv,xi)=>{"use strict";s();u();xi.exports=Math.min});var bi=h((dv,wi)=>{"use strict";s();u();wi.exports=Math.pow});var Si=h((gv,Ai)=>{"use strict";s();u();Ai.exports=Math.round});var Ti=h((wv,Ei)=>{"use strict";s();u();Ei.exports=Number.isNaN||function(e){return e!==e}});var Ri=h((Sv,Ii)=>{"use strict";s();u();var Hl=Ti();Ii.exports=function(e){return Hl(e)||e===0?e:e<0?-1:1}});var Fi=h((Iv,Pi)=>{"use strict";s();u();Pi.exports=Object.getOwnPropertyDescriptor});var rr=h((Fv,Oi)=>{"use strict";s();u();var jr=Fi();if(jr)try{jr([],"length")}catch(t){jr=null}Oi.exports=jr});var Gr=h((Lv,Ni)=>{"use strict";s();u();var Wr=Object.defineProperty||!1;if(Wr)try{Wr({},"a",{value:1})}catch(t){Wr=!1}Ni.exports=Wr});var Jt=h((Cv,Li)=>{"use strict";s();u();Li.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var Ci=h(($v,Ui)=>{"use strict";s();u();var Bi=typeof Symbol!="undefined"&&Symbol,Jl=Jt();Ui.exports=function(){return typeof Bi!="function"||typeof Symbol!="function"||typeof Bi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Jl()}});var Kt=h((Dv,ki)=>{"use strict";s();u();ki.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Zt=h((Gv,qi)=>{"use strict";s();u();var Kl=Ht();qi.exports=Kl.getPrototypeOf||null});var Vr=h((Yv,$i)=>{"use strict";s();u();$i.exports=Function.prototype.call});var Qt=h((Kv,_i)=>{"use strict";s();u();_i.exports=Function.prototype.apply});var Di=h((Xv,Mi)=>{"use strict";s();u();Mi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Wi=h((t0,ji)=>{"use strict";s();u();var Zl=ye(),Ql=Qt(),Xl=Vr(),ec=Di();ji.exports=ec||Zl.call(Xl,Ql)});var Vi=h((i0,Gi)=>{"use strict";s();u();var rc=ye(),tc=P(),nc=Vr(),oc=Wi();Gi.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new tc("a function is required");return oc(rc,nc,e)}});var Zi=h((u0,Ki)=>{"use strict";s();u();var ic=Vi(),zi=rr(),Hi;try{Hi=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Xt=!!Hi&&zi&&zi(Object.prototype,"__proto__"),Ji=Object,Yi=Ji.getPrototypeOf;Ki.exports=Xt&&typeof Xt.get=="function"?ic([Xt.get]):typeof Yi=="function"?function(e){return Yi(e==null?e:Ji(e))}:!1});var ta=h((l0,ra)=>{"use strict";s();u();var Qi=Kt(),Xi=Zt(),ea=Zi();ra.exports=Qi?function(e){return Qi(e)}:Xi?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Xi(e)}:ea?function(e){return ea(e)}:null});var tn=h((d0,ua)=>{"use strict";s();u();var A,ac=Ht(),sc=$t(),uc=_t(),fc=Mt(),pc=Dt(),ke=_r(),Ce=P(),lc=jt(),cc=yi(),yc=mi(),dc=gi(),mc=vi(),hc=bi(),gc=Si(),xc=Ri(),aa=Function,en=function(t){try{return aa('"use strict"; return ('+t+").constructor;")()}catch(e){}},tr=rr(),vc=Gr(),rn=function(){throw new Ce},wc=tr?function(){try{return arguments.callee,rn}catch(t){try{return tr(arguments,"callee").get}catch(e){return rn}}}():rn,Be=Ci()(),N=ta(),bc=Zt(),Ac=Kt(),sa=Qt(),nr=Vr(),Ue={},Sc=typeof Uint8Array=="undefined"||!N?A:N(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":Be&&N?N([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics=="undefined"?A:Atomics,"%BigInt%":typeof BigInt=="undefined"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sc,"%eval%":eval,"%EvalError%":uc,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":aa,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be&&N?N(N([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Be||!N?A:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ac,"%Object.getOwnPropertyDescriptor%":tr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":fc,"%ReferenceError%":pc,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Be||!N?A:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be&&N?N(""[Symbol.iterator]()):A,"%Symbol%":Be?Symbol:A,"%SyntaxError%":ke,"%ThrowTypeError%":wc,"%TypedArray%":Sc,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?A:Uint32Array,"%URIError%":lc,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet,"%Function.prototype.call%":nr,"%Function.prototype.apply%":sa,"%Object.defineProperty%":vc,"%Object.getPrototypeOf%":bc,"%Math.abs%":cc,"%Math.floor%":yc,"%Math.max%":dc,"%Math.min%":mc,"%Math.pow%":hc,"%Math.round%":gc,"%Math.sign%":xc,"%Reflect.getPrototypeOf%":Ac};if(N)try{null.error}catch(t){na=N(N(t)),he["%Error.prototype%"]=na}var na,Ec=function t(e){var r;if(e==="%AsyncFunction%")r=en("async function () {}");else if(e==="%GeneratorFunction%")r=en("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=en("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&N&&(r=N(o.prototype))}return he[e]=r,r},oa={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=ye(),zr=Vt(),Tc=or.call(nr,Array.prototype.concat),Ic=or.call(sa,Array.prototype.splice),ia=or.call(nr,String.prototype.replace),Yr=or.call(nr,String.prototype.slice),Rc=or.call(nr,RegExp.prototype.exec),Pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fc=/\\(\\)?/g,Oc=function(e){var r=Yr(e,0,1),n=Yr(e,-1);if(r==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var o=[];return ia(e,Pc,function(i,a,p,c){o[o.length]=p?ia(c,Fc,"$1"):a||i}),o},Nc=function(e,r){var n=e,o;if(zr(oa,n)&&(o=oa[n],n="%"+o[0]+"%"),zr(he,n)){var i=he[n];if(i===Ue&&(i=Ec(n)),typeof i=="undefined"&&!r)throw new Ce("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ke("intrinsic "+e+" does not exist!")};ua.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(Rc(/^%?[^%]*%?$/,e)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Oc(e),o=n.length>0?n[0]:"",i=Nc("%"+o+"%",r),a=i.name,p=i.value,c=!1,d=i.alias;d&&(o=d[0],Ic(n,Tc([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var x=n[m],w=Yr(x,0,1),E=Yr(x,-1);if((w==='"'||w==="'"||w==="`"||E==='"'||E==="'"||E==="`")&&w!==E)throw new ke("property names with quotes must have matching quotes");if((x==="constructor"||!y)&&(c=!0),o+="."+x,a="%"+o+"%",zr(he,a))p=he[a];else if(p!=null){if(!(x in p)){if(!r)throw new Ce("base intrinsic for "+e+" exists, but the property is not available.");return}if(tr&&m+1>=n.length){var I=tr(p,x);y=!!I,y&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else y=zr(p,x),p=p[x];y&&!c&&(he[a]=p)}}return p}});var nn=h((g0,la)=>{"use strict";s();u();var fa=Gr(),Lc=_r(),qe=P(),pa=rr();la.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new qe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new qe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!pa&&pa(e,r);if(fa)fa(e,r,{configurable:a===null&&c?c.configurable:!a,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!a)e[r]=n;else throw new Lc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var an=h((w0,ya)=>{"use strict";s();u();var on=Gr(),ca=function(){return!!on};ca.hasArrayLengthDefineBug=function(){if(!on)return null;try{return on([],"length",{value:1}).length!==1}catch(e){return!0}};ya.exports=ca});var xa=h((S0,ga)=>{"use strict";s();u();var Bc=tn(),da=nn(),Uc=an()(),ma=rr(),ha=P(),Cc=Bc("%Math.floor%");ga.exports=function(e,r){if(typeof e!="function")throw new ha("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Cc(r)!==r)throw new ha("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&ma){var a=ma(e,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!n)&&(Uc?da(e,"length",r,!0,!0):da(e,"length",r)),e}});var wa=h((I0,va)=>{"use strict";s();u();var kc=tn(),Hr=kc("%Object.defineProperty%",!0)||!1;if(Hr)try{Hr({},"a",{value:1})}catch(t){Hr=!1}va.exports=Hr});var Zr=h((F0,Jr)=>{"use strict";s();u();var sn=ye(),Kr=D(),qc=xa(),$c=P(),Sa=Kr("%Function.prototype.apply%"),Ea=Kr("%Function.prototype.call%"),Ta=Kr("%Reflect.apply%",!0)||sn.call(Ea,Sa),ba=wa(),_c=Kr("%Math.max%");Jr.exports=function(e){if(typeof e!="function")throw new $c("a function is required");var r=Ta(sn,Ea,arguments);return qc(r,1+_c(0,e.length-(arguments.length-1)),!0)};var Aa=function(){return Ta(sn,Sa,arguments)};ba?ba(Jr.exports,"apply",{value:Aa}):Jr.exports.apply=Aa});var un=h((L0,Ra)=>{"use strict";s();u();var Ia=Object.prototype.toString;Ra.exports=function(e){var r=Ia.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ia.call(e.callee)==="[object Function]"),n}});var ka=h((C0,Ca)=>{"use strict";s();u();var Ua;Object.keys||(ir=Object.prototype.hasOwnProperty,fn=Object.prototype.toString,Pa=un(),pn=Object.prototype.propertyIsEnumerable,Fa=!pn.call({toString:null},"toString"),Oa=pn.call(function(){},"prototype"),ar=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Qr=function(t){var e=t.constructor;return e&&e.prototype===t},Na={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},La=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Na["$"+t]&&ir.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{Qr(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ba=function(t){if(typeof window=="undefined"||!La)return Qr(t);try{return Qr(t)}catch(e){return!1}},Ua=function(e){var r=e!==null&&typeof e=="object",n=fn.call(e)==="[object Function]",o=Pa(e),i=r&&fn.call(e)==="[object String]",a=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Oa&&n;if(i&&e.length>0&&!ir.call(e,0))for(var c=0;c<e.length;++c)a.push(String(c));if(o&&e.length>0)for(var d=0;d<e.length;++d)a.push(String(d));else for(var m in e)!(p&&m==="prototype")&&ir.call(e,m)&&a.push(String(m));if(Fa)for(var y=Ba(e),x=0;x<ar.length;++x)!(y&&ar[x]==="constructor")&&ir.call(e,ar[x])&&a.push(ar[x]);return a});var ir,fn,Pa,pn,Fa,Oa,ar,Qr,Na,La,Ba;Ca.exports=Ua});var Ma=h(($0,_a)=>{"use strict";s();u();var Mc=Array.prototype.slice,Dc=un(),qa=Object.keys,Xr=qa?function(e){return qa(e)}:ka(),$a=Object.keys;Xr.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return Dc(n)?$a(Mc.call(n)):$a(n)})}else Object.keys=Xr;return Object.keys||Xr};_a.exports=Xr});var sr=h((D0,Ga)=>{"use strict";s();u();var jc=Ma(),Wc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Gc=Object.prototype.toString,Vc=Array.prototype.concat,Da=nn(),zc=function(t){return typeof t=="function"&&Gc.call(t)==="[object Function]"},ja=an()(),Yc=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!zc(n)||!n())return}ja?Da(t,e,r,!0):Da(t,e,r)},Wa=function(t,e){var r=arguments.length>2?arguments[2]:{},n=jc(e);Wc&&(n=Vc.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Yc(t,n[o],e[n[o]],r[n[o]])};Wa.supportsDescriptors=!!ja;Ga.exports=Wa});var q=h((G0,Ya)=>{"use strict";s();u();var Va=D(),za=Zr(),Hc=za(Va("String.prototype.indexOf"));Ya.exports=function(e,r){var n=Va(e,!!r);return typeof n=="function"&&Hc(e,".prototype.")>-1?za(n):n}});var Ka=h((Y0,Ja)=>{"use strict";s();u();var Jc=D(),Ha=Jc("%Array%"),Kc=!Ha.isArray&&q()("Object.prototype.toString");Ja.exports=Ha.isArray||function(e){return Kc(e)==="[object Array]"}});var ln=h((K0,Za)=>{"use strict";s();u();Za.exports=Ka()});var Xa=h((X0,Qa)=>{"use strict";s();u();var Zc=D(),Qc=q(),Xc=P(),ey=ln(),ry=Zc("%Reflect.apply%",!0)||Qc("Function.prototype.apply");Qa.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!ey(n))throw new Xc("Assertion failed: optional `argumentsList`, if provided, must be a List");return ry(e,r,n)}});function es(){throw new Error("setTimeout has not been defined")}function rs(){throw new Error("clearTimeout has not been defined")}function ts(t){if(ne===setTimeout)return setTimeout(t,0);if((ne===es||!ne)&&setTimeout)return ne=setTimeout,setTimeout(t,0);try{return ne(t,0)}catch(e){try{return ne.call(null,t,0)}catch(r){return ne.call(this,t,0)}}}function ty(t){if(oe===clearTimeout)return clearTimeout(t);if((oe===rs||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(t);try{return oe(t)}catch(e){try{return oe.call(null,t)}catch(r){return oe.call(this,t)}}}function ny(){!_e||!ge||(_e=!1,ge.length?J=ge.concat(J):et=-1,J.length&&ns())}function ns(){if(!_e){var t=ts(ny);_e=!0;for(var e=J.length;e;){for(ge=J,J=[];++et<e;)ge&&ge[et].run();et=-1,e=J.length}ge=null,_e=!1,ty(t)}}function oy(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];J.push(new os(t,e)),J.length===1&&!_e&&ts(ns)}function os(t,e){this.fun=t,this.array=e}function xe(){}function by(t){throw new Error("process.binding is not supported")}function Ay(){return"/"}function Sy(t){throw new Error("process.chdir is not supported")}function Ey(){return 0}function Iy(t){var e=Ty.call($e)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Py(){var t=new Date,e=t-Ry;return e/1e3}var ne,oe,J,_e,ge,et,iy,ay,sy,uy,fy,py,ly,cy,yy,dy,my,hy,gy,xy,vy,wy,$e,Ty,Ry,Fy,ur,is=Ie(()=>{"use strict";s();u();ne=es,oe=rs;typeof globalThis.setTimeout=="function"&&(ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);J=[],_e=!1,et=-1;os.prototype.run=function(){this.fun.apply(null,this.array)};iy="browser",ay="browser",sy=!0,uy={},fy=[],py="",ly={},cy={},yy={};dy=xe,my=xe,hy=xe,gy=xe,xy=xe,vy=xe,wy=xe;$e=globalThis.performance||{},Ty=$e.now||$e.mozNow||$e.msNow||$e.oNow||$e.webkitNow||function(){return new Date().getTime()};Ry=new Date;Fy={nextTick:oy,title:iy,browser:sy,env:uy,argv:fy,version:py,versions:ly,on:dy,addListener:my,once:hy,off:gy,removeListener:xy,removeAllListeners:vy,emit:wy,binding:by,cwd:Ay,chdir:Sy,umask:Ey,hrtime:Iy,platform:ay,release:cy,config:yy,uptime:Py},ur=Fy});var cn,yn,as=Ie(()=>{"use strict";s();u();typeof Object.create=="function"?cn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:cn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};yn=cn});var ds={};Bt(ds,{_extend:()=>An,debuglog:()=>ss,default:()=>_y,deprecate:()=>xn,format:()=>ot,inherits:()=>yn,inspect:()=>W,isArray:()=>vn,isBoolean:()=>it,isBuffer:()=>ls,isDate:()=>nt,isError:()=>pr,isFunction:()=>lr,isNull:()=>cr,isNullOrUndefined:()=>us,isNumber:()=>wn,isObject:()=>ve,isPrimitive:()=>ps,isRegExp:()=>fr,isString:()=>yr,isSymbol:()=>fs,isUndefined:()=>j,log:()=>cs});function ot(t){if(!yr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(W(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Oy,function(p){if(p==="%%")return"%";if(r>=o)return p;switch(p){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(c){return"[Circular]"}default:return p}}),a=n[r];r<o;a=n[++r])cr(a)||!ve(a)?i+=" "+a:i+=" "+W(a);return i}function xn(t,e){if(j(globalThis.process))return function(){return xn(t,e).apply(this,arguments)};if(ur.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(ur.throwDeprecation)throw new Error(e);ur.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function ss(t){if(j(dn)&&(dn=ur.env.NODE_DEBUG||""),t=t.toUpperCase(),!rt[t])if(new RegExp("\\b"+t+"\\b","i").test(dn)){var e=0;rt[t]=function(){var r=ot.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else rt[t]=function(){};return rt[t]}function W(t,e){var r={seen:[],stylize:Ly};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),it(e)?r.showHidden=e:e&&An(r,e),j(r.showHidden)&&(r.showHidden=!1),j(r.depth)&&(r.depth=2),j(r.colors)&&(r.colors=!1),j(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Ny),tt(r,t,r.depth)}function Ny(t,e){var r=W.styles[e];return r?"\x1B["+W.colors[r][0]+"m"+t+"\x1B["+W.colors[r][1]+"m":t}function Ly(t,e){return t}function By(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function tt(t,e,r){if(t.customInspect&&e&&lr(e.inspect)&&e.inspect!==W&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return yr(n)||(n=tt(t,n,r)),n}var o=Uy(t,e);if(o)return o;var i=Object.keys(e),a=By(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),pr(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return mn(e);if(i.length===0){if(lr(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(fr(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(nt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(pr(e))return mn(e)}var c="",d=!1,m=["{","}"];if(vn(e)&&(d=!0,m=["[","]"]),lr(e)){var y=e.name?": "+e.name:"";c=" [Function"+y+"]"}if(fr(e)&&(c=" "+RegExp.prototype.toString.call(e)),nt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),pr(e)&&(c=" "+mn(e)),i.length===0&&(!d||e.length==0))return m[0]+c+m[1];if(r<0)return fr(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var x;return d?x=Cy(t,e,r,a,i):x=i.map(function(w){return gn(t,e,r,a,w,d)}),t.seen.pop(),ky(x,c,m)}function Uy(t,e){if(j(e))return t.stylize("undefined","undefined");if(yr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(wn(e))return t.stylize(""+e,"number");if(it(e))return t.stylize(""+e,"boolean");if(cr(e))return t.stylize("null","null")}function mn(t){return"["+Error.prototype.toString.call(t)+"]"}function Cy(t,e,r,n,o){for(var i=[],a=0,p=e.length;a<p;++a)ys(e,String(a))?i.push(gn(t,e,r,n,String(a),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(gn(t,e,r,n,c,!0))}),i}function gn(t,e,r,n,o,i){var a,p,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):c.set&&(p=t.stylize("[Setter]","special")),ys(n,o)||(a="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(cr(r)?p=tt(t,c.value,null):p=tt(t,c.value,r-1),p.indexOf(`
|
|
2
2
|
`)>-1&&(i?p=p.split(`
|
|
3
3
|
`).map(function(d){return" "+d}).join(`
|
|
4
4
|
`).substr(2):p=`
|
|
5
5
|
`+p.split(`
|
|
6
6
|
`).map(function(d){return" "+d}).join(`
|
|
7
|
-
`))):p=t.stylize("[Circular]","special")),
|
|
7
|
+
`))):p=t.stylize("[Circular]","special")),j(a)){if(i&&o.match(/^\d+$/))return p;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+p}function ky(t,e,r){var n=0,o=t.reduce(function(i,a){return n++,a.indexOf(`
|
|
8
8
|
`)>=0&&n++,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(e===""?"":e+`
|
|
9
9
|
`)+" "+t.join(`,
|
|
10
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function vn(t){return Array.isArray(t)}function it(t){return typeof t=="boolean"}function cr(t){return t===null}function us(t){return t==null}function wn(t){return typeof t=="number"}function yr(t){return typeof t=="string"}function fs(t){return typeof t=="symbol"}function D(t){return t===void 0}function fr(t){return ve(t)&&bn(t)==="[object RegExp]"}function ve(t){return typeof t=="object"&&t!==null}function nt(t){return ve(t)&&bn(t)==="[object Date]"}function pr(t){return ve(t)&&(bn(t)==="[object Error]"||t instanceof Error)}function lr(t){return typeof t=="function"}function ps(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function ls(t){return f.isBuffer(t)}function bn(t){return Object.prototype.toString.call(t)}function hn(t){return t<10?"0"+t.toString(10):t.toString(10)}function $y(){var t=new Date,e=[hn(t.getHours()),hn(t.getMinutes()),hn(t.getSeconds())].join(":");return[t.getDate(),qy[t.getMonth()],e].join(" ")}function cs(){console.log("%s - %s",$y(),ot.apply(null,arguments))}function An(t,e){if(!e||!ve(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function ys(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ny,rt,dn,qy,_y,ms=Ie(()=>{"use strict";s();u();is();as();Ny=/%[sdj%]/g;rt={};j.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};j.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};qy=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_y={inherits:yn,_extend:An,log:cs,isBuffer:ls,isPrimitive:ps,isFunction:lr,isError:pr,isDate:nt,isObject:ve,isRegExp:fr,isUndefined:D,isSymbol:fs,isString:yr,isNumber:wn,isNullOrUndefined:us,isNull:cr,isBoolean:it,isArray:vn,inspect:j,deprecate:xn,format:ot,debuglog:ss}});var hs=h((cw,at)=>{"use strict";s();u();var we=(ms(),xo(ds));if(we&&we.default){at.exports=we.default;for(let t in we)at.exports[t]=we[t]}else we&&(at.exports=we)});var xs=h((mw,gs)=>{"use strict";s();u();gs.exports=hs().inspect});var gr=h((xw,$s)=>{"use strict";s();u();var Ln=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Ln?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ut=Ln&&Sn&&typeof Sn.get=="function"?Sn.get:null,vs=Ln&&Map.prototype.forEach,Bn=typeof Set=="function"&&Set.prototype,En=Object.getOwnPropertyDescriptor&&Bn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ft=Bn&&En&&typeof En.get=="function"?En.get:null,ws=Bn&&Set.prototype.forEach,My=typeof WeakMap=="function"&&WeakMap.prototype,mr=My?WeakMap.prototype.has:null,Dy=typeof WeakSet=="function"&&WeakSet.prototype,hr=Dy?WeakSet.prototype.has:null,jy=typeof WeakRef=="function"&&WeakRef.prototype,bs=jy?WeakRef.prototype.deref:null,Wy=Boolean.prototype.valueOf,Gy=Object.prototype.toString,Vy=Function.prototype.toString,zy=String.prototype.match,Un=String.prototype.slice,ie=String.prototype.replace,Yy=String.prototype.toUpperCase,As=String.prototype.toLowerCase,Os=RegExp.prototype.test,Ss=Array.prototype.concat,W=Array.prototype.join,Hy=Array.prototype.slice,Es=Math.floor,Rn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Tn=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||!0)?Symbol.toStringTag:null,Ls=Object.prototype.propertyIsEnumerable,Ts=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Is(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Os.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Es(-t):Es(t);if(n!==t){var o=String(n),i=Un.call(e,o.length+1);return ie.call(o,r,"$&_")+"."+ie.call(ie.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ie.call(e,r,"$&_")}var Fn=xs(),Rs=Fn.custom,Ps=Cs(Rs)?Rs:null,Bs={__proto__:null,double:'"',single:"'"},Jy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$s.exports=function t(e,r,n,o){var i=r||{};if(K(i,"quoteStyle")&&!K(Bs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=K(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?Is(e,c):c}if(typeof e=="bigint"){var d=String(e)+"n";return p?Is(e,d):d}var m=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof e=="object")return Nn(e)?"[Array]":"[Object]";var y=yd(i,n);if(typeof o=="undefined")o=[];else if(ks(o,e)>=0)return"[Circular]";function x(Te,Nr,pp){if(Nr&&(o=Hy.call(o),o.push(Nr)),pp){var po={depth:i.depth};return K(i,"quoteStyle")&&(po.quoteStyle=i.quoteStyle),t(Te,po,n+1,o)}return t(Te,i,n+1,o)}if(typeof e=="function"&&!Fs(e)){var w=od(e),E=st(e,x);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(E.length>0?" { "+W.call(E,", ")+" }":"")}if(Cs(e)){var I=Me?ie.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(e);return typeof e=="object"&&!Me?dr(I):I}if(pd(e)){for(var B="<"+As.call(String(e.nodeName)),C=e.attributes||[],z=0;z<C.length;z++)B+=" "+C[z].name+"="+Us(Ky(C[z].value),"double",i);return B+=">",e.childNodes&&e.childNodes.length&&(B+="..."),B+="</"+As.call(String(e.nodeName))+">",B}if(Nn(e)){if(e.length===0)return"[]";var fe=st(e,x);return y&&!cd(fe)?"["+On(fe,y)+"]":"[ "+W.call(fe,", ")+" ]"}if(Qy(e)){var Qe=st(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!Ls.call(e,"cause")?"{ ["+String(e)+"] "+W.call(Ss.call("[cause]: "+x(e.cause),Qe),", ")+" }":Qe.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+W.call(Qe,", ")+" }"}if(typeof e=="object"&&a){if(Ps&&typeof e[Ps]=="function"&&Fn)return Fn(e,{depth:m-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(id(e)){var Fr=[];return vs&&vs.call(e,function(Te,Nr){Fr.push(x(Nr,e,!0)+" => "+x(Te,e))}),Ns("Map",ut.call(e),Fr,y)}if(ud(e)){var so=[];return ws&&ws.call(e,function(Te){so.push(x(Te,e))}),Ns("Set",ft.call(e),so,y)}if(ad(e))return In("WeakMap");if(fd(e))return In("WeakSet");if(sd(e))return In("WeakRef");if(ed(e))return dr(x(Number(e)));if(td(e))return dr(x(Rn.call(e)));if(rd(e))return dr(Wy.call(e));if(Xy(e))return dr(x(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!Zy(e)&&!Fs(e)){var Pt=st(e,x),uo=Ts?Ts(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ft=e instanceof Object?"":"null prototype",fo=!uo&&L&&Object(e)===e&&L in e?Un.call(ae(e),8,-1):Ft?"Object":"",fp=uo||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Nt=fp+(fo||Ft?"["+W.call(Ss.call([],fo||[],Ft||[]),": ")+"] ":"");return Pt.length===0?Nt+"{}":y?Nt+"{"+On(Pt,y)+"}":Nt+"{ "+W.call(Pt,", ")+" }"}return String(e)};function Us(t,e,r){var n=r.quoteStyle||e,o=Bs[n];return o+t+o}function Ky(t){return ie.call(String(t),/"/g,""")}function Nn(t){return ae(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function Zy(t){return ae(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function Fs(t){return ae(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function Qy(t){return ae(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function Xy(t){return ae(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function ed(t){return ae(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function rd(t){return ae(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function Cs(t){if(Me)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Pn)return!1;try{return Pn.call(t),!0}catch(e){}return!1}function td(t){if(!t||typeof t!="object"||!Rn)return!1;try{return Rn.call(t),!0}catch(e){}return!1}var nd=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return nd.call(t,e)}function ae(t){return Gy.call(t)}function od(t){if(t.name)return t.name;var e=zy.call(Vy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ks(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function id(t){if(!ut||!t||typeof t!="object")return!1;try{ut.call(t);try{ft.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function ad(t){if(!mr||!t||typeof t!="object")return!1;try{mr.call(t,mr);try{hr.call(t,hr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function sd(t){if(!bs||!t||typeof t!="object")return!1;try{return bs.call(t),!0}catch(e){}return!1}function ud(t){if(!ft||!t||typeof t!="object")return!1;try{ft.call(t);try{ut.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function fd(t){if(!hr||!t||typeof t!="object")return!1;try{hr.call(t,hr);try{mr.call(t,mr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function pd(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function qs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return qs(Un.call(t,0,e.maxStringLength),e)+n}var o=Jy[e.quoteStyle||"single"];o.lastIndex=0;var i=ie.call(ie.call(t,o,"\\$1"),/[\x00-\x1f]/g,ld);return Us(i,"single",e)}function ld(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Yy.call(e.toString(16))}function dr(t){return"Object("+t+")"}function In(t){return t+" { ? }"}function Ns(t,e,r,n){var o=n?On(r,n):W.call(r,", ");return t+" ("+e+") {"+o+"}"}function cd(t){for(var e=0;e<t.length;e++)if(ks(t[e],`
|
|
11
|
-
`)>=0)return!1;return!0}function yd(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=
|
|
12
|
-
`+e.prev+e.base;return r+
|
|
13
|
-
`+e.prev}function st(t,e){var r=Nn(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=K(t,o)?e(t[o],t):""}var i=typeof Tn=="function"?Tn(t):[],a;if(Me){a={};for(var p=0;p<i.length;p++)a["$"+i[p]]=i[p]}for(var c in t)K(t,c)&&(r&&String(Number(c))===c&&c<t.length||Me&&a["$"+c]instanceof Symbol||(Os.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof Tn=="function")for(var d=0;d<i.length;d++)Ls.call(t,i[d])&&n.push("["+e(i[d])+"]: "+e(t[i[d]],t));return n}});var pt=h((bw,_s)=>{"use strict";s();u();_s.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Ds=h((Ew,Ms)=>{"use strict";s();u();var dd=P(),md=gr(),hd=pt();Ms.exports=function(e,r){if(!hd(r))throw new dd("Assertion failed: IsPropertyKey(P) is not true, got "+md(r));return e[r]}});var Vs=h((Rw,Gs)=>{"use strict";s();u();var Ws=Function.prototype.toString,De=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kn,lt;if(typeof De=="function"&&typeof Object.defineProperty=="function")try{kn=Object.defineProperty({},"length",{get:function(){throw lt}}),lt={},De(function(){throw 42},null,kn)}catch(t){t!==lt&&(De=null)}else De=null;var gd=/^\s*class\b/,qn=function(e){try{var r=Ws.call(e);return gd.test(r)}catch(n){return!1}},Cn=function(e){try{return qn(e)?!1:(Ws.call(e),!0)}catch(r){return!1}},ct=Object.prototype.toString,xd="[object Object]",vd="[object Function]",wd="[object GeneratorFunction]",bd="[object HTMLAllCollection]",Ad="[object HTML document.all class]",Sd="[object HTMLCollection]",Ed=typeof Symbol=="function"&&!!Symbol.toStringTag,Td=!(0 in[,]),$n=function(){return!1};typeof document=="object"&&(js=document.all,ct.call(js)===ct.call(document.all)&&($n=function(e){if((Td||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=ct.call(e);return(r===bd||r===Ad||r===Sd||r===xd)&&e("")==null}catch(n){}return!1}));var js;Gs.exports=De?function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{De(e,null,kn)}catch(r){if(r!==lt)return!1}return!qn(e)&&Cn(e)}:function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Ed)return Cn(e);if(qn(e))return!1;var r=ct.call(e);return r!==vd&&r!==wd&&!/^\[object HTML/.test(r)?!1:Cn(e)}});var _n=h((Nw,zs)=>{"use strict";s();u();zs.exports=Vs()});var Ks=h((Bw,Js)=>{"use strict";s();u();var Ys=P(),Id=Ds(),Rd=_n(),Pd=pt(),Hs=gr();Js.exports=function(e,r){if(!Pd(r))throw new Ys("Assertion failed: IsPropertyKey(P) is not true");var n=Id(e,r);if(n!=null){if(!Rd(n))throw new Ys(Hs(r)+" is not a function: "+Hs(n));return n}}});var Qs=h((kw,Zs)=>{"use strict";s();u();var Fd=Jt();Zs.exports=function(){return Fd()&&!!Symbol.toStringTag}});var Wn=h((_w,tu)=>{"use strict";s();u();var Mn=q(),Xs=Qs()(),eu,ru,Dn,jn;Xs&&(eu=Mn("Object.prototype.hasOwnProperty"),ru=Mn("RegExp.prototype.exec"),Dn={},yt=function(){throw Dn},jn={toString:yt,valueOf:yt},typeof Symbol.toPrimitive=="symbol"&&(jn[Symbol.toPrimitive]=yt));var yt,Nd=Mn("Object.prototype.toString"),Od=Object.getOwnPropertyDescriptor,Ld="[object RegExp]";tu.exports=Xs?function(e){if(!e||typeof e!="object")return!1;var r=Od(e,"lastIndex"),n=r&&eu(r,"value");if(!n)return!1;try{ru(e,jn)}catch(o){return o===Dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Nd(e)===Ld}});var Gn=h((jw,nu)=>{"use strict";s();u();var Bd=q(),Ud=Wn(),Cd=Bd("RegExp.prototype.exec"),kd=P();nu.exports=function(e){if(!Ud(e))throw new kd("`regex` must be a RegExp");return function(n){return Cd(e,n)!==null}}});var iu=h((Vw,ou)=>{"use strict";s();u();ou.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var su=h((Hw,au)=>{"use strict";s();u();au.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var Vn=h((Zw,uu)=>{"use strict";s();u();var qd=su();uu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":qd(e)}});var lu=h((eb,pu)=>{"use strict";s();u();var fu=P(),$d=gr(),_d=pt(),Md=Vn();pu.exports=function(e,r){if(Md(e)!=="Object")throw new fu("Assertion failed: Type(O) is not Object");if(!_d(r))throw new fu("Assertion failed: IsPropertyKey(P) is not true, got "+$d(r));return e[r]}});var yu=h((nb,cu)=>{"use strict";s();u();var Dd=M();cu.exports=Dd("%Math.min%")});var zn=h((ab,du)=>{"use strict";s();u();du.exports=Number.isNaN||function(e){return e!==e}});var hu=h((fb,mu)=>{"use strict";s();u();var jd=zn();mu.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!jd(t)&&t!==1/0&&t!==-1/0}});var dt=h((cb,xu)=>{"use strict";s();u();var gu=M(),Wd=gu("%Math.abs%"),Gd=gu("%Math.floor%"),Vd=zn(),zd=hu();xu.exports=function(e){if(typeof e!="number"||Vd(e)||!zd(e))return!1;var r=Wd(e);return Gd(r)===r}});var Hn=h((mb,vu)=>{"use strict";s();u();var Yd=q(),Yn=P(),Hd=dt(),Jd=Yd("String.prototype.slice");vu.exports=function(e,r,n){if(typeof e!="string")throw new Yn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new Yn("Assertion failed: `searchValue` must be a String");if(!Hd(n)||n<0)throw new Yn("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,a=n;a<=o-i;a+=1){var p=Jd(e,a,a+i);if(p===r)return a}return-1}});var mt=h((xb,wu)=>{"use strict";s();u();var Kd=P();wu.exports=function(e){if(e==null)throw new Kd(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var ht=h((bb,bu)=>{"use strict";s();u();var Zd=M(),Qd=Zd("%String%"),Xd=P();bu.exports=function(e){if(typeof e=="symbol")throw new Xd("Cannot convert a Symbol value to a string");return Qd(e)}});var Jn=h((Eb,Eu)=>{"use strict";s();u();var em=mt(),rm=ht(),tm=q(),Au=tm("String.prototype.replace"),Su=/^\s$/.test("\u180E"),nm=Su?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,om=Su?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Eu.exports=function(){var e=rm(em(this));return Au(Au(e,nm,""),om,"")}});var Kn=h((Rb,Iu)=>{"use strict";s();u();var im=Jn(),Tu="\u200B",je="\u180E";Iu.exports=function(){return String.prototype.trim&&Tu.trim()===Tu&&je.trim()===je&&("_"+je).trim()==="_"+je&&(je+"_").trim()===je+"_"?String.prototype.trim:im}});var Pu=h((Nb,Ru)=>{"use strict";s();u();var am=sr(),sm=Kn();Ru.exports=function(){var e=sm();return am(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Lu=h((Bb,Ou)=>{"use strict";s();u();var um=Zr(),fm=sr(),pm=mt(),lm=Jn(),Fu=Kn(),cm=Pu(),ym=um(Fu()),Nu=function(e){return pm(e),ym(e)};fm(Nu,{getPolyfill:Fu,implementation:lm,shim:cm});Ou.exports=Nu});var ku=h((kb,Cu)=>{"use strict";s();u();var Qn=M(),Zn=Qn("%Number%"),dm=Qn("%RegExp%"),mm=P(),Bu=Qn("%parseInt%"),hm=q(),gt=Gn(),Uu=hm("String.prototype.slice"),gm=gt(/^0b[01]+$/i),xm=gt(/^0o[0-7]+$/i),vm=gt(/^[-+]0x[0-9a-f]+$/i),wm=["\x85","\u200B","\uFFFE"].join(""),bm=new dm("["+wm+"]","g"),Am=gt(bm),Sm=Lu();Cu.exports=function t(e){if(typeof e!="string")throw new mm("Assertion failed: `argument` is not a String");if(gm(e))return Zn(Bu(Uu(e,2),2));if(xm(e))return Zn(Bu(Uu(e,2),8));if(Am(e)||vm(e))return NaN;var r=Sm(e);return r!==e?t(r):Zn(e)}});var _u=h((_b,$u)=>{"use strict";s();u();var Em=P(),qu=dt(),Tm=q(),Im=Tm("String.prototype.slice");$u.exports=function(e,r,n){if(typeof e!="string"||!qu(r)||arguments.length>2&&!qu(n))throw new Em("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Im(e,r,arguments.length>2?n:e.length)}});var Du=h((jb,Mu)=>{"use strict";s();u();Mu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Wu=h((Vb,ju)=>{"use strict";s();u();var Rm=q()("String.prototype.slice");ju.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Rm(r,0,e.length)===e}});var Hu=h((Hb,Yu)=>{"use strict";s();u();var Z=P(),zu=Gn(),Pm=iu(),Xn=gr(),Fm=lu(),Nm=ln(),Om=yu(),Lm=Hn(),Gu=ku(),Q=_u(),Bm=ht(),Vu=Vn(),Um=dt(),Cm=Du(),xr=Wu(),km=zu(/^\$[0-9]/),qm=zu(/^\$[0-9][0-9]/);Yu.exports=function(e,r,n,o,i,a){if(typeof e!="string")throw new Z("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new Z("Assertion failed: `str` must be a String");if(!Um(n)||n<0)throw new Z("Assertion failed: `position` must be a nonnegative integer, got "+Xn(n));if(!Nm(o)||!Pm(o,Cm))throw new Z("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+Xn(o));if(typeof i!="undefined"&&Vu(i)!=="Object")throw new Z("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new Z("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new Z("Assertion failed: position > stringLength, got "+Xn(n));for(var c=a,d="";c!=="";){var m,y,x;if(xr("$$",c))m="$$",y="$";else if(xr("$`",c))m="$`",y=Q(r,0,n);else if(xr("$&",c))m="$&",y=e;else if(xr("$'",c)){m="$'";var w=e.length,E=n+w;y=Q(r,Om(E,p))}else if(km(c)){var I=qm(c)?2:1,B=Q(c,1,1+I),C=Gu(B);if(C<0||C>99)throw new Z("Assertion failed: `index` must be >= 0 and <= 99");var z=o.length;C>z&&I===2&&(I=1,B=Q(B,0,1),C=Gu(B)),m=Q(c,0,1+I),1<=C&&C<=z?(x=o[C-1],typeof x=="undefined"?y="":y=x):y=m}else if(xr("$<",c)){var fe=Lm(c,">",0);if(fe===-1||typeof i=="undefined")m="$<",y=m;else{m=Q(c,0,fe+1);var Qe=Q(c,2,fe);if(Vu(i)!=="Object")throw new Z("Assertion failed: Type(namedCaptures) is not Object");x=Fm(i,Qe),typeof x=="undefined"?y="":y=Bm(x)}}else m=Q(c,0,1),y=m;var Fr=m.length;c=Q(c,Fr),d+=y}return d}});var ro=h((Zb,Qu)=>{"use strict";s();u();var Ju=Xa(),$m=Ks(),_m=Hu(),Mm=_n(),Dm=mt(),xt=ht(),Ku=Hn(),jm=M(),vt=q(),Wm=Wt()(),Gm=Wn(),Vm=jm("%Math.max%"),Zu=P(),zm=vt("Array.prototype.push"),eo=vt("String.prototype.slice"),Ym=vt("String.prototype.indexOf"),Hm=vt("String.prototype.replace");Qu.exports=function(e,r){var n=Dm(this),o=Gm(e);if(o&&Ym(eo(e,e.source.length+2),"g")===-1)throw new Zu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Wm&&Symbol.replace){if(e!=null){var i=$m(e,Symbol.replace);if(typeof i!="undefined")return Ju(i,e,[n,r])}}else if(o)return Hm(n,e,r);var a=xt(n),p=xt(e),c=Mm(r);c||(r=xt(r));for(var d=p.length,m=Vm(1,d),y=[],x=Ku(a,p,0);x!==-1;)zm(y,x),x=Ku(a,p,x+m);for(var w=0,E="",I=0;I<y.length;I+=1){var B;if(c)B=xt(Ju(r,void 0,[p,y[I],a]));else{if(typeof r!="string")throw new Zu("Assertion failed: `replaceValue` should be a string at this point");var C=[];B=_m(p,a,y[I],C,void 0,r)}var z=eo(a,w,y[I]);E+=z+B,w=y[I]+d}return w<a.length&&(E+=eo(a,w)),E}});var to=h((eA,Xu)=>{"use strict";s();u();var Jm=ro();Xu.exports=function(){return String.prototype.replaceAll||Jm}});var rf=h((nA,ef)=>{"use strict";s();u();var Km=sr(),Zm=to();ef.exports=function(){var e=Zm();return Km(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var af=h((aA,of)=>{"use strict";s();u();var Qm=Zr(),Xm=sr(),tf=ro(),eh=to(),rh=rf(),nf=Qm(tf);Xm(nf,{getPolyfill:eh,implementation:tf,shim:rh});of.exports=nf});var nx={};Bt(nx,{DynamicSnippetsGenerator:()=>Rt});module.exports=xo(nx);s();u();var HR=gp(af(),1);s();u();s();u();s();u();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}s();u();function vr(t){return Object.keys(t)}s();u();s();u();s();u();s();u();s();u();s();u();var th=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,sf=th;var nh=typeof self=="object"&&self&&self.Object===Object&&self,oh=sf||nh||Function("return this")(),uf=oh;var ih=uf.Symbol,X=ih;s();u();var ff=Object.prototype,ah=ff.hasOwnProperty,sh=ff.toString,wr=X?X.toStringTag:void 0;function uh(t){var e=ah.call(t,wr),r=t[wr];try{t[wr]=void 0;var n=!0}catch(i){}var o=sh.call(t);return n&&(e?t[wr]=r:delete t[wr]),o}var pf=uh;s();u();var fh=Object.prototype,ph=fh.toString;function lh(t){return ph.call(t)}var lf=lh;var ch="[object Null]",yh="[object Undefined]",cf=X?X.toStringTag:void 0;function dh(t){return t==null?t===void 0?yh:ch:cf&&cf in Object(t)?pf(t):lf(t)}var yf=dh;s();u();function mh(t){return t!=null&&typeof t=="object"}var df=mh;var hh="[object Symbol]";function gh(t){return typeof t=="symbol"||df(t)&&yf(t)==hh}var mf=gh;s();u();s();u();function xh(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var hf=xh;s();u();var vh=Array.isArray,gf=vh;var wh=1/0,xf=X?X.prototype:void 0,vf=xf?xf.toString:void 0;function wf(t){if(typeof t=="string")return t;if(gf(t))return hf(t,wf)+"";if(mf(t))return vf?vf.call(t):"";var e=t+"";return e=="0"&&1/t==-wh?"-0":e}var bf=wf;s();u();function bh(t){return t==null?"":bf(t)}var se=bh;s();u();s();u();s();u();s();u();s();u();s();u();function Ah(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var Af=Ah;function Sh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Af(t,e,r)}var Sf=Sh;s();u();var Eh="\\ud800-\\udfff",Th="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",Rh="\\u20d0-\\u20ff",Ph=Th+Ih+Rh,Fh="\\ufe0e\\ufe0f",Nh="\\u200d",Oh=RegExp("["+Nh+Eh+Ph+Fh+"]");function Lh(t){return Oh.test(t)}var wt=Lh;s();u();s();u();function Bh(t){return t.split("")}var Ef=Bh;s();u();var Tf="\\ud800-\\udfff",Uh="\\u0300-\\u036f",Ch="\\ufe20-\\ufe2f",kh="\\u20d0-\\u20ff",qh=Uh+Ch+kh,$h="\\ufe0e\\ufe0f",_h="["+Tf+"]",no="["+qh+"]",oo="\\ud83c[\\udffb-\\udfff]",Mh="(?:"+no+"|"+oo+")",If="[^"+Tf+"]",Rf="(?:\\ud83c[\\udde6-\\uddff]){2}",Pf="[\\ud800-\\udbff][\\udc00-\\udfff]",Dh="\\u200d",Ff=Mh+"?",Nf="["+$h+"]?",jh="(?:"+Dh+"(?:"+[If,Rf,Pf].join("|")+")"+Nf+Ff+")*",Wh=Nf+Ff+jh,Gh="(?:"+[If+no+"?",no,Rf,Pf,_h].join("|")+")",Vh=RegExp(oo+"(?="+oo+")|"+Gh+Wh,"g");function zh(t){return t.match(Vh)||[]}var Of=zh;function Yh(t){return wt(t)?Of(t):Ef(t)}var Lf=Yh;function Hh(t){return function(e){e=se(e);var r=wt(e)?Lf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Sf(r,1).join(""):e.slice(1);return n[t]()+o}}var Bf=Hh;var Jh=Bf("toUpperCase"),We=Jh;function Kh(t){return We(se(t).toLowerCase())}var Uf=Kh;s();u();s();u();function Zh(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var Cf=Zh;s();u();s();u();s();u();function Qh(t){return function(e){return t==null?void 0:t[e]}}var kf=Qh;var Xh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},eg=kf(Xh),qf=eg;var rg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tg="\\u0300-\\u036f",ng="\\ufe20-\\ufe2f",og="\\u20d0-\\u20ff",ig=tg+ng+og,ag="["+ig+"]",sg=RegExp(ag,"g");function ug(t){return t=se(t),t&&t.replace(rg,qf).replace(sg,"")}var $f=ug;s();u();s();u();var fg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function pg(t){return t.match(fg)||[]}var _f=pg;s();u();var lg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function cg(t){return lg.test(t)}var Mf=cg;s();u();var Vf="\\ud800-\\udfff",yg="\\u0300-\\u036f",dg="\\ufe20-\\ufe2f",mg="\\u20d0-\\u20ff",hg=yg+dg+mg,zf="\\u2700-\\u27bf",Yf="a-z\\xdf-\\xf6\\xf8-\\xff",gg="\\xac\\xb1\\xd7\\xf7",xg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vg="\\u2000-\\u206f",wg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hf="A-Z\\xc0-\\xd6\\xd8-\\xde",bg="\\ufe0e\\ufe0f",Jf=gg+xg+vg+wg,Kf="['\u2019]",Df="["+Jf+"]",Ag="["+hg+"]",Zf="\\d+",Sg="["+zf+"]",Qf="["+Yf+"]",Xf="[^"+Vf+Jf+Zf+zf+Yf+Hf+"]",Eg="\\ud83c[\\udffb-\\udfff]",Tg="(?:"+Ag+"|"+Eg+")",Ig="[^"+Vf+"]",ep="(?:\\ud83c[\\udde6-\\uddff]){2}",rp="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Hf+"]",Rg="\\u200d",jf="(?:"+Qf+"|"+Xf+")",Pg="(?:"+Ge+"|"+Xf+")",Wf="(?:"+Kf+"(?:d|ll|m|re|s|t|ve))?",Gf="(?:"+Kf+"(?:D|LL|M|RE|S|T|VE))?",tp=Tg+"?",np="["+bg+"]?",Fg="(?:"+Rg+"(?:"+[Ig,ep,rp].join("|")+")"+np+tp+")*",Ng="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Og="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lg=np+tp+Fg,Bg="(?:"+[Sg,ep,rp].join("|")+")"+Lg,Ug=RegExp([Ge+"?"+Qf+"+"+Wf+"(?="+[Df,Ge,"$"].join("|")+")",Pg+"+"+Gf+"(?="+[Df,Ge+jf,"$"].join("|")+")",Ge+"?"+jf+"+"+Wf,Ge+"+"+Gf,Og,Ng,Zf,Bg].join("|"),"g");function Cg(t){return t.match(Ug)||[]}var op=Cg;function kg(t,e,r){return t=se(t),e=r?void 0:e,e===void 0?Mf(t)?op(t):_f(t):t.match(e)||[]}var ip=kg;var qg="['\u2019]",$g=RegExp(qg,"g");function _g(t){return function(e){return Cf(ip($f(e).replace($g,"")),t,"")}}var ap=_g;var Mg=ap(function(t,e,r){return e=e.toLowerCase(),t+(r?Uf(e):e)}),bt=Mg;s();u();s();u();var be=class{};s();u();s();u();var G=class extends be{constructor(r){super();v(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var Dg=4,br=class{constructor(){v(this,"buffer","");v(this,"indentLevel",0);v(this,"hasWrittenAnything",!1);v(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
10
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function vn(t){return Array.isArray(t)}function it(t){return typeof t=="boolean"}function cr(t){return t===null}function us(t){return t==null}function wn(t){return typeof t=="number"}function yr(t){return typeof t=="string"}function fs(t){return typeof t=="symbol"}function j(t){return t===void 0}function fr(t){return ve(t)&&bn(t)==="[object RegExp]"}function ve(t){return typeof t=="object"&&t!==null}function nt(t){return ve(t)&&bn(t)==="[object Date]"}function pr(t){return ve(t)&&(bn(t)==="[object Error]"||t instanceof Error)}function lr(t){return typeof t=="function"}function ps(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function ls(t){return f.isBuffer(t)}function bn(t){return Object.prototype.toString.call(t)}function hn(t){return t<10?"0"+t.toString(10):t.toString(10)}function $y(){var t=new Date,e=[hn(t.getHours()),hn(t.getMinutes()),hn(t.getSeconds())].join(":");return[t.getDate(),qy[t.getMonth()],e].join(" ")}function cs(){console.log("%s - %s",$y(),ot.apply(null,arguments))}function An(t,e){if(!e||!ve(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function ys(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Oy,rt,dn,qy,_y,ms=Ie(()=>{"use strict";s();u();is();as();Oy=/%[sdj%]/g;rt={};W.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};W.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};qy=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_y={inherits:yn,_extend:An,log:cs,isBuffer:ls,isPrimitive:ps,isFunction:lr,isError:pr,isDate:nt,isObject:ve,isRegExp:fr,isUndefined:j,isSymbol:fs,isString:yr,isNumber:wn,isNullOrUndefined:us,isNull:cr,isBoolean:it,isArray:vn,inspect:W,deprecate:xn,format:ot,debuglog:ss}});var hs=h((cw,at)=>{"use strict";s();u();var we=(ms(),xo(ds));if(we&&we.default){at.exports=we.default;for(let t in we)at.exports[t]=we[t]}else we&&(at.exports=we)});var xs=h((mw,gs)=>{"use strict";s();u();gs.exports=hs().inspect});var gr=h((xw,$s)=>{"use strict";s();u();var Ln=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Ln?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ut=Ln&&Sn&&typeof Sn.get=="function"?Sn.get:null,vs=Ln&&Map.prototype.forEach,Bn=typeof Set=="function"&&Set.prototype,En=Object.getOwnPropertyDescriptor&&Bn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ft=Bn&&En&&typeof En.get=="function"?En.get:null,ws=Bn&&Set.prototype.forEach,My=typeof WeakMap=="function"&&WeakMap.prototype,mr=My?WeakMap.prototype.has:null,Dy=typeof WeakSet=="function"&&WeakSet.prototype,hr=Dy?WeakSet.prototype.has:null,jy=typeof WeakRef=="function"&&WeakRef.prototype,bs=jy?WeakRef.prototype.deref:null,Wy=Boolean.prototype.valueOf,Gy=Object.prototype.toString,Vy=Function.prototype.toString,zy=String.prototype.match,Un=String.prototype.slice,ie=String.prototype.replace,Yy=String.prototype.toUpperCase,As=String.prototype.toLowerCase,Ns=RegExp.prototype.test,Ss=Array.prototype.concat,G=Array.prototype.join,Hy=Array.prototype.slice,Es=Math.floor,Rn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Tn=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||!0)?Symbol.toStringTag:null,Ls=Object.prototype.propertyIsEnumerable,Ts=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Is(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ns.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Es(-t):Es(t);if(n!==t){var o=String(n),i=Un.call(e,o.length+1);return ie.call(o,r,"$&_")+"."+ie.call(ie.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ie.call(e,r,"$&_")}var Fn=xs(),Rs=Fn.custom,Ps=Cs(Rs)?Rs:null,Bs={__proto__:null,double:'"',single:"'"},Jy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$s.exports=function t(e,r,n,o){var i=r||{};if(K(i,"quoteStyle")&&!K(Bs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=K(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return qs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?Is(e,c):c}if(typeof e=="bigint"){var d=String(e)+"n";return p?Is(e,d):d}var m=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof e=="object")return On(e)?"[Array]":"[Object]";var y=yd(i,n);if(typeof o=="undefined")o=[];else if(ks(o,e)>=0)return"[Circular]";function x(Te,Or,pp){if(Or&&(o=Hy.call(o),o.push(Or)),pp){var po={depth:i.depth};return K(i,"quoteStyle")&&(po.quoteStyle=i.quoteStyle),t(Te,po,n+1,o)}return t(Te,i,n+1,o)}if(typeof e=="function"&&!Fs(e)){var w=od(e),E=st(e,x);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(E.length>0?" { "+G.call(E,", ")+" }":"")}if(Cs(e)){var I=Me?ie.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(e);return typeof e=="object"&&!Me?dr(I):I}if(pd(e)){for(var B="<"+As.call(String(e.nodeName)),C=e.attributes||[],z=0;z<C.length;z++)B+=" "+C[z].name+"="+Us(Ky(C[z].value),"double",i);return B+=">",e.childNodes&&e.childNodes.length&&(B+="..."),B+="</"+As.call(String(e.nodeName))+">",B}if(On(e)){if(e.length===0)return"[]";var fe=st(e,x);return y&&!cd(fe)?"["+Nn(fe,y)+"]":"[ "+G.call(fe,", ")+" ]"}if(Qy(e)){var Qe=st(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!Ls.call(e,"cause")?"{ ["+String(e)+"] "+G.call(Ss.call("[cause]: "+x(e.cause),Qe),", ")+" }":Qe.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+G.call(Qe,", ")+" }"}if(typeof e=="object"&&a){if(Ps&&typeof e[Ps]=="function"&&Fn)return Fn(e,{depth:m-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(id(e)){var Fr=[];return vs&&vs.call(e,function(Te,Or){Fr.push(x(Or,e,!0)+" => "+x(Te,e))}),Os("Map",ut.call(e),Fr,y)}if(ud(e)){var so=[];return ws&&ws.call(e,function(Te){so.push(x(Te,e))}),Os("Set",ft.call(e),so,y)}if(ad(e))return In("WeakMap");if(fd(e))return In("WeakSet");if(sd(e))return In("WeakRef");if(ed(e))return dr(x(Number(e)));if(td(e))return dr(x(Rn.call(e)));if(rd(e))return dr(Wy.call(e));if(Xy(e))return dr(x(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!Zy(e)&&!Fs(e)){var Pt=st(e,x),uo=Ts?Ts(e)===Object.prototype:e instanceof Object||e.constructor===Object,Ft=e instanceof Object?"":"null prototype",fo=!uo&&L&&Object(e)===e&&L in e?Un.call(ae(e),8,-1):Ft?"Object":"",fp=uo||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Ot=fp+(fo||Ft?"["+G.call(Ss.call([],fo||[],Ft||[]),": ")+"] ":"");return Pt.length===0?Ot+"{}":y?Ot+"{"+Nn(Pt,y)+"}":Ot+"{ "+G.call(Pt,", ")+" }"}return String(e)};function Us(t,e,r){var n=r.quoteStyle||e,o=Bs[n];return o+t+o}function Ky(t){return ie.call(String(t),/"/g,""")}function On(t){return ae(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function Zy(t){return ae(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function Fs(t){return ae(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function Qy(t){return ae(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function Xy(t){return ae(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function ed(t){return ae(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function rd(t){return ae(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function Cs(t){if(Me)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Pn)return!1;try{return Pn.call(t),!0}catch(e){}return!1}function td(t){if(!t||typeof t!="object"||!Rn)return!1;try{return Rn.call(t),!0}catch(e){}return!1}var nd=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return nd.call(t,e)}function ae(t){return Gy.call(t)}function od(t){if(t.name)return t.name;var e=zy.call(Vy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ks(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function id(t){if(!ut||!t||typeof t!="object")return!1;try{ut.call(t);try{ft.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function ad(t){if(!mr||!t||typeof t!="object")return!1;try{mr.call(t,mr);try{hr.call(t,hr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function sd(t){if(!bs||!t||typeof t!="object")return!1;try{return bs.call(t),!0}catch(e){}return!1}function ud(t){if(!ft||!t||typeof t!="object")return!1;try{ft.call(t);try{ut.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function fd(t){if(!hr||!t||typeof t!="object")return!1;try{hr.call(t,hr);try{mr.call(t,mr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function pd(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function qs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return qs(Un.call(t,0,e.maxStringLength),e)+n}var o=Jy[e.quoteStyle||"single"];o.lastIndex=0;var i=ie.call(ie.call(t,o,"\\$1"),/[\x00-\x1f]/g,ld);return Us(i,"single",e)}function ld(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Yy.call(e.toString(16))}function dr(t){return"Object("+t+")"}function In(t){return t+" { ? }"}function Os(t,e,r,n){var o=n?Nn(r,n):G.call(r,", ");return t+" ("+e+") {"+o+"}"}function cd(t){for(var e=0;e<t.length;e++)if(ks(t[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function yd(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=G.call(Array(t.indent+1)," ");else return null;return{base:r,prev:G.call(Array(e+1),r)}}function Nn(t,e){if(t.length===0)return"";var r=`
|
|
12
|
+
`+e.prev+e.base;return r+G.call(t,","+r)+`
|
|
13
|
+
`+e.prev}function st(t,e){var r=On(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=K(t,o)?e(t[o],t):""}var i=typeof Tn=="function"?Tn(t):[],a;if(Me){a={};for(var p=0;p<i.length;p++)a["$"+i[p]]=i[p]}for(var c in t)K(t,c)&&(r&&String(Number(c))===c&&c<t.length||Me&&a["$"+c]instanceof Symbol||(Ns.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof Tn=="function")for(var d=0;d<i.length;d++)Ls.call(t,i[d])&&n.push("["+e(i[d])+"]: "+e(t[i[d]],t));return n}});var pt=h((bw,_s)=>{"use strict";s();u();_s.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Ds=h((Ew,Ms)=>{"use strict";s();u();var dd=P(),md=gr(),hd=pt();Ms.exports=function(e,r){if(!hd(r))throw new dd("Assertion failed: IsPropertyKey(P) is not true, got "+md(r));return e[r]}});var Vs=h((Rw,Gs)=>{"use strict";s();u();var Ws=Function.prototype.toString,De=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kn,lt;if(typeof De=="function"&&typeof Object.defineProperty=="function")try{kn=Object.defineProperty({},"length",{get:function(){throw lt}}),lt={},De(function(){throw 42},null,kn)}catch(t){t!==lt&&(De=null)}else De=null;var gd=/^\s*class\b/,qn=function(e){try{var r=Ws.call(e);return gd.test(r)}catch(n){return!1}},Cn=function(e){try{return qn(e)?!1:(Ws.call(e),!0)}catch(r){return!1}},ct=Object.prototype.toString,xd="[object Object]",vd="[object Function]",wd="[object GeneratorFunction]",bd="[object HTMLAllCollection]",Ad="[object HTML document.all class]",Sd="[object HTMLCollection]",Ed=typeof Symbol=="function"&&!!Symbol.toStringTag,Td=!(0 in[,]),$n=function(){return!1};typeof document=="object"&&(js=document.all,ct.call(js)===ct.call(document.all)&&($n=function(e){if((Td||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=ct.call(e);return(r===bd||r===Ad||r===Sd||r===xd)&&e("")==null}catch(n){}return!1}));var js;Gs.exports=De?function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{De(e,null,kn)}catch(r){if(r!==lt)return!1}return!qn(e)&&Cn(e)}:function(e){if($n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Ed)return Cn(e);if(qn(e))return!1;var r=ct.call(e);return r!==vd&&r!==wd&&!/^\[object HTML/.test(r)?!1:Cn(e)}});var _n=h((Ow,zs)=>{"use strict";s();u();zs.exports=Vs()});var Ks=h((Bw,Js)=>{"use strict";s();u();var Ys=P(),Id=Ds(),Rd=_n(),Pd=pt(),Hs=gr();Js.exports=function(e,r){if(!Pd(r))throw new Ys("Assertion failed: IsPropertyKey(P) is not true");var n=Id(e,r);if(n!=null){if(!Rd(n))throw new Ys(Hs(r)+" is not a function: "+Hs(n));return n}}});var Qs=h((kw,Zs)=>{"use strict";s();u();var Fd=Jt();Zs.exports=function(){return Fd()&&!!Symbol.toStringTag}});var Wn=h((_w,tu)=>{"use strict";s();u();var Mn=q(),Xs=Qs()(),eu,ru,Dn,jn;Xs&&(eu=Mn("Object.prototype.hasOwnProperty"),ru=Mn("RegExp.prototype.exec"),Dn={},yt=function(){throw Dn},jn={toString:yt,valueOf:yt},typeof Symbol.toPrimitive=="symbol"&&(jn[Symbol.toPrimitive]=yt));var yt,Od=Mn("Object.prototype.toString"),Nd=Object.getOwnPropertyDescriptor,Ld="[object RegExp]";tu.exports=Xs?function(e){if(!e||typeof e!="object")return!1;var r=Nd(e,"lastIndex"),n=r&&eu(r,"value");if(!n)return!1;try{ru(e,jn)}catch(o){return o===Dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Od(e)===Ld}});var Gn=h((jw,nu)=>{"use strict";s();u();var Bd=q(),Ud=Wn(),Cd=Bd("RegExp.prototype.exec"),kd=P();nu.exports=function(e){if(!Ud(e))throw new kd("`regex` must be a RegExp");return function(n){return Cd(e,n)!==null}}});var iu=h((Vw,ou)=>{"use strict";s();u();ou.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var su=h((Hw,au)=>{"use strict";s();u();au.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var Vn=h((Zw,uu)=>{"use strict";s();u();var qd=su();uu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":qd(e)}});var lu=h((eb,pu)=>{"use strict";s();u();var fu=P(),$d=gr(),_d=pt(),Md=Vn();pu.exports=function(e,r){if(Md(e)!=="Object")throw new fu("Assertion failed: Type(O) is not Object");if(!_d(r))throw new fu("Assertion failed: IsPropertyKey(P) is not true, got "+$d(r));return e[r]}});var yu=h((nb,cu)=>{"use strict";s();u();var Dd=D();cu.exports=Dd("%Math.min%")});var zn=h((ab,du)=>{"use strict";s();u();du.exports=Number.isNaN||function(e){return e!==e}});var hu=h((fb,mu)=>{"use strict";s();u();var jd=zn();mu.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!jd(t)&&t!==1/0&&t!==-1/0}});var dt=h((cb,xu)=>{"use strict";s();u();var gu=D(),Wd=gu("%Math.abs%"),Gd=gu("%Math.floor%"),Vd=zn(),zd=hu();xu.exports=function(e){if(typeof e!="number"||Vd(e)||!zd(e))return!1;var r=Wd(e);return Gd(r)===r}});var Hn=h((mb,vu)=>{"use strict";s();u();var Yd=q(),Yn=P(),Hd=dt(),Jd=Yd("String.prototype.slice");vu.exports=function(e,r,n){if(typeof e!="string")throw new Yn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new Yn("Assertion failed: `searchValue` must be a String");if(!Hd(n)||n<0)throw new Yn("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,a=n;a<=o-i;a+=1){var p=Jd(e,a,a+i);if(p===r)return a}return-1}});var mt=h((xb,wu)=>{"use strict";s();u();var Kd=P();wu.exports=function(e){if(e==null)throw new Kd(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var ht=h((bb,bu)=>{"use strict";s();u();var Zd=D(),Qd=Zd("%String%"),Xd=P();bu.exports=function(e){if(typeof e=="symbol")throw new Xd("Cannot convert a Symbol value to a string");return Qd(e)}});var Jn=h((Eb,Eu)=>{"use strict";s();u();var em=mt(),rm=ht(),tm=q(),Au=tm("String.prototype.replace"),Su=/^\s$/.test("\u180E"),nm=Su?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,om=Su?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Eu.exports=function(){var e=rm(em(this));return Au(Au(e,nm,""),om,"")}});var Kn=h((Rb,Iu)=>{"use strict";s();u();var im=Jn(),Tu="\u200B",je="\u180E";Iu.exports=function(){return String.prototype.trim&&Tu.trim()===Tu&&je.trim()===je&&("_"+je).trim()==="_"+je&&(je+"_").trim()===je+"_"?String.prototype.trim:im}});var Pu=h((Ob,Ru)=>{"use strict";s();u();var am=sr(),sm=Kn();Ru.exports=function(){var e=sm();return am(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Lu=h((Bb,Nu)=>{"use strict";s();u();var um=Zr(),fm=sr(),pm=mt(),lm=Jn(),Fu=Kn(),cm=Pu(),ym=um(Fu()),Ou=function(e){return pm(e),ym(e)};fm(Ou,{getPolyfill:Fu,implementation:lm,shim:cm});Nu.exports=Ou});var ku=h((kb,Cu)=>{"use strict";s();u();var Qn=D(),Zn=Qn("%Number%"),dm=Qn("%RegExp%"),mm=P(),Bu=Qn("%parseInt%"),hm=q(),gt=Gn(),Uu=hm("String.prototype.slice"),gm=gt(/^0b[01]+$/i),xm=gt(/^0o[0-7]+$/i),vm=gt(/^[-+]0x[0-9a-f]+$/i),wm=["\x85","\u200B","\uFFFE"].join(""),bm=new dm("["+wm+"]","g"),Am=gt(bm),Sm=Lu();Cu.exports=function t(e){if(typeof e!="string")throw new mm("Assertion failed: `argument` is not a String");if(gm(e))return Zn(Bu(Uu(e,2),2));if(xm(e))return Zn(Bu(Uu(e,2),8));if(Am(e)||vm(e))return NaN;var r=Sm(e);return r!==e?t(r):Zn(e)}});var _u=h((_b,$u)=>{"use strict";s();u();var Em=P(),qu=dt(),Tm=q(),Im=Tm("String.prototype.slice");$u.exports=function(e,r,n){if(typeof e!="string"||!qu(r)||arguments.length>2&&!qu(n))throw new Em("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Im(e,r,arguments.length>2?n:e.length)}});var Du=h((jb,Mu)=>{"use strict";s();u();Mu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Wu=h((Vb,ju)=>{"use strict";s();u();var Rm=q()("String.prototype.slice");ju.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Rm(r,0,e.length)===e}});var Hu=h((Hb,Yu)=>{"use strict";s();u();var Z=P(),zu=Gn(),Pm=iu(),Xn=gr(),Fm=lu(),Om=ln(),Nm=yu(),Lm=Hn(),Gu=ku(),Q=_u(),Bm=ht(),Vu=Vn(),Um=dt(),Cm=Du(),xr=Wu(),km=zu(/^\$[0-9]/),qm=zu(/^\$[0-9][0-9]/);Yu.exports=function(e,r,n,o,i,a){if(typeof e!="string")throw new Z("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new Z("Assertion failed: `str` must be a String");if(!Um(n)||n<0)throw new Z("Assertion failed: `position` must be a nonnegative integer, got "+Xn(n));if(!Om(o)||!Pm(o,Cm))throw new Z("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+Xn(o));if(typeof i!="undefined"&&Vu(i)!=="Object")throw new Z("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new Z("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new Z("Assertion failed: position > stringLength, got "+Xn(n));for(var c=a,d="";c!=="";){var m,y,x;if(xr("$$",c))m="$$",y="$";else if(xr("$`",c))m="$`",y=Q(r,0,n);else if(xr("$&",c))m="$&",y=e;else if(xr("$'",c)){m="$'";var w=e.length,E=n+w;y=Q(r,Nm(E,p))}else if(km(c)){var I=qm(c)?2:1,B=Q(c,1,1+I),C=Gu(B);if(C<0||C>99)throw new Z("Assertion failed: `index` must be >= 0 and <= 99");var z=o.length;C>z&&I===2&&(I=1,B=Q(B,0,1),C=Gu(B)),m=Q(c,0,1+I),1<=C&&C<=z?(x=o[C-1],typeof x=="undefined"?y="":y=x):y=m}else if(xr("$<",c)){var fe=Lm(c,">",0);if(fe===-1||typeof i=="undefined")m="$<",y=m;else{m=Q(c,0,fe+1);var Qe=Q(c,2,fe);if(Vu(i)!=="Object")throw new Z("Assertion failed: Type(namedCaptures) is not Object");x=Fm(i,Qe),typeof x=="undefined"?y="":y=Bm(x)}}else m=Q(c,0,1),y=m;var Fr=m.length;c=Q(c,Fr),d+=y}return d}});var ro=h((Zb,Qu)=>{"use strict";s();u();var Ju=Xa(),$m=Ks(),_m=Hu(),Mm=_n(),Dm=mt(),xt=ht(),Ku=Hn(),jm=D(),vt=q(),Wm=Wt()(),Gm=Wn(),Vm=jm("%Math.max%"),Zu=P(),zm=vt("Array.prototype.push"),eo=vt("String.prototype.slice"),Ym=vt("String.prototype.indexOf"),Hm=vt("String.prototype.replace");Qu.exports=function(e,r){var n=Dm(this),o=Gm(e);if(o&&Ym(eo(e,e.source.length+2),"g")===-1)throw new Zu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Wm&&Symbol.replace){if(e!=null){var i=$m(e,Symbol.replace);if(typeof i!="undefined")return Ju(i,e,[n,r])}}else if(o)return Hm(n,e,r);var a=xt(n),p=xt(e),c=Mm(r);c||(r=xt(r));for(var d=p.length,m=Vm(1,d),y=[],x=Ku(a,p,0);x!==-1;)zm(y,x),x=Ku(a,p,x+m);for(var w=0,E="",I=0;I<y.length;I+=1){var B;if(c)B=xt(Ju(r,void 0,[p,y[I],a]));else{if(typeof r!="string")throw new Zu("Assertion failed: `replaceValue` should be a string at this point");var C=[];B=_m(p,a,y[I],C,void 0,r)}var z=eo(a,w,y[I]);E+=z+B,w=y[I]+d}return w<a.length&&(E+=eo(a,w)),E}});var to=h((eA,Xu)=>{"use strict";s();u();var Jm=ro();Xu.exports=function(){return String.prototype.replaceAll||Jm}});var rf=h((nA,ef)=>{"use strict";s();u();var Km=sr(),Zm=to();ef.exports=function(){var e=Zm();return Km(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var af=h((aA,of)=>{"use strict";s();u();var Qm=Zr(),Xm=sr(),tf=ro(),eh=to(),rh=rf(),nf=Qm(tf);Xm(nf,{getPolyfill:eh,implementation:tf,shim:rh});of.exports=nf});var nx={};Bt(nx,{DynamicSnippetsGenerator:()=>Rt});module.exports=xo(nx);s();u();var HR=gp(af(),1);s();u();s();u();s();u();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}s();u();function vr(t){return Object.keys(t)}s();u();s();u();s();u();s();u();s();u();s();u();var th=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,sf=th;var nh=typeof self=="object"&&self&&self.Object===Object&&self,oh=sf||nh||Function("return this")(),uf=oh;var ih=uf.Symbol,X=ih;s();u();var ff=Object.prototype,ah=ff.hasOwnProperty,sh=ff.toString,wr=X?X.toStringTag:void 0;function uh(t){var e=ah.call(t,wr),r=t[wr];try{t[wr]=void 0;var n=!0}catch(i){}var o=sh.call(t);return n&&(e?t[wr]=r:delete t[wr]),o}var pf=uh;s();u();var fh=Object.prototype,ph=fh.toString;function lh(t){return ph.call(t)}var lf=lh;var ch="[object Null]",yh="[object Undefined]",cf=X?X.toStringTag:void 0;function dh(t){return t==null?t===void 0?yh:ch:cf&&cf in Object(t)?pf(t):lf(t)}var yf=dh;s();u();function mh(t){return t!=null&&typeof t=="object"}var df=mh;var hh="[object Symbol]";function gh(t){return typeof t=="symbol"||df(t)&&yf(t)==hh}var mf=gh;s();u();s();u();function xh(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var hf=xh;s();u();var vh=Array.isArray,gf=vh;var wh=1/0,xf=X?X.prototype:void 0,vf=xf?xf.toString:void 0;function wf(t){if(typeof t=="string")return t;if(gf(t))return hf(t,wf)+"";if(mf(t))return vf?vf.call(t):"";var e=t+"";return e=="0"&&1/t==-wh?"-0":e}var bf=wf;s();u();function bh(t){return t==null?"":bf(t)}var se=bh;s();u();s();u();s();u();s();u();s();u();s();u();function Ah(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var Af=Ah;function Sh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Af(t,e,r)}var Sf=Sh;s();u();var Eh="\\ud800-\\udfff",Th="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",Rh="\\u20d0-\\u20ff",Ph=Th+Ih+Rh,Fh="\\ufe0e\\ufe0f",Oh="\\u200d",Nh=RegExp("["+Oh+Eh+Ph+Fh+"]");function Lh(t){return Nh.test(t)}var wt=Lh;s();u();s();u();function Bh(t){return t.split("")}var Ef=Bh;s();u();var Tf="\\ud800-\\udfff",Uh="\\u0300-\\u036f",Ch="\\ufe20-\\ufe2f",kh="\\u20d0-\\u20ff",qh=Uh+Ch+kh,$h="\\ufe0e\\ufe0f",_h="["+Tf+"]",no="["+qh+"]",oo="\\ud83c[\\udffb-\\udfff]",Mh="(?:"+no+"|"+oo+")",If="[^"+Tf+"]",Rf="(?:\\ud83c[\\udde6-\\uddff]){2}",Pf="[\\ud800-\\udbff][\\udc00-\\udfff]",Dh="\\u200d",Ff=Mh+"?",Of="["+$h+"]?",jh="(?:"+Dh+"(?:"+[If,Rf,Pf].join("|")+")"+Of+Ff+")*",Wh=Of+Ff+jh,Gh="(?:"+[If+no+"?",no,Rf,Pf,_h].join("|")+")",Vh=RegExp(oo+"(?="+oo+")|"+Gh+Wh,"g");function zh(t){return t.match(Vh)||[]}var Nf=zh;function Yh(t){return wt(t)?Nf(t):Ef(t)}var Lf=Yh;function Hh(t){return function(e){e=se(e);var r=wt(e)?Lf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Sf(r,1).join(""):e.slice(1);return n[t]()+o}}var Bf=Hh;var Jh=Bf("toUpperCase"),We=Jh;function Kh(t){return We(se(t).toLowerCase())}var Uf=Kh;s();u();s();u();function Zh(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var Cf=Zh;s();u();s();u();s();u();function Qh(t){return function(e){return t==null?void 0:t[e]}}var kf=Qh;var Xh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},eg=kf(Xh),qf=eg;var rg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tg="\\u0300-\\u036f",ng="\\ufe20-\\ufe2f",og="\\u20d0-\\u20ff",ig=tg+ng+og,ag="["+ig+"]",sg=RegExp(ag,"g");function ug(t){return t=se(t),t&&t.replace(rg,qf).replace(sg,"")}var $f=ug;s();u();s();u();var fg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function pg(t){return t.match(fg)||[]}var _f=pg;s();u();var lg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function cg(t){return lg.test(t)}var Mf=cg;s();u();var Vf="\\ud800-\\udfff",yg="\\u0300-\\u036f",dg="\\ufe20-\\ufe2f",mg="\\u20d0-\\u20ff",hg=yg+dg+mg,zf="\\u2700-\\u27bf",Yf="a-z\\xdf-\\xf6\\xf8-\\xff",gg="\\xac\\xb1\\xd7\\xf7",xg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vg="\\u2000-\\u206f",wg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hf="A-Z\\xc0-\\xd6\\xd8-\\xde",bg="\\ufe0e\\ufe0f",Jf=gg+xg+vg+wg,Kf="['\u2019]",Df="["+Jf+"]",Ag="["+hg+"]",Zf="\\d+",Sg="["+zf+"]",Qf="["+Yf+"]",Xf="[^"+Vf+Jf+Zf+zf+Yf+Hf+"]",Eg="\\ud83c[\\udffb-\\udfff]",Tg="(?:"+Ag+"|"+Eg+")",Ig="[^"+Vf+"]",ep="(?:\\ud83c[\\udde6-\\uddff]){2}",rp="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Hf+"]",Rg="\\u200d",jf="(?:"+Qf+"|"+Xf+")",Pg="(?:"+Ge+"|"+Xf+")",Wf="(?:"+Kf+"(?:d|ll|m|re|s|t|ve))?",Gf="(?:"+Kf+"(?:D|LL|M|RE|S|T|VE))?",tp=Tg+"?",np="["+bg+"]?",Fg="(?:"+Rg+"(?:"+[Ig,ep,rp].join("|")+")"+np+tp+")*",Og="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ng="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lg=np+tp+Fg,Bg="(?:"+[Sg,ep,rp].join("|")+")"+Lg,Ug=RegExp([Ge+"?"+Qf+"+"+Wf+"(?="+[Df,Ge,"$"].join("|")+")",Pg+"+"+Gf+"(?="+[Df,Ge+jf,"$"].join("|")+")",Ge+"?"+jf+"+"+Wf,Ge+"+"+Gf,Ng,Og,Zf,Bg].join("|"),"g");function Cg(t){return t.match(Ug)||[]}var op=Cg;function kg(t,e,r){return t=se(t),e=r?void 0:e,e===void 0?Mf(t)?op(t):_f(t):t.match(e)||[]}var ip=kg;var qg="['\u2019]",$g=RegExp(qg,"g");function _g(t){return function(e){return Cf(ip($f(e).replace($g,"")),t,"")}}var ap=_g;var Mg=ap(function(t,e,r){return e=e.toLowerCase(),t+(r?Uf(e):e)}),bt=Mg;s();u();s();u();var be=class{};s();u();s();u();var V=class extends be{constructor(r){super();v(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var Dg=4,br=class{constructor(){v(this,"buffer","");v(this,"indentLevel",0);v(this,"hasWrittenAnything",!1);v(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
14
14
|
`),n=r?e.substring(0,e.length-1):e,o=this.getIndentString(),i=n.replaceAll(`
|
|
15
15
|
`,`
|
|
16
16
|
${o}`);this.isAtStartOfLine()&&(i=o+i),r&&(i+=`
|
|
17
|
-
`),this.writeInternal(i)}writeNoIndent(e){let r=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=r}writeNode(e){e.write(this)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new
|
|
17
|
+
`),this.writeInternal(i)}writeNoIndent(e){let r=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=r}writeNode(e){e.write(this)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new V(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,r){new V(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,r){this.dedent(),this.write("} "),new V(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new V(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}openBlock(e,r="{",n,o="}"){let i=e.filter(a=>a!==void 0).join(" ");i?this.write(`${i} ${r!=null?r:""}`):this.write(r!=null?r:"");try{this.indent(),n(),this.dedent()}finally{this.write(o!=null?o:"")}}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
18
18
|
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
19
|
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:r,writeFunction:n}){if(e.length>0){let o=e[0];o!=null&&n(o);for(let i=1;i<e.length;i++){this.write(r);let a=e[i];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
|
|
20
|
-
`)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Dg)}};s();u();var At=class{},Ar=class extends At{async format(e){return e}formatSync(e){return e}};s();u();s();u();s();u();var Sr=class{constructor(){v(this,"reporter");v(this,"snippet");v(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};var Er=class{constructor(e){v(this,"context");this.context=e}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=await a.generateSnippet({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=a.generateSnippetSync({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var Tr=class{constructor(){v(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var S={Critical:"CRITICAL",Warning:"WARNING"},Ir=class t{constructor(){v(this,"errors");v(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(yo(co({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var Rr=class{constructor({ir:e,config:r}){v(this,"config");v(this,"errors");v(this,"_ir");v(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new Ir,this.httpEndpointReferenceParser=new Tr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let a=e.find(c=>c.name.wireValue===o);if(a==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(a.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:a.name,typeReference:a.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,a]of Object.entries(r)){this.errors.scope(i);try{let p=e.find(c=>c.name.wireValue===i);if(p==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:a})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let a=e.types[i];if(a==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${i}"`});return}let d=n,{[o]:p}=d,c=ho(d,[mo(o)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:c}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:R(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(vr(n.urls));for(let i of vr(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${vr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};s();u();var V={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();var g={};Bt(g,{AstNode:()=>T,ClassInstantiation:()=>Ze,CodeBlock:()=>Ve,Comment:()=>ue,Function:()=>He,FunctionInvocation:()=>Je,MethodInvocation:()=>Ke,Parameter:()=>Ye,Reference:()=>Ee,Type:()=>Se,TypeLiteral:()=>ee,Types:()=>Se,Variable:()=>ze,Writer:()=>Ae,codeblock:()=>zg,function_:()=>Yg,instantiateClass:()=>Hg,invokeFunction:()=>Jg,invokeMethod:()=>Kg,parameter:()=>Zg,reference:()=>Qg,variable:()=>Xg});s();u();s();u();s();u();s();u();s();u();s();u();var Ae=class extends br{constructor({customConfig:r,formatter:n}){super();v(this,"customConfig");v(this,"formatter");v(this,"imports",{});v(this,"defaultImports",{});v(this,"starImportAliases",{});v(this,"starImportAliasesInverse",{});this.customConfig=r,this.formatter=n!=null?n:new Ar}addImport(r){var n,o,i;if(r.importFrom!=null){switch(r.importFrom.type){case"default":{this.validateDefault(r);break}case"named":{this.validateNamed(r);break}case"star":{this.validateStar(r);break}}let a=(i=(n=this.imports)[o=r.importFrom.moduleName])!=null?i:n[o]=[];a.map(c=>c.name).includes(r.name)||a.push(r)}}validateDefault(r){var o,i,a,p;if(((o=r.importFrom)==null?void 0:o.type)!=="default")return;let n=(p=(i=this.defaultImports)[a=r.importFrom.moduleName])!=null?p:i[a]=r;if(n.name!==r.name)throw new Error(`Cannot have multiple default imports for module ${r.importFrom.moduleName}: got ${r.name} but already had ${n.name}`)}validateNamed(r){var a,p,c,d,m;if(((a=r.importFrom)==null?void 0:a.type)!=="named")return;let o=((p=this.imports[r.importFrom.moduleName])!=null?p:[]).filter(y=>{var x;return((x=y.importFrom)==null?void 0:x.type)==="star"});if(o.length>0)throw new Error(`Cannot add named import ${r.name} because non-named imports ${o.map(y=>y.name)} already exist`);let i=[];for(let y of Object.values(this.imports))for(let x of y)((c=x.importFrom)==null?void 0:c.type)==="named"&&x.importFrom.moduleName!==r.importFrom.moduleName&&x.name===r.name&&i.push(x);if(i.length>0)throw new Error(`Cannot add named import from module ${r.importFrom.moduleName} because it is already imported from ${(m=(d=i[0])==null?void 0:d.importFrom)==null?void 0:m.moduleName}`)}validateStar(r){var i,a,p,c,d,m,y;if(((i=r.importFrom)==null?void 0:i.type)!=="star")return;let n=(c=(a=this.starImportAliases)[p=r.importFrom.moduleName])!=null?c:a[p]=r.importFrom.starImportAlias;if(n!==r.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${r.importFrom.starImportAlias} but already have ${n}.`);if(((y=(d=this.starImportAliasesInverse)[m=r.importFrom.starImportAlias])!=null?y:d[m]=r.importFrom.moduleName)!==r.importFrom.moduleName)throw new Error(`Attempted to use alias ${r.importFrom.starImportAlias} for more than one module in the same file`)}};var Pr=class extends Ae{constructor({customConfig:e,formatter:r}){super({customConfig:e,formatter:r})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
20
|
+
`)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Dg)}};s();u();var At=class{},Ar=class extends At{async format(e){return e}formatSync(e){return e}};s();u();s();u();s();u();var Sr=class{constructor(){v(this,"reporter");v(this,"snippet");v(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};var Er=class{constructor(e){v(this,"context");this.context=e}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=await a.generateSnippet({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new Sr;for(let o of r){let i=this.context.clone(),a=this.createSnippetGenerator(i);try{let p=a.generateSnippetSync({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var Tr=class{constructor(){v(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var S={Critical:"CRITICAL",Warning:"WARNING"},Ir=class t{constructor(){v(this,"errors");v(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(yo(co({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var Rr=class{constructor({ir:e,config:r}){v(this,"config");v(this,"errors");v(this,"_ir");v(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new Ir,this.httpEndpointReferenceParser=new Tr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let a=e.find(c=>c.name.wireValue===o);if(a==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(a.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:a.name,typeReference:a.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,a]of Object.entries(r)){this.errors.scope(i);try{let p=e.find(c=>c.name.wireValue===i);if(p==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:a})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let a=e.types[i];if(a==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${i}"`});return}let d=n,{[o]:p}=d,c=ho(d,[mo(o)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:c}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:R(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(vr(n.urls));for(let i of vr(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${vr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};s();u();var $={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();var g={};Bt(g,{AstNode:()=>T,ClassInstantiation:()=>Ze,CodeBlock:()=>Ve,Comment:()=>ue,Function:()=>He,FunctionInvocation:()=>Je,MethodInvocation:()=>Ke,Parameter:()=>Ye,Reference:()=>Ee,Type:()=>Se,TypeLiteral:()=>ee,Types:()=>Se,Variable:()=>ze,Writer:()=>Ae,codeblock:()=>zg,function_:()=>Yg,instantiateClass:()=>Hg,invokeFunction:()=>Jg,invokeMethod:()=>Kg,parameter:()=>Zg,reference:()=>Qg,variable:()=>Xg});s();u();s();u();s();u();s();u();s();u();s();u();var Ae=class extends br{constructor({customConfig:r,formatter:n}){super();v(this,"customConfig");v(this,"formatter");v(this,"imports",{});v(this,"defaultImports",{});v(this,"starImportAliases",{});v(this,"starImportAliasesInverse",{});this.customConfig=r,this.formatter=n!=null?n:new Ar}addImport(r){var n,o,i;if(r.importFrom!=null){switch(r.importFrom.type){case"default":{this.validateDefault(r);break}case"named":{this.validateNamed(r);break}case"star":{this.validateStar(r);break}}let a=(i=(n=this.imports)[o=r.importFrom.moduleName])!=null?i:n[o]=[];a.map(c=>c.name).includes(r.name)||a.push(r)}}validateDefault(r){var o,i,a,p;if(((o=r.importFrom)==null?void 0:o.type)!=="default")return;let n=(p=(i=this.defaultImports)[a=r.importFrom.moduleName])!=null?p:i[a]=r;if(n.name!==r.name)throw new Error(`Cannot have multiple default imports for module ${r.importFrom.moduleName}: got ${r.name} but already had ${n.name}`)}validateNamed(r){var a,p,c,d,m;if(((a=r.importFrom)==null?void 0:a.type)!=="named")return;let o=((p=this.imports[r.importFrom.moduleName])!=null?p:[]).filter(y=>{var x;return((x=y.importFrom)==null?void 0:x.type)==="star"});if(o.length>0)throw new Error(`Cannot add named import ${r.name} because non-named imports ${o.map(y=>y.name)} already exist`);let i=[];for(let y of Object.values(this.imports))for(let x of y)((c=x.importFrom)==null?void 0:c.type)==="named"&&x.importFrom.moduleName!==r.importFrom.moduleName&&x.name===r.name&&i.push(x);if(i.length>0)throw new Error(`Cannot add named import from module ${r.importFrom.moduleName} because it is already imported from ${(m=(d=i[0])==null?void 0:d.importFrom)==null?void 0:m.moduleName}`)}validateStar(r){var i,a,p,c,d,m,y;if(((i=r.importFrom)==null?void 0:i.type)!=="star")return;let n=(c=(a=this.starImportAliases)[p=r.importFrom.moduleName])!=null?c:a[p]=r.importFrom.starImportAlias;if(n!==r.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${r.importFrom.starImportAlias} but already have ${n}.`);if(((y=(d=this.starImportAliasesInverse)[m=r.importFrom.starImportAlias])!=null?y:d[m]=r.importFrom.moduleName)!==r.importFrom.moduleName)throw new Error(`Attempted to use alias ${r.importFrom.starImportAlias} for more than one module in the same file`)}};var Pr=class extends Ae{constructor({customConfig:e,formatter:r}){super({customConfig:e,formatter:r})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
21
21
|
${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(r){throw new Error(`Failed to format TypeScript file: ${r}
|
|
22
22
|
${e}`)}return e}getContent(){let e=this.stringifyImports();return e.length>0?e+`
|
|
23
23
|
`+this.buffer:this.buffer}stringifyImports(){let e="";for(let[r,n]of Object.entries(this.imports)){let o=this.defaultImports[r],i="",a=n.filter(c=>{var d;return((d=c.importFrom)==null?void 0:d.type)==="named"}),p=this.starImportAliases[r];if(a.length>0||o!=null||p!=null){if(e+="import",o!=null&&(e+=` ${o.name}`),a.length>0){for(let d of a.slice(0,-1))i+=`${d.name}, `;let c=a[a.length-1];c!=null&&(i+=`${c.name}`),o!=null&&(e+=","),e+=` { ${i} }`}p!=null&&((o!=null||a.length>0)&&(e+=", "),e+=` * as ${p}`),e+=` from "${r}";
|
|
24
|
-
`}}return e}};var T=class extends be{async toStringAsync({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),await n.toStringAsync()}toString({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),n.toString()}};s();u();var Ve=class extends T{constructor(r){super();v(this,"args");this.args=r}write(r){return new
|
|
24
|
+
`}}return e}};var T=class extends be{async toStringAsync({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),await n.toStringAsync()}toString({customConfig:e,formatter:r}){let n=new Pr({customConfig:e,formatter:r});return this.write(n),n.toString()}};s();u();var Ve=class extends T{constructor(r){super();v(this,"args");this.args=r}write(r){return new V(this.args).write(r)}};s();u();var Se=class extends T{constructor(r){super();v(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"string":r.write("string");break;case"number":r.write("number");break;case"bigint":r.write("bigint");break;case"boolean":r.write("boolean");break;case"array":this.internalType.valueType.write(r),r.write("[]");break;case"map":r.write("Record<"),this.internalType.keyType.write(r),r.write(", "),this.internalType.valueType.write(r),r.write(">");break;case"object":r.write("{"),r.indent();for(let[n,o]of Object.entries(this.internalType.fields))r.write(`${n}: `),o.write(r),r.writeLine(",");r.dedent(),r.write("}");break;case"enum":r.write("enum");break;case"any":r.write("any");break;case"promise":r.write("Promise<"),this.internalType.value.write(r),r.write(">");break;case"unknown":r.write("unknown");break;case"void":r.write("void");break;case"undefined":r.write("undefined");break;case"null":r.write("null");break;case"never":r.write("never");break;case"nop":break;default:R(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(r){return new this({type:"array",valueType:r})}static object(r){return new this({type:"object",fields:r})}static enum(r){return new this({type:"enum",values:r})}static any(){return new this({type:"any"})}static promise(r){return r.internalType.type==="promise"?r:new this({type:"promise",value:r})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};s();u();var ee=class t extends T{constructor(r){super();v(this,"internalType");this.internalType=r}write(r){var i,a;let n=!!((i=r.customConfig)!=null&&i.noSerdeLayer),o=!!((a=r.customConfig)!=null&&a.useBigInt);switch(this.internalType.type){case"array":{this.writeIterable({writer:r,iterable:this.internalType});break}case"blob":{if(n){r.writeNode(t.string(this.internalType.value));return}r.write("new Blob(["),r.writeNode(t.string(this.internalType.value)),r.write("])");break}case"boolean":{r.write(this.internalType.value.toString());break}case"bigint":{if(o){r.write(`BigInt("${this.internalType.value.toString()}")`);return}r.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(n){r.writeNode(t.string(this.internalType.value));return}r.write("new Date("),r.writeNode(t.string(this.internalType.value)),r.write(")");break}case"number":{r.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:r,object:this.internalType});break}case"record":{this.writeRecord({writer:r,record:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"set":{if(n||this.isSetOfObjects()){r.writeNode(t.array({values:this.internalType.values}));return}r.write("new Set("),this.writeIterable({writer:r,iterable:this.internalType}),r.write(")");break}case"string":{this.internalType.value.includes(`
|
|
25
25
|
`)?this.writeStringWithBackticks({writer:r,value:this.internalType.value}):r.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:r,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:R(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(r=>r.isObject())}writeStringWithBackticks({writer:r,value:n}){r.write("`");let o=n.split(`
|
|
26
26
|
`),i=o[0]+`
|
|
27
27
|
`,a=o.slice(1).join(`
|
|
28
28
|
`);r.write(i.replaceAll("`","\\`")),r.writeNoIndent(a.replaceAll("`","\\`")),r.write("`")}writeIterable({writer:r,iterable:n}){let o=Gg({values:n.values});if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let i of o)i.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeRecord({writer:r,record:n}){let o=Wg({entries:n.entries});if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let i of o)i.key.write(r),r.write(": "),i.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}writeObject({writer:r,object:n}){let o=jg({fields:n.fields});if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let i of o)r.write(`${i.name}: `),i.value.write(r),r.writeLine(",");r.dedent(),r.write("}")}static array({values:r}){return new this({type:"array",values:r})}static bigint(r){return new this({type:"bigint",value:r})}static blob(r){return new this({type:"blob",value:r})}static boolean(r){return new this({type:"boolean",value:r})}static datetime(r){return new this({type:"datetime",value:r})}static number(r){return new this({type:"number",value:r})}static object({fields:r}){return new this({type:"object",fields:r})}static record({entries:r}){return new this({type:"record",entries:r})}static reference(r){return new this({type:"reference",value:r})}static set({values:r}){return new this({type:"set",values:r})}static string(r){return new this({type:"string",value:r})}static tuple({values:r}){return new this({type:"tuple",values:r})}static unknown(r){return new this({type:"unknown",value:r})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(r){return r.internalType.type==="nop"}writeUnknown({writer:r,value:n}){switch(typeof n){case"boolean":r.write(n.toString());return;case"string":r.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":r.write(n.toString());return;case"object":if(n==null){r.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:r,value:n});return}this.writeUnknownObject({writer:r,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:r,value:n}){if(n.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let o of n)r.writeNode(t.unknown(o)),r.writeLine(",");r.dedent(),r.write("]")}writeUnknownObject({writer:r,value:n}){let o=Object.entries(n);if(o.length===0){r.write("{}");return}r.writeLine("{"),r.indent();for(let[i,a]of o)r.write(`${i}: `),r.writeNode(t.unknown(a)),r.writeLine(",");r.dedent(),r.write("}")}};function jg({fields:t}){return t.filter(e=>!ee.isNop(e.value))}function Wg({entries:t}){return t.filter(e=>!ee.isNop(e.key)&&!ee.isNop(e.value))}function Gg({values:t}){return t.filter(e=>!ee.isNop(e))}s();u();var Ee=class extends T{constructor({name:r,importFrom:n,memberName:o}){super();v(this,"name");v(this,"importFrom");v(this,"memberName");this.name=r,this.importFrom=n,this.memberName=o}write(r){var i;this.importFrom!=null&&r.addImport(this);let n=((i=this.importFrom)==null?void 0:i.type)==="star"?`${this.importFrom.starImportAlias}.`:"",o=this.memberName!=null?`.${this.memberName}`:"";r.write(`${n}${this.name}${o}`)}};s();u();var ze=class extends T{constructor(r){super();v(this,"args");this.args=r}write(r){this.args.export&&r.write("export "),this.args.const?r.write("const "):r.write("let "),r.write(`${this.args.name} = `),r.writeNode(this.args.initializer)}};s();u();s();u();var ue=class extends T{constructor({docs:r}={docs:void 0}){super();v(this,"docs");this.docs=r}write(r){this.docs!=null&&(r.writeLine("/**"),this.docs.split(`
|
|
29
|
-
`).forEach(n=>{r.writeLine(` * ${n}`)}),r.writeLine("*/"))}};var Ye=class extends T{constructor({name:r,type:n,docs:o}){super();v(this,"name");v(this,"type");v(this,"docs");this.name=r,this.type=n,this.docs=o}write(r){this.docs!=null&&r.writeNode(new ue({docs:this.docs})),r.write(`${this.name}: `),this.type.write(r)}};s();u();var He=class extends T{constructor({name:r,parameters:n,async:o,body:i,return_:a,docs:p}){super();v(this,"name");v(this,"parameters");v(this,"async");v(this,"body");v(this,"return_");v(this,"docs");this.name=r,this.parameters=n,this.async=o!=null?o:!1,this.body=i,this.return_=a,this.docs=p}write(r){var n;r.writeNode(new ue({docs:this.docs})),this.async&&r.write("async "),r.write("function "),r.write(`${this.name}`),this.writeParameters(r),this.return_!=null&&(r.write(": "),r.writeNode(this.async?Se.promise(this.return_):this.return_)),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeNewLineIfLastLineNot(),r.writeLine("}")}writeParameters(r){if(this.parameters.length===0){r.write("()");return}r.indent(),r.writeLine("(");for(let n of this.parameters)r.writeNode(n),r.writeLine(",");r.dedent(),r.write(")")}};s();u();var Je=class extends T{constructor({function_:r,arguments_:n}){super();v(this,"function_");v(this,"arguments_");this.function_=r,this.arguments_=n}write(r){r.writeNode(this.function_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ke=class extends T{constructor({on:r,method:n,arguments_:o,async:i}){super();v(this,"on");v(this,"method");v(this,"arguments_");v(this,"async");this.on=r,this.method=n,this.arguments_=o,this.async=i}write(r){this.async&&r.write("await "),this.on.write(r),r.write("."),r.write(this.method),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ze=class extends T{constructor({class_:r,arguments_:n}){super();v(this,"class_");v(this,"arguments_");this.class_=r,this.arguments_=n}write(r){r.write("new "),r.writeNode(this.class_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};function zg(t){return new Ve(t)}function Yg(t){return new He(t)}function Hg(t){return new Ze(t)}function Jg(t){return new Je(t)}function Kg(t){return new Ke(t)}function Zg(t){return new Ye(t)}function Qg(t){return new Ee(t)}function Xg(t){return new ze(t)}var sp="client",up="main",ex={type:"primitive",value:"STRING"},St=class{constructor({context:e}){v(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){return await this.buildCodeBlock({endpoint:e,snippet:r}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:e,request:r}){return this.buildCodeBlock({endpoint:e,snippet:r}).toString({customConfig:this.context.customConfig})}buildCodeBlock({endpoint:e,snippet:r}){return g.codeblock(n=>{n.writeNode(g.function_({name:up,async:!0,parameters:[],body:g.codeblock(o=>{o.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),o.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})})),n.writeNodeStatement(g.invokeFunction({function_:g.reference({name:up}),arguments_:[]}))})}constructClient({endpoint:e,snippet:r}){return g.variable({name:sp,const:!0,initializer:g.instantiateClass({class_:g.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:e,snippet:r})]})})}getConstructorArgs({endpoint:e,snippet:r}){let n=[],o=this.getConstructorEnvironmentArgs({baseUrl:r.baseURL,environment:r.environment});return o.length>0&&n.push(...o),e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:S.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(V.Headers),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n.length===0?g.TypeLiteral.nop():g.TypeLiteral.object({fields:n})}getConstructorEnvironmentArgs({baseUrl:e,environment:r}){let n=this.getEnvironmentValue({baseUrl:e,environment:r});return n==null?[]:[{name:"environment",value:n}]}getEnvironmentValue({baseUrl:e,environment:r}){if(e!=null&&r!=null){this.context.errors.add({severity:S.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return g.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);if(n==null){this.context.errors.add({severity:S.Warning,message:`Environment ${JSON.stringify(r)} was not found`});return}return g.TypeLiteral.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?g.TypeLiteral.object({fields:Object.entries(r).map(([n,o])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:ex,value:o})}))}):void 0}}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArg({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});default:R(e)}}getConstructorBasicAuthArg({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),value:g.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),value:g.TypeLiteral.string(r.password)}]}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),value:g.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getConstructorHeaderArgs({headers:e,values:r}){let n=[];for(let o of e){let i=this.getConstructorHeaderArg({header:o,value:r.value});i!=null&&n.push(i)}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!g.TypeLiteral.isNop(n))return{name:this.context.getPropertyName(e.name.name),value:n}}callMethod({endpoint:e,snippet:r}){return g.invokeMethod({on:g.reference({name:sp}),method:this.getMethod({endpoint:e}),async:!0,arguments_:this.getMethodArgs({endpoint:e,snippet:r})})}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:R(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){let n=[];if(this.context.errors.scope(V.PathParameters),e.pathParameters!=null){let o=this.getPathParameters({namedParameters:e.pathParameters,snippet:r});n.push(...o.map(i=>i.value))}return this.context.errors.unscope(),this.context.errors.scope(V.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:S.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),g.TypeLiteral.nop()):g.TypeLiteral.blob(e)}getMethodArgsForInlinedRequest({request:e,snippet:r}){var c,d,m,y;let n=[],{inlinePathParameters:o,inlineFileProperties:i}={inlinePathParameters:(d=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?d:!1,inlineFileProperties:(y=(m=this.context.customConfig)==null?void 0:m.inlineFileProperties)!=null?y:!1};this.context.errors.scope(V.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(V.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...a.map(x=>x.value)),i||n.push(...p.fileFields.map(x=>x.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:i})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?a:[],filePropertyInfo:p})),n}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,pathParameterFields:n,filePropertyInfo:o}){var m,y,x,w;this.context.errors.scope(V.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(m=e.queryParameters)!=null?m:[],values:(y=r.queryParameters)!=null?y:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(V.Headers);let c=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(w=r.headers)!=null?w:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(V.RequestBody);let d=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),g.TypeLiteral.object({fields:[...n,...a,...c,...d]})}getInlinedRequestBodyObjectFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:R(e)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:e}){var r;return(r=this.context.customConfig)!=null&&r.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:e,value:r}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=r.pathParameters)!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getMethodName(r)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};s();u();s();u();s();u();function io({generatorConfig:t,isPackagePrivate:e}){var n;let r=t.output.mode;switch(r.type){case"downloadFiles":return;case"publish":return{packageName:r.registriesV2.npm.packageName,version:r.version,private:e,publishInfo:{registryUrl:r.registriesV2.npm.registryUrl,token:r.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(r.publishInfo!=null&&r.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${r.publishInfo.type} instead`);return{packageName:r.publishInfo!=null?r.publishInfo.packageName:"",version:r.version,private:e,publishInfo:void 0,repoUrl:r.repoUrl,license:(n=t.license)==null?void 0:n._visit({basic:o=>o.id,custom:o=>`See ${o.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${r}`)}}s();u();function ao({organization:t,workspaceName:e,namespaceExport:r}){return r!=null?r:`${We(bt(t))}${We(bt(e))}`}s();u();var rx="value",Et=class{constructor({context:e}){v(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?g.TypeLiteral.null():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(e.value===void 0)return g.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?g.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:R(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:r}){return Array.isArray(r)?g.TypeLiteral.array({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertSet({set:e,value:r}){return Array.isArray(r)?g.TypeLiteral.set({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),g.TypeLiteral.nop()):g.TypeLiteral.record({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){var o;switch(e.type){case"alias":return(o=this.context.customConfig)!=null&&o.useBrandedStringAliases?g.TypeLiteral.reference(g.codeblock(i=>{i.writeNode(g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})})),i.write("("),i.writeNode(this.convert({typeReference:e.typeReference,value:r,as:n})),i.write(")")})):this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:R(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){var p;let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(n==null)return g.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});if(i==null)return g.TypeLiteral.nop();if((p=this.context.customConfig)!=null&&p.includeUtilsOnUnionMembers)return g.TypeLiteral.reference(g.codeblock(c=>{c.writeNode(g.invokeMethod({on:g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i})}))}));let a={name:this.context.getPropertyName(e.discriminant.name),value:g.TypeLiteral.string(o.discriminantValue.wireValue)};return g.TypeLiteral.object({fields:[a,...i]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:r}){let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r});switch(r.type){case"samePropertiesAsObject":{let o=this.context.resolveNamedType({typeId:r.typeId});if(o==null)return;let i=this.convertNamed({named:o,value:e.value});if(!i.isObject()){this.context.errors.add({severity:S.Critical,message:"Internal error; expected union value to be an object"});return}let a=i.asObjectOrThrow();return[...n,...a.fields]}case"singleProperty":try{this.context.errors.scope(r.discriminantValue.wireValue);let o=this.context.getRecord(e.value);return o==null?[...n,{name:rx,value:this.convert({typeReference:r.typeReference,value:e.value})}]:[...n,{name:this.context.getPropertyName(r.discriminantValue.name),value:this.convert({typeReference:r.typeReference,value:o[r.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:R(r)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:e,unionVariant:r,unionProperties:n}){return r.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1?[this.convert({typeReference:r.typeReference,value:e.value})]:n.length>0?[g.TypeLiteral.object({fields:n})]:[]}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r}){var o,i;return this.context.associateByWireValue({parameters:(o=r.properties)!=null?o:[],values:(i=this.context.getRecord(e.value))!=null?i:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return g.TypeLiteral.object({fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValue({enum_:e,value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}getEnumValue({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:S.Critical,message:`Expected enum value string, got: ${typeof r}`});return}if(e.values.find(o=>o.wireValue===r)==null){this.context.errors.add({severity:S.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return r}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?g.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{return this.convert({typeReference:n,value:r})}catch(o){continue}this.context.errors.add({severity:S.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return g.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){var o,i;switch(e){case"INTEGER":case"UINT":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"LONG":case"UINT_64":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():(o=this.context.customConfig)!=null&&o.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.number(a)}case"FLOAT":case"DOUBLE":{let a=this.getValueAsNumber({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"BOOLEAN":{let a=this.getValueAsBoolean({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(a)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.string(a)}case"DATE_TIME":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.datetime(a)}case"BIG_INTEGER":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():(i=this.context.customConfig)!=null&&i.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.string(a)}default:R(e)}}getValueAsNumber({value:e,as:r}){let n=r==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};s();u();var Tt=class{constructor({context:e}){v(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getSingleFileProperty({property:a,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getArrayFileProperty({property:a,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(a.name.name),value:this.getBodyProperty({property:a,record:o})});break;default:R(a)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.blob(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.array({values:n.map(o=>g.TypeLiteral.blob(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?g.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var It=class t extends Rr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});v(this,"ir");v(this,"customConfig");v(this,"dynamicTypeLiteralMapper");v(this,"filePropertyMapper");v(this,"moduleName");v(this,"namespaceExport");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new Et({context:this}),this.filePropertyMapper=new Tt({context:this}),this.moduleName=tx({config:n,customConfig:this.customConfig}),this.namespaceExport=ao({organization:n.organization,workspaceName:n.workspaceName,namespaceExport:(o=this.customConfig)==null?void 0:o.namespaceExport})}clone(){return new t({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(r){var n,o;return(n=this.customConfig)!=null&&n.retainOriginalCasing||(o=this.customConfig)!=null&&o.noSerdeLayer?this.formatOriginalPropertyName(r.originalName):r.camelCase.unsafeName}getMethodName(r){return r.camelCase.unsafeName}getTypeName(r){return r.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return this.getEnvironmentsTypeReference(n)}getFullyQualifiedReference({declaration:r}){return r.fernFilepath.allParts.length>0?`${r.fernFilepath.allParts.map(n=>n.camelCase.unsafeName).join(".")}.${this.getTypeName(r.name)}`:`${this.getTypeName(r.name)}`}getEnvironmentsTypeReference(r){return g.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(r)})}formatOriginalPropertyName(r){return r.includes("-")?`"${r}"`:r}};function tx({config:t,customConfig:e}){var r,n,o;return(o=(n=io({generatorConfig:t,isPackagePrivate:(r=e==null?void 0:e.private)!=null?r:!1}))==null?void 0:n.packageName)!=null?o:t.organization}var Rt=class extends Er{constructor({ir:e,config:r}){super(new It({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new St({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
29
|
+
`).forEach(n=>{r.writeLine(` * ${n}`)}),r.writeLine("*/"))}};var Ye=class extends T{constructor({name:r,type:n,docs:o}){super();v(this,"name");v(this,"type");v(this,"docs");this.name=r,this.type=n,this.docs=o}write(r){this.docs!=null&&r.writeNode(new ue({docs:this.docs})),r.write(`${this.name}: `),this.type.write(r)}};s();u();var He=class extends T{constructor({name:r,parameters:n,async:o,body:i,return_:a,docs:p}){super();v(this,"name");v(this,"parameters");v(this,"async");v(this,"body");v(this,"return_");v(this,"docs");this.name=r,this.parameters=n,this.async=o!=null?o:!1,this.body=i,this.return_=a,this.docs=p}write(r){var n;r.writeNode(new ue({docs:this.docs})),this.async&&r.write("async "),r.write("function "),r.write(`${this.name}`),this.writeParameters(r),this.return_!=null&&(r.write(": "),r.writeNode(this.async?Se.promise(this.return_):this.return_)),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeNewLineIfLastLineNot(),r.writeLine("}")}writeParameters(r){if(this.parameters.length===0){r.write("()");return}r.indent(),r.writeLine("(");for(let n of this.parameters)r.writeNode(n),r.writeLine(",");r.dedent(),r.write(")")}};s();u();var Je=class extends T{constructor({function_:r,arguments_:n}){super();v(this,"function_");v(this,"arguments_");this.function_=r,this.arguments_=n}write(r){r.writeNode(this.function_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ke=class extends T{constructor({on:r,method:n,arguments_:o,async:i}){super();v(this,"on");v(this,"method");v(this,"arguments_");v(this,"async");this.on=r,this.method=n,this.arguments_=o,this.async=i}write(r){this.async&&r.write("await "),this.on.write(r),r.write("."),r.write(this.method),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};s();u();var Ze=class extends T{constructor({class_:r,arguments_:n}){super();v(this,"class_");v(this,"arguments_");this.class_=r,this.arguments_=n}write(r){r.write("new "),r.writeNode(this.class_),r.write("("),r.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")}};function zg(t){return new Ve(t)}function Yg(t){return new He(t)}function Hg(t){return new Ze(t)}function Jg(t){return new Je(t)}function Kg(t){return new Ke(t)}function Zg(t){return new Ye(t)}function Qg(t){return new Ee(t)}function Xg(t){return new ze(t)}var sp="client",up="main",ex={type:"primitive",value:"STRING"},St=class{constructor({context:e}){v(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){return await this.buildCodeBlock({endpoint:e,snippet:r}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:e,request:r}){return this.buildCodeBlock({endpoint:e,snippet:r}).toString({customConfig:this.context.customConfig})}buildCodeBlock({endpoint:e,snippet:r}){return g.codeblock(n=>{n.writeNode(g.function_({name:up,async:!0,parameters:[],body:g.codeblock(o=>{o.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),o.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})})),n.writeNodeStatement(g.invokeFunction({function_:g.reference({name:up}),arguments_:[]}))})}constructClient({endpoint:e,snippet:r}){return g.variable({name:sp,const:!0,initializer:g.instantiateClass({class_:g.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:e,snippet:r})]})})}getConstructorArgs({endpoint:e,snippet:r}){let n=[],o=this.getConstructorEnvironmentArgs({baseUrl:r.baseURL,environment:r.environment});return o.length>0&&n.push(...o),e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:S.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope($.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope($.Headers),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n.length===0?g.TypeLiteral.nop():g.TypeLiteral.object({fields:n})}getConstructorEnvironmentArgs({baseUrl:e,environment:r}){let n=this.getEnvironmentValue({baseUrl:e,environment:r});return n==null?[]:[{name:"environment",value:n}]}getEnvironmentValue({baseUrl:e,environment:r}){if(e!=null&&r!=null){this.context.errors.add({severity:S.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return g.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);if(n==null){this.context.errors.add({severity:S.Warning,message:`Environment ${JSON.stringify(r)} was not found`});return}return g.TypeLiteral.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?g.TypeLiteral.object({fields:Object.entries(r).map(([n,o])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:ex,value:o})}))}):void 0}}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArg({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});case"oauth":return r.type!=="oauth"?(this.context.errors.add({severity:S.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorOAuthArgs({auth:e,values:r});default:R(e)}}getConstructorBasicAuthArg({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),value:g.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),value:g.TypeLiteral.string(r.password)}]}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),value:g.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getConstructorOAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.clientId),value:g.TypeLiteral.string(r.clientId)},{name:this.context.getPropertyName(e.clientSecret),value:g.TypeLiteral.string(r.clientSecret)}]}getConstructorHeaderArgs({headers:e,values:r}){let n=[];for(let o of e){let i=this.getConstructorHeaderArg({header:o,value:r.value});i!=null&&n.push(i)}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!g.TypeLiteral.isNop(n))return{name:this.context.getPropertyName(e.name.name),value:n}}callMethod({endpoint:e,snippet:r}){return g.invokeMethod({on:g.reference({name:sp}),method:this.getMethod({endpoint:e}),async:!0,arguments_:this.getMethodArgs({endpoint:e,snippet:r})})}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:R(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){var i,a;let n=[];this.context.errors.scope($.PathParameters);let o=[...(i=this.context.ir.pathParameters)!=null?i:[],...(a=e.pathParameters)!=null?a:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:r}).map(p=>p.value)),this.context.errors.unscope(),this.context.errors.scope($.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:S.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),g.TypeLiteral.nop()):g.TypeLiteral.blob(e)}getMethodArgsForInlinedRequest({request:e,snippet:r}){var c,d,m,y;let n=[],{inlinePathParameters:o,inlineFileProperties:i}={inlinePathParameters:(d=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?d:!1,inlineFileProperties:(y=(m=this.context.customConfig)==null?void 0:m.inlineFileProperties)!=null?y:!1};this.context.errors.scope($.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope($.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...a.map(x=>x.value)),i||n.push(...p.fileFields.map(x=>x.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:i})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?a:[],filePropertyInfo:p})),n}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,pathParameterFields:n,filePropertyInfo:o}){var m,y,x,w;this.context.errors.scope($.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(m=e.queryParameters)!=null?m:[],values:(y=r.queryParameters)!=null?y:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope($.Headers);let c=this.context.associateByWireValue({parameters:(x=e.headers)!=null?x:[],values:(w=r.headers)!=null?w:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope($.RequestBody);let d=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),g.TypeLiteral.object({fields:[...n,...a,...c,...d]})}getInlinedRequestBodyObjectFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:R(e)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:e}){var r;return(r=this.context.customConfig)!=null&&r.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:e,value:r}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:R(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=r.pathParameters)!=null?i:{},ignoreMissingParameters:!0});for(let a of o)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getMethodName(r)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};s();u();s();u();s();u();function io({generatorConfig:t,isPackagePrivate:e}){var n;let r=t.output.mode;switch(r.type){case"downloadFiles":return;case"publish":return{packageName:r.registriesV2.npm.packageName,version:r.version,private:e,publishInfo:{registryUrl:r.registriesV2.npm.registryUrl,token:r.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(r.publishInfo!=null&&r.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${r.publishInfo.type} instead`);return{packageName:r.publishInfo!=null?r.publishInfo.packageName:"",version:r.version,private:e,publishInfo:void 0,repoUrl:r.repoUrl,license:(n=t.license)==null?void 0:n._visit({basic:o=>o.id,custom:o=>`See ${o.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${r}`)}}s();u();function ao({organization:t,workspaceName:e,namespaceExport:r}){return r!=null?r:`${We(bt(t))}${We(bt(e))}`}s();u();var rx="value",Et=class{constructor({context:e}){v(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?g.TypeLiteral.null():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(e.value===void 0)return g.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?g.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:R(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:r}){return Array.isArray(r)?g.TypeLiteral.array({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertSet({set:e,value:r}){return Array.isArray(r)?g.TypeLiteral.set({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),g.TypeLiteral.nop()):g.TypeLiteral.record({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){var o;switch(e.type){case"alias":return(o=this.context.customConfig)!=null&&o.useBrandedStringAliases?g.TypeLiteral.reference(g.codeblock(i=>{i.writeNode(g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})})),i.write("("),i.writeNode(this.convert({typeReference:e.typeReference,value:r,as:n})),i.write(")")})):this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:R(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){var p;let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(n==null)return g.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});if(i==null)return g.TypeLiteral.nop();if((p=this.context.customConfig)!=null&&p.includeUtilsOnUnionMembers)return g.TypeLiteral.reference(g.codeblock(c=>{c.writeNode(g.invokeMethod({on:g.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:e.declaration})}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i})}))}));let a={name:this.context.getPropertyName(e.discriminant.name),value:g.TypeLiteral.string(o.discriminantValue.wireValue)};return g.TypeLiteral.object({fields:[a,...i]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:r}){let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r});switch(r.type){case"samePropertiesAsObject":{let o=this.context.resolveNamedType({typeId:r.typeId});if(o==null)return;let i=this.convertNamed({named:o,value:e.value});if(!i.isObject()){this.context.errors.add({severity:S.Critical,message:"Internal error; expected union value to be an object"});return}let a=i.asObjectOrThrow();return[...n,...a.fields]}case"singleProperty":try{this.context.errors.scope(r.discriminantValue.wireValue);let o=this.context.getRecord(e.value);return o==null?[...n,{name:rx,value:this.convert({typeReference:r.typeReference,value:e.value})}]:[...n,{name:this.context.getPropertyName(r.discriminantValue.name),value:this.convert({typeReference:r.typeReference,value:o[r.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:R(r)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:e,unionVariant:r,unionProperties:n}){return r.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1?[this.convert({typeReference:r.typeReference,value:e.value})]:n.length>0?[g.TypeLiteral.object({fields:n})]:[]}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r}){var o,i;return this.context.associateByWireValue({parameters:(o=r.properties)!=null?o:[],values:(i=this.context.getRecord(e.value))!=null?i:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return g.TypeLiteral.object({fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValue({enum_:e,value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}getEnumValue({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:S.Critical,message:`Expected enum value string, got: ${typeof r}`});return}if(e.values.find(o=>o.wireValue===r)==null){this.context.errors.add({severity:S.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return r}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?g.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{return this.convert({typeReference:n,value:r})}catch(o){continue}this.context.errors.add({severity:S.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return g.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){var o,i;switch(e){case"INTEGER":case"UINT":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"LONG":case"UINT_64":{let a=this.getValueAsNumber({value:r,as:n});return a==null?g.TypeLiteral.nop():(o=this.context.customConfig)!=null&&o.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.number(a)}case"FLOAT":case"DOUBLE":{let a=this.getValueAsNumber({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.number(a)}case"BOOLEAN":{let a=this.getValueAsBoolean({value:r,as:n});return a==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(a)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.string(a)}case"DATE_TIME":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():g.TypeLiteral.datetime(a)}case"BIG_INTEGER":{let a=this.context.getValueAsString({value:r});return a==null?g.TypeLiteral.nop():(i=this.context.customConfig)!=null&&i.useBigInt?g.TypeLiteral.bigint(BigInt(a)):g.TypeLiteral.string(a)}default:R(e)}}getValueAsNumber({value:e,as:r}){let n=r==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};s();u();var Tt=class{constructor({context:e}){v(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getSingleFileProperty({property:a,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(a.name),value:this.getArrayFileProperty({property:a,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(a.name.name),value:this.getBodyProperty({property:a,record:o})});break;default:R(a)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.blob(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.array({values:n.map(o=>g.TypeLiteral.blob(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?g.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var It=class t extends Rr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});v(this,"ir");v(this,"customConfig");v(this,"dynamicTypeLiteralMapper");v(this,"filePropertyMapper");v(this,"moduleName");v(this,"namespaceExport");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new Et({context:this}),this.filePropertyMapper=new Tt({context:this}),this.moduleName=tx({config:n,customConfig:this.customConfig}),this.namespaceExport=ao({organization:n.organization,workspaceName:n.workspaceName,namespaceExport:(o=this.customConfig)==null?void 0:o.namespaceExport})}clone(){return new t({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(r){var n,o;return(n=this.customConfig)!=null&&n.retainOriginalCasing||(o=this.customConfig)!=null&&o.noSerdeLayer?this.formatOriginalPropertyName(r.originalName):r.camelCase.unsafeName}getMethodName(r){return r.camelCase.unsafeName}getTypeName(r){return r.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return this.getEnvironmentsTypeReference(n)}getFullyQualifiedReference({declaration:r}){return r.fernFilepath.allParts.length>0?`${r.fernFilepath.allParts.map(n=>n.camelCase.unsafeName).join(".")}.${this.getTypeName(r.name)}`:`${this.getTypeName(r.name)}`}getEnvironmentsTypeReference(r){return g.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(r)})}formatOriginalPropertyName(r){return r.includes("-")?`"${r}"`:r}};function tx({config:t,customConfig:e}){var r,n,o;return(o=(n=io({generatorConfig:t,isPackagePrivate:(r=e==null?void 0:e.private)!=null?r:!1}))==null?void 0:n.packageName)!=null?o:t.organization}var Rt=class extends Er{constructor({ir:e,config:r}){super(new It({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new St({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|