@fern-api/ruby-dynamic-snippets 0.0.1
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 +26 -0
- package/cjs/DynamicSnippetsGenerator.d.cts +19 -0
- package/cjs/DynamicSnippetsGeneratorContext-BGmCyT7y.d.cts +52 -0
- package/cjs/EndpointSnippetGenerator.cjs +26 -0
- package/cjs/EndpointSnippetGenerator.d.cts +40 -0
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +26 -0
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +4 -0
- package/cjs/context/DynamicToLiteralMapper.cjs +26 -0
- package/cjs/context/DynamicToLiteralMapper.d.cts +4 -0
- package/cjs/index.cjs +38 -0
- package/cjs/index.d.cts +6 -0
- package/esm/DynamicSnippetsGenerator.d.ts +19 -0
- package/esm/DynamicSnippetsGenerator.js +1 -0
- package/esm/DynamicSnippetsGeneratorContext-BGmCyT7y.d.ts +52 -0
- package/esm/EndpointSnippetGenerator.d.ts +40 -0
- package/esm/EndpointSnippetGenerator.js +1 -0
- package/esm/chunk-2EUGHB6H.js +26 -0
- package/esm/chunk-5MYTC5XX.js +1 -0
- package/esm/chunk-JE27KH5P.js +1 -0
- package/esm/chunk-P72WBQKD.js +1 -0
- package/esm/chunk-T3CDT3YD.js +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +4 -0
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -0
- package/esm/context/DynamicToLiteralMapper.d.ts +4 -0
- package/esm/context/DynamicToLiteralMapper.js +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +13 -0
- package/package.json +27 -0
package/cjs/index.cjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";var Nu=Object.create;var Ge=Object.defineProperty,Cu=Object.defineProperties,Fu=Object.getOwnPropertyDescriptor,Ou=Object.getOwnPropertyDescriptors,qu=Object.getOwnPropertyNames,Er=Object.getOwnPropertySymbols,Lu=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable;var Et=(t,e,r)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zn=(t,e)=>{for(var r in e||(e={}))Tt.call(e,r)&&Et(t,r,e[r]);if(Er)for(var r of Er(e))Wn.call(e,r)&&Et(t,r,e[r]);return t},Vn=(t,e)=>Cu(t,Ou(e));var Yn=t=>typeof t=="symbol"?t:t+"",jn=(t,e)=>{var r={};for(var n in t)Tt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Er)for(var n of Er(t))e.indexOf(n)<0&&Wn.call(t,n)&&(r[n]=t[n]);return r};var Ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Rt=(t,e)=>{for(var r in e)Ge(t,r,{get:e[r],enumerable:!0})},Hn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qu(e))!Tt.call(t,i)&&i!==r&&Ge(t,i,{get:()=>e[i],enumerable:!(n=Fu(e,i))||n.enumerable});return t};var $u=(t,e,r)=>(r=t!=null?Nu(Lu(t)):{},Hn(e||!t||!t.__esModule?Ge(r,"default",{value:t,enumerable:!0}):r,t)),Kn=t=>Hn(Ge({},"__esModule",{value:!0}),t);var y=(t,e,r)=>Et(t,typeof e!="symbol"?e+"":e,r);function Xn(){throw new Error("setTimeout has not been defined")}function Qn(){throw new Error("clearTimeout has not been defined")}function Zn(t){if(X===setTimeout)return setTimeout(t,0);if((X===Xn||!X)&&setTimeout)return X=setTimeout,setTimeout(t,0);try{return X(t,0)}catch(e){try{return X.call(null,t,0)}catch(r){return X.call(this,t,0)}}}function ku(t){if(Q===clearTimeout)return clearTimeout(t);if((Q===Qn||!Q)&&clearTimeout)return Q=clearTimeout,clearTimeout(t);try{return Q(t)}catch(e){try{return Q.call(null,t)}catch(r){return Q.call(this,t)}}}function Bu(){!Re||!ie||(Re=!1,ie.length?z=ie.concat(z):Tr=-1,z.length&&ei())}function ei(){if(!Re){var t=Zn(Bu);Re=!0;for(var e=z.length;e;){for(ie=z,z=[];++Tr<e;)ie&&ie[Tr].run();Tr=-1,e=z.length}ie=null,Re=!1,ku(t)}}function Du(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 ri(t,e)),z.length===1&&!Re&&Zn(ei)}function ri(t,e){this.fun=t,this.array=e}function oe(){}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 il(){return 0}function al(t){var e=ol.call(Te)*.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 X,Q,z,Re,ie,Tr,_u,Mu,Uu,Gu,Wu,zu,Vu,Yu,ju,Hu,Ku,Ju,Xu,Qu,Zu,el,Te,ol,sl,f,Jn,s=Ee(()=>{"use strict";X=Xn,Q=Qn;typeof globalThis.setTimeout=="function"&&(X=setTimeout);typeof globalThis.clearTimeout=="function"&&(Q=clearTimeout);z=[],Re=!1,Tr=-1;ri.prototype.run=function(){this.fun.apply(null,this.array)};_u="browser",Mu="browser",Uu=!0,Gu={},Wu=[],zu="",Vu={},Yu={},ju={};Hu=oe,Ku=oe,Ju=oe,Xu=oe,Qu=oe,Zu=oe,el=oe;Te=globalThis.performance||{},ol=Te.now||Te.mozNow||Te.msNow||Te.oNow||Te.webkitNow||function(){return new Date().getTime()};sl=new Date;f={nextTick:Du,title:_u,browser:Uu,env:Gu,argv:Wu,version:zu,versions:Vu,on:Hu,addListener:Ku,once:Ju,off:Xu,removeListener:Qu,removeAllListeners:Zu,emit:el,binding:rl,cwd:tl,chdir:nl,umask:il,hrtime:al,platform:Mu,release:Yu,config:ju,uptime:ul},Jn={};Object.keys(Jn).forEach(t=>{let e=t.split("."),r=f;for(let n=0;n<e.length;n++){let i=e[n];n===e.length-1?r[i]=Jn[t]:r=r[i]||(r[i]={})}})});function oi(){Pt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)B[e]=t[e],L[t.charCodeAt(e)]=e;L[45]=62,L[95]=63}function cl(t){Pt||oi();var e,r,n,i,o,a,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=t[c-2]==="="?2:t[c-1]==="="?1:0,a=new ll(c*3/4-o),n=o>0?c-4:c;var p=0;for(e=0,r=0;e<n;e+=4,r+=3)i=L[t.charCodeAt(e)]<<18|L[t.charCodeAt(e+1)]<<12|L[t.charCodeAt(e+2)]<<6|L[t.charCodeAt(e+3)],a[p++]=i>>16&255,a[p++]=i>>8&255,a[p++]=i&255;return o===2?(i=L[t.charCodeAt(e)]<<2|L[t.charCodeAt(e+1)]>>4,a[p++]=i&255):o===1&&(i=L[t.charCodeAt(e)]<<10|L[t.charCodeAt(e+1)]<<4|L[t.charCodeAt(e+2)]>>2,a[p++]=i>>8&255,a[p++]=i&255),a}function pl(t){return B[t>>18&63]+B[t>>12&63]+B[t>>6&63]+B[t&63]}function fl(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(pl(n));return i.join("")}function ti(t){Pt||oi();for(var e,r=t.length,n=r%3,i="",o=[],a=16383,c=0,p=r-n;c<p;c+=a)o.push(fl(t,c,c+a>p?p:c+a));return n===1?(e=t[r-1],i+=B[e>>2],i+=B[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=B[e>>10],i+=B[e>>4&63],i+=B[e<<2&63],i+="="),o.push(i),o.join("")}function Rr(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function V(t,e){if(Rr()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=l.prototype):(t===null&&(t=new l(e)),t.length=e),t}function l(t,e,r){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(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 Nt(this,t)}return ai(this,t,e,r)}function ai(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?dl(t,e,r,n):typeof e=="string"?hl(t,e,r):ml(t,e)}function si(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 yl(t,e,r,n){return si(e),e<=0?V(t,e):r!==void 0?typeof n=="string"?V(t,e).fill(r,n):V(t,e).fill(r):V(t,e)}function Nt(t,e){if(si(e),t=V(t,e<0?0:Ct(e)|0),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function hl(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=ui(e,r)|0;t=V(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function It(t,e){var r=e.length<0?0:Ct(e.length)|0;t=V(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function dl(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),l.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=l.prototype):t=It(t,e),t}function ml(t,e){if(D(e)){var r=Ct(e.length)|0;return t=V(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"||$l(e.length)?V(t,0):It(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return It(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Ct(t){if(t>=Rr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rr().toString(16)+" bytes");return t|0}function D(t){return!!(t!=null&&t._isBuffer)}function ui(t,e){if(D(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 Ir(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return di(t).length;default:if(n)return Ir(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 Il(this,e,r);case"utf8":case"utf-8":return pi(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 Pl(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ae(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function li(t,e,r,n,i){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=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=l.from(e,n)),D(e))return e.length===0?-1:ni(t,e,r,n,i);if(typeof e=="number")return e=e&255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):ni(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ni(t,e,r,n,i){var o=1,a=t.length,c=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;o=2,a/=2,c/=2,r/=2}function p(A,T){return o===1?A[T]:A.readUInt16BE(T*o)}var d;if(i){var v=-1;for(d=r;d<a;d++)if(p(t,d)===p(e,v===-1?0:d-v)){if(v===-1&&(v=d),d-v+1===c)return v*o}else v!==-1&&(d-=d-v),v=-1}else for(r+c>a&&(r=a-c),d=r;d>=0;d--){for(var m=!0,w=0;w<c;w++)if(p(t,d+w)!==p(e,w)){m=!1;break}if(m)return d}return-1}function vl(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var c=parseInt(e.substr(a*2,2),16);if(isNaN(c))return a;t[r+a]=c}return a}function wl(t,e,r,n){return Cr(Ir(e,t.length-r),t,r,n)}function ci(t,e,r,n){return Cr(ql(e),t,r,n)}function xl(t,e,r,n){return ci(t,e,r,n)}function Al(t,e,r,n){return Cr(di(e),t,r,n)}function bl(t,e,r,n){return Cr(Ll(e,t.length-r),t,r,n)}function Sl(t,e,r){return e===0&&r===t.length?ti(t):ti(t.slice(e,r))}function pi(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=r){var p,d,v,m;switch(c){case 1:o<128&&(a=o);break;case 2:p=t[i+1],(p&192)===128&&(m=(o&31)<<6|p&63,m>127&&(a=m));break;case 3:p=t[i+1],d=t[i+2],(p&192)===128&&(d&192)===128&&(m=(o&15)<<12|(p&63)<<6|d&63,m>2047&&(m<55296||m>57343)&&(a=m));break;case 4:p=t[i+1],d=t[i+2],v=t[i+3],(p&192)===128&&(d&192)===128&&(v&192)===128&&(m=(o&15)<<18|(p&63)<<12|(d&63)<<6|v&63,m>65535&&m<1114112&&(a=m))}}a===null?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=c}return El(n)}function El(t){var e=t.length;if(e<=ii)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ii));return r}function Tl(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function Rl(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function Il(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=Ol(t[o]);return i}function Pl(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function I(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 O(t,e,r,n,i,o){if(!D(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Pr(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Nr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>(n?i:3-i)*8&255}function fi(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function yi(t,e,r,n,i){return i||fi(t,e,r,4,34028234663852886e22,-34028234663852886e22),gi(t,e,r,n,23,4),r+4}function hi(t,e,r,n,i){return i||fi(t,e,r,8,17976931348623157e292,-17976931348623157e292),gi(t,e,r,n,52,8),r+8}function Cl(t){if(t=Fl(t).replace(Nl,""),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 Ol(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ir(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function ql(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,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function di(t){return cl(Cl(t))}function Cr(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $l(t){return t!==t}function kl(t){return t!=null&&(!!t._isBuffer||mi(t)||Bl(t))}function mi(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Bl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&mi(t.slice(0,0))}function Fr(t,e,r,n,i){var o,a,c=i*8-n-1,p=(1<<c)-1,d=p>>1,v=-7,m=r?i-1:0,w=r?-1:1,A=t[e+m];for(m+=w,o=A&(1<<-v)-1,A>>=-v,v+=c;v>0;o=o*256+t[e+m],m+=w,v-=8);for(a=o&(1<<-v)-1,o>>=-v,v+=n;v>0;a=a*256+t[e+m],m+=w,v-=8);if(o===0)o=1-d;else{if(o===p)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-d}return(A?-1:1)*a*Math.pow(2,o-n)}function gi(t,e,r,n,i,o){var a,c,p,d=o*8-i-1,v=(1<<d)-1,m=v>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,T=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=v):(a=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+m>=1?e+=w/p:e+=w*Math.pow(2,1-m),e*p>=2&&(a++,p/=2),a+m>=v?(c=0,a=v):a+m>=1?(c=(e*p-1)*Math.pow(2,i),a=a+m):(c=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;t[r+A]=c&255,A+=T,c/=256,i-=8);for(a=a<<i|c,d+=i;d>0;t[r+A]=a&255,A+=T,a/=256,d-=8);t[r+A-T]|=E*128}var B,L,ll,Pt,ii,Nl,vi=Ee(()=>{"use strict";s();u();B=[],L=[],ll=typeof Uint8Array!="undefined"?Uint8Array:Array,Pt=!1;l.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;l.poolSize=8192;l._augment=function(t){return t.__proto__=l.prototype,t};l.from=function(t,e,r){return ai(null,t,e,r)};l.kMaxLength=Rr();l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]);l.alloc=function(t,e,r){return yl(null,t,e,r)};l.allocUnsafe=function(t){return Nt(null,t)};l.allocUnsafeSlow=function(t){return Nt(null,t)};l.isBuffer=kl;l.compare=function(e,r){if(!D(e)||!D(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0};l.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}};l.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return l.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=l.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!D(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};l.byteLength=ui;l.prototype._isBuffer=!0;l.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)ae(this,r,r+1);return this};l.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)ae(this,r,r+3),ae(this,r+1,r+2);return this};l.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)ae(this,r,r+7),ae(this,r+1,r+6),ae(this,r+2,r+5),ae(this,r+3,r+4);return this};l.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?pi(this,0,e):gl.apply(this,arguments)};l.prototype.equals=function(e){if(!D(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:l.compare(this,e)===0};l.prototype.compare=function(e,r,n,i,o){if(!D(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,c=n-r,p=Math.min(a,c),d=this.slice(i,o),v=e.slice(r,n),m=0;m<p;++m)if(d[m]!==v[m]){a=d[m],c=v[m];break}return a<c?-1:c<a?1:0};l.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};l.prototype.indexOf=function(e,r,n){return li(this,e,r,n,!0)};l.prototype.lastIndexOf=function(e,r,n){return li(this,e,r,n,!1)};l.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return vl(this,e,r,n);case"utf8":case"utf-8":return wl(this,e,r,n);case"ascii":return ci(this,e,r,n);case"latin1":case"binary":return xl(this,e,r,n);case"base64":return Al(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bl(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ii=4096;l.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 i;if(l.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=l.prototype;else{var o=r-e;i=new l(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i};l.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||I(e,r,this.length);for(var i=this[e],o=1,a=0;++a<r&&(o*=256);)i+=this[e+a]*o;return i};l.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||I(e,r,this.length);for(var i=this[e+--r],o=1;r>0&&(o*=256);)i+=this[e+--r]*o;return i};l.prototype.readUInt8=function(e,r){return r||I(e,1,this.length),this[e]};l.prototype.readUInt16LE=function(e,r){return r||I(e,2,this.length),this[e]|this[e+1]<<8};l.prototype.readUInt16BE=function(e,r){return r||I(e,2,this.length),this[e]<<8|this[e+1]};l.prototype.readUInt32LE=function(e,r){return r||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};l.prototype.readUInt32BE=function(e,r){return r||I(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};l.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||I(e,r,this.length);for(var i=this[e],o=1,a=0;++a<r&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};l.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||I(e,r,this.length);for(var i=r,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};l.prototype.readInt8=function(e,r){return r||I(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};l.prototype.readInt16LE=function(e,r){r||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};l.prototype.readInt16BE=function(e,r){r||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};l.prototype.readInt32LE=function(e,r){return r||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};l.prototype.readInt32BE=function(e,r){return r||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};l.prototype.readFloatLE=function(e,r){return r||I(e,4,this.length),Fr(this,e,!0,23,4)};l.prototype.readFloatBE=function(e,r){return r||I(e,4,this.length),Fr(this,e,!1,23,4)};l.prototype.readDoubleLE=function(e,r){return r||I(e,8,this.length),Fr(this,e,!0,52,8)};l.prototype.readDoubleBE=function(e,r){return r||I(e,8,this.length),Fr(this,e,!1,52,8)};l.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;O(this,e,r,n,o,0)}var a=1,c=0;for(this[r]=e&255;++c<n&&(a*=256);)this[r+c]=e/a&255;return r+n};l.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;O(this,e,r,n,o,0)}var a=n-1,c=1;for(this[r+a]=e&255;--a>=0&&(c*=256);)this[r+a]=e/c&255;return r+n};l.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};l.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Pr(this,e,r,!0),r+2};l.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Pr(this,e,r,!1),r+2};l.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):Nr(this,e,r,!0),r+4};l.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Nr(this,e,r,!1),r+4};l.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r|0,!i){var o=Math.pow(2,8*n-1);O(this,e,r,n,o-1,-o)}var a=0,c=1,p=0;for(this[r]=e&255;++a<n&&(c*=256);)e<0&&p===0&&this[r+a-1]!==0&&(p=1),this[r+a]=(e/c>>0)-p&255;return r+n};l.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r|0,!i){var o=Math.pow(2,8*n-1);O(this,e,r,n,o-1,-o)}var a=n-1,c=1,p=0;for(this[r+a]=e&255;--a>=0&&(c*=256);)e<0&&p===0&&this[r+a+1]!==0&&(p=1),this[r+a]=(e/c>>0)-p&255;return r+n};l.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};l.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Pr(this,e,r,!0),r+2};l.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Pr(this,e,r,!1),r+2};l.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):Nr(this,e,r,!0),r+4};l.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||O(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Nr(this,e,r,!1),r+4};l.prototype.writeFloatLE=function(e,r,n){return yi(this,e,r,!0,n)};l.prototype.writeFloatBE=function(e,r,n){return yi(this,e,r,!1,n)};l.prototype.writeDoubleLE=function(e,r,n){return hi(this,e,r,!0,n)};l.prototype.writeDoubleBE=function(e,r,n){return hi(this,e,r,!1,n)};l.prototype.copy=function(e,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===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(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o=i-n,a;if(this===e&&n<r&&r<i)for(a=o-1;a>=0;--a)e[a+r]=this[a+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)e[a+r]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),r);return o};l.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var c=D(e)?e:Ir(new l(e,i).toString()),p=c.length;for(a=0;a<n-r;++a)this[a+r]=c[a%p]}return this};Nl=/[^+\/0-9A-Za-z-_]/g});var u=Ee(()=>{"use strict";vi()});var Ft=h((Eh,wi)=>{"use strict";s();u();wi.exports=Object});var Ai=h((Ih,xi)=>{"use strict";s();u();xi.exports=Error});var Si=h((Ch,bi)=>{"use strict";s();u();bi.exports=EvalError});var Ti=h((qh,Ei)=>{"use strict";s();u();Ei.exports=RangeError});var Ii=h((kh,Ri)=>{"use strict";s();u();Ri.exports=ReferenceError});var Ot=h((_h,Pi)=>{"use strict";s();u();Pi.exports=SyntaxError});var N=h((Gh,Ni)=>{"use strict";s();u();Ni.exports=TypeError});var Fi=h((Vh,Ci)=>{"use strict";s();u();Ci.exports=URIError});var qt=h((Hh,Oi)=>{"use strict";s();u();Oi.exports=Math.abs});var Lt=h((Xh,qi)=>{"use strict";s();u();qi.exports=Math.floor});var $i=h((ed,Li)=>{"use strict";s();u();Li.exports=Math.max});var $t=h((nd,ki)=>{"use strict";s();u();ki.exports=Math.min});var Di=h((ad,Bi)=>{"use strict";s();u();Bi.exports=Math.pow});var Mi=h((ld,_i)=>{"use strict";s();u();_i.exports=Math.round});var Or=h((fd,Ui)=>{"use strict";s();u();Ui.exports=Number.isNaN||function(e){return e!==e}});var Wi=h((dd,Gi)=>{"use strict";s();u();var Dl=Or();Gi.exports=function(e){return Dl(e)||e===0?e:e<0?-1:1}});var Vi=h((vd,zi)=>{"use strict";s();u();zi.exports=Object.getOwnPropertyDescriptor});var Ie=h((Ad,Yi)=>{"use strict";s();u();var qr=Vi();if(qr)try{qr([],"length")}catch(t){qr=null}Yi.exports=qr});var We=h((Ed,ji)=>{"use strict";s();u();var Lr=Object.defineProperty||!1;if(Lr)try{Lr({},"a",{value:1})}catch(t){Lr=!1}ji.exports=Lr});var kt=h((Id,Hi)=>{"use strict";s();u();Hi.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 i=42;e[r]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,r);if(c.value!==i||c.enumerable!==!0)return!1}return!0}});var Bt=h((Cd,Ji)=>{"use strict";s();u();var Ki=typeof Symbol!="undefined"&&Symbol,_l=kt();Ji.exports=function(){return typeof Ki!="function"||typeof Symbol!="function"||typeof Ki("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_l()}});var Dt=h((qd,Xi)=>{"use strict";s();u();Xi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var _t=h((kd,Qi)=>{"use strict";s();u();var Ml=Ft();Qi.exports=Ml.getPrototypeOf||null});var ro=h((_d,eo)=>{"use strict";s();u();var Ul="Function.prototype.bind called on incompatible ",Gl=Object.prototype.toString,Wl=Math.max,zl="[object Function]",Zi=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},Vl=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},Yl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};eo.exports=function(e){var r=this;if(typeof r!="function"||Gl.apply(r)!==zl)throw new TypeError(Ul+r);for(var n=Vl(arguments,1),i,o=function(){if(this instanceof i){var v=r.apply(this,Zi(n,arguments));return Object(v)===v?v:this}return r.apply(e,Zi(n,arguments))},a=Wl(0,r.length-n.length),c=[],p=0;p<a;p++)c[p]="$"+p;if(i=Function("binder","return function ("+Yl(c,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var d=function(){};d.prototype=r.prototype,i.prototype=new d,d.prototype=null}return i}});var Pe=h((Gd,to)=>{"use strict";s();u();var jl=ro();to.exports=Function.prototype.bind||jl});var $r=h((Vd,no)=>{"use strict";s();u();no.exports=Function.prototype.call});var kr=h((Hd,io)=>{"use strict";s();u();io.exports=Function.prototype.apply});var ao=h((Xd,oo)=>{"use strict";s();u();oo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Mt=h((em,so)=>{"use strict";s();u();var Hl=Pe(),Kl=kr(),Jl=$r(),Xl=ao();so.exports=Xl||Hl.call(Jl,Kl)});var Br=h((nm,uo)=>{"use strict";s();u();var Ql=Pe(),Zl=N(),ec=$r(),rc=Mt();uo.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Zl("a function is required");return rc(Ql,ec,e)}});var ho=h((am,yo)=>{"use strict";s();u();var tc=Br(),lo=Ie(),po;try{po=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Ut=!!po&&lo&&lo(Object.prototype,"__proto__"),fo=Object,co=fo.getPrototypeOf;yo.exports=Ut&&typeof Ut.get=="function"?tc([Ut.get]):typeof co=="function"?function(e){return co(e==null?e:fo(e))}:!1});var xo=h((lm,wo)=>{"use strict";s();u();var mo=Dt(),go=_t(),vo=ho();wo.exports=mo?function(e){return mo(e)}:go?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return go(e)}:vo?function(e){return vo(e)}:null});var Gt=h((fm,Ao)=>{"use strict";s();u();var nc=Function.prototype.call,ic=Object.prototype.hasOwnProperty,oc=Pe();Ao.exports=oc.call(nc,ic)});var Y=h((dm,Io)=>{"use strict";s();u();var x,ac=Ft(),sc=Ai(),uc=Si(),lc=Ti(),cc=Ii(),Oe=Ot(),Fe=N(),pc=Fi(),fc=qt(),yc=Lt(),hc=$i(),dc=$t(),mc=Di(),gc=Mi(),vc=Wi(),To=Function,Wt=function(t){try{return To('"use strict"; return ('+t+").constructor;")()}catch(e){}},ze=Ie(),wc=We(),zt=function(){throw new Fe},xc=ze?function(){try{return arguments.callee,zt}catch(t){try{return ze(arguments,"callee").get}catch(e){return zt}}}():zt,Ne=Bt()(),P=xo(),Ac=_t(),bc=Dt(),Ro=kr(),Ve=$r(),Ce={},Sc=typeof Uint8Array=="undefined"||!P?x:P(Uint8Array),se={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?x:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?x:ArrayBuffer,"%ArrayIteratorPrototype%":Ne&&P?P([][Symbol.iterator]()):x,"%AsyncFromSyncIteratorPrototype%":x,"%AsyncFunction%":Ce,"%AsyncGenerator%":Ce,"%AsyncGeneratorFunction%":Ce,"%AsyncIteratorPrototype%":Ce,"%Atomics%":typeof Atomics=="undefined"?x:Atomics,"%BigInt%":typeof BigInt=="undefined"?x:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?x:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?x:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?x:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sc,"%eval%":eval,"%EvalError%":uc,"%Float16Array%":typeof Float16Array=="undefined"?x:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?x:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?x:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?x:FinalizationRegistry,"%Function%":To,"%GeneratorFunction%":Ce,"%Int8Array%":typeof Int8Array=="undefined"?x:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?x:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?x:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ne&&P?P(P([][Symbol.iterator]())):x,"%JSON%":typeof JSON=="object"?JSON:x,"%Map%":typeof Map=="undefined"?x:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ne||!P?x:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ac,"%Object.getOwnPropertyDescriptor%":ze,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?x:Promise,"%Proxy%":typeof Proxy=="undefined"?x:Proxy,"%RangeError%":lc,"%ReferenceError%":cc,"%Reflect%":typeof Reflect=="undefined"?x:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?x:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ne||!P?x:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?x:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ne&&P?P(""[Symbol.iterator]()):x,"%Symbol%":Ne?Symbol:x,"%SyntaxError%":Oe,"%ThrowTypeError%":xc,"%TypedArray%":Sc,"%TypeError%":Fe,"%Uint8Array%":typeof Uint8Array=="undefined"?x:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?x:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?x:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?x:Uint32Array,"%URIError%":pc,"%WeakMap%":typeof WeakMap=="undefined"?x:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?x:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?x:WeakSet,"%Function.prototype.call%":Ve,"%Function.prototype.apply%":Ro,"%Object.defineProperty%":wc,"%Object.getPrototypeOf%":Ac,"%Math.abs%":fc,"%Math.floor%":yc,"%Math.max%":hc,"%Math.min%":dc,"%Math.pow%":mc,"%Math.round%":gc,"%Math.sign%":vc,"%Reflect.getPrototypeOf%":bc};if(P)try{null.error}catch(t){bo=P(P(t)),se["%Error.prototype%"]=bo}var bo,Ec=function t(e){var r;if(e==="%AsyncFunction%")r=Wt("async function () {}");else if(e==="%GeneratorFunction%")r=Wt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Wt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&P&&(r=P(i.prototype))}return se[e]=r,r},So={__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"]},Ye=Pe(),Dr=Gt(),Tc=Ye.call(Ve,Array.prototype.concat),Rc=Ye.call(Ro,Array.prototype.splice),Eo=Ye.call(Ve,String.prototype.replace),_r=Ye.call(Ve,String.prototype.slice),Ic=Ye.call(Ve,RegExp.prototype.exec),Pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nc=/\\(\\)?/g,Cc=function(e){var r=_r(e,0,1),n=_r(e,-1);if(r==="%"&&n!=="%")throw new Oe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Oe("invalid intrinsic syntax, expected opening `%`");var i=[];return Eo(e,Pc,function(o,a,c,p){i[i.length]=c?Eo(p,Nc,"$1"):a||o}),i},Fc=function(e,r){var n=e,i;if(Dr(So,n)&&(i=So[n],n="%"+i[0]+"%"),Dr(se,n)){var o=se[n];if(o===Ce&&(o=Ec(n)),typeof o=="undefined"&&!r)throw new Fe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Oe("intrinsic "+e+" does not exist!")};Io.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Fe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Fe('"allowMissing" argument must be a boolean');if(Ic(/^%?[^%]*%?$/,e)===null)throw new Oe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Cc(e),i=n.length>0?n[0]:"",o=Fc("%"+i+"%",r),a=o.name,c=o.value,p=!1,d=o.alias;d&&(i=d[0],Rc(n,Tc([0,1],d)));for(var v=1,m=!0;v<n.length;v+=1){var w=n[v],A=_r(w,0,1),T=_r(w,-1);if((A==='"'||A==="'"||A==="`"||T==='"'||T==="'"||T==="`")&&A!==T)throw new Oe("property names with quotes must have matching quotes");if((w==="constructor"||!m)&&(p=!0),i+="."+w,a="%"+i+"%",Dr(se,a))c=se[a];else if(c!=null){if(!(w in c)){if(!r)throw new Fe("base intrinsic for "+e+" exists, but the property is not available.");return}if(ze&&v+1>=n.length){var E=ze(c,w);m=!!E,m&&"get"in E&&!("originalValue"in E.get)?c=E.get:c=c[w]}else m=Dr(c,w),c=c[w];m&&!p&&(se[a]=c)}}return c}});var Mr=h((vm,Co)=>{"use strict";s();u();var Po=We(),Oc=Ot(),qe=N(),No=Ie();Co.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new qe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new qe("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,p=!!No&&No(e,r);if(Po)Po(e,r,{configurable:a===null&&p?p.configurable:!a,enumerable:i===null&&p?p.enumerable:!i,value:n,writable:o===null&&p?p.writable:!o});else if(c||!i&&!o&&!a)e[r]=n;else throw new Oc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ur=h((Am,Oo)=>{"use strict";s();u();var Vt=We(),Fo=function(){return!!Vt};Fo.hasArrayLengthDefineBug=function(){if(!Vt)return null;try{return Vt([],"length",{value:1}).length!==1}catch(e){return!0}};Oo.exports=Fo});var Bo=h((Em,ko)=>{"use strict";s();u();var qc=Y(),qo=Mr(),Lc=Ur()(),Lo=Ie(),$o=N(),$c=qc("%Math.floor%");ko.exports=function(e,r){if(typeof e!="function")throw new $o("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||$c(r)!==r)throw new $o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Lo){var a=Lo(e,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Lc?qo(e,"length",r,!0,!0):qo(e,"length",r)),e}});var _o=h((Im,Do)=>{"use strict";s();u();var kc=Pe(),Bc=kr(),Dc=Mt();Do.exports=function(){return Dc(kc,Bc,arguments)}});var Wr=h((Cm,Gr)=>{"use strict";s();u();var _c=Bo(),Mo=We(),Mc=Br(),Uo=_o();Gr.exports=function(e){var r=Mc(arguments),n=e.length-(arguments.length-1);return _c(r,1+(n>0?n:0),!0)};Mo?Mo(Gr.exports,"apply",{value:Uo}):Gr.exports.apply=Uo});var Yt=h((qm,Wo)=>{"use strict";s();u();var Go=Object.prototype.toString;Wo.exports=function(e){var r=Go.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Go.call(e.callee)==="[object Function]"),n}});var Qo=h((km,Xo)=>{"use strict";s();u();var Jo;Object.keys||(je=Object.prototype.hasOwnProperty,jt=Object.prototype.toString,zo=Yt(),Ht=Object.prototype.propertyIsEnumerable,Vo=!Ht.call({toString:null},"toString"),Yo=Ht.call(function(){},"prototype"),He=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],zr=function(t){var e=t.constructor;return e&&e.prototype===t},jo={$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},Ho=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!jo["$"+t]&&je.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{zr(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ko=function(t){if(typeof window=="undefined"||!Ho)return zr(t);try{return zr(t)}catch(e){return!1}},Jo=function(e){var r=e!==null&&typeof e=="object",n=jt.call(e)==="[object Function]",i=zo(e),o=r&&jt.call(e)==="[object String]",a=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var c=Yo&&n;if(o&&e.length>0&&!je.call(e,0))for(var p=0;p<e.length;++p)a.push(String(p));if(i&&e.length>0)for(var d=0;d<e.length;++d)a.push(String(d));else for(var v in e)!(c&&v==="prototype")&&je.call(e,v)&&a.push(String(v));if(Vo)for(var m=Ko(e),w=0;w<He.length;++w)!(m&&He[w]==="constructor")&&je.call(e,He[w])&&a.push(He[w]);return a});var je,jt,zo,Ht,Vo,Yo,He,zr,jo,Ho,Ko;Xo.exports=Jo});var ta=h((_m,ra)=>{"use strict";s();u();var Uc=Array.prototype.slice,Gc=Yt(),Zo=Object.keys,Vr=Zo?function(e){return Zo(e)}:Qo(),ea=Object.keys;Vr.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 Gc(n)?ea(Uc.call(n)):ea(n)})}else Object.keys=Vr;return Object.keys||Vr};ra.exports=Vr});var Yr=h((Gm,aa)=>{"use strict";s();u();var Wc=ta(),zc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Vc=Object.prototype.toString,Yc=Array.prototype.concat,na=Mr(),jc=function(t){return typeof t=="function"&&Vc.call(t)==="[object Function]"},ia=Ur()(),Hc=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!jc(n)||!n())return}ia?na(t,e,r,!0):na(t,e,r)},oa=function(t,e){var r=arguments.length>2?arguments[2]:{},n=Wc(e);zc&&(n=Yc.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Hc(t,n[i],e[n[i]],r[n[i]])};oa.supportsDescriptors=!!ia;aa.exports=oa});var _=h((Vm,la)=>{"use strict";s();u();var sa=Y(),ua=Br(),Kc=ua([sa("%String.prototype.indexOf%")]);la.exports=function(e,r){var n=sa(e,!!r);return typeof n=="function"&&Kc(e,".prototype.")>-1?ua([n]):n}});var fa=h((Hm,pa)=>{"use strict";s();u();var Jc=Y(),ca=Jc("%Array%"),Xc=!ca.isArray&&_()("Object.prototype.toString");pa.exports=ca.isArray||function(e){return Xc(e)==="[object Array]"}});var Kt=h((Xm,ya)=>{"use strict";s();u();ya.exports=fa()});var da=h((eg,ha)=>{"use strict";s();u();var Qc=Y(),Zc=_(),ep=N(),rp=Kt(),tp=Qc("%Reflect.apply%",!0)||Zc("Function.prototype.apply");ha.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!rp(n))throw new ep("Assertion failed: optional `argumentsList`, if provided, must be a List");return tp(e,r,n)}});function ma(){throw new Error("setTimeout has not been defined")}function ga(){throw new Error("clearTimeout has not been defined")}function va(t){if(Z===setTimeout)return setTimeout(t,0);if((Z===ma||!Z)&&setTimeout)return Z=setTimeout,setTimeout(t,0);try{return Z(t,0)}catch(e){try{return Z.call(null,t,0)}catch(r){return Z.call(this,t,0)}}}function np(t){if(ee===clearTimeout)return clearTimeout(t);if((ee===ga||!ee)&&clearTimeout)return ee=clearTimeout,clearTimeout(t);try{return ee(t)}catch(e){try{return ee.call(null,t)}catch(r){return ee.call(this,t)}}}function ip(){!$e||!ue||($e=!1,ue.length?j=ue.concat(j):jr=-1,j.length&&wa())}function wa(){if(!$e){var t=va(ip);$e=!0;for(var e=j.length;e;){for(ue=j,j=[];++jr<e;)ue&&ue[jr].run();jr=-1,e=j.length}ue=null,$e=!1,np(t)}}function op(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];j.push(new xa(t,e)),j.length===1&&!$e&&va(wa)}function xa(t,e){this.fun=t,this.array=e}function le(){}function bp(t){throw new Error("process.binding is not supported")}function Sp(){return"/"}function Ep(t){throw new Error("process.chdir is not supported")}function Tp(){return 0}function Ip(t){var e=Rp.call(Le)*.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 Np(){var t=new Date,e=t-Pp;return e/1e3}var Z,ee,j,$e,ue,jr,ap,sp,up,lp,cp,pp,fp,yp,hp,dp,mp,gp,vp,wp,xp,Ap,Le,Rp,Pp,Cp,Ke,Aa=Ee(()=>{"use strict";s();u();Z=ma,ee=ga;typeof globalThis.setTimeout=="function"&&(Z=setTimeout);typeof globalThis.clearTimeout=="function"&&(ee=clearTimeout);j=[],$e=!1,jr=-1;xa.prototype.run=function(){this.fun.apply(null,this.array)};ap="browser",sp="browser",up=!0,lp={},cp=[],pp="",fp={},yp={},hp={};dp=le,mp=le,gp=le,vp=le,wp=le,xp=le,Ap=le;Le=globalThis.performance||{},Rp=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};Pp=new Date;Cp={nextTick:op,title:ap,browser:up,env:lp,argv:cp,version:pp,versions:fp,on:dp,addListener:mp,once:gp,off:vp,removeListener:wp,removeAllListeners:xp,emit:Ap,binding:bp,cwd:Sp,chdir:Ep,umask:Tp,hrtime:Ip,platform:sp,release:yp,config:hp,uptime:Np},Ke=Cp});var Jt,Xt,ba=Ee(()=>{"use strict";s();u();typeof Object.create=="function"?Jt=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Jt=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};Xt=Jt});var Ca={};Rt(Ca,{_extend:()=>sn,debuglog:()=>Sa,default:()=>Mp,deprecate:()=>tn,format:()=>Xr,inherits:()=>Xt,inspect:()=>U,isArray:()=>nn,isBoolean:()=>Qr,isBuffer:()=>Ia,isDate:()=>Jr,isError:()=>Xe,isFunction:()=>Qe,isNull:()=>Ze,isNullOrUndefined:()=>Ea,isNumber:()=>on,isObject:()=>ce,isPrimitive:()=>Ra,isRegExp:()=>Je,isString:()=>er,isSymbol:()=>Ta,isUndefined:()=>M,log:()=>Pa});function Xr(t){if(!er(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(U(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,o=String(t).replace(Fp,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(p){return"[Circular]"}default:return c}}),a=n[r];r<i;a=n[++r])Ze(a)||!ce(a)?o+=" "+a:o+=" "+U(a);return o}function tn(t,e){if(M(globalThis.process))return function(){return tn(t,e).apply(this,arguments)};if(Ke.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(Ke.throwDeprecation)throw new Error(e);Ke.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function Sa(t){if(M(Qt)&&(Qt=Ke.env.NODE_DEBUG||""),t=t.toUpperCase(),!Hr[t])if(new RegExp("\\b"+t+"\\b","i").test(Qt)){var e=0;Hr[t]=function(){var r=Xr.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else Hr[t]=function(){};return Hr[t]}function U(t,e){var r={seen:[],stylize:qp};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Qr(e)?r.showHidden=e:e&&sn(r,e),M(r.showHidden)&&(r.showHidden=!1),M(r.depth)&&(r.depth=2),M(r.colors)&&(r.colors=!1),M(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Op),Kr(r,t,r.depth)}function Op(t,e){var r=U.styles[e];return r?"\x1B["+U.colors[r][0]+"m"+t+"\x1B["+U.colors[r][1]+"m":t}function qp(t,e){return t}function Lp(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function Kr(t,e,r){if(t.customInspect&&e&&Qe(e.inspect)&&e.inspect!==U&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return er(n)||(n=Kr(t,n,r)),n}var i=$p(t,e);if(i)return i;var o=Object.keys(e),a=Lp(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Xe(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Zt(e);if(o.length===0){if(Qe(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(Je(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Jr(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Xe(e))return Zt(e)}var p="",d=!1,v=["{","}"];if(nn(e)&&(d=!0,v=["[","]"]),Qe(e)){var m=e.name?": "+e.name:"";p=" [Function"+m+"]"}if(Je(e)&&(p=" "+RegExp.prototype.toString.call(e)),Jr(e)&&(p=" "+Date.prototype.toUTCString.call(e)),Xe(e)&&(p=" "+Zt(e)),o.length===0&&(!d||e.length==0))return v[0]+p+v[1];if(r<0)return Je(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var w;return d?w=kp(t,e,r,a,o):w=o.map(function(A){return rn(t,e,r,a,A,d)}),t.seen.pop(),Bp(w,p,v)}function $p(t,e){if(M(e))return t.stylize("undefined","undefined");if(er(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(on(e))return t.stylize(""+e,"number");if(Qr(e))return t.stylize(""+e,"boolean");if(Ze(e))return t.stylize("null","null")}function Zt(t){return"["+Error.prototype.toString.call(t)+"]"}function kp(t,e,r,n,i){for(var o=[],a=0,c=e.length;a<c;++a)Na(e,String(a))?o.push(rn(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(p){p.match(/^\d+$/)||o.push(rn(t,e,r,n,p,!0))}),o}function rn(t,e,r,n,i,o){var a,c,p;if(p=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},p.get?p.set?c=t.stylize("[Getter/Setter]","special"):c=t.stylize("[Getter]","special"):p.set&&(c=t.stylize("[Setter]","special")),Na(n,i)||(a="["+i+"]"),c||(t.seen.indexOf(p.value)<0?(Ze(r)?c=Kr(t,p.value,null):c=Kr(t,p.value,r-1),c.indexOf(`
|
|
2
|
+
`)>-1&&(o?c=c.split(`
|
|
3
|
+
`).map(function(d){return" "+d}).join(`
|
|
4
|
+
`).substr(2):c=`
|
|
5
|
+
`+c.split(`
|
|
6
|
+
`).map(function(d){return" "+d}).join(`
|
|
7
|
+
`))):c=t.stylize("[Circular]","special")),M(a)){if(o&&i.match(/^\d+$/))return c;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+c}function Bp(t,e,r){var n=0,i=t.reduce(function(o,a){return n++,a.indexOf(`
|
|
8
|
+
`)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(e===""?"":e+`
|
|
9
|
+
`)+" "+t.join(`,
|
|
10
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function nn(t){return Array.isArray(t)}function Qr(t){return typeof t=="boolean"}function Ze(t){return t===null}function Ea(t){return t==null}function on(t){return typeof t=="number"}function er(t){return typeof t=="string"}function Ta(t){return typeof t=="symbol"}function M(t){return t===void 0}function Je(t){return ce(t)&&an(t)==="[object RegExp]"}function ce(t){return typeof t=="object"&&t!==null}function Jr(t){return ce(t)&&an(t)==="[object Date]"}function Xe(t){return ce(t)&&(an(t)==="[object Error]"||t instanceof Error)}function Qe(t){return typeof t=="function"}function Ra(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function Ia(t){return l.isBuffer(t)}function an(t){return Object.prototype.toString.call(t)}function en(t){return t<10?"0"+t.toString(10):t.toString(10)}function _p(){var t=new Date,e=[en(t.getHours()),en(t.getMinutes()),en(t.getSeconds())].join(":");return[t.getDate(),Dp[t.getMonth()],e].join(" ")}function Pa(){console.log("%s - %s",_p(),Xr.apply(null,arguments))}function sn(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 Na(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Fp,Hr,Qt,Dp,Mp,Fa=Ee(()=>{"use strict";s();u();Aa();ba();Fp=/%[sdj%]/g;Hr={};U.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]};U.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Dp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Mp={inherits:Xt,_extend:sn,log:Pa,isBuffer:Ia,isPrimitive:Ra,isFunction:Qe,isError:Xe,isDate:Jr,isObject:ce,isRegExp:Je,isUndefined:M,isSymbol:Ta,isString:er,isNumber:on,isNullOrUndefined:Ea,isNull:Ze,isBoolean:Qr,isArray:nn,inspect:U,deprecate:tn,format:Xr,debuglog:Sa}});var Oa=h((yg,Zr)=>{"use strict";s();u();var pe=(Fa(),Kn(Ca));if(pe&&pe.default){Zr.exports=pe.default;for(let t in pe)Zr.exports[t]=pe[t]}else pe&&(Zr.exports=pe)});var La=h((mg,qa)=>{"use strict";s();u();qa.exports=Oa().inspect});var or=h((wg,es)=>{"use strict";s();u();var gn=typeof Map=="function"&&Map.prototype,un=Object.getOwnPropertyDescriptor&&gn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,rt=gn&&un&&typeof un.get=="function"?un.get:null,$a=gn&&Map.prototype.forEach,vn=typeof Set=="function"&&Set.prototype,ln=Object.getOwnPropertyDescriptor&&vn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,tt=vn&&ln&&typeof ln.get=="function"?ln.get:null,ka=vn&&Set.prototype.forEach,Up=typeof WeakMap=="function"&&WeakMap.prototype,tr=Up?WeakMap.prototype.has:null,Gp=typeof WeakSet=="function"&&WeakSet.prototype,nr=Gp?WeakSet.prototype.has:null,Wp=typeof WeakRef=="function"&&WeakRef.prototype,Ba=Wp?WeakRef.prototype.deref:null,zp=Boolean.prototype.valueOf,Vp=Object.prototype.toString,Yp=Function.prototype.toString,jp=String.prototype.match,wn=String.prototype.slice,re=String.prototype.replace,Hp=String.prototype.toUpperCase,Da=String.prototype.toLowerCase,ja=RegExp.prototype.test,_a=Array.prototype.concat,G=Array.prototype.join,Kp=Array.prototype.slice,Ma=Math.floor,fn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,cn=Object.getOwnPropertySymbols,yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ir=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ke||!0)?Symbol.toStringTag:null,Ha=Object.prototype.propertyIsEnumerable,Ua=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Ga(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||ja.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ma(-t):Ma(t);if(n!==t){var i=String(n),o=wn.call(e,i.length+1);return re.call(i,r,"$&_")+"."+re.call(re.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return re.call(e,r,"$&_")}var hn=La(),Wa=hn.custom,za=Xa(Wa)?Wa:null,Ka={__proto__:null,double:'"',single:"'"},Jp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};es.exports=function t(e,r,n,i){var o=r||{};if(H(o,"quoteStyle")&&!H(Ka,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=H(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=o.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 Za(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var p=String(e);return c?Ga(e,p):p}if(typeof e=="bigint"){var d=String(e)+"n";return c?Ga(e,d):d}var v=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=v&&v>0&&typeof e=="object")return dn(e)?"[Array]":"[Object]";var m=df(o,n);if(typeof i=="undefined")i=[];else if(Qa(i,e)>=0)return"[Circular]";function w(Se,Sr,Pu){if(Sr&&(i=Kp.call(i),i.push(Sr)),Pu){var Gn={depth:o.depth};return H(o,"quoteStyle")&&(Gn.quoteStyle=o.quoteStyle),t(Se,Gn,n+1,i)}return t(Se,o,n+1,i)}if(typeof e=="function"&&!Va(e)){var A=af(e),T=et(e,w);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(T.length>0?" { "+G.call(T,", ")+" }":"")}if(Xa(e)){var E=ke?re.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):yn.call(e);return typeof e=="object"&&!ke?rr(E):E}if(ff(e)){for(var F="<"+Da.call(String(e.nodeName)),q=e.attributes||[],W=0;W<q.length;W++)F+=" "+q[W].name+"="+Ja(Xp(q[W].value),"double",o);return F+=">",e.childNodes&&e.childNodes.length&&(F+="..."),F+="</"+Da.call(String(e.nodeName))+">",F}if(dn(e)){if(e.length===0)return"[]";var ne=et(e,w);return m&&!hf(ne)?"["+mn(ne,m)+"]":"[ "+G.call(ne,", ")+" ]"}if(Zp(e)){var Ue=et(e,w);return!("cause"in Error.prototype)&&"cause"in e&&!Ha.call(e,"cause")?"{ ["+String(e)+"] "+G.call(_a.call("[cause]: "+w(e.cause),Ue),", ")+" }":Ue.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+G.call(Ue,", ")+" }"}if(typeof e=="object"&&a){if(za&&typeof e[za]=="function"&&hn)return hn(e,{depth:v-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(sf(e)){var br=[];return $a&&$a.call(e,function(Se,Sr){br.push(w(Sr,e,!0)+" => "+w(Se,e))}),Ya("Map",rt.call(e),br,m)}if(cf(e)){var _n=[];return ka&&ka.call(e,function(Se){_n.push(w(Se,e))}),Ya("Set",tt.call(e),_n,m)}if(uf(e))return pn("WeakMap");if(pf(e))return pn("WeakSet");if(lf(e))return pn("WeakRef");if(rf(e))return rr(w(Number(e)));if(nf(e))return rr(w(fn.call(e)));if(tf(e))return rr(zp.call(e));if(ef(e))return rr(w(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(!Qp(e)&&!Va(e)){var At=et(e,w),Mn=Ua?Ua(e)===Object.prototype:e instanceof Object||e.constructor===Object,bt=e instanceof Object?"":"null prototype",Un=!Mn&&ir&&Object(e)===e&&ir in e?wn.call(te(e),8,-1):bt?"Object":"",Iu=Mn||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",St=Iu+(Un||bt?"["+G.call(_a.call([],Un||[],bt||[]),": ")+"] ":"");return At.length===0?St+"{}":m?St+"{"+mn(At,m)+"}":St+"{ "+G.call(At,", ")+" }"}return String(e)};function Ja(t,e,r){var n=r.quoteStyle||e,i=Ka[n];return i+t+i}function Xp(t){return re.call(String(t),/"/g,""")}function fe(t){return!ir||!(typeof t=="object"&&(ir in t||typeof t[ir]!="undefined"))}function dn(t){return te(t)==="[object Array]"&&fe(t)}function Qp(t){return te(t)==="[object Date]"&&fe(t)}function Va(t){return te(t)==="[object RegExp]"&&fe(t)}function Zp(t){return te(t)==="[object Error]"&&fe(t)}function ef(t){return te(t)==="[object String]"&&fe(t)}function rf(t){return te(t)==="[object Number]"&&fe(t)}function tf(t){return te(t)==="[object Boolean]"&&fe(t)}function Xa(t){if(ke)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!yn)return!1;try{return yn.call(t),!0}catch(e){}return!1}function nf(t){if(!t||typeof t!="object"||!fn)return!1;try{return fn.call(t),!0}catch(e){}return!1}var of=Object.prototype.hasOwnProperty||function(t){return t in this};function H(t,e){return of.call(t,e)}function te(t){return Vp.call(t)}function af(t){if(t.name)return t.name;var e=jp.call(Yp.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Qa(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 sf(t){if(!rt||!t||typeof t!="object")return!1;try{rt.call(t);try{tt.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function uf(t){if(!tr||!t||typeof t!="object")return!1;try{tr.call(t,tr);try{nr.call(t,nr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function lf(t){if(!Ba||!t||typeof t!="object")return!1;try{return Ba.call(t),!0}catch(e){}return!1}function cf(t){if(!tt||!t||typeof t!="object")return!1;try{tt.call(t);try{rt.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function pf(t){if(!nr||!t||typeof t!="object")return!1;try{nr.call(t,nr);try{tr.call(t,tr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function ff(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Za(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Za(wn.call(t,0,e.maxStringLength),e)+n}var i=Jp[e.quoteStyle||"single"];i.lastIndex=0;var o=re.call(re.call(t,i,"\\$1"),/[\x00-\x1f]/g,yf);return Ja(o,"single",e)}function yf(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":"")+Hp.call(e.toString(16))}function rr(t){return"Object("+t+")"}function pn(t){return t+" { ? }"}function Ya(t,e,r,n){var i=n?mn(r,n):G.call(r,", ");return t+" ("+e+") {"+i+"}"}function hf(t){for(var e=0;e<t.length;e++)if(Qa(t[e],`
|
|
11
|
+
`)>=0)return!1;return!0}function df(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=G.call(Array(t.indent+1)," ");else return null;return{base:r,prev:G.call(Array(e+1),r)}}function mn(t,e){if(t.length===0)return"";var r=`
|
|
12
|
+
`+e.prev+e.base;return r+G.call(t,","+r)+`
|
|
13
|
+
`+e.prev}function et(t,e){var r=dn(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=H(t,i)?e(t[i],t):""}var o=typeof cn=="function"?cn(t):[],a;if(ke){a={};for(var c=0;c<o.length;c++)a["$"+o[c]]=o[c]}for(var p in t)H(t,p)&&(r&&String(Number(p))===p&&p<t.length||ke&&a["$"+p]instanceof Symbol||(ja.call(/[^\w$]/,p)?n.push(e(p,t)+": "+e(t[p],t)):n.push(p+": "+e(t[p],t))));if(typeof cn=="function")for(var d=0;d<o.length;d++)Ha.call(t,o[d])&&n.push("["+e(o[d])+"]: "+e(t[o[d]],t));return n}});var nt=h((bg,rs)=>{"use strict";s();u();rs.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var ns=h((Tg,ts)=>{"use strict";s();u();var mf=N(),gf=or(),vf=nt();ts.exports=function(e,r){if(!vf(r))throw new mf("Assertion failed: P is not a Property Key, got "+gf(r));return e[r]}});var ss=h((Pg,as)=>{"use strict";s();u();var os=Function.prototype.toString,Be=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,An,it;if(typeof Be=="function"&&typeof Object.defineProperty=="function")try{An=Object.defineProperty({},"length",{get:function(){throw it}}),it={},Be(function(){throw 42},null,An)}catch(t){t!==it&&(Be=null)}else Be=null;var wf=/^\s*class\b/,bn=function(e){try{var r=os.call(e);return wf.test(r)}catch(n){return!1}},xn=function(e){try{return bn(e)?!1:(os.call(e),!0)}catch(r){return!1}},ot=Object.prototype.toString,xf="[object Object]",Af="[object Function]",bf="[object GeneratorFunction]",Sf="[object HTMLAllCollection]",Ef="[object HTML document.all class]",Tf="[object HTMLCollection]",Rf=typeof Symbol=="function"&&!!Symbol.toStringTag,If=!(0 in[,]),Sn=function(){return!1};typeof document=="object"&&(is=document.all,ot.call(is)===ot.call(document.all)&&(Sn=function(e){if((If||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=ot.call(e);return(r===Sf||r===Ef||r===Tf||r===xf)&&e("")==null}catch(n){}return!1}));var is;as.exports=Be?function(e){if(Sn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Be(e,null,An)}catch(r){if(r!==it)return!1}return!bn(e)&&xn(e)}:function(e){if(Sn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Rf)return xn(e);if(bn(e))return!1;var r=ot.call(e);return r!==Af&&r!==bf&&!/^\[object HTML/.test(r)?!1:xn(e)}});var En=h((Fg,us)=>{"use strict";s();u();us.exports=ss()});var fs=h((Lg,ps)=>{"use strict";s();u();var ls=N(),Pf=ns(),Nf=En(),Cf=nt(),cs=or();ps.exports=function(e,r){if(!Cf(r))throw new ls("Assertion failed: P is not a Property Key");var n=Pf(e,r);if(n!=null){if(!Nf(n))throw new ls(cs(r)+" is not a function: "+cs(n));return n}}});var hs=h((Bg,ys)=>{"use strict";s();u();var Ff=Or();ys.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Ff(e)&&e!==1/0&&e!==-1/0}});var at=h((Mg,ds)=>{"use strict";s();u();var Of=qt(),qf=Lt(),Lf=Or(),$f=hs();ds.exports=function(e){if(typeof e!="number"||Lf(e)||!$f(e))return!1;var r=Of(e);return qf(r)===r}});var Tn=h((Wg,ms)=>{"use strict";s();u();ms.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var vs=h((Yg,gs)=>{"use strict";s();u();var kf=kt();gs.exports=function(){return kf()&&!!Symbol.toStringTag}});var Nn=h((Kg,Ss)=>{"use strict";s();u();var ws=_(),Bf=vs()(),Df=Gt(),_f=Ie(),Pn;Bf?(xs=ws("RegExp.prototype.exec"),Rn={},st=function(){throw Rn},In={toString:st,valueOf:st},typeof Symbol.toPrimitive=="symbol"&&(In[Symbol.toPrimitive]=st),Pn=function(e){if(!e||typeof e!="object")return!1;var r=_f(e,"lastIndex"),n=r&&Df(r,"value");if(!n)return!1;try{xs(e,In)}catch(i){return i===Rn}}):(As=ws("Object.prototype.toString"),bs="[object RegExp]",Pn=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:As(e)===bs});var xs,Rn,st,In,As,bs;Ss.exports=Pn});var Cn=h((Qg,Es)=>{"use strict";s();u();var Mf=_(),Uf=Nn(),Gf=Mf("RegExp.prototype.exec"),Wf=N();Es.exports=function(e){if(!Uf(e))throw new Wf("`regex` must be a RegExp");return function(n){return Gf(e,n)!==null}}});var Is=h((rv,Rs)=>{"use strict";s();u();var Ts=N(),zf=or(),Vf=nt(),Yf=Tn();Rs.exports=function(e,r){if(!Yf(e))throw new Ts("Assertion failed: Type(O) is not Object");if(!Vf(r))throw new Ts("Assertion failed: P is not a Property Key, got "+zf(r));return e[r]}});var Ns=h((iv,Ps)=>{"use strict";s();u();Ps.exports=$t()});var On=h((sv,Cs)=>{"use strict";s();u();var jf=_(),Fn=N(),Hf=at(),Kf=jf("String.prototype.slice");Cs.exports=function(e,r,n){if(typeof e!="string")throw new Fn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new Fn("Assertion failed: `searchValue` must be a String");if(!Hf(n)||n<0)throw new Fn("Assertion failed: `fromIndex` must be a non-negative integer");var i=e.length;if(r===""&&n<=i)return n;for(var o=r.length,a=n;a<=i-o;a+=1){var c=Kf(e,a,a+o);if(c===r)return a}return-1}});var ut=h((cv,Fs)=>{"use strict";s();u();var Jf=N();Fs.exports=function(e){if(e==null)throw new Jf(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var lt=h((yv,Os)=>{"use strict";s();u();var Xf=Y(),Qf=Xf("%String%"),Zf=N();Os.exports=function(e){if(typeof e=="symbol")throw new Zf("Cannot convert a Symbol value to a string");return Qf(e)}});var qn=h((mv,$s)=>{"use strict";s();u();var ey=ut(),ry=lt(),ty=_(),qs=ty("String.prototype.replace"),Ls=/^\s$/.test("\u180E"),ny=Ls?/^[\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]+/,iy=Ls?/[\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]+$/;$s.exports=function(){var e=ry(ey(this));return qs(qs(e,ny,""),iy,"")}});var Ln=h((wv,Bs)=>{"use strict";s();u();var oy=qn(),ks="\u200B",De="\u180E";Bs.exports=function(){return String.prototype.trim&&ks.trim()===ks&&De.trim()===De&&("_"+De).trim()==="_"+De&&(De+"_").trim()===De+"_"?String.prototype.trim:oy}});var Ms=h((bv,_s)=>{"use strict";s();u();var ay=Ur()(),Ds=Mr(),sy=Ln();_s.exports=function(){var e=sy();return String.prototype.trim!==e&&(ay?Ds(String.prototype,"trim",e,!0):Ds(String.prototype,"trim",e)),e}});var zs=h((Tv,Ws)=>{"use strict";s();u();var uy=Wr(),ly=Yr(),cy=ut(),py=qn(),Us=Ln(),fy=Ms(),yy=uy(Us()),Gs=function(e){return cy(e),yy(e)};ly(Gs,{getPolyfill:Us,implementation:py,shim:fy});Ws.exports=Gs});var Ks=h((Pv,Hs)=>{"use strict";s();u();var js=Y(),hy=js("%RegExp%"),dy=N(),Vs=js("%parseInt%"),my=_(),ct=Cn(),Ys=my("String.prototype.slice"),gy=ct(/^0b[01]+$/i),vy=ct(/^0o[0-7]+$/i),wy=ct(/^[-+]0x[0-9a-f]+$/i),xy=["\x85","\u200B","\uFFFE"].join(""),Ay=new hy("["+xy+"]","g"),by=ct(Ay),Sy=zs();Hs.exports=function t(e){if(typeof e!="string")throw new dy("Assertion failed: `argument` is not a String");if(gy(e))return+Vs(Ys(e,2),2);if(vy(e))return+Vs(Ys(e,2),8);if(by(e)||wy(e))return NaN;var r=Sy(e);return r!==e?t(r):+e}});var Qs=h((Fv,Xs)=>{"use strict";s();u();var Ey=N(),Js=at(),Ty=_(),Ry=Ty("String.prototype.slice");Xs.exports=function(e,r,n){if(typeof e!="string"||!Js(r)||arguments.length>2&&!Js(n))throw new Ey("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Ry(e,r,arguments.length>2?n:e.length)}});var eu=h((Lv,Zs)=>{"use strict";s();u();Zs.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var tu=h((Bv,ru)=>{"use strict";s();u();var Iy=_()("String.prototype.slice");ru.exports=function(e,r){return e===r?!0:e.length>r.length?!1:Iy(r,0,e.length)===e}});var iu=h((Mv,nu)=>{"use strict";s();u();nu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var lu=h((Wv,uu)=>{"use strict";s();u();var K=N(),$n=or(),Py=at(),ou=Tn(),su=Cn(),Ny=Is(),Cy=Kt(),Fy=Ns(),Oy=On(),au=Ks(),J=Qs(),qy=lt(),Ly=eu(),ar=tu(),$y=iu(),ky=su(/^\$[0-9]/),By=su(/^\$[0-9][0-9]/);uu.exports=function(e,r,n,i,o,a){if(typeof e!="string")throw new K("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new K("Assertion failed: `str` must be a String");if(!Py(n)||n<0)throw new K("Assertion failed: `position` must be a nonnegative integer, got "+$n(n));if(!Cy(i)||!Ly(i,$y))throw new K("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+$n(i));if(typeof o!="undefined"&&!ou(o))throw new K("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new K("Assertion failed: `replacementTemplate` must be a String");var c=r.length;if(n>c)throw new K("Assertion failed: position > stringLength, got "+$n(n));for(var p=a,d="";p!=="";){var v,m,w;if(ar("$$",p))v="$$",m="$";else if(ar("$`",p))v="$`",m=J(r,0,n);else if(ar("$&",p))v="$&",m=e;else if(ar("$'",p)){v="$'";var A=e.length,T=n+A;m=J(r,Fy(T,c))}else if(ky(p)){var E=By(p)?2:1,F=J(p,1,1+E),q=au(F);if(q<0||q>99)throw new K("Assertion failed: `index` must be >= 0 and <= 99");var W=i.length;q>W&&E===2&&(E=1,F=J(F,0,1),q=au(F)),v=J(p,0,1+E),1<=q&&q<=W?(w=i[q-1],typeof w=="undefined"?m="":m=w):m=v}else if(ar("$<",p)){var ne=Oy(p,">",0);if(!(ne>-1)||typeof o=="undefined")v="$<",m=v;else{v=J(p,0,ne+1);var Ue=J(p,2,ne);if(!ou(o))throw new K("Assertion failed: Type(namedCaptures) is not Object");w=Ny(o,Ue),typeof w=="undefined"?m="":m=qy(w)}}else v=J(p,0,1),m=v;var br=v.length;p=J(p,br),d+=m}return d}});var yu=h((Yv,fu)=>{"use strict";s();u();var cu=Y(),pu=Wr(),Dy=pu(cu("String.prototype.indexOf"));fu.exports=function(e,r){var n=cu(e,!!r);return typeof n=="function"&&Dy(e,".prototype.")>-1?pu(n):n}});var Bn=h((Kv,gu)=>{"use strict";s();u();var hu=da(),_y=fs(),My=lu(),Uy=En(),Gy=ut(),pt=lt(),du=On(),Wy=Y(),ft=yu(),zy=Bt()(),Vy=Nn(),Yy=Wy("%Math.max%"),mu=N(),jy=ft("Array.prototype.push"),kn=ft("String.prototype.slice"),Hy=ft("String.prototype.indexOf"),Ky=ft("String.prototype.replace");gu.exports=function(e,r){var n=Gy(this),i=Vy(e);if(i&&Hy(kn(e,e.source.length+2),"g")===-1)throw new mu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(zy&&Symbol.replace){if(e!=null){var o=_y(e,Symbol.replace);if(typeof o!="undefined")return hu(o,e,[n,r])}}else if(i)return Ky(n,e,r);var a=pt(n),c=pt(e),p=Uy(r);p||(r=pt(r));for(var d=c.length,v=Yy(1,d),m=[],w=du(a,c,0);w!==-1;)jy(m,w),w=du(a,c,w+v);for(var A=0,T="",E=0;E<m.length;E+=1){var F;if(p)F=pt(hu(r,void 0,[c,m[E],a]));else{if(typeof r!="string")throw new mu("Assertion failed: `replaceValue` should be a string at this point");var q=[];F=My(c,a,m[E],q,void 0,r)}var W=kn(a,A,m[E]);T+=W+F,A=m[E]+d}return A<a.length&&(T+=kn(a,A)),T}});var Dn=h((Qv,vu)=>{"use strict";s();u();var Jy=Bn();vu.exports=function(){return String.prototype.replaceAll||Jy}});var xu=h((r0,wu)=>{"use strict";s();u();var Xy=Yr(),Qy=Dn();wu.exports=function(){var e=Qy();return Xy(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var Eu=h((i0,Su)=>{"use strict";s();u();var Zy=Wr(),eh=Yr(),Au=Bn(),rh=Dn(),th=xu(),bu=Zy(Au);eh(bu,{getPolyfill:rh,implementation:Au,shim:th});Su.exports=bu});var mh={};Rt(mh,{DynamicSnippetsGenerator:()=>xt});module.exports=Kn(mh);s();u();var _b=$u(Eu(),1);s();u();s();u();s();u();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}s();u();function sr(t){return Object.keys(t)}s();u();s();u();var ye=class{};s();u();s();u();var $=class extends ye{constructor(r){super();y(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):typeof this.value=="function"?this.value(r):this.value.write(r)}};var nh=4,ur=class{constructor(){y(this,"buffer","");y(this,"indentLevel",0);y(this,"hasWrittenAnything",!1);y(this,"lastCharacterIsSemicolon",!1);y(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
|
|
14
|
+
`),n=r?e.substring(0,e.length-1):e,i=this.getIndentString(),o=n.replaceAll(`
|
|
15
|
+
`,`
|
|
16
|
+
${i}`);this.isAtStartOfLine()&&(o=i+o),r&&(o+=`
|
|
17
|
+
`),this.writeInternal(o)}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 $(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,r){new $(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(e){new $(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,r){this.dedent(),this.write("} "),new $(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new $(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
18
|
+
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
19
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:r,writeFunction:n}){if(e.length>0){let i=e[0];i!=null&&n(i);for(let o=1;o<e.length;o++){this.write(r);let a=e[o];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
|
|
20
|
+
`),this.lastCharacterIsSemicolon=e.endsWith(";")),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*nh)}};s();u();var yt=class{formatMultiple(e){return Promise.all(e.map(r=>this.format(r)))}formatMultipleSync(e){return e.map(r=>this.formatSync(r))}},lr=class extends yt{async format(e){return e}formatSync(e){return e}};s();u();s();u();s();u();var cr=class{constructor(){y(this,"reporter");y(this,"snippet");y(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){this.shouldUpdate({snippet:r,reporter:e.errors})&&(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}"`)}shouldUpdate({snippet:e,reporter:r}){var n,i;return this.reporter==null||this.reporter.size()>0&&r.size()===0?!0:e.length>((i=(n=this.snippet)==null?void 0:n.length)!=null?i:0)}};var pr=class{constructor(e){y(this,"context");this.context=e}async generate(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let i=new cr;for(let o of n){let a=this.context.clone(),c=this.createSnippetGenerator(a);try{let p=await c.generateSnippet({endpoint:o,request:e,options:r});if(a.errors.empty())return{snippet:p,errors:void 0};i.update({context:a,snippet:p})}catch(p){i.err==null&&(i.err=p)}}return i.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let i=new cr;for(let o of n){let a=this.context.clone(),c=this.createSnippetGenerator(a);try{let p=c.generateSnippetSync({endpoint:o,request:e,options:r});if(a.errors.empty())return{snippet:p,errors:void 0};i.update({context:a,snippet:p})}catch(p){i.err==null&&(i.err=p)}}return i.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var fr=class{constructor(){y(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var S={Critical:"CRITICAL",Warning:"WARNING"},yr=class t{constructor(){y(this,"errors");y(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(Vn(zn({},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 hr=class{constructor({ir:e,config:r,options:n={}}){y(this,"config");y(this,"options");y(this,"errors");y(this,"_ir");y(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.options=n,this.errors=new yr,this.httpEndpointReferenceParser=new fr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[i,o]of Object.entries(r)){this.errors.scope(i);try{let a=e.find(p=>p.name.wireValue===i);if(a==null)throw this.newParameterNotRecognizedError(i);let c=this.isListTypeReference(a.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:a.name,typeReference:a.typeReference,value:c})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let i=[];for(let[o,a]of Object.entries(r)){this.errors.scope(o);try{let c=e.find(p=>p.name.wireValue===o);if(c==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:c.name,typeReference:c.typeReference,value:a})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let i=[];for(let o of n){if(typeof o!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let i=e.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let a=e.types[o];if(a==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${o}"`});return}let d=n,{[i]:c}=d,p=jn(d,[Yn(i)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:p}}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 i;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}):!((i=e.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,i;return r&&((i=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(i=>i.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(i=>i.id===e);return n==null?void 0:n.name}default:R(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(sr(n.urls));for(let o of sr(e))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${sr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};s();u();s();u();var g={};Rt(g,{AstNode:()=>b,ClassInstantiation:()=>me,ClassReference:()=>ge,CodeBlock:()=>ve,KeywordArgument:()=>we,Method:()=>xe,MethodInvocation:()=>Ae,Parameter:()=>C,TypeLiteral:()=>xr,TypeParameter:()=>be,classReference:()=>ph,class_:()=>ah,codeblock:()=>ih,comment:()=>lh,instantiateClass:()=>fh,invokeMethod:()=>hh,keywordArgument:()=>yh,method:()=>uh,module:()=>sh,parameters:()=>oh,positionalArgument:()=>dh,typeParameter:()=>ch});s();u();s();u();s();u();s();u();s();u();s();u();s();u();var ht=class extends ur{constructor({customConfig:r,formatter:n}){super();y(this,"customConfig");y(this,"formatter");y(this,"requires",new Set);this.customConfig=r,this.formatter=n!=null?n:new lr}addRequire(r){this.requires.add(r)}};var _e=class extends ht{constructor({customConfig:e,formatter:r}){super({customConfig:e,formatter:r})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(r){throw new Error(`Failed to format Ruby file: ${r}
|
|
21
|
+
${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(r){throw new Error(`Failed to format Ruby file: ${r}
|
|
22
|
+
${e}`)}return e}getContent(){let e=this.stringifyRequires();return e.length>0?`${e}
|
|
23
|
+
|
|
24
|
+
${this.buffer}`:this.buffer}stringifyRequires(){return Array.from(this.requires).map(e=>`require "${e}"`).join(`
|
|
25
|
+
`)}};var b=class extends ye{async toStringAsync({customConfig:e,formatter:r}){let n=new _e({customConfig:e,formatter:r});return this.write(n),n.toStringAsync()}toString({customConfig:e,formatter:r}){let n=new _e({customConfig:e,formatter:r});return this.write(n),n.toString()}typeDefinitionToString({customConfig:e,formatter:r}){let n=new _e({customConfig:e,formatter:r});return this.writeTypeDefinition(n),n.toString()}writeTypeDefinition(e){}};var k=class extends b{constructor({docs:r}){super();y(this,"docs");this.docs=r}write(r){this.docs!=null&&this.docs.split(`
|
|
26
|
+
`).forEach(n=>{r.writeLine(`# ${n}`)})}};s();u();var he=class t extends b{constructor({name:r,namespace:n,typeParameters:i,docstring:o,statements:a}){super();y(this,"name");y(this,"namespace");y(this,"typeParameters");y(this,"docstring");y(this,"statements");this.name=r,this.namespace=n!=null?n:new Set,this.typeParameters=i!=null?i:[],this.docstring=o,this.statements=a!=null?a:[],this.populateChildNamespaces()}write(r){this.docstring&&new k({docs:this.docstring}).write(r),r.write(`module ${this.name}`),this.statements.length?(r.newLine(),r.indent(),this.statements.forEach((n,i)=>{n.write(r),i<this.statements.length-1&&r.newLine()}),r.dedent(),r.write("end")):r.write("; end"),r.newLine()}writeTypeDefinition(r){r.write(`module ${this.name}`),this.typeParameters.length&&(r.write("["),r.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:n=>n.writeTypeDefinition(r)}),r.write("]")),r.newLine(),this.statements.length&&(r.indent(),this.statements.forEach(n=>{n.writeTypeDefinition(r),r.newLine()}),r.dedent()),r.write("end")}populateChildNamespaces(){this.statements.filter(r=>r instanceof t||r instanceof de).forEach(r=>{r.namespace=new Set([...this.namespace,this]),r.populateChildNamespaces()})}get fullyQualifiedNamespace(){return[...this.namespace,this].map(r=>r.name).join("::")}};var de=class extends he{constructor({name:r,superclass:n,typeParameters:i,docstring:o,statements:a}){super({name:r,docstring:o,typeParameters:i});y(this,"superclass");y(this,"statements");this.superclass=n,this.statements=a!=null?a:[]}write(r){this.docstring&&new k({docs:this.docstring}).write(r),r.write(`class ${this.name}`),this.superclass&&r.write(` < ${this.superclass.name}`),this.statements.length?(r.newLine(),r.indent(),this.statements.forEach((n,i)=>{n.write(r),i<this.statements.length-1&&r.newLine()}),r.dedent(),r.write("end")):r.write("; end"),r.newLine()}writeTypeDefinition(r){r.write(`class ${this.name}`),this.typeParameters.length&&(r.write("["),r.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:n=>n.writeTypeDefinition(r)}),r.write("]")),this.superclass&&r.write(` < ${this.superclass.name}`),r.newLine(),this.statements.length&&(r.indent(),this.statements.forEach(n=>{n.writeTypeDefinition(r),r.newLine()}),r.dedent()),r.write("end")}};s();u();var me=class extends b{constructor({classReference:r,arguments_:n}){super();y(this,"classReference");y(this,"arguments_");this.classReference=r,this.arguments_=n}write(r){r.writeNode(this.classReference),r.write("."),r.write("new"),r.write("("),this.arguments_.length>1?(r.indent(),r.newLine(),this.arguments_.forEach((n,i)=>{i>0&&(r.write(","),r.newLine()),n.write(r)}),r.newLine(),r.dedent()):this.arguments_.forEach((n,i)=>{i>0&&r.write(", "),n.write(r)}),r.write(")")}};s();u();var ge=class extends b{constructor({name:r,modules:n,fullyQualified:i}){super();y(this,"name");y(this,"modules");y(this,"fullyQualified");this.name=r,this.modules=n!=null?n:[],this.fullyQualified=i!=null?i:!1}write(r){if(this.fullyQualified||this.modules.length>0){let n=[...this.modules,this.name].join("::");r.write(n);return}r.write(this.name)}};s();u();var ve=class extends b{constructor(r){super();y(this,"arg");this.arg=r}write(r){return new $(this.arg).write(r)}};s();u();var we=class extends b{constructor({name:r,value:n}){super();y(this,"name");y(this,"value");this.name=r,this.value=n}write(r){r.write(`${this.name}: `),this.value.write(r)}};s();u();s();u();s();u();var Me=class t extends b{constructor(r){super();y(this,"internalType");this.internalType=r}write(r){}writeTypeDefinition(r){if(this.internalType)switch(this.internalType.type){case"self":r.write("self");break;case"class":r.write("class");break;case"instance":r.write("instance");break;case"boolean":r.write("bool");break;case"nil":r.write("nil");break;case"top":r.write("top");break;case"bot":r.write("bot");break;case"void":r.write("void");break;case"boolish":r.write("boolish");break;case"string":r.write("String");break;case"integer":r.write("Integer");break;case"union":r.delimit({nodes:this.internalType.elems,delimiter:" | ",writeFunction:n=>n.writeTypeDefinition(r)});break;case"intersection":r.delimit({nodes:this.internalType.elems,delimiter:" & ",writeFunction:n=>n.writeTypeDefinition(r)});break;case"array":r.write("Array["),this.internalType.elem.writeTypeDefinition(r),r.write("]");break;case"hash":r.write("Hash["),this.internalType.keyType.writeTypeDefinition(r),r.write(", "),this.internalType.valueType.writeTypeDefinition(r),r.write("]");break;case"object":r.write(this.internalType.klass);break;case"singleton":r.write("singleton("),r.write(this.internalType.klass),r.write(")");break;case"tuple":r.write("["),r.delimit({nodes:this.internalType.elems,delimiter:", ",writeFunction:n=>n.write(r)}),r.write("]");break;case"generic":r.write(`${this.internalType.baseKlass}[`),r.delimit({nodes:this.internalType.parameters,delimiter:", ",writeFunction:n=>n.writeTypeDefinition(r)}),r.write("]");break;default:R(this.internalType)}else r.write("untyped")}static untyped(){return new this(void 0)}static self(){return new this({type:"self"})}static class_(){return new this({type:"class"})}static instance(){return new this({type:"instance"})}static boolean(){return new this({type:"boolean"})}static nil(){return new this({type:"nil"})}static top(){return new this({type:"top"})}static bot(){return new this({type:"bot"})}static void(){return new this({type:"void"})}static boolish(){return new this({type:"boolish"})}static string(){return new this({type:"string"})}static integer(){return new this({type:"integer"})}static union(r){return new this({type:"union",elems:r})}static intersection(r){return new this({type:"intersection",elems:r})}static array(r){return new this({type:"array",elem:r})}static hash(r,n){return new this({type:"hash",keyType:r,valueType:n})}static object(r){return new this({type:"object",klass:r})}static singleton(r){return new this({type:"singleton",klass:r})}static tuple(r){return new this({type:"tuple",elems:r})}static generic(r,n){return new this({type:"generic",baseKlass:r,parameters:n})}static nilable(r){return t.union([r,t.nil()])}nilable(){return t.nilable(this)}};var C=class extends b{constructor({name:r,type:n,optional:i}){super();y(this,"name");y(this,"type");y(this,"optional");this.name=r,this.type=n!=null?n:Me.untyped(),this.optional=i!=null?i:!1}};var dr=class extends C{constructor({name:r,type:n,initializer:i,optional:o}){super({name:r,type:n,optional:o});y(this,"initializer");this.initializer=i}write(r){r.write(`${this.name}:`),this.initializer&&r.write(` ${this.initializer.write(r)}`)}writeTypeDefinition(r){this.optional&&r.write("?"),r.write(`${this.name}: `),this.type.writeTypeDefinition(r)}};s();u();var mr=class extends C{constructor(){super(...arguments);y(this,"initializer")}write(r){r.write(`**${this.name}`)}writeTypeDefinition(r){r.write("**"),this.type.writeTypeDefinition(r)}};s();u();var dt={Instance:"instance",Class_:"class"},Tu={Public:"public",Private:"private",Protected:"protected"},xe=class extends b{constructor({name:r,docstring:n,kind:i,visibility:o,parameters:a,returnType:c}){var p,d;super();y(this,"name");y(this,"docstring");y(this,"kind");y(this,"positionalParameters");y(this,"keywordParameters");y(this,"positionalSplatParameter");y(this,"keywordSplatParameter");y(this,"yieldParameter");y(this,"visibility");y(this,"statements",[]);y(this,"returnType");this.name=r,this.docstring=n,this.kind=i!=null?i:dt.Instance,this.visibility=o!=null?o:Tu.Public,this.positionalParameters=(p=a==null?void 0:a.positional)!=null?p:[],this.keywordParameters=(d=a==null?void 0:a.keyword)!=null?d:[],this.positionalSplatParameter=a==null?void 0:a.positionalSplat,this.keywordSplatParameter=a==null?void 0:a.keywordSplat,this.yieldParameter=a==null?void 0:a.yield,this.returnType=c!=null?c:Me.untyped()}write(r){switch(this.docstring&&new k({docs:this.docstring}).write(r),this.visibility!==Tu.Public&&(r.write(this.visibility),this.kind===dt.Class_&&r.write("_class_method"),r.write(" ")),this.kind){case dt.Instance:r.write(`def ${this.name}`);break;case dt.Class_:r.write(`def self.${this.name}`);break}this.parameters.length&&(r.write("("),r.delimit({nodes:this.parameters,delimiter:", ",writeFunction:n=>n.write(r)}),r.write(")")),this.statements.length?(r.newLine(),r.indent(),this.statements.forEach((n,i)=>{n.write(r),i<this.statements.length-1&&r.newLine()}),r.dedent(),r.write("end")):r.write("; end"),r.newLine()}writeTypeDefinition(r){r.write(`def ${this.name}: (`),this.parameters.forEach((n,i)=>{n.writeTypeDefinition(r),i<this.parameters.length-1&&r.write(", ")}),r.write(") -> "),this.returnType.writeTypeDefinition(r)}get parameters(){return[...this.positionalParameters,...this.keywordParameters,this.positionalSplatParameter,this.keywordSplatParameter,this.yieldParameter].flatMap(r=>r!==void 0?r:[])}};s();u();var Ae=class extends b{constructor({on:r,method:n,arguments_:i}){super();y(this,"on");y(this,"method");y(this,"arguments_");this.on=r,this.method=n,this.arguments_=i}write(r){this.on.write(r),r.write("."),r.write(this.method),r.write("("),this.arguments_.length>1?(r.indent(),r.newLine(),this.arguments_.forEach((n,i)=>{i>0&&(r.write(","),r.newLine()),n.write(r)}),r.newLine(),r.dedent()):this.arguments_.forEach((n,i)=>{i>0&&r.write(", "),n.write(r)}),r.write(")")}};s();u();var gr=class extends b{constructor({value:r}){super();y(this,"value");this.value=r}write(r){this.value.write(r)}};s();u();var vr=class extends C{constructor({name:r,type:n,optional:i,initializer:o}){super({name:r,type:n,optional:i});y(this,"initializer");this.initializer=o}write(r){r.write(this.name),this.initializer&&r.write(` = ${this.initializer.write(r)}`)}writeTypeDefinition(r){this.optional&&r.write("?"),this.type.writeTypeDefinition(r)}};s();u();var wr=class extends C{write(e){e.write(`*${this.name}`)}writeTypeDefinition(e){e.write("*"),this.type.writeTypeDefinition(e)}};s();u();var xr=class t extends b{constructor(r){super();y(this,"internalType");this.internalType=r}static string(r){return new this({type:"str",value:r})}static integer(r){return new this({type:"int",value:r})}static float(r){return new this({type:"float",value:r})}static boolean(r){return new this({type:"bool",value:r})}static hash(r){return new this({type:"hash",entries:r})}static set(r){return new this({type:"set",values:r})}static list(r){return new this({type:"list",values:r})}static nop(){return new this({type:"nop"})}static nil(){return new this({type:"nil"})}static isNop(r){return r instanceof t&&r.internalType.type==="nop"}static isNil(r){return r instanceof t&&r.internalType.type==="nil"}write(r){switch(this.internalType.type){case"str":{this.internalType.value.includes("'")?r.write(`"${this.internalType.value.replaceAll('"','\\"')}"`):r.write(`'${this.internalType.value}'`);break}case"int":{r.write(this.internalType.value.toString());break}case"float":{r.write(this.internalType.value.toString());break}case"bool":{r.write(this.internalType.value?"true":"false");break}case"hash":{let n=this.internalType.entries.filter(i=>!t.isNop(i.key)&&!t.isNop(i.value));if(n.length===0){r.write("{}");break}r.write(`{
|
|
27
|
+
`),n.forEach((i,o)=>{o>0&&r.writeLine(","),r.indent();let a=!1;if(i.key instanceof t&&i.key.internalType.type==="str"){let c=i.key.internalType.value;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(c)&&(r.write(`${c}:`),a=!0)}a||(i.key.write(r),r.write(":")),i.value.write(r),r.dedent()}),r.write(`
|
|
28
|
+
}`);break}case"set":{let n=this.internalType.values.filter(i=>!t.isNop(i));if(n.length===0){r.write("Set.new([])");break}r.write("Set.new(["),n.forEach((i,o)=>{o>0&&r.write(", "),i.write(r)}),r.write("])");break}case"list":{let n=this.internalType.values.filter(i=>!t.isNop(i));if(n.length===0){r.write("[]");break}r.write("["),n.forEach((i,o)=>{o>0&&r.write(", "),i.write(r)}),r.write("]");break}case"nop":break;case"nil":r.write("nil");break;default:R(this.internalType)}}};s();u();var mt;(function(t){t[t.Invariant=0]="Invariant",t.Covariant="out",t.Contravariant="in"})(mt||(mt={}));var be=class extends b{constructor({name:r,unchecked:n,bound:i,variance:o,defaultType:a}){super();y(this,"name");y(this,"unchecked");y(this,"bound");y(this,"variance");y(this,"defaultType");this.name=r,this.unchecked=n!=null?n:!1,this.bound=i,this.variance=o!=null?o:mt.Invariant,this.defaultType=a}write(r){}writeTypeDefinition(r){this.unchecked&&r.write("unchecked "),this.variance!=mt.Invariant&&r.write(`${this.variance} `),r.write(this.name),this.bound&&(r.write(" < "),this.bound.writeTypeDefinition(r)),this.defaultType&&(r.write(" = "),this.defaultType.writeTypeDefinition(r))}};s();u();var Ar=class extends C{constructor(){super(...arguments);y(this,"initializer")}write(r){r.write(`&${this.name}`)}};function ih(t){return new ve(t)}var oh={positional(t){return new vr(t)},keyword(t){return new dr(t)},positionalSplat(t){return new wr(t)},keywordSplat(t){return new mr(t)},yield(t){return new Ar(t)}};function ah(t){return new de(t)}function sh(t){return new he(t)}function uh(t){return new xe(t)}function lh(t){return new k(t)}function ch(t){return new be(t)}function ph(t){return new ge(t)}function fh(t){return new me(t)}function yh(t){return new we(t)}function hh(t){return new Ae(t)}function dh(t){return new gr(t)}var Ru="client",gt=class{constructor({context:e,formatter:r}){y(this,"context");y(this,"formatter");this.context=e,this.formatter=r}async generateSnippet({endpoint:e,request:r}){var i;return await this.buildCodeBlock({endpoint:e,snippet:r}).toStringAsync({customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}generateSnippetSync({endpoint:e,request:r}){var i;return this.buildCodeBlock({endpoint:e,snippet:r}).toString({customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:r}){return g.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),n.newLine(),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})}constructClient({endpoint:e,snippet:r}){return g.codeblock(n=>{n.addRequire(this.context.getRootModuleName());let i=this.context.getRootClientClassReference(),o=this.getRootClientBuilderArgs({endpoint:e,snippet:r});n.write(`${Ru} = `),n.writeNode(g.instantiateClass({classReference:i,arguments_:o}))})}getRootClientBaseUrlArg({baseUrl:e,environment:r}){if(e!=null&&r!=null)return this.context.errors.add({severity:"CRITICAL",message:"Cannot specify both baseUrl and environment options"}),[];if(e!=null)return[g.keywordArgument({name:"base_url",value:g.TypeLiteral.string(e)})];if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);return n==null?(this.context.errors.add({severity:"CRITICAL",message:`Environment ID ${r} not found`}),[]):[g.keywordArgument({name:"environment",value:n})]}if(this.context.isMultiEnvironmentValues(r))return this.context.errors.add({severity:"CRITICAL",message:"Multi-environment values are not supported in Ruby snippets yet"}),[]}return[]}getRootClientAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientBasicAuthArgs({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientHeaderAuthArgs({auth:e,values:r});case"oauth":return r.type!=="oauth"?(this.context.errors.add({severity:"CRITICAL",message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getRootClientOAuthArgs({auth:e,values:r});default:return[]}}getRootClientBasicAuthArgs({auth:e,values:r}){return[g.keywordArgument({name:e.username.snakeCase.safeName,value:g.TypeLiteral.string(r.username)}),g.keywordArgument({name:e.password.snakeCase.safeName,value:g.TypeLiteral.string(r.password)})]}getRootClientBearerAuthArgs({auth:e,values:r}){return[g.keywordArgument({name:e.token.snakeCase.safeName,value:g.TypeLiteral.string(r.token)})]}getRootClientHeaderAuthArgs({auth:e,values:r}){return[g.keywordArgument({name:e.header.name.name.snakeCase.safeName,value:g.TypeLiteral.string(r.value)})]}getRootClientOAuthArgs({auth:e,values:r}){return[g.keywordArgument({name:e.clientId.snakeCase.safeName,value:g.TypeLiteral.string(r.clientId)}),g.keywordArgument({name:e.clientSecret.snakeCase.safeName,value:g.TypeLiteral.string(r.clientSecret)})]}getRootClientHeaderArgs({headers:e,values:r}){let n=[];for(let i of e){let o=r[i.name.name.originalName];o!=null&&typeof o=="string"&&n.push(g.keywordArgument({name:i.name.name.snakeCase.safeName,value:g.TypeLiteral.string(o)}))}return n}getRootClientBuilderArgs({endpoint:e,snippet:r}){let n=[];e.auth!=null&&(r.auth!=null?n.push(...this.getRootClientAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:"WARNING",message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let i=this.getRootClientBaseUrlArg({baseUrl:r.baseURL,environment:r.environment});return i.length>0&&n.push(...i),this.context.errors.scope("Headers"),this.context.ir.headers!=null&&r.headers!=null&&n.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),n}callMethod({endpoint:e,snippet:r}){return g.invokeMethod({on:g.codeblock(Ru),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:r})})}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return[this.getMethodArgsForInlinedRequest({request:e.request,snippet:r})];case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:R(e.request)}}getMethodArgsForInlinedRequest({request:e,snippet:r}){let n=[];if(n.push(...this.getNamedParameterArgs({kind:"PathParameters",namedParameters:e.pathParameters,values:r.pathParameters})),n.push(...this.getNamedParameterArgs({kind:"QueryParameters",namedParameters:e.queryParameters,values:r.queryParameters})),n.push(...this.getNamedParameterArgs({kind:"Headers",namedParameters:e.headers,values:r.headers})),e.body!=null)switch(e.body.type){case"properties":n.push(...this.getMethodArgsForPropertiesRequest({request:e.body,snippet:r}));break;case"referenced":case"fileUpload":break;default:R(e.body)}return g.TypeLiteral.hash(n.map(i=>({key:g.TypeLiteral.string(i.name),value:i.value})))}getNamedParameterArgs({kind:e,namedParameters:r,values:n}){let i=[];if(this.context.errors.scope(e),r!=null){let o=this.context.associateByWireValue({parameters:r,values:n!=null?n:{},ignoreMissingParameters:!0});for(let a of o)i.push(g.keywordArgument({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)}))}return this.context.errors.unscope(),i}getMethodArgsForPropertiesRequest({request:e,snippet:r}){var o;let n=[],i=this.context.associateByWireValue({parameters:e.value,values:(o=this.context.getRecord(r.requestBody))!=null?o:{}});for(let a of i)n.push(g.keywordArgument({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)}));return n}getMethodArgsForBodyRequest({request:e,snippet:r}){if(e.body==null)return[];switch(e.body.type){case"bytes":return this.context.errors.add({severity:"CRITICAL",message:"Multi-environment values are not supported in Ruby snippets yet"}),[];case"typeReference":return[g.positionalArgument({value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.body.value,value:this.context.getRecord(r.requestBody)})})];default:R(e.body)}}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>`${this.context.getMethodName(r)}`).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}};s();u();s();u();var vt=class{constructor({context:e}){y(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?g.TypeLiteral.nil():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(e.value===void 0)return g.TypeLiteral.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?g.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertSet({set:e.typeReference.value,value:e.value});case"unknown":return g.TypeLiteral.nop();default:R(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:r}){return Array.isArray(r)?g.TypeLiteral.list(r.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertSet({set:e,value:r}){return Array.isArray(r)?g.TypeLiteral.set(r.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:S.Critical,message:`Expected array but got: ${typeof r}`}),g.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),g.TypeLiteral.nop()):g.TypeLiteral.hash(Object.entries(r).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}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 g.TypeLiteral.nop();case"object":return this.convertObject({object:e,value:r});case"enum":return g.TypeLiteral.nop();case"undiscriminatedUnion":return g.TypeLiteral.nop();default:R(e)}}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:r,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.integer(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:r});return i==null?g.TypeLiteral.nop():g.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:r,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(i)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:r});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}case"UUID":{let i=this.context.getValueAsString({value:r});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}case"DATE":{let i=this.context.getValueAsString({value:r});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:r});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}default:R(e)}}convertObject({object:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),g.TypeLiteral.nop()):g.TypeLiteral.hash(Object.entries(r).map(([n,i])=>{var p;this.context.errors.scope(n);let o=e.properties.find(d=>d.name.wireValue===n),a=(p=o==null?void 0:o.typeReference)!=null?p:{type:"unknown"},c={key:g.TypeLiteral.string(n),value:this.convert({typeReference:a,value:i})};return this.context.errors.unscope(),c}))}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:e;return this.context.getValueAsBoolean({value:n})}};var wt=class t extends hr{constructor({ir:r,config:n}){super({ir:r,config:n});y(this,"ir");y(this,"customConfig");y(this,"dynamicTypeLiteralMapper");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new vt({context:this})}clone(){return new t({ir:this.ir,config:this.config})}getRootClientClassReference(){return g.classReference({name:this.getRootClientClassName(),modules:[this.getRootModuleName()]})}getRootClientClassName(){return"Client"}getRootModuleName(){var r,n;return(n=(r=this.customConfig)==null?void 0:r.clientModuleName)!=null?n:this.config.organization}isSingleEnvironmentID(r){return typeof r=="string"}isMultiEnvironmentValues(r){return typeof r=="object"}getEnvironmentTypeReferenceFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return g.codeblock(i=>{i.writeNode(this.getEnvironmentClassReference()),i.write("::"),i.write(this.getEnumName(n))})}getEnvironmentClassReference(){return g.classReference({name:"Environment",modules:[this.getRootModuleName()]})}getEnumName(r){return this.getName(r.screamingSnakeCase.safeName)}getMethodName(r){return this.getName(r.snakeCase.safeName)}getPropertyName(r){return this.getName(r.camelCase.safeName)}getName(r){return r}};var xt=class extends pr{constructor({ir:r,config:n,formatter:i}){super(new wt({ir:r,config:n}));y(this,"formatter");this.formatter=i}async generate(r){return super.generate(r)}generateSync(r){return super.generateSync(r)}createSnippetGenerator(r){return new gt({context:r,formatter:this.formatter})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
29
|
+
/*! Bundled license information:
|
|
30
|
+
|
|
31
|
+
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
32
|
+
(*!
|
|
33
|
+
* The buffer module from node.js, for the browser.
|
|
34
|
+
*
|
|
35
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
36
|
+
* @license MIT
|
|
37
|
+
*)
|
|
38
|
+
*/
|
package/cjs/index.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.cjs';
|
|
2
|
+
import '@fern-api/browser-compatible-base-generator';
|
|
3
|
+
import '@fern-api/dynamic-ir-sdk';
|
|
4
|
+
import './EndpointSnippetGenerator.cjs';
|
|
5
|
+
import './DynamicSnippetsGeneratorContext-BGmCyT7y.cjs';
|
|
6
|
+
import '@fern-api/ruby-ast';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AbstractDynamicSnippetsGenerator, FernGeneratorExec, AbstractFormatter } from '@fern-api/browser-compatible-base-generator';
|
|
2
|
+
import { FernIr } from '@fern-api/dynamic-ir-sdk';
|
|
3
|
+
import { EndpointSnippetGenerator } from './EndpointSnippetGenerator.js';
|
|
4
|
+
import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-BGmCyT7y.js';
|
|
5
|
+
import '@fern-api/ruby-ast';
|
|
6
|
+
|
|
7
|
+
declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<DynamicSnippetsGeneratorContext, EndpointSnippetGenerator> {
|
|
8
|
+
private formatter;
|
|
9
|
+
constructor({ ir, config, formatter }: {
|
|
10
|
+
ir: FernIr.dynamic.DynamicIntermediateRepresentation;
|
|
11
|
+
config: FernGeneratorExec.GeneratorConfig;
|
|
12
|
+
formatter?: AbstractFormatter;
|
|
13
|
+
});
|
|
14
|
+
generate(request: FernIr.dynamic.EndpointSnippetRequest): Promise<FernIr.dynamic.EndpointSnippetResponse>;
|
|
15
|
+
generateSync(request: FernIr.dynamic.EndpointSnippetRequest): FernIr.dynamic.EndpointSnippetResponse;
|
|
16
|
+
protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { DynamicSnippetsGenerator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-5MYTC5XX.js";import"./chunk-T3CDT3YD.js";import"./chunk-JE27KH5P.js";import"./chunk-P72WBQKD.js";import"./chunk-2EUGHB6H.js";export{a as DynamicSnippetsGenerator};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec } from '@fern-api/browser-compatible-base-generator';
|
|
2
|
+
import { FernIr } from '@fern-api/dynamic-ir-sdk';
|
|
3
|
+
import { ruby, BaseRubyCustomConfigSchema } from '@fern-api/ruby-ast';
|
|
4
|
+
|
|
5
|
+
declare namespace DynamicTypeLiteralMapper {
|
|
6
|
+
interface Args {
|
|
7
|
+
typeReference: FernIr.dynamic.TypeReference;
|
|
8
|
+
value: unknown;
|
|
9
|
+
as?: ConvertedAs;
|
|
10
|
+
}
|
|
11
|
+
type ConvertedAs = "key";
|
|
12
|
+
}
|
|
13
|
+
declare class DynamicTypeLiteralMapper {
|
|
14
|
+
private context;
|
|
15
|
+
constructor({ context }: {
|
|
16
|
+
context: DynamicSnippetsGeneratorContext;
|
|
17
|
+
});
|
|
18
|
+
convert(args: DynamicTypeLiteralMapper.Args): ruby.AstNode;
|
|
19
|
+
private convertLiteral;
|
|
20
|
+
private convertList;
|
|
21
|
+
private convertSet;
|
|
22
|
+
private convertMap;
|
|
23
|
+
private convertNamed;
|
|
24
|
+
private convertPrimitive;
|
|
25
|
+
private convertObject;
|
|
26
|
+
private getValueAsNumber;
|
|
27
|
+
private getValueAsBoolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {
|
|
31
|
+
ir: FernIr.dynamic.DynamicIntermediateRepresentation;
|
|
32
|
+
customConfig: BaseRubyCustomConfigSchema | undefined;
|
|
33
|
+
dynamicTypeLiteralMapper: DynamicTypeLiteralMapper;
|
|
34
|
+
constructor({ ir, config }: {
|
|
35
|
+
ir: FernIr.dynamic.DynamicIntermediateRepresentation;
|
|
36
|
+
config: FernGeneratorExec.GeneratorConfig;
|
|
37
|
+
});
|
|
38
|
+
clone(): DynamicSnippetsGeneratorContext;
|
|
39
|
+
getRootClientClassReference(): ruby.ClassReference;
|
|
40
|
+
getRootClientClassName(): string;
|
|
41
|
+
getRootModuleName(): string;
|
|
42
|
+
isSingleEnvironmentID(environment: FernIr.dynamic.EnvironmentValues): environment is FernIr.EnvironmentId;
|
|
43
|
+
isMultiEnvironmentValues(environment: FernIr.dynamic.EnvironmentValues): environment is FernIr.dynamic.MultipleEnvironmentUrlValues;
|
|
44
|
+
getEnvironmentTypeReferenceFromID(environmentID: string): ruby.AstNode | undefined;
|
|
45
|
+
getEnvironmentClassReference(): ruby.AstNode;
|
|
46
|
+
getEnumName(name: FernIr.Name): string;
|
|
47
|
+
getMethodName(name: FernIr.Name): string;
|
|
48
|
+
getPropertyName(name: FernIr.Name): string;
|
|
49
|
+
private getName;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { DynamicSnippetsGeneratorContext as D, DynamicTypeLiteralMapper as a };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AbstractFormatter } from '@fern-api/browser-compatible-base-generator';
|
|
2
|
+
import { FernIr } from '@fern-api/dynamic-ir-sdk';
|
|
3
|
+
import { D as DynamicSnippetsGeneratorContext } from './DynamicSnippetsGeneratorContext-BGmCyT7y.js';
|
|
4
|
+
import '@fern-api/ruby-ast';
|
|
5
|
+
|
|
6
|
+
declare class EndpointSnippetGenerator {
|
|
7
|
+
private context;
|
|
8
|
+
private formatter;
|
|
9
|
+
constructor({ context, formatter }: {
|
|
10
|
+
context: DynamicSnippetsGeneratorContext;
|
|
11
|
+
formatter?: AbstractFormatter;
|
|
12
|
+
});
|
|
13
|
+
generateSnippet({ endpoint, request }: {
|
|
14
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
15
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
generateSnippetSync({ endpoint, request }: {
|
|
18
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
19
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
20
|
+
}): string;
|
|
21
|
+
private buildCodeBlock;
|
|
22
|
+
private constructClient;
|
|
23
|
+
private getRootClientBaseUrlArg;
|
|
24
|
+
private getRootClientAuthArgs;
|
|
25
|
+
private getRootClientBasicAuthArgs;
|
|
26
|
+
private getRootClientBearerAuthArgs;
|
|
27
|
+
private getRootClientHeaderAuthArgs;
|
|
28
|
+
private getRootClientOAuthArgs;
|
|
29
|
+
private getRootClientHeaderArgs;
|
|
30
|
+
private getRootClientBuilderArgs;
|
|
31
|
+
private callMethod;
|
|
32
|
+
private getMethodArgs;
|
|
33
|
+
private getMethodArgsForInlinedRequest;
|
|
34
|
+
private getNamedParameterArgs;
|
|
35
|
+
private getMethodArgsForPropertiesRequest;
|
|
36
|
+
private getMethodArgsForBodyRequest;
|
|
37
|
+
private getMethod;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { EndpointSnippetGenerator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-T3CDT3YD.js";import"./chunk-2EUGHB6H.js";export{a as EndpointSnippetGenerator};
|