@fern-api/php-dynamic-snippets 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DynamicSnippetsGenerator.cjs +7 -7
- package/cjs/EndpointSnippetGenerator.cjs +7 -7
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +6 -6
- package/cjs/context/DynamicTypeLiteralMapper.cjs +6 -6
- package/cjs/context/FilePropertyMapper.cjs +12 -12
- package/cjs/index.cjs +11 -11
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-5YGLJUYD.js → chunk-HG5P4KWD.js} +1 -1
- package/esm/{chunk-YELOIV6Y.js → chunk-HHDXN7HB.js} +1 -1
- package/esm/{chunk-G6X3OBKW.js → chunk-JFJ3XGKL.js} +1 -1
- package/esm/{chunk-MMCQWL5J.js → chunk-KYYOS3EX.js} +2 -2
- package/esm/chunk-LHXTVBUM.js +28 -0
- package/esm/{chunk-7HKG5U5F.js → chunk-NXDI62IP.js} +1 -1
- package/esm/{chunk-BGMLQMW7.js → chunk-ZDJ3DR2Z.js} +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/esm/chunk-ZFTBBCKC.js +0 -28
package/cjs/index.cjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";var Ip=Object.create;var lr=Object.defineProperty,Np=Object.defineProperties,Fp=Object.getOwnPropertyDescriptor,Cp=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertyNames,Wr=Object.getOwnPropertySymbols,Lp=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable;var zt=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e)=>{for(var r in e||(e={}))Vt.call(e,r)&&zt(t,r,e[r]);if(Wr)for(var r of Wr(e))To.call(e,r)&&zt(t,r,e[r]);return t},je=(t,e)=>Np(t,Cp(e));var Ro=t=>typeof t=="symbol"?t:t+"",Po=(t,e)=>{var r={};for(var n in t)Vt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Wr)for(var n of Wr(t))e.indexOf(n)<0&&To.call(t,n)&&(r[n]=t[n]);return r};var Ge=(t,e)=>()=>(t&&(e=t(t=0)),e);var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yt=(t,e)=>{for(var r in e)lr(t,r,{get:e[r],enumerable:!0})},Io=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Op(e))!Vt.call(t,o)&&o!==r&&lr(t,o,{get:()=>e[o],enumerable:!(n=Fp(e,o))||n.enumerable});return t};var Bp=(t,e,r)=>(r=t!=null?Ip(Lp(t)):{},Io(e||!t||!t.__esModule?lr(r,"default",{value:t,enumerable:!0}):r,t)),No=t=>Io(lr({},"__esModule",{value:!0}),t);var d=(t,e,r)=>zt(t,typeof e!="symbol"?e+"":e,r);function Co(){throw new Error("setTimeout has not been defined")}function Oo(){throw new Error("clearTimeout has not been defined")}function Lo(t){if(fe===setTimeout)return setTimeout(t,0);if((fe===Co||!fe)&&setTimeout)return fe=setTimeout,setTimeout(t,0);try{return fe(t,0)}catch(e){try{return fe.call(null,t,0)}catch(r){return fe.call(this,t,0)}}}function Up(t){if(pe===clearTimeout)return clearTimeout(t);if((pe===Oo||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(t);try{return pe(t)}catch(e){try{return pe.call(null,t)}catch(r){return pe.call(this,t)}}}function qp(){!Ve||!Ae||(Ve=!1,Ae.length?Z=Ae.concat(Z):jr=-1,Z.length&&Bo())}function Bo(){if(!Ve){var t=Lo(qp);Ve=!0;for(var e=Z.length;e;){for(Ae=Z,Z=[];++jr<e;)Ae&&Ae[jr].run();jr=-1,e=Z.length}Ae=null,Ve=!1,Up(t)}}function $p(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];Z.push(new Uo(t,e)),Z.length===1&&!Ve&&Lo(Bo)}function Uo(t,e){this.fun=t,this.array=e}function Se(){}function el(t){throw new Error("process.binding is not supported")}function rl(){return"/"}function tl(t){throw new Error("process.chdir is not supported")}function nl(){return 0}function il(t){var e=ol.call(ze)*.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 sl(){var t=new Date,e=t-al;return e/1e3}var fe,pe,Z,Ve,Ae,jr,kp,_p,Mp,Dp,Wp,jp,Gp,zp,Vp,Yp,Hp,Jp,Kp,Zp,Qp,Xp,ze,ol,al,l,Fo,a=Ge(()=>{"use strict";fe=Co,pe=Oo;typeof globalThis.setTimeout=="function"&&(fe=setTimeout);typeof globalThis.clearTimeout=="function"&&(pe=clearTimeout);Z=[],Ve=!1,jr=-1;Uo.prototype.run=function(){this.fun.apply(null,this.array)};kp="browser",_p="browser",Mp=!0,Dp={},Wp=[],jp="",Gp={},zp={},Vp={};Yp=Se,Hp=Se,Jp=Se,Kp=Se,Zp=Se,Qp=Se,Xp=Se;ze=globalThis.performance||{},ol=ze.now||ze.mozNow||ze.msNow||ze.oNow||ze.webkitNow||function(){return new Date().getTime()};al=new Date;l={nextTick:$p,title:kp,browser:Mp,env:Dp,argv:Wp,version:jp,versions:Gp,on:Yp,addListener:Hp,once:Jp,off:Kp,removeListener:Zp,removeAllListeners:Qp,emit:Xp,binding:el,cwd:rl,chdir:tl,umask:nl,hrtime:il,platform:_p,release:zp,config:Vp,uptime:sl},Fo={};Object.keys(Fo).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]=Fo[t]:r=r[o]||(r[o]={})}})});function _o(){Jt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)W[e]=t[e],_[t.charCodeAt(e)]=e;_[45]=62,_[95]=63}function fl(t){Jt||_o();var e,r,n,o,i,u,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,u=new ul(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=_[t.charCodeAt(e)]<<18|_[t.charCodeAt(e+1)]<<12|_[t.charCodeAt(e+2)]<<6|_[t.charCodeAt(e+3)],u[c++]=o>>16&255,u[c++]=o>>8&255,u[c++]=o&255;return i===2?(o=_[t.charCodeAt(e)]<<2|_[t.charCodeAt(e+1)]>>4,u[c++]=o&255):i===1&&(o=_[t.charCodeAt(e)]<<10|_[t.charCodeAt(e+1)]<<4|_[t.charCodeAt(e+2)]>>2,u[c++]=o>>8&255,u[c++]=o&255),u}function pl(t){return W[t>>18&63]+W[t>>12&63]+W[t>>6&63]+W[t&63]}function ll(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(pl(n));return o.join("")}function qo(t){Jt||_o();for(var e,r=t.length,n=r%3,o="",i=[],u=16383,p=0,c=r-n;p<c;p+=u)i.push(ll(t,p,p+u>c?c:p+u));return n===1?(e=t[r-1],o+=W[e>>2],o+=W[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=W[e>>10],o+=W[e>>4&63],o+=W[e<<2&63],o+="="),i.push(o),i.join("")}function Gr(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Q(t,e){if(Gr()<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 Mo(this,t,e,r)}function Mo(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?yl(t,e,r,n):typeof e=="string"?dl(t,e,r):ml(t,e)}function Do(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 cl(t,e,r,n){return Do(e),e<=0?Q(t,e):r!==void 0?typeof n=="string"?Q(t,e).fill(r,n):Q(t,e).fill(r):Q(t,e)}function Kt(t,e){if(Do(e),t=Q(t,e<0?0:Zt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function dl(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=Wo(e,r)|0;t=Q(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ht(t,e){var r=e.length<0?0:Zt(e.length)|0;t=Q(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function yl(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=Ht(t,e),t}function ml(t,e){if(j(e)){var r=Zt(e.length)|0;return t=Q(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"||Bl(e.length)?Q(t,0):Ht(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ht(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Zt(t){if(t>=Gr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Gr().toString(16)+" bytes");return t|0}function j(t){return!!(t!=null&&t._isBuffer)}function Wo(t,e){if(j(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 zr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Jo(t).length;default:if(n)return zr(t).length;e=(""+e).toLowerCase(),n=!0}}function hl(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 Rl(this,e,r);case"utf8":case"utf-8":return zo(this,e,r);case"ascii":return El(this,e,r);case"latin1":case"binary":return Tl(this,e,r);case"base64":return Al(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 Ee(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function jo(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)),j(e))return e.length===0?-1:$o(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):$o(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function $o(t,e,r,n,o){var i=1,u=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,u/=2,p/=2,r/=2}function c(b,T){return i===1?b[T]:b.readUInt16BE(T*i)}var y;if(o){var h=-1;for(y=r;y<u;y++)if(c(t,y)===c(e,h===-1?0:y-h)){if(h===-1&&(h=y),y-h+1===p)return h*i}else h!==-1&&(y-=y-h),h=-1}else for(r+p>u&&(r=u-p),y=r;y>=0;y--){for(var g=!0,v=0;v<p;v++)if(c(t,y+v)!==c(e,v)){g=!1;break}if(g)return y}return-1}function gl(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 u=0;u<n;++u){var p=parseInt(e.substr(u*2,2),16);if(isNaN(p))return u;t[r+u]=p}return u}function xl(t,e,r,n){return Hr(zr(e,t.length-r),t,r,n)}function Go(t,e,r,n){return Hr(Ol(e),t,r,n)}function vl(t,e,r,n){return Go(t,e,r,n)}function wl(t,e,r,n){return Hr(Jo(e),t,r,n)}function bl(t,e,r,n){return Hr(Ll(e,t.length-r),t,r,n)}function Al(t,e,r){return e===0&&r===t.length?qo(t):qo(t.slice(e,r))}function zo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],u=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,y,h,g;switch(p){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(u=g));break;case 3:c=t[o+1],y=t[o+2],(c&192)===128&&(y&192)===128&&(g=(i&15)<<12|(c&63)<<6|y&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=t[o+1],y=t[o+2],h=t[o+3],(c&192)===128&&(y&192)===128&&(h&192)===128&&(g=(i&15)<<18|(c&63)<<12|(y&63)<<6|h&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=p}return Sl(n)}function Sl(t){var e=t.length;if(e<=ko)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ko));return r}function El(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 Tl(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 Rl(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+=Cl(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 N(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 q(t,e,r,n,o,i){if(!j(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 Vr(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 Yr(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 Vo(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 Yo(t,e,r,n,o){return o||Vo(t,e,r,4,34028234663852886e22,-34028234663852886e22),Zo(t,e,r,n,23,4),r+4}function Ho(t,e,r,n,o){return o||Vo(t,e,r,8,17976931348623157e292,-17976931348623157e292),Zo(t,e,r,n,52,8),r+8}function Nl(t){if(t=Fl(t).replace(Il,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Fl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Cl(t){return t<16?"0"+t.toString(16):t.toString(16)}function zr(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+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 Ol(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Ll(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function Jo(t){return fl(Nl(t))}function Hr(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 Bl(t){return t!==t}function Ul(t){return t!=null&&(!!t._isBuffer||Ko(t)||ql(t))}function Ko(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ql(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Ko(t.slice(0,0))}function Jr(t,e,r,n,o){var i,u,p=o*8-n-1,c=(1<<p)-1,y=c>>1,h=-7,g=r?o-1:0,v=r?-1:1,b=t[e+g];for(g+=v,i=b&(1<<-h)-1,b>>=-h,h+=p;h>0;i=i*256+t[e+g],g+=v,h-=8);for(u=i&(1<<-h)-1,i>>=-h,h+=n;h>0;u=u*256+t[e+g],g+=v,h-=8);if(i===0)i=1-y;else{if(i===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(b?-1:1)*u*Math.pow(2,i-n)}function Zo(t,e,r,n,o,i){var u,p,c,y=i*8-o-1,h=(1<<y)-1,g=h>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,T=n?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?e+=v/c:e+=v*Math.pow(2,1-g),e*c>=2&&(u++,c/=2),u+g>=h?(p=0,u=h):u+g>=1?(p=(e*c-1)*Math.pow(2,o),u=u+g):(p=e*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;t[r+b]=p&255,b+=T,p/=256,o-=8);for(u=u<<o|p,y+=o;y>0;t[r+b]=u&255,b+=T,u/=256,y-=8);t[r+b-T]|=R*128}var W,_,ul,Jt,ko,Il,Qo=Ge(()=>{"use strict";a();s();W=[],_=[],ul=typeof Uint8Array!="undefined"?Uint8Array:Array,Jt=!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 Mo(null,t,e,r)};f.kMaxLength=Gr();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 cl(null,t,e,r)};f.allocUnsafe=function(t){return Kt(null,t)};f.allocUnsafeSlow=function(t){return Kt(null,t)};f.isBuffer=Ul;f.compare=function(e,r){if(!j(e)||!j(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,u=Math.min(n,o);i<u;++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 u=e[n];if(!j(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};f.byteLength=Wo;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)Ee(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)Ee(this,r,r+3),Ee(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)Ee(this,r,r+7),Ee(this,r+1,r+6),Ee(this,r+2,r+5),Ee(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?zo(this,0,e):hl.apply(this,arguments)};f.prototype.equals=function(e){if(!j(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(!j(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 u=i-o,p=n-r,c=Math.min(u,p),y=this.slice(o,i),h=e.slice(r,n),g=0;g<c;++g)if(y[g]!==h[g]){u=y[g],p=h[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return jo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return jo(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 u=!1;;)switch(o){case"hex":return gl(this,e,r,n);case"utf8":case"utf-8":return xl(this,e,r,n);case"ascii":return Go(this,e,r,n);case"latin1":case"binary":return vl(this,e,r,n);case"base64":return wl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bl(this,e,r,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ko=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 u=0;u<i;++u)o[u]=this[u+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||N(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||N(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||N(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||N(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||N(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||N(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||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*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||N(e,r,this.length);for(var o=r,i=1,u=this[e+--o];o>0&&(i*=256);)u+=this[e+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*r)),u};f.prototype.readInt8=function(e,r){return r||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||N(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||N(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||N(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||N(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||N(e,4,this.length),Jr(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||N(e,4,this.length),Jr(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||N(e,8,this.length),Jr(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||N(e,8,this.length),Jr(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;q(this,e,r,n,i,0)}var u=1,p=0;for(this[r]=e&255;++p<n&&(u*=256);)this[r+p]=e/u&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;q(this,e,r,n,i,0)}var u=n-1,p=1;for(this[r+u]=e&255;--u>=0&&(p*=256);)this[r+u]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||q(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||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Vr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Vr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(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):Yr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(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):Yr(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);q(this,e,r,n,i-1,-i)}var u=0,p=1,c=0;for(this[r]=e&255;++u<n&&(p*=256);)e<0&&c===0&&this[r+u-1]!==0&&(c=1),this[r+u]=(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);q(this,e,r,n,i-1,-i)}var u=n-1,p=1,c=0;for(this[r+u]=e&255;--u>=0&&(p*=256);)e<0&&c===0&&this[r+u+1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||q(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||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Vr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Vr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(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):Yr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(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):Yr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return Yo(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return Yo(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return Ho(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return Ho(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,u;if(this===e&&n<r&&r<o)for(u=i-1;u>=0;--u)e[u+r]=this[u+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)e[u+r]=this[u+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 u;if(typeof e=="number")for(u=r;u<n;++u)this[u]=e;else{var p=j(e)?e:zr(new f(e,o).toString()),c=p.length;for(u=0;u<n-r;++u)this[u+r]=p[u%c]}return this};Il=/[^+\/0-9A-Za-z-_]/g});var s=Ge(()=>{"use strict";Qo()});var ri=m((jx,ei)=>{"use strict";a();s();var $l="Function.prototype.bind called on incompatible ",kl=Object.prototype.toString,_l=Math.max,Ml="[object Function]",Xo=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},Dl=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Wl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};ei.exports=function(e){var r=this;if(typeof r!="function"||kl.apply(r)!==Ml)throw new TypeError($l+r);for(var n=Dl(arguments,1),o,i=function(){if(this instanceof o){var h=r.apply(this,Xo(n,arguments));return Object(h)===h?h:this}return r.apply(e,Xo(n,arguments))},u=_l(0,r.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(o=Function("binder","return function ("+Wl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var y=function(){};y.prototype=r.prototype,o.prototype=new y,y.prototype=null}return o}});var Te=m((Vx,ti)=>{"use strict";a();s();var jl=ri();ti.exports=Function.prototype.bind||jl});var Qt=m((Jx,ni)=>{"use strict";a();s();ni.exports=Error});var Xt=m((Qx,oi)=>{"use strict";a();s();oi.exports=EvalError});var en=m((r0,ii)=>{"use strict";a();s();ii.exports=RangeError});var rn=m((o0,ai)=>{"use strict";a();s();ai.exports=ReferenceError});var Kr=m((s0,si)=>{"use strict";a();s();si.exports=SyntaxError});var I=m((p0,ui)=>{"use strict";a();s();ui.exports=TypeError});var tn=m((d0,fi)=>{"use strict";a();s();fi.exports=URIError});var li=m((h0,pi)=>{"use strict";a();s();pi.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 u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0}});var nn=m((v0,di)=>{"use strict";a();s();var ci=typeof Symbol!="undefined"&&Symbol,Gl=li();di.exports=function(){return typeof ci!="function"||typeof Symbol!="function"||typeof ci("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gl()}});var mi=m((A0,yi)=>{"use strict";a();s();var on={__proto__:null,foo:{}},zl=Object;yi.exports=function(){return{__proto__:on}.foo===on.foo&&!(on instanceof zl)}});var an=m((T0,hi)=>{"use strict";a();s();var Vl=Function.prototype.call,Yl=Object.prototype.hasOwnProperty,Hl=Te();hi.exports=Hl.call(Vl,Yl)});var G=m((I0,bi)=>{"use strict";a();s();var A,Jl=Qt(),Kl=Xt(),Zl=en(),Ql=rn(),Ke=Kr(),Je=I(),Xl=tn(),wi=Function,sn=function(t){try{return wi('"use strict"; return ('+t+").constructor;")()}catch(e){}},Re=Object.getOwnPropertyDescriptor;if(Re)try{Re({},"")}catch(t){Re=null}var un=function(){throw new Je},ec=Re?function(){try{return arguments.callee,un}catch(t){try{return Re(arguments,"callee").get}catch(e){return un}}}():un,Ye=nn()(),rc=mi()(),F=Object.getPrototypeOf||(rc?function(t){return t.__proto__}:null),He={},tc=typeof Uint8Array=="undefined"||!F?A:F(Uint8Array),Pe={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":Ye&&F?F([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":He,"%AsyncGenerator%":He,"%AsyncGeneratorFunction%":He,"%AsyncIteratorPrototype%":He,"%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%":Jl,"%eval%":eval,"%EvalError%":Kl,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":wi,"%GeneratorFunction%":He,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ye&&F?F(F([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ye||!F?A:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":Zl,"%ReferenceError%":Ql,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ye||!F?A:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ye&&F?F(""[Symbol.iterator]()):A,"%Symbol%":Ye?Symbol:A,"%SyntaxError%":Ke,"%ThrowTypeError%":ec,"%TypedArray%":tc,"%TypeError%":Je,"%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%":Xl,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet};if(F)try{null.error}catch(t){gi=F(F(t)),Pe["%Error.prototype%"]=gi}var gi,nc=function t(e){var r;if(e==="%AsyncFunction%")r=sn("async function () {}");else if(e==="%GeneratorFunction%")r=sn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=sn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(r=F(o.prototype))}return Pe[e]=r,r},xi={__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"]},cr=Te(),Zr=an(),oc=cr.call(Function.call,Array.prototype.concat),ic=cr.call(Function.apply,Array.prototype.splice),vi=cr.call(Function.call,String.prototype.replace),Qr=cr.call(Function.call,String.prototype.slice),ac=cr.call(Function.call,RegExp.prototype.exec),sc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uc=/\\(\\)?/g,fc=function(e){var r=Qr(e,0,1),n=Qr(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 vi(e,sc,function(i,u,p,c){o[o.length]=p?vi(c,uc,"$1"):u||i}),o},pc=function(e,r){var n=e,o;if(Zr(xi,n)&&(o=xi[n],n="%"+o[0]+"%"),Zr(Pe,n)){var i=Pe[n];if(i===He&&(i=nc(n)),typeof i=="undefined"&&!r)throw new Je("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!")};bi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Je("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Je('"allowMissing" argument must be a boolean');if(ac(/^%?[^%]*%?$/,e)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=fc(e),o=n.length>0?n[0]:"",i=pc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],ic(n,oc([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=Qr(v,0,1),T=Qr(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new Ke("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",Zr(Pe,u))p=Pe[u];else if(p!=null){if(!(v in p)){if(!r)throw new Je("base intrinsic for "+e+" exists, but the property is not available.");return}if(Re&&h+1>=n.length){var R=Re(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=Zr(p,v),p=p[v];g&&!c&&(Pe[u]=p)}}return p}});var fn=m((C0,Ai)=>{"use strict";a();s();Ai.exports=Object});var Ei=m((B0,Si)=>{"use strict";a();s();Si.exports=Math.abs});var Ri=m(($0,Ti)=>{"use strict";a();s();Ti.exports=Math.floor});var Ii=m((M0,Pi)=>{"use strict";a();s();Pi.exports=Math.max});var Fi=m((j0,Ni)=>{"use strict";a();s();Ni.exports=Math.min});var Oi=m((V0,Ci)=>{"use strict";a();s();Ci.exports=Math.pow});var Bi=m((J0,Li)=>{"use strict";a();s();Li.exports=Math.round});var qi=m((Q0,Ui)=>{"use strict";a();s();Ui.exports=Number.isNaN||function(e){return e!==e}});var ki=m((rv,$i)=>{"use strict";a();s();var lc=qi();$i.exports=function(e){return lc(e)||e===0?e:e<0?-1:1}});var Mi=m((ov,_i)=>{"use strict";a();s();_i.exports=Object.getOwnPropertyDescriptor});var dr=m((sv,Di)=>{"use strict";a();s();var Xr=Mi();if(Xr)try{Xr([],"length")}catch(t){Xr=null}Di.exports=Xr});var rt=m((pv,Wi)=>{"use strict";a();s();var et=Object.defineProperty||!1;if(et)try{et({},"a",{value:1})}catch(t){et=!1}Wi.exports=et});var pn=m((dv,ji)=>{"use strict";a();s();ji.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 u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[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 Vi=m((hv,zi)=>{"use strict";a();s();var Gi=typeof Symbol!="undefined"&&Symbol,cc=pn();zi.exports=function(){return typeof Gi!="function"||typeof Symbol!="function"||typeof Gi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:cc()}});var ln=m((vv,Yi)=>{"use strict";a();s();Yi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var cn=m((Av,Hi)=>{"use strict";a();s();var dc=fn();Hi.exports=dc.getPrototypeOf||null});var tt=m((Tv,Ji)=>{"use strict";a();s();Ji.exports=Function.prototype.call});var dn=m((Iv,Ki)=>{"use strict";a();s();Ki.exports=Function.prototype.apply});var Qi=m((Cv,Zi)=>{"use strict";a();s();Zi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ea=m((Bv,Xi)=>{"use strict";a();s();var yc=Te(),mc=dn(),hc=tt(),gc=Qi();Xi.exports=gc||yc.call(hc,mc)});var ta=m(($v,ra)=>{"use strict";a();s();var xc=Te(),vc=I(),wc=tt(),bc=ea();ra.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new vc("a function is required");return bc(xc,wc,e)}});var ua=m((Mv,sa)=>{"use strict";a();s();var Ac=ta(),na=dr(),ia;try{ia=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var yn=!!ia&&na&&na(Object.prototype,"__proto__"),aa=Object,oa=aa.getPrototypeOf;sa.exports=yn&&typeof yn.get=="function"?Ac([yn.get]):typeof oa=="function"?function(e){return oa(e==null?e:aa(e))}:!1});var da=m((jv,ca)=>{"use strict";a();s();var fa=ln(),pa=cn(),la=ua();ca.exports=fa?function(e){return fa(e)}:pa?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return pa(e)}:la?function(e){return la(e)}:null});var gn=m((Vv,va)=>{"use strict";a();s();var S,Sc=fn(),Ec=Qt(),Tc=Xt(),Rc=en(),Pc=rn(),er=Kr(),Xe=I(),Ic=tn(),Nc=Ei(),Fc=Ri(),Cc=Ii(),Oc=Fi(),Lc=Oi(),Bc=Bi(),Uc=ki(),ga=Function,mn=function(t){try{return ga('"use strict"; return ('+t+").constructor;")()}catch(e){}},yr=dr(),qc=rt(),hn=function(){throw new Xe},$c=yr?function(){try{return arguments.callee,hn}catch(t){try{return yr(arguments,"callee").get}catch(e){return hn}}}():hn,Ze=Vi()(),C=da(),kc=cn(),_c=ln(),xa=dn(),mr=tt(),Qe={},Mc=typeof Uint8Array=="undefined"||!C?S:C(Uint8Array),Ie={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&C?C([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Qe,"%AsyncGenerator%":Qe,"%AsyncGeneratorFunction%":Qe,"%AsyncIteratorPrototype%":Qe,"%Atomics%":typeof Atomics=="undefined"?S:Atomics,"%BigInt%":typeof BigInt=="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ec,"%eval%":eval,"%EvalError%":Tc,"%Float32Array%":typeof Float32Array=="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?S:FinalizationRegistry,"%Function%":ga,"%GeneratorFunction%":Qe,"%Int8Array%":typeof Int8Array=="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ze&&C?C(C([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map=="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ze||!C?S:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Sc,"%Object.getOwnPropertyDescriptor%":yr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?S:Promise,"%Proxy%":typeof Proxy=="undefined"?S:Proxy,"%RangeError%":Rc,"%ReferenceError%":Pc,"%Reflect%":typeof Reflect=="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ze||!C?S:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&C?C(""[Symbol.iterator]()):S,"%Symbol%":Ze?Symbol:S,"%SyntaxError%":er,"%ThrowTypeError%":$c,"%TypedArray%":Mc,"%TypeError%":Xe,"%Uint8Array%":typeof Uint8Array=="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?S:Uint32Array,"%URIError%":Ic,"%WeakMap%":typeof WeakMap=="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?S:WeakSet,"%Function.prototype.call%":mr,"%Function.prototype.apply%":xa,"%Object.defineProperty%":qc,"%Object.getPrototypeOf%":kc,"%Math.abs%":Nc,"%Math.floor%":Fc,"%Math.max%":Cc,"%Math.min%":Oc,"%Math.pow%":Lc,"%Math.round%":Bc,"%Math.sign%":Uc,"%Reflect.getPrototypeOf%":_c};if(C)try{null.error}catch(t){ya=C(C(t)),Ie["%Error.prototype%"]=ya}var ya,Dc=function t(e){var r;if(e==="%AsyncFunction%")r=mn("async function () {}");else if(e==="%GeneratorFunction%")r=mn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=mn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&C&&(r=C(o.prototype))}return Ie[e]=r,r},ma={__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"]},hr=Te(),nt=an(),Wc=hr.call(mr,Array.prototype.concat),jc=hr.call(xa,Array.prototype.splice),ha=hr.call(mr,String.prototype.replace),ot=hr.call(mr,String.prototype.slice),Gc=hr.call(mr,RegExp.prototype.exec),zc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vc=/\\(\\)?/g,Yc=function(e){var r=ot(e,0,1),n=ot(e,-1);if(r==="%"&&n!=="%")throw new er("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new er("invalid intrinsic syntax, expected opening `%`");var o=[];return ha(e,zc,function(i,u,p,c){o[o.length]=p?ha(c,Vc,"$1"):u||i}),o},Hc=function(e,r){var n=e,o;if(nt(ma,n)&&(o=ma[n],n="%"+o[0]+"%"),nt(Ie,n)){var i=Ie[n];if(i===Qe&&(i=Dc(n)),typeof i=="undefined"&&!r)throw new Xe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new er("intrinsic "+e+" does not exist!")};va.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Xe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Xe('"allowMissing" argument must be a boolean');if(Gc(/^%?[^%]*%?$/,e)===null)throw new er("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Yc(e),o=n.length>0?n[0]:"",i=Hc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],jc(n,Wc([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=ot(v,0,1),T=ot(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new er("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",nt(Ie,u))p=Ie[u];else if(p!=null){if(!(v in p)){if(!r)throw new Xe("base intrinsic for "+e+" exists, but the property is not available.");return}if(yr&&h+1>=n.length){var R=yr(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=nt(p,v),p=p[v];g&&!c&&(Ie[u]=p)}}return p}});var xn=m((Jv,Aa)=>{"use strict";a();s();var wa=rt(),Jc=Kr(),rr=I(),ba=dr();Aa.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new rr("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new rr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!ba&&ba(e,r);if(wa)wa(e,r,{configurable:u===null&&c?c.configurable:!u,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!u)e[r]=n;else throw new Jc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wn=m((Qv,Ea)=>{"use strict";a();s();var vn=rt(),Sa=function(){return!!vn};Sa.hasArrayLengthDefineBug=function(){if(!vn)return null;try{return vn([],"length",{value:1}).length!==1}catch(e){return!0}};Ea.exports=Sa});var Na=m((rw,Ia)=>{"use strict";a();s();var Kc=gn(),Ta=xn(),Zc=wn()(),Ra=dr(),Pa=I(),Qc=Kc("%Math.floor%");Ia.exports=function(e,r){if(typeof e!="function")throw new Pa("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Qc(r)!==r)throw new Pa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Ra){var u=Ra(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Zc?Ta(e,"length",r,!0,!0):Ta(e,"length",r)),e}});var Ca=m((ow,Fa)=>{"use strict";a();s();var Xc=gn(),it=Xc("%Object.defineProperty%",!0)||!1;if(it)try{it({},"a",{value:1})}catch(t){it=!1}Fa.exports=it});var ut=m((sw,at)=>{"use strict";a();s();var bn=Te(),st=G(),ed=Na(),rd=I(),Ba=st("%Function.prototype.apply%"),Ua=st("%Function.prototype.call%"),qa=st("%Reflect.apply%",!0)||bn.call(Ua,Ba),Oa=Ca(),td=st("%Math.max%");at.exports=function(e){if(typeof e!="function")throw new rd("a function is required");var r=qa(bn,Ua,arguments);return ed(r,1+td(0,e.length-(arguments.length-1)),!0)};var La=function(){return qa(bn,Ba,arguments)};Oa?Oa(at.exports,"apply",{value:La}):at.exports.apply=La});var An=m((pw,ka)=>{"use strict";a();s();var $a=Object.prototype.toString;ka.exports=function(e){var r=$a.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&$a.call(e.callee)==="[object Function]"),n}});var Ya=m((dw,Va)=>{"use strict";a();s();var za;Object.keys||(gr=Object.prototype.hasOwnProperty,Sn=Object.prototype.toString,_a=An(),En=Object.prototype.propertyIsEnumerable,Ma=!En.call({toString:null},"toString"),Da=En.call(function(){},"prototype"),xr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ft=function(t){var e=t.constructor;return e&&e.prototype===t},Wa={$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},ja=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Wa["$"+t]&&gr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{ft(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ga=function(t){if(typeof window=="undefined"||!ja)return ft(t);try{return ft(t)}catch(e){return!1}},za=function(e){var r=e!==null&&typeof e=="object",n=Sn.call(e)==="[object Function]",o=_a(e),i=r&&Sn.call(e)==="[object String]",u=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Da&&n;if(i&&e.length>0&&!gr.call(e,0))for(var c=0;c<e.length;++c)u.push(String(c));if(o&&e.length>0)for(var y=0;y<e.length;++y)u.push(String(y));else for(var h in e)!(p&&h==="prototype")&&gr.call(e,h)&&u.push(String(h));if(Ma)for(var g=Ga(e),v=0;v<xr.length;++v)!(g&&xr[v]==="constructor")&&gr.call(e,xr[v])&&u.push(xr[v]);return u});var gr,Sn,_a,En,Ma,Da,xr,ft,Wa,ja,Ga;Va.exports=za});var Za=m((hw,Ka)=>{"use strict";a();s();var nd=Array.prototype.slice,od=An(),Ha=Object.keys,pt=Ha?function(e){return Ha(e)}:Ya(),Ja=Object.keys;pt.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 od(n)?Ja(nd.call(n)):Ja(n)})}else Object.keys=pt;return Object.keys||pt};Ka.exports=pt});var vr=m((vw,rs)=>{"use strict";a();s();var id=Za(),ad=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",sd=Object.prototype.toString,ud=Array.prototype.concat,Qa=xn(),fd=function(t){return typeof t=="function"&&sd.call(t)==="[object Function]"},Xa=wn()(),pd=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!fd(n)||!n())return}Xa?Qa(t,e,r,!0):Qa(t,e,r)},es=function(t,e){var r=arguments.length>2?arguments[2]:{},n=id(e);ad&&(n=ud.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)pd(t,n[o],e[n[o]],r[n[o]])};es.supportsDescriptors=!!Xa;rs.exports=es});var M=m((Aw,os)=>{"use strict";a();s();var ts=G(),ns=ut(),ld=ns(ts("String.prototype.indexOf"));os.exports=function(e,r){var n=ts(e,!!r);return typeof n=="function"&&ld(e,".prototype.")>-1?ns(n):n}});var ss=m((Tw,as)=>{"use strict";a();s();var cd=G(),is=cd("%Array%"),dd=!is.isArray&&M()("Object.prototype.toString");as.exports=is.isArray||function(e){return dd(e)==="[object Array]"}});var Tn=m((Iw,us)=>{"use strict";a();s();us.exports=ss()});var ps=m((Cw,fs)=>{"use strict";a();s();var yd=G(),md=M(),hd=I(),gd=Tn(),xd=yd("%Reflect.apply%",!0)||md("Function.prototype.apply");fs.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!gd(n))throw new hd("Assertion failed: optional `argumentsList`, if provided, must be a List");return xd(e,r,n)}});function ls(){throw new Error("setTimeout has not been defined")}function cs(){throw new Error("clearTimeout has not been defined")}function ds(t){if(le===setTimeout)return setTimeout(t,0);if((le===ls||!le)&&setTimeout)return le=setTimeout,setTimeout(t,0);try{return le(t,0)}catch(e){try{return le.call(null,t,0)}catch(r){return le.call(this,t,0)}}}function vd(t){if(ce===clearTimeout)return clearTimeout(t);if((ce===cs||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(t);try{return ce(t)}catch(e){try{return ce.call(null,t)}catch(r){return ce.call(this,t)}}}function wd(){!nr||!Ne||(nr=!1,Ne.length?X=Ne.concat(X):lt=-1,X.length&&ys())}function ys(){if(!nr){var t=ds(wd);nr=!0;for(var e=X.length;e;){for(Ne=X,X=[];++lt<e;)Ne&&Ne[lt].run();lt=-1,e=X.length}Ne=null,nr=!1,vd(t)}}function bd(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];X.push(new ms(t,e)),X.length===1&&!nr&&ds(ys)}function ms(t,e){this.fun=t,this.array=e}function Fe(){}function kd(t){throw new Error("process.binding is not supported")}function _d(){return"/"}function Md(t){throw new Error("process.chdir is not supported")}function Dd(){return 0}function jd(t){var e=Wd.call(tr)*.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 zd(){var t=new Date,e=t-Gd;return e/1e3}var le,ce,X,nr,Ne,lt,Ad,Sd,Ed,Td,Rd,Pd,Id,Nd,Fd,Cd,Od,Ld,Bd,Ud,qd,$d,tr,Wd,Gd,Vd,wr,hs=Ge(()=>{"use strict";a();s();le=ls,ce=cs;typeof globalThis.setTimeout=="function"&&(le=setTimeout);typeof globalThis.clearTimeout=="function"&&(ce=clearTimeout);X=[],nr=!1,lt=-1;ms.prototype.run=function(){this.fun.apply(null,this.array)};Ad="browser",Sd="browser",Ed=!0,Td={},Rd=[],Pd="",Id={},Nd={},Fd={};Cd=Fe,Od=Fe,Ld=Fe,Bd=Fe,Ud=Fe,qd=Fe,$d=Fe;tr=globalThis.performance||{},Wd=tr.now||tr.mozNow||tr.msNow||tr.oNow||tr.webkitNow||function(){return new Date().getTime()};Gd=new Date;Vd={nextTick:bd,title:Ad,browser:Ed,env:Td,argv:Rd,version:Pd,versions:Id,on:Cd,addListener:Od,once:Ld,off:Bd,removeListener:Ud,removeAllListeners:qd,emit:$d,binding:kd,cwd:_d,chdir:Md,umask:Dd,hrtime:jd,platform:Sd,release:Nd,config:Fd,uptime:zd},wr=Vd});var Rn,Pn,gs=Ge(()=>{"use strict";a();s();typeof Object.create=="function"?Rn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Rn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};Pn=Rn});var Ts={};Yt(Ts,{_extend:()=>qn,debuglog:()=>xs,default:()=>ty,deprecate:()=>On,format:()=>mt,inherits:()=>Pn,inspect:()=>V,isArray:()=>Ln,isBoolean:()=>ht,isBuffer:()=>As,isDate:()=>yt,isError:()=>Ar,isFunction:()=>Sr,isNull:()=>Er,isNullOrUndefined:()=>vs,isNumber:()=>Bn,isObject:()=>Ce,isPrimitive:()=>bs,isRegExp:()=>br,isString:()=>Tr,isSymbol:()=>ws,isUndefined:()=>z,log:()=>Ss});function mt(t){if(!Tr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(V(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Yd,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}}),u=n[r];r<o;u=n[++r])Er(u)||!Ce(u)?i+=" "+u:i+=" "+V(u);return i}function On(t,e){if(z(globalThis.process))return function(){return On(t,e).apply(this,arguments)};if(wr.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(wr.throwDeprecation)throw new Error(e);wr.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function xs(t){if(z(In)&&(In=wr.env.NODE_DEBUG||""),t=t.toUpperCase(),!ct[t])if(new RegExp("\\b"+t+"\\b","i").test(In)){var e=0;ct[t]=function(){var r=mt.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else ct[t]=function(){};return ct[t]}function V(t,e){var r={seen:[],stylize:Jd};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ht(e)?r.showHidden=e:e&&qn(r,e),z(r.showHidden)&&(r.showHidden=!1),z(r.depth)&&(r.depth=2),z(r.colors)&&(r.colors=!1),z(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Hd),dt(r,t,r.depth)}function Hd(t,e){var r=V.styles[e];return r?"\x1B["+V.colors[r][0]+"m"+t+"\x1B["+V.colors[r][1]+"m":t}function Jd(t,e){return t}function Kd(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function dt(t,e,r){if(t.customInspect&&e&&Sr(e.inspect)&&e.inspect!==V&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return Tr(n)||(n=dt(t,n,r)),n}var o=Zd(t,e);if(o)return o;var i=Object.keys(e),u=Kd(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),Ar(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Nn(e);if(i.length===0){if(Sr(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(br(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(yt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Ar(e))return Nn(e)}var c="",y=!1,h=["{","}"];if(Ln(e)&&(y=!0,h=["[","]"]),Sr(e)){var g=e.name?": "+e.name:"";c=" [Function"+g+"]"}if(br(e)&&(c=" "+RegExp.prototype.toString.call(e)),yt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),Ar(e)&&(c=" "+Nn(e)),i.length===0&&(!y||e.length==0))return h[0]+c+h[1];if(r<0)return br(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var v;return y?v=Qd(t,e,r,u,i):v=i.map(function(b){return Cn(t,e,r,u,b,y)}),t.seen.pop(),Xd(v,c,h)}function Zd(t,e){if(z(e))return t.stylize("undefined","undefined");if(Tr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Bn(e))return t.stylize(""+e,"number");if(ht(e))return t.stylize(""+e,"boolean");if(Er(e))return t.stylize("null","null")}function Nn(t){return"["+Error.prototype.toString.call(t)+"]"}function Qd(t,e,r,n,o){for(var i=[],u=0,p=e.length;u<p;++u)Es(e,String(u))?i.push(Cn(t,e,r,n,String(u),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(Cn(t,e,r,n,c,!0))}),i}function Cn(t,e,r,n,o,i){var u,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")),Es(n,o)||(u="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(Er(r)?p=dt(t,c.value,null):p=dt(t,c.value,r-1),p.indexOf(`
|
|
1
|
+
"use strict";var Np=Object.create;var cr=Object.defineProperty,Fp=Object.defineProperties,Cp=Object.getOwnPropertyDescriptor,Op=Object.getOwnPropertyDescriptors,Lp=Object.getOwnPropertyNames,jr=Object.getOwnPropertySymbols,Bp=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable;var zt=(t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))Vt.call(e,r)&&zt(t,r,e[r]);if(jr)for(var r of jr(e))To.call(e,r)&&zt(t,r,e[r]);return t},Ge=(t,e)=>Fp(t,Op(e));var Ro=t=>typeof t=="symbol"?t:t+"",Po=(t,e)=>{var r={};for(var n in t)Vt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&jr)for(var n of jr(t))e.indexOf(n)<0&&To.call(t,n)&&(r[n]=t[n]);return r};var ze=(t,e)=>()=>(t&&(e=t(t=0)),e);var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yt=(t,e)=>{for(var r in e)cr(t,r,{get:e[r],enumerable:!0})},Io=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Lp(e))!Vt.call(t,o)&&o!==r&&cr(t,o,{get:()=>e[o],enumerable:!(n=Cp(e,o))||n.enumerable});return t};var Up=(t,e,r)=>(r=t!=null?Np(Bp(t)):{},Io(e||!t||!t.__esModule?cr(r,"default",{value:t,enumerable:!0}):r,t)),No=t=>Io(cr({},"__esModule",{value:!0}),t);var d=(t,e,r)=>zt(t,typeof e!="symbol"?e+"":e,r);function Co(){throw new Error("setTimeout has not been defined")}function Oo(){throw new Error("clearTimeout has not been defined")}function Lo(t){if(fe===setTimeout)return setTimeout(t,0);if((fe===Co||!fe)&&setTimeout)return fe=setTimeout,setTimeout(t,0);try{return fe(t,0)}catch(e){try{return fe.call(null,t,0)}catch(r){return fe.call(this,t,0)}}}function qp(t){if(pe===clearTimeout)return clearTimeout(t);if((pe===Oo||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(t);try{return pe(t)}catch(e){try{return pe.call(null,t)}catch(r){return pe.call(this,t)}}}function $p(){!Ye||!Se||(Ye=!1,Se.length?Z=Se.concat(Z):Gr=-1,Z.length&&Bo())}function Bo(){if(!Ye){var t=Lo($p);Ye=!0;for(var e=Z.length;e;){for(Se=Z,Z=[];++Gr<e;)Se&&Se[Gr].run();Gr=-1,e=Z.length}Se=null,Ye=!1,qp(t)}}function kp(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];Z.push(new Uo(t,e)),Z.length===1&&!Ye&&Lo(Bo)}function Uo(t,e){this.fun=t,this.array=e}function Ee(){}function rl(t){throw new Error("process.binding is not supported")}function tl(){return"/"}function nl(t){throw new Error("process.chdir is not supported")}function ol(){return 0}function al(t){var e=il.call(Ve)*.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 ul(){var t=new Date,e=t-sl;return e/1e3}var fe,pe,Z,Ye,Se,Gr,_p,Mp,Dp,Wp,jp,Gp,zp,Vp,Yp,Hp,Jp,Kp,Zp,Qp,Xp,el,Ve,il,sl,l,Fo,a=ze(()=>{"use strict";fe=Co,pe=Oo;typeof globalThis.setTimeout=="function"&&(fe=setTimeout);typeof globalThis.clearTimeout=="function"&&(pe=clearTimeout);Z=[],Ye=!1,Gr=-1;Uo.prototype.run=function(){this.fun.apply(null,this.array)};_p="browser",Mp="browser",Dp=!0,Wp={},jp=[],Gp="",zp={},Vp={},Yp={};Hp=Ee,Jp=Ee,Kp=Ee,Zp=Ee,Qp=Ee,Xp=Ee,el=Ee;Ve=globalThis.performance||{},il=Ve.now||Ve.mozNow||Ve.msNow||Ve.oNow||Ve.webkitNow||function(){return new Date().getTime()};sl=new Date;l={nextTick:kp,title:_p,browser:Dp,env:Wp,argv:jp,version:Gp,versions:zp,on:Hp,addListener:Jp,once:Kp,off:Zp,removeListener:Qp,removeAllListeners:Xp,emit:el,binding:rl,cwd:tl,chdir:nl,umask:ol,hrtime:al,platform:Mp,release:Vp,config:Yp,uptime:ul},Fo={};Object.keys(Fo).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]=Fo[t]:r=r[o]||(r[o]={})}})});function _o(){Jt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)W[e]=t[e],_[t.charCodeAt(e)]=e;_[45]=62,_[95]=63}function pl(t){Jt||_o();var e,r,n,o,i,u,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,u=new fl(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=_[t.charCodeAt(e)]<<18|_[t.charCodeAt(e+1)]<<12|_[t.charCodeAt(e+2)]<<6|_[t.charCodeAt(e+3)],u[c++]=o>>16&255,u[c++]=o>>8&255,u[c++]=o&255;return i===2?(o=_[t.charCodeAt(e)]<<2|_[t.charCodeAt(e+1)]>>4,u[c++]=o&255):i===1&&(o=_[t.charCodeAt(e)]<<10|_[t.charCodeAt(e+1)]<<4|_[t.charCodeAt(e+2)]>>2,u[c++]=o>>8&255,u[c++]=o&255),u}function ll(t){return W[t>>18&63]+W[t>>12&63]+W[t>>6&63]+W[t&63]}function cl(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(ll(n));return o.join("")}function qo(t){Jt||_o();for(var e,r=t.length,n=r%3,o="",i=[],u=16383,p=0,c=r-n;p<c;p+=u)i.push(cl(t,p,p+u>c?c:p+u));return n===1?(e=t[r-1],o+=W[e>>2],o+=W[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=W[e>>10],o+=W[e>>4&63],o+=W[e<<2&63],o+="="),i.push(o),i.join("")}function zr(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Q(t,e){if(zr()<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 Mo(this,t,e,r)}function Mo(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?ml(t,e,r,n):typeof e=="string"?yl(t,e,r):hl(t,e)}function Do(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 dl(t,e,r,n){return Do(e),e<=0?Q(t,e):r!==void 0?typeof n=="string"?Q(t,e).fill(r,n):Q(t,e).fill(r):Q(t,e)}function Kt(t,e){if(Do(e),t=Q(t,e<0?0:Zt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function yl(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=Wo(e,r)|0;t=Q(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ht(t,e){var r=e.length<0?0:Zt(e.length)|0;t=Q(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function ml(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=Ht(t,e),t}function hl(t,e){if(j(e)){var r=Zt(e.length)|0;return t=Q(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"||Ul(e.length)?Q(t,0):Ht(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ht(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Zt(t){if(t>=zr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zr().toString(16)+" bytes");return t|0}function j(t){return!!(t!=null&&t._isBuffer)}function Wo(t,e){if(j(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 Vr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Jo(t).length;default:if(n)return Vr(t).length;e=(""+e).toLowerCase(),n=!0}}function gl(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 Pl(this,e,r);case"utf8":case"utf-8":return zo(this,e,r);case"ascii":return Tl(this,e,r);case"latin1":case"binary":return Rl(this,e,r);case"base64":return Sl(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Il(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Te(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function jo(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)),j(e))return e.length===0?-1:$o(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):$o(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function $o(t,e,r,n,o){var i=1,u=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,u/=2,p/=2,r/=2}function c(b,T){return i===1?b[T]:b.readUInt16BE(T*i)}var y;if(o){var h=-1;for(y=r;y<u;y++)if(c(t,y)===c(e,h===-1?0:y-h)){if(h===-1&&(h=y),y-h+1===p)return h*i}else h!==-1&&(y-=y-h),h=-1}else for(r+p>u&&(r=u-p),y=r;y>=0;y--){for(var g=!0,v=0;v<p;v++)if(c(t,y+v)!==c(e,v)){g=!1;break}if(g)return y}return-1}function xl(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 u=0;u<n;++u){var p=parseInt(e.substr(u*2,2),16);if(isNaN(p))return u;t[r+u]=p}return u}function vl(t,e,r,n){return Jr(Vr(e,t.length-r),t,r,n)}function Go(t,e,r,n){return Jr(Ll(e),t,r,n)}function wl(t,e,r,n){return Go(t,e,r,n)}function bl(t,e,r,n){return Jr(Jo(e),t,r,n)}function Al(t,e,r,n){return Jr(Bl(e,t.length-r),t,r,n)}function Sl(t,e,r){return e===0&&r===t.length?qo(t):qo(t.slice(e,r))}function zo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],u=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,y,h,g;switch(p){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(u=g));break;case 3:c=t[o+1],y=t[o+2],(c&192)===128&&(y&192)===128&&(g=(i&15)<<12|(c&63)<<6|y&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=t[o+1],y=t[o+2],h=t[o+3],(c&192)===128&&(y&192)===128&&(h&192)===128&&(g=(i&15)<<18|(c&63)<<12|(y&63)<<6|h&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=p}return El(n)}function El(t){var e=t.length;if(e<=ko)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ko));return r}function Tl(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 Rl(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 Pl(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+=Ol(t[i]);return o}function Il(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 N(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 q(t,e,r,n,o,i){if(!j(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 Yr(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 Hr(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 Vo(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 Yo(t,e,r,n,o){return o||Vo(t,e,r,4,34028234663852886e22,-34028234663852886e22),Zo(t,e,r,n,23,4),r+4}function Ho(t,e,r,n,o){return o||Vo(t,e,r,8,17976931348623157e292,-17976931348623157e292),Zo(t,e,r,n,52,8),r+8}function Fl(t){if(t=Cl(t).replace(Nl,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Cl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ol(t){return t<16?"0"+t.toString(16):t.toString(16)}function Vr(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+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 Ll(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Bl(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function Jo(t){return pl(Fl(t))}function Jr(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 Ul(t){return t!==t}function ql(t){return t!=null&&(!!t._isBuffer||Ko(t)||$l(t))}function Ko(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function $l(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Ko(t.slice(0,0))}function Kr(t,e,r,n,o){var i,u,p=o*8-n-1,c=(1<<p)-1,y=c>>1,h=-7,g=r?o-1:0,v=r?-1:1,b=t[e+g];for(g+=v,i=b&(1<<-h)-1,b>>=-h,h+=p;h>0;i=i*256+t[e+g],g+=v,h-=8);for(u=i&(1<<-h)-1,i>>=-h,h+=n;h>0;u=u*256+t[e+g],g+=v,h-=8);if(i===0)i=1-y;else{if(i===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(b?-1:1)*u*Math.pow(2,i-n)}function Zo(t,e,r,n,o,i){var u,p,c,y=i*8-o-1,h=(1<<y)-1,g=h>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,T=n?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?e+=v/c:e+=v*Math.pow(2,1-g),e*c>=2&&(u++,c/=2),u+g>=h?(p=0,u=h):u+g>=1?(p=(e*c-1)*Math.pow(2,o),u=u+g):(p=e*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;t[r+b]=p&255,b+=T,p/=256,o-=8);for(u=u<<o|p,y+=o;y>0;t[r+b]=u&255,b+=T,u/=256,y-=8);t[r+b-T]|=R*128}var W,_,fl,Jt,ko,Nl,Qo=ze(()=>{"use strict";a();s();W=[],_=[],fl=typeof Uint8Array!="undefined"?Uint8Array:Array,Jt=!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 Mo(null,t,e,r)};f.kMaxLength=zr();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 dl(null,t,e,r)};f.allocUnsafe=function(t){return Kt(null,t)};f.allocUnsafeSlow=function(t){return Kt(null,t)};f.isBuffer=ql;f.compare=function(e,r){if(!j(e)||!j(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,u=Math.min(n,o);i<u;++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 u=e[n];if(!j(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};f.byteLength=Wo;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)Te(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)Te(this,r,r+3),Te(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)Te(this,r,r+7),Te(this,r+1,r+6),Te(this,r+2,r+5),Te(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?zo(this,0,e):gl.apply(this,arguments)};f.prototype.equals=function(e){if(!j(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(!j(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 u=i-o,p=n-r,c=Math.min(u,p),y=this.slice(o,i),h=e.slice(r,n),g=0;g<c;++g)if(y[g]!==h[g]){u=y[g],p=h[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return jo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return jo(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 u=!1;;)switch(o){case"hex":return xl(this,e,r,n);case"utf8":case"utf-8":return vl(this,e,r,n);case"ascii":return Go(this,e,r,n);case"latin1":case"binary":return wl(this,e,r,n);case"base64":return bl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Al(this,e,r,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ko=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 u=0;u<i;++u)o[u]=this[u+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||N(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||N(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||N(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||N(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||N(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||N(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||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*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||N(e,r,this.length);for(var o=r,i=1,u=this[e+--o];o>0&&(i*=256);)u+=this[e+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*r)),u};f.prototype.readInt8=function(e,r){return r||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||N(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||N(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||N(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||N(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||N(e,4,this.length),Kr(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||N(e,4,this.length),Kr(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||N(e,8,this.length),Kr(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||N(e,8,this.length),Kr(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;q(this,e,r,n,i,0)}var u=1,p=0;for(this[r]=e&255;++p<n&&(u*=256);)this[r+p]=e/u&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;q(this,e,r,n,i,0)}var u=n-1,p=1;for(this[r+u]=e&255;--u>=0&&(p*=256);)this[r+u]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||q(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||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Yr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Yr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(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):Hr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(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):Hr(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);q(this,e,r,n,i-1,-i)}var u=0,p=1,c=0;for(this[r]=e&255;++u<n&&(p*=256);)e<0&&c===0&&this[r+u-1]!==0&&(c=1),this[r+u]=(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);q(this,e,r,n,i-1,-i)}var u=n-1,p=1,c=0;for(this[r+u]=e&255;--u>=0&&(p*=256);)e<0&&c===0&&this[r+u+1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||q(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||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Yr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Yr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(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):Hr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(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):Hr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return Yo(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return Yo(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return Ho(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return Ho(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,u;if(this===e&&n<r&&r<o)for(u=i-1;u>=0;--u)e[u+r]=this[u+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)e[u+r]=this[u+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 u;if(typeof e=="number")for(u=r;u<n;++u)this[u]=e;else{var p=j(e)?e:Vr(new f(e,o).toString()),c=p.length;for(u=0;u<n-r;++u)this[u+r]=p[u%c]}return this};Nl=/[^+\/0-9A-Za-z-_]/g});var s=ze(()=>{"use strict";Qo()});var ri=m((Gx,ei)=>{"use strict";a();s();var kl="Function.prototype.bind called on incompatible ",_l=Object.prototype.toString,Ml=Math.max,Dl="[object Function]",Xo=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},Wl=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},jl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};ei.exports=function(e){var r=this;if(typeof r!="function"||_l.apply(r)!==Dl)throw new TypeError(kl+r);for(var n=Wl(arguments,1),o,i=function(){if(this instanceof o){var h=r.apply(this,Xo(n,arguments));return Object(h)===h?h:this}return r.apply(e,Xo(n,arguments))},u=Ml(0,r.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(o=Function("binder","return function ("+jl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var y=function(){};y.prototype=r.prototype,o.prototype=new y,y.prototype=null}return o}});var Re=m((Yx,ti)=>{"use strict";a();s();var Gl=ri();ti.exports=Function.prototype.bind||Gl});var Qt=m((Kx,ni)=>{"use strict";a();s();ni.exports=Error});var Xt=m((Xx,oi)=>{"use strict";a();s();oi.exports=EvalError});var en=m((t0,ii)=>{"use strict";a();s();ii.exports=RangeError});var rn=m((i0,ai)=>{"use strict";a();s();ai.exports=ReferenceError});var Zr=m((u0,si)=>{"use strict";a();s();si.exports=SyntaxError});var I=m((l0,ui)=>{"use strict";a();s();ui.exports=TypeError});var tn=m((y0,fi)=>{"use strict";a();s();fi.exports=URIError});var li=m((g0,pi)=>{"use strict";a();s();pi.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 u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0}});var nn=m((w0,di)=>{"use strict";a();s();var ci=typeof Symbol!="undefined"&&Symbol,zl=li();di.exports=function(){return typeof ci!="function"||typeof Symbol!="function"||typeof ci("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zl()}});var mi=m((S0,yi)=>{"use strict";a();s();var on={__proto__:null,foo:{}},Vl=Object;yi.exports=function(){return{__proto__:on}.foo===on.foo&&!(on instanceof Vl)}});var an=m((R0,hi)=>{"use strict";a();s();var Yl=Function.prototype.call,Hl=Object.prototype.hasOwnProperty,Jl=Re();hi.exports=Jl.call(Yl,Hl)});var G=m((N0,bi)=>{"use strict";a();s();var A,Kl=Qt(),Zl=Xt(),Ql=en(),Xl=rn(),Ze=Zr(),Ke=I(),ec=tn(),wi=Function,sn=function(t){try{return wi('"use strict"; return ('+t+").constructor;")()}catch(e){}},Pe=Object.getOwnPropertyDescriptor;if(Pe)try{Pe({},"")}catch(t){Pe=null}var un=function(){throw new Ke},rc=Pe?function(){try{return arguments.callee,un}catch(t){try{return Pe(arguments,"callee").get}catch(e){return un}}}():un,He=nn()(),tc=mi()(),F=Object.getPrototypeOf||(tc?function(t){return t.__proto__}:null),Je={},nc=typeof Uint8Array=="undefined"||!F?A:F(Uint8Array),Ie={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":He&&F?F([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%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%":Kl,"%eval%":eval,"%EvalError%":Zl,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":wi,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&F?F(F([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!He||!F?A:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":Ql,"%ReferenceError%":Xl,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!He||!F?A:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&F?F(""[Symbol.iterator]()):A,"%Symbol%":He?Symbol:A,"%SyntaxError%":Ze,"%ThrowTypeError%":rc,"%TypedArray%":nc,"%TypeError%":Ke,"%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%":ec,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet};if(F)try{null.error}catch(t){gi=F(F(t)),Ie["%Error.prototype%"]=gi}var gi,oc=function t(e){var r;if(e==="%AsyncFunction%")r=sn("async function () {}");else if(e==="%GeneratorFunction%")r=sn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=sn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(r=F(o.prototype))}return Ie[e]=r,r},xi={__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"]},dr=Re(),Qr=an(),ic=dr.call(Function.call,Array.prototype.concat),ac=dr.call(Function.apply,Array.prototype.splice),vi=dr.call(Function.call,String.prototype.replace),Xr=dr.call(Function.call,String.prototype.slice),sc=dr.call(Function.call,RegExp.prototype.exec),uc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fc=/\\(\\)?/g,pc=function(e){var r=Xr(e,0,1),n=Xr(e,-1);if(r==="%"&&n!=="%")throw new Ze("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ze("invalid intrinsic syntax, expected opening `%`");var o=[];return vi(e,uc,function(i,u,p,c){o[o.length]=p?vi(c,fc,"$1"):u||i}),o},lc=function(e,r){var n=e,o;if(Qr(xi,n)&&(o=xi[n],n="%"+o[0]+"%"),Qr(Ie,n)){var i=Ie[n];if(i===Je&&(i=oc(n)),typeof i=="undefined"&&!r)throw new Ke("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ze("intrinsic "+e+" does not exist!")};bi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(sc(/^%?[^%]*%?$/,e)===null)throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pc(e),o=n.length>0?n[0]:"",i=lc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],ac(n,ic([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=Xr(v,0,1),T=Xr(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new Ze("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",Qr(Ie,u))p=Ie[u];else if(p!=null){if(!(v in p)){if(!r)throw new Ke("base intrinsic for "+e+" exists, but the property is not available.");return}if(Pe&&h+1>=n.length){var R=Pe(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=Qr(p,v),p=p[v];g&&!c&&(Ie[u]=p)}}return p}});var fn=m((O0,Ai)=>{"use strict";a();s();Ai.exports=Object});var Ei=m((U0,Si)=>{"use strict";a();s();Si.exports=Math.abs});var Ri=m((k0,Ti)=>{"use strict";a();s();Ti.exports=Math.floor});var Ii=m((D0,Pi)=>{"use strict";a();s();Pi.exports=Math.max});var Fi=m((G0,Ni)=>{"use strict";a();s();Ni.exports=Math.min});var Oi=m((Y0,Ci)=>{"use strict";a();s();Ci.exports=Math.pow});var Bi=m((K0,Li)=>{"use strict";a();s();Li.exports=Math.round});var qi=m((X0,Ui)=>{"use strict";a();s();Ui.exports=Number.isNaN||function(e){return e!==e}});var ki=m((tv,$i)=>{"use strict";a();s();var cc=qi();$i.exports=function(e){return cc(e)||e===0?e:e<0?-1:1}});var Mi=m((iv,_i)=>{"use strict";a();s();_i.exports=Object.getOwnPropertyDescriptor});var yr=m((uv,Di)=>{"use strict";a();s();var et=Mi();if(et)try{et([],"length")}catch(t){et=null}Di.exports=et});var tt=m((lv,Wi)=>{"use strict";a();s();var rt=Object.defineProperty||!1;if(rt)try{rt({},"a",{value:1})}catch(t){rt=!1}Wi.exports=rt});var pn=m((yv,ji)=>{"use strict";a();s();ji.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 u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[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 Vi=m((gv,zi)=>{"use strict";a();s();var Gi=typeof Symbol!="undefined"&&Symbol,dc=pn();zi.exports=function(){return typeof Gi!="function"||typeof Symbol!="function"||typeof Gi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dc()}});var ln=m((wv,Yi)=>{"use strict";a();s();Yi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var cn=m((Sv,Hi)=>{"use strict";a();s();var yc=fn();Hi.exports=yc.getPrototypeOf||null});var nt=m((Rv,Ji)=>{"use strict";a();s();Ji.exports=Function.prototype.call});var dn=m((Nv,Ki)=>{"use strict";a();s();Ki.exports=Function.prototype.apply});var Qi=m((Ov,Zi)=>{"use strict";a();s();Zi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ea=m((Uv,Xi)=>{"use strict";a();s();var mc=Re(),hc=dn(),gc=nt(),xc=Qi();Xi.exports=xc||mc.call(gc,hc)});var ta=m((kv,ra)=>{"use strict";a();s();var vc=Re(),wc=I(),bc=nt(),Ac=ea();ra.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new wc("a function is required");return Ac(vc,bc,e)}});var ua=m((Dv,sa)=>{"use strict";a();s();var Sc=ta(),na=yr(),ia;try{ia=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var yn=!!ia&&na&&na(Object.prototype,"__proto__"),aa=Object,oa=aa.getPrototypeOf;sa.exports=yn&&typeof yn.get=="function"?Sc([yn.get]):typeof oa=="function"?function(e){return oa(e==null?e:aa(e))}:!1});var da=m((Gv,ca)=>{"use strict";a();s();var fa=ln(),pa=cn(),la=ua();ca.exports=fa?function(e){return fa(e)}:pa?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return pa(e)}:la?function(e){return la(e)}:null});var gn=m((Yv,va)=>{"use strict";a();s();var S,Ec=fn(),Tc=Qt(),Rc=Xt(),Pc=en(),Ic=rn(),rr=Zr(),er=I(),Nc=tn(),Fc=Ei(),Cc=Ri(),Oc=Ii(),Lc=Fi(),Bc=Oi(),Uc=Bi(),qc=ki(),ga=Function,mn=function(t){try{return ga('"use strict"; return ('+t+").constructor;")()}catch(e){}},mr=yr(),$c=tt(),hn=function(){throw new er},kc=mr?function(){try{return arguments.callee,hn}catch(t){try{return mr(arguments,"callee").get}catch(e){return hn}}}():hn,Qe=Vi()(),C=da(),_c=cn(),Mc=ln(),xa=dn(),hr=nt(),Xe={},Dc=typeof Uint8Array=="undefined"||!C?S:C(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Qe&&C?C([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Xe,"%AsyncGenerator%":Xe,"%AsyncGeneratorFunction%":Xe,"%AsyncIteratorPrototype%":Xe,"%Atomics%":typeof Atomics=="undefined"?S:Atomics,"%BigInt%":typeof BigInt=="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Tc,"%eval%":eval,"%EvalError%":Rc,"%Float32Array%":typeof Float32Array=="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?S:FinalizationRegistry,"%Function%":ga,"%GeneratorFunction%":Xe,"%Int8Array%":typeof Int8Array=="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qe&&C?C(C([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map=="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Qe||!C?S:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ec,"%Object.getOwnPropertyDescriptor%":mr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?S:Promise,"%Proxy%":typeof Proxy=="undefined"?S:Proxy,"%RangeError%":Pc,"%ReferenceError%":Ic,"%Reflect%":typeof Reflect=="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Qe||!C?S:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qe&&C?C(""[Symbol.iterator]()):S,"%Symbol%":Qe?Symbol:S,"%SyntaxError%":rr,"%ThrowTypeError%":kc,"%TypedArray%":Dc,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?S:Uint32Array,"%URIError%":Nc,"%WeakMap%":typeof WeakMap=="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?S:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":xa,"%Object.defineProperty%":$c,"%Object.getPrototypeOf%":_c,"%Math.abs%":Fc,"%Math.floor%":Cc,"%Math.max%":Oc,"%Math.min%":Lc,"%Math.pow%":Bc,"%Math.round%":Uc,"%Math.sign%":qc,"%Reflect.getPrototypeOf%":Mc};if(C)try{null.error}catch(t){ya=C(C(t)),Ne["%Error.prototype%"]=ya}var ya,Wc=function t(e){var r;if(e==="%AsyncFunction%")r=mn("async function () {}");else if(e==="%GeneratorFunction%")r=mn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=mn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&C&&(r=C(o.prototype))}return Ne[e]=r,r},ma={__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"]},gr=Re(),ot=an(),jc=gr.call(hr,Array.prototype.concat),Gc=gr.call(xa,Array.prototype.splice),ha=gr.call(hr,String.prototype.replace),it=gr.call(hr,String.prototype.slice),zc=gr.call(hr,RegExp.prototype.exec),Vc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Yc=/\\(\\)?/g,Hc=function(e){var r=it(e,0,1),n=it(e,-1);if(r==="%"&&n!=="%")throw new rr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new rr("invalid intrinsic syntax, expected opening `%`");var o=[];return ha(e,Vc,function(i,u,p,c){o[o.length]=p?ha(c,Yc,"$1"):u||i}),o},Jc=function(e,r){var n=e,o;if(ot(ma,n)&&(o=ma[n],n="%"+o[0]+"%"),ot(Ne,n)){var i=Ne[n];if(i===Xe&&(i=Wc(n)),typeof i=="undefined"&&!r)throw new er("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new rr("intrinsic "+e+" does not exist!")};va.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new er('"allowMissing" argument must be a boolean');if(zc(/^%?[^%]*%?$/,e)===null)throw new rr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Hc(e),o=n.length>0?n[0]:"",i=Jc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],Gc(n,jc([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=it(v,0,1),T=it(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new rr("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",ot(Ne,u))p=Ne[u];else if(p!=null){if(!(v in p)){if(!r)throw new er("base intrinsic for "+e+" exists, but the property is not available.");return}if(mr&&h+1>=n.length){var R=mr(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=ot(p,v),p=p[v];g&&!c&&(Ne[u]=p)}}return p}});var xn=m((Kv,Aa)=>{"use strict";a();s();var wa=tt(),Kc=Zr(),tr=I(),ba=yr();Aa.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new tr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!ba&&ba(e,r);if(wa)wa(e,r,{configurable:u===null&&c?c.configurable:!u,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!u)e[r]=n;else throw new Kc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wn=m((Xv,Ea)=>{"use strict";a();s();var vn=tt(),Sa=function(){return!!vn};Sa.hasArrayLengthDefineBug=function(){if(!vn)return null;try{return vn([],"length",{value:1}).length!==1}catch(e){return!0}};Ea.exports=Sa});var Na=m((tw,Ia)=>{"use strict";a();s();var Zc=gn(),Ta=xn(),Qc=wn()(),Ra=yr(),Pa=I(),Xc=Zc("%Math.floor%");Ia.exports=function(e,r){if(typeof e!="function")throw new Pa("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Xc(r)!==r)throw new Pa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Ra){var u=Ra(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Qc?Ta(e,"length",r,!0,!0):Ta(e,"length",r)),e}});var Ca=m((iw,Fa)=>{"use strict";a();s();var ed=gn(),at=ed("%Object.defineProperty%",!0)||!1;if(at)try{at({},"a",{value:1})}catch(t){at=!1}Fa.exports=at});var ft=m((uw,st)=>{"use strict";a();s();var bn=Re(),ut=G(),rd=Na(),td=I(),Ba=ut("%Function.prototype.apply%"),Ua=ut("%Function.prototype.call%"),qa=ut("%Reflect.apply%",!0)||bn.call(Ua,Ba),Oa=Ca(),nd=ut("%Math.max%");st.exports=function(e){if(typeof e!="function")throw new td("a function is required");var r=qa(bn,Ua,arguments);return rd(r,1+nd(0,e.length-(arguments.length-1)),!0)};var La=function(){return qa(bn,Ba,arguments)};Oa?Oa(st.exports,"apply",{value:La}):st.exports.apply=La});var An=m((lw,ka)=>{"use strict";a();s();var $a=Object.prototype.toString;ka.exports=function(e){var r=$a.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&$a.call(e.callee)==="[object Function]"),n}});var Ya=m((yw,Va)=>{"use strict";a();s();var za;Object.keys||(xr=Object.prototype.hasOwnProperty,Sn=Object.prototype.toString,_a=An(),En=Object.prototype.propertyIsEnumerable,Ma=!En.call({toString:null},"toString"),Da=En.call(function(){},"prototype"),vr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],pt=function(t){var e=t.constructor;return e&&e.prototype===t},Wa={$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},ja=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Wa["$"+t]&&xr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{pt(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ga=function(t){if(typeof window=="undefined"||!ja)return pt(t);try{return pt(t)}catch(e){return!1}},za=function(e){var r=e!==null&&typeof e=="object",n=Sn.call(e)==="[object Function]",o=_a(e),i=r&&Sn.call(e)==="[object String]",u=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Da&&n;if(i&&e.length>0&&!xr.call(e,0))for(var c=0;c<e.length;++c)u.push(String(c));if(o&&e.length>0)for(var y=0;y<e.length;++y)u.push(String(y));else for(var h in e)!(p&&h==="prototype")&&xr.call(e,h)&&u.push(String(h));if(Ma)for(var g=Ga(e),v=0;v<vr.length;++v)!(g&&vr[v]==="constructor")&&xr.call(e,vr[v])&&u.push(vr[v]);return u});var xr,Sn,_a,En,Ma,Da,vr,pt,Wa,ja,Ga;Va.exports=za});var Za=m((gw,Ka)=>{"use strict";a();s();var od=Array.prototype.slice,id=An(),Ha=Object.keys,lt=Ha?function(e){return Ha(e)}:Ya(),Ja=Object.keys;lt.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 id(n)?Ja(od.call(n)):Ja(n)})}else Object.keys=lt;return Object.keys||lt};Ka.exports=lt});var wr=m((ww,rs)=>{"use strict";a();s();var ad=Za(),sd=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ud=Object.prototype.toString,fd=Array.prototype.concat,Qa=xn(),pd=function(t){return typeof t=="function"&&ud.call(t)==="[object Function]"},Xa=wn()(),ld=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!pd(n)||!n())return}Xa?Qa(t,e,r,!0):Qa(t,e,r)},es=function(t,e){var r=arguments.length>2?arguments[2]:{},n=ad(e);sd&&(n=fd.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)ld(t,n[o],e[n[o]],r[n[o]])};es.supportsDescriptors=!!Xa;rs.exports=es});var M=m((Sw,os)=>{"use strict";a();s();var ts=G(),ns=ft(),cd=ns(ts("String.prototype.indexOf"));os.exports=function(e,r){var n=ts(e,!!r);return typeof n=="function"&&cd(e,".prototype.")>-1?ns(n):n}});var ss=m((Rw,as)=>{"use strict";a();s();var dd=G(),is=dd("%Array%"),yd=!is.isArray&&M()("Object.prototype.toString");as.exports=is.isArray||function(e){return yd(e)==="[object Array]"}});var Tn=m((Nw,us)=>{"use strict";a();s();us.exports=ss()});var ps=m((Ow,fs)=>{"use strict";a();s();var md=G(),hd=M(),gd=I(),xd=Tn(),vd=md("%Reflect.apply%",!0)||hd("Function.prototype.apply");fs.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!xd(n))throw new gd("Assertion failed: optional `argumentsList`, if provided, must be a List");return vd(e,r,n)}});function ls(){throw new Error("setTimeout has not been defined")}function cs(){throw new Error("clearTimeout has not been defined")}function ds(t){if(le===setTimeout)return setTimeout(t,0);if((le===ls||!le)&&setTimeout)return le=setTimeout,setTimeout(t,0);try{return le(t,0)}catch(e){try{return le.call(null,t,0)}catch(r){return le.call(this,t,0)}}}function wd(t){if(ce===clearTimeout)return clearTimeout(t);if((ce===cs||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(t);try{return ce(t)}catch(e){try{return ce.call(null,t)}catch(r){return ce.call(this,t)}}}function bd(){!or||!Fe||(or=!1,Fe.length?X=Fe.concat(X):ct=-1,X.length&&ys())}function ys(){if(!or){var t=ds(bd);or=!0;for(var e=X.length;e;){for(Fe=X,X=[];++ct<e;)Fe&&Fe[ct].run();ct=-1,e=X.length}Fe=null,or=!1,wd(t)}}function Ad(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];X.push(new ms(t,e)),X.length===1&&!or&&ds(ys)}function ms(t,e){this.fun=t,this.array=e}function Ce(){}function _d(t){throw new Error("process.binding is not supported")}function Md(){return"/"}function Dd(t){throw new Error("process.chdir is not supported")}function Wd(){return 0}function Gd(t){var e=jd.call(nr)*.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 Vd(){var t=new Date,e=t-zd;return e/1e3}var le,ce,X,or,Fe,ct,Sd,Ed,Td,Rd,Pd,Id,Nd,Fd,Cd,Od,Ld,Bd,Ud,qd,$d,kd,nr,jd,zd,Yd,br,hs=ze(()=>{"use strict";a();s();le=ls,ce=cs;typeof globalThis.setTimeout=="function"&&(le=setTimeout);typeof globalThis.clearTimeout=="function"&&(ce=clearTimeout);X=[],or=!1,ct=-1;ms.prototype.run=function(){this.fun.apply(null,this.array)};Sd="browser",Ed="browser",Td=!0,Rd={},Pd=[],Id="",Nd={},Fd={},Cd={};Od=Ce,Ld=Ce,Bd=Ce,Ud=Ce,qd=Ce,$d=Ce,kd=Ce;nr=globalThis.performance||{},jd=nr.now||nr.mozNow||nr.msNow||nr.oNow||nr.webkitNow||function(){return new Date().getTime()};zd=new Date;Yd={nextTick:Ad,title:Sd,browser:Td,env:Rd,argv:Pd,version:Id,versions:Nd,on:Od,addListener:Ld,once:Bd,off:Ud,removeListener:qd,removeAllListeners:$d,emit:kd,binding:_d,cwd:Md,chdir:Dd,umask:Wd,hrtime:Gd,platform:Ed,release:Fd,config:Cd,uptime:Vd},br=Yd});var Rn,Pn,gs=ze(()=>{"use strict";a();s();typeof Object.create=="function"?Rn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Rn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};Pn=Rn});var Ts={};Yt(Ts,{_extend:()=>qn,debuglog:()=>xs,default:()=>ny,deprecate:()=>On,format:()=>ht,inherits:()=>Pn,inspect:()=>V,isArray:()=>Ln,isBoolean:()=>gt,isBuffer:()=>As,isDate:()=>mt,isError:()=>Sr,isFunction:()=>Er,isNull:()=>Tr,isNullOrUndefined:()=>vs,isNumber:()=>Bn,isObject:()=>Oe,isPrimitive:()=>bs,isRegExp:()=>Ar,isString:()=>Rr,isSymbol:()=>ws,isUndefined:()=>z,log:()=>Ss});function ht(t){if(!Rr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(V(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Hd,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}}),u=n[r];r<o;u=n[++r])Tr(u)||!Oe(u)?i+=" "+u:i+=" "+V(u);return i}function On(t,e){if(z(globalThis.process))return function(){return On(t,e).apply(this,arguments)};if(br.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(br.throwDeprecation)throw new Error(e);br.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function xs(t){if(z(In)&&(In=br.env.NODE_DEBUG||""),t=t.toUpperCase(),!dt[t])if(new RegExp("\\b"+t+"\\b","i").test(In)){var e=0;dt[t]=function(){var r=ht.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else dt[t]=function(){};return dt[t]}function V(t,e){var r={seen:[],stylize:Kd};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),gt(e)?r.showHidden=e:e&&qn(r,e),z(r.showHidden)&&(r.showHidden=!1),z(r.depth)&&(r.depth=2),z(r.colors)&&(r.colors=!1),z(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Jd),yt(r,t,r.depth)}function Jd(t,e){var r=V.styles[e];return r?"\x1B["+V.colors[r][0]+"m"+t+"\x1B["+V.colors[r][1]+"m":t}function Kd(t,e){return t}function Zd(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function yt(t,e,r){if(t.customInspect&&e&&Er(e.inspect)&&e.inspect!==V&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return Rr(n)||(n=yt(t,n,r)),n}var o=Qd(t,e);if(o)return o;var i=Object.keys(e),u=Zd(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),Sr(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Nn(e);if(i.length===0){if(Er(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(Ar(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(mt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Sr(e))return Nn(e)}var c="",y=!1,h=["{","}"];if(Ln(e)&&(y=!0,h=["[","]"]),Er(e)){var g=e.name?": "+e.name:"";c=" [Function"+g+"]"}if(Ar(e)&&(c=" "+RegExp.prototype.toString.call(e)),mt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),Sr(e)&&(c=" "+Nn(e)),i.length===0&&(!y||e.length==0))return h[0]+c+h[1];if(r<0)return Ar(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var v;return y?v=Xd(t,e,r,u,i):v=i.map(function(b){return Cn(t,e,r,u,b,y)}),t.seen.pop(),ey(v,c,h)}function Qd(t,e){if(z(e))return t.stylize("undefined","undefined");if(Rr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Bn(e))return t.stylize(""+e,"number");if(gt(e))return t.stylize(""+e,"boolean");if(Tr(e))return t.stylize("null","null")}function Nn(t){return"["+Error.prototype.toString.call(t)+"]"}function Xd(t,e,r,n,o){for(var i=[],u=0,p=e.length;u<p;++u)Es(e,String(u))?i.push(Cn(t,e,r,n,String(u),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(Cn(t,e,r,n,c,!0))}),i}function Cn(t,e,r,n,o,i){var u,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")),Es(n,o)||(u="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(Tr(r)?p=yt(t,c.value,null):p=yt(t,c.value,r-1),p.indexOf(`
|
|
2
2
|
`)>-1&&(i?p=p.split(`
|
|
3
3
|
`).map(function(y){return" "+y}).join(`
|
|
4
4
|
`).substr(2):p=`
|
|
5
5
|
`+p.split(`
|
|
6
6
|
`).map(function(y){return" "+y}).join(`
|
|
7
|
-
`))):p=t.stylize("[Circular]","special")),z(u)){if(i&&o.match(/^\d+$/))return p;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+p}function
|
|
7
|
+
`))):p=t.stylize("[Circular]","special")),z(u)){if(i&&o.match(/^\d+$/))return p;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+p}function ey(t,e,r){var n=0,o=t.reduce(function(i,u){return n++,u.indexOf(`
|
|
8
8
|
`)>=0&&n++,i+u.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 Ln(t){return Array.isArray(t)}function ht(t){return typeof t=="boolean"}function Er(t){return t===null}function vs(t){return t==null}function Bn(t){return typeof t=="number"}function Tr(t){return typeof t=="string"}function ws(t){return typeof t=="symbol"}function z(t){return t===void 0}function br(t){return Ce(t)&&Un(t)==="[object RegExp]"}function Ce(t){return typeof t=="object"&&t!==null}function yt(t){return Ce(t)&&Un(t)==="[object Date]"}function Ar(t){return Ce(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Sr(t){return typeof t=="function"}function bs(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function As(t){return f.isBuffer(t)}function Un(t){return Object.prototype.toString.call(t)}function Fn(t){return t<10?"0"+t.toString(10):t.toString(10)}function ry(){var t=new Date,e=[Fn(t.getHours()),Fn(t.getMinutes()),Fn(t.getSeconds())].join(":");return[t.getDate(),ey[t.getMonth()],e].join(" ")}function Ss(){console.log("%s - %s",ry(),mt.apply(null,arguments))}function qn(t,e){if(!e||!Ce(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function Es(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Yd,ct,In,ey,ty,Rs=Ge(()=>{"use strict";a();s();hs();gs();Yd=/%[sdj%]/g;ct={};V.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]};V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};ey=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ty={inherits:Pn,_extend:qn,log:Ss,isBuffer:As,isPrimitive:bs,isFunction:Sr,isError:Ar,isDate:yt,isObject:Ce,isRegExp:br,isUndefined:z,isSymbol:ws,isString:Tr,isNumber:Bn,isNullOrUndefined:vs,isNull:Er,isBoolean:ht,isArray:Ln,inspect:V,deprecate:On,format:mt,debuglog:xs}});var Ps=m((Gw,gt)=>{"use strict";a();s();var Oe=(Rs(),No(Ts));if(Oe&&Oe.default){gt.exports=Oe.default;for(let t in Oe)gt.exports[t]=Oe[t]}else Oe&&(gt.exports=Oe)});var Ns=m((Yw,Is)=>{"use strict";a();s();Is.exports=Ps().inspect});var Nr=m((Kw,Js)=>{"use strict";a();s();var Vn=typeof Map=="function"&&Map.prototype,$n=Object.getOwnPropertyDescriptor&&Vn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,vt=Vn&&$n&&typeof $n.get=="function"?$n.get:null,Fs=Vn&&Map.prototype.forEach,Yn=typeof Set=="function"&&Set.prototype,kn=Object.getOwnPropertyDescriptor&&Yn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,wt=Yn&&kn&&typeof kn.get=="function"?kn.get:null,Cs=Yn&&Set.prototype.forEach,ny=typeof WeakMap=="function"&&WeakMap.prototype,Pr=ny?WeakMap.prototype.has:null,oy=typeof WeakSet=="function"&&WeakSet.prototype,Ir=oy?WeakSet.prototype.has:null,iy=typeof WeakRef=="function"&&WeakRef.prototype,Os=iy?WeakRef.prototype.deref:null,ay=Boolean.prototype.valueOf,sy=Object.prototype.toString,uy=Function.prototype.toString,fy=String.prototype.match,Hn=String.prototype.slice,de=String.prototype.replace,py=String.prototype.toUpperCase,Ls=String.prototype.toLowerCase,Ws=RegExp.prototype.test,Bs=Array.prototype.concat,Y=Array.prototype.join,ly=Array.prototype.slice,Us=Math.floor,Dn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_n=Object.getOwnPropertySymbols,Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,or=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===or||!0)?Symbol.toStringTag:null,js=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ws.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Us(-t):Us(t);if(n!==t){var o=String(n),i=Hn.call(e,o.length+1);return de.call(o,r,"$&_")+"."+de.call(de.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,r,"$&_")}var jn=Ns(),ks=jn.custom,_s=Vs(ks)?ks:null,Gs={__proto__:null,double:'"',single:"'"},cy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Js.exports=function t(e,r,n,o){var i=r||{};if(ee(i,"quoteStyle")&&!ee(Gs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ee(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 u=ee(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ee(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(ee(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 Hs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?$s(e,c):c}if(typeof e=="bigint"){var y=String(e)+"n";return p?$s(e,y):y}var h=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return Gn(e)?"[Array]":"[Object]";var g=Fy(i,n);if(typeof o=="undefined")o=[];else if(Ys(o,e)>=0)return"[Circular]";function v(De,Dr,Pp){if(Dr&&(o=ly.call(o),o.push(Dr)),Pp){var Eo={depth:i.depth};return ee(i,"quoteStyle")&&(Eo.quoteStyle=i.quoteStyle),t(De,Eo,n+1,o)}return t(De,i,n+1,o)}if(typeof e=="function"&&!Ms(e)){var b=by(e),T=xt(e,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(T.length>0?" { "+Y.call(T,", ")+" }":"")}if(Vs(e)){var R=or?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wn.call(e);return typeof e=="object"&&!or?Rr(R):R}if(Py(e)){for(var U="<"+Ls.call(String(e.nodeName)),$=e.attributes||[],K=0;K<$.length;K++)U+=" "+$[K].name+"="+zs(dy($[K].value),"double",i);return U+=">",e.childNodes&&e.childNodes.length&&(U+="..."),U+="</"+Ls.call(String(e.nodeName))+">",U}if(Gn(e)){if(e.length===0)return"[]";var be=xt(e,v);return g&&!Ny(be)?"["+zn(be,g)+"]":"[ "+Y.call(be,", ")+" ]"}if(my(e)){var pr=xt(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!js.call(e,"cause")?"{ ["+String(e)+"] "+Y.call(Bs.call("[cause]: "+v(e.cause),pr),", ")+" }":pr.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Y.call(pr,", ")+" }"}if(typeof e=="object"&&u){if(_s&&typeof e[_s]=="function"&&jn)return jn(e,{depth:h-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ay(e)){var Mr=[];return Fs&&Fs.call(e,function(De,Dr){Mr.push(v(Dr,e,!0)+" => "+v(De,e))}),Ds("Map",vt.call(e),Mr,g)}if(Ty(e)){var bo=[];return Cs&&Cs.call(e,function(De){bo.push(v(De,e))}),Ds("Set",wt.call(e),bo,g)}if(Sy(e))return Mn("WeakMap");if(Ry(e))return Mn("WeakSet");if(Ey(e))return Mn("WeakRef");if(gy(e))return Rr(v(Number(e)));if(vy(e))return Rr(v(Dn.call(e)));if(xy(e))return Rr(ay.call(e));if(hy(e))return Rr(v(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(!yy(e)&&!Ms(e)){var Wt=xt(e,v),Ao=qs?qs(e)===Object.prototype:e instanceof Object||e.constructor===Object,jt=e instanceof Object?"":"null prototype",So=!Ao&&O&&Object(e)===e&&O in e?Hn.call(ye(e),8,-1):jt?"Object":"",Rp=Ao||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Gt=Rp+(So||jt?"["+Y.call(Bs.call([],So||[],jt||[]),": ")+"] ":"");return Wt.length===0?Gt+"{}":g?Gt+"{"+zn(Wt,g)+"}":Gt+"{ "+Y.call(Wt,", ")+" }"}return String(e)};function zs(t,e,r){var n=r.quoteStyle||e,o=Gs[n];return o+t+o}function dy(t){return de.call(String(t),/"/g,""")}function Gn(t){return ye(t)==="[object Array]"&&(!O||!(typeof t=="object"&&O in t))}function yy(t){return ye(t)==="[object Date]"&&(!O||!(typeof t=="object"&&O in t))}function Ms(t){return ye(t)==="[object RegExp]"&&(!O||!(typeof t=="object"&&O in t))}function my(t){return ye(t)==="[object Error]"&&(!O||!(typeof t=="object"&&O in t))}function hy(t){return ye(t)==="[object String]"&&(!O||!(typeof t=="object"&&O in t))}function gy(t){return ye(t)==="[object Number]"&&(!O||!(typeof t=="object"&&O in t))}function xy(t){return ye(t)==="[object Boolean]"&&(!O||!(typeof t=="object"&&O in t))}function Vs(t){if(or)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Wn)return!1;try{return Wn.call(t),!0}catch(e){}return!1}function vy(t){if(!t||typeof t!="object"||!Dn)return!1;try{return Dn.call(t),!0}catch(e){}return!1}var wy=Object.prototype.hasOwnProperty||function(t){return t in this};function ee(t,e){return wy.call(t,e)}function ye(t){return sy.call(t)}function by(t){if(t.name)return t.name;var e=fy.call(uy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ys(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 Ay(t){if(!vt||!t||typeof t!="object")return!1;try{vt.call(t);try{wt.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function Sy(t){if(!Pr||!t||typeof t!="object")return!1;try{Pr.call(t,Pr);try{Ir.call(t,Ir)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function Ey(t){if(!Os||!t||typeof t!="object")return!1;try{return Os.call(t),!0}catch(e){}return!1}function Ty(t){if(!wt||!t||typeof t!="object")return!1;try{wt.call(t);try{vt.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function Ry(t){if(!Ir||!t||typeof t!="object")return!1;try{Ir.call(t,Ir);try{Pr.call(t,Pr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function Py(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Hs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Hs(Hn.call(t,0,e.maxStringLength),e)+n}var o=cy[e.quoteStyle||"single"];o.lastIndex=0;var i=de.call(de.call(t,o,"\\$1"),/[\x00-\x1f]/g,Iy);return zs(i,"single",e)}function Iy(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":"")+py.call(e.toString(16))}function Rr(t){return"Object("+t+")"}function Mn(t){return t+" { ? }"}function Ds(t,e,r,n){var o=n?zn(r,n):Y.call(r,", ");return t+" ("+e+") {"+o+"}"}function Ny(t){for(var e=0;e<t.length;e++)if(Ys(t[e],`
|
|
11
|
-
`)>=0)return!1;return!0}function
|
|
10
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function Ln(t){return Array.isArray(t)}function gt(t){return typeof t=="boolean"}function Tr(t){return t===null}function vs(t){return t==null}function Bn(t){return typeof t=="number"}function Rr(t){return typeof t=="string"}function ws(t){return typeof t=="symbol"}function z(t){return t===void 0}function Ar(t){return Oe(t)&&Un(t)==="[object RegExp]"}function Oe(t){return typeof t=="object"&&t!==null}function mt(t){return Oe(t)&&Un(t)==="[object Date]"}function Sr(t){return Oe(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Er(t){return typeof t=="function"}function bs(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function As(t){return f.isBuffer(t)}function Un(t){return Object.prototype.toString.call(t)}function Fn(t){return t<10?"0"+t.toString(10):t.toString(10)}function ty(){var t=new Date,e=[Fn(t.getHours()),Fn(t.getMinutes()),Fn(t.getSeconds())].join(":");return[t.getDate(),ry[t.getMonth()],e].join(" ")}function Ss(){console.log("%s - %s",ty(),ht.apply(null,arguments))}function qn(t,e){if(!e||!Oe(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function Es(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Hd,dt,In,ry,ny,Rs=ze(()=>{"use strict";a();s();hs();gs();Hd=/%[sdj%]/g;dt={};V.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]};V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};ry=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ny={inherits:Pn,_extend:qn,log:Ss,isBuffer:As,isPrimitive:bs,isFunction:Er,isError:Sr,isDate:mt,isObject:Oe,isRegExp:Ar,isUndefined:z,isSymbol:ws,isString:Rr,isNumber:Bn,isNullOrUndefined:vs,isNull:Tr,isBoolean:gt,isArray:Ln,inspect:V,deprecate:On,format:ht,debuglog:xs}});var Ps=m((zw,xt)=>{"use strict";a();s();var Le=(Rs(),No(Ts));if(Le&&Le.default){xt.exports=Le.default;for(let t in Le)xt.exports[t]=Le[t]}else Le&&(xt.exports=Le)});var Ns=m((Hw,Is)=>{"use strict";a();s();Is.exports=Ps().inspect});var Fr=m((Zw,Js)=>{"use strict";a();s();var Vn=typeof Map=="function"&&Map.prototype,$n=Object.getOwnPropertyDescriptor&&Vn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wt=Vn&&$n&&typeof $n.get=="function"?$n.get:null,Fs=Vn&&Map.prototype.forEach,Yn=typeof Set=="function"&&Set.prototype,kn=Object.getOwnPropertyDescriptor&&Yn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bt=Yn&&kn&&typeof kn.get=="function"?kn.get:null,Cs=Yn&&Set.prototype.forEach,oy=typeof WeakMap=="function"&&WeakMap.prototype,Ir=oy?WeakMap.prototype.has:null,iy=typeof WeakSet=="function"&&WeakSet.prototype,Nr=iy?WeakSet.prototype.has:null,ay=typeof WeakRef=="function"&&WeakRef.prototype,Os=ay?WeakRef.prototype.deref:null,sy=Boolean.prototype.valueOf,uy=Object.prototype.toString,fy=Function.prototype.toString,py=String.prototype.match,Hn=String.prototype.slice,de=String.prototype.replace,ly=String.prototype.toUpperCase,Ls=String.prototype.toLowerCase,Ws=RegExp.prototype.test,Bs=Array.prototype.concat,Y=Array.prototype.join,cy=Array.prototype.slice,Us=Math.floor,Dn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_n=Object.getOwnPropertySymbols,Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ir=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ir||!0)?Symbol.toStringTag:null,js=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ws.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Us(-t):Us(t);if(n!==t){var o=String(n),i=Hn.call(e,o.length+1);return de.call(o,r,"$&_")+"."+de.call(de.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,r,"$&_")}var jn=Ns(),ks=jn.custom,_s=Vs(ks)?ks:null,Gs={__proto__:null,double:'"',single:"'"},dy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Js.exports=function t(e,r,n,o){var i=r||{};if(ee(i,"quoteStyle")&&!ee(Gs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ee(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 u=ee(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ee(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(ee(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 Hs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?$s(e,c):c}if(typeof e=="bigint"){var y=String(e)+"n";return p?$s(e,y):y}var h=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return Gn(e)?"[Array]":"[Object]";var g=Cy(i,n);if(typeof o=="undefined")o=[];else if(Ys(o,e)>=0)return"[Circular]";function v(We,Wr,Ip){if(Wr&&(o=cy.call(o),o.push(Wr)),Ip){var Eo={depth:i.depth};return ee(i,"quoteStyle")&&(Eo.quoteStyle=i.quoteStyle),t(We,Eo,n+1,o)}return t(We,i,n+1,o)}if(typeof e=="function"&&!Ms(e)){var b=Ay(e),T=vt(e,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(T.length>0?" { "+Y.call(T,", ")+" }":"")}if(Vs(e)){var R=ir?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wn.call(e);return typeof e=="object"&&!ir?Pr(R):R}if(Iy(e)){for(var U="<"+Ls.call(String(e.nodeName)),$=e.attributes||[],K=0;K<$.length;K++)U+=" "+$[K].name+"="+zs(yy($[K].value),"double",i);return U+=">",e.childNodes&&e.childNodes.length&&(U+="..."),U+="</"+Ls.call(String(e.nodeName))+">",U}if(Gn(e)){if(e.length===0)return"[]";var Ae=vt(e,v);return g&&!Fy(Ae)?"["+zn(Ae,g)+"]":"[ "+Y.call(Ae,", ")+" ]"}if(hy(e)){var lr=vt(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!js.call(e,"cause")?"{ ["+String(e)+"] "+Y.call(Bs.call("[cause]: "+v(e.cause),lr),", ")+" }":lr.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Y.call(lr,", ")+" }"}if(typeof e=="object"&&u){if(_s&&typeof e[_s]=="function"&&jn)return jn(e,{depth:h-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Sy(e)){var Dr=[];return Fs&&Fs.call(e,function(We,Wr){Dr.push(v(Wr,e,!0)+" => "+v(We,e))}),Ds("Map",wt.call(e),Dr,g)}if(Ry(e)){var bo=[];return Cs&&Cs.call(e,function(We){bo.push(v(We,e))}),Ds("Set",bt.call(e),bo,g)}if(Ey(e))return Mn("WeakMap");if(Py(e))return Mn("WeakSet");if(Ty(e))return Mn("WeakRef");if(xy(e))return Pr(v(Number(e)));if(wy(e))return Pr(v(Dn.call(e)));if(vy(e))return Pr(sy.call(e));if(gy(e))return Pr(v(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(!my(e)&&!Ms(e)){var Wt=vt(e,v),Ao=qs?qs(e)===Object.prototype:e instanceof Object||e.constructor===Object,jt=e instanceof Object?"":"null prototype",So=!Ao&&O&&Object(e)===e&&O in e?Hn.call(ye(e),8,-1):jt?"Object":"",Pp=Ao||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Gt=Pp+(So||jt?"["+Y.call(Bs.call([],So||[],jt||[]),": ")+"] ":"");return Wt.length===0?Gt+"{}":g?Gt+"{"+zn(Wt,g)+"}":Gt+"{ "+Y.call(Wt,", ")+" }"}return String(e)};function zs(t,e,r){var n=r.quoteStyle||e,o=Gs[n];return o+t+o}function yy(t){return de.call(String(t),/"/g,""")}function Gn(t){return ye(t)==="[object Array]"&&(!O||!(typeof t=="object"&&O in t))}function my(t){return ye(t)==="[object Date]"&&(!O||!(typeof t=="object"&&O in t))}function Ms(t){return ye(t)==="[object RegExp]"&&(!O||!(typeof t=="object"&&O in t))}function hy(t){return ye(t)==="[object Error]"&&(!O||!(typeof t=="object"&&O in t))}function gy(t){return ye(t)==="[object String]"&&(!O||!(typeof t=="object"&&O in t))}function xy(t){return ye(t)==="[object Number]"&&(!O||!(typeof t=="object"&&O in t))}function vy(t){return ye(t)==="[object Boolean]"&&(!O||!(typeof t=="object"&&O in t))}function Vs(t){if(ir)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Wn)return!1;try{return Wn.call(t),!0}catch(e){}return!1}function wy(t){if(!t||typeof t!="object"||!Dn)return!1;try{return Dn.call(t),!0}catch(e){}return!1}var by=Object.prototype.hasOwnProperty||function(t){return t in this};function ee(t,e){return by.call(t,e)}function ye(t){return uy.call(t)}function Ay(t){if(t.name)return t.name;var e=py.call(fy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ys(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 Sy(t){if(!wt||!t||typeof t!="object")return!1;try{wt.call(t);try{bt.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function Ey(t){if(!Ir||!t||typeof t!="object")return!1;try{Ir.call(t,Ir);try{Nr.call(t,Nr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function Ty(t){if(!Os||!t||typeof t!="object")return!1;try{return Os.call(t),!0}catch(e){}return!1}function Ry(t){if(!bt||!t||typeof t!="object")return!1;try{bt.call(t);try{wt.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function Py(t){if(!Nr||!t||typeof t!="object")return!1;try{Nr.call(t,Nr);try{Ir.call(t,Ir)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function Iy(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Hs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Hs(Hn.call(t,0,e.maxStringLength),e)+n}var o=dy[e.quoteStyle||"single"];o.lastIndex=0;var i=de.call(de.call(t,o,"\\$1"),/[\x00-\x1f]/g,Ny);return zs(i,"single",e)}function Ny(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":"")+ly.call(e.toString(16))}function Pr(t){return"Object("+t+")"}function Mn(t){return t+" { ? }"}function Ds(t,e,r,n){var o=n?zn(r,n):Y.call(r,", ");return t+" ("+e+") {"+o+"}"}function Fy(t){for(var e=0;e<t.length;e++)if(Ys(t[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function Cy(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Y.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Y.call(Array(e+1),r)}}function zn(t,e){if(t.length===0)return"";var r=`
|
|
12
12
|
`+e.prev+e.base;return r+Y.call(t,","+r)+`
|
|
13
|
-
`+e.prev}function xt(t,e){var r=Gn(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ee(t,o)?e(t[o],t):""}var i=typeof _n=="function"?_n(t):[],u;if(or){u={};for(var p=0;p<i.length;p++)u["$"+i[p]]=i[p]}for(var c in t)ee(t,c)&&(r&&String(Number(c))===c&&c<t.length||or&&u["$"+c]instanceof Symbol||(Ws.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof _n=="function")for(var y=0;y<i.length;y++)js.call(t,i[y])&&n.push("["+e(i[y])+"]: "+e(t[i[y]],t));return n}});var bt=m((Xw,Ks)=>{"use strict";a();s();Ks.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Qs=m((tb,Zs)=>{"use strict";a();s();var Cy=I(),Oy=Nr(),Ly=bt();Zs.exports=function(e,r){if(!Ly(r))throw new Cy("Assertion failed: IsPropertyKey(P) is not true, got "+Oy(r));return e[r]}});var tu=m((ib,ru)=>{"use strict";a();s();var eu=Function.prototype.toString,ir=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kn,At;if(typeof ir=="function"&&typeof Object.defineProperty=="function")try{Kn=Object.defineProperty({},"length",{get:function(){throw At}}),At={},ir(function(){throw 42},null,Kn)}catch(t){t!==At&&(ir=null)}else ir=null;var By=/^\s*class\b/,Zn=function(e){try{var r=eu.call(e);return By.test(r)}catch(n){return!1}},Jn=function(e){try{return Zn(e)?!1:(eu.call(e),!0)}catch(r){return!1}},St=Object.prototype.toString,Uy="[object Object]",qy="[object Function]",$y="[object GeneratorFunction]",ky="[object HTMLAllCollection]",_y="[object HTML document.all class]",My="[object HTMLCollection]",Dy=typeof Symbol=="function"&&!!Symbol.toStringTag,Wy=!(0 in[,]),Qn=function(){return!1};typeof document=="object"&&(Xs=document.all,St.call(Xs)===St.call(document.all)&&(Qn=function(e){if((Wy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=St.call(e);return(r===ky||r===_y||r===My||r===Uy)&&e("")==null}catch(n){}return!1}));var Xs;ru.exports=ir?function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ir(e,null,Kn)}catch(r){if(r!==At)return!1}return!Zn(e)&&Jn(e)}:function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Dy)return Jn(e);if(Zn(e))return!1;var r=St.call(e);return r!==qy&&r!==$y&&!/^\[object HTML/.test(r)?!1:Jn(e)}});var Xn=m((ub,nu)=>{"use strict";a();s();nu.exports=tu()});var su=m((lb,au)=>{"use strict";a();s();var ou=I(),jy=Qs(),Gy=Xn(),zy=bt(),iu=Nr();au.exports=function(e,r){if(!zy(r))throw new ou("Assertion failed: IsPropertyKey(P) is not true");var n=jy(e,r);if(n!=null){if(!Gy(n))throw new ou(iu(r)+" is not a function: "+iu(n));return n}}});var fu=m((yb,uu)=>{"use strict";a();s();var Vy=pn();uu.exports=function(){return Vy()&&!!Symbol.toStringTag}});var no=m((gb,du)=>{"use strict";a();s();var eo=M(),pu=fu()(),lu,cu,ro,to;pu&&(lu=eo("Object.prototype.hasOwnProperty"),cu=eo("RegExp.prototype.exec"),ro={},Et=function(){throw ro},to={toString:Et,valueOf:Et},typeof Symbol.toPrimitive=="symbol"&&(to[Symbol.toPrimitive]=Et));var Et,Yy=eo("Object.prototype.toString"),Hy=Object.getOwnPropertyDescriptor,Jy="[object RegExp]";du.exports=pu?function(e){if(!e||typeof e!="object")return!1;var r=Hy(e,"lastIndex"),n=r&&lu(r,"value");if(!n)return!1;try{cu(e,to)}catch(o){return o===ro}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Yy(e)===Jy}});var oo=m((wb,yu)=>{"use strict";a();s();var Ky=M(),Zy=no(),Qy=Ky("RegExp.prototype.exec"),Xy=I();yu.exports=function(e){if(!Zy(e))throw new Xy("`regex` must be a RegExp");return function(n){return Qy(e,n)!==null}}});var hu=m((Sb,mu)=>{"use strict";a();s();mu.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var xu=m((Rb,gu)=>{"use strict";a();s();gu.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 io=m((Nb,vu)=>{"use strict";a();s();var em=xu();vu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":em(e)}});var Au=m((Ob,bu)=>{"use strict";a();s();var wu=I(),rm=Nr(),tm=bt(),nm=io();bu.exports=function(e,r){if(nm(e)!=="Object")throw new wu("Assertion failed: Type(O) is not Object");if(!tm(r))throw new wu("Assertion failed: IsPropertyKey(P) is not true, got "+rm(r));return e[r]}});var Eu=m((Ub,Su)=>{"use strict";a();s();var om=G();Su.exports=om("%Math.min%")});var ao=m((kb,Tu)=>{"use strict";a();s();Tu.exports=Number.isNaN||function(e){return e!==e}});var Pu=m((Db,Ru)=>{"use strict";a();s();var im=ao();Ru.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!im(t)&&t!==1/0&&t!==-1/0}});var Tt=m((Gb,Nu)=>{"use strict";a();s();var Iu=G(),am=Iu("%Math.abs%"),sm=Iu("%Math.floor%"),um=ao(),fm=Pu();Nu.exports=function(e){if(typeof e!="number"||um(e)||!fm(e))return!1;var r=am(e);return sm(r)===r}});var uo=m((Yb,Fu)=>{"use strict";a();s();var pm=M(),so=I(),lm=Tt(),cm=pm("String.prototype.slice");Fu.exports=function(e,r,n){if(typeof e!="string")throw new so("Assertion failed: `string` must be a String");if(typeof r!="string")throw new so("Assertion failed: `searchValue` must be a String");if(!lm(n)||n<0)throw new so("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,u=n;u<=o-i;u+=1){var p=cm(e,u,u+i);if(p===r)return u}return-1}});var Rt=m((Kb,Cu)=>{"use strict";a();s();var dm=I();Cu.exports=function(e){if(e==null)throw new dm(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var Pt=m((Xb,Ou)=>{"use strict";a();s();var ym=G(),mm=ym("%String%"),hm=I();Ou.exports=function(e){if(typeof e=="symbol")throw new hm("Cannot convert a Symbol value to a string");return mm(e)}});var fo=m((tA,Uu)=>{"use strict";a();s();var gm=Rt(),xm=Pt(),vm=M(),Lu=vm("String.prototype.replace"),Bu=/^\s$/.test("\u180E"),wm=Bu?/^[\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]+/,bm=Bu?/[\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]+$/;Uu.exports=function(){var e=xm(gm(this));return Lu(Lu(e,wm,""),bm,"")}});var po=m((iA,$u)=>{"use strict";a();s();var Am=fo(),qu="\u200B",ar="\u180E";$u.exports=function(){return String.prototype.trim&&qu.trim()===qu&&ar.trim()===ar&&("_"+ar).trim()==="_"+ar&&(ar+"_").trim()===ar+"_"?String.prototype.trim:Am}});var _u=m((uA,ku)=>{"use strict";a();s();var Sm=vr(),Em=po();ku.exports=function(){var e=Em();return Sm(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ju=m((lA,Wu)=>{"use strict";a();s();var Tm=ut(),Rm=vr(),Pm=Rt(),Im=fo(),Mu=po(),Nm=_u(),Fm=Tm(Mu()),Du=function(e){return Pm(e),Fm(e)};Rm(Du,{getPolyfill:Mu,implementation:Im,shim:Nm});Wu.exports=Du});var Yu=m((yA,Vu)=>{"use strict";a();s();var co=G(),lo=co("%Number%"),Cm=co("%RegExp%"),Om=I(),Gu=co("%parseInt%"),Lm=M(),It=oo(),zu=Lm("String.prototype.slice"),Bm=It(/^0b[01]+$/i),Um=It(/^0o[0-7]+$/i),qm=It(/^[-+]0x[0-9a-f]+$/i),$m=["\x85","\u200B","\uFFFE"].join(""),km=new Cm("["+$m+"]","g"),_m=It(km),Mm=ju();Vu.exports=function t(e){if(typeof e!="string")throw new Om("Assertion failed: `argument` is not a String");if(Bm(e))return lo(Gu(zu(e,2),2));if(Um(e))return lo(Gu(zu(e,2),8));if(_m(e)||qm(e))return NaN;var r=Mm(e);return r!==e?t(r):lo(e)}});var Ku=m((gA,Ju)=>{"use strict";a();s();var Dm=I(),Hu=Tt(),Wm=M(),jm=Wm("String.prototype.slice");Ju.exports=function(e,r,n){if(typeof e!="string"||!Hu(r)||arguments.length>2&&!Hu(n))throw new Dm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return jm(e,r,arguments.length>2?n:e.length)}});var Qu=m((wA,Zu)=>{"use strict";a();s();Zu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var ef=m((SA,Xu)=>{"use strict";a();s();var Gm=M()("String.prototype.slice");Xu.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Gm(r,0,e.length)===e}});var af=m((RA,of)=>{"use strict";a();s();var re=I(),nf=oo(),zm=hu(),yo=Nr(),Vm=Au(),Ym=Tn(),Hm=Eu(),Jm=uo(),rf=Yu(),te=Ku(),Km=Pt(),tf=io(),Zm=Tt(),Qm=Qu(),Fr=ef(),Xm=nf(/^\$[0-9]/),eh=nf(/^\$[0-9][0-9]/);of.exports=function(e,r,n,o,i,u){if(typeof e!="string")throw new re("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new re("Assertion failed: `str` must be a String");if(!Zm(n)||n<0)throw new re("Assertion failed: `position` must be a nonnegative integer, got "+yo(n));if(!Ym(o)||!zm(o,Qm))throw new re("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+yo(o));if(typeof i!="undefined"&&tf(i)!=="Object")throw new re("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new re("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new re("Assertion failed: position > stringLength, got "+yo(n));for(var c=u,y="";c!=="";){var h,g,v;if(Fr("$$",c))h="$$",g="$";else if(Fr("$`",c))h="$`",g=te(r,0,n);else if(Fr("$&",c))h="$&",g=e;else if(Fr("$'",c)){h="$'";var b=e.length,T=n+b;g=te(r,Hm(T,p))}else if(Xm(c)){var R=eh(c)?2:1,U=te(c,1,1+R),$=rf(U);if($<0||$>99)throw new re("Assertion failed: `index` must be >= 0 and <= 99");var K=o.length;$>K&&R===2&&(R=1,U=te(U,0,1),$=rf(U)),h=te(c,0,1+R),1<=$&&$<=K?(v=o[$-1],typeof v=="undefined"?g="":g=v):g=h}else if(Fr("$<",c)){var be=Jm(c,">",0);if(be===-1||typeof i=="undefined")h="$<",g=h;else{h=te(c,0,be+1);var pr=te(c,2,be);if(tf(i)!=="Object")throw new re("Assertion failed: Type(namedCaptures) is not Object");v=Vm(i,pr),typeof v=="undefined"?g="":g=Km(v)}}else h=te(c,0,1),g=h;var Mr=h.length;c=te(c,Mr),y+=g}return y}});var ho=m((NA,pf)=>{"use strict";a();s();var sf=ps(),rh=su(),th=af(),nh=Xn(),oh=Rt(),Nt=Pt(),uf=uo(),ih=G(),Ft=M(),ah=nn()(),sh=no(),uh=ih("%Math.max%"),ff=I(),fh=Ft("Array.prototype.push"),mo=Ft("String.prototype.slice"),ph=Ft("String.prototype.indexOf"),lh=Ft("String.prototype.replace");pf.exports=function(e,r){var n=oh(this),o=sh(e);if(o&&ph(mo(e,e.source.length+2),"g")===-1)throw new ff("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(ah&&Symbol.replace){if(e!=null){var i=rh(e,Symbol.replace);if(typeof i!="undefined")return sf(i,e,[n,r])}}else if(o)return lh(n,e,r);var u=Nt(n),p=Nt(e),c=nh(r);c||(r=Nt(r));for(var y=p.length,h=uh(1,y),g=[],v=uf(u,p,0);v!==-1;)fh(g,v),v=uf(u,p,v+h);for(var b=0,T="",R=0;R<g.length;R+=1){var U;if(c)U=Nt(sf(r,void 0,[p,g[R],u]));else{if(typeof r!="string")throw new ff("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=th(p,u,g[R],$,void 0,r)}var K=mo(u,b,g[R]);T+=K+U,b=g[R]+y}return b<u.length&&(T+=mo(u,b)),T}});var go=m((OA,lf)=>{"use strict";a();s();var ch=ho();lf.exports=function(){return String.prototype.replaceAll||ch}});var df=m((UA,cf)=>{"use strict";a();s();var dh=vr(),yh=go();cf.exports=function(){var e=yh();return dh(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var gf=m((kA,hf)=>{"use strict";a();s();var mh=ut(),hh=vr(),yf=ho(),gh=go(),xh=df(),mf=mh(yf);hh(mf,{getPolyfill:gh,implementation:yf,shim:xh});hf.exports=mf});var Ux={};Yt(Ux,{DynamicSnippetsGenerator:()=>Dt});module.exports=No(Ux);a();s();var nF=Bp(gf(),1);a();s();a();s();a();s();function P(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function Cr(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var vh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,xf=vh;var wh=typeof self=="object"&&self&&self.Object===Object&&self,bh=xf||wh||Function("return this")(),vf=bh;var Ah=vf.Symbol,ne=Ah;a();s();var wf=Object.prototype,Sh=wf.hasOwnProperty,Eh=wf.toString,Or=ne?ne.toStringTag:void 0;function Th(t){var e=Sh.call(t,Or),r=t[Or];try{t[Or]=void 0;var n=!0}catch(i){}var o=Eh.call(t);return n&&(e?t[Or]=r:delete t[Or]),o}var bf=Th;a();s();var Rh=Object.prototype,Ph=Rh.toString;function Ih(t){return Ph.call(t)}var Af=Ih;var Nh="[object Null]",Fh="[object Undefined]",Sf=ne?ne.toStringTag:void 0;function Ch(t){return t==null?t===void 0?Fh:Nh:Sf&&Sf in Object(t)?bf(t):Af(t)}var Ef=Ch;a();s();function Oh(t){return t!=null&&typeof t=="object"}var Tf=Oh;var Lh="[object Symbol]";function Bh(t){return typeof t=="symbol"||Tf(t)&&Ef(t)==Lh}var Rf=Bh;a();s();a();s();function Uh(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 Pf=Uh;a();s();var qh=Array.isArray,If=qh;var $h=1/0,Nf=ne?ne.prototype:void 0,Ff=Nf?Nf.toString:void 0;function Cf(t){if(typeof t=="string")return t;if(If(t))return Pf(t,Cf)+"";if(Rf(t))return Ff?Ff.call(t):"";var e=t+"";return e=="0"&&1/t==-$h?"-0":e}var Of=Cf;a();s();function kh(t){return t==null?"":Of(t)}var me=kh;a();s();a();s();a();s();a();s();a();s();a();s();function _h(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 Lf=_h;function Mh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Lf(t,e,r)}var Bf=Mh;a();s();var Dh="\\ud800-\\udfff",Wh="\\u0300-\\u036f",jh="\\ufe20-\\ufe2f",Gh="\\u20d0-\\u20ff",zh=Wh+jh+Gh,Vh="\\ufe0e\\ufe0f",Yh="\\u200d",Hh=RegExp("["+Yh+Dh+zh+Vh+"]");function Jh(t){return Hh.test(t)}var Ct=Jh;a();s();a();s();function Kh(t){return t.split("")}var Uf=Kh;a();s();var qf="\\ud800-\\udfff",Zh="\\u0300-\\u036f",Qh="\\ufe20-\\ufe2f",Xh="\\u20d0-\\u20ff",eg=Zh+Qh+Xh,rg="\\ufe0e\\ufe0f",tg="["+qf+"]",xo="["+eg+"]",vo="\\ud83c[\\udffb-\\udfff]",ng="(?:"+xo+"|"+vo+")",$f="[^"+qf+"]",kf="(?:\\ud83c[\\udde6-\\uddff]){2}",_f="[\\ud800-\\udbff][\\udc00-\\udfff]",og="\\u200d",Mf=ng+"?",Df="["+rg+"]?",ig="(?:"+og+"(?:"+[$f,kf,_f].join("|")+")"+Df+Mf+")*",ag=Df+Mf+ig,sg="(?:"+[$f+xo+"?",xo,kf,_f,tg].join("|")+")",ug=RegExp(vo+"(?="+vo+")|"+sg+ag,"g");function fg(t){return t.match(ug)||[]}var Wf=fg;function pg(t){return Ct(t)?Wf(t):Uf(t)}var jf=pg;function lg(t){return function(e){e=me(e);var r=Ct(e)?jf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Bf(r,1).join(""):e.slice(1);return n[t]()+o}}var Gf=lg;var cg=Gf("toUpperCase"),sr=cg;function dg(t){return sr(me(t).toLowerCase())}var zf=dg;a();s();a();s();function yg(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 Vf=yg;a();s();a();s();a();s();function mg(t){return function(e){return t==null?void 0:t[e]}}var Yf=mg;var hg={\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"},gg=Yf(hg),Hf=gg;var xg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vg="\\u0300-\\u036f",wg="\\ufe20-\\ufe2f",bg="\\u20d0-\\u20ff",Ag=vg+wg+bg,Sg="["+Ag+"]",Eg=RegExp(Sg,"g");function Tg(t){return t=me(t),t&&t.replace(xg,Hf).replace(Eg,"")}var Jf=Tg;a();s();a();s();var Rg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Pg(t){return t.match(Rg)||[]}var Kf=Pg;a();s();var Ig=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ng(t){return Ig.test(t)}var Zf=Ng;a();s();var tp="\\ud800-\\udfff",Fg="\\u0300-\\u036f",Cg="\\ufe20-\\ufe2f",Og="\\u20d0-\\u20ff",Lg=Fg+Cg+Og,np="\\u2700-\\u27bf",op="a-z\\xdf-\\xf6\\xf8-\\xff",Bg="\\xac\\xb1\\xd7\\xf7",Ug="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qg="\\u2000-\\u206f",$g=" \\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",ip="A-Z\\xc0-\\xd6\\xd8-\\xde",kg="\\ufe0e\\ufe0f",ap=Bg+Ug+qg+$g,sp="['\u2019]",Qf="["+ap+"]",_g="["+Lg+"]",up="\\d+",Mg="["+np+"]",fp="["+op+"]",pp="[^"+tp+ap+up+np+op+ip+"]",Dg="\\ud83c[\\udffb-\\udfff]",Wg="(?:"+_g+"|"+Dg+")",jg="[^"+tp+"]",lp="(?:\\ud83c[\\udde6-\\uddff]){2}",cp="[\\ud800-\\udbff][\\udc00-\\udfff]",ur="["+ip+"]",Gg="\\u200d",Xf="(?:"+fp+"|"+pp+")",zg="(?:"+ur+"|"+pp+")",ep="(?:"+sp+"(?:d|ll|m|re|s|t|ve))?",rp="(?:"+sp+"(?:D|LL|M|RE|S|T|VE))?",dp=Wg+"?",yp="["+kg+"]?",Vg="(?:"+Gg+"(?:"+[jg,lp,cp].join("|")+")"+yp+dp+")*",Yg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jg=yp+dp+Vg,Kg="(?:"+[Mg,lp,cp].join("|")+")"+Jg,Zg=RegExp([ur+"?"+fp+"+"+ep+"(?="+[Qf,ur,"$"].join("|")+")",zg+"+"+rp+"(?="+[Qf,ur+Xf,"$"].join("|")+")",ur+"?"+Xf+"+"+ep,ur+"+"+rp,Hg,Yg,up,Kg].join("|"),"g");function Qg(t){return t.match(Zg)||[]}var mp=Qg;function Xg(t,e,r){return t=me(t),e=r?void 0:e,e===void 0?Zf(t)?mp(t):Kf(t):t.match(e)||[]}var hp=Xg;var ex="['\u2019]",rx=RegExp(ex,"g");function tx(t){return function(e){return Vf(hp(Jf(e).replace(rx,"")),t,"")}}var gp=tx;var nx=gp(function(t,e,r){return e=e.toLowerCase(),t+(r?zf(e):e)}),Ot=nx;a();s();a();s();var oe=class{};a();s();a();s();var he=class extends oe{constructor(r){super();d(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var ox=4,Lr=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
13
|
+
`+e.prev}function vt(t,e){var r=Gn(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ee(t,o)?e(t[o],t):""}var i=typeof _n=="function"?_n(t):[],u;if(ir){u={};for(var p=0;p<i.length;p++)u["$"+i[p]]=i[p]}for(var c in t)ee(t,c)&&(r&&String(Number(c))===c&&c<t.length||ir&&u["$"+c]instanceof Symbol||(Ws.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof _n=="function")for(var y=0;y<i.length;y++)js.call(t,i[y])&&n.push("["+e(i[y])+"]: "+e(t[i[y]],t));return n}});var At=m((eb,Ks)=>{"use strict";a();s();Ks.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Qs=m((nb,Zs)=>{"use strict";a();s();var Oy=I(),Ly=Fr(),By=At();Zs.exports=function(e,r){if(!By(r))throw new Oy("Assertion failed: IsPropertyKey(P) is not true, got "+Ly(r));return e[r]}});var tu=m((ab,ru)=>{"use strict";a();s();var eu=Function.prototype.toString,ar=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kn,St;if(typeof ar=="function"&&typeof Object.defineProperty=="function")try{Kn=Object.defineProperty({},"length",{get:function(){throw St}}),St={},ar(function(){throw 42},null,Kn)}catch(t){t!==St&&(ar=null)}else ar=null;var Uy=/^\s*class\b/,Zn=function(e){try{var r=eu.call(e);return Uy.test(r)}catch(n){return!1}},Jn=function(e){try{return Zn(e)?!1:(eu.call(e),!0)}catch(r){return!1}},Et=Object.prototype.toString,qy="[object Object]",$y="[object Function]",ky="[object GeneratorFunction]",_y="[object HTMLAllCollection]",My="[object HTML document.all class]",Dy="[object HTMLCollection]",Wy=typeof Symbol=="function"&&!!Symbol.toStringTag,jy=!(0 in[,]),Qn=function(){return!1};typeof document=="object"&&(Xs=document.all,Et.call(Xs)===Et.call(document.all)&&(Qn=function(e){if((jy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Et.call(e);return(r===_y||r===My||r===Dy||r===qy)&&e("")==null}catch(n){}return!1}));var Xs;ru.exports=ar?function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ar(e,null,Kn)}catch(r){if(r!==St)return!1}return!Zn(e)&&Jn(e)}:function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Wy)return Jn(e);if(Zn(e))return!1;var r=Et.call(e);return r!==$y&&r!==ky&&!/^\[object HTML/.test(r)?!1:Jn(e)}});var Xn=m((fb,nu)=>{"use strict";a();s();nu.exports=tu()});var su=m((cb,au)=>{"use strict";a();s();var ou=I(),Gy=Qs(),zy=Xn(),Vy=At(),iu=Fr();au.exports=function(e,r){if(!Vy(r))throw new ou("Assertion failed: IsPropertyKey(P) is not true");var n=Gy(e,r);if(n!=null){if(!zy(n))throw new ou(iu(r)+" is not a function: "+iu(n));return n}}});var fu=m((mb,uu)=>{"use strict";a();s();var Yy=pn();uu.exports=function(){return Yy()&&!!Symbol.toStringTag}});var no=m((xb,du)=>{"use strict";a();s();var eo=M(),pu=fu()(),lu,cu,ro,to;pu&&(lu=eo("Object.prototype.hasOwnProperty"),cu=eo("RegExp.prototype.exec"),ro={},Tt=function(){throw ro},to={toString:Tt,valueOf:Tt},typeof Symbol.toPrimitive=="symbol"&&(to[Symbol.toPrimitive]=Tt));var Tt,Hy=eo("Object.prototype.toString"),Jy=Object.getOwnPropertyDescriptor,Ky="[object RegExp]";du.exports=pu?function(e){if(!e||typeof e!="object")return!1;var r=Jy(e,"lastIndex"),n=r&&lu(r,"value");if(!n)return!1;try{cu(e,to)}catch(o){return o===ro}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Hy(e)===Ky}});var oo=m((bb,yu)=>{"use strict";a();s();var Zy=M(),Qy=no(),Xy=Zy("RegExp.prototype.exec"),em=I();yu.exports=function(e){if(!Qy(e))throw new em("`regex` must be a RegExp");return function(n){return Xy(e,n)!==null}}});var hu=m((Eb,mu)=>{"use strict";a();s();mu.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var xu=m((Pb,gu)=>{"use strict";a();s();gu.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 io=m((Fb,vu)=>{"use strict";a();s();var rm=xu();vu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":rm(e)}});var Au=m((Lb,bu)=>{"use strict";a();s();var wu=I(),tm=Fr(),nm=At(),om=io();bu.exports=function(e,r){if(om(e)!=="Object")throw new wu("Assertion failed: Type(O) is not Object");if(!nm(r))throw new wu("Assertion failed: IsPropertyKey(P) is not true, got "+tm(r));return e[r]}});var Eu=m((qb,Su)=>{"use strict";a();s();var im=G();Su.exports=im("%Math.min%")});var ao=m((_b,Tu)=>{"use strict";a();s();Tu.exports=Number.isNaN||function(e){return e!==e}});var Pu=m((Wb,Ru)=>{"use strict";a();s();var am=ao();Ru.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!am(t)&&t!==1/0&&t!==-1/0}});var Rt=m((zb,Nu)=>{"use strict";a();s();var Iu=G(),sm=Iu("%Math.abs%"),um=Iu("%Math.floor%"),fm=ao(),pm=Pu();Nu.exports=function(e){if(typeof e!="number"||fm(e)||!pm(e))return!1;var r=sm(e);return um(r)===r}});var uo=m((Hb,Fu)=>{"use strict";a();s();var lm=M(),so=I(),cm=Rt(),dm=lm("String.prototype.slice");Fu.exports=function(e,r,n){if(typeof e!="string")throw new so("Assertion failed: `string` must be a String");if(typeof r!="string")throw new so("Assertion failed: `searchValue` must be a String");if(!cm(n)||n<0)throw new so("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,u=n;u<=o-i;u+=1){var p=dm(e,u,u+i);if(p===r)return u}return-1}});var Pt=m((Zb,Cu)=>{"use strict";a();s();var ym=I();Cu.exports=function(e){if(e==null)throw new ym(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var It=m((eA,Ou)=>{"use strict";a();s();var mm=G(),hm=mm("%String%"),gm=I();Ou.exports=function(e){if(typeof e=="symbol")throw new gm("Cannot convert a Symbol value to a string");return hm(e)}});var fo=m((nA,Uu)=>{"use strict";a();s();var xm=Pt(),vm=It(),wm=M(),Lu=wm("String.prototype.replace"),Bu=/^\s$/.test("\u180E"),bm=Bu?/^[\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]+/,Am=Bu?/[\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]+$/;Uu.exports=function(){var e=vm(xm(this));return Lu(Lu(e,bm,""),Am,"")}});var po=m((aA,$u)=>{"use strict";a();s();var Sm=fo(),qu="\u200B",sr="\u180E";$u.exports=function(){return String.prototype.trim&&qu.trim()===qu&&sr.trim()===sr&&("_"+sr).trim()==="_"+sr&&(sr+"_").trim()===sr+"_"?String.prototype.trim:Sm}});var _u=m((fA,ku)=>{"use strict";a();s();var Em=wr(),Tm=po();ku.exports=function(){var e=Tm();return Em(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ju=m((cA,Wu)=>{"use strict";a();s();var Rm=ft(),Pm=wr(),Im=Pt(),Nm=fo(),Mu=po(),Fm=_u(),Cm=Rm(Mu()),Du=function(e){return Im(e),Cm(e)};Pm(Du,{getPolyfill:Mu,implementation:Nm,shim:Fm});Wu.exports=Du});var Yu=m((mA,Vu)=>{"use strict";a();s();var co=G(),lo=co("%Number%"),Om=co("%RegExp%"),Lm=I(),Gu=co("%parseInt%"),Bm=M(),Nt=oo(),zu=Bm("String.prototype.slice"),Um=Nt(/^0b[01]+$/i),qm=Nt(/^0o[0-7]+$/i),$m=Nt(/^[-+]0x[0-9a-f]+$/i),km=["\x85","\u200B","\uFFFE"].join(""),_m=new Om("["+km+"]","g"),Mm=Nt(_m),Dm=ju();Vu.exports=function t(e){if(typeof e!="string")throw new Lm("Assertion failed: `argument` is not a String");if(Um(e))return lo(Gu(zu(e,2),2));if(qm(e))return lo(Gu(zu(e,2),8));if(Mm(e)||$m(e))return NaN;var r=Dm(e);return r!==e?t(r):lo(e)}});var Ku=m((xA,Ju)=>{"use strict";a();s();var Wm=I(),Hu=Rt(),jm=M(),Gm=jm("String.prototype.slice");Ju.exports=function(e,r,n){if(typeof e!="string"||!Hu(r)||arguments.length>2&&!Hu(n))throw new Wm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Gm(e,r,arguments.length>2?n:e.length)}});var Qu=m((bA,Zu)=>{"use strict";a();s();Zu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var ef=m((EA,Xu)=>{"use strict";a();s();var zm=M()("String.prototype.slice");Xu.exports=function(e,r){return e===r?!0:e.length>r.length?!1:zm(r,0,e.length)===e}});var af=m((PA,of)=>{"use strict";a();s();var re=I(),nf=oo(),Vm=hu(),yo=Fr(),Ym=Au(),Hm=Tn(),Jm=Eu(),Km=uo(),rf=Yu(),te=Ku(),Zm=It(),tf=io(),Qm=Rt(),Xm=Qu(),Cr=ef(),eh=nf(/^\$[0-9]/),rh=nf(/^\$[0-9][0-9]/);of.exports=function(e,r,n,o,i,u){if(typeof e!="string")throw new re("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new re("Assertion failed: `str` must be a String");if(!Qm(n)||n<0)throw new re("Assertion failed: `position` must be a nonnegative integer, got "+yo(n));if(!Hm(o)||!Vm(o,Xm))throw new re("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+yo(o));if(typeof i!="undefined"&&tf(i)!=="Object")throw new re("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new re("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new re("Assertion failed: position > stringLength, got "+yo(n));for(var c=u,y="";c!=="";){var h,g,v;if(Cr("$$",c))h="$$",g="$";else if(Cr("$`",c))h="$`",g=te(r,0,n);else if(Cr("$&",c))h="$&",g=e;else if(Cr("$'",c)){h="$'";var b=e.length,T=n+b;g=te(r,Jm(T,p))}else if(eh(c)){var R=rh(c)?2:1,U=te(c,1,1+R),$=rf(U);if($<0||$>99)throw new re("Assertion failed: `index` must be >= 0 and <= 99");var K=o.length;$>K&&R===2&&(R=1,U=te(U,0,1),$=rf(U)),h=te(c,0,1+R),1<=$&&$<=K?(v=o[$-1],typeof v=="undefined"?g="":g=v):g=h}else if(Cr("$<",c)){var Ae=Km(c,">",0);if(Ae===-1||typeof i=="undefined")h="$<",g=h;else{h=te(c,0,Ae+1);var lr=te(c,2,Ae);if(tf(i)!=="Object")throw new re("Assertion failed: Type(namedCaptures) is not Object");v=Ym(i,lr),typeof v=="undefined"?g="":g=Zm(v)}}else h=te(c,0,1),g=h;var Dr=h.length;c=te(c,Dr),y+=g}return y}});var ho=m((FA,pf)=>{"use strict";a();s();var sf=ps(),th=su(),nh=af(),oh=Xn(),ih=Pt(),Ft=It(),uf=uo(),ah=G(),Ct=M(),sh=nn()(),uh=no(),fh=ah("%Math.max%"),ff=I(),ph=Ct("Array.prototype.push"),mo=Ct("String.prototype.slice"),lh=Ct("String.prototype.indexOf"),ch=Ct("String.prototype.replace");pf.exports=function(e,r){var n=ih(this),o=uh(e);if(o&&lh(mo(e,e.source.length+2),"g")===-1)throw new ff("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(sh&&Symbol.replace){if(e!=null){var i=th(e,Symbol.replace);if(typeof i!="undefined")return sf(i,e,[n,r])}}else if(o)return ch(n,e,r);var u=Ft(n),p=Ft(e),c=oh(r);c||(r=Ft(r));for(var y=p.length,h=fh(1,y),g=[],v=uf(u,p,0);v!==-1;)ph(g,v),v=uf(u,p,v+h);for(var b=0,T="",R=0;R<g.length;R+=1){var U;if(c)U=Ft(sf(r,void 0,[p,g[R],u]));else{if(typeof r!="string")throw new ff("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=nh(p,u,g[R],$,void 0,r)}var K=mo(u,b,g[R]);T+=K+U,b=g[R]+y}return b<u.length&&(T+=mo(u,b)),T}});var go=m((LA,lf)=>{"use strict";a();s();var dh=ho();lf.exports=function(){return String.prototype.replaceAll||dh}});var df=m((qA,cf)=>{"use strict";a();s();var yh=wr(),mh=go();cf.exports=function(){var e=mh();return yh(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var gf=m((_A,hf)=>{"use strict";a();s();var hh=ft(),gh=wr(),yf=ho(),xh=go(),vh=df(),mf=hh(yf);gh(mf,{getPolyfill:xh,implementation:yf,shim:vh});hf.exports=mf});var qx={};Yt(qx,{DynamicSnippetsGenerator:()=>Dt});module.exports=No(qx);a();s();var aF=Up(gf(),1);a();s();a();s();a();s();function P(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function Or(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var wh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,xf=wh;var bh=typeof self=="object"&&self&&self.Object===Object&&self,Ah=xf||bh||Function("return this")(),vf=Ah;var Sh=vf.Symbol,ne=Sh;a();s();var wf=Object.prototype,Eh=wf.hasOwnProperty,Th=wf.toString,Lr=ne?ne.toStringTag:void 0;function Rh(t){var e=Eh.call(t,Lr),r=t[Lr];try{t[Lr]=void 0;var n=!0}catch(i){}var o=Th.call(t);return n&&(e?t[Lr]=r:delete t[Lr]),o}var bf=Rh;a();s();var Ph=Object.prototype,Ih=Ph.toString;function Nh(t){return Ih.call(t)}var Af=Nh;var Fh="[object Null]",Ch="[object Undefined]",Sf=ne?ne.toStringTag:void 0;function Oh(t){return t==null?t===void 0?Ch:Fh:Sf&&Sf in Object(t)?bf(t):Af(t)}var Ef=Oh;a();s();function Lh(t){return t!=null&&typeof t=="object"}var Tf=Lh;var Bh="[object Symbol]";function Uh(t){return typeof t=="symbol"||Tf(t)&&Ef(t)==Bh}var Rf=Uh;a();s();a();s();function qh(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 Pf=qh;a();s();var $h=Array.isArray,If=$h;var kh=1/0,Nf=ne?ne.prototype:void 0,Ff=Nf?Nf.toString:void 0;function Cf(t){if(typeof t=="string")return t;if(If(t))return Pf(t,Cf)+"";if(Rf(t))return Ff?Ff.call(t):"";var e=t+"";return e=="0"&&1/t==-kh?"-0":e}var Of=Cf;a();s();function _h(t){return t==null?"":Of(t)}var me=_h;a();s();a();s();a();s();a();s();a();s();a();s();function Mh(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 Lf=Mh;function Dh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Lf(t,e,r)}var Bf=Dh;a();s();var Wh="\\ud800-\\udfff",jh="\\u0300-\\u036f",Gh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Vh=jh+Gh+zh,Yh="\\ufe0e\\ufe0f",Hh="\\u200d",Jh=RegExp("["+Hh+Wh+Vh+Yh+"]");function Kh(t){return Jh.test(t)}var Ot=Kh;a();s();a();s();function Zh(t){return t.split("")}var Uf=Zh;a();s();var qf="\\ud800-\\udfff",Qh="\\u0300-\\u036f",Xh="\\ufe20-\\ufe2f",eg="\\u20d0-\\u20ff",rg=Qh+Xh+eg,tg="\\ufe0e\\ufe0f",ng="["+qf+"]",xo="["+rg+"]",vo="\\ud83c[\\udffb-\\udfff]",og="(?:"+xo+"|"+vo+")",$f="[^"+qf+"]",kf="(?:\\ud83c[\\udde6-\\uddff]){2}",_f="[\\ud800-\\udbff][\\udc00-\\udfff]",ig="\\u200d",Mf=og+"?",Df="["+tg+"]?",ag="(?:"+ig+"(?:"+[$f,kf,_f].join("|")+")"+Df+Mf+")*",sg=Df+Mf+ag,ug="(?:"+[$f+xo+"?",xo,kf,_f,ng].join("|")+")",fg=RegExp(vo+"(?="+vo+")|"+ug+sg,"g");function pg(t){return t.match(fg)||[]}var Wf=pg;function lg(t){return Ot(t)?Wf(t):Uf(t)}var jf=lg;function cg(t){return function(e){e=me(e);var r=Ot(e)?jf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Bf(r,1).join(""):e.slice(1);return n[t]()+o}}var Gf=cg;var dg=Gf("toUpperCase"),ur=dg;function yg(t){return ur(me(t).toLowerCase())}var zf=yg;a();s();a();s();function mg(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 Vf=mg;a();s();a();s();a();s();function hg(t){return function(e){return t==null?void 0:t[e]}}var Yf=hg;var gg={\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"},xg=Yf(gg),Hf=xg;var vg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wg="\\u0300-\\u036f",bg="\\ufe20-\\ufe2f",Ag="\\u20d0-\\u20ff",Sg=wg+bg+Ag,Eg="["+Sg+"]",Tg=RegExp(Eg,"g");function Rg(t){return t=me(t),t&&t.replace(vg,Hf).replace(Tg,"")}var Jf=Rg;a();s();a();s();var Pg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ig(t){return t.match(Pg)||[]}var Kf=Ig;a();s();var Ng=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Fg(t){return Ng.test(t)}var Zf=Fg;a();s();var tp="\\ud800-\\udfff",Cg="\\u0300-\\u036f",Og="\\ufe20-\\ufe2f",Lg="\\u20d0-\\u20ff",Bg=Cg+Og+Lg,np="\\u2700-\\u27bf",op="a-z\\xdf-\\xf6\\xf8-\\xff",Ug="\\xac\\xb1\\xd7\\xf7",qg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$g="\\u2000-\\u206f",kg=" \\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",ip="A-Z\\xc0-\\xd6\\xd8-\\xde",_g="\\ufe0e\\ufe0f",ap=Ug+qg+$g+kg,sp="['\u2019]",Qf="["+ap+"]",Mg="["+Bg+"]",up="\\d+",Dg="["+np+"]",fp="["+op+"]",pp="[^"+tp+ap+up+np+op+ip+"]",Wg="\\ud83c[\\udffb-\\udfff]",jg="(?:"+Mg+"|"+Wg+")",Gg="[^"+tp+"]",lp="(?:\\ud83c[\\udde6-\\uddff]){2}",cp="[\\ud800-\\udbff][\\udc00-\\udfff]",fr="["+ip+"]",zg="\\u200d",Xf="(?:"+fp+"|"+pp+")",Vg="(?:"+fr+"|"+pp+")",ep="(?:"+sp+"(?:d|ll|m|re|s|t|ve))?",rp="(?:"+sp+"(?:D|LL|M|RE|S|T|VE))?",dp=jg+"?",yp="["+_g+"]?",Yg="(?:"+zg+"(?:"+[Gg,lp,cp].join("|")+")"+yp+dp+")*",Hg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kg=yp+dp+Yg,Zg="(?:"+[Dg,lp,cp].join("|")+")"+Kg,Qg=RegExp([fr+"?"+fp+"+"+ep+"(?="+[Qf,fr,"$"].join("|")+")",Vg+"+"+rp+"(?="+[Qf,fr+Xf,"$"].join("|")+")",fr+"?"+Xf+"+"+ep,fr+"+"+rp,Jg,Hg,up,Zg].join("|"),"g");function Xg(t){return t.match(Qg)||[]}var mp=Xg;function ex(t,e,r){return t=me(t),e=r?void 0:e,e===void 0?Zf(t)?mp(t):Kf(t):t.match(e)||[]}var hp=ex;var rx="['\u2019]",tx=RegExp(rx,"g");function nx(t){return function(e){return Vf(hp(Jf(e).replace(tx,"")),t,"")}}var gp=nx;var ox=gp(function(t,e,r){return e=e.toLowerCase(),t+(r?zf(e):e)}),Lt=ox;a();s();a();s();var oe=class{};a();s();a();s();var he=class extends oe{constructor(r){super();d(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var ix=4,Br=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(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
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 he(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,r){new he(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(e,r="{",n,o="}"){let i=e.filter(u=>u!==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 u=e[i];u!=null&&n(u)}}}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*ox)}};a();s();function wo(t){return(t==null?void 0:t.name)!=null}a();s();var Br=class extends oe{constructor({condition:r,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=r,this.true_=n,this.false_=o}write(r){r.writeNode(this.condition),r.write(" ? "),r.writeNode(this.true_),r.write(" : "),r.writeNode(this.false_)}};a();s();a();s();a();s();var Ur=class{constructor(){d(this,"reporter");d(this,"snippet");d(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 qr=class{constructor(e){d(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 Ur;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=await u.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 Ur;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=u.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})}};a();s();a();s();a();s();var $r=class{constructor(){d(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]}}};a();s();var E={Critical:"CRITICAL",Warning:"WARNING"},kr=class t{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(je(We({},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 _r=class{constructor({ir:e,config:r}){d(this,"config");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new kr,this.httpEndpointReferenceParser=new $r}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let u=e.find(c=>c.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,u]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:E.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:u})}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:E.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:E.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:E.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:E.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:E.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:E.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:E.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=e.types[i];if(u==null){this.errors.add({severity:E.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:p}=y,c=Po(y,[Ro(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.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:P(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:P(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:E.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:E.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:E.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Cr(n.urls));for(let i of Cr(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:E.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${Cr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:E.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:P(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:P(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:P(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}};a();s();var H={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var Lt="";var x={};Yt(x,{Array:()=>Le,AstNode:()=>w,Attribute:()=>Be,Class:()=>ie,ClassInstantiation:()=>J,ClassReference:()=>L,CodeBlock:()=>B,DataClass:()=>qe,Enum:()=>$e,Field:()=>ke,Map:()=>_e,Method:()=>se,MethodInvocation:()=>ue,Parameter:()=>ae,Trait:()=>Ue,Type:()=>D,TypeLiteral:()=>we,Writer:()=>ge,array:()=>cx,assignVariable:()=>Rx,attribute:()=>dx,classReference:()=>hx,class_:()=>yx,codeblock:()=>Me,dataClass:()=>gx,enum_:()=>xx,field:()=>vx,instantiateClass:()=>Sp,invokeMethod:()=>wx,map:()=>Ax,mergeArrays:()=>Nx,method:()=>Sx,parameter:()=>Ex,string:()=>Ix,ternary:()=>Tx,this_:()=>Fx,throwException:()=>bx,trait:()=>mx,variable:()=>Px});a();s();a();s();a();s();a();s();a();s();function xp(t){return{namespace:t.substring(0,t.lastIndexOf("\\")),name:t.substring(t.lastIndexOf("\\")+1)}}var ge=class extends Lr{constructor({namespace:r,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=r,this.rootNamespace=n,this.customConfig=o}addReference(r){var u,p;if(r.namespace==null)return;if(Object.keys(this.references).filter(c=>{let y=xp(c);return y.namespace!==r.namespace&&y.name===r.name}).length>0){r.requireFullyQualified();return}let o=r.namespace===Lt?r.name:`${r.namespace}\\${r.name}`;((p=(u=this.references)[o])!=null?p:u[o]=[]).push(r)}toString(){let r=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${r}
|
|
20
|
+
`)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*ix)}};a();s();function wo(t){return(t==null?void 0:t.name)!=null}a();s();var Ur=class extends oe{constructor({condition:r,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=r,this.true_=n,this.false_=o}write(r){r.writeNode(this.condition),r.write(" ? "),r.writeNode(this.true_),r.write(" : "),r.writeNode(this.false_)}};a();s();a();s();a();s();var qr=class{constructor(){d(this,"reporter");d(this,"snippet");d(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 $r=class{constructor(e){d(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 qr;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=await u.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 qr;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=u.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})}};a();s();a();s();a();s();var kr=class{constructor(){d(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]}}};a();s();var E={Critical:"CRITICAL",Warning:"WARNING"},_r=class t{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(Ge(je({},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 Mr=class{constructor({ir:e,config:r}){d(this,"config");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new _r,this.httpEndpointReferenceParser=new kr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let u=e.find(c=>c.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,u]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:E.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:u})}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:E.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:E.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:E.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:E.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:E.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:E.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:E.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=e.types[i];if(u==null){this.errors.add({severity:E.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:p}=y,c=Po(y,[Ro(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.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:P(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:P(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:E.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:E.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:E.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Or(n.urls));for(let i of Or(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:E.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${Or(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:E.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:P(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:P(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:P(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}};a();s();var H={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var Bt="",xp="self";var x={};Yt(x,{Access:()=>ge,Array:()=>Be,AstNode:()=>w,Attribute:()=>Ue,Class:()=>ie,ClassInstantiation:()=>J,ClassReference:()=>L,CodeBlock:()=>B,DataClass:()=>$e,Enum:()=>ke,Field:()=>_e,Map:()=>Me,Method:()=>se,MethodInvocation:()=>ue,Parameter:()=>ae,Trait:()=>qe,Type:()=>D,TypeLiteral:()=>be,Writer:()=>xe,array:()=>dx,assignVariable:()=>Px,attribute:()=>yx,classReference:()=>gx,class_:()=>mx,codeblock:()=>De,dataClass:()=>xx,enum_:()=>vx,field:()=>wx,instantiateClass:()=>Ep,invokeMethod:()=>bx,map:()=>Sx,mergeArrays:()=>Fx,method:()=>Ex,parameter:()=>Tx,string:()=>Nx,ternary:()=>Rx,this_:()=>Cx,throwException:()=>Ax,trait:()=>hx,variable:()=>Ix});a();s();a();s();a();s();var ge={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function vp(t){return{namespace:t.substring(0,t.lastIndexOf("\\")),name:t.substring(t.lastIndexOf("\\")+1)}}var xe=class extends Br{constructor({namespace:r,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=r,this.rootNamespace=n,this.customConfig=o}addReference(r){var u,p;if(r.namespace==null)return;if(Object.keys(this.references).filter(c=>{let y=vp(c);return y.namespace!==r.namespace&&y.name===r.name}).length>0){r.requireFullyQualified();return}let o=r.namespace===Bt?r.name:`${r.namespace}\\${r.name}`;((p=(u=this.references)[o])!=null?p:u[o]=[]).push(r)}toString(){let r=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${r}
|
|
21
21
|
|
|
22
22
|
${n}
|
|
23
23
|
|
|
24
24
|
${this.buffer}`:r+`
|
|
25
25
|
|
|
26
|
-
`+this.buffer}stringifyImports(){let r=Object.keys(this.references);return r.length===0?"":r.filter(n=>
|
|
27
|
-
`)}};var w=class extends oe{toString(e){if(e==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:r,rootNamespace:n,customConfig:o}=e,i=new
|
|
26
|
+
`+this.buffer}stringifyImports(){let r=Object.keys(this.references);return r.length===0?"":r.filter(n=>vp(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
|
|
27
|
+
`)}};var w=class extends oe{toString(e){if(e==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:r,rootNamespace:n,customConfig:o}=e,i=new xe({namespace:r,rootNamespace:n,customConfig:o});return this.write(i),i.toString()}async toStringAsync({namespace:e,rootNamespace:r,customConfig:n}){let o=new xe({namespace:e,rootNamespace:r,customConfig:n});return this.write(o),o.toString()}};var Be=class extends w{constructor({entries:r}){super();d(this,"entries");this.entries=r!=null?r:[]}write(r){r.write("["),this.entries.forEach((n,o)=>{o>0&&r.write(", "),n.write(r)}),r.write("]")}};a();s();var Ue=class extends w{constructor(r){var n;super();d(this,"reference");d(this,"arguments");this.reference=r.reference,this.arguments=(n=r.arguments)!=null?n:[]}write(r){r.addReference(this.reference),r.write(`${this.reference.name}`),this.arguments.length>0&&(r.write("("),this.arguments.forEach((n,o)=>{o>0&&r.write(","),typeof n=="string"?r.write(n):n.write(r)}),r.write(")"))}};a();s();a();s();var L=class extends w{constructor({name:r,namespace:n}){super();d(this,"name");d(this,"namespace");d(this,"fullyQualified");this.name=r,this.namespace=n,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(r){r.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;r.write(`${n}`)}};a();s();a();s();function ve(t){return t.startsWith("$")?t:`$${t}`}var k=class extends w{constructor({docs:r}={}){super();d(this,"docs");d(this,"tags",[]);this.docs=r}addTag(r){this.tags.push(Ge(je({},r),{name:r.name!=null?ve(r.name):void 0}))}write(r){r.writeLine("/**"),this.docs!=null&&(this.docs.split(`
|
|
28
28
|
`).forEach(n=>{r.writeLine(` * ${n}`)}),this.tags.length>0&&r.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:r,tag:n});r.writeLine(" */")}writeTag({writer:r,tag:n}){let o=n.docs!=null?n.docs.split(`
|
|
29
|
-
`):void 0;o!=null&&o.length>1&&(o.forEach(i=>{r.writeLine(` * ${i}`)}),r.writeLine(" *")),r.write(` * @${n.tagType} `),n.type.write(r,{comment:!0}),n.name!=null&&r.write(` ${n.name}`),o!=null&&o.length===1&&r.write(` ${o[0]}`),r.newLine()}};a();s();a();s();var Bt={Public:"public",Private:"private",Protected:"protected"};function ve(t){return ix(t,[Bt.Public,Bt.Protected,Bt.Private])}function ix(t,e){return e.reduce((r,n)=>[...r,...t.filter(o=>o.access===n)],[])}var ie=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"abstract");d(this,"docs");d(this,"parentClassReference");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);d(this,"constructor_");this.name=r,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=i,this.parentClassReference=u,this.traits=p!=null?p:[]}addConstructor(r){this.constructor_=r}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}addTrait(r){this.traits.push(r)}write(r){r.addReference(new L({name:this.name,namespace:this.namespace})),this.abstract&&r.write("abstract "),this.writeComment(r),r.write(`class ${this.name} `),this.parentClassReference!=null&&(r.write("extends "),this.parentClassReference.write(r)),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:ve(this.fields)}),(this.constructor!=null||this.methods.length>0)&&r.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:r,constructor:this.constructor_}),this.methods.length>0&&r.newLine()),this.writeMethods({writer:r,methods:ve(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}writeConstructor({writer:r,constructor:n}){var o;this.writeConstructorComment({writer:r,constructor:n}),n.access!=null&&r.write(`${n.access} `),r.write("function __construct("),r.indent(),n.parameters.forEach((i,u)=>{u===0&&r.newLine(),i.write(r),r.writeLine(",")}),r.dedent(),r.writeLine(")"),r.writeLine("{"),r.indent(),(o=n.body)==null||o.write(r),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeConstructorComment({writer:r,constructor:n}){if(n.parameters.length===0)return;let o=new k;for(let i of n.parameters)o.addTag(i.getCommentTag());o.write(r)}writeFields({writer:r,fields:n}){n.filter(o=>!o.inherited).forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();var Ue=class extends w{constructor({name:r,namespace:n,docs:o,traits:i}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=r,this.namespace=n,this.docs=o,this.traits=i!=null?i:[]}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}write(r){this.writeComment(r),r.write(`trait ${this.name} `),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:ve(this.fields)}),this.writeMethods({writer:r,methods:ve(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}writeFields({writer:r,fields:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();a();s();function fr({writer:t,arguments_:e,multiline:r}){if(e.length===0){t.write("()");return}if(r){ax({writer:t,arguments_:e});return}sx({writer:t,arguments_:e})}function ax({writer:t,arguments_:e}){t.writeLine("("),t.indent();for(let r of e)vp({writer:t,argument:r}),t.writeLine(",");t.dedent(),t.write(")")}function sx({writer:t,arguments_:e}){t.write("("),e.forEach((r,n)=>{n>0&&t.write(", "),vp({writer:t,argument:r})}),t.write(")")}function vp({writer:t,argument:e}){wo(e)?(t.write(`${e.name}: `),t.writeNodeOrString(e.assignment)):e.write(t)}var J=class extends w{constructor({classReference:r,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=r,this.arguments_=n,this.multiline=o!=null?o:!1}write(r){r.write("new "),r.writeNode(this.classReference),fr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var B=class extends w{constructor(r){super();d(this,"arg");this.arg=r}write(r){return new he(this.arg).write(r)}};a();s();a();s();var ae=class extends w{constructor({name:r,type:n,docs:o,initializer:i,access:u,readonly_:p}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=xe(r),this.type=n,this.docs=o,this.initializer=i,this.access=u,this.readonly_=p!=null?p:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(r){this.access!=null&&r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null?(r.write(" = "),this.initializer.write(r)):this.type.isOptional()&&r.write(" = null")}};a();s();var D=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r,{comment:n}={}){switch(this.internalType.type){case"int":r.write("int");break;case"string":r.write("string");break;case"bool":r.write("bool");break;case"float":r.write("float");break;case"date":r.addReference(wp),r.write("DateTime");break;case"dateTime":r.addReference(wp),r.write("DateTime");break;case"mixed":r.write("mixed");break;case"object":r.write("object");break;case"array":if(!n){r.write("array");break}r.write("array<"),this.internalType.value.write(r,{comment:n}),r.write(">");break;case"map":{if(!n){r.write("array");break}r.write("array<"),this.internalType.keyType.write(r,{comment:n}),r.write(", "),this.internalType.valueType.write(r,{comment:n}),r.write(">");break}case"null":{r.write("null");break}case"typeDict":{if(!n){r.write("array");break}if(this.internalType.multiline){r.writeLine("array{");for(let o of this.internalType.entries)r.write(" * "),this.writeTypeDictEntry({writer:r,entry:o,comment:n}),r.writeLine(",");r.write(" * }");break}r.write("array{"),this.internalType.entries.forEach((o,i)=>{i>0&&r.write(", "),this.writeTypeDictEntry({writer:r,entry:o,comment:n})}),r.write("}");break}case"union":{this.getUniqueTypes({types:this.internalType.types,comment:n,writer:r}).forEach((i,u)=>{u>0&&r.write("|"),i.write(r,{comment:n}),u++});break}case"optional":{let o=this.internalType.value.internalType.type==="mixed",i=this.internalType.value.internalType.type==="union";!i&&!o&&r.write("?"),this.internalType.value.write(r,{comment:n}),i&&(r.write("|"),r.writeNode(t.null()));break}case"reference":r.writeNode(this.internalType.value);break;case"enumString":n?(r.write("value-of<"),r.writeNode(this.internalType.value),r.write(">")):r.write("string");break;default:P(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:t.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var r;return(r=this.underlyingTypeIfOptional())!=null?r:this}isOptional(){return this.internalType.type==="optional"}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(r){return new this({type:"array",value:r})}static map(r,n){return new this({type:"map",keyType:r,valueType:n})}static typeDict(r,{multiline:n}={}){return new this({type:"typeDict",entries:r,multiline:n})}static union(r){return new this({type:"union",types:r})}static optional(r){return this.isAlreadyOptional(r)?r:new this({type:"optional",value:r})}static null(){return new this({type:"null"})}static reference(r){return new this({type:"reference",value:r})}static enumString(r){return new this({type:"enumString",value:r})}static isAlreadyOptional(r){return r.internalType.type==="optional"}writeTypeDictEntry({writer:r,entry:n,comment:o}){r.write(n.key),n.optional&&r.write("?"),r.write(": "),n.valueType.write(r,{comment:o})}getUniqueTypes({writer:r,types:n,comment:o}){let i=new Set;return n.filter(u=>{if(o)return!0;let p=u.toString({namespace:r.namespace,rootNamespace:r.rootNamespace,customConfig:r.customConfig});return i.has(p)?!1:(i.add(p),!0)})}},wp=new L({namespace:Lt,name:"DateTime"});a();s();function bp(t){return t.startsWith("$")?t.slice(1):t}var Ap="values",qe=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"class_");this.name=r,this.namespace=n,this.class_=new ie({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p})}addField(r){this.class_.addField(r)}addMethod(r){this.class_.addMethod(r)}addTrait(r){this.class_.addTrait(r)}write(r){let n=ve(this.class_.fields).map(o=>je(We({},o),{name:bp(o.name)}));n.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:n}),body:x.codeblock(o=>{for(let i of n)o.write(`$this->${i.name} = $${Ap}['${i.name}']`),i.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(r)}allFieldsAreOptional(){return this.class_.fields.every(r=>r.type.isOptional())}getConstructorParameters({orderedFields:r}){return[new ae({name:Ap,type:D.typeDict(r.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new B("[]"):void 0})]}};a();s();a();s();var se=class extends w{constructor({name:r,access:n,parameters:o,throws:i,return_:u,body:p,docs:c,classReference:y}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");this.name=r,this.access=n,this.parameters=o,this.throws=i!=null?i:[],this.return_=u,this.body=p,this.docs=c,this.classReference=y}write(r){var n;this.writeComment(r),r.write(`${this.access} function ${this.name}(`),this.parameters.forEach((o,i)=>{i>0&&r.write(", "),o.write(r)}),r.write("): "),this.return_!=null?this.return_.write(r):r.write("void"),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeLine("}")}writeComment(r){let n=new k({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:D.reference(o)});r.writeNode(n)}};var $e=class extends w{constructor({name:r,namespace:n,backing:o,docs:i,serializable:u}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=r,this.namespace=n,this.backing=o,this.docs=i,this.serializable=u!=null?u:!1}addMember(r){this.members.push(r)}write(r){this.writeComment(r),r.write("enum "),r.writeLine(`${this.name}`),this.backing!=null&&r.write(` : ${this.backing}`),this.serializable&&(r.addReference(new L({name:"JsonSerializable",namespace:""})),r.writeLine(" implements JsonSerializable")),r.writeLine(" {"),r.indent();for(let n of this.members)r.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?r.write(` = "${n.value}"`):r.write(` = ${n.value}`)),r.writeTextStatement("");this.serializable&&(r.newLine(),r.writeNode(new se({name:"jsonSerialize",return_:D.string(),access:"public",parameters:[],body:new B("return $this->value;")}))),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}};a();s();var ke=class extends w{constructor({name:r,type:n,access:o,readonly_:i,initializer:u,docs:p,inlineDocs:c,attributes:y,inherited:h}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=xe(r),this.type=n,this.access=o,this.readonly_=i!=null?i:!1,this.initializer=u,this.docs=p,this.inlineDocs=c,this.attributes=y!=null?y:[],this.inherited=h!=null?h:!1}write(r){this.writeComment(r),this.writeAttributesIfPresent(r),r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null&&(r.write(" = "),this.initializer.write(r)),r.write(";"),this.inlineDocs!=null&&r.write(` // ${this.inlineDocs}`),r.newLine()}writeComment(r){let n=new k;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(r)}writeAttributesIfPresent(r){this.attributes.length>0&&(r.write("#["),this.attributes.forEach((n,o)=>{o>0&&r.write(", "),n.write(r)}),r.writeLine("]"))}};a();s();var _e=class extends w{constructor({entries:r,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=r!=null?r:[],this.multiline=n!=null?n:!1}write(r){if(this.multiline){this.writeMultiline(r);return}this.writeCompact(r)}writeMultiline(r){r.writeLine("["),r.indent();for(let{key:n,value:o}of this.entries)n.write(r),r.write(" => "),o.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeCompact(r){r.write("[");for(let[n,{key:o,value:i}]of this.entries.entries())n>0&&r.write(", "),o.write(r),r.write(" => "),i.write(r);r.write("]")}};a();s();var ue=class extends w{constructor({method:r,arguments_:n,static_:o,multiline:i,on:u}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=r,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=i!=null?i:!1,this.on=u}write(r){this.on!=null&&(this.on.write(r),r.write(this.getMethodAccessor())),r.write(this.method),fr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};a();s();a();s();var we=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"list":{this.writeList({writer:r,list:this.internalType});break}case"boolean":{r.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:r,class_:this.internalType});break}case"file":{r.writeNode(fx({writer:r,value:this.internalType.value}));break}case"float":{r.write(this.internalType.value.toString());break}case"number":{r.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:r,map:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"datetime":{r.writeNode(ux({writer:r,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
|
|
30
|
-
`)){this.writeStringWithHeredoc({writer:r,value:this.internalType.value});break}r.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:P(this.internalType)}}writeStringWithHeredoc({writer:r,value:n}){r.writeLine("<<<EOT"),r.writeNoIndent(n),r.newLine(),r.writeNoIndent("EOT")}writeClass({writer:r,class_:n}){r.writeNode(new J({classReference:n.reference,arguments_:[t.map({entries:n.fields.map(o=>({key:t.string(o.name),value:o.value}))})]}))}writeList({writer:r,list:n}){let o=
|
|
29
|
+
`):void 0;o!=null&&o.length>1&&(o.forEach(i=>{r.writeLine(` * ${i}`)}),r.writeLine(" *")),r.write(` * @${n.tagType} `),n.type.write(r,{comment:!0}),n.name!=null&&r.write(` ${n.name}`),o!=null&&o.length===1&&r.write(` ${o[0]}`),r.newLine()}};a();s();function we(t){return ax(t,[ge.Public,ge.PublicReadonly,ge.Protected,ge.Private])}function ax(t,e){return e.reduce((r,n)=>[...r,...t.filter(o=>o.access===n)],[])}var ie=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"abstract");d(this,"docs");d(this,"parentClassReference");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);d(this,"constructor_");this.name=r,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=i,this.parentClassReference=u,this.traits=p!=null?p:[]}addConstructor(r){this.constructor_=r}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}addTrait(r){this.traits.push(r)}write(r){r.addReference(new L({name:this.name,namespace:this.namespace})),this.abstract&&r.write("abstract "),this.writeComment(r),r.write(`class ${this.name} `),this.parentClassReference!=null&&(r.write("extends "),this.parentClassReference.write(r)),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:we(this.fields)}),(this.constructor!=null||this.methods.length>0)&&r.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:r,constructor:this.constructor_}),this.methods.length>0&&r.newLine()),this.writeMethods({writer:r,methods:we(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}writeConstructor({writer:r,constructor:n}){var o;this.writeConstructorComment({writer:r,constructor:n}),n.access!=null&&r.write(`${n.access} `),r.write("function __construct("),r.indent(),n.parameters.forEach((i,u)=>{u===0&&r.newLine(),i.write(r),r.writeLine(",")}),r.dedent(),r.writeLine(")"),r.writeLine("{"),r.indent(),(o=n.body)==null||o.write(r),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeConstructorComment({writer:r,constructor:n}){if(n.parameters.length===0)return;let o=new k;for(let i of n.parameters)o.addTag(i.getCommentTag());o.write(r)}writeFields({writer:r,fields:n}){n.filter(o=>!o.inherited).forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();var qe=class extends w{constructor({name:r,namespace:n,docs:o,traits:i}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=r,this.namespace=n,this.docs=o,this.traits=i!=null?i:[]}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}write(r){this.writeComment(r),r.write(`trait ${this.name} `),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:we(this.fields)}),this.fields.length>0&&this.methods.length>0&&r.newLine(),this.writeMethods({writer:r,methods:we(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){let n=new k({docs:this.docs});for(let o of this.fields)n.addTag({tagType:"property",type:o.type,name:o.name});n.write(r)}writeFields({writer:r,fields:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();a();s();function pr({writer:t,arguments_:e,multiline:r}){if(e.length===0){t.write("()");return}if(r){sx({writer:t,arguments_:e});return}ux({writer:t,arguments_:e})}function sx({writer:t,arguments_:e}){t.writeLine("("),t.indent();for(let r of e)wp({writer:t,argument:r}),t.writeLine(",");t.dedent(),t.write(")")}function ux({writer:t,arguments_:e}){t.write("("),e.forEach((r,n)=>{n>0&&t.write(", "),wp({writer:t,argument:r})}),t.write(")")}function wp({writer:t,argument:e}){wo(e)?(t.write(`${e.name}: `),t.writeNodeOrString(e.assignment)):e.write(t)}var J=class extends w{constructor({classReference:r,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=r,this.arguments_=n,this.multiline=o!=null?o:!1}write(r){r.write("new "),r.writeNode(this.classReference),pr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var B=class extends w{constructor(r){super();d(this,"arg");this.arg=r}write(r){return new he(this.arg).write(r)}};a();s();a();s();var ae=class extends w{constructor({name:r,type:n,docs:o,initializer:i,access:u,readonly_:p}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=ve(r),this.type=n,this.docs=o,this.initializer=i,this.access=u,this.readonly_=p!=null?p:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(r){this.access!=null&&r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null?(r.write(" = "),this.initializer.write(r)):this.type.isOptional()&&r.write(" = null")}};a();s();var D=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r,{comment:n}={}){switch(this.internalType.type){case"int":r.write("int");break;case"string":r.write("string");break;case"bool":r.write("bool");break;case"float":r.write("float");break;case"date":r.addReference(bp),r.write("DateTime");break;case"dateTime":r.addReference(bp),r.write("DateTime");break;case"mixed":r.write("mixed");break;case"object":r.write("object");break;case"array":if(!n){r.write("array");break}r.write("array<"),this.internalType.value.write(r,{comment:n}),r.write(">");break;case"map":{if(!n){r.write("array");break}r.write("array<"),this.internalType.keyType.write(r,{comment:n}),r.write(", "),this.internalType.valueType.write(r,{comment:n}),r.write(">");break}case"null":{r.write("null");break}case"typeDict":{if(!n){r.write("array");break}if(this.internalType.multiline){r.writeLine("array{");for(let o of this.internalType.entries)r.write(" * "),this.writeTypeDictEntry({writer:r,entry:o,comment:n}),r.writeLine(",");r.write(" * }");break}r.write("array{"),this.internalType.entries.forEach((o,i)=>{i>0&&r.write(", "),this.writeTypeDictEntry({writer:r,entry:o,comment:n})}),r.write("}");break}case"union":{this.getUniqueTypes({types:this.internalType.types,comment:n,writer:r}).forEach((i,u)=>{u>0&&r.write("|"),i.write(r,{comment:n}),u++});break}case"optional":{let o=this.internalType.value.internalType.type==="mixed",i=this.internalType.value.internalType.type==="union";!i&&!o&&r.write("?"),this.internalType.value.write(r,{comment:n}),i&&(r.write("|"),r.writeNode(t.null()));break}case"reference":r.writeNode(this.internalType.value);break;case"enumString":n?(r.write("value-of<"),r.writeNode(this.internalType.value),r.write(">")):r.write("string");break;default:P(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:t.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var r;return(r=this.underlyingTypeIfOptional())!=null?r:this}isOptional(){return this.internalType.type==="optional"}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(r){return new this({type:"array",value:r})}static map(r,n){return new this({type:"map",keyType:r,valueType:n})}static typeDict(r,{multiline:n}={}){return new this({type:"typeDict",entries:r,multiline:n})}static union(r){return new this({type:"union",types:r})}static optional(r){return this.isAlreadyOptional(r)?r:new this({type:"optional",value:r})}static null(){return new this({type:"null"})}static reference(r){return new this({type:"reference",value:r})}static enumString(r){return new this({type:"enumString",value:r})}static isAlreadyOptional(r){return r.internalType.type==="optional"}writeTypeDictEntry({writer:r,entry:n,comment:o}){r.write(n.key),n.optional&&r.write("?"),r.write(": "),n.valueType.write(r,{comment:o})}getUniqueTypes({writer:r,types:n,comment:o}){let i=new Set;return n.filter(u=>{if(o)return!0;let p=u.toString({namespace:r.namespace,rootNamespace:r.rootNamespace,customConfig:r.customConfig});return i.has(p)?!1:(i.add(p),!0)})}},bp=new L({namespace:Bt,name:"DateTime"});a();s();function Ap(t){return t.startsWith("$")?t.slice(1):t}var Sp="values",$e=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"class_");this.name=r,this.namespace=n,this.class_=new ie({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p})}addField(r){this.class_.addField(r)}addMethod(r){this.class_.addMethod(r)}addTrait(r){this.class_.addTrait(r)}write(r){let n=we(this.class_.fields).map(o=>Ge(je({},o),{name:Ap(o.name)}));n.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:n}),body:x.codeblock(o=>{for(let i of n)o.write(`$this->${i.name} = $${Sp}['${i.name}']`),i.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(r)}allFieldsAreOptional(){return this.class_.fields.every(r=>r.type.isOptional())}getConstructorParameters({orderedFields:r}){return[new ae({name:Sp,type:D.typeDict(r.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new B("[]"):void 0})]}};a();s();a();s();var se=class extends w{constructor({name:r,access:n,parameters:o,throws:i,return_:u,body:p,docs:c,classReference:y}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");this.name=r,this.access=n,this.parameters=o,this.throws=i!=null?i:[],this.return_=u,this.body=p,this.docs=c,this.classReference=y}write(r){var n;this.writeComment(r),r.write(`${this.access} function ${this.name}(`),this.parameters.forEach((o,i)=>{i>0&&r.write(", "),o.write(r)}),r.write("): "),this.return_!=null?r.writeNodeOrString(this.return_):r.write("void"),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeLine("}")}writeComment(r){let n=new k({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&this.return_!==xp&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:D.reference(o)});r.writeNode(n)}};var ke=class extends w{constructor({name:r,namespace:n,backing:o,docs:i,serializable:u}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=r,this.namespace=n,this.backing=o,this.docs=i,this.serializable=u!=null?u:!1}addMember(r){this.members.push(r)}write(r){this.writeComment(r),r.write("enum "),r.writeLine(`${this.name}`),this.backing!=null&&r.write(` : ${this.backing}`),this.serializable&&(r.addReference(new L({name:"JsonSerializable",namespace:""})),r.writeLine(" implements JsonSerializable")),r.writeLine(" {"),r.indent();for(let n of this.members)r.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?r.write(` = "${n.value}"`):r.write(` = ${n.value}`)),r.writeTextStatement("");this.serializable&&(r.newLine(),r.writeNode(new se({name:"jsonSerialize",return_:D.string(),access:"public",parameters:[],body:new B("return $this->value;")}))),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}};a();s();var _e=class extends w{constructor({name:r,type:n,access:o,readonly_:i,initializer:u,docs:p,inlineDocs:c,attributes:y,inherited:h}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=ve(r),this.type=n,this.access=o,this.readonly_=i!=null?i:!1,this.initializer=u,this.docs=p,this.inlineDocs=c,this.attributes=y!=null?y:[],this.inherited=h!=null?h:!1}write(r){this.writeComment(r),this.writeAttributesIfPresent(r),r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null&&(r.write(" = "),this.initializer.write(r)),r.write(";"),this.inlineDocs!=null&&r.write(` // ${this.inlineDocs}`),r.newLine()}writeComment(r){let n=new k;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(r)}writeAttributesIfPresent(r){this.attributes.length>0&&(r.write("#["),this.attributes.forEach((n,o)=>{o>0&&r.write(", "),n.write(r)}),r.writeLine("]"))}};a();s();var Me=class extends w{constructor({entries:r,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=r!=null?r:[],this.multiline=n!=null?n:!1}write(r){if(this.multiline){this.writeMultiline(r);return}this.writeCompact(r)}writeMultiline(r){r.writeLine("["),r.indent();for(let{key:n,value:o}of this.entries)n.write(r),r.write(" => "),o.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeCompact(r){r.write("[");for(let[n,{key:o,value:i}]of this.entries.entries())n>0&&r.write(", "),o.write(r),r.write(" => "),i.write(r);r.write("]")}};a();s();var ue=class extends w{constructor({method:r,arguments_:n,static_:o,multiline:i,on:u}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=r,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=i!=null?i:!1,this.on=u}write(r){this.on!=null&&(this.on.write(r),r.write(this.getMethodAccessor())),r.write(this.method),pr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};a();s();a();s();var be=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"list":{this.writeList({writer:r,list:this.internalType});break}case"boolean":{r.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:r,class_:this.internalType});break}case"file":{r.writeNode(px({writer:r,value:this.internalType.value}));break}case"float":{r.write(this.internalType.value.toString());break}case"number":{r.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:r,map:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"datetime":{r.writeNode(fx({writer:r,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
|
|
30
|
+
`)){this.writeStringWithHeredoc({writer:r,value:this.internalType.value});break}r.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:P(this.internalType)}}writeStringWithHeredoc({writer:r,value:n}){r.writeLine("<<<EOT"),r.writeNoIndent(n),r.newLine(),r.writeNoIndent("EOT")}writeClass({writer:r,class_:n}){r.writeNode(new J({classReference:n.reference,arguments_:[t.map({entries:n.fields.map(o=>({key:t.string(o.name),value:o.value}))})]}))}writeList({writer:r,list:n}){let o=cx({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("]")}writeMap({writer:r,map:n}){let o=lx({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("]")}static list({values:r}){return new this({type:"list",values:r})}static boolean(r){return new this({type:"boolean",value:r})}static class_({reference:r,fields:n}){return new this({type:"class",reference:r,fields:n})}static file(r){return new this({type:"file",value:r})}static float(r){return new this({type:"float",value:r})}static datetime(r){return new this({type:"datetime",value:r})}static number(r){return new this({type:"number",value:r})}static map({entries:r}){return new this({type:"map",entries:r})}static reference(r){return new this({type:"reference",value:r})}static string(r){return new this({type:"string",value: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.writeUnknownMap({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("]")}writeUnknownMap({writer:r,value:n}){let o=Object.entries(n);if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let[i,u]of o)r.write(`'${i}' => `),r.writeNode(t.unknown(u)),r.writeLine(",");r.dedent(),r.write("]")}};function fx({writer:t,value:e}){return new J({classReference:new L({name:"DateTime",namespace:""}),arguments_:[new B(`'${e}'`)]})}function px({writer:t,value:e}){return new ue({on:new L({name:"File",namespace:`${t.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new B(`"${e}"`)]})}function lx({entries:t}){return t.filter(e=>!be.isNop(e.key)&&!be.isNop(e.value))}function cx({values:t}){return t.filter(e=>!be.isNop(e))}a();s();var Ut=class extends w{constructor(r){super();d(this,"arrays");this.arrays=r}write(r){r.write("array_merge"),pr({writer:r,arguments_:this.arrays.map(n=>De(o=>{if(typeof n=="string"||n instanceof w){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function dx(t){return new Be(t)}function yx(t){return new Ue(t)}function mx(t){return new ie(t)}function hx(t){return new qe(t)}function gx(t){return new L(t)}function De(t){return new B(t)}function xx(t){return new $e(t)}function vx(t){return new ke(t)}function wx(t){return new _e(t)}function Ep(t){return new J(t)}function bx(t){return new ue(t)}function Ax(t){return De(e=>{e.write("throw "),e.writeNode(Ep(t))})}function Sx(t){return new Me(t)}function Ex(t){return new se(t)}function Tx(t){return new ae(t)}function Rx(t){return new Ur(t)}function Px(t,e){return De(r=>{r.writeNodeOrString(t),r.write(" = "),r.writeNodeOrString(e)})}function Ix(t){return De(ve(t))}function Nx(t){return De(`"${t}"`)}function Fx(...t){return new Ut(t)}function Cx(){return new B(t=>{t.write("$this")})}var Tp="$client",qt="Example",Rp=`<?php
|
|
31
31
|
|
|
32
|
-
`,$t=class{constructor({context:e}){d(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Tp+await n.toStringAsync({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Tp+n.toString({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:e,snippet:r}){return x.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})}constructClient({endpoint:e,snippet:r}){return x.codeblock(n=>{n.write(`${Ep} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:r})))})}callMethod({endpoint:e,snippet:r}){return x.invokeMethod({on:x.codeblock(Ep),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:r}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:r}){let n=[];e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:E.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let o=[],i=this.getConstructorBaseUrlArgs({baseUrl:r.baseURL,environment:r.environment});return i.length>0&&o.push(...i),this.context.errors.scope(H.Headers),this.context.ir.headers!=null&&r.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:x.TypeLiteral.map({entries:o.map(u=>({key:x.TypeLiteral.string(u.name),value:u.value}))})}]}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArgs({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:E.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:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});default:P(e)}}getConstructorBasicAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),assignment:x.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),assignment:x.TypeLiteral.string(r.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:r}){let n=this.getBaseUrlArg({baseUrl:e,environment:r});return x.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:e,environment:r}){if(e!=null&&r!=null)return this.context.errors.add({severity:E.Critical,message:"Cannot specify both baseUrl and environment options"}),x.TypeLiteral.nop();if(e!=null)return x.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentClassAccessFromID(r);return n==null?(this.context.errors.add({severity:E.Warning,message:`Environment ${JSON.stringify(r)} was not found`}),x.TypeLiteral.nop()):x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(r)&&this.context.errors.add({severity:E.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return x.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),assignment:x.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),assignment: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({name:this.context.getPropertyName(o.name.name),value:i})}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!x.TypeLiteral.isNop(n))return n}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:P(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){let n=[];if(this.context.errors.scope(H.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(H.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:P(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:E.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),x.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:r}){let n=[];this.context.errors.scope(H.PathParameters);let i=[];e.pathParameters!=null&&i.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let u=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:!1})||n.push(...i.map(p=>p.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:!1,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:!1})?i:[],filePropertyInfo:u})),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 h,g,v,b;this.context.errors.scope(H.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(g=r.queryParameters)!=null?g:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.Headers);let c=this.context.associateByWireValue({parameters:(v=e.headers)!=null?v:[],values:(b=r.headers)!=null?b:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let y=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...n,...u,...c,...y]})}getInlinedRequestBodyConstructorFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:P(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({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:P(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});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 u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getPropertyName(r)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return x.instantiateClass({classReference:x.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};a();s();a();s();var kt=class{constructor({context:e}){d(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?x.TypeLiteral.null():(this.context.errors.add({severity:E.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(e.value===void 0)return x.TypeLiteral.nop();switch(e.typeReference.type){case"list":case"set":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?x.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"unknown":return this.convertUnknown({value:e.value});default:P(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.string(n)}default:P(e)}}convertList({list:e,value:r}){return Array.isArray(r)?x.TypeLiteral.list({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:E.Critical,message:`Expected array but got: ${typeof r}`}),x.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:E.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),x.TypeLiteral.nop()):x.TypeLiteral.map({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}){switch(e.type){case"alias":return 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:P(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){return x.TypeLiteral.string("todo")}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),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.getEnumValueName({enum_:e,value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:E.Critical,message:`Expected enum value string, got: ${typeof r}`});return}let n=e.values.find(o=>o.wireValue===r);if(n==null){this.context.errors.add({severity:E.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?x.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:E.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return x.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.string(o)}default:P(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})}};a();s();var _t=class{constructor({context:e}){d(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 u of e.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:o})});break;default:P(u)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.file(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.list({values:n.map(o=>x.TypeLiteral.file(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?x.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var Cx=["use","clone","list"],Ox="Requests",Lx="Types",Mt=class t extends _r{constructor({ir:r,config:n}){var o;super({ir:r,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new kt({context:this}),this.filePropertyMapper=new _t({context:this}),this.rootNamespace=Bx({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new t({ir:this.ir,config:this.config})}getParameterName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getPropertyName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getMethodName(r){let n=r.camelCase.unsafeName;return Cx.includes(n)?n:r.camelCase.safeName}getClassName(r){return r.pascalCase.safeName}getRootClientClassName(){var r,n,o;return((r=this.customConfig)==null?void 0:r.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return x.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(r){return this.getNamespace(r,Ox)}getTypesNamespace(r){return this.getNamespace(r,Lx)}getNamespace(r,n){let o=r.allParts.map(i=>i.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return x.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(r){return x.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(r){return/^[a-zA-Z_]/.test(r)?r:`_${r}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${sr(Ot(this.config.organization))}`}};function Bx({organization:t,namespaceOverride:e}){return e!=null?e:`${sr(Ot(t))}`}var Dt=class extends qr{constructor({ir:e,config:r}){super(new Mt({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new $t({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
32
|
+
`,$t=class{constructor({context:e}){d(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Rp+await n.toStringAsync({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Rp+n.toString({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:e,snippet:r}){return x.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})}constructClient({endpoint:e,snippet:r}){return x.codeblock(n=>{n.write(`${Tp} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:r})))})}callMethod({endpoint:e,snippet:r}){return x.invokeMethod({on:x.codeblock(Tp),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:r}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:r}){let n=[];e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:E.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let o=[],i=this.getConstructorBaseUrlArgs({baseUrl:r.baseURL,environment:r.environment});return i.length>0&&o.push(...i),this.context.errors.scope(H.Headers),this.context.ir.headers!=null&&r.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:x.TypeLiteral.map({entries:o.map(u=>({key:x.TypeLiteral.string(u.name),value:u.value}))})}]}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArgs({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:E.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:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});default:P(e)}}getConstructorBasicAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),assignment:x.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),assignment:x.TypeLiteral.string(r.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:r}){let n=this.getBaseUrlArg({baseUrl:e,environment:r});return x.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:e,environment:r}){if(e!=null&&r!=null)return this.context.errors.add({severity:E.Critical,message:"Cannot specify both baseUrl and environment options"}),x.TypeLiteral.nop();if(e!=null)return x.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentClassAccessFromID(r);return n==null?(this.context.errors.add({severity:E.Warning,message:`Environment ${JSON.stringify(r)} was not found`}),x.TypeLiteral.nop()):x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(r)&&this.context.errors.add({severity:E.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return x.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),assignment:x.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),assignment: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({name:this.context.getPropertyName(o.name.name),value:i})}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!x.TypeLiteral.isNop(n))return n}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:P(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){let n=[];if(this.context.errors.scope(H.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(H.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:P(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:E.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),x.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:r}){var p,c;let n=[],o=(c=(p=this.context.customConfig)==null?void 0:p.inlinePathParameters)!=null?c:!1;this.context.errors.scope(H.PathParameters);let i=[];e.pathParameters!=null&&i.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let u=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...i.map(y=>y.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?i:[],filePropertyInfo:u})),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 h,g,v,b;this.context.errors.scope(H.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(g=r.queryParameters)!=null?g:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.Headers);let c=this.context.associateByWireValue({parameters:(v=e.headers)!=null?v:[],values:(b=r.headers)!=null?b:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let y=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...n,...u,...c,...y]})}getInlinedRequestBodyConstructorFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:P(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({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:P(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});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 u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getPropertyName(r)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return x.instantiateClass({classReference:x.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};a();s();a();s();var kt=class{constructor({context:e}){d(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?x.TypeLiteral.null():(this.context.errors.add({severity:E.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(e.value===void 0)return x.TypeLiteral.nop();switch(e.typeReference.type){case"list":case"set":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?x.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"unknown":return this.convertUnknown({value:e.value});default:P(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.string(n)}default:P(e)}}convertList({list:e,value:r}){return Array.isArray(r)?x.TypeLiteral.list({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:E.Critical,message:`Expected array but got: ${typeof r}`}),x.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:E.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),x.TypeLiteral.nop()):x.TypeLiteral.map({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}){switch(e.type){case"alias":return 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:P(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){return x.TypeLiteral.string("todo")}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),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.getEnumValueName({enum_:e,value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:E.Critical,message:`Expected enum value string, got: ${typeof r}`});return}let n=e.values.find(o=>o.wireValue===r);if(n==null){this.context.errors.add({severity:E.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?x.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:E.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return x.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.string(o)}default:P(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})}};a();s();var _t=class{constructor({context:e}){d(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 u of e.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:o})});break;default:P(u)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.file(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.list({values:n.map(o=>x.TypeLiteral.file(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?x.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var Ox=["use","clone","list"],Lx="Requests",Bx="Types",Mt=class t extends Mr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new kt({context:this}),this.filePropertyMapper=new _t({context:this}),this.rootNamespace=Ux({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new t({ir:this.ir,config:this.config})}getParameterName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getPropertyName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getMethodName(r){let n=r.camelCase.unsafeName;return Ox.includes(n)?n:r.camelCase.safeName}getClassName(r){return r.pascalCase.safeName}getRootClientClassName(){var r,n,o;return((r=this.customConfig)==null?void 0:r.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return x.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(r){return this.getNamespace(r,Lx)}getTypesNamespace(r){return this.getNamespace(r,Bx)}getNamespace(r,n){let o=r.allParts.map(i=>i.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return x.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(r){return x.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(r){return/^[a-zA-Z_]/.test(r)?r:`_${r}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${ur(Lt(this.config.organization))}`}};function Ux({organization:t,namespaceOverride:e}){return e!=null?e:`${ur(Lt(t))}`}var Dt=class extends $r{constructor({ir:e,config:r}){super(new Mt({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new $t({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
33
33
|
/*! Bundled license information:
|
|
34
34
|
|
|
35
35
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|