@fern-api/typescript-dynamic-snippets 3.43.8 → 3.43.10

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- var tl=Object.create;var Bt=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var nl=Object.getOwnPropertyNames;var il=Object.getPrototypeOf,ol=Object.prototype.hasOwnProperty;var al=(o,t,e)=>t in o?Bt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var tt=(o,t)=>()=>(o&&(t=o(o=0)),t);var b=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Rr=(o,t)=>{for(var e in t)Bt(o,e,{get:t[e],enumerable:!0})},sl=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of nl(t))!ol.call(o,a)&&a!==e&&Bt(o,a,{get:()=>t[a],enumerable:!(r=rl(t,a))||r.enumerable});return o};var ul=(o,t,e)=>(e=o!=null?tl(il(o)):{},sl(t||!o||!o.__esModule?Bt(e,"default",{value:o,enumerable:!0}):e,o));var w=(o,t,e)=>al(o,typeof t!="symbol"?t+"":t,e);var s=tt(()=>{"use strict"});var d={};Rr(d,{_debugEnd:()=>_n,_debugProcess:()=>wn,_events:()=>qn,_eventsCount:()=>Un,_exiting:()=>tn,_fatalExceptions:()=>gn,_getActiveHandles:()=>an,_getActiveRequests:()=>on,_kill:()=>un,_linkedBinding:()=>Qr,_maxListeners:()=>Cn,_preload_modules:()=>Fn,_rawDebug:()=>Zr,_startProfilerIdleNotifier:()=>On,_stopProfilerIdleNotifier:()=>Pn,_tickCallback:()=>vn,abort:()=>jn,addListener:()=>Dn,allowedNodeEnvironmentFlags:()=>mn,arch:()=>Cr,argv:()=>Dr,argv0:()=>Mn,assert:()=>hn,binding:()=>Gr,browser:()=>Kr,chdir:()=>Yr,config:()=>rn,cpuUsage:()=>Rt,cwd:()=>Hr,debugPort:()=>Rn,default:()=>Jn,dlopen:()=>nn,domain:()=>en,emit:()=>Gn,emitWarning:()=>kr,env:()=>Ur,execArgv:()=>$r,execPath:()=>An,exit:()=>pn,features:()=>yn,hasUncaughtExceptionCaptureCallback:()=>xn,hrtime:()=>At,kill:()=>fn,listeners:()=>Yn,memoryUsage:()=>ln,moduleLoadList:()=>Xr,nextTick:()=>Fr,off:()=>Wn,on:()=>ge,once:()=>$n,openStdin:()=>dn,pid:()=>Bn,platform:()=>qr,ppid:()=>Sn,prependListener:()=>zn,prependOnceListener:()=>Hn,reallyExit:()=>sn,release:()=>Jr,removeAllListeners:()=>kn,removeListener:()=>Vn,resourceUsage:()=>cn,setSourceMapsEnabled:()=>Nn,setUncaughtExceptionCaptureCallback:()=>bn,stderr:()=>In,stdin:()=>En,stdout:()=>Tn,title:()=>Lr,umask:()=>zr,uptime:()=>Ln,version:()=>Wr,versions:()=>Vr});function er(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function cl(){!rt||!Ie||(rt=!1,Ie.length?ye=Ie.concat(ye):St=-1,ye.length&&Mr())}function Mr(){if(!rt){var o=setTimeout(cl,0);rt=!0;for(var t=ye.length;t;){for(Ie=ye,ye=[];++St<t;)Ie&&Ie[St].run();St=-1,t=ye.length}Ie=null,rt=!1,clearTimeout(o)}}function Fr(o){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ye.push(new Nr(o,t)),ye.length===1&&!rt&&setTimeout(Mr,0)}function Nr(o,t){this.fun=o,this.array=t}function J(){}function Qr(o){er("_linkedBinding")}function nn(o){er("dlopen")}function on(){return[]}function an(){return[]}function hn(o,t){if(!o)throw new Error(t||"assertion error")}function xn(){return!1}function Ln(){return we.now()/1e3}function At(o){var t=Math.floor((Date.now()-we.now())*.001),e=we.now()*.001,r=Math.floor(e)+t,a=Math.floor(e%1*1e9);return o&&(r=r-o[0],a=a-o[1],a<0&&(r--,a+=Qt)),[r,a]}function ge(){return Jn}function Yn(o){return[]}var ye,rt,Ie,St,Lr,Cr,qr,Ur,Dr,$r,Wr,Vr,kr,Gr,zr,Hr,Yr,Jr,Kr,Zr,Xr,en,tn,rn,sn,un,Rt,cn,ln,fn,pn,dn,mn,yn,gn,bn,vn,wn,_n,On,Pn,Tn,In,En,jn,Bn,Sn,An,Rn,Mn,Fn,Nn,we,Xt,Qt,Cn,qn,Un,Dn,$n,Wn,Vn,kn,Gn,zn,Hn,Jn,Kn=tt(()=>{"use strict";s();c();u();ye=[],rt=!1,St=-1;Nr.prototype.run=function(){this.fun.apply(null,this.array)};Lr="browser",Cr="x64",qr="browser",Ur={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Dr=["/usr/bin/node"],$r=[],Wr="v16.8.0",Vr={},kr=function(o,t){console.warn((t?t+": ":"")+o)},Gr=function(o){er("binding")},zr=function(o){return 0},Hr=function(){return"/"},Yr=function(o){},Jr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Kr=!0,Zr=J,Xr=[];en={},tn=!1,rn={};sn=J,un=J,Rt=function(){return{}},cn=Rt,ln=Rt,fn=J,pn=J,dn=J,mn={};yn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},gn=J,bn=J;vn=J,wn=J,_n=J,On=J,Pn=J,Tn=void 0,In=void 0,En=void 0,jn=J,Bn=2,Sn=1,An="/bin/usr/node",Rn=9229,Mn="node",Fn=[],Nn=J,we={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};we.now===void 0&&(Xt=Date.now(),we.timing&&we.timing.navigationStart&&(Xt=we.timing.navigationStart),we.now=()=>Date.now()-Xt);Qt=1e9;At.bigint=function(o){var t=At(o);return typeof BigInt>"u"?t[0]*Qt+t[1]:BigInt(t[0]*Qt)+BigInt(t[1])};Cn=10,qn={},Un=0;Dn=ge,$n=ge,Wn=ge,Vn=ge,kn=ge,Gn=J,zn=ge,Hn=ge;Jn={version:Wr,versions:Vr,arch:Cr,platform:qr,browser:Kr,release:Jr,_rawDebug:Zr,moduleLoadList:Xr,binding:Gr,_linkedBinding:Qr,_events:qn,_eventsCount:Un,_maxListeners:Cn,on:ge,addListener:Dn,once:$n,off:Wn,removeListener:Vn,removeAllListeners:kn,emit:Gn,prependListener:zn,prependOnceListener:Hn,listeners:Yn,domain:en,_exiting:tn,config:rn,dlopen:nn,uptime:Ln,_getActiveRequests:on,_getActiveHandles:an,reallyExit:sn,_kill:un,cpuUsage:Rt,resourceUsage:cn,memoryUsage:ln,kill:fn,exit:pn,openStdin:dn,allowedNodeEnvironmentFlags:mn,assert:hn,features:yn,_fatalExceptions:gn,setUncaughtExceptionCaptureCallback:bn,hasUncaughtExceptionCaptureCallback:xn,emitWarning:kr,nextTick:Fr,_tickCallback:vn,_debugProcess:wn,_debugEnd:_n,_startProfilerIdleNotifier:On,_stopProfilerIdleNotifier:Pn,stdout:Tn,stdin:En,stderr:In,abort:jn,umask:zr,chdir:Yr,cwd:Hr,env:Ur,title:Lr,argv:Dr,execArgv:$r,pid:Bn,ppid:Sn,execPath:An,debugPort:Rn,hrtime:At,argv0:Mn,_preload_modules:Fn,setSourceMapsEnabled:Nn}});var u=tt(()=>{"use strict";Kn()});function ll(){if(Zn)return mt;Zn=!0,mt.byteLength=O,mt.toByteArray=M,mt.fromByteArray=X;for(var o=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,y=r.length;a<y;++a)o[a]=r[a],t[r.charCodeAt(a)]=a;t[45]=62,t[95]=63;function p(T){var E=T.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=T.indexOf("=");F===-1&&(F=E);var G=F===E?0:4-F%4;return[F,G]}function O(T){var E=p(T),F=E[0],G=E[1];return(F+G)*3/4-G}function P(T,E,F){return(E+F)*3/4-F}function M(T){var E,F=p(T),G=F[0],ee=F[1],V=new e(P(T,G,ee)),te=0,ie=ee>0?G-4:G,Q;for(Q=0;Q<ie;Q+=4)E=t[T.charCodeAt(Q)]<<18|t[T.charCodeAt(Q+1)]<<12|t[T.charCodeAt(Q+2)]<<6|t[T.charCodeAt(Q+3)],V[te++]=E>>16&255,V[te++]=E>>8&255,V[te++]=E&255;return ee===2&&(E=t[T.charCodeAt(Q)]<<2|t[T.charCodeAt(Q+1)]>>4,V[te++]=E&255),ee===1&&(E=t[T.charCodeAt(Q)]<<10|t[T.charCodeAt(Q+1)]<<4|t[T.charCodeAt(Q+2)]>>2,V[te++]=E>>8&255,V[te++]=E&255),V}function j(T){return o[T>>18&63]+o[T>>12&63]+o[T>>6&63]+o[T&63]}function C(T,E,F){for(var G,ee=[],V=E;V<F;V+=3)G=(T[V]<<16&16711680)+(T[V+1]<<8&65280)+(T[V+2]&255),ee.push(j(G));return ee.join("")}function X(T){for(var E,F=T.length,G=F%3,ee=[],V=16383,te=0,ie=F-G;te<ie;te+=V)ee.push(C(T,te,te+V>ie?ie:te+V));return G===1?(E=T[F-1],ee.push(o[E>>2]+o[E<<4&63]+"==")):G===2&&(E=(T[F-2]<<8)+T[F-1],ee.push(o[E>>10]+o[E>>4&63]+o[E<<2&63]+"=")),ee.join("")}return mt}function fl(){if(Xn)return Mt;Xn=!0;return Mt.read=function(o,t,e,r,a){var y,p,O=a*8-r-1,P=(1<<O)-1,M=P>>1,j=-7,C=e?a-1:0,X=e?-1:1,T=o[t+C];for(C+=X,y=T&(1<<-j)-1,T>>=-j,j+=O;j>0;y=y*256+o[t+C],C+=X,j-=8);for(p=y&(1<<-j)-1,y>>=-j,j+=r;j>0;p=p*256+o[t+C],C+=X,j-=8);if(y===0)y=1-M;else{if(y===P)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,r),y=y-M}return(T?-1:1)*p*Math.pow(2,y-r)},Mt.write=function(o,t,e,r,a,y){var p,O,P,M=y*8-a-1,j=(1<<M)-1,C=j>>1,X=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=r?0:y-1,E=r?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(O=isNaN(t)?1:0,p=j):(p=Math.floor(Math.log(t)/Math.LN2),t*(P=Math.pow(2,-p))<1&&(p--,P*=2),p+C>=1?t+=X/P:t+=X*Math.pow(2,1-C),t*P>=2&&(p++,P/=2),p+C>=j?(O=0,p=j):p+C>=1?(O=(t*P-1)*Math.pow(2,a),p=p+C):(O=t*Math.pow(2,C-1)*Math.pow(2,a),p=0));a>=8;o[e+T]=O&255,T+=E,O/=256,a-=8);for(p=p<<a|O,M+=a;M>0;o[e+T]=p&255,T+=E,p/=256,M-=8);o[e+T-E]|=F*128},Mt}function ei(){if(Qn)return Ee;Qn=!0;let o=ll(),t=fl(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ee.Buffer=p,Ee.SlowBuffer=ee,Ee.INSPECT_MAX_BYTES=50;let r=2147483647;Ee.kMaxLength=r,p.TYPED_ARRAY_SUPPORT=a(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let l=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(l,n),l.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function y(l){if(l>r)throw new RangeError('The value "'+l+'" is invalid for option "size"');let n=new Uint8Array(l);return Object.setPrototypeOf(n,p.prototype),n}function p(l,n,i){if(typeof l=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(l)}return O(l,n,i)}p.poolSize=8192;function O(l,n,i){if(typeof l=="string")return C(l,n);if(ArrayBuffer.isView(l))return T(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(pe(l,ArrayBuffer)||l&&pe(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(l,SharedArrayBuffer)||l&&pe(l.buffer,SharedArrayBuffer)))return E(l,n,i);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let f=l.valueOf&&l.valueOf();if(f!=null&&f!==l)return p.from(f,n,i);let g=F(l);if(g)return g;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return p.from(l[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}p.from=function(l,n,i){return O(l,n,i)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function P(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function M(l,n,i){return P(l),l<=0?y(l):n!==void 0?typeof i=="string"?y(l).fill(n,i):y(l).fill(n):y(l)}p.alloc=function(l,n,i){return M(l,n,i)};function j(l){return P(l),y(l<0?0:G(l)|0)}p.allocUnsafe=function(l){return j(l)},p.allocUnsafeSlow=function(l){return j(l)};function C(l,n){if((typeof n!="string"||n==="")&&(n="utf8"),!p.isEncoding(n))throw new TypeError("Unknown encoding: "+n);let i=V(l,n)|0,f=y(i),g=f.write(l,n);return g!==i&&(f=f.slice(0,g)),f}function X(l){let n=l.length<0?0:G(l.length)|0,i=y(n);for(let f=0;f<n;f+=1)i[f]=l[f]&255;return i}function T(l){if(pe(l,Uint8Array)){let n=new Uint8Array(l);return E(n.buffer,n.byteOffset,n.byteLength)}return X(l)}function E(l,n,i){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');let f;return n===void 0&&i===void 0?f=new Uint8Array(l):i===void 0?f=new Uint8Array(l,n):f=new Uint8Array(l,n,i),Object.setPrototypeOf(f,p.prototype),f}function F(l){if(p.isBuffer(l)){let n=G(l.length)|0,i=y(n);return i.length===0||l.copy(i,0,0,n),i}if(l.length!==void 0)return typeof l.length!="number"||Zt(l.length)?y(0):X(l);if(l.type==="Buffer"&&Array.isArray(l.data))return X(l.data)}function G(l){if(l>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return l|0}function ee(l){return+l!=l&&(l=0),p.alloc(+l)}p.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==p.prototype},p.compare=function(n,i){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),pe(i,Uint8Array)&&(i=p.from(i,i.offset,i.byteLength)),!p.isBuffer(n)||!p.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;let f=n.length,g=i.length;for(let x=0,v=Math.min(f,g);x<v;++x)if(n[x]!==i[x]){f=n[x],g=i[x];break}return f<g?-1:g<f?1:0},p.isEncoding=function(n){switch(String(n).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}},p.concat=function(n,i){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return p.alloc(0);let f;if(i===void 0)for(i=0,f=0;f<n.length;++f)i+=n[f].length;let g=p.allocUnsafe(i),x=0;for(f=0;f<n.length;++f){let v=n[f];if(pe(v,Uint8Array))x+v.length>g.length?(p.isBuffer(v)||(v=p.from(v)),v.copy(g,x)):Uint8Array.prototype.set.call(g,v,x);else if(p.isBuffer(v))v.copy(g,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=v.length}return g};function V(l,n){if(p.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||pe(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);let i=l.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&i===0)return 0;let g=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Kt(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Ar(l).length;default:if(g)return f?-1:Kt(l).length;n=(""+n).toLowerCase(),g=!0}}p.byteLength=V;function te(l,n,i){let f=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,n>>>=0,i<=n))return"";for(l||(l="utf8");;)switch(l){case"hex":return zc(this,n,i);case"utf8":case"utf-8":return _r(this,n,i);case"ascii":return kc(this,n,i);case"latin1":case"binary":return Gc(this,n,i);case"base64":return Wc(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Hc(this,n,i);default:if(f)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),f=!0}}p.prototype._isBuffer=!0;function ie(l,n,i){let f=l[n];l[n]=l[i],l[i]=f}p.prototype.swap16=function(){let n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<n;i+=2)ie(this,i,i+1);return this},p.prototype.swap32=function(){let n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<n;i+=4)ie(this,i,i+3),ie(this,i+1,i+2);return this},p.prototype.swap64=function(){let n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<n;i+=8)ie(this,i,i+7),ie(this,i+1,i+6),ie(this,i+2,i+5),ie(this,i+3,i+4);return this},p.prototype.toString=function(){let n=this.length;return n===0?"":arguments.length===0?_r(this,0,n):te.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(n){if(!p.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:p.compare(this,n)===0},p.prototype.inspect=function(){let n="",i=Ee.INSPECT_MAX_BYTES;return n=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(n+=" ... "),"<Buffer "+n+">"},e&&(p.prototype[e]=p.prototype.inspect),p.prototype.compare=function(n,i,f,g,x){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),!p.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(i===void 0&&(i=0),f===void 0&&(f=n?n.length:0),g===void 0&&(g=0),x===void 0&&(x=this.length),i<0||f>n.length||g<0||x>this.length)throw new RangeError("out of range index");if(g>=x&&i>=f)return 0;if(g>=x)return-1;if(i>=f)return 1;if(i>>>=0,f>>>=0,g>>>=0,x>>>=0,this===n)return 0;let v=x-g,B=f-i,$=Math.min(v,B),D=this.slice(g,x),W=n.slice(i,f);for(let N=0;N<$;++N)if(D[N]!==W[N]){v=D[N],B=W[N];break}return v<B?-1:B<v?1:0};function Q(l,n,i,f,g){if(l.length===0)return-1;if(typeof i=="string"?(f=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,Zt(i)&&(i=g?0:l.length-1),i<0&&(i=l.length+i),i>=l.length){if(g)return-1;i=l.length-1}else if(i<0)if(g)i=0;else return-1;if(typeof n=="string"&&(n=p.from(n,f)),p.isBuffer(n))return n.length===0?-1:wr(l,n,i,f,g);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?g?Uint8Array.prototype.indexOf.call(l,n,i):Uint8Array.prototype.lastIndexOf.call(l,n,i):wr(l,[n],i,f,g);throw new TypeError("val must be string, number or Buffer")}function wr(l,n,i,f,g){let x=1,v=l.length,B=n.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(l.length<2||n.length<2)return-1;x=2,v/=2,B/=2,i/=2}function $(W,N){return x===1?W[N]:W.readUInt16BE(N*x)}let D;if(g){let W=-1;for(D=i;D<v;D++)if($(l,D)===$(n,W===-1?0:D-W)){if(W===-1&&(W=D),D-W+1===B)return W*x}else W!==-1&&(D-=D-W),W=-1}else for(i+B>v&&(i=v-B),D=i;D>=0;D--){let W=!0;for(let N=0;N<B;N++)if($(l,D+N)!==$(n,N)){W=!1;break}if(W)return D}return-1}p.prototype.includes=function(n,i,f){return this.indexOf(n,i,f)!==-1},p.prototype.indexOf=function(n,i,f){return Q(this,n,i,f,!0)},p.prototype.lastIndexOf=function(n,i,f){return Q(this,n,i,f,!1)};function Cc(l,n,i,f){i=Number(i)||0;let g=l.length-i;f?(f=Number(f),f>g&&(f=g)):f=g;let x=n.length;f>x/2&&(f=x/2);let v;for(v=0;v<f;++v){let B=parseInt(n.substr(v*2,2),16);if(Zt(B))return v;l[i+v]=B}return v}function qc(l,n,i,f){return jt(Kt(n,l.length-i),l,i,f)}function Uc(l,n,i,f){return jt(Zc(n),l,i,f)}function Dc(l,n,i,f){return jt(Ar(n),l,i,f)}function $c(l,n,i,f){return jt(Xc(n,l.length-i),l,i,f)}p.prototype.write=function(n,i,f,g){if(i===void 0)g="utf8",f=this.length,i=0;else if(f===void 0&&typeof i=="string")g=i,f=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(f)?(f=f>>>0,g===void 0&&(g="utf8")):(g=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let x=this.length-i;if((f===void 0||f>x)&&(f=x),n.length>0&&(f<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let v=!1;for(;;)switch(g){case"hex":return Cc(this,n,i,f);case"utf8":case"utf-8":return qc(this,n,i,f);case"ascii":case"latin1":case"binary":return Uc(this,n,i,f);case"base64":return Dc(this,n,i,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $c(this,n,i,f);default:if(v)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),v=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Wc(l,n,i){return n===0&&i===l.length?o.fromByteArray(l):o.fromByteArray(l.slice(n,i))}function _r(l,n,i){i=Math.min(l.length,i);let f=[],g=n;for(;g<i;){let x=l[g],v=null,B=x>239?4:x>223?3:x>191?2:1;if(g+B<=i){let $,D,W,N;switch(B){case 1:x<128&&(v=x);break;case 2:$=l[g+1],($&192)===128&&(N=(x&31)<<6|$&63,N>127&&(v=N));break;case 3:$=l[g+1],D=l[g+2],($&192)===128&&(D&192)===128&&(N=(x&15)<<12|($&63)<<6|D&63,N>2047&&(N<55296||N>57343)&&(v=N));break;case 4:$=l[g+1],D=l[g+2],W=l[g+3],($&192)===128&&(D&192)===128&&(W&192)===128&&(N=(x&15)<<18|($&63)<<12|(D&63)<<6|W&63,N>65535&&N<1114112&&(v=N))}}v===null?(v=65533,B=1):v>65535&&(v-=65536,f.push(v>>>10&1023|55296),v=56320|v&1023),f.push(v),g+=B}return Vc(f)}let Or=4096;function Vc(l){let n=l.length;if(n<=Or)return String.fromCharCode.apply(String,l);let i="",f=0;for(;f<n;)i+=String.fromCharCode.apply(String,l.slice(f,f+=Or));return i}function kc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]&127);return f}function Gc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]);return f}function zc(l,n,i){let f=l.length;(!n||n<0)&&(n=0),(!i||i<0||i>f)&&(i=f);let g="";for(let x=n;x<i;++x)g+=Qc[l[x]];return g}function Hc(l,n,i){let f=l.slice(n,i),g="";for(let x=0;x<f.length-1;x+=2)g+=String.fromCharCode(f[x]+f[x+1]*256);return g}p.prototype.slice=function(n,i){let f=this.length;n=~~n,i=i===void 0?f:~~i,n<0?(n+=f,n<0&&(n=0)):n>f&&(n=f),i<0?(i+=f,i<0&&(i=0)):i>f&&(i=f),i<n&&(i=n);let g=this.subarray(n,i);return Object.setPrototypeOf(g,p.prototype),g};function H(l,n,i){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+n>i)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return g},p.prototype.readUintBE=p.prototype.readUIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n+--i],x=1;for(;i>0&&(x*=256);)g+=this[n+--i]*x;return g},p.prototype.readUint8=p.prototype.readUInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]|this[n+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]<<8|this[n+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},p.prototype.readBigUInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,x=this[++n]+this[++n]*2**8+this[++n]*2**16+f*2**24;return BigInt(g)+(BigInt(x)<<BigInt(32))}),p.prototype.readBigUInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],x=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f;return(BigInt(g)<<BigInt(32))+BigInt(x)}),p.prototype.readIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return x*=128,g>=x&&(g-=Math.pow(2,8*i)),g},p.prototype.readIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=i,x=1,v=this[n+--g];for(;g>0&&(x*=256);)v+=this[n+--g]*x;return x*=128,v>=x&&(v-=Math.pow(2,8*i)),v},p.prototype.readInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},p.prototype.readInt16LE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n]|this[n+1]<<8;return f&32768?f|4294901760:f},p.prototype.readInt16BE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n+1]|this[n]<<8;return f&32768?f|4294901760:f},p.prototype.readInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},p.prototype.readInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},p.prototype.readBigInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(f<<24);return(BigInt(g)<<BigInt(32))+BigInt(i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),p.prototype.readBigInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=(i<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(g)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f)}),p.prototype.readFloatLE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!0,23,4)},p.prototype.readFloatBE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!1,23,4)},p.prototype.readDoubleLE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!0,52,8)},p.prototype.readDoubleBE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!1,52,8)};function re(l,n,i,f,g,x){if(!p.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>g||n<x)throw new RangeError('"value" argument is out of bounds');if(i+f>l.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=1,v=0;for(this[i]=n&255;++v<f&&(x*=256);)this[i+v]=n/x&255;return i+f},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=f-1,v=1;for(this[i+x]=n&255;--x>=0&&(v*=256);)this[i+x]=n/v&255;return i+f},p.prototype.writeUint8=p.prototype.writeUInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,255,0),this[i]=n&255,i+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i+3]=n>>>24,this[i+2]=n>>>16,this[i+1]=n>>>8,this[i]=n&255,i+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4};function Pr(l,n,i,f,g){Sr(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,i}function Tr(l,n,i,f,g){Sr(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i+7]=x,x=x>>8,l[i+6]=x,x=x>>8,l[i+5]=x,x=x>>8,l[i+4]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i+3]=v,v=v>>8,l[i+2]=v,v=v>>8,l[i+1]=v,v=v>>8,l[i]=v,i+8}p.prototype.writeBigUInt64LE=ve(function(n,i=0){return Pr(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ve(function(n,i=0){return Tr(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=0,v=1,B=0;for(this[i]=n&255;++x<f&&(v*=256);)n<0&&B===0&&this[i+x-1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=f-1,v=1,B=0;for(this[i+x]=n&255;--x>=0&&(v*=256);)n<0&&B===0&&this[i+x+1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,127,-128),n<0&&(n=255+n+1),this[i]=n&255,i+1},p.prototype.writeInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),this[i]=n&255,this[i+1]=n>>>8,this[i+2]=n>>>16,this[i+3]=n>>>24,i+4},p.prototype.writeInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4},p.prototype.writeBigInt64LE=ve(function(n,i=0){return Pr(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ve(function(n,i=0){return Tr(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ir(l,n,i,f,g,x){if(i+f>l.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Er(l,n,i,f,g){return n=+n,i=i>>>0,g||Ir(l,n,i,4),t.write(l,n,i,f,23,4),i+4}p.prototype.writeFloatLE=function(n,i,f){return Er(this,n,i,!0,f)},p.prototype.writeFloatBE=function(n,i,f){return Er(this,n,i,!1,f)};function jr(l,n,i,f,g){return n=+n,i=i>>>0,g||Ir(l,n,i,8),t.write(l,n,i,f,52,8),i+8}p.prototype.writeDoubleLE=function(n,i,f){return jr(this,n,i,!0,f)},p.prototype.writeDoubleBE=function(n,i,f){return jr(this,n,i,!1,f)},p.prototype.copy=function(n,i,f,g){if(!p.isBuffer(n))throw new TypeError("argument should be a Buffer");if(f||(f=0),!g&&g!==0&&(g=this.length),i>=n.length&&(i=n.length),i||(i=0),g>0&&g<f&&(g=f),g===f||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),n.length-i<g-f&&(g=n.length-i+f);let x=g-f;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,f,g):Uint8Array.prototype.set.call(n,this.subarray(f,g),i),x},p.prototype.fill=function(n,i,f,g){if(typeof n=="string"){if(typeof i=="string"?(g=i,i=0,f=this.length):typeof f=="string"&&(g=f,f=this.length),g!==void 0&&typeof g!="string")throw new TypeError("encoding must be a string");if(typeof g=="string"&&!p.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(n.length===1){let v=n.charCodeAt(0);(g==="utf8"&&v<128||g==="latin1")&&(n=v)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(i<0||this.length<i||this.length<f)throw new RangeError("Out of range index");if(f<=i)return this;i=i>>>0,f=f===void 0?this.length:f>>>0,n||(n=0);let x;if(typeof n=="number")for(x=i;x<f;++x)this[x]=n;else{let v=p.isBuffer(n)?n:p.from(n,g),B=v.length;if(B===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(x=0;x<f-i;++x)this[x+i]=v[x%B]}return this};let Qe={};function Jt(l,n,i){Qe[l]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}Jt("ERR_BUFFER_OUT_OF_BOUNDS",function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Jt("ERR_INVALID_ARG_TYPE",function(l,n){return`The "${l}" argument must be of type number. Received type ${typeof n}`},TypeError),Jt("ERR_OUT_OF_RANGE",function(l,n,i){let f=`The value of "${l}" is out of range.`,g=i;return Number.isInteger(i)&&Math.abs(i)>2**32?g=Br(String(i)):typeof i=="bigint"&&(g=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(g=Br(g)),g+="n"),f+=` It must be ${n}. Received ${g}`,f},RangeError);function Br(l){let n="",i=l.length,f=l[0]==="-"?1:0;for(;i>=f+4;i-=3)n=`_${l.slice(i-3,i)}${n}`;return`${l.slice(0,i)}${n}`}function Yc(l,n,i){et(n,"offset"),(l[n]===void 0||l[n+i]===void 0)&&dt(n,l.length-(i+1))}function Sr(l,n,i,f,g,x){if(l>i||l<n){let v=typeof n=="bigint"?"n":"",B;throw n===0||n===BigInt(0)?B=`>= 0${v} and < 2${v} ** ${(x+1)*8}${v}`:B=`>= -(2${v} ** ${(x+1)*8-1}${v}) and < 2 ** ${(x+1)*8-1}${v}`,new Qe.ERR_OUT_OF_RANGE("value",B,l)}Yc(f,g,x)}function et(l,n){if(typeof l!="number")throw new Qe.ERR_INVALID_ARG_TYPE(n,"number",l)}function dt(l,n,i){throw Math.floor(l)!==l?(et(l,i),new Qe.ERR_OUT_OF_RANGE("offset","an integer",l)):n<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,l)}let Jc=/[^+/0-9A-Za-z-_]/g;function Kc(l){if(l=l.split("=")[0],l=l.trim().replace(Jc,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function Kt(l,n){n=n||1/0;let i,f=l.length,g=null,x=[];for(let v=0;v<f;++v){if(i=l.charCodeAt(v),i>55295&&i<57344){if(!g){if(i>56319){(n-=3)>-1&&x.push(239,191,189);continue}else if(v+1===f){(n-=3)>-1&&x.push(239,191,189);continue}g=i;continue}if(i<56320){(n-=3)>-1&&x.push(239,191,189),g=i;continue}i=(g-55296<<10|i-56320)+65536}else g&&(n-=3)>-1&&x.push(239,191,189);if(g=null,i<128){if((n-=1)<0)break;x.push(i)}else if(i<2048){if((n-=2)<0)break;x.push(i>>6|192,i&63|128)}else if(i<65536){if((n-=3)<0)break;x.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((n-=4)<0)break;x.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return x}function Zc(l){let n=[];for(let i=0;i<l.length;++i)n.push(l.charCodeAt(i)&255);return n}function Xc(l,n){let i,f,g,x=[];for(let v=0;v<l.length&&!((n-=2)<0);++v)i=l.charCodeAt(v),f=i>>8,g=i%256,x.push(g),x.push(f);return x}function Ar(l){return o.toByteArray(Kc(l))}function jt(l,n,i,f){let g;for(g=0;g<f&&!(g+i>=n.length||g>=l.length);++g)n[g+i]=l[g];return g}function pe(l,n){return l instanceof n||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===n.name}function Zt(l){return l!==l}let Qc=(function(){let l="0123456789abcdef",n=new Array(256);for(let i=0;i<16;++i){let f=i*16;for(let g=0;g<16;++g)n[f+g]=l[i]+l[g]}return n})();function ve(l){return typeof BigInt>"u"?el:l}function el(){throw new Error("BigInt not supported")}return Ee}var mt,Zn,Mt,Xn,Ee,Qn,ti=tt(()=>{"use strict";s();c();u();mt={},Zn=!1;Mt={},Xn=!1;Ee={},Qn=!1});var je,m,Pd,Td,ri=tt(()=>{"use strict";s();c();u();ti();je=ei();je.Buffer;je.SlowBuffer;je.INSPECT_MAX_BYTES;je.kMaxLength;m=je.Buffer,Pd=je.INSPECT_MAX_BYTES,Td=je.kMaxLength});var c=tt(()=>{"use strict";ri()});var so=b(ao=>{"use strict";s();c();u();Object.defineProperty(ao,"__esModule",{value:!0})});var co=b(uo=>{"use strict";s();c();u();Object.defineProperty(uo,"__esModule",{value:!0})});var fo=b(lo=>{"use strict";s();c();u();Object.defineProperty(lo,"__esModule",{value:!0})});var mo=b(po=>{"use strict";s();c();u();Object.defineProperty(po,"__esModule",{value:!0})});var yo=b(ho=>{"use strict";s();c();u();Object.defineProperty(ho,"__esModule",{value:!0})});var bo=b(go=>{"use strict";s();c();u();Object.defineProperty(go,"__esModule",{value:!0})});var vo=b(xo=>{"use strict";s();c();u();Object.defineProperty(xo,"__esModule",{value:!0})});var sr=b(oe=>{"use strict";s();c();u();var mp=oe&&oe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Me=oe&&oe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&mp(t,o,e)};Object.defineProperty(oe,"__esModule",{value:!0});Me(so(),oe);Me(co(),oe);Me(fo(),oe);Me(mo(),oe);Me(yo(),oe);Me(bo(),oe);Me(vo(),oe)});var wo=b(Fe=>{"use strict";s();c();u();var hp=Fe&&Fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),yp=Fe&&Fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&hp(t,o,e)};Object.defineProperty(Fe,"__esModule",{value:!0});yp(sr(),Fe)});var Oo=b(_o=>{"use strict";s();c();u();Object.defineProperty(_o,"__esModule",{value:!0})});var To=b(Po=>{"use strict";s();c();u();Object.defineProperty(Po,"__esModule",{value:!0})});var Eo=b(Io=>{"use strict";s();c();u();Object.defineProperty(Io,"__esModule",{value:!0})});var Bo=b(jo=>{"use strict";s();c();u();Object.defineProperty(jo,"__esModule",{value:!0})});var Ao=b(So=>{"use strict";s();c();u();Object.defineProperty(So,"__esModule",{value:!0})});var Mo=b(Ro=>{"use strict";s();c();u();Object.defineProperty(Ro,"__esModule",{value:!0})});var No=b(Fo=>{"use strict";s();c();u();Object.defineProperty(Fo,"__esModule",{value:!0})});var Co=b(Lo=>{"use strict";s();c();u();Object.defineProperty(Lo,"__esModule",{value:!0})});var Uo=b(qo=>{"use strict";s();c();u();Object.defineProperty(qo,"__esModule",{value:!0})});var $o=b(Do=>{"use strict";s();c();u();Object.defineProperty(Do,"__esModule",{value:!0})});var Vo=b(Wo=>{"use strict";s();c();u();Object.defineProperty(Wo,"__esModule",{value:!0})});var Go=b(ko=>{"use strict";s();c();u();Object.defineProperty(ko,"__esModule",{value:!0})});var ur=b(Y=>{"use strict";s();c();u();var gp=Y&&Y.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ue=Y&&Y.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&gp(t,o,e)};Object.defineProperty(Y,"__esModule",{value:!0});ue(Oo(),Y);ue(To(),Y);ue(Eo(),Y);ue(Bo(),Y);ue(Ao(),Y);ue(Mo(),Y);ue(No(),Y);ue(Co(),Y);ue(Uo(),Y);ue($o(),Y);ue(Vo(),Y);ue(Go(),Y)});var zo=b(Ne=>{"use strict";s();c();u();var bp=Ne&&Ne.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),xp=Ne&&Ne.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&bp(t,o,e)};Object.defineProperty(Ne,"__esModule",{value:!0});xp(ur(),Ne)});var Yo=b(Ho=>{"use strict";s();c();u();Object.defineProperty(Ho,"__esModule",{value:!0})});var cr=b(Le=>{"use strict";s();c();u();var vp=Le&&Le.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),wp=Le&&Le.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&vp(t,o,e)};Object.defineProperty(Le,"__esModule",{value:!0});wp(Yo(),Le)});var Jo=b(Ce=>{"use strict";s();c();u();var _p=Ce&&Ce.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Op=Ce&&Ce.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&_p(t,o,e)};Object.defineProperty(Ce,"__esModule",{value:!0});Op(cr(),Ce)});var Zo=b(Ko=>{"use strict";s();c();u();Object.defineProperty(Ko,"__esModule",{value:!0})});var Qo=b(Xo=>{"use strict";s();c();u();Object.defineProperty(Xo,"__esModule",{value:!0})});var ta=b(ea=>{"use strict";s();c();u();Object.defineProperty(ea,"__esModule",{value:!0})});var na=b(ra=>{"use strict";s();c();u();Object.defineProperty(ra,"__esModule",{value:!0})});var oa=b(ia=>{"use strict";s();c();u();Object.defineProperty(ia,"__esModule",{value:!0})});var sa=b(aa=>{"use strict";s();c();u();Object.defineProperty(aa,"__esModule",{value:!0})});var ca=b(ua=>{"use strict";s();c();u();Object.defineProperty(ua,"__esModule",{value:!0})});var fa=b(la=>{"use strict";s();c();u();Object.defineProperty(la,"__esModule",{value:!0})});var da=b(pa=>{"use strict";s();c();u();Object.defineProperty(pa,"__esModule",{value:!0})});var ha=b(ma=>{"use strict";s();c();u();Object.defineProperty(ma,"__esModule",{value:!0})});var ga=b(ya=>{"use strict";s();c();u();Object.defineProperty(ya,"__esModule",{value:!0})});var xa=b(ba=>{"use strict";s();c();u();Object.defineProperty(ba,"__esModule",{value:!0})});var wa=b(va=>{"use strict";s();c();u();Object.defineProperty(va,"__esModule",{value:!0})});var lr=b(z=>{"use strict";s();c();u();var Pp=z&&z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ae=z&&z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Pp(t,o,e)};Object.defineProperty(z,"__esModule",{value:!0});ae(Zo(),z);ae(Qo(),z);ae(ta(),z);ae(na(),z);ae(oa(),z);ae(sa(),z);ae(ca(),z);ae(fa(),z);ae(da(),z);ae(ha(),z);ae(ga(),z);ae(xa(),z);ae(wa(),z)});var _a=b(qe=>{"use strict";s();c();u();var Tp=qe&&qe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ip=qe&&qe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Tp(t,o,e)};Object.defineProperty(qe,"__esModule",{value:!0});Ip(lr(),qe)});var Pa=b(Oa=>{"use strict";s();c();u();Object.defineProperty(Oa,"__esModule",{value:!0})});var Ia=b(Ta=>{"use strict";s();c();u();Object.defineProperty(Ta,"__esModule",{value:!0})});var fr=b(Pe=>{"use strict";s();c();u();var Ep=Pe&&Pe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ea=Pe&&Pe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ep(t,o,e)};Object.defineProperty(Pe,"__esModule",{value:!0});Ea(Pa(),Pe);Ea(Ia(),Pe)});var ja=b(Ue=>{"use strict";s();c();u();var jp=Ue&&Ue.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Bp=Ue&&Ue.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&jp(t,o,e)};Object.defineProperty(Ue,"__esModule",{value:!0});Bp(fr(),Ue)});var Sa=b(Ba=>{"use strict";s();c();u();Object.defineProperty(Ba,"__esModule",{value:!0})});var Ra=b(Aa=>{"use strict";s();c();u();Object.defineProperty(Aa,"__esModule",{value:!0})});var Fa=b(Ma=>{"use strict";s();c();u();Object.defineProperty(Ma,"__esModule",{value:!0})});var La=b(Na=>{"use strict";s();c();u();Object.defineProperty(Na,"__esModule",{value:!0})});var qa=b(Ca=>{"use strict";s();c();u();Object.defineProperty(Ca,"__esModule",{value:!0})});var Da=b(Ua=>{"use strict";s();c();u();Object.defineProperty(Ua,"__esModule",{value:!0})});var Wa=b($a=>{"use strict";s();c();u();Object.defineProperty($a,"__esModule",{value:!0})});var ka=b(Va=>{"use strict";s();c();u();Object.defineProperty(Va,"__esModule",{value:!0})});var za=b(Ga=>{"use strict";s();c();u();Object.defineProperty(Ga,"__esModule",{value:!0})});var Ya=b(Ha=>{"use strict";s();c();u();Object.defineProperty(Ha,"__esModule",{value:!0})});var pr=b(K=>{"use strict";s();c();u();var Sp=K&&K.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),me=K&&K.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Sp(t,o,e)};Object.defineProperty(K,"__esModule",{value:!0});me(Sa(),K);me(Ra(),K);me(Fa(),K);me(La(),K);me(qa(),K);me(Da(),K);me(Wa(),K);me(ka(),K);me(za(),K);me(Ya(),K)});var Ja=b(De=>{"use strict";s();c();u();var Ap=De&&De.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Rp=De&&De.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ap(t,o,e)};Object.defineProperty(De,"__esModule",{value:!0});Rp(pr(),De)});var Ka=b(Ut=>{"use strict";s();c();u();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ErrorSeverity=void 0;Ut.ErrorSeverity={Critical:"CRITICAL",Warning:"WARNING"}});var Xa=b(Za=>{"use strict";s();c();u();Object.defineProperty(Za,"__esModule",{value:!0})});var es=b(Qa=>{"use strict";s();c();u();Object.defineProperty(Qa,"__esModule",{value:!0})});var rs=b(ts=>{"use strict";s();c();u();Object.defineProperty(ts,"__esModule",{value:!0})});var is=b(ns=>{"use strict";s();c();u();Object.defineProperty(ns,"__esModule",{value:!0})});var dr=b(fe=>{"use strict";s();c();u();var Mp=fe&&fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Et=fe&&fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Mp(t,o,e)};Object.defineProperty(fe,"__esModule",{value:!0});Et(Ka(),fe);Et(Xa(),fe);Et(es(),fe);Et(rs(),fe);Et(is(),fe)});var os=b($e=>{"use strict";s();c();u();var Fp=$e&&$e.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Np=$e&&$e.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Fp(t,o,e)};Object.defineProperty($e,"__esModule",{value:!0});Np(dr(),$e)});var ss=b(as=>{"use strict";s();c();u();Object.defineProperty(as,"__esModule",{value:!0})});var cs=b(us=>{"use strict";s();c();u();Object.defineProperty(us,"__esModule",{value:!0})});var fs=b(ls=>{"use strict";s();c();u();Object.defineProperty(ls,"__esModule",{value:!0})});var ds=b(ps=>{"use strict";s();c();u();Object.defineProperty(ps,"__esModule",{value:!0})});var hs=b(ms=>{"use strict";s();c();u();Object.defineProperty(ms,"__esModule",{value:!0})});var gs=b(ys=>{"use strict";s();c();u();Object.defineProperty(ys,"__esModule",{value:!0})});var xs=b(bs=>{"use strict";s();c();u();Object.defineProperty(bs,"__esModule",{value:!0})});var ws=b(vs=>{"use strict";s();c();u();Object.defineProperty(vs,"__esModule",{value:!0})});var Os=b(_s=>{"use strict";s();c();u();Object.defineProperty(_s,"__esModule",{value:!0})});var Ts=b(Ps=>{"use strict";s();c();u();Object.defineProperty(Ps,"__esModule",{value:!0})});var Es=b(Is=>{"use strict";s();c();u();Object.defineProperty(Is,"__esModule",{value:!0})});var Bs=b(js=>{"use strict";s();c();u();Object.defineProperty(js,"__esModule",{value:!0})});var As=b(Ss=>{"use strict";s();c();u();Object.defineProperty(Ss,"__esModule",{value:!0})});var Ms=b(Rs=>{"use strict";s();c();u();Object.defineProperty(Rs,"__esModule",{value:!0})});var mr=b(k=>{"use strict";s();c();u();var Lp=k&&k.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ne=k&&k.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Lp(t,o,e)};Object.defineProperty(k,"__esModule",{value:!0});ne(ss(),k);ne(cs(),k);ne(fs(),k);ne(ds(),k);ne(hs(),k);ne(gs(),k);ne(xs(),k);ne(ws(),k);ne(Os(),k);ne(Ts(),k);ne(Es(),k);ne(Bs(),k);ne(As(),k);ne(Ms(),k)});var Fs=b(We=>{"use strict";s();c();u();var Cp=We&&We.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),qp=We&&We.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Cp(t,o,e)};Object.defineProperty(We,"__esModule",{value:!0});qp(mr(),We)});var Ls=b(R=>{"use strict";s();c();u();var Ns=R&&R.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Up=R&&R.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Ve=R&&R.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Ns(e,t,r[a]);return Up(e,t),e}})(),ke=R&&R.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ns(t,o,e)};Object.defineProperty(R,"__esModule",{value:!0});R.types=R.snippets=R.ir=R.environment=R.endpoints=R.declaration=R.auth=void 0;R.auth=Ve(zo());ke(ur(),R);R.declaration=Ve(Jo());ke(cr(),R);R.endpoints=Ve(_a());ke(lr(),R);R.environment=Ve(ja());ke(fr(),R);R.ir=Ve(Ja());ke(pr(),R);R.snippets=Ve(os());ke(dr(),R);R.types=Ve(Fs());ke(mr(),R)});var Cs=b(Ge=>{"use strict";s();c();u();var Dp=Ge&&Ge.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),$p=Ge&&Ge.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Dp(t,o,e)};Object.defineProperty(Ge,"__esModule",{value:!0});$p(Ls(),Ge)});var Us=b(qs=>{"use strict";s();c();u();Object.defineProperty(qs,"__esModule",{value:!0})});var $s=b(Ds=>{"use strict";s();c();u();Object.defineProperty(Ds,"__esModule",{value:!0})});var Vs=b(Ws=>{"use strict";s();c();u();Object.defineProperty(Ws,"__esModule",{value:!0})});var Gs=b(ks=>{"use strict";s();c();u();Object.defineProperty(ks,"__esModule",{value:!0})});var Hs=b(zs=>{"use strict";s();c();u();Object.defineProperty(zs,"__esModule",{value:!0})});var Js=b(Ys=>{"use strict";s();c();u();Object.defineProperty(Ys,"__esModule",{value:!0})});var Zs=b(Ks=>{"use strict";s();c();u();Object.defineProperty(Ks,"__esModule",{value:!0})});var Qs=b(Xs=>{"use strict";s();c();u();Object.defineProperty(Xs,"__esModule",{value:!0})});var tu=b(eu=>{"use strict";s();c();u();Object.defineProperty(eu,"__esModule",{value:!0})});var nu=b(ru=>{"use strict";s();c();u();Object.defineProperty(ru,"__esModule",{value:!0})});var hr=b(Z=>{"use strict";s();c();u();var Wp=Z&&Z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),he=Z&&Z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Wp(t,o,e)};Object.defineProperty(Z,"__esModule",{value:!0});he(Us(),Z);he($s(),Z);he(Vs(),Z);he(Gs(),Z);he(Hs(),Z);he(Js(),Z);he(Zs(),Z);he(Qs(),Z);he(tu(),Z);he(nu(),Z)});var iu=b(ze=>{"use strict";s();c();u();var Vp=ze&&ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),kp=ze&&ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Vp(t,o,e)};Object.defineProperty(ze,"__esModule",{value:!0});kp(hr(),ze)});var au=b(ou=>{"use strict";s();c();u();Object.defineProperty(ou,"__esModule",{value:!0})});var uu=b(su=>{"use strict";s();c();u();Object.defineProperty(su,"__esModule",{value:!0})});var lu=b(cu=>{"use strict";s();c();u();Object.defineProperty(cu,"__esModule",{value:!0})});var fu=b(Dt=>{"use strict";s();c();u();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.LicenseId=void 0;Dt.LicenseId={Mit:"MIT",Apache2:"Apache-2.0"}});var du=b(pu=>{"use strict";s();c();u();Object.defineProperty(pu,"__esModule",{value:!0})});var hu=b(mu=>{"use strict";s();c();u();Object.defineProperty(mu,"__esModule",{value:!0})});var gu=b(yu=>{"use strict";s();c();u();Object.defineProperty(yu,"__esModule",{value:!0})});var xu=b(bu=>{"use strict";s();c();u();Object.defineProperty(bu,"__esModule",{value:!0})});var wu=b(vu=>{"use strict";s();c();u();Object.defineProperty(vu,"__esModule",{value:!0})});var Ou=b(_u=>{"use strict";s();c();u();Object.defineProperty(_u,"__esModule",{value:!0})});var Tu=b(Pu=>{"use strict";s();c();u();Object.defineProperty(Pu,"__esModule",{value:!0})});var Eu=b(Iu=>{"use strict";s();c();u();Object.defineProperty(Iu,"__esModule",{value:!0})});var Bu=b(ju=>{"use strict";s();c();u();Object.defineProperty(ju,"__esModule",{value:!0})});var Au=b(Su=>{"use strict";s();c();u();Object.defineProperty(Su,"__esModule",{value:!0})});var Mu=b(Ru=>{"use strict";s();c();u();Object.defineProperty(Ru,"__esModule",{value:!0})});var Nu=b(Fu=>{"use strict";s();c();u();Object.defineProperty(Fu,"__esModule",{value:!0})});var Cu=b(Lu=>{"use strict";s();c();u();Object.defineProperty(Lu,"__esModule",{value:!0})});var Uu=b(qu=>{"use strict";s();c();u();Object.defineProperty(qu,"__esModule",{value:!0})});var $u=b(Du=>{"use strict";s();c();u();Object.defineProperty(Du,"__esModule",{value:!0})});var Vu=b(Wu=>{"use strict";s();c();u();Object.defineProperty(Wu,"__esModule",{value:!0})});var Gu=b(ku=>{"use strict";s();c();u();Object.defineProperty(ku,"__esModule",{value:!0})});var Hu=b(zu=>{"use strict";s();c();u();Object.defineProperty(zu,"__esModule",{value:!0})});var Ju=b(Yu=>{"use strict";s();c();u();Object.defineProperty(Yu,"__esModule",{value:!0})});var Zu=b(Ku=>{"use strict";s();c();u();Object.defineProperty(Ku,"__esModule",{value:!0})});var Qu=b(Xu=>{"use strict";s();c();u();Object.defineProperty(Xu,"__esModule",{value:!0})});var tc=b(ec=>{"use strict";s();c();u();Object.defineProperty(ec,"__esModule",{value:!0})});var nc=b(rc=>{"use strict";s();c();u();Object.defineProperty(rc,"__esModule",{value:!0})});var oc=b(ic=>{"use strict";s();c();u();Object.defineProperty(ic,"__esModule",{value:!0})});var sc=b(ac=>{"use strict";s();c();u();Object.defineProperty(ac,"__esModule",{value:!0})});var cc=b(uc=>{"use strict";s();c();u();Object.defineProperty(uc,"__esModule",{value:!0})});var fc=b(lc=>{"use strict";s();c();u();Object.defineProperty(lc,"__esModule",{value:!0})});var dc=b(pc=>{"use strict";s();c();u();Object.defineProperty(pc,"__esModule",{value:!0})});var hc=b(mc=>{"use strict";s();c();u();Object.defineProperty(mc,"__esModule",{value:!0})});var gc=b(yc=>{"use strict";s();c();u();Object.defineProperty(yc,"__esModule",{value:!0})});var xc=b(bc=>{"use strict";s();c();u();Object.defineProperty(bc,"__esModule",{value:!0})});var wc=b(vc=>{"use strict";s();c();u();Object.defineProperty(vc,"__esModule",{value:!0})});var yr=b(I=>{"use strict";s();c();u();var Gp=I&&I.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),S=I&&I.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Gp(t,o,e)};Object.defineProperty(I,"__esModule",{value:!0});S(au(),I);S(uu(),I);S(lu(),I);S(fu(),I);S(du(),I);S(hu(),I);S(gu(),I);S(xu(),I);S(wu(),I);S(Ou(),I);S(Tu(),I);S(Eu(),I);S(Bu(),I);S(Au(),I);S(Mu(),I);S(Nu(),I);S(Cu(),I);S(Uu(),I);S($u(),I);S(Vu(),I);S(Gu(),I);S(Hu(),I);S(Ju(),I);S(Zu(),I);S(Qu(),I);S(tc(),I);S(nc(),I);S(oc(),I);S(sc(),I);S(cc(),I);S(fc(),I);S(dc(),I);S(hc(),I);S(gc(),I);S(xc(),I);S(wc(),I)});var _c=b(He=>{"use strict";s();c();u();var zp=He&&He.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Hp=He&&He.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&zp(t,o,e)};Object.defineProperty(He,"__esModule",{value:!0});Hp(yr(),He)});var Pc=b(se=>{"use strict";s();c();u();var Oc=se&&se.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Yp=se&&se.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Jp=se&&se.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Oc(e,t,r[a]);return Yp(e,t),e}})(),Kp=se&&se.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Oc(t,o,e)};Object.defineProperty(se,"__esModule",{value:!0});se.config=void 0;se.config=Jp(_c());Kp(yr(),se)});var Tc=b(Ye=>{"use strict";s();c();u();var Zp=Ye&&Ye.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Xp=Ye&&Ye.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Zp(t,o,e)};Object.defineProperty(Ye,"__esModule",{value:!0});Xp(Pc(),Ye)});var Ic=b($t=>{"use strict";s();c();u();Object.defineProperty($t,"__esModule",{value:!0});$t.HttpMethod=void 0;$t.HttpMethod={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var gr=b(Je=>{"use strict";s();c();u();var Qp=Je&&Je.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ed=Je&&Je.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Qp(t,o,e)};Object.defineProperty(Je,"__esModule",{value:!0});ed(Ic(),Je)});var Ec=b(Ke=>{"use strict";s();c();u();var td=Ke&&Ke.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),rd=Ke&&Ke.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&td(t,o,e)};Object.defineProperty(Ke,"__esModule",{value:!0});rd(gr(),Ke)});var jc=b(Wt=>{"use strict";s();c();u();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ObjectPropertyAccess=void 0;Wt.ObjectPropertyAccess={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"}});var Bc=b(Vt=>{"use strict";s();c();u();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.PrimitiveTypeV1=void 0;Vt.PrimitiveTypeV1={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"}});var br=b(Te=>{"use strict";s();c();u();var nd=Te&&Te.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Sc=Te&&Te.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&nd(t,o,e)};Object.defineProperty(Te,"__esModule",{value:!0});Sc(jc(),Te);Sc(Bc(),Te)});var Ac=b(Ze=>{"use strict";s();c();u();var id=Ze&&Ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),od=Ze&&Ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&id(t,o,e)};Object.defineProperty(Ze,"__esModule",{value:!0});od(br(),Ze)});var Mc=b(q=>{"use strict";s();c();u();var Rc=q&&q.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ad=q&&q.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),pt=q&&q.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Rc(e,t,r[a]);return ad(e,t),e}})(),kt=q&&q.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Rc(t,o,e)};Object.defineProperty(q,"__esModule",{value:!0});q.types=q.http=q.generatorExec=q.environment=q.dynamic=q.commons=void 0;q.commons=pt(wo());kt(sr(),q);q.dynamic=pt(Cs());q.environment=pt(iu());kt(hr(),q);q.generatorExec=pt(Tc());q.http=pt(Ec());kt(gr(),q);q.types=pt(Ac());kt(br(),q)});var Fc=b(Xe=>{"use strict";s();c();u();var sd=Xe&&Xe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ud=Xe&&Xe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&sd(t,o,e)};Object.defineProperty(Xe,"__esModule",{value:!0});ud(Mc(),Xe)});s();c();u();s();c();u();s();c();u();s();c();u();function U(o){throw new Error("Unexpected value: "+JSON.stringify(o))}s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var pl=typeof global=="object"&&global&&global.Object===Object&&global,ni=pl;var dl=typeof self=="object"&&self&&self.Object===Object&&self,ml=ni||dl||Function("return this")(),ii=ml;var hl=ii.Symbol,be=hl;s();c();u();var oi=Object.prototype,yl=oi.hasOwnProperty,gl=oi.toString,ht=be?be.toStringTag:void 0;function bl(o){var t=yl.call(o,ht),e=o[ht];try{o[ht]=void 0;var r=!0}catch{}var a=gl.call(o);return r&&(t?o[ht]=e:delete o[ht]),a}var ai=bl;s();c();u();var xl=Object.prototype,vl=xl.toString;function wl(o){return vl.call(o)}var si=wl;var _l="[object Null]",Ol="[object Undefined]",ui=be?be.toStringTag:void 0;function Pl(o){return o==null?o===void 0?Ol:_l:ui&&ui in Object(o)?ai(o):si(o)}var ci=Pl;s();c();u();function Tl(o){return o!=null&&typeof o=="object"}var li=Tl;var Il="[object Symbol]";function El(o){return typeof o=="symbol"||li(o)&&ci(o)==Il}var fi=El;s();c();u();s();c();u();function jl(o,t){for(var e=-1,r=o==null?0:o.length,a=Array(r);++e<r;)a[e]=t(o[e],e,o);return a}var pi=jl;s();c();u();var Bl=Array.isArray,di=Bl;var Sl=1/0,mi=be?be.prototype:void 0,hi=mi?mi.toString:void 0;function yi(o){if(typeof o=="string")return o;if(di(o))return pi(o,yi)+"";if(fi(o))return hi?hi.call(o):"";var t=o+"";return t=="0"&&1/o==-Sl?"-0":t}var gi=yi;s();c();u();function Al(o){return o==null?"":gi(o)}var _e=Al;s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();function Rl(o,t,e){var r=-1,a=o.length;t<0&&(t=-t>a?0:a+t),e=e>a?a:e,e<0&&(e+=a),a=t>e?0:e-t>>>0,t>>>=0;for(var y=Array(a);++r<a;)y[r]=o[r+t];return y}var bi=Rl;function Ml(o,t,e){var r=o.length;return e=e===void 0?r:e,!t&&e>=r?o:bi(o,t,e)}var xi=Ml;s();c();u();var Fl="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Ll="\\ufe20-\\ufe2f",Cl="\\u20d0-\\u20ff",ql=Nl+Ll+Cl,Ul="\\ufe0e\\ufe0f",Dl="\\u200d",$l=RegExp("["+Dl+Fl+ql+Ul+"]");function Wl(o){return $l.test(o)}var Ft=Wl;s();c();u();s();c();u();function Vl(o){return o.split("")}var vi=Vl;s();c();u();var wi="\\ud800-\\udfff",kl="\\u0300-\\u036f",Gl="\\ufe20-\\ufe2f",zl="\\u20d0-\\u20ff",Hl=kl+Gl+zl,Yl="\\ufe0e\\ufe0f",Jl="["+wi+"]",tr="["+Hl+"]",rr="\\ud83c[\\udffb-\\udfff]",Kl="(?:"+tr+"|"+rr+")",_i="[^"+wi+"]",Oi="(?:\\ud83c[\\udde6-\\uddff]){2}",Pi="[\\ud800-\\udbff][\\udc00-\\udfff]",Zl="\\u200d",Ti=Kl+"?",Ii="["+Yl+"]?",Xl="(?:"+Zl+"(?:"+[_i,Oi,Pi].join("|")+")"+Ii+Ti+")*",Ql=Ii+Ti+Xl,ef="(?:"+[_i+tr+"?",tr,Oi,Pi,Jl].join("|")+")",tf=RegExp(rr+"(?="+rr+")|"+ef+Ql,"g");function rf(o){return o.match(tf)||[]}var Ei=rf;function nf(o){return Ft(o)?Ei(o):vi(o)}var ji=nf;function of(o){return function(t){t=_e(t);var e=Ft(t)?ji(t):void 0,r=e?e[0]:t.charAt(0),a=e?xi(e,1).join(""):t.slice(1);return r[o]()+a}}var Bi=of;var af=Bi("toUpperCase"),nt=af;function sf(o){return nt(_e(o).toLowerCase())}var Si=sf;s();c();u();s();c();u();function uf(o,t,e,r){var a=-1,y=o==null?0:o.length;for(r&&y&&(e=o[++a]);++a<y;)e=t(e,o[a],a,o);return e}var Ai=uf;s();c();u();s();c();u();s();c();u();function cf(o){return function(t){return o?.[t]}}var Ri=cf;var lf={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ff=Ri(lf),Mi=ff;var pf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,df="\\u0300-\\u036f",mf="\\ufe20-\\ufe2f",hf="\\u20d0-\\u20ff",yf=df+mf+hf,gf="["+yf+"]",bf=RegExp(gf,"g");function xf(o){return o=_e(o),o&&o.replace(pf,Mi).replace(bf,"")}var Fi=xf;s();c();u();s();c();u();var vf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wf(o){return o.match(vf)||[]}var Ni=wf;s();c();u();var _f=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Of(o){return _f.test(o)}var Li=Of;s();c();u();var $i="\\ud800-\\udfff",Pf="\\u0300-\\u036f",Tf="\\ufe20-\\ufe2f",If="\\u20d0-\\u20ff",Ef=Pf+Tf+If,Wi="\\u2700-\\u27bf",Vi="a-z\\xdf-\\xf6\\xf8-\\xff",jf="\\xac\\xb1\\xd7\\xf7",Bf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sf="\\u2000-\\u206f",Af=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ki="A-Z\\xc0-\\xd6\\xd8-\\xde",Rf="\\ufe0e\\ufe0f",Gi=jf+Bf+Sf+Af,zi="['\u2019]",Ci="["+Gi+"]",Mf="["+Ef+"]",Hi="\\d+",Ff="["+Wi+"]",Yi="["+Vi+"]",Ji="[^"+$i+Gi+Hi+Wi+Vi+ki+"]",Nf="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+Mf+"|"+Nf+")",Cf="[^"+$i+"]",Ki="(?:\\ud83c[\\udde6-\\uddff]){2}",Zi="[\\ud800-\\udbff][\\udc00-\\udfff]",it="["+ki+"]",qf="\\u200d",qi="(?:"+Yi+"|"+Ji+")",Uf="(?:"+it+"|"+Ji+")",Ui="(?:"+zi+"(?:d|ll|m|re|s|t|ve))?",Di="(?:"+zi+"(?:D|LL|M|RE|S|T|VE))?",Xi=Lf+"?",Qi="["+Rf+"]?",Df="(?:"+qf+"(?:"+[Cf,Ki,Zi].join("|")+")"+Qi+Xi+")*",$f="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vf=Qi+Xi+Df,kf="(?:"+[Ff,Ki,Zi].join("|")+")"+Vf,Gf=RegExp([it+"?"+Yi+"+"+Ui+"(?="+[Ci,it,"$"].join("|")+")",Uf+"+"+Di+"(?="+[Ci,it+qi,"$"].join("|")+")",it+"?"+qi+"+"+Ui,it+"+"+Di,Wf,$f,Hi,kf].join("|"),"g");function zf(o){return o.match(Gf)||[]}var eo=zf;function Hf(o,t,e){return o=_e(o),t=e?void 0:t,t===void 0?Li(o)?eo(o):Ni(o):o.match(t)||[]}var to=Hf;var Yf="['\u2019]",Jf=RegExp(Yf,"g");function Kf(o){return function(t){return Ai(to(Fi(t).replace(Jf,"")),o,"")}}var ro=Kf;var Zf=ro(function(o,t,e){return t=t.toLowerCase(),o+(e?Si(t):t)}),Nt=Zf;s();c();u();function yt(o){return Object.keys(o)}s();c();u();s();c();u();s();c();u();var gt=d.env.FERN_STACK_TRACK?.toLowerCase()??"",de=gt!==""&&gt!=="0"&&gt!=="false",nr=["single","multiline","box"].includes(gt)?gt:"single";de&&(Error.stackTraceLimit=50);var Xf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Qf=new Set(["stacktrace"]);function Ct({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,formatFilename:O=P=>P}={}){if(!de)return[];r=[...r,...Xf],e=[...e,...Qf],a=[...a,"runInteractiveTask"];let P=!1;return(new Error().stack??"").split(`
2
- `).map(M=>{let j=M.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(j&&j.length===5){let[,C,X,T,E]=j;if(!C||!X||!T||!E)return;if(P||a.some(F=>C?.includes(F))){P=!0;return}switch(C){case"Object.<anonymous>":C="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":C=`${C.substring(C.indexOf(".")+1)}()=> { ... }`;break}return{fn:C,path:O(X),position:`${T}:${E}`}}}).filter(M=>M&&!r.some(j=>M.fn.includes(j))&&!(y&&M.path?.startsWith("node:"))&&!(p&&M.path?.endsWith(".js"))&&!e.some(j=>M.path.includes(j))).slice(t,t+o)}var Lt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:a=[],stopOn:y=[],filterNode:p=!0,filterJs:O=!0,multiline:P=!1,formatFilename:M=j=>j}={}){w(this,"maxFrames");w(this,"skip");w(this,"filterPaths");w(this,"filterFunctions");w(this,"stopOn");w(this,"filterNode");w(this,"filterJs");w(this,"multiline");w(this,"formatFilename");w(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=a,this.stopOn=y,this.filterNode=p,this.filterJs=O,this.multiline=P,this.formatFilename=M}tag(t){let e=this.tracking.get(t)||new Set;Ct({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!de)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
1
+ var tl=Object.create;var Bt=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var nl=Object.getOwnPropertyNames;var il=Object.getPrototypeOf,ol=Object.prototype.hasOwnProperty;var al=(o,t,e)=>t in o?Bt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var tt=(o,t)=>()=>(o&&(t=o(o=0)),t);var b=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Rr=(o,t)=>{for(var e in t)Bt(o,e,{get:t[e],enumerable:!0})},sl=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of nl(t))!ol.call(o,a)&&a!==e&&Bt(o,a,{get:()=>t[a],enumerable:!(r=rl(t,a))||r.enumerable});return o};var ul=(o,t,e)=>(e=o!=null?tl(il(o)):{},sl(t||!o||!o.__esModule?Bt(e,"default",{value:o,enumerable:!0}):e,o));var w=(o,t,e)=>al(o,typeof t!="symbol"?t+"":t,e);var s=tt(()=>{"use strict"});var d={};Rr(d,{_debugEnd:()=>_n,_debugProcess:()=>wn,_events:()=>qn,_eventsCount:()=>Un,_exiting:()=>tn,_fatalExceptions:()=>gn,_getActiveHandles:()=>an,_getActiveRequests:()=>on,_kill:()=>un,_linkedBinding:()=>Qr,_maxListeners:()=>Cn,_preload_modules:()=>Fn,_rawDebug:()=>Zr,_startProfilerIdleNotifier:()=>On,_stopProfilerIdleNotifier:()=>Pn,_tickCallback:()=>vn,abort:()=>jn,addListener:()=>Dn,allowedNodeEnvironmentFlags:()=>mn,arch:()=>Cr,argv:()=>Dr,argv0:()=>Mn,assert:()=>hn,binding:()=>Gr,browser:()=>Kr,chdir:()=>Yr,config:()=>rn,cpuUsage:()=>Rt,cwd:()=>Hr,debugPort:()=>Rn,default:()=>Jn,dlopen:()=>nn,domain:()=>en,emit:()=>Gn,emitWarning:()=>kr,env:()=>Ur,execArgv:()=>$r,execPath:()=>An,exit:()=>pn,features:()=>yn,hasUncaughtExceptionCaptureCallback:()=>xn,hrtime:()=>At,kill:()=>fn,listeners:()=>Yn,memoryUsage:()=>ln,moduleLoadList:()=>Xr,nextTick:()=>Fr,off:()=>Wn,on:()=>ge,once:()=>$n,openStdin:()=>dn,pid:()=>Bn,platform:()=>qr,ppid:()=>Sn,prependListener:()=>zn,prependOnceListener:()=>Hn,reallyExit:()=>sn,release:()=>Jr,removeAllListeners:()=>kn,removeListener:()=>Vn,resourceUsage:()=>cn,setSourceMapsEnabled:()=>Nn,setUncaughtExceptionCaptureCallback:()=>bn,stderr:()=>Tn,stdin:()=>En,stdout:()=>In,title:()=>Lr,umask:()=>zr,uptime:()=>Ln,version:()=>Wr,versions:()=>Vr});function er(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function cl(){!rt||!Te||(rt=!1,Te.length?ye=Te.concat(ye):St=-1,ye.length&&Mr())}function Mr(){if(!rt){var o=setTimeout(cl,0);rt=!0;for(var t=ye.length;t;){for(Te=ye,ye=[];++St<t;)Te&&Te[St].run();St=-1,t=ye.length}Te=null,rt=!1,clearTimeout(o)}}function Fr(o){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ye.push(new Nr(o,t)),ye.length===1&&!rt&&setTimeout(Mr,0)}function Nr(o,t){this.fun=o,this.array=t}function J(){}function Qr(o){er("_linkedBinding")}function nn(o){er("dlopen")}function on(){return[]}function an(){return[]}function hn(o,t){if(!o)throw new Error(t||"assertion error")}function xn(){return!1}function Ln(){return we.now()/1e3}function At(o){var t=Math.floor((Date.now()-we.now())*.001),e=we.now()*.001,r=Math.floor(e)+t,a=Math.floor(e%1*1e9);return o&&(r=r-o[0],a=a-o[1],a<0&&(r--,a+=Qt)),[r,a]}function ge(){return Jn}function Yn(o){return[]}var ye,rt,Te,St,Lr,Cr,qr,Ur,Dr,$r,Wr,Vr,kr,Gr,zr,Hr,Yr,Jr,Kr,Zr,Xr,en,tn,rn,sn,un,Rt,cn,ln,fn,pn,dn,mn,yn,gn,bn,vn,wn,_n,On,Pn,In,Tn,En,jn,Bn,Sn,An,Rn,Mn,Fn,Nn,we,Xt,Qt,Cn,qn,Un,Dn,$n,Wn,Vn,kn,Gn,zn,Hn,Jn,Kn=tt(()=>{"use strict";s();c();u();ye=[],rt=!1,St=-1;Nr.prototype.run=function(){this.fun.apply(null,this.array)};Lr="browser",Cr="x64",qr="browser",Ur={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Dr=["/usr/bin/node"],$r=[],Wr="v16.8.0",Vr={},kr=function(o,t){console.warn((t?t+": ":"")+o)},Gr=function(o){er("binding")},zr=function(o){return 0},Hr=function(){return"/"},Yr=function(o){},Jr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Kr=!0,Zr=J,Xr=[];en={},tn=!1,rn={};sn=J,un=J,Rt=function(){return{}},cn=Rt,ln=Rt,fn=J,pn=J,dn=J,mn={};yn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},gn=J,bn=J;vn=J,wn=J,_n=J,On=J,Pn=J,In=void 0,Tn=void 0,En=void 0,jn=J,Bn=2,Sn=1,An="/bin/usr/node",Rn=9229,Mn="node",Fn=[],Nn=J,we={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};we.now===void 0&&(Xt=Date.now(),we.timing&&we.timing.navigationStart&&(Xt=we.timing.navigationStart),we.now=()=>Date.now()-Xt);Qt=1e9;At.bigint=function(o){var t=At(o);return typeof BigInt>"u"?t[0]*Qt+t[1]:BigInt(t[0]*Qt)+BigInt(t[1])};Cn=10,qn={},Un=0;Dn=ge,$n=ge,Wn=ge,Vn=ge,kn=ge,Gn=J,zn=ge,Hn=ge;Jn={version:Wr,versions:Vr,arch:Cr,platform:qr,browser:Kr,release:Jr,_rawDebug:Zr,moduleLoadList:Xr,binding:Gr,_linkedBinding:Qr,_events:qn,_eventsCount:Un,_maxListeners:Cn,on:ge,addListener:Dn,once:$n,off:Wn,removeListener:Vn,removeAllListeners:kn,emit:Gn,prependListener:zn,prependOnceListener:Hn,listeners:Yn,domain:en,_exiting:tn,config:rn,dlopen:nn,uptime:Ln,_getActiveRequests:on,_getActiveHandles:an,reallyExit:sn,_kill:un,cpuUsage:Rt,resourceUsage:cn,memoryUsage:ln,kill:fn,exit:pn,openStdin:dn,allowedNodeEnvironmentFlags:mn,assert:hn,features:yn,_fatalExceptions:gn,setUncaughtExceptionCaptureCallback:bn,hasUncaughtExceptionCaptureCallback:xn,emitWarning:kr,nextTick:Fr,_tickCallback:vn,_debugProcess:wn,_debugEnd:_n,_startProfilerIdleNotifier:On,_stopProfilerIdleNotifier:Pn,stdout:In,stdin:En,stderr:Tn,abort:jn,umask:zr,chdir:Yr,cwd:Hr,env:Ur,title:Lr,argv:Dr,execArgv:$r,pid:Bn,ppid:Sn,execPath:An,debugPort:Rn,hrtime:At,argv0:Mn,_preload_modules:Fn,setSourceMapsEnabled:Nn}});var u=tt(()=>{"use strict";Kn()});function ll(){if(Zn)return mt;Zn=!0,mt.byteLength=O,mt.toByteArray=M,mt.fromByteArray=X;for(var o=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,y=r.length;a<y;++a)o[a]=r[a],t[r.charCodeAt(a)]=a;t[45]=62,t[95]=63;function p(I){var E=I.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=I.indexOf("=");F===-1&&(F=E);var G=F===E?0:4-F%4;return[F,G]}function O(I){var E=p(I),F=E[0],G=E[1];return(F+G)*3/4-G}function P(I,E,F){return(E+F)*3/4-F}function M(I){var E,F=p(I),G=F[0],ee=F[1],V=new e(P(I,G,ee)),te=0,ie=ee>0?G-4:G,Q;for(Q=0;Q<ie;Q+=4)E=t[I.charCodeAt(Q)]<<18|t[I.charCodeAt(Q+1)]<<12|t[I.charCodeAt(Q+2)]<<6|t[I.charCodeAt(Q+3)],V[te++]=E>>16&255,V[te++]=E>>8&255,V[te++]=E&255;return ee===2&&(E=t[I.charCodeAt(Q)]<<2|t[I.charCodeAt(Q+1)]>>4,V[te++]=E&255),ee===1&&(E=t[I.charCodeAt(Q)]<<10|t[I.charCodeAt(Q+1)]<<4|t[I.charCodeAt(Q+2)]>>2,V[te++]=E>>8&255,V[te++]=E&255),V}function j(I){return o[I>>18&63]+o[I>>12&63]+o[I>>6&63]+o[I&63]}function C(I,E,F){for(var G,ee=[],V=E;V<F;V+=3)G=(I[V]<<16&16711680)+(I[V+1]<<8&65280)+(I[V+2]&255),ee.push(j(G));return ee.join("")}function X(I){for(var E,F=I.length,G=F%3,ee=[],V=16383,te=0,ie=F-G;te<ie;te+=V)ee.push(C(I,te,te+V>ie?ie:te+V));return G===1?(E=I[F-1],ee.push(o[E>>2]+o[E<<4&63]+"==")):G===2&&(E=(I[F-2]<<8)+I[F-1],ee.push(o[E>>10]+o[E>>4&63]+o[E<<2&63]+"=")),ee.join("")}return mt}function fl(){if(Xn)return Mt;Xn=!0;return Mt.read=function(o,t,e,r,a){var y,p,O=a*8-r-1,P=(1<<O)-1,M=P>>1,j=-7,C=e?a-1:0,X=e?-1:1,I=o[t+C];for(C+=X,y=I&(1<<-j)-1,I>>=-j,j+=O;j>0;y=y*256+o[t+C],C+=X,j-=8);for(p=y&(1<<-j)-1,y>>=-j,j+=r;j>0;p=p*256+o[t+C],C+=X,j-=8);if(y===0)y=1-M;else{if(y===P)return p?NaN:(I?-1:1)*(1/0);p=p+Math.pow(2,r),y=y-M}return(I?-1:1)*p*Math.pow(2,y-r)},Mt.write=function(o,t,e,r,a,y){var p,O,P,M=y*8-a-1,j=(1<<M)-1,C=j>>1,X=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:y-1,E=r?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(O=isNaN(t)?1:0,p=j):(p=Math.floor(Math.log(t)/Math.LN2),t*(P=Math.pow(2,-p))<1&&(p--,P*=2),p+C>=1?t+=X/P:t+=X*Math.pow(2,1-C),t*P>=2&&(p++,P/=2),p+C>=j?(O=0,p=j):p+C>=1?(O=(t*P-1)*Math.pow(2,a),p=p+C):(O=t*Math.pow(2,C-1)*Math.pow(2,a),p=0));a>=8;o[e+I]=O&255,I+=E,O/=256,a-=8);for(p=p<<a|O,M+=a;M>0;o[e+I]=p&255,I+=E,p/=256,M-=8);o[e+I-E]|=F*128},Mt}function ei(){if(Qn)return Ee;Qn=!0;let o=ll(),t=fl(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ee.Buffer=p,Ee.SlowBuffer=ee,Ee.INSPECT_MAX_BYTES=50;let r=2147483647;Ee.kMaxLength=r,p.TYPED_ARRAY_SUPPORT=a(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let l=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(l,n),l.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function y(l){if(l>r)throw new RangeError('The value "'+l+'" is invalid for option "size"');let n=new Uint8Array(l);return Object.setPrototypeOf(n,p.prototype),n}function p(l,n,i){if(typeof l=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(l)}return O(l,n,i)}p.poolSize=8192;function O(l,n,i){if(typeof l=="string")return C(l,n);if(ArrayBuffer.isView(l))return I(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(pe(l,ArrayBuffer)||l&&pe(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(l,SharedArrayBuffer)||l&&pe(l.buffer,SharedArrayBuffer)))return E(l,n,i);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let f=l.valueOf&&l.valueOf();if(f!=null&&f!==l)return p.from(f,n,i);let g=F(l);if(g)return g;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return p.from(l[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}p.from=function(l,n,i){return O(l,n,i)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function P(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function M(l,n,i){return P(l),l<=0?y(l):n!==void 0?typeof i=="string"?y(l).fill(n,i):y(l).fill(n):y(l)}p.alloc=function(l,n,i){return M(l,n,i)};function j(l){return P(l),y(l<0?0:G(l)|0)}p.allocUnsafe=function(l){return j(l)},p.allocUnsafeSlow=function(l){return j(l)};function C(l,n){if((typeof n!="string"||n==="")&&(n="utf8"),!p.isEncoding(n))throw new TypeError("Unknown encoding: "+n);let i=V(l,n)|0,f=y(i),g=f.write(l,n);return g!==i&&(f=f.slice(0,g)),f}function X(l){let n=l.length<0?0:G(l.length)|0,i=y(n);for(let f=0;f<n;f+=1)i[f]=l[f]&255;return i}function I(l){if(pe(l,Uint8Array)){let n=new Uint8Array(l);return E(n.buffer,n.byteOffset,n.byteLength)}return X(l)}function E(l,n,i){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');let f;return n===void 0&&i===void 0?f=new Uint8Array(l):i===void 0?f=new Uint8Array(l,n):f=new Uint8Array(l,n,i),Object.setPrototypeOf(f,p.prototype),f}function F(l){if(p.isBuffer(l)){let n=G(l.length)|0,i=y(n);return i.length===0||l.copy(i,0,0,n),i}if(l.length!==void 0)return typeof l.length!="number"||Zt(l.length)?y(0):X(l);if(l.type==="Buffer"&&Array.isArray(l.data))return X(l.data)}function G(l){if(l>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return l|0}function ee(l){return+l!=l&&(l=0),p.alloc(+l)}p.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==p.prototype},p.compare=function(n,i){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),pe(i,Uint8Array)&&(i=p.from(i,i.offset,i.byteLength)),!p.isBuffer(n)||!p.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;let f=n.length,g=i.length;for(let x=0,v=Math.min(f,g);x<v;++x)if(n[x]!==i[x]){f=n[x],g=i[x];break}return f<g?-1:g<f?1:0},p.isEncoding=function(n){switch(String(n).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}},p.concat=function(n,i){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return p.alloc(0);let f;if(i===void 0)for(i=0,f=0;f<n.length;++f)i+=n[f].length;let g=p.allocUnsafe(i),x=0;for(f=0;f<n.length;++f){let v=n[f];if(pe(v,Uint8Array))x+v.length>g.length?(p.isBuffer(v)||(v=p.from(v)),v.copy(g,x)):Uint8Array.prototype.set.call(g,v,x);else if(p.isBuffer(v))v.copy(g,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=v.length}return g};function V(l,n){if(p.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||pe(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);let i=l.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&i===0)return 0;let g=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Kt(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Ar(l).length;default:if(g)return f?-1:Kt(l).length;n=(""+n).toLowerCase(),g=!0}}p.byteLength=V;function te(l,n,i){let f=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,n>>>=0,i<=n))return"";for(l||(l="utf8");;)switch(l){case"hex":return zc(this,n,i);case"utf8":case"utf-8":return _r(this,n,i);case"ascii":return kc(this,n,i);case"latin1":case"binary":return Gc(this,n,i);case"base64":return Wc(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Hc(this,n,i);default:if(f)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),f=!0}}p.prototype._isBuffer=!0;function ie(l,n,i){let f=l[n];l[n]=l[i],l[i]=f}p.prototype.swap16=function(){let n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<n;i+=2)ie(this,i,i+1);return this},p.prototype.swap32=function(){let n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<n;i+=4)ie(this,i,i+3),ie(this,i+1,i+2);return this},p.prototype.swap64=function(){let n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<n;i+=8)ie(this,i,i+7),ie(this,i+1,i+6),ie(this,i+2,i+5),ie(this,i+3,i+4);return this},p.prototype.toString=function(){let n=this.length;return n===0?"":arguments.length===0?_r(this,0,n):te.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(n){if(!p.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:p.compare(this,n)===0},p.prototype.inspect=function(){let n="",i=Ee.INSPECT_MAX_BYTES;return n=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(n+=" ... "),"<Buffer "+n+">"},e&&(p.prototype[e]=p.prototype.inspect),p.prototype.compare=function(n,i,f,g,x){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),!p.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(i===void 0&&(i=0),f===void 0&&(f=n?n.length:0),g===void 0&&(g=0),x===void 0&&(x=this.length),i<0||f>n.length||g<0||x>this.length)throw new RangeError("out of range index");if(g>=x&&i>=f)return 0;if(g>=x)return-1;if(i>=f)return 1;if(i>>>=0,f>>>=0,g>>>=0,x>>>=0,this===n)return 0;let v=x-g,B=f-i,$=Math.min(v,B),D=this.slice(g,x),W=n.slice(i,f);for(let N=0;N<$;++N)if(D[N]!==W[N]){v=D[N],B=W[N];break}return v<B?-1:B<v?1:0};function Q(l,n,i,f,g){if(l.length===0)return-1;if(typeof i=="string"?(f=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,Zt(i)&&(i=g?0:l.length-1),i<0&&(i=l.length+i),i>=l.length){if(g)return-1;i=l.length-1}else if(i<0)if(g)i=0;else return-1;if(typeof n=="string"&&(n=p.from(n,f)),p.isBuffer(n))return n.length===0?-1:wr(l,n,i,f,g);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?g?Uint8Array.prototype.indexOf.call(l,n,i):Uint8Array.prototype.lastIndexOf.call(l,n,i):wr(l,[n],i,f,g);throw new TypeError("val must be string, number or Buffer")}function wr(l,n,i,f,g){let x=1,v=l.length,B=n.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(l.length<2||n.length<2)return-1;x=2,v/=2,B/=2,i/=2}function $(W,N){return x===1?W[N]:W.readUInt16BE(N*x)}let D;if(g){let W=-1;for(D=i;D<v;D++)if($(l,D)===$(n,W===-1?0:D-W)){if(W===-1&&(W=D),D-W+1===B)return W*x}else W!==-1&&(D-=D-W),W=-1}else for(i+B>v&&(i=v-B),D=i;D>=0;D--){let W=!0;for(let N=0;N<B;N++)if($(l,D+N)!==$(n,N)){W=!1;break}if(W)return D}return-1}p.prototype.includes=function(n,i,f){return this.indexOf(n,i,f)!==-1},p.prototype.indexOf=function(n,i,f){return Q(this,n,i,f,!0)},p.prototype.lastIndexOf=function(n,i,f){return Q(this,n,i,f,!1)};function Cc(l,n,i,f){i=Number(i)||0;let g=l.length-i;f?(f=Number(f),f>g&&(f=g)):f=g;let x=n.length;f>x/2&&(f=x/2);let v;for(v=0;v<f;++v){let B=parseInt(n.substr(v*2,2),16);if(Zt(B))return v;l[i+v]=B}return v}function qc(l,n,i,f){return jt(Kt(n,l.length-i),l,i,f)}function Uc(l,n,i,f){return jt(Zc(n),l,i,f)}function Dc(l,n,i,f){return jt(Ar(n),l,i,f)}function $c(l,n,i,f){return jt(Xc(n,l.length-i),l,i,f)}p.prototype.write=function(n,i,f,g){if(i===void 0)g="utf8",f=this.length,i=0;else if(f===void 0&&typeof i=="string")g=i,f=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(f)?(f=f>>>0,g===void 0&&(g="utf8")):(g=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let x=this.length-i;if((f===void 0||f>x)&&(f=x),n.length>0&&(f<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let v=!1;for(;;)switch(g){case"hex":return Cc(this,n,i,f);case"utf8":case"utf-8":return qc(this,n,i,f);case"ascii":case"latin1":case"binary":return Uc(this,n,i,f);case"base64":return Dc(this,n,i,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $c(this,n,i,f);default:if(v)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),v=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Wc(l,n,i){return n===0&&i===l.length?o.fromByteArray(l):o.fromByteArray(l.slice(n,i))}function _r(l,n,i){i=Math.min(l.length,i);let f=[],g=n;for(;g<i;){let x=l[g],v=null,B=x>239?4:x>223?3:x>191?2:1;if(g+B<=i){let $,D,W,N;switch(B){case 1:x<128&&(v=x);break;case 2:$=l[g+1],($&192)===128&&(N=(x&31)<<6|$&63,N>127&&(v=N));break;case 3:$=l[g+1],D=l[g+2],($&192)===128&&(D&192)===128&&(N=(x&15)<<12|($&63)<<6|D&63,N>2047&&(N<55296||N>57343)&&(v=N));break;case 4:$=l[g+1],D=l[g+2],W=l[g+3],($&192)===128&&(D&192)===128&&(W&192)===128&&(N=(x&15)<<18|($&63)<<12|(D&63)<<6|W&63,N>65535&&N<1114112&&(v=N))}}v===null?(v=65533,B=1):v>65535&&(v-=65536,f.push(v>>>10&1023|55296),v=56320|v&1023),f.push(v),g+=B}return Vc(f)}let Or=4096;function Vc(l){let n=l.length;if(n<=Or)return String.fromCharCode.apply(String,l);let i="",f=0;for(;f<n;)i+=String.fromCharCode.apply(String,l.slice(f,f+=Or));return i}function kc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]&127);return f}function Gc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]);return f}function zc(l,n,i){let f=l.length;(!n||n<0)&&(n=0),(!i||i<0||i>f)&&(i=f);let g="";for(let x=n;x<i;++x)g+=Qc[l[x]];return g}function Hc(l,n,i){let f=l.slice(n,i),g="";for(let x=0;x<f.length-1;x+=2)g+=String.fromCharCode(f[x]+f[x+1]*256);return g}p.prototype.slice=function(n,i){let f=this.length;n=~~n,i=i===void 0?f:~~i,n<0?(n+=f,n<0&&(n=0)):n>f&&(n=f),i<0?(i+=f,i<0&&(i=0)):i>f&&(i=f),i<n&&(i=n);let g=this.subarray(n,i);return Object.setPrototypeOf(g,p.prototype),g};function H(l,n,i){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+n>i)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return g},p.prototype.readUintBE=p.prototype.readUIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n+--i],x=1;for(;i>0&&(x*=256);)g+=this[n+--i]*x;return g},p.prototype.readUint8=p.prototype.readUInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]|this[n+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]<<8|this[n+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},p.prototype.readBigUInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,x=this[++n]+this[++n]*2**8+this[++n]*2**16+f*2**24;return BigInt(g)+(BigInt(x)<<BigInt(32))}),p.prototype.readBigUInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],x=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f;return(BigInt(g)<<BigInt(32))+BigInt(x)}),p.prototype.readIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return x*=128,g>=x&&(g-=Math.pow(2,8*i)),g},p.prototype.readIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=i,x=1,v=this[n+--g];for(;g>0&&(x*=256);)v+=this[n+--g]*x;return x*=128,v>=x&&(v-=Math.pow(2,8*i)),v},p.prototype.readInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},p.prototype.readInt16LE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n]|this[n+1]<<8;return f&32768?f|4294901760:f},p.prototype.readInt16BE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n+1]|this[n]<<8;return f&32768?f|4294901760:f},p.prototype.readInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},p.prototype.readInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},p.prototype.readBigInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(f<<24);return(BigInt(g)<<BigInt(32))+BigInt(i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),p.prototype.readBigInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=(i<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(g)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f)}),p.prototype.readFloatLE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!0,23,4)},p.prototype.readFloatBE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!1,23,4)},p.prototype.readDoubleLE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!0,52,8)},p.prototype.readDoubleBE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!1,52,8)};function re(l,n,i,f,g,x){if(!p.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>g||n<x)throw new RangeError('"value" argument is out of bounds');if(i+f>l.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=1,v=0;for(this[i]=n&255;++v<f&&(x*=256);)this[i+v]=n/x&255;return i+f},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=f-1,v=1;for(this[i+x]=n&255;--x>=0&&(v*=256);)this[i+x]=n/v&255;return i+f},p.prototype.writeUint8=p.prototype.writeUInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,255,0),this[i]=n&255,i+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i+3]=n>>>24,this[i+2]=n>>>16,this[i+1]=n>>>8,this[i]=n&255,i+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4};function Pr(l,n,i,f,g){Sr(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,i}function Ir(l,n,i,f,g){Sr(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i+7]=x,x=x>>8,l[i+6]=x,x=x>>8,l[i+5]=x,x=x>>8,l[i+4]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i+3]=v,v=v>>8,l[i+2]=v,v=v>>8,l[i+1]=v,v=v>>8,l[i]=v,i+8}p.prototype.writeBigUInt64LE=ve(function(n,i=0){return Pr(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ve(function(n,i=0){return Ir(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=0,v=1,B=0;for(this[i]=n&255;++x<f&&(v*=256);)n<0&&B===0&&this[i+x-1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=f-1,v=1,B=0;for(this[i+x]=n&255;--x>=0&&(v*=256);)n<0&&B===0&&this[i+x+1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,127,-128),n<0&&(n=255+n+1),this[i]=n&255,i+1},p.prototype.writeInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),this[i]=n&255,this[i+1]=n>>>8,this[i+2]=n>>>16,this[i+3]=n>>>24,i+4},p.prototype.writeInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4},p.prototype.writeBigInt64LE=ve(function(n,i=0){return Pr(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ve(function(n,i=0){return Ir(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Tr(l,n,i,f,g,x){if(i+f>l.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Er(l,n,i,f,g){return n=+n,i=i>>>0,g||Tr(l,n,i,4),t.write(l,n,i,f,23,4),i+4}p.prototype.writeFloatLE=function(n,i,f){return Er(this,n,i,!0,f)},p.prototype.writeFloatBE=function(n,i,f){return Er(this,n,i,!1,f)};function jr(l,n,i,f,g){return n=+n,i=i>>>0,g||Tr(l,n,i,8),t.write(l,n,i,f,52,8),i+8}p.prototype.writeDoubleLE=function(n,i,f){return jr(this,n,i,!0,f)},p.prototype.writeDoubleBE=function(n,i,f){return jr(this,n,i,!1,f)},p.prototype.copy=function(n,i,f,g){if(!p.isBuffer(n))throw new TypeError("argument should be a Buffer");if(f||(f=0),!g&&g!==0&&(g=this.length),i>=n.length&&(i=n.length),i||(i=0),g>0&&g<f&&(g=f),g===f||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),n.length-i<g-f&&(g=n.length-i+f);let x=g-f;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,f,g):Uint8Array.prototype.set.call(n,this.subarray(f,g),i),x},p.prototype.fill=function(n,i,f,g){if(typeof n=="string"){if(typeof i=="string"?(g=i,i=0,f=this.length):typeof f=="string"&&(g=f,f=this.length),g!==void 0&&typeof g!="string")throw new TypeError("encoding must be a string");if(typeof g=="string"&&!p.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(n.length===1){let v=n.charCodeAt(0);(g==="utf8"&&v<128||g==="latin1")&&(n=v)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(i<0||this.length<i||this.length<f)throw new RangeError("Out of range index");if(f<=i)return this;i=i>>>0,f=f===void 0?this.length:f>>>0,n||(n=0);let x;if(typeof n=="number")for(x=i;x<f;++x)this[x]=n;else{let v=p.isBuffer(n)?n:p.from(n,g),B=v.length;if(B===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(x=0;x<f-i;++x)this[x+i]=v[x%B]}return this};let Qe={};function Jt(l,n,i){Qe[l]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}Jt("ERR_BUFFER_OUT_OF_BOUNDS",function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Jt("ERR_INVALID_ARG_TYPE",function(l,n){return`The "${l}" argument must be of type number. Received type ${typeof n}`},TypeError),Jt("ERR_OUT_OF_RANGE",function(l,n,i){let f=`The value of "${l}" is out of range.`,g=i;return Number.isInteger(i)&&Math.abs(i)>2**32?g=Br(String(i)):typeof i=="bigint"&&(g=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(g=Br(g)),g+="n"),f+=` It must be ${n}. Received ${g}`,f},RangeError);function Br(l){let n="",i=l.length,f=l[0]==="-"?1:0;for(;i>=f+4;i-=3)n=`_${l.slice(i-3,i)}${n}`;return`${l.slice(0,i)}${n}`}function Yc(l,n,i){et(n,"offset"),(l[n]===void 0||l[n+i]===void 0)&&dt(n,l.length-(i+1))}function Sr(l,n,i,f,g,x){if(l>i||l<n){let v=typeof n=="bigint"?"n":"",B;throw n===0||n===BigInt(0)?B=`>= 0${v} and < 2${v} ** ${(x+1)*8}${v}`:B=`>= -(2${v} ** ${(x+1)*8-1}${v}) and < 2 ** ${(x+1)*8-1}${v}`,new Qe.ERR_OUT_OF_RANGE("value",B,l)}Yc(f,g,x)}function et(l,n){if(typeof l!="number")throw new Qe.ERR_INVALID_ARG_TYPE(n,"number",l)}function dt(l,n,i){throw Math.floor(l)!==l?(et(l,i),new Qe.ERR_OUT_OF_RANGE("offset","an integer",l)):n<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,l)}let Jc=/[^+/0-9A-Za-z-_]/g;function Kc(l){if(l=l.split("=")[0],l=l.trim().replace(Jc,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function Kt(l,n){n=n||1/0;let i,f=l.length,g=null,x=[];for(let v=0;v<f;++v){if(i=l.charCodeAt(v),i>55295&&i<57344){if(!g){if(i>56319){(n-=3)>-1&&x.push(239,191,189);continue}else if(v+1===f){(n-=3)>-1&&x.push(239,191,189);continue}g=i;continue}if(i<56320){(n-=3)>-1&&x.push(239,191,189),g=i;continue}i=(g-55296<<10|i-56320)+65536}else g&&(n-=3)>-1&&x.push(239,191,189);if(g=null,i<128){if((n-=1)<0)break;x.push(i)}else if(i<2048){if((n-=2)<0)break;x.push(i>>6|192,i&63|128)}else if(i<65536){if((n-=3)<0)break;x.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((n-=4)<0)break;x.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return x}function Zc(l){let n=[];for(let i=0;i<l.length;++i)n.push(l.charCodeAt(i)&255);return n}function Xc(l,n){let i,f,g,x=[];for(let v=0;v<l.length&&!((n-=2)<0);++v)i=l.charCodeAt(v),f=i>>8,g=i%256,x.push(g),x.push(f);return x}function Ar(l){return o.toByteArray(Kc(l))}function jt(l,n,i,f){let g;for(g=0;g<f&&!(g+i>=n.length||g>=l.length);++g)n[g+i]=l[g];return g}function pe(l,n){return l instanceof n||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===n.name}function Zt(l){return l!==l}let Qc=(function(){let l="0123456789abcdef",n=new Array(256);for(let i=0;i<16;++i){let f=i*16;for(let g=0;g<16;++g)n[f+g]=l[i]+l[g]}return n})();function ve(l){return typeof BigInt>"u"?el:l}function el(){throw new Error("BigInt not supported")}return Ee}var mt,Zn,Mt,Xn,Ee,Qn,ti=tt(()=>{"use strict";s();c();u();mt={},Zn=!1;Mt={},Xn=!1;Ee={},Qn=!1});var je,m,Pd,Id,ri=tt(()=>{"use strict";s();c();u();ti();je=ei();je.Buffer;je.SlowBuffer;je.INSPECT_MAX_BYTES;je.kMaxLength;m=je.Buffer,Pd=je.INSPECT_MAX_BYTES,Id=je.kMaxLength});var c=tt(()=>{"use strict";ri()});var so=b(ao=>{"use strict";s();c();u();Object.defineProperty(ao,"__esModule",{value:!0})});var co=b(uo=>{"use strict";s();c();u();Object.defineProperty(uo,"__esModule",{value:!0})});var fo=b(lo=>{"use strict";s();c();u();Object.defineProperty(lo,"__esModule",{value:!0})});var mo=b(po=>{"use strict";s();c();u();Object.defineProperty(po,"__esModule",{value:!0})});var yo=b(ho=>{"use strict";s();c();u();Object.defineProperty(ho,"__esModule",{value:!0})});var bo=b(go=>{"use strict";s();c();u();Object.defineProperty(go,"__esModule",{value:!0})});var vo=b(xo=>{"use strict";s();c();u();Object.defineProperty(xo,"__esModule",{value:!0})});var sr=b(oe=>{"use strict";s();c();u();var mp=oe&&oe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Me=oe&&oe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&mp(t,o,e)};Object.defineProperty(oe,"__esModule",{value:!0});Me(so(),oe);Me(co(),oe);Me(fo(),oe);Me(mo(),oe);Me(yo(),oe);Me(bo(),oe);Me(vo(),oe)});var wo=b(Fe=>{"use strict";s();c();u();var hp=Fe&&Fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),yp=Fe&&Fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&hp(t,o,e)};Object.defineProperty(Fe,"__esModule",{value:!0});yp(sr(),Fe)});var Oo=b(_o=>{"use strict";s();c();u();Object.defineProperty(_o,"__esModule",{value:!0})});var Io=b(Po=>{"use strict";s();c();u();Object.defineProperty(Po,"__esModule",{value:!0})});var Eo=b(To=>{"use strict";s();c();u();Object.defineProperty(To,"__esModule",{value:!0})});var Bo=b(jo=>{"use strict";s();c();u();Object.defineProperty(jo,"__esModule",{value:!0})});var Ao=b(So=>{"use strict";s();c();u();Object.defineProperty(So,"__esModule",{value:!0})});var Mo=b(Ro=>{"use strict";s();c();u();Object.defineProperty(Ro,"__esModule",{value:!0})});var No=b(Fo=>{"use strict";s();c();u();Object.defineProperty(Fo,"__esModule",{value:!0})});var Co=b(Lo=>{"use strict";s();c();u();Object.defineProperty(Lo,"__esModule",{value:!0})});var Uo=b(qo=>{"use strict";s();c();u();Object.defineProperty(qo,"__esModule",{value:!0})});var $o=b(Do=>{"use strict";s();c();u();Object.defineProperty(Do,"__esModule",{value:!0})});var Vo=b(Wo=>{"use strict";s();c();u();Object.defineProperty(Wo,"__esModule",{value:!0})});var Go=b(ko=>{"use strict";s();c();u();Object.defineProperty(ko,"__esModule",{value:!0})});var ur=b(Y=>{"use strict";s();c();u();var gp=Y&&Y.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ue=Y&&Y.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&gp(t,o,e)};Object.defineProperty(Y,"__esModule",{value:!0});ue(Oo(),Y);ue(Io(),Y);ue(Eo(),Y);ue(Bo(),Y);ue(Ao(),Y);ue(Mo(),Y);ue(No(),Y);ue(Co(),Y);ue(Uo(),Y);ue($o(),Y);ue(Vo(),Y);ue(Go(),Y)});var zo=b(Ne=>{"use strict";s();c();u();var bp=Ne&&Ne.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),xp=Ne&&Ne.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&bp(t,o,e)};Object.defineProperty(Ne,"__esModule",{value:!0});xp(ur(),Ne)});var Yo=b(Ho=>{"use strict";s();c();u();Object.defineProperty(Ho,"__esModule",{value:!0})});var cr=b(Le=>{"use strict";s();c();u();var vp=Le&&Le.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),wp=Le&&Le.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&vp(t,o,e)};Object.defineProperty(Le,"__esModule",{value:!0});wp(Yo(),Le)});var Jo=b(Ce=>{"use strict";s();c();u();var _p=Ce&&Ce.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Op=Ce&&Ce.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&_p(t,o,e)};Object.defineProperty(Ce,"__esModule",{value:!0});Op(cr(),Ce)});var Zo=b(Ko=>{"use strict";s();c();u();Object.defineProperty(Ko,"__esModule",{value:!0})});var Qo=b(Xo=>{"use strict";s();c();u();Object.defineProperty(Xo,"__esModule",{value:!0})});var ta=b(ea=>{"use strict";s();c();u();Object.defineProperty(ea,"__esModule",{value:!0})});var na=b(ra=>{"use strict";s();c();u();Object.defineProperty(ra,"__esModule",{value:!0})});var oa=b(ia=>{"use strict";s();c();u();Object.defineProperty(ia,"__esModule",{value:!0})});var sa=b(aa=>{"use strict";s();c();u();Object.defineProperty(aa,"__esModule",{value:!0})});var ca=b(ua=>{"use strict";s();c();u();Object.defineProperty(ua,"__esModule",{value:!0})});var fa=b(la=>{"use strict";s();c();u();Object.defineProperty(la,"__esModule",{value:!0})});var da=b(pa=>{"use strict";s();c();u();Object.defineProperty(pa,"__esModule",{value:!0})});var ha=b(ma=>{"use strict";s();c();u();Object.defineProperty(ma,"__esModule",{value:!0})});var ga=b(ya=>{"use strict";s();c();u();Object.defineProperty(ya,"__esModule",{value:!0})});var xa=b(ba=>{"use strict";s();c();u();Object.defineProperty(ba,"__esModule",{value:!0})});var wa=b(va=>{"use strict";s();c();u();Object.defineProperty(va,"__esModule",{value:!0})});var lr=b(z=>{"use strict";s();c();u();var Pp=z&&z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ae=z&&z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Pp(t,o,e)};Object.defineProperty(z,"__esModule",{value:!0});ae(Zo(),z);ae(Qo(),z);ae(ta(),z);ae(na(),z);ae(oa(),z);ae(sa(),z);ae(ca(),z);ae(fa(),z);ae(da(),z);ae(ha(),z);ae(ga(),z);ae(xa(),z);ae(wa(),z)});var _a=b(qe=>{"use strict";s();c();u();var Ip=qe&&qe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Tp=qe&&qe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ip(t,o,e)};Object.defineProperty(qe,"__esModule",{value:!0});Tp(lr(),qe)});var Pa=b(Oa=>{"use strict";s();c();u();Object.defineProperty(Oa,"__esModule",{value:!0})});var Ta=b(Ia=>{"use strict";s();c();u();Object.defineProperty(Ia,"__esModule",{value:!0})});var fr=b(Pe=>{"use strict";s();c();u();var Ep=Pe&&Pe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ea=Pe&&Pe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ep(t,o,e)};Object.defineProperty(Pe,"__esModule",{value:!0});Ea(Pa(),Pe);Ea(Ta(),Pe)});var ja=b(Ue=>{"use strict";s();c();u();var jp=Ue&&Ue.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Bp=Ue&&Ue.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&jp(t,o,e)};Object.defineProperty(Ue,"__esModule",{value:!0});Bp(fr(),Ue)});var Sa=b(Ba=>{"use strict";s();c();u();Object.defineProperty(Ba,"__esModule",{value:!0})});var Ra=b(Aa=>{"use strict";s();c();u();Object.defineProperty(Aa,"__esModule",{value:!0})});var Fa=b(Ma=>{"use strict";s();c();u();Object.defineProperty(Ma,"__esModule",{value:!0})});var La=b(Na=>{"use strict";s();c();u();Object.defineProperty(Na,"__esModule",{value:!0})});var qa=b(Ca=>{"use strict";s();c();u();Object.defineProperty(Ca,"__esModule",{value:!0})});var Da=b(Ua=>{"use strict";s();c();u();Object.defineProperty(Ua,"__esModule",{value:!0})});var Wa=b($a=>{"use strict";s();c();u();Object.defineProperty($a,"__esModule",{value:!0})});var ka=b(Va=>{"use strict";s();c();u();Object.defineProperty(Va,"__esModule",{value:!0})});var za=b(Ga=>{"use strict";s();c();u();Object.defineProperty(Ga,"__esModule",{value:!0})});var Ya=b(Ha=>{"use strict";s();c();u();Object.defineProperty(Ha,"__esModule",{value:!0})});var pr=b(K=>{"use strict";s();c();u();var Sp=K&&K.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),me=K&&K.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Sp(t,o,e)};Object.defineProperty(K,"__esModule",{value:!0});me(Sa(),K);me(Ra(),K);me(Fa(),K);me(La(),K);me(qa(),K);me(Da(),K);me(Wa(),K);me(ka(),K);me(za(),K);me(Ya(),K)});var Ja=b(De=>{"use strict";s();c();u();var Ap=De&&De.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Rp=De&&De.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ap(t,o,e)};Object.defineProperty(De,"__esModule",{value:!0});Rp(pr(),De)});var Ka=b(Ut=>{"use strict";s();c();u();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ErrorSeverity=void 0;Ut.ErrorSeverity={Critical:"CRITICAL",Warning:"WARNING"}});var Xa=b(Za=>{"use strict";s();c();u();Object.defineProperty(Za,"__esModule",{value:!0})});var es=b(Qa=>{"use strict";s();c();u();Object.defineProperty(Qa,"__esModule",{value:!0})});var rs=b(ts=>{"use strict";s();c();u();Object.defineProperty(ts,"__esModule",{value:!0})});var is=b(ns=>{"use strict";s();c();u();Object.defineProperty(ns,"__esModule",{value:!0})});var dr=b(fe=>{"use strict";s();c();u();var Mp=fe&&fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Et=fe&&fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Mp(t,o,e)};Object.defineProperty(fe,"__esModule",{value:!0});Et(Ka(),fe);Et(Xa(),fe);Et(es(),fe);Et(rs(),fe);Et(is(),fe)});var os=b($e=>{"use strict";s();c();u();var Fp=$e&&$e.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Np=$e&&$e.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Fp(t,o,e)};Object.defineProperty($e,"__esModule",{value:!0});Np(dr(),$e)});var ss=b(as=>{"use strict";s();c();u();Object.defineProperty(as,"__esModule",{value:!0})});var cs=b(us=>{"use strict";s();c();u();Object.defineProperty(us,"__esModule",{value:!0})});var fs=b(ls=>{"use strict";s();c();u();Object.defineProperty(ls,"__esModule",{value:!0})});var ds=b(ps=>{"use strict";s();c();u();Object.defineProperty(ps,"__esModule",{value:!0})});var hs=b(ms=>{"use strict";s();c();u();Object.defineProperty(ms,"__esModule",{value:!0})});var gs=b(ys=>{"use strict";s();c();u();Object.defineProperty(ys,"__esModule",{value:!0})});var xs=b(bs=>{"use strict";s();c();u();Object.defineProperty(bs,"__esModule",{value:!0})});var ws=b(vs=>{"use strict";s();c();u();Object.defineProperty(vs,"__esModule",{value:!0})});var Os=b(_s=>{"use strict";s();c();u();Object.defineProperty(_s,"__esModule",{value:!0})});var Is=b(Ps=>{"use strict";s();c();u();Object.defineProperty(Ps,"__esModule",{value:!0})});var Es=b(Ts=>{"use strict";s();c();u();Object.defineProperty(Ts,"__esModule",{value:!0})});var Bs=b(js=>{"use strict";s();c();u();Object.defineProperty(js,"__esModule",{value:!0})});var As=b(Ss=>{"use strict";s();c();u();Object.defineProperty(Ss,"__esModule",{value:!0})});var Ms=b(Rs=>{"use strict";s();c();u();Object.defineProperty(Rs,"__esModule",{value:!0})});var mr=b(k=>{"use strict";s();c();u();var Lp=k&&k.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ne=k&&k.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Lp(t,o,e)};Object.defineProperty(k,"__esModule",{value:!0});ne(ss(),k);ne(cs(),k);ne(fs(),k);ne(ds(),k);ne(hs(),k);ne(gs(),k);ne(xs(),k);ne(ws(),k);ne(Os(),k);ne(Is(),k);ne(Es(),k);ne(Bs(),k);ne(As(),k);ne(Ms(),k)});var Fs=b(We=>{"use strict";s();c();u();var Cp=We&&We.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),qp=We&&We.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Cp(t,o,e)};Object.defineProperty(We,"__esModule",{value:!0});qp(mr(),We)});var Ls=b(R=>{"use strict";s();c();u();var Ns=R&&R.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Up=R&&R.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Ve=R&&R.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Ns(e,t,r[a]);return Up(e,t),e}})(),ke=R&&R.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ns(t,o,e)};Object.defineProperty(R,"__esModule",{value:!0});R.types=R.snippets=R.ir=R.environment=R.endpoints=R.declaration=R.auth=void 0;R.auth=Ve(zo());ke(ur(),R);R.declaration=Ve(Jo());ke(cr(),R);R.endpoints=Ve(_a());ke(lr(),R);R.environment=Ve(ja());ke(fr(),R);R.ir=Ve(Ja());ke(pr(),R);R.snippets=Ve(os());ke(dr(),R);R.types=Ve(Fs());ke(mr(),R)});var Cs=b(Ge=>{"use strict";s();c();u();var Dp=Ge&&Ge.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),$p=Ge&&Ge.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Dp(t,o,e)};Object.defineProperty(Ge,"__esModule",{value:!0});$p(Ls(),Ge)});var Us=b(qs=>{"use strict";s();c();u();Object.defineProperty(qs,"__esModule",{value:!0})});var $s=b(Ds=>{"use strict";s();c();u();Object.defineProperty(Ds,"__esModule",{value:!0})});var Vs=b(Ws=>{"use strict";s();c();u();Object.defineProperty(Ws,"__esModule",{value:!0})});var Gs=b(ks=>{"use strict";s();c();u();Object.defineProperty(ks,"__esModule",{value:!0})});var Hs=b(zs=>{"use strict";s();c();u();Object.defineProperty(zs,"__esModule",{value:!0})});var Js=b(Ys=>{"use strict";s();c();u();Object.defineProperty(Ys,"__esModule",{value:!0})});var Zs=b(Ks=>{"use strict";s();c();u();Object.defineProperty(Ks,"__esModule",{value:!0})});var Qs=b(Xs=>{"use strict";s();c();u();Object.defineProperty(Xs,"__esModule",{value:!0})});var tu=b(eu=>{"use strict";s();c();u();Object.defineProperty(eu,"__esModule",{value:!0})});var nu=b(ru=>{"use strict";s();c();u();Object.defineProperty(ru,"__esModule",{value:!0})});var hr=b(Z=>{"use strict";s();c();u();var Wp=Z&&Z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),he=Z&&Z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Wp(t,o,e)};Object.defineProperty(Z,"__esModule",{value:!0});he(Us(),Z);he($s(),Z);he(Vs(),Z);he(Gs(),Z);he(Hs(),Z);he(Js(),Z);he(Zs(),Z);he(Qs(),Z);he(tu(),Z);he(nu(),Z)});var iu=b(ze=>{"use strict";s();c();u();var Vp=ze&&ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),kp=ze&&ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Vp(t,o,e)};Object.defineProperty(ze,"__esModule",{value:!0});kp(hr(),ze)});var au=b(ou=>{"use strict";s();c();u();Object.defineProperty(ou,"__esModule",{value:!0})});var uu=b(su=>{"use strict";s();c();u();Object.defineProperty(su,"__esModule",{value:!0})});var lu=b(cu=>{"use strict";s();c();u();Object.defineProperty(cu,"__esModule",{value:!0})});var fu=b(Dt=>{"use strict";s();c();u();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.LicenseId=void 0;Dt.LicenseId={Mit:"MIT",Apache2:"Apache-2.0"}});var du=b(pu=>{"use strict";s();c();u();Object.defineProperty(pu,"__esModule",{value:!0})});var hu=b(mu=>{"use strict";s();c();u();Object.defineProperty(mu,"__esModule",{value:!0})});var gu=b(yu=>{"use strict";s();c();u();Object.defineProperty(yu,"__esModule",{value:!0})});var xu=b(bu=>{"use strict";s();c();u();Object.defineProperty(bu,"__esModule",{value:!0})});var wu=b(vu=>{"use strict";s();c();u();Object.defineProperty(vu,"__esModule",{value:!0})});var Ou=b(_u=>{"use strict";s();c();u();Object.defineProperty(_u,"__esModule",{value:!0})});var Iu=b(Pu=>{"use strict";s();c();u();Object.defineProperty(Pu,"__esModule",{value:!0})});var Eu=b(Tu=>{"use strict";s();c();u();Object.defineProperty(Tu,"__esModule",{value:!0})});var Bu=b(ju=>{"use strict";s();c();u();Object.defineProperty(ju,"__esModule",{value:!0})});var Au=b(Su=>{"use strict";s();c();u();Object.defineProperty(Su,"__esModule",{value:!0})});var Mu=b(Ru=>{"use strict";s();c();u();Object.defineProperty(Ru,"__esModule",{value:!0})});var Nu=b(Fu=>{"use strict";s();c();u();Object.defineProperty(Fu,"__esModule",{value:!0})});var Cu=b(Lu=>{"use strict";s();c();u();Object.defineProperty(Lu,"__esModule",{value:!0})});var Uu=b(qu=>{"use strict";s();c();u();Object.defineProperty(qu,"__esModule",{value:!0})});var $u=b(Du=>{"use strict";s();c();u();Object.defineProperty(Du,"__esModule",{value:!0})});var Vu=b(Wu=>{"use strict";s();c();u();Object.defineProperty(Wu,"__esModule",{value:!0})});var Gu=b(ku=>{"use strict";s();c();u();Object.defineProperty(ku,"__esModule",{value:!0})});var Hu=b(zu=>{"use strict";s();c();u();Object.defineProperty(zu,"__esModule",{value:!0})});var Ju=b(Yu=>{"use strict";s();c();u();Object.defineProperty(Yu,"__esModule",{value:!0})});var Zu=b(Ku=>{"use strict";s();c();u();Object.defineProperty(Ku,"__esModule",{value:!0})});var Qu=b(Xu=>{"use strict";s();c();u();Object.defineProperty(Xu,"__esModule",{value:!0})});var tc=b(ec=>{"use strict";s();c();u();Object.defineProperty(ec,"__esModule",{value:!0})});var nc=b(rc=>{"use strict";s();c();u();Object.defineProperty(rc,"__esModule",{value:!0})});var oc=b(ic=>{"use strict";s();c();u();Object.defineProperty(ic,"__esModule",{value:!0})});var sc=b(ac=>{"use strict";s();c();u();Object.defineProperty(ac,"__esModule",{value:!0})});var cc=b(uc=>{"use strict";s();c();u();Object.defineProperty(uc,"__esModule",{value:!0})});var fc=b(lc=>{"use strict";s();c();u();Object.defineProperty(lc,"__esModule",{value:!0})});var dc=b(pc=>{"use strict";s();c();u();Object.defineProperty(pc,"__esModule",{value:!0})});var hc=b(mc=>{"use strict";s();c();u();Object.defineProperty(mc,"__esModule",{value:!0})});var gc=b(yc=>{"use strict";s();c();u();Object.defineProperty(yc,"__esModule",{value:!0})});var xc=b(bc=>{"use strict";s();c();u();Object.defineProperty(bc,"__esModule",{value:!0})});var wc=b(vc=>{"use strict";s();c();u();Object.defineProperty(vc,"__esModule",{value:!0})});var yr=b(T=>{"use strict";s();c();u();var Gp=T&&T.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),S=T&&T.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Gp(t,o,e)};Object.defineProperty(T,"__esModule",{value:!0});S(au(),T);S(uu(),T);S(lu(),T);S(fu(),T);S(du(),T);S(hu(),T);S(gu(),T);S(xu(),T);S(wu(),T);S(Ou(),T);S(Iu(),T);S(Eu(),T);S(Bu(),T);S(Au(),T);S(Mu(),T);S(Nu(),T);S(Cu(),T);S(Uu(),T);S($u(),T);S(Vu(),T);S(Gu(),T);S(Hu(),T);S(Ju(),T);S(Zu(),T);S(Qu(),T);S(tc(),T);S(nc(),T);S(oc(),T);S(sc(),T);S(cc(),T);S(fc(),T);S(dc(),T);S(hc(),T);S(gc(),T);S(xc(),T);S(wc(),T)});var _c=b(He=>{"use strict";s();c();u();var zp=He&&He.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Hp=He&&He.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&zp(t,o,e)};Object.defineProperty(He,"__esModule",{value:!0});Hp(yr(),He)});var Pc=b(se=>{"use strict";s();c();u();var Oc=se&&se.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Yp=se&&se.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Jp=se&&se.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Oc(e,t,r[a]);return Yp(e,t),e}})(),Kp=se&&se.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Oc(t,o,e)};Object.defineProperty(se,"__esModule",{value:!0});se.config=void 0;se.config=Jp(_c());Kp(yr(),se)});var Ic=b(Ye=>{"use strict";s();c();u();var Zp=Ye&&Ye.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Xp=Ye&&Ye.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Zp(t,o,e)};Object.defineProperty(Ye,"__esModule",{value:!0});Xp(Pc(),Ye)});var Tc=b($t=>{"use strict";s();c();u();Object.defineProperty($t,"__esModule",{value:!0});$t.HttpMethod=void 0;$t.HttpMethod={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var gr=b(Je=>{"use strict";s();c();u();var Qp=Je&&Je.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ed=Je&&Je.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Qp(t,o,e)};Object.defineProperty(Je,"__esModule",{value:!0});ed(Tc(),Je)});var Ec=b(Ke=>{"use strict";s();c();u();var td=Ke&&Ke.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),rd=Ke&&Ke.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&td(t,o,e)};Object.defineProperty(Ke,"__esModule",{value:!0});rd(gr(),Ke)});var jc=b(Wt=>{"use strict";s();c();u();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ObjectPropertyAccess=void 0;Wt.ObjectPropertyAccess={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"}});var Bc=b(Vt=>{"use strict";s();c();u();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.PrimitiveTypeV1=void 0;Vt.PrimitiveTypeV1={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"}});var br=b(Ie=>{"use strict";s();c();u();var nd=Ie&&Ie.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Sc=Ie&&Ie.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&nd(t,o,e)};Object.defineProperty(Ie,"__esModule",{value:!0});Sc(jc(),Ie);Sc(Bc(),Ie)});var Ac=b(Ze=>{"use strict";s();c();u();var id=Ze&&Ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),od=Ze&&Ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&id(t,o,e)};Object.defineProperty(Ze,"__esModule",{value:!0});od(br(),Ze)});var Mc=b(q=>{"use strict";s();c();u();var Rc=q&&q.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ad=q&&q.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),pt=q&&q.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Rc(e,t,r[a]);return ad(e,t),e}})(),kt=q&&q.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Rc(t,o,e)};Object.defineProperty(q,"__esModule",{value:!0});q.types=q.http=q.generatorExec=q.environment=q.dynamic=q.commons=void 0;q.commons=pt(wo());kt(sr(),q);q.dynamic=pt(Cs());q.environment=pt(iu());kt(hr(),q);q.generatorExec=pt(Ic());q.http=pt(Ec());kt(gr(),q);q.types=pt(Ac());kt(br(),q)});var Fc=b(Xe=>{"use strict";s();c();u();var sd=Xe&&Xe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ud=Xe&&Xe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&sd(t,o,e)};Object.defineProperty(Xe,"__esModule",{value:!0});ud(Mc(),Xe)});s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var pl=typeof global=="object"&&global&&global.Object===Object&&global,ni=pl;var dl=typeof self=="object"&&self&&self.Object===Object&&self,ml=ni||dl||Function("return this")(),ii=ml;var hl=ii.Symbol,be=hl;s();c();u();var oi=Object.prototype,yl=oi.hasOwnProperty,gl=oi.toString,ht=be?be.toStringTag:void 0;function bl(o){var t=yl.call(o,ht),e=o[ht];try{o[ht]=void 0;var r=!0}catch{}var a=gl.call(o);return r&&(t?o[ht]=e:delete o[ht]),a}var ai=bl;s();c();u();var xl=Object.prototype,vl=xl.toString;function wl(o){return vl.call(o)}var si=wl;var _l="[object Null]",Ol="[object Undefined]",ui=be?be.toStringTag:void 0;function Pl(o){return o==null?o===void 0?Ol:_l:ui&&ui in Object(o)?ai(o):si(o)}var ci=Pl;s();c();u();function Il(o){return o!=null&&typeof o=="object"}var li=Il;var Tl="[object Symbol]";function El(o){return typeof o=="symbol"||li(o)&&ci(o)==Tl}var fi=El;s();c();u();s();c();u();function jl(o,t){for(var e=-1,r=o==null?0:o.length,a=Array(r);++e<r;)a[e]=t(o[e],e,o);return a}var pi=jl;s();c();u();var Bl=Array.isArray,di=Bl;var Sl=1/0,mi=be?be.prototype:void 0,hi=mi?mi.toString:void 0;function yi(o){if(typeof o=="string")return o;if(di(o))return pi(o,yi)+"";if(fi(o))return hi?hi.call(o):"";var t=o+"";return t=="0"&&1/o==-Sl?"-0":t}var gi=yi;s();c();u();function Al(o){return o==null?"":gi(o)}var _e=Al;s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();function Rl(o,t,e){var r=-1,a=o.length;t<0&&(t=-t>a?0:a+t),e=e>a?a:e,e<0&&(e+=a),a=t>e?0:e-t>>>0,t>>>=0;for(var y=Array(a);++r<a;)y[r]=o[r+t];return y}var bi=Rl;function Ml(o,t,e){var r=o.length;return e=e===void 0?r:e,!t&&e>=r?o:bi(o,t,e)}var xi=Ml;s();c();u();var Fl="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Ll="\\ufe20-\\ufe2f",Cl="\\u20d0-\\u20ff",ql=Nl+Ll+Cl,Ul="\\ufe0e\\ufe0f",Dl="\\u200d",$l=RegExp("["+Dl+Fl+ql+Ul+"]");function Wl(o){return $l.test(o)}var Ft=Wl;s();c();u();s();c();u();function Vl(o){return o.split("")}var vi=Vl;s();c();u();var wi="\\ud800-\\udfff",kl="\\u0300-\\u036f",Gl="\\ufe20-\\ufe2f",zl="\\u20d0-\\u20ff",Hl=kl+Gl+zl,Yl="\\ufe0e\\ufe0f",Jl="["+wi+"]",tr="["+Hl+"]",rr="\\ud83c[\\udffb-\\udfff]",Kl="(?:"+tr+"|"+rr+")",_i="[^"+wi+"]",Oi="(?:\\ud83c[\\udde6-\\uddff]){2}",Pi="[\\ud800-\\udbff][\\udc00-\\udfff]",Zl="\\u200d",Ii=Kl+"?",Ti="["+Yl+"]?",Xl="(?:"+Zl+"(?:"+[_i,Oi,Pi].join("|")+")"+Ti+Ii+")*",Ql=Ti+Ii+Xl,ef="(?:"+[_i+tr+"?",tr,Oi,Pi,Jl].join("|")+")",tf=RegExp(rr+"(?="+rr+")|"+ef+Ql,"g");function rf(o){return o.match(tf)||[]}var Ei=rf;function nf(o){return Ft(o)?Ei(o):vi(o)}var ji=nf;function of(o){return function(t){t=_e(t);var e=Ft(t)?ji(t):void 0,r=e?e[0]:t.charAt(0),a=e?xi(e,1).join(""):t.slice(1);return r[o]()+a}}var Bi=of;var af=Bi("toUpperCase"),nt=af;function sf(o){return nt(_e(o).toLowerCase())}var Si=sf;s();c();u();s();c();u();function uf(o,t,e,r){var a=-1,y=o==null?0:o.length;for(r&&y&&(e=o[++a]);++a<y;)e=t(e,o[a],a,o);return e}var Ai=uf;s();c();u();s();c();u();s();c();u();function cf(o){return function(t){return o?.[t]}}var Ri=cf;var lf={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ff=Ri(lf),Mi=ff;var pf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,df="\\u0300-\\u036f",mf="\\ufe20-\\ufe2f",hf="\\u20d0-\\u20ff",yf=df+mf+hf,gf="["+yf+"]",bf=RegExp(gf,"g");function xf(o){return o=_e(o),o&&o.replace(pf,Mi).replace(bf,"")}var Fi=xf;s();c();u();s();c();u();var vf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wf(o){return o.match(vf)||[]}var Ni=wf;s();c();u();var _f=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Of(o){return _f.test(o)}var Li=Of;s();c();u();var $i="\\ud800-\\udfff",Pf="\\u0300-\\u036f",If="\\ufe20-\\ufe2f",Tf="\\u20d0-\\u20ff",Ef=Pf+If+Tf,Wi="\\u2700-\\u27bf",Vi="a-z\\xdf-\\xf6\\xf8-\\xff",jf="\\xac\\xb1\\xd7\\xf7",Bf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sf="\\u2000-\\u206f",Af=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ki="A-Z\\xc0-\\xd6\\xd8-\\xde",Rf="\\ufe0e\\ufe0f",Gi=jf+Bf+Sf+Af,zi="['\u2019]",Ci="["+Gi+"]",Mf="["+Ef+"]",Hi="\\d+",Ff="["+Wi+"]",Yi="["+Vi+"]",Ji="[^"+$i+Gi+Hi+Wi+Vi+ki+"]",Nf="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+Mf+"|"+Nf+")",Cf="[^"+$i+"]",Ki="(?:\\ud83c[\\udde6-\\uddff]){2}",Zi="[\\ud800-\\udbff][\\udc00-\\udfff]",it="["+ki+"]",qf="\\u200d",qi="(?:"+Yi+"|"+Ji+")",Uf="(?:"+it+"|"+Ji+")",Ui="(?:"+zi+"(?:d|ll|m|re|s|t|ve))?",Di="(?:"+zi+"(?:D|LL|M|RE|S|T|VE))?",Xi=Lf+"?",Qi="["+Rf+"]?",Df="(?:"+qf+"(?:"+[Cf,Ki,Zi].join("|")+")"+Qi+Xi+")*",$f="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vf=Qi+Xi+Df,kf="(?:"+[Ff,Ki,Zi].join("|")+")"+Vf,Gf=RegExp([it+"?"+Yi+"+"+Ui+"(?="+[Ci,it,"$"].join("|")+")",Uf+"+"+Di+"(?="+[Ci,it+qi,"$"].join("|")+")",it+"?"+qi+"+"+Ui,it+"+"+Di,Wf,$f,Hi,kf].join("|"),"g");function zf(o){return o.match(Gf)||[]}var eo=zf;function Hf(o,t,e){return o=_e(o),t=e?void 0:t,t===void 0?Li(o)?eo(o):Ni(o):o.match(t)||[]}var to=Hf;var Yf="['\u2019]",Jf=RegExp(Yf,"g");function Kf(o){return function(t){return Ai(to(Fi(t).replace(Jf,"")),o,"")}}var ro=Kf;var Zf=ro(function(o,t,e){return t=t.toLowerCase(),o+(e?Si(t):t)}),Nt=Zf;s();c();u();function U(o){throw new Error("Unexpected value: "+JSON.stringify(o))}s();c();u();function yt(o){return Object.keys(o)}s();c();u();s();c();u();s();c();u();var gt=d.env.FERN_STACK_TRACK?.toLowerCase()??"",de=gt!==""&&gt!=="0"&&gt!=="false",nr=["single","multiline","box"].includes(gt)?gt:"single";de&&(Error.stackTraceLimit=50);var Xf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Qf=new Set(["stacktrace"]);function Ct({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,formatFilename:O=P=>P}={}){if(!de)return[];r=[...r,...Xf],e=[...e,...Qf],a=[...a,"runInteractiveTask"];let P=!1;return(new Error().stack??"").split(`
2
+ `).map(M=>{let j=M.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(j&&j.length===5){let[,C,X,I,E]=j;if(!C||!X||!I||!E)return;if(P||a.some(F=>C?.includes(F))){P=!0;return}switch(C){case"Object.<anonymous>":C="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":C=`${C.substring(C.indexOf(".")+1)}()=> { ... }`;break}return{fn:C,path:O(X),position:`${I}:${E}`}}}).filter(M=>M&&!r.some(j=>M.fn.includes(j))&&!(y&&M.path?.startsWith("node:"))&&!(p&&M.path?.endsWith(".js"))&&!e.some(j=>M.path.includes(j))).slice(t,t+o)}var Lt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:a=[],stopOn:y=[],filterNode:p=!0,filterJs:O=!0,multiline:P=!1,formatFilename:M=j=>j}={}){w(this,"maxFrames");w(this,"skip");w(this,"filterPaths");w(this,"filterFunctions");w(this,"stopOn");w(this,"filterNode");w(this,"filterJs");w(this,"multiline");w(this,"formatFilename");w(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=a,this.stopOn=y,this.filterNode=p,this.filterJs=O,this.multiline=P,this.formatFilename=M}tag(t){let e=this.tracking.get(t)||new Set;Ct({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!de)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
3
3
  `:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},ir;function no({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,multiline:O=!1,formatFilename:P=M=>M}={}){de&&(ir??(ir=new Lt({maxFrames:o,skip:t,filterPaths:e,filterFunctions:r,stopOn:a,filterNode:y,filterJs:p,multiline:O,formatFilename:P})))}function io(o){ir?.tag(o)}function or(o){return ir?.frames(o)??[]}var Be=class{constructor(){io(this)}};s();c();u();var qt=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},bt=class extends qt{async format(t){return t}formatSync(t){return t}};s();c();u();s();c();u();s();c();u();var ce=class extends Be{constructor(e){super();w(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var ep=4;no({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var xt=class{constructor(){w(this,"lineBuffer",[]);w(this,"indentLevel",0);w(this,"hasWrittenAnything",!1);w(this,"lastCharacterIsSemicolon",!1);w(this,"lastCharacterIsNewline",!1);w(this,"nodeStackFrames",[])}get buffer(){return de&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
4
  `),this.lineBuffer.join(`
5
5
  `)+(this.lastCharacterIsNewline?`
@@ -12,16 +12,16 @@ ${y}`);this.isAtStartOfLine()&&(p=y+p),r&&(p+=`
12
12
  `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
13
13
  `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let a=t[0];a!=null&&r(a);for(let y=1;y<t.length;y++){this.write(e);let p=t[y];p!=null&&r(p)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
14
  `),this.lastCharacterIsSemicolon=t.endsWith(";");let r=t.split(`
15
- `),a=de&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),a&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(Ct({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,nr){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return ep}};s();c();u();s();c();u();s();c();u();var vt=class{constructor(){w(this,"reporter");w(this,"snippet");w(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw this.err??new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>(this.snippet?.length??0)}};var wt=class{constructor(t){w(this,"context");this.context=t}async generate(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new vt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=await O.generateSnippet({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}async generateSnippetAst(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{return await O.generateSnippetAst({endpoint:y,request:t,options:e})}catch(P){a=P}}throw a??new Error(`Failed to generate snippet AST for endpoint: ${t.endpoint.method} ${t.endpoint.path}`)}generateSync(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new vt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=O.generateSnippetSync({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}};s();c();u();s();c();u();s();c();u();var _t=class{constructor(){w(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let r=t.match(this.REFERENCE_REGEX);if(!(r==null||r[1]==null||r[2]==null))return{method:r[1],path:r[2]}}};s();c();u();var A={Critical:"CRITICAL",Warning:"WARNING"},Ot=class o{constructor(){w(this,"errors");w(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push({...t,path:[...this.path]})}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new o;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let r of t){if(typeof r=="string"){e.push(r);continue}e[e.length-1]+=`[${r.index}]`}return e}};var Pt=class{constructor({ir:t,config:e,options:r={}}){w(this,"config");w(this,"options");w(this,"errors");w(this,"_ir");w(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=r,this.errors=new Ot,this.httpEndpointReferenceParser=new _t}associateQueryParametersByWireValue({parameters:t,values:e}){let r=[];for(let[a,y]of Object.entries(e))if(y!==void 0){this.errors.scope(a);try{let p=t.find(P=>P.name.wireValue===a);if(p==null)throw this.newParameterNotRecognizedError(a);let O=this.isListTypeReference(p.typeReference)&&!Array.isArray(y)?[y]:y;r.push({name:p.name,typeReference:p.typeReference,value:O})}finally{this.errors.unscope()}}return r}associateByWireValueOrDefault({parameters:t,values:e}){let r=[];for(let a of t){this.errors.scope(a.name.wireValue);try{let y=e[a.name.wireValue];if(y==null)if(a.typeReference.type==="primitive"&&a.typeReference.value==="STRING")y=`<${a.name.wireValue}>`;else{this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a.name.wireValue).message});continue}r.push({name:a.name,typeReference:a.typeReference,value:y})}finally{this.errors.unscope()}}return r}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:r}){let a=[];for(let[y,p]of Object.entries(e))if(p!==void 0){this.errors.scope(y);try{let O=t.find(P=>P.name.wireValue===y);if(O==null){if(r)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(y).message});continue}a.push({name:O.name,typeReference:O.typeReference,value:p})}finally{this.errors.unscope()}}return a}getExampleObjectProperties({parameters:t,snippetObject:e}){let r=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},a=[];for(let y of t){let p=r[y.name.wireValue];p==null?y.typeReference.type==="nullable"&&a.push({name:y.name,typeReference:y.typeReference,value:null}):a.push({name:y.name,typeReference:y.typeReference,value:p})}return a}getSingleFileValue({property:t,record:e}){let r=e[t.wireValue];if(r!=null){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof r}`});return}return r}}getFileArrayValues({property:t,record:e}){let r=e[t.wireValue];if(r==null)return;if(!Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof r}`});return}let a=[];for(let y of r){if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof y}`});return}a.push(y)}return a}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t??{}}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let r=this.getRecord(e);if(r==null)return;let a=t.discriminant.wireValue,y=r[a];if(y==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a).message});return}if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof y}`});return}let p=t.types[y];if(p==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${y}"`});return}let{[a]:O,...P}=r;return{singleDiscriminatedUnionType:p,discriminantValue:p.discriminantValue,value:P}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let r of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:r,parsedEndpoint:t})&&e.push(r);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}resolveEndpointById(t){return this._ir.endpoints[t]}resolveEndpointByIdOrThrow(t){let e=this.resolveEndpointById(t);if(e==null)throw new Error(`Failed to find endpoint with ID "${t}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:r}){return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:r}):!t.metadata?.onlyPathParameters}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){return e&&(t.metadata?.includePathParameters??!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:U(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let r=e.environments.find(a=>a.id===t);return r?.name}case"multipleBaseUrls":{let r=e.environments.find(a=>a.id===t);return r?.name}default:U(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let r=e.environments[0];if(r==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let a=new Set(yt(r.urls));for(let y of yt(t))a.has(y)&&a.delete(y);return a.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${yt(r.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:U(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:U(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:U(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};s();c();u();var le={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var Se=class extends xt{constructor({customConfig:e,formatter:r}){super();w(this,"customConfig");w(this,"formatter");w(this,"imports",{});w(this,"defaultImports",{});w(this,"starImportAliases",{});w(this,"starImportAliasesInverse",{});this.customConfig=e,this.formatter=r??new bt}addImport(e){var r,a;if(e.importFrom!=null){switch(e.importFrom.type){case"default":{this.validateDefault(e);break}case"named":{this.validateNamed(e);break}case"star":{this.validateStar(e);break}}let y=(r=this.imports)[a=e.importFrom.moduleName]??(r[a]=[]);y.map(O=>O.name).includes(e.name)||y.push(e)}}validateDefault(e){var a,y;if(e.importFrom?.type!=="default")return;let r=(a=this.defaultImports)[y=e.importFrom.moduleName]??(a[y]=e);if(r.name!==e.name)throw new Error(`Cannot have multiple default imports for module ${e.importFrom.moduleName}: got ${e.name} but already had ${r.name}`)}validateNamed(e){if(e.importFrom?.type!=="named")return;let a=(this.imports[e.importFrom.moduleName]??[]).filter(p=>p.importFrom?.type==="star");if(a.length>0)throw new Error(`Cannot add named import ${e.name} because non-named imports ${a.map(p=>p.name)} already exist`);let y=[];for(let p of Object.values(this.imports))for(let O of p)O.importFrom?.type==="named"&&O.importFrom.moduleName!==e.importFrom.moduleName&&O.name===e.name&&y.push(O);if(y.length>0)throw new Error(`Cannot add named import from module ${e.importFrom.moduleName} because it is already imported from ${y[0]?.importFrom?.moduleName}`)}validateStar(e){var y,p,O,P;if(e.importFrom?.type!=="star")return;let r=(y=this.starImportAliases)[p=e.importFrom.moduleName]??(y[p]=e.importFrom.starImportAlias);if(r!==e.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${e.importFrom.starImportAlias} but already have ${r}.`);if(((O=this.starImportAliasesInverse)[P=e.importFrom.starImportAlias]??(O[P]=e.importFrom.moduleName))!==e.importFrom.moduleName)throw new Error(`Attempted to use alias ${e.importFrom.starImportAlias} for more than one module in the same file`)}};var Tt=class extends Se{constructor({customConfig:t,formatter:e}){super({customConfig:t,formatter:e})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
15
+ `),a=de&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),a&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(Ct({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,nr){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return ep}};s();c();u();s();c();u();s();c();u();var vt=class{constructor(){w(this,"reporter");w(this,"snippet");w(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw this.err??new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>(this.snippet?.length??0)}};var wt=class{constructor(t){w(this,"context");this.context=t}async generate(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new vt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=await O.generateSnippet({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}async generateSnippetAst(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{return await O.generateSnippetAst({endpoint:y,request:t,options:e})}catch(P){a=P}}throw a??new Error(`Failed to generate snippet AST for endpoint: ${t.endpoint.method} ${t.endpoint.path}`)}generateSync(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new vt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=O.generateSnippetSync({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}};s();c();u();s();c();u();s();c();u();var _t=class{constructor(){w(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let r=t.match(this.REFERENCE_REGEX);if(!(r==null||r[1]==null||r[2]==null))return{method:r[1],path:r[2]}}};s();c();u();var A={Critical:"CRITICAL",Warning:"WARNING"},Ot=class o{constructor(){w(this,"errors");w(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push({...t,path:[...this.path]})}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new o;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let r of t){if(typeof r=="string"){e.push(r);continue}e[e.length-1]+=`[${r.index}]`}return e}};var Pt=class{constructor({ir:t,config:e,options:r={}}){w(this,"config");w(this,"options");w(this,"errors");w(this,"_ir");w(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=r,this.errors=new Ot,this.httpEndpointReferenceParser=new _t}associateQueryParametersByWireValue({parameters:t,values:e}){let r=[];for(let[a,y]of Object.entries(e))if(y!==void 0){this.errors.scope(a);try{let p=t.find(P=>P.name.wireValue===a);if(p==null)throw this.newParameterNotRecognizedError(a);let O=this.isListTypeReference(p.typeReference)&&!Array.isArray(y)?[y]:y;r.push({name:p.name,typeReference:p.typeReference,value:O})}finally{this.errors.unscope()}}return r}associateByWireValueOrDefault({parameters:t,values:e}){let r=[];for(let a of t){this.errors.scope(a.name.wireValue);try{let y=e[a.name.wireValue];if(y==null)if(a.typeReference.type==="primitive"&&a.typeReference.value==="STRING")y=`<${a.name.wireValue}>`;else{this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a.name.wireValue).message});continue}r.push({name:a.name,typeReference:a.typeReference,value:y})}finally{this.errors.unscope()}}return r}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:r}){let a=[];for(let[y,p]of Object.entries(e))if(p!==void 0){this.errors.scope(y);try{let O=t.find(P=>P.name.wireValue===y);if(O==null){if(r)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(y).message});continue}a.push({name:O.name,typeReference:O.typeReference,value:p})}finally{this.errors.unscope()}}return a}getExampleObjectProperties({parameters:t,snippetObject:e}){let r=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},a=[];for(let y of t){let p=r[y.name.wireValue];p==null?y.typeReference.type==="nullable"&&a.push({name:y.name,typeReference:y.typeReference,value:null}):a.push({name:y.name,typeReference:y.typeReference,value:p})}return a}getSingleFileValue({property:t,record:e}){let r=e[t.wireValue];if(r!=null){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof r}`});return}return r}}getFileArrayValues({property:t,record:e}){let r=e[t.wireValue];if(r==null)return;if(!Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof r}`});return}let a=[];for(let y of r){if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof y}`});return}a.push(y)}return a}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t??{}}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let r=this.getRecord(e);if(r==null)return;let a=t.discriminant.wireValue,y=r[a];if(y==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a).message});return}if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof y}`});return}let p=t.types[y];if(p==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${y}"`});return}let{[a]:O,...P}=r;return{singleDiscriminatedUnionType:p,discriminantValue:p.discriminantValue,value:P}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let r of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:r,parsedEndpoint:t})&&e.push(r);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}resolveEndpointById(t){return this._ir.endpoints[t]}resolveEndpointByIdOrThrow(t){let e=this.resolveEndpointById(t);if(e==null)throw new Error(`Failed to find endpoint with ID "${t}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:r}){return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:r}):!t.metadata?.onlyPathParameters}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){return e&&(t.metadata?.includePathParameters??!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:U(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let r=e.environments.find(a=>a.id===t);return r?.name}case"multipleBaseUrls":{let r=e.environments.find(a=>a.id===t);return r?.name}default:U(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let r=e.environments[0];if(r==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let a=new Set(yt(r.urls));for(let y of yt(t))a.has(y)&&a.delete(y);return a.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${yt(r.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:U(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:U(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:U(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};s();c();u();var le={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var Se=class extends xt{constructor({customConfig:e,formatter:r}){super();w(this,"customConfig");w(this,"formatter");w(this,"imports",{});w(this,"defaultImports",{});w(this,"starImportAliases",{});w(this,"starImportAliasesInverse",{});this.customConfig=e,this.formatter=r??new bt}addImport(e){var r,a;if(e.importFrom!=null){switch(e.importFrom.type){case"default":{this.validateDefault(e);break}case"named":{this.validateNamed(e);break}case"star":{this.validateStar(e);break}}let y=(r=this.imports)[a=e.importFrom.moduleName]??(r[a]=[]);y.map(O=>O.name).includes(e.name)||y.push(e)}}validateDefault(e){var a,y;if(e.importFrom?.type!=="default")return;let r=(a=this.defaultImports)[y=e.importFrom.moduleName]??(a[y]=e);if(r.name!==e.name)throw new Error(`Cannot have multiple default imports for module ${e.importFrom.moduleName}: got ${e.name} but already had ${r.name}`)}validateNamed(e){if(e.importFrom?.type!=="named")return;let a=(this.imports[e.importFrom.moduleName]??[]).filter(p=>p.importFrom?.type==="star");if(a.length>0)throw new Error(`Cannot add named import ${e.name} because non-named imports ${a.map(p=>p.name)} already exist`);let y=[];for(let p of Object.values(this.imports))for(let O of p)O.importFrom?.type==="named"&&O.importFrom.moduleName!==e.importFrom.moduleName&&O.name===e.name&&y.push(O);if(y.length>0)throw new Error(`Cannot add named import from module ${e.importFrom.moduleName} because it is already imported from ${y[0]?.importFrom?.moduleName}`)}validateStar(e){var y,p,O,P;if(e.importFrom?.type!=="star")return;let r=(y=this.starImportAliases)[p=e.importFrom.moduleName]??(y[p]=e.importFrom.starImportAlias);if(r!==e.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${e.importFrom.starImportAlias} but already have ${r}.`);if(((O=this.starImportAliasesInverse)[P=e.importFrom.starImportAlias]??(O[P]=e.importFrom.moduleName))!==e.importFrom.moduleName)throw new Error(`Attempted to use alias ${e.importFrom.starImportAlias} for more than one module in the same file`)}};var It=class extends Se{constructor({customConfig:t,formatter:e}){super({customConfig:t,formatter:e})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
16
16
  ${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 TypeScript file: ${e}
17
17
  ${t}`)}return t}getContent(){let t=this.stringifyImports();return t.length>0?t+`
18
18
  `+this.buffer:this.buffer}stringifyImports(){let t="";for(let[e,r]of Object.entries(this.imports)){let a=this.defaultImports[e],y="",p=r.filter(P=>P.importFrom?.type==="named"),O=this.starImportAliases[e];if(p.length>0||a!=null||O!=null){if(t+="import",a!=null&&(t+=` ${a.name}`),p.length>0){for(let M of p.slice(0,-1))y+=`${M.name}, `;let P=p[p.length-1];P!=null&&(y+=`${P.name}`),a!=null&&(t+=","),t+=` { ${y} }`}O!=null&&((a!=null||p.length>0)&&(t+=", "),t+=` * as ${O}`),t+=` from "${e}";
19
- `}}return t}};var L=class extends Be{async toStringAsync({customConfig:t,formatter:e}){let r=new Tt({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new Tt({customConfig:t,formatter:e});return this.write(r),r.toString()}};var _={};Rr(_,{AstNode:()=>L,ClassInstantiation:()=>ot,CodeBlock:()=>at,Comment:()=>Oe,Function:()=>st,FunctionInvocation:()=>ut,MethodInvocation:()=>ct,Parameter:()=>lt,Reference:()=>Re,Type:()=>Ae,TypeLiteral:()=>xe,Types:()=>Ae,Variable:()=>ft,Writer:()=>Se,codeblock:()=>op,function_:()=>ap,instantiateClass:()=>sp,invokeFunction:()=>up,invokeMethod:()=>cp,parameter:()=>lp,reference:()=>fp,variable:()=>pp});s();c();u();s();c();u();s();c();u();var ot=class extends L{constructor({class_:e,arguments_:r}){super();w(this,"class_");w(this,"arguments_");this.class_=e,this.arguments_=r}write(e){e.write("new "),e.writeNode(this.class_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var at=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){return new ce(this.args).write(e)}};s();c();u();var Oe=class extends L{constructor({docs:e}={docs:void 0}){super();w(this,"docs");this.docs=e}write(e){this.docs!=null&&(e.writeLine("/**"),this.docs.split(`
19
+ `}}return t}};var L=class extends Be{async toStringAsync({customConfig:t,formatter:e}){let r=new It({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new It({customConfig:t,formatter:e});return this.write(r),r.toString()}};var _={};Rr(_,{AstNode:()=>L,ClassInstantiation:()=>ot,CodeBlock:()=>at,Comment:()=>Oe,Function:()=>st,FunctionInvocation:()=>ut,MethodInvocation:()=>ct,Parameter:()=>lt,Reference:()=>Re,Type:()=>Ae,TypeLiteral:()=>xe,Types:()=>Ae,Variable:()=>ft,Writer:()=>Se,codeblock:()=>op,function_:()=>ap,instantiateClass:()=>sp,invokeFunction:()=>up,invokeMethod:()=>cp,parameter:()=>lp,reference:()=>fp,variable:()=>pp});s();c();u();s();c();u();s();c();u();var ot=class extends L{constructor({class_:e,arguments_:r}){super();w(this,"class_");w(this,"arguments_");this.class_=e,this.arguments_=r}write(e){e.write("new "),e.writeNode(this.class_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var at=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){return new ce(this.args).write(e)}};s();c();u();var Oe=class extends L{constructor({docs:e}={docs:void 0}){super();w(this,"docs");this.docs=e}write(e){this.docs!=null&&(e.writeLine("/**"),this.docs.split(`
20
20
  `).forEach(r=>{e.writeLine(` * ${r}`)}),e.writeLine("*/"))}};s();c();u();s();c();u();var Ae=class extends L{constructor(e){super();w(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"string":e.write("string");break;case"number":e.write("number");break;case"bigint":e.write("bigint");break;case"boolean":e.write("boolean");break;case"array":this.internalType.valueType.write(e),e.write("[]");break;case"map":e.write("Record<"),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write(">");break;case"object":e.write("{"),e.indent();for(let[r,a]of Object.entries(this.internalType.fields))e.write(`${r}: `),a.write(e),e.writeLine(",");e.dedent(),e.write("}");break;case"enum":e.write("enum");break;case"any":e.write("any");break;case"promise":e.write("Promise<"),this.internalType.value.write(e),e.write(">");break;case"unknown":e.write("unknown");break;case"void":e.write("void");break;case"undefined":e.write("undefined");break;case"null":e.write("null");break;case"never":e.write("never");break;case"nop":break;default:U(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(e){return new this({type:"array",valueType:e})}static object(e){return new this({type:"object",fields:e})}static enum(e){return new this({type:"enum",values:e})}static any(){return new this({type:"any"})}static promise(e){return e.internalType.type==="promise"?e:new this({type:"promise",value:e})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};var st=class extends L{constructor({name:e,parameters:r,async:a,body:y,return_:p,docs:O}){super();w(this,"name");w(this,"parameters");w(this,"async");w(this,"body");w(this,"return_");w(this,"docs");this.name=e,this.parameters=r,this.async=a??!1,this.body=y,this.return_=p,this.docs=O}write(e){e.writeNode(new Oe({docs:this.docs})),this.async&&e.write("async "),e.write("function "),e.write(`${this.name}`),this.writeParameters(e),this.return_!=null&&(e.write(": "),e.writeNode(this.async?Ae.promise(this.return_):this.return_)),e.writeLine(" {"),e.indent(),this.body?.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeParameters(e){if(this.parameters.length===0){e.write("()");return}e.indent(),e.writeLine("(");for(let r of this.parameters)e.writeNode(r),e.writeLine(",");e.dedent(),e.write(")")}};s();c();u();var ut=class extends L{constructor({function_:e,arguments_:r}){super();w(this,"function_");w(this,"arguments_");this.function_=e,this.arguments_=r}write(e){e.writeNode(this.function_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var ct=class extends L{constructor({on:e,method:r,arguments_:a,async:y}){super();w(this,"on");w(this,"method");w(this,"arguments_");w(this,"async");this.on=e,this.method=r,this.arguments_=a,this.async=y}write(e){this.async&&e.write("await "),this.on.write(e),e.write("."),e.write(this.method),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var lt=class extends L{constructor({name:e,type:r,docs:a}){super();w(this,"name");w(this,"type");w(this,"docs");this.name=e,this.type=r,this.docs=a}write(e){this.docs!=null&&e.writeNode(new Oe({docs:this.docs})),e.write(`${this.name}: `),this.type.write(e)}};s();c();u();var Re=class extends L{constructor({name:e,importFrom:r,memberName:a}){super();w(this,"name");w(this,"importFrom");w(this,"memberName");this.name=e,this.importFrom=r,this.memberName=a}write(e){this.importFrom!=null&&e.addImport(this);let r=this.importFrom?.type==="star"?`${this.importFrom.starImportAlias}.`:"",a=this.memberName!=null?`.${this.memberName}`:"";e.write(`${r}${this.name}${a}`)}};s();c();u();var xe=class o extends L{constructor(e){super();w(this,"internalType");this.internalType=e}write(e){let r=!!e.customConfig?.noSerdeLayer,a=!!e.customConfig?.useBigInt;switch(this.internalType.type){case"array":{this.writeIterable({writer:e,iterable:this.internalType});break}case"blob":{if(r){e.writeNode(o.string(this.internalType.value));return}e.write("new Blob(["),e.writeNode(o.string(this.internalType.value)),e.write("])");break}case"boolean":{e.write(this.internalType.value.toString());break}case"bigint":{if(a){e.write(`BigInt("${this.internalType.value.toString()}")`);return}e.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(r){e.writeNode(o.string(this.internalType.value));return}e.write("new Date("),e.writeNode(o.string(this.internalType.value)),e.write(")");break}case"number":{e.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:e,object:this.internalType});break}case"record":{this.writeRecord({writer:e,record:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"set":{if(r||this.isSetOfObjects()){e.writeNode(o.array({values:this.internalType.values}));return}e.write("new Set("),this.writeIterable({writer:e,iterable:this.internalType}),e.write(")");break}case"string":{this.internalType.value.includes(`
21
21
  `)?this.writeStringWithBackticks({writer:e,value:this.internalType.value}):e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:e,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:U(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(e=>e.isObject())}writeStringWithBackticks({writer:e,value:r}){e.write("`");let a=r.split(`
22
22
  `),y=a[0]+`
23
23
  `,p=a.slice(1).join(`
24
- `);e.write(y.replaceAll("`","\\`")),e.writeNoIndent(p.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let a=np({values:r.values});if(a.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let y of a)y.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let a=rp({entries:r.entries});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)y.key.write(e),e.write(": "),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let a=tp({fields:r.fields});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)e.write(`${y.name}: `),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({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("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let a of r)e.writeNode(o.unknown(a)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let a=Object.entries(r);if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[y,p]of a)e.write(`${y}: `),e.writeNode(o.unknown(p)),e.writeLine(",");e.dedent(),e.write("}")}};function tp({fields:o}){return o.filter(t=>!xe.isNop(t.value))}function rp({entries:o}){return o.filter(t=>!xe.isNop(t.key)&&!xe.isNop(t.value))}function np({values:o}){return o.filter(t=>!xe.isNop(t))}s();c();u();var ft=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function op(o){return new at(o)}function ap(o){return new st(o)}function sp(o){return new ot(o)}function up(o){return new ut(o)}function cp(o){return new ct(o)}function lp(o){return new lt(o)}function fp(o){return new Re(o)}function pp(o){return new ft(o)}s();c();u();s();c();u();function oo({generatorConfig:o,isPackagePrivate:t}){let e=o.output.mode;switch(e.type){case"downloadFiles":return;case"publish":return{packageName:e.registriesV2.npm.packageName,version:e.version,private:t,publishInfo:{registryUrl:e.registriesV2.npm.registryUrl,token:e.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(e.publishInfo!=null&&e.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${e.publishInfo.type} instead`);return{packageName:e.publishInfo!=null?e.publishInfo.packageName:"",version:e.version,private:t,publishInfo:void 0,repoUrl:dp(e.repoUrl),license:o.license?._visit({basic:r=>r.id,custom:r=>`See ${r.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${e}`)}}function dp(o){if(o!=null)return o.startsWith("https://github.com/")?`git+${o}`:o.startsWith("ssh://github.com/")?`github:${It(o).replace("ssh://github.com/","")}`:o.startsWith("https://bitbucket.org/")?`bitbucket:${It(o).replace("https://bitbucket.org/","")}`:o.startsWith("ssh://bitbucket.org/")?`bitbucket:${It(o).replace("ssh://bitbucket.org/","")}`:o.startsWith("https://gitlab.com/")?`gitlab:${It(o).replace("https://gitlab.com/","")}`:o.startsWith("ssh://gitlab.com/")?`gitlab:${It(o).replace("ssh://gitlab.com/","")}`:(o.startsWith("git+")||(o=`git+${o}`),o.endsWith(".git")||(o=`${o}.git`),o)}function It(o){return o.endsWith(".git")?o.slice(0,-4):o}s();c();u();function ar({organization:o,workspaceName:t,namespaceExport:e}){return e??`${nt(Nt(o))}${nt(Nt(t))}`}s();c();u();var xr=ul(Fc(),1);var cd="value",Gt=class{constructor({context:t}){w(this,"context");this.context=t}convert(t){let e=t.convertOpts;if(t.value===null)return this.context.isNullable(t.typeReference)?_.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),_.TypeLiteral.nop());if(t.value===void 0)return _.TypeLiteral.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,convertOpts:e});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value,convertOpts:e});case"map":return this.convertMap({map:t.typeReference,value:t.value,convertOpts:e});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?_.TypeLiteral.nop():this.convertNamed({named:r,value:t.value,as:t.as,convertOpts:e})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,convertOpts:e});case"unknown":return this.convertUnknown({value:t.value,convertOpts:e});default:U(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let r=this.context.getValueAsBoolean({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(r)}case"string":{let r=this.context.getValueAsString({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}default:U(t)}}convertList({list:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.array({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertSet({set:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.set({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertMap({map:t,value:e,convertOpts:r}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),_.TypeLiteral.nop()):_.TypeLiteral.record({entries:Object.entries(e).map(([a,y])=>{this.context.errors.scope(a);try{return{key:this.convert({typeReference:t.key,value:a,as:"key",convertOpts:r}),value:this.convert({typeReference:t.value,value:y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r,convertOpts:a}){switch(t.type){case"alias":return this.context.customConfig?.useBrandedStringAliases?_.TypeLiteral.reference(_.codeblock(y=>{y.writeNode(_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})})),y.write("("),y.writeNode(this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a})),y.write(")")})):this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:a});case"enum":return this.convertEnum({enum_:t,value:e,convertOpts:a});case"object":return this.convertObject({object_:t,value:e,convertOpts:a});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:a});default:U(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:r}){let a=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(a==null)return _.TypeLiteral.nop();let y=a.singleDiscriminatedUnionType,p=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:a,unionVariant:y,convertOpts:r});if(p==null)return _.TypeLiteral.nop();if(this.context.customConfig?.includeUtilsOnUnionMembers)return _.TypeLiteral.reference(_.codeblock(P=>{P.writeNode(_.invokeMethod({on:_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})}),method:this.context.getMethodName(y.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:a,unionVariant:y,unionProperties:p,convertOpts:r})}))}));let O={name:this.context.getPropertyName(t.discriminant.name),value:_.TypeLiteral.string(y.discriminantValue.wireValue)};return _.TypeLiteral.object({fields:[O,...p]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e,convertOpts:r}){let a=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let y=this.context.resolveNamedType({typeId:e.typeId});if(y==null)return;let p=this.convertNamed({named:y,value:t.value,convertOpts:r});if(!p.isObject()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}let O=p.asObjectOrThrow();return[...a,...O.fields]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let y=this.context.getRecord(t.value);return y==null?[...a,{name:cd,value:this.convert({typeReference:e.typeReference,value:t.value,convertOpts:r})}]:[...a,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:y[e.discriminantValue.wireValue],convertOpts:r})}]}finally{this.context.errors.unscope()}case"noProperties":return a;default:U(e)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:r,convertOpts:a}){return e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&r.length===1?[this.convert({typeReference:e.typeReference,value:t.value,convertOpts:a})]:r.length>0?[_.TypeLiteral.object({fields:r})]:[]}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e,convertOpts:r}){return this.context.associateByWireValue({parameters:e.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e,convertOpts:r}){let a=this.context.associateByWireValue({parameters:this.filterReadWriteProperties(t.properties,r),values:this.context.getRecord(e)??{}});return _.TypeLiteral.object({fields:a.map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}filterReadWriteProperties(t,e){return this.context.customConfig?.experimentalGenerateReadWriteOnlyTypes!==!0||typeof e>"u"||(e.isForRequest&&(t=t.filter(r=>r.propertyAccess!==xr.ObjectPropertyAccess.ReadOnly)),e.isForResponse&&(t=t.filter(r=>r.propertyAccess!==xr.ObjectPropertyAccess.WriteOnly))),t}convertEnum({enum_:t,value:e}){let r=this.getEnumValue({enum_:t,value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(a=>a.wireValue===e)==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:r}){let a=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r});return a??_.TypeLiteral.nop()}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r}){for(let a of t.types)try{return this.convert({typeReference:a,value:e,convertOpts:r})}catch{continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t,convertOpts:e}){return _.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:r,convertOpts:a}){switch(t){case"INTEGER":case"UINT":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"LONG":case"UINT_64":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.number(y)}case"FLOAT":case"DOUBLE":{let y=this.getValueAsNumber({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"BOOLEAN":{let y=this.getValueAsBoolean({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(y)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.string(y)}case"DATE_TIME":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.datetime(y)}case"BIG_INTEGER":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.string(y)}default:U(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})}};s();c();u();var zt=class{constructor({context:t}){w(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){let r={fileFields:[],bodyPropertyFields:[]},a=this.context.getRecord(e)??{};for(let y of t.properties)switch(y.type){case"file":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getSingleFileProperty({property:y,record:a})});break;case"fileArray":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getArrayFileProperty({property:y,record:a})});break;case"bodyProperty":r.bodyPropertyFields.push({name:this.context.getPropertyName(y.name.name),value:this.getBodyProperty({property:y,record:a})});break;default:U(y)}return r}getSingleFileProperty({property:t,record:e}){let r=this.context.getSingleFileValue({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.blob(r)}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.array({values:r.map(a=>_.TypeLiteral.blob(a))})}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?_.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};var Ht=class o extends Pt{constructor({ir:e,config:r}){super({ir:e,config:r});w(this,"ir");w(this,"customConfig");w(this,"dynamicTypeLiteralMapper");w(this,"filePropertyMapper");w(this,"moduleName");w(this,"namespaceExport");this.ir=e,this.customConfig=r.customConfig!=null?r.customConfig:void 0,this.dynamicTypeLiteralMapper=new Gt({context:this}),this.filePropertyMapper=new zt({context:this}),this.moduleName=ld({config:r,customConfig:this.customConfig}),this.namespaceExport=ar({organization:r.organization,workspaceName:r.workspaceName,namespaceExport:this.customConfig?.namespaceExport})}clone(){return new o({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(e){return this.customConfig?.retainOriginalCasing||this.customConfig?.noSerdeLayer?this.formatOriginalPropertyName(e.originalName):e.camelCase.unsafeName}getMethodName(e){return e.camelCase.unsafeName}getTypeName(e){return e.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(e){let r=this.resolveEnvironmentName(e);if(r!=null)return this.getEnvironmentsTypeReference(r)}getFullyQualifiedReference({declaration:e}){return e.fernFilepath.allParts.length>0?`${e.fernFilepath.allParts.map(r=>r.camelCase.unsafeName).join(".")}.${this.getTypeName(e.name)}`:`${this.getTypeName(e.name)}`}getEnvironmentsTypeReference(e){return _.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(e)})}formatOriginalPropertyName(e){return e.includes("-")?`"${e}"`:e}};function ld({config:o,customConfig:t}){return oo({generatorConfig:o,isPackagePrivate:t?.private??!1})?.packageName??o.organization}s();c();u();var Nc="client",Lc="main",fd={type:"primitive",value:"STRING"},Yt=class{constructor({context:t}){w(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return _.codeblock(r=>{r.writeNode(_.function_({name:Lc,async:!0,parameters:[],body:_.codeblock(a=>{a.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),a.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(_.invokeFunction({function_:_.reference({name:Lc}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return _.variable({name:Nc,const:!0,initializer:_.instantiateClass({class_:_.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],a=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return a.length>0&&r.push(...a),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(le.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?_.TypeLiteral.nop():_.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return _.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return _.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?_.TypeLiteral.object({fields:Object.entries(e).map(([r,a])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:fd,value:a})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:U(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:A.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:_.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:_.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:_.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:_.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:_.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let a of t){let y=this.getConstructorHeaderArg({header:a,value:e.value});y!=null&&r.push(y)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!_.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return _.invokeMethod({on:_.reference({name:Nc}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:U(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){let r=[];this.context.errors.scope(le.PathParameters);let a=[...this.context.ir.pathParameters??[],...t.pathParameters??[]];return a.length>0&&r.push(...this.getPathParameters({namedParameters:a,snippet:e}).map(y=>y.value)),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:A.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),_.TypeLiteral.nop()):_.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let r=[],{inlinePathParameters:a,inlineFileProperties:y}={inlinePathParameters:this.context.customConfig?.inlinePathParameters??!1,inlineFileProperties:this.context.customConfig?.inlineFileProperties??!1};this.context.errors.scope(le.PathParameters);let p=[];t.pathParameters!=null&&p.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let O=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})||r.push(...p.map(P=>P.value)),y||r.push(...O.fileFields.map(P=>P.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:a,inlineFileProperties:y})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})?p:[],filePropertyInfo:O})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:a}){this.context.errors.scope(le.QueryParameters);let p=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:e.queryParameters??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.Headers);let P=this.context.associateByWireValue({parameters:t.headers??[],values:e.headers??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let M=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:a}):[];return this.context.errors.unscope(),_.TypeLiteral.object({fields:[...r,...p,...P,...M]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:U(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return this.context.customConfig?.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(e)??{}});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getPathParameters({namedParameters:t,snippet:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:e.pathParameters??{},ignoreMissingParameters:!0});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};var vr=class extends wt{constructor({ir:t,config:e}){super(new Ht({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new Yt({context:t})}};export{vr as DynamicSnippetsGenerator};
24
+ `);e.write(y.replaceAll("`","\\`")),e.writeNoIndent(p.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let a=np({values:r.values});if(a.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let y of a)y.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let a=rp({entries:r.entries});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)y.key.write(e),e.write(": "),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let a=tp({fields:r.fields});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)e.write(`${y.name}: `),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({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("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let a of r)e.writeNode(o.unknown(a)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let a=Object.entries(r);if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[y,p]of a)e.write(`${y}: `),e.writeNode(o.unknown(p)),e.writeLine(",");e.dedent(),e.write("}")}};function tp({fields:o}){return o.filter(t=>!xe.isNop(t.value))}function rp({entries:o}){return o.filter(t=>!xe.isNop(t.key)&&!xe.isNop(t.value))}function np({values:o}){return o.filter(t=>!xe.isNop(t))}s();c();u();var ft=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function op(o){return new at(o)}function ap(o){return new st(o)}function sp(o){return new ot(o)}function up(o){return new ut(o)}function cp(o){return new ct(o)}function lp(o){return new lt(o)}function fp(o){return new Re(o)}function pp(o){return new ft(o)}s();c();u();s();c();u();function oo({generatorConfig:o,isPackagePrivate:t}){let e=o.output.mode;switch(e.type){case"downloadFiles":return;case"publish":return{packageName:e.registriesV2.npm.packageName,version:e.version,private:t,publishInfo:{registryUrl:e.registriesV2.npm.registryUrl,token:e.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(e.publishInfo!=null&&e.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${e.publishInfo.type} instead`);return{packageName:e.publishInfo!=null?e.publishInfo.packageName:"",version:e.version,private:t,publishInfo:void 0,repoUrl:dp(e.repoUrl),license:o.license?._visit({basic:r=>r.id,custom:r=>`See ${r.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${e}`)}}function dp(o){if(o!=null)return o.startsWith("https://github.com/")?`git+${o}`:o.startsWith("ssh://github.com/")?`github:${Tt(o).replace("ssh://github.com/","")}`:o.startsWith("https://bitbucket.org/")?`bitbucket:${Tt(o).replace("https://bitbucket.org/","")}`:o.startsWith("ssh://bitbucket.org/")?`bitbucket:${Tt(o).replace("ssh://bitbucket.org/","")}`:o.startsWith("https://gitlab.com/")?`gitlab:${Tt(o).replace("https://gitlab.com/","")}`:o.startsWith("ssh://gitlab.com/")?`gitlab:${Tt(o).replace("ssh://gitlab.com/","")}`:(o.startsWith("git+")||(o=`git+${o}`),o.endsWith(".git")||(o=`${o}.git`),o)}function Tt(o){return o.endsWith(".git")?o.slice(0,-4):o}s();c();u();function ar({organization:o,workspaceName:t,namespaceExport:e}){return e??`${nt(Nt(o))}${nt(Nt(t))}`}s();c();u();var xr=ul(Fc(),1);var cd="value",Gt=class{constructor({context:t}){w(this,"context");this.context=t}convert(t){let e=t.convertOpts;if(t.value===null)return this.context.isNullable(t.typeReference)?_.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),_.TypeLiteral.nop());if(t.value===void 0)return _.TypeLiteral.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,convertOpts:e});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value,convertOpts:e});case"map":return this.convertMap({map:t.typeReference,value:t.value,convertOpts:e});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?_.TypeLiteral.nop():this.convertNamed({named:r,value:t.value,as:t.as,convertOpts:e})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,convertOpts:e});case"unknown":return this.convertUnknown({value:t.value,convertOpts:e});default:U(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let r=this.context.getValueAsBoolean({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(r)}case"string":{let r=this.context.getValueAsString({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}default:U(t)}}convertList({list:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.array({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertSet({set:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.set({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertMap({map:t,value:e,convertOpts:r}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),_.TypeLiteral.nop()):_.TypeLiteral.record({entries:Object.entries(e).map(([a,y])=>{this.context.errors.scope(a);try{return{key:this.convert({typeReference:t.key,value:a,as:"key",convertOpts:r}),value:this.convert({typeReference:t.value,value:y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r,convertOpts:a}){switch(t.type){case"alias":return this.context.customConfig?.useBrandedStringAliases?_.TypeLiteral.reference(_.codeblock(y=>{y.writeNode(_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})})),y.write("("),y.writeNode(this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a})),y.write(")")})):this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:a});case"enum":return this.convertEnum({enum_:t,value:e,convertOpts:a});case"object":return this.convertObject({object_:t,value:e,convertOpts:a});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:a});default:U(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:r}){let a=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(a==null)return _.TypeLiteral.nop();let y=a.singleDiscriminatedUnionType,p=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:a,unionVariant:y,convertOpts:r});if(p==null)return _.TypeLiteral.nop();if(this.context.customConfig?.includeUtilsOnUnionMembers)return _.TypeLiteral.reference(_.codeblock(P=>{P.writeNode(_.invokeMethod({on:_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})}),method:this.context.getMethodName(y.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:a,unionVariant:y,unionProperties:p,convertOpts:r})}))}));let O={name:this.context.getPropertyName(t.discriminant.name),value:_.TypeLiteral.string(y.discriminantValue.wireValue)};return _.TypeLiteral.object({fields:[O,...p]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e,convertOpts:r}){let a=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let y=this.context.resolveNamedType({typeId:e.typeId});if(y==null)return;let p=this.convertNamed({named:y,value:t.value,convertOpts:r});if(!p.isObject()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}let O=p.asObjectOrThrow();return[...a,...O.fields]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let y=this.context.getRecord(t.value);return y==null?[...a,{name:cd,value:this.convert({typeReference:e.typeReference,value:t.value,convertOpts:r})}]:[...a,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:y[e.discriminantValue.wireValue],convertOpts:r})}]}finally{this.context.errors.unscope()}case"noProperties":return a;default:U(e)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:r,convertOpts:a}){return e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&r.length===1?[this.convert({typeReference:e.typeReference,value:t.value,convertOpts:a})]:r.length>0?[_.TypeLiteral.object({fields:r})]:[]}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e,convertOpts:r}){return this.context.associateByWireValue({parameters:e.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e,convertOpts:r}){let a=this.context.associateByWireValue({parameters:this.filterReadWriteProperties(t.properties,r),values:this.context.getRecord(e)??{}});return _.TypeLiteral.object({fields:a.map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}filterReadWriteProperties(t,e){return this.context.customConfig?.experimentalGenerateReadWriteOnlyTypes!==!0||typeof e>"u"||(e.isForRequest&&(t=t.filter(r=>r.propertyAccess!==xr.ObjectPropertyAccess.ReadOnly)),e.isForResponse&&(t=t.filter(r=>r.propertyAccess!==xr.ObjectPropertyAccess.WriteOnly))),t}convertEnum({enum_:t,value:e}){let r=this.getEnumValue({enum_:t,value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(a=>a.wireValue===e)==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:r}){let a=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r});return a??_.TypeLiteral.nop()}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r}){for(let a of t.types)try{return this.convert({typeReference:a,value:e,convertOpts:r})}catch{continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t,convertOpts:e}){return _.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:r,convertOpts:a}){switch(t){case"INTEGER":case"UINT":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"LONG":case"UINT_64":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.number(y)}case"FLOAT":case"DOUBLE":{let y=this.getValueAsNumber({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"BOOLEAN":{let y=this.getValueAsBoolean({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(y)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.string(y)}case"DATE_TIME":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.datetime(y)}case"BIG_INTEGER":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.string(y)}default:U(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})}};s();c();u();var zt=class{constructor({context:t}){w(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){let r={fileFields:[],bodyPropertyFields:[]},a=this.context.getRecord(e)??{};for(let y of t.properties)switch(y.type){case"file":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getSingleFileProperty({property:y,record:a})});break;case"fileArray":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getArrayFileProperty({property:y,record:a})});break;case"bodyProperty":r.bodyPropertyFields.push({name:this.context.getPropertyName(y.name.name),value:this.getBodyProperty({property:y,record:a})});break;default:U(y)}return r}getSingleFileProperty({property:t,record:e}){let r=this.context.getSingleFileValue({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.blob(r)}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.array({values:r.map(a=>_.TypeLiteral.blob(a))})}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?_.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};var Ht=class o extends Pt{constructor({ir:e,config:r}){super({ir:e,config:r});w(this,"ir");w(this,"customConfig");w(this,"dynamicTypeLiteralMapper");w(this,"filePropertyMapper");w(this,"moduleName");w(this,"namespaceExport");this.ir=e,this.customConfig=r.customConfig!=null?r.customConfig:void 0,this.dynamicTypeLiteralMapper=new Gt({context:this}),this.filePropertyMapper=new zt({context:this}),this.moduleName=ld({config:r,customConfig:this.customConfig}),this.namespaceExport=ar({organization:r.organization,workspaceName:r.workspaceName,namespaceExport:this.customConfig?.namespaceExport})}clone(){return new o({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(e){return this.customConfig?.retainOriginalCasing||this.customConfig?.noSerdeLayer?this.formatOriginalPropertyName(e.originalName):e.camelCase.unsafeName}getMethodName(e){return e.camelCase.unsafeName}getTypeName(e){return e.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(e){let r=this.resolveEnvironmentName(e);if(r!=null)return this.getEnvironmentsTypeReference(r)}getFullyQualifiedReference({declaration:e}){return e.fernFilepath.allParts.length>0?`${e.fernFilepath.allParts.map(r=>r.camelCase.unsafeName).join(".")}.${this.getTypeName(e.name)}`:`${this.getTypeName(e.name)}`}getEnvironmentsTypeReference(e){return _.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(e)})}formatOriginalPropertyName(e){return e.includes("-")?`"${e}"`:e}};function ld({config:o,customConfig:t}){return oo({generatorConfig:o,isPackagePrivate:t?.private??!1})?.packageName??o.organization}s();c();u();var Nc="client",Lc="main",fd={type:"primitive",value:"STRING"},Yt=class{constructor({context:t}){w(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return _.codeblock(r=>{r.writeNode(_.function_({name:Lc,async:!0,parameters:[],body:_.codeblock(a=>{a.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),a.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(_.invokeFunction({function_:_.reference({name:Lc}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return _.variable({name:Nc,const:!0,initializer:_.instantiateClass({class_:_.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],a=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return a.length>0&&r.push(...a),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(le.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?_.TypeLiteral.nop():_.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return _.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return _.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?_.TypeLiteral.object({fields:Object.entries(e).map(([r,a])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:fd,value:a})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:U(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:A.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:_.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:_.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:_.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:_.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:_.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let a of t){let y=this.getConstructorHeaderArg({header:a,value:e.value});y!=null&&r.push(y)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!_.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return _.invokeMethod({on:_.reference({name:Nc}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:U(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){let r=[];this.context.errors.scope(le.PathParameters);let a=[...this.context.ir.pathParameters??[],...t.pathParameters??[]];return a.length>0&&r.push(...this.getPathParameters({namedParameters:a,snippet:e}).map(y=>y.value)),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:A.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),_.TypeLiteral.nop()):_.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let r=[],{inlinePathParameters:a,inlineFileProperties:y}={inlinePathParameters:this.context.customConfig?.inlinePathParameters??!1,inlineFileProperties:this.context.customConfig?.inlineFileProperties??!1};this.context.errors.scope(le.PathParameters);let p=[];t.pathParameters!=null&&p.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let O=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})||r.push(...p.map(P=>P.value)),y||r.push(...O.fileFields.map(P=>P.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:a,inlineFileProperties:y})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})?p:[],filePropertyInfo:O})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:a}){this.context.errors.scope(le.QueryParameters);let p=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:e.queryParameters??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.Headers);let P=this.context.associateByWireValue({parameters:t.headers??[],values:e.headers??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let M=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:a}):[];return this.context.errors.unscope(),_.TypeLiteral.object({fields:[...r,...p,...P,...M]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:U(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return this.context.customConfig?.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(e)??{}});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getPathParameters({namedParameters:t,snippet:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:e.pathParameters??{},ignoreMissingParameters:!0});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};var vr=class extends wt{constructor({ir:t,config:e}){super(new Ht({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new Yt({context:t})}};export{vr as DynamicSnippetsGenerator};
25
25
  /*! Bundled license information:
26
26
 
27
27
  @jspm/core/nodelibs/browser/chunk-DtuTasat.js: