@fern-api/go-dynamic-snippets 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DynamicSnippetsGenerator.cjs +7 -7
- package/cjs/EndpointSnippetGenerator.cjs +6 -6
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +7 -7
- package/cjs/context/DynamicTypeInstantiationMapper.cjs +7 -7
- package/cjs/context/DynamicTypeMapper.cjs +7 -7
- package/cjs/context/FilePropertyMapper.cjs +4 -4
- package/cjs/index.cjs +8 -8
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-IMHG3M62.js → chunk-5HP3T45N.js} +1 -1
- package/esm/chunk-D3UUM672.js +1 -0
- package/esm/{chunk-2GO4GGHE.js → chunk-I3VUX77R.js} +1 -1
- package/esm/{chunk-WXCSO57K.js → chunk-J745U74Q.js} +1 -1
- package/esm/chunk-SS6XZXHU.js +1 -0
- package/esm/{chunk-W5QUFHNP.js → chunk-TUE3DOHS.js} +7 -7
- package/esm/chunk-X7QP3WH3.js +1 -0
- package/esm/{chunk-IHGUMUOY.js → chunk-YAGEU3HO.js} +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeInstantiationMapper.js +1 -1
- package/esm/context/DynamicTypeMapper.js +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/esm/chunk-25QU7TNW.js +0 -1
- package/esm/chunk-45WV72IW.js +0 -1
- package/esm/chunk-P4OQRDWB.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(n,t,e)=>t in n?re(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var he=(n,t)=>()=>(n&&(t=n(n=0)),t);var ve=(n,t)=>{for(var e in t)re(n,e,{get:t[e],enumerable:!0})},Xe=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(n,i)&&i!==e&&re(n,i,{get:()=>t[i],enumerable:!(r=Je(t,i))||r.enumerable});return n};var qe=n=>Xe(re({},"__esModule",{value:!0}),n);var f=(n,t,e)=>Qe(n,typeof t!="symbol"?t+"":t,e);function Ae(){throw new Error("setTimeout has not been defined")}function Ee(){throw new Error("clearTimeout has not been defined")}function Ne(n){if(D===setTimeout)return setTimeout(n,0);if((D===Ae||!D)&&setTimeout)return D=setTimeout,setTimeout(n,0);try{return D(n,0)}catch(t){try{return D.call(null,n,0)}catch(e){return D.call(this,n,0)}}}function Ke(n){if(M===clearTimeout)return clearTimeout(n);if((M===Ee||!M)&&clearTimeout)return M=clearTimeout,clearTimeout(n);try{return M(n)}catch(t){try{return M.call(null,n)}catch(e){return M.call(this,n)}}}function et(){!q||!Y||(q=!1,Y.length?L=Y.concat(L):ie=-1,L.length&&Re())}function Re(){if(!q){var n=Ne(et);q=!0;for(var t=L.length;t;){for(Y=L,L=[];++ie<t;)Y&&Y[ie].run();ie=-1,t=L.length}Y=null,q=!1,Ke(n)}}function tt(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];L.push(new Ue(n,t)),L.length===1&&!q&&Ne(Re)}function Ue(n,t){this.fun=n,this.array=t}function $(){}function xt(n){throw new Error("process.binding is not supported")}function Tt(){return"/"}function gt(n){throw new Error("process.chdir is not supported")}function vt(){return 0}function At(n){var t=It.call(X)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return n&&(e=e-n[0],r=r-n[1],r<0&&(e--,r+=1e9)),[e,r]}function Nt(){var n=new Date,t=n-Et;return t/1e3}var D,M,L,q,Y,ie,nt,rt,it,ot,st,at,ut,ct,pt,ft,lt,ht,mt,dt,yt,wt,X,It,Et,d,Ie,u=he(()=>{"use strict";D=Ae,M=Ee;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&(M=clearTimeout);L=[],q=!1,ie=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};nt="browser",rt="browser",it=!0,ot={},st=[],at="",ut={},ct={},pt={};ft=$,lt=$,ht=$,mt=$,dt=$,yt=$,wt=$;X=globalThis.performance||{},It=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};Et=new Date;d={nextTick:tt,title:nt,browser:it,env:ot,argv:st,version:at,versions:ut,on:ft,addListener:lt,once:ht,off:mt,removeListener:dt,removeAllListeners:yt,emit:wt,binding:xt,cwd:Tt,chdir:gt,umask:vt,hrtime:At,platform:rt,release:ct,config:pt,uptime:Nt},Ie={};Object.keys(Ie).forEach(n=>{let t=n.split("."),e=d;for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1?e[i]=Ie[n]:e=e[i]||(e[i]={})}})});function be(){de=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=n.length;t<e;++t)k[t]=n[t],A[n.charCodeAt(t)]=t;A[45]=62,A[95]=63}function Ut(n){de||be();var t,e,r,i,o,s,p=n.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=n[p-2]==="="?2:n[p-1]==="="?1:0,s=new Rt(p*3/4-o),r=o>0?p-4:p;var h=0;for(t=0,e=0;t<r;t+=4,e+=3)i=A[n.charCodeAt(t)]<<18|A[n.charCodeAt(t+1)]<<12|A[n.charCodeAt(t+2)]<<6|A[n.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=A[n.charCodeAt(t)]<<2|A[n.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=A[n.charCodeAt(t)]<<10|A[n.charCodeAt(t+1)]<<4|A[n.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function St(n){return k[n>>18&63]+k[n>>12&63]+k[n>>6&63]+k[n&63]}function kt(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16)+(n[o+1]<<8)+n[o+2],i.push(St(r));return i.join("")}function Se(n){de||be();for(var t,e=n.length,r=e%3,i="",o=[],s=16383,p=0,h=e-r;p<h;p+=s)o.push(kt(n,p,p+s>h?h:p+s));return r===1?(t=n[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):r===2&&(t=(n[e-2]<<8)+n[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function oe(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function P(n,t){if(oe()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=a.prototype):(n===null&&(n=new a(t)),n.length=t),n}function a(n,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(n,t,e);if(typeof n=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return ye(this,n)}return Le(this,n,t,e)}function Le(n,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Lt(n,t,e,r):typeof t=="string"?bt(n,t,e):Pt(n,t)}function Pe(n){if(typeof n!="number")throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function _t(n,t,e,r){return Pe(t),t<=0?P(n,t):e!==void 0?typeof r=="string"?P(n,t).fill(e,r):P(n,t).fill(e):P(n,t)}function ye(n,t){if(Pe(t),n=P(n,t<0?0:we(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function bt(n,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=Be(t,e)|0;n=P(n,r);var i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function me(n,t){var e=t.length<0?0:we(t.length)|0;n=P(n,e);for(var r=0;r<e;r+=1)n[r]=t[r]&255;return n}function Lt(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),a.TYPED_ARRAY_SUPPORT?(n=t,n.__proto__=a.prototype):n=me(n,t),n}function Pt(n,t){if(_(t)){var e=we(t.length)|0;return n=P(n,e),n.length===0||t.copy(n,0,0,e),n}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||qt(t.length)?P(n,0):me(n,t);if(t.type==="Buffer"&&Array.isArray(t.data))return me(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function we(n){if(n>=oe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+oe().toString(16)+" bytes");return n|0}function _(n){return!!(n!=null&&n._isBuffer)}function Be(n,t){if(_(n))return n.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var e=n.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return se(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Oe(n).length;default:if(r)return se(n).length;t=(""+t).toLowerCase(),r=!0}}function Bt(n,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return Wt(this,t,e);case"utf8":case"utf-8":return Me(this,t,e);case"ascii":return Vt(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return $t(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}function O(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function Fe(n,t,e,r,i){if(n.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,r)),_(t))return t.length===0?-1:ke(n,t,e,r,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):ke(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function ke(n,t,e,r,i){var o=1,s=n.length,p=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(I,Q){return o===1?I[Q]:I.readUInt16BE(Q*o)}var y;if(i){var w=-1;for(y=e;y<s;y++)if(h(n,y)===h(t,w===-1?0:y-w)){if(w===-1&&(w=y),y-w+1===p)return w*o}else w!==-1&&(y-=y-w),w=-1}else for(e+p>s&&(e=s-p),y=e;y>=0;y--){for(var m=!0,U=0;U<p;U++)if(h(n,y+U)!==h(t,U)){m=!1;break}if(m)return y}return-1}function Ft(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;n[e+s]=p}return s}function Dt(n,t,e,r){return ce(se(t,n.length-e),n,e,r)}function De(n,t,e,r){return ce(Qt(t),n,e,r)}function Mt(n,t,e,r){return De(n,t,e,r)}function Ct(n,t,e,r){return ce(Oe(t),n,e,r)}function Yt(n,t,e,r){return ce(Xt(t,n.length-e),n,e,r)}function $t(n,t,e){return t===0&&e===n.length?Se(n):Se(n.slice(t,e))}function Me(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o=n[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,y,w,m;switch(p){case 1:o<128&&(s=o);break;case 2:h=n[i+1],(h&192)===128&&(m=(o&31)<<6|h&63,m>127&&(s=m));break;case 3:h=n[i+1],y=n[i+2],(h&192)===128&&(y&192)===128&&(m=(o&15)<<12|(h&63)<<6|y&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:h=n[i+1],y=n[i+2],w=n[i+3],(h&192)===128&&(y&192)===128&&(w&192)===128&&(m=(o&15)<<18|(h&63)<<12|(y&63)<<6|w&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),i+=p}return Ot(r)}function Ot(n){var t=n.length;if(t<=_e)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=_e));return e}function Vt(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]&127);return r}function Gt(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function Wt(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=Zt(n[o]);return i}function Ht(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+r[o+1]*256);return i}function T(n,t,e){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function g(n,t,e,r,i,o){if(!_(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function ae(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function ue(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>(r?i:3-i)*8&255}function Ce(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(n,t,e,r,i){return i||Ce(n,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(n,t,e,r,23,4),e+4}function $e(n,t,e,r,i){return i||Ce(n,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(n,t,e,r,52,8),e+8}function Jt(n){if(n=zt(n).replace(jt,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function zt(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function Zt(n){return n<16?"0"+n.toString(16):n.toString(16)}function se(n,t){t=t||1/0;for(var e,r=n.length,i=null,o=[],s=0;s<r;++s){if(e=n.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(n){for(var t=[],e=0;e<n.length;++e)t.push(n.charCodeAt(e)&255);return t}function Xt(n,t){for(var e,r,i,o=[],s=0;s<n.length&&!((t-=2)<0);++s)e=n.charCodeAt(s),r=e>>8,i=e%256,o.push(i),o.push(r);return o}function Oe(n){return Ut(Jt(n))}function ce(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}function qt(n){return n!==n}function Kt(n){return n!=null&&(!!n._isBuffer||Ve(n)||en(n))}function Ve(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function en(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Ve(n.slice(0,0))}function pe(n,t,e,r,i){var o,s,p=i*8-r-1,h=(1<<p)-1,y=h>>1,w=-7,m=e?i-1:0,U=e?-1:1,I=n[t+m];for(m+=U,o=I&(1<<-w)-1,I>>=-w,w+=p;w>0;o=o*256+n[t+m],m+=U,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=r;w>0;s=s*256+n[t+m],m+=U,w-=8);if(o===0)o=1-y;else{if(o===h)return s?NaN:(I?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-y}return(I?-1:1)*s*Math.pow(2,o-r)}function Ge(n,t,e,r,i,o){var s,p,h,y=o*8-i-1,w=(1<<y)-1,m=w>>1,U=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:o-1,Q=r?1:-1,je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+m>=1?t+=U/h:t+=U*Math.pow(2,1-m),t*h>=2&&(s++,h/=2),s+m>=w?(p=0,s=w):s+m>=1?(p=(t*h-1)*Math.pow(2,i),s=s+m):(p=t*Math.pow(2,m-1)*Math.pow(2,i),s=0));i>=8;n[e+I]=p&255,I+=Q,p/=256,i-=8);for(s=s<<i|p,y+=i;y>0;n[e+I]=s&255,I+=Q,s/=256,y-=8);n[e+I-Q]|=je*128}var k,A,Rt,de,_e,jt,We=he(()=>{"use strict";u();c();k=[],A=[],Rt=typeof Uint8Array!="undefined"?Uint8Array:Array,de=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(n){return n.__proto__=a.prototype,n};a.from=function(n,t,e){return Le(null,n,t,e)};a.kMaxLength=oe();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(n,t,e){return _t(null,n,t,e)};a.allocUnsafe=function(n){return ye(null,n)};a.allocUnsafeSlow=function(n){return ye(null,n)};a.isBuffer=Kt;a.compare=function(t,e){if(!_(t)||!_(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==e[o]){r=t[o],i=e[o];break}return r<i?-1:i<r?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!_(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Be;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)O(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)O(this,e,e+3),O(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)O(this,e,e+7),O(this,e+1,e+6),O(this,e+2,e+5),O(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Me(this,0,t):Bt.apply(this,arguments)};a.prototype.equals=function(t){if(!_(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,r,i,o){if(!_(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=r)return 0;if(i>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=r-e,h=Math.min(s,p),y=this.slice(i,o),w=t.slice(e,r),m=0;m<h;++m)if(y[m]!==w[m]){s=y[m],p=w[m];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};a.prototype.indexOf=function(t,e,r){return Fe(this,t,e,r,!0)};a.prototype.lastIndexOf=function(t,e,r){return Fe(this,t,e,r,!1)};a.prototype.write=function(t,e,r,i){if(e===void 0)i="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")i=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Ft(this,t,e,r);case"utf8":case"utf-8":return Dt(this,t,e,r);case"ascii":return De(this,t,e,r);case"latin1":case"binary":return Mt(this,t,e,r);case"base64":return Ct(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};_e=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};a.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};a.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),pe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),pe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),pe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),pe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;g(this,t,e,r,o,0)}var s=1,p=0;for(this[e]=t&255;++p<r&&(s*=256);)this[e+p]=t/s&255;return e+r};a.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;g(this,t,e,r,o,0)}var s=r-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+r};a.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ue(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ue(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);g(this,t,e,r,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<r&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+r};a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);g(this,t,e,r,o-1,-o)}var s=r-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+r};a.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ue(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ue(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,r){return Ye(this,t,e,!0,r)};a.prototype.writeFloatBE=function(t,e,r){return Ye(this,t,e,!1,r)};a.prototype.writeDoubleLE=function(t,e,r){return $e(this,t,e,!0,r)};a.prototype.writeDoubleBE=function(t,e,r){return $e(this,t,e,!1,r)};a.prototype.copy=function(t,e,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<i-r&&(i=t.length-e+r);var o=i-r,s;if(this===t&&r<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};a.prototype.fill=function(t,e,r,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<r;++s)this[s]=t;else{var p=_(t)?t:se(new a(t,i).toString()),h=p.length;for(s=0;s<r-e;++s)this[s+e]=p[s%h]}return this};jt=/[^+\/0-9A-Za-z-_]/g});var c=he(()=>{"use strict";We()});var Un={};ve(Un,{DynamicTypeInstantiationMapper:()=>ge});module.exports=qe(Un);u();c();u();c();u();c();function E(n){throw new Error("Unexpected value: "+JSON.stringify(n))}u();c();u();c();var V=class{};u();c();u();c();var C=class extends V{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var tn=4,K=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
|
|
1
|
+
"use strict";var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(n,t,e)=>t in n?re(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var he=(n,t)=>()=>(n&&(t=n(n=0)),t);var ve=(n,t)=>{for(var e in t)re(n,e,{get:t[e],enumerable:!0})},Xe=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(n,i)&&i!==e&&re(n,i,{get:()=>t[i],enumerable:!(r=Je(t,i))||r.enumerable});return n};var qe=n=>Xe(re({},"__esModule",{value:!0}),n);var f=(n,t,e)=>Qe(n,typeof t!="symbol"?t+"":t,e);function Ae(){throw new Error("setTimeout has not been defined")}function Ne(){throw new Error("clearTimeout has not been defined")}function Ee(n){if(D===setTimeout)return setTimeout(n,0);if((D===Ae||!D)&&setTimeout)return D=setTimeout,setTimeout(n,0);try{return D(n,0)}catch(t){try{return D.call(null,n,0)}catch(e){return D.call(this,n,0)}}}function Ke(n){if(M===clearTimeout)return clearTimeout(n);if((M===Ne||!M)&&clearTimeout)return M=clearTimeout,clearTimeout(n);try{return M(n)}catch(t){try{return M.call(null,n)}catch(e){return M.call(this,n)}}}function et(){!q||!$||(q=!1,$.length?L=$.concat(L):ie=-1,L.length&&Re())}function Re(){if(!q){var n=Ee(et);q=!0;for(var t=L.length;t;){for($=L,L=[];++ie<t;)$&&$[ie].run();ie=-1,t=L.length}$=null,q=!1,Ke(n)}}function tt(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];L.push(new Ue(n,t)),L.length===1&&!q&&Ee(Re)}function Ue(n,t){this.fun=n,this.array=t}function O(){}function xt(n){throw new Error("process.binding is not supported")}function Tt(){return"/"}function gt(n){throw new Error("process.chdir is not supported")}function vt(){return 0}function At(n){var t=It.call(X)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return n&&(e=e-n[0],r=r-n[1],r<0&&(e--,r+=1e9)),[e,r]}function Et(){var n=new Date,t=n-Nt;return t/1e3}var D,M,L,q,$,ie,nt,rt,it,ot,st,at,ut,ct,pt,ft,lt,ht,mt,dt,yt,wt,X,It,Nt,d,Ie,u=he(()=>{"use strict";D=Ae,M=Ne;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&(M=clearTimeout);L=[],q=!1,ie=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};nt="browser",rt="browser",it=!0,ot={},st=[],at="",ut={},ct={},pt={};ft=O,lt=O,ht=O,mt=O,dt=O,yt=O,wt=O;X=globalThis.performance||{},It=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};Nt=new Date;d={nextTick:tt,title:nt,browser:it,env:ot,argv:st,version:at,versions:ut,on:ft,addListener:lt,once:ht,off:mt,removeListener:dt,removeAllListeners:yt,emit:wt,binding:xt,cwd:Tt,chdir:gt,umask:vt,hrtime:At,platform:rt,release:ct,config:pt,uptime:Et},Ie={};Object.keys(Ie).forEach(n=>{let t=n.split("."),e=d;for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1?e[i]=Ie[n]:e=e[i]||(e[i]={})}})});function be(){de=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=n.length;t<e;++t)k[t]=n[t],N[n.charCodeAt(t)]=t;N[45]=62,N[95]=63}function Ut(n){de||be();var t,e,r,i,o,s,p=n.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=n[p-2]==="="?2:n[p-1]==="="?1:0,s=new Rt(p*3/4-o),r=o>0?p-4:p;var h=0;for(t=0,e=0;t<r;t+=4,e+=3)i=N[n.charCodeAt(t)]<<18|N[n.charCodeAt(t+1)]<<12|N[n.charCodeAt(t+2)]<<6|N[n.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=N[n.charCodeAt(t)]<<2|N[n.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=N[n.charCodeAt(t)]<<10|N[n.charCodeAt(t+1)]<<4|N[n.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function St(n){return k[n>>18&63]+k[n>>12&63]+k[n>>6&63]+k[n&63]}function kt(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16)+(n[o+1]<<8)+n[o+2],i.push(St(r));return i.join("")}function Se(n){de||be();for(var t,e=n.length,r=e%3,i="",o=[],s=16383,p=0,h=e-r;p<h;p+=s)o.push(kt(n,p,p+s>h?h:p+s));return r===1?(t=n[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):r===2&&(t=(n[e-2]<<8)+n[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function oe(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function P(n,t){if(oe()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=a.prototype):(n===null&&(n=new a(t)),n.length=t),n}function a(n,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(n,t,e);if(typeof n=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return ye(this,n)}return Le(this,n,t,e)}function Le(n,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Lt(n,t,e,r):typeof t=="string"?bt(n,t,e):Pt(n,t)}function Pe(n){if(typeof n!="number")throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function _t(n,t,e,r){return Pe(t),t<=0?P(n,t):e!==void 0?typeof r=="string"?P(n,t).fill(e,r):P(n,t).fill(e):P(n,t)}function ye(n,t){if(Pe(t),n=P(n,t<0?0:we(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function bt(n,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=Fe(t,e)|0;n=P(n,r);var i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function me(n,t){var e=t.length<0?0:we(t.length)|0;n=P(n,e);for(var r=0;r<e;r+=1)n[r]=t[r]&255;return n}function Lt(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),a.TYPED_ARRAY_SUPPORT?(n=t,n.__proto__=a.prototype):n=me(n,t),n}function Pt(n,t){if(_(t)){var e=we(t.length)|0;return n=P(n,e),n.length===0||t.copy(n,0,0,e),n}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||qt(t.length)?P(n,0):me(n,t);if(t.type==="Buffer"&&Array.isArray(t.data))return me(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function we(n){if(n>=oe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+oe().toString(16)+" bytes");return n|0}function _(n){return!!(n!=null&&n._isBuffer)}function Fe(n,t){if(_(n))return n.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var e=n.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return se(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Oe(n).length;default:if(r)return se(n).length;t=(""+t).toLowerCase(),r=!0}}function Ft(n,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return Wt(this,t,e);case"utf8":case"utf-8":return Me(this,t,e);case"ascii":return Vt(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return $t(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}function V(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function Be(n,t,e,r,i){if(n.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,r)),_(t))return t.length===0?-1:ke(n,t,e,r,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):ke(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function ke(n,t,e,r,i){var o=1,s=n.length,p=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(I,Q){return o===1?I[Q]:I.readUInt16BE(Q*o)}var y;if(i){var w=-1;for(y=e;y<s;y++)if(h(n,y)===h(t,w===-1?0:y-w)){if(w===-1&&(w=y),y-w+1===p)return w*o}else w!==-1&&(y-=y-w),w=-1}else for(e+p>s&&(e=s-p),y=e;y>=0;y--){for(var m=!0,U=0;U<p;U++)if(h(n,y+U)!==h(t,U)){m=!1;break}if(m)return y}return-1}function Bt(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;n[e+s]=p}return s}function Dt(n,t,e,r){return ce(se(t,n.length-e),n,e,r)}function De(n,t,e,r){return ce(Qt(t),n,e,r)}function Mt(n,t,e,r){return De(n,t,e,r)}function Ct(n,t,e,r){return ce(Oe(t),n,e,r)}function Yt(n,t,e,r){return ce(Xt(t,n.length-e),n,e,r)}function $t(n,t,e){return t===0&&e===n.length?Se(n):Se(n.slice(t,e))}function Me(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o=n[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,y,w,m;switch(p){case 1:o<128&&(s=o);break;case 2:h=n[i+1],(h&192)===128&&(m=(o&31)<<6|h&63,m>127&&(s=m));break;case 3:h=n[i+1],y=n[i+2],(h&192)===128&&(y&192)===128&&(m=(o&15)<<12|(h&63)<<6|y&63,m>2047&&(m<55296||m>57343)&&(s=m));break;case 4:h=n[i+1],y=n[i+2],w=n[i+3],(h&192)===128&&(y&192)===128&&(w&192)===128&&(m=(o&15)<<18|(h&63)<<12|(y&63)<<6|w&63,m>65535&&m<1114112&&(s=m))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),i+=p}return Ot(r)}function Ot(n){var t=n.length;if(t<=_e)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=_e));return e}function Vt(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]&127);return r}function Gt(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function Wt(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=Zt(n[o]);return i}function Ht(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+r[o+1]*256);return i}function T(n,t,e){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function g(n,t,e,r,i,o){if(!_(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function ae(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function ue(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>(r?i:3-i)*8&255}function Ce(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(n,t,e,r,i){return i||Ce(n,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(n,t,e,r,23,4),e+4}function $e(n,t,e,r,i){return i||Ce(n,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(n,t,e,r,52,8),e+8}function Jt(n){if(n=zt(n).replace(jt,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function zt(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function Zt(n){return n<16?"0"+n.toString(16):n.toString(16)}function se(n,t){t=t||1/0;for(var e,r=n.length,i=null,o=[],s=0;s<r;++s){if(e=n.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(n){for(var t=[],e=0;e<n.length;++e)t.push(n.charCodeAt(e)&255);return t}function Xt(n,t){for(var e,r,i,o=[],s=0;s<n.length&&!((t-=2)<0);++s)e=n.charCodeAt(s),r=e>>8,i=e%256,o.push(i),o.push(r);return o}function Oe(n){return Ut(Jt(n))}function ce(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}function qt(n){return n!==n}function Kt(n){return n!=null&&(!!n._isBuffer||Ve(n)||en(n))}function Ve(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function en(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Ve(n.slice(0,0))}function pe(n,t,e,r,i){var o,s,p=i*8-r-1,h=(1<<p)-1,y=h>>1,w=-7,m=e?i-1:0,U=e?-1:1,I=n[t+m];for(m+=U,o=I&(1<<-w)-1,I>>=-w,w+=p;w>0;o=o*256+n[t+m],m+=U,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=r;w>0;s=s*256+n[t+m],m+=U,w-=8);if(o===0)o=1-y;else{if(o===h)return s?NaN:(I?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-y}return(I?-1:1)*s*Math.pow(2,o-r)}function Ge(n,t,e,r,i,o){var s,p,h,y=o*8-i-1,w=(1<<y)-1,m=w>>1,U=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:o-1,Q=r?1:-1,je=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+m>=1?t+=U/h:t+=U*Math.pow(2,1-m),t*h>=2&&(s++,h/=2),s+m>=w?(p=0,s=w):s+m>=1?(p=(t*h-1)*Math.pow(2,i),s=s+m):(p=t*Math.pow(2,m-1)*Math.pow(2,i),s=0));i>=8;n[e+I]=p&255,I+=Q,p/=256,i-=8);for(s=s<<i|p,y+=i;y>0;n[e+I]=s&255,I+=Q,s/=256,y-=8);n[e+I-Q]|=je*128}var k,N,Rt,de,_e,jt,We=he(()=>{"use strict";u();c();k=[],N=[],Rt=typeof Uint8Array!="undefined"?Uint8Array:Array,de=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(n){return n.__proto__=a.prototype,n};a.from=function(n,t,e){return Le(null,n,t,e)};a.kMaxLength=oe();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(n,t,e){return _t(null,n,t,e)};a.allocUnsafe=function(n){return ye(null,n)};a.allocUnsafeSlow=function(n){return ye(null,n)};a.isBuffer=Kt;a.compare=function(t,e){if(!_(t)||!_(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==e[o]){r=t[o],i=e[o];break}return r<i?-1:i<r?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!_(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Fe;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)V(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)V(this,e,e+3),V(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)V(this,e,e+7),V(this,e+1,e+6),V(this,e+2,e+5),V(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Me(this,0,t):Ft.apply(this,arguments)};a.prototype.equals=function(t){if(!_(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,r,i,o){if(!_(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=r)return 0;if(i>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=r-e,h=Math.min(s,p),y=this.slice(i,o),w=t.slice(e,r),m=0;m<h;++m)if(y[m]!==w[m]){s=y[m],p=w[m];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};a.prototype.indexOf=function(t,e,r){return Be(this,t,e,r,!0)};a.prototype.lastIndexOf=function(t,e,r){return Be(this,t,e,r,!1)};a.prototype.write=function(t,e,r,i){if(e===void 0)i="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")i=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Bt(this,t,e,r);case"utf8":case"utf-8":return Dt(this,t,e,r);case"ascii":return De(this,t,e,r);case"latin1":case"binary":return Mt(this,t,e,r);case"base64":return Ct(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};_e=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||T(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};a.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};a.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),pe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),pe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),pe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),pe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;g(this,t,e,r,o,0)}var s=1,p=0;for(this[e]=t&255;++p<r&&(s*=256);)this[e+p]=t/s&255;return e+r};a.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;g(this,t,e,r,o,0)}var s=r-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+r};a.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ue(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ue(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);g(this,t,e,r,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<r&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+r};a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);g(this,t,e,r,o-1,-o)}var s=r-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+r};a.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):ae(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):ae(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ue(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e|0,r||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ue(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,r){return Ye(this,t,e,!0,r)};a.prototype.writeFloatBE=function(t,e,r){return Ye(this,t,e,!1,r)};a.prototype.writeDoubleLE=function(t,e,r){return $e(this,t,e,!0,r)};a.prototype.writeDoubleBE=function(t,e,r){return $e(this,t,e,!1,r)};a.prototype.copy=function(t,e,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<i-r&&(i=t.length-e+r);var o=i-r,s;if(this===t&&r<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};a.prototype.fill=function(t,e,r,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<r;++s)this[s]=t;else{var p=_(t)?t:se(new a(t,i).toString()),h=p.length;for(s=0;s<r-e;++s)this[s+e]=p[s%h]}return this};jt=/[^+\/0-9A-Za-z-_]/g});var c=he(()=>{"use strict";We()});var Un={};ve(Un,{DynamicTypeInstantiationMapper:()=>ge});module.exports=qe(Un);u();c();u();c();u();c();function A(n){throw new Error("Unexpected value: "+JSON.stringify(n))}u();c();u();c();var G=class{};u();c();u();c();var C=class extends G{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var tn=4,K=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
|
|
2
2
|
`),r=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=r.replaceAll(`
|
|
3
3
|
`,`
|
|
4
4
|
${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
|
|
5
5
|
`),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new C(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new C(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",r,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),r(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
6
6
|
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
7
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let i=t[0];i!=null&&r(i);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&r(s)}}}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
-
`)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*tn)}};u();c();var fe=class{},ee=class extends fe{async format(t){return t}formatSync(t){return t}};u();c();function xe(n){return(n==null?void 0:n.name)!=null}u();c();u();c();var
|
|
9
|
-
${t}`)}return t}
|
|
7
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let i=t[0];i!=null&&r(i);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&r(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
+
`)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*tn)}};u();c();var fe=class{},ee=class extends fe{async format(t){return t}formatSync(t){return t}};u();c();function xe(n){return(n==null?void 0:n.name)!=null}u();c();u();c();var Y={Critical:"CRITICAL",Warning:"WARNING"};u();c();u();c();function Te(n,t){var r,i;let e=(r=n.split("/").pop())!=null?r:n;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}u();c();u();c();u();c();u();c();u();c();u();c();var nn=/[^0-9a-zA-Z_]/g,W=class extends K{constructor({packageName:e,rootImportPath:r,importPath:i,customConfig:o,formatter:s}){super();f(this,"packageName");f(this,"rootImportPath");f(this,"importPath");f(this,"customConfig");f(this,"formatter");f(this,"imports",{});this.packageName=e,this.rootImportPath=r,this.importPath=i,this.customConfig=o,this.formatter=s!=null?s:new ee}addImport(e){let r=this.imports[e];if(r!=null)return r;let i=this.getValidAlias(Te(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let r=e.split("-");return r[0]==null?e:r[0].replace(nn,"")}};var te=class extends W{constructor({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o}){super({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
|
|
9
|
+
${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
|
|
10
10
|
${t}`)}return t}getContent(){let t=`package ${this.packageName}
|
|
11
11
|
|
|
12
12
|
`,e=this.stringifyImports();return e.length>0?`${t}${e}
|
|
@@ -14,9 +14,9 @@ ${t}`)}return t}getContent(){let t=`package ${this.packageName}
|
|
|
14
14
|
${this.buffer}`:t+this.buffer}stringifyImports(){let t=Object.entries(this.imports).filter(([e,r])=>e!==this.importPath).map(([e,r])=>` ${r} "${e}"`).join(`
|
|
15
15
|
`);return t?`import (
|
|
16
16
|
${t}
|
|
17
|
-
)`:""}};var x=class extends
|
|
18
|
-
`).forEach(r=>{e.writeLine(`// ${r}`)})}};var H=class extends x{constructor({name:e,docs:r}){super();f(this,"name");f(this,"docs");f(this,"members",[]);this.name=e,this.docs=r}addMember(e){this.members.push(e)}write(e){e.writeNode(new
|
|
19
|
-
`)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(fn({value:this.internalType.value}));break;default:E(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:r,entries:i}){return new this({type:"map",keyType:e,valueType:r,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static slice({valueType:e,values:r}){return new this({type:"slice",valueType:e,values:r})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:r}){return new this({type:"struct",typeReference:e,fields:r})}static structPointer({typeReference:e,fields:r}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:r})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("nil");return}if(Array.isArray(r)){this.writeAnyArray({writer:e,value:r});return}this.writeAnyObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeAnyArray({writer:e,value:r}){if(e.write("[]interface{}"),r.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of r)e.writeNode(n.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:r}){e.write("map[string]interface{}");let i=Object.entries(r);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`"${o}": `),e.writeNode(n.any(s)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:r}){e.write("map["),e.writeNode(r.keyType),e.write("]"),e.writeNode(r.valueType);let i=ln({entries:r.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:r}){if(an.has(r.internalType.type)){e.writeNode(un({writer:e,type:r}));return}if(He.has(r.internalType.type)){r.write(e);return}if(r.internalType.type==="enum"){e.writeNode(new F({on:r.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),r.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||He.has(e.internalType.type)}writeSlice({writer:e,slice:r}){e.write("[]"),e.writeNode(r.valueType);let i=mn({values:r.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:r}){e.writeNode(r.typeReference);let i=hn({fields:r.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function un({writer:n,type:t}){return new S({func:new v({name:cn({type:t}),importPath:n.rootImportPath}),arguments_:[t]})}function cn({type:n}){switch(n.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function pn({writer:n,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new S({func:new v({name:e,importPath:n.rootImportPath}),arguments_:[new b(`"${t.value}"`)]})}function fn({value:n}){return new S({func:new v({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new b(`"${n}"`)]})}function ln({entries:n}){return n.filter(t=>!R.isNop(t.key)&&!R.isNop(t.value))}function hn({fields:n}){return n.filter(t=>!R.isNop(t.value))}function mn({values:n}){return n.filter(t=>!R.isNop(t))}function le({writer:n,arguments_:t}){let e=yn(t);if(e.length===0){n.write("()");return}n.writeLine("("),n.indent();for(let r of e)dn({writer:n,argument:r}),n.writeLine(",");n.dedent(),n.write(")")}function dn({writer:n,argument:t}){xe(t)?t.assignment.write(n):t.write(n)}function yn(n){return n.filter(t=>!(t instanceof R&&R.isNop(t)))}var S=class extends x{constructor({func:e,arguments_:r}){super();f(this,"func");f(this,"arguments_");this.func=e,this.arguments_=r}write(e){e.writeNode(this.func),le({writer:e,arguments_:this.arguments_})}};u();c();var z=class extends x{constructor({name:e,type:r,docs:i}){super();f(this,"name");f(this,"type");f(this,"docs");this.name=e,this.type=r,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();c();var Z=class extends x{constructor({name:e,importPath:r,docs:i}){super();f(this,"name");f(this,"importPath");f(this,"docs");f(this,"fields",[]);f(this,"methods",[]);this.name=e,this.importPath=r,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let r of this.fields)e.writeNode(r),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let r of this.methods)e.writeNode(r),e.newLine()}};var l={};ve(l,{AstNode:()=>x,CodeBlock:()=>b,Enum:()=>H,Field:()=>j,Func:()=>J,FuncInvocation:()=>S,Method:()=>B,MethodInvocation:()=>F,Parameter:()=>z,Struct:()=>Z,Type:()=>ne,TypeInstantiation:()=>R,TypeReference:()=>v,Writer:()=>W,codeblock:()=>wn,enum_:()=>xn,field:()=>Tn,func:()=>gn,invokeFunc:()=>vn,invokeMethod:()=>In,method:()=>An,parameter:()=>En,struct:()=>Nn,typeReference:()=>Rn});u();c();function wn(n){return new b(n)}function xn(n){return new H(n)}function Tn(n){return new j(n)}function gn(n){return new J(n)}function vn(n){return new S(n)}function In(n){return new F(n)}function An(n){return new B(n)}function En(n){return new z(n)}function Nn(n){return new Z(n)}function Rn(n){return new v(n)}var ge=class{constructor({context:t}){f(this,"context");this.context=t}convert(t){if(t.value==null)return l.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return l.TypeInstantiation.nop();case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?l.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return l.TypeInstantiation.optional(this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"unknown":return this.convertUnknown({value:t.value});default:E(t.typeReference)}}convertList({list:t,value:e}){return Array.isArray(e)?l.TypeInstantiation.slice({valueType:this.context.dynamicTypeMapper.convert({typeReference:t}),values:e.map((r,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:G.Critical,message:`Expected array but got: ${typeof e}`}),l.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:G.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),l.TypeInstantiation.nop()):l.TypeInstantiation.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:t.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:t.value}),entries:Object.entries(e).map(([r,i])=>{this.context.errors.scope(r);try{return{key:this.convert({typeReference:t.key,value:r,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:r});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndicriminatedUnion({undicriminatedUnion:t,value:e});default:E(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let r=this.context.getGoTypeReferenceFromDeclaration({declaration:t.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(i==null)return l.TypeInstantiation.nop();let o=i.singleDiscriminatedUnionType,s=this.getBaseFields({discriminatedUnionTypeInstance:i,singleDiscriminatedUnionType:o});switch(o.type){case"samePropertiesAsObject":{let p=this.context.resolveNamedType({typeId:o.typeId});return p==null?l.TypeInstantiation.nop():l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convertNamed({named:p,value:i.value})},...s]})}case"singleProperty":{let p=this.context.getRecord(i.value);if(p==null)return l.TypeInstantiation.nop();try{return this.context.errors.scope(o.discriminantValue.wireValue),l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convert({typeReference:o.typeReference,value:p[o.discriminantValue.wireValue]})},...s]})}finally{this.context.errors.unscope()}}case"noProperties":return l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(i.discriminantValue.name),value:l.TypeInstantiation.string(o.discriminantValue.wireValue)},...s]});default:E(o)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getTypeName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let r=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return l.TypeInstantiation.structPointer({typeReference:l.typeReference({name:this.context.getTypeName(t.declaration.name),importPath:this.context.getImportPath(t.declaration.fernFilepath)}),fields:r.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getTypeName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let r=this.getEnumValueName({enum_:t,value:e});return r==null?l.TypeInstantiation.nop():l.TypeInstantiation.enum(l.typeReference({name:r,importPath:this.context.getImportPath(t.declaration.fernFilepath)}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:G.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let r=t.values.find(i=>i.wireValue===e);if(r==null){this.context.errors.add({severity:G.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return`${this.context.getTypeName(t.declaration.name)}${this.context.getTypeName(r.name)}`}convertUndicriminatedUnion({undicriminatedUnion:t,value:e}){let r=this.findMatchingUndiscriminatedUnionType({undicriminatedUnion:t,value:e});if(r==null)return l.TypeInstantiation.nop();let i=this.getUndiscriminatedUnionFieldName({typeReference:r.valueTypeReference});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.structPointer({typeReference:this.context.getGoTypeReferenceFromDeclaration({declaration:t.declaration}),fields:[{name:i,value:r.typeInstantiation}]})}findMatchingUndiscriminatedUnionType({undicriminatedUnion:t,value:e}){for(let r of t.types)try{let i=this.convert({typeReference:r,value:e});return{valueTypeReference:r,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:G.Critical,message:`None of the types in the undicriminated union matched the given "${typeof e}" value`})}getUndiscriminatedUnionFieldName({typeReference:t}){switch(t.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:t});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:t.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:t});case"named":{let e=this.context.resolveNamedType({typeId:t.value});return e==null?void 0:this.context.getTypeName(e.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({optional:t});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:t.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:t});case"unknown":return"Unknown"}}getUndiscriminatedUnionFieldNameForList({list:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}List`}getUndiscriminatedUnionFieldNameForMap({map:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t.key});if(e==null)return;let r=this.getUndiscriminatedUnionFieldName({typeReference:t.value});if(r!=null)return`${e}${r}Map`}getUndiscriminatedUnionFieldNameForOptional({optional:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}Optional`}getUndiscriminatedUnionFieldNameForSet({set:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}Set`}getUndiscriminatedUnionFieldNameForLiteral({literal:t}){switch(t.type){case"boolean":return`${t.value}BoolLiteral`;case"string":return`${t.value}StringLiteral`;default:E(t)}}getUndiscriminatedUnionFieldNameForPrimitive({primitive:t}){switch(t){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:E(t)}}convertUnknown({value:t}){return l.TypeInstantiation.any(t)}convertPrimitive({primitive:t,value:e,as:r}){switch(t){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.int(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.int64(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.float64(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.bool(i)}case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.string(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.dateTime(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.string(i)}default:E(t)}}getValueAsNumber({value:t,as:e}){let r=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:r})}getValueAsBoolean({value:t,as:e}){let r=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:r})}};0&&(module.exports={DynamicTypeInstantiationMapper});
|
|
17
|
+
)`:""}};var x=class extends G{async toStringAsync({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o}){let s=new te({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o});return this.write(s),s.toStringAsync()}toString({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o}){let s=new te({packageName:t,rootImportPath:e,importPath:r,customConfig:i,formatter:o});return this.write(s),s.toString()}};var v=class extends x{constructor({name:e,importPath:r}){super();f(this,"name");f(this,"importPath");this.name=e,this.importPath=r}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let r=e.addImport(this.importPath);e.write(`${r}.${this.name}`)}};var rn=new Set(["any","bytes","map","slice"]),ne=class n extends x{constructor(e){super();f(this,"internalType");this.internalType=e}write(e,{comment:r}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(on);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(sn);break;default:A(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,r){return new this({type:"map",keyType:e,valueType:r})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return n.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||rn.has(e.internalType.type)}},on=new v({importPath:"time",name:"Time"}),sn=new v({importPath:"github.com/google/uuid",name:"UUID"});u();c();u();c();var b=class extends x{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new C(this.arg).write(e)}};u();c();u();c();var E=class extends x{constructor({docs:e}={}){super();f(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
|
|
18
|
+
`).forEach(r=>{e.writeLine(`// ${r}`)})}};var H=class extends x{constructor({name:e,docs:r}){super();f(this,"name");f(this,"docs");f(this,"members",[]);this.name=e,this.docs=r}addMember(e){this.members.push(e)}write(e){e.writeNode(new E({docs:this.docs})),e.write(`type ${this.name} string`)}};u();c();var j=class extends x{constructor({name:e,type:r,docs:i}){super();f(this,"name");f(this,"type");f(this,"docs");this.name=e,this.type=r,this.docs=i}write(e){e.writeNode(new E({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();c();u();c();var F=class extends x{constructor({name:e,parameters:r,return_:i,body:o,docs:s,typeReference:p}){super();f(this,"name");f(this,"parameters");f(this,"return_");f(this,"body");f(this,"docs");f(this,"typeReference");this.name=e,this.parameters=r,this.return_=i,this.body=o,this.docs=s,this.typeReference=p}write(e){var r;if(e.writeNode(new E({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,o)=>{o>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(r=this.body)==null||r.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:r}){e.write(`(${this.getReceiverName(r.name)} `),r.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var J=class extends x{constructor({name:e,parameters:r,return_:i,body:o,docs:s}){super();f(this,"func");this.func=new F({name:e,parameters:r,return_:i,body:o,docs:s})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};u();c();u();c();u();c();u();c();var B=class extends x{constructor({method:e,arguments_:r,on:i}){super();f(this,"on");f(this,"method");f(this,"arguments_");this.on=i,this.method=e,this.arguments_=r}write(e){this.on.write(e),e.write("."),e.write(this.method),le({writer:e,arguments_:this.arguments_})}};var an=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),He=new Set(["any","bytes","map","slice"]),R=class n extends x{constructor(e){super();f(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(pn({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
|
|
19
|
+
`)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(fn({value:this.internalType.value}));break;default:A(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:r,entries:i}){return new this({type:"map",keyType:e,valueType:r,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static slice({valueType:e,values:r}){return new this({type:"slice",valueType:e,values:r})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:r}){return new this({type:"struct",typeReference:e,fields:r})}static structPointer({typeReference:e,fields:r}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:r})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("nil");return}if(Array.isArray(r)){this.writeAnyArray({writer:e,value:r});return}this.writeAnyObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeAnyArray({writer:e,value:r}){if(e.write("[]interface{}"),r.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of r)e.writeNode(n.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:r}){e.write("map[string]interface{}");let i=Object.entries(r);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`"${o}": `),e.writeNode(n.any(s)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:r}){e.write("map["),e.writeNode(r.keyType),e.write("]"),e.writeNode(r.valueType);let i=ln({entries:r.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:r}){if(an.has(r.internalType.type)){e.writeNode(un({writer:e,type:r}));return}if(He.has(r.internalType.type)){r.write(e);return}if(r.internalType.type==="enum"){e.writeNode(new B({on:r.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),r.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||He.has(e.internalType.type)}writeSlice({writer:e,slice:r}){e.write("[]"),e.writeNode(r.valueType);let i=mn({values:r.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:r}){e.writeNode(r.typeReference);let i=hn({fields:r.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function un({writer:n,type:t}){return new S({func:new v({name:cn({type:t}),importPath:n.rootImportPath}),arguments_:[t]})}function cn({type:n}){switch(n.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function pn({writer:n,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new S({func:new v({name:e,importPath:n.rootImportPath}),arguments_:[new b(`"${t.value}"`)]})}function fn({value:n}){return new S({func:new v({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new b(`"${n}"`)]})}function ln({entries:n}){return n.filter(t=>!R.isNop(t.key)&&!R.isNop(t.value))}function hn({fields:n}){return n.filter(t=>!R.isNop(t.value))}function mn({values:n}){return n.filter(t=>!R.isNop(t))}function le({writer:n,arguments_:t}){let e=yn(t);if(e.length===0){n.write("()");return}n.writeLine("("),n.indent();for(let r of e)dn({writer:n,argument:r}),n.writeLine(",");n.dedent(),n.write(")")}function dn({writer:n,argument:t}){xe(t)?t.assignment.write(n):t.write(n)}function yn(n){return n.filter(t=>!(t instanceof R&&R.isNop(t)))}var S=class extends x{constructor({func:e,arguments_:r}){super();f(this,"func");f(this,"arguments_");this.func=e,this.arguments_=r}write(e){e.writeNode(this.func),le({writer:e,arguments_:this.arguments_})}};u();c();var z=class extends x{constructor({name:e,type:r,docs:i}){super();f(this,"name");f(this,"type");f(this,"docs");this.name=e,this.type=r,this.docs=i}write(e){e.writeNode(new E({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();c();var Z=class extends x{constructor({name:e,importPath:r,docs:i}){super();f(this,"name");f(this,"importPath");f(this,"docs");f(this,"fields",[]);f(this,"methods",[]);this.name=e,this.importPath=r,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new E({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let r of this.fields)e.writeNode(r),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let r of this.methods)e.writeNode(r),e.newLine()}};var l={};ve(l,{AstNode:()=>x,CodeBlock:()=>b,Enum:()=>H,Field:()=>j,Func:()=>J,FuncInvocation:()=>S,Method:()=>F,MethodInvocation:()=>B,Parameter:()=>z,Struct:()=>Z,Type:()=>ne,TypeInstantiation:()=>R,TypeReference:()=>v,Writer:()=>W,codeblock:()=>wn,enum_:()=>xn,field:()=>Tn,func:()=>gn,invokeFunc:()=>vn,invokeMethod:()=>In,method:()=>An,parameter:()=>Nn,struct:()=>En,typeReference:()=>Rn});u();c();function wn(n){return new b(n)}function xn(n){return new H(n)}function Tn(n){return new j(n)}function gn(n){return new J(n)}function vn(n){return new S(n)}function In(n){return new B(n)}function An(n){return new F(n)}function Nn(n){return new z(n)}function En(n){return new Z(n)}function Rn(n){return new v(n)}var ge=class{constructor({context:t}){f(this,"context");this.context=t}convert(t){if(t.value===null&&!this.context.isNullable(t.typeReference)&&this.context.errors.add({severity:Y.Critical,message:"Expected non-null value, but got null"}),t.value==null)return l.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return l.TypeInstantiation.nop();case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?l.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"nullable":return l.TypeInstantiation.optional(this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as}));case"optional":return l.TypeInstantiation.optional(this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"unknown":return this.convertUnknown({value:t.value});default:A(t.typeReference)}}convertList({list:t,value:e}){return Array.isArray(e)?l.TypeInstantiation.slice({valueType:this.context.dynamicTypeMapper.convert({typeReference:t}),values:e.map((r,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Y.Critical,message:`Expected array but got: ${typeof e}`}),l.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:Y.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),l.TypeInstantiation.nop()):l.TypeInstantiation.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:t.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:t.value}),entries:Object.entries(e).map(([r,i])=>{this.context.errors.scope(r);try{return{key:this.convert({typeReference:t.key,value:r,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:r});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndicriminatedUnion({undicriminatedUnion:t,value:e});default:A(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let r=this.context.getGoTypeReferenceFromDeclaration({declaration:t.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(i==null)return l.TypeInstantiation.nop();let o=i.singleDiscriminatedUnionType,s=this.getBaseFields({discriminatedUnionTypeInstance:i,singleDiscriminatedUnionType:o});switch(o.type){case"samePropertiesAsObject":{let p=this.context.resolveNamedType({typeId:o.typeId});return p==null?l.TypeInstantiation.nop():l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convertNamed({named:p,value:i.value})},...s]})}case"singleProperty":{let p=this.context.getRecord(i.value);if(p==null)return l.TypeInstantiation.nop();try{return this.context.errors.scope(o.discriminantValue.wireValue),l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convert({typeReference:o.typeReference,value:p[o.discriminantValue.wireValue]})},...s]})}finally{this.context.errors.unscope()}}case"noProperties":return l.TypeInstantiation.structPointer({typeReference:r,fields:[{name:this.context.getTypeName(i.discriminantValue.name),value:l.TypeInstantiation.string(o.discriminantValue.wireValue)},...s]});default:A(o)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getTypeName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let r=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return l.TypeInstantiation.structPointer({typeReference:l.typeReference({name:this.context.getTypeName(t.declaration.name),importPath:this.context.getImportPath(t.declaration.fernFilepath)}),fields:r.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getTypeName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let r=this.getEnumValueName({enum_:t,value:e});return r==null?l.TypeInstantiation.nop():l.TypeInstantiation.enum(l.typeReference({name:r,importPath:this.context.getImportPath(t.declaration.fernFilepath)}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:Y.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let r=t.values.find(i=>i.wireValue===e);if(r==null){this.context.errors.add({severity:Y.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return`${this.context.getTypeName(t.declaration.name)}${this.context.getTypeName(r.name)}`}convertUndicriminatedUnion({undicriminatedUnion:t,value:e}){let r=this.findMatchingUndiscriminatedUnionType({undicriminatedUnion:t,value:e});if(r==null)return l.TypeInstantiation.nop();let i=this.getUndiscriminatedUnionFieldName({typeReference:r.valueTypeReference});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.structPointer({typeReference:this.context.getGoTypeReferenceFromDeclaration({declaration:t.declaration}),fields:[{name:i,value:r.typeInstantiation}]})}findMatchingUndiscriminatedUnionType({undicriminatedUnion:t,value:e}){for(let r of t.types)try{let i=this.convert({typeReference:r,value:e});return{valueTypeReference:r,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:Y.Critical,message:`None of the types in the undicriminated union matched the given "${typeof e}" value`})}getUndiscriminatedUnionFieldName({typeReference:t}){switch(t.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:t});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:t.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:t});case"named":{let e=this.context.resolveNamedType({typeId:t.value});return e==null?void 0:this.context.getTypeName(e.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:t});case"nullable":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:t});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:t.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:t});case"unknown":return"Unknown";default:A(t)}}getUndiscriminatedUnionFieldNameForList({list:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}List`}getUndiscriminatedUnionFieldNameForMap({map:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t.key});if(e==null)return;let r=this.getUndiscriminatedUnionFieldName({typeReference:t.value});if(r!=null)return`${e}${r}Map`}getUndiscriminatedUnionFieldNameForOptional({typeReference:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}Optional`}getUndiscriminatedUnionFieldNameForSet({set:t}){let e=this.getUndiscriminatedUnionFieldName({typeReference:t});if(e!=null)return`${e}Set`}getUndiscriminatedUnionFieldNameForLiteral({literal:t}){switch(t.type){case"boolean":return t.value?"TrueLiteral":"FalseLiteral";case"string":return`${t.value}StringLiteral`;default:A(t)}}getUndiscriminatedUnionFieldNameForPrimitive({primitive:t}){switch(t){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:A(t)}}convertUnknown({value:t}){return l.TypeInstantiation.any(t)}convertPrimitive({primitive:t,value:e,as:r}){switch(t){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.int(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.int64(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.float64(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:r});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.bool(i)}case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.string(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.dateTime(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:e});return i==null?l.TypeInstantiation.nop():l.TypeInstantiation.string(i)}default:A(t)}}getValueAsNumber({value:t,as:e}){let r=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:r})}getValueAsBoolean({value:t,as:e}){let r=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:r})}};0&&(module.exports={DynamicTypeInstantiationMapper});
|
|
20
20
|
/*! Bundled license information:
|
|
21
21
|
|
|
22
22
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(r,t,e)=>t in r?re(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var he=(r,t)=>()=>(r&&(t=r(r=0)),t);var ge=(r,t)=>{for(var e in t)re(r,e,{get:t[e],enumerable:!0})},Xe=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(r,i)&&i!==e&&re(r,i,{get:()=>t[i],enumerable:!(n=Je(t,i))||n.enumerable});return r};var qe=r=>Xe(re({},"__esModule",{value:!0}),r);var c=(r,t,e)=>Qe(r,typeof t!="symbol"?t+"":t,e);function Ee(){throw new Error("setTimeout has not been defined")}function ve(){throw new Error("clearTimeout has not been defined")}function Ne(r){if(D===setTimeout)return setTimeout(r,0);if((D===Ee||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function Ke(r){if(C===clearTimeout)return clearTimeout(r);if((C===ve||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(r);try{return C(r)}catch(t){try{return C.call(null,r)}catch(e){return C.call(this,r)}}}function je(){!q||!F||(q=!1,F.length?L=F.concat(L):ne=-1,L.length&&Ie())}function Ie(){if(!q){var r=Ne(je);q=!0;for(var t=L.length;t;){for(F=L,L=[];++ne<t;)F&&F[ne].run();ne=-1,t=L.length}F=null,q=!1,Ke(r)}}function et(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];L.push(new Re(r,t)),L.length===1&&!q&&Ne(Ie)}function Re(r,t){this.fun=r,this.array=t}function $(){}function dt(r){throw new Error("process.binding is not supported")}function xt(){return"/"}function Tt(r){throw new Error("process.chdir is not supported")}function gt(){return 0}function Et(r){var t=At.call(X)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Nt(){var r=new Date,t=r-vt;return t/1e3}var D,C,L,q,F,ne,tt,rt,nt,it,ot,st,at,ut,ft,ct,pt,ht,lt,mt,wt,yt,X,At,vt,m,Ae,u=he(()=>{"use strict";D=Ee,C=ve;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);L=[],q=!1,ne=-1;Re.prototype.run=function(){this.fun.apply(null,this.array)};tt="browser",rt="browser",nt=!0,it={},ot=[],st="",at={},ut={},ft={};ct=$,pt=$,ht=$,lt=$,mt=$,wt=$,yt=$;X=globalThis.performance||{},At=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};vt=new Date;m={nextTick:et,title:tt,browser:nt,env:it,argv:ot,version:st,versions:at,on:ct,addListener:pt,once:ht,off:lt,removeListener:mt,removeAllListeners:wt,emit:yt,binding:dt,cwd:xt,chdir:Tt,umask:gt,hrtime:Et,platform:rt,release:ut,config:ft,uptime:Nt},Ae={};Object.keys(Ae).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Ae[r]:e=e[i]||(e[i]={})}})});function Ue(){me=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)k[t]=r[t],v[r.charCodeAt(t)]=t;v[45]=62,v[95]=63}function Rt(r){me||Ue();var t,e,n,i,o,s,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,s=new It(p*3/4-o),n=o>0?p-4:p;var h=0;for(t=0,e=0;t<n;t+=4,e+=3)i=v[r.charCodeAt(t)]<<18|v[r.charCodeAt(t+1)]<<12|v[r.charCodeAt(t+2)]<<6|v[r.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=v[r.charCodeAt(t)]<<2|v[r.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=v[r.charCodeAt(t)]<<10|v[r.charCodeAt(t+1)]<<4|v[r.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function _t(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function kt(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(_t(n));return i.join("")}function _e(r){me||Ue();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,p=0,h=e-n;p<h;p+=s)o.push(kt(r,p,p+s>h?h:p+s));return n===1?(t=r[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function ie(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function P(r,t){if(ie()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return we(this,r)}return Le(this,r,t,e)}function Le(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Lt(r,t,e,n):typeof t=="string"?Ut(r,t,e):Pt(r,t)}function Pe(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function St(r,t,e,n){return Pe(t),t<=0?P(r,t):e!==void 0?typeof n=="string"?P(r,t).fill(e,n):P(r,t).fill(e):P(r,t)}function we(r,t){if(Pe(t),r=P(r,t<0?0:ye(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ut(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Be(t,e)|0;r=P(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function le(r,t){var e=t.length<0?0:ye(t.length)|0;r=P(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Lt(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=le(r,t),r}function Pt(r,t){if(S(t)){var e=ye(t.length)|0;return r=P(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||qt(t.length)?P(r,0):le(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return le(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ye(r){if(r>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return r|0}function S(r){return!!(r!=null&&r._isBuffer)}function Be(r,t){if(S(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return oe(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return $e(r).length;default:if(n)return oe(r).length;t=(""+t).toLowerCase(),n=!0}}function Bt(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Wt(this,t,e);case"utf8":case"utf-8":return De(this,t,e);case"ascii":return Ot(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return Ft(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function O(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function be(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,n)),S(t))return t.length===0?-1:ke(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):ke(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function ke(r,t,e,n,i){var o=1,s=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(E,Q){return o===1?E[Q]:E.readUInt16BE(Q*o)}var w;if(i){var y=-1;for(w=e;w<s;w++)if(h(r,w)===h(t,y===-1?0:w-y)){if(y===-1&&(y=w),w-y+1===p)return y*o}else y!==-1&&(w-=w-y),y=-1}else for(e+p>s&&(e=s-p),w=e;w>=0;w--){for(var l=!0,R=0;R<p;R++)if(h(r,w+R)!==h(t,R)){l=!1;break}if(l)return w}return-1}function bt(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;r[e+s]=p}return s}function Mt(r,t,e,n){return ue(oe(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ue(Qt(t),r,e,n)}function Dt(r,t,e,n){return Me(r,t,e,n)}function Ct(r,t,e,n){return ue($e(t),r,e,n)}function Yt(r,t,e,n){return ue(Xt(t,r.length-e),r,e,n)}function Ft(r,t,e){return t===0&&e===r.length?_e(r):_e(r.slice(t,e))}function De(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,w,y,l;switch(p){case 1:o<128&&(s=o);break;case 2:h=r[i+1],(h&192)===128&&(l=(o&31)<<6|h&63,l>127&&(s=l));break;case 3:h=r[i+1],w=r[i+2],(h&192)===128&&(w&192)===128&&(l=(o&15)<<12|(h&63)<<6|w&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:h=r[i+1],w=r[i+2],y=r[i+3],(h&192)===128&&(w&192)===128&&(y&192)===128&&(l=(o&15)<<18|(h&63)<<12|(w&63)<<6|y&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=p}return $t(n)}function $t(r){var t=r.length;if(t<=Se)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Se));return e}function Ot(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Gt(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function Wt(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=Zt(r[o]);return i}function Vt(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function T(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function g(r,t,e,n,i,o){if(!S(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function se(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ae(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Ce(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(r,t,e,n,i){return i||Ce(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(r,t,e,n,23,4),e+4}function Fe(r,t,e,n,i){return i||Ce(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(r,t,e,n,52,8),e+8}function Jt(r){if(r=zt(r).replace(Ht,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function zt(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Zt(r){return r<16?"0"+r.toString(16):r.toString(16)}function oe(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Xt(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function $e(r){return Rt(Jt(r))}function ue(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function qt(r){return r!==r}function Kt(r){return r!=null&&(!!r._isBuffer||Oe(r)||jt(r))}function Oe(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function jt(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Oe(r.slice(0,0))}function fe(r,t,e,n,i){var o,s,p=i*8-n-1,h=(1<<p)-1,w=h>>1,y=-7,l=e?i-1:0,R=e?-1:1,E=r[t+l];for(l+=R,o=E&(1<<-y)-1,E>>=-y,y+=p;y>0;o=o*256+r[t+l],l+=R,y-=8);for(s=o&(1<<-y)-1,o>>=-y,y+=n;y>0;s=s*256+r[t+l],l+=R,y-=8);if(o===0)o=1-w;else{if(o===h)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-w}return(E?-1:1)*s*Math.pow(2,o-n)}function Ge(r,t,e,n,i,o){var s,p,h,w=o*8-i-1,y=(1<<w)-1,l=y>>1,R=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,Q=n?1:-1,He=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=y):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+l>=1?t+=R/h:t+=R*Math.pow(2,1-l),t*h>=2&&(s++,h/=2),s+l>=y?(p=0,s=y):s+l>=1?(p=(t*h-1)*Math.pow(2,i),s=s+l):(p=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;r[e+E]=p&255,E+=Q,p/=256,i-=8);for(s=s<<i|p,w+=i;w>0;r[e+E]=s&255,E+=Q,s/=256,w-=8);r[e+E-Q]|=He*128}var k,v,It,me,Se,Ht,We=he(()=>{"use strict";u();f();k=[],v=[],It=typeof Uint8Array!="undefined"?Uint8Array:Array,me=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,t,e){return Le(null,r,t,e)};a.kMaxLength=ie();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return St(null,r,t,e)};a.allocUnsafe=function(r){return we(null,r)};a.allocUnsafeSlow=function(r){return we(null,r)};a.isBuffer=Kt;a.compare=function(t,e){if(!S(t)||!S(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!S(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Be;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)O(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)O(this,e,e+3),O(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)O(this,e,e+7),O(this,e+1,e+6),O(this,e+2,e+5),O(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?De(this,0,t):Bt.apply(this,arguments)};a.prototype.equals=function(t){if(!S(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!S(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=n-e,h=Math.min(s,p),w=this.slice(i,o),y=t.slice(e,n),l=0;l<h;++l)if(w[l]!==y[l]){s=w[l],p=y[l];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return be(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return be(this,t,e,n,!1)};a.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return bt(this,t,e,n);case"utf8":case"utf-8":return Mt(this,t,e,n);case"ascii":return Me(this,t,e,n);case"latin1":case"binary":return Dt(this,t,e,n);case"base64":return Ct(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Se=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),fe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),fe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),fe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),fe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=1,p=0;for(this[e]=t&255;++p<n&&(s*=256);)this[e+p]=t/s&255;return e+n};a.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=n-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ae(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<n&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=n-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ae(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Ye(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Ye(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return Fe(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return Fe(this,t,e,!1,n)};a.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var p=S(t)?t:oe(new a(t,i).toString()),h=p.length;for(s=0;s<n-e;++s)this[s+e]=p[s%h]}return this};Ht=/[^+\/0-9A-Za-z-_]/g});var f=he(()=>{"use strict";We()});var Ir={};ge(Ir,{DynamicTypeMapper:()=>Te});module.exports=qe(Ir);u();f();u();f();u();f();function B(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();u();f();var G=class{};u();f();u();f();var Y=class extends G{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var er=4,K=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
|
|
1
|
+
"use strict";var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var Qe=(r,t,e)=>t in r?re(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var he=(r,t)=>()=>(r&&(t=r(r=0)),t);var ge=(r,t)=>{for(var e in t)re(r,e,{get:t[e],enumerable:!0})},Xe=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ze(t))!Ze.call(r,i)&&i!==e&&re(r,i,{get:()=>t[i],enumerable:!(n=Je(t,i))||n.enumerable});return r};var qe=r=>Xe(re({},"__esModule",{value:!0}),r);var c=(r,t,e)=>Qe(r,typeof t!="symbol"?t+"":t,e);function Ee(){throw new Error("setTimeout has not been defined")}function ve(){throw new Error("clearTimeout has not been defined")}function Ne(r){if(D===setTimeout)return setTimeout(r,0);if((D===Ee||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function Ke(r){if(C===clearTimeout)return clearTimeout(r);if((C===ve||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(r);try{return C(r)}catch(t){try{return C.call(null,r)}catch(e){return C.call(this,r)}}}function je(){!q||!F||(q=!1,F.length?L=F.concat(L):ne=-1,L.length&&Re())}function Re(){if(!q){var r=Ne(je);q=!0;for(var t=L.length;t;){for(F=L,L=[];++ne<t;)F&&F[ne].run();ne=-1,t=L.length}F=null,q=!1,Ke(r)}}function et(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];L.push(new Ie(r,t)),L.length===1&&!q&&Ne(Re)}function Ie(r,t){this.fun=r,this.array=t}function $(){}function dt(r){throw new Error("process.binding is not supported")}function xt(){return"/"}function Tt(r){throw new Error("process.chdir is not supported")}function gt(){return 0}function Et(r){var t=At.call(X)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Nt(){var r=new Date,t=r-vt;return t/1e3}var D,C,L,q,F,ne,tt,rt,nt,it,ot,st,at,ut,ft,ct,pt,ht,lt,mt,wt,yt,X,At,vt,m,Ae,u=he(()=>{"use strict";D=Ee,C=ve;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);L=[],q=!1,ne=-1;Ie.prototype.run=function(){this.fun.apply(null,this.array)};tt="browser",rt="browser",nt=!0,it={},ot=[],st="",at={},ut={},ft={};ct=$,pt=$,ht=$,lt=$,mt=$,wt=$,yt=$;X=globalThis.performance||{},At=X.now||X.mozNow||X.msNow||X.oNow||X.webkitNow||function(){return new Date().getTime()};vt=new Date;m={nextTick:et,title:tt,browser:nt,env:it,argv:ot,version:st,versions:at,on:ct,addListener:pt,once:ht,off:lt,removeListener:mt,removeAllListeners:wt,emit:yt,binding:dt,cwd:xt,chdir:Tt,umask:gt,hrtime:Et,platform:rt,release:ut,config:ft,uptime:Nt},Ae={};Object.keys(Ae).forEach(r=>{let t=r.split("."),e=m;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Ae[r]:e=e[i]||(e[i]={})}})});function Ue(){me=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)k[t]=r[t],v[r.charCodeAt(t)]=t;v[45]=62,v[95]=63}function It(r){me||Ue();var t,e,n,i,o,s,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,s=new Rt(p*3/4-o),n=o>0?p-4:p;var h=0;for(t=0,e=0;t<n;t+=4,e+=3)i=v[r.charCodeAt(t)]<<18|v[r.charCodeAt(t+1)]<<12|v[r.charCodeAt(t+2)]<<6|v[r.charCodeAt(t+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=i&255;return o===2?(i=v[r.charCodeAt(t)]<<2|v[r.charCodeAt(t+1)]>>4,s[h++]=i&255):o===1&&(i=v[r.charCodeAt(t)]<<10|v[r.charCodeAt(t+1)]<<4|v[r.charCodeAt(t+2)]>>2,s[h++]=i>>8&255,s[h++]=i&255),s}function _t(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function kt(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(_t(n));return i.join("")}function _e(r){me||Ue();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,p=0,h=e-n;p<h;p+=s)o.push(kt(r,p,p+s>h?h:p+s));return n===1?(t=r[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),o.push(i),o.join("")}function ie(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function P(r,t){if(ie()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return we(this,r)}return Le(this,r,t,e)}function Le(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Lt(r,t,e,n):typeof t=="string"?Ut(r,t,e):Pt(r,t)}function Pe(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function St(r,t,e,n){return Pe(t),t<=0?P(r,t):e!==void 0?typeof n=="string"?P(r,t).fill(e,n):P(r,t).fill(e):P(r,t)}function we(r,t){if(Pe(t),r=P(r,t<0?0:ye(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ut(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=be(t,e)|0;r=P(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function le(r,t){var e=t.length<0?0:ye(t.length)|0;r=P(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Lt(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=le(r,t),r}function Pt(r,t){if(S(t)){var e=ye(t.length)|0;return r=P(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||qt(t.length)?P(r,0):le(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return le(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ye(r){if(r>=ie())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ie().toString(16)+" bytes");return r|0}function S(r){return!!(r!=null&&r._isBuffer)}function be(r,t){if(S(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return oe(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return $e(r).length;default:if(n)return oe(r).length;t=(""+t).toLowerCase(),n=!0}}function bt(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Wt(this,t,e);case"utf8":case"utf-8":return De(this,t,e);case"ascii":return Ot(this,t,e);case"latin1":case"binary":return Gt(this,t,e);case"base64":return Ft(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function O(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Be(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,n)),S(t))return t.length===0?-1:ke(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):ke(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function ke(r,t,e,n,i){var o=1,s=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,p/=2,e/=2}function h(E,Q){return o===1?E[Q]:E.readUInt16BE(Q*o)}var w;if(i){var y=-1;for(w=e;w<s;w++)if(h(r,w)===h(t,y===-1?0:w-y)){if(y===-1&&(y=w),w-y+1===p)return y*o}else y!==-1&&(w-=w-y),y=-1}else for(e+p>s&&(e=s-p),w=e;w>=0;w--){for(var l=!0,I=0;I<p;I++)if(h(r,w+I)!==h(t,I)){l=!1;break}if(l)return w}return-1}function Bt(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var p=parseInt(t.substr(s*2,2),16);if(isNaN(p))return s;r[e+s]=p}return s}function Mt(r,t,e,n){return ue(oe(t,r.length-e),r,e,n)}function Me(r,t,e,n){return ue(Qt(t),r,e,n)}function Dt(r,t,e,n){return Me(r,t,e,n)}function Ct(r,t,e,n){return ue($e(t),r,e,n)}function Yt(r,t,e,n){return ue(Xt(t,r.length-e),r,e,n)}function Ft(r,t,e){return t===0&&e===r.length?_e(r):_e(r.slice(t,e))}function De(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var h,w,y,l;switch(p){case 1:o<128&&(s=o);break;case 2:h=r[i+1],(h&192)===128&&(l=(o&31)<<6|h&63,l>127&&(s=l));break;case 3:h=r[i+1],w=r[i+2],(h&192)===128&&(w&192)===128&&(l=(o&15)<<12|(h&63)<<6|w&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:h=r[i+1],w=r[i+2],y=r[i+3],(h&192)===128&&(w&192)===128&&(y&192)===128&&(l=(o&15)<<18|(h&63)<<12|(w&63)<<6|y&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,p=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=p}return $t(n)}function $t(r){var t=r.length;if(t<=Se)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Se));return e}function Ot(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Gt(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function Wt(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=Zt(r[o]);return i}function Vt(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function T(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function g(r,t,e,n,i,o){if(!S(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function se(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function ae(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Ce(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ye(r,t,e,n,i){return i||Ce(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ge(r,t,e,n,23,4),e+4}function Fe(r,t,e,n,i){return i||Ce(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ge(r,t,e,n,52,8),e+8}function Jt(r){if(r=zt(r).replace(Ht,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function zt(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Zt(r){return r<16?"0"+r.toString(16):r.toString(16)}function oe(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Qt(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Xt(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function $e(r){return It(Jt(r))}function ue(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function qt(r){return r!==r}function Kt(r){return r!=null&&(!!r._isBuffer||Oe(r)||jt(r))}function Oe(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function jt(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Oe(r.slice(0,0))}function fe(r,t,e,n,i){var o,s,p=i*8-n-1,h=(1<<p)-1,w=h>>1,y=-7,l=e?i-1:0,I=e?-1:1,E=r[t+l];for(l+=I,o=E&(1<<-y)-1,E>>=-y,y+=p;y>0;o=o*256+r[t+l],l+=I,y-=8);for(s=o&(1<<-y)-1,o>>=-y,y+=n;y>0;s=s*256+r[t+l],l+=I,y-=8);if(o===0)o=1-w;else{if(o===h)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-w}return(E?-1:1)*s*Math.pow(2,o-n)}function Ge(r,t,e,n,i,o){var s,p,h,w=o*8-i-1,y=(1<<w)-1,l=y>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,Q=n?1:-1,He=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,s=y):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+l>=1?t+=I/h:t+=I*Math.pow(2,1-l),t*h>=2&&(s++,h/=2),s+l>=y?(p=0,s=y):s+l>=1?(p=(t*h-1)*Math.pow(2,i),s=s+l):(p=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;r[e+E]=p&255,E+=Q,p/=256,i-=8);for(s=s<<i|p,w+=i;w>0;r[e+E]=s&255,E+=Q,s/=256,w-=8);r[e+E-Q]|=He*128}var k,v,Rt,me,Se,Ht,We=he(()=>{"use strict";u();f();k=[],v=[],Rt=typeof Uint8Array!="undefined"?Uint8Array:Array,me=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,t,e){return Le(null,r,t,e)};a.kMaxLength=ie();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return St(null,r,t,e)};a.allocUnsafe=function(r){return we(null,r)};a.allocUnsafeSlow=function(r){return we(null,r)};a.isBuffer=Kt;a.compare=function(t,e){if(!S(t)||!S(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!S(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=be;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)O(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)O(this,e,e+3),O(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)O(this,e,e+7),O(this,e+1,e+6),O(this,e+2,e+5),O(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?De(this,0,t):bt.apply(this,arguments)};a.prototype.equals=function(t){if(!S(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!S(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,p=n-e,h=Math.min(s,p),w=this.slice(i,o),y=t.slice(e,n),l=0;l<h;++l)if(w[l]!==y[l]){s=w[l],p=y[l];break}return s<p?-1:p<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return Be(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return Be(this,t,e,n,!1)};a.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|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-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Bt(this,t,e,n);case"utf8":case"utf-8":return Mt(this,t,e,n);case"ascii":return Me(this,t,e,n);case"latin1":case"binary":return Dt(this,t,e,n);case"base64":return Ct(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Se=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||T(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||T(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),fe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),fe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),fe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),fe(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=1,p=0;for(this[e]=t&255;++p<n&&(s*=256);)this[e+p]=t/s&255;return e+n};a.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;g(this,t,e,n,o,0)}var s=n-1,p=1;for(this[e+s]=t&255;--s>=0&&(p*=256);)this[e+s]=t/p&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ae(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=0,p=1,h=0;for(this[e]=t&255;++s<n&&(p*=256);)t<0&&h===0&&this[e+s-1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);g(this,t,e,n,o-1,-o)}var s=n-1,p=1,h=0;for(this[e+s]=t&255;--s>=0&&(p*=256);)t<0&&h===0&&this[e+s+1]!==0&&(h=1),this[e+s]=(t/p>>0)-h&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):se(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):se(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ae(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||g(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ae(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Ye(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Ye(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return Fe(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return Fe(this,t,e,!1,n)};a.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<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),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var p=S(t)?t:oe(new a(t,i).toString()),h=p.length;for(s=0;s<n-e;++s)this[s+e]=p[s%h]}return this};Ht=/[^+\/0-9A-Za-z-_]/g});var f=he(()=>{"use strict";We()});var Rr={};ge(Rr,{DynamicTypeMapper:()=>Te});module.exports=qe(Rr);u();f();u();f();u();f();function b(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();f();u();f();u();f();var G=class{};u();f();u();f();var Y=class extends G{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var er=4,K=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
|
|
2
2
|
`),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
|
|
3
3
|
`,`
|
|
4
4
|
${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
|
|
5
5
|
`),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new Y(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new Y(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
6
6
|
`)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
7
|
-
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&n(s)}}}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
-
`)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*er)}};u();f();var ce=class{},j=class extends ce{async format(t){return t}formatSync(t){return t}};u();f();function de(r){return(r==null?void 0:r.name)!=null}u();f();u();f();function xe(r,t){var n,i;let e=(n=r.split("/").pop())!=null?n:r;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}u();f();u();f();u();f();u();f();u();f();var tr=/[^0-9a-zA-Z_]/g,W=class extends K{constructor({packageName:e,rootImportPath:n,importPath:i,customConfig:o,formatter:s}){super();c(this,"packageName");c(this,"rootImportPath");c(this,"importPath");c(this,"customConfig");c(this,"formatter");c(this,"imports",{});this.packageName=e,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=s!=null?s:new j}addImport(e){let n=this.imports[e];if(n!=null)return n;let i=this.getValidAlias(xe(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let n=e.split("-");return n[0]==null?e:n[0].replace(tr,"")}};var ee=class extends W{constructor({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){super({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o})}async
|
|
9
|
-
${t}`)}return t}
|
|
7
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&n(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
|
|
8
|
+
`)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*er)}};u();f();var ce=class{},j=class extends ce{async format(t){return t}formatSync(t){return t}};u();f();function de(r){return(r==null?void 0:r.name)!=null}u();f();u();f();function xe(r,t){var n,i;let e=(n=r.split("/").pop())!=null?n:r;return t!=null&&t.stripExtension&&(i=e.split(".")[0])!=null?i:e}u();f();u();f();u();f();u();f();u();f();var tr=/[^0-9a-zA-Z_]/g,W=class extends K{constructor({packageName:e,rootImportPath:n,importPath:i,customConfig:o,formatter:s}){super();c(this,"packageName");c(this,"rootImportPath");c(this,"importPath");c(this,"customConfig");c(this,"formatter");c(this,"imports",{});this.packageName=e,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=s!=null?s:new j}addImport(e){let n=this.imports[e];if(n!=null)return n;let i=this.getValidAlias(xe(e));for(;i in this.imports;)i="_"+i;return this.imports[e]=i,i}getValidAlias(e){let n=e.split("-");return n[0]==null?e:n[0].replace(tr,"")}};var ee=class extends W{constructor({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){super({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
|
|
9
|
+
${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format Go file: ${e}
|
|
10
10
|
${t}`)}return t}getContent(){let t=`package ${this.packageName}
|
|
11
11
|
|
|
12
12
|
`,e=this.stringifyImports();return e.length>0?`${t}${e}
|
|
@@ -14,9 +14,9 @@ ${t}`)}return t}getContent(){let t=`package ${this.packageName}
|
|
|
14
14
|
${this.buffer}`:t+this.buffer}stringifyImports(){let t=Object.entries(this.imports).filter(([e,n])=>e!==this.importPath).map(([e,n])=>` ${n} "${e}"`).join(`
|
|
15
15
|
`);return t?`import (
|
|
16
16
|
${t}
|
|
17
|
-
)`:""}};var d=class extends G{async
|
|
18
|
-
`).forEach(n=>{e.writeLine(`// ${n}`)})}};var V=class extends d{constructor({name:e,docs:n}){super();c(this,"name");c(this,"docs");c(this,"members",[]);this.name=e,this.docs=n}addMember(e){this.members.push(e)}write(e){e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} string`)}};u();f();var H=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();u();f();var
|
|
19
|
-
`)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(fr({value:this.internalType.value}));break;default:
|
|
17
|
+
)`:""}};var d=class extends G{async toStringAsync({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toStringAsync()}toString({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o}){let s=new ee({packageName:t,rootImportPath:e,importPath:n,customConfig:i,formatter:o});return this.write(s),s.toString()}};var A=class extends d{constructor({name:e,importPath:n}){super();c(this,"name");c(this,"importPath");this.name=e,this.importPath=n}write(e){if(e.importPath===this.importPath){e.write(this.name);return}let n=e.addImport(this.importPath);e.write(`${n}.${this.name}`)}};var rr=new Set(["any","bytes","map","slice"]),te=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"any":e.write("interface{}");break;case"bool":e.write("bool");break;case"bytes":e.write("[]byte");break;case"date":case"dateTime":e.writeNode(nr);break;case"float64":e.write("float64");break;case"int":e.write("int");break;case"int64":e.write("int64");break;case"map":{e.write("map["),this.internalType.keyType.write(e),e.write("]"),this.internalType.valueType.write(e);break}case"optional":{e.write("*"),this.internalType.value.write(e);break}case"reference":e.writeNode(this.internalType.value);break;case"slice":e.write("[]"),this.internalType.value.write(e);break;case"string":e.write("string");break;case"uuid":e.writeNode(ir);break;default:b(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static pointer(e){return r.optional(e)}static reference(e){return new this({type:"reference",value:e})}static slice(e){return new this({type:"slice",value:e})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(e){return e.internalType.type==="optional"||rr.has(e.internalType.type)}},nr=new A({importPath:"time",name:"Time"}),ir=new A({importPath:"github.com/google/uuid",name:"UUID"});u();f();u();f();var U=class extends d{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new Y(this.arg).write(e)}};u();f();u();f();var N=class extends d{constructor({docs:e}={}){super();c(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
|
|
18
|
+
`).forEach(n=>{e.writeLine(`// ${n}`)})}};var V=class extends d{constructor({name:e,docs:n}){super();c(this,"name");c(this,"docs");c(this,"members",[]);this.name=e,this.docs=n}addMember(e){this.members.push(e)}write(e){e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} string`)}};u();f();var H=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();u();f();var B=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s,typeReference:p}){super();c(this,"name");c(this,"parameters");c(this,"return_");c(this,"body");c(this,"docs");c(this,"typeReference");this.name=e,this.parameters=n,this.return_=i,this.body=o,this.docs=s,this.typeReference=p}write(e){var n;if(e.writeNode(new N({docs:this.docs})),e.write("func "),this.typeReference!=null&&this.writeReceiver({writer:e,typeReference:this.typeReference}),e.write(`${this.name}`),this.parameters.length===0)e.write("() ");else{e.writeLine("(");for(let i of this.parameters)e.writeNode(i),e.writeLine(",");e.write(")")}this.return_!=null&&(e.write("("),this.return_.forEach((i,o)=>{o>0&&e.write(", "),e.writeNode(i)}),e.write(")")),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeReceiver({writer:e,typeReference:n}){e.write(`(${this.getReceiverName(n.name)} `),n.write(e),e.write(") ")}getReceiverName(e){return e.charAt(0).toLowerCase()}};var J=class extends d{constructor({name:e,parameters:n,return_:i,body:o,docs:s}){super();c(this,"func");this.func=new B({name:e,parameters:n,return_:i,body:o,docs:s})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(e){e.writeNode(this.func)}};u();f();u();f();u();f();u();f();var M=class extends d{constructor({method:e,arguments_:n,on:i}){super();c(this,"on");c(this,"method");c(this,"arguments_");this.on=i,this.method=e,this.arguments_=n}write(e){this.on.write(e),e.write("."),e.write(this.method),pe({writer:e,arguments_:this.arguments_})}};var or=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),Ve=new Set(["any","bytes","map","slice"]),R=class r extends d{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"any":this.writeAny({writer:e,value:this.internalType.value});break;case"bool":e.write(this.internalType.value.toString());break;case"bytes":e.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":e.writeNode(ur({writer:e,type:this.internalType}));break;case"enum":e.writeNode(this.internalType.typeReference);break;case"float64":e.write(this.internalType.value.toString());break;case"int":case"int64":e.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:e,map:this.internalType});break;case"nil":e.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:e,type:this.internalType.value});break;case"reference":e.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:e,slice:this.internalType});break;case"string":e.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
|
|
19
|
+
`)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:e,struct:this.internalType});break;case"uuid":e.writeNode(fr({value:this.internalType.value}));break;default:b(this.internalType)}}static any(e){return new this({type:"any",value:e})}static bool(e){return new this({type:"bool",value:e})}static bytes(e){return new this({type:"bytes",value:e})}static date(e){return new this({type:"date",value:e})}static dateTime(e){return new this({type:"dateTime",value:e})}static enum(e){return new this({type:"enum",typeReference:e})}static float64(e){return new this({type:"float64",value:e})}static int(e){return new this({type:"int",value:e})}static int64(e){return new this({type:"int64",value:e})}static map({keyType:e,valueType:n,entries:i}){return new this({type:"map",keyType:e,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static reference(e){return new this({type:"reference",value:e})}static slice({valueType:e,values:n}){return new this({type:"slice",valueType:e,values:n})}static string(e){return new this({type:"string",value:e})}static struct({typeReference:e,fields:n}){return new this({type:"struct",typeReference:e,fields:n})}static structPointer({typeReference:e,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:e,fields:n})})}static uuid(e){return new this({type:"uuid",value:e})}static isNop(e){return e.internalType.type==="optional"?this.isNop(e.internalType.value):e.internalType.type==="nop"}writeAny({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:e,value:n});return}this.writeAnyObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:e,value:n}){if(e.write("[]interface{}"),n.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let i of n)e.writeNode(r.any(i)),e.writeLine(",");e.dedent(),e.write("}")}writeAnyObject({writer:e,value:n}){e.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`"${o}": `),e.writeNode(r.any(s)),e.writeLine(",");e.dedent(),e.write("}")}writeMap({writer:e,map:n}){e.write("map["),e.writeNode(n.keyType),e.write("]"),e.writeNode(n.valueType);let i=cr({entries:n.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeOptional({writer:e,type:n}){if(or.has(n.internalType.type)){e.writeNode(sr({writer:e,type:n}));return}if(Ve.has(n.internalType.type)){n.write(e);return}if(n.internalType.type==="enum"){e.writeNode(new M({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}e.write("&"),n.write(e)}static isAlreadyOptional(e){return e.internalType.type==="optional"||Ve.has(e.internalType.type)}writeSlice({writer:e,slice:n}){e.write("[]"),e.writeNode(n.valueType);let i=hr({values:n.values});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeStruct({writer:e,struct:n}){e.writeNode(n.typeReference);let i=pr({fields:n.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}};function sr({writer:r,type:t}){return new _({func:new A({name:ar({type:t}),importPath:r.rootImportPath}),arguments_:[t]})}function ar({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function ur({writer:r,type:t}){let e=t instanceof Date?"MustParseDate":"MustParseDateTime";return new _({func:new A({name:e,importPath:r.rootImportPath}),arguments_:[new U(`"${t.value}"`)]})}function fr({value:r}){return new _({func:new A({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new U(`"${r}"`)]})}function cr({entries:r}){return r.filter(t=>!R.isNop(t.key)&&!R.isNop(t.value))}function pr({fields:r}){return r.filter(t=>!R.isNop(t.value))}function hr({values:r}){return r.filter(t=>!R.isNop(t))}function pe({writer:r,arguments_:t}){let e=mr(t);if(e.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of e)lr({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function lr({writer:r,argument:t}){de(t)?t.assignment.write(r):t.write(r)}function mr(r){return r.filter(t=>!(t instanceof R&&R.isNop(t)))}var _=class extends d{constructor({func:e,arguments_:n}){super();c(this,"func");c(this,"arguments_");this.func=e,this.arguments_=n}write(e){e.writeNode(this.func),pe({writer:e,arguments_:this.arguments_})}};u();f();var z=class extends d{constructor({name:e,type:n,docs:i}){super();c(this,"name");c(this,"type");c(this,"docs");this.name=e,this.type=n,this.docs=i}write(e){e.writeNode(new N({docs:this.docs})),e.write(`${this.name} `),this.type.write(e)}};u();f();var Z=class extends d{constructor({name:e,importPath:n,docs:i}){super();c(this,"name");c(this,"importPath");c(this,"docs");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.importPath=n,this.docs=i}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){if(e.writeNode(new N({docs:this.docs})),e.write(`type ${this.name} struct {`),this.fields.length>0)e.writeLine("}");else{e.newLine(),e.indent();for(let n of this.fields)e.writeNode(n),e.newLine();e.dedent(),e.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&e.newLine();for(let n of this.methods)e.writeNode(n),e.newLine()}};var x={};ge(x,{AstNode:()=>d,CodeBlock:()=>U,Enum:()=>V,Field:()=>H,Func:()=>J,FuncInvocation:()=>_,Method:()=>B,MethodInvocation:()=>M,Parameter:()=>z,Struct:()=>Z,Type:()=>te,TypeInstantiation:()=>R,TypeReference:()=>A,Writer:()=>W,codeblock:()=>wr,enum_:()=>yr,field:()=>dr,func:()=>xr,invokeFunc:()=>Tr,invokeMethod:()=>gr,method:()=>Ar,parameter:()=>Er,struct:()=>vr,typeReference:()=>Nr});u();f();function wr(r){return new U(r)}function yr(r){return new V(r)}function dr(r){return new H(r)}function xr(r){return new J(r)}function Tr(r){return new _(r)}function gr(r){return new M(r)}function Ar(r){return new B(r)}function Er(r){return new z(r)}function vr(r){return new Z(r)}function Nr(r){return new A(r)}var Te=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){switch(t.typeReference.type){case"list":return x.Type.slice(this.convert({typeReference:t.typeReference}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return x.Type.map(this.convert({typeReference:t.typeReference.key}),this.convert({typeReference:t.typeReference.value}));case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?this.convertUnknown():this.convertNamed({named:e})}case"optional":return x.Type.optional(this.convert({typeReference:t.typeReference.value}));case"nullable":return x.Type.optional(this.convert({typeReference:t.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return x.Type.slice(this.convert({typeReference:t.typeReference}));case"unknown":return this.convertUnknown();default:b(t.typeReference)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return x.Type.bool();case"string":return x.Type.string()}}convertNamed({named:t}){let e=x.Type.reference(x.typeReference({name:this.context.getTypeName(t.declaration.name),importPath:this.context.getImportPath(t.declaration.fernFilepath)}));switch(t.type){case"alias":case"enum":return e;case"discriminatedUnion":case"object":case"undiscriminatedUnion":return x.Type.pointer(e);default:b(t)}}convertUnknown(){return x.Type.any()}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return x.Type.int();case"UINT":return x.Type.int();case"LONG":return x.Type.int64();case"UINT_64":return x.Type.int64();case"FLOAT":return x.Type.float64();case"DOUBLE":return x.Type.float64();case"BOOLEAN":return x.Type.bool();case"STRING":return x.Type.string();case"DATE":return x.Type.date();case"DATE_TIME":return x.Type.dateTime();case"UUID":return x.Type.uuid();case"BASE_64":return x.Type.bytes();case"BIG_INTEGER":return x.Type.string();default:b(t)}}};0&&(module.exports={DynamicTypeMapper});
|
|
20
20
|
/*! Bundled license information:
|
|
21
21
|
|
|
22
22
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|