297 lines
1.1 MiB
297 lines
1.1 MiB
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
var P7=Object.create;var eh=Object.defineProperty;var O7=Object.getOwnPropertyDescriptor;var N7=Object.getOwnPropertyNames;var D7=Object.getPrototypeOf,L7=Object.prototype.hasOwnProperty;var I=(t,e)=>()=>(t&&(e=t(t=0)),e);var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nn=(t,e)=>{for(var n in e)eh(t,n,{get:e[n],enumerable:!0})},cP=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of N7(e))!L7.call(t,i)&&i!==n&&eh(t,i,{get:()=>e[i],enumerable:!(r=O7(e,i))||r.enumerable});return t};var Y=(t,e,n)=>(n=t!=null?P7(D7(t)):{},cP(e||!t||!t.__esModule?eh(n,"default",{value:t,enumerable:!0}):n,t)),zt=t=>cP(eh({},"__esModule",{value:!0}),t);var gf=x((YSe,IO)=>{"use strict";var vK=Object.create,Th=Object.defineProperty,yK=Object.getOwnPropertyDescriptor,wO=Object.getOwnPropertyNames,xK=Object.getPrototypeOf,_K=Object.prototype.hasOwnProperty,EK=(t,e)=>function(){return e||(0,t[wO(t)[0]])((e={exports:{}}).exports,e),e.exports},bK=(t,e)=>{for(var n in e)Th(t,n,{get:e[n],enumerable:!0})},SO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wO(e))!_K.call(t,i)&&i!==n&&Th(t,i,{get:()=>e[i],enumerable:!(r=yK(e,i))||r.enumerable});return t},wK=(t,e,n)=>(n=t!=null?vK(xK(t)):{},SO(e||!t||!t.__esModule?Th(n,"default",{value:t,enumerable:!0}):n,t)),SK=t=>SO(Th({},"__esModule",{value:!0}),t),CK=EK({"node_modules/request-light/lib/node/main.js"(t){(()=>{var e={46:(s,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u,c,{signal:l}={}){return new Promise((f,p)=>{function d(){l==null||l.removeEventListener("abort",d),u.removeListener(c,h),u.removeListener("error",m)}function h(...g){d(),f(g)}function m(g){d(),p(g)}l==null||l.addEventListener("abort",d),u.on(c,h),u.on("error",m)})}},54:function(s,a,u){"use strict";var c=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};let l=u(361),f=c(u(374)),p=c(u(304)),d=f.default("agent-base");function h(){let{stack:g}=new Error;return typeof g=="string"&&g.split(`
|
|
`).some(v=>v.indexOf("(https.js:")!==-1||v.indexOf("node:https:")!==-1)}function m(g,v){return new m.Agent(g,v)}(function(g){class v extends l.EventEmitter{constructor(_,E){super();let C=E;typeof _=="function"?this.callback=_:_&&(C=_),this.timeout=null,C&&typeof C.timeout=="number"&&(this.timeout=C.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:h()?443:80}set defaultPort(_){this.explicitDefaultPort=_}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:h()?"https:":"http:"}set protocol(_){this.explicitProtocol=_}callback(_,E,C){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(_,E){let C=Object.assign({},E);typeof C.secureEndpoint!="boolean"&&(C.secureEndpoint=h()),C.host==null&&(C.host="localhost"),C.port==null&&(C.port=C.secureEndpoint?443:80),C.protocol==null&&(C.protocol=C.secureEndpoint?"https:":"http:"),C.host&&C.path&&delete C.path,delete C.agent,delete C.hostname,delete C._defaultAgent,delete C.defaultPort,delete C.createConnection,_._last=!0,_.shouldKeepAlive=!1;let L=!1,R=null,D=C.timeout||this.timeout,O=T=>{_._hadError||(_.emit("error",T),_._hadError=!0)},N=()=>{R=null,L=!0;let T=new Error(`A "socket" was not created for HTTP request before ${D}ms`);T.code="ETIMEOUT",O(T)},S=T=>{L||(R!==null&&(clearTimeout(R),R=null),O(T))},b=T=>{if(L)return;if(R!=null&&(clearTimeout(R),R=null),A=T,!!A&&typeof A.addRequest=="function")return d("Callback returned another Agent instance %o",T.constructor.name),void T.addRequest(_,C);var A;if(T)return T.once("free",()=>{this.freeSocket(T,C)}),void _.onSocket(T);let q=new Error(`no Duplex stream was returned to agent-base for \`${_.method} ${_.path}\``);O(q)};if(typeof this.callback=="function"){this.promisifiedCallback||(this.callback.length>=3?(d("Converting legacy callback function to promise"),this.promisifiedCallback=p.default(this.callback)):this.promisifiedCallback=this.callback),typeof D=="number"&&D>0&&(R=setTimeout(N,D)),"port"in C&&typeof C.port!="number"&&(C.port=Number(C.port));try{d("Resolving socket for %o request: %o",C.protocol,`${_.method} ${_.path}`),Promise.resolve(this.promisifiedCallback(_,C)).then(b,S)}catch(T){Promise.reject(T).catch(S)}}else O(new Error("`callback` is not defined"))}freeSocket(_,E){d("Freeing socket %o %o",_.constructor.name,E),_.destroy()}destroy(){d("Destroying agent %o",this.constructor.name)}}g.Agent=v,g.prototype=g.Agent.prototype})(m||(m={})),s.exports=m},304:(s,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u){return function(c,l){return new Promise((f,p)=>{u.call(this,c,l,(d,h)=>{d?p(d):f(h)})})}}},370:function(s,a,u){"use strict";var c=this&&this.__awaiter||function(_,E,C,L){return new(C||(C=Promise))(function(R,D){function O(b){try{S(L.next(b))}catch(T){D(T)}}function N(b){try{S(L.throw(b))}catch(T){D(T)}}function S(b){var T;b.done?R(b.value):(T=b.value,T instanceof C?T:new C(function(A){A(T)})).then(O,N)}S((L=L.apply(_,E||[])).next())})},l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(a,"__esModule",{value:!0});let f=l(u(808)),p=l(u(404)),d=l(u(310)),h=l(u(374)),m=l(u(46)),g=u(54),v=(0,h.default)("http-proxy-agent");class y extends g.Agent{constructor(E){let C;if(C=typeof E=="string"?d.default.parse(E):E,!C)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");v("Creating new HttpProxyAgent instance: %o",C),super(C);let L=Object.assign({},C);var R;this.secureProxy=C.secureProxy||typeof(R=L.protocol)=="string"&&/^https:?$/i.test(R),L.host=L.hostname||L.host,typeof L.port=="string"&&(L.port=parseInt(L.port,10)),!L.port&&L.host&&(L.port=this.secureProxy?443:80),L.host&&L.path&&(delete L.path,delete L.pathname),this.proxy=L}callback(E,C){return c(this,void 0,void 0,function*(){let{proxy:L,secureProxy:R}=this,D=d.default.parse(E.path),O;if(D.protocol||(D.protocol="http:"),D.hostname||(D.hostname=C.hostname||C.host||null),D.port==null&&(C.port,1)&&(D.port=String(C.port)),D.port==="80"&&(D.port=""),E.path=d.default.format(D),L.auth&&E.setHeader("Proxy-Authorization",`Basic ${Buffer.from(L.auth).toString("base64")}`),R?(v("Creating `tls.Socket`: %o",L),O=p.default.connect(L)):(v("Creating `net.Socket`: %o",L),O=f.default.connect(L)),E._header){let N,S;v("Regenerating stored HTTP header string for request"),E._header=null,E._implicitHeader(),E.output&&E.output.length>0?(v("Patching connection write() output buffer with updated header"),N=E.output[0],S=N.indexOf(`\r
|
|
\r
|
|
`)+4,E.output[0]=E._header+N.substring(S),v("Output buffer: %o",E.output)):E.outputData&&E.outputData.length>0&&(v("Patching connection write() output buffer with updated header"),N=E.outputData[0].data,S=N.indexOf(`\r
|
|
\r
|
|
`)+4,E.outputData[0].data=E._header+N.substring(S),v("Output buffer: %o",E.outputData[0].data))}return yield(0,m.default)(O,"connect"),O})}}a.default=y},201:function(s,a,u){"use strict";let c=(this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}})(u(370));function l(f){return new c.default(f)}(function(f){f.HttpProxyAgent=c.default,f.prototype=c.default.prototype})(l||(l={})),s.exports=l},146:function(s,a,u){"use strict";var c=this&&this.__awaiter||function(C,L,R,D){return new(R||(R=Promise))(function(O,N){function S(A){try{T(D.next(A))}catch(q){N(q)}}function b(A){try{T(D.throw(A))}catch(q){N(q)}}function T(A){var q;A.done?O(A.value):(q=A.value,q instanceof R?q:new R(function($){$(q)})).then(S,b)}T((D=D.apply(C,L||[])).next())})},l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(a,"__esModule",{value:!0});let f=l(u(808)),p=l(u(404)),d=l(u(310)),h=l(u(491)),m=l(u(374)),g=u(54),v=l(u(829)),y=m.default("https-proxy-agent:agent");class _ extends g.Agent{constructor(L){let R;if(R=typeof L=="string"?d.default.parse(L):L,!R)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");y("creating new HttpsProxyAgent instance: %o",R),super(R);let D=Object.assign({},R);var O;this.secureProxy=R.secureProxy||typeof(O=D.protocol)=="string"&&/^https:?$/i.test(O),D.host=D.hostname||D.host,typeof D.port=="string"&&(D.port=parseInt(D.port,10)),!D.port&&D.host&&(D.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in D)&&(D.ALPNProtocols=["http 1.1"]),D.host&&D.path&&(delete D.path,delete D.pathname),this.proxy=D}callback(L,R){return c(this,void 0,void 0,function*(){let{proxy:D,secureProxy:O}=this,N;O?(y("Creating `tls.Socket`: %o",D),N=p.default.connect(D)):(y("Creating `net.Socket`: %o",D),N=f.default.connect(D));let S=Object.assign({},D.headers),b=`CONNECT ${R.host}:${R.port} HTTP/1.1\r
|
|
`;D.auth&&(S["Proxy-Authorization"]=`Basic ${Buffer.from(D.auth).toString("base64")}`);let{host:T,port:A,secureEndpoint:q}=R;(function(G,fe){return!!(!fe&&G===80||fe&&G===443)})(A,q)||(T+=`:${A}`),S.Host=T,S.Connection="close";for(let G of Object.keys(S))b+=`${G}: ${S[G]}\r
|
|
`;let $=v.default(N);N.write(`${b}\r
|
|
`);let{statusCode:j,buffered:K}=yield $;if(j===200){if(L.once("socket",E),R.secureEndpoint){y("Upgrading socket connection to TLS");let G=R.servername||R.host;return p.default.connect(Object.assign(Object.assign({},function(fe,...ue){let le={},W;for(W in fe)ue.includes(W)||(le[W]=fe[W]);return le}(R,"host","hostname","path","port")),{socket:N,servername:G}))}return N}N.destroy();let se=new f.default.Socket({writable:!1});return se.readable=!0,L.once("socket",G=>{y("replaying proxy buffer for failed request"),h.default(G.listenerCount("data")>0),G.push(K),G.push(null)}),se})}}function E(C){C.resume()}a.default=_},18:function(s,a,u){"use strict";let c=(this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}})(u(146));function l(f){return new c.default(f)}(function(f){f.HttpsProxyAgent=c.default,f.prototype=c.default.prototype})(l||(l={})),s.exports=l},829:function(s,a,u){"use strict";var c=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(a,"__esModule",{value:!0});let l=c(u(374)).default("https-proxy-agent:parse-proxy-response");a.default=function(f){return new Promise((p,d)=>{let h=0,m=[];function g(){let _=f.read();_?function(E){m.push(E),h+=E.length;let C=Buffer.concat(m,h);if(C.indexOf(`\r
|
|
\r
|
|
`)===-1)return l("have not received end of HTTP headers yet..."),void g();let L=C.toString("ascii",0,C.indexOf(`\r
|
|
`)),R=+L.split(" ")[1];l("got proxy server response: %o",L),p({statusCode:R,buffered:C})}(_):f.once("readable",g)}function v(_){l("onclose had error %o",_)}function y(){l("onend")}f.on("error",function _(E){f.removeListener("end",y),f.removeListener("error",_),f.removeListener("close",v),f.removeListener("readable",g),l("onerror %o",E),d(E)}),f.on("close",v),f.on("end",y),g()})}},539:function(s,a,u){"use strict";var c,l=this&&this.__extends||(c=function(O,N){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,b){S.__proto__=b}||function(S,b){for(var T in b)Object.prototype.hasOwnProperty.call(b,T)&&(S[T]=b[T])},c(O,N)},function(O,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function S(){this.constructor=O}c(O,N),O.prototype=N===null?Object.create(N):(S.prototype=N.prototype,new S)}),f=this&&this.__assign||function(){return f=Object.assign||function(O){for(var N,S=1,b=arguments.length;S<b;S++)for(var T in N=arguments[S])Object.prototype.hasOwnProperty.call(N,T)&&(O[T]=N[T]);return O},f.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.getErrorStatusDescription=a.xhr=a.configure=void 0;var p=u(685),d=u(687),h=u(310),m=u(472),g=u(796),v=u(201),y=u(18);if(process.env.VSCODE_NLS_CONFIG){var _=process.env.VSCODE_NLS_CONFIG;m.config(JSON.parse(_))}var E=m.loadMessageBundle(),C=void 0,L=!0;function R(O){var N;return new Promise(function(S,b){var T=(0,h.parse)(O.url),A={hostname:T.hostname,agent:!!O.agent&&O.agent,port:T.port?parseInt(T.port):T.protocol==="https:"?443:80,path:T.path,method:O.type||"GET",headers:O.headers,rejectUnauthorized:typeof O.strictSSL!="boolean"||O.strictSSL};O.user&&O.password&&(A.auth=O.user+":"+O.password);var q=function($){if($.statusCode>=300&&$.statusCode<400&&O.followRedirects&&O.followRedirects>0&&$.headers.location){var j=$.headers.location;j.startsWith("/")&&(j=(0,h.format)({protocol:T.protocol,hostname:T.hostname,port:T.port,pathname:j})),S(R(function(K){for(var se=[],G=1;G<arguments.length;G++)se[G-1]=arguments[G];return se.forEach(function(fe){return Object.keys(fe).forEach(function(ue){return K[ue]=fe[ue]})}),K}({},O,{url:j,followRedirects:O.followRedirects-1})))}else S({req:N,res:$})};(N=T.protocol==="https:"?d.request(A,q):p.request(A,q)).on("error",b),O.timeout&&N.setTimeout(O.timeout),O.data&&N.write(O.data),N.end(),O.token&&(O.token.isCancellationRequested&&N.destroy(new D),O.token.onCancellationRequested(function(){N.destroy(new D)}))})}a.configure=function(O,N){C=O,L=N},a.xhr=function(O){return typeof(O=f({},O)).strictSSL!="boolean"&&(O.strictSSL=L),O.agent||(O.agent=function(N,S){S===void 0&&(S={});var b=(0,h.parse)(N),T=S.proxyUrl||function($){return $.protocol==="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:$.protocol==="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(b);if(!T)return null;var A=(0,h.parse)(T);if(!/^https?:$/.test(A.protocol))return null;var q={host:A.hostname,port:Number(A.port),auth:A.auth,rejectUnauthorized:typeof S.strictSSL!="boolean"||S.strictSSL,protocol:A.protocol};return b.protocol==="http:"?v(q):y(q)}(O.url,{proxyUrl:C,strictSSL:L})),typeof O.followRedirects!="number"&&(O.followRedirects=5),R(O).then(function(N){return new Promise(function(S,b){var T,A,q=N.res,$=q,j=!1,K=q.headers&&q.headers["content-encoding"];if(K&&(T=O.type,A=N.res.statusCode,!(T==="HEAD"||A>=100&&A<200||A===204||A===304))){var se={flush:g.constants.Z_SYNC_FLUSH,finishFlush:g.constants.Z_SYNC_FLUSH};if(K==="gzip"){var G=g.createGunzip(se);q.pipe(G),$=G}else if(K==="deflate"){var fe=g.createInflate(se);q.pipe(fe),$=fe}}var ue=[];$.on("data",function(le){return ue.push(le)}),$.on("end",function(){if(!j){if(j=!0,O.followRedirects>0&&(q.statusCode>=300&&q.statusCode<=303||q.statusCode===307)){var le=q.headers.location;if(le.startsWith("/")){var W=(0,h.parse)(O.url);le=(0,h.format)({protocol:W.protocol,hostname:W.hostname,port:W.port,pathname:le})}if(le){var nn={type:O.type,url:le,user:O.user,password:O.password,headers:O.headers,timeout:O.timeout,followRedirects:O.followRedirects-1,data:O.data,token:O.token};return void(0,a.xhr)(nn).then(S,b)}}var ne=Buffer.concat(ue),Ee={responseText:ne.toString(),body:ne,status:q.statusCode,headers:q.headers||{}};q.statusCode>=200&&q.statusCode<300||q.statusCode===1223?S(Ee):b(Ee)}}),$.on("error",function(le){var W;W=D.is(le)?le:{responseText:E("error","Unable to access {0}. Error: {1}",O.url,le.message),body:Buffer.concat(ue),status:500,headers:{}},j=!0,b(W)}),O.token&&(O.token.isCancellationRequested&&$.destroy(new D),O.token.onCancellationRequested(function(){$.destroy(new D)}))})},function(N){var S;return S=D.is(N)?N:{responseText:O.agent?E("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",O.url,N.message):E("error.cannot.connect","Unable to connect to {0}. Error: {1}",O.url,N.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(S)})},a.getErrorStatusDescription=function(O){if(!(O<400))switch(O){case 400:return E("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return E("status.401","Unauthorized. The server is refusing to respond.");case 403:return E("status.403","Forbidden. The server is refusing to respond.");case 404:return E("status.404","Not Found. The requested location could not be found.");case 405:return E("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return E("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return E("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return E("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return E("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return E("status.410","Gone. The requested page is no longer available.");case 411:return E("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return E("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return E("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return E("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return E("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return E("status.500","Internal Server Error.");case 501:return E("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return E("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return E("status.416","HTTP status code {0}",O)}};var D=function(O){function N(){var S=O.call(this,"The user aborted a request")||this;return S.name="AbortError",Object.setPrototypeOf(S,N.prototype),S}return l(N,O),N.is=function(S){return S instanceof N},N}(Error)},800:(s,a,u)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.config=a.loadMessageBundle=a.localize=a.format=a.setPseudo=a.isPseudo=a.isDefined=a.BundleFormat=a.MessageFormat=void 0;var c,l,f,p=u(926);function d(m){return m!==void 0}function h(m,g){return a.isPseudo&&(m="\uFF3B"+m.replace(/[aouei]/g,"$&$&")+"\uFF3D"),g.length===0?m:m.replace(/\{(\d+)\}/g,function(v,y){var _=y[0],E=g[_],C=v;return typeof E=="string"?C=E:typeof E!="number"&&typeof E!="boolean"&&E!=null||(C=String(E)),C})}(f=a.MessageFormat||(a.MessageFormat={})).file="file",f.bundle="bundle",f.both="both",(l=a.BundleFormat||(a.BundleFormat={})).standalone="standalone",l.languagePack="languagePack",function(m){m.is=function(g){var v=g;return v&&d(v.key)&&d(v.comment)}}(c||(c={})),a.isDefined=d,a.isPseudo=!1,a.setPseudo=function(m){a.isPseudo=m},a.format=h,a.localize=function(m,g){for(var v=[],y=2;y<arguments.length;y++)v[y-2]=arguments[y];return h(g,v)},a.loadMessageBundle=function(m){return(0,p.default)().loadMessageBundle(m)},a.config=function(m){return(0,p.default)().config(m)}},926:(s,a)=>{"use strict";var u;function c(){if(u===void 0)throw new Error("No runtime abstraction layer installed");return u}Object.defineProperty(a,"__esModule",{value:!0}),function(l){l.install=function(f){if(f===void 0)throw new Error("No runtime abstraction layer provided");u=f}}(c||(c={})),a.default=c},472:(s,a,u)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.config=a.loadMessageBundle=a.BundleFormat=a.MessageFormat=void 0;var c=u(17),l=u(147),f=u(926),p=u(800),d=u(800);Object.defineProperty(a,"MessageFormat",{enumerable:!0,get:function(){return d.MessageFormat}}),Object.defineProperty(a,"BundleFormat",{enumerable:!0,get:function(){return d.BundleFormat}});var h,m,g=Object.prototype.toString;function v(N){return g.call(N)==="[object Number]"}function y(N){return g.call(N)==="[object String]"}function _(N){return JSON.parse(l.readFileSync(N,"utf8"))}function E(N){return function(S,b){for(var T=[],A=2;A<arguments.length;A++)T[A-2]=arguments[A];return v(S)?S>=N.length?void console.error(`Broken localize call found. Index out of bounds. Stacktrace is
|
|
: `.concat(new Error("").stack)):(0,p.format)(N[S],T):y(b)?(console.warn("Message ".concat(b," didn't get externalized correctly.")),(0,p.format)(b,T)):void console.error(`Broken localize call found. Stacktrace is
|
|
: `.concat(new Error("").stack))}}function C(N,S){return h[N]=S,S}function L(N){try{return function(S){var b=_(c.join(S,"nls.metadata.json")),T=Object.create(null);for(var A in b){var q=b[A];T[A]=q.messages}return T}(N)}catch(S){return void console.log("Generating default bundle from meta data failed.",S)}}function R(N,S){var b;if(m.languagePackSupport===!0&&m.cacheRoot!==void 0&&m.languagePackId!==void 0&&m.translationsConfigFile!==void 0&&m.translationsConfig!==void 0)try{b=function(A,q){var $,j,K,se=c.join(m.cacheRoot,"".concat(A.id,"-").concat(A.hash,".json")),G=!1,fe=!1;try{return $=JSON.parse(l.readFileSync(se,{encoding:"utf8",flag:"r"})),j=se,K=new Date,l.utimes(j,K,K,function(){}),$}catch(ue){if(ue.code==="ENOENT")fe=!0;else{if(!(ue instanceof SyntaxError))throw ue;console.log("Syntax error parsing message bundle: ".concat(ue.message,".")),l.unlink(se,function(le){le&&console.error("Deleting corrupted bundle ".concat(se," failed."))}),G=!0}}if($=function(ue,le){var W=m.translationsConfig[ue.id];if(W){var nn=_(W).contents,ne=_(c.join(le,"nls.metadata.json")),Ee=Object.create(null);for(var Oe in ne){var he=ne[Oe],Fe=nn["".concat(ue.outDir,"/").concat(Oe)];if(Fe){for(var Be=[],rn=0;rn<he.keys.length;rn++){var En=he.keys[rn],qo=Fe[y(En)?En:En.key];qo===void 0&&(qo=he.messages[rn]),Be.push(qo)}Ee[Oe]=Be}else Ee[Oe]=he.messages}return Ee}}(A,q),!$||G)return $;if(fe)try{l.writeFileSync(se,JSON.stringify($),{encoding:"utf8",flag:"wx"})}catch(ue){if(ue.code==="EEXIST")return $;throw ue}return $}(N,S)}catch(A){console.log("Load or create bundle failed ",A)}if(!b){if(m.languagePackSupport)return L(S);var T=function(A){for(var q=m.language;q;){var $=c.join(A,"nls.bundle.".concat(q,".json"));if(l.existsSync($))return $;var j=q.lastIndexOf("-");q=j>0?q.substring(0,j):void 0}if(q===void 0&&($=c.join(A,"nls.bundle.json"),l.existsSync($)))return $}(S);if(T)try{return _(T)}catch(A){console.log("Loading in the box message bundle failed.",A)}b=L(S)}return b}function D(N){if(!N)return p.localize;var S=c.extname(N);if(S&&(N=N.substr(0,N.length-S.length)),m.messageFormat===p.MessageFormat.both||m.messageFormat===p.MessageFormat.bundle){var b=function(G){for(var fe,ue=c.dirname(G);fe=c.join(ue,"nls.metadata.header.json"),!l.existsSync(fe);){var le=c.dirname(ue);if(le===ue){fe=void 0;break}ue=le}return fe}(N);if(b){var T=c.dirname(b),A=h[T];if(A===void 0)try{var q=JSON.parse(l.readFileSync(b,"utf8"));try{var $=R(q,T);A=C(T,$?{header:q,nlsBundle:$}:null)}catch(G){console.error("Failed to load nls bundle",G),A=C(T,null)}}catch(G){console.error("Failed to read header file",G),A=C(T,null)}if(A){var j=N.substr(T.length+1).replace(/\\/g,"/"),K=A.nlsBundle[j];return K===void 0?(console.error("Messages for file ".concat(N," not found. See console for details.")),function(){return"Messages not found."}):E(K)}}}if(m.messageFormat===p.MessageFormat.both||m.messageFormat===p.MessageFormat.file)try{var se=_(function(G){var fe;if(!(m.cacheLanguageResolution&&fe)){if(p.isPseudo||!m.language)fe=".nls.json";else for(var ue=m.language;ue;){var le=".nls."+ue+".json";if(l.existsSync(G+le)){fe=le;break}var W=ue.lastIndexOf("-");W>0?ue=ue.substring(0,W):(fe=".nls.json",ue=null)}m.cacheLanguageResolution}return G+fe}(N));return Array.isArray(se)?E(se):(0,p.isDefined)(se.messages)&&(0,p.isDefined)(se.keys)?E(se.messages):(console.error("String bundle '".concat(N,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(G){G.code!=="ENOENT"&&console.error("Failed to load single file bundle",G)}return console.error("Failed to load message bundle for file ".concat(N)),function(){return"Failed to load message bundle. See console for details."}}function O(N){return N&&(y(N.locale)&&(m.locale=N.locale.toLowerCase(),m.language=m.locale,h=Object.create(null)),N.messageFormat!==void 0&&(m.messageFormat=N.messageFormat),N.bundleFormat===p.BundleFormat.standalone&&m.languagePackSupport===!0&&(m.languagePackSupport=!1)),(0,p.setPseudo)(m.locale==="pseudo"),D}(function(){if(m={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:p.MessageFormat.bundle},y(process.env.VSCODE_NLS_CONFIG))try{var N=JSON.parse(process.env.VSCODE_NLS_CONFIG),S=void 0;if(N.availableLanguages){var b=N.availableLanguages["*"];y(b)&&(S=b)}if(y(N.locale)&&(m.locale=N.locale.toLowerCase()),S===void 0?m.language=m.locale:S!=="en"&&(m.language=S),function(A){return A===!0||A===!1}(N._languagePackSupport)&&(m.languagePackSupport=N._languagePackSupport),y(N._cacheRoot)&&(m.cacheRoot=N._cacheRoot),y(N._languagePackId)&&(m.languagePackId=N._languagePackId),y(N._translationsConfigFile)){m.translationsConfigFile=N._translationsConfigFile;try{m.translationsConfig=_(m.translationsConfigFile)}catch{if(N._corruptedFile){var T=c.dirname(N._corruptedFile);l.exists(T,function(q){q&&l.writeFile(N._corruptedFile,"corrupted","utf8",function($){console.error($)})})}}}}catch{}(0,p.setPseudo)(m.locale==="pseudo"),h=Object.create(null)})(),a.loadMessageBundle=D,a.config=O,f.default.install(Object.freeze({loadMessageBundle:D,config:O}))},374:(s,a)=>{function u(){}Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(c){return u}},491:s=>{"use strict";s.exports=require("assert")},361:s=>{"use strict";s.exports=require("events")},147:s=>{"use strict";s.exports=require("fs")},685:s=>{"use strict";s.exports=require("http")},687:s=>{"use strict";s.exports=require("https")},808:s=>{"use strict";s.exports=require("net")},17:s=>{"use strict";s.exports=require("path")},404:s=>{"use strict";s.exports=require("tls")},310:s=>{"use strict";s.exports=require("url")},796:s=>{"use strict";s.exports=require("zlib")}},n={},r=function s(a){var u=n[a];if(u!==void 0)return u.exports;var c=n[a]={exports:{}};return e[a].call(c.exports,c,c.exports,s),c.exports}(539),i=t;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()}}),CO={};bK(CO,{config:()=>PK,t:()=>TO});IO.exports=SK(CO);var TK=require("fs"),IK=require("fs/promises"),EO=wK(CK());async function AK(t){if(t.protocol==="file:")return await(0,IK.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:")try{let e=await(0,EO.xhr)({url:t.toString(),followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"}});return new TextDecoder().decode(e.body)}catch(e){throw new Error(e.responseText??(0,EO.getErrorStatusDescription)(e.status)??e.toString())}throw new Error("Unsupported protocol")}function RK(t){return(0,TK.readFileSync)(t,"utf8")}var sa;function PK(t){if("contents"in t){typeof t.contents=="string"?sa=JSON.parse(t.contents):sa=t.contents;return}if("fsPath"in t){let e=RK(t.fsPath),n=JSON.parse(e);sa=bO(n)?n.contents.bundle:n;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((n,r)=>{let i=AK(e).then(o=>{try{let s=JSON.parse(o);sa=bO(s)?s.contents.bundle:s}catch(s){r(s)}}).catch(o=>{r(o)});n(i)})}}function TO(...t){let e=t[0],n,r,i;if(typeof e=="string")n=e,r=e,t.splice(0,1),i=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let s=t.slice(1);if(e.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let a=e[0];for(let u=1;u<e.length;u++)a+=`{${u-1}}`+e[u];return TO(a,...s)}else r=e.message,n=r,e.comment&&e.comment.length>0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};let o=sa==null?void 0:sa[n];return o?typeof o=="string"?Ch(o,i):o.comment?Ch(o.message,i):Ch(r,i):Ch(r,i)}var OK=/{([^}]+)}/g;function Ch(t,e){return t.replace(OK,(n,r)=>e[r]??n)}function bO(t){var e;return typeof((e=t==null?void 0:t.contents)==null?void 0:e.bundle)=="object"&&typeof(t==null?void 0:t.version)=="string"}});var FO=x((s0e,kO)=>{var Uc=1e3,jc=Uc*60,$c=jc*60,aa=$c*24,HK=aa*7,BK=aa*365.25;kO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return GK(t);if(n==="number"&&isFinite(t))return e.long?VK(t):zK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function GK(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*BK;case"weeks":case"week":case"w":return n*HK;case"days":case"day":case"d":return n*aa;case"hours":case"hour":case"hrs":case"hr":case"h":return n*$c;case"minutes":case"minute":case"mins":case"min":case"m":return n*jc;case"seconds":case"second":case"secs":case"sec":case"s":return n*Uc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function zK(t){var e=Math.abs(t);return e>=aa?Math.round(t/aa)+"d":e>=$c?Math.round(t/$c)+"h":e>=jc?Math.round(t/jc)+"m":e>=Uc?Math.round(t/Uc)+"s":t+"ms"}function VK(t){var e=Math.abs(t);return e>=aa?Rh(t,e,aa,"day"):e>=$c?Rh(t,e,$c,"hour"):e>=jc?Rh(t,e,jc,"minute"):e>=Uc?Rh(t,e,Uc,"second"):t+" ms"}function Rh(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var O_=x((a0e,MO)=>{function WK(t){n.debug=n,n.default=n,n.coerce=u,n.disable=o,n.enable=i,n.enabled=s,n.humanize=FO(),n.destroy=c,Object.keys(t).forEach(l=>{n[l]=t[l]}),n.names=[],n.skips=[],n.formatters={};function e(l){let f=0;for(let p=0;p<l.length;p++)f=(f<<5)-f+l.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(l){let f,p=null,d,h;function m(...g){if(!m.enabled)return;let v=m,y=Number(new Date),_=y-(f||y);v.diff=_,v.prev=f,v.curr=y,f=y,g[0]=n.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let E=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(L,R)=>{if(L==="%%")return"%";E++;let D=n.formatters[R];if(typeof D=="function"){let O=g[E];L=D.call(v,O),g.splice(E,1),E--}return L}),n.formatArgs.call(v,g),(v.log||n.log).apply(v,g)}return m.namespace=l,m.useColors=n.useColors(),m.color=n.selectColor(l),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==n.namespaces&&(d=n.namespaces,h=n.enabled(l)),h),set:g=>{p=g}}),typeof n.init=="function"&&n.init(m),m}function r(l,f){let p=n(this.namespace+(typeof f>"u"?":":f)+l);return p.log=this.log,p}function i(l){n.save(l),n.namespaces=l,n.names=[],n.skips=[];let f,p=(typeof l=="string"?l:"").split(/[\s,]+/),d=p.length;for(f=0;f<d;f++)p[f]&&(l=p[f].replace(/\*/g,".*?"),l[0]==="-"?n.skips.push(new RegExp("^"+l.slice(1)+"$")):n.names.push(new RegExp("^"+l+"$")))}function o(){let l=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),l}function s(l){if(l[l.length-1]==="*")return!0;let f,p;for(f=0,p=n.skips.length;f<p;f++)if(n.skips[f].test(l))return!1;for(f=0,p=n.names.length;f<p;f++)if(n.names[f].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}MO.exports=WK});var qO=x((Zn,Ph)=>{Zn.formatArgs=KK;Zn.save=XK;Zn.load=JK;Zn.useColors=YK;Zn.storage=QK();Zn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Zn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function YK(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function KK(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ph.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(n++,i==="%c"&&(r=n))}),t.splice(r,0,e)}Zn.log=console.debug||console.log||(()=>{});function XK(t){try{t?Zn.storage.setItem("debug",t):Zn.storage.removeItem("debug")}catch{}}function JK(){let t;try{t=Zn.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function QK(){try{return localStorage}catch{}}Ph.exports=O_()(Zn);var{formatters:ZK}=Ph.exports;ZK.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var jO=x((c0e,UO)=>{"use strict";UO.exports=(t,e)=>{e=e||process.argv;let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),i=e.indexOf("--");return r!==-1&&(i===-1?!0:r<i)}});var HO=x((u0e,$O)=>{"use strict";var e9=require("os"),Wr=jO(),sn=process.env,Hc;Wr("no-color")||Wr("no-colors")||Wr("color=false")?Hc=!1:(Wr("color")||Wr("colors")||Wr("color=true")||Wr("color=always"))&&(Hc=!0);"FORCE_COLOR"in sn&&(Hc=sn.FORCE_COLOR.length===0||parseInt(sn.FORCE_COLOR,10)!==0);function t9(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function n9(t){if(Hc===!1)return 0;if(Wr("color=16m")||Wr("color=full")||Wr("color=truecolor"))return 3;if(Wr("color=256"))return 2;if(t&&!t.isTTY&&Hc!==!0)return 0;let e=Hc?1:0;if(process.platform==="win32"){let n=e9.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in sn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(n=>n in sn)||sn.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in sn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(sn.TEAMCITY_VERSION)?1:0;if(sn.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in sn){let n=parseInt((sn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(sn.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(sn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(sn.TERM)||"COLORTERM"in sn?1:(sn.TERM==="dumb",e)}function N_(t){let e=n9(t);return t9(e)}$O.exports={supportsColor:N_,stdout:N_(process.stdout),stderr:N_(process.stderr)}});var GO=x((Vt,Nh)=>{var r9=require("tty"),Oh=require("util");Vt.init=l9;Vt.log=a9;Vt.formatArgs=o9;Vt.save=c9;Vt.load=u9;Vt.useColors=i9;Vt.destroy=Oh.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Vt.colors=[6,2,3,4,5,1];try{let t=HO();t&&(t.stderr||t).level>=2&&(Vt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Vt.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function i9(){return"colors"in Vt.inspectOpts?!!Vt.inspectOpts.colors:r9.isatty(process.stderr.fd)}function o9(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,i="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
|
|
`).join(`
|
|
`+o),t.push(i+"m+"+Nh.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=s9()+e+" "+t[0]}function s9(){return Vt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function a9(...t){return process.stderr.write(Oh.format(...t)+`
|
|
`)}function c9(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function u9(){return process.env.DEBUG}function l9(t){t.inspectOpts={};let e=Object.keys(Vt.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Vt.inspectOpts[e[n]]}Nh.exports=O_()(Vt);var{formatters:BO}=Nh.exports;BO.o=function(t){return this.inspectOpts.colors=this.useColors,Oh.inspect(t,this.inspectOpts).split(`
|
|
`).map(e=>e.trim()).join(" ")};BO.O=function(t){return this.inspectOpts.colors=this.useColors,Oh.inspect(t,this.inspectOpts)}});var Wi=x((l0e,D_)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?D_.exports=qO():D_.exports=GO()});var VO=x((f0e,zO)=>{var yf;zO.exports=function(){if(!yf){try{yf=Wi()("follow-redirects")}catch{}typeof yf!="function"&&(yf=function(){})}yf.apply(null,arguments)}});var V_=x((p0e,z_)=>{var Ef=require("url"),xf=Ef.URL,f9=require("http"),p9=require("https"),q_=require("stream").Writable,U_=require("assert"),WO=VO(),j_=!1;try{U_(new xf)}catch(t){j_=t.code==="ERR_INVALID_URL"}var d9=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],$_=["abort","aborted","connect","error","socket","timeout"],H_=Object.create(null);$_.forEach(function(t){H_[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var k_=bf("ERR_INVALID_URL","Invalid URL",TypeError),F_=bf("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),h9=bf("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",F_),m9=bf("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),g9=bf("ERR_STREAM_WRITE_AFTER_END","write after end"),v9=q_.prototype.destroy||KO;function Dn(t,e){q_.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(i){n.emit("error",i instanceof F_?i:new F_({cause:i}))}},this._performRequest()}Dn.prototype=Object.create(q_.prototype);Dn.prototype.abort=function(){G_(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Dn.prototype.destroy=function(t){return G_(this._currentRequest,t),v9.call(this,t),this};Dn.prototype.write=function(t,e,n){if(this._ending)throw new g9;if(!ca(t)&&!_9(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(_f(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new m9),this.abort())};Dn.prototype.end=function(t,e,n){if(_f(t)?(n=t,t=e=null):_f(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,i=this._currentRequest;this.write(t,e,function(){r._ended=!0,i.end(null,null,n)}),this._ending=!0}};Dn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Dn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Dn.prototype.setTimeout=function(t,e){var n=this;function r(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o()},t),r(s)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Dn.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Dn.prototype,t,{get:function(){return this._currentRequest[t]}})});Dn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Dn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var i of $_)r.on(i,H_[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ef.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function u(c){if(r===s._currentRequest)if(c)s.emit("error",c);else if(o<a.length){var l=a[o++];r.finished||r.write(l.data,l.encoding,u)}else s._ended&&r.end()})()}};Dn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var n=t.headers.location;if(!n||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(G_(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new h9;var r,i=this._options.beforeRedirect;i&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],L_(/^content-/i,this._options.headers));var s=L_(/^host$/i,this._options.headers),a=B_(this._currentUrl),u=s||a.host,c=/^\w+:/.test(n)?this._currentUrl:Ef.format(Object.assign(a,{host:u})),l=y9(n,c);if(WO("redirecting to",l.href),this._isRedirect=!0,M_(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!x9(l.host,u))&&L_(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),_f(i)){var f={headers:t.headers,statusCode:e},p={url:c,method:o,headers:r};i(this._options,f,p),this._sanitizeOptions(this._options)}this._performRequest()};function YO(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var i=r+":",o=n[i]=t[r],s=e[r]=Object.create(o);function a(c,l,f){return E9(c)?c=M_(c):ca(c)?c=M_(B_(c)):(f=l,l=XO(c),c={protocol:i}),_f(l)&&(f=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,l),l.nativeProtocols=n,!ca(l.host)&&!ca(l.hostname)&&(l.hostname="::1"),U_.equal(l.protocol,i,"protocol mismatch"),WO("options",l),new Dn(l,f)}function u(c,l,f){var p=s.request(c,l,f);return p.end(),p}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),e}function KO(){}function B_(t){var e;if(j_)e=new xf(t);else if(e=XO(Ef.parse(t)),!ca(e.protocol))throw new k_({input:t});return e}function y9(t,e){return j_?new xf(t,e):B_(Ef.resolve(e,t))}function XO(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new k_({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new k_({input:t.href||t});return t}function M_(t,e){var n=e||{};for(var r of d9)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function L_(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}function bf(t,e,n){function r(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}function G_(t,e){for(var n of $_)t.removeListener(n,H_[n]);t.on("error",KO),t.destroy(e)}function x9(t,e){U_(ca(t)&&ca(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function ca(t){return typeof t=="string"||t instanceof String}function _f(t){return typeof t=="function"}function _9(t){return typeof t=="object"&&"length"in t}function E9(t){return xf&&t instanceof xf}z_.exports=YO({http:f9,https:p9});z_.exports.wrap=YO});var Bc=x((d0e,QO)=>{"use strict";var JO=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);QO.exports=t=>t?Object.keys(t).map(e=>[JO.has(e)?JO.get(e):e,t[e]]).reduce((e,n)=>(e[n[0]]=n[1],e),Object.create(null)):{}});var Uh=x(cN=>{"use strict";var ZO=typeof process=="object"&&process?process:{stdout:null,stderr:null},b9=require("events"),eN=require("stream"),w9=require("string_decoder"),tN=w9.StringDecoder,Yi=Symbol("EOF"),Ki=Symbol("maybeEmitEnd"),Vo=Symbol("emittedEnd"),Dh=Symbol("emittingEnd"),wf=Symbol("emittedError"),Lh=Symbol("closed"),nN=Symbol("read"),kh=Symbol("flush"),rN=Symbol("flushChunk"),Ln=Symbol("encoding"),Xi=Symbol("decoder"),Fh=Symbol("flowing"),Sf=Symbol("paused"),Gc=Symbol("resume"),vt=Symbol("buffer"),fi=Symbol("pipes"),Ut=Symbol("bufferLength"),W_=Symbol("bufferPush"),Y_=Symbol("bufferShift"),Wt=Symbol("objectMode"),yt=Symbol("destroyed"),K_=Symbol("error"),X_=Symbol("emitData"),iN=Symbol("emitEnd"),J_=Symbol("emitEnd2"),Ji=Symbol("async"),Q_=Symbol("abort"),Mh=Symbol("aborted"),ua=Symbol("signal"),Cf=t=>Promise.resolve().then(t),aN=global._MP_NO_ITERATOR_SYMBOLS_!=="1",oN=aN&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),sN=aN&&Symbol.iterator||Symbol("iterator not implemented"),S9=t=>t==="end"||t==="finish"||t==="prefinish",C9=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,T9=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),qh=class{constructor(e,n,r){this.src=e,this.dest=n,this.opts=r,this.ondrain=()=>e[Gc](),n.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Z_=class extends qh{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,n,r){super(e,n,r),this.proxyErrors=i=>n.emit("error",i),e.on("error",this.proxyErrors)}},eE=class t extends eN{constructor(e){super(),this[Fh]=!1,this[Sf]=!1,this[fi]=[],this[vt]=[],this[Wt]=e&&e.objectMode||!1,this[Wt]?this[Ln]=null:this[Ln]=e&&e.encoding||null,this[Ln]==="buffer"&&(this[Ln]=null),this[Ji]=e&&!!e.async||!1,this[Xi]=this[Ln]?new tN(this[Ln]):null,this[Yi]=!1,this[Vo]=!1,this[Dh]=!1,this[Lh]=!1,this[wf]=null,this.writable=!0,this.readable=!0,this[Ut]=0,this[yt]=!1,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[vt]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[fi]}),this[ua]=e&&e.signal,this[Mh]=!1,this[ua]&&(this[ua].addEventListener("abort",()=>this[Q_]()),this[ua].aborted&&this[Q_]())}get bufferLength(){return this[Ut]}get encoding(){return this[Ln]}set encoding(e){if(this[Wt])throw new Error("cannot set encoding in objectMode");if(this[Ln]&&e!==this[Ln]&&(this[Xi]&&this[Xi].lastNeed||this[Ut]))throw new Error("cannot change encoding");this[Ln]!==e&&(this[Xi]=e?new tN(e):null,this[vt].length&&(this[vt]=this[vt].map(n=>this[Xi].write(n)))),this[Ln]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Wt]}set objectMode(e){this[Wt]=this[Wt]||!!e}get async(){return this[Ji]}set async(e){this[Ji]=this[Ji]||!!e}[Q_](){this[Mh]=!0,this.emit("abort",this[ua].reason),this.destroy(this[ua].reason)}get aborted(){return this[Mh]}set aborted(e){}write(e,n,r){if(this[Mh])return!1;if(this[Yi])throw new Error("write after end");if(this[yt])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof n=="function"&&(r=n,n="utf8"),n||(n="utf8");let i=this[Ji]?Cf:o=>o();return!this[Wt]&&!Buffer.isBuffer(e)&&(T9(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):C9(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Wt]?(this.flowing&&this[Ut]!==0&&this[kh](!0),this.flowing?this.emit("data",e):this[W_](e),this[Ut]!==0&&this.emit("readable"),r&&i(r),this.flowing):e.length?(typeof e=="string"&&!(n===this[Ln]&&!this[Xi].lastNeed)&&(e=Buffer.from(e,n)),Buffer.isBuffer(e)&&this[Ln]&&(e=this[Xi].write(e)),this.flowing&&this[Ut]!==0&&this[kh](!0),this.flowing?this.emit("data",e):this[W_](e),this[Ut]!==0&&this.emit("readable"),r&&i(r),this.flowing):(this[Ut]!==0&&this.emit("readable"),r&&i(r),this.flowing)}read(e){if(this[yt])return null;if(this[Ut]===0||e===0||e>this[Ut])return this[Ki](),null;this[Wt]&&(e=null),this[vt].length>1&&!this[Wt]&&(this.encoding?this[vt]=[this[vt].join("")]:this[vt]=[Buffer.concat(this[vt],this[Ut])]);let n=this[nN](e||null,this[vt][0]);return this[Ki](),n}[nN](e,n){return e===n.length||e===null?this[Y_]():(this[vt][0]=n.slice(e),n=n.slice(0,e),this[Ut]-=e),this.emit("data",n),!this[vt].length&&!this[Yi]&&this.emit("drain"),n}end(e,n,r){return typeof e=="function"&&(r=e,e=null),typeof n=="function"&&(r=n,n="utf8"),e&&this.write(e,n),r&&this.once("end",r),this[Yi]=!0,this.writable=!1,(this.flowing||!this[Sf])&&this[Ki](),this}[Gc](){this[yt]||(this[Sf]=!1,this[Fh]=!0,this.emit("resume"),this[vt].length?this[kh]():this[Yi]?this[Ki]():this.emit("drain"))}resume(){return this[Gc]()}pause(){this[Fh]=!1,this[Sf]=!0}get destroyed(){return this[yt]}get flowing(){return this[Fh]}get paused(){return this[Sf]}[W_](e){this[Wt]?this[Ut]+=1:this[Ut]+=e.length,this[vt].push(e)}[Y_](){return this[Wt]?this[Ut]-=1:this[Ut]-=this[vt][0].length,this[vt].shift()}[kh](e){do;while(this[rN](this[Y_]())&&this[vt].length);!e&&!this[vt].length&&!this[Yi]&&this.emit("drain")}[rN](e){return this.emit("data",e),this.flowing}pipe(e,n){if(this[yt])return;let r=this[Vo];return n=n||{},e===ZO.stdout||e===ZO.stderr?n.end=!1:n.end=n.end!==!1,n.proxyErrors=!!n.proxyErrors,r?n.end&&e.end():(this[fi].push(n.proxyErrors?new Z_(this,e,n):new qh(this,e,n)),this[Ji]?Cf(()=>this[Gc]()):this[Gc]()),e}unpipe(e){let n=this[fi].find(r=>r.dest===e);n&&(this[fi].splice(this[fi].indexOf(n),1),n.unpipe())}addListener(e,n){return this.on(e,n)}on(e,n){let r=super.on(e,n);return e==="data"&&!this[fi].length&&!this.flowing?this[Gc]():e==="readable"&&this[Ut]!==0?super.emit("readable"):S9(e)&&this[Vo]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[wf]&&(this[Ji]?Cf(()=>n.call(this,this[wf])):n.call(this,this[wf])),r}get emittedEnd(){return this[Vo]}[Ki](){!this[Dh]&&!this[Vo]&&!this[yt]&&this[vt].length===0&&this[Yi]&&(this[Dh]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Lh]&&this.emit("close"),this[Dh]=!1)}emit(e,n,...r){if(e!=="error"&&e!=="close"&&e!==yt&&this[yt])return;if(e==="data")return!this[Wt]&&!n?!1:this[Ji]?Cf(()=>this[X_](n)):this[X_](n);if(e==="end")return this[iN]();if(e==="close"){if(this[Lh]=!0,!this[Vo]&&!this[yt])return;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(e==="error"){this[wf]=n,super.emit(K_,n);let o=!this[ua]||this.listeners("error").length?super.emit("error",n):!1;return this[Ki](),o}else if(e==="resume"){let o=super.emit("resume");return this[Ki](),o}else if(e==="finish"||e==="prefinish"){let o=super.emit(e);return this.removeAllListeners(e),o}let i=super.emit(e,n,...r);return this[Ki](),i}[X_](e){for(let r of this[fi])r.dest.write(e)===!1&&this.pause();let n=super.emit("data",e);return this[Ki](),n}[iN](){this[Vo]||(this[Vo]=!0,this.readable=!1,this[Ji]?Cf(()=>this[J_]()):this[J_]())}[J_](){if(this[Xi]){let n=this[Xi].end();if(n){for(let r of this[fi])r.dest.write(n);super.emit("data",n)}}for(let n of this[fi])n.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Wt]||(e.dataLength=0);let n=this.promise();return this.on("data",r=>{e.push(r),this[Wt]||(e.dataLength+=r.length)}),n.then(()=>e)}concat(){return this[Wt]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Wt]?Promise.reject(new Error("cannot concat in objectMode")):this[Ln]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,n)=>{this.on(yt,()=>n(new Error("stream destroyed"))),this.on("error",r=>n(r)),this.on("end",()=>e())})}[oN](){let e=!1,n=()=>(this.pause(),e=!0,Promise.resolve({done:!0}));return{next:()=>{if(e)return n();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Yi])return n();let o=null,s=null,a=f=>{this.removeListener("data",u),this.removeListener("end",c),this.removeListener(yt,l),n(),s(f)},u=f=>{this.removeListener("error",a),this.removeListener("end",c),this.removeListener(yt,l),this.pause(),o({value:f,done:!!this[Yi]})},c=()=>{this.removeListener("error",a),this.removeListener("data",u),this.removeListener(yt,l),n(),o({done:!0})},l=()=>a(new Error("stream destroyed"));return new Promise((f,p)=>{s=p,o=f,this.once(yt,l),this.once("error",a),this.once("end",c),this.once("data",u)})},throw:n,return:n,[oN](){return this}}}[sN](){let e=!1,n=()=>(this.pause(),this.removeListener(K_,n),this.removeListener(yt,n),this.removeListener("end",n),e=!0,{done:!0}),r=()=>{if(e)return n();let i=this.read();return i===null?n():{value:i}};return this.once("end",n),this.once(K_,n),this.once(yt,n),{next:r,throw:n,return:n,[sN](){return this}}}destroy(e){return this[yt]?(e?this.emit("error",e):this.emit(yt),this):(this[yt]=!0,this[vt].length=0,this[Ut]=0,typeof this.close=="function"&&!this[Lh]&&this.close(),e?this.emit("error",e):this.emit(yt),this)}static isStream(e){return!!e&&(e instanceof t||e instanceof eN||e instanceof b9&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}};cN.Minipass=eE});var lN=x((m0e,uN)=>{var I9=require("zlib").constants||{ZLIB_VERNUM:4736};uN.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},I9))});var sE=x((g0e,xN)=>{"use strict";var fN=typeof process=="object"&&process?process:{stdout:null,stderr:null},A9=require("events"),pN=require("stream"),dN=require("string_decoder").StringDecoder,Qi=Symbol("EOF"),Zi=Symbol("maybeEmitEnd"),Wo=Symbol("emittedEnd"),jh=Symbol("emittingEnd"),Tf=Symbol("emittedError"),$h=Symbol("closed"),hN=Symbol("read"),Hh=Symbol("flush"),mN=Symbol("flushChunk"),kn=Symbol("encoding"),eo=Symbol("decoder"),Bh=Symbol("flowing"),If=Symbol("paused"),zc=Symbol("resume"),jt=Symbol("bufferLength"),tE=Symbol("bufferPush"),nE=Symbol("bufferShift"),an=Symbol("objectMode"),cn=Symbol("destroyed"),rE=Symbol("emitData"),gN=Symbol("emitEnd"),iE=Symbol("emitEnd2"),to=Symbol("async"),Af=t=>Promise.resolve().then(t),vN=global._MP_NO_ITERATOR_SYMBOLS_!=="1",R9=vN&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),P9=vN&&Symbol.iterator||Symbol("iterator not implemented"),O9=t=>t==="end"||t==="finish"||t==="prefinish",N9=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,D9=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Gh=class{constructor(e,n,r){this.src=e,this.dest=n,this.opts=r,this.ondrain=()=>e[zc](),n.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},oE=class extends Gh{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,n,r){super(e,n,r),this.proxyErrors=i=>n.emit("error",i),e.on("error",this.proxyErrors)}};xN.exports=class yN extends pN{constructor(e){super(),this[Bh]=!1,this[If]=!1,this.pipes=[],this.buffer=[],this[an]=e&&e.objectMode||!1,this[an]?this[kn]=null:this[kn]=e&&e.encoding||null,this[kn]==="buffer"&&(this[kn]=null),this[to]=e&&!!e.async||!1,this[eo]=this[kn]?new dN(this[kn]):null,this[Qi]=!1,this[Wo]=!1,this[jh]=!1,this[$h]=!1,this[Tf]=null,this.writable=!0,this.readable=!0,this[jt]=0,this[cn]=!1}get bufferLength(){return this[jt]}get encoding(){return this[kn]}set encoding(e){if(this[an])throw new Error("cannot set encoding in objectMode");if(this[kn]&&e!==this[kn]&&(this[eo]&&this[eo].lastNeed||this[jt]))throw new Error("cannot change encoding");this[kn]!==e&&(this[eo]=e?new dN(e):null,this.buffer.length&&(this.buffer=this.buffer.map(n=>this[eo].write(n)))),this[kn]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[an]}set objectMode(e){this[an]=this[an]||!!e}get async(){return this[to]}set async(e){this[to]=this[to]||!!e}write(e,n,r){if(this[Qi])throw new Error("write after end");if(this[cn])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof n=="function"&&(r=n,n="utf8"),n||(n="utf8");let i=this[to]?Af:o=>o();return!this[an]&&!Buffer.isBuffer(e)&&(D9(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):N9(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[an]?(this.flowing&&this[jt]!==0&&this[Hh](!0),this.flowing?this.emit("data",e):this[tE](e),this[jt]!==0&&this.emit("readable"),r&&i(r),this.flowing):e.length?(typeof e=="string"&&!(n===this[kn]&&!this[eo].lastNeed)&&(e=Buffer.from(e,n)),Buffer.isBuffer(e)&&this[kn]&&(e=this[eo].write(e)),this.flowing&&this[jt]!==0&&this[Hh](!0),this.flowing?this.emit("data",e):this[tE](e),this[jt]!==0&&this.emit("readable"),r&&i(r),this.flowing):(this[jt]!==0&&this.emit("readable"),r&&i(r),this.flowing)}read(e){if(this[cn])return null;if(this[jt]===0||e===0||e>this[jt])return this[Zi](),null;this[an]&&(e=null),this.buffer.length>1&&!this[an]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[jt])]);let n=this[hN](e||null,this.buffer[0]);return this[Zi](),n}[hN](e,n){return e===n.length||e===null?this[nE]():(this.buffer[0]=n.slice(e),n=n.slice(0,e),this[jt]-=e),this.emit("data",n),!this.buffer.length&&!this[Qi]&&this.emit("drain"),n}end(e,n,r){return typeof e=="function"&&(r=e,e=null),typeof n=="function"&&(r=n,n="utf8"),e&&this.write(e,n),r&&this.once("end",r),this[Qi]=!0,this.writable=!1,(this.flowing||!this[If])&&this[Zi](),this}[zc](){this[cn]||(this[If]=!1,this[Bh]=!0,this.emit("resume"),this.buffer.length?this[Hh]():this[Qi]?this[Zi]():this.emit("drain"))}resume(){return this[zc]()}pause(){this[Bh]=!1,this[If]=!0}get destroyed(){return this[cn]}get flowing(){return this[Bh]}get paused(){return this[If]}[tE](e){this[an]?this[jt]+=1:this[jt]+=e.length,this.buffer.push(e)}[nE](){return this.buffer.length&&(this[an]?this[jt]-=1:this[jt]-=this.buffer[0].length),this.buffer.shift()}[Hh](e){do;while(this[mN](this[nE]()));!e&&!this.buffer.length&&!this[Qi]&&this.emit("drain")}[mN](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,n){if(this[cn])return;let r=this[Wo];return n=n||{},e===fN.stdout||e===fN.stderr?n.end=!1:n.end=n.end!==!1,n.proxyErrors=!!n.proxyErrors,r?n.end&&e.end():(this.pipes.push(n.proxyErrors?new oE(this,e,n):new Gh(this,e,n)),this[to]?Af(()=>this[zc]()):this[zc]()),e}unpipe(e){let n=this.pipes.find(r=>r.dest===e);n&&(this.pipes.splice(this.pipes.indexOf(n),1),n.unpipe())}addListener(e,n){return this.on(e,n)}on(e,n){let r=super.on(e,n);return e==="data"&&!this.pipes.length&&!this.flowing?this[zc]():e==="readable"&&this[jt]!==0?super.emit("readable"):O9(e)&&this[Wo]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Tf]&&(this[to]?Af(()=>n.call(this,this[Tf])):n.call(this,this[Tf])),r}get emittedEnd(){return this[Wo]}[Zi](){!this[jh]&&!this[Wo]&&!this[cn]&&this.buffer.length===0&&this[Qi]&&(this[jh]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[$h]&&this.emit("close"),this[jh]=!1)}emit(e,n,...r){if(e!=="error"&&e!=="close"&&e!==cn&&this[cn])return;if(e==="data")return n?this[to]?Af(()=>this[rE](n)):this[rE](n):!1;if(e==="end")return this[gN]();if(e==="close"){if(this[$h]=!0,!this[Wo]&&!this[cn])return;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(e==="error"){this[Tf]=n;let o=super.emit("error",n);return this[Zi](),o}else if(e==="resume"){let o=super.emit("resume");return this[Zi](),o}else if(e==="finish"||e==="prefinish"){let o=super.emit(e);return this.removeAllListeners(e),o}let i=super.emit(e,n,...r);return this[Zi](),i}[rE](e){for(let r of this.pipes)r.dest.write(e)===!1&&this.pause();let n=super.emit("data",e);return this[Zi](),n}[gN](){this[Wo]||(this[Wo]=!0,this.readable=!1,this[to]?Af(()=>this[iE]()):this[iE]())}[iE](){if(this[eo]){let n=this[eo].end();if(n){for(let r of this.pipes)r.dest.write(n);super.emit("data",n)}}for(let n of this.pipes)n.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[an]||(e.dataLength=0);let n=this.promise();return this.on("data",r=>{e.push(r),this[an]||(e.dataLength+=r.length)}),n.then(()=>e)}concat(){return this[an]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[an]?Promise.reject(new Error("cannot concat in objectMode")):this[kn]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,n)=>{this.on(cn,()=>n(new Error("stream destroyed"))),this.on("error",r=>n(r)),this.on("end",()=>e())})}[R9](){return{next:()=>{let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[Qi])return Promise.resolve({done:!0});let r=null,i=null,o=c=>{this.removeListener("data",s),this.removeListener("end",a),i(c)},s=c=>{this.removeListener("error",o),this.removeListener("end",a),this.pause(),r({value:c,done:!!this[Qi]})},a=()=>{this.removeListener("error",o),this.removeListener("data",s),r({done:!0})},u=()=>o(new Error("stream destroyed"));return new Promise((c,l)=>{i=l,r=c,this.once(cn,u),this.once("error",o),this.once("end",a),this.once("data",s)})}}}[P9](){return{next:()=>{let n=this.read();return{value:n,done:n===null}}}}destroy(e){return this[cn]?(e?this.emit("error",e):this.emit(cn),this):(this[cn]=!0,this.buffer.length=0,this[jt]=0,typeof this.close=="function"&&!this[$h]&&this.close(),e?this.emit("error",e):this.emit(cn),this)}static isStream(e){return!!e&&(e instanceof yN||e instanceof pN||e instanceof A9&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var bE=x(er=>{"use strict";var fE=require("assert"),Yo=require("buffer").Buffer,bN=require("zlib"),la=er.constants=lN(),L9=sE(),_N=Yo.concat,fa=Symbol("_superWrite"),Wc=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},k9=Symbol("opts"),Rf=Symbol("flushFlag"),EN=Symbol("finishFlushFlag"),EE=Symbol("fullFlushFlag"),ze=Symbol("handle"),zh=Symbol("onError"),Vc=Symbol("sawError"),aE=Symbol("level"),cE=Symbol("strategy"),uE=Symbol("ended"),v0e=Symbol("_defaultFullFlush"),Vh=class extends L9{constructor(e,n){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[Vc]=!1,this[uE]=!1,this[k9]=e,this[Rf]=e.flush,this[EN]=e.finishFlush;try{this[ze]=new bN[n](e)}catch(r){throw new Wc(r)}this[zh]=r=>{this[Vc]||(this[Vc]=!0,this.close(),this.emit("error",r))},this[ze].on("error",r=>this[zh](new Wc(r))),this.once("end",()=>this.close)}close(){this[ze]&&(this[ze].close(),this[ze]=null,this.emit("close"))}reset(){if(!this[Vc])return fE(this[ze],"zlib binding closed"),this[ze].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[EE]),this.write(Object.assign(Yo.alloc(0),{[Rf]:e})))}end(e,n,r){return e&&this.write(e,n),this.flush(this[EN]),this[uE]=!0,super.end(null,null,r)}get ended(){return this[uE]}write(e,n,r){if(typeof n=="function"&&(r=n,n="utf8"),typeof e=="string"&&(e=Yo.from(e,n)),this[Vc])return;fE(this[ze],"zlib binding closed");let i=this[ze]._handle,o=i.close;i.close=()=>{};let s=this[ze].close;this[ze].close=()=>{},Yo.concat=c=>c;let a;try{let c=typeof e[Rf]=="number"?e[Rf]:this[Rf];a=this[ze]._processChunk(e,c),Yo.concat=_N}catch(c){Yo.concat=_N,this[zh](new Wc(c))}finally{this[ze]&&(this[ze]._handle=i,i.close=o,this[ze].close=s,this[ze].removeAllListeners("error"))}this[ze]&&this[ze].on("error",c=>this[zh](new Wc(c)));let u;if(a)if(Array.isArray(a)&&a.length>0){u=this[fa](Yo.from(a[0]));for(let c=1;c<a.length;c++)u=this[fa](a[c])}else u=this[fa](Yo.from(a));return r&&r(),u}[fa](e){return super.write(e)}},no=class extends Vh{constructor(e,n){e=e||{},e.flush=e.flush||la.Z_NO_FLUSH,e.finishFlush=e.finishFlush||la.Z_FINISH,super(e,n),this[EE]=la.Z_FULL_FLUSH,this[aE]=e.level,this[cE]=e.strategy}params(e,n){if(!this[Vc]){if(!this[ze])throw new Error("cannot switch params when binding is closed");if(!this[ze].params)throw new Error("not supported in this implementation");if(this[aE]!==e||this[cE]!==n){this.flush(la.Z_SYNC_FLUSH),fE(this[ze],"zlib binding closed");let r=this[ze].flush;this[ze].flush=(i,o)=>{this.flush(i),o()};try{this[ze].params(e,n)}finally{this[ze].flush=r}this[ze]&&(this[aE]=e,this[cE]=n)}}}},pE=class extends no{constructor(e){super(e,"Deflate")}},dE=class extends no{constructor(e){super(e,"Inflate")}},lE=Symbol("_portable"),hE=class extends no{constructor(e){super(e,"Gzip"),this[lE]=e&&!!e.portable}[fa](e){return this[lE]?(this[lE]=!1,e[9]=255,super[fa](e)):super[fa](e)}},mE=class extends no{constructor(e){super(e,"Gunzip")}},gE=class extends no{constructor(e){super(e,"DeflateRaw")}},vE=class extends no{constructor(e){super(e,"InflateRaw")}},yE=class extends no{constructor(e){super(e,"Unzip")}},Wh=class extends Vh{constructor(e,n){e=e||{},e.flush=e.flush||la.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||la.BROTLI_OPERATION_FINISH,super(e,n),this[EE]=la.BROTLI_OPERATION_FLUSH}},xE=class extends Wh{constructor(e){super(e,"BrotliCompress")}},_E=class extends Wh{constructor(e){super(e,"BrotliDecompress")}};er.Deflate=pE;er.Inflate=dE;er.Gzip=hE;er.Gunzip=mE;er.DeflateRaw=gE;er.InflateRaw=vE;er.Unzip=yE;typeof bN.BrotliCompress=="function"?(er.BrotliCompress=xE,er.BrotliDecompress=_E):er.BrotliCompress=er.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Yc=x((_0e,wN)=>{var F9=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;wN.exports=F9!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var Yh=x((b0e,SN)=>{"use strict";var{Minipass:M9}=Uh(),wE=Yc(),SE=Symbol("slurp");SN.exports=class extends M9{constructor(e,n,r){switch(super(),this.pause(),this.extended=n,this.globalExtended=r,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=wE(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=wE(e.linkpath),this.uname=e.uname,this.gname=e.gname,n&&this[SE](n),r&&this[SE](r,!0)}write(e){let n=e.length;if(n>this.blockRemain)throw new Error("writing more to entry than is appropriate");let r=this.remain,i=this.blockRemain;return this.remain=Math.max(0,r-n),this.blockRemain=Math.max(0,i-n),this.ignore?!0:r>=n?super.write(e):super.write(e.slice(0,r))}[SE](e,n){for(let r in e)e[r]!==null&&e[r]!==void 0&&!(n&&r==="path")&&(this[r]=r==="path"||r==="linkpath"?wE(e[r]):e[r])}}});var CE=x(Kh=>{"use strict";Kh.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);Kh.code=new Map(Array.from(Kh.name).map(t=>[t[1],t[0]]))});var AN=x((S0e,IN)=>{"use strict";var q9=(t,e)=>{if(Number.isSafeInteger(t))t<0?j9(t,e):U9(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},U9=(t,e)=>{e[0]=128;for(var n=e.length;n>1;n--)e[n-1]=t&255,t=Math.floor(t/256)},j9=(t,e)=>{e[0]=255;var n=!1;t=t*-1;for(var r=e.length;r>1;r--){var i=t&255;t=Math.floor(t/256),n?e[r-1]=CN(i):i===0?e[r-1]=0:(n=!0,e[r-1]=TN(i))}},$9=t=>{let e=t[0],n=e===128?B9(t.slice(1,t.length)):e===255?H9(t):null;if(n===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n},H9=t=>{for(var e=t.length,n=0,r=!1,i=e-1;i>-1;i--){var o=t[i],s;r?s=CN(o):o===0?s=o:(r=!0,s=TN(o)),s!==0&&(n-=s*Math.pow(256,e-i-1))}return n},B9=t=>{for(var e=t.length,n=0,r=e-1;r>-1;r--){var i=t[r];i!==0&&(n+=i*Math.pow(256,e-r-1))}return n},CN=t=>(255^t)&255,TN=t=>(255^t)+1&255;IN.exports={encode:q9,parse:$9}});var Xc=x((C0e,PN)=>{"use strict";var TE=CE(),Kc=require("path").posix,RN=AN(),IE=Symbol("slurp"),tr=Symbol("type"),PE=class{constructor(e,n,r,i){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[tr]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,n||0,r,i):e&&this.set(e)}decode(e,n,r,i){if(n||(n=0),!e||!(e.length>=n+512))throw new Error("need 512 bytes for header");if(this.path=pa(e,n,100),this.mode=Ko(e,n+100,8),this.uid=Ko(e,n+108,8),this.gid=Ko(e,n+116,8),this.size=Ko(e,n+124,12),this.mtime=AE(e,n+136,12),this.cksum=Ko(e,n+148,12),this[IE](r),this[IE](i,!0),this[tr]=pa(e,n+156,1),this[tr]===""&&(this[tr]="0"),this[tr]==="0"&&this.path.slice(-1)==="/"&&(this[tr]="5"),this[tr]==="5"&&(this.size=0),this.linkpath=pa(e,n+157,100),e.slice(n+257,n+265).toString()==="ustar\x0000")if(this.uname=pa(e,n+265,32),this.gname=pa(e,n+297,32),this.devmaj=Ko(e,n+329,8),this.devmin=Ko(e,n+337,8),e[n+475]!==0){let s=pa(e,n+345,155);this.path=s+"/"+this.path}else{let s=pa(e,n+345,130);s&&(this.path=s+"/"+this.path),this.atime=AE(e,n+476,12),this.ctime=AE(e,n+488,12)}let o=8*32;for(let s=n;s<n+148;s++)o+=e[s];for(let s=n+156;s<n+512;s++)o+=e[s];this.cksumValid=o===this.cksum,this.cksum===null&&o===8*32&&(this.nullBlock=!0)}[IE](e,n){for(let r in e)e[r]!==null&&e[r]!==void 0&&!(n&&r==="path")&&(this[r]=e[r])}encode(e,n){if(e||(e=this.block=Buffer.alloc(512),n=0),n||(n=0),!(e.length>=n+512))throw new Error("need 512 bytes for header");let r=this.ctime||this.atime?130:155,i=G9(this.path||"",r),o=i[0],s=i[1];this.needPax=i[2],this.needPax=da(e,n,100,o)||this.needPax,this.needPax=Xo(e,n+100,8,this.mode)||this.needPax,this.needPax=Xo(e,n+108,8,this.uid)||this.needPax,this.needPax=Xo(e,n+116,8,this.gid)||this.needPax,this.needPax=Xo(e,n+124,12,this.size)||this.needPax,this.needPax=RE(e,n+136,12,this.mtime)||this.needPax,e[n+156]=this[tr].charCodeAt(0),this.needPax=da(e,n+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",n+257,8),this.needPax=da(e,n+265,32,this.uname)||this.needPax,this.needPax=da(e,n+297,32,this.gname)||this.needPax,this.needPax=Xo(e,n+329,8,this.devmaj)||this.needPax,this.needPax=Xo(e,n+337,8,this.devmin)||this.needPax,this.needPax=da(e,n+345,r,s)||this.needPax,e[n+475]!==0?this.needPax=da(e,n+345,155,s)||this.needPax:(this.needPax=da(e,n+345,130,s)||this.needPax,this.needPax=RE(e,n+476,12,this.atime)||this.needPax,this.needPax=RE(e,n+488,12,this.ctime)||this.needPax);let a=8*32;for(let u=n;u<n+148;u++)a+=e[u];for(let u=n+156;u<n+512;u++)a+=e[u];return this.cksum=a,Xo(e,n+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let n in e)e[n]!==null&&e[n]!==void 0&&(this[n]=e[n])}get type(){return TE.name.get(this[tr])||this[tr]}get typeKey(){return this[tr]}set type(e){TE.code.has(e)?this[tr]=TE.code.get(e):this[tr]=e}},G9=(t,e)=>{let r=t,i="",o,s=Kc.parse(t).root||".";if(Buffer.byteLength(r)<100)o=[r,i,!1];else{i=Kc.dirname(r),r=Kc.basename(r);do Buffer.byteLength(r)<=100&&Buffer.byteLength(i)<=e?o=[r,i,!1]:Buffer.byteLength(r)>100&&Buffer.byteLength(i)<=e?o=[r.slice(0,100-1),i,!0]:(r=Kc.join(Kc.basename(i),r),i=Kc.dirname(i));while(i!==s&&!o);o||(o=[t.slice(0,100-1),"",!0])}return o},pa=(t,e,n)=>t.slice(e,e+n).toString("utf8").replace(/\0.*/,""),AE=(t,e,n)=>z9(Ko(t,e,n)),z9=t=>t===null?null:new Date(t*1e3),Ko=(t,e,n)=>t[e]&128?RN.parse(t.slice(e,e+n)):W9(t,e,n),V9=t=>isNaN(t)?null:t,W9=(t,e,n)=>V9(parseInt(t.slice(e,e+n).toString("utf8").replace(/\0.*$/,"").trim(),8)),Y9={12:8589934591,8:2097151},Xo=(t,e,n,r)=>r===null?!1:r>Y9[n]||r<0?(RN.encode(r,t.slice(e,e+n)),!0):(K9(t,e,n,r),!1),K9=(t,e,n,r)=>t.write(X9(r,n),e,n,"ascii"),X9=(t,e)=>J9(Math.floor(t).toString(8),e),J9=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",RE=(t,e,n,r)=>r===null?!1:Xo(t,e,n,r.getTime()/1e3),Q9=new Array(156).join("\0"),da=(t,e,n,r)=>r===null?!1:(t.write(r+Q9,e,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);PN.exports=PE});var Xh=x((T0e,ON)=>{"use strict";var Z9=Xc(),eX=require("path"),Pf=class{constructor(e,n){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=n||!1}encode(){let e=this.encodeBody();if(e==="")return null;let n=Buffer.byteLength(e),r=512*Math.ceil(1+n/512),i=Buffer.allocUnsafe(r);for(let o=0;o<512;o++)i[o]=0;new Z9({path:("PaxHeader/"+eX.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:n,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(i),i.write(e,512,n,"utf8");for(let o=n+512;o<i.length;o++)i[o]=0;return i}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===void 0)return"";let n=this[e]instanceof Date?this[e].getTime()/1e3:this[e],r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+n+`
|
|
`,i=Buffer.byteLength(r),o=Math.floor(Math.log(i)/Math.log(10))+1;return i+o>=Math.pow(10,o)&&(o+=1),o+i+r}};Pf.parse=(t,e,n)=>new Pf(tX(nX(t),e),n);var tX=(t,e)=>e?Object.keys(t).reduce((n,r)=>(n[r]=t[r],n),e):t,nX=t=>t.replace(/\n$/,"").split(`
|
|
`).reduce(rX,Object.create(null)),rX=(t,e)=>{let n=parseInt(e,10);if(n!==Buffer.byteLength(e)+1)return t;e=e.slice((n+" ").length);let r=e.split("="),i=r.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return t;let o=r.join("=");return t[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(o*1e3):/^[0-9]+$/.test(o)?+o:o,t};ON.exports=Pf});var Jc=x((I0e,NN)=>{NN.exports=t=>{let e=t.length-1,n=-1;for(;e>-1&&t.charAt(e)==="/";)n=e,e--;return n===-1?t:t.slice(0,n)}});var Jh=x((A0e,DN)=>{"use strict";DN.exports=t=>class extends t{warn(e,n,r={}){this.file&&(r.file=this.file),this.cwd&&(r.cwd=this.cwd),r.code=n instanceof Error&&n.code||e,r.tarCode=e,!this.strict&&r.recoverable!==!1?(n instanceof Error&&(r=Object.assign(n,r),n=n.message),this.emit("warn",r.tarCode,n,r)):n instanceof Error?this.emit("error",Object.assign(n,r)):this.emit("error",Object.assign(new Error(`${e}: ${n}`),r))}}});var NE=x((P0e,LN)=>{"use strict";var Qh=["|","<",">","?",":"],OE=Qh.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),iX=new Map(Qh.map((t,e)=>[t,OE[e]])),oX=new Map(OE.map((t,e)=>[t,Qh[e]]));LN.exports={encode:t=>Qh.reduce((e,n)=>e.split(n).join(iX.get(n)),t),decode:t=>OE.reduce((e,n)=>e.split(n).join(oX.get(n)),t)}});var DE=x((O0e,FN)=>{var{isAbsolute:sX,parse:kN}=require("path").win32;FN.exports=t=>{let e="",n=kN(t);for(;sX(t)||n.root;){let r=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":n.root;t=t.slice(r.length),e+=r,n=kN(t)}return[e,t]}});var qN=x((N0e,MN)=>{"use strict";MN.exports=(t,e,n)=>(t&=4095,n&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var BE=x((k0e,QN)=>{"use strict";var{Minipass:zN}=Uh(),VN=Xh(),WN=Xc(),di=require("fs"),UN=require("path"),pi=Yc(),aX=Jc(),YN=(t,e)=>e?(t=pi(t).replace(/^\.(\/|$)/,""),aX(e)+"/"+t):pi(t),cX=16*1024*1024,jN=Symbol("process"),$N=Symbol("file"),HN=Symbol("directory"),kE=Symbol("symlink"),BN=Symbol("hardlink"),Of=Symbol("header"),Zh=Symbol("read"),FE=Symbol("lstat"),em=Symbol("onlstat"),ME=Symbol("onread"),qE=Symbol("onreadlink"),UE=Symbol("openfile"),jE=Symbol("onopenfile"),Jo=Symbol("close"),tm=Symbol("mode"),$E=Symbol("awaitDrain"),LE=Symbol("ondrain"),hi=Symbol("prefix"),GN=Symbol("hadError"),KN=Jh(),uX=NE(),XN=DE(),JN=qN(),nm=KN(class extends zN{constructor(e,n){if(n=n||{},super(n),typeof e!="string")throw new TypeError("path is required");this.path=pi(e),this.portable=!!n.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=n.maxReadSize||cX,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=pi(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime||null,this.prefix=n.prefix?pi(n.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof n.onwarn=="function"&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){let[i,o]=XN(this.path);i&&(this.path=o,r=i)}this.win32=!!n.win32||process.platform==="win32",this.win32&&(this.path=uX.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=pi(n.absolute||UN.resolve(this.cwd,e)),this.path===""&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path}),this.statCache.has(this.absolute)?this[em](this.statCache.get(this.absolute)):this[FE]()}emit(e,...n){return e==="error"&&(this[GN]=!0),super.emit(e,...n)}[FE](){di.lstat(this.absolute,(e,n)=>{if(e)return this.emit("error",e);this[em](n)})}[em](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=fX(e),this.emit("stat",e),this[jN]()}[jN](){switch(this.type){case"File":return this[$N]();case"Directory":return this[HN]();case"SymbolicLink":return this[kE]();default:return this.end()}}[tm](e){return JN(e,this.type==="Directory",this.portable)}[hi](e){return YN(e,this.prefix)}[Of](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new WN({path:this[hi](this.path),linkpath:this.type==="Link"?this[hi](this.linkpath):this.linkpath,mode:this[tm](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new VN({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[hi](this.path),linkpath:this.type==="Link"?this[hi](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[HN](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Of](),this.end()}[kE](){di.readlink(this.absolute,(e,n)=>{if(e)return this.emit("error",e);this[qE](n)})}[qE](e){this.linkpath=pi(e),this[Of](),this.end()}[BN](e){this.type="Link",this.linkpath=pi(UN.relative(this.cwd,e)),this.stat.size=0,this[Of](),this.end()}[$N](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let n=this.linkCache.get(e);if(n.indexOf(this.cwd)===0)return this[BN](n)}this.linkCache.set(e,this.absolute)}if(this[Of](),this.stat.size===0)return this.end();this[UE]()}[UE](){di.open(this.absolute,"r",(e,n)=>{if(e)return this.emit("error",e);this[jE](n)})}[jE](e){if(this.fd=e,this[GN])return this[Jo]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let n=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(n),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Zh]()}[Zh](){let{fd:e,buf:n,offset:r,length:i,pos:o}=this;di.read(e,n,r,i,o,(s,a)=>{if(s)return this[Jo](()=>this.emit("error",s));this[ME](a)})}[Jo](e){di.close(this.fd,e)}[ME](e){if(e<=0&&this.remain>0){let i=new Error("encountered unexpected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[Jo](()=>this.emit("error",i))}if(e>this.remain){let i=new Error("did not encounter expected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[Jo](()=>this.emit("error",i))}if(e===this.remain)for(let i=e;i<this.length&&e<this.blockRemain;i++)this.buf[i+this.offset]=0,e++,this.remain++;let n=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(n)?this[LE]():this[$E](()=>this[LE]())}[$E](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){let n=new Error("writing more data than expected");return n.path=this.absolute,this.emit("error",n)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[LE](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Jo](e=>e?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Zh]()}}),HE=class extends nm{[FE](){this[em](di.lstatSync(this.absolute))}[kE](){this[qE](di.readlinkSync(this.absolute))}[UE](){this[jE](di.openSync(this.absolute,"r"))}[Zh](){let e=!0;try{let{fd:n,buf:r,offset:i,length:o,pos:s}=this,a=di.readSync(n,r,i,o,s);this[ME](a),e=!1}finally{if(e)try{this[Jo](()=>{})}catch{}}}[$E](e){e()}[Jo](e){di.closeSync(this.fd),e()}},lX=KN(class extends zN{constructor(e,n){n=n||{},super(n),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix||null,this.path=pi(e.path),this.mode=this[tm](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:n.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=pi(e.linkpath),typeof n.onwarn=="function"&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){let[i,o]=XN(this.path);i&&(this.path=o,r=i)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new WN({path:this[hi](this.path),linkpath:this.type==="Link"?this[hi](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path}),this.header.encode()&&!this.noPax&&super.write(new VN({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[hi](this.path),linkpath:this.type==="Link"?this[hi](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[hi](e){return YN(e,this.prefix)}[tm](e){return JN(e,this.type==="Directory",this.portable)}write(e){let n=e.length;if(n>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=n,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});nm.Sync=HE;nm.Tar=lX;var fX=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";QN.exports=nm});var e1=x((F0e,ZN)=>{"use strict";ZN.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var rm=x((M0e,t1)=>{"use strict";t1.exports=De;De.Node=ha;De.create=De;function De(t){var e=this;if(e instanceof De||(e=new De),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)e.push(arguments[n]);return e}De.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),t.list.length--,t.next=null,t.prev=null,t.list=null,e};De.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};De.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};De.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)dX(this,arguments[t]);return this.length};De.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)hX(this,arguments[t]);return this.length};De.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};De.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};De.prototype.forEach=function(t,e){e=e||this;for(var n=this.head,r=0;n!==null;r++)t.call(e,n.value,r,this),n=n.next};De.prototype.forEachReverse=function(t,e){e=e||this;for(var n=this.tail,r=this.length-1;n!==null;r--)t.call(e,n.value,r,this),n=n.prev};De.prototype.get=function(t){for(var e=0,n=this.head;n!==null&&e<t;e++)n=n.next;if(e===t&&n!==null)return n.value};De.prototype.getReverse=function(t){for(var e=0,n=this.tail;n!==null&&e<t;e++)n=n.prev;if(e===t&&n!==null)return n.value};De.prototype.map=function(t,e){e=e||this;for(var n=new De,r=this.head;r!==null;)n.push(t.call(e,r.value,this)),r=r.next;return n};De.prototype.mapReverse=function(t,e){e=e||this;for(var n=new De,r=this.tail;r!==null;)n.push(t.call(e,r.value,this)),r=r.prev;return n};De.prototype.reduce=function(t,e){var n,r=this.head;if(arguments.length>1)n=e;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;r!==null;i++)n=t(n,r.value,i),r=r.next;return n};De.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;r!==null;i--)n=t(n,r.value,i),r=r.prev;return n};De.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;n!==null;e++)t[e]=n.value,n=n.next;return t};De.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;n!==null;e++)t[e]=n.value,n=n.prev;return t};De.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new De;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;for(;i!==null&&r<e;r++,i=i.next)n.push(i.value);return n};De.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new De;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,i=this.tail;i!==null&&r>e;r--)i=i.prev;for(;i!==null&&r>t;r--,i=i.prev)n.push(i.value);return n};De.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;for(var o=[],r=0;i&&r<e;r++)o.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var r=0;r<n.length;r++)i=pX(this,i,n[r]);return o};De.prototype.reverse=function(){for(var t=this.head,e=this.tail,n=t;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=e,this.tail=t,this};function pX(t,e,n){var r=e===t.head?new ha(n,null,e,t):new ha(n,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function dX(t,e){t.tail=new ha(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function hX(t,e){t.head=new ha(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function ha(t,e,n,r){if(!(this instanceof ha))return new ha(t,e,n,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{e1()(De)}catch{}});var pm=x((U0e,u1)=>{"use strict";var lm=class{constructor(e,n){this.path=e||"./",this.absolute=n,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},{Minipass:mX}=Uh(),n1=bE(),gX=Yh(),QE=BE(),vX=QE.Sync,yX=QE.Tar,xX=rm(),r1=Buffer.alloc(1024),sm=Symbol("onStat"),im=Symbol("ended"),mi=Symbol("queue"),Qc=Symbol("current"),ma=Symbol("process"),om=Symbol("processing"),i1=Symbol("processJob"),gi=Symbol("jobs"),GE=Symbol("jobDone"),am=Symbol("addFSEntry"),o1=Symbol("addTarEntry"),YE=Symbol("stat"),KE=Symbol("readdir"),cm=Symbol("onreaddir"),um=Symbol("pipe"),s1=Symbol("entry"),zE=Symbol("entryOpt"),XE=Symbol("writeEntryClass"),c1=Symbol("write"),VE=Symbol("ondrain"),fm=require("fs"),a1=require("path"),_X=Jh(),WE=Yc(),ZE=_X(class extends mX{constructor(e){if(super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=WE(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[XE]=QE,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip||e.brotli){if(e.gzip&&e.brotli)throw new TypeError("gzip and brotli are mutually exclusive");e.gzip&&(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new n1.Gzip(e.gzip)),e.brotli&&(typeof e.brotli!="object"&&(e.brotli={}),this.zip=new n1.BrotliCompress(e.brotli)),this.zip.on("data",n=>super.write(n)),this.zip.on("end",n=>super.end()),this.zip.on("drain",n=>this[VE]()),this.on("resume",n=>this.zip.resume())}else this.on("drain",this[VE]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:n=>!0,this[mi]=new xX,this[gi]=0,this.jobs=+e.jobs||4,this[om]=!1,this[im]=!1}[c1](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[im]=!0,this[ma](),this}write(e){if(this[im])throw new Error("write after end");return e instanceof gX?this[o1](e):this[am](e),this.flowing}[o1](e){let n=WE(a1.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let r=new lm(e.path,n,!1);r.entry=new yX(e,this[zE](r)),r.entry.on("end",i=>this[GE](r)),this[gi]+=1,this[mi].push(r)}this[ma]()}[am](e){let n=WE(a1.resolve(this.cwd,e));this[mi].push(new lm(e,n)),this[ma]()}[YE](e){e.pending=!0,this[gi]+=1;let n=this.follow?"stat":"lstat";fm[n](e.absolute,(r,i)=>{e.pending=!1,this[gi]-=1,r?this.emit("error",r):this[sm](e,i)})}[sm](e,n){this.statCache.set(e.absolute,n),e.stat=n,this.filter(e.path,n)||(e.ignore=!0),this[ma]()}[KE](e){e.pending=!0,this[gi]+=1,fm.readdir(e.absolute,(n,r)=>{if(e.pending=!1,this[gi]-=1,n)return this.emit("error",n);this[cm](e,r)})}[cm](e,n){this.readdirCache.set(e.absolute,n),e.readdir=n,this[ma]()}[ma](){if(!this[om]){this[om]=!0;for(let e=this[mi].head;e!==null&&this[gi]<this.jobs;e=e.next)if(this[i1](e.value),e.value.ignore){let n=e.next;this[mi].removeNode(e),e.next=n}this[om]=!1,this[im]&&!this[mi].length&&this[gi]===0&&(this.zip?this.zip.end(r1):(super.write(r1),super.end()))}}get[Qc](){return this[mi]&&this[mi].head&&this[mi].head.value}[GE](e){this[mi].shift(),this[gi]-=1,this[ma]()}[i1](e){if(!e.pending){if(e.entry){e===this[Qc]&&!e.piped&&this[um](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[sm](e,this.statCache.get(e.absolute)):this[YE](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[cm](e,this.readdirCache.get(e.absolute)):this[KE](e),!e.readdir))){if(e.entry=this[s1](e),!e.entry){e.ignore=!0;return}e===this[Qc]&&!e.piped&&this[um](e)}}}[zE](e){return{onwarn:(n,r,i)=>this.warn(n,r,i),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[s1](e){this[gi]+=1;try{return new this[XE](e.path,this[zE](e)).on("end",()=>this[GE](e)).on("error",n=>this.emit("error",n))}catch(n){this.emit("error",n)}}[VE](){this[Qc]&&this[Qc].entry&&this[Qc].entry.resume()}[um](e){e.piped=!0,e.readdir&&e.readdir.forEach(i=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[am](s+i)});let n=e.entry,r=this.zip;r?n.on("data",i=>{r.write(i)||n.pause()}):n.on("data",i=>{super.write(i)||n.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),JE=class extends ZE{constructor(e){super(e),this[XE]=vX}pause(){}resume(){}[YE](e){let n=this.follow?"statSync":"lstatSync";this[sm](e,fm[n](e.absolute))}[KE](e,n){this[cm](e,fm.readdirSync(e.absolute))}[um](e){let n=e.entry,r=this.zip;e.readdir&&e.readdir.forEach(i=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[am](s+i)}),r?n.on("data",i=>{r.write(i)}):n.on("data",i=>{super[c1](i)})}};ZE.Sync=JE;u1.exports=ZE});var su=x(Df=>{"use strict";var EX=sE(),bX=require("events").EventEmitter,Fn=require("fs"),nb=Fn.writev;if(!nb){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;nb=(n,r,i,o)=>{let s=(u,c)=>o(u,c,r),a=new e;a.oncomplete=s,t.writeBuffers(n,r,i,a)}}var iu=Symbol("_autoClose"),Yr=Symbol("_close"),Nf=Symbol("_ended"),He=Symbol("_fd"),l1=Symbol("_finished"),Zo=Symbol("_flags"),eb=Symbol("_flush"),rb=Symbol("_handleChunk"),ib=Symbol("_makeBuf"),vm=Symbol("_mode"),dm=Symbol("_needDrain"),nu=Symbol("_onerror"),ou=Symbol("_onopen"),tb=Symbol("_onread"),eu=Symbol("_onwrite"),es=Symbol("_open"),ro=Symbol("_path"),ga=Symbol("_pos"),vi=Symbol("_queue"),tu=Symbol("_read"),f1=Symbol("_readSize"),Qo=Symbol("_reading"),hm=Symbol("_remain"),p1=Symbol("_size"),mm=Symbol("_write"),Zc=Symbol("_writing"),gm=Symbol("_defaultFlag"),ru=Symbol("_errored"),ym=class extends EX{constructor(e,n){if(n=n||{},super(n),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[ru]=!1,this[He]=typeof n.fd=="number"?n.fd:null,this[ro]=e,this[f1]=n.readSize||16*1024*1024,this[Qo]=!1,this[p1]=typeof n.size=="number"?n.size:1/0,this[hm]=this[p1],this[iu]=typeof n.autoClose=="boolean"?n.autoClose:!0,typeof this[He]=="number"?this[tu]():this[es]()}get fd(){return this[He]}get path(){return this[ro]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[es](){Fn.open(this[ro],"r",(e,n)=>this[ou](e,n))}[ou](e,n){e?this[nu](e):(this[He]=n,this.emit("open",n),this[tu]())}[ib](){return Buffer.allocUnsafe(Math.min(this[f1],this[hm]))}[tu](){if(!this[Qo]){this[Qo]=!0;let e=this[ib]();if(e.length===0)return process.nextTick(()=>this[tb](null,0,e));Fn.read(this[He],e,0,e.length,null,(n,r,i)=>this[tb](n,r,i))}}[tb](e,n,r){this[Qo]=!1,e?this[nu](e):this[rb](n,r)&&this[tu]()}[Yr](){if(this[iu]&&typeof this[He]=="number"){let e=this[He];this[He]=null,Fn.close(e,n=>n?this.emit("error",n):this.emit("close"))}}[nu](e){this[Qo]=!0,this[Yr](),this.emit("error",e)}[rb](e,n){let r=!1;return this[hm]-=e,e>0&&(r=super.write(e<n.length?n.slice(0,e):n)),(e===0||this[hm]<=0)&&(r=!1,this[Yr](),super.end()),r}emit(e,n){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[He]=="number"&&this[tu]();break;case"error":return this[ru]?void 0:(this[ru]=!0,super.emit(e,n));default:return super.emit(e,n)}}},ob=class extends ym{[es](){let e=!0;try{this[ou](null,Fn.openSync(this[ro],"r")),e=!1}finally{e&&this[Yr]()}}[tu](){let e=!0;try{if(!this[Qo]){this[Qo]=!0;do{let n=this[ib](),r=n.length===0?0:Fn.readSync(this[He],n,0,n.length,null);if(!this[rb](r,n))break}while(!0);this[Qo]=!1}e=!1}finally{e&&this[Yr]()}}[Yr](){if(this[iu]&&typeof this[He]=="number"){let e=this[He];this[He]=null,Fn.closeSync(e),this.emit("close")}}},xm=class extends bX{constructor(e,n){n=n||{},super(n),this.readable=!1,this.writable=!0,this[ru]=!1,this[Zc]=!1,this[Nf]=!1,this[dm]=!1,this[vi]=[],this[ro]=e,this[He]=typeof n.fd=="number"?n.fd:null,this[vm]=n.mode===void 0?438:n.mode,this[ga]=typeof n.start=="number"?n.start:null,this[iu]=typeof n.autoClose=="boolean"?n.autoClose:!0;let r=this[ga]!==null?"r+":"w";this[gm]=n.flags===void 0,this[Zo]=this[gm]?r:n.flags,this[He]===null&&this[es]()}emit(e,n){if(e==="error"){if(this[ru])return;this[ru]=!0}return super.emit(e,n)}get fd(){return this[He]}get path(){return this[ro]}[nu](e){this[Yr](),this[Zc]=!0,this.emit("error",e)}[es](){Fn.open(this[ro],this[Zo],this[vm],(e,n)=>this[ou](e,n))}[ou](e,n){this[gm]&&this[Zo]==="r+"&&e&&e.code==="ENOENT"?(this[Zo]="w",this[es]()):e?this[nu](e):(this[He]=n,this.emit("open",n),this[eb]())}end(e,n){return e&&this.write(e,n),this[Nf]=!0,!this[Zc]&&!this[vi].length&&typeof this[He]=="number"&&this[eu](null,0),this}write(e,n){return typeof e=="string"&&(e=Buffer.from(e,n)),this[Nf]?(this.emit("error",new Error("write() after end()")),!1):this[He]===null||this[Zc]||this[vi].length?(this[vi].push(e),this[dm]=!0,!1):(this[Zc]=!0,this[mm](e),!0)}[mm](e){Fn.write(this[He],e,0,e.length,this[ga],(n,r)=>this[eu](n,r))}[eu](e,n){e?this[nu](e):(this[ga]!==null&&(this[ga]+=n),this[vi].length?this[eb]():(this[Zc]=!1,this[Nf]&&!this[l1]?(this[l1]=!0,this[Yr](),this.emit("finish")):this[dm]&&(this[dm]=!1,this.emit("drain"))))}[eb](){if(this[vi].length===0)this[Nf]&&this[eu](null,0);else if(this[vi].length===1)this[mm](this[vi].pop());else{let e=this[vi];this[vi]=[],nb(this[He],e,this[ga],(n,r)=>this[eu](n,r))}}[Yr](){if(this[iu]&&typeof this[He]=="number"){let e=this[He];this[He]=null,Fn.close(e,n=>n?this.emit("error",n):this.emit("close"))}}},sb=class extends xm{[es](){let e;if(this[gm]&&this[Zo]==="r+")try{e=Fn.openSync(this[ro],this[Zo],this[vm])}catch(n){if(n.code==="ENOENT")return this[Zo]="w",this[es]();throw n}else e=Fn.openSync(this[ro],this[Zo],this[vm]);this[ou](null,e)}[Yr](){if(this[iu]&&typeof this[He]=="number"){let e=this[He];this[He]=null,Fn.closeSync(e),this.emit("close")}}[mm](e){let n=!0;try{this[eu](null,Fn.writeSync(this[He],e,0,e.length,this[ga])),n=!1}finally{if(n)try{this[Yr]()}catch{}}}};Df.ReadStream=ym;Df.ReadStreamSync=ob;Df.WriteStream=xm;Df.WriteStreamSync=sb});var Tm=x((H0e,b1)=>{"use strict";var wX=Jh(),d1=Xc(),SX=require("events"),CX=rm(),TX=1024*1024,IX=Yh(),h1=Xh(),m1=bE(),{nextTick:AX}=require("process"),ab=Buffer.from([31,139]),xr=Symbol("state"),va=Symbol("writeEntry"),io=Symbol("readEntry"),ub=Symbol("nextEntry"),g1=Symbol("processEntry"),_r=Symbol("extendedHeader"),Lf=Symbol("globalExtendedHeader"),ts=Symbol("meta"),v1=Symbol("emitMeta"),Ve=Symbol("buffer"),oo=Symbol("queue"),ns=Symbol("ended"),y1=Symbol("emittedEnd"),ya=Symbol("emit"),$t=Symbol("unzip"),_m=Symbol("consumeChunk"),Em=Symbol("consumeChunkSub"),lb=Symbol("consumeBody"),x1=Symbol("consumeMeta"),_1=Symbol("consumeHeader"),bm=Symbol("consuming"),fb=Symbol("bufferConcat"),pb=Symbol("maybeEnd"),kf=Symbol("writing"),rs=Symbol("aborted"),wm=Symbol("onDone"),xa=Symbol("sawValidEntry"),Sm=Symbol("sawNullBlock"),Cm=Symbol("sawEOF"),E1=Symbol("closeStream"),RX=t=>!0;b1.exports=wX(class extends SX{constructor(e){e=e||{},super(e),this.file=e.file||"",this[xa]=null,this.on(wm,r=>{(this[xr]==="begin"||this[xa]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(wm,e.ondone):this.on(wm,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||TX,this.filter=typeof e.filter=="function"?e.filter:RX;let n=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!e.gzip&&e.brotli!==void 0?e.brotli:n?void 0:!1,this.writable=!0,this.readable=!1,this[oo]=new CX,this[Ve]=null,this[io]=null,this[va]=null,this[xr]="begin",this[ts]="",this[_r]=null,this[Lf]=null,this[ns]=!1,this[$t]=null,this[rs]=!1,this[Sm]=!1,this[Cm]=!1,this.on("end",()=>this[E1]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[_1](e,n){this[xa]===null&&(this[xa]=!1);let r;try{r=new d1(e,n,this[_r],this[Lf])}catch(i){return this.warn("TAR_ENTRY_INVALID",i)}if(r.nullBlock)this[Sm]?(this[Cm]=!0,this[xr]==="begin"&&(this[xr]="header"),this[ya]("eof")):(this[Sm]=!0,this[ya]("nullBlock"));else if(this[Sm]=!1,!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{let i=r.type;if(/^(Symbolic)?Link$/.test(i)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(i)&&r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r});else{let o=this[va]=new IX(r,this[_r],this[Lf]);if(!this[xa])if(o.remain){let s=()=>{o.invalid||(this[xa]=!0)};o.on("end",s)}else this[xa]=!0;o.meta?o.size>this.maxMetaEntrySize?(o.ignore=!0,this[ya]("ignoredEntry",o),this[xr]="ignore",o.resume()):o.size>0&&(this[ts]="",o.on("data",s=>this[ts]+=s),this[xr]="meta"):(this[_r]=null,o.ignore=o.ignore||!this.filter(o.path,o),o.ignore?(this[ya]("ignoredEntry",o),this[xr]=o.remain?"ignore":"header",o.resume()):(o.remain?this[xr]="body":(this[xr]="header",o.end()),this[io]?this[oo].push(o):(this[oo].push(o),this[ub]())))}}}[E1](){AX(()=>this.emit("close"))}[g1](e){let n=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[io]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",r=>this[ub]()),n=!1)):(this[io]=null,n=!1),n}[ub](){do;while(this[g1](this[oo].shift()));if(!this[oo].length){let e=this[io];!e||e.flowing||e.size===e.remain?this[kf]||this.emit("drain"):e.once("drain",r=>this.emit("drain"))}}[lb](e,n){let r=this[va],i=r.blockRemain,o=i>=e.length&&n===0?e:e.slice(n,n+i);return r.write(o),r.blockRemain||(this[xr]="header",this[va]=null,r.end()),o.length}[x1](e,n){let r=this[va],i=this[lb](e,n);return this[va]||this[v1](r),i}[ya](e,n,r){!this[oo].length&&!this[io]?this.emit(e,n,r):this[oo].push([e,n,r])}[v1](e){switch(this[ya]("meta",this[ts]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[_r]=h1.parse(this[ts],this[_r],!1);break;case"GlobalExtendedHeader":this[Lf]=h1.parse(this[ts],this[Lf],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[_r]=this[_r]||Object.create(null),this[_r].path=this[ts].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[_r]=this[_r]||Object.create(null),this[_r].linkpath=this[ts].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[rs]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[rs])return;if((this[$t]===null||this.brotli===void 0&&this[$t]===!1)&&e){if(this[Ve]&&(e=Buffer.concat([this[Ve],e]),this[Ve]=null),e.length<ab.length)return this[Ve]=e,!0;for(let o=0;this[$t]===null&&o<ab.length;o++)e[o]!==ab[o]&&(this[$t]=!1);let i=this.brotli===void 0;if(this[$t]===!1&&i)if(e.length<512)if(this[ns])this.brotli=!0;else return this[Ve]=e,!0;else try{new d1(e.slice(0,512)),this.brotli=!1}catch{this.brotli=!0}if(this[$t]===null||this[$t]===!1&&this.brotli){let o=this[ns];this[ns]=!1,this[$t]=this[$t]===null?new m1.Unzip:new m1.BrotliDecompress,this[$t].on("data",a=>this[_m](a)),this[$t].on("error",a=>this.abort(a)),this[$t].on("end",a=>{this[ns]=!0,this[_m]()}),this[kf]=!0;let s=this[$t][o?"end":"write"](e);return this[kf]=!1,s}}this[kf]=!0,this[$t]?this[$t].write(e):this[_m](e),this[kf]=!1;let r=this[oo].length?!1:this[io]?this[io].flowing:!0;return!r&&!this[oo].length&&this[io].once("drain",i=>this.emit("drain")),r}[fb](e){e&&!this[rs]&&(this[Ve]=this[Ve]?Buffer.concat([this[Ve],e]):e)}[pb](){if(this[ns]&&!this[y1]&&!this[rs]&&!this[bm]){this[y1]=!0;let e=this[va];if(e&&e.blockRemain){let n=this[Ve]?this[Ve].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${n} available)`,{entry:e}),this[Ve]&&e.write(this[Ve]),e.end()}this[ya](wm)}}[_m](e){if(this[bm])this[fb](e);else if(!e&&!this[Ve])this[pb]();else{if(this[bm]=!0,this[Ve]){this[fb](e);let n=this[Ve];this[Ve]=null,this[Em](n)}else this[Em](e);for(;this[Ve]&&this[Ve].length>=512&&!this[rs]&&!this[Cm];){let n=this[Ve];this[Ve]=null,this[Em](n)}this[bm]=!1}(!this[Ve]||this[ns])&&this[pb]()}[Em](e){let n=0,r=e.length;for(;n+512<=r&&!this[rs]&&!this[Cm];)switch(this[xr]){case"begin":case"header":this[_1](e,n),n+=512;break;case"ignore":case"body":n+=this[lb](e,n);break;case"meta":n+=this[x1](e,n);break;default:throw new Error("invalid state: "+this[xr])}n<r&&(this[Ve]?this[Ve]=Buffer.concat([e.slice(n),this[Ve]]):this[Ve]=e.slice(n))}end(e){this[rs]||(this[$t]?this[$t].end(e):(this[ns]=!0,this.brotli===void 0&&(e=e||Buffer.alloc(0)),this.write(e)))}})});var Im=x((B0e,T1)=>{"use strict";var PX=Bc(),S1=Tm(),au=require("fs"),OX=su(),w1=require("path"),db=Jc();T1.exports=(t,e,n)=>{typeof t=="function"?(n=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(n=e,e=null),e?e=Array.from(e):e=[];let r=PX(t);if(r.sync&&typeof n=="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n=="function")throw new TypeError("callback only supported with file option");return e.length&&DX(r,e),r.noResume||NX(r),r.file&&r.sync?LX(r):r.file?kX(r,n):C1(r)};var NX=t=>{let e=t.onentry;t.onentry=e?n=>{e(n),n.resume()}:n=>n.resume()},DX=(t,e)=>{let n=new Map(e.map(o=>[db(o),!0])),r=t.filter,i=(o,s)=>{let a=s||w1.parse(o).root||".",u=o===a?!1:n.has(o)?n.get(o):i(w1.dirname(o),a);return n.set(o,u),u};t.filter=r?(o,s)=>r(o,s)&&i(db(o)):o=>i(db(o))},LX=t=>{let e=C1(t),n=t.file,r=!0,i;try{let o=au.statSync(n),s=t.maxReadSize||16*1024*1024;if(o.size<s)e.end(au.readFileSync(n));else{let a=0,u=Buffer.allocUnsafe(s);for(i=au.openSync(n,"r");a<o.size;){let c=au.readSync(i,u,0,s,a);a+=c,e.write(u.slice(0,c))}e.end()}r=!1}finally{if(r&&i)try{au.closeSync(i)}catch{}}},kX=(t,e)=>{let n=new S1(t),r=t.maxReadSize||16*1024*1024,i=t.file,o=new Promise((s,a)=>{n.on("error",a),n.on("end",s),au.stat(i,(u,c)=>{if(u)a(u);else{let l=new OX.ReadStream(i,{readSize:r,size:c.size});l.on("error",a),l.pipe(n)}})});return e?o.then(e,e):o},C1=t=>new S1(t)});var N1=x((G0e,O1)=>{"use strict";var FX=Bc(),Am=pm(),I1=su(),A1=Im(),R1=require("path");O1.exports=(t,e,n)=>{if(typeof e=="function"&&(n=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let r=FX(t);if(r.sync&&typeof n=="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n=="function")throw new TypeError("callback only supported with file option");return r.file&&r.sync?MX(r,e):r.file?qX(r,e,n):r.sync?UX(r,e):jX(r,e)};var MX=(t,e)=>{let n=new Am.Sync(t),r=new I1.WriteStreamSync(t.file,{mode:t.mode||438});n.pipe(r),P1(n,e)},qX=(t,e,n)=>{let r=new Am(t),i=new I1.WriteStream(t.file,{mode:t.mode||438});r.pipe(i);let o=new Promise((s,a)=>{i.on("error",a),i.on("close",s),r.on("error",a)});return hb(r,e),n?o.then(n,n):o},P1=(t,e)=>{e.forEach(n=>{n.charAt(0)==="@"?A1({file:R1.resolve(t.cwd,n.slice(1)),sync:!0,noResume:!0,onentry:r=>t.add(r)}):t.add(n)}),t.end()},hb=(t,e)=>{for(;e.length;){let n=e.shift();if(n.charAt(0)==="@")return A1({file:R1.resolve(t.cwd,n.slice(1)),noResume:!0,onentry:r=>t.add(r)}).then(r=>hb(t,e));t.add(n)}t.end()},UX=(t,e)=>{let n=new Am.Sync(t);return P1(n,e),n},jX=(t,e)=>{let n=new Am(t);return hb(n,e),n}});var mb=x((z0e,U1)=>{"use strict";var $X=Bc(),D1=pm(),nr=require("fs"),L1=su(),k1=Im(),F1=require("path"),M1=Xc();U1.exports=(t,e,n)=>{let r=$X(t);if(!r.file)throw new TypeError("file is required");if(r.gzip||r.brotli||r.file.endsWith(".br")||r.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),r.sync?HX(r,e):GX(r,e,n)};var HX=(t,e)=>{let n=new D1.Sync(t),r=!0,i,o;try{try{i=nr.openSync(t.file,"r+")}catch(u){if(u.code==="ENOENT")i=nr.openSync(t.file,"w+");else throw u}let s=nr.fstatSync(i),a=Buffer.alloc(512);e:for(o=0;o<s.size;o+=512){for(let l=0,f=0;l<512;l+=f){if(f=nr.readSync(i,a,l,a.length-l,o+l),o===0&&a[0]===31&&a[1]===139)throw new Error("cannot append to compressed archives");if(!f)break e}let u=new M1(a);if(!u.cksumValid)break;let c=512*Math.ceil(u.size/512);if(o+c+512>s.size)break;o+=c,t.mtimeCache&&t.mtimeCache.set(u.path,u.mtime)}r=!1,BX(t,n,o,i,e)}finally{if(r)try{nr.closeSync(i)}catch{}}},BX=(t,e,n,r,i)=>{let o=new L1.WriteStreamSync(t.file,{fd:r,start:n});e.pipe(o),zX(e,i)},GX=(t,e,n)=>{e=Array.from(e);let r=new D1(t),i=(s,a,u)=>{let c=(h,m)=>{h?nr.close(s,g=>u(h)):u(null,m)},l=0;if(a===0)return c(null,0);let f=0,p=Buffer.alloc(512),d=(h,m)=>{if(h)return c(h);if(f+=m,f<512&&m)return nr.read(s,p,f,p.length-f,l+f,d);if(l===0&&p[0]===31&&p[1]===139)return c(new Error("cannot append to compressed archives"));if(f<512)return c(null,l);let g=new M1(p);if(!g.cksumValid)return c(null,l);let v=512*Math.ceil(g.size/512);if(l+v+512>a||(l+=v+512,l>=a))return c(null,l);t.mtimeCache&&t.mtimeCache.set(g.path,g.mtime),f=0,nr.read(s,p,0,512,l,d)};nr.read(s,p,0,512,l,d)},o=new Promise((s,a)=>{r.on("error",a);let u="r+",c=(l,f)=>{if(l&&l.code==="ENOENT"&&u==="r+")return u="w+",nr.open(t.file,u,c);if(l)return a(l);nr.fstat(f,(p,d)=>{if(p)return nr.close(f,()=>a(p));i(f,d.size,(h,m)=>{if(h)return a(h);let g=new L1.WriteStream(t.file,{fd:f,start:m});r.pipe(g),g.on("error",a),g.on("close",s),q1(r,e)})})};nr.open(t.file,u,c)});return n?o.then(n,n):o},zX=(t,e)=>{e.forEach(n=>{n.charAt(0)==="@"?k1({file:F1.resolve(t.cwd,n.slice(1)),sync:!0,noResume:!0,onentry:r=>t.add(r)}):t.add(n)}),t.end()},q1=(t,e)=>{for(;e.length;){let n=e.shift();if(n.charAt(0)==="@")return k1({file:F1.resolve(t.cwd,n.slice(1)),noResume:!0,onentry:r=>t.add(r)}).then(r=>q1(t,e));t.add(n)}t.end()}});var $1=x((V0e,j1)=>{"use strict";var VX=Bc(),WX=mb();j1.exports=(t,e,n)=>{let r=VX(t);if(!r.file)throw new TypeError("file is required");if(r.gzip||r.brotli||r.file.endsWith(".br")||r.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),YX(r),WX(r,e,n)};var YX=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(n,r)=>e(n,r)&&!(t.mtimeCache.get(n)>r.mtime):(n,r)=>!(t.mtimeCache.get(n)>r.mtime)}});var G1=x((W0e,B1)=>{var{promisify:H1}=require("util"),is=require("fs"),KX=t=>{if(!t)t={mode:511,fs:is};else if(typeof t=="object")t={mode:511,fs:is,...t};else if(typeof t=="number")t={mode:t,fs:is};else if(typeof t=="string")t={mode:parseInt(t,8),fs:is};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||is.mkdir,t.mkdirAsync=H1(t.mkdir),t.stat=t.stat||t.fs.stat||is.stat,t.statAsync=H1(t.stat),t.statSync=t.statSync||t.fs.statSync||is.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||is.mkdirSync,t};B1.exports=KX});var V1=x((Y0e,z1)=>{var XX=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:JX,parse:QX}=require("path"),ZX=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=JX(t),XX==="win32"){let e=/[*|"<>?:]/,{root:n}=QX(t);if(e.test(t.substr(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};z1.exports=ZX});var J1=x((K0e,X1)=>{var{dirname:W1}=require("path"),Y1=(t,e,n=void 0)=>n===e?Promise.resolve():t.statAsync(e).then(r=>r.isDirectory()?n:void 0,r=>r.code==="ENOENT"?Y1(t,W1(e),e):void 0),K1=(t,e,n=void 0)=>{if(n!==e)try{return t.statSync(e).isDirectory()?n:void 0}catch(r){return r.code==="ENOENT"?K1(t,W1(e),e):void 0}};X1.exports={findMade:Y1,findMadeSync:K1}});var yb=x((X0e,Z1)=>{var{dirname:Q1}=require("path"),gb=(t,e,n)=>{e.recursive=!1;let r=Q1(t);return r===t?e.mkdirAsync(t,e).catch(i=>{if(i.code!=="EISDIR")throw i}):e.mkdirAsync(t,e).then(()=>n||t,i=>{if(i.code==="ENOENT")return gb(r,e).then(o=>gb(t,e,o));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;return e.statAsync(t).then(o=>{if(o.isDirectory())return n;throw i},()=>{throw i})})},vb=(t,e,n)=>{let r=Q1(t);if(e.recursive=!1,r===t)try{return e.mkdirSync(t,e)}catch(i){if(i.code!=="EISDIR")throw i;return}try{return e.mkdirSync(t,e),n||t}catch(i){if(i.code==="ENOENT")return vb(t,e,vb(r,e,n));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;try{if(!e.statSync(t).isDirectory())throw i}catch{throw i}}};Z1.exports={mkdirpManual:gb,mkdirpManualSync:vb}});var nD=x((J0e,tD)=>{var{dirname:eD}=require("path"),{findMade:eJ,findMadeSync:tJ}=J1(),{mkdirpManual:nJ,mkdirpManualSync:rJ}=yb(),iJ=(t,e)=>(e.recursive=!0,eD(t)===t?e.mkdirAsync(t,e):eJ(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(i=>{if(i.code==="ENOENT")return nJ(t,e);throw i}))),oJ=(t,e)=>{if(e.recursive=!0,eD(t)===t)return e.mkdirSync(t,e);let r=tJ(e,t);try{return e.mkdirSync(t,e),r}catch(i){if(i.code==="ENOENT")return rJ(t,e);throw i}};tD.exports={mkdirpNative:iJ,mkdirpNativeSync:oJ}});var sD=x((Q0e,oD)=>{var rD=require("fs"),sJ=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,xb=sJ.replace(/^v/,"").split("."),iD=+xb[0]>10||+xb[0]==10&&+xb[1]>=12,aJ=iD?t=>t.mkdir===rD.mkdir:()=>!1,cJ=iD?t=>t.mkdirSync===rD.mkdirSync:()=>!1;oD.exports={useNative:aJ,useNativeSync:cJ}});var pD=x((Z0e,fD)=>{var cu=G1(),uu=V1(),{mkdirpNative:aD,mkdirpNativeSync:cD}=nD(),{mkdirpManual:uD,mkdirpManualSync:lD}=yb(),{useNative:uJ,useNativeSync:lJ}=sD(),lu=(t,e)=>(t=uu(t),e=cu(e),uJ(e)?aD(t,e):uD(t,e)),fJ=(t,e)=>(t=uu(t),e=cu(e),lJ(e)?cD(t,e):lD(t,e));lu.sync=fJ;lu.native=(t,e)=>aD(uu(t),cu(e));lu.manual=(t,e)=>uD(uu(t),cu(e));lu.nativeSync=(t,e)=>cD(uu(t),cu(e));lu.manualSync=(t,e)=>lD(uu(t),cu(e));fD.exports=lu});var xD=x((eCe,yD)=>{"use strict";var Er=require("fs"),_a=require("path"),pJ=Er.lchown?"lchown":"chown",dJ=Er.lchownSync?"lchownSync":"chownSync",hD=Er.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),dD=(t,e,n)=>{try{return Er[dJ](t,e,n)}catch(r){if(r.code!=="ENOENT")throw r}},hJ=(t,e,n)=>{try{return Er.chownSync(t,e,n)}catch(r){if(r.code!=="ENOENT")throw r}},mJ=hD?(t,e,n,r)=>i=>{!i||i.code!=="EISDIR"?r(i):Er.chown(t,e,n,r)}:(t,e,n,r)=>r,_b=hD?(t,e,n)=>{try{return dD(t,e,n)}catch(r){if(r.code!=="EISDIR")throw r;hJ(t,e,n)}}:(t,e,n)=>dD(t,e,n),gJ=process.version,mD=(t,e,n)=>Er.readdir(t,e,n),vJ=(t,e)=>Er.readdirSync(t,e);/^v4\./.test(gJ)&&(mD=(t,e,n)=>Er.readdir(t,n));var Rm=(t,e,n,r)=>{Er[pJ](t,e,n,mJ(t,e,n,i=>{r(i&&i.code!=="ENOENT"?i:null)}))},gD=(t,e,n,r,i)=>{if(typeof e=="string")return Er.lstat(_a.resolve(t,e),(o,s)=>{if(o)return i(o.code!=="ENOENT"?o:null);s.name=e,gD(t,s,n,r,i)});if(e.isDirectory())Eb(_a.resolve(t,e.name),n,r,o=>{if(o)return i(o);let s=_a.resolve(t,e.name);Rm(s,n,r,i)});else{let o=_a.resolve(t,e.name);Rm(o,n,r,i)}},Eb=(t,e,n,r)=>{mD(t,{withFileTypes:!0},(i,o)=>{if(i){if(i.code==="ENOENT")return r();if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return r(i)}if(i||!o.length)return Rm(t,e,n,r);let s=o.length,a=null,u=c=>{if(!a){if(c)return r(a=c);if(--s===0)return Rm(t,e,n,r)}};o.forEach(c=>gD(t,c,e,n,u))})},yJ=(t,e,n,r)=>{if(typeof e=="string")try{let i=Er.lstatSync(_a.resolve(t,e));i.name=e,e=i}catch(i){if(i.code==="ENOENT")return;throw i}e.isDirectory()&&vD(_a.resolve(t,e.name),n,r),_b(_a.resolve(t,e.name),n,r)},vD=(t,e,n)=>{let r;try{r=vJ(t,{withFileTypes:!0})}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return _b(t,e,n);throw i}return r&&r.length&&r.forEach(i=>yJ(t,i,e,n)),_b(t,e,n)};yD.exports=Eb;Eb.sync=vD});var wD=x((tCe,bb)=>{"use strict";var _D=pD(),br=require("fs"),Pm=require("path"),ED=xD(),Kr=Yc(),Om=class extends Error{constructor(e,n){super("Cannot extract through symbolic link"),this.path=n,this.symlink=e}get name(){return"SylinkError"}},Nm=class extends Error{constructor(e,n){super(n+": Cannot cd into '"+e+"'"),this.path=e,this.code=n}get name(){return"CwdError"}},Dm=(t,e)=>t.get(Kr(e)),Ff=(t,e,n)=>t.set(Kr(e),n),xJ=(t,e)=>{br.stat(t,(n,r)=>{(n||!r.isDirectory())&&(n=new Nm(t,n&&n.code||"ENOTDIR")),e(n)})};bb.exports=(t,e,n)=>{t=Kr(t);let r=e.umask,i=e.mode|448,o=(i&r)!==0,s=e.uid,a=e.gid,u=typeof s=="number"&&typeof a=="number"&&(s!==e.processUid||a!==e.processGid),c=e.preserve,l=e.unlink,f=e.cache,p=Kr(e.cwd),d=(g,v)=>{g?n(g):(Ff(f,t,!0),v&&u?ED(v,s,a,y=>d(y)):o?br.chmod(t,i,n):n())};if(f&&Dm(f,t)===!0)return d();if(t===p)return xJ(t,d);if(c)return _D(t,{mode:i}).then(g=>d(null,g),d);let m=Kr(Pm.relative(p,t)).split("/");Lm(p,m,i,f,l,p,null,d)};var Lm=(t,e,n,r,i,o,s,a)=>{if(!e.length)return a(null,s);let u=e.shift(),c=Kr(Pm.resolve(t+"/"+u));if(Dm(r,c))return Lm(c,e,n,r,i,o,s,a);br.mkdir(c,n,bD(c,e,n,r,i,o,s,a))},bD=(t,e,n,r,i,o,s,a)=>u=>{u?br.lstat(t,(c,l)=>{if(c)c.path=c.path&&Kr(c.path),a(c);else if(l.isDirectory())Lm(t,e,n,r,i,o,s,a);else if(i)br.unlink(t,f=>{if(f)return a(f);br.mkdir(t,n,bD(t,e,n,r,i,o,s,a))});else{if(l.isSymbolicLink())return a(new Om(t,t+"/"+e.join("/")));a(u)}}):(s=s||t,Lm(t,e,n,r,i,o,s,a))},_J=t=>{let e=!1,n="ENOTDIR";try{e=br.statSync(t).isDirectory()}catch(r){n=r.code}finally{if(!e)throw new Nm(t,n)}};bb.exports.sync=(t,e)=>{t=Kr(t);let n=e.umask,r=e.mode|448,i=(r&n)!==0,o=e.uid,s=e.gid,a=typeof o=="number"&&typeof s=="number"&&(o!==e.processUid||s!==e.processGid),u=e.preserve,c=e.unlink,l=e.cache,f=Kr(e.cwd),p=g=>{Ff(l,t,!0),g&&a&&ED.sync(g,o,s),i&&br.chmodSync(t,r)};if(l&&Dm(l,t)===!0)return p();if(t===f)return _J(f),p();if(u)return p(_D.sync(t,r));let h=Kr(Pm.relative(f,t)).split("/"),m=null;for(let g=h.shift(),v=f;g&&(v+="/"+g);g=h.shift())if(v=Kr(Pm.resolve(v)),!Dm(l,v))try{br.mkdirSync(v,r),m=m||v,Ff(l,v,!0)}catch{let _=br.lstatSync(v);if(_.isDirectory()){Ff(l,v,!0);continue}else if(c){br.unlinkSync(v),br.mkdirSync(v,r),m=m||v,Ff(l,v,!0);continue}else if(_.isSymbolicLink())return new Om(v,v+"/"+h.join("/"))}return p(m)}});var Sb=x((nCe,SD)=>{var wb=Object.create(null),{hasOwnProperty:EJ}=Object.prototype;SD.exports=t=>(EJ.call(wb,t)||(wb[t]=t.normalize("NFD")),wb[t])});var AD=x((rCe,ID)=>{var CD=require("assert"),bJ=Sb(),wJ=Jc(),{join:TD}=require("path"),SJ=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,CJ=SJ==="win32";ID.exports=()=>{let t=new Map,e=new Map,n=c=>c.split("/").slice(0,-1).reduce((f,p)=>(f.length&&(p=TD(f[f.length-1],p)),f.push(p||"/"),f),[]),r=new Set,i=c=>{let l=e.get(c);if(!l)throw new Error("function does not have any path reservations");return{paths:l.paths.map(f=>t.get(f)),dirs:[...l.dirs].map(f=>t.get(f))}},o=c=>{let{paths:l,dirs:f}=i(c);return l.every(p=>p[0]===c)&&f.every(p=>p[0]instanceof Set&&p[0].has(c))},s=c=>r.has(c)||!o(c)?!1:(r.add(c),c(()=>a(c)),!0),a=c=>{if(!r.has(c))return!1;let{paths:l,dirs:f}=e.get(c),p=new Set;return l.forEach(d=>{let h=t.get(d);CD.equal(h[0],c),h.length===1?t.delete(d):(h.shift(),typeof h[0]=="function"?p.add(h[0]):h[0].forEach(m=>p.add(m)))}),f.forEach(d=>{let h=t.get(d);CD(h[0]instanceof Set),h[0].size===1&&h.length===1?t.delete(d):h[0].size===1?(h.shift(),p.add(h[0])):h[0].delete(c)}),r.delete(c),p.forEach(d=>s(d)),!0};return{check:o,reserve:(c,l)=>{c=CJ?["win32 parallelization disabled"]:c.map(p=>wJ(TD(bJ(p))).toLowerCase());let f=new Set(c.map(p=>n(p)).reduce((p,d)=>p.concat(d)));return e.set(l,{dirs:f,paths:c}),c.forEach(p=>{let d=t.get(p);d?d.push(l):t.set(p,[l])}),f.forEach(p=>{let d=t.get(p);d?d[d.length-1]instanceof Set?d[d.length-1].add(l):d.push(new Set([l])):t.set(p,[new Set([l])])}),s(l)}}}});var OD=x((iCe,PD)=>{var TJ=process.env.__FAKE_PLATFORM__||process.platform,IJ=TJ==="win32",AJ=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:RJ,O_TRUNC:PJ,O_WRONLY:OJ,UV_FS_O_FILEMAP:RD=0}=AJ.constants,NJ=IJ&&!!RD,DJ=512*1024,LJ=RD|PJ|RJ|OJ;PD.exports=NJ?t=>t<DJ?LJ:"w":()=>"w"});var Db=x((oCe,zD)=>{"use strict";var kJ=require("assert"),FJ=Tm(),Le=require("fs"),MJ=su(),so=require("path"),HD=wD(),ND=NE(),qJ=AD(),UJ=DE(),wr=Yc(),jJ=Jc(),$J=Sb(),DD=Symbol("onEntry"),Ib=Symbol("checkFs"),LD=Symbol("checkFs2"),Mm=Symbol("pruneCache"),Ab=Symbol("isReusable"),Sr=Symbol("makeFs"),Rb=Symbol("file"),Pb=Symbol("directory"),qm=Symbol("link"),kD=Symbol("symlink"),FD=Symbol("hardlink"),MD=Symbol("unsupported"),qD=Symbol("checkPath"),os=Symbol("mkdir"),un=Symbol("onError"),km=Symbol("pending"),UD=Symbol("pend"),fu=Symbol("unpend"),Cb=Symbol("ended"),Tb=Symbol("maybeClose"),Ob=Symbol("skip"),Mf=Symbol("doChown"),qf=Symbol("uid"),Uf=Symbol("gid"),jf=Symbol("checkedCwd"),BD=require("crypto"),GD=OD(),HJ=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,$f=HJ==="win32",BJ=1024,GJ=(t,e)=>{if(!$f)return Le.unlink(t,e);let n=t+".DELETE."+BD.randomBytes(16).toString("hex");Le.rename(t,n,r=>{if(r)return e(r);Le.unlink(n,e)})},zJ=t=>{if(!$f)return Le.unlinkSync(t);let e=t+".DELETE."+BD.randomBytes(16).toString("hex");Le.renameSync(t,e),Le.unlinkSync(e)},jD=(t,e,n)=>t===t>>>0?t:e===e>>>0?e:n,$D=t=>jJ(wr($J(t))).toLowerCase(),VJ=(t,e)=>{e=$D(e);for(let n of t.keys()){let r=$D(n);(r===e||r.indexOf(e+"/")===0)&&t.delete(n)}},WJ=t=>{for(let e of t.keys())t.delete(e)},Hf=class extends FJ{constructor(e){if(e||(e={}),e.ondone=n=>{this[Cb]=!0,this[Tb]()},super(e),this[jf]=!1,this.reservations=qJ(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[km]=0,this[Cb]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:BJ,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||$f,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=wr(so.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",n=>this[DD](n))}warn(e,n,r={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(r.recoverable=!1),super.warn(e,n,r)}[Tb](){this[Cb]&&this[km]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[qD](e){let n=wr(e.path),r=n.split("/");if(this.strip){if(r.length<this.strip)return!1;if(e.type==="Link"){let i=wr(e.linkpath).split("/");if(i.length>=this.strip)e.linkpath=i.slice(this.strip).join("/");else return!1}r.splice(0,this.strip),e.path=r.join("/")}if(isFinite(this.maxDepth)&&r.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:n,depth:r.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(r.includes("..")||$f&&/^[a-z]:\.\.$/i.test(r[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:n}),!1;let[i,o]=UJ(n);i&&(e.path=o,this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:e,path:n}))}if(so.isAbsolute(e.path)?e.absolute=wr(so.resolve(e.path)):e.absolute=wr(so.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:wr(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:i}=so.win32.parse(e.absolute);e.absolute=i+ND.encode(e.absolute.slice(i.length));let{root:o}=so.win32.parse(e.path);e.path=o+ND.encode(e.path.slice(o.length))}return!0}[DD](e){if(!this[qD](e))return e.resume();switch(kJ.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Ib](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[MD](e)}}[un](e,n){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:n}),this[fu](),n.resume())}[os](e,n,r){HD(wr(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:n,noChmod:this.noChmod},r)}[Mf](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[qf](e){return jD(this.uid,e.uid,this.processUid)}[Uf](e){return jD(this.gid,e.gid,this.processGid)}[Rb](e,n){let r=e.mode&4095||this.fmode,i=new MJ.WriteStream(e.absolute,{flags:GD(e.size),mode:r,autoClose:!1});i.on("error",u=>{i.fd&&Le.close(i.fd,()=>{}),i.write=()=>!0,this[un](u,e),n()});let o=1,s=u=>{if(u){i.fd&&Le.close(i.fd,()=>{}),this[un](u,e),n();return}--o===0&&Le.close(i.fd,c=>{c?this[un](c,e):this[fu](),n()})};i.on("finish",u=>{let c=e.absolute,l=i.fd;if(e.mtime&&!this.noMtime){o++;let f=e.atime||new Date,p=e.mtime;Le.futimes(l,f,p,d=>d?Le.utimes(c,f,p,h=>s(h&&d)):s())}if(this[Mf](e)){o++;let f=this[qf](e),p=this[Uf](e);Le.fchown(l,f,p,d=>d?Le.chown(c,f,p,h=>s(h&&d)):s())}s()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",u=>{this[un](u,e),n()}),e.pipe(a)),a.pipe(i)}[Pb](e,n){let r=e.mode&4095||this.dmode;this[os](e.absolute,r,i=>{if(i){this[un](i,e),n();return}let o=1,s=a=>{--o===0&&(n(),this[fu](),e.resume())};e.mtime&&!this.noMtime&&(o++,Le.utimes(e.absolute,e.atime||new Date,e.mtime,s)),this[Mf](e)&&(o++,Le.chown(e.absolute,this[qf](e),this[Uf](e),s)),s()})}[MD](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[kD](e,n){this[qm](e,e.linkpath,"symlink",n)}[FD](e,n){let r=wr(so.resolve(this.cwd,e.linkpath));this[qm](e,r,"link",n)}[UD](){this[km]++}[fu](){this[km]--,this[Tb]()}[Ob](e){this[fu](),e.resume()}[Ab](e,n){return e.type==="File"&&!this.unlink&&n.isFile()&&n.nlink<=1&&!$f}[Ib](e){this[UD]();let n=[e.path];e.linkpath&&n.push(e.linkpath),this.reservations.reserve(n,r=>this[LD](e,r))}[Mm](e){e.type==="SymbolicLink"?WJ(this.dirCache):e.type!=="Directory"&&VJ(this.dirCache,e.absolute)}[LD](e,n){this[Mm](e);let r=a=>{this[Mm](e),n(a)},i=()=>{this[os](this.cwd,this.dmode,a=>{if(a){this[un](a,e),r();return}this[jf]=!0,o()})},o=()=>{if(e.absolute!==this.cwd){let a=wr(so.dirname(e.absolute));if(a!==this.cwd)return this[os](a,this.dmode,u=>{if(u){this[un](u,e),r();return}s()})}s()},s=()=>{Le.lstat(e.absolute,(a,u)=>{if(u&&(this.keep||this.newer&&u.mtime>e.mtime)){this[Ob](e),r();return}if(a||this[Ab](e,u))return this[Sr](null,e,r);if(u.isDirectory()){if(e.type==="Directory"){let c=!this.noChmod&&e.mode&&(u.mode&4095)!==e.mode,l=f=>this[Sr](f,e,r);return c?Le.chmod(e.absolute,e.mode,l):l()}if(e.absolute!==this.cwd)return Le.rmdir(e.absolute,c=>this[Sr](c,e,r))}if(e.absolute===this.cwd)return this[Sr](null,e,r);GJ(e.absolute,c=>this[Sr](c,e,r))})};this[jf]?o():i()}[Sr](e,n,r){if(e){this[un](e,n),r();return}switch(n.type){case"File":case"OldFile":case"ContiguousFile":return this[Rb](n,r);case"Link":return this[FD](n,r);case"SymbolicLink":return this[kD](n,r);case"Directory":case"GNUDumpDir":return this[Pb](n,r)}}[qm](e,n,r,i){Le[r](n,e.absolute,o=>{o?this[un](o,e):(this[fu](),e.resume()),i()})}},Fm=t=>{try{return[null,t()]}catch(e){return[e,null]}},Nb=class extends Hf{[Sr](e,n){return super[Sr](e,n,()=>{})}[Ib](e){if(this[Mm](e),!this[jf]){let o=this[os](this.cwd,this.dmode);if(o)return this[un](o,e);this[jf]=!0}if(e.absolute!==this.cwd){let o=wr(so.dirname(e.absolute));if(o!==this.cwd){let s=this[os](o,this.dmode);if(s)return this[un](s,e)}}let[n,r]=Fm(()=>Le.lstatSync(e.absolute));if(r&&(this.keep||this.newer&&r.mtime>e.mtime))return this[Ob](e);if(n||this[Ab](e,r))return this[Sr](null,e);if(r.isDirectory()){if(e.type==="Directory"){let s=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode,[a]=s?Fm(()=>{Le.chmodSync(e.absolute,e.mode)}):[];return this[Sr](a,e)}let[o]=Fm(()=>Le.rmdirSync(e.absolute));this[Sr](o,e)}let[i]=e.absolute===this.cwd?[]:Fm(()=>zJ(e.absolute));this[Sr](i,e)}[Rb](e,n){let r=e.mode&4095||this.fmode,i=a=>{let u;try{Le.closeSync(o)}catch(c){u=c}(a||u)&&this[un](a||u,e),n()},o;try{o=Le.openSync(e.absolute,GD(e.size),r)}catch(a){return i(a)}let s=this.transform&&this.transform(e)||e;s!==e&&(s.on("error",a=>this[un](a,e)),e.pipe(s)),s.on("data",a=>{try{Le.writeSync(o,a,0,a.length)}catch(u){i(u)}}),s.on("end",a=>{let u=null;if(e.mtime&&!this.noMtime){let c=e.atime||new Date,l=e.mtime;try{Le.futimesSync(o,c,l)}catch(f){try{Le.utimesSync(e.absolute,c,l)}catch{u=f}}}if(this[Mf](e)){let c=this[qf](e),l=this[Uf](e);try{Le.fchownSync(o,c,l)}catch(f){try{Le.chownSync(e.absolute,c,l)}catch{u=u||f}}}i(u)})}[Pb](e,n){let r=e.mode&4095||this.dmode,i=this[os](e.absolute,r);if(i){this[un](i,e),n();return}if(e.mtime&&!this.noMtime)try{Le.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Mf](e))try{Le.chownSync(e.absolute,this[qf](e),this[Uf](e))}catch{}n(),e.resume()}[os](e,n){try{return HD.sync(wr(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:n})}catch(r){return r}}[qm](e,n,r,i){try{Le[r+"Sync"](n,e.absolute),i(),e.resume()}catch(o){return this[un](o,e)}}};Hf.Sync=Nb;zD.exports=Hf});var XD=x((sCe,KD)=>{"use strict";var YJ=Bc(),Um=Db(),WD=require("fs"),YD=su(),VD=require("path"),Lb=Jc();KD.exports=(t,e,n)=>{typeof t=="function"?(n=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(n=e,e=null),e?e=Array.from(e):e=[];let r=YJ(t);if(r.sync&&typeof n=="function")throw new TypeError("callback not supported for sync tar functions");if(!r.file&&typeof n=="function")throw new TypeError("callback only supported with file option");return e.length&&KJ(r,e),r.file&&r.sync?XJ(r):r.file?JJ(r,n):r.sync?QJ(r):ZJ(r)};var KJ=(t,e)=>{let n=new Map(e.map(o=>[Lb(o),!0])),r=t.filter,i=(o,s)=>{let a=s||VD.parse(o).root||".",u=o===a?!1:n.has(o)?n.get(o):i(VD.dirname(o),a);return n.set(o,u),u};t.filter=r?(o,s)=>r(o,s)&&i(Lb(o)):o=>i(Lb(o))},XJ=t=>{let e=new Um.Sync(t),n=t.file,r=WD.statSync(n),i=t.maxReadSize||16*1024*1024;new YD.ReadStreamSync(n,{readSize:i,size:r.size}).pipe(e)},JJ=(t,e)=>{let n=new Um(t),r=t.maxReadSize||16*1024*1024,i=t.file,o=new Promise((s,a)=>{n.on("error",a),n.on("close",s),WD.stat(i,(u,c)=>{if(u)a(u);else{let l=new YD.ReadStream(i,{readSize:r,size:c.size});l.on("error",a),l.pipe(n)}})});return e?o.then(e,e):o},QJ=t=>new Um.Sync(t),ZJ=t=>new Um(t)});var jm=x(Nt=>{"use strict";Nt.c=Nt.create=N1();Nt.r=Nt.replace=mb();Nt.t=Nt.list=Im();Nt.u=Nt.update=$1();Nt.x=Nt.extract=XD();Nt.Pack=pm();Nt.Unpack=Db();Nt.Parse=Tm();Nt.ReadEntry=Yh();Nt.WriteEntry=BE();Nt.Header=Xc();Nt.Pax=Xh();Nt.types=CE()});var Bf=x((cCe,JD)=>{var eQ="2.0.0",tQ=Number.MAX_SAFE_INTEGER||9007199254740991,nQ=16,rQ=256-6,iQ=["major","premajor","minor","preminor","patch","prepatch","prerelease"];JD.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:nQ,MAX_SAFE_BUILD_LENGTH:rQ,MAX_SAFE_INTEGER:tQ,RELEASE_TYPES:iQ,SEMVER_SPEC_VERSION:eQ,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Gf=x((uCe,QD)=>{var oQ=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};QD.exports=oQ});var pu=x((ao,ZD)=>{var{MAX_SAFE_COMPONENT_LENGTH:kb,MAX_SAFE_BUILD_LENGTH:sQ,MAX_LENGTH:aQ}=Bf(),cQ=Gf();ao=ZD.exports={};var uQ=ao.re=[],lQ=ao.safeRe=[],J=ao.src=[],Q=ao.t={},fQ=0,Fb="[a-zA-Z0-9-]",pQ=[["\\s",1],["\\d",aQ],[Fb,sQ]],dQ=t=>{for(let[e,n]of pQ)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},xe=(t,e,n)=>{let r=dQ(e),i=fQ++;cQ(t,i,e),Q[t]=i,J[i]=e,uQ[i]=new RegExp(e,n?"g":void 0),lQ[i]=new RegExp(r,n?"g":void 0)};xe("NUMERICIDENTIFIER","0|[1-9]\\d*");xe("NUMERICIDENTIFIERLOOSE","\\d+");xe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Fb}*`);xe("MAINVERSION",`(${J[Q.NUMERICIDENTIFIER]})\\.(${J[Q.NUMERICIDENTIFIER]})\\.(${J[Q.NUMERICIDENTIFIER]})`);xe("MAINVERSIONLOOSE",`(${J[Q.NUMERICIDENTIFIERLOOSE]})\\.(${J[Q.NUMERICIDENTIFIERLOOSE]})\\.(${J[Q.NUMERICIDENTIFIERLOOSE]})`);xe("PRERELEASEIDENTIFIER",`(?:${J[Q.NUMERICIDENTIFIER]}|${J[Q.NONNUMERICIDENTIFIER]})`);xe("PRERELEASEIDENTIFIERLOOSE",`(?:${J[Q.NUMERICIDENTIFIERLOOSE]}|${J[Q.NONNUMERICIDENTIFIER]})`);xe("PRERELEASE",`(?:-(${J[Q.PRERELEASEIDENTIFIER]}(?:\\.${J[Q.PRERELEASEIDENTIFIER]})*))`);xe("PRERELEASELOOSE",`(?:-?(${J[Q.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${J[Q.PRERELEASEIDENTIFIERLOOSE]})*))`);xe("BUILDIDENTIFIER",`${Fb}+`);xe("BUILD",`(?:\\+(${J[Q.BUILDIDENTIFIER]}(?:\\.${J[Q.BUILDIDENTIFIER]})*))`);xe("FULLPLAIN",`v?${J[Q.MAINVERSION]}${J[Q.PRERELEASE]}?${J[Q.BUILD]}?`);xe("FULL",`^${J[Q.FULLPLAIN]}$`);xe("LOOSEPLAIN",`[v=\\s]*${J[Q.MAINVERSIONLOOSE]}${J[Q.PRERELEASELOOSE]}?${J[Q.BUILD]}?`);xe("LOOSE",`^${J[Q.LOOSEPLAIN]}$`);xe("GTLT","((?:<|>)?=?)");xe("XRANGEIDENTIFIERLOOSE",`${J[Q.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);xe("XRANGEIDENTIFIER",`${J[Q.NUMERICIDENTIFIER]}|x|X|\\*`);xe("XRANGEPLAIN",`[v=\\s]*(${J[Q.XRANGEIDENTIFIER]})(?:\\.(${J[Q.XRANGEIDENTIFIER]})(?:\\.(${J[Q.XRANGEIDENTIFIER]})(?:${J[Q.PRERELEASE]})?${J[Q.BUILD]}?)?)?`);xe("XRANGEPLAINLOOSE",`[v=\\s]*(${J[Q.XRANGEIDENTIFIERLOOSE]})(?:\\.(${J[Q.XRANGEIDENTIFIERLOOSE]})(?:\\.(${J[Q.XRANGEIDENTIFIERLOOSE]})(?:${J[Q.PRERELEASELOOSE]})?${J[Q.BUILD]}?)?)?`);xe("XRANGE",`^${J[Q.GTLT]}\\s*${J[Q.XRANGEPLAIN]}$`);xe("XRANGELOOSE",`^${J[Q.GTLT]}\\s*${J[Q.XRANGEPLAINLOOSE]}$`);xe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${kb}})(?:\\.(\\d{1,${kb}}))?(?:\\.(\\d{1,${kb}}))?`);xe("COERCE",`${J[Q.COERCEPLAIN]}(?:$|[^\\d])`);xe("COERCEFULL",J[Q.COERCEPLAIN]+`(?:${J[Q.PRERELEASE]})?(?:${J[Q.BUILD]})?(?:$|[^\\d])`);xe("COERCERTL",J[Q.COERCE],!0);xe("COERCERTLFULL",J[Q.COERCEFULL],!0);xe("LONETILDE","(?:~>?)");xe("TILDETRIM",`(\\s*)${J[Q.LONETILDE]}\\s+`,!0);ao.tildeTrimReplace="$1~";xe("TILDE",`^${J[Q.LONETILDE]}${J[Q.XRANGEPLAIN]}$`);xe("TILDELOOSE",`^${J[Q.LONETILDE]}${J[Q.XRANGEPLAINLOOSE]}$`);xe("LONECARET","(?:\\^)");xe("CARETTRIM",`(\\s*)${J[Q.LONECARET]}\\s+`,!0);ao.caretTrimReplace="$1^";xe("CARET",`^${J[Q.LONECARET]}${J[Q.XRANGEPLAIN]}$`);xe("CARETLOOSE",`^${J[Q.LONECARET]}${J[Q.XRANGEPLAINLOOSE]}$`);xe("COMPARATORLOOSE",`^${J[Q.GTLT]}\\s*(${J[Q.LOOSEPLAIN]})$|^$`);xe("COMPARATOR",`^${J[Q.GTLT]}\\s*(${J[Q.FULLPLAIN]})$|^$`);xe("COMPARATORTRIM",`(\\s*)${J[Q.GTLT]}\\s*(${J[Q.LOOSEPLAIN]}|${J[Q.XRANGEPLAIN]})`,!0);ao.comparatorTrimReplace="$1$2$3";xe("HYPHENRANGE",`^\\s*(${J[Q.XRANGEPLAIN]})\\s+-\\s+(${J[Q.XRANGEPLAIN]})\\s*$`);xe("HYPHENRANGELOOSE",`^\\s*(${J[Q.XRANGEPLAINLOOSE]})\\s+-\\s+(${J[Q.XRANGEPLAINLOOSE]})\\s*$`);xe("STAR","(<|>)?=?\\s*\\*");xe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");xe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var $m=x((lCe,eL)=>{var hQ=Object.freeze({loose:!0}),mQ=Object.freeze({}),gQ=t=>t?typeof t!="object"?hQ:t:mQ;eL.exports=gQ});var Mb=x((fCe,rL)=>{var tL=/^[0-9]+$/,nL=(t,e)=>{let n=tL.test(t),r=tL.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},vQ=(t,e)=>nL(e,t);rL.exports={compareIdentifiers:nL,rcompareIdentifiers:vQ}});var ln=x((pCe,aL)=>{var Hm=Gf(),{MAX_LENGTH:iL,MAX_SAFE_INTEGER:Bm}=Bf(),{safeRe:oL,t:sL}=pu(),yQ=$m(),{compareIdentifiers:du}=Mb(),qb=class t{constructor(e,n){if(n=yQ(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>iL)throw new TypeError(`version is longer than ${iL} characters`);Hm("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?oL[sL.LOOSE]:oL[sL.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Bm||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Bm||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Bm||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Bm)return o}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Hm("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),du(this.major,e.major)||du(this.minor,e.minor)||du(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=e.prerelease[n];if(Hm("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return du(r,i)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],i=e.build[n];if(Hm("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return du(r,i)}while(++n)}inc(e,n,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let o=[n,i];r===!1&&(o=[n]),du(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};aL.exports=qb});var Ea=x((dCe,uL)=>{var cL=ln(),xQ=(t,e,n=!1)=>{if(t instanceof cL)return t;try{return new cL(t,e)}catch(r){if(!n)return null;throw r}};uL.exports=xQ});var fL=x((hCe,lL)=>{var _Q=Ea(),EQ=(t,e)=>{let n=_Q(t,e);return n?n.version:null};lL.exports=EQ});var dL=x((mCe,pL)=>{var bQ=Ea(),wQ=(t,e)=>{let n=bQ(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};pL.exports=wQ});var gL=x((gCe,mL)=>{var hL=ln(),SQ=(t,e,n,r,i)=>{typeof n=="string"&&(i=r,r=n,n=void 0);try{return new hL(t instanceof hL?t.version:t,n).inc(e,r,i).version}catch{return null}};mL.exports=SQ});var xL=x((vCe,yL)=>{var vL=Ea(),CQ=(t,e)=>{let n=vL(t,null,!0),r=vL(e,null,!0),i=n.compare(r);if(i===0)return null;let o=i>0,s=o?n:r,a=o?r:n,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";let l=u?"pre":"";return n.major!==r.major?l+"major":n.minor!==r.minor?l+"minor":n.patch!==r.patch?l+"patch":"prerelease"};yL.exports=CQ});var EL=x((yCe,_L)=>{var TQ=ln(),IQ=(t,e)=>new TQ(t,e).major;_L.exports=IQ});var wL=x((xCe,bL)=>{var AQ=ln(),RQ=(t,e)=>new AQ(t,e).minor;bL.exports=RQ});var CL=x((_Ce,SL)=>{var PQ=ln(),OQ=(t,e)=>new PQ(t,e).patch;SL.exports=OQ});var IL=x((ECe,TL)=>{var NQ=Ea(),DQ=(t,e)=>{let n=NQ(t,e);return n&&n.prerelease.length?n.prerelease:null};TL.exports=DQ});var Cr=x((bCe,RL)=>{var AL=ln(),LQ=(t,e,n)=>new AL(t,n).compare(new AL(e,n));RL.exports=LQ});var OL=x((wCe,PL)=>{var kQ=Cr(),FQ=(t,e,n)=>kQ(e,t,n);PL.exports=FQ});var DL=x((SCe,NL)=>{var MQ=Cr(),qQ=(t,e)=>MQ(t,e,!0);NL.exports=qQ});var Gm=x((CCe,kL)=>{var LL=ln(),UQ=(t,e,n)=>{let r=new LL(t,n),i=new LL(e,n);return r.compare(i)||r.compareBuild(i)};kL.exports=UQ});var ML=x((TCe,FL)=>{var jQ=Gm(),$Q=(t,e)=>t.sort((n,r)=>jQ(n,r,e));FL.exports=$Q});var UL=x((ICe,qL)=>{var HQ=Gm(),BQ=(t,e)=>t.sort((n,r)=>HQ(r,n,e));qL.exports=BQ});var zf=x((ACe,jL)=>{var GQ=Cr(),zQ=(t,e,n)=>GQ(t,e,n)>0;jL.exports=zQ});var zm=x((RCe,$L)=>{var VQ=Cr(),WQ=(t,e,n)=>VQ(t,e,n)<0;$L.exports=WQ});var Ub=x((PCe,HL)=>{var YQ=Cr(),KQ=(t,e,n)=>YQ(t,e,n)===0;HL.exports=KQ});var jb=x((OCe,BL)=>{var XQ=Cr(),JQ=(t,e,n)=>XQ(t,e,n)!==0;BL.exports=JQ});var Vm=x((NCe,GL)=>{var QQ=Cr(),ZQ=(t,e,n)=>QQ(t,e,n)>=0;GL.exports=ZQ});var Wm=x((DCe,zL)=>{var eZ=Cr(),tZ=(t,e,n)=>eZ(t,e,n)<=0;zL.exports=tZ});var $b=x((LCe,VL)=>{var nZ=Ub(),rZ=jb(),iZ=zf(),oZ=Vm(),sZ=zm(),aZ=Wm(),cZ=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return nZ(t,n,r);case"!=":return rZ(t,n,r);case">":return iZ(t,n,r);case">=":return oZ(t,n,r);case"<":return sZ(t,n,r);case"<=":return aZ(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};VL.exports=cZ});var YL=x((kCe,WL)=>{var uZ=ln(),lZ=Ea(),{safeRe:Ym,t:Km}=pu(),fZ=(t,e)=>{if(t instanceof uZ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Ym[Km.COERCEFULL]:Ym[Km.COERCE]);else{let u=e.includePrerelease?Ym[Km.COERCERTLFULL]:Ym[Km.COERCERTL],c;for(;(c=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),u.lastIndex=c.index+c[1].length+c[2].length;u.lastIndex=-1}if(n===null)return null;let r=n[2],i=n[3]||"0",o=n[4]||"0",s=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return lZ(`${r}.${i}.${o}${s}${a}`,e)};WL.exports=fZ});var ZL=x((FCe,QL)=>{"use strict";var pZ=rm(),ba=Symbol("max"),uo=Symbol("length"),hu=Symbol("lengthCalculator"),Wf=Symbol("allowStale"),wa=Symbol("maxAge"),co=Symbol("dispose"),KL=Symbol("noDisposeOnSet"),Ht=Symbol("lruList"),Xr=Symbol("cache"),JL=Symbol("updateAgeOnGet"),Hb=()=>1,Gb=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let n=this[ba]=e.max||1/0,r=e.length||Hb;if(this[hu]=typeof r!="function"?Hb:r,this[Wf]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[wa]=e.maxAge||0,this[co]=e.dispose,this[KL]=e.noDisposeOnSet||!1,this[JL]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[ba]=e||1/0,Vf(this)}get max(){return this[ba]}set allowStale(e){this[Wf]=!!e}get allowStale(){return this[Wf]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[wa]=e,Vf(this)}get maxAge(){return this[wa]}set lengthCalculator(e){typeof e!="function"&&(e=Hb),e!==this[hu]&&(this[hu]=e,this[uo]=0,this[Ht].forEach(n=>{n.length=this[hu](n.value,n.key),this[uo]+=n.length})),Vf(this)}get lengthCalculator(){return this[hu]}get length(){return this[uo]}get itemCount(){return this[Ht].length}rforEach(e,n){n=n||this;for(let r=this[Ht].tail;r!==null;){let i=r.prev;XL(this,e,r,n),r=i}}forEach(e,n){n=n||this;for(let r=this[Ht].head;r!==null;){let i=r.next;XL(this,e,r,n),r=i}}keys(){return this[Ht].toArray().map(e=>e.key)}values(){return this[Ht].toArray().map(e=>e.value)}reset(){this[co]&&this[Ht]&&this[Ht].length&&this[Ht].forEach(e=>this[co](e.key,e.value)),this[Xr]=new Map,this[Ht]=new pZ,this[uo]=0}dump(){return this[Ht].map(e=>Xm(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ht]}set(e,n,r){if(r=r||this[wa],r&&typeof r!="number")throw new TypeError("maxAge must be a number");let i=r?Date.now():0,o=this[hu](n,e);if(this[Xr].has(e)){if(o>this[ba])return mu(this,this[Xr].get(e)),!1;let u=this[Xr].get(e).value;return this[co]&&(this[KL]||this[co](e,u.value)),u.now=i,u.maxAge=r,u.value=n,this[uo]+=o-u.length,u.length=o,this.get(e),Vf(this),!0}let s=new zb(e,n,o,i,r);return s.length>this[ba]?(this[co]&&this[co](e,n),!1):(this[uo]+=s.length,this[Ht].unshift(s),this[Xr].set(e,this[Ht].head),Vf(this),!0)}has(e){if(!this[Xr].has(e))return!1;let n=this[Xr].get(e).value;return!Xm(this,n)}get(e){return Bb(this,e,!0)}peek(e){return Bb(this,e,!1)}pop(){let e=this[Ht].tail;return e?(mu(this,e),e.value):null}del(e){mu(this,this[Xr].get(e))}load(e){this.reset();let n=Date.now();for(let r=e.length-1;r>=0;r--){let i=e[r],o=i.e||0;if(o===0)this.set(i.k,i.v);else{let s=o-n;s>0&&this.set(i.k,i.v,s)}}}prune(){this[Xr].forEach((e,n)=>Bb(this,n,!1))}},Bb=(t,e,n)=>{let r=t[Xr].get(e);if(r){let i=r.value;if(Xm(t,i)){if(mu(t,r),!t[Wf])return}else n&&(t[JL]&&(r.value.now=Date.now()),t[Ht].unshiftNode(r));return i.value}},Xm=(t,e)=>{if(!e||!e.maxAge&&!t[wa])return!1;let n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[wa]&&n>t[wa]},Vf=t=>{if(t[uo]>t[ba])for(let e=t[Ht].tail;t[uo]>t[ba]&&e!==null;){let n=e.prev;mu(t,e),e=n}},mu=(t,e)=>{if(e){let n=e.value;t[co]&&t[co](n.key,n.value),t[uo]-=n.length,t[Xr].delete(n.key),t[Ht].removeNode(e)}},zb=class{constructor(e,n,r,i,o){this.key=e,this.value=n,this.length=r,this.now=i,this.maxAge=o||0}},XL=(t,e,n,r)=>{let i=n.value;Xm(t,i)&&(mu(t,n),t[Wf]||(i=void 0)),i&&e.call(r,i.value,i.key,t)};QL.exports=Gb});var Tr=x((MCe,rk)=>{var Vb=class t{constructor(e,n){if(n=hZ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Wb)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!tk(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&EZ(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&xZ)|(this.options.loose&&_Z))+":"+e,i=ek.get(r);if(i)return i;let o=this.options.loose,s=o?Mn[Sn.HYPHENRANGELOOSE]:Mn[Sn.HYPHENRANGE];e=e.replace(s,OZ(this.options.includePrerelease)),et("hyphen replace",e),e=e.replace(Mn[Sn.COMPARATORTRIM],gZ),et("comparator trim",e),e=e.replace(Mn[Sn.TILDETRIM],vZ),et("tilde trim",e),e=e.replace(Mn[Sn.CARETTRIM],yZ),et("caret trim",e);let a=e.split(" ").map(f=>bZ(f,this.options)).join(" ").split(/\s+/).map(f=>PZ(f,this.options));o&&(a=a.filter(f=>(et("loose invalid filter",f,this.options),!!f.match(Mn[Sn.COMPARATORLOOSE])))),et("range list",a);let u=new Map,c=a.map(f=>new Wb(f,this.options));for(let f of c){if(tk(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return ek.set(r,l),l}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>nk(r,n)&&e.set.some(i=>nk(i,n)&&r.every(o=>i.every(s=>o.intersects(s,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new mZ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(NZ(this.set[n],e,this.options))return!0;return!1}};rk.exports=Vb;var dZ=ZL(),ek=new dZ({max:1e3}),hZ=$m(),Wb=Yf(),et=Gf(),mZ=ln(),{safeRe:Mn,t:Sn,comparatorTrimReplace:gZ,tildeTrimReplace:vZ,caretTrimReplace:yZ}=pu(),{FLAG_INCLUDE_PRERELEASE:xZ,FLAG_LOOSE:_Z}=Bf(),tk=t=>t.value==="<0.0.0-0",EZ=t=>t.value==="",nk=(t,e)=>{let n=!0,r=t.slice(),i=r.pop();for(;n&&r.length;)n=r.every(o=>i.intersects(o,e)),i=r.pop();return n},bZ=(t,e)=>(et("comp",t,e),t=CZ(t,e),et("caret",t),t=wZ(t,e),et("tildes",t),t=IZ(t,e),et("xrange",t),t=RZ(t,e),et("stars",t),t),Cn=t=>!t||t.toLowerCase()==="x"||t==="*",wZ=(t,e)=>t.trim().split(/\s+/).map(n=>SZ(n,e)).join(" "),SZ=(t,e)=>{let n=e.loose?Mn[Sn.TILDELOOSE]:Mn[Sn.TILDE];return t.replace(n,(r,i,o,s,a)=>{et("tilde",t,r,i,o,s,a);let u;return Cn(i)?u="":Cn(o)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:Cn(s)?u=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:a?(et("replaceTilde pr",a),u=`>=${i}.${o}.${s}-${a} <${i}.${+o+1}.0-0`):u=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,et("tilde return",u),u})},CZ=(t,e)=>t.trim().split(/\s+/).map(n=>TZ(n,e)).join(" "),TZ=(t,e)=>{et("caret",t,e);let n=e.loose?Mn[Sn.CARETLOOSE]:Mn[Sn.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(i,o,s,a,u)=>{et("caret",t,i,o,s,a,u);let c;return Cn(o)?c="":Cn(s)?c=`>=${o}.0.0${r} <${+o+1}.0.0-0`:Cn(a)?o==="0"?c=`>=${o}.${s}.0${r} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.0${r} <${+o+1}.0.0-0`:u?(et("replaceCaret pr",u),o==="0"?s==="0"?c=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(et("no pr"),o==="0"?s==="0"?c=`>=${o}.${s}.${a}${r} <${o}.${s}.${+a+1}-0`:c=`>=${o}.${s}.${a}${r} <${o}.${+s+1}.0-0`:c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),et("caret return",c),c})},IZ=(t,e)=>(et("replaceXRanges",t,e),t.split(/\s+/).map(n=>AZ(n,e)).join(" ")),AZ=(t,e)=>{t=t.trim();let n=e.loose?Mn[Sn.XRANGELOOSE]:Mn[Sn.XRANGE];return t.replace(n,(r,i,o,s,a,u)=>{et("xRange",t,r,i,o,s,a,u);let c=Cn(o),l=c||Cn(s),f=l||Cn(a),p=f;return i==="="&&p&&(i=""),u=e.includePrerelease?"-0":"",c?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&p?(l&&(s=0),a=0,i===">"?(i=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",l?o=+o+1:s=+s+1),i==="<"&&(u="-0"),r=`${i+o}.${s}.${a}${u}`):l?r=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),et("xRange return",r),r})},RZ=(t,e)=>(et("replaceStars",t,e),t.trim().replace(Mn[Sn.STAR],"")),PZ=(t,e)=>(et("replaceGTE0",t,e),t.trim().replace(Mn[e.includePrerelease?Sn.GTE0PRE:Sn.GTE0],"")),OZ=t=>(e,n,r,i,o,s,a,u,c,l,f,p,d)=>(Cn(r)?n="":Cn(i)?n=`>=${r}.0.0${t?"-0":""}`:Cn(o)?n=`>=${r}.${i}.0${t?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Cn(c)?u="":Cn(l)?u=`<${+c+1}.0.0-0`:Cn(f)?u=`<${c}.${+l+1}.0-0`:p?u=`<=${c}.${l}.${f}-${p}`:t?u=`<${c}.${l}.${+f+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),NZ=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(et(t[r].semver),t[r].semver!==Wb.ANY&&t[r].semver.prerelease.length>0){let i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Yf=x((qCe,uk)=>{var Kf=Symbol("SemVer ANY"),Xb=class t{static get ANY(){return Kf}constructor(e,n){if(n=ik(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kb("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Kf?this.value="":this.value=this.operator+this.semver.version,Kb("comp",this)}parse(e){let n=this.options.loose?ok[sk.COMPARATORLOOSE]:ok[sk.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new ak(r[2],this.options.loose):this.semver=Kf}toString(){return this.value}test(e){if(Kb("Comparator.test",e,this.options.loose),this.semver===Kf||e===Kf)return!0;if(typeof e=="string")try{e=new ak(e,this.options)}catch{return!1}return Yb(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ck(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new ck(this.value,n).test(e.semver):(n=ik(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Yb(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Yb(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};uk.exports=Xb;var ik=$m(),{safeRe:ok,t:sk}=pu(),Yb=$b(),Kb=Gf(),ak=ln(),ck=Tr()});var Xf=x((UCe,lk)=>{var DZ=Tr(),LZ=(t,e,n)=>{try{e=new DZ(e,n)}catch{return!1}return e.test(t)};lk.exports=LZ});var pk=x((jCe,fk)=>{var kZ=Tr(),FZ=(t,e)=>new kZ(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));fk.exports=FZ});var hk=x(($Ce,dk)=>{var MZ=ln(),qZ=Tr(),UZ=(t,e,n)=>{let r=null,i=null,o=null;try{o=new qZ(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!r||i.compare(s)===-1)&&(r=s,i=new MZ(r,n))}),r};dk.exports=UZ});var gk=x((HCe,mk)=>{var jZ=ln(),$Z=Tr(),HZ=(t,e,n)=>{let r=null,i=null,o=null;try{o=new $Z(e,n)}catch{return null}return t.forEach(s=>{o.test(s)&&(!r||i.compare(s)===1)&&(r=s,i=new jZ(r,n))}),r};mk.exports=HZ});var xk=x((BCe,yk)=>{var Jb=ln(),BZ=Tr(),vk=zf(),GZ=(t,e)=>{t=new BZ(t,e);let n=new Jb("0.0.0");if(t.test(n)||(n=new Jb("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r<t.set.length;++r){let i=t.set[r],o=null;i.forEach(s=>{let a=new Jb(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||vk(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!n||vk(n,o))&&(n=o)}return n&&t.test(n)?n:null};yk.exports=GZ});var Ek=x((GCe,_k)=>{var zZ=Tr(),VZ=(t,e)=>{try{return new zZ(t,e).range||"*"}catch{return null}};_k.exports=VZ});var Jm=x((zCe,Ck)=>{var WZ=ln(),Sk=Yf(),{ANY:YZ}=Sk,KZ=Tr(),XZ=Xf(),bk=zf(),wk=zm(),JZ=Wm(),QZ=Vm(),ZZ=(t,e,n,r)=>{t=new WZ(t,r),e=new KZ(e,r);let i,o,s,a,u;switch(n){case">":i=bk,o=JZ,s=wk,a=">",u=">=";break;case"<":i=wk,o=QZ,s=bk,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(XZ(t,e,r))return!1;for(let c=0;c<e.set.length;++c){let l=e.set[c],f=null,p=null;if(l.forEach(d=>{d.semver===YZ&&(d=new Sk(">=0.0.0")),f=f||d,p=p||d,i(d.semver,f.semver,r)?f=d:s(d.semver,p.semver,r)&&(p=d)}),f.operator===a||f.operator===u||(!p.operator||p.operator===a)&&o(t,p.semver))return!1;if(p.operator===u&&s(t,p.semver))return!1}return!0};Ck.exports=ZZ});var Ik=x((VCe,Tk)=>{var eee=Jm(),tee=(t,e,n)=>eee(t,e,">",n);Tk.exports=tee});var Rk=x((WCe,Ak)=>{var nee=Jm(),ree=(t,e,n)=>nee(t,e,"<",n);Ak.exports=ree});var Nk=x((YCe,Ok)=>{var Pk=Tr(),iee=(t,e,n)=>(t=new Pk(t,n),e=new Pk(e,n),t.intersects(e,n));Ok.exports=iee});var Lk=x((KCe,Dk)=>{var oee=Xf(),see=Cr();Dk.exports=(t,e,n)=>{let r=[],i=null,o=null,s=t.sort((l,f)=>see(l,f,n));for(let l of s)oee(l,e,n)?(o=l,i||(i=l)):(o&&r.push([i,o]),o=null,i=null);i&&r.push([i,null]);let a=[];for(let[l,f]of r)l===f?a.push(l):!f&&l===s[0]?a.push("*"):f?l===s[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let u=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return u.length<c.length?u:e}});var jk=x((XCe,Uk)=>{var kk=Tr(),Zb=Yf(),{ANY:Qb}=Zb,Jf=Xf(),ew=Cr(),aee=(t,e,n={})=>{if(t===e)return!0;t=new kk(t,n),e=new kk(e,n);let r=!1;e:for(let i of t.set){for(let o of e.set){let s=uee(i,o,n);if(r=r||s!==null,s)continue e}if(r)return!1}return!0},cee=[new Zb(">=0.0.0-0")],Fk=[new Zb(">=0.0.0")],uee=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Qb){if(e.length===1&&e[0].semver===Qb)return!0;n.includePrerelease?t=cee:t=Fk}if(e.length===1&&e[0].semver===Qb){if(n.includePrerelease)return!0;e=Fk}let r=new Set,i,o;for(let d of t)d.operator===">"||d.operator===">="?i=Mk(i,d,n):d.operator==="<"||d.operator==="<="?o=qk(o,d,n):r.add(d.semver);if(r.size>1)return null;let s;if(i&&o){if(s=ew(i.semver,o.semver,n),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let d of r){if(i&&!Jf(d,String(i),n)||o&&!Jf(d,String(o),n))return null;for(let h of e)if(!Jf(d,String(h),n))return!1;return!0}let a,u,c,l,f=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of e){if(l=l||d.operator===">"||d.operator===">=",c=c||d.operator==="<"||d.operator==="<=",i){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(a=Mk(i,d,n),a===d&&a!==i)return!1}else if(i.operator===">="&&!Jf(i.semver,String(d),n))return!1}if(o){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(u=qk(o,d,n),u===d&&u!==o)return!1}else if(o.operator==="<="&&!Jf(o.semver,String(d),n))return!1}if(!d.operator&&(o||i)&&s!==0)return!1}return!(i&&c&&!o&&s!==0||o&&l&&!i&&s!==0||p||f)},Mk=(t,e,n)=>{if(!t)return e;let r=ew(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},qk=(t,e,n)=>{if(!t)return e;let r=ew(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};Uk.exports=aee});var Qm=x((JCe,Bk)=>{var tw=pu(),$k=Bf(),lee=ln(),Hk=Mb(),fee=Ea(),pee=fL(),dee=dL(),hee=gL(),mee=xL(),gee=EL(),vee=wL(),yee=CL(),xee=IL(),_ee=Cr(),Eee=OL(),bee=DL(),wee=Gm(),See=ML(),Cee=UL(),Tee=zf(),Iee=zm(),Aee=Ub(),Ree=jb(),Pee=Vm(),Oee=Wm(),Nee=$b(),Dee=YL(),Lee=Yf(),kee=Tr(),Fee=Xf(),Mee=pk(),qee=hk(),Uee=gk(),jee=xk(),$ee=Ek(),Hee=Jm(),Bee=Ik(),Gee=Rk(),zee=Nk(),Vee=Lk(),Wee=jk();Bk.exports={parse:fee,valid:pee,clean:dee,inc:hee,diff:mee,major:gee,minor:vee,patch:yee,prerelease:xee,compare:_ee,rcompare:Eee,compareLoose:bee,compareBuild:wee,sort:See,rsort:Cee,gt:Tee,lt:Iee,eq:Aee,neq:Ree,gte:Pee,lte:Oee,cmp:Nee,coerce:Dee,Comparator:Lee,Range:kee,satisfies:Fee,toComparators:Mee,maxSatisfying:qee,minSatisfying:Uee,minVersion:jee,validRange:$ee,outside:Hee,gtr:Bee,ltr:Gee,intersects:zee,simplifyRange:Vee,subset:Wee,SemVer:lee,re:tw.re,src:tw.src,tokens:tw.t,SEMVER_SPEC_VERSION:$k.SEMVER_SPEC_VERSION,RELEASE_TYPES:$k.RELEASE_TYPES,compareIdentifiers:Hk.compareIdentifiers,rcompareIdentifiers:Hk.rcompareIdentifiers}});var nw=x(Gk=>{Gk.require=function(){if(typeof process=="object"&&process.versions&&process.versions.electron)try{let t=require("original-fs");if(Object.keys(t).length>0)return t}catch{}return require("fs")}});var rw=x((ZCe,zk)=>{zk.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var iw=x((eTe,Vk)=>{Vk.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}});var Xk=x((tTe,Kk)=>{var Yee=nw().require(),Tn=require("path"),Wk=rw(),Kee=iw(),Xee=typeof process=="object"&&process.platform==="win32",Yk=t=>t&&typeof t=="object",ow=new Uint32Array(256).map((t,e)=>{for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e>>>=1;return e>>>0});function Yt(t){this.sep=Tn.sep,this.fs=Yee,Yk(t)&&Yk(t.fs)&&typeof t.fs.statSync=="function"&&(this.fs=t.fs)}Kk.exports=Yt;Yt.prototype.makeDir=function(t){let e=this;function n(r){let i=r.split(e.sep)[0];r.split(e.sep).forEach(function(o){if(!(!o||o.substr(-1,1)===":")){i+=e.sep+o;var s;try{s=e.fs.statSync(i)}catch{e.fs.mkdirSync(i)}if(s&&s.isFile())throw Kee.FILE_IN_THE_WAY.replace("%s",i)}})}n(t)};Yt.prototype.writeFileTo=function(t,e,n,r){let i=this;if(i.fs.existsSync(t)){if(!n)return!1;var o=i.fs.statSync(t);if(o.isDirectory())return!1}var s=Tn.dirname(t);i.fs.existsSync(s)||i.makeDir(s);var a;try{a=i.fs.openSync(t,"w",438)}catch{i.fs.chmodSync(t,438),a=i.fs.openSync(t,"w",438)}if(a)try{i.fs.writeSync(a,e,0,e.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(t,r||438),!0};Yt.prototype.writeFileToAsync=function(t,e,n,r,i){typeof r=="function"&&(i=r,r=void 0);let o=this;o.fs.exists(t,function(s){if(s&&!n)return i(!1);o.fs.stat(t,function(a,u){if(s&&u.isDirectory())return i(!1);var c=Tn.dirname(t);o.fs.exists(c,function(l){l||o.makeDir(c),o.fs.open(t,"w",438,function(f,p){f?o.fs.chmod(t,438,function(){o.fs.open(t,"w",438,function(d,h){o.fs.write(h,e,0,e.length,0,function(){o.fs.close(h,function(){o.fs.chmod(t,r||438,function(){i(!0)})})})})}):p?o.fs.write(p,e,0,e.length,0,function(){o.fs.close(p,function(){o.fs.chmod(t,r||438,function(){i(!0)})})}):o.fs.chmod(t,r||438,function(){i(!0)})})})})})};Yt.prototype.findFiles=function(t){let e=this;function n(r,i,o){typeof i=="boolean"&&(o=i,i=void 0);let s=[];return e.fs.readdirSync(r).forEach(function(a){var u=Tn.join(r,a);e.fs.statSync(u).isDirectory()&&o&&(s=s.concat(n(u,i,o))),(!i||i.test(u))&&s.push(Tn.normalize(u)+(e.fs.statSync(u).isDirectory()?e.sep:""))}),s}return n(t,void 0,!0)};Yt.prototype.getAttributes=function(){};Yt.prototype.setAttributes=function(){};Yt.crc32update=function(t,e){return ow[(t^e)&255]^t>>>8};Yt.crc32=function(t){typeof t=="string"&&(t=Buffer.from(t,"utf8")),ow.length||genCRCTable();let e=t.length,n=-1;for(let r=0;r<e;)n=Yt.crc32update(n,t[r++]);return~n>>>0};Yt.methodToString=function(t){switch(t){case Wk.STORED:return"STORED ("+t+")";case Wk.DEFLATED:return"DEFLATED ("+t+")";default:return"UNSUPPORTED ("+t+")"}};Yt.canonical=function(t){if(!t)return"";var e=Tn.posix.normalize("/"+t.split("\\").join("/"));return Tn.join(".",e)};Yt.sanitize=function(t,e){t=Tn.resolve(Tn.normalize(t));for(var n=e.split("/"),r=0,i=n.length;r<i;r++){var o=Tn.normalize(Tn.join(t,n.slice(r,i).join(Tn.sep)));if(o.indexOf(t)===0)return o}return Tn.normalize(Tn.join(t,Tn.basename(e)))};Yt.toBuffer=function(e){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):typeof e=="string"?Buffer.from(e,"utf8"):Buffer.alloc(0)};Yt.readBigUInt64LE=function(t,e){var n=Buffer.from(t.slice(e,e+8));return n.swap64(),parseInt(`0x${n.toString("hex")}`)};Yt.isWin=Xee;Yt.crcTable=ow});var Zk=x((nTe,Qk)=>{var Zm=nw().require(),Jk=require("path");Zm.existsSync=Zm.existsSync||Jk.existsSync;Qk.exports=function(t){var e=t||"",n=i(),r=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return e&&Zm.existsSync(e)?(r=Zm.statSync(e),n.directory=r.isDirectory(),n.mtime=r.mtime,n.atime=r.atime,n.executable=(73&r.mode)!==0,n.readonly=(128&r.mode)===0,n.hidden=Jk.basename(e)[0]==="."):console.warn("Invalid path: "+e),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:e,isDirectory:n.directory,isReadOnly:n.readonly,isHidden:n.hidden,isExecutable:n.executable,mTime:n.mtime,aTime:n.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var gu=x((rTe,Qf)=>{Qf.exports=Xk();Qf.exports.Constants=rw();Qf.exports.Errors=iw();Qf.exports.FileAttr=Zk()});var tF=x((iTe,eF)=>{var Zf=gu(),re=Zf.Constants;eF.exports=function(){var t=20,e=10,n=0,r=0,i=0,o=0,s=0,a=0,u=0,c=0,l=0,f=0,p=0,d=0,h=0;t|=Zf.isWin?2560:768,n|=re.FLG_EFS;var m={};function g(v){v=new Date(v),i=(v.getFullYear()-1980&127)<<25|v.getMonth()+1<<21|v.getDate()<<16|v.getHours()<<11|v.getMinutes()<<5|v.getSeconds()>>1}return g(+new Date),{get made(){return t},set made(v){t=v},get version(){return e},set version(v){e=v},get flags(){return n},set flags(v){n=v},get method(){return r},set method(v){switch(v){case re.STORED:this.version=10;case re.DEFLATED:default:this.version=20}r=v},get time(){return new Date((i>>25&127)+1980,(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(i&31)<<1)},set time(v){g(v)},get crc(){return o},set crc(v){o=Math.max(0,v)>>>0},get compressedSize(){return s},set compressedSize(v){s=Math.max(0,v)>>>0},get size(){return a},set size(v){a=Math.max(0,v)>>>0},get fileNameLength(){return u},set fileNameLength(v){u=v},get extraLength(){return c},set extraLength(v){c=v},get commentLength(){return l},set commentLength(v){l=v},get diskNumStart(){return f},set diskNumStart(v){f=Math.max(0,v)>>>0},get inAttr(){return p},set inAttr(v){p=Math.max(0,v)>>>0},get attr(){return d},set attr(v){d=Math.max(0,v)>>>0},get fileAttr(){return d?(d>>>0|0)>>16&4095:0},get offset(){return h},set offset(v){h=Math.max(0,v)>>>0},get encripted(){return(n&1)===1},get entryHeaderSize(){return re.CENHDR+u+c+l},get realDataOffset(){return h+re.LOCHDR+m.fnameLen+m.extraLen},get dataHeader(){return m},loadDataHeaderFromBinary:function(v){var y=v.slice(h,h+re.LOCHDR);if(y.readUInt32LE(0)!==re.LOCSIG)throw new Error(Zf.Errors.INVALID_LOC);m={version:y.readUInt16LE(re.LOCVER),flags:y.readUInt16LE(re.LOCFLG),method:y.readUInt16LE(re.LOCHOW),time:y.readUInt32LE(re.LOCTIM),crc:y.readUInt32LE(re.LOCCRC),compressedSize:y.readUInt32LE(re.LOCSIZ),size:y.readUInt32LE(re.LOCLEN),fnameLen:y.readUInt16LE(re.LOCNAM),extraLen:y.readUInt16LE(re.LOCEXT)}},loadFromBinary:function(v){if(v.length!==re.CENHDR||v.readUInt32LE(0)!==re.CENSIG)throw new Error(Zf.Errors.INVALID_CEN);t=v.readUInt16LE(re.CENVEM),e=v.readUInt16LE(re.CENVER),n=v.readUInt16LE(re.CENFLG),r=v.readUInt16LE(re.CENHOW),i=v.readUInt32LE(re.CENTIM),o=v.readUInt32LE(re.CENCRC),s=v.readUInt32LE(re.CENSIZ),a=v.readUInt32LE(re.CENLEN),u=v.readUInt16LE(re.CENNAM),c=v.readUInt16LE(re.CENEXT),l=v.readUInt16LE(re.CENCOM),f=v.readUInt16LE(re.CENDSK),p=v.readUInt16LE(re.CENATT),d=v.readUInt32LE(re.CENATX),h=v.readUInt32LE(re.CENOFF)},dataHeaderToBinary:function(){var v=Buffer.alloc(re.LOCHDR);return v.writeUInt32LE(re.LOCSIG,0),v.writeUInt16LE(e,re.LOCVER),v.writeUInt16LE(n,re.LOCFLG),v.writeUInt16LE(r,re.LOCHOW),v.writeUInt32LE(i,re.LOCTIM),v.writeUInt32LE(o,re.LOCCRC),v.writeUInt32LE(s,re.LOCSIZ),v.writeUInt32LE(a,re.LOCLEN),v.writeUInt16LE(u,re.LOCNAM),v.writeUInt16LE(c,re.LOCEXT),v},entryHeaderToBinary:function(){var v=Buffer.alloc(re.CENHDR+u+c+l);return v.writeUInt32LE(re.CENSIG,0),v.writeUInt16LE(t,re.CENVEM),v.writeUInt16LE(e,re.CENVER),v.writeUInt16LE(n,re.CENFLG),v.writeUInt16LE(r,re.CENHOW),v.writeUInt32LE(i,re.CENTIM),v.writeUInt32LE(o,re.CENCRC),v.writeUInt32LE(s,re.CENSIZ),v.writeUInt32LE(a,re.CENLEN),v.writeUInt16LE(u,re.CENNAM),v.writeUInt16LE(c,re.CENEXT),v.writeUInt16LE(l,re.CENCOM),v.writeUInt16LE(f,re.CENDSK),v.writeUInt16LE(p,re.CENATT),v.writeUInt32LE(d,re.CENATX),v.writeUInt32LE(h,re.CENOFF),v.fill(0,re.CENHDR),v},toJSON:function(){let v=function(y){return y+" bytes"};return{made:t,version:e,flags:n,method:Zf.methodToString(r),time:this.time,crc:"0x"+o.toString(16).toUpperCase(),compressedSize:v(s),size:v(a),fileNameLength:v(u),extraLength:v(c),commentLength:v(l),diskNumStart:f,inAttr:p,attr:d,offset:h,entryHeaderSize:v(re.CENHDR+u+c+l)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var rF=x((oTe,nF)=>{var vu=gu(),st=vu.Constants;nF.exports=function(){var t=0,e=0,n=0,r=0,i=0;return{get diskEntries(){return t},set diskEntries(o){t=e=o},get totalEntries(){return e},set totalEntries(o){e=t=o},get size(){return n},set size(o){n=o},get offset(){return r},set offset(o){r=o},get commentLength(){return i},set commentLength(o){i=o},get mainHeaderSize(){return st.ENDHDR+i},loadFromBinary:function(o){if((o.length!==st.ENDHDR||o.readUInt32LE(0)!==st.ENDSIG)&&(o.length<st.ZIP64HDR||o.readUInt32LE(0)!==st.ZIP64SIG))throw new Error(vu.Errors.INVALID_END);o.readUInt32LE(0)===st.ENDSIG?(t=o.readUInt16LE(st.ENDSUB),e=o.readUInt16LE(st.ENDTOT),n=o.readUInt32LE(st.ENDSIZ),r=o.readUInt32LE(st.ENDOFF),i=o.readUInt16LE(st.ENDCOM)):(t=vu.readBigUInt64LE(o,st.ZIP64SUB),e=vu.readBigUInt64LE(o,st.ZIP64TOT),n=vu.readBigUInt64LE(o,st.ZIP64SIZE),r=vu.readBigUInt64LE(o,st.ZIP64OFF),i=0)},toBinary:function(){var o=Buffer.alloc(st.ENDHDR+i);return o.writeUInt32LE(st.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(t,st.ENDSUB),o.writeUInt16LE(e,st.ENDTOT),o.writeUInt32LE(n,st.ENDSIZ),o.writeUInt32LE(r,st.ENDOFF),o.writeUInt16LE(i,st.ENDCOM),o.fill(" ",st.ENDHDR),o},toJSON:function(){let o=function(s,a){let u=s.toString(16).toUpperCase();for(;u.length<a;)u="0"+u;return"0x"+u};return{diskEntries:t,totalEntries:e,size:n+" bytes",offset:o(r,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var aw=x(sw=>{sw.EntryHeader=tF();sw.MainHeader=rF()});var oF=x((aTe,iF)=>{iF.exports=function(t){var e=require("zlib"),n={chunkSize:(parseInt(t.length/1024)+1)*1024};return{deflate:function(){return e.deflateRawSync(t,n)},deflateAsync:function(r){var i=e.createDeflateRaw(n),o=[],s=0;i.on("data",function(a){o.push(a),s+=a.length}),i.on("end",function(){var a=Buffer.alloc(s),u=0;a.fill(0);for(var c=0;c<o.length;c++){var l=o[c];l.copy(a,u),u+=l.length}r&&r(a)}),i.end(t)}}}});var aF=x((cTe,sF)=>{sF.exports=function(t){var e=require("zlib");return{inflate:function(){return e.inflateRawSync(t)},inflateAsync:function(n){var r=e.createInflateRaw(),i=[],o=0;r.on("data",function(s){i.push(s),o+=s.length}),r.on("end",function(){var s=Buffer.alloc(o),a=0;s.fill(0);for(var u=0;u<i.length;u++){var c=i[u];c.copy(s,a),a+=c.length}n&&n(s)}),r.end(t)}}}});var pF=x((uTe,fF)=>{"use strict";var{randomFillSync:cF}=require("crypto"),Jee=new Uint32Array(256).map((t,e)=>{for(let n=0;n<8;n++)e&1?e=e>>>1^3988292384:e>>>=1;return e>>>0}),lF=(t,e)=>Math.imul(t,e)>>>0,uF=(t,e)=>Jee[(t^e)&255]^t>>>8,ep=()=>typeof cF=="function"?cF(Buffer.alloc(12)):ep.node();ep.node=()=>{let t=Buffer.alloc(12),e=t.length;for(let n=0;n<e;n++)t[n]=Math.random()*256&255;return t};var eg={genSalt:ep};function tg(t){let e=Buffer.isBuffer(t)?t:Buffer.from(t);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<e.length;n++)this.updateKeys(e[n])}tg.prototype.updateKeys=function(t){let e=this.keys;return e[0]=uF(e[0],t),e[1]+=e[0]&255,e[1]=lF(e[1],134775813)+1,e[2]=uF(e[2],e[1]>>>24),t};tg.prototype.next=function(){let t=(this.keys[2]|2)>>>0;return lF(t,t^1)>>8&255};function Qee(t){let e=new tg(t);return function(n){let r=Buffer.alloc(n.length),i=0;for(let o of n)r[i++]=e.updateKeys(o^e.next());return r}}function Zee(t){let e=new tg(t);return function(n,r,i=0){r||(r=Buffer.alloc(n.length));for(let o of n){let s=e.next();r[i++]=o^s,e.updateKeys(o)}return r}}function ete(t,e,n){if(!t||!Buffer.isBuffer(t)||t.length<12)return Buffer.alloc(0);let r=Qee(n);if(r(t.slice(0,12))[11]!==e.crc>>>24)throw"ADM-ZIP: Wrong Password";return r(t.slice(12))}function tte(t){Buffer.isBuffer(t)&&t.length>=12?eg.genSalt=function(){return t.slice(0,12)}:t==="node"?eg.genSalt=ep.node:eg.genSalt=ep}function nte(t,e,n,r=!1){t==null&&(t=Buffer.alloc(0)),Buffer.isBuffer(t)||(t=Buffer.from(t.toString()));let i=Zee(n),o=eg.genSalt();o[11]=e.crc>>>24&255,r&&(o[10]=e.crc>>>16&255);let s=Buffer.alloc(t.length+12);return i(o,s),i(t,s,12)}fF.exports={decrypt:ete,encrypt:nte,_salter:tte}});var dF=x(ng=>{ng.Deflater=oF();ng.Inflater=aF();ng.ZipCrypto=pF()});var uw=x((fTe,hF)=>{var wt=gu(),rte=aw(),rr=wt.Constants,cw=dF();hF.exports=function(t){var e=new rte.EntryHeader,n=Buffer.alloc(0),r=Buffer.alloc(0),i=!1,o=null,s=Buffer.alloc(0);function a(){return!t||!Buffer.isBuffer(t)?Buffer.alloc(0):(e.loadDataHeaderFromBinary(t),t.slice(e.realDataOffset,e.realDataOffset+e.compressedSize))}function u(h){return!((e.flags&8)!==8&&wt.crc32(h)!==e.dataHeader.crc)}function c(h,m,g){if(typeof m>"u"&&typeof h=="string"&&(g=h,h=void 0),i)return h&&m&&m(Buffer.alloc(0),wt.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var v=a();if(v.length===0)return h&&m&&m(v),v;if(e.encripted){if(typeof g!="string"&&!Buffer.isBuffer(g))throw new Error("ADM-ZIP: Incompatible password parameter");v=cw.ZipCrypto.decrypt(v,e,g)}var y=Buffer.alloc(e.size);switch(e.method){case wt.Constants.STORED:if(v.copy(y),u(y))return h&&m&&m(y),y;throw h&&m&&m(y,wt.Errors.BAD_CRC),new Error(wt.Errors.BAD_CRC);case wt.Constants.DEFLATED:var _=new cw.Inflater(v);if(h)_.inflateAsync(function(E){E.copy(E,0),m&&(u(E)?m(E):m(E,wt.Errors.BAD_CRC))});else{if(_.inflate(y).copy(y,0),!u(y))throw new Error(wt.Errors.BAD_CRC+" "+n.toString());return y}break;default:throw h&&m&&m(Buffer.alloc(0),wt.Errors.UNKNOWN_METHOD),new Error(wt.Errors.UNKNOWN_METHOD)}}function l(h,m){if((!o||!o.length)&&Buffer.isBuffer(t))return h&&m&&m(a()),a();if(o.length&&!i){var g;switch(e.method){case wt.Constants.STORED:return e.compressedSize=e.size,g=Buffer.alloc(o.length),o.copy(g),h&&m&&m(g),g;default:case wt.Constants.DEFLATED:var v=new cw.Deflater(o);if(h)v.deflateAsync(function(_){g=Buffer.alloc(_.length),e.compressedSize=_.length,_.copy(g),m&&m(g)});else{var y=v.deflate();return e.compressedSize=y.length,y}v=null;break}}else if(h&&m)m(Buffer.alloc(0));else return Buffer.alloc(0)}function f(h,m){return(h.readUInt32LE(m+4)<<4)+h.readUInt32LE(m)}function p(h){for(var m=0,g,v,y;m<h.length;)g=h.readUInt16LE(m),m+=2,v=h.readUInt16LE(m),m+=2,y=h.slice(m,m+v),m+=v,rr.ID_ZIP64===g&&d(y)}function d(h){var m,g,v,y;h.length>=rr.EF_ZIP64_SCOMP&&(m=f(h,rr.EF_ZIP64_SUNCOMP),e.size===rr.EF_ZIP64_OR_32&&(e.size=m)),h.length>=rr.EF_ZIP64_RHO&&(g=f(h,rr.EF_ZIP64_SCOMP),e.compressedSize===rr.EF_ZIP64_OR_32&&(e.compressedSize=g)),h.length>=rr.EF_ZIP64_DSN&&(v=f(h,rr.EF_ZIP64_RHO),e.offset===rr.EF_ZIP64_OR_32&&(e.offset=v)),h.length>=rr.EF_ZIP64_DSN+4&&(y=h.readUInt32LE(rr.EF_ZIP64_DSN),e.diskNumStart===rr.EF_ZIP64_OR_16&&(e.diskNumStart=y))}return{get entryName(){return n.toString()},get rawEntryName(){return n},set entryName(h){n=wt.toBuffer(h);var m=n[n.length-1];i=m===47||m===92,e.fileNameLength=n.length},get extra(){return s},set extra(h){s=h,e.extraLength=h.length,p(h)},get comment(){return r.toString()},set comment(h){r=wt.toBuffer(h),e.commentLength=r.length},get name(){var h=n.toString();return i?h.substr(h.length-1).split("/").pop():h.split("/").pop()},get isDirectory(){return i},getCompressedData:function(){return l(!1,null)},getCompressedDataAsync:function(h){l(!0,h)},setData:function(h){o=wt.toBuffer(h),!i&&o.length?(e.size=o.length,e.method=wt.Constants.DEFLATED,e.crc=wt.crc32(h),e.changed=!0):e.method=wt.Constants.STORED},getData:function(h){return e.changed?o:c(!1,null,h)},getDataAsync:function(h,m){e.changed?h(o):c(!0,h,m)},set attr(h){e.attr=h},get attr(){return e.attr},set header(h){e.loadFromBinary(h)},get header(){return e},packHeader:function(){var h=e.entryHeaderToBinary(),m=wt.Constants.CENHDR;return n.copy(h,m),m+=n.length,e.extraLength&&(s.copy(h,m),m+=e.extraLength),e.commentLength&&r.copy(h,m),h},toJSON:function(){let h=function(m){return"<"+(m&&m.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:e.toJSON(),compressedData:h(t),data:h(o)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var vF=x((pTe,gF)=>{var mF=uw(),ite=aw(),fn=gu();gF.exports=function(t,e){var n=[],r={},i=Buffer.alloc(0),o=new ite.MainHeader,s=!1;let a=Object.assign(Object.create(null),e),{noSort:u}=a;t?f(a.readEntries):s=!0;function c(d){let h=o.diskEntries,m=o.offset;for(let g=0;g<h;g++){let v=m,y=new mF(t);y.header=t.slice(v,v+=fn.Constants.CENHDR),y.entryName=t.slice(v,v+=y.header.fileNameLength),m+=y.header.entryHeaderSize,d(y)}}function l(){s=!0,r={},n=new Array(o.diskEntries);for(var d=o.offset,h=0;h<n.length;h++){var m=d,g=new mF(t);g.header=t.slice(m,m+=fn.Constants.CENHDR),g.entryName=t.slice(m,m+=g.header.fileNameLength),g.header.extraLength&&(g.extra=t.slice(m,m+=g.header.extraLength)),g.header.commentLength&&(g.comment=t.slice(m,m+g.header.commentLength)),d+=g.header.entryHeaderSize,n[h]=g,r[g.entryName]=g}}function f(d){var h=t.length-fn.Constants.ENDHDR,m=Math.max(0,h-65535),g=m,v=t.length,y=-1,_=0;for(h;h>=g;h--)if(t[h]===80){if(t.readUInt32LE(h)===fn.Constants.ENDSIG){y=h,_=h,v=h+fn.Constants.ENDHDR,g=h-fn.Constants.END64HDR;continue}if(t.readUInt32LE(h)===fn.Constants.END64SIG){g=m;continue}if(t.readUInt32LE(h)===fn.Constants.ZIP64SIG){y=h,v=h+fn.readBigUInt64LE(t,h+fn.Constants.ZIP64SIZE)+fn.Constants.ZIP64LEAD;break}}if(!~y)throw new Error(fn.Errors.INVALID_FORMAT);o.loadFromBinary(t.slice(y,v)),o.commentLength&&(i=t.slice(_+fn.Constants.ENDHDR)),d&&l()}function p(){n.length>1&&!u&&n.sort((d,h)=>d.entryName.toLowerCase().localeCompare(h.entryName.toLowerCase()))}return{get entries(){return s||l(),n},get comment(){return i.toString()},set comment(d){i=fn.toBuffer(d),o.commentLength=i.length},getEntryCount:function(){return s?n.length:o.diskEntries},forEach:function(d){if(!s){c(d);return}n.forEach(d)},getEntry:function(d){return s||l(),r[d]||null},setEntry:function(d){s||l(),n.push(d),r[d.entryName]=d,o.totalEntries=n.length},deleteEntry:function(d){s||l();var h=r[d];if(h&&h.isDirectory){var m=this;this.getEntryChildren(h).forEach(function(g){g.entryName!==d&&m.deleteEntry(g.entryName)})}n.splice(n.indexOf(h),1),delete r[d],o.totalEntries=n.length},getEntryChildren:function(d){if(s||l(),d&&d.isDirectory){let h=[],m=d.entryName,g=m.length;return n.forEach(function(v){v.entryName.substr(0,g)===m&&h.push(v)}),h}return[]},compressToBuffer:function(){s||l(),p();let d=[],h=[],m=0,g=0;o.size=0,o.offset=0;for(let _ of n){let E=_.getCompressedData();_.header.offset=g;let C=_.header.dataHeaderToBinary(),L=_.rawEntryName.length,R=Buffer.alloc(L+_.extra.length);_.rawEntryName.copy(R,0),R.copy(_.extra,L);let D=C.length+R.length+E.length;g+=D,d.push(C),d.push(R),d.push(E);let O=_.packHeader();h.push(O),o.size+=O.length,m+=D+O.length}m+=o.mainHeaderSize,o.offset=g,g=0;let v=Buffer.alloc(m);for(let _ of d)_.copy(v,g),g+=_.length;for(let _ of h)_.copy(v,g),g+=_.length;let y=o.toBinary();return i&&i.copy(y,fn.Constants.ENDHDR),y.copy(v,g),v},toAsyncBuffer:function(d,h,m,g){try{s||l(),p();let v=[],y=[],_=0,E=0;o.size=0,o.offset=0;let C=function(L){if(L.length){let R=L.pop(),D=R.entryName+R.extra.toString();m&&m(D),R.getCompressedDataAsync(function(O){g&&g(D),R.header.offset=E;let N=R.header.dataHeaderToBinary(),S=Buffer.alloc(D.length,D),b=N.length+S.length+O.length;E+=b,v.push(N),v.push(S),v.push(O);let T=R.packHeader();y.push(T),o.size+=T.length,_+=b+T.length,C(L)})}else{_+=o.mainHeaderSize,o.offset=E,E=0;let R=Buffer.alloc(_);v.forEach(function(O){O.copy(R,E),E+=O.length}),y.forEach(function(O){O.copy(R,E),E+=O.length});let D=o.toBinary();i&&i.copy(D,fn.Constants.ENDHDR),D.copy(R,E),d(R)}};C(n)}catch(v){h(v)}}}}});var xF=x((dTe,yF)=>{var Bt=gu(),yi=require("path"),ote=uw(),ste=vF(),Sa=(t,e)=>typeof t=="boolean"?t:e,lw=(t,e)=>typeof t=="string"?t:e,ate={noSort:!1,readEntries:!1,method:Bt.Constants.NONE,fs:null};yF.exports=function(t,e){let n=null,r=Object.assign(Object.create(null),ate);t&&typeof t=="object"&&(t instanceof Uint8Array||(Object.assign(r,t),t=r.input?r.input:void 0,r.input&&delete r.input),Buffer.isBuffer(t)&&(n=t,r.method=Bt.Constants.BUFFER,t=void 0)),Object.assign(r,e);let i=new Bt(r);if(t&&typeof t=="string")if(i.fs.existsSync(t))r.method=Bt.Constants.FILE,r.filename=t,n=i.fs.readFileSync(t);else throw new Error(Bt.Errors.INVALID_FILENAME);let o=new ste(n,r),{canonical:s,sanitize:a}=Bt;function u(l){if(l&&o){var f;if(typeof l=="string"&&(f=o.getEntry(l)),typeof l=="object"&&typeof l.entryName<"u"&&typeof l.header<"u"&&(f=o.getEntry(l.entryName)),f)return f}return null}function c(l){let{join:f,normalize:p,sep:d}=yi.posix;return f(".",p(d+l.split("\\").join(d)+d))}return{readFile:function(l,f){var p=u(l);return p&&p.getData(f)||null},readFileAsync:function(l,f){var p=u(l);p?p.getDataAsync(f):f(null,"getEntry failed for:"+l)},readAsText:function(l,f){var p=u(l);if(p){var d=p.getData();if(d&&d.length)return d.toString(f||"utf8")}return""},readAsTextAsync:function(l,f,p){var d=u(l);d?d.getDataAsync(function(h,m){if(m){f(h,m);return}h&&h.length?f(h.toString(p||"utf8")):f("")}):f("")},deleteFile:function(l){var f=u(l);f&&o.deleteEntry(f.entryName)},addZipComment:function(l){o.comment=l},getZipComment:function(){return o.comment||""},addZipEntryComment:function(l,f){var p=u(l);p&&(p.comment=f)},getZipEntryComment:function(l){var f=u(l);return f&&f.comment||""},updateFile:function(l,f){var p=u(l);p&&p.setData(f)},addLocalFile:function(l,f,p,d){if(i.fs.existsSync(l)){f=f?c(f):"";var h=l.split("\\").join("/").split("/").pop();f+=p||h;let m=i.fs.statSync(l);this.addFile(f,i.fs.readFileSync(l),d,m)}else throw new Error(Bt.Errors.FILE_NOT_FOUND.replace("%s",l))},addLocalFolder:function(l,f,p,d){if(p instanceof RegExp?p=function(h){return function(m){return h.test(m)}}(p):typeof p!="function"&&(p=function(){return!0}),f=f?c(f):"",l=yi.normalize(l),i.fs.existsSync(l)){let h=i.findFiles(l),m=this;h.length&&h.forEach(function(g){var v=yi.relative(l,g).split("\\").join("/");if(p(v)){var y=i.fs.statSync(g);y.isFile()?m.addFile(f+v,i.fs.readFileSync(g),"",d||y):m.addFile(f+v+"/",Buffer.alloc(0),"",d||y)}})}else throw new Error(Bt.Errors.FILE_NOT_FOUND.replace("%s",l))},addLocalFolderAsync:function(l,f,p,d){d instanceof RegExp?d=function(m){return function(g){return m.test(g)}}(d):typeof d!="function"&&(d=function(){return!0}),p=p?c(p):"",l=yi.normalize(l);var h=this;i.fs.open(l,"r",function(m){if(m&&m.code==="ENOENT")f(void 0,Bt.Errors.FILE_NOT_FOUND.replace("%s",l));else if(m)f(void 0,m);else{var g=i.findFiles(l),v=-1,y=function(){if(v+=1,v<g.length){var _=g[v],E=yi.relative(l,_).split("\\").join("/");E=E.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),d(E)?i.fs.stat(_,function(C,L){C&&f(void 0,C),L.isFile()?i.fs.readFile(_,function(R,D){R?f(void 0,R):(h.addFile(p+E,D,"",L),y())}):(h.addFile(p+E+"/",Buffer.alloc(0),"",L),y())}):process.nextTick(()=>{y()})}else f(!0,void 0)};y()}})},addLocalFolderPromise:function(l,f){return new Promise((p,d)=>{let{filter:h,zipPath:m}=Object.assign({},f);this.addLocalFolderAsync(l,(g,v)=>{v&&d(v),g&&p(this)},m,h)})},addFile:function(l,f,p,d){let h=u(l),m=h!=null;m||(h=new ote,h.entryName=l),h.comment=p||"";let g=typeof d=="object"&&d instanceof i.fs.Stats;g&&(h.header.time=d.mtime);var v=h.isDirectory?16:0;let y=h.isDirectory?16384:32768;g?y|=4095&d.mode:typeof d=="number"?y|=4095&d:y|=h.isDirectory?493:420,v=(v|y<<16)>>>0,h.attr=v,h.setData(f),m||o.setEntry(h)},getEntries:function(){return o?o.entries:[]},getEntry:function(l){return u(l)},getEntryCount:function(){return o.getEntryCount()},forEach:function(l){return o.forEach(l)},extractEntryTo:function(l,f,p,d,h,m){d=Sa(d,!1),h=Sa(h,!1),p=Sa(p,!0),m=lw(m,lw(h,void 0));var g=u(l);if(!g)throw new Error(Bt.Errors.NO_ENTRY);var v=s(g.entryName),y=a(f,m&&!g.isDirectory?m:p?v:yi.basename(v));if(g.isDirectory){var _=o.getEntryChildren(g);return _.forEach(function(L){if(L.isDirectory)return;var R=L.getData();if(!R)throw new Error(Bt.Errors.CANT_EXTRACT_FILE);var D=s(L.entryName),O=a(f,p?D:yi.basename(D));let N=h?L.header.fileAttr:void 0;i.writeFileTo(O,R,d,N)}),!0}var E=g.getData();if(!E)throw new Error(Bt.Errors.CANT_EXTRACT_FILE);if(i.fs.existsSync(y)&&!d)throw new Error(Bt.Errors.CANT_OVERRIDE);let C=h?l.header.fileAttr:void 0;return i.writeFileTo(y,E,d,C),!0},test:function(l){if(!o)return!1;for(var f in o.entries)try{if(f.isDirectory)continue;var p=o.entries[f].getData(l);if(!p)return!1}catch{return!1}return!0},extractAllTo:function(l,f,p,d){if(f=Sa(f,!1),d=lw(p,d),p=Sa(p,!1),!o)throw new Error(Bt.Errors.NO_ZIP);o.entries.forEach(function(h){var m=a(l,s(h.entryName.toString()));if(h.isDirectory){i.makeDir(m);return}var g=h.getData(d);if(!g)throw new Error(Bt.Errors.CANT_EXTRACT_FILE);let v=p?h.header.fileAttr:void 0;i.writeFileTo(m,g,f,v);try{i.fs.utimesSync(m,h.header.time,h.header.time)}catch{throw new Error(Bt.Errors.CANT_EXTRACT_FILE)}})},extractAllToAsync:function(l,f,p,d){if(f=Sa(f,!1),typeof p=="function"&&!d&&(d=p),p=Sa(p,!1),d||(d=function(_){throw new Error(_)}),!o){d(new Error(Bt.Errors.NO_ZIP));return}l=yi.resolve(l);let h=_=>a(l,yi.normalize(s(_.entryName.toString()))),m=(_,E)=>new Error(_+': "'+E+'"'),g=[],v=new Set;o.entries.forEach(_=>{_.isDirectory?g.push(_):v.add(_)});for(let _ of g){let E=h(_),C=p?_.header.fileAttr:void 0;try{i.makeDir(E),C&&i.fs.chmodSync(E,C),i.fs.utimesSync(E,_.header.time,_.header.time)}catch{d(m("Unable to create folder",E))}}let y=()=>{v.size===0&&d()};for(let _ of v.values()){let E=yi.normalize(s(_.entryName.toString())),C=a(l,E);_.getDataAsync(function(L,R){if(R){d(new Error(R));return}if(!L)d(new Error(Bt.Errors.CANT_EXTRACT_FILE));else{let D=p?_.header.fileAttr:void 0;i.writeFileToAsync(C,L,f,D,function(O){if(!O){d(m("Unable to write file",C));return}i.fs.utimes(C,_.header.time,_.header.time,function(N){if(N){d(m("Unable to set times",C));return}v.delete(_),y()})})}})}y()},writeZip:function(l,f){if(arguments.length===1&&typeof l=="function"&&(f=l,l=""),!l&&r.filename&&(l=r.filename),!!l){var p=o.compressToBuffer();if(p){var d=i.writeFileTo(l,p,!0);typeof f=="function"&&f(d?null:new Error("failed"),"")}}},writeZipPromise:function(l,f){let{overwrite:p,perm:d}=Object.assign({overwrite:!0},f);return new Promise((h,m)=>{!l&&r.filename&&(l=r.filename),l||m("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(g=>{let v=y=>y?h(y):m("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(l,g,p,d,v)},m)})},toBufferPromise:function(){return new Promise((l,f)=>{o.toAsyncBuffer(l,f)})},toBuffer:function(l,f,p,d){return this.valueOf=2,typeof l=="function"?(o.toAsyncBuffer(l,f,p,d),null):o.compressToBuffer()}}}});var EF=x((hTe,_F)=>{_F.exports=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t)});var wF=x((mTe,bF)=>{bF.exports=typeof process<"u"&&typeof process.nextTick=="function"?process.nextTick.bind(process):EF()});var CF=x((vTe,SF)=>{SF.exports=class{constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var fw=x((xTe,IF)=>{var TF=CF();IF.exports=class{constructor(e){this.hwm=e||16,this.head=new TF(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let n=this.head;this.head=n.next=new TF(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let n=this.tail.next;return this.tail.next=null,this.tail=n,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var Iw=x((_Te,KF)=>{var{EventEmitter:cte}=require("events"),cg=new Error("Stream was destroyed"),pw=new Error("Premature close"),NF=wF(),DF=fw(),St=(1<<27)-1,Aa=1,_w=2,Ca=4,tp=8,LF=St^Aa,ute=St^_w,ap=16,np=32,bu=64,ss=128,rp=256,Ew=512,Ta=1024,dw=2048,bw=4096,ww=8192,Jr=16384,yu=32768,ug=65536,kF=rp|Ew,lte=ap|ug,fte=bu|ap,pte=bw|ss,dte=St^ap,hte=St^bu,mte=St^(bu|ug),gte=St^ug,vte=St^rp,yte=St^(ss|ww),xte=St^Ta,AF=St^kF,FF=St^yu,_te=St^np,as=1<<17,_u=2<<17,cp=4<<17,Ia=8<<17,up=16<<17,Ra=32<<17,hw=64<<17,xu=128<<17,Sw=256<<17,Eu=512<<17,MF=St^(as|Sw),qF=St^cp,Ete=St^Eu,bte=St^up,wte=St^Ia,UF=St^xu,Ste=St^_u,ip=ap|as,jF=St^ip,Cw=Jr|Ra,lo=Ca|tp|_w,ir=lo|Aa,$F=lo|Cw,Cte=qF&hte,Tw=xu|yu,Tte=Tw&jF,HF=ir|Tte,Ite=ir|Ta|Jr,RF=ir|Jr|ss,Ate=ir|Ta|ss,Rte=ir|bw|ss|ww,Pte=ir|ap|Ta|Jr|ug,Ote=lo|Ta|Jr,Nte=np|ir|yu|bu,Dte=ir|Eu|Ra,Lte=Ia|up,BF=Ia|as,kte=Ia|up|ir|as,PF=ir|as|Ia,Fte=cp|as,Mte=as|Sw,qte=ir|Eu|BF|Ra,Ute=up|lo|Eu|Ra,jte=_u|ir|xu|cp,rg=Symbol.asyncIterator||Symbol("asyncIterator"),ig=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapWritable:i,byteLength:o,byteLengthWritable:s}={}){this.stream=e,this.queue=new DF,this.highWaterMark=n,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||o||YF,this.map=i||r,this.afterWrite=Bte.bind(this),this.afterUpdateNextTick=Vte.bind(this)}get ended(){return(this.stream._duplexState&Ra)!==0}push(e){return this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=Ia,!0):(this.stream._duplexState|=Lte,!1)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=wte),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|Eu)&qF}autoBatch(e,n){let r=[],i=this.stream;for(r.push(e);(i._duplexState&PF)===BF;)r.push(i._writableState.shift());if(i._duplexState&ir)return n(null);i._writev(r,n)}update(){let e=this.stream;e._duplexState|=_u;do{for(;(e._duplexState&PF)===Ia;){let n=this.shift();e._duplexState|=Mte,e._write(n,this.afterWrite)}e._duplexState&Fte||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=Ste}updateNonPrimary(){let e=this.stream;if((e._duplexState&qte)===Eu){e._duplexState=(e._duplexState|as)&Ete,e._final(Hte.bind(this));return}if((e._duplexState&lo)===Ca){e._duplexState&Tw||(e._duplexState|=ip,e._destroy(GF.bind(this)));return}(e._duplexState&HF)===Aa&&(e._duplexState=(e._duplexState|ip)&LF,e._open(zF.bind(this)))}continueUpdate(){return this.stream._duplexState&xu?(this.stream._duplexState&=UF,!0):!1}updateCallback(){(this.stream._duplexState&jte)===cp?this.update():this.updateNextTick()}updateNextTick(){this.stream._duplexState&xu||(this.stream._duplexState|=xu,this.stream._duplexState&_u||NF(this.afterUpdateNextTick))}},mw=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapReadable:i,byteLength:o,byteLengthReadable:s}={}){this.stream=e,this.queue=new DF,this.highWaterMark=n,this.buffered=0,this.error=null,this.pipeline=null,this.byteLength=s||o||YF,this.map=i||r,this.pipeTo=null,this.afterRead=Gte.bind(this),this.afterUpdateNextTick=zte.bind(this)}get ended(){return(this.stream._duplexState&Jr)!==0}pipe(e,n){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof n!="function"&&(n=null),this.stream._duplexState|=Ew,this.pipeTo=e,this.pipeline=new vw(this.stream,e,n),n&&this.stream.on("error",OF),sp(e))e._writableState.pipeline=this.pipeline,n&&e.on("error",OF),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let r=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",r),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",$te.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let n=this.stream;return e===null?(this.highWaterMark=0,n._duplexState=(n._duplexState|Ta)&mte,!1):(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),n._duplexState=(n._duplexState|ss)>e,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=yte),e}unshift(e){let n=[this.map!==null?this.map(e):e];for(;this.buffered>0;)n.push(this.shift());for(let r=0;r<n.length-1;r++){let i=n[r];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(n[n.length-1])}read(){let e=this.stream;if((e._duplexState&RF)===ss){let n=this.shift();return this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=AF),e._duplexState&dw&&e.emit("data",n),n}return null}drain(){let e=this.stream;for(;(e._duplexState&RF)===ss&&e._duplexState&kF;){let n=this.shift();this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=AF),e._duplexState&dw&&e.emit("data",n)}}update(){let e=this.stream;e._duplexState|=np;do{for(this.drain();this.buffered<this.highWaterMark&&!(e._duplexState&Pte);)e._duplexState|=lte,e._read(this.afterRead),this.drain();(e._duplexState&Rte)===pte&&(e._duplexState|=ww,e.emit("readable")),e._duplexState&fte||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=_te}updateNonPrimary(){let e=this.stream;if((e._duplexState&Ate)===Ta&&(e._duplexState=(e._duplexState|Jr)&xte,e.emit("end"),(e._duplexState&$F)===Cw&&(e._duplexState|=Ca),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&lo)===Ca){e._duplexState&Tw||(e._duplexState|=ip,e._destroy(GF.bind(this)));return}(e._duplexState&HF)===Aa&&(e._duplexState=(e._duplexState|ip)&LF,e._open(zF.bind(this)))}continueUpdate(){return this.stream._duplexState&yu?(this.stream._duplexState&=FF,!0):!1}updateCallback(){(this.stream._duplexState&Nte)===bu?this.update():this.updateNextTick()}updateNextTick(){this.stream._duplexState&yu||(this.stream._duplexState|=yu,this.stream._duplexState&np||NF(this.afterUpdateNextTick))}},gw=class{constructor(e){this.data=null,this.afterTransform=Yte.bind(e),this.afterFinal=null}},vw=class{constructor(e,n,r){this.from=e,this.to=n,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,n){if(n&&(this.error=n),e===this.to&&(this.to=null,this.from!==null)){(!(this.from._duplexState&Jr)||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){e._duplexState&Jr||this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function $te(){this.stream._duplexState|=Ew,this.updateCallback()}function Hte(t){let e=this.stream;t&&e.destroy(t),e._duplexState&lo||(e._duplexState|=Ra,e.emit("finish")),(e._duplexState&$F)===Cw&&(e._duplexState|=Ca),e._duplexState&=MF,e._duplexState&_u?this.updateNextTick():this.update()}function GF(t){let e=this.stream;!t&&this.error!==cg&&(t=this.error),t&&e.emit("error",t),e._duplexState|=tp,e.emit("close");let n=e._readableState,r=e._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(e,t),r!==null){for(;r.drains!==null&&r.drains.length>0;)r.drains.shift().resolve(!1);r.pipeline!==null&&r.pipeline.done(e,t)}}function Bte(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=MF,this.drains!==null&&Wte(this.drains),(e._duplexState&kte)===up&&(e._duplexState&=bte,(e._duplexState&hw)===hw&&e.emit("drain")),this.updateCallback()}function Gte(t){t&&this.stream.destroy(t),this.stream._duplexState&=dte,this.updateCallback()}function zte(){this.stream._duplexState&np||(this.stream._duplexState&=FF,this.update())}function Vte(){this.stream._duplexState&_u||(this.stream._duplexState&=UF,this.update())}function Wte(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function zF(t){let e=this.stream;t&&e.destroy(t),e._duplexState&Ca||(e._duplexState&Ite||(e._duplexState|=bu),e._duplexState&Dte||(e._duplexState|=cp),e.emit("open")),e._duplexState&=jF,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function Yte(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}var op=class extends cte{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",ene.bind(this)))}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&tp)!==0}get destroying(){return(this._duplexState&lo)!==0}destroy(e){this._duplexState&lo||(e||(e=cg),this._duplexState=(this._duplexState|Ca)&Cte,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=_w,this._predestroy(),this._duplexState&=ute,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}on(e,n){return this._readableState!==null&&(e==="data"&&(this._duplexState|=dw|rp,this._readableState.updateNextTick()),e==="readable"&&(this._duplexState|=bw,this._readableState.updateNextTick())),this._writableState!==null&&e==="drain"&&(this._duplexState|=hw,this._writableState.updateNextTick()),super.on(e,n)}},og=class t extends op{constructor(e){super(e),this._duplexState|=Aa|Ra,this._readableState=new mw(this,e),e&&(e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick())}_read(e){e(null)}pipe(e,n){return this._readableState.updateNextTick(),this._readableState.pipe(e,n),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTick(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTick(),this._readableState.unshift(e)}resume(){return this._duplexState|=rp,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=vte,this}static _fromAsyncIterator(e,n){let r,i=new t({...n,read(s){e.next().then(o).then(s.bind(null,null)).catch(s)},predestroy(){r=e.return()},destroy(s){if(!r)return s(null);r.then(s.bind(null,null)).catch(s)}});return i;function o(s){s.done?i.push(null):i.push(s.value)}}static from(e,n){if(Qte(e))return e;if(e[rg])return this._fromAsyncIterator(e[rg](),n);Array.isArray(e)||(e=e===void 0?[]:[e]);let r=0;return new t({...n,read(i){this.push(r===e.length?null:e[r++]),i(null)}})}static isBackpressured(e){return(e._duplexState&Ote)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&rp)===0}[rg](){let e=this,n=null,r=null,i=null;return this.on("error",c=>{n=c}),this.on("readable",o),this.on("close",s),{[rg](){return this},next(){return new Promise(function(c,l){r=c,i=l;let f=e.read();f!==null?a(f):e._duplexState&tp&&a(null)})},return(){return u(null)},throw(c){return u(c)}};function o(){r!==null&&a(e.read())}function s(){r!==null&&a(null)}function a(c){i!==null&&(n?i(n):c===null&&!(e._duplexState&Jr)?i(cg):r({value:c,done:c===null}),i=r=null)}function u(c){return e.destroy(c),new Promise((l,f)=>{if(e._duplexState&tp)return l({value:void 0,done:!0});e.once("close",function(){c?f(c):l({value:void 0,done:!0})})})}}},yw=class extends op{constructor(e){super(e),this._duplexState|=Aa|Jr,this._writableState=new ig(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&Ute)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let n=e._writableState,r=n.queue.length+(e._duplexState&Sw?1:0);return r===0?Promise.resolve(!0):(n.drains===null&&(n.drains=[]),new Promise(i=>{n.drains.push({writes:r,resolve:i})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},sg=class extends og{constructor(e){super(e),this._duplexState=Aa,this._writableState=new ig(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},ag=class extends sg{constructor(e){super(e),this._transformState=new gw(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,n){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let n=this._transformState.data;this._transformState.data=null,e(null),this._transform(n,this._transformState.afterTransform)}else e(null)}_transform(e,n){n(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(Kte.bind(this))}},xw=class extends ag{};function Kte(t,e){let n=this._transformState.afterFinal;if(t)return n(t);e!=null&&this.push(e),this.push(null),n(null)}function Xte(...t){return new Promise((e,n)=>VF(...t,r=>{if(r)return n(r);e()}))}function VF(t,...e){let n=Array.isArray(t)?[...t,...e]:[t,...e],r=n.length&&typeof n[n.length-1]=="function"?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let i=n[0],o=null,s=null;for(let c=1;c<n.length;c++)o=n[c],sp(i)?i.pipe(o,u):(a(i,!0,c>1,u),i.pipe(o)),i=o;if(r){let c=!1,l=sp(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",f=>{s===null&&(s=f)}),o.on("finish",()=>{c=!0,l||r(s)}),l&&o.on("close",()=>r(s||(c?null:pw)))}return o;function a(c,l,f,p){c.on("error",p),c.on("close",d);function d(){if(l&&c._readableState&&!c._readableState.ended||f&&c._writableState&&!c._writableState.ended)return p(pw)}}function u(c){if(!(!c||s)){s=c;for(let l of n)l.destroy(c)}}}function WF(t){return!!t._readableState||!!t._writableState}function sp(t){return typeof t._duplexState=="number"&&WF(t)}function Jte(t){let e=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return e===cg?null:e}function Qte(t){return sp(t)&&t.readable}function Zte(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function YF(t){return Zte(t)?t.byteLength:1024}function OF(){}function ene(){this.destroy(new Error("Stream aborted."))}KF.exports={pipeline:VF,pipelinePromise:Xte,isStream:WF,isStreamx:sp,getStreamError:Jte,Stream:op,Writable:yw,Readable:og,Duplex:sg,Transform:ag,PassThrough:xw}});var lg=x((ETe,XF)=>{function tne(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function nne(t){return Buffer.isEncoding(t)}function rne(t,e,n){return Buffer.alloc(t,e,n)}function ine(t){return Buffer.allocUnsafe(t)}function one(t){return Buffer.allocUnsafeSlow(t)}function sne(t,e){return Buffer.byteLength(t,e)}function ane(t,e){return Buffer.compare(t,e)}function cne(t,e){return Buffer.concat(t,e)}function une(t,e,n,r,i){return Ct(t).copy(e,n,r,i)}function lne(t,e){return Ct(t).equals(e)}function fne(t,e,n,r,i){return Ct(t).fill(e,n,r,i)}function pne(t,e,n){return Buffer.from(t,e,n)}function dne(t,e,n,r){return Ct(t).includes(e,n,r)}function hne(t,e,n,r){return Ct(t).indexOf(e,n,r)}function mne(t,e,n,r){return Ct(t).lastIndexOf(e,n,r)}function gne(t){return Ct(t).swap16()}function vne(t){return Ct(t).swap32()}function yne(t){return Ct(t).swap64()}function Ct(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function xne(t,e,n,r){return Ct(t).toString(e,n,r)}function _ne(t,e,n,r,i){return Ct(t).write(e,n,r,i)}function Ene(t,e,n){return Ct(t).writeDoubleLE(e,n)}function bne(t,e,n){return Ct(t).writeFloatLE(e,n)}function wne(t,e,n){return Ct(t).writeUInt32LE(e,n)}function Sne(t,e,n){return Ct(t).writeInt32LE(e,n)}function Cne(t,e){return Ct(t).readDoubleLE(e)}function Tne(t,e){return Ct(t).readFloatLE(e)}function Ine(t,e){return Ct(t).readUInt32LE(e)}function Ane(t,e){return Ct(t).readInt32LE(e)}XF.exports={isBuffer:tne,isEncoding:nne,alloc:rne,allocUnsafe:ine,allocUnsafeSlow:one,byteLength:sne,compare:ane,concat:cne,copy:une,equals:lne,fill:fne,from:pne,includes:dne,indexOf:hne,lastIndexOf:mne,swap16:gne,swap32:vne,swap64:yne,toBuffer:Ct,toString:xne,write:_ne,writeDoubleLE:Ene,writeFloatLE:bne,writeUInt32LE:wne,writeInt32LE:Sne,readDoubleLE:Cne,readFloatLE:Tne,readUInt32LE:Ine,readInt32LE:Ane}});var Pw=x(Su=>{var ke=lg(),Rne="0000000000000000000",Pne="7777777777777777777",fg="0".charCodeAt(0),JF=ke.from([117,115,116,97,114,0]),One=ke.from([fg,fg]),Nne=ke.from([117,115,116,97,114,32]),Dne=ke.from([32,0]),Lne=4095,lp=257,Rw=263;Su.decodeLongPath=function(e,n){return wu(e,0,e.length,n)};Su.encodePax=function(e){let n="";e.name&&(n+=Aw(" path="+e.name+`
|
|
`)),e.linkname&&(n+=Aw(" linkpath="+e.linkname+`
|
|
`));let r=e.pax;if(r)for(let i in r)n+=Aw(" "+i+"="+r[i]+`
|
|
`);return ke.from(n)};Su.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r<e.length&&e[r]!==32;)r++;let i=parseInt(e.subarray(0,r).toString(),10);if(!i)return n;let o=ke.toString(e.subarray(r+1,i-1)),s=o.indexOf("=");if(s===-1)return n;n[o.slice(0,s)]=o.slice(s+1),e=e.subarray(i)}return n};Su.encode=function(e){let n=ke.alloc(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),ke.byteLength(r)!==r.length)return null;for(;ke.byteLength(r)>100;){let o=r.indexOf("/");if(o===-1)return null;i+=i?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return ke.byteLength(r)>100||ke.byteLength(i)>155||e.linkname&&ke.byteLength(e.linkname)>100?null:(ke.write(n,r),ke.write(n,us(e.mode&Lne,6),100),ke.write(n,us(e.uid,6),108),ke.write(n,us(e.gid,6),116),$ne(e.size,n,124),ke.write(n,us(e.mtime.getTime()/1e3|0,11),136),n[156]=fg+Une(e.type),e.linkname&&ke.write(n,e.linkname,157),ke.copy(JF,n,lp),ke.copy(One,n,Rw),e.uname&&ke.write(n,e.uname,265),e.gname&&ke.write(n,e.gname,297),ke.write(n,us(e.devmajor||0,6),329),ke.write(n,us(e.devminor||0,6),337),i&&ke.write(n,i,345),ke.write(n,us(ZF(n),6),148),n)};Su.decode=function(e,n,r){let i=e[156]===0?0:e[156]-fg,o=wu(e,0,100,n),s=cs(e,100,8),a=cs(e,108,8),u=cs(e,116,8),c=cs(e,124,12),l=cs(e,136,12),f=qne(i),p=e[157]===0?null:wu(e,157,100,n),d=wu(e,265,32),h=wu(e,297,32),m=cs(e,329,8),g=cs(e,337,8),v=ZF(e);if(v===8*32)return null;if(v!==cs(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(kne(e))e[345]&&(o=wu(e,345,155,n)+"/"+o);else if(!Fne(e)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:s,uid:a,gid:u,size:c,mtime:new Date(1e3*l),type:f,linkname:p,uname:d,gname:h,devmajor:m,devminor:g,pax:null}};function kne(t){return ke.equals(JF,t.subarray(lp,lp+6))}function Fne(t){return ke.equals(Nne,t.subarray(lp,lp+6))&&ke.equals(Dne,t.subarray(Rw,Rw+2))}function Mne(t,e,n){return typeof t!="number"?n:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function qne(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function Une(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function QF(t,e,n,r){for(;n<r;n++)if(t[n]===e)return n;return r}function ZF(t){let e=256;for(let n=0;n<148;n++)e+=t[n];for(let n=156;n<512;n++)e+=t[n];return e}function us(t,e){return t=t.toString(8),t.length>e?Pne.slice(0,e)+" ":Rne.slice(0,e-t.length)+t+" "}function jne(t,e,n){e[n]=128;for(let r=11;r>0;r--)e[n+r]=t&255,t=Math.floor(t/256)}function $ne(t,e,n){t.toString(8).length>11?jne(t,e,n):ke.write(e,us(t,11),n)}function Hne(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let n=[],r;for(r=t.length-1;r>0;r--){let s=t[r];e?n.push(s):n.push(255-s)}let i=0,o=n.length;for(r=0;r<o;r++)i+=n[r]*Math.pow(256,r);return e?i:-1*i}function cs(t,e,n){if(t=t.subarray(e,e+n),e=0,t[e]&128)return Hne(t);{for(;e<t.length&&t[e]===32;)e++;let r=Mne(QF(t,32,e,t.length),t.length,t.length);for(;e<r&&t[e]===0;)e++;return r===e?0:parseInt(t.subarray(e,r).toString(),8)}}function wu(t,e,n,r){return ke.toString(t.subarray(e,QF(t,0,e,e+n)),r)}function Aw(t){let e=ke.byteLength(t),n=Math.floor(Math.log(e)/Math.log(10))+1;return e+n>=Math.pow(10,n)&&n++,e+n+t}});var iM=x((wTe,rM)=>{var{Writable:Bne,Readable:Gne,getStreamError:eM}=Iw(),zne=fw(),tM=lg(),Cu=Pw(),Vne=tM.alloc(0),Nw=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new zne,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return Vne;let n=this._next(e);if(e===n.byteLength)return n;let r=[n];for(;(e-=n.byteLength)>0;)n=this._next(e),r.push(n);return tM.concat(r)}_next(e){let n=this.queue.peek(),r=n.byteLength-this._offset;if(e>=r){let i=this._offset?n.subarray(this._offset,n.byteLength):n;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,i}return this.buffered-=e,this.shifted+=e,n.subarray(this._offset,this._offset+=e)}},Dw=class extends Gne{constructor(e,n,r){super(),this.header=n,this.offset=r,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(eM(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=nM(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},Lw=class extends Bne{constructor(e){super(e),e||(e={}),this._buffer=new Nw,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=Ow,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=Cu.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=Cu.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=Cu.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=Cu.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?Cu.decodePax(e):Object.assign({},this._paxGlobal,Cu.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=nM(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(n){return this._continueWrite(n),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let n=this._stream.push(e);return this._missing===0?(this._stream.push(null),n&&this._stream._detach(),n&&this._locked===!1):n}_createStream(){return new Dw(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let n=this._callback;this._callback=Ow,n(e)}_write(e,n){this._callback=n,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(eM(this)),e(null)}[Symbol.asyncIterator](){let e=null,n=null,r=null,i=null,o=null,s=this;return this.on("entry",c),this.on("error",p=>{e=p}),this.on("close",l),{[Symbol.asyncIterator](){return this},next(){return new Promise(u)},return(){return f(null)},throw(p){return f(p)}};function a(p){if(!o)return;let d=o;o=null,d(p)}function u(p,d){if(e)return d(e);if(i){p({value:i,done:!1}),i=null;return}n=p,r=d,a(null),s._finished&&n&&(n({value:void 0,done:!0}),n=r=null)}function c(p,d,h){o=h,d.on("error",Ow),n?(n({value:d,done:!1}),n=r=null):i=d}function l(){a(e),n&&(e?r(e):n({value:void 0,done:!0}),n=r=null)}function f(p){return s.destroy(p),a(p),new Promise((d,h)=>{if(s.destroyed)return d({value:void 0,done:!0});s.once("close",function(){p?h(p):d({value:void 0,done:!0})})})}}};rM.exports=function(e){return new Lw(e)};function Ow(){}function nM(t){return t&=511,t&&512-t}});var sM=x((STe,kw)=>{var oM={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{kw.exports=require("fs").constants||oM}catch{kw.exports=oM}});var fM=x((CTe,lM)=>{var{Readable:Wne,Writable:Yne,getStreamError:aM}=Iw(),Pa=lg(),Tu=sM(),pg=Pw(),Kne=493,Xne=420,cM=Pa.alloc(1024),Mw=class extends Yne{constructor(e,n,r){super({mapWritable:Qne,eagerOpen:!0}),this.written=0,this.header=n,this._callback=r,this._linkname=null,this._isLinkname=n.type==="symlink"&&!n.linkname,this._isVoid=n.type!=="file"&&n.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let n=this._callback;this._callback=null,n(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,n){if(this._isLinkname)return this._linkname=this._linkname?Pa.concat([this._linkname,e]):e,n(null);if(this._isVoid)return e.byteLength>0?n(new Error("No body allowed for this entry")):n();if(this.written+=e.byteLength,this._pack.push(e))return n();this._pack._drain=n}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?Pa.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),uM(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return aM(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},qw=class extends Wne{constructor(e){super(e),this._drain=Fw,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,n,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof n=="function"&&(r=n,n=null),r||(r=Fw),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=Jne(e.mode)),e.mode||(e.mode=e.type==="directory"?Kne:Xne),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof n=="string"&&(n=Pa.from(n));let i=new Mw(this,e,r);return Pa.isBuffer(n)?(e.size=n.byteLength,i.write(n),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(cM),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let n=pg.encode(e);if(n){this.push(n);return}}this._encodePax(e)}_encodePax(e){let n=pg.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:n.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(pg.encode(r)),this.push(n),uM(this,n.byteLength),r.size=e.size,r.type=e.type,this.push(pg.encode(r))}_doDrain(){let e=this._drain;this._drain=Fw,e()}_predestroy(){let e=aM(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let n=this._pending.shift();n.destroy(e),n._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};lM.exports=function(e){return new qw(e)};function Jne(t){switch(t&Tu.S_IFMT){case Tu.S_IFBLK:return"block-device";case Tu.S_IFCHR:return"character-device";case Tu.S_IFDIR:return"directory";case Tu.S_IFIFO:return"fifo";case Tu.S_IFLNK:return"symlink"}return"file"}function Fw(){}function uM(t,e){e&=511,e&&t.push(cM.subarray(0,512-e))}function Qne(t){return Pa.isBuffer(t)?t:Pa.from(t)}});var pM=x(Uw=>{Uw.extract=iM();Uw.pack=fM()});var zw=x((LTe,vM)=>{vM.exports=function(e,n,r){e(n),r&&r(n===!0?null:n)}});var hg=x((kTe,xM)=>{"use strict";var yM=zw();xM.exports=function(e,n){if(!e)return function(i,o){return i?yM(o,i,n):o(!0)};Array.isArray(e)||(e=Object.keys(e).map(function(i){return e[i]}));var r=0;return function(i,o){if(i)return yM(o,i,n);r>=e.length?o(!0):o(null,e[r++])}}});var EM=x((FTe,_M)=>{"use strict";var tre=hg();_M.exports=function(t){return tre(Object.keys(t))}});var Vw=x((MTe,bM)=>{"use strict";var nre=zw();bM.exports=function(e,n){return function(r,i){if(r)return nre(i,r,n);if(e!=null){var o=e;e=null,i(null,o)}else i(!0)}}});var SM=x((qTe,wM)=>{"use strict";wM.exports=function(e){var n=0;return e=e||1/0,function(r,i){if(r)return i&&i(r);if(n>e)return i(!0);i(null,n++)}}});var TM=x((UTe,CM)=>{"use strict";CM.exports=function(e){return e=e||Math.random,function(n,r){return n?r&&r(n):r(null,e())}}});var AM=x((jTe,IM)=>{"use strict";IM.exports=function(){return function(e,n){n(!0)}}});var PM=x(($Te,RM)=>{"use strict";RM.exports=function(e){return function(n,r){r(e)}}});var NM=x((HTe,OM)=>{"use strict";OM.exports={keys:EM(),once:Vw(),values:hg(),count:SM(),infinite:TM(),empty:AM(),error:PM()}});var Au=x((BTe,DM)=>{"use strict";DM.exports=function(e,n){var r,i,o;n||(o=new Error("no done callback supplied"));function s(a){if(r=a,i)return s.abort();(function u(){for(var c=!0,l=!1;c;)if(l=!1,r(null,function(f,p){if(l=!0,f=f||i){if(c=!1,n)n(f===!0?null:f);else if(f&&f!==!0)throw console.warn(o),f}else e&&e(p)===!1||i?(c=!1,r(i||!0,n||function(){})):c||u()}),!l){c=!1;return}})()}return s.abort=function(a,u){if(typeof a=="function"&&(u=a,a=!0),i=a||!0,r)return r(i,u||function(){})},s}});var kM=x((GTe,LM)=>{"use strict";var rre=Au();LM.exports=function(e){return rre(null,e)}});var MM=x((zTe,FM)=>{"use strict";var ire=Au();FM.exports=function(e){return ire(function(n){console.log(n)},e)}});var Ru=x((VTe,qM)=>{qM.exports=function(e){return e&&(typeof e=="string"?function(n){return n[e]}:typeof e=="object"&&typeof e.exec=="function"?function(n){var r=e.exec(n);return r&&r[0]}:e)}});var $M=x((WTe,jM)=>{"use strict";function UM(t){return t}var ore=Ru(),sre=Au();jM.exports=function(e,n){var r=!1;return n?e=ore(e)||UM:(n=e,e=UM),sre(function(i){if(e(i))return r=!0,n(null,i),!1},function(i){r||n(i===!0?null:i,null)})}});var mg=x((YTe,HM)=>{"use strict";var are=Au();HM.exports=function(e,n,r){r||(r=n,n=null);var i=are(function(o){n=e(n,o)},function(o){r(o,n)});return arguments.length===2?function(o){o(null,function(s,a){if(s)return r(s===!0?null:s);n=a,i(o)})}:i}});var Ww=x((KTe,BM)=>{"use strict";var cre=mg();BM.exports=function(e){return cre(function(n,r){return n.push(r),n},[],e)}});var zM=x((XTe,GM)=>{"use strict";var ure=Ww();GM.exports=function(){return e=>{let n,r,i=new Promise((o,s)=>{n=o,r=s});return ure((o,s)=>{o?r(o):n(s)})(e),i}}});var WM=x((JTe,VM)=>{"use strict";var lre=mg();VM.exports=function(e){return lre(function(n,r){return n+r},"",e)}});var KM=x((QTe,YM)=>{"use strict";YM.exports={drain:Au(),onEnd:kM(),log:MM(),find:$M(),reduce:mg(),collect:Ww(),collectAsPromise:zM(),concat:WM()}});var JM=x((ZTe,XM)=>{"use strict";function fre(t){return t}var pre=Ru();XM.exports=function(e){return e?(e=pre(e),function(n){return function(r,i){n(r,function(o,s){try{s=o?null:e(s)}catch(a){return n(a,function(){return i(a)})}i(o,s)})}}):fre}});var ZM=x((eIe,QM)=>{"use strict";function dre(t){return t}var hre=Ru();QM.exports=function(e){if(!e)return dre;e=hre(e);var n=!1,r,i;return function(o){return function s(a,u){if(i)return u(i);a?(i=a,n?o(a,function(c){n?r=u:u(a)}):o(a,function(c){u(a)})):o(null,function(c,l){c?u(c):i?u(i):(n=!0,e(l,function(f,p){n=!1,i?(u(i),r&&r(i)):f?s(f,u):u(null,p)}))})}}}});var Yw=x((tIe,eq)=>{var mre=Ru();function gre(t){return t}eq.exports=function(e){return typeof e=="object"&&typeof e.test=="function"?function(n){return e.test(n)}:mre(e)||gre}});var gg=x((nIe,tq)=>{"use strict";var vre=Yw();tq.exports=function(e){return e=vre(e),function(n){return function r(i,o){for(var s,a=!0;a;)a=!1,s=!0,n(i,function(u,c){if(!u&&!e(c))return s?a=!0:r(u,o);o(u,c)}),s=!1}}}});var rq=x((rIe,nq)=>{"use strict";var yre=Yw(),xre=gg();nq.exports=function(e){return e=yre(e),xre(function(n){return!e(n)})}});var oq=x((iIe,iq)=>{"use strict";iq.exports=function(e,n){var r=!1;function i(o){r||!n||(r=!0,n(o===!0?null:o))}return function(o){return function(s,a){return s&&i(s),o(s,function(u,c){u?i(u):e&&e(c),a(u,c)})}}}});var aq=x((oIe,sq)=>{"use strict";sq.exports=function(e,n){n=n||{};var r=n.last||!1,i=!1;if(typeof e=="number"){r=!0;var o=e;e=function(){return--o}}return function(s){function a(u){s(!0,function(c){r=!1,u(c||!0)})}return function(u,c){i&&!u?r?a(c):c(i):(i=u)?s(i,c):s(null,function(l,f){(i=i||l)?c(i):e(f)?c(null,f):(i=!0,r?c(null,f):a(c))})}}}});var Kw=x((sIe,cq)=>{"use strict";function _re(t){return t}var Ere=Ru(),bre=gg();cq.exports=function(e,n){e=Ere(e)||_re;var r={};return bre(function(i){var o=e(i);return r[o]?!!n:(r[o]=!0,!n)})}});var lq=x((aIe,uq)=>{"use strict";var wre=Kw();uq.exports=function(e){return wre(e,!0)}});var pq=x((cIe,fq)=>{"use strict";var Sre=hg(),Cre=Vw();fq.exports=function(){return function(e){var n;return function(r,i){r?n?n(r,function(a){e(a||r,i)}):e(r,i):n?o():s();function o(){n(null,function(a,u){a?a===!0?s():e(!0,function(c){i(a)}):i(null,u)})}function s(){n=null,e(null,function(a,u){if(a)return i(a);u&&typeof u=="object"?u=Sre(u):typeof u!="function"&&(u=Cre(u)),n=u,o()})}}}}});var hq=x((uIe,dq)=>{"use strict";dq.exports={map:JM(),asyncMap:ZM(),filter:gg(),filterNot:rq(),through:oq(),take:aq(),unique:Kw(),nonUnique:lq(),flatten:pq()}});var Xw=x((lIe,mq)=>{"use strict";mq.exports=function t(e){var n=arguments.length;if(typeof e=="function"&&e.length===1){for(var r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(a){if(r==null)throw new TypeError("partial sink should only be called once!");var u=r;switch(r=null,n){case 1:return t(a,u[0]);case 2:return t(a,u[0],u[1]);case 3:return t(a,u[0],u[1],u[2]);case 4:return t(a,u[0],u[1],u[2],u[3]);default:return u.unshift(a),t.apply(null,u)}}}var o=e;o&&typeof o.source=="function"&&(o=o.source);for(var i=1;i<n;i++){var s=arguments[i];typeof s=="function"?o=s(o):s&&typeof s=="object"&&(s.sink(o),o=s.source)}return o}});var fp=x((Na,xq)=>{"use strict";var gq=NM(),vq=KM(),yq=hq();Na=xq.exports=Xw();Na.pull=Na;for(Qr in gq)Na[Qr]=gq[Qr];var Qr;for(Qr in yq)Na[Qr]=yq[Qr];var Qr;for(Qr in vq)Na[Qr]=vq[Qr];var Qr});var oS=x((MIe,Mq)=>{var FIe=Mq.exports=function(t){(function e(){var n=!0,r=!1,i=!1;do i=!0,n=!1,t.call(this,function(){i?n=!0:e()}),i=!1;while(n)})()}});var Uq=x((qIe,qq)=>{var Lre=oS();qq.exports=function(t,e){return function(n){var r=[],i,o;function s(c){r.push(c)}t=t||function(c){this.queue(c)},e=e||function(){this.queue(null)};var a={emit:function(c,l){c=="data"&&s(l),c=="end"&&(i=!0,s(null)),c=="error"&&(o=l)},queue:s},u;return function(c,l){if(i=i||c,c)return n(c,function(){if(u){var f=u;u=null,f(c)}l(c)});u=l,Lre(function f(p){if(u)if(l=u,o)u=null,l(o);else if(r.length){var d=r.shift();u=null,l(d===null,d)}else n(i,function(h,m){if(h&&h!==!0)return o=h,p();if(i=i||h)e.call(a);else if(m!==null&&(t.call(a,m),o||i))return n(o||i,function(){u=null,l(o||i)});p(f)})})}}}});var $q=x((UIe,jq)=>{jq.exports=function(){var t=[],e=0;function n(){return t.reduce(function(r,i){return r+i.length},0)}return{length:e,data:this,add:function(r){if(!Buffer.isBuffer(r))throw new Error("data must be a buffer, was: "+JSON.stringify(r));return this.length=e=e+r.length,t.push(r),this},has:function(r){return r==null?e>0:e>=r},get:function(r){var i;if(r==null||r===e){e=0;var o=t;return t=[],o.length==1?o[0]:Buffer.concat(o)}else if(t.length>1&&r<=(i=t[0].length)){var s=t[0].slice(0,r);return r===i?t.shift():t[0]=t[0].slice(r,i),e-=r,s}else if(r<e){for(var a=[],u=0;u+t[0].length<r;){var c=t.shift();u+=c.length,a.push(c)}return u<r&&(a.push(t[0].slice(0,r-u)),t[0]=t[0].slice(r-u,t[0].length),this.length=e=e-r),Buffer.concat(a)}else throw new Error("could not get "+r+" bytes")}}}});var zq=x((jIe,Gq)=>{"use strict";var kre=$q();function Fre(t){return Number.isFinite(t)}function Hq(t){return typeof t=="function"}function Bq(t,e){return e?function(n,r){var i=setTimeout(function(){t(new Error("pull-reader: read exceeded timeout"),r)},e);t(n,function(o,s){clearTimeout(i),r(o,s)})}:t}Gq.exports=function(t){var e=[],n,r,i=!1,o=kre(),s,a,u;function c(){for(;e.length;)if(e[0].length==null&&o.has(1))e.shift().cb(null,o.get());else if(o.has(e[0].length)){var p=e.shift();p.cb(null,o.get(p.length))}else if(s==!0&&e[0].length&&o.length<e[0].length){var d="stream ended with:"+o.length+" but wanted:"+e[0].length;e.shift().cb(new Error(d))}else if(s)e.shift().cb(s);else return!!e.length;return e.length||!o.has(1)||u}function l(){var p=c();p&&!i&&n&&!i&&!a&&(i=!0,r(null,function(d,h){if(i=!1,d)return s=d,c();o.add(h),l()}))}function f(p){if(u){for(;e.length;)e.shift().cb(u);return cb&&cb(u)}r=Bq(p,t),n=p,l()}return f.abort=function(p,d){u=p||!0,n?(i=!0,n(u,function(){for(;e.length;)e.shift().cb(u);d&&d(u)})):d()},f.read=function(p,d,h){if(Hq(d)&&(h=d,d=t),Hq(h))e.push({length:Fre(p)?p:null,cb:h}),l();else return a=!0,function(m,g){if(i||o.has(1)){if(m)return n(m,g);e.push({length:null,cb:g}),l()}else Bq(n,d)(m,function(v,y){g(v,y)})}},f}});var rU=x((Da,nU)=>{var Mre=Uq(),qre=zq(),Vq=Wi(),Wq=0,Yq=1,Kq=2,Xq="GOODBYE";function Jq(t){let e=Buffer.alloc(9),n=0,r=t.value!==void 0?t.value:t.end;return typeof t=="string"&&t===Xq?(e.fill(0),[e,null]):(typeof r=="string"?(n=Yq,r=Buffer.from(r,"utf-8")):Buffer.isBuffer(r)?n=Wq:(n=Kq,r=Buffer.from(JSON.stringify(r),"utf-8")),n=t.stream<<3|t.end<<2|n,e[0]=n,e.writeUInt32BE(r.length,1),e.writeInt32BE(t.req||0,5),[e,r])}function Qq(t){if(t.length!==9)throw new Error("expected header to be 9 bytes long");let e=t[0],n=t.readUInt32BE(1);return{req:t.readInt32BE(5),stream:!!(e&8),end:!!(e&4),value:null,length:n,type:e&3}}function Zq(t,e){if(t.length!==e.length)throw new Error("incorrect length, expected:"+e.length+" found:"+t.length);if(e.type===Wq)e.value=t;else if(e.type===Yq)e.value=t.toString();else if(e.type===Kq)e.value=JSON.parse(t.toString());else throw new Error("unknown message type");return e}function eU(t){return Mre(function(n){t&&t("encoded: %o",n);let[r,i]=Jq(n);this.queue(r),i!==null&&this.queue(i)})}function tU(t){let e=qre(),n=!1;return function(i){return e(i),function(s,a){if(n)return a(!0);if(s)return e.abort(s,a);e.read(9,function(c,l){if(c)return a(c);let f=Qq(l);if(f.length===0)return n=!0,a(null,Xq);e.read(f.length,function(d,h){if(d)return a(d);try{Zq(h,f)}catch(m){return a(m)}t&&t("decoded: %o",f),a(null,f)})})}}}Da=nU.exports=function(e,n){let r=n===!0?Vq("packet-stream-codec"):typeof n=="string"?Vq(n):null;return{source:eU(r)(e.source),sink(i){return e.sink(tU(r)(i))}}};Da.encodePair=Jq;Da.decodeHead=Qq;Da.decodeBody=Zq;Da.encode=eU;Da.decode=tU});var sS=x(($Ie,iU)=>{function Ure(t){return t&&(t===!0?!0:{message:t.message,name:t.name,stack:t.stack})}function jre(t){console.error("packet-stream asked to read after closed",t)}iU.exports={flat:Ure,closedread:jre}});var aU=x((HIe,sU)=>{var{flat:oU,closedread:$re}=sS();function vg(t,e,n){this.id=t,this.read=null,this.writeEnd=null,this.readEnd=null,this._ps=e,this._remove=n}vg.prototype.write=function(t,e){let n=this._ps;e?(this.writeEnd=e,n&&(n.read({req:this.id,stream:!0,end:!0,value:oU(e)}),this.readEnd&&this.destroy(e),n._maybedone(e))):n&&n.read({req:this.id,stream:!0,end:!1,value:t})};vg.prototype.end=function(t){this.write(null,oU(t||!0))};vg.prototype.destroy=function(t){if(this.writeEnd){if(!this.readEnd){this.readEnd=!0;try{this.read&&this.read(null,t)}catch(e){console.error("Exception thrown by PacketStream substream end handler",e),console.error(e.stack)}}}else{if(this.writeEnd=!0,!this.readEnd){this.readEnd=!0;try{this.read(null,t)}catch(e){console.error("Exception thrown by PacketStream substream end handler",e),console.error(e.stack)}}this.write(null,t)}this._ps&&(this._remove(),this._remove=null,this.read=$re,this._ps=null)};sU.exports=vg});var lU=x((BIe,uU)=>{var cU=aU(),{flat:aS,closedread:Hre}=sS();function Ar(t){this.ended=!1,this.opts=t,this._req_counter=1,this._requests=new Map,this._instreams=new Map,this._outstreams=new Map,this._closecbs=[],this._closing=!1,this._closed=!1,t.close&&this._closecbs.push(t.close)}Ar.prototype.message=function(t){this.read({req:0,stream:!1,end:!1,value:t})};Ar.prototype.request=function(t,e){if(this._closing)return e(new Error("parent stream is closing"));let n=this._req_counter++;this._requests.set(n,(r,i)=>{this._requests.delete(n),e(r,i),this._maybedone(r)}),this.read({req:n,stream:!1,end:!1,value:t})};Ar.prototype.stream=function(){if(this._closing)throw new Error("parent stream is closing");let t=this._req_counter++,e=new cU(t,this,()=>{this._outstreams.delete(t)});return this._outstreams.set(t,e),e};Ar.prototype.close=function(t){if(!t)throw new Error("packet-stream.close *must* have callback");if(this._closed)return t();this._closecbs.push(t),this._closing=!0,this._maybedone()};Ar.prototype.destroy=function(t){t=t||aS(t),this.ended=t,this._closing=!0;let e=t===!0?new Error("unexpected end of parent stream"):t,n=0;this._requests.forEach(r=>{n++,r(e)}),this._instreams.forEach(r=>{n++,r.writeEnd=!0,r.destroy(e)}),this._outstreams.forEach(r=>{n++,r.writeEnd=!0,r.destroy(e)}),n===0&&t===!0&&(e=null),this._maybedone(e)};Ar.prototype._maybedone=function(t){this._closed||!this._closing||this._requests.size!==0||this._instreams.size!==0||this._outstreams.size!==0||(this.read(null,t||!0),this._closed=!0,this._closecbs.forEach(e=>{e(t)}),this.opts=null,this._closecbs.length=0,this.read=Hre,this._requests.clear(),this._instreams.clear(),this._outstreams.clear())};Ar.prototype.read=function(t){console.error("please overwrite read method to do IO",t)};Ar.prototype.write=function(t,e){this.ended||(e?this.destroy(e):t.req&&!t.stream?this._onrequest(t):t.req&&t.stream?this._onstream(t):this._onmessage(t))};Ar.prototype._onmessage=function(t){this.opts&&typeof this.opts.message=="function"&&this.opts.message(t.value)};Ar.prototype._onrequest=function(t){let e=t.req*-1;if(t.req<0)this._requests.has(e)&&this._requests.get(e)(t.end?t.value:null,t.end?null:t.value);else if(this.opts&&typeof this.opts.request=="function"){let n=!1;this.opts.request(t.value,(r,i)=>{if(n)throw new Error("cb called twice from local api");n=!0,r?this.read({value:aS(r),end:!0,req:e}):this.read({value:i,end:!1,req:e}),this._maybedone()})}else{if(this.ended){let n=this.ended===!0?new Error("unexpected end of parent stream"):this.ended;this.read({value:aS(n),end:!0,stream:!1,req:e})}else this.read({value:{message:"Unable to handle requests",name:"NO_REQUEST_HANDLER",stack:null},end:!0,stream:!1,req:e});this._maybedone()}};Ar.prototype._onstream=function(t){if(t.req<0){let e=t.req*-1,n=this._outstreams.get(e);if(!n)return console.error("no stream for incoming msg",t);t.end?(n.writeEnd&&this._outstreams.delete(e),n.readEnd=!0,n.read(null,t.value),this._maybedone()):n.read(t.value)}else{let e=t.req,n=this._instreams.get(e);n||(n=new cU(e*-1,this,()=>{this._instreams.delete(e)}),this._instreams.set(e,n),this.opts&&typeof this.opts.stream=="function"&&this.opts.stream(n)),t.end?(n.writeEnd&&this._instreams.delete(e),n.readEnd=!0,n.read&&n.read(null,t.value),this._maybedone()):n.read?n.read(t.value):console.error("no .read for stream:",n.id,"dropped:",t)}};uU.exports=t=>new Ar(t)});var pU=x((GIe,pp)=>{"use strict";var Bre=fp();function Gre(t){let e=!1;return(n,r)=>{e||(e=!0,t(n,r))}}function cS(t,e){let n=[],r=!1,i=!1,o,s,a=Gre((u,c)=>{e&&e(u,c),t=null,e=null,o=null,s&&s(u||!0,()=>{})});return t.read=function(u,c){if(r=r||c,o){let l=o;o=null,l(r,u)}else!r&&!i&&n.push(u);r&&a(r!==!0?r:null)},{source(u,c){u?(t&&t.write(null,u),c(u),n.length=0,i=!0,a(u!==!0?u:null)):n.length?c(null,n.shift()):r?c(r):o=c},sink(u){if(r)return s=null,u(r,()=>{});s=u,Bre.drain(c=>{if(r)return!1;t.write(c)},c=>{t&&!t.writeEnd&&t.write(null,c||!0),a&&a(c)})(u)}}}function fU(t,e){return cS(t,n=>{t.writeEnd||t.write(null,n||!0),e&&e(n)})}function zre(t){return fU(t).source}function Vre(t,e){return fU(t,e).sink}pp.exports=cS;pp.exports.source=zre;pp.exports.sink=Vre;pp.exports.duplex=cS});var hU=x((zIe,dU)=>{dU.exports=function(e){var n,r,i;function o(s){return function(a,u){s(a,function(c,l){if(c&&!i)return i=!0,u(null,e);c&&n?u(c):c?r=u:u(null,l)})}}return o.end=function(){return n=!0,r&&r(n),o},o}});var gU=x((VIe,mU)=>{var Wre=hU(),uS=fp();mU.exports=function(t,e){e=e||"GOODBYE";var n=Wre(e);return{source:uS(t.source,n),sink:uS(uS.filter(function(r){if(r!==e)return!0;n.end()}),t.sink)}}});var dp=x(Zr=>{"use strict";var yg=fp();function Yre(t){return t?Object.keys(t).length===0:!0}Zr.set=function(e,n,r){let i,o;for(let s=0;s<n.length;s++){let a=n[s];e[a]=e[a]||{},i=e,o=a,e=e[a]}i[o]=r};Zr.get=function(e,n){if(typeof n=="string")return e[n];let r;for(let i=0;i<n.length;i++){let o=n[i];if(r=e=e[o],e==null)return e}return r};Zr.prefix=function(e,n){let r;for(let i=0;i<n.length;i++){let o=n[i];if(r=e=e[o],typeof e!="object")return e}return typeof r!="object"?!!r:!1};function Kre(t,e){for(let n in e){let r=e[n];t[r]||(t[r]={}),t=t[r]}return t}function Xre(t,e){(function n(r,i){let o=e[i];if(r)e.length-1===i?delete r[o]:i<e.length&&n(r[o],i+1);else return;Yre(r[o])&&delete r[o]})(t,0)}function Jre(t,e){for(let n in e)t[n]=e[n];return t}Zr.mount=function(e,n,r){if(!Array.isArray(n))throw new Error("path must be array of strings");return Jre(Kre(e,n),r)};Zr.unmount=function(e,n){return Xre(e,n)};var xg=t=>t==="source",_g=t=>t==="sink",lS=t=>t==="duplex",Qre=t=>t==="sync",Zre=t=>t==="async",vU=t=>Qre(t)||Zre(t),eie=t=>xg(t)||_g(t)||lS(t);Zr.isRequest=vU;Zr.isStream=eie;function fS(t){return function(e){e(t||!0,()=>{})}}function yU(t){return{source:yg.error(t),sink:fS(t)}}Zr.errorAsStream=function(e,n){return xg(e)?yg.error(n):_g(e)?fS(n):yU(n)};Zr.errorAsStreamOrCb=function(e,n,r){return vU(e)?r(n):lS(e)?yU(n):xg(e)?yg.error(n):_g(e)?fS(n):r(n)};Zr.pipeToStream=function(e,n,r){xg(e)?n(r):_g(e)?r(n):lS(e)&&yg(n,r,n)}});var pS=x((YIe,xU)=>{"use strict";function tie(t){return typeof t=="string"?[`Error: ${t}`]:t.stack?t.stack.split(`
|
|
`):[`${t.name}: ${t.message}`]}xU.exports=function(e,n){let r=new Error(n),i=r.stack.split(`
|
|
`);i.splice(1,1);let o=tie(e);o[0]=" "+o[0];for(let s=1;s<i.length;s++)if(o.includes(i[s])){i.splice(s);break}return r.stack=i.concat(o).join(`
|
|
`),r}});var wU=x((KIe,bU)=>{"use strict";var nie=lU(),dS=pU(),rie=gU(),Nu=dp(),_U=pS(),EU=Wi()("muxrpc:psc");bU.exports=function(e,n,r){let i=nie({message(){},request(s,a){if(!Array.isArray(s.args))return a(new Error(`invalid request, args should be array, was: ${JSON.stringify(s)}`));let u=s.name,c=s.args,l=!1,f=!1;c.push((p,d)=>{f=!0,l=!0,a(p,d)});try{e("async",u,c)}catch(p){if(l||f)throw _U(p,"no callback provided to muxrpc async funtion");a(p)}},stream(s){s.read=function(u,c){if(c)return s.write(null,c);let{name:l,type:f,args:p}=u,d,h;if(s.read=null,!Nu.isStream(f))return s.write(null,new Error(`unsupported stream type: ${f}`));try{h=e(f,l,p)}catch(v){d=v}let g=dS[f==="source"?"sink":f==="sink"?"source":"duplex"](s);return Nu.pipeToStream(f,g,d?Nu.errorAsStream(f,d):h)}},close(s){if(i=null,o.ended=!0,!o.closed&&(o.closed=!0,r)){let a=r;r=null,a(s)}}}),o=rie(dS(i,()=>{}));return o=n?n(o,EU.enabled?EU.namespace:!1):o,o.remoteCall=function(s,a,u,c){if(a==="emit")return i.message(u);if(!(Nu.isRequest(s)||Nu.isStream(s)))throw new Error(`unsupported type: ${JSON.stringify(s)}`);if(Nu.isRequest(s))return i.request({name:a,args:u},c);let l=i.stream(),f=dS[s](l,c);return l.write({name:a,args:u,type:s}),f},o.isOpen=function(){return!i.ended},o.close=function(s,a){if(typeof s=="function"&&(a=s,s=!1),!i){a&&a();return}if(s){i.destroy(s),a&&a();return}return i.close(u=>{if(a)a(u);else if(u)throw _U(u,"no callback provided for muxrpc close")}),this},o.closed=!1,o}});var CU=x((XIe,SU)=>{"use strict";var iie=pS(),oie=dp();function hS(t,e,n,r){for(let i in e){let o=e[i],s=n?n.concat(i):[i];if(o&&typeof o=="object"){let a=o;t[i]=hS({},a,s,r)}else{let a=o;t[i]=(...u)=>r(a,s,u)}}return t}function sie(t){if(t)throw iie(t,"callback not provided")}function aie(t,e,n,r){t=t||{};function i(o,s,a){let u=typeof a[a.length-1]=="function"?a.pop():o==="sync"||o==="async"?null:sie;if(typeof u=="function"){let c;try{c=n(o,s,a,u)}catch(l){return oie.errorAsStreamOrCb(o,l,u)}return c}else return new Promise((c,l)=>{n(o,s,a,(f,p)=>{f?l(f):c(p)})})}return r?i("async","manifest",[function(o,s){if(o)return r(o);hS(t,s,null,i),r(null,s,t)}]):hS(t,e,null,i),t}SU.exports=aie});var AU=x((JIe,IU)=>{"use strict";var Eg=dp();function TU(t){return Array.isArray(t)?t:t.split(".")}function cie(t){return t&&typeof t.pre=="function"&&typeof t.test=="function"&&typeof t.post=="function"}IU.exports=function(e){if(cie(e))return e;if(typeof e=="function")return{pre:e};let n=null,r={};function i(o){if(o.allow){n={};for(let s of o.allow)Eg.set(n,TU(s),!0)}else n=null;if(o.deny)for(let s of o.deny)Eg.set(r,TU(s),!0);else r={};return this}return e&&i(e),i.pre=o=>{if(o=Array.isArray(o)?o:[o],n&&!Eg.prefix(n,o))return new Error(`method:${o} is not in list of allowed methods`);if(r&&Eg.prefix(r,o))return new Error(`method:${o} is on list of disallowed methods`)},i.post=()=>{},i.test=o=>i.pre(o),i.get=()=>({allow:n,deny:r}),i}});var PU=x((QIe,RU)=>{"use strict";var uie=AU(),mS=dp();RU.exports=function(e,n,r){r=uie(r);function i(s,a){return s===mS.get(n,a)}function o(s,a,u){if(a==="emit")throw new Error("emit has been removed");if(s==="async"&&i("sync",a)){let c=u.pop(),l;try{l=mS.get(e,a).apply(this,u)}catch(f){return c(f)}return c(null,l)}if(!i(s,a))throw new Error(`no ${s}:${a}`);return mS.get(e,a).apply(this,u)}return function(a,u,c){let l=r.pre(u,c);if(l)throw l;return o.call(this,a,u,c)}}});var DU=x((ZIe,NU)=>{"use strict";var lie=rU(),fie=require("events").EventEmitter,pie=wU(),die=CU(),hie=PU();function OU(t,e,n,r,i,o,s){let a;typeof t=="function"&&(a=t,t={}),e=e||{},t=t||{};let u=new fie;o||(o=lie);let c,l={_emit(p,d){return u&&u._emit(p,d),l},id:r},f=pie(hie(n,e,i).bind(l),o,p=>{if(!u.closed&&(u.closed=!0,u.emit("closed"),c)){let d=c;c=null,d(p)}});if(die(u,t,(p,d,h,m)=>{if(f.closed)throw new Error("stream is closed");return f.remoteCall(p,d,h,m)},a),u._emit=u.emit,s){Object.__defineGetter__.call(u,"id",()=>l.id),Object.__defineSetter__.call(u,"id",d=>{l.id=d});let p=!0;u.createStream=d=>{if(c=d,p)return p=!1,f;throw new Error("one stream per rpc")}}else u.stream=f;return u.closed=!1,u.close=function(p,d){return f.close(p,d),this},u}NU.exports=function(t,e,n){return arguments.length>3?OU.apply(this,arguments):function(r,i,o){return OU(t,e,r,o,i,n,!0)}}});var gS=x((fo,FU)=>{var eAe=Xw(),mie=oS();function LU(t){t.destroy?t.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function kU(t,e,n){var r,i=!1,o;function s(){o||(o=!0,n&&n(r===!0?null:r))}function a(){i||(i=!0,c(),r?s():t(r=!0,s))}function u(l){c(),r||t(r=l,s)}function c(){e.on("finish",a),e.removeListener("close",a),e.removeListener("error",u)}e.on("close",a),e.on("finish",a),e.on("error",u),process.nextTick(function(){mie(function(l){t(null,function(f,p){if(r=r||f,f===!0)return e._isStdio?s():e.end();if(r=r||f)return LU(e),s(r);if(e._isStdio)e.write(p,function(){l()});else{var d=e.write(p);d===!1?e.once("drain",l):l()}})})})}function gie(t){var e=!1,n=!1,r;function i(){var o=t.read();if(o!==null&&r){var s=r;r=null,s(null,o)}}return t.on("readable",function(){n=!0,r&&i()}).on("end",function(){e=!0,r&&r(e)}).on("error",function(o){e=o,r&&r(e)}),function(o,s){r=s,e?s(e):n&&i()}}function bg(t){var e=[],n=[],r,i=!1,o;function s(){for(;(e.length||r)&&n.length;)n.shift()(e.length?null:r,e.shift());!e.length&&i&&(i=!1,t.resume())}return t.on("data",function(a){e.push(a),s(),e.length&&t.pause&&(i=!0,t.pause())}),t.on("end",function(){r=!0,s()}),t.on("close",function(){r=!0,s()}),t.on("error",function(a){r=a,s()}),function(a,u){if(!u)throw new Error("*must* provide cb");if(a){let l=function(){for(;n.length;)n.shift()(a);u(a)};var c=l;if(r)return l();t.once("close",l),LU(t)}else n.push(u),s()}}var vie=bg,wg=function(t,e){return function(n){return kU(n,t,e)}},Sg=function(t){return bg(t)};fo=FU.exports=function(t,e){return t.writable&&t.write?t.readable?function(n){return kU(n,t,e),bg(t)}:wg(t,e):Sg(t)};fo.sink=wg;fo.source=Sg;fo.read=vie;fo.read1=bg;fo.read2=gie;fo.duplex=function(t,e){return{source:Sg(t),sink:wg(t,e)}};fo.transform=function(t){return function(e){var n=Sg(t);return wg(t)(e),n}}});var qU=x((tAe,Cg)=>{var yie=require("stream");Cg.exports=vS;Cg.exports.source=function(t){return vS(null,t)};Cg.exports.sink=function(t){return vS(t,null)};var MU=typeof setImmediate>"u"?process.nextTick:setImmediate;function vS(t,e){t&&typeof t=="object"&&(e=t.source,t=t.sink);var n=[],r=[],i,o,s=new yie;s.writable=s.readable=!0,s.write=function(g){return n.length?n.shift()(null,g):r.push(g),n.length||(o=!0),!!n.length},s.end=function(){e?r.length?m():e(i=!0,n.length?n.shift():function(){}):n.length&&n.shift()(!0)},s.source=function(g,v){r.length?(v(null,r.shift()),r.length||s.emit("drain")):((i=i||g)?v(i):n.push(v),o&&(o=!1,s.emit("drain")))};var a;t&&(a=t(s.source)),a&&!e&&(e=a);var u=[],c=[],l=!1,f=!1,p=!1;if(s.sink=function(g){e=g,MU(m)},e){s.sink(e),s.paused=!0;var d=s.on.bind(s);s.on=(g,v)=>{var y=d(g,v);return g==="data"&&s.paused&&MU(s.resume.bind(s)),y};var h=s.pipe.bind(s);s.pipe=function(g,v){var y=h(g,v);return s.paused&&s.resume(),y}}function m(){if(f=!1,!(!e||p)){for(;u.length&&!s.paused;)s.emit("data",u.shift());if(!s.paused){if(l)return s.emit("end");p=!0,e(null,function g(v,y){p=!1,s.paused?(v===!0?l=v:v?s.emit("error",v):u.push(y),f=!0):v&&(i=v)!==!0?s.emit("error",v):(i=i||v)?s.emit("end"):(s.emit("data",y),p=!0,e(null,g))})}}}return s.pause=function(){return s.paused=!0,s},s.resume=function(){return s.paused=!1,m(),s},s.destroy=function(){!i&&e&&e(i=!0,function(){}),i=!0,n.length&&n.shift()(!0),s.emit("close")},s}});var jU=x((nAe,UU)=>{UU.exports=xie;function xie(t,e){typeof t=="function"&&(e=t,t=!1);var n=[],r,i;function o(f,p){f&&(r=f,i&&l(r)),i=p,c()}var s;function a(f){s=s||f||!0,c()}function u(f){if(!s){if(i){l(r,f);return}n.push(f)}}if(t)return{push:u,end:a,source:o,buffer:n};return o.push=u,o.end=a,o.buffer=n,o;function c(){i&&(r?l(r):!n.length&&s?l(s):n.length&&l(null,n.shift()))}function l(f,p){var d=i;if(f&&e){var h=e;e=null,h(f===!0?null:f)}i=null,d(f,p)}}});var NS=x((ZRe,mj)=>{"use strict";var dj=require("child_process"),Hie=1024*1024,hj={exec(t,e){dj.exec(t,{maxBuffer:2*Hie,windowsHide:!0},e)},spawn(t,e,n){return dj.spawn(t,e,n)},stripLine(t,e){let n=0;for(;e-- >0;){let r=t.indexOf(`
|
|
`,n);r>=0&&(n=r+1)}return n>0?t.substring(n):t},split(t,e){let n=t.trim().split(/\s+/);return n.length>e&&(n[e-1]=n.slice(e-1).join(" ")),n},extractColumns(t,e,n){let r=t.split(/(\r\n|\n|\r)/),i=[];return n||(n=Math.max.apply(null,e)+1),r.forEach(o=>{let s=hj.split(o,n),a=[];e.forEach(u=>{a.push(s[u]||"")}),i.push(a)}),i},parseTable(t){let e=t.split(/(\r\n\r\n|\r\n\n|\n\r\n)|\n\n/).filter(n=>n.trim().length>0).map(n=>n.split(/(\r\n|\n|\r)/).filter(r=>r.trim().length>0));return e.forEach(n=>{for(let r=0;n[r];){let i=n[r];i.startsWith(" ")?(n[r-1]+=i.trimLeft(),n.splice(r,1)):r+=1}}),e.map(n=>{let r={};return n.forEach(i=>{let o=i.indexOf(":"),s=i.slice(0,o).trim();r[s]=i.slice(o+1).trim()}),r})}};mj.exports=hj});var vj=x((ePe,gj)=>{"use strict";var Bie=require("os"),Gg=require("fs"),Rr=NS(),Gie=t=>new Promise((e,n)=>{Gg.existsSync(t)?e():Gg.mkdir(t,r=>{r?n(r):e()})}),DS={darwin(t){return new Promise((e,n)=>{Rr.exec("netstat -anv -p TCP && netstat -anv -p UDP",function(r,i,o){if(r)n(r);else{if(r=o.toString().trim(),r){n(r);return}let s=Rr.stripLine(i.toString(),2),a=Rr.extractColumns(s,[0,3,8],10).filter(u=>!!String(u[0]).match(/^(udp|tcp)/)).find(u=>{let c=String(u[1]).match(/\.(\d+)$/);if(c&&c[1]===String(t))return!0});a&&a[2].length?e(parseInt(a[2],10)):n(new Error(`pid of port (${t}) not found`))}})})},freebsd:"darwin",sunos:"darwin",linux(t){return new Promise((e,n)=>{let r="netstat -tunlp";Rr.exec(r,function(i,o,s){if(i)n(i);else{let a=s.toString().trim();a&&console.warn(a);let u=Rr.stripLine(o.toString(),2),c=Rr.extractColumns(u,[3,6],7).find(l=>{let f=String(l[0]).match(/:(\d+)$/);if(f&&f[1]===String(t))return!0});if(c&&c[1]){let l=c[1].split("/",1)[0];l.length?e(parseInt(l,10)):n(new Error(`pid of port (${t}) not found`))}else n(new Error(`pid of port (${t}) not found`))}})})},win32(t){return new Promise((e,n)=>{Rr.exec("netstat -ano",function(r,i,o){if(r)n(r);else{if(r=o.toString().trim(),r){n(r);return}let s=Rr.stripLine(i.toString(),4),a=Rr.extractColumns(s,[1,4],5).find(u=>{let c=String(u[0]).match(/:(\d+)$/);if(c&&c[1]===String(t))return!0});a&&a[1].length&&parseInt(a[1],10)>0?e(parseInt(a[1],10)):n(new Error(`pid of port (${t}) not found`))}})})},android(t){return new Promise((e,n)=>{let r=Bie.tmpdir()+"/.find-process",i=r+"/"+process.pid,o='netstat -tunp >> "'+i+'"';Gie(r).then(()=>{Rr.exec(o,()=>{Gg.readFile(i,"utf8",(s,a)=>{if(Gg.unlink(i,()=>{}),s)n(s);else{a=Rr.stripLine(a,2);let u=Rr.extractColumns(a,[3,6],7).find(c=>{let l=String(c[0]).match(/:(\d+)$/);if(l&&l[1]===String(t))return!0});if(u&&u[1]){let c=u[1].split("/",1)[0];c.length?e(parseInt(c,10)):n(new Error(`pid of port (${t}) not found`))}else n(new Error(`pid of port (${t}) not found`))}})})})})}};function zie(t){let e=process.platform;return new Promise((n,r)=>{if(!(e in DS))return r(new Error(`platform ${e} is unsupported`));let i=DS[e];typeof i=="string"&&(i=DS[i]),i(t).then(n,r)})}gj.exports=zie});var Ej=x((tPe,_j)=>{"use strict";var zg=require("path"),ps=NS();function LS(t,e){return e?t&&t.match?t.match(e):!1:!0}function yj(t){let e=t.split(zg.sep),n=e[e.length-1];n&&(e[e.length-1]=n.split(" ")[0]);let r=[];for(let i of e){let o=i.indexOf(" -");if(o>=0){r.push(i.substring(0,o).trim());break}else if(i.endsWith(" ")){r.push(i.trim());break}r.push(i)}return r.join(zg.sep)}function xj(t){if(process.platform==="darwin"){let e=t.indexOf(".app/");if(e>=0)return zg.basename(t.substring(0,e))}return zg.basename(t)}var kS={darwin(t){return new Promise((e,n)=>{let r;"pid"in t?r=`ps -p ${t.pid} -ww -o pid,ppid,uid,gid,args`:r="ps ax -ww -o pid,ppid,uid,gid,args",ps.exec(r,function(i,o,s){if(i)"pid"in t?e([]):n(i);else{if(i=s.toString().trim(),i){n(i);return}let a=ps.stripLine(o.toString(),1),c=ps.extractColumns(a,[0,1,2,3,4],5).filter(l=>l[0]&&t.pid?l[0]===String(t.pid):l[4]&&t.name?LS(l[4],t.name):!!l[0]).map(l=>{let f=String(l[4]),p=yj(f);return{pid:parseInt(l[0],10),ppid:parseInt(l[1],10),uid:parseInt(l[2],10),gid:parseInt(l[3],10),name:xj(p),bin:p,cmd:l[4]}});t.strict&&t.name&&(c=c.filter(l=>l.name===t.name)),e(c)}})})},linux:"darwin",sunos:"darwin",freebsd:"darwin",win32(t){return new Promise((e,n)=>{let r="Get-CimInstance -className win32_process | select Name,ProcessId,ParentProcessId,CommandLine,ExecutablePath",i=[],o=ps.spawn("powershell.exe",["/c",r],{detached:!1,windowsHide:!0});o.stdout.on("data",s=>{i.push(s.toString())}),o.on("close",s=>{if(s!==0)return n(new Error("Command '"+r+"' terminated with code: "+s));let a=ps.parseTable(i.join("")).filter(u=>{if("pid"in t)return u.ProcessId===String(t.pid);if(t.name){let c=u.Name||"";return t.strict?c===t.name||c.endsWith(".exe")&&c.slice(0,-4)===t.name:LS(u.CommandLine||c,t.name)}else return!0}).map(u=>({pid:parseInt(u.ProcessId,10),ppid:parseInt(u.ParentProcessId,10),bin:u.ExecutablePath,name:u.Name||"",cmd:u.CommandLine}));e(a)})})},android(t){return new Promise((e,n)=>{let r="ps";ps.exec(r,function(i,o,s){if(i)"pid"in t?e([]):n(i);else{if(i=s.toString().trim(),i){n(i);return}let a=ps.stripLine(o.toString(),1),c=ps.extractColumns(a,[0,3],4).filter(l=>l[0]&&t.pid?l[0]===String(t.pid):l[1]&&t.name?LS(l[1],t.name):!!l[0]).map(l=>{let f=String(l[1]),p=yj(f);return{pid:parseInt(l[0],10),name:xj(p),bin:p,cmd:f}});t.strict&&t.name&&(c=c.filter(l=>l.name===t.name)),e(c)}})})}};function Vie(t){let e=process.platform;return new Promise((n,r)=>{if(!(e in kS))return r(new Error(`platform ${e} is unsupported`));let i=kS[e];typeof i=="string"&&(i=kS[i]),i(t).then(n,r)})}_j.exports=Vie});var Sj=x((nPe,wj)=>{"use strict";var Wie=vj(),bj=Ej(),FS={port(t,e){return Wie(t,e).then(n=>FS.pid(n,e),()=>[])},pid(t,e){return bj({pid:t,strict:e})},name(t,e){return bj({name:t,strict:e})}};function Yie(t,e,n){return new Promise((r,i)=>{if(!(t in FS))i(new Error(`do not support find by "${t}"`));else{let o=/^\d+$/.test(e);t==="pid"&&!o?i(new Error("pid must be a number")):t==="port"&&!o?i(new Error("port must be a number")):FS[t](e,n).then(r,i)}})}wj.exports=Yie});var Tj=x((rPe,Cj)=>{"use strict";Cj.exports=Sj()});var i0=x(Se=>{"use strict";var n0=Se&&Se.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},r0=Se&&Se.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Se,"__esModule",{value:!0});Se.getShallowFileSize=Se.getShallowDirectorySizeSync=Se.getShallowDirectorySize=Se.confirmDirExists=Se.unlinkAsync=Se.readdirAsync=Se.readFileAsync=Se.writeFileAsync=Se.appendFileAsync=Se.accessAsync=Se.mkdirAsync=Se.lstatAsync=Se.statAsync=void 0;var ti=require("fs"),z$=require("path"),yo=require("util");Se.statAsync=yo.promisify(ti.stat);Se.lstatAsync=yo.promisify(ti.lstat);Se.mkdirAsync=yo.promisify(ti.mkdir);Se.accessAsync=yo.promisify(ti.access);Se.appendFileAsync=yo.promisify(ti.appendFile);Se.writeFileAsync=yo.promisify(ti.writeFile);Se.readFileAsync=yo.promisify(ti.readFile);Se.readdirAsync=yo.promisify(ti.readdir);Se.unlinkAsync=yo.promisify(ti.unlink);var uce=function(t){return n0(void 0,void 0,void 0,function(){var e,n,r;return r0(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,Se.lstatAsync(t)];case 1:if(e=i.sent(),!e.isDirectory())throw new Error("Path existed but was not a directory");return[3,7];case 2:if(n=i.sent(),!(n&&n.code==="ENOENT"))return[3,6];i.label=3;case 3:return i.trys.push([3,5,,6]),[4,Se.mkdirAsync(t)];case 4:return i.sent(),[3,6];case 5:if(r=i.sent(),r&&r.code!=="EEXIST")throw r;return[3,6];case 6:return[3,7];case 7:return[2]}})})};Se.confirmDirExists=uce;var lce=function(t){return n0(void 0,void 0,void 0,function(){var e,n,r,i,o,s;return r0(this,function(a){switch(a.label){case 0:return[4,Se.readdirAsync(t)];case 1:e=a.sent(),n=0,r=0,i=e,a.label=2;case 2:return r<i.length?(o=i[r],[4,Se.statAsync(z$.join(t,o))]):[3,5];case 3:s=a.sent(),s.isFile()&&(n+=s.size),a.label=4;case 4:return r++,[3,2];case 5:return[2,n]}})})};Se.getShallowDirectorySize=lce;var fce=function(t){for(var e=ti.readdirSync(t),n=0,r=0;r<e.length;r++)n+=ti.statSync(z$.join(t,e[r])).size;return n};Se.getShallowDirectorySizeSync=fce;var pce=function(t){return n0(void 0,void 0,void 0,function(){var e;return r0(this,function(n){switch(n.label){case 0:return[4,Se.statAsync(t)];case 1:return e=n.sent(),e.isFile()?[2,e.size]:[2]}})})};Se.getShallowFileSize=pce});var Y$=x((ja,W$)=>{"use strict";var o0=ja&&ja.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},s0=ja&&ja.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},V$=ja&&ja.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},dce=require("fs"),hce=require("os"),Ua=require("path"),Ci=i0(),mce=function(){function t(){var e=this;this.TAG="Logger",this._cleanupTimeOut=60*30*1e3,this._tempDir="",this._logFileName="",this._fileFullPath="",this._backUpNameFormat="",this._logToFile=!1,this._logToConsole=!0;var n=process.env.APPLICATIONINSIGHTS_LOG_DESTINATION;n=="file+console"&&(this._logToFile=!0),n=="file"&&(this._logToFile=!0,this._logToConsole=!1),this.maxSizeBytes=5e4,this.maxHistory=1,this._logFileName="applicationinsights.log";var r=process.env.APPLICATIONINSIGHTS_LOGDIR;r?Ua.isAbsolute(r)?this._tempDir=r:this._tempDir=Ua.join(process.cwd(),r):this._tempDir=Ua.join(hce.tmpdir(),"appInsights-node"),this._fileFullPath=Ua.join(this._tempDir,this._logFileName),this._backUpNameFormat="."+this._logFileName,this._logToFile&&(t._fileCleanupTimer||(t._fileCleanupTimer=setInterval(function(){e._fileCleanupTask()},this._cleanupTimeOut),t._fileCleanupTimer.unref()))}return t.prototype.info=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=e?V$([e],n):n;this._logToFile&&this._storeToDisk(i),this._logToConsole&&console.info.apply(console,i)},t.prototype.warning=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=e?V$([e],n):n;this._logToFile&&this._storeToDisk(i),this._logToConsole&&console.warn.apply(console,i)},t.getInstance=function(){return t._instance||(t._instance=new t),t._instance},t.prototype._storeToDisk=function(e){return o0(this,void 0,void 0,function(){var n,r,i,o,s,a;return s0(this,function(u){switch(u.label){case 0:n=e+`\r
|
|
`,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Ci.confirmDirExists(this._tempDir)];case 2:return u.sent(),[3,4];case 3:return r=u.sent(),console.log(this.TAG,"Failed to create directory for log file: "+(r&&r.message)),[2];case 4:return u.trys.push([4,6,,11]),[4,Ci.accessAsync(this._fileFullPath,dce.constants.F_OK)];case 5:return u.sent(),[3,11];case 6:i=u.sent(),u.label=7;case 7:return u.trys.push([7,9,,10]),[4,Ci.appendFileAsync(this._fileFullPath,n)];case 8:return u.sent(),[2];case 9:return o=u.sent(),console.log(this.TAG,"Failed to put log into file: "+(i&&i.message)),[2];case 10:return[3,11];case 11:return u.trys.push([11,17,,18]),[4,Ci.getShallowFileSize(this._fileFullPath)];case 12:return s=u.sent(),s>this.maxSizeBytes?[4,this._createBackupFile(n)]:[3,14];case 13:return u.sent(),[3,16];case 14:return[4,Ci.appendFileAsync(this._fileFullPath,n)];case 15:u.sent(),u.label=16;case 16:return[3,18];case 17:return a=u.sent(),console.log(this.TAG,"Failed to create backup file: "+(a&&a.message)),[3,18];case 18:return[2]}})})},t.prototype._createBackupFile=function(e){return o0(this,void 0,void 0,function(){var n,r,i;return s0(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,4,5]),[4,Ci.readFileAsync(this._fileFullPath)];case 1:return n=o.sent(),r=Ua.join(this._tempDir,new Date().getTime()+"."+this._logFileName),[4,Ci.writeFileAsync(r,n)];case 2:return o.sent(),[3,5];case 3:return i=o.sent(),console.log("Failed to generate backup log file",i),[3,5];case 4:return Ci.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}})})},t.prototype._fileCleanupTask=function(){return o0(this,void 0,void 0,function(){var e,n,r,i,o,s=this;return s0(this,function(a){switch(a.label){case 0:return a.trys.push([0,6,,7]),[4,Ci.readdirAsync(this._tempDir)];case 1:e=a.sent(),e=e.filter(function(u){return Ua.basename(u).indexOf(s._backUpNameFormat)>-1}),e.sort(function(u,c){var l=new Date(parseInt(u.split(s._backUpNameFormat)[0])),f=new Date(parseInt(c.split(s._backUpNameFormat)[0]));if(l<f)return-1;if(l>=f)return 1}),n=e.length,r=0,a.label=2;case 2:return r<n-this.maxHistory?(i=Ua.join(this._tempDir,e[r]),[4,Ci.unlinkAsync(i)]):[3,5];case 3:a.sent(),a.label=4;case 4:return r++,[3,2];case 5:return[3,7];case 6:return o=a.sent(),console.log(this.TAG,"Failed to cleanup log files: "+(o&&o.message)),[3,7];case 7:return[2]}})})},t._fileCleanupTimer=null,t}();W$.exports=mce});var tt=x((yke,X$)=>{"use strict";var K$=Y$(),gce="APPLICATION_INSIGHTS_ENABLE_DEBUG_LOGS",vce="APPLICATION_INSIGHTS_DISABLE_WARNING_LOGS",yce=function(){function t(){}return t.info=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.enableDebug&&K$.getInstance().info(this.TAG+e,n)},t.warn=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.disableWarnings||K$.getInstance().warning(this.TAG+e,n)},t.enableDebug=!!process.env[gce],t.disableWarnings=!!process.env[vce],t.TAG="ApplicationInsights:",t}();X$.exports=yce});var iv=x(rv=>{"use strict";Object.defineProperty(rv,"__esModule",{value:!0});rv.JsonConfig=void 0;var xce=require("fs"),nv=require("path"),a0=tt(),_ce="APPLICATIONINSIGHTS_CONFIGURATION_FILE",Ece="APPLICATIONINSIGHTS_CONNECTION_STRING",J$="APPSETTING_",Q$="APPINSIGHTS_INSTRUMENTATIONKEY",Z$="APPINSIGHTS_INSTRUMENTATION_KEY",bce="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",wce="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",Sce="http_proxy",Cce="https_proxy",Tce="APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL",Ice="APPLICATION_INSIGHTS_NO_STATSBEAT",Ace="APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE",Rce="APPLICATION_INSIGHTS_NO_PATCH_MODULES",Pce="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED",Oce="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING",Nce="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE",Dce="APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED",Lce="APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING",kce=function(){function t(){this.connectionString=process.env[Ece],this.instrumentationKey=process.env[Q$]||process.env[J$+Q$]||process.env[Z$]||process.env[J$+Z$],!this.connectionString&&this.instrumentationKey&&a0.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env[wce],this.extendedMetricDisablers=process.env[bce],this.proxyHttpUrl=process.env[Sce],this.proxyHttpsUrl=process.env[Cce],this.noDiagnosticChannel=!!process.env[Tce],this.disableStatsbeat=!!process.env[Ice],this.noHttpAgentKeepAlive=!!process.env[Ace],this.noPatchModules=process.env[Rce]||"",this.enableWebInstrumentation=!!process.env[Pce]||!!process.env[Dce],this.webInstrumentationSrc=process.env[Nce]||"",this.webInstrumentationConnectionString=process.env[Oce]||process.env[Lce]||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return t.getInstance=function(){return t._instance||(t._instance=new t),t._instance},t.prototype._loadJsonFile=function(){var e="",n=process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT;if(n)e=n;else{var r="applicationinsights.json",i=nv.join(__dirname,"../../"),o=nv.join(i,r),s=process.env[_ce];s&&(nv.isAbsolute(s)?o=s:o=nv.join(i,s));try{e=xce.readFileSync(o,"utf8")}catch(u){a0.warn("Failed to read JSON config file: ",u)}}try{var a=JSON.parse(e);a.disableStatsbeat!=null&&(this.disableStatsbeat=a.disableStatsbeat),a.disableAllExtendedMetrics!=null&&(this.disableAllExtendedMetrics=a.disableStatsbeat),a.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=a.noDiagnosticChannel),a.noHttpAgentKeepAlive!=null&&(this.noHttpAgentKeepAlive=a.noHttpAgentKeepAlive),a.connectionString!=null&&(this.connectionString=a.connectionString),a.extendedMetricDisablers!=null&&(this.extendedMetricDisablers=a.extendedMetricDisablers),a.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=a.noDiagnosticChannel),a.proxyHttpUrl!=null&&(this.proxyHttpUrl=a.proxyHttpUrl),a.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=a.proxyHttpsUrl),a.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=a.proxyHttpsUrl),a.noPatchModules!=null&&(this.noPatchModules=a.noPatchModules),a.enableAutoWebSnippetInjection!=null&&(this.enableWebInstrumentation=a.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),a.enableWebInstrumentation!=null&&(this.enableWebInstrumentation=a.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),a.webSnippetConnectionString!=null&&(this.webInstrumentationConnectionString=a.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),a.webInstrumentationConnectionString!=null&&(this.webInstrumentationConnectionString=a.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),a.webInstrumentationConfig!=null&&(this.webInstrumentationConfig=a.webInstrumentationConfig),a.webInstrumentationSrc!=null&&(this.webInstrumentationSrc=a.webInstrumentationSrc),a.enableLoggerErrorToTrace!=null&&(this.enableLoggerErrorToTrace=a.enableLoggerErrorToTrace),this.endpointUrl=a.endpointUrl,this.maxBatchSize=a.maxBatchSize,this.maxBatchIntervalMs=a.maxBatchIntervalMs,this.disableAppInsights=a.disableAppInsights,this.samplingPercentage=a.samplingPercentage,this.correlationIdRetryIntervalMs=a.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=a.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=a.ignoreLegacyHeaders,this.distributedTracingMode=a.distributedTracingMode,this.enableAutoCollectExternalLoggers=a.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=a.enableAutoCollectConsole,this.enableLoggerErrorToTrace=a.enableLoggerErrorToTrace,this.enableAutoCollectExceptions=a.enableAutoCollectExceptions,this.enableAutoCollectPerformance=a.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=a.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=a.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=a.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=a.enableAutoCollectRequests,this.enableAutoCollectDependencies=a.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=a.enableAutoDependencyCorrelation,this.enableAutoCollectIncomingRequestAzureFunctions=a.enableAutoCollectIncomingRequestAzureFunctions,this.enableUseAsyncHooks=a.enableUseAsyncHooks,this.enableUseDiskRetryCaching=a.enableUseDiskRetryCaching,this.enableResendInterval=a.enableResendInterval,this.enableMaxBytesOnDisk=a.enableMaxBytesOnDisk,this.enableInternalDebugLogging=a.enableInternalDebugLogging,this.enableInternalWarningLogging=a.enableInternalWarningLogging,this.enableSendLiveMetrics=a.enableSendLiveMetrics,this.quickPulseHost=a.quickPulseHost}catch(u){a0.warn("Invalid JSON config file: ",u)}},t}();rv.JsonConfig=kce});var c0=x(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.makePatchingRequire=void 0;var Fce=require("path"),Mce=Qm(),e2=dt(),n2=require("module"),qce=Object.keys(process.binding("natives")),t2=n2.prototype.require;function Uce(t){var e={};return function(r){var i=t2.apply(this,arguments);if(t[r]){var o=n2._resolveFilename(r,this);if(e.hasOwnProperty(o))return e[o];var s=void 0;if(qce.indexOf(r)<0)try{s=t2.call(this,Fce.join(r,"package.json")).version}catch{return i}else s=process.version.substring(1);var a=s.indexOf("-");a>=0&&(s=s.substring(0,a));for(var u=i,c=0,l=t[r];c<l.length;c++){var f=l[c];if(Mce.satisfies(s,f.versionSpecifier)&&(u=f.patch(u,o),e2.channel)){var p=f.publisherName||r;e2.channel.addPatchedModule(p,s)}}return e[o]=u}return i}}ov.makePatchingRequire=Uce});var r2=x((Eke,jce)=>{jce.exports={name:"diagnostic-channel",version:"1.1.1",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"eslint ./ --fix",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js",debug:"mocha --inspect-brk ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^7.5.3"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",sinon:"1.17.6",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}});var dt=x(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.channel=Or.ContextPreservingEventEmitter=Or.trueFilter=Or.makePatchingRequire=void 0;var $ce=c0(),Hce=c0();Object.defineProperty(Or,"makePatchingRequire",{enumerable:!0,get:function(){return Hce.makePatchingRequire}});var Bce=function(t){return!0};Or.trueFilter=Bce;var o2=function(){function t(){this.version=r2().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.modulesPatched=[],this.currentlyPublishing=!1}return t.prototype.shouldPublish=function(e){var n=this.subscribers[e];return n?n.some(function(r){var i=r.filter;return!i||i(!1)}):!1},t.prototype.publish=function(e,n){if(!this.currentlyPublishing){var r=this.subscribers[e];if(r){var i={timestamp:Date.now(),data:n};this.currentlyPublishing=!0,r.forEach(function(o){var s=o.listener,a=o.filter;try{a&&a(!0)&&s(i)}catch{}}),this.currentlyPublishing=!1}}},t.prototype.subscribe=function(e,n,r,i){r===void 0&&(r=Or.trueFilter),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:n,filter:r,patchCallback:i});var o=this.checkIfModuleIsAlreadyPatched(e);o&&i&&i(o.name,o.version)},t.prototype.unsubscribe=function(e,n,r){r===void 0&&(r=Or.trueFilter);var i=this.subscribers[e];if(i){for(var o=0;o<i.length;++o)if(i[o].listener===n&&i[o].filter===r)return i.splice(o,1),!0}return!1},t.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(n){return n},Object.getOwnPropertyNames(this.knownPatches).forEach(function(n){return delete e.knownPatches[n]})},t.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},t.prototype.addContextPreservation=function(e){var n=this.contextPreservationFunction;this.contextPreservationFunction=function(r){return e(n(r))}},t.prototype.registerMonkeyPatch=function(e,n){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(n)},t.prototype.getPatchesObject=function(){return this.knownPatches},t.prototype.addPatchedModule=function(e,n){for(var r=0,i=this.modulesPatched;r<i.length;r++){var o=i[r];if(o.name===e)return}this.modulesPatched.push({name:e,version:n});var s=this.subscribers[e];s&&s.forEach(function(a){a.patchCallback&&a.patchCallback(e,n)})},t.prototype.checkIfModuleIsAlreadyPatched=function(e){for(var n=0,r=this.modulesPatched;n<r.length;n++){var i=r[n];if(i.name===e)return i}return null},t}();Or.ContextPreservingEventEmitter=o2;global.diagnosticsSource||(global.diagnosticsSource=new o2,i2=require("module"),i2.prototype.require=$ce.makePatchingRequire(global.diagnosticsSource.getPatchesObject()));var i2;Or.channel=global.diagnosticsSource});var s2,a2=I(()=>{s2=typeof globalThis=="object"?globalThis:global});var c2=I(()=>{a2()});var u2=I(()=>{c2()});var xo,u0=I(()=>{xo="1.7.0"});function Gce(t){var e=new Set([t]),n=new Set,r=t.match(l2);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(u){if(e.has(u))return!0;if(n.has(u))return!1;var c=u.match(l2);if(!c)return o(u);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(u):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(u):o(u):i.minor<=l.minor?s(u):o(u)}}var l2,f2,p2=I(()=>{u0();l2=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;f2=Gce(xo)});function Ti(t,e,n,r){var i;r===void 0&&(r=!1);var o=Cp[Sp]=(i=Cp[Sp])!==null&&i!==void 0?i:{version:xo};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==xo){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+xo);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+xo+"."),!0}function sr(t){var e,n,r=(e=Cp[Sp])===null||e===void 0?void 0:e.version;if(!(!r||!f2(r)))return(n=Cp[Sp])===null||n===void 0?void 0:n[t]}function Ii(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+xo+".");var n=Cp[Sp];n&&delete n[t]}var zce,Sp,Cp,$a=I(()=>{u2();u0();p2();zce=xo.split(".")[0],Sp=Symbol.for("opentelemetry.js.api."+zce),Cp=s2});function Tp(t,e,n){var r=sr("diag");if(r)return n.unshift(e),r[t].apply(r,Wce([],Vce(n),!1))}var Vce,Wce,d2,h2=I(()=>{$a();Vce=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Wce=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},d2=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tp("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tp("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tp("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tp("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Tp("verbose",this._namespace,e)},t}()});var We,sv=I(()=>{(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(We||(We={}))});function m2(t,e){t<We.NONE?t=We.NONE:t>We.ALL&&(t=We.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",We.ERROR),warn:n("warn",We.WARN),info:n("info",We.INFO),debug:n("debug",We.DEBUG),verbose:n("verbose",We.VERBOSE)}}var g2=I(()=>{sv()});var Yce,Kce,Xce,hn,Ha=I(()=>{h2();g2();sv();$a();Yce=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Kce=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Xce="diag",hn=function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=sr("diag");if(a)return a[i].apply(a,Kce([],Yce(o),!1))}}var n=this,r=function(i,o){var s,a,u;if(o===void 0&&(o={logLevel:We.INFO}),i===n){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=c.stack)!==null&&s!==void 0?s:c.message),!1}typeof o=="number"&&(o={logLevel:o});var l=sr("diag"),f=m2((a=o.logLevel)!==null&&a!==void 0?a:We.INFO,i);if(l&&!o.suppressOverrideMessage){var p=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+p),f.warn("Current logger will overwrite one already registered from "+p)}return Ti("diag",f,n,!0)};n.setLogger=r,n.disable=function(){Ii(Xce,n)},n.createComponentLogger=function(i){return new d2(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}()});var Jce,Qce,v2,y2=I(()=>{Jce=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Qce=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},v2=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this._entries.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var n=Jce(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this._entries);try{for(var s=Qce(r),a=s.next();!a.done;a=s.next()){var u=a.value;o._entries.delete(u)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t}()});var x2,_2=I(()=>{x2=Symbol("BaggageEntryMetadata")});function E2(t){return t===void 0&&(t={}),new v2(new Map(Object.entries(t)))}function av(t){return typeof t!="string"&&(Zce.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:x2,toString:function(){return t}}}var Zce,l0=I(()=>{Ha();y2();_2();Zce=hn.instance()});function Ai(t){return Symbol.for(t)}var eue,cv,Ip=I(()=>{eue=function(){function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new t(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new t(n._currentContext);return i._currentContext.delete(r),i}}return t}(),cv=new eue});var f0,b2,w2=I(()=>{f0=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],b2=function(){function t(){function e(r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(console){var s=console[r];if(typeof s!="function"&&(s=console.log),typeof s=="function")return s.apply(console,i)}}}for(var n=0;n<f0.length;n++)this[f0[n].n]=e(f0[n].c)}return t}()});function S2(){return h0}var Hu,tue,p0,nue,rue,iue,d0,oue,sue,aue,h0,cue,uue,lue,fue,pue,due,m0=I(()=>{Hu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tue=function(){function t(){}return t.prototype.createHistogram=function(e,n){return uue},t.prototype.createCounter=function(e,n){return cue},t.prototype.createUpDownCounter=function(e,n){return lue},t.prototype.createObservableGauge=function(e,n){return pue},t.prototype.createObservableCounter=function(e,n){return fue},t.prototype.createObservableUpDownCounter=function(e,n){return due},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t}(),p0=function(){function t(){}return t}(),nue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(p0),rue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(p0),iue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e}(p0),d0=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),oue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(d0),sue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(d0),aue=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(d0),h0=new tue,cue=new nue,uue=new iue,lue=new rue,fue=new oue,pue=new sue,due=new aue});var uv,C2=I(()=>{(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(uv||(uv={}))});var Bu,Gu,g0=I(()=>{Bu={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},Gu={set:function(t,e,n){t!=null&&(t[e]=n)}}});var hue,mue,T2,I2=I(()=>{Ip();hue=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mue=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},T2=function(){function t(){}return t.prototype.active=function(){return cv},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,mue([r],hue(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}()});var gue,vue,v0,yue,ms,Ap=I(()=>{I2();$a();Ha();gue=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},vue=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},v0="context",yue=new T2,ms=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Ti(v0,e,hn.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,vue([e,n,r],gue(o),!1))},t.prototype.bind=function(e,n){return this._getContextManager().bind(e,n)},t.prototype._getContextManager=function(){return sr(v0)||yue},t.prototype.disable=function(){this._getContextManager().disable(),Ii(v0,hn.instance())},t}()});var xt,y0=I(()=>{(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(xt||(xt={}))});var Rp,Pp,gs,lv=I(()=>{y0();Rp="0000000000000000",Pp="00000000000000000000000000000000",gs={traceId:Pp,spanId:Rp,traceFlags:xt.NONE}});var vs,fv=I(()=>{lv();vs=function(){function t(e){e===void 0&&(e=gs),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t}()});function pv(t){return t.getValue(x0)||void 0}function A2(){return pv(ms.getInstance().active())}function Op(t,e){return t.setValue(x0,e)}function R2(t){return t.deleteValue(x0)}function P2(t,e){return Op(t,new vs(e))}function dv(t){var e;return(e=pv(t))===null||e===void 0?void 0:e.spanContext()}var x0,_0=I(()=>{Ip();fv();Ap();x0=Ai("OpenTelemetry Context Key SPAN")});function Ba(t){return xue.test(t)&&t!==Pp}function E0(t){return _ue.test(t)&&t!==Rp}function Nr(t){return Ba(t.traceId)&&E0(t.spanId)}function O2(t){return new vs(t)}var xue,_ue,hv=I(()=>{lv();fv();xue=/^([0-9a-f]{32})$/i,_ue=/^[0-9a-f]{16}$/i});function Eue(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var b0,mv,w0=I(()=>{Ap();_0();fv();hv();b0=ms.getInstance(),mv=function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=b0.active());var i=!!(n!=null&&n.root);if(i)return new vs;var o=r&&dv(r);return Eue(o)&&Nr(o)?new vs(o):new vs},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var u=s??b0.active(),c=this.startSpan(e,o,u),l=Op(u,c);return b0.with(l,a,void 0,c)}},t}()});var bue,gv,S0=I(()=>{w0();bue=new mv,gv=function(){function t(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this._getTracer().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):bue},t}()});var N2,D2=I(()=>{w0();N2=function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new mv},t}()});var wue,Np,C0=I(()=>{S0();D2();wue=new N2,Np=function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new gv(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:wue},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,n,r)},t}()});var $n,L2=I(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($n||($n={}))});var ys,k2=I(()=>{(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(ys||(ys={}))});var Ri,F2=I(()=>{(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Ri||(Ri={}))});function M2(t){return Tue.test(t)}function q2(t){return Iue.test(t)&&!Aue.test(t)}var T0,Sue,Cue,Tue,Iue,Aue,U2=I(()=>{T0="[_0-9a-z-*/]",Sue="[a-z]"+T0+"{0,255}",Cue="[a-z0-9]"+T0+"{0,240}@[a-z]"+T0+"{0,13}",Tue=new RegExp("^(?:"+Sue+"|"+Cue+")$"),Iue=/^[ -~]{0,255}[!-~]$/,Aue=/,|=/});var j2,Rue,$2,H2,B2,G2=I(()=>{U2();j2=32,Rue=512,$2=",",H2="=",B2=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+H2+e.get(r)),n},[]).join($2)},t.prototype._parse=function(e){e.length>Rue||(this._internalState=e.split($2).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(H2);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);M2(s)&&q2(a)&&n.set(s,a)}return n},new Map),this._internalState.size>j2&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,j2))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}()});function z2(t){return new B2(t)}var V2=I(()=>{G2()});var At,W2=I(()=>{Ap();At=ms.getInstance()});var Z,Y2=I(()=>{Ha();Z=hn.instance()});var Pue,K2,X2=I(()=>{m0();Pue=function(){function t(){}return t.prototype.getMeter=function(e,n,r){return h0},t}(),K2=new Pue});var I0,J2,Q2=I(()=>{X2();$a();Ha();I0="metrics",J2=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Ti(I0,e,hn.instance())},t.prototype.getMeterProvider=function(){return sr(I0)||K2},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){Ii(I0,hn.instance())},t}()});var Ga,Z2=I(()=>{Q2();Ga=J2.getInstance()});var eH,tH=I(()=>{eH=function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t}()});function R0(t){return t.getValue(A0)||void 0}function nH(){return R0(ms.getInstance().active())}function rH(t,e){return t.setValue(A0,e)}function iH(t){return t.deleteValue(A0)}var A0,oH=I(()=>{Ap();Ip();A0=Ai("OpenTelemetry Baggage Key")});var P0,Oue,sH,aH=I(()=>{$a();tH();g0();oH();l0();Ha();P0="propagation",Oue=new eH,sH=function(){function t(){this.createBaggage=E2,this.getBaggage=R0,this.getActiveBaggage=nH,this.setBaggage=rH,this.deleteBaggage=iH}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Ti(P0,e,hn.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=Gu),this._getGlobalPropagator().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=Bu),this._getGlobalPropagator().extract(e,n,r)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Ii(P0,hn.instance())},t.prototype._getGlobalPropagator=function(){return sr(P0)||Oue},t}()});var _o,cH=I(()=>{aH();_o=sH.getInstance()});var O0,uH,lH=I(()=>{$a();C0();hv();_0();Ha();O0="trace",uH=function(){function t(){this._proxyTracerProvider=new Np,this.wrapSpanContext=O2,this.isSpanContextValid=Nr,this.deleteSpan=R2,this.getSpan=pv,this.getActiveSpan=A2,this.getSpanContext=dv,this.setSpan=Op,this.setSpanContext=P2}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var n=Ti(O0,this._proxyTracerProvider,hn.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},t.prototype.getTracerProvider=function(){return sr(O0)||this._proxyTracerProvider},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){Ii(O0,hn.instance()),this._proxyTracerProvider=new Np},t}()});var Ue,fH=I(()=>{lH();Ue=uH.getInstance()});var zu={};Nn(zu,{DiagConsoleLogger:()=>b2,DiagLogLevel:()=>We,INVALID_SPANID:()=>Rp,INVALID_SPAN_CONTEXT:()=>gs,INVALID_TRACEID:()=>Pp,ProxyTracer:()=>gv,ProxyTracerProvider:()=>Np,ROOT_CONTEXT:()=>cv,SamplingDecision:()=>$n,SpanKind:()=>ys,SpanStatusCode:()=>Ri,TraceFlags:()=>xt,ValueType:()=>uv,baggageEntryMetadataFromString:()=>av,context:()=>At,createContextKey:()=>Ai,createNoopMeter:()=>S2,createTraceState:()=>z2,default:()=>Nue,defaultTextMapGetter:()=>Bu,defaultTextMapSetter:()=>Gu,diag:()=>Z,isSpanContextValid:()=>Nr,isValidSpanId:()=>E0,isValidTraceId:()=>Ba,metrics:()=>Ga,propagation:()=>_o,trace:()=>Ue});var Nue,_e=I(()=>{l0();Ip();w2();sv();m0();C2();g0();S0();C0();L2();k2();F2();y0();V2();hv();lv();W2();Y2();Z2();cH();fH();Nue={context:At,diag:Z,metrics:Ga,propagation:_o,trace:Ue}});function za(t){return t.setValue(N0,!0)}function Due(t){return t.deleteValue(N0)}function Va(t){return t.getValue(N0)===!0}var N0,Dp=I(()=>{_e();N0=Ai("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var pH,vv,Vu,yv,dH,hH,mH,D0=I(()=>{pH="=",vv=";",Vu=",",yv="baggage",dH=180,hH=4096,mH=8192});var F0={};Nn(F0,{getKeyPairs:()=>k0,parseKeyPairsIntoRecord:()=>kue,parsePairKeyValue:()=>xv,serializeKeyPairs:()=>L0});function L0(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Vu:"")+n;return r.length>mH?e:r},"")}function k0(t){return t.getAllEntries().map(function(e){var n=Lue(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=vv+i.metadata.toString()),o})}function xv(t){var e=t.split(vv);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(pH);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=av(e.join(vv))),{key:i,value:o,metadata:s}}}}}function kue(t){return typeof t!="string"||t.length===0?{}:t.split(Vu).map(function(e){return xv(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,n){return e[n.key]=n.value,e},{})}var Lue,M0=I(()=>{_e();D0();Lue=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}});var q0,gH=I(()=>{_e();Dp();D0();M0();q0=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=_o.getBaggage(e);if(!(!i||Va(e))){var o=k0(i).filter(function(a){return a.length<=hH}).slice(0,dH),s=L0(o);s.length>0&&r.set(n,yv,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,yv),o=Array.isArray(i)?i.join(Vu):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Vu);return a.forEach(function(u){var c=xv(u);if(c){var l={value:c.value};c.metadata&&(l.metadata=c.metadata),s[c.key]=l}}),Object.entries(s).length===0?e:_o.setBaggage(e,_o.createBaggage(s))},t.prototype.fields=function(){return[yv]},t}()});var Fue,vH=I(()=>{Fue=function(){function t(e,n){this._monotonicClock=n,this._epochMillis=e.now(),this._performanceMillis=n.now()}return t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t}()});function Wa(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=yH(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=Mue(o.value,2),a=s[0],u=s[1];if(!xH(a)){Z.warn("Invalid attribute key: "+a);continue}if(!_v(u)){Z.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(u)?r[a]=u.slice():r[a]=u}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function xH(t){return typeof t=="string"&&t.length>0}function _v(t){return t==null?!0:Array.isArray(t)?que(t):_H(t)}function que(t){var e,n,r;try{for(var i=yH(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(_H(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function _H(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var yH,Mue,EH=I(()=>{_e();yH=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mue=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}});function U0(){return function(t){Z.error(Uue(t))}}function Uue(t){return typeof t=="string"?t:JSON.stringify(jue(t))}function jue(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var j0=I(()=>{_e()});function $ue(t){bH=t}function Hn(t){try{bH(t)}catch{}}var bH,$0=I(()=>{j0();bH=U0()});var ar,H0=I(()=>{(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ar||(ar={}))});var wH,SH=I(()=>{wH=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Gue(t){return Bue.indexOf(t)>-1}function Vue(t){return zue.indexOf(t)>-1}function Yue(t){return Wue.indexOf(t)>-1}function Kue(t,e,n){if(!(typeof n[t]>"u")){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Xue(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function Jue(t,e,n,r){r===void 0&&(r=Hue);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}function Zue(t,e,n){var r=n[t];if(typeof r=="string"){var i=Que[r.toUpperCase()];i!=null&&(e[t]=i)}}function Lp(t){var e={};for(var n in Ev){var r=n;switch(r){case"OTEL_LOG_LEVEL":Zue(r,e,t);break;default:if(Gue(r))Kue(r,e,t);else if(Vue(r))Xue(r,e,t);else if(Yue(r))Jue(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}function B0(){return typeof process<"u"&&process&&process.env?Lp(process.env):Lp(wH)}var Hue,Bue,zue,Wue,Wu,Yu,CH,TH,Ev,Que,G0=I(()=>{_e();H0();SH();Hue=",",Bue=["OTEL_SDK_DISABLED"];zue=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];Wue=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];Wu=1/0,Yu=128,CH=128,TH=128,Ev={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:We.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wu,OTEL_ATTRIBUTE_COUNT_LIMIT:Yu,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wu,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Yu,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Wu,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Yu,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:CH,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:TH,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ar.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};Que={ALL:We.ALL,VERBOSE:We.VERBOSE,DEBUG:We.DEBUG,INFO:We.INFO,WARN:We.WARN,ERROR:We.ERROR,NONE:We.NONE}});function Lt(){var t=Lp(process.env);return Object.assign({HOSTNAME:IH.hostname()},Ev,t)}var IH,AH=I(()=>{IH=Y(require("os"));G0()});var ele,RH=I(()=>{ele=typeof globalThis=="object"?globalThis:global});function PH(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function rle(t){var e;t.length===16?e=tle:t.length===32?e=nle:e=Buffer.alloc(t.length/2);for(var n=0,r=0;r<t.length;r+=2){var i=PH(t.charCodeAt(r)),o=PH(t.charCodeAt(r+1));e.writeUInt8(i<<4|o,n++)}return e.toString("base64")}var tle,nle,OH=I(()=>{tle=Buffer.alloc(8),nle=Buffer.alloc(16)});function NH(t){return function(){for(var n=0;n<t/4;n++)bv.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(bv[n]>0);n++)n===t-1&&(bv[t-1]=1);return bv.toString("hex",0,t)}}var ile,DH,ole,bv,LH=I(()=>{ile=8,DH=16,ole=function(){function t(){this.generateTraceId=NH(DH),this.generateSpanId=NH(ile)}return t}(),bv=Buffer.allocUnsafe(DH)});var kH,Eo,FH=I(()=>{kH=require("perf_hooks"),Eo=kH.performance});var z0,V0=I(()=>{z0="1.18.1"});var bo,sle,ale,cle,ule,lle,fle,ple,dle,hle,mle,gle,vle,yle,MH=I(()=>{bo={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"},sle={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"},ale={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"},cle={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"},ule={INSERT:"insert",EDIT:"edit",DELETE:"delete"},lle={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},fle={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"},ple={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"},dle={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"},hle={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"},mle={QUEUE:"queue",TOPIC:"topic"},gle={RECEIVE:"receive",PROCESS:"process"},vle={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},yle={SENT:"SENT",RECEIVED:"RECEIVED"}});var qH=I(()=>{MH()});var we,xle,_le,Ele,ble,wle,W0,UH=I(()=>{we={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},xle={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},_le={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"},Ele={EC2:"ec2",FARGATE:"fargate"},ble={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"},wle={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"},W0={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var jH=I(()=>{UH()});var Y0={};Nn(Y0,{AwsEcsLaunchtypeValues:()=>Ele,CloudPlatformValues:()=>_le,CloudProviderValues:()=>xle,DbCassandraConsistencyLevelValues:()=>ale,DbSystemValues:()=>sle,FaasDocumentOperationValues:()=>ule,FaasInvokedProviderValues:()=>lle,FaasTriggerValues:()=>cle,HostArchValues:()=>ble,HttpFlavorValues:()=>hle,MessageTypeValues:()=>yle,MessagingDestinationKindValues:()=>mle,MessagingOperationValues:()=>gle,NetHostConnectionSubtypeValues:()=>dle,NetHostConnectionTypeValues:()=>ple,NetTransportValues:()=>fle,OsTypeValues:()=>wle,RpcGrpcStatusCodeValues:()=>vle,SemanticAttributes:()=>bo,SemanticResourceAttributes:()=>we,TelemetrySdkLanguageValues:()=>W0});var ni=I(()=>{qH();jH()});var Ku,kp,$H=I(()=>{V0();ni();kp=(Ku={},Ku[we.TELEMETRY_SDK_NAME]="opentelemetry",Ku[we.PROCESS_RUNTIME_NAME]="node",Ku[we.TELEMETRY_SDK_LANGUAGE]=W0.NODEJS,Ku[we.TELEMETRY_SDK_VERSION]=z0,Ku)});function K0(t){t.unref()}var HH=I(()=>{});var BH=I(()=>{AH();RH();OH();LH();FH();$H();HH()});var X0=I(()=>{BH()});function Pi(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*Cle);return[n,r]}function Fp(){var t=Eo.timeOrigin;if(typeof t!="number"){var e=Eo;t=e.timing&&e.timing.fetchStart}return t}function Sv(t){var e=Pi(Fp()),n=Pi(typeof t=="number"?t:Eo.now());return Iv(e,n)}function Tle(t){if(Mp(t))return t;if(typeof t=="number")return t<Fp()?Sv(t):Pi(t);if(t instanceof Date)return Pi(t.getTime());throw TypeError("Invalid input type")}function J0(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=wv),[n,r]}function Ile(t){var e=GH,n=""+"0".repeat(e)+t[1]+"Z",r=n.substr(n.length-e-1),i=new Date(t[0]*1e3).toISOString();return i.replace("000Z",r)}function Ale(t){return t[0]*wv+t[1]}function Rle(t){return t[0]*1e3+t[1]/1e6}function Cv(t){return t[0]*1e6+t[1]/1e3}function Mp(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Tv(t){return Mp(t)||typeof t=="number"||t instanceof Date}function Iv(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=wv&&(n[1]-=wv,n[0]+=1),n}var GH,Sle,Cle,wv,zH=I(()=>{X0();GH=9,Sle=6,Cle=Math.pow(10,Sle),wv=Math.pow(10,GH)});var VH=I(()=>{});var Dr,WH=I(()=>{(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Dr||(Dr={}))});var Ple,Q0,YH=I(()=>{_e();Ple=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Q0=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=Ple(this._propagators),a=s.next();!a.done;a=s.next()){var u=a.value;try{u.inject(e,n,r)}catch(c){Z.warn("Failed to inject with "+u.constructor.name+". Err: "+c.message)}}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){Z.warn("Failed to inject with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}()});function KH(t){return Dle.test(t)}function XH(t){return Lle.test(t)&&!kle.test(t)}var Z0,Ole,Nle,Dle,Lle,kle,JH=I(()=>{Z0="[_0-9a-z-*/]",Ole="[a-z]"+Z0+"{0,255}",Nle="[a-z0-9]"+Z0+"{0,240}@[a-z]"+Z0+"{0,13}",Dle=new RegExp("^(?:"+Ole+"|"+Nle+")$"),Lle=/^[ -~]{0,255}[!-~]$/,kle=/,|=/});var QH,Fle,ZH,eB,eC,tC=I(()=>{JH();QH=32,Fle=512,ZH=",",eB="=",eC=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+eB+e.get(r)),n},[]).join(ZH)},t.prototype._parse=function(e){e.length>Fle||(this._internalState=e.split(ZH).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(eB);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);KH(s)&&XH(a)&&n.set(s,a)}return n},new Map),this._internalState.size>QH&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,QH))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}()});function tB(t){var e=Hle.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Av,Rv,Mle,qle,Ule,jle,$le,Hle,qp,nB=I(()=>{_e();Dp();tC();Av="traceparent",Rv="tracestate",Mle="00",qle="(?!ff)[\\da-f]{2}",Ule="(?![0]{32})[\\da-f]{32}",jle="(?![0]{16})[\\da-f]{16}",$le="[\\da-f]{2}",Hle=new RegExp("^\\s?("+qle+")-("+Ule+")-("+jle+")-("+$le+")(-.*)?\\s?$");qp=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Ue.getSpanContext(e);if(!(!i||Va(e)||!Nr(i))){var o=Mle+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||xt.NONE).toString(16);r.set(n,Av,o),i.traceState&&r.set(n,Rv,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,Av);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=tB(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,Rv);if(a){var u=Array.isArray(a)?a.join(","):a;s.traceState=new eC(typeof u=="string"?u:void 0)}return Ue.setSpanContext(e,s)},t.prototype.fields=function(){return[Av,Rv]},t}()});var rB=I(()=>{});function Ble(t,e){return t.setValue(rC,e)}function Gle(t){return t.deleteValue(rC)}function zle(t){return t.getValue(rC)}var rC,nC,iB=I(()=>{_e();rC=Ai("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(nC||(nC={}))});var Pv,iC=I(()=>{_e();Pv=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:$n.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Up,oC=I(()=>{_e();Up=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:$n.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Vle,oB=I(()=>{_e();$0();iC();oC();Vle=function(){function t(e){var n,r,i,o;this._root=e.root,this._root||(Hn(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Up),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Up,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Pv,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new Up,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Pv}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=Ue.getSpanContext(e);return!a||!Nr(a)?this._root.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&xt.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&xt.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var Wle,sB=I(()=>{_e();Wle=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Ba(n)&&this._accumulate(n)<this._upperBound?$n.RECORD_AND_SAMPLED:$n.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t}()});function efe(t,e){return function(n){return t(e(n))}}function sC(t){if(!tfe(t)||nfe(t)!==Yle)return!1;var e=Zle(t);if(e===null)return!0;var n=uB.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&aB.call(n)===Qle}function tfe(t){return t!=null&&typeof t=="object"}function nfe(t){return t==null?t===void 0?Xle:Kle:Ya&&Ya in Object(t)?rfe(t):ife(t)}function rfe(t){var e=uB.call(t,Ya),n=t[Ya],r=!1;try{t[Ya]=void 0,r=!0}catch{}var i=lB.call(t);return r&&(e?t[Ya]=n:delete t[Ya]),i}function ife(t){return lB.call(t)}var Yle,Kle,Xle,Jle,aB,Qle,Zle,cB,uB,Ya,lB,fB=I(()=>{Yle="[object Object]",Kle="[object Null]",Xle="[object Undefined]",Jle=Function.prototype,aB=Jle.toString,Qle=aB.call(Object),Zle=efe(Object.getPrototypeOf,Object),cB=Object.prototype,uB=cB.hasOwnProperty,Ya=Symbol?Symbol.toStringTag:void 0,lB=cB.toString});function cC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=dB(n,t.shift(),0,r);return n}function aC(t){return Nv(t)?t.slice():t}function dB(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>ofe)){if(n++,Ov(t)||Ov(e)||hB(e))i=aC(e);else if(Nv(t)){if(i=t.slice(),Nv(e))for(var o=0,s=e.length;o<s;o++)i.push(aC(e[o]));else if(jp(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var u=a[o];i[u]=aC(e[u])}}else if(jp(t))if(jp(e)){if(!sfe(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var u=a[o],c=e[u];if(Ov(c))typeof c>"u"?delete i[u]:i[u]=c;else{var l=i[u],f=c;if(pB(t,u,r)||pB(e,u,r))delete i[u];else{if(jp(l)&&jp(f)){var p=r.get(l)||[],d=r.get(f)||[];p.push({obj:t,key:u}),d.push({obj:e,key:u}),r.set(l,p),r.set(f,d)}i[u]=dB(i[u],c,n,r)}}}}else i=e;return i}}function pB(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function Nv(t){return Array.isArray(t)}function hB(t){return typeof t=="function"}function jp(t){return!Ov(t)&&!Nv(t)&&!hB(t)&&typeof t=="object"}function Ov(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function sfe(t,e){return!(!sC(t)||!sC(e))}var ofe,mB=I(()=>{fB();ofe=20});function cfe(t,e){var n,r=new Promise(function(o,s){n=setTimeout(function(){s(new gB("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}var afe,gB,vB=I(()=>{afe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gB=function(t){afe(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error)});function yB(t,e){return typeof e=="string"?t===e:!!t.match(e)}function lfe(t,e){var n,r;if(!e)return!1;try{for(var i=ufe(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(yB(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var ufe,xB=I(()=>{ufe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});function ffe(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var _B=I(()=>{});var EB,bB=I(()=>{EB=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}()});var pfe,dfe,$p,wB=I(()=>{bB();pfe=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},dfe=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$p=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new EB}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,dfe([this._that],pfe(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},t}()});function SB(t,e){return new Promise(function(n){At.with(za(At.active()),function(){t.export(e,function(r){n(r)})})})}var CB=I(()=>{_e();Dp()});var TB={};Nn(TB,{AlwaysOffSampler:()=>Pv,AlwaysOnSampler:()=>Up,AnchoredClock:()=>Fue,BindOnceFuture:()=>$p,CompositePropagator:()=>Q0,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>Yu,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>Wu,DEFAULT_ENVIRONMENT:()=>Ev,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>CH,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>TH,ExportResultCode:()=>Dr,ParentBasedSampler:()=>Vle,RPCType:()=>nC,RandomIdGenerator:()=>ole,SDK_INFO:()=>kp,TRACE_PARENT_HEADER:()=>Av,TRACE_STATE_HEADER:()=>Rv,TimeoutError:()=>gB,TraceIdRatioBasedSampler:()=>Wle,TraceState:()=>eC,TracesSamplerValues:()=>ar,VERSION:()=>z0,W3CBaggagePropagator:()=>q0,W3CTraceContextPropagator:()=>qp,_globalThis:()=>ele,addHrTimes:()=>Iv,baggageUtils:()=>F0,callWithTimeout:()=>cfe,deleteRPCMetadata:()=>Gle,getEnv:()=>Lt,getEnvWithoutDefaults:()=>B0,getRPCMetadata:()=>zle,getTimeOrigin:()=>Fp,globalErrorHandler:()=>Hn,hexToBase64:()=>rle,hrTime:()=>Sv,hrTimeDuration:()=>J0,hrTimeToMicroseconds:()=>Cv,hrTimeToMilliseconds:()=>Rle,hrTimeToNanoseconds:()=>Ale,hrTimeToTimeStamp:()=>Ile,internal:()=>uC,isAttributeKey:()=>xH,isAttributeValue:()=>_v,isTimeInput:()=>Tv,isTimeInputHrTime:()=>Mp,isTracingSuppressed:()=>Va,isUrlIgnored:()=>lfe,isWrapped:()=>ffe,loggingErrorHandler:()=>U0,merge:()=>cC,millisToHrTime:()=>Pi,otperformance:()=>Eo,parseEnvironment:()=>Lp,parseTraceParent:()=>tB,sanitizeAttributes:()=>Wa,setGlobalErrorHandler:()=>$ue,setRPCMetadata:()=>Ble,suppressTracing:()=>za,timeInputToHrTime:()=>Tle,unrefTimer:()=>K0,unsuppressTracing:()=>Due,urlMatches:()=>yB});var uC,mn=I(()=>{gH();vH();EH();$0();j0();zH();VH();WH();M0();X0();YH();nB();rB();iB();iC();oC();oB();sB();Dp();tC();G0();mB();H0();vB();xB();_B();wB();V0();CB();uC={_export:SB}});var IB,AB=I(()=>{IB="exception"});var hfe,mfe,lC,fC=I(()=>{_e();mn();ni();AB();hfe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mfe=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},lC=function(){function t(e,n,r,i,o,s,a,u,c){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ri.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=s,this.kind=o,this.links=a;var l=Date.now();this._performanceStartTime=Eo.now(),this._performanceOffset=l-(this._performanceStartTime+Fp()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(Z.warn("Invalid attribute key: "+e),this):_v(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(Z.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=hfe(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=mfe(o.value,2),a=s[0],u=s[1];this.setAttribute(a,u)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Z.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Z.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Tv(n)&&(Tv(r)||(r=n),n=void 0);var i=Wa(n);return this.events.push({name:e,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=e,this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){Z.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=J0(this.startTime,this.endTime),this._duration[0]<0&&(Z.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Eo.now())return Sv(e+this._performanceOffset);if(typeof e=="number")return Pi(e);if(e instanceof Date)return Pi(e.getTime());if(Mp(e))return e;if(this._startTimeProvided)return Pi(Date.now());var n=Eo.now()-this._performanceStartTime;return Iv(this.startTime,Pi(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[bo.EXCEPTION_MESSAGE]=e:e&&(e.code?r[bo.EXCEPTION_TYPE]=e.code.toString():e.name&&(r[bo.EXCEPTION_TYPE]=e.name),e.message&&(r[bo.EXCEPTION_MESSAGE]=e.message),e.stack&&(r[bo.EXCEPTION_STACKTRACE]=e.stack)),r[bo.EXCEPTION_TYPE]||r[bo.EXCEPTION_MESSAGE]?this.addEvent(IB,r,n):Z.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&Z.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(0,n)},t.prototype._truncateToSize=function(e){var n=this,r=this._attributeValueLengthLimit;return r<=0?(Z.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):e},t}()});var Oi,Hp=I(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Oi||(Oi={}))});var Ka,Dv=I(()=>{Hp();Ka=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Oi.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var wo,Lv=I(()=>{Hp();wo=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Oi.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Bp,pC=I(()=>{_e();mn();Dv();Lv();Bp=function(){function t(e){var n,r,i,o;this._root=e.root,this._root||(Hn(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new wo),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new wo,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Ka,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new wo,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Ka}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=Ue.getSpanContext(e);return!a||!Nr(a)?this._root.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&xt.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&xt.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var kv,dC=I(()=>{_e();Hp();kv=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Ba(n)&&this._accumulate(n)<this._upperBound?Oi.RECORD_AND_SAMPLED:Oi.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t}()});function Fv(){return{sampler:hC(gfe),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:Lt().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Lt().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:Lt().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Lt().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:Lt().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:Lt().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:Lt().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:Lt().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function hC(t){switch(t===void 0&&(t=Lt()),t.OTEL_TRACES_SAMPLER){case ar.AlwaysOn:return new wo;case ar.AlwaysOff:return new Ka;case ar.ParentBasedAlwaysOn:return new Bp({root:new wo});case ar.ParentBasedAlwaysOff:return new Bp({root:new Ka});case ar.TraceIdRatio:return new kv(RB(t));case ar.ParentBasedTraceIdRatio:return new Bp({root:new kv(RB(t))});default:return Z.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+vfe+'".'),new wo}}function RB(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return Z.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Xu+"."),Xu;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(Z.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Xu+"."),Xu):e<0||e>1?(Z.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Xu+"."),Xu):e}var gfe,vfe,Xu,mC=I(()=>{_e();mn();Dv();Lv();pC();dC();gfe=Lt(),vfe=ar.AlwaysOn,Xu=1});function PB(t){var e={sampler:hC()},n=Fv(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function OB(t){var e,n,r,i,o,s,a,u,c,l,f,p,d=Object.assign({},t.spanLimits),h=B0();return d.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:h.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:Yu,d.attributeValueLengthLimit=(p=(f=(l=(u=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&u!==void 0?u:(c=t.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&l!==void 0?l:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:Wu,Object.assign({},t,{spanLimits:d})}var gC=I(()=>{mC();mn()});var NB,DB=I(()=>{_e();mn();NB=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=Lt();this._maxExportBatchSize=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new $p(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Z.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&xt.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Z.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Z.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),s=0,a=o;s<a;s++)i.push(e._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e._exportTimeoutMillis);At.with(za(At.active()),function(){var o=e._finishedSpans.splice(0,e._maxExportBatchSize),s=function(){return e._exporter.export(o,function(u){var c;clearTimeout(i),u.code===Dr.SUCCESS?n():r((c=u.error)!==null&&c!==void 0?c:new Error("BatchSpanProcessor: span export failed"))})},a=o.map(function(u){return u.resource}).filter(function(u){return u.asyncAttributesPending});a.length===0?s():Promise.all(a.map(function(u){var c;return(c=u.waitForAsyncAttributes)===null||c===void 0?void 0:c.call(u)})).then(s,function(u){Hn(u),r(u)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().then(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(r){e._isExporting=!1,Hn(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),K0(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var yfe,vC,LB=I(()=>{DB();yfe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vC=function(t){yfe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(NB)});function kB(t){return function(){for(var n=0;n<t/4;n++)Mv.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(Mv[n]>0);n++)n===t-1&&(Mv[t-1]=1);return Mv.toString("hex",0,t)}}var xfe,FB,yC,Mv,MB=I(()=>{xfe=8,FB=16,yC=function(){function t(){this.generateTraceId=kB(FB),this.generateSpanId=kB(xfe)}return t}(),Mv=Buffer.allocUnsafe(FB)});var qB=I(()=>{LB();MB()});var qv=I(()=>{qB()});var xC,UB=I(()=>{_e();mn();fC();gC();qv();xC=function(){function t(e,n,r){this._tracerProvider=r;var i=PB(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new yC,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=At.active()),n.root&&(r=Ue.deleteSpan(r));var a=Ue.getSpan(r);if(Va(r)){Z.debug("Instrumentation suppressed, returning Noop Span");var u=Ue.wrapSpanContext(gs);return u}var c=a==null?void 0:a.spanContext(),l=this._idGenerator.generateSpanId(),f,p,d;!c||!Ue.isSpanContextValid(c)?f=this._idGenerator.generateTraceId():(f=c.traceId,p=c.traceState,d=c.spanId);var h=(i=n.kind)!==null&&i!==void 0?i:ys.INTERNAL,m=((o=n.links)!==null&&o!==void 0?o:[]).map(function(L){return{context:L.context,attributes:Wa(L.attributes)}}),g=Wa(n.attributes),v=this._sampler.shouldSample(r,f,e,h,g,m);p=(s=v.traceState)!==null&&s!==void 0?s:p;var y=v.decision===$n.RECORD_AND_SAMPLED?xt.SAMPLED:xt.NONE,_={traceId:f,spanId:l,traceFlags:y,traceState:p};if(v.decision===$n.NOT_RECORD){Z.debug("Recording is off, propagating context in a non-recording span");var u=Ue.wrapSpanContext(_);return u}var E=new lC(this,r,e,_,h,d,m,n.startTime),C=Wa(Object.assign(g,v.attributes));return E.setAttributes(C),E},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var u=s??At.active(),c=this.startSpan(e,o,u),l=Ue.setSpan(u,c);return At.with(l,a,void 0,c)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});function jB(){return"unknown_service:"+process.argv0}var $B=I(()=>{});var HB,BB,_C=I(()=>{HB=function(t){switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}},BB=function(t){switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}}});var GB,zB,Ju,Uv=I(()=>{GB=Y(require("child_process")),zB=Y(require("util")),Ju=zB.promisify(GB.exec)});var VB={};Nn(VB,{getMachineId:()=>bfe});function bfe(){return _fe(this,void 0,void 0,function(){var t,e,n,r;return Efe(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Ju('ioreg -rd1 -c "IOPlatformExpertDevice"')];case 1:return t=i.sent(),e=t.stdout.split(`
|
|
`).find(function(o){return o.includes("IOPlatformUUID")}),e?(n=e.split('" = "'),n.length===2?[2,n[1].slice(0,-1)]:[3,3]):[2,""];case 2:return r=i.sent(),Z.debug("error reading machine id: "+r),[3,3];case 3:return[2,""]}})})}var _fe,Efe,WB=I(()=>{Uv();_e();_fe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Efe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}});var KB={};Nn(KB,{getMachineId:()=>Tfe});function Tfe(){return wfe(this,void 0,void 0,function(){var t,e,n,r,i,o,s,a,u;return Sfe(this,function(c){switch(c.label){case 0:t=["/etc/machine-id","/var/lib/dbus/machine-id"],c.label=1;case 1:c.trys.push([1,8,9,10]),e=Cfe(t),n=e.next(),c.label=2;case 2:if(n.done)return[3,7];r=n.value,c.label=3;case 3:return c.trys.push([3,5,,6]),[4,YB.promises.readFile(r,{encoding:"utf8"})];case 4:return i=c.sent(),[2,i.trim()];case 5:return o=c.sent(),Z.debug("error reading machine id: "+o),[3,6];case 6:return n=e.next(),[3,2];case 7:return[3,10];case 8:return s=c.sent(),a={error:s},[3,10];case 9:try{n&&!n.done&&(u=e.return)&&u.call(e)}finally{if(a)throw a.error}return[7];case 10:return[2,""]}})})}var YB,wfe,Sfe,Cfe,XB=I(()=>{YB=require("fs");_e();wfe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Sfe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Cfe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});var QB={};Nn(QB,{getMachineId:()=>Rfe});function Rfe(){return Ife(this,void 0,void 0,function(){var e,t,e,n;return Afe(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,JB.promises.readFile("/etc/hostid",{encoding:"utf8"})];case 1:return e=r.sent(),[2,e.trim()];case 2:return t=r.sent(),Z.debug("error reading machine id: "+t),[3,3];case 3:return r.trys.push([3,5,,6]),[4,Ju("kenv -q smbios.system.uuid")];case 4:return e=r.sent(),[2,e.stdout.trim()];case 5:return n=r.sent(),Z.debug("error reading machine id: "+n),[3,6];case 6:return[2,""]}})})}var JB,Ife,Afe,ZB=I(()=>{JB=require("fs");Uv();_e();Ife=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Afe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}});var eG={};Nn(eG,{getMachineId:()=>Nfe});function Nfe(){return Pfe(this,void 0,void 0,function(){var t,e,n,r,i;return Ofe(this,function(o){switch(o.label){case 0:t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe",jv.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in jv.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Ju(e+" "+t)];case 2:return n=o.sent(),r=n.stdout.split("REG_SZ"),r.length===2?[2,r[1].trim()]:[3,4];case 3:return i=o.sent(),Z.debug("error reading machine id: "+i),[3,4];case 4:return[2,""]}})})}var jv,Pfe,Ofe,tG=I(()=>{jv=Y(require("process"));Uv();_e();Pfe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Ofe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}});var nG={};Nn(nG,{getMachineId:()=>kfe});function kfe(){return Dfe(this,void 0,void 0,function(){return Lfe(this,function(t){return Z.debug("could not read machine-id: unsupported platform"),[2,""]})})}var Dfe,Lfe,rG=I(()=>{_e();Dfe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Lfe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}});var iG,Xa,oG=I(()=>{iG=Y(require("process"));switch(iG.platform){case"darwin":Xa=(WB(),zt(VB)).getMachineId;break;case"linux":Xa=(XB(),zt(KB)).getMachineId;break;case"freebsd":Xa=(ZB(),zt(QB)).getMachineId;break;case"win32":Xa=(tG(),zt(eG)).getMachineId;break;default:Xa=(rG(),zt(nG)).getMachineId}});var $v,Ffe,sG,EC=I(()=>{ni();Qu();$v=require("os");_C();oG();Ffe=function(){function t(){}return t.prototype.detect=function(e){var n,r=(n={},n[we.HOST_NAME]=(0,$v.hostname)(),n[we.HOST_ARCH]=HB((0,$v.arch)()),n);return new In(r,this._getAsyncAttributes())},t.prototype._getAsyncAttributes=function(){return Xa().then(function(e){var n={};return e&&(n[we.HOST_ID]=e),n})},t}(),sG=new Ffe});var Mfe,i$e,aG=I(()=>{EC();Mfe=function(){function t(){}return t.prototype.detect=function(e){return Promise.resolve(sG.detect(e))},t}(),i$e=new Mfe});var Hv,qfe,cG,bC=I(()=>{ni();Qu();Hv=require("os");_C();qfe=function(){function t(){}return t.prototype.detect=function(e){var n,r=(n={},n[we.OS_TYPE]=BB((0,Hv.platform)()),n[we.OS_VERSION]=(0,Hv.release)(),n);return new In(r)},t}(),cG=new qfe});var Ufe,f$e,uG=I(()=>{bC();Ufe=function(){function t(){}return t.prototype.detect=function(e){return Promise.resolve(cG.detect(e))},t}(),f$e=new Ufe});var pG,lG,fG,jfe,dG,wC=I(()=>{_e();ni();Qu();pG=Y(require("os")),lG=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fG=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},jfe=function(){function t(){}return t.prototype.detect=function(e){var n,r=(n={},n[we.PROCESS_PID]=process.pid,n[we.PROCESS_EXECUTABLE_NAME]=process.title,n[we.PROCESS_EXECUTABLE_PATH]=process.execPath,n[we.PROCESS_COMMAND_ARGS]=fG(fG([process.argv[0]],lG(process.execArgv),!1),lG(process.argv.slice(1)),!1),n[we.PROCESS_RUNTIME_VERSION]=process.versions.node,n[we.PROCESS_RUNTIME_NAME]="nodejs",n[we.PROCESS_RUNTIME_DESCRIPTION]="Node.js",n);process.argv.length>1&&(r[we.PROCESS_COMMAND]=process.argv[1]);try{var i=pG.userInfo();r[we.PROCESS_OWNER]=i.username}catch(o){Z.debug("error obtaining process owner: "+o)}return new In(r)},t}(),dG=new jfe});var $fe,y$e,hG=I(()=>{wC();$fe=function(){function t(){}return t.prototype.detect=function(e){return Promise.resolve(dG.detect(e))},t}(),y$e=new $fe});var mG=I(()=>{$B();aG();uG();EC();bC();hG();wC()});var SC=I(()=>{mG()});var xs,Hfe,Bfe,Gfe,In,Qu=I(()=>{_e();ni();mn();SC();xs=function(){return xs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xs.apply(this,arguments)},Hfe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Bfe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Gfe=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},In=function(){function t(e,n){var r=this,i;this._attributes=e,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n==null?void 0:n.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return Z.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[we.SERVICE_NAME]=jB(),e[we.TELEMETRY_SDK_LANGUAGE]=kp[we.TELEMETRY_SDK_LANGUAGE],e[we.TELEMETRY_SDK_NAME]=kp[we.TELEMETRY_SDK_NAME],e[we.TELEMETRY_SDK_VERSION]=kp[we.TELEMETRY_SDK_VERSION],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&Z.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Hfe(this,void 0,void 0,function(){return Bfe(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=xs(xs({},this._syncAttributes),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(s){var a,u=Gfe(s,2),c=u[0],l=u[1];return xs(xs(xs(xs({},n._syncAttributes),c),(a=e._syncAttributes)!==null&&a!==void 0?a:e.attributes),l)});return new t(i,o)},t.EMPTY=new t({}),t}()});var gG=I(()=>{});var vG=I(()=>{});var yG=I(()=>{});var zfe,F$e,xG=I(()=>{Bv();zfe=function(){function t(){}return t.prototype.detect=function(e){return Promise.resolve(_G.detect(e))},t}(),F$e=new zfe});var Vfe,Wfe,Yfe,EG,CC=I(()=>{_e();mn();ni();Qu();Vfe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wfe=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Yfe=function(){function t(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return t.prototype.detect=function(e){var n={},r=Lt(),i=r.OTEL_RESOURCE_ATTRIBUTES,o=r.OTEL_SERVICE_NAME;if(i)try{var s=this._parseResourceAttributes(i);Object.assign(n,s)}catch(a){Z.debug("EnvDetector failed: "+a.message)}return o&&(n[we.SERVICE_NAME]=o),new In(n)},t.prototype._parseResourceAttributes=function(e){var n,r;if(!e)return{};var i={},o=e.split(this._COMMA_SEPARATOR,-1);try{for(var s=Vfe(o),a=s.next();!a.done;a=s.next()){var u=a.value,c=u.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(c.length===2){var l=Wfe(c,2),f=l[0],p=l[1];if(f=f.trim(),p=p.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(f))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(p))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);i[f]=decodeURIComponent(p)}}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)},t.prototype._isBaggageOctetString=function(e){for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<33||r===44||r===59||r===92||r>126)return!1}return!0},t.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},t}(),EG=new Yfe});var Kfe,G$e,bG=I(()=>{CC();Kfe=function(){function t(){}return t.prototype.detect=function(e){return Promise.resolve(EG.detect(e))},t}(),G$e=new Kfe});var TC,Xfe,_G,wG=I(()=>{ni();Bv();_e();TC=function(){return TC=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},TC.apply(this,arguments)},Xfe=function(){function t(){}return t.prototype.detect=function(e){var n,r=typeof navigator<"u";if(!r)return In.empty();var i=(n={},n[we.PROCESS_RUNTIME_NAME]="browser",n[we.PROCESS_RUNTIME_DESCRIPTION]="Web Browser",n[we.PROCESS_RUNTIME_VERSION]=navigator.userAgent,n);return this._getResourceAttributes(i,e)},t.prototype._getResourceAttributes=function(e,n){return e[we.PROCESS_RUNTIME_VERSION]===""?(Z.debug("BrowserDetector failed: Unable to find required browser resources. "),In.empty()):new In(TC({},e))},t}(),_G=new Xfe});var SG=I(()=>{xG();bG();wG();CC()});var CG=I(()=>{});var Bv=I(()=>{Qu();gG();SC();vG();yG();SG();CG()});var Gv,TG,IG=I(()=>{mn();Gv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},TG=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=Gv(this._spanProcessors),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(u){Hn(u||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=Gv(this._spanProcessors),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(u){r={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=Gv(this._spanProcessors),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=Gv(this._spanProcessors),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,u){Promise.all(r).then(function(){a()},u)})},t}()});var IC,AC=I(()=>{IC=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var _s,Jfe,AG=I(()=>{_e();mn();Bv();RC();mC();IG();AC();qv();gC();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(_s||(_s={}));Jfe=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var r=cC({},Fv(),OB(e));this.resource=(n=r.resource)!==null&&n!==void 0?n:In.empty(),this.resource=In.default().merge(this.resource),this._config=Object.assign({},r,{resource:this.resource});var i=this._buildExporterFromEnv();if(i!==void 0){var o=new vC(i);this.activeSpanProcessor=o}else this.activeSpanProcessor=new IC}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this._tracers.has(i)||this._tracers.set(i,new xC({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return Z.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new TG(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),Ue.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&At.setGlobalContextManager(e.contextManager),e.propagator&&_o.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=_s.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==_s.timeout&&(o=_s.resolved,i(o))}).catch(function(a){clearTimeout(s),o=_s.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==_s.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Lt().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e._getPropagator(o);return s||Z.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Q0({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=Lt().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||Z.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new qp}],["baggage",function(){return new q0}]]),t._registeredExporters=new Map,t}()});var Qfe,Zfe,RG=I(()=>{mn();Qfe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zfe=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Cv(e.startTime),duration:Cv(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var r,i;try{for(var o=Qfe(e),s=o.next();!s.done;s=o.next()){var a=s.value;console.dir(this._exportInfo(a),{depth:3})}}catch(u){r={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}if(n)return n({code:Dr.SUCCESS})},t}()});var epe,tpe,npe,PG=I(()=>{mn();epe=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},tpe=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},npe=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var r;if(this._stopped)return n({code:Dr.FAILED,error:new Error("Exporter has been stopped")});(r=this._finishedSpans).push.apply(r,tpe([],epe(e),!1)),setTimeout(function(){return n({code:Dr.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var OG=I(()=>{});var rpe,ipe,ope,NG=I(()=>{_e();mn();rpe=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},ipe=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ope=function(){function t(e){this._exporter=e,this._shutdownOnce=new $p(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return rpe(this,void 0,void 0,function(){return ipe(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,r,i;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&xt.SAMPLED){var o=function(){return uC._export(n._exporter,[e]).then(function(a){var u;a.code!==Dr.SUCCESS&&Hn((u=a.error)!==null&&u!==void 0?u:new Error("SimpleSpanProcessor: span export failed (status "+a+")"))}).catch(function(a){Hn(a)})};if(e.resource.asyncAttributesPending){var s=(i=(r=e.resource).waitForAsyncAttributes)===null||i===void 0?void 0:i.call(r).then(function(){return s!=null&&n._unresolvedExports.delete(s),o()},function(a){return Hn(a)});s!=null&&this._unresolvedExports.add(s)}else o()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var DG=I(()=>{});var LG=I(()=>{});var kG=I(()=>{});var FG=I(()=>{});var MG=I(()=>{});var qG={};Nn(qG,{AlwaysOffSampler:()=>Ka,AlwaysOnSampler:()=>wo,BasicTracerProvider:()=>Jfe,BatchSpanProcessor:()=>vC,ConsoleSpanExporter:()=>Zfe,ForceFlushState:()=>_s,InMemorySpanExporter:()=>npe,NoopSpanProcessor:()=>IC,ParentBasedSampler:()=>Bp,RandomIdGenerator:()=>yC,SamplingDecision:()=>Oi,SimpleSpanProcessor:()=>ope,Span:()=>lC,TraceIdRatioBasedSampler:()=>kv,Tracer:()=>xC});var RC=I(()=>{UB();AG();qv();RG();PG();OG();NG();DG();AC();Dv();Lv();pC();dC();Hp();fC();LG();kG();FG();MG()});function PC(t){t===void 0&&(t=[]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(Array.isArray(i)){var o=PC(i);e=e.concat(o.instrumentations)}else typeof i=="function"?e.push(new i):i.instrumentationName&&e.push(i)}return{instrumentations:e}}function UG(t,e,n){for(var r=0,i=t.length;r<i;r++){var o=t[r];e&&o.setTracerProvider(e),n&&o.setMeterProvider(n),o.getConfig().enabled||o.enable()}}function jG(t){t.forEach(function(e){return e.disable()})}var $G=I(()=>{});function spe(t){var e=PC(t.instrumentations).instrumentations,n=t.tracerProvider||Ue.getTracerProvider(),r=t.meterProvider||Ga.getMeterProvider();return UG(e,n,r),function(){jG(e)}}var HG=I(()=>{_e();$G()});var Zu=x((Z2e,zG)=>{"use strict";function OC(t){return typeof t=="function"}var An=console.error.bind(console);function Gp(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function zp(t){t&&t.logger&&(OC(t.logger)?An=t.logger:An("new logger isn't a function, not replacing"))}function BG(t,e,n){if(!t||!t[e]){An("no original function "+e+" to wrap");return}if(!n){An("no wrapper function"),An(new Error().stack);return}if(!OC(t[e])||!OC(n)){An("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Gp(i,"__original",r),Gp(i,"__unwrap",function(){t[e]===i&&Gp(t,e,r)}),Gp(i,"__wrapped",!0),Gp(t,e,i),i}function ape(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{An("must provide one or more modules to patch"),An(new Error().stack);return}if(!(e&&Array.isArray(e))){An("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){BG(r,i,n)})})}function GG(t,e){if(!t||!t[e]){An("no function to unwrap."),An(new Error().stack);return}if(!t[e].__unwrap)An("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function cpe(t,e){if(t)Array.isArray(t)||(t=[t]);else{An("must provide one or more modules to patch"),An(new Error().stack);return}if(!(e&&Array.isArray(e))){An("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){GG(n,r)})})}zp.wrap=BG;zp.massWrap=ape;zp.unwrap=GG;zp.massUnwrap=cpe;zG.exports=zp});var Es,NC,VG,WG=I(()=>{_e();Es=Y(Zu()),NC=function(){return NC=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},NC.apply(this,arguments)},VG=function(){function t(e,n,r){r===void 0&&(r={}),this.instrumentationName=e,this.instrumentationVersion=n,this._wrap=Es.wrap,this._unwrap=Es.unwrap,this._massWrap=Es.massWrap,this._massUnwrap=Es.massUnwrap,this._config=NC({enabled:!0},r),this._diag=Z.createComponentLogger({namespace:e}),this._tracer=Ue.getTracer(e,n),this._meter=Ga.getMeter(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){e===void 0&&(e={}),this._config=Object.assign({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t}()});var DC=x((nHe,YG)=>{"use strict";var upe=require("os");YG.exports=upe.homedir||function(){var e=process.env.HOME,n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(n?"/Users/"+n:null):process.platform==="linux"?e||(process.getuid()===0?"/root":n?"/home/"+n:null):e||null}});var LC=x((rHe,KG)=>{KG.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(n,r){return r};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var XG=x((iHe,Vp)=>{"use strict";var lpe=process.platform==="win32",fpe=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,kC={};function ppe(t){return fpe.exec(t).slice(1)}kC.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=ppe(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var dpe=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,FC={};function hpe(t){return dpe.exec(t).slice(1)}FC.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=hpe(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};lpe?Vp.exports=kC.parse:Vp.exports=FC.parse;Vp.exports.posix=FC.parse;Vp.exports.win32=kC.parse});var MC=x((oHe,e4)=>{var ZG=require("path"),JG=ZG.parse||XG(),QG=function(e,n){var r="/";/^([A-Za-z]:)/.test(e)?r="":/^\\\\/.test(e)&&(r="\\\\");for(var i=[e],o=JG(e);o.dir!==i[i.length-1];)i.push(o.dir),o=JG(o.dir);return i.reduce(function(s,a){return s.concat(n.map(function(u){return ZG.resolve(r,a,u)}))},[])};e4.exports=function(e,n,r){var i=n&&n.moduleDirectory?[].concat(n.moduleDirectory):["node_modules"];if(n&&typeof n.paths=="function")return n.paths(r,e,function(){return QG(e,i)},n);var o=QG(e,i);return n&&n.paths?o.concat(n.paths):o}});var qC=x((sHe,t4)=>{t4.exports=function(t,e){return e||{}}});var i4=x((aHe,r4)=>{"use strict";var mpe="Function.prototype.bind called on incompatible ",gpe=Object.prototype.toString,vpe=Math.max,ype="[object Function]",n4=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<n.length;o+=1)r[o+e.length]=n[o];return r},xpe=function(e,n){for(var r=[],i=n||0,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},_pe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};r4.exports=function(e){var n=this;if(typeof n!="function"||gpe.apply(n)!==ype)throw new TypeError(mpe+n);for(var r=xpe(arguments,1),i,o=function(){if(this instanceof i){var l=n.apply(this,n4(r,arguments));return Object(l)===l?l:this}return n.apply(e,n4(r,arguments))},s=vpe(0,n.length-r.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(i=Function("binder","return function ("+_pe(a,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i}});var s4=x((cHe,o4)=>{"use strict";var Epe=i4();o4.exports=Function.prototype.bind||Epe});var c4=x((uHe,a4)=>{"use strict";var bpe=Function.prototype.call,wpe=Object.prototype.hasOwnProperty,Spe=s4();a4.exports=Spe.call(bpe,wpe)});var u4=x((lHe,Cpe)=>{Cpe.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Wp=x((fHe,p4)=>{"use strict";var Tpe=c4();function Ipe(t,e){for(var n=t.split("."),r=e.split(" "),i=r.length>1?r[0]:"=",o=(r.length>1?r[1]:r[0]).split("."),s=0;s<3;++s){var a=parseInt(n[s]||0,10),u=parseInt(o[s]||0,10);if(a!==u)return i==="<"?a<u:i===">="?a>=u:!1}return i===">="}function l4(t,e){var n=e.split(/ ?&& ?/);if(n.length===0)return!1;for(var r=0;r<n.length;++r)if(!Ipe(t,n[r]))return!1;return!0}function Ape(t,e){if(typeof e=="boolean")return e;var n=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof n!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var r=0;r<e.length;++r)if(l4(n,e[r]))return!0;return!1}return l4(n,e)}var f4=u4();p4.exports=function(e,n){return Tpe(f4,e)&&Ape(n,f4[e])}});var m4=x((pHe,h4)=>{var Ja=require("fs"),Rpe=DC(),Rt=require("path"),Ppe=LC(),Ope=MC(),Npe=qC(),Dpe=Wp(),Lpe=process.platform!=="win32"&&Ja.realpath&&typeof Ja.realpath.native=="function"?Ja.realpath.native:Ja.realpath,d4=Rpe(),kpe=function(){return[Rt.join(d4,".node_modules"),Rt.join(d4,".node_libraries")]},Fpe=function(e,n){Ja.stat(e,function(r,i){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,i.isFile()||i.isFIFO())})},Mpe=function(e,n){Ja.stat(e,function(r,i){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,i.isDirectory())})},qpe=function(e,n){Lpe(e,function(r,i){r&&r.code!=="ENOENT"?n(r):n(null,r?e:i)})},Yp=function(e,n,r,i){r&&r.preserveSymlinks===!1?e(n,i):i(null,n)},Upe=function(e,n,r){e(n,function(i,o){if(i)r(i);else try{var s=JSON.parse(o);r(null,s)}catch{r(null)}})},jpe=function(e,n,r){for(var i=Ope(n,r,e),o=0;o<i.length;o++)i[o]=Rt.join(i[o],e);return i};h4.exports=function(e,n,r){var i=r,o=n;if(typeof n=="function"&&(i=o,o={}),typeof e!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){i(s)})}o=Npe(e,o);var a=o.isFile||Fpe,u=o.isDirectory||Mpe,c=o.readFile||Ja.readFile,l=o.realpath||qpe,f=o.readPackage||Upe;if(o.readFile&&o.readPackage){var p=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){i(p)})}var d=o.packageIterator,h=o.extensions||[".js"],m=o.includeCoreModules!==!1,g=o.basedir||Rt.dirname(Ppe()),v=o.filename||g;o.paths=o.paths||kpe();var y=Rt.resolve(g);Yp(l,y,o,function(S,b){S?i(S):E(b)});var _;function E(S){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))_=Rt.resolve(S,e),(e==="."||e===".."||e.slice(-1)==="/")&&(_+="/"),/\/$/.test(e)&&_===S?D(_,o.package,C):L(_,o.package,C);else{if(m&&Dpe(e))return i(null,e);N(e,S,function(b,T,A){if(b)i(b);else{if(T)return Yp(l,T,o,function($,j){$?i($):i(null,j,A)});var q=new Error("Cannot find module '"+e+"' from '"+v+"'");q.code="MODULE_NOT_FOUND",i(q)}})}}function C(S,b,T){S?i(S):b?i(null,b,T):D(_,function(A,q,$){if(A)i(A);else if(q)Yp(l,q,o,function(K,se){K?i(K):i(null,se,$)});else{var j=new Error("Cannot find module '"+e+"' from '"+v+"'");j.code="MODULE_NOT_FOUND",i(j)}})}function L(S,b,T){var A=b,q=T;typeof A=="function"&&(q=A,A=void 0);var $=[""].concat(h);j($,S,A);function j(K,se,G){if(K.length===0)return q(null,void 0,G);var fe=se+K[0],ue=G;ue?le(null,ue):R(Rt.dirname(fe),le);function le(nn,ne,Ee){if(ue=ne,nn)return q(nn);if(Ee&&ue&&o.pathFilter){var Oe=Rt.relative(Ee,fe),he=Oe.slice(0,Oe.length-K[0].length),Fe=o.pathFilter(ue,se,he);if(Fe)return j([""].concat(h.slice()),Rt.resolve(Ee,Fe),ue)}a(fe,W)}function W(nn,ne){if(nn)return q(nn);if(ne)return q(null,fe,ue);j(K.slice(1),se,ue)}}}function R(S,b){if(S===""||S==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(S)||/[/\\]node_modules[/\\]*$/.test(S))return b(null);Yp(l,S,o,function(T,A){if(T)return R(Rt.dirname(S),b);var q=Rt.join(A,"package.json");a(q,function($,j){if(!j)return R(Rt.dirname(S),b);f(c,q,function(K,se){K&&b(K);var G=se;G&&o.packageFilter&&(G=o.packageFilter(G,q)),b(null,G,S)})})})}function D(S,b,T){var A=T,q=b;typeof q=="function"&&(A=q,q=o.package),Yp(l,S,o,function($,j){if($)return A($);var K=Rt.join(j,"package.json");a(K,function(se,G){if(se)return A(se);if(!G)return L(Rt.join(S,"index"),q,A);f(c,K,function(fe,ue){if(fe)return A(fe);var le=ue;if(le&&o.packageFilter&&(le=o.packageFilter(le,K)),le&&le.main){if(typeof le.main!="string"){var W=new TypeError("package \u201C"+le.name+"\u201D `main` must be a string");return W.code="INVALID_PACKAGE_MAIN",A(W)}(le.main==="."||le.main==="./")&&(le.main="index"),L(Rt.resolve(S,le.main),le,function(nn,ne,Ee){if(nn)return A(nn);if(ne)return A(null,ne,Ee);if(!Ee)return L(Rt.join(S,"index"),Ee,A);var Oe=Rt.resolve(S,Ee.main);D(Oe,Ee,function(he,Fe,Be){if(he)return A(he);if(Fe)return A(null,Fe,Be);L(Rt.join(S,"index"),Be,A)})});return}L(Rt.join(S,"/index"),le,A)})})})}function O(S,b){if(b.length===0)return S(null,void 0);var T=b[0];u(Rt.dirname(T),A);function A(j,K){if(j)return S(j);if(!K)return O(S,b.slice(1));L(T,o.package,q)}function q(j,K,se){if(j)return S(j);if(K)return S(null,K,se);D(T,o.package,$)}function $(j,K,se){if(j)return S(j);if(K)return S(null,K,se);O(S,b.slice(1))}}function N(S,b,T){var A=function(){return jpe(S,b,o)};O(T,d?d(S,b,A,o):A())}}});var g4=x((dHe,$pe)=>{$pe.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var _4=x((hHe,x4)=>{"use strict";var Hpe=Wp(),v4=g4(),y4={};for(zv in v4)Object.prototype.hasOwnProperty.call(v4,zv)&&(y4[zv]=Hpe(zv));var zv;x4.exports=y4});var b4=x((mHe,E4)=>{var Bpe=Wp();E4.exports=function(e){return Bpe(e)}});var C4=x((gHe,S4)=>{var Gpe=Wp(),Qa=require("fs"),gn=require("path"),zpe=DC(),Vpe=LC(),Wpe=MC(),Ype=qC(),Kpe=process.platform!=="win32"&&Qa.realpathSync&&typeof Qa.realpathSync.native=="function"?Qa.realpathSync.native:Qa.realpathSync,w4=zpe(),Xpe=function(){return[gn.join(w4,".node_modules"),gn.join(w4,".node_libraries")]},Jpe=function(e){try{var n=Qa.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&(n.isFile()||n.isFIFO())},Qpe=function(e){try{var n=Qa.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&n.isDirectory()},Zpe=function(e){try{return Kpe(e)}catch(n){if(n.code!=="ENOENT")throw n}return e},Kp=function(e,n,r){return r&&r.preserveSymlinks===!1?e(n):n},ede=function(e,n){var r=e(n);try{var i=JSON.parse(r);return i}catch{}},tde=function(e,n,r){for(var i=Wpe(n,r,e),o=0;o<i.length;o++)i[o]=gn.join(i[o],e);return i};S4.exports=function(e,n){if(typeof e!="string")throw new TypeError("Path must be a string.");var r=Ype(e,n),i=r.isFile||Jpe,o=r.readFileSync||Qa.readFileSync,s=r.isDirectory||Qpe,a=r.realpathSync||Zpe,u=r.readPackageSync||ede;if(r.readFileSync&&r.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var c=r.packageIterator,l=r.extensions||[".js"],f=r.includeCoreModules!==!1,p=r.basedir||gn.dirname(Vpe()),d=r.filename||p;r.paths=r.paths||Xpe();var h=Kp(a,gn.resolve(p),r);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var m=gn.resolve(h,e);(e==="."||e===".."||e.slice(-1)==="/")&&(m+="/");var g=_(m)||C(m);if(g)return Kp(a,g,r)}else{if(f&&Gpe(e))return e;var v=L(e,h);if(v)return Kp(a,v,r)}var y=new Error("Cannot find module '"+e+"' from '"+d+"'");throw y.code="MODULE_NOT_FOUND",y;function _(R){var D=E(gn.dirname(R));if(D&&D.dir&&D.pkg&&r.pathFilter){var O=gn.relative(D.dir,R),N=r.pathFilter(D.pkg,R,O);N&&(R=gn.resolve(D.dir,N))}if(i(R))return R;for(var S=0;S<l.length;S++){var b=R+l[S];if(i(b))return b}}function E(R){if(!(R===""||R==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(R))&&!/[/\\]node_modules[/\\]*$/.test(R)){var D=gn.join(Kp(a,R,r),"package.json");if(!i(D))return E(gn.dirname(R));var O=u(o,D);return O&&r.packageFilter&&(O=r.packageFilter(O,R)),{pkg:O,dir:R}}}function C(R){var D=gn.join(Kp(a,R,r),"/package.json");if(i(D)){try{var O=u(o,D)}catch{}if(O&&r.packageFilter&&(O=r.packageFilter(O,R)),O&&O.main){if(typeof O.main!="string"){var N=new TypeError("package \u201C"+O.name+"\u201D `main` must be a string");throw N.code="INVALID_PACKAGE_MAIN",N}(O.main==="."||O.main==="./")&&(O.main="index");try{var S=_(gn.resolve(R,O.main));if(S)return S;var b=C(gn.resolve(R,O.main));if(b)return b}catch{}}}return _(gn.join(R,"/index"))}function L(R,D){for(var O=function(){return tde(R,D,r)},N=c?c(R,D,O,r):O(),S=0;S<N.length;S++){var b=N[S];if(s(gn.dirname(b))){var T=_(b);if(T)return T;var A=C(b);if(A)return A}}}}});var I4=x((vHe,T4)=>{var Vv=m4();Vv.core=_4();Vv.isCore=b4();Vv.sync=C4();T4.exports=Vv});var jC=x((yHe,A4)=>{"use strict";var UC=require("path");A4.exports=function(t){var e=t.split(UC.sep),n=e.lastIndexOf("node_modules");if(n!==-1&&e[n+1]){var r=e[n+1][0]==="@",i=r?e[n+1]+"/"+e[n+2]:e[n+1],o=r?3:2;return{name:i,basedir:e.slice(0,n+o).join(UC.sep),path:e.slice(n+o).join(UC.sep)}}}});var R4=x((xHe,nde)=>{nde.exports={name:"require-in-the-middle",version:"7.2.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.1.1","module-details-from-path":"^1.0.3",resolve:"^1.22.1"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var GC=x((_He,BC)=>{"use strict";var el=require("path"),So=require("module"),$C=I4(),Kt=Wi()("require-in-the-middle"),rde=jC();BC.exports=Jp;BC.exports.Hook=Jp;var Xp;if(So.isBuiltin)Xp=So.isBuiltin;else{let[t,e]=process.versions.node.split(".").map(Number);t===8&&e<8?Xp=n=>n==="http2"?!0:!!$C.core[n]:Xp=n=>!!$C.core[n]}var ide=/([/\\]index)?(\.js)?$/,HC=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,n){if(this._localCache.has(e))return!0;if(n)return!1;{let r=require.cache[e];return!!(r&&this._kRitmExports in r)}}get(e,n){let r=this._localCache.get(e);if(r!==void 0)return r;if(!n){let i=require.cache[e];return i&&i[this._kRitmExports]}}set(e,n,r){r?this._localCache.set(e,n):e in require.cache?require.cache[e][this._kRitmExports]=n:(Kt('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,n))}};function Jp(t,e,n){if(!(this instanceof Jp))return new Jp(t,e,n);if(typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),typeof So._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof So._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,R4().bugs.url);return}this._cache=new HC,this._unhooked=!1,this._origRequire=So.prototype.require;let r=this,i=new Set,o=e?e.internals===!0:!1,s=Array.isArray(t);Kt("registering require hook"),this._require=So.prototype.require=function(a){if(r._unhooked===!0)return Kt("ignoring require call - module is soft-unhooked"),r._origRequire.apply(this,arguments);let u=Xp(a),c;if(u){if(c=a,a.startsWith("node:")){let m=a.slice(5);Xp(m)&&(c=m)}}else try{c=So._resolveFilename(a,this)}catch(m){return Kt('Module._resolveFilename("%s") threw %j, calling original Module.require',a,m.message),r._origRequire.apply(this,arguments)}let l,f;if(Kt("processing %s module require('%s'): %s",u===!0?"core":"non-core",a,c),r._cache.has(c,u)===!0)return Kt("returning already patched cached module: %s",c),r._cache.get(c,u);let p=i.has(c);p===!1&&i.add(c);let d=r._origRequire.apply(this,arguments);if(p===!0)return Kt("module is in the process of being patched already - ignoring: %s",c),d;if(i.delete(c),u===!0){if(s===!0&&t.includes(c)===!1)return Kt("ignoring core module not on whitelist: %s",c),d;l=c}else if(s===!0&&t.includes(c)){let m=el.parse(c);l=m.name,f=m.dir}else{let m=rde(c);if(m===void 0)return Kt("could not parse filename: %s",c),d;l=m.name,f=m.basedir;let g=ode(m);if(Kt("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",l,a,g,f),s===!0&&t.includes(l)===!1){if(t.includes(g)===!1)return d;l=g}else{let v;try{v=$C.sync(l,{basedir:f})}catch{return Kt("could not resolve module: %s",l),r._cache.set(c,d,u),d}if(v!==c)if(o===!0)l=l+el.sep+el.relative(f,c),Kt("preparing to process require of internal file: %s",l);else return Kt("ignoring require of non-main module file: %s",v),r._cache.set(c,d,u),d}}r._cache.set(c,d,u),Kt("calling require hook: %s",l);let h=n(d,l,f);return r._cache.set(c,h,u),Kt("returning module: %s",l),h}}Jp.prototype.unhook=function(){this._unhooked=!0,this._require===So.prototype.require?(So.prototype.require=this._origRequire,Kt("unhook successful")):Kt("unhook unsuccessful")};function ode(t){let e=el.sep!=="/"?t.path.split(el.sep).join("/"):t.path;return el.posix.join(t.name,e).replace(ide,"")}});var P4,O4,N4,Qp,D4,L4,k4=I(()=>{P4=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},O4=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},N4=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Qp="/",D4=function(){function t(){this.hooks=[],this.children=new Map}return t}(),L4=function(){function t(){this._trie=new D4,this._counter=0}return t.prototype.insert=function(e){var n,r,i=this._trie;try{for(var o=P4(e.moduleName.split(Qp)),s=o.next();!s.done;s=o.next()){var a=s.value,u=i.children.get(a);u||(u=new D4,i.children.set(a,u)),i=u}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}i.hooks.push({hook:e,insertedId:this._counter++})},t.prototype.search=function(e,n){var r,i,o=n===void 0?{}:n,s=o.maintainInsertionOrder,a=o.fullOnly,u=this._trie,c=[],l=!0;try{for(var f=P4(e.split(Qp)),p=f.next();!p.done;p=f.next()){var d=p.value,h=u.children.get(d);if(!h){l=!1;break}a||c.push.apply(c,N4([],O4(h.hooks),!1)),u=h}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return a&&l&&c.push.apply(c,N4([],O4(u.hooks),!1)),c.length===0?[]:c.length===1?[c[0].hook]:(s&&c.sort(function(m,g){return m.insertedId-g.insertedId}),c.map(function(m){var g=m.hook;return g}))},t}()});function cde(t){return zC.sep!==Qp?t.split(zC.sep).join(Qp):t}var F4,zC,sde,ade,M4,q4=I(()=>{F4=Y(GC()),zC=Y(require("path"));k4();sde=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ade=["afterEach","after","beforeEach","before","describe","it"].every(function(t){return typeof global[t]=="function"}),M4=function(){function t(){this._moduleNameTrie=new L4,this._initialize()}return t.prototype._initialize=function(){var e=this;new F4.Hook(null,{internals:!0},function(n,r,i){var o,s,a=cde(r),u=e._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:i===void 0});try{for(var c=sde(u),l=c.next();!l.done;l=c.next()){var f=l.value.onRequire;n=f(n,r,i)}}catch(p){o={error:p}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}return n})},t.prototype.register=function(e,n){var r={moduleName:e,onRequire:n};return this._moduleNameTrie.insert(r),r},t.getInstance=function(){var e;return ade?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t},t}()});var H4=x(Zp=>{var U4=[],VC=new WeakMap,j4=new Map,$4=[],ude={set(t,e,n){return VC.get(t)[e](n)},defineProperty(t,e,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");return VC.get(t)[e](n.value)}};function lde(t,e,n,r){j4.set(t,r),VC.set(e,n);let i=new Proxy(e,ude);U4.forEach(o=>o(t,i)),$4.push([t,i])}Zp.register=lde;Zp.importHooks=U4;Zp.specifiers=j4;Zp.toHook=$4});var Y4=x((CHe,Yv)=>{var B4=require("path"),fde=jC(),{fileURLToPath:G4}=require("url"),{importHooks:WC,specifiers:pde,toHook:dde}=H4();function V4(t){WC.push(t),dde.forEach(([e,n])=>t(e,n))}function W4(t){let e=WC.indexOf(t);e>-1&&WC.splice(e,1)}function z4(t,e,n,r){let i=t(e,n,r);i&&i!==e&&(e.default=i)}function Wv(t,e,n){if(!(this instanceof Wv))return new Wv(t,e,n);typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let r=e?e.internals===!0:!1;this._iitmHook=(i,o)=>{let s=i,a=i.startsWith("node:"),u;if(a)i=i.replace(/^node:/,"");else{if(i.startsWith("file://"))try{i=G4(i)}catch{}let c=fde(i);c&&(i=c.name,u=c.basedir)}if(t){for(let c of t)if(c===i){if(u){if(r)i=i+B4.sep+B4.relative(u,G4(s));else if(!u.endsWith(pde.get(s)))continue}z4(n,o,i,u)}}else z4(n,o,i,u)},V4(this._iitmHook)}Wv.prototype.unhook=function(){W4(this._iitmHook)};Yv.exports=Wv;Yv.exports.addHook=V4;Yv.exports.removeHook=W4});function K4(t,e,n){return typeof e>"u"?t.includes("*"):t.some(function(r){return(0,X4.satisfies)(e,r,{includePrerelease:n})})}var Kv,YC,X4,td,mde,J4,hde,ed,KC,Q4=I(()=>{Kv=Y(require("path")),YC=require("util"),X4=Y(Qm()),td=Y(Zu());WG();q4();mde=Y(Y4());_e();J4=Y(GC()),hde=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ed=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},KC=function(t){hde(e,t);function e(n,r,i){i===void 0&&(i={});var o=t.call(this,n,r,i)||this;o._hooks=[],o._requireInTheMiddleSingleton=M4.getInstance(),o._enabled=!1,o._wrap=function(a,u,c){if(YC.types.isProxy(a)){var l=(0,td.wrap)(Object.assign({},a),u,c);return Object.defineProperty(a,u,{value:l})}else return(0,td.wrap)(a,u,c)},o._unwrap=function(a,u){return YC.types.isProxy(a)?Object.defineProperty(a,u,{value:a[u]}):(0,td.unwrap)(a,u)},o._massWrap=function(a,u,c){if(a)Array.isArray(a)||(a=[a]);else{Z.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){Z.error("must provide one or more functions to wrap on modules");return}a.forEach(function(l){u.forEach(function(f){o._wrap(l,f,c)})})},o._massUnwrap=function(a,u){if(a)Array.isArray(a)||(a=[a]);else{Z.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){Z.error("must provide one or more functions to wrap on modules");return}a.forEach(function(c){u.forEach(function(l){o._unwrap(c,l)})})};var s=o.init();return s&&!Array.isArray(s)&&(s=[s]),o._modules=s||[],o._modules.length===0&&Z.debug("No modules instrumentation has been defined for "+("'"+o.instrumentationName+"@"+o.instrumentationVersion+"'")+", nothing will be patched"),o._config.enabled&&o.enable(),o}return e.prototype._warnOnPreloadedModules=function(){var n=this;this._modules.forEach(function(r){var i=r.name;try{var o=require.resolve(i);require.cache[o]&&n._diag.warn("Module "+i+" has been loaded before "+n.instrumentationName+" so it might not work, please initialize it before requiring "+i)}catch{}})},e.prototype._extractPackageVersion=function(n){try{var r=require(Kv.join(n,"package.json")).version;return typeof r=="string"?r:void 0}catch{Z.warn("Failed extracting version",n)}},e.prototype._onRequire=function(n,r,i,o){var s=this,a;if(!o)return typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?n.patch(r):r;var u=this._extractPackageVersion(o);if(n.moduleVersion=u,n.name===i)return K4(n.supportedVersions,u,n.includePrerelease)&&typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?n.patch(r,n.moduleVersion):r;var c=(a=n.files)!==null&&a!==void 0?a:[],l=c.filter(function(f){return f.name===i}).filter(function(f){return K4(f.supportedVersions,u,n.includePrerelease)});return l.reduce(function(f,p){return p.moduleExports=f,s._enabled?p.patch(f,n.moduleVersion):f},r)},e.prototype.enable=function(){var n,r,i,o,s,a,u=this;if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){try{for(var c=ed(this._modules),l=c.next();!l.done;l=c.next()){var f=l.value;typeof f.patch=="function"&&f.moduleExports&&f.patch(f.moduleExports,f.moduleVersion);try{for(var p=(i=void 0,ed(f.files)),d=p.next();!d.done;d=p.next()){var h=d.value;h.moduleExports&&h.patch(h.moduleExports,f.moduleVersion)}}catch(E){i={error:E}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}catch(E){n={error:E}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return}this._warnOnPreloadedModules();var m=function(E){var C=function(O,N,S){return u._onRequire(E,O,N,S)},L=function(O,N,S){return u._onRequire(E,O,N,S)},R=Kv.isAbsolute(E.name)?new J4.Hook([E.name],{internals:!0},L):g._requireInTheMiddleSingleton.register(E.name,L);g._hooks.push(R);var D=new mde([E.name],{internals:!1},C);g._hooks.push(D)},g=this;try{for(var v=ed(this._modules),y=v.next();!y.done;y=v.next()){var _=y.value;m(_)}}catch(E){s={error:E}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}},e.prototype.disable=function(){var n,r,i,o;if(this._enabled){this._enabled=!1;try{for(var s=ed(this._modules),a=s.next();!a.done;a=s.next()){var u=a.value;typeof u.unpatch=="function"&&u.moduleExports&&u.unpatch(u.moduleExports,u.moduleVersion);try{for(var c=(i=void 0,ed(u.files)),l=c.next();!l.done;l=c.next()){var f=l.value;f.moduleExports&&f.unpatch(f.moduleExports,u.moduleVersion)}}catch(p){i={error:p}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}}}catch(p){n={error:p}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.isEnabled=function(){return this._enabled},e}(VG)});var XC,Z4=I(()=>{XC=function(){function t(e,n,r,i,o){this.name=e,this.supportedVersions=n,this.patch=r,this.unpatch=i,this.files=o||[]}return t}()});var e3,gde,t3=I(()=>{e3=require("path"),gde=function(){function t(e,n,r,i){this.supportedVersions=n,this.patch=r,this.unpatch=i,this.name=(0,e3.normalize)(e)}return t}()});var n3=I(()=>{});var r3=I(()=>{Q4();Z4();t3();n3()});var i3=I(()=>{r3()});var o3=I(()=>{});var s3=I(()=>{});function xde(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{if(e(r,i),r&&!n)throw r;return i}}function _de(t,e,n){return vde(this,void 0,void 0,function(){var r,i,o;return yde(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,t()];case 1:return i=s.sent(),[3,4];case 2:return o=s.sent(),r=o,[3,4];case 3:if(e(r,i),r&&!n)throw r;return[2,i];case 4:return[2]}})})}function Ede(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var vde,yde,a3=I(()=>{vde=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},yde=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}});var c3={};Nn(c3,{InstrumentationBase:()=>KC,InstrumentationNodeModuleDefinition:()=>XC,InstrumentationNodeModuleFile:()=>gde,isWrapped:()=>Ede,registerInstrumentations:()=>spe,safeExecuteInTheMiddle:()=>xde,safeExecuteInTheMiddleAsync:()=>_de});var JC=I(()=>{HG();i3();o3();s3();a3()});function f3(t,...e){process.stderr.write(`${u3.default.format(t,...e)}${l3.EOL}`)}var u3,l3,p3=I(()=>{u3=Y(require("util")),l3=require("os")});function eT(t){h3=t,QC=[],ZC=[];let e=/\*/g,n=t.split(",").map(r=>r.trim().replace(e,".*?"));for(let r of n)r.startsWith("-")?ZC.push(new RegExp(`^${r.substr(1)}$`)):QC.push(new RegExp(`^${r}$`));for(let r of Xv)r.enabled=tT(r.namespace)}function tT(t){if(t.endsWith("*"))return!0;for(let e of ZC)if(e.test(t))return!1;for(let e of QC)if(e.test(t))return!0;return!1}function bde(){let t=h3||"";return eT(""),t}function g3(t){let e=Object.assign(n,{enabled:tT(t),destroy:wde,log:m3.log,namespace:t,extend:Sde});function n(...r){e.enabled&&(r.length>0&&(r[0]=`${t} ${r[0]}`),e.log(...r))}return Xv.push(e),e}function wde(){let t=Xv.indexOf(this);return t>=0?(Xv.splice(t,1),!0):!1}function Sde(t){let e=g3(`${this.namespace}:${t}`);return e.log=this.log,e}var d3,h3,QC,ZC,Xv,m3,tl,v3=I(()=>{p3();d3=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,QC=[],ZC=[],Xv=[];d3&&eT(d3);m3=Object.assign(t=>g3(t),{enable:eT,enabled:tT,disable:bde,log:f3});tl=m3});function Cde(t){if(t&&!b3(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${iT.join(",")}`);nT=t;let e=[];for(let n of x3)E3(n)&&e.push(n.namespace);tl.enable(e.join(","))}function nl(t){let e=rT.extend(t);return _3(rT,e),{error:Qv(e,"error"),warning:Qv(e,"warning"),info:Qv(e,"info"),verbose:Qv(e,"verbose")}}function _3(t,e){e.log=(...n)=>{t.log(...n)}}function Qv(t,e){let n=Object.assign(t.extend(e),{level:e});if(_3(t,n),E3(n)){let r=tl.disable();tl.enable(r+","+n.namespace)}return x3.add(n),n}function E3(t){return!!(nT&&y3[t.level]<=y3[nT])}function b3(t){return iT.includes(t)}var x3,Jv,nT,rT,iT,y3,Zv=I(()=>{v3();x3=new Set,Jv=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,rT=tl("azure");rT.log=(...t)=>{tl.log(...t)};iT=["verbose","info","warning","error"];Jv&&(b3(Jv)?Cde(Jv):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Jv}'; logging is not enabled. Acceptable values: ${iT.join(", ")}.`));y3={verbose:400,info:300,warning:200,error:100}});var Tde,w3=I(()=>{Zv();Tde=nl("opentelemetry-instrumentation-azure-sdk")});var ey,S3=I(()=>{_e();ey=class{constructor(e){this._span=e}setStatus(e){e.status==="error"?e.error?(this._span.setStatus({code:Ri.ERROR,message:e.error.toString()}),this.recordException(e.error)):this._span.setStatus({code:Ri.ERROR}):e.status==="success"&&this._span.setStatus({code:Ri.OK})}setAttribute(e,n){n!=null&&this._span.setAttribute(e,n)}end(){this._span.end()}recordException(e){this._span.recordException(e)}isRecording(){return this._span.isRecording()}unwrap(){return this._span}}});function sT(t){var e;oT.has(t)||Ide(t);let n=((e=oT.get(t))!==null&&e!==void 0?e:"").toLowerCase();return n!=="false"&&n!=="0"&&!!n}function Ide(t){var e;if(typeof process<"u"&&process.env){let n=(e=process.env[t])!==null&&e!==void 0?e:process.env[t.toLowerCase()];oT.set(t,n)}}var C3,oT,aT=I(()=>{C3="1.0.0-beta.5",oT=new Map});function Ade(t){let e=(t||"internal").toUpperCase();return ys[e]}function Rde(t=[]){return t.reduce((e,n)=>{let r=Ue.getSpanContext(n.tracingContext);return r&&e.push({context:r,attributes:T3(n.attributes)}),e},[])}function T3(t){let e={};for(let n in t)t[n]!==null&&t[n]!==void 0&&(e[n]=t[n]);return e}function I3(t){let{spanAttributes:e,spanLinks:n,spanKind:r}=t||{},i=T3(e),o=Ade(r),s=Rde(n);return{attributes:i,kind:o,links:s}}var A3=I(()=>{_e()});var R3,ty,P3=I(()=>{_e();mn();S3();aT();A3();R3=new qp,ty=class{startSpan(e,n){let r=(n==null?void 0:n.tracingContext)||At.active(),i;return sT("AZURE_TRACING_DISABLED")?i=Ue.wrapSpanContext(gs):(i=Ue.getTracer(n.packageName,n.packageVersion).startSpan(e,I3(n),r),sT("AZURE_HTTP_TRACING_CHILDREN_DISABLED")&&e.toUpperCase().startsWith("HTTP")&&(r=za(r))),{span:new ey(i),tracingContext:Ue.setSpan(r,i)}}withContext(e,n,...r){return At.with(e,n,void 0,...r)}parseTraceparentHeader(e){return R3.extract(At.active(),{traceparent:e},Bu)}createRequestHeaders(e){let n={};return R3.inject(e||At.active(),n,Gu),n}}});function Pde(t={}){return new cT(t)}var cT,O3=I(()=>{JC();P3();aT();cT=class extends KC{constructor(e={}){super("@azure/opentelemetry-instrumentation-azure-sdk",C3,Object.assign({},e))}init(){let e=new XC("@azure/core-tracing",["^1.0.0-preview.14","^1.0.0"],n=>(typeof n.useInstrumenter=="function"&&n.useInstrumenter(new ty),n));return e.includePrerelease=!0,e}}});var N3={};Nn(N3,{createAzureSdkInstrumentation:()=>Pde,logger:()=>Tde});var D3=I(()=>{w3();O3()});var k3=x(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.enable=Lr.azureCoreTracing=Lr.AzureMonitorSymbol=void 0;var uT=dt();Lr.AzureMonitorSymbol="Azure_Monitor_Tracer";var lT="azure-coretracing",L3=!1,Ode=function(t){if(L3)return t;try{var e=(RC(),zt(qG)),n=(_e(),zt(zu)),r=new e.BasicTracerProvider,i=r.getTracer("applicationinsights tracer");if(t.setTracer){var o=t.setTracer;t.setTracer=function(c){var l=c.startSpan;c.startSpan=function(f,p,d){var h=l.call(this,f,p,d),m=h.end;return h.end=function(){var g=m.apply(this,arguments);return uT.channel.publish(lT,h),g},h},c[Lr.AzureMonitorSymbol]=!0,o.call(this,c)},n.trace.getSpan(n.context.active()),t.setTracer(i)}else{var s=n.trace.setGlobalTracerProvider;n.trace.setGlobalTracerProvider=function(c){var l=c.getTracer;return c.getTracer=function(f,p){var d=l.call(this,f,p);if(!d[Lr.AzureMonitorSymbol]){var h=d.startSpan;d.startSpan=function(m,g,v){var y=h.call(this,m,g,v),_=y.end;return y.end=function(){var E=_.apply(this,arguments);return uT.channel.publish(lT,y),E},y},d[Lr.AzureMonitorSymbol]=!0}return d},s.call(this,c)},r.register(),n.trace.getSpan(n.context.active());var a=(JC(),zt(c3)),u=(D3(),zt(N3));a.registerInstrumentations({instrumentations:[u.createAzureSdkInstrumentation()]})}L3=!0}catch{}return t};Lr.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:Ode,publisherName:lT};function Nde(){uT.channel.registerMonkeyPatch("@azure/core-tracing",Lr.azureCoreTracing)}Lr.enable=Nde});var M3=x(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.enable=Za.bunyan=void 0;var F3=dt(),Dde=function(t){var e=t.prototype._emit;return t.prototype._emit=function(n,r){var i=e.apply(this,arguments);if(!r){var o=i;o||(o=e.call(this,n,!0)),F3.channel.publish("bunyan",{level:n.level,result:o})}return i},t};Za.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:Dde};function Lde(){F3.channel.registerMonkeyPatch("bunyan",Za.bunyan)}Za.enable=Lde});var U3=x(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.enable=ec.console=void 0;var fT=dt(),q3=require("stream"),kde=function(t){var e=new q3.Writable,n=new q3.Writable;e.write=function(c){if(!c)return!0;var l=c.toString();return fT.channel.publish("console",{message:l}),!0},n.write=function(c){if(!c)return!0;var l=c.toString();return fT.channel.publish("console",{message:l,stderr:!0}),!0};for(var r=new t.Console(e,n),i=["log","info","warn","error","dir","time","timeEnd","trace","assert"],o=function(c){var l=t[c];l&&(t[c]=function(){if(r[c])try{r[c].apply(r,arguments)}catch{}return l.apply(t,arguments)})},s=0,a=i;s<a.length;s++){var u=a[s];o(u)}return t};ec.console={versionSpecifier:">= 4.0.0",patch:kde};function Fde(){fT.channel.registerMonkeyPatch("console",ec.console),require("console")}ec.enable=Fde});var j3=x(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});tc.enable=tc.mongoCore=void 0;var pT=dt(),Mde=function(t){var e=t.Server.prototype.connect;return t.Server.prototype.connect=function(){var r=e.apply(this,arguments),i=this.s.pool.write;this.s.pool.write=function(){var a=typeof arguments[1]=="function"?1:2;return typeof arguments[a]=="function"&&(arguments[a]=pT.channel.bindToContext(arguments[a])),i.apply(this,arguments)};var o=this.s.pool.logout;return this.s.pool.logout=function(){return typeof arguments[1]=="function"&&(arguments[1]=pT.channel.bindToContext(arguments[1])),o.apply(this,arguments)},r},t};tc.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:Mde};function qde(){pT.channel.registerMonkeyPatch("mongodb-core",tc.mongoCore)}tc.enable=qde});var $3=x(Rn=>{"use strict";var rl=Rn&&Rn.__assign||function(){return rl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},rl.apply(this,arguments)};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.enable=Rn.mongo330=Rn.mongo3=Rn.mongo2=void 0;var vn=dt(),Ude=function(t){var e=t.instrument({operationIdGenerator:{next:function(){return vn.channel.bindToContext(function(r){return r()})}}}),n={};return e.on("started",function(r){n[r.requestId]||(n[r.requestId]=rl(rl({},r),{time:new Date}))}),e.on("succeeded",function(r){var i=n[r.requestId];i&&delete n[r.requestId],typeof r.operationId=="function"?r.operationId(function(){return vn.channel.publish("mongodb",{startedData:i,event:r,succeeded:!0})}):vn.channel.publish("mongodb",{startedData:i,event:r,succeeded:!0})}),e.on("failed",function(r){var i=n[r.requestId];i&&delete n[r.requestId],typeof r.operationId=="function"?r.operationId(function(){return vn.channel.publish("mongodb",{startedData:i,event:r,succeeded:!1})}):vn.channel.publish("mongodb",{startedData:i,event:r,succeeded:!1})}),t},jde=function(t){var e=t.instrument(),n={},r={};return e.on("started",function(i){n[i.requestId]||(r[i.requestId]=vn.channel.bindToContext(function(o){return o()}),n[i.requestId]=rl(rl({},i),{time:new Date}))}),e.on("succeeded",function(i){var o=n[i.requestId];o&&delete n[i.requestId],typeof i=="object"&&typeof r[i.requestId]=="function"&&(r[i.requestId](function(){return vn.channel.publish("mongodb",{startedData:o,event:i,succeeded:!0})}),delete r[i.requestId])}),e.on("failed",function(i){var o=n[i.requestId];o&&delete n[i.requestId],typeof i=="object"&&typeof r[i.requestId]=="function"&&(r[i.requestId](function(){return vn.channel.publish("mongodb",{startedData:o,event:i,succeeded:!1})}),delete r[i.requestId])}),t},$de=function(t){var e=t.Server.prototype.connect;return t.Server.prototype.connect=function(){var r=e.apply(this,arguments),i=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var a=typeof arguments[1]=="function"?1:2;return typeof arguments[a]=="function"&&(arguments[a]=vn.channel.bindToContext(arguments[a])),i.apply(this,arguments)};var o=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return typeof arguments[1]=="function"&&(arguments[1]=vn.channel.bindToContext(arguments[1])),o.apply(this,arguments)},r},t},Hde=function(t){$de(t);var e=t.instrument(),n={},r={};return e.on("started",function(i){n[i.requestId]||(r[i.requestId]=vn.channel.bindToContext(function(o){return o()}),n[i.requestId]=i)}),e.on("succeeded",function(i){var o=n[i.requestId];o&&delete n[i.requestId],typeof i=="object"&&typeof r[i.requestId]=="function"&&(r[i.requestId](function(){return vn.channel.publish("mongodb",{startedData:o,event:i,succeeded:!0})}),delete r[i.requestId])}),e.on("failed",function(i){var o=n[i.requestId];o&&delete n[i.requestId],typeof i=="object"&&typeof r[i.requestId]=="function"&&(r[i.requestId](function(){return vn.channel.publish("mongodb",{startedData:o,event:i,succeeded:!1})}),delete r[i.requestId])}),t};Rn.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:Ude};Rn.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:jde};Rn.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:Hde};function Bde(){vn.channel.registerMonkeyPatch("mongodb",Rn.mongo2),vn.channel.registerMonkeyPatch("mongodb",Rn.mongo3),vn.channel.registerMonkeyPatch("mongodb",Rn.mongo330)}Rn.enable=Bde});var B3=x(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.enable=nc.mysql=void 0;var ny=dt(),H3=require("path"),Gde=function(t,e){var n=function(u,c){return function(l,f){var p=u[l];p&&(u[l]=function(){for(var h=arguments.length-1,m=arguments.length-1;m>=0;--m)if(typeof arguments[m]=="function"){h=m;break}else if(typeof arguments[m]<"u")break;var g=arguments[h],v={result:null,startTime:null,startDate:null};typeof g=="function"&&(f?(v.startTime=process.hrtime(),v.startDate=new Date,arguments[h]=ny.channel.bindToContext(f(v,g))):arguments[h]=ny.channel.bindToContext(g));var y=p.apply(this,arguments);return v.result=y,y})}},r=function(u,c){return n(u.prototype,c+".prototype")},i=["connect","changeUser","ping","statistics","end"],o=require(H3.dirname(e)+"/lib/Connection");i.forEach(function(u){return r(o,"Connection")(u)}),n(o,"Connection")("createQuery",function(u,c){return function(l){var f=process.hrtime(u.startTime),p=f[0]*1e3+f[1]/1e6|0;ny.channel.publish("mysql",{query:u.result,callbackArgs:arguments,err:l,duration:p,time:u.startDate}),c.apply(this,arguments)}});var s=["_enqueueCallback"],a=require(H3.dirname(e)+"/lib/Pool");return s.forEach(function(u){return r(a,"Pool")(u)}),t};nc.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:Gde};function zde(){ny.channel.registerMonkeyPatch("mysql",nc.mysql)}nc.enable=zde});var z3=x(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.enable=rc.postgresPool1=void 0;var G3=dt();function Vde(t){var e=t.prototype.connect;return t.prototype.connect=function(r){return r&&(arguments[0]=G3.channel.bindToContext(r)),e.apply(this,arguments)},t}rc.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:Vde};function Wde(){G3.channel.registerMonkeyPatch("pg-pool",rc.postgresPool1)}rc.enable=Wde});var W3=x(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.enable=Ni.postgres=Ni.postgres6=void 0;var il=dt(),V3=require("events"),dT="postgres";function Yde(t,e){var n=t.Client.prototype.query,r="__diagnosticOriginalFunc";return t.Client.prototype.query=function(o,s,a){var u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},c=process.hrtime(),l;function f(p){p&&p[r]&&(p=p[r]);var d=il.channel.bindToContext(function(h,m){var g=process.hrtime(c);if(u.result=m&&{rowCount:m.rowCount,command:m.command},u.error=h,u.duration=Math.ceil(g[0]*1e3+g[1]/1e6),il.channel.publish(dT,u),h){if(p)return p.apply(this,arguments);l&&l instanceof V3.EventEmitter&&l.emit("error",h)}else p&&p.apply(this,arguments)});try{return Object.defineProperty(d,r,{value:p}),d}catch{return p}}try{typeof o=="string"?s instanceof Array?(u.query.preparable={text:o,args:s},a=f(a)):(u.query.text=o,a?a=f(a):s=f(s)):(typeof o.name=="string"?u.query.plan=o.name:o.values instanceof Array?u.query.preparable={text:o.text,args:o.values}:u.query.text=o.text,a?a=f(a):s?s=f(s):o.callback=f(o.callback))}catch{return n.apply(this,arguments)}return arguments[0]=o,arguments[1]=s,arguments[2]=a,arguments.length=arguments.length>3?arguments.length:3,l=n.apply(this,arguments),l},t}function Kde(t,e){var n=t.Client.prototype.query,r="__diagnosticOriginalFunc";return t.Client.prototype.query=function(o,s,a){var u=this,c,l,f=!!a,p={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d,h=process.hrtime();function m(y){y&&y[r]&&(y=y[r]);var _=il.channel.bindToContext(function(E,C){var L=process.hrtime(h);if(p.result=C&&{rowCount:C.rowCount,command:C.command},p.error=E,p.duration=Math.ceil(L[0]*1e3+L[1]/1e6),il.channel.publish(dT,p),E){if(y)return y.apply(this,arguments);d&&d instanceof V3.EventEmitter&&d.emit("error",E)}else y&&y.apply(this,arguments)});try{return Object.defineProperty(_,r,{value:y}),_}catch{return y}}try{typeof o=="string"?s instanceof Array?(p.query.preparable={text:o,args:s},f=typeof a=="function",a=f?m(a):a):(p.query.text=o,a?(f=typeof a=="function",a=f?m(a):a):(f=typeof s=="function",s=f?m(s):s)):(typeof o.name=="string"?p.query.plan=o.name:o.values instanceof Array?p.query.preparable={text:o.text,args:o.values}:o.cursor?p.query.text=(c=o.cursor)===null||c===void 0?void 0:c.text:p.query.text=o.text,a?(f=typeof a=="function",a=m(a)):s?(f=typeof s=="function",s=f?m(s):s):(f=typeof o.callback=="function",o.callback=f?m(o.callback):o.callback))}catch{return n.apply(this,arguments)}arguments[0]=o,arguments[1]=s,arguments[2]=a,arguments.length=arguments.length>3?arguments.length:3;try{d=n.apply(this,arguments)}catch(y){throw m()(y,void 0),y}if(!f){if(d instanceof Promise)return d.then(function(y){return m()(void 0,y),new u._Promise(function(_,E){_(y)})}).catch(function(y){return m()(y,void 0),new u._Promise(function(_,E){E(y)})});var g=d.text?d.text:"";if(d.cursor&&(g=(l=d.cursor)===null||l===void 0?void 0:l.text),g){var v={command:g,rowCount:0};m()(void 0,v)}}return d},t}Ni.postgres6={versionSpecifier:"6.*",patch:Yde};Ni.postgres={versionSpecifier:">=7.* <=8.*",patch:Kde,publisherName:dT};function Xde(){il.channel.registerMonkeyPatch("pg",Ni.postgres6),il.channel.registerMonkeyPatch("pg",Ni.postgres)}Ni.enable=Xde});var Y3=x(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});ic.enable=ic.redis=void 0;var hT=dt(),Jde=function(t){var e=t.RedisClient.prototype.internal_send_command;return t.RedisClient.prototype.internal_send_command=function(n){if(n){var r=n.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;n.callback=hT.channel.bindToContext(function(a,u){var c=process.hrtime(o),l=c[0]*1e3+c[1]/1e6|0;hT.channel.publish("redis",{duration:l,address:i,commandObj:n,err:a,result:u,time:s}),typeof r=="function"&&r.apply(this,arguments)}),n.callback.pubsubBound=!0}}return e.call(this,n)},t};ic.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:Jde};function Qde(){hT.channel.registerMonkeyPatch("redis",ic.redis)}ic.enable=Qde});var K3=x(Co=>{"use strict";var ry=Co&&Co.__assign||function(){return ry=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ry.apply(this,arguments)};Object.defineProperty(Co,"__esModule",{value:!0});Co.enable=Co.tedious=void 0;var mT=dt(),Zde=function(t){var e=t.Connection.prototype.makeRequest;return t.Connection.prototype.makeRequest=function(){function r(o){var s=process.hrtime(),a={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return mT.channel.bindToContext(function(u,c,l){var f=process.hrtime(s);a=ry(ry({},a),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!u&&{rowCount:c,rows:l},query:{text:this.parametersByName.statement.value},error:u,duration:Math.ceil(f[0]*1e3+f[1]/1e6)}),mT.channel.publish("tedious",a),o.call(this,u,c,l)})}var i=arguments[0];arguments[0].callback=r(i.callback),e.apply(this,arguments)},t};Co.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:Zde};function ehe(){mT.channel.registerMonkeyPatch("tedious",Co.tedious)}Co.enable=ehe});var X3=x(Bn=>{"use strict";var the=Bn&&Bn.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nhe=Bn&&Bn.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.enable=Bn.winston2=Bn.winston3=void 0;var iy=dt(),rhe=function(t){var e=t.Logger.prototype.log,n,r=function(i,o,s){var a;return n===t.config.npm.levels?a="npm":n===t.config.syslog.levels?a="syslog":a="unknown",iy.channel.publish("winston",{level:i,message:o,meta:s,levelKind:a}),o};return t.Logger.prototype.log=function(){return n=this.levels,!this.filters||this.filters.length===0?this.filters=[r]:this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter(function(o){return o!==r}),this.filters.push(r)),e.apply(this,arguments)},t},ihe=function(t){var e=function(s,a){var u;return s.config.npm.levels[a]!=null?u="npm":s.config.syslog.levels[a]!=null?u="syslog":u="unknown",u},n=function(s){the(a,s);function a(u,c){var l=s.call(this,c)||this;return l.winston=u,l}return a.prototype.log=function(u,c){var l=u.message,f=u.level,p=u.meta,d=nhe(u,["message","level","meta"]);f=typeof Symbol.for=="function"?u[Symbol.for("level")]:f,l=u instanceof Error?u:l;var h=e(this.winston,f);p=p||{};for(var m in d)d.hasOwnProperty(m)&&(p[m]=d[m]);iy.channel.publish("winston",{message:l,level:f,levelKind:h,meta:p}),c()},a}(t.Transport);function r(){var s=t.config.npm.levels;arguments&&arguments[0]&&arguments[0].levels&&(s=arguments[0].levels);var a;for(var u in s)s.hasOwnProperty(u)&&(a=a===void 0||s[u]>s[a]?u:a);this.add(new n(t,{level:a}))}var i=t.createLogger;t.createLogger=function(){var a=t.config.npm.levels;arguments&&arguments[0]&&arguments[0].levels&&(a=arguments[0].levels);var u;for(var c in a)a.hasOwnProperty(c)&&(u=u===void 0||a[c]>a[u]?c:u);var l=i.apply(this,arguments);l.add(new n(t,{level:u}));var f=l.configure;return l.configure=function(){f.apply(this,arguments),r.apply(this,arguments)},l};var o=t.configure;return t.configure=function(){o.apply(this,arguments),r.apply(this,arguments)},t.add(new n(t)),t};Bn.winston3={versionSpecifier:"3.x",patch:ihe};Bn.winston2={versionSpecifier:"2.x",patch:rhe};function ohe(){iy.channel.registerMonkeyPatch("winston",Bn.winston2),iy.channel.registerMonkeyPatch("winston",Bn.winston3)}Bn.enable=ohe});var cz=x(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.enable=Ye.tedious=Ye.pgPool=Ye.pg=Ye.winston=Ye.redis=Ye.mysql=Ye.mongodb=Ye.mongodbCore=Ye.console=Ye.bunyan=Ye.azuresdk=void 0;var J3=k3();Ye.azuresdk=J3;var Q3=M3();Ye.bunyan=Q3;var Z3=U3();Ye.console=Z3;var ez=j3();Ye.mongodbCore=ez;var tz=$3();Ye.mongodb=tz;var nz=B3();Ye.mysql=nz;var rz=z3();Ye.pgPool=rz;var iz=W3();Ye.pg=iz;var oz=Y3();Ye.redis=oz;var sz=K3();Ye.tedious=sz;var az=X3();Ye.winston=az;function she(){Q3.enable(),Z3.enable(),ez.enable(),tz.enable(),nz.enable(),iz.enable(),rz.enable(),oz.enable(),az.enable(),J3.enable(),sz.enable()}Ye.enable=she});var ay=x(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.registerContextPreservation=bs.IsInitialized=void 0;var gT=tt(),lz=iv();bs.IsInitialized=!lz.JsonConfig.getInstance().noDiagnosticChannel;var vT="DiagnosticChannel";if(bs.IsInitialized){ri=cz(),uz=lz.JsonConfig.getInstance().noPatchModules,oy=uz.split(","),yT={bunyan:ri.bunyan,console:ri.console,mongodb:ri.mongodb,mongodbCore:ri.mongodbCore,mysql:ri.mysql,redis:ri.redis,pg:ri.pg,pgPool:ri.pgPool,winston:ri.winston,azuresdk:ri.azuresdk};for(sy in yT)oy.indexOf(sy)===-1&&(yT[sy].enable(),gT.info(vT,"Subscribed to "+sy+" events"));oy.length>0&&gT.info(vT,"Some modules will not be patched",oy)}else gT.info(vT,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");var ri,uz,oy,yT,sy;function ahe(t){if(bs.IsInitialized){var e=dt();e.channel.addContextPreservation(t)}}bs.registerContextPreservation=ahe});var ol=x((ABe,fz)=>{"use strict";fz.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}});var Xt=x((ET,pz)=>{"use strict";var Ss=ET&&ET.__assign||function(){return Ss=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ss.apply(this,arguments)},che=require("http"),xT=require("https"),_T=require("url"),ws=require("constants"),oc=tt(),sl=ol(),uhe=iv(),lhe=function(){function t(){t._addCloseHandler()}return t.getCookie=function(e,n){var r="";if(e&&e.length&&typeof n=="string")for(var i=e+"=",o=n.split(";"),s=0;s<o.length;s++){var n=o[s];if(n=t.trim(n),n&&n.indexOf(i)===0){r=n.substring(i.length,o[s].length);break}}return r},t.trim=function(e){return typeof e=="string"?e.replace(/^\s+|\s+$/g,""):""},t.int32ArrayToBase64=function(e){var n=function(a,u){return String.fromCharCode(a>>u&255)},r=function(a){return n(a,24)+n(a,16)+n(a,8)+n(a,0)},i=e.map(r).join(""),o=Buffer.from?Buffer.from(i,"binary"):new Buffer(i,"binary"),s=o.toString("base64");return s.substr(0,s.indexOf("="))},t.random32=function(){return 4294967296*Math.random()|0},t.randomu32=function(){return t.random32()+2147483648},t.w3cTraceId=function(){for(var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r,i=0;i<4;i++)r=t.random32(),n+=e[r&15]+e[r>>4&15]+e[r>>8&15]+e[r>>12&15]+e[r>>16&15]+e[r>>20&15]+e[r>>24&15]+e[r>>28&15];var o=e[8+Math.random()*4|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+o+n.substr(16,3)+n.substr(19,12)},t.w3cSpanId=function(){return t.w3cTraceId().substring(16)},t.isValidW3CId=function(e){return e.length===32&&e!=="00000000000000000000000000000000"},t.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"},t.isError=function(e){return Object.prototype.toString.call(e)==="[object Error]"},t.isPrimitive=function(e){var n=typeof e;return n==="string"||n==="number"||n==="boolean"},t.isDate=function(e){return Object.prototype.toString.call(e)==="[object Date]"},t.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var n=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),r=""+Math.floor(e/(1e3*60))%60,i=""+Math.floor(e/(1e3*60*60))%24,o=Math.floor(e/(1e3*60*60*24));n=n.indexOf(".")<2?"0"+n:n,r=r.length<2?"0"+r:r,i=i.length<2?"0"+i:i;var s=o>0?o+".":"";return s+i+":"+r+":"+n},t.extractError=function(e){var n=e;return{message:e.message,code:n.code||n.id||""}},t.extractObject=function(e){return e instanceof Error?t.extractError(e):typeof e.toJSON=="function"?e.toJSON():e},t.validateStringMap=function(e){if(typeof e!="object"){oc.info("Invalid properties dropped from payload");return}var n={};for(var r in e){var i="",o=e[r],s=typeof o;if(t.isPrimitive(o))i=o.toString();else if(o===null||s==="undefined")i="";else if(s==="function"){oc.info("key: "+r+" was function; will not serialize");continue}else{var a=t.isArray(o)?o:t.extractObject(o);try{t.isPrimitive(a)?i=a:i=JSON.stringify(a)}catch(u){i=o.constructor.name.toString()+" (Error: "+u.message+")",oc.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,t.MAX_PROPERTY_LENGTH)}return n},t.canIncludeCorrelationHeader=function(e,n){var r=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!r||r.length==0||!n)return!0;for(var i=0;i<r.length;i++){var o=new RegExp(r[i].replace(/\./g,".").replace(/\*/g,".*"));try{if(o.test(new _T.URL(n).hostname))return!1}catch{}}return!0},t.getCorrelationContextTarget=function(e,n){var r=e.headers&&e.headers[sl.requestContextHeader];if(r)for(var i=r.split(","),o=0;o<i.length;++o){var s=i[o].split("=");if(s.length==2&&s[0]==n)return s[1]}},t.makeRequest=function(e,n,r,i,o,s){o===void 0&&(o=!0),s===void 0&&(s=!0),n&&n.indexOf("//")===0&&(n="https:"+n);var a=new _T.URL(n),u=Ss(Ss({},r),{host:a.hostname,port:a.port,path:a.pathname}),c=void 0;if(o&&(a.protocol==="https:"&&(c=e.proxyHttpsUrl||void 0),a.protocol==="http:"&&(c=e.proxyHttpUrl||void 0),c)){c.indexOf("//")===0&&(c="http:"+c);try{var l=new _T.URL(c);l.protocol==="https:"?(oc.info("Proxies that use HTTPS are not supported"),c=void 0):u=Ss(Ss({},u),{host:l.hostname,port:l.port||"80",path:n,headers:Ss(Ss({},u.headers),{Host:a.hostname})})}catch{oc.warn("Wrong proxy URL provided")}}var f=a.protocol==="https:"&&!c;return s&&(f&&e.httpsAgent!==void 0?u.agent=e.httpsAgent:!f&&e.httpAgent!==void 0?u.agent=e.httpAgent:f&&(u.agent=t._useKeepAlive?t.keepAliveAgent:t.tlsRestrictedAgent)),f?xT.request(u,i):che.request(u,i)},t.safeIncludeCorrelationHeader=function(e,n,r){var i;if(typeof r=="string")i=r;else if(r instanceof Array)i=r.join(",");else if(r&&typeof r.toString=="function")try{i=r.toString()}catch(o){oc.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",o,r)}i?t.addCorrelationIdHeaderFromString(e,n,i):n.setHeader(sl.requestContextHeader,sl.requestContextSourceKey+"="+e.config.correlationId)},t.dumpObj=function(e){if(e)try{var n=Object.prototype.toString.call(e),r="";return n==="[object Error]"?r="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":r=this.stringify(e),n+r}catch{return e.toString()}},t.stringify=function(e){try{return JSON.stringify(e)}catch(n){oc.warn("Failed to serialize payload",n,e)}},t.addCorrelationIdHeaderFromString=function(e,n,r){var i=r.split(","),o=sl.requestContextSourceKey+"=",s=i.some(function(a){return a.substring(0,o.length)===o});s||n.setHeader(sl.requestContextHeader,r+","+sl.requestContextSourceKey+"="+e.config.correlationId)},t._addCloseHandler=function(){t._listenerAttached||(process.on("exit",function(){t.isNodeExit=!0,t._useKeepAlive=!1}),t._listenerAttached=!0)},t._useKeepAlive=!uhe.JsonConfig.getInstance().noHttpAgentKeepAlive,t._listenerAttached=!1,t.MAX_PROPERTY_LENGTH=8192,t.keepAliveAgent=new xT.Agent({keepAlive:!0,maxSockets:25,secureOptions:ws.SSL_OP_NO_SSLv2|ws.SSL_OP_NO_SSLv3|ws.SSL_OP_NO_TLSv1|ws.SSL_OP_NO_TLSv1_1}),t.tlsRestrictedAgent=new xT.Agent({secureOptions:ws.SSL_OP_NO_SSLv2|ws.SSL_OP_NO_SSLv3|ws.SSL_OP_NO_TLSv1|ws.SSL_OP_NO_TLSv1_1}),t.isNodeExit=!1,t}();pz.exports=lhe});var sc=x((RBe,dz)=>{"use strict";var bT=Xt(),fhe=function(){function t(){}return t.queryCorrelationId=function(e,n){},t.cancelCorrelationIdQuery=function(e,n){},t.generateRequestId=function(e){if(e){e=e[0]=="|"?e:"|"+e,e[e.length-1]!=="."&&(e+=".");var n=(t.currentRootId++).toString(16);return t.appendSuffix(e,n,"_")}else return t.generateRootId()},t.getRootId=function(e){var n=e.indexOf(".");n<0&&(n=e.length);var r=e[0]==="|"?1:0;return e.substring(r,n)},t.generateRootId=function(){return"|"+bT.w3cTraceId()+"."},t.appendSuffix=function(e,n,r){if(e.length+n.length<t.requestIdMaxLength)return e+n+r;var i=t.requestIdMaxLength-9;if(e.length>i)for(;i>1;--i){var o=e[i-1];if(o==="."||o==="_")break}if(i<=1)return t.generateRootId();for(n=bT.randomu32().toString(16);n.length<8;)n="0"+n;return e.substring(0,i)+n+"#"},t.correlationIdPrefix="cid-v1:",t.w3cEnabled=!0,t.HTTP_TIMEOUT=2500,t.requestIdMaxLength=1024,t.currentRootId=bT.randomu32(),t}();dz.exports=fhe});var cy=x((PBe,hz)=>{"use strict";var Jt=Xt(),phe=sc(),dhe=function(){function t(e,n){if(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.version=t.DEFAULT_VERSION,e&&typeof e=="string")if(e.split(",").length>1)this.traceId=Jt.w3cTraceId(),this.spanId=Jt.w3cTraceId().substr(0,16);else{var r=e.trim().split("-"),i=r.length;i>=4?(this.version=r[0],this.traceId=r[1],this.spanId=r[2],this.traceFlag=r[3]):(this.traceId=Jt.w3cTraceId(),this.spanId=Jt.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=t.DEFAULT_VERSION,this.traceId=Jt.w3cTraceId()),this.version==="00"&&i!==4&&(this.traceId=Jt.w3cTraceId(),this.spanId=Jt.w3cTraceId().substr(0,16)),this.version==="ff"&&(this.version=t.DEFAULT_VERSION,this.traceId=Jt.w3cTraceId(),this.spanId=Jt.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=t.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.traceId=Jt.w3cTraceId()),t.isValidTraceId(this.traceId)||(this.traceId=Jt.w3cTraceId()),t.isValidSpanId(this.spanId)||(this.spanId=Jt.w3cTraceId().substr(0,16),this.traceId=Jt.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(n){this.parentId=n.slice();var o=phe.getRootId(n);t.isValidTraceId(o)||(this.legacyRootId=o,o=Jt.w3cTraceId()),n.indexOf("|")!==-1&&(n=n.substring(1+n.substring(0,n.length-1).lastIndexOf("."),n.length-1)),this.traceId=o,this.spanId=n}else this.traceId=Jt.w3cTraceId(),this.spanId=Jt.w3cTraceId().substr(0,16)}return t.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&e!=="00000000000000000000000000000000"},t.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&e!=="0000000000000000"},t.formatOpenTelemetryTraceFlags=function(e){var n="0"+e.toString(16);return n.substring(n.length-2)},t.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},t.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},t.prototype.updateSpanId=function(){this.spanId=Jt.w3cTraceId().substr(0,16)},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t}();hz.exports=dhe});var wT=x((OBe,mz)=>{"use strict";var hhe=function(){function t(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return t.prototype.toString=function(){var e=this.fieldmap;return!e||e.length==0?null:e.join(", ")},t.validateKeyChars=function(e){var n=e.split("@");if(n.length==2){var r=n[0].trim(),i=n[1].trim(),o=!!r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/),s=!!i.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/);return o&&s}else if(n.length==1)return!!e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/);return!1},t.prototype.parseHeader=function(e){var n=[],r={},i=e.split(",");if(i.length>32)return null;for(var o=0,s=i;o<s.length;o++){var a=s[o],u=a.trim();if(u.length!==0){var c=u.split("=");if(c.length!==2||!t.validateKeyChars(c[0])||r[c[0]])return null;r[c[0]]=!0,n.push(u)}}return n},t.strict=!0,t}();mz.exports=hhe});var To=x((NBe,gz)=>{"use strict";var mhe=function(){function t(){}return t}();gz.exports=mhe});var yz=x((ST,vz)=>{"use strict";var ghe=ST&&ST.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vhe=To(),yhe=function(t){ghe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return e}(vhe);vz.exports=yhe});var CT=x((DBe,xz)=>{"use strict";var xhe=function(){function t(){}return t}();xz.exports=xhe});var Ez=x((LBe,_z)=>{"use strict";var _he=function(){function t(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}return t}();_z.exports=_he});var wz=x((TT,bz)=>{"use strict";var Ehe=TT&&TT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bhe=CT(),whe=function(t){Ehe(e,t);function e(){return t.call(this)||this}return e}(bhe);bz.exports=whe});var AT=x((kBe,Sz)=>{"use strict";var IT;(function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"})(IT||(IT={}));Sz.exports=IT});var Tz=x((FBe,Cz)=>{"use strict";var She=AT(),Che=function(){function t(){this.kind=She.Measurement}return t}();Cz.exports=Che});var Az=x((MBe,Iz)=>{"use strict";var The=function(){function t(){this.ver=1,this.sampleRate=100,this.tags={}}return t}();Iz.exports=The});var PT=x((RT,Rz)=>{"use strict";var Ihe=RT&&RT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ahe=To(),Rhe=function(t){Ihe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return e}(Ahe);Rz.exports=Rhe});var Oz=x((OT,Pz)=>{"use strict";var Phe=OT&&OT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ohe=To(),Nhe=function(t){Phe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.exceptions=[],n.properties={},n.measurements={},n}return e}(Ohe);Pz.exports=Nhe});var Dz=x((qBe,Nz)=>{"use strict";var Dhe=function(){function t(){this.hasFullStack=!0,this.parsedStack=[]}return t}();Nz.exports=Dhe});var kz=x((NT,Lz)=>{"use strict";var Lhe=NT&&NT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),khe=To(),Fhe=function(t){Lhe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.properties={},n}return e}(khe);Lz.exports=Fhe});var Mz=x((DT,Fz)=>{"use strict";var Mhe=DT&&DT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qhe=To(),Uhe=function(t){Mhe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.metrics=[],n.properties={},n}return e}(qhe);Fz.exports=Uhe});var Uz=x((LT,qz)=>{"use strict";var jhe=LT&<.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$he=PT(),Hhe=function(t){jhe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return e}($he);qz.exports=Hhe});var $z=x((kT,jz)=>{"use strict";var Bhe=kT&&kT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ghe=To(),zhe=function(t){Bhe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.success=!0,n.properties={},n.measurements={},n}return e}(Ghe);jz.exports=zhe});var Bz=x((FT,Hz)=>{"use strict";var Vhe=FT&&FT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Whe=To(),Yhe=function(t){Vhe(e,t);function e(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return e}(Whe);Hz.exports=Yhe});var zz=x((UBe,Gz)=>{"use strict";var MT;(function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"})(MT||(MT={}));Gz.exports=MT});var Wz=x((jBe,Vz)=>{"use strict";var Khe=function(){function t(){}return t}();Vz.exports=Khe});var qT=x(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.AvailabilityData=yz();Pt.Base=CT();Pt.ContextTagKeys=Ez();Pt.Data=wz();Pt.DataPoint=Tz();Pt.DataPointType=AT();Pt.Domain=To();Pt.Envelope=Az();Pt.EventData=PT();Pt.ExceptionData=Oz();Pt.ExceptionDetails=Dz();Pt.MessageData=kz();Pt.MetricData=Mz();Pt.PageViewData=Uz();Pt.RemoteDependencyData=$z();Pt.RequestData=Bz();Pt.SeverityLevel=zz();Pt.StackFrame=Wz()});var Yz=x(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.domainSupportsProperties=al.RemoteDependencyDataConstants=void 0;var ac=qT(),Xhe=function(){function t(){}return t.TYPE_HTTP="Http",t.TYPE_AI="Http (tracked component)",t}();al.RemoteDependencyDataConstants=Xhe;function Jhe(t){return"properties"in t||t instanceof ac.EventData||t instanceof ac.ExceptionData||t instanceof ac.MessageData||t instanceof ac.MetricData||t instanceof ac.PageViewData||t instanceof ac.RemoteDependencyData||t instanceof ac.RequestData}al.domainSupportsProperties=Jhe});var Xz=x(Kz=>{"use strict";Object.defineProperty(Kz,"__esModule",{value:!0})});var Qz=x(Jz=>{"use strict";Object.defineProperty(Jz,"__esModule",{value:!0})});var eV=x(Zz=>{"use strict";Object.defineProperty(Zz,"__esModule",{value:!0})});var nV=x(tV=>{"use strict";Object.defineProperty(tV,"__esModule",{value:!0})});var iV=x(rV=>{"use strict";Object.defineProperty(rV,"__esModule",{value:!0})});var sV=x(oV=>{"use strict";Object.defineProperty(oV,"__esModule",{value:!0})});var cV=x(aV=>{"use strict";Object.defineProperty(aV,"__esModule",{value:!0})});var lV=x(uV=>{"use strict";Object.defineProperty(uV,"__esModule",{value:!0})});var pV=x(fV=>{"use strict";Object.defineProperty(fV,"__esModule",{value:!0})});var hV=x(dV=>{"use strict";Object.defineProperty(dV,"__esModule",{value:!0})});var gV=x(mV=>{"use strict";Object.defineProperty(mV,"__esModule",{value:!0})});var yV=x(vV=>{"use strict";Object.defineProperty(vV,"__esModule",{value:!0})});var xV=x(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.TelemetryType=ii.TelemetryTypeString=ii.baseTypeToTelemetryType=ii.telemetryTypeToBaseType=void 0;function Qhe(t){switch(t){case Qt.Event:return"EventData";case Qt.Exception:return"ExceptionData";case Qt.Trace:return"MessageData";case Qt.Metric:return"MetricData";case Qt.Request:return"RequestData";case Qt.Dependency:return"RemoteDependencyData";case Qt.Availability:return"AvailabilityData";case Qt.PageView:return"PageViewData"}}ii.telemetryTypeToBaseType=Qhe;function Zhe(t){switch(t){case"EventData":return Qt.Event;case"ExceptionData":return Qt.Exception;case"MessageData":return Qt.Trace;case"MetricData":return Qt.Metric;case"RequestData":return Qt.Request;case"RemoteDependencyData":return Qt.Dependency;case"AvailabilityData":return Qt.Availability;case"PageViewData":return Qt.PageView}}ii.baseTypeToTelemetryType=Zhe;ii.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"};var Qt;(function(t){t[t.Event=0]="Event",t[t.Exception=1]="Exception",t[t.Trace=2]="Trace",t[t.Metric=3]="Metric",t[t.Request=4]="Request",t[t.Dependency=5]="Dependency",t[t.Availability=6]="Availability",t[t.PageView=7]="PageView"})(Qt=ii.TelemetryType||(ii.TelemetryType={}))});var _V=x(kt=>{"use strict";var eme=kt&&kt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),cr=kt&&kt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&eme(e,t,n)};Object.defineProperty(kt,"__esModule",{value:!0});cr(Xz(),kt);cr(Qz(),kt);cr(eV(),kt);cr(nV(),kt);cr(iV(),kt);cr(sV(),kt);cr(cV(),kt);cr(lV(),kt);cr(pV(),kt);cr(hV(),kt);cr(gV(),kt);cr(yV(),kt);cr(xV(),kt)});var bV=x(EV=>{"use strict";Object.defineProperty(EV,"__esModule",{value:!0})});var SV=x(wV=>{"use strict";Object.defineProperty(wV,"__esModule",{value:!0})});var TV=x(CV=>{"use strict";Object.defineProperty(CV,"__esModule",{value:!0})});var AV=x(IV=>{"use strict";Object.defineProperty(IV,"__esModule",{value:!0})});var PV=x(RV=>{"use strict";Object.defineProperty(RV,"__esModule",{value:!0})});var NV=x(OV=>{"use strict";Object.defineProperty(OV,"__esModule",{value:!0})});var LV=x(DV=>{"use strict";Object.defineProperty(DV,"__esModule",{value:!0})});var FV=x(kV=>{"use strict";Object.defineProperty(kV,"__esModule",{value:!0})});var MV=x(Gn=>{"use strict";var tme=Gn&&Gn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Cs=Gn&&Gn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&tme(e,t,n)};Object.defineProperty(Gn,"__esModule",{value:!0});Cs(bV(),Gn);Cs(SV(),Gn);Cs(TV(),Gn);Cs(AV(),Gn);Cs(PV(),Gn);Cs(NV(),Gn);Cs(LV(),Gn);Cs(FV(),Gn)});var yn=x(Di=>{"use strict";var nme=Di&&Di.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),uy=Di&&Di.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&nme(e,t,n)};Object.defineProperty(Di,"__esModule",{value:!0});uy(Yz(),Di);uy(qT(),Di);uy(_V(),Di);uy(MV(),Di)});var UT=x((dGe,qV)=>{"use strict";var rme=function(){function t(){}return t.prototype.getUrl=function(){return this.url},t.prototype.RequestParser=function(){this.startTime=+new Date},t.prototype._setStatus=function(e,n){var r=+new Date;this.duration=r-this.startTime,this.statusCode=e;var i=this.properties||{};if(n){if(typeof n=="string")i.error=n;else if(n instanceof Error)i.error=n.message;else if(typeof n=="object")for(var o in n)i[o]=n[o]&&n[o].toString&&n[o].toString()}this.properties=i},t.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},t}();qV.exports=rme});var at=x(z=>{"use strict";var oi;Object.defineProperty(z,"__esModule",{value:!0});z.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=z.WEB_INSTRUMENTATION_DEFAULT_SOURCE=z.TIME_SINCE_ENQUEUED=z.ENQUEUED_TIME=z.MessageBusDestination=z.MicrosoftEventHub=z.AzNamespace=z.HttpRequestCookieNames=z.StatsbeatNetworkCategory=z.StatsbeatFeatureType=z.StatsbeatInstrumentation=z.StatsbeatFeature=z.StatsbeatCounter=z.StatsbeatAttach=z.StatsbeatResourceProvider=z.StatsbeatTelemetryName=z.HeartBeatMetricName=z.DependencyTypeName=z.TelemetryTypeStringToQuickPulseDocumentType=z.TelemetryTypeStringToQuickPulseType=z.QuickPulseType=z.QuickPulseDocumentType=z.PerformanceToQuickPulseCounter=z.MetricId=z.PerformanceCounter=z.QuickPulseCounter=z.DEFAULT_LIVEMETRICS_HOST=z.DEFAULT_LIVEMETRICS_ENDPOINT=z.DEFAULT_BREEZE_ENDPOINT=z.APPLICATION_INSIGHTS_SDK_VERSION=void 0;z.APPLICATION_INSIGHTS_SDK_VERSION="2.9.1";z.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com";z.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com";z.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com";var xn;(function(t){t.COMMITTED_BYTES="\\Memory\\Committed Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",t.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",t.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",t.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",t.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",t.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",t.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"})(xn=z.QuickPulseCounter||(z.QuickPulseCounter={}));var ly;(function(t){t.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",t.AVAILABLE_BYTES="\\Memory\\Available Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",t.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",t.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"})(ly=z.PerformanceCounter||(z.PerformanceCounter={}));var ime;(function(t){t.REQUESTS_DURATION="requests/duration",t.DEPENDENCIES_DURATION="dependencies/duration",t.EXCEPTIONS_COUNT="exceptions/count",t.TRACES_COUNT="traces/count"})(ime=z.MetricId||(z.MetricId={}));z.PerformanceToQuickPulseCounter=(oi={},oi[ly.PROCESSOR_TIME]=xn.PROCESSOR_TIME,oi[ly.REQUEST_RATE]=xn.REQUEST_RATE,oi[ly.REQUEST_DURATION]=xn.REQUEST_DURATION,oi[xn.COMMITTED_BYTES]=xn.COMMITTED_BYTES,oi[xn.REQUEST_FAILURE_RATE]=xn.REQUEST_FAILURE_RATE,oi[xn.DEPENDENCY_RATE]=xn.DEPENDENCY_RATE,oi[xn.DEPENDENCY_FAILURE_RATE]=xn.DEPENDENCY_FAILURE_RATE,oi[xn.DEPENDENCY_DURATION]=xn.DEPENDENCY_DURATION,oi[xn.EXCEPTION_RATE]=xn.EXCEPTION_RATE,oi);z.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"};z.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"};z.TelemetryTypeStringToQuickPulseType={EventData:z.QuickPulseType.Event,ExceptionData:z.QuickPulseType.Exception,MessageData:z.QuickPulseType.Trace,MetricData:z.QuickPulseType.Metric,RequestData:z.QuickPulseType.Request,RemoteDependencyData:z.QuickPulseType.Dependency,AvailabilityData:z.QuickPulseType.Availability,PageViewData:z.QuickPulseType.PageView};z.TelemetryTypeStringToQuickPulseDocumentType={EventData:z.QuickPulseDocumentType.Event,ExceptionData:z.QuickPulseDocumentType.Exception,MessageData:z.QuickPulseDocumentType.Trace,MetricData:z.QuickPulseDocumentType.Metric,RequestData:z.QuickPulseDocumentType.Request,RemoteDependencyData:z.QuickPulseDocumentType.Dependency,AvailabilityData:z.QuickPulseDocumentType.Availability,PageViewData:z.QuickPulseDocumentType.PageView};z.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"};z.HeartBeatMetricName="HeartbeatState";z.StatsbeatTelemetryName="Statsbeat";z.StatsbeatResourceProvider={appsvc:"appsvc",aks:"aks",functions:"functions",vm:"vm",unknown:"unknown"};z.StatsbeatAttach={codeless:"codeless",sdk:"sdk"};z.StatsbeatCounter={REQUEST_SUCCESS:"Request Success Count",REQUEST_FAILURE:"Request Failure Count",REQUEST_DURATION:"Request Duration",RETRY_COUNT:"Retry Count",THROTTLE_COUNT:"Throttle Count",EXCEPTION_COUNT:"Exception Count",ATTACH:"Attach",FEATURE:"Feature"};var ome;(function(t){t[t.NONE=0]="NONE",t[t.DISK_RETRY=1]="DISK_RETRY",t[t.AAD_HANDLING=2]="AAD_HANDLING",t[t.WEB_SNIPPET=4]="WEB_SNIPPET"})(ome=z.StatsbeatFeature||(z.StatsbeatFeature={}));var sme;(function(t){t[t.NONE=0]="NONE",t[t.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",t[t.MONGODB=2]="MONGODB",t[t.MYSQL=4]="MYSQL",t[t.REDIS=8]="REDIS",t[t.POSTGRES=16]="POSTGRES",t[t.BUNYAN=32]="BUNYAN",t[t.WINSTON=64]="WINSTON",t[t.CONSOLE=128]="CONSOLE"})(sme=z.StatsbeatInstrumentation||(z.StatsbeatInstrumentation={}));var ame;(function(t){t[t.Feature=0]="Feature",t[t.Instrumentation=1]="Instrumentation"})(ame=z.StatsbeatFeatureType||(z.StatsbeatFeatureType={}));var cme;(function(t){t[t.Breeze=0]="Breeze",t[t.Quickpulse=1]="Quickpulse"})(cme=z.StatsbeatNetworkCategory||(z.StatsbeatNetworkCategory={}));var ume;(function(t){t.SESSION="ai_session",t.USER="ai_user",t.AUTH_USER="ai_authUser"})(ume=z.HttpRequestCookieNames||(z.HttpRequestCookieNames={}));z.AzNamespace="az.namespace";z.MicrosoftEventHub="Microsoft.EventHub";z.MessageBusDestination="message_bus.destination";z.ENQUEUED_TIME="enqueuedTime";z.TIME_SINCE_ENQUEUED="timeSinceEnqueued";z.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai";z.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"});var BT=x((HT,UV)=>{"use strict";var lme=HT&&HT.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fy=require("url"),fme=yn(),jT=Xt(),ur=ol(),pme=UT(),Ts=sc(),dme=wT(),$T=cy(),hme=tt(),py=at(),mme=function(t){lme(e,t);function e(n,r){var i=t.call(this)||this;return n&&(i.method=n.method,i.url=i._getAbsoluteUrl(n),i.startTime=+new Date,i.socketRemoteAddress=n.socket&&n.socket.remoteAddress,i.parseHeaders(n,r),n.connection&&(i.connectionRemoteAddress=n.connection.remoteAddress,i.legacySocketRemoteAddress=n.connection.socket&&n.connection.socket.remoteAddress)),i}return e.prototype.onError=function(n,r){this._setStatus(void 0,n),r&&(this.duration=r)},e.prototype.onResponse=function(n,r){this._setStatus(n.statusCode,void 0),r&&(this.duration=r)},e.prototype.getRequestTelemetry=function(n){var r=this.method;try{r+=" "+new fy.URL(this.url).pathname}catch{}var i={id:this.requestId,name:r,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(n&&n.time?i.time=n.time:this.startTime&&(i.time=new Date(this.startTime)),n){for(var o in n)i[o]||(i[o]=n[o]);if(n.properties)for(var o in n.properties)i.properties[o]=n.properties[o]}return i},e.prototype.getRequestTags=function(n){var r={};for(var i in n)r[i]=n[i];return r[e.keys.locationIp]=n[e.keys.locationIp]||this._getIp(),r[e.keys.sessionId]=n[e.keys.sessionId]||this._getId(py.HttpRequestCookieNames.SESSION),r[e.keys.userId]=n[e.keys.userId]||this._getId(py.HttpRequestCookieNames.USER),r[e.keys.userAuthUserId]=n[e.keys.userAuthUserId]||this._getId(py.HttpRequestCookieNames.AUTH_USER),r[e.keys.operationName]=this.getOperationName(n),r[e.keys.operationParentId]=this.getOperationParentId(n),r[e.keys.operationId]=this.getOperationId(n),r},e.prototype.getOperationId=function(n){return n[e.keys.operationId]||this.operationId},e.prototype.getOperationParentId=function(n){return n[e.keys.operationParentId]||this.parentId||this.getOperationId(n)},e.prototype.getOperationName=function(n){if(n[e.keys.operationName])return n[e.keys.operationName];var r="";try{r=new fy.URL(this.url).pathname}catch{}var i=this.method;return r&&(i+=" "+r),i},e.prototype.getRequestId=function(){return this.requestId},e.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},e.prototype.getTraceparent=function(){return this.traceparent},e.prototype.getTracestate=function(){return this.tracestate},e.prototype.getLegacyRootId=function(){return this.legacyRootId},e.prototype._getAbsoluteUrl=function(n){if(!n.headers)return n.url;var r=n.connection?n.connection.encrypted:null,i=r||n.headers["x-forwarded-proto"]=="https"?"https":"http",o=i+"://"+n.headers.host+"/",s="",a="";try{var u=new fy.URL(n.url,o);s=u.pathname,a=u.search}catch{}var c=fy.format({protocol:i,host:n.headers.host,pathname:s,search:a});return c},e.prototype._getIp=function(){var n=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,r=function(o){var s=n.exec(o);if(s)return s[0]},i=r(this.rawHeaders["x-forwarded-for"])||r(this.rawHeaders["x-client-ip"])||r(this.rawHeaders["x-real-ip"])||r(this.connectionRemoteAddress)||r(this.socketRemoteAddress)||r(this.legacySocketRemoteAddress);return!i&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&this.connectionRemoteAddress.substr(0,2)==="::"&&(i="127.0.0.1"),i},e.prototype._getId=function(n){var r=this.rawHeaders&&this.rawHeaders.cookie&&typeof this.rawHeaders.cookie=="string"&&this.rawHeaders.cookie||"";if(n===py.HttpRequestCookieNames.AUTH_USER)try{r=decodeURI(r)}catch(o){r="",hme.warn("Could not decode the auth cookie with error: ",jT.dumpObj(o))}var i=e.parseId(jT.getCookie(n,r));return i},e.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},e.prototype.parseHeaders=function(n,r){if(this.rawHeaders=n.headers||n.rawHeaders,this.userAgent=n.headers&&n.headers["user-agent"],this.sourceCorrelationId=jT.getCorrelationContextTarget(n,ur.requestContextSourceKey),n.headers){var i=n.headers[ur.traceStateHeader]?n.headers[ur.traceStateHeader].toString():null,o=n.headers[ur.traceparentHeader]?n.headers[ur.traceparentHeader].toString():null,s=n.headers[ur.requestIdHeader]?n.headers[ur.requestIdHeader].toString():null,a=n.headers[ur.parentIdHeader]?n.headers[ur.parentIdHeader].toString():null,u=n.headers[ur.rootIdHeader]?n.headers[ur.rootIdHeader].toString():null;this.correlationContextHeader=n.headers[ur.correlationContextHeader]?n.headers[ur.correlationContextHeader].toString():null,Ts.w3cEnabled&&(o||i)?(this.traceparent=new $T(o?o.toString():null),this.tracestate=o&&i&&new dme(i?i.toString():null),this.setBackCompatFromThisTraceContext()):s?Ts.w3cEnabled?(this.traceparent=new $T(null,s),this.setBackCompatFromThisTraceContext()):(this.parentId=s,this.requestId=Ts.generateRequestId(this.parentId),this.operationId=Ts.getRootId(this.requestId)):Ts.w3cEnabled?(this.traceparent=new $T,this.traceparent.parentId=a,this.traceparent.legacyRootId=u||a,this.setBackCompatFromThisTraceContext()):(this.parentId=a,this.requestId=Ts.generateRequestId(u||this.parentId),this.correlationContextHeader=null,this.operationId=Ts.getRootId(this.requestId)),r&&(this.requestId=r,this.operationId=Ts.getRootId(this.requestId))}},e.parseId=function(n){var r=n.split("|");return r.length>0?r[0]:""},e.keys=new fme.ContextTagKeys,e}(pme);UV.exports=mme});var n6=x((ge,t6)=>{ge=t6.exports=Ie;var je;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?je=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:je=function(){};ge.SEMVER_SPEC_VERSION="2.0.0";var nd=256,dy=Number.MAX_SAFE_INTEGER||9007199254740991,GT=16,gme=nd-6,rd=ge.re=[],Ke=ge.safeRe=[],H=ge.src=[],Ce=0,KT="[a-zA-Z0-9-]",zT=[["\\s",1],["\\d",nd],[KT,gme]];function xy(t){for(var e=0;e<zT.length;e++){var n=zT[e][0],r=zT[e][1];t=t.split(n+"*").join(n+"{0,"+r+"}").split(n+"+").join(n+"{1,"+r+"}")}return t}var cl=Ce++;H[cl]="0|[1-9]\\d*";var ul=Ce++;H[ul]="\\d+";var XT=Ce++;H[XT]="\\d*[a-zA-Z-]"+KT+"*";var $V=Ce++;H[$V]="("+H[cl]+")\\.("+H[cl]+")\\.("+H[cl]+")";var HV=Ce++;H[HV]="("+H[ul]+")\\.("+H[ul]+")\\.("+H[ul]+")";var VT=Ce++;H[VT]="(?:"+H[cl]+"|"+H[XT]+")";var WT=Ce++;H[WT]="(?:"+H[ul]+"|"+H[XT]+")";var JT=Ce++;H[JT]="(?:-("+H[VT]+"(?:\\."+H[VT]+")*))";var QT=Ce++;H[QT]="(?:-?("+H[WT]+"(?:\\."+H[WT]+")*))";var YT=Ce++;H[YT]=KT+"+";var od=Ce++;H[od]="(?:\\+("+H[YT]+"(?:\\."+H[YT]+")*))";var ZT=Ce++,BV="v?"+H[$V]+H[JT]+"?"+H[od]+"?";H[ZT]="^"+BV+"$";var eI="[v=\\s]*"+H[HV]+H[QT]+"?"+H[od]+"?",tI=Ce++;H[tI]="^"+eI+"$";var hl=Ce++;H[hl]="((?:<|>)?=?)";var hy=Ce++;H[hy]=H[ul]+"|x|X|\\*";var my=Ce++;H[my]=H[cl]+"|x|X|\\*";var cc=Ce++;H[cc]="[v=\\s]*("+H[my]+")(?:\\.("+H[my]+")(?:\\.("+H[my]+")(?:"+H[JT]+")?"+H[od]+"?)?)?";var fl=Ce++;H[fl]="[v=\\s]*("+H[hy]+")(?:\\.("+H[hy]+")(?:\\.("+H[hy]+")(?:"+H[QT]+")?"+H[od]+"?)?)?";var GV=Ce++;H[GV]="^"+H[hl]+"\\s*"+H[cc]+"$";var zV=Ce++;H[zV]="^"+H[hl]+"\\s*"+H[fl]+"$";var VV=Ce++;H[VV]="(?:^|[^\\d])(\\d{1,"+GT+"})(?:\\.(\\d{1,"+GT+"}))?(?:\\.(\\d{1,"+GT+"}))?(?:$|[^\\d])";var _y=Ce++;H[_y]="(?:~>?)";var pl=Ce++;H[pl]="(\\s*)"+H[_y]+"\\s+";rd[pl]=new RegExp(H[pl],"g");Ke[pl]=new RegExp(xy(H[pl]),"g");var vme="$1~",WV=Ce++;H[WV]="^"+H[_y]+H[cc]+"$";var YV=Ce++;H[YV]="^"+H[_y]+H[fl]+"$";var Ey=Ce++;H[Ey]="(?:\\^)";var dl=Ce++;H[dl]="(\\s*)"+H[Ey]+"\\s+";rd[dl]=new RegExp(H[dl],"g");Ke[dl]=new RegExp(xy(H[dl]),"g");var yme="$1^",KV=Ce++;H[KV]="^"+H[Ey]+H[cc]+"$";var XV=Ce++;H[XV]="^"+H[Ey]+H[fl]+"$";var nI=Ce++;H[nI]="^"+H[hl]+"\\s*("+eI+")$|^$";var rI=Ce++;H[rI]="^"+H[hl]+"\\s*("+BV+")$|^$";var uc=Ce++;H[uc]="(\\s*)"+H[hl]+"\\s*("+eI+"|"+H[cc]+")";rd[uc]=new RegExp(H[uc],"g");Ke[uc]=new RegExp(xy(H[uc]),"g");var xme="$1$2$3",JV=Ce++;H[JV]="^\\s*("+H[cc]+")\\s+-\\s+("+H[cc]+")\\s*$";var QV=Ce++;H[QV]="^\\s*("+H[fl]+")\\s+-\\s+("+H[fl]+")\\s*$";var ZV=Ce++;H[ZV]="(<|>)?=?\\s*\\*";for(Li=0;Li<Ce;Li++)je(Li,H[Li]),rd[Li]||(rd[Li]=new RegExp(H[Li]),Ke[Li]=new RegExp(xy(H[Li])));var Li;ge.parse=lc;function lc(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Ie)return t;if(typeof t!="string"||t.length>nd)return null;var n=e.loose?Ke[tI]:Ke[ZT];if(!n.test(t))return null;try{return new Ie(t,e)}catch{return null}}ge.valid=_me;function _me(t,e){var n=lc(t,e);return n?n.version:null}ge.clean=Eme;function Eme(t,e){var n=lc(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null}ge.SemVer=Ie;function Ie(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Ie){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>nd)throw new TypeError("version is longer than "+nd+" characters");if(!(this instanceof Ie))return new Ie(t,e);je("SemVer",t,e),this.options=e,this.loose=!!e.loose;var n=t.trim().match(e.loose?Ke[tI]:Ke[ZT]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>dy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dy||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(function(r){if(/^[0-9]+$/.test(r)){var i=+r;if(i>=0&&i<dy)return i}return r}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}Ie.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};Ie.prototype.toString=function(){return this.version};Ie.prototype.compare=function(t){return je("SemVer.compare",this.version,this.options,t),t instanceof Ie||(t=new Ie(t,this.options)),this.compareMain(t)||this.comparePre(t)};Ie.prototype.compareMain=function(t){return t instanceof Ie||(t=new Ie(t,this.options)),ll(this.major,t.major)||ll(this.minor,t.minor)||ll(this.patch,t.patch)};Ie.prototype.comparePre=function(t){if(t instanceof Ie||(t=new Ie(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var n=this.prerelease[e],r=t.prerelease[e];if(je("prerelease compare",e,n,r),n===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(n===void 0)return-1;if(n===r)continue;return ll(n,r)}while(++e)};Ie.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};ge.inc=bme;function bme(t,e,n,r){typeof n=="string"&&(r=n,n=void 0);try{return new Ie(t,n).inc(e,r).version}catch{return null}}ge.diff=wme;function wme(t,e){if(iI(t,e))return null;var n=lc(t),r=lc(e),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if((s==="major"||s==="minor"||s==="patch")&&n[s]!==r[s])return i+s;return o}ge.compareIdentifiers=ll;var jV=/^[0-9]+$/;function ll(t,e){var n=jV.test(t),r=jV.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1}ge.rcompareIdentifiers=Sme;function Sme(t,e){return ll(e,t)}ge.major=Cme;function Cme(t,e){return new Ie(t,e).major}ge.minor=Tme;function Tme(t,e){return new Ie(t,e).minor}ge.patch=Ime;function Ime(t,e){return new Ie(t,e).patch}ge.compare=Io;function Io(t,e,n){return new Ie(t,n).compare(new Ie(e,n))}ge.compareLoose=Ame;function Ame(t,e){return Io(t,e,!0)}ge.rcompare=Rme;function Rme(t,e,n){return Io(e,t,n)}ge.sort=Pme;function Pme(t,e){return t.sort(function(n,r){return ge.compare(n,r,e)})}ge.rsort=Ome;function Ome(t,e){return t.sort(function(n,r){return ge.rcompare(n,r,e)})}ge.gt=id;function id(t,e,n){return Io(t,e,n)>0}ge.lt=gy;function gy(t,e,n){return Io(t,e,n)<0}ge.eq=iI;function iI(t,e,n){return Io(t,e,n)===0}ge.neq=e6;function e6(t,e,n){return Io(t,e,n)!==0}ge.gte=oI;function oI(t,e,n){return Io(t,e,n)>=0}ge.lte=sI;function sI(t,e,n){return Io(t,e,n)<=0}ge.cmp=vy;function vy(t,e,n,r){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return iI(t,n,r);case"!=":return e6(t,n,r);case">":return id(t,n,r);case">=":return oI(t,n,r);case"<":return gy(t,n,r);case"<=":return sI(t,n,r);default:throw new TypeError("Invalid operator: "+e)}}ge.Comparator=kr;function kr(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof kr){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof kr))return new kr(t,e);t=t.trim().split(/\s+/).join(" "),je("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===sd?this.value="":this.value=this.operator+this.semver.version,je("comp",this)}var sd={};kr.prototype.parse=function(t){var e=this.options.loose?Ke[nI]:Ke[rI],n=t.match(e);if(!n)throw new TypeError("Invalid comparator: "+t);this.operator=n[1],this.operator==="="&&(this.operator=""),n[2]?this.semver=new Ie(n[2],this.options.loose):this.semver=sd};kr.prototype.toString=function(){return this.value};kr.prototype.test=function(t){return je("Comparator.test",t,this.options.loose),this.semver===sd?!0:(typeof t=="string"&&(t=new Ie(t,this.options)),vy(t,this.operator,this.semver,this.options))};kr.prototype.intersects=function(t,e){if(!(t instanceof kr))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var n;if(this.operator==="")return n=new ct(t.value,e),yy(this.value,n,e);if(t.operator==="")return n=new ct(this.value,e),yy(t.semver,n,e);var r=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),o=this.semver.version===t.semver.version,s=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),a=vy(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=vy(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return r||i||o&&s||a||u};ge.Range=ct;function ct(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof ct)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new ct(t.raw,e);if(t instanceof kr)return new ct(t.value,e);if(!(this instanceof ct))return new ct(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(n){return this.parseRange(n.trim())},this).filter(function(n){return n.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}ct.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};ct.prototype.toString=function(){return this.range};ct.prototype.parseRange=function(t){var e=this.options.loose,n=e?Ke[QV]:Ke[JV];t=t.replace(n,$me),je("hyphen replace",t),t=t.replace(Ke[uc],xme),je("comparator trim",t,Ke[uc]),t=t.replace(Ke[pl],vme),t=t.replace(Ke[dl],yme);var r=e?Ke[nI]:Ke[rI],i=t.split(" ").map(function(o){return Dme(o,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(o){return!!o.match(r)})),i=i.map(function(o){return new kr(o,this.options)},this),i};ct.prototype.intersects=function(t,e){if(!(t instanceof ct))throw new TypeError("a Range is required");return this.set.some(function(n){return n.every(function(r){return t.set.some(function(i){return i.every(function(o){return r.intersects(o,e)})})})})};ge.toComparators=Nme;function Nme(t,e){return new ct(t,e).set.map(function(n){return n.map(function(r){return r.value}).join(" ").trim().split(" ")})}function Dme(t,e){return je("comp",t,e),t=Fme(t,e),je("caret",t),t=Lme(t,e),je("tildes",t),t=qme(t,e),je("xrange",t),t=jme(t,e),je("stars",t),t}function Pn(t){return!t||t.toLowerCase()==="x"||t==="*"}function Lme(t,e){return t.trim().split(/\s+/).map(function(n){return kme(n,e)}).join(" ")}function kme(t,e){var n=e.loose?Ke[YV]:Ke[WV];return t.replace(n,function(r,i,o,s,a){je("tilde",t,r,i,o,s,a);var u;return Pn(i)?u="":Pn(o)?u=">="+i+".0.0 <"+(+i+1)+".0.0":Pn(s)?u=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0":a?(je("replaceTilde pr",a),u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+(+o+1)+".0"):u=">="+i+"."+o+"."+s+" <"+i+"."+(+o+1)+".0",je("tilde return",u),u})}function Fme(t,e){return t.trim().split(/\s+/).map(function(n){return Mme(n,e)}).join(" ")}function Mme(t,e){je("caret",t,e);var n=e.loose?Ke[XV]:Ke[KV];return t.replace(n,function(r,i,o,s,a){je("caret",t,r,i,o,s,a);var u;return Pn(i)?u="":Pn(o)?u=">="+i+".0.0 <"+(+i+1)+".0.0":Pn(s)?i==="0"?u=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+".0 <"+(+i+1)+".0.0":a?(je("replaceCaret pr",a),i==="0"?o==="0"?u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+o+"."+(+s+1):u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+"."+s+"-"+a+" <"+(+i+1)+".0.0"):(je("no pr"),i==="0"?o==="0"?u=">="+i+"."+o+"."+s+" <"+i+"."+o+"."+(+s+1):u=">="+i+"."+o+"."+s+" <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+"."+s+" <"+(+i+1)+".0.0"),je("caret return",u),u})}function qme(t,e){return je("replaceXRanges",t,e),t.split(/\s+/).map(function(n){return Ume(n,e)}).join(" ")}function Ume(t,e){t=t.trim();var n=e.loose?Ke[zV]:Ke[GV];return t.replace(n,function(r,i,o,s,a,u){je("xRange",t,r,i,o,s,a,u);var c=Pn(o),l=c||Pn(s),f=l||Pn(a),p=f;return i==="="&&p&&(i=""),c?i===">"||i==="<"?r="<0.0.0":r="*":i&&p?(l&&(s=0),a=0,i===">"?(i=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",l?o=+o+1:s=+s+1),r=i+o+"."+s+"."+a):l?r=">="+o+".0.0 <"+(+o+1)+".0.0":f&&(r=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"),je("xRange return",r),r})}function jme(t,e){return je("replaceStars",t,e),t.trim().replace(Ke[ZV],"")}function $me(t,e,n,r,i,o,s,a,u,c,l,f,p){return Pn(n)?e="":Pn(r)?e=">="+n+".0.0":Pn(i)?e=">="+n+"."+r+".0":e=">="+e,Pn(u)?a="":Pn(c)?a="<"+(+u+1)+".0.0":Pn(l)?a="<"+u+"."+(+c+1)+".0":f?a="<="+u+"."+c+"."+l+"-"+f:a="<="+a,(e+" "+a).trim()}ct.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new Ie(t,this.options));for(var e=0;e<this.set.length;e++)if(Hme(this.set[e],t,this.options))return!0;return!1};function Hme(t,e,n){for(var r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(r=0;r<t.length;r++)if(je(t[r].semver),t[r].semver!==sd&&t[r].semver.prerelease.length>0){var i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}ge.satisfies=yy;function yy(t,e,n){try{e=new ct(e,n)}catch{return!1}return e.test(t)}ge.maxSatisfying=Bme;function Bme(t,e,n){var r=null,i=null;try{var o=new ct(e,n)}catch{return null}return t.forEach(function(s){o.test(s)&&(!r||i.compare(s)===-1)&&(r=s,i=new Ie(r,n))}),r}ge.minSatisfying=Gme;function Gme(t,e,n){var r=null,i=null;try{var o=new ct(e,n)}catch{return null}return t.forEach(function(s){o.test(s)&&(!r||i.compare(s)===1)&&(r=s,i=new Ie(r,n))}),r}ge.minVersion=zme;function zme(t,e){t=new ct(t,e);var n=new Ie("0.0.0");if(t.test(n)||(n=new Ie("0.0.0-0"),t.test(n)))return n;n=null;for(var r=0;r<t.set.length;++r){var i=t.set[r];i.forEach(function(o){var s=new Ie(o.semver.version);switch(o.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!n||id(n,s))&&(n=s);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+o.operator)}})}return n&&t.test(n)?n:null}ge.validRange=Vme;function Vme(t,e){try{return new ct(t,e).range||"*"}catch{return null}}ge.ltr=Wme;function Wme(t,e,n){return aI(t,e,"<",n)}ge.gtr=Yme;function Yme(t,e,n){return aI(t,e,">",n)}ge.outside=aI;function aI(t,e,n,r){t=new Ie(t,r),e=new ct(e,r);var i,o,s,a,u;switch(n){case">":i=id,o=sI,s=gy,a=">",u=">=";break;case"<":i=gy,o=oI,s=id,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(yy(t,e,r))return!1;for(var c=0;c<e.set.length;++c){var l=e.set[c],f=null,p=null;if(l.forEach(function(d){d.semver===sd&&(d=new kr(">=0.0.0")),f=f||d,p=p||d,i(d.semver,f.semver,r)?f=d:s(d.semver,p.semver,r)&&(p=d)}),f.operator===a||f.operator===u||(!p.operator||p.operator===a)&&o(t,p.semver))return!1;if(p.operator===u&&s(t,p.semver))return!1}return!0}ge.prerelease=Kme;function Kme(t,e){var n=lc(t,e);return n&&n.prerelease.length?n.prerelease:null}ge.intersects=Xme;function Xme(t,e,n){return t=new ct(t,n),e=new ct(e,n),t.intersects(e)}ge.coerce=Jme;function Jme(t){if(t instanceof Ie)return t;if(typeof t!="string")return null;var e=t.match(Ke[VV]);return e==null?null:lc(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}});var Sy=x((mGe,s6)=>{"use strict";var i6=Zu(),ml=i6.wrap,by=i6.unwrap,Ao="wrap@before";function wy(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Qme(t,e){for(var n=e.length,r=0;r<n;r++){var i=e[r],o=t[Ao];if(typeof o=="function")o(i);else if(Array.isArray(o))for(var s=o.length,a=0;a<s;a++)o[a](i)}}function o6(t,e){var n;return n=t._events&&t._events[e],Array.isArray(n)||(n?n=[n]:n=[]),n}function Zme(t,e,n){var r=o6(t,e),i=r.filter(function(o){return n.indexOf(o)===-1});i.length>0&&Qme(t,i)}function r6(t,e){if(t){var n=t;if(typeof t=="function")n=e(t);else if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r])}return n}}s6.exports=function(e,n,r){if(!e||!e.on||!e.addListener||!e.removeListener||!e.emit)throw new Error("can only wrap real EEs");if(!n)throw new Error("must have function to run on listener addition");if(!r)throw new Error("must have function to wrap listeners when emitting");function i(s){return function(u,c){var l=o6(this,u).slice();try{var f=s.call(this,u,c);return Zme(this,u,l),f}finally{this.on.__wrapped||ml(this,"on",i),this.addListener.__wrapped||ml(this,"addListener",i)}}}function o(s){return function(u){if(!this._events||!this._events[u])return s.apply(this,arguments);var c=this._events[u];function l(f){return function(){this._events[u]=c;try{return f.apply(this,arguments)}finally{c=this._events[u],this._events[u]=r6(c,r)}}}ml(this,"removeListener",l);try{return this._events[u]=r6(c,r),s.apply(this,arguments)}finally{by(this,"removeListener"),this._events[u]=c}}}e[Ao]?typeof e[Ao]=="function"?wy(e,Ao,[e[Ao],n]):Array.isArray(e[Ao])&&e[Ao].push(n):wy(e,Ao,n),e.__wrapped||(ml(e,"addListener",i),ml(e,"on",i),ml(e,"emit",o),wy(e,"__unwrap",function(){by(e,"addListener"),by(e,"on"),by(e,"emit"),delete e[Ao],delete e.__wrapped}),wy(e,"__wrapped",!0))}});var l6=x((gGe,u6)=>{"use strict";var qe=require("util"),Ro=require("assert"),ege=Sy(),nt=require("async_hooks"),ad="cls@contexts",cd="error@context",ut=process.env.DEBUG_CLS_HOOKED,Me=-1;u6.exports={getNamespace:a6,createNamespace:tge,destroyNamespace:c6,reset:nge,ERROR_SYMBOL:cd};function Fr(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}Fr.prototype.set=function(e,n){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");if(this.active[e]=n,ut){let r=" ".repeat(this._indent<0?0:this._indent);ot(r+"CONTEXT-SET KEY:"+e+"="+n+" in ns:"+this.name+" currentUid:"+Me+" active:"+qe.inspect(this.active,{showHidden:!0,depth:2,colors:!0}))}return n};Fr.prototype.get=function(e){if(!this.active){if(ut){let n=nt.currentId(),r=nt.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);ot(`${i}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${Me} asyncHooksCurrentId:${n} triggerId:${r} len:${this._set.length}`)}return}if(ut){let n=nt.executionAsyncId(),r=nt.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);ot(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+Me+" active:"+qe.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),ot(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${Me} asyncHooksCurrentId:${n} triggerId:${r} len:${this._set.length} active:${qe.inspect(this.active)}`)}return this.active[e]};Fr.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=Me,ut){let n=nt.executionAsyncId(),r=nt.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);ot(`${i}CONTEXT-CREATED Context: (${this.name}) currentUid:${Me} asyncHooksCurrentId:${n} triggerId:${r} len:${this._set.length} context:${qe.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e};Fr.prototype.run=function(e){let n=this.createContext();this.enter(n);try{if(ut){let r=nt.triggerAsyncId(),i=nt.executionAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);ot(`${o}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${Me} triggerId:${r} asyncHooksCurrentId:${i} len:${this._set.length} context:${qe.inspect(n)}`)}return e(n),n}catch(r){throw r&&(r[cd]=n),r}finally{if(ut){let r=nt.triggerAsyncId(),i=nt.executionAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);ot(`${o}CONTEXT-RUN END: (${this.name}) currentUid:${Me} triggerId:${r} asyncHooksCurrentId:${i} len:${this._set.length} ${qe.inspect(n)}`)}this.exit(n)}};Fr.prototype.runAndReturn=function(e){let n;return this.run(function(r){n=e(r)}),n};Fr.prototype.runPromise=function(e){let n=this.createContext();this.enter(n);let r=e(n);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return ut&&ot("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+Me+" len:"+this._set.length+" "+qe.inspect(n)),r.then(i=>(ut&&ot("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+Me+" len:"+this._set.length+" "+qe.inspect(n)),this.exit(n),i)).catch(i=>{throw i[cd]=n,ut&&ot("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+Me+" len:"+this._set.length+" "+qe.inspect(n)),this.exit(n),i})};Fr.prototype.bind=function(e,n){n||(this.active?n=this.active:n=this.createContext());let r=this;return function(){r.enter(n);try{return e.apply(this,arguments)}catch(o){throw o&&(o[cd]=n),o}finally{r.exit(n)}}};Fr.prototype.enter=function(e){if(Ro.ok(e,"context must be provided for entering"),ut){let n=nt.executionAsyncId(),r=nt.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);ot(`${i}CONTEXT-ENTER: (${this.name}) currentUid:${Me} triggerId:${r} asyncHooksCurrentId:${n} len:${this._set.length} ${qe.inspect(e)}`)}this._set.push(this.active),this.active=e};Fr.prototype.exit=function(e){if(Ro.ok(e,"context must be provided for exiting"),ut){let r=nt.executionAsyncId(),i=nt.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);ot(`${o}CONTEXT-EXIT: (${this.name}) currentUid:${Me} triggerId:${i} asyncHooksCurrentId:${r} len:${this._set.length} ${qe.inspect(e)}`)}if(this.active===e){Ro.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let n=this._set.lastIndexOf(e);n<0?(ut&&ot("??ERROR?? context exiting but not entered - ignoring: "+qe.inspect(e)),Ro.ok(n>=0,`context not currently entered; can't exit.
|
|
`+qe.inspect(this)+`
|
|
`+qe.inspect(e))):(Ro.ok(n,"can't remove top context"),this._set.splice(n,1))};Fr.prototype.bindEmitter=function(e){Ro.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let n=this,r="context@"+this.name;function i(s){s&&(s[ad]||(s[ad]=Object.create(null)),s[ad][r]={namespace:n,context:n.active})}function o(s){if(!(s&&s[ad]))return s;let a=s,u=s[ad];return Object.keys(u).forEach(function(c){let l=u[c];a=l.namespace.bind(a,l.context)}),a}ege(e,i,o)};Fr.prototype.fromException=function(e){return e[cd]};function a6(t){return process.namespaces[t]}function tge(t){Ro.ok(t,"namespace must be given a name."),ut&&ot(`NS-CREATING NAMESPACE (${t})`);let e=new Fr(t);return e.id=Me,nt.createHook({init(r,i,o,s){if(Me=nt.executionAsyncId(),e.active){if(e._contexts.set(r,e.active),ut){let a=" ".repeat(e._indent<0?0:e._indent);ot(`${a}INIT [${i}] (${t}) asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}}else if(Me===0){let a=nt.triggerAsyncId(),u=e._contexts.get(a);if(u){if(e._contexts.set(r,u),ut){let c=" ".repeat(e._indent<0?0:e._indent);ot(`${c}INIT USING CONTEXT FROM TRIGGERID [${i}] (${t}) asyncId:${r} currentUid:${Me} triggerId:${a} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}}else if(ut){let c=" ".repeat(e._indent<0?0:e._indent);ot(`${c}INIT MISSING CONTEXT [${i}] (${t}) asyncId:${r} currentUid:${Me} triggerId:${a} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}}if(ut&&i==="PROMISE"){ot(qe.inspect(s,{showHidden:!0}));let a=s.parentId,u=" ".repeat(e._indent<0?0:e._indent);ot(`${u}INIT RESOURCE-PROMISE [${i}] (${t}) parentId:${a} asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}},before(r){Me=nt.executionAsyncId();let i;if(i=e._contexts.get(r)||e._contexts.get(Me),i){if(ut){let o=nt.triggerAsyncId(),s=" ".repeat(e._indent<0?0:e._indent);ot(`${s}BEFORE (${t}) asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${qe.inspect(i)}`),e._indent+=2}e.enter(i)}else if(ut){let o=nt.triggerAsyncId(),s=" ".repeat(e._indent<0?0:e._indent);ot(`${s}BEFORE MISSING CONTEXT (${t}) asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${qe.inspect(e._contexts,{showHidden:!0,depth:2,colors:!0})}`),e._indent+=2}},after(r){Me=nt.executionAsyncId();let i;if(i=e._contexts.get(r)||e._contexts.get(Me),i){if(ut){let o=nt.triggerAsyncId();e._indent-=2;let s=" ".repeat(e._indent<0?0:e._indent);ot(`${s}AFTER (${t}) asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${qe.inspect(i)}`)}e.exit(i)}else if(ut){let o=nt.triggerAsyncId();e._indent-=2;let s=" ".repeat(e._indent<0?0:e._indent);ot(`${s}AFTER MISSING CONTEXT (${t}) asyncId:${r} currentUid:${Me} triggerId:${o} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${qe.inspect(i)}`)}},destroy(r){if(Me=nt.executionAsyncId(),ut){let i=nt.triggerAsyncId(),o=" ".repeat(e._indent<0?0:e._indent);ot(`${o}DESTROY (${t}) currentUid:${Me} asyncId:${r} triggerId:${i} active:${qe.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${qe.inspect(e._contexts.get(Me))}`)}e._contexts.delete(r)}}).enable(),process.namespaces[t]=e,e}function c6(t){let e=a6(t);Ro.ok(e,`can't delete nonexistent namespace! "`+t+'"'),Ro.ok(e.id,"don't assign to process.namespaces directly! "+qe.inspect(e)),process.namespaces[t]=null}function nge(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){c6(t)}),process.namespaces=Object.create(null)}process.namespaces={};function ot(...t){ut&&process._rawDebug(`${qe.format(...t)}`)}});var p6=x((vGe,f6)=>{"use strict";function rge(){}f6.exports=function(){let e=this._hooks,n=this._state,r=process.nextTick;process.nextTick=function(){if(!n.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let u=0;u<arguments.length;u++)i[u]=arguments[u];let o=i[0];if(typeof o!="function")throw new TypeError("callback is not a function");let s=new rge,a=--n.counter;return e.init.call(s,a,0,null,null),i[0]=function(){e.pre.call(s,a);let u=!0;try{o.apply(this,arguments),u=!1}finally{u&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",function(){e.post.call(s,a,!0),e.destroy.call(null,a)})}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}});var h6=x((yGe,d6)=>{"use strict";function ige(){}d6.exports=function(){let e=this._hooks,n=this._state,r=global.Promise,i=r.prototype.then;r.prototype.then=u;function o(c,l,f,p){return typeof c!="function"?p?s(f):a(f):function(){e.pre.call(l,f);try{return c.apply(this,arguments)}finally{e.post.call(l,f,!1),e.destroy.call(null,f)}}}function s(c){return function(f){return e.destroy.call(null,c),f}}function a(c){return function(f){throw e.destroy.call(null,c),f}}function u(c,l){if(!n.enabled)return i.call(this,c,l);let f=new ige,p=--n.counter;return e.init.call(f,p,0,null,null),i.call(this,o(c,f,p,!0),o(l,f,p,!1))}}});var g6=x((xGe,m6)=>{"use strict";var lr=require("timers");function oge(){}function sge(){}function age(){}var cge=new Map,uge=new Map,lge=new Map,cI=null,uI=!1;m6.exports=function(){lI(this._hooks,this._state,"setTimeout","clearTimeout",oge,cge,!0),lI(this._hooks,this._state,"setInterval","clearInterval",sge,uge,!1),lI(this._hooks,this._state,"setImmediate","clearImmediate",age,lge,!0),global.setTimeout=lr.setTimeout,global.setInterval=lr.setInterval,global.setImmediate=lr.setImmediate,global.clearTimeout=lr.clearTimeout,global.clearInterval=lr.clearInterval,global.clearImmediate=lr.clearImmediate};function lI(t,e,n,r,i,o,s){let a=lr[n],u=lr[r];lr[n]=function(){if(!e.enabled)return a.apply(lr,arguments);let c=new Array(arguments.length);for(let h=0;h<arguments.length;h++)c[h]=arguments[h];let l=c[0];if(typeof l!="function")throw new TypeError('"callback" argument must be a function');let f=new i,p=--e.counter,d;return t.init.call(f,p,0,null,null),c[0]=function(){cI=d,t.pre.call(f,p);let h=!0;try{l.apply(this,arguments),h=!1}finally{h&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",function(){t.post.call(f,p,!0),o.delete(d),t.destroy.call(null,p)})}t.post.call(f,p,!1),cI=null,(s||uI)&&(uI=!1,o.delete(d),t.destroy.call(null,p))},d=a.apply(lr,c),o.set(d,p),d},lr[r]=function(c){if(cI===c&&c!==null)uI=!0;else if(o.has(c)){let l=o.get(c);o.delete(c),t.destroy.call(null,l)}u.apply(lr,arguments)}}});var fI=x((_Ge,fge)=>{fge.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen <amwebdk@gmail.com>",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}});var x6=x((EGe,y6)=>{"use strict";var ld=process.binding("async_wrap"),pge=ld.Providers.TIMERWRAP,v6={nextTick:p6(),promise:h6(),timers:g6()},ud=new Set;function dge(){this.enabled=!1,this.counter=0}function pI(){let t=this.initFns=[],e=this.preFns=[],n=this.postFns=[],r=this.destroyFns=[];this.init=function(i,o,s,a){if(o===pge){ud.add(i);return}for(let u of t)u(i,this,o,s,a)},this.pre=function(i){if(!ud.has(i))for(let o of e)o(i,this)},this.post=function(i,o){if(!ud.has(i))for(let s of n)s(i,this,o)},this.destroy=function(i){if(ud.has(i)){ud.delete(i);return}for(let o of r)o(i)}}pI.prototype.add=function(t){t.init&&this.initFns.push(t.init),t.pre&&this.preFns.push(t.pre),t.post&&this.postFns.push(t.post),t.destroy&&this.destroyFns.push(t.destroy)};function Cy(t,e){let n=t.indexOf(e);n!==-1&&t.splice(n,1)}pI.prototype.remove=function(t){t.init&&Cy(this.initFns,t.init),t.pre&&Cy(this.preFns,t.pre),t.post&&Cy(this.postFns,t.post),t.destroy&&Cy(this.destroyFns,t.destroy)};function fd(){this._state=new dge,this._hooks=new pI,this.version=fI().version,this.providers=ld.Providers;for(let t of Object.keys(v6))v6[t].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),ld.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}y6.exports=fd;fd.prototype.addHooks=function(t){this._hooks.add(t)};fd.prototype.removeHooks=function(t){this._hooks.remove(t)};fd.prototype.enable=function(){this._state.enabled=!0,ld.enable()};fd.prototype.disable=function(){this._state.enabled=!1,ld.disable()}});var dI=x((bGe,hge)=>{hge.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen <amwebdk@gmail.com>",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}});var E6=x((wGe,_6)=>{function mge(t){try{return Error.prototype.toString.call(t)}catch(e){try{return"<error: "+e+">"}catch{return"<error>"}}}_6.exports=function(e,n){var r=[];r.push(mge(e));for(var i=0;i<n.length;i++){var o=n[i],s;try{s=o.toString()}catch(a){try{s="<error: "+a+">"}catch{s="<error>"}}r.push(" at "+s)}return r.join(`
|
|
`)}});var C6=x((SGe,S6)=>{var Ty=E6();function w6(){this.extend=new pd,this.filter=new pd,this.format=new dd,this.version=dI().version}var mI=!1;w6.prototype.callSite=function t(e){e||(e={}),mI=!0;var n={};Error.captureStackTrace(n,t);var r=n.stack;return mI=!1,r=r.slice(e.slice||0),e.extend&&(r=this.extend._modify(n,r)),e.filter&&(r=this.filter._modify(n,r)),r};var Is=new w6;function pd(){this._modifiers=[]}pd.prototype._modify=function(t,e){for(var n=0,r=this._modifiers.length;n<r;n++)e=this._modifiers[n](t,e);return e};pd.prototype.attach=function(t){this._modifiers.push(t)};pd.prototype.deattach=function(t){var e=this._modifiers.indexOf(t);return e===-1?!1:(this._modifiers.splice(e,1),!0)};function dd(){this._formater=Ty,this._previous=void 0}dd.prototype.replace=function(t){t?this._formater=t:this.restore()};dd.prototype.restore=function(){this._formater=Ty,this._previous=void 0};dd.prototype._backup=function(){this._previous=this._formater};dd.prototype._roolback=function(){this._previous===Ty?this.replace(void 0):this.replace(this._previous),this._previous=void 0};Error.prepareStackTrace&&Is.format.replace(Error.prepareStackTrace);var hI=!1;function b6(t,e){if(mI)return e;if(hI)return Ty(t,e);var n=e.concat();n=Is.extend._modify(t,n),n=Is.filter._modify(t,n),n=n.slice(0,Error.stackTraceLimit),Object.isExtensible(t)&&Object.getOwnPropertyDescriptor(t,"callSite")===void 0&&(t.callSite={original:e,mutated:n}),hI=!0;var r=Is.format._formater(t,n);return hI=!1,r}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return b6},set:function(t){t===b6?Is.format._roolback():(Is.format._backup(),Is.format.replace(t))}});function gge(){return this.stack,this.callSite}Object.defineProperty(Error.prototype,"callSite",{get:gge,set:function(t){Object.defineProperty(this,"callSite",{value:t,writable:!0,configurable:!0})},configurable:!0});S6.exports=Is});var vI=x((CGe,gI)=>{if(global._stackChain)if(global._stackChain.version===dI().version)gI.exports=global._stackChain;else throw new Error("Conflicting version of stack-chain found");else gI.exports=global._stackChain=C6()});var T6=x((TGe,yI)=>{"use strict";var vge=x6();if(global._asyncHook)if(global._asyncHook.version===fI().version)yI.exports=global._asyncHook;else throw new Error("Conflicting version of async-hook-jl found");else vI().filter.attach(function(e,n){return n.filter(function(r){let i=r.getFileName();return!(i&&i.slice(0,__dirname.length)===__dirname)})}),yI.exports=global._asyncHook=new vge});var N6=x((IGe,O6)=>{"use strict";var Et=require("util"),Po=require("assert"),yge=Sy(),gl=T6(),hd="cls@contexts",md="error@context",A6=[];for(let t in gl.providers)A6[gl.providers[t]]=t;var ht=process.env.DEBUG_CLS_HOOKED,Ot=-1;O6.exports={getNamespace:R6,createNamespace:xge,destroyNamespace:P6,reset:_ge,ERROR_SYMBOL:md};function Mr(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map}Mr.prototype.set=function(e,n){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return ht&&_t(" SETTING KEY:"+e+"="+n+" in ns:"+this.name+" uid:"+Ot+" active:"+Et.inspect(this.active,!0)),this.active[e]=n,n};Mr.prototype.get=function(e){if(!this.active){ht&&_t(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+Ot+" active:"+Et.inspect(this.active,!0));return}return ht&&_t(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+Ot+" active:"+Et.inspect(this.active,!0)),this.active[e]};Mr.prototype.createContext=function(){ht&&_t(" CREATING Context: "+this.name+" uid:"+Ot+" len:"+this._set.length+" active:"+Et.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=Ot,ht&&_t(" CREATED Context: "+this.name+" uid:"+Ot+" len:"+this._set.length+" context:"+Et.inspect(e,!0,2,!0)),e};Mr.prototype.run=function(e){let n=this.createContext();this.enter(n);try{return ht&&_t(" BEFORE RUN: "+this.name+" uid:"+Ot+" len:"+this._set.length+" "+Et.inspect(n)),e(n),n}catch(r){throw r&&(r[md]=n),r}finally{ht&&_t(" AFTER RUN: "+this.name+" uid:"+Ot+" len:"+this._set.length+" "+Et.inspect(n)),this.exit(n)}};Mr.prototype.runAndReturn=function(e){var n;return this.run(function(r){n=e(r)}),n};Mr.prototype.runPromise=function(e){let n=this.createContext();this.enter(n);let r=e(n);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return ht&&_t(" BEFORE runPromise: "+this.name+" uid:"+Ot+" len:"+this._set.length+" "+Et.inspect(n)),r.then(i=>(ht&&_t(" AFTER runPromise: "+this.name+" uid:"+Ot+" len:"+this._set.length+" "+Et.inspect(n)),this.exit(n),i)).catch(i=>{throw i[md]=n,ht&&_t(" AFTER runPromise: "+this.name+" uid:"+Ot+" len:"+this._set.length+" "+Et.inspect(n)),this.exit(n),i})};Mr.prototype.bind=function(e,n){n||(this.active?n=this.active:n=this.createContext());let r=this;return function(){r.enter(n);try{return e.apply(this,arguments)}catch(o){throw o&&(o[md]=n),o}finally{r.exit(n)}}};Mr.prototype.enter=function(e){Po.ok(e,"context must be provided for entering"),ht&&_t(" ENTER "+this.name+" uid:"+Ot+" len:"+this._set.length+" context: "+Et.inspect(e)),this._set.push(this.active),this.active=e};Mr.prototype.exit=function(e){if(Po.ok(e,"context must be provided for exiting"),ht&&_t(" EXIT "+this.name+" uid:"+Ot+" len:"+this._set.length+" context: "+Et.inspect(e)),this.active===e){Po.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let n=this._set.lastIndexOf(e);n<0?(ht&&_t("??ERROR?? context exiting but not entered - ignoring: "+Et.inspect(e)),Po.ok(n>=0,`context not currently entered; can't exit.
|
|
`+Et.inspect(this)+`
|
|
`+Et.inspect(e))):(Po.ok(n,"can't remove top context"),this._set.splice(n,1))};Mr.prototype.bindEmitter=function(e){Po.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let n=this,r="context@"+this.name;function i(s){s&&(s[hd]||(s[hd]=Object.create(null)),s[hd][r]={namespace:n,context:n.active})}function o(s){if(!(s&&s[hd]))return s;let a=s,u=s[hd];return Object.keys(u).forEach(function(c){let l=u[c];a=l.namespace.bind(a,l.context)}),a}yge(e,i,o)};Mr.prototype.fromException=function(e){return e[md]};function R6(t){return process.namespaces[t]}function xge(t){Po.ok(t,"namespace must be given a name."),ht&&_t("CREATING NAMESPACE "+t);let e=new Mr(t);return e.id=Ot,gl.addHooks({init(n,r,i,o,s){Ot=n,o?(e._contexts.set(n,e._contexts.get(o)),ht&&_t("PARENTID: "+t+" uid:"+n+" parent:"+o+" provider:"+i)):e._contexts.set(Ot,e.active),ht&&_t("INIT "+t+" uid:"+n+" parent:"+o+" provider:"+A6[i]+" active:"+Et.inspect(e.active,!0))},pre(n,r){Ot=n;let i=e._contexts.get(n);i?(ht&&_t(" PRE "+t+" uid:"+n+" handle:"+Iy(r)+" context:"+Et.inspect(i)),e.enter(i)):ht&&_t(" PRE MISSING CONTEXT "+t+" uid:"+n+" handle:"+Iy(r))},post(n,r){Ot=n;let i=e._contexts.get(n);i?(ht&&_t(" POST "+t+" uid:"+n+" handle:"+Iy(r)+" context:"+Et.inspect(i)),e.exit(i)):ht&&_t(" POST MISSING CONTEXT "+t+" uid:"+n+" handle:"+Iy(r))},destroy(n){Ot=n,ht&&_t("DESTROY "+t+" uid:"+n+" context:"+Et.inspect(e._contexts.get(Ot))+" active:"+Et.inspect(e.active,!0)),e._contexts.delete(n)}}),process.namespaces[t]=e,e}function P6(t){let e=R6(t);Po.ok(e,`can't delete nonexistent namespace! "`+t+'"'),Po.ok(e.id,"don't assign to process.namespaces directly! "+Et.inspect(e)),process.namespaces[t]=null}function _ge(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){P6(t)}),process.namespaces=Object.create(null)}process.namespaces={};gl._state&&!gl._state.enabled&&gl.enable();function _t(t){process.env.DEBUG&&process._rawDebug(t)}function Iy(t){if(!t)return t;if(typeof t=="function")return t.name?t.name:(t.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1];if(t.constructor&&t.constructor.name)return t.constructor.name}if(ht){xI=vI();for(I6 in xI.filter._modifiers)xI.filter.deattach(I6)}var xI,I6});var D6=x((AGe,_I)=>{"use strict";var Ege=n6();process&&Ege.gte(process.versions.node,"8.0.0")?_I.exports=l6():_I.exports=N6()});var X6=x((ve,K6)=>{ve=K6.exports=Ae;var $e;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?$e=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:$e=function(){};ve.SEMVER_SPEC_VERSION="2.0.0";var gd=256,Ay=Number.MAX_SAFE_INTEGER||9007199254740991,EI=16,bge=gd-6,vd=ve.re=[],Xe=ve.safeRe=[],B=ve.src=[],Te=0,TI="[a-zA-Z0-9-]",bI=[["\\s",1],["\\d",gd],[TI,bge]];function Ly(t){for(var e=0;e<bI.length;e++){var n=bI[e][0],r=bI[e][1];t=t.split(n+"*").join(n+"{0,"+r+"}").split(n+"+").join(n+"{1,"+r+"}")}return t}var vl=Te++;B[vl]="0|[1-9]\\d*";var yl=Te++;B[yl]="\\d+";var II=Te++;B[II]="\\d*[a-zA-Z-]"+TI+"*";var k6=Te++;B[k6]="("+B[vl]+")\\.("+B[vl]+")\\.("+B[vl]+")";var F6=Te++;B[F6]="("+B[yl]+")\\.("+B[yl]+")\\.("+B[yl]+")";var wI=Te++;B[wI]="(?:"+B[vl]+"|"+B[II]+")";var SI=Te++;B[SI]="(?:"+B[yl]+"|"+B[II]+")";var AI=Te++;B[AI]="(?:-("+B[wI]+"(?:\\."+B[wI]+")*))";var RI=Te++;B[RI]="(?:-?("+B[SI]+"(?:\\."+B[SI]+")*))";var CI=Te++;B[CI]=TI+"+";var xd=Te++;B[xd]="(?:\\+("+B[CI]+"(?:\\."+B[CI]+")*))";var PI=Te++,M6="v?"+B[k6]+B[AI]+"?"+B[xd]+"?";B[PI]="^"+M6+"$";var OI="[v=\\s]*"+B[F6]+B[RI]+"?"+B[xd]+"?",NI=Te++;B[NI]="^"+OI+"$";var wl=Te++;B[wl]="((?:<|>)?=?)";var Ry=Te++;B[Ry]=B[yl]+"|x|X|\\*";var Py=Te++;B[Py]=B[vl]+"|x|X|\\*";var fc=Te++;B[fc]="[v=\\s]*("+B[Py]+")(?:\\.("+B[Py]+")(?:\\.("+B[Py]+")(?:"+B[AI]+")?"+B[xd]+"?)?)?";var _l=Te++;B[_l]="[v=\\s]*("+B[Ry]+")(?:\\.("+B[Ry]+")(?:\\.("+B[Ry]+")(?:"+B[RI]+")?"+B[xd]+"?)?)?";var q6=Te++;B[q6]="^"+B[wl]+"\\s*"+B[fc]+"$";var U6=Te++;B[U6]="^"+B[wl]+"\\s*"+B[_l]+"$";var j6=Te++;B[j6]="(?:^|[^\\d])(\\d{1,"+EI+"})(?:\\.(\\d{1,"+EI+"}))?(?:\\.(\\d{1,"+EI+"}))?(?:$|[^\\d])";var ky=Te++;B[ky]="(?:~>?)";var El=Te++;B[El]="(\\s*)"+B[ky]+"\\s+";vd[El]=new RegExp(B[El],"g");Xe[El]=new RegExp(Ly(B[El]),"g");var wge="$1~",$6=Te++;B[$6]="^"+B[ky]+B[fc]+"$";var H6=Te++;B[H6]="^"+B[ky]+B[_l]+"$";var Fy=Te++;B[Fy]="(?:\\^)";var bl=Te++;B[bl]="(\\s*)"+B[Fy]+"\\s+";vd[bl]=new RegExp(B[bl],"g");Xe[bl]=new RegExp(Ly(B[bl]),"g");var Sge="$1^",B6=Te++;B[B6]="^"+B[Fy]+B[fc]+"$";var G6=Te++;B[G6]="^"+B[Fy]+B[_l]+"$";var DI=Te++;B[DI]="^"+B[wl]+"\\s*("+OI+")$|^$";var LI=Te++;B[LI]="^"+B[wl]+"\\s*("+M6+")$|^$";var pc=Te++;B[pc]="(\\s*)"+B[wl]+"\\s*("+OI+"|"+B[fc]+")";vd[pc]=new RegExp(B[pc],"g");Xe[pc]=new RegExp(Ly(B[pc]),"g");var Cge="$1$2$3",z6=Te++;B[z6]="^\\s*("+B[fc]+")\\s+-\\s+("+B[fc]+")\\s*$";var V6=Te++;B[V6]="^\\s*("+B[_l]+")\\s+-\\s+("+B[_l]+")\\s*$";var W6=Te++;B[W6]="(<|>)?=?\\s*\\*";for(ki=0;ki<Te;ki++)$e(ki,B[ki]),vd[ki]||(vd[ki]=new RegExp(B[ki]),Xe[ki]=new RegExp(Ly(B[ki])));var ki;ve.parse=dc;function dc(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Ae)return t;if(typeof t!="string"||t.length>gd)return null;var n=e.loose?Xe[NI]:Xe[PI];if(!n.test(t))return null;try{return new Ae(t,e)}catch{return null}}ve.valid=Tge;function Tge(t,e){var n=dc(t,e);return n?n.version:null}ve.clean=Ige;function Ige(t,e){var n=dc(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null}ve.SemVer=Ae;function Ae(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Ae){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>gd)throw new TypeError("version is longer than "+gd+" characters");if(!(this instanceof Ae))return new Ae(t,e);$e("SemVer",t,e),this.options=e,this.loose=!!e.loose;var n=t.trim().match(e.loose?Xe[NI]:Xe[PI]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ay||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ay||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ay||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(function(r){if(/^[0-9]+$/.test(r)){var i=+r;if(i>=0&&i<Ay)return i}return r}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}Ae.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};Ae.prototype.toString=function(){return this.version};Ae.prototype.compare=function(t){return $e("SemVer.compare",this.version,this.options,t),t instanceof Ae||(t=new Ae(t,this.options)),this.compareMain(t)||this.comparePre(t)};Ae.prototype.compareMain=function(t){return t instanceof Ae||(t=new Ae(t,this.options)),xl(this.major,t.major)||xl(this.minor,t.minor)||xl(this.patch,t.patch)};Ae.prototype.comparePre=function(t){if(t instanceof Ae||(t=new Ae(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var n=this.prerelease[e],r=t.prerelease[e];if($e("prerelease compare",e,n,r),n===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(n===void 0)return-1;if(n===r)continue;return xl(n,r)}while(++e)};Ae.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};ve.inc=Age;function Age(t,e,n,r){typeof n=="string"&&(r=n,n=void 0);try{return new Ae(t,n).inc(e,r).version}catch{return null}}ve.diff=Rge;function Rge(t,e){if(kI(t,e))return null;var n=dc(t),r=dc(e),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if((s==="major"||s==="minor"||s==="patch")&&n[s]!==r[s])return i+s;return o}ve.compareIdentifiers=xl;var L6=/^[0-9]+$/;function xl(t,e){var n=L6.test(t),r=L6.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1}ve.rcompareIdentifiers=Pge;function Pge(t,e){return xl(e,t)}ve.major=Oge;function Oge(t,e){return new Ae(t,e).major}ve.minor=Nge;function Nge(t,e){return new Ae(t,e).minor}ve.patch=Dge;function Dge(t,e){return new Ae(t,e).patch}ve.compare=Oo;function Oo(t,e,n){return new Ae(t,n).compare(new Ae(e,n))}ve.compareLoose=Lge;function Lge(t,e){return Oo(t,e,!0)}ve.rcompare=kge;function kge(t,e,n){return Oo(e,t,n)}ve.sort=Fge;function Fge(t,e){return t.sort(function(n,r){return ve.compare(n,r,e)})}ve.rsort=Mge;function Mge(t,e){return t.sort(function(n,r){return ve.rcompare(n,r,e)})}ve.gt=yd;function yd(t,e,n){return Oo(t,e,n)>0}ve.lt=Oy;function Oy(t,e,n){return Oo(t,e,n)<0}ve.eq=kI;function kI(t,e,n){return Oo(t,e,n)===0}ve.neq=Y6;function Y6(t,e,n){return Oo(t,e,n)!==0}ve.gte=FI;function FI(t,e,n){return Oo(t,e,n)>=0}ve.lte=MI;function MI(t,e,n){return Oo(t,e,n)<=0}ve.cmp=Ny;function Ny(t,e,n,r){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return kI(t,n,r);case"!=":return Y6(t,n,r);case">":return yd(t,n,r);case">=":return FI(t,n,r);case"<":return Oy(t,n,r);case"<=":return MI(t,n,r);default:throw new TypeError("Invalid operator: "+e)}}ve.Comparator=qr;function qr(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof qr){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof qr))return new qr(t,e);t=t.trim().split(/\s+/).join(" "),$e("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===_d?this.value="":this.value=this.operator+this.semver.version,$e("comp",this)}var _d={};qr.prototype.parse=function(t){var e=this.options.loose?Xe[DI]:Xe[LI],n=t.match(e);if(!n)throw new TypeError("Invalid comparator: "+t);this.operator=n[1],this.operator==="="&&(this.operator=""),n[2]?this.semver=new Ae(n[2],this.options.loose):this.semver=_d};qr.prototype.toString=function(){return this.value};qr.prototype.test=function(t){return $e("Comparator.test",t,this.options.loose),this.semver===_d?!0:(typeof t=="string"&&(t=new Ae(t,this.options)),Ny(t,this.operator,this.semver,this.options))};qr.prototype.intersects=function(t,e){if(!(t instanceof qr))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var n;if(this.operator==="")return n=new lt(t.value,e),Dy(this.value,n,e);if(t.operator==="")return n=new lt(this.value,e),Dy(t.semver,n,e);var r=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),o=this.semver.version===t.semver.version,s=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),a=Ny(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=Ny(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return r||i||o&&s||a||u};ve.Range=lt;function lt(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof lt)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new lt(t.raw,e);if(t instanceof qr)return new lt(t.value,e);if(!(this instanceof lt))return new lt(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(n){return this.parseRange(n.trim())},this).filter(function(n){return n.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}lt.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};lt.prototype.toString=function(){return this.range};lt.prototype.parseRange=function(t){var e=this.options.loose,n=e?Xe[V6]:Xe[z6];t=t.replace(n,Wge),$e("hyphen replace",t),t=t.replace(Xe[pc],Cge),$e("comparator trim",t,Xe[pc]),t=t.replace(Xe[El],wge),t=t.replace(Xe[bl],Sge);var r=e?Xe[DI]:Xe[LI],i=t.split(" ").map(function(o){return Uge(o,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(o){return!!o.match(r)})),i=i.map(function(o){return new qr(o,this.options)},this),i};lt.prototype.intersects=function(t,e){if(!(t instanceof lt))throw new TypeError("a Range is required");return this.set.some(function(n){return n.every(function(r){return t.set.some(function(i){return i.every(function(o){return r.intersects(o,e)})})})})};ve.toComparators=qge;function qge(t,e){return new lt(t,e).set.map(function(n){return n.map(function(r){return r.value}).join(" ").trim().split(" ")})}function Uge(t,e){return $e("comp",t,e),t=Hge(t,e),$e("caret",t),t=jge(t,e),$e("tildes",t),t=Gge(t,e),$e("xrange",t),t=Vge(t,e),$e("stars",t),t}function On(t){return!t||t.toLowerCase()==="x"||t==="*"}function jge(t,e){return t.trim().split(/\s+/).map(function(n){return $ge(n,e)}).join(" ")}function $ge(t,e){var n=e.loose?Xe[H6]:Xe[$6];return t.replace(n,function(r,i,o,s,a){$e("tilde",t,r,i,o,s,a);var u;return On(i)?u="":On(o)?u=">="+i+".0.0 <"+(+i+1)+".0.0":On(s)?u=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0":a?($e("replaceTilde pr",a),u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+(+o+1)+".0"):u=">="+i+"."+o+"."+s+" <"+i+"."+(+o+1)+".0",$e("tilde return",u),u})}function Hge(t,e){return t.trim().split(/\s+/).map(function(n){return Bge(n,e)}).join(" ")}function Bge(t,e){$e("caret",t,e);var n=e.loose?Xe[G6]:Xe[B6];return t.replace(n,function(r,i,o,s,a){$e("caret",t,r,i,o,s,a);var u;return On(i)?u="":On(o)?u=">="+i+".0.0 <"+(+i+1)+".0.0":On(s)?i==="0"?u=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+".0 <"+(+i+1)+".0.0":a?($e("replaceCaret pr",a),i==="0"?o==="0"?u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+o+"."+(+s+1):u=">="+i+"."+o+"."+s+"-"+a+" <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+"."+s+"-"+a+" <"+(+i+1)+".0.0"):($e("no pr"),i==="0"?o==="0"?u=">="+i+"."+o+"."+s+" <"+i+"."+o+"."+(+s+1):u=">="+i+"."+o+"."+s+" <"+i+"."+(+o+1)+".0":u=">="+i+"."+o+"."+s+" <"+(+i+1)+".0.0"),$e("caret return",u),u})}function Gge(t,e){return $e("replaceXRanges",t,e),t.split(/\s+/).map(function(n){return zge(n,e)}).join(" ")}function zge(t,e){t=t.trim();var n=e.loose?Xe[U6]:Xe[q6];return t.replace(n,function(r,i,o,s,a,u){$e("xRange",t,r,i,o,s,a,u);var c=On(o),l=c||On(s),f=l||On(a),p=f;return i==="="&&p&&(i=""),c?i===">"||i==="<"?r="<0.0.0":r="*":i&&p?(l&&(s=0),a=0,i===">"?(i=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",l?o=+o+1:s=+s+1),r=i+o+"."+s+"."+a):l?r=">="+o+".0.0 <"+(+o+1)+".0.0":f&&(r=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"),$e("xRange return",r),r})}function Vge(t,e){return $e("replaceStars",t,e),t.trim().replace(Xe[W6],"")}function Wge(t,e,n,r,i,o,s,a,u,c,l,f,p){return On(n)?e="":On(r)?e=">="+n+".0.0":On(i)?e=">="+n+"."+r+".0":e=">="+e,On(u)?a="":On(c)?a="<"+(+u+1)+".0.0":On(l)?a="<"+u+"."+(+c+1)+".0":f?a="<="+u+"."+c+"."+l+"-"+f:a="<="+a,(e+" "+a).trim()}lt.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new Ae(t,this.options));for(var e=0;e<this.set.length;e++)if(Yge(this.set[e],t,this.options))return!0;return!1};function Yge(t,e,n){for(var r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(r=0;r<t.length;r++)if($e(t[r].semver),t[r].semver!==_d&&t[r].semver.prerelease.length>0){var i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}ve.satisfies=Dy;function Dy(t,e,n){try{e=new lt(e,n)}catch{return!1}return e.test(t)}ve.maxSatisfying=Kge;function Kge(t,e,n){var r=null,i=null;try{var o=new lt(e,n)}catch{return null}return t.forEach(function(s){o.test(s)&&(!r||i.compare(s)===-1)&&(r=s,i=new Ae(r,n))}),r}ve.minSatisfying=Xge;function Xge(t,e,n){var r=null,i=null;try{var o=new lt(e,n)}catch{return null}return t.forEach(function(s){o.test(s)&&(!r||i.compare(s)===1)&&(r=s,i=new Ae(r,n))}),r}ve.minVersion=Jge;function Jge(t,e){t=new lt(t,e);var n=new Ae("0.0.0");if(t.test(n)||(n=new Ae("0.0.0-0"),t.test(n)))return n;n=null;for(var r=0;r<t.set.length;++r){var i=t.set[r];i.forEach(function(o){var s=new Ae(o.semver.version);switch(o.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!n||yd(n,s))&&(n=s);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+o.operator)}})}return n&&t.test(n)?n:null}ve.validRange=Qge;function Qge(t,e){try{return new lt(t,e).range||"*"}catch{return null}}ve.ltr=Zge;function Zge(t,e,n){return qI(t,e,"<",n)}ve.gtr=eve;function eve(t,e,n){return qI(t,e,">",n)}ve.outside=qI;function qI(t,e,n,r){t=new Ae(t,r),e=new lt(e,r);var i,o,s,a,u;switch(n){case">":i=yd,o=MI,s=Oy,a=">",u=">=";break;case"<":i=Oy,o=FI,s=yd,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Dy(t,e,r))return!1;for(var c=0;c<e.set.length;++c){var l=e.set[c],f=null,p=null;if(l.forEach(function(d){d.semver===_d&&(d=new qr(">=0.0.0")),f=f||d,p=p||d,i(d.semver,f.semver,r)?f=d:s(d.semver,p.semver,r)&&(p=d)}),f.operator===a||f.operator===u||(!p.operator||p.operator===a)&&o(t,p.semver))return!1;if(p.operator===u&&s(t,p.semver))return!1}return!0}ve.prerelease=tve;function tve(t,e){var n=dc(t,e);return n&&n.prerelease.length?n.prerelease:null}ve.intersects=nve;function nve(t,e,n){return t=new lt(t,n),e=new lt(e,n),t.intersects(e)}ve.coerce=rve;function rve(t){if(t instanceof Ae)return t;if(typeof t!="string")return null;var e=t.match(Xe[j6]);return e==null?null:dc(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}});var Z6=x((RGe,Q6)=>{var ive=Zu().wrap,jI=1,$I=2,HI=4,qy=8,Ge=[],ove=0,_n=!1,As=[],Sl,BI;function GI(t,e){var n=t.length,r=e.length,i=[];if(n===0&&r===0)return i;for(var o=0;o<n;o++)i[o]=t[o];if(r===0)return i;for(var s=0;s<r;s++){var a=!0;for(o=0;o<n;o++)if(t[o].uid===e[s].uid){a=!1;break}a&&i.push(e[s])}return i}process._fatalException?(My=!1,Sl=function(e){var n=Ge.length;if(My||n===0)return!1;var r=!1;My=!0;for(var i=0;i<n;++i){var o=Ge[i];if(o.flags&qy){var s=Cl&&Cl[o.uid];r=o.error(s,e)||r}}return My=!1,As.length>0&&(Ge=As.pop()),Cl=void 0,r&&!_n},BI=function(e,n,r){var i=[];_n=!0;for(var o=0;o<r;++o){var s=n[o];if(i[s.uid]=s.data,!!(s.flags&jI)){var a=s.create(s.data);a!==void 0&&(i[s.uid]=a)}}return _n=!1,function(){Cl=i,As.push(Ge),Ge=GI(n,Ge),_n=!0;for(var u=0;u<r;++u)(n[u].flags&$I)>0&&n[u].before(this,i[n[u].uid]);_n=!1;var c=e.apply(this,arguments);for(_n=!0,u=0;u<r;++u)(n[u].flags&HI)>0&&n[u].after(this,i[n[u].uid]);return _n=!1,Ge=As.pop(),Cl=void 0,c}},ive(process,"_fatalException",function(t){return function(n){return Sl(n)||t(n)}})):(UI=!1,Sl=function(e){if(UI)throw e;for(var n=!1,r=Ge.length,i=0;i<r;++i){var o=Ge[i];o.flags&qy&&(n=o.error(null,e)||n)}if(!n&&_n)throw e},BI=function(e,n,r){var i=[];_n=!0;for(var o=0;o<r;++o){var s=n[o];if(i[s.uid]=s.data,!!(s.flags&jI)){var a=s.create(s.data);a!==void 0&&(i[s.uid]=a)}}return _n=!1,function(){var u=!1,c=!1;As.push(Ge),Ge=GI(n,Ge),_n=!0;for(var l=0;l<r;++l)(n[l].flags&$I)>0&&n[l].before(this,i[n[l].uid]);_n=!1;var f;try{f=e.apply(this,arguments)}catch(p){u=!0;for(var l=0;l<r;++l)if(Ge[l].flags&qy)try{c=Ge[l].error(i[n[l].uid],p)||c}catch(h){throw UI=!0,h}if(!c)throw process.removeListener("uncaughtException",Sl),process._originalNextTick(function(){process.addListener("uncaughtException",Sl)}),p}finally{if(!u||c){for(_n=!0,l=0;l<r;++l)(n[l].flags&HI)>0&&n[l].after(this,i[n[l].uid]);_n=!1}Ge=As.pop()}return f}},process.addListener("uncaughtException",Sl));var My,Cl,UI;function sve(t,e,n){_n=!0;for(var r=0;r<n;++r){var i=e[r];i.create&&i.create(i.data)}return _n=!1,function(){As.push(Ge),Ge=GI(e,Ge);var o=t.apply(this,arguments);return Ge=As.pop(),o}}function ave(t){var e=Ge.length;if(e===0)return t;for(var n=Ge.slice(),r=0;r<e;++r)if(n[r].flags>0)return BI(t,n,e);return sve(t,n,e)}function Fi(t,e){typeof t.create=="function"&&(this.create=t.create,this.flags|=jI),typeof t.before=="function"&&(this.before=t.before,this.flags|=$I),typeof t.after=="function"&&(this.after=t.after,this.flags|=HI),typeof t.error=="function"&&(this.error=t.error,this.flags|=qy),this.uid=++ove,this.data=e===void 0?null:e}Fi.prototype.create=void 0;Fi.prototype.before=void 0;Fi.prototype.after=void 0;Fi.prototype.error=void 0;Fi.prototype.data=void 0;Fi.prototype.uid=0;Fi.prototype.flags=0;function J6(t,e){if(typeof t!="object"||!t)throw new TypeError("callbacks argument must be an object");return t instanceof Fi?t:new Fi(t,e)}function cve(t,e){var n;t instanceof Fi?n=t:n=J6(t,e);for(var r=!1,i=0;i<Ge.length;i++)if(n===Ge[i]){r=!0;break}return r||Ge.push(n),n}function uve(t){for(var e=0;e<Ge.length;e++)if(t===Ge[e]){Ge.splice(e,1);break}}process.createAsyncListener=J6;process.addAsyncListener=cve;process.removeAsyncListener=uve;Q6.exports=ave});var tW=x((OGe,eW)=>{"use strict";eW.exports=(t,e)=>class extends t{constructor(r){var i,o;super(a);var s=this;try{r.apply(i,o)}catch(u){o[1](u)}return s;function a(u,c){i=this,o=[l,f];function l(p){return e(s,!1),u(p)}function f(p){return e(s,!1),c(p)}}}}});var cW=x(()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var oW=Zu(),jy=X6(),zn=oW.wrap,Rs=oW.massWrap,ft=Z6(),lve=require("util"),fve=jy.gte(process.version,"6.0.0"),WI=jy.gte(process.version,"7.0.0"),pve=jy.gte(process.version,"8.0.0"),dve=jy.gte(process.version,"11.0.0"),Mi=require("net");WI&&!Mi._normalizeArgs?Mi._normalizeArgs=function(t){if(t.length===0)return[{},null];var e=t[0],n={};typeof e=="object"&&e!==null?n=e:yve(e)?n.path=e:(n.port=e,t.length>1&&typeof t[1]=="string"&&(n.host=t[1]));var r=t[t.length-1];return typeof r!="function"?[n,null]:[n,r]}:!WI&&!Mi._normalizeConnectArgs&&(Mi._normalizeConnectArgs=function(t){var e={};function n(i){return(i=Number(i))>=0?i:!1}typeof t[0]=="object"&&t[0]!==null?e=t[0]:typeof t[0]=="string"&&n(t[0])===!1?e.path=t[0]:(e.port=t[0],typeof t[1]=="string"&&(e.host=t[1]));var r=t[t.length-1];return typeof r=="function"?[e,r]:[e]});"_setUpListenHandle"in Mi.Server.prototype?zn(Mi.Server.prototype,"_setUpListenHandle",nW):zn(Mi.Server.prototype,"_listen2",nW);function nW(t){return function(){this.on("connection",function(e){e._handle&&(e._handle.onread=ft(e._handle.onread))});try{return t.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=ft(this._handle.onconnection))}}}function sW(t){if(t&&t._handle){var e=t._handle;e._originalOnread||(e._originalOnread=e.onread),e.onread=ft(e._originalOnread)}}zn(Mi.Socket.prototype,"connect",function(t){return function(){var e;pve&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?e=arguments[0]:e=WI?Mi._normalizeArgs(arguments):Mi._normalizeConnectArgs(arguments),e[1]&&(e[1]=ft(e[1]));var n=t.apply(this,e);return sW(this),n}});var hve=require("http");zn(hve.Agent.prototype,"addRequest",function(t){return function(e){var n=e.onSocket;return e.onSocket=ft(function(r){return sW(r),n.apply(this,arguments)}),t.apply(this,arguments)}});var zI=require("child_process");function rW(t){Array.isArray(t.stdio)&&t.stdio.forEach(function(e){e&&e._handle&&(e._handle.onread=ft(e._handle.onread),zn(e._handle,"close",$y))}),t._handle&&(t._handle.onexit=ft(t._handle.onexit))}zI.ChildProcess?zn(zI.ChildProcess.prototype,"spawn",function(t){return function(){var e=t.apply(this,arguments);return rW(this),e}}):Rs(zI,["execFile","fork","spawn"],function(t){return function(){var e=t.apply(this,arguments);return rW(e),e}});process._fatalException||(process._originalNextTick=process.nextTick);var XI=[];process._nextDomainTick&&XI.push("_nextDomainTick");process._tickDomainCallback&&XI.push("_tickDomainCallback");Rs(process,XI,qi);zn(process,"nextTick",$y);var JI=["setTimeout","setInterval"];global.setImmediate&&JI.push("setImmediate");var aW=require("timers"),mve=global.setTimeout===aW.setTimeout;Rs(aW,JI,$y);mve&&Rs(global,JI,$y);var YI=require("dns");Rs(YI,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],qi);YI.resolveNaptr&&zn(YI,"resolveNaptr",qi);var mc=require("fs");Rs(mc,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],qi);mc.lchown&&zn(mc,"lchown",qi);mc.lchmod&&zn(mc,"lchmod",qi);mc.ftruncate&&zn(mc,"ftruncate",qi);var Ed;try{Ed=require("zlib")}catch{}Ed&&Ed.Deflate&&Ed.Deflate.prototype&&(hc=Object.getPrototypeOf(Ed.Deflate.prototype),hc._transform?zn(hc,"_transform",qi):hc.write&&hc.flush&&hc.end&&Rs(hc,["write","flush","end"],qi));var hc,KI;try{KI=require("crypto")}catch{}KI&&(VI=["pbkdf2","randomBytes"],dve||VI.push("pseudoRandomBytes"),Rs(KI,VI,qi));var VI,Uy=!!global.Promise&&Promise.toString()==="function Promise() { [native code] }"&&Promise.toString.toString()==="function toString() { [native code] }";Uy&&(iW=process.addAsyncListener({create:function(){Uy=!1}}),global.Promise.resolve(!0).then(function(){Uy=!1}),process.removeAsyncListener(iW));var iW;Uy&&gve();function gve(){var t=global.Promise;function e(s){if(!(this instanceof e))return t(s);if(typeof s!="function")return new t(s);var a,u,c=new t(l);c.__proto__=e.prototype;try{s.apply(a,u)}catch(f){u[1](f)}return c;function l(f,p){a=this,u=[d,h];function d(m){return r(c,!1),f(m)}function h(m){return r(c,!1),p(m)}}}if(lve.inherits(e,t),zn(t.prototype,"then",o),t.prototype.chain&&zn(t.prototype,"chain",o),fve)global.Promise=tW()(t,r);else{var n=["all","race","reject","resolve","accept","defer"];n.forEach(function(s){typeof t[s]=="function"&&(e[s]=t[s])}),global.Promise=e}function r(s,a){(!s.__asl_wrapper||a)&&(s.__asl_wrapper=ft(i))}function i(s,a,u,c){var l;try{return l=a.call(s,u),{returnVal:l,error:!1}}catch(f){return{errorVal:f,error:!0}}finally{l instanceof t?c.__asl_wrapper=function(){var p=l.__asl_wrapper||i;return p.apply(this,arguments)}:r(c,!0)}}function o(s){return function(){var u=this,c=s.apply(u,Array.prototype.map.call(arguments,l));return c.__asl_wrapper=function(p,d,h,m){return u.__asl_wrapper?(u.__asl_wrapper(p,function(){},null,c),c.__asl_wrapper(p,d,h,m)):i(p,d,h,m)},c;function l(f){return typeof f!="function"?f:ft(function(p){var d=(u.__asl_wrapper||i)(this,f,p,c);if(d.error)throw d.errorVal;return d.returnVal})}}}}function qi(t){var e=function(){var n,r=arguments.length-1;if(typeof arguments[r]=="function"){n=Array(arguments.length);for(var i=0;i<arguments.length-1;i++)n[i]=arguments[i];n[r]=ft(arguments[r])}return t.apply(this,n||arguments)};switch(t.length){case 1:return function(n){return arguments.length!==1?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n))};case 2:return function(n,r){return arguments.length!==2?e.apply(this,arguments):(typeof r=="function"&&(r=ft(r)),t.call(this,n,r))};case 3:return function(n,r,i){return arguments.length!==3?e.apply(this,arguments):(typeof i=="function"&&(i=ft(i)),t.call(this,n,r,i))};case 4:return function(n,r,i,o){return arguments.length!==4?e.apply(this,arguments):(typeof o=="function"&&(o=ft(o)),t.call(this,n,r,i,o))};case 5:return function(n,r,i,o,s){return arguments.length!==5?e.apply(this,arguments):(typeof s=="function"&&(s=ft(s)),t.call(this,n,r,i,o,s))};case 6:return function(n,r,i,o,s,a){return arguments.length!==6?e.apply(this,arguments):(typeof a=="function"&&(a=ft(a)),t.call(this,n,r,i,o,s,a))};default:return e}}function $y(t){var e=function(){var n;if(typeof arguments[0]=="function"){n=Array(arguments.length),n[0]=ft(arguments[0]);for(var r=1;r<arguments.length;r++)n[r]=arguments[r]}return t.apply(this,n||arguments)};switch(t.length){case 1:return function(n){return arguments.length!==1?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n))};case 2:return function(n,r){return arguments.length!==2?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n,r))};case 3:return function(n,r,i){return arguments.length!==3?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n,r,i))};case 4:return function(n,r,i,o){return arguments.length!==4?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n,r,i,o))};case 5:return function(n,r,i,o,s){return arguments.length!==5?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n,r,i,o,s))};case 6:return function(n,r,i,o,s,a){return arguments.length!==6?e.apply(this,arguments):(typeof n=="function"&&(n=ft(n)),t.call(this,n,r,i,o,s,a))};default:return e}}function vve(t){return(t=Number(t))>=0?t:!1}function yve(t){return typeof t=="string"&&vve(t)===!1}});var dW=x((LGe,pW)=>{"use strict";var No=require("assert"),xve=Sy(),bd="cls@contexts",QI="error@context";process.addAsyncListener||cW();function si(t){this.name=t,this.active=null,this._set=[],this.id=null}si.prototype.set=function(t,e){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[t]=e,e};si.prototype.get=function(t){if(this.active)return this.active[t]};si.prototype.createContext=function(){return Object.create(this.active)};si.prototype.run=function(t){var e=this.createContext();this.enter(e);try{return t(e),e}catch(n){throw n&&(n[QI]=e),n}finally{this.exit(e)}};si.prototype.runAndReturn=function(t){var e;return this.run(function(n){e=t(n)}),e};si.prototype.bind=function(t,e){e||(this.active?e=this.active:e=this.createContext());var n=this;return function(){n.enter(e);try{return t.apply(this,arguments)}catch(r){throw r&&(r[QI]=e),r}finally{n.exit(e)}}};si.prototype.enter=function(t){No.ok(t,"context must be provided for entering"),this._set.push(this.active),this.active=t};si.prototype.exit=function(t){if(No.ok(t,"context must be provided for exiting"),this.active===t){No.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}var e=this._set.lastIndexOf(t);No.ok(e>=0,"context not currently entered; can't exit"),No.ok(e,"can't remove top context"),this._set.splice(e,1)};si.prototype.bindEmitter=function(t){No.ok(t.on&&t.addListener&&t.emit,"can only bind real EEs");var e=this,n="context@"+this.name;function r(o){o&&(o[bd]||(o[bd]=Object.create(null)),o[bd][n]={namespace:e,context:e.active})}function i(o){if(!(o&&o[bd]))return o;var s=o,a=o[bd];return Object.keys(a).forEach(function(u){var c=a[u];s=c.namespace.bind(s,c.context)}),s}xve(t,r,i)};si.prototype.fromException=function(t){return t[QI]};function uW(t){return process.namespaces[t]}function _ve(t){No.ok(t,"namespace must be given a name!");var e=new si(t);return e.id=process.addAsyncListener({create:function(){return e.active},before:function(n,r){r&&e.enter(r)},after:function(n,r){r&&e.exit(r)},error:function(n){n&&e.exit(n)}}),process.namespaces[t]=e,e}function lW(t){var e=uW(t);No.ok(e,"can't delete nonexistent namespace!"),No.ok(e.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(e.id),process.namespaces[t]=null}function fW(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){lW(t)}),process.namespaces=Object.create(null)}process.namespaces||fW();pW.exports={getNamespace:uW,createNamespace:_ve,destroyNamespace:lW,reset:fW}});var Ps=x(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.CorrelationContextManager=void 0;var Tl=tt(),Eve=ay(),gc=cy(),ZI=wT(),hW=BT(),Hy=Xt(),bve=function(){function t(){}return t.getCurrentContext=function(){if(!t.enabled)return null;var e=t.session.get(t.CONTEXT_NAME);return e===void 0?null:e},t.generateContextObject=function(e,n,r,i,o,s){return n=n||e,this.enabled?{operation:{name:r,id:e,parentId:n,traceparent:o,tracestate:s},customProperties:new wve(i)}:null},t.spanToContextObject=function(e,n,r){var i=new gc;return i.traceId=e.traceId,i.spanId=e.spanId,i.traceFlag=gc.formatOpenTelemetryTraceFlags(e.traceFlags)||gc.DEFAULT_TRACE_FLAG,i.parentId=n,t.generateContextObject(i.traceId,i.parentId,r,null,i)},t.runWithContext=function(e,n){var r;if(t.enabled)try{return t.session.bind(n,(r={},r[t.CONTEXT_NAME]=e,r))()}catch(i){Tl.warn("Error binding to session context",Hy.dumpObj(i))}return n()},t.wrapEmitter=function(e){if(t.enabled)try{t.session.bindEmitter(e)}catch(n){Tl.warn("Error binding to session context",Hy.dumpObj(n))}},t.wrapCallback=function(e,n){var r;if(t.enabled)try{return t.session.bind(e,n?(r={},r[t.CONTEXT_NAME]=n,r):void 0)}catch(i){Tl.warn("Error binding to session context",Hy.dumpObj(i))}return e},t.enable=function(e){if(!this.enabled){if(!this.isNodeVersionCompatible()){this.enabled=!1;return}t.hasEverEnabled||(this.forceClsHooked=e,this.hasEverEnabled=!0,typeof this.cls>"u"&&(t.forceClsHooked===!0||t.forceClsHooked===void 0&&t.shouldUseClsHooked()?this.cls=D6():this.cls=dW()),t.session=this.cls.createNamespace("AI-CLS-Session"),Eve.registerContextPreservation(function(n){try{return t.session.bind(n)}catch(r){Tl.warn("Error binding to session context",Hy.dumpObj(r))}})),this.enabled=!0}},t.startOperation=function(e,n){var r=e&&e.traceContext||null,i=e&&e.spanContext?e:null,o=e&&e.traceId?e:null,s=e&&e.headers;if(i)return this.spanToContextObject(i.spanContext(),i.parentSpanId,i.name);if(o)return this.spanToContextObject(o,"|"+o.traceId+"."+o.spanId+".",typeof n=="string"?n:"");var a=typeof n=="string"?n:"";if(r){var u=null,c=null;if(a=r.attributes.OperationName||a,n){var l=n;l.headers&&(l.headers.traceparent?u=new gc(l.headers.traceparent):l.headers["request-id"]&&(u=new gc(null,l.headers["request-id"])),l.headers.tracestate&&(c=new ZI(l.headers.tracestate)))}u||(u=new gc(r.traceParent||r.traceparent)),c||(c=new ZI(r.traceState||r.tracestate));var f=void 0;if(typeof n=="object"){var p=new hW(n);f=p.getCorrelationContextHeader(),a=p.getOperationName({})}var d=t.generateContextObject(u.traceId,u.parentId,a,f,u,c);return d}if(s){var u=new gc(s.traceparent?s.traceparent.toString():null),c=new ZI(s.tracestate?s.tracestate.toString():null),p=new hW(e),d=t.generateContextObject(u.traceId,u.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),u,c);return d}return Tl.warn("startOperation was called with invalid arguments",arguments),null},t.disable=function(){this.enabled=!1},t.reset=function(){t.hasEverEnabled&&(t.session=null,t.session=this.cls.createNamespace("AI-CLS-Session"))},t.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},t.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},t.canUseClsHooked=function(){var e=process.versions.node.split("."),n=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,r=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,i=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(n&&r)&&i},t.enabled=!1,t.hasEverEnabled=!1,t.forceClsHooked=void 0,t.CONTEXT_NAME="ApplicationInsights-Context",t}();By.CorrelationContextManager=bve;var wve=function(){function t(e){this.props=[],this.addHeaderData(e)}return t.prototype.addHeaderData=function(e){var n=e?e.split(", "):[];this.props=n.map(function(r){var i=r.split("=");return{key:i[0],value:i[1]}}).concat(this.props)},t.prototype.serializeToHeader=function(){return this.props.map(function(e){return e.key+"="+e.value}).join(", ")},t.prototype.getProperty=function(e){for(var n=0;n<this.props.length;++n){var r=this.props[n];if(r.key===e)return r.value}},t.prototype.setProperty=function(e,n){if(t.bannedCharacters.test(e)||t.bannedCharacters.test(n)){Tl.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+e+" and value: "+n);return}for(var r=0;r<this.props.length;++r){var i=this.props[r];if(i.key===e){i.value=n;return}}this.props.push({key:e,value:n})},t.bannedCharacters=/[,=]/,t}()});var mW=x(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.dispose=Il.enable=void 0;var Gy=yn(),Sve=at(),zy=dt(),Os=[],eA=function(t){var e=t.data.message;Os.forEach(function(n){e instanceof Error&&!n.config.enableLoggerErrorToTrace?n.trackException({exception:e}):e instanceof Error?n.trackTrace({message:e.toString(),severity:t.data.stderr?Gy.SeverityLevel.Error:Gy.SeverityLevel.Information}):(e.lastIndexOf(`
|
|
`)==e.length-1&&(e=e.substring(0,e.length-1)),n.trackTrace({message:e,severity:t.data.stderr?Gy.SeverityLevel.Warning:Gy.SeverityLevel.Information}))})};function Cve(t,e){if(t){var n=Os.find(function(r){return r==e});if(n)return;Os.length===0&&zy.channel.subscribe("console",eA,zy.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Sve.StatsbeatInstrumentation.CONSOLE)}),Os.push(e)}else Os=Os.filter(function(r){return r!=e}),Os.length===0&&zy.channel.unsubscribe("console",eA)}Il.enable=Cve;function Tve(){zy.channel.unsubscribe("console",eA),Os=[]}Il.dispose=Tve});var gW=x(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.dispose=Rl.enable=void 0;var Al=yn(),Ive=at(),Vy=dt(),Ns=[],Ave={10:Al.SeverityLevel.Verbose,20:Al.SeverityLevel.Verbose,30:Al.SeverityLevel.Information,40:Al.SeverityLevel.Warning,50:Al.SeverityLevel.Error,60:Al.SeverityLevel.Critical},tA=function(t){var e=t.data.result,n=Ave[t.data.level];Ns.forEach(function(r){try{var i=JSON.parse(e);if(i.err){var o=new Error(i.err.message);if(o.name=i.err.name,o.stack=i.err.stack,r.config.enableLoggerErrorToTrace){r.trackTrace({message:e,severity:n});return}r.trackException({exception:o});return}}catch{}r.trackTrace({message:e,severity:n})})};function Rve(t,e){if(t){var n=Ns.find(function(r){return r==e});if(n)return;Ns.length===0&&Vy.channel.subscribe("bunyan",tA,Vy.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Ive.StatsbeatInstrumentation.BUNYAN)}),Ns.push(e)}else Ns=Ns.filter(function(r){return r!=e}),Ns.length===0&&Vy.channel.unsubscribe("bunyan",tA)}Rl.enable=Rve;function Pve(){Vy.channel.unsubscribe("bunyan",tA),Ns=[]}Rl.dispose=Pve});var vW=x(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.dispose=Pl.enable=void 0;var Ove=at(),Zt=yn(),Wy=dt(),Ds=[],Nve={syslog:function(t){var e={emerg:Zt.SeverityLevel.Critical,alert:Zt.SeverityLevel.Critical,crit:Zt.SeverityLevel.Critical,error:Zt.SeverityLevel.Error,warning:Zt.SeverityLevel.Warning,notice:Zt.SeverityLevel.Information,info:Zt.SeverityLevel.Information,debug:Zt.SeverityLevel.Verbose};return e[t]===void 0?Zt.SeverityLevel.Information:e[t]},npm:function(t){var e={error:Zt.SeverityLevel.Error,warn:Zt.SeverityLevel.Warning,info:Zt.SeverityLevel.Information,verbose:Zt.SeverityLevel.Verbose,debug:Zt.SeverityLevel.Verbose,silly:Zt.SeverityLevel.Verbose};return e[t]===void 0?Zt.SeverityLevel.Information:e[t]},unknown:function(t){return Zt.SeverityLevel.Information}},nA=function(t){var e=t.data.message,n=Nve[t.data.levelKind](t.data.level);Ds.forEach(function(r){e instanceof Error&&!r.config.enableLoggerErrorToTrace?r.trackException({exception:e,properties:t.data.meta}):e instanceof Error?r.trackTrace({message:e.toString(),severity:n,properties:t.data.meta}):r.trackTrace({message:e,severity:n,properties:t.data.meta})})};function Dve(t,e){if(t){var n=Ds.find(function(r){return r==e});if(n)return;Ds.length===0&&Wy.channel.subscribe("winston",nA,Wy.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Ove.StatsbeatInstrumentation.WINSTON)}),Ds.push(e)}else Ds=Ds.filter(function(r){return r!=e}),Ds.length===0&&Wy.channel.unsubscribe("winston",nA)}Pl.enable=Dve;function Lve(){Wy.channel.unsubscribe("winston",nA),Ds=[]}Pl.dispose=Lve});var xW=x((UGe,yW)=>{"use strict";var kve=ay(),Fve=function(){function t(e){if(t.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=e,t.INSTANCE=this}return t.prototype.enable=function(e,n){kve.IsInitialized&&(mW().enable(e&&n,this._client),gW().enable(e,this._client),vW().enable(e,this._client))},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1,!1)},t._methodNames=["debug","info","log","warn","error"],t}();yW.exports=Fve});var EW=x((jGe,_W)=>{"use strict";var Mve=function(){function t(e){if(t.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");t.INSTANCE=this,this._client=e;var n=process.versions.node.split(".");t._canUseUncaughtExceptionMonitor=parseInt(n[0])>13||parseInt(n[0])===13&&parseInt(n[1])>=7}return t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.enable=function(e){var n=this;if(e){if(this._isInitialized=!0,!this._exceptionListenerHandle){var r=function(i,o,s){s===void 0&&(s=new Error(t._FALLBACK_ERROR_MESSAGE));var a={exception:s};a.contextObjects={},a.contextObjects.Error=s,n._client.trackException(a),n._client.flush({isAppCrashing:!0}),i&&o&&process.listeners(o).length===1&&(console.error(s),process.exit(1))};t._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=r.bind(this,!1,void 0),process.on(t.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=r.bind(this,!0,t.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=r.bind(this,!1,void 0),process.on(t.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(t.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(t._canUseUncaughtExceptionMonitor?process.removeListener(t.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(t.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(t.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t.INSTANCE=null,t.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",t.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",t.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",t._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",t._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",t._canUseUncaughtExceptionMonitor=!1,t}();_W.exports=Mve});var Ky=x(($Ge,bW)=>{"use strict";var Yy=require("os"),Ur=at(),qve=function(){function t(e,n,r){n===void 0&&(n=6e4),r===void 0&&(r=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,t.INSTANCE||(t.INSTANCE=this),this._lastRequests={totalRequestCount:0,totalFailedRequestCount:0,time:0},this._lastDependencies={totalDependencyCount:0,totalFailedDependencyCount:0,time:0},this._lastExceptions={totalExceptionCount:0,time:0},this._isInitialized=!1,this._client=e,this._collectionInterval=n,this._enableLiveMetricsCounters=r}return t.prototype.enable=function(e,n){var r=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._lastCpus=Yy.cpus(),this._lastRequests={totalRequestCount:t._totalRequestCount,totalFailedRequestCount:t._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:t._totalDependencyCount,totalFailedDependencyCount:t._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:t._totalExceptionCount,time:+new Date},typeof process.cpuUsage=="function"&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=n||this._collectionInterval,this._handle=setInterval(function(){return r.trackPerformance()},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},t.countRequest=function(e,n){var r;if(t.isEnabled()){if(typeof e=="string")r=+new Date("1970-01-01T"+e+"Z");else if(typeof e=="number")r=e;else return;t._intervalRequestExecutionTime+=r,n===!1&&t._totalFailedRequestCount++,t._totalRequestCount++}},t.countException=function(){t._totalExceptionCount++},t.countDependency=function(e,n){var r;if(t.isEnabled()){if(typeof e=="string")r=+new Date("1970-01-01T"+e+"Z");else if(typeof e=="number")r=e;else return;t._intervalDependencyExecutionTime+=r,n===!1&&t._totalFailedDependencyCount++,t._totalDependencyCount++}},t.prototype.isInitialized=function(){return this._isInitialized},t.isEnabled=function(){return t.INSTANCE&&t.INSTANCE._isEnabled},t.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},t.prototype._trackCpu=function(){var e=Yy.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var n=0,r=0,i=0,o=0,s=0,a=0;e&&a<e.length;a++){var u=e[a],c=this._lastCpus[a],l="% cpu("+a+") ",f=u.model,p=u.speed,d=u.times,h=c.times,m=d.user-h.user||0;n+=m;var g=d.sys-h.sys||0;r+=g;var v=d.nice-h.nice||0;i+=v;var y=d.idle-h.idle||0;o+=y;var _=d.irq-h.irq||0;s+=_}var E=void 0;if(typeof process.cpuUsage=="function"){var C=process.cpuUsage(),L=process.hrtime(),R=C.user-this._lastAppCpuUsage.user+(C.system-this._lastAppCpuUsage.system)||0;if(typeof this._lastHrtime<"u"&&this._lastHrtime.length===2){var D=(L[0]-this._lastHrtime[0])*1e6+(L[1]-this._lastHrtime[1])/1e3||0;E=100*R/(D*e.length)}this._lastAppCpuUsage=C,this._lastHrtime=L}var O=n+r+i+o+s||1;this._client.trackMetric({name:Ur.PerformanceCounter.PROCESSOR_TIME,value:(O-o)/O*100}),this._client.trackMetric({name:Ur.PerformanceCounter.PROCESS_TIME,value:E||n/O*100})}this._lastCpus=e},t.prototype._trackMemory=function(){var e=Yy.freemem(),n=process.memoryUsage().rss,r=Yy.totalmem()-e;this._client.trackMetric({name:Ur.PerformanceCounter.PRIVATE_BYTES,value:n}),this._client.trackMetric({name:Ur.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:Ur.QuickPulseCounter.COMMITTED_BYTES,value:r})},t.prototype._trackNetwork=function(){var e=this._lastRequests,n={totalRequestCount:t._totalRequestCount,totalFailedRequestCount:t._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-e.totalRequestCount||0,i=n.totalFailedRequestCount-e.totalFailedRequestCount||0,o=n.time-e.time,s=o/1e3,a=(t._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/r||0;if(this._lastIntervalRequestExecutionTime=t._intervalRequestExecutionTime,o>0){var u=r/s,c=i/s;this._client.trackMetric({name:Ur.PerformanceCounter.REQUEST_RATE,value:u}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:Ur.PerformanceCounter.REQUEST_DURATION,value:a}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:Ur.QuickPulseCounter.REQUEST_FAILURE_RATE,value:c})}this._lastRequests=n},t.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var e=this._lastDependencies,n={totalDependencyCount:t._totalDependencyCount,totalFailedDependencyCount:t._totalFailedDependencyCount,time:+new Date},r=n.totalDependencyCount-e.totalDependencyCount||0,i=n.totalFailedDependencyCount-e.totalFailedDependencyCount||0,o=n.time-e.time,s=o/1e3,a=(t._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/r||0;if(this._lastIntervalDependencyExecutionTime=t._intervalDependencyExecutionTime,o>0){var u=r/s,c=i/s;this._client.trackMetric({name:Ur.QuickPulseCounter.DEPENDENCY_RATE,value:u}),this._client.trackMetric({name:Ur.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:c}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:Ur.QuickPulseCounter.DEPENDENCY_DURATION,value:a})}this._lastDependencies=n}},t.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var e=this._lastExceptions,n={totalExceptionCount:t._totalExceptionCount,time:+new Date},r=n.totalExceptionCount-e.totalExceptionCount||0,i=n.time-e.time,o=i/1e3;if(i>0){var s=r/o;this._client.trackMetric({name:Ur.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=n}},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t._totalRequestCount=0,t._totalFailedRequestCount=0,t._totalDependencyCount=0,t._totalFailedDependencyCount=0,t._totalExceptionCount=0,t._intervalDependencyExecutionTime=0,t._intervalRequestExecutionTime=0,t}();bW.exports=qve});var wW=x(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.AggregatedMetricCounter=void 0;var Uve=function(){function t(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}return t}();Xy.AggregatedMetricCounter=Uve});var SW=x(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.PreaggregatedMetricPropertyNames=void 0;Jy.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}});var iA=x((rA,CW)=>{"use strict";var Zy=rA&&rA.__assign||function(){return Zy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Zy.apply(this,arguments)},Qy=at(),jve=wW(),$ve=SW(),Hve=function(){function t(e,n){n===void 0&&(n=6e4),t.INSTANCE||(t.INSTANCE=this),this._isInitialized=!1,t._dependencyCountersCollection=[],t._requestCountersCollection=[],t._exceptionCountersCollection=[],t._traceCountersCollection=[],this._client=e,this._collectionInterval=n}return t.prototype.enable=function(e,n){var r=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._collectionInterval=n||this._collectionInterval,this._handle=setInterval(function(){return r.trackPreAggregatedMetrics()},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},t.countException=function(e){if(t.isEnabled()){var n=t._getAggregatedCounter(e,this._exceptionCountersCollection);n.totalCount++}},t.countTrace=function(e){if(t.isEnabled()){var n=t._getAggregatedCounter(e,this._traceCountersCollection);n.totalCount++}},t.countRequest=function(e,n){if(t.isEnabled()){var r,i=t._getAggregatedCounter(n,this._requestCountersCollection);if(typeof e=="string")r=+new Date("1970-01-01T"+e+"Z");else if(typeof e=="number")r=e;else return;i.intervalExecutionTime+=r,i.totalCount++}},t.countDependency=function(e,n){if(t.isEnabled()){var r=t._getAggregatedCounter(n,this._dependencyCountersCollection),i;if(typeof e=="string")i=+new Date("1970-01-01T"+e+"Z");else if(typeof e=="number")i=e;else return;r.intervalExecutionTime+=i,r.totalCount++}},t.prototype.isInitialized=function(){return this._isInitialized},t.isEnabled=function(){return t.INSTANCE&&t.INSTANCE._isEnabled},t.prototype.trackPreAggregatedMetrics=function(){this._trackRequestMetrics(),this._trackDependencyMetrics(),this._trackExceptionMetrics(),this._trackTraceMetrics()},t._getAggregatedCounter=function(e,n){for(var r=!1,i=0;i<n.length;i++){if(e===n[i].dimensions)return n[i];if(Object.keys(e).length===Object.keys(n[i].dimensions).length){for(var o in e)if(e[o]!=n[i].dimensions[o]){r=!0;break}if(!r)return n[i];r=!1}}var s=new jve.AggregatedMetricCounter(e);return n.push(s),s},t.prototype._trackRequestMetrics=function(){for(var e=0;e<t._requestCountersCollection.length;e++){var n=t._requestCountersCollection[e];n.time=+new Date;var r=n.totalCount-n.lastTotalCount||0,i=n.time-n.lastTime,o=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/r||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,i>0&&r>0&&this._trackPreAggregatedMetric({name:"Server response time",dimensions:n.dimensions,value:o,count:r,aggregationInterval:i,metricType:Qy.MetricId.REQUESTS_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},t.prototype._trackDependencyMetrics=function(){for(var e=0;e<t._dependencyCountersCollection.length;e++){var n=t._dependencyCountersCollection[e];n.time=+new Date;var r=n.totalCount-n.lastTotalCount||0,i=n.time-n.lastTime,o=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/r||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,i>0&&r>0&&this._trackPreAggregatedMetric({name:"Dependency duration",dimensions:n.dimensions,value:o,count:r,aggregationInterval:i,metricType:Qy.MetricId.DEPENDENCIES_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},t.prototype._trackExceptionMetrics=function(){for(var e=0;e<t._exceptionCountersCollection.length;e++){var n=t._exceptionCountersCollection[e];n.time=+new Date;var r=n.totalCount-n.lastTotalCount||0,i=n.time-n.lastTime;i>0&&r>0&&this._trackPreAggregatedMetric({name:"Exceptions",dimensions:n.dimensions,value:r,count:r,aggregationInterval:i,metricType:Qy.MetricId.EXCEPTIONS_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},t.prototype._trackTraceMetrics=function(){for(var e=0;e<t._traceCountersCollection.length;e++){var n=t._traceCountersCollection[e];n.time=+new Date;var r=n.totalCount-n.lastTotalCount||0,i=n.time-n.lastTime;i>0&&r>0&&this._trackPreAggregatedMetric({name:"Traces",dimensions:n.dimensions,value:r,count:r,aggregationInterval:i,metricType:Qy.MetricId.TRACES_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},t.prototype._trackPreAggregatedMetric=function(e){var n={};for(var r in e.dimensions)n[$ve.PreaggregatedMetricPropertyNames[r]]=e.dimensions[r];n=Zy(Zy({},n),{"_MS.MetricId":e.metricType,"_MS.AggregationIntervalMs":String(e.aggregationInterval),"_MS.IsAutocollected":"True"});var i={name:e.name,value:e.value,count:e.count,properties:n,kind:"Aggregation"};this._client.trackMetric(i)},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t}();CW.exports=Hve});var Ol=x((GGe,TW)=>{"use strict";var Do=require("os"),Bve=require("fs"),Gve=require("path"),zve=yn(),Vve=at(),Wve=tt(),Yve=function(){function t(e){this.keys=new zve.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return t.prototype._loadApplicationContext=function(e){try{if(e=e||Gve.resolve(__dirname,"../../../../package.json"),!t.appVersion[e]){t.appVersion[e]="unknown";var n=JSON.parse(Bve.readFileSync(e,"utf8"));n&&typeof n.version=="string"&&(t.appVersion[e]=n.version)}this.tags[this.keys.applicationVersion]=t.appVersion[e]}catch(r){Wve.info("Failed to read app version: ",r)}},t.prototype._loadDeviceContext=function(){var e=Do&&Do.hostname(),n=t.DefaultRoleName;process.env.WEBSITE_SITE_NAME&&(n=process.env.WEBSITE_SITE_NAME),process.env.WEBSITE_INSTANCE_ID&&(e=process.env.WEBSITE_INSTANCE_ID),this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=e,this.tags[this.keys.deviceOSVersion]=Do&&Do.type()+" "+Do.release(),this.tags[this.keys.cloudRole]=n,this.tags["ai.device.osArchitecture"]=Do&&Do.arch(),this.tags["ai.device.osPlatform"]=Do&&Do.platform()},t.prototype._loadInternalContext=function(){t.sdkVersion=Vve.APPLICATION_INSIGHTS_SDK_VERSION,this.tags[this.keys.internalSdkVersion]="node:"+t.sdkVersion},t.DefaultRoleName="Web",t.appVersion={},t.sdkVersion=null,t}();TW.exports=Yve});var RW=x((zGe,AW)=>{"use strict";var Kve=require("crypto"),IW=require("os"),Xve=at(),Jve=Ol(),Qve=function(){function t(e){this._collectionInterval=9e5,t.INSTANCE||(t.INSTANCE=this),this._isInitialized=!1,this._client=e}return t.prototype.enable=function(e){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._handle=setInterval(function(){return n.trackHeartBeat(n._client.config,function(){})},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=null)},t.prototype.isInitialized=function(){return this._isInitialized},t.isEnabled=function(){return t.INSTANCE&&t.INSTANCE._isEnabled},t.prototype.trackHeartBeat=function(e,n){var r={},i=Jve.sdkVersion;r.sdkVersion=i,r.osType=IW.type(),r.osVersion=IW.release(),this._uniqueProcessId||(this._uniqueProcessId=Kve.randomBytes(16).toString("hex")),r.processSessionId=this._uniqueProcessId,process.env.WEBSITE_SITE_NAME&&(r.appSrv_SiteName=process.env.WEBSITE_SITE_NAME),process.env.WEBSITE_HOME_STAMPNAME&&(r.appSrv_wsStamp=process.env.WEBSITE_HOME_STAMPNAME),process.env.WEBSITE_HOSTNAME&&(r.appSrv_wsHost=process.env.WEBSITE_HOSTNAME),process.env.WEBSITE_OWNER_NAME&&(r.appSrv_wsOwner=process.env.WEBSITE_OWNER_NAME),process.env.WEBSITE_RESOURCE_GROUP&&(r.appSrv_ResourceGroup=process.env.WEBSITE_RESOURCE_GROUP),process.env.WEBSITE_SLOT_NAME&&(r.appSrv_SlotName=process.env.WEBSITE_SLOT_NAME),this._client.trackMetric({name:Xve.HeartBeatMetricName,value:0,properties:r}),n()},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t}();AW.exports=Qve});var PW=x(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.isContentTypeHeaderHtml=ye.insertSnippetByIndex=ye.getContentEncodingFromHeaders=ye.isSupportedContentEncoding=ye.findBufferEncodingType=ye.isBufferType=ye.getBrotliDecompressSync=ye.getBrotliDecompressAsync=ye.getBrotliCompressSync=ye.getBrotliCompressAsync=ye.inflateAsync=ye.deflateAsync=ye.gunzipAsync=ye.gzipAsync=ye.isBrotliSupperted=ye.bufferEncodingTypes=ye.contentEncodingMethod=void 0;var tx=require("zlib"),Nl=require("util"),ex;(function(t){t.GZIP="gzip",t.DEFLATE="deflate",t.BR="br"})(ex=ye.contentEncodingMethod||(ye.contentEncodingMethod={}));ye.bufferEncodingTypes=["utf8","utf16le","latin1","base64","hex","ascii","binary","ucs2"];var Zve=function(){var t=process.versions.node.split(".")[0];return parseInt(t)>=10};ye.isBrotliSupperted=Zve;ye.gzipAsync=Nl.promisify(tx.gzip);ye.gunzipAsync=Nl.promisify(tx.gunzip);ye.deflateAsync=Nl.promisify(tx.deflate);ye.inflateAsync=Nl.promisify(tx.inflate);var eye=function(t){var e=ye.isBrotliSupperted();return e&&typeof t.brotliCompress=="function"?Nl.promisify(t.brotliCompress):null};ye.getBrotliCompressAsync=eye;var tye=function(t){var e=ye.isBrotliSupperted();return e&&typeof t.brotliCompressSync=="function"?t.brotliCompressSync:null};ye.getBrotliCompressSync=tye;var nye=function(t){var e=ye.isBrotliSupperted();return e&&typeof t.brotliDecompress=="function"?Nl.promisify(t.brotliDecompress):null};ye.getBrotliDecompressAsync=nye;var rye=function(t){var e=ye.isBrotliSupperted();return e&&typeof t.brotliDecompressSync=="function"?t.brotliDecompressSync:null};ye.getBrotliDecompressSync=rye;var iye=function(t,e){var n=e||"utf8",r=!1;if(Buffer.isEncoding(n)){var i=Buffer.from(t.toString(n),n);r=i.toJSON().data.toString()===t.toJSON().data.toString()}return r};ye.isBufferType=iye;var oye=function(t){var e=null;for(var n in ye.bufferEncodingTypes){var r=ye.bufferEncodingTypes[n];if(Buffer.isEncoding(r)&&ye.isBufferType(t,r)){e=r;break}}return e};ye.findBufferEncodingType=oye;var sye=function(t){var e=null;switch(t){case"gzip":e=ex.GZIP;break;case"br":e=ex.BR;break;case"deflate":e=ex.DEFLATE;break;default:}return e};ye.isSupportedContentEncoding=sye;var aye=function(t){var e=[],n=t.getHeader("Content-Encoding");if(!n)return null;if(typeof n=="string"){var r=ye.isSupportedContentEncoding(n);r&&e.push(r)}return e};ye.getContentEncodingFromHeaders=aye;var cye=function(t,e,n){if(t<0)return null;var r=null,i=e.substring(0,t),o=e.substring(t);return r=i+'<script type="text/javascript">'+n+"</script>"+o,r};ye.insertSnippetByIndex=cye;var uye=function(t){var e=!1,n=t.getHeader("Content-Type");return n&&(typeof n=="string"?e=n.indexOf("html")>=0:e=n.toString().indexOf("html")>=0),e};ye.isContentTypeHeaderHtml=uye});var OW=x(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.getResourceProvider=Gt.getOsPrefix=Gt.isFunctionApp=Gt.isWebApp=Gt.isLinux=Gt.isWindows=void 0;var lye=function(){return process.platform==="win32"};Gt.isWindows=lye;var fye=function(){return process.platform==="linux"};Gt.isLinux=fye;var pye=function(){return!!process.env.WEBSITE_SITE_NAME};Gt.isWebApp=pye;var dye=function(){return!!process.env.FUNCTIONS_WORKER_RUNTIME};Gt.isFunctionApp=dye;var hye=function(){return Gt.isWindows()?"w":Gt.isLinux()?"l":"u"};Gt.getOsPrefix=hye;var mye=function(){return Gt.isWebApp()?"a":Gt.isFunctionApp()?"f":"u"};Gt.getResourceProvider=mye});var oA=x((YGe,DW)=>{"use strict";var NW=at(),gye=function(){function t(){}return t.parse=function(e){if(!e)return{};var n=e.split(t._FIELDS_SEPARATOR),r=n.reduce(function(o,s){var a=s.split(t._FIELD_KEY_VALUE_SEPARATOR);if(a.length===2){var u=a[0].toLowerCase(),c=a[1];o[u]=c}return o},{});if(Object.keys(r).length>0){if(r.endpointsuffix){var i=r.location?r.location+".":"";r.ingestionendpoint=r.ingestionendpoint||"https://"+i+"dc."+r.endpointsuffix,r.liveendpoint=r.liveendpoint||"https://"+i+"live."+r.endpointsuffix}r.ingestionendpoint=r.ingestionendpoint||NW.DEFAULT_BREEZE_ENDPOINT,r.liveendpoint=r.liveendpoint||NW.DEFAULT_LIVEMETRICS_ENDPOINT}return r},t.isIkeyValid=function(e){if(!e||e=="")return!1;var n="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",r=new RegExp(n);return r.test(e)},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t}();DW.exports=gye});var LW={};Nn(LW,{webSnippet:()=>vye});var vye,kW=I(()=>{vye=`!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a<n.length;a++){var i=n[a].split("=");2===i.length&&(e[i[0][b]()]=i[1])}if(!e[C]){var r=e.endpointsuffix,o=r?e.location:null;e[C]="https://"+(o?o+".":"")+"dc."+(r||"services.visualstudio.com")}return e}(),c=s[D]||d[D]||"",u=s[C],p=u?u+"/v2/track":d.endpointUrl,(l=[]).push((n="SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)",a=t,i=p,(o=(r=v(c,"Exception")).data).baseType="ExceptionData",o.baseData.exceptions=[{typeName:"SDKLoadFailed",message:n.replace(/\\./g,"-"),hasFullStack:!1,stack:n+"\\nSnippet failed to load ["+a+"] -- Telemetry is disabled\\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\\nHost: "+(S&&S.pathname||"_unknown_")+"\\nEndpoint: "+i,parsedStack:[]}],r)),l.push(function(e,t,n,a){var i=v(c,"Message"),r=i.data;r.baseType="MessageData";var o=r.baseData;return o.message='AI (Internal): 99 message:"'+("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) ("+n+")").replace(/\\"/g,"")+'"',o.properties={endpoint:a},i}(0,0,t,p)),function(e,t){if(JSON){var n=T.fetch;if(n&&!y.useXhr)n(t,{method:N,body:JSON.stringify(e),mode:"cors"});else if(XMLHttpRequest){var a=new XMLHttpRequest;a.open(N,t),a.setRequestHeader("Content-type","application/json"),a.send(JSON.stringify(e))}}}(l,p))}function i(e,t){f||setTimeout(function(){!t&&m.core||a()},500)}var e=function(){var n=l.createElement(k);n.src=h;var e=y[w];return!e&&""!==e||"undefined"==n[w]||(n[w]=e),n.onload=i,n.onerror=a,n.onreadystatechange=function(e,t){"loaded"!==n.readyState&&"complete"!==n.readyState||i(0,t)},n}();y.ld<0?l.getElementsByTagName("head")[0].appendChild(e):setTimeout(function(){l.getElementsByTagName(k)[0].parentNode.appendChild(e)},y.ld||0)}try{m.cookie=l.cookie}catch(p){}function t(e){for(;e.length;)!function(t){m[t]=function(){var e=arguments;g||m.queue.push(function(){m[t].apply(m,e)})}}(e.pop())}var n="track",r="TrackPage",o="TrackEvent";t([n+"Event",n+"PageView",n+"Exception",n+"Trace",n+"DependencyData",n+"Metric",n+"PageViewPerformance","start"+r,"stop"+r,"start"+o,"stop"+o,"addTelemetryInitializer","setAuthenticatedUserContext","clearAuthenticatedUserContext","flush"]),m.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4};var s=(d.extensionConfig||{}).ApplicationInsightsAnalytics||{};if(!0!==d[I]&&!0!==s[I]){var c="onerror";t(["_"+c]);var u=T[c];T[c]=function(e,t,n,a,i){var r=u&&u(e,t,n,a,i);return!0!==r&&m["_"+c]({message:e,url:t,lineNumber:n,columnNumber:a,error:i}),r},d.autoExceptionInstrumented=!0}return m}(y.cfg);function a(){y.onInit&&y.onInit(n)}(T[t]=n).queue&&0===n.queue.length?(n.queue.push(a),n.trackPageView({})):a()}(window,document,{\r
|
|
src: "https://js.monitor.azure.com/scripts/b/ai.2.min.js", // The SDK URL Source\r
|
|
// name: "appInsights", // Global SDK Instance name defaults to "appInsights" when not supplied\r
|
|
// ld: 0, // Defines the load delay (in ms) before attempting to load the sdk. -1 = block page load and add to head. (default) = 0ms load after timeout,\r
|
|
// useXhr: 1, // Use XHR instead of fetch to report failures (if available),\r
|
|
// crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag\r
|
|
// onInit: null, // Once the application insights instance has loaded and initialized this callback function will be called with 1 argument -- the sdk instance (DO NOT ADD anything to the sdk.queue -- As they won't get called)\r
|
|
cfg: { // Application Insights Configuration\r
|
|
instrumentationKey: "INSTRUMENTATION_KEY"\r
|
|
}});`});var $W=x((KGe,jW)=>{"use strict";var FW=require("http"),MW=require("https"),Dl=require("zlib"),Ui=tt(),jr=PW(),qW=OW(),wd=at(),UW=oA(),yye=(kW(),zt(LW)),xye=function(){function t(e){var n;if(this._isIkeyValid=!0,t.INSTANCE)throw new Error("Web snippet injection should be configured from the applicationInsights object");t.INSTANCE=this,t._aiUrl=wd.WEB_INSTRUMENTATION_DEFAULT_SOURCE,t._aiDeprecatedUrl=wd.WEB_INSTRUMENTATION_DEPRECATED_SOURCE;var r=this._getWebSnippetIkey((n=e.config)===null||n===void 0?void 0:n.webInstrumentationConnectionString);this._webInstrumentationIkey=r||e.config.instrumentationKey,this._clientWebInstrumentationConfig=e.config.webInstrumentationConfig,this._clientWebInstrumentationSrc=e.config.webInstrumentationSrc,this._statsbeat=e.getStatsbeat()}return t.prototype.enable=function(e,n){this._isEnabled=e,this._webInstrumentationIkey=this._getWebSnippetIkey(n)||this._webInstrumentationIkey,t._snippet=this._getWebInstrumentationReplacedStr(),this._isEnabled&&!this._isInitialized&&this._isIkeyValid?(this._statsbeat&&this._statsbeat.addFeature(wd.StatsbeatFeature.WEB_SNIPPET),this._initialize()):this._isEnabled||this._statsbeat&&this._statsbeat.removeFeature(wd.StatsbeatFeature.WEB_SNIPPET)},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype._getWebSnippetIkey=function(e){var n=null;try{var r=UW.parse(e),i=r.instrumentationkey||"";UW.isIkeyValid(i)?(this._isIkeyValid=!0,n=i):(this._isIkeyValid=!1,Ui.info("Invalid web Instrumentation connection string, web Instrumentation is not enabled."))}catch(o){Ui.info("get web snippet ikey error: "+o)}return n},t.prototype._getWebInstrumentationReplacedStr=function(){var e=this._getClientWebInstrumentationConfigStr(this._clientWebInstrumentationConfig),n=qW.getOsPrefix(),r=qW.getResourceProvider(),i=this._webInstrumentationIkey+`",\r
|
|
`+e+` disableIkeyDeprecationMessage: true,\r
|
|
sdkExtension: "`+r+n+"d_n_",o=yye.webSnippet.replace("INSTRUMENTATION_KEY",i);return this._clientWebInstrumentationSrc?o.replace(wd.WEB_INSTRUMENTATION_DEFAULT_SOURCE+".2.min.js",this._clientWebInstrumentationSrc):o},t.prototype._getClientWebInstrumentationConfigStr=function(e){var n="";try{e!=null&&e.length>0&&e.forEach(function(r){var i=r.name;if(i!==void 0){var o=r.value,s="";switch(typeof o){case"function":break;case"object":break;case"string":s=" "+i+': "'+o+`",\r
|
|
`,n+=s;break;default:s=" "+i+": "+o+`,\r
|
|
`,n+=s;break}}})}catch{this._isEnabled=!1,Ui.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return n},t.prototype._initialize=function(){this._isInitialized=!0;var e=FW.createServer,n=MW.createServer,r=this._isEnabled;FW.createServer=function(i){var o=i;return o&&(i=function(s,a){var u=a.write,c=s.method=="GET";a.write=function(p,d,h){try{if(r&&c){var m=jr.getContentEncodingFromHeaders(a),g=void 0;if(typeof d=="string"&&(g=d),m==null)t.INSTANCE.ValidateInjection(a,p)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(a,p,void 0,g));else if(m.length){var v=m[0];arguments[0]=t.INSTANCE.InjectWebSnippet(a,p,v)}}}catch(y){Ui.warn("Inject snippet error: "+y)}return u.apply(a,arguments)};var l=a.end;return a.end=function(p,d,h){if(r&&c)try{if(r&&c){var m=jr.getContentEncodingFromHeaders(a),g=void 0;if(typeof d=="string"&&(g=d),m==null)t.INSTANCE.ValidateInjection(a,p)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(a,p,void 0,g));else if(m.length){var v=m[0];arguments[0]=t.INSTANCE.InjectWebSnippet(a,p,v)}}}catch(y){Ui.warn("Inject snipet error: "+y)}return l.apply(a,arguments)},o(s,a)}),e(i)},MW.createServer=function(i,o){var s=o;if(s)return o=function(a,u){var c=a.method=="GET",l=u.write,f=u.end;return u.write=function(d,h,m){try{if(r&&c){var g=jr.getContentEncodingFromHeaders(u),v=void 0;if(typeof h=="string"&&(v=h),g==null)t.INSTANCE.ValidateInjection(u,d)&&(arguments[0]=this.InjectWebSnippet(u,d,void 0,v));else if(g.length){var y=g[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,d,y)}}}catch(_){Ui.warn("Inject snippet error: "+_)}return l.apply(u,arguments)},u.end=function(d,h,m){try{if(r&&c){var g=jr.getContentEncodingFromHeaders(u),v=void 0;if(typeof h=="string"&&(v=h),g==null)t.INSTANCE.ValidateInjection(u,d)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(u,d,void 0,v));else if(g.length){var y=g[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,d,y)}}}catch(_){Ui.warn("Inject snippet error: "+_)}return f.apply(u,arguments)},s(a,u)},n(i,o)}},t.prototype.ValidateInjection=function(e,n){try{if(!e||!n||e.statusCode!=200)return!1;var r=jr.isContentTypeHeaderHtml(e);if(!r)return!1;var i=n.slice().toString();if(i.indexOf("<head>")>=0&&i.indexOf("</head>")>=0&&i.indexOf(t._aiUrl)<0&&i.indexOf(t._aiDeprecatedUrl)<0)return!0}catch(o){Ui.info("validate injections error: "+o)}return!1},t.prototype.InjectWebSnippet=function(e,n,r,i){try{var o=!!r;if(o)e.removeHeader("Content-Length"),n=this._getInjectedCompressBuffer(e,n,r),e.setHeader("Content-Length",n.length);else{var s=n.toString(),a=s.indexOf("</head>");if(a<0)return n;var u=jr.insertSnippetByIndex(a,s,t._snippet);if(typeof n=="string")e.removeHeader("Content-Length"),n=u,e.setHeader("Content-Length",Buffer.byteLength(n));else if(Buffer.isBuffer(n)){var c=i||"utf8",l=jr.isBufferType(n,c);if(l){e.removeHeader("Content-Length");var f=Buffer.from(u).toString(c);n=Buffer.from(f,c),e.setHeader("Content-Length",n.length)}}}}catch(p){Ui.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+p)}return n},t.prototype._getInjectedCompressBuffer=function(e,n,r){try{switch(r){case jr.contentEncodingMethod.GZIP:var i=Dl.gunzipSync(n);if(this.ValidateInjection(e,i)){var o=this.InjectWebSnippet(e,i);n=Dl.gzipSync(o)}break;case jr.contentEncodingMethod.DEFLATE:var s=Dl.inflateSync(n);if(this.ValidateInjection(e,s)){var a=this.InjectWebSnippet(e,s);n=Dl.deflateSync(a)}break;case jr.contentEncodingMethod.BR:var u=jr.getBrotliDecompressSync(Dl),c=jr.getBrotliCompressSync(Dl);if(u&&c){var l=u(n);if(this.ValidateInjection(e,l)){var f=this.InjectWebSnippet(e,l);n=c(f)}break}}}catch(p){Ui.info("get web injection compress buffer error: "+p)}return n},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t}();jW.exports=xye});var BW=x((aA,HW)=>{"use strict";var _ye=aA&&aA.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$r=require("url"),sA=yn(),Eye=Xt(),bye=ol(),wye=UT(),Sye=sc(),Cye=function(t){_ye(e,t);function e(n,r){var i=t.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=e._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return e.prototype.onError=function(n){this._setStatus(void 0,n)},e.prototype.onResponse=function(n){this._setStatus(n.statusCode,void 0),this.correlationId=Eye.getCorrelationContextTarget(n,bye.requestContextTargetKey)},e.prototype.getDependencyTelemetry=function(n,r){var i=this.method.toUpperCase(),o=sA.RemoteDependencyDataConstants.TYPE_HTTP,s="";try{var a=new $r.URL(this.url);a.search=void 0,a.hash=void 0,i+=" "+a.pathname,s=a.hostname,a.port&&(s+=":"+a.port)}catch{}this.correlationId?(o=sA.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==Sye.correlationIdPrefix&&(s+=" | "+this.correlationId)):o=sA.RemoteDependencyDataConstants.TYPE_HTTP;var u={id:r,name:i,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:o,target:s};if(n&&n.time?u.time=n.time:this.startTime&&(u.time=new Date(this.startTime)),n){for(var c in n)u[c]||(u[c]=n[c]);if(n.properties)for(var c in n.properties)u.properties[c]=n.properties[c]}return u},e._getUrlFromRequestOptions=function(n,r){if(typeof n=="string")if(n.indexOf("http://")===0||n.indexOf("https://")===0)try{n=new $r.URL(n)}catch{}else try{var i=new $r.URL("http://"+n);i.port==="443"?n=new $r.URL("https://"+n):n=new $r.URL("http://"+n)}catch{}else{if(n&&typeof $r.URL=="function"&&n instanceof $r.URL)return $r.format(n);var o=n;n={},o&&Object.keys(o).forEach(function(u){n[u]=o[u]})}if(n.path&&n.host)try{var s=new $r.URL(n.path,"http://"+n.host+n.path);n.pathname=s.pathname,n.search=s.search}catch{}if(n.path&&n.hostname&&!n.host)try{var s=new $r.URL(n.path,"http://"+n.hostname+n.path);n.pathname=s.pathname,n.search=s.search}catch{}if(n.host&&n.port)try{var a=new $r.URL("http://"+n.host);!a.port&&n.port&&(n.hostname=n.host,delete n.host)}catch{}return n.protocol=n.protocol||r.agent&&r.agent.protocol||r.protocol||void 0,n.hostname=n.hostname||"localhost",$r.format(n)},e}(wye);HW.exports=Cye});var GW=x(Ll=>{"use strict";var nx=Ll&&Ll.__assign||function(){return nx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},nx.apply(this,arguments)};Object.defineProperty(Ll,"__esModule",{value:!0});Ll.parseEventHubSpan=void 0;var cA=(_e(),zt(zu)),Tye=(mn(),zt(TB)),Iye=(ni(),zt(Y0)),Sd=at(),Aye=function(t){var e=0,n=0,r=Tye.hrTimeToMilliseconds(t.startTime);return t.links.forEach(function(i){var o=i.attributes,s=o==null?void 0:o[Sd.ENQUEUED_TIME];s&&(e+=1,n+=r-(parseFloat(s.toString())||0))}),Math.max(n/(e||1),0)},Rye=function(t,e){var n,r=t.attributes[Sd.AzNamespace],i=(t.attributes[Iye.SemanticAttributes.NET_PEER_NAME]||t.attributes["peer.address"]||"unknown").replace(/\/$/g,""),o=t.attributes[Sd.MessageBusDestination]||"unknown";switch(t.kind){case cA.SpanKind.CLIENT:e.dependencyTypeName=r,e.target=i+"/"+o;break;case cA.SpanKind.PRODUCER:e.dependencyTypeName=Sd.DependencyTypeName.QueueMessage+" | "+r,e.target=i+"/"+o;break;case cA.SpanKind.CONSUMER:e.source=i+"/"+o,e.measurements=nx(nx({},e.measurements),(n={},n[Sd.TIME_SINCE_ENQUEUED]=Aye(t),n));break;default:}};Ll.parseEventHubSpan=Rye});var WW=x(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});rx.spanToTelemetryContract=void 0;var zW=require("url"),ai=(_e(),zt(zu)),be=(ni(),zt(Y0)),Lo=at(),Pye=GW(),Oye=Xt();function Nye(t){for(var e={},n=0,r=Object.keys(t.attributes);n<r.length;n++){var i=r[n];i.startsWith("http.")||i.startsWith("rpc.")||i.startsWith("db.")||i.startsWith("peer.")||i.startsWith("net.")||(e[i]=t.attributes[i])}var o=t.links.map(function(s){return{operation_Id:s.context.traceId,id:s.context.spanId}});return o.length>0&&(e["_MS.links"]=Oye.stringify(o)),e}function Dye(t){return t===be.DbSystemValues.DB2||t===be.DbSystemValues.DERBY||t===be.DbSystemValues.MARIADB||t===be.DbSystemValues.MSSQL||t===be.DbSystemValues.ORACLE||t===be.DbSystemValues.SQLITE||t===be.DbSystemValues.OTHER_SQL||t===be.DbSystemValues.HSQLDB||t===be.DbSystemValues.H2}function VW(t){var e=t.attributes[be.SemanticAttributes.HTTP_METHOD];if(e){var n=t.attributes[be.SemanticAttributes.HTTP_URL];if(n)return String(n);var r=t.attributes[be.SemanticAttributes.HTTP_SCHEME],i=t.attributes[be.SemanticAttributes.HTTP_TARGET];if(r&&i){var o=t.attributes[be.SemanticAttributes.HTTP_HOST];if(o)return r+"://"+o+i;var s=t.attributes[be.SemanticAttributes.NET_PEER_PORT];if(s){var a=t.attributes[be.SemanticAttributes.NET_PEER_NAME];if(a)return r+"://"+a+":"+s+i;var u=t.attributes[be.SemanticAttributes.NET_PEER_IP];if(u)return r+"://"+u+":"+s+i}}}return""}function uA(t){var e=t.attributes[be.SemanticAttributes.PEER_SERVICE],n=t.attributes[be.SemanticAttributes.HTTP_HOST],r=t.attributes[be.SemanticAttributes.HTTP_URL],i=t.attributes[be.SemanticAttributes.NET_PEER_NAME],o=t.attributes[be.SemanticAttributes.NET_PEER_IP];return e?String(e):n?String(n):r?String(r):i?String(i):o?String(o):""}function Lye(t){var e={name:t.name,success:t.status.code!=ai.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};t.kind===ai.SpanKind.PRODUCER&&(e.dependencyTypeName=Lo.DependencyTypeName.QueueMessage),t.kind===ai.SpanKind.INTERNAL&&t.parentSpanId&&(e.dependencyTypeName=Lo.DependencyTypeName.InProc);var n=t.attributes[be.SemanticAttributes.HTTP_METHOD],r=t.attributes[be.SemanticAttributes.DB_SYSTEM],i=t.attributes[be.SemanticAttributes.RPC_SYSTEM];if(n){e.dependencyTypeName=Lo.DependencyTypeName.Http;var o=t.attributes[be.SemanticAttributes.HTTP_URL];if(o){var s="";try{var a=new zW.URL(String(o));s=a.pathname}catch{}e.name=n+" "+s}e.data=VW(t);var u=t.attributes[be.SemanticAttributes.HTTP_STATUS_CODE];u&&(e.resultCode=String(u));var c=uA(t);if(c){try{var l=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/),f=l.exec(c);if(f!=null){var p=f[1],d=f[3];(p=="https"&&d==":443"||p=="http"&&d==":80")&&(c=f[1]+f[2]+f[4])}}catch{}e.target=""+c}}else if(r){String(r)===be.DbSystemValues.MYSQL?e.dependencyTypeName="mysql":String(r)===be.DbSystemValues.POSTGRESQL?e.dependencyTypeName="postgresql":String(r)===be.DbSystemValues.MONGODB?e.dependencyTypeName="mongodb":String(r)===be.DbSystemValues.REDIS?e.dependencyTypeName="redis":Dye(String(r))?e.dependencyTypeName="SQL":e.dependencyTypeName=String(r);var h=t.attributes[be.SemanticAttributes.DB_STATEMENT],m=t.attributes[be.SemanticAttributes.DB_OPERATION];h?e.data=String(h):m&&(e.data=String(m));var c=uA(t),g=t.attributes[be.SemanticAttributes.DB_NAME];c?e.target=g?c+"|"+g:""+c:e.target=g?""+g:""+r}else if(i){e.dependencyTypeName=Lo.DependencyTypeName.Grpc;var v=t.attributes[be.SemanticAttributes.RPC_GRPC_STATUS_CODE];v&&(e.resultCode=String(v));var c=uA(t);c?e.target=""+c:i&&(e.target=String(i))}return e}function kye(t){var e={name:t.name,success:t.status.code!=ai.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},n=t.attributes[be.SemanticAttributes.HTTP_METHOD],r=t.attributes[be.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(n){if(t.kind==ai.SpanKind.SERVER){var i=t.attributes[be.SemanticAttributes.HTTP_ROUTE],o=t.attributes[be.SemanticAttributes.HTTP_URL];if(i)e.name=n+" "+i;else if(o)try{var s=new zW.URL(String(o));e.name=n+" "+s.pathname}catch{}}e.url=VW(t);var a=t.attributes[be.SemanticAttributes.HTTP_STATUS_CODE];a&&(e.resultCode=String(a))}else r&&(e.resultCode=String(r));return e}function Fye(t){var e;switch(t.kind){case ai.SpanKind.CLIENT:case ai.SpanKind.PRODUCER:case ai.SpanKind.INTERNAL:e=Lye(t);break;case ai.SpanKind.SERVER:case ai.SpanKind.CONSUMER:e=kye(t);break}var n=t.spanContext?t.spanContext():t.context(),r=""+n.spanId,i=Math.round(t.duration[0]*1e3+t.duration[1]/1e6);return e.id=r,e.duration=i,e.properties=Nye(t),t.attributes[Lo.AzNamespace]&&(t.kind===ai.SpanKind.INTERNAL&&(e.dependencyTypeName=Lo.DependencyTypeName.InProc+" | "+t.attributes[Lo.AzNamespace]),t.attributes[Lo.AzNamespace]===Lo.MicrosoftEventHub&&Pye.parseEventHubSpan(t,e)),e}rx.spanToTelemetryContract=Fye});var KW=x(ks=>{"use strict";var kl=ks&&ks.__assign||function(){return kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},kl.apply(this,arguments)};Object.defineProperty(ks,"__esModule",{value:!0});ks.AsyncScopeManager=ks.OpenTelemetryScopeManagerWrapper=void 0;var Ls=Ps(),Mye=require("events"),YW=function(){function t(){}return t.prototype.active=function(){var e=this,n=Ls.CorrelationContextManager.getCurrentContext();return kl(kl({},n),{getValue:function(r){return e._activeSymbol?r===e._activeSymbol?n:!1:(e._activeSymbol=r,n)},setValue:function(){}})},t.prototype.with=function(e,n){var r=e.parentSpanId,i=e.name,o=t._spanToContext(e,r,i);return Ls.CorrelationContextManager.runWithContext(o,n)()},t.prototype.bind=function(e){return typeof e=="function"?Ls.CorrelationContextManager.wrapCallback(e):(e instanceof Mye.EventEmitter&&Ls.CorrelationContextManager.wrapEmitter(e),e)},t.prototype.enable=function(){return Ls.CorrelationContextManager.enable(),this},t.prototype.disable=function(){return Ls.CorrelationContextManager.disable(),this},t._spanToContext=function(e,n,r){var i=e.spanContext?e.spanContext():e.context(),o=kl(kl({},e.spanContext()),{traceFlags:e.spanContext().traceFlags}),s=n?"|"+i.traceId+"."+n+".":i.traceId,a=Ls.CorrelationContextManager.getCurrentContext();a&&(o.traceId=a.operation.id,n||(s=a.operation.parentId));var u=Ls.CorrelationContextManager.spanToContextObject(o,s,r);return u},t}();ks.OpenTelemetryScopeManagerWrapper=YW;ks.AsyncScopeManager=new YW});var XW=x(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.enable=Fs.subscriber=void 0;var Cd=(_e(),zt(zu)),qye=at(),lA=dt(),Uye=WW(),jye=KW(),vc=[],$ye=function(t){try{var e=t.data,n=Uye.spanToTelemetryContract(e);jye.AsyncScopeManager.with(e,function(){vc.forEach(function(r){e.kind===Cd.SpanKind.SERVER||e.kind===Cd.SpanKind.CONSUMER?r.trackRequest(n):(e.kind===Cd.SpanKind.CLIENT||e.kind===Cd.SpanKind.INTERNAL||e.kind===Cd.SpanKind.PRODUCER)&&r.trackDependency(n)})})}catch{}};Fs.subscriber=$ye;function Hye(t,e){if(t){var n=vc.find(function(r){return r==e});if(n)return;vc.length===0&&lA.channel.subscribe("azure-coretracing",Fs.subscriber,lA.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(qye.StatsbeatInstrumentation.AZURE_CORE_TRACING)}),vc.push(e)}else vc=vc.filter(function(r){return r!=e}),vc.length===0&&lA.channel.unsubscribe("azure-coretracing",Fs.subscriber)}Fs.enable=Hye});var JW=x(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.enable=Ms.subscriber=void 0;var Bye=at(),fA=dt(),yc=[],Gye=function(t){t.data.event.commandName!=="ismaster"&&yc.forEach(function(e){var n=t.data.startedData&&t.data.startedData.databaseName||"Unknown database";e.trackDependency({target:n,data:t.data.event.commandName,name:t.data.event.commandName,duration:t.data.event.duration,success:t.data.succeeded,resultCode:t.data.succeeded?"0":"1",time:t.data.startedData.time,dependencyTypeName:"mongodb"})})};Ms.subscriber=Gye;function zye(t,e){if(t){var n=yc.find(function(r){return r==e});if(n)return;yc.length===0&&fA.channel.subscribe("mongodb",Ms.subscriber,fA.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Bye.StatsbeatInstrumentation.MONGODB)}),yc.push(e)}else yc=yc.filter(function(r){return r!=e}),yc.length===0&&fA.channel.unsubscribe("mongodb",Ms.subscriber)}Ms.enable=zye});var QW=x(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.enable=qs.subscriber=void 0;var Vye=at(),pA=dt(),xc=[],Wye=function(t){xc.forEach(function(e){var n=t.data.query||{},r=n.sql||"Unknown query",i=!t.data.err,o=n._connection||{},s=o.config||{},a=s.socketPath?s.socketPath:(s.host||"localhost")+":"+s.port;e.trackDependency({target:a,data:r,name:r,duration:t.data.duration,success:i,resultCode:i?"0":"1",time:t.data.time,dependencyTypeName:"mysql"})})};qs.subscriber=Wye;function Yye(t,e){if(t){var n=xc.find(function(r){return r==e});if(n)return;xc.length===0&&pA.channel.subscribe("mysql",qs.subscriber,pA.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Vye.StatsbeatInstrumentation.MYSQL)}),xc.push(e)}else xc=xc.filter(function(r){return r!=e}),xc.length===0&&pA.channel.unsubscribe("mysql",qs.subscriber)}qs.enable=Yye});var ZW=x(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.enable=Us.subscriber=void 0;var Kye=at(),dA=dt(),_c=[],Xye=function(t){_c.forEach(function(e){t.data.commandObj.command!=="info"&&e.trackDependency({target:t.data.address,name:t.data.commandObj.command,data:t.data.commandObj.command,duration:t.data.duration,success:!t.data.err,resultCode:t.data.err?"1":"0",time:t.data.time,dependencyTypeName:"redis"})})};Us.subscriber=Xye;function Jye(t,e){if(t){var n=_c.find(function(r){return r==e});if(n)return;_c.length===0&&dA.channel.subscribe("redis",Us.subscriber,dA.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Kye.StatsbeatInstrumentation.REDIS)}),_c.push(e)}else _c=_c.filter(function(r){return r!=e}),_c.length===0&&dA.channel.unsubscribe("redis",Us.subscriber)}Us.enable=Jye});var e8=x(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.enable=js.subscriber=void 0;var Qye=at(),hA=dt(),Ec=[],Zye=function(t){Ec.forEach(function(e){var n=t.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!t.data.error,o=t.data.database.host+":"+t.data.database.port;e.trackDependency({target:o,data:r,name:r,duration:t.data.duration,success:i,resultCode:i?"0":"1",time:t.data.time,dependencyTypeName:"postgres"})})};js.subscriber=Zye;function exe(t,e){if(t){var n=Ec.find(function(r){return r==e});if(n)return;Ec.length===0&&hA.channel.subscribe("postgres",js.subscriber,hA.trueFilter,function(r,i){var o=e.getStatsbeat();o&&o.addInstrumentation(Qye.StatsbeatInstrumentation.POSTGRES)}),Ec.push(e)}else Ec=Ec.filter(function(r){return r!=e}),Ec.length===0&&hA.channel.unsubscribe("postgres",js.subscriber)}js.enable=exe});var ql=x((gA,t8)=>{"use strict";var ix=gA&&gA.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Fl=require("http"),Ml=require("https"),ox=tt(),mA=Xt(),$s=ol(),txe=BW(),Td=Ps(),sx=cy(),nxe=ay(),Id=sc(),rxe=function(){function t(e){if(t.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");t.INSTANCE=this,this._client=e}return t.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),nxe.IsInitialized&&(XW().enable(e,this._client),JW().enable(e,this._client),QW().enable(e,this._client),ZW().enable(e,this._client),e8().enable(e,this._client))},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype._initialize=function(){var e=this;this._isInitialized=!0;var n=Fl.request,r=Ml.request,i=function(o,s){try{var a=!s[t.disableCollectionRequestOption]&&!o[t.alreadyAutoCollectedFlag],u=null;if(s.headers&&(u=s.headers["User-Agent"]||s.headers["user-agent"],u&&u.toString().indexOf("azsdk-js")!==-1&&(a=!1)),o&&s&&a&&(Td.CorrelationContextManager.wrapEmitter(o),e._isEnabled))if(o[t.alreadyAutoCollectedFlag]=!0,Td.CorrelationContextManager.getCurrentContext())t.trackRequest(e._client,{options:s,request:o});else{var c=null;if(Id.w3cEnabled){var l=new sx;c=l.traceId}else{var f=Id.generateRequestId(null);c=Id.getRootId(f)}var p=Td.CorrelationContextManager.generateContextObject(c);Td.CorrelationContextManager.runWithContext(p,function(){t.trackRequest(e._client,{options:s,request:o})})}}catch(d){ox.warn("Failed to generate dependency telemetry.",mA.dumpObj(d))}};Fl.request=function(o){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];var u=n.call.apply(n,ix([Fl,o],s));return i(u,o),u},Ml.request=function(o){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];var u=r.call.apply(r,ix([Ml,o],s));return i(u,o),u},Fl.get=function(o){for(var s,a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];var c=(s=Fl.request).call.apply(s,ix([Fl,o],a));return c.end(),c},Ml.get=function(o){for(var s,a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];var c=(s=Ml.request).call.apply(s,ix([Ml,o],a));return c.end(),c}},t.trackRequest=function(e,n){if(!n.options||!n.request||!e){ox.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!e);return}var r=new txe(n.options,n.request),i=Td.CorrelationContextManager.getCurrentContext(),o,s;if(i&&i.operation&&i.operation.traceparent&&sx.isValidTraceId(i.operation.traceparent.traceId))i.operation.traceparent.updateSpanId(),o=i.operation.traceparent.getBackCompatRequestId();else if(Id.w3cEnabled){var a=new sx;s=a.toString(),o=a.getBackCompatRequestId()}else o=i&&i.operation&&i.operation.parentId+t.requestNumber+++".";if(mA.canIncludeCorrelationHeader(e,r.getUrl())&&n.request.getHeader&&n.request.setHeader&&e.config&&e.config.correlationId){var u=n.request.getHeader($s.requestContextHeader);try{mA.safeIncludeCorrelationHeader(e,n.request,u)}catch(f){ox.warn("Request-Context header could not be set. Correlation of requests may be lost",f)}if(i&&i.operation)try{if(n.request.setHeader($s.requestIdHeader,o),e.config.ignoreLegacyHeaders||(n.request.setHeader($s.parentIdHeader,i.operation.id),n.request.setHeader($s.rootIdHeader,o)),s||i.operation.traceparent)n.request.setHeader($s.traceparentHeader,s||i.operation.traceparent.toString());else if(Id.w3cEnabled){var a=new sx().toString();n.request.setHeader($s.traceparentHeader,a)}if(i.operation.tracestate){var c=i.operation.tracestate.toString();c&&n.request.setHeader($s.traceStateHeader,c)}var l=i.customProperties.serializeToHeader();l&&n.request.setHeader($s.correlationContextHeader,l)}catch(f){ox.warn("Correlation headers could not be set. Correlation of requests may be lost.",f)}}n.request.on&&(n.request.on("response",function(f){if(!n.isProcessed){n.isProcessed=!0,r.onResponse(f);var p=r.getDependencyTelemetry(n,o);p.contextObjects=p.contextObjects||{},p.contextObjects["http.RequestOptions"]=n.options,p.contextObjects["http.ClientRequest"]=n.request,p.contextObjects["http.ClientResponse"]=f,e.trackDependency(p)}}),n.request.on("error",function(f){if(!n.isProcessed){n.isProcessed=!0,r.onError(f);var p=r.getDependencyTelemetry(n,o);p.contextObjects=p.contextObjects||{},p.contextObjects["http.RequestOptions"]=n.options,p.contextObjects["http.ClientRequest"]=n.request,p.contextObjects.Error=f,e.trackDependency(p)}}),n.request.on("abort",function(){if(!n.isProcessed){n.isProcessed=!0,r.onError(new Error("The request has been aborted and the network socket has closed."));var f=r.getDependencyTelemetry(n,o);f.contextObjects=f.contextObjects||{},f.contextObjects["http.RequestOptions"]=n.options,f.contextObjects["http.ClientRequest"]=n.request,e.trackDependency(f)}}))},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t.disableCollectionRequestOption="disableAppInsightsAutoCollection",t.requestNumber=1,t.alreadyAutoCollectedFlag="_appInsightsAutoCollected",t}();t8.exports=rxe});var yA=x((i4e,s8)=>{"use strict";var n8=require("http"),r8=require("https"),i8=tt(),o8=Xt(),ixe=ol(),vA=BT(),ko=Ps(),oxe=Ky(),sxe=function(){function t(e){if(t.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");t.INSTANCE=this,this._client=e}return t.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||oxe.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},t.prototype.useAutoCorrelation=function(e,n){e&&!this._isAutoCorrelating?ko.CorrelationContextManager.enable(n):!e&&this._isAutoCorrelating&&ko.CorrelationContextManager.disable(),this._isAutoCorrelating=e},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},t.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return ko.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},t.prototype._registerRequest=function(e,n,r){var i=this,o=new vA(e),s=this._generateCorrelationContext(o);ko.CorrelationContextManager.runWithContext(s,function(){i._isEnabled&&(e[t.alreadyAutoCollectedFlag]=!0,t.trackRequest(i._client,{request:e,response:n},o)),typeof r=="function"&&r(e,n)})},t.prototype._initialize=function(){if(this._isInitialized=!0,!t.HANDLER_READY){t.HANDLER_READY=!0;var e=function(o){if(o){if(typeof o!="function")throw new Error("onRequest handler must be a function");return function(s,a){ko.CorrelationContextManager.wrapEmitter(s),ko.CorrelationContextManager.wrapEmitter(a);var u=s&&!s[t.alreadyAutoCollectedFlag];s&&u&&t.INSTANCE?t.INSTANCE._registerRequest(s,a,o):o(s,a)}}},n=function(o){var s=o.addListener.bind(o);o.addListener=function(a,u){switch(a){case"request":case"checkContinue":return s(a,e(u));default:return s(a,u)}},o.on=o.addListener},r=n8.createServer;n8.createServer=function(o,s){if(s&&typeof s=="function"){var a=r(o,e(s));return n(a),a}else{var a=r(e(o));return n(a),a}};var i=r8.createServer;r8.createServer=function(o,s){var a=i(o,e(s));return n(a),a}}},t.trackRequestSync=function(e,n){if(!n.request||!n.response||!e){i8.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!e);return}n.isProcessed=!1,t.addResponseCorrelationIdHeader(e,n.response);var r=ko.CorrelationContextManager.getCurrentContext(),i=new vA(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(e.context.tags)||r.operation.id,r.operation.name=i.getOperationName(e.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),t.endRequest(e,i,n,n.duration,n.error)},t.trackRequest=function(e,n,r){if(!n.request||!n.response||!e){i8.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!e);return}n.isProcessed=!1;var i=ko.CorrelationContextManager.getCurrentContext(),o=r||new vA(n.request,i&&i.operation.parentId);o8.canIncludeCorrelationHeader(e,o.getUrl())&&t.addResponseCorrelationIdHeader(e,n.response),i&&!r&&(i.operation.id=o.getOperationId(e.context.tags)||i.operation.id,i.operation.name=o.getOperationName(e.context.tags)||i.operation.name,i.operation.parentId=o.getOperationParentId(e.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(o.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",function(){t.endRequest(e,o,n,null,null)}),n.request.on&&n.request.on("error",function(s){t.endRequest(e,o,n,null,s)}),n.request.on&&n.request.on("aborted",function(){var s="The request has been aborted and the network socket has closed.";t.endRequest(e,o,n,null,s)})},t.addResponseCorrelationIdHeader=function(e,n){if(e.config&&e.config.correlationId&&n.getHeader&&n.setHeader&&!n.headersSent){var r=n.getHeader(ixe.requestContextHeader);o8.safeIncludeCorrelationHeader(e,n,r)}},t.endRequest=function(e,n,r,i,o){if(!r.isProcessed){r.isProcessed=!0,o?n.onError(o,i):n.onResponse(r.response,i);var s=n.getRequestTelemetry(r);if(s.tagOverrides=n.getRequestTags(e.context.tags),r.tagOverrides)for(var a in r.tagOverrides)s.tagOverrides[a]=r.tagOverrides[a];var u=n.getLegacyRootId();u&&(s.properties.ai_legacyRootId=u),s.contextObjects=s.contextObjects||{},s.contextObjects["http.ServerRequest"]=r.request,s.contextObjects["http.ServerResponse"]=r.response,e.trackRequest(s)}},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1,ko.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},t.HANDLER_READY=!1,t.alreadyAutoCollectedFlag="_appInsightsAutoCollected",t}();s8.exports=sxe});var u8=x((_A,c8)=>{"use strict";var Hr=_A&&_A.__assign||function(){return Hr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hr.apply(this,arguments)},xA=require("os"),bc=yn(),a8=at(),axe=Xt(),cxe=tt(),uxe=axe.w3cTraceId(),lxe=function(){function t(){}return t.createQuickPulseEnvelope=function(e,n,r,i){var o=xA&&typeof xA.hostname=="function"&&xA.hostname()||"Unknown",s=i.tags&&i.keys&&i.keys.cloudRoleInstance&&i.tags[i.keys.cloudRoleInstance]||o,a=i.tags&&i.keys&&i.keys.cloudRole&&i.tags[i.keys.cloudRole]||null,u={Documents:n.length>0?n:null,InstrumentationKey:r.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:i.tags[i.keys.internalSdkVersion],StreamId:uxe,MachineName:o,Instance:s,RoleName:a};return u},t.createQuickPulseMetric=function(e){var n;return n={Name:e.name,Value:e.value,Weight:e.count||1},n},t.telemetryEnvelopeToQuickPulseDocument=function(e){switch(e.data.baseType){case bc.TelemetryTypeString.Event:return t.createQuickPulseEventDocument(e);case bc.TelemetryTypeString.Exception:return t.createQuickPulseExceptionDocument(e);case bc.TelemetryTypeString.Trace:return t.createQuickPulseTraceDocument(e);case bc.TelemetryTypeString.Dependency:return t.createQuickPulseDependencyDocument(e);case bc.TelemetryTypeString.Request:return t.createQuickPulseRequestDocument(e)}return null},t.createQuickPulseEventDocument=function(e){var n=t.createQuickPulseDocument(e),r=e.data.baseData.name,i=Hr(Hr({},n),{Name:r});return i},t.createQuickPulseTraceDocument=function(e){var n=t.createQuickPulseDocument(e),r=e.data.baseData.severityLevel||0,i=Hr(Hr({},n),{Message:e.data.baseData.message,SeverityLevel:bc.SeverityLevel[r]});return i},t.createQuickPulseExceptionDocument=function(e){var n=t.createQuickPulseDocument(e),r=e.data.baseData.exceptions,i="",o="",s="";r&&r.length>0&&(r[0].parsedStack&&r[0].parsedStack.length>0?r[0].parsedStack.forEach(function(u){i+=u.assembly+`
|
|
`}):r[0].stack&&r[0].stack.length>0&&(i=r[0].stack),o=r[0].message,s=r[0].typeName);var a=Hr(Hr({},n),{Exception:i,ExceptionMessage:o,ExceptionType:s});return a},t.createQuickPulseRequestDocument=function(e){var n=t.createQuickPulseDocument(e),r=e.data.baseData,i=Hr(Hr({},n),{Name:r.name,Success:r.success,Duration:r.duration,ResponseCode:r.responseCode,OperationName:r.name});return i},t.createQuickPulseDependencyDocument=function(e){var n=t.createQuickPulseDocument(e),r=e.data.baseData,i=Hr(Hr({},n),{Name:r.name,Target:r.target,Success:r.success,Duration:r.duration,ResultCode:r.resultCode,CommandName:r.data,OperationName:n.OperationId,DependencyTypeName:r.type});return i},t.createQuickPulseDocument=function(e){var n,r,i,o;e.data.baseType?(r=a8.TelemetryTypeStringToQuickPulseType[e.data.baseType],n=a8.TelemetryTypeStringToQuickPulseDocumentType[e.data.baseType]):cxe.warn("Document type invalid; not sending live metric document",e.data.baseType),i=e.tags[t.keys.operationId],o=t.aggregateProperties(e);var s={DocumentType:n,__type:r,OperationId:i,Version:"1.0",Properties:o};return s},t.aggregateProperties=function(e){var n=[],r=e.data.baseData.measurements||{};for(var i in r)if(r.hasOwnProperty(i)){var o=r[i],s={key:i,value:o};n.push(s)}var a=e.data.baseData.properties||{};for(var i in a)if(a.hasOwnProperty(i)){var o=a[i],s={key:i,value:o};n.push(s)}return n},t.keys=new bc.ContextTagKeys,t}();c8.exports=lxe});var f8=x((o4e,l8)=>{"use strict";var fxe=function(){return(Date.now()+621355968e5)*1e4};l8.exports={getTransmissionTime:fxe}});var m8=x((Ad,h8)=>{"use strict";var p8=Ad&&Ad.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},d8=Ad&&Ad.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},pxe=require("https"),dxe=ql(),EA=tt(),hxe=f8(),bA=Xt(),mxe=require("url"),Br={method:"POST",time:"x-ms-qps-transmission-time",pollingIntervalHint:"x-ms-qps-service-polling-interval-hint",endpointRedirect:"x-ms-qps-service-endpoint-redirect-v2",instanceName:"x-ms-qps-instance-name",streamId:"x-ms-qps-stream-id",machineName:"x-ms-qps-machine-name",roleName:"x-ms-qps-role-name",streamid:"x-ms-qps-stream-id",invariantVersion:"x-ms-qps-invariant-version",subscribed:"x-ms-qps-subscribed"},gxe=function(){function t(e,n){this._config=e,this._consecutiveErrors=0,this._getAuthorizationHandler=n}return t.prototype.ping=function(e,n,r){var i=[{name:Br.streamId,value:e.StreamId},{name:Br.machineName,value:e.MachineName},{name:Br.roleName,value:e.RoleName},{name:Br.instanceName,value:e.Instance},{name:Br.invariantVersion,value:e.InvariantVersion.toString()}];this._submitData(e,n,r,"ping",i)},t.prototype.post=function(e,n,r){return p8(this,void 0,void 0,function(){return d8(this,function(i){switch(i.label){case 0:return[4,this._submitData([e],n,r,"post")];case 1:return i.sent(),[2]}})})},t.prototype._submitData=function(e,n,r,i,o){return p8(this,void 0,void 0,function(){var s,a,u,c,l,f,p,d,h=this;return d8(this,function(m){switch(m.label){case 0:if(s=bA.stringify(e),a=(p={},p[dxe.disableCollectionRequestOption]=!0,p.host=n&&n.length>0?n:this._config.quickPulseHost,p.method=Br.method,p.path="/QuickPulseService.svc/"+i+"?ikey="+this._config.instrumentationKey,p.headers=(d={Expect:"100-continue"},d[Br.time]=hxe.getTransmissionTime(),d["Content-Type"]="application/json",d["Content-Length"]=Buffer.byteLength(s),d),p),o&&o.length>0&&o.forEach(function(g){return a.headers[g.name]=g.value}),i!=="post")return[3,4];if(u=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!u)return[3,4];m.label=1;case 1:return m.trys.push([1,3,,4]),[4,u.addAuthorizationHeader(a)];case 2:return m.sent(),[3,4];case 3:return c=m.sent(),l="Failed to get AAD bearer token for the Application. Error:",EA.info(t.TAG,l,c),[2];case 4:return this._config.httpsAgent?a.agent=this._config.httpsAgent:a.agent=bA.tlsRestrictedAgent,f=pxe.request(a,function(g){if(g.statusCode==200){var v=g.headers[Br.subscribed]==="true",y=null;try{y=g.headers[Br.endpointRedirect]?new mxe.URL(g.headers[Br.endpointRedirect].toString()).host:null}catch(E){h._onError("Failed to parse redirect header from QuickPulse: "+bA.dumpObj(E))}var _=g.headers[Br.pollingIntervalHint]?parseInt(g.headers[Br.pollingIntervalHint].toString()):null;h._consecutiveErrors=0,r(v,g,y,_)}else h._onError("StatusCode:"+g.statusCode+" StatusMessage:"+g.statusMessage),r()}),f.on("error",function(g){h._onError(g),r()}),f.write(s),f.end(),[2]}})})},t.prototype._onError=function(e){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%t.MAX_QPS_FAILURES_BEFORE_WARN===0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",EA.warn(t.TAG,n,e)):EA.info(t.TAG,n,e)},t.TAG="QuickPulseSender",t.MAX_QPS_FAILURES_BEFORE_WARN=25,t}();h8.exports=gxe});var _8=x((Rd,x8)=>{"use strict";var g8=Rd&&Rd.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},v8=Rd&&Rd.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},y8=tt(),wA=u8(),vxe=m8(),yxe=at(),xxe=Ol(),_xe=function(){function t(e,n,r){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this._redirectedHost=null,this._pollingIntervalHint=-1,this.config=e,this.context=n||new xxe,this._sender=new vxe(this.config,r),this._isEnabled=!1}return t.prototype.addCollector=function(e){this._collectors.push(e)},t.prototype.trackMetric=function(e){this._addMetric(e)},t.prototype.addDocument=function(e){if(this._isCollectingData){var n=wA.telemetryEnvelopeToQuickPulseDocument(e);n&&this._documents.push(n)}},t.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},t.prototype.enableCollectors=function(e){this._collectors.forEach(function(n){n.enable(e)})},t.prototype._addMetric=function(e){var n=e.value,r=e.count||1,i=yxe.PerformanceToQuickPulseCounter[e.name];i&&(this._metrics[i]?(this._metrics[i].Value=(this._metrics[i].Value*this._metrics[i].Weight+n*r)/(this._metrics[i].Weight+r),this._metrics[i].Weight+=r):(this._metrics[i]=wA.createQuickPulseMetric(e),this._metrics[i].Name=i,this._metrics[i].Weight=1))},t.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},t.prototype._goQuickPulse=function(){return g8(this,void 0,void 0,function(){var e,n,r,i,o=this;return v8(this,function(s){switch(s.label){case 0:return e=Object.keys(this._metrics).map(function(a){return o._metrics[a]}),n=wA.createQuickPulseEnvelope(e,this._documents.slice(),this.config,this.context),this._resetQuickPulseBuffer(),this._isCollectingData?[4,this._post(n)]:[3,2];case 1:return s.sent(),[3,3];case 2:this._ping(n),s.label=3;case 3:return r=this._pollingIntervalHint>0?this._pollingIntervalHint:t.PING_INTERVAL,i=this._isCollectingData?t.POST_INTERVAL:r,this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,i=t.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(i=t.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),i),this._handle.unref(),[2]}})})},t.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},t.prototype._post=function(e){return g8(this,void 0,void 0,function(){return v8(this,function(n){switch(n.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return n.sent(),[2]}})})},t.prototype._quickPulseDone=function(e,n,r,i){e!=null?(this._isCollectingData!==e&&(y8.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,r&&r.length>0&&(this._redirectedHost=r,y8.info("Redirecting endpoint to: ",r)),i&&i>0&&(this._pollingIntervalHint=i),n&&n.statusCode<300&&n.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},t.MAX_POST_WAIT_TIME=2e4,t.MAX_PING_WAIT_TIME=6e4,t.FALLBACK_INTERVAL=6e4,t.PING_INTERVAL=5e3,t.POST_INTERVAL=1e3,t}();x8.exports=_xe});var E8=x(Ul=>{"use strict";var ax=Ul&&Ul.__assign||function(){return ax=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ax.apply(this,arguments)};Object.defineProperty(Ul,"__esModule",{value:!0});Ul.AutoCollectNativePerformance=void 0;var Pd=Ol(),Exe=tt(),bxe=function(){function t(e){this._disabledMetrics={},t.INSTANCE&&t.INSTANCE.dispose(),t.INSTANCE=this,this._client=e}return t.prototype.enable=function(e,n,r){var i=this;if(n===void 0&&(n={}),r===void 0&&(r=6e4),t._metricsAvailable==null&&e&&!this._isInitialized)try{var o=require("applicationinsights-native-metrics");t._emitter=new o,t._metricsAvailable=!0,Exe.info("Native metrics module successfully loaded!")}catch{t._metricsAvailable=!1;return}this._isEnabled=e,this._disabledMetrics=n,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&t._emitter?(t._emitter.enable(!0,r),this._handle||(this._handle=setInterval(function(){return i._trackNativeMetrics()},r),this._handle.unref())):t._emitter&&(t._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))},t.prototype.dispose=function(){this.enable(!1)},t.parseEnabled=function(e,n){var r=n.disableAllExtendedMetrics,i=n.extendedMetricDisablers;if(r)return{isEnabled:!1,disabledMetrics:{}};if(i){var o=i.split(","),s={};if(o.length>0)for(var a=0,u=o;a<u.length;a++){var c=u[a];s[c]=!0}return typeof e=="object"?{isEnabled:!0,disabledMetrics:ax(ax({},e),s)}:{isEnabled:e,disabledMetrics:s}}return typeof e=="boolean"?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},t.prototype._trackNativeMetrics=function(){var e=!0;typeof this._isEnabled!="object"&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},t.prototype._trackGarbageCollection=function(){var e;if(!this._disabledMetrics.gc){var n=t._emitter.getGCData();for(var r in n){var i=n[r].metrics,o=r+" Garbage Collection Duration",s=Math.sqrt(i.sumSquares/i.count-Math.pow(i.total/i.count,2))||0;this._client.trackMetric({name:o,value:i.total,count:i.count,max:i.max,min:i.min,stdDev:s,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+Pd.sdkVersion,e)})}}},t.prototype._trackEventLoop=function(){var e;if(!this._disabledMetrics.loop){var n=t._emitter.getLoopData(),r=n.loopUsage;if(r.count!=0){var i="Event Loop CPU Time",o=Math.sqrt(r.sumSquares/r.count-Math.pow(r.total/r.count,2))||0;this._client.trackMetric({name:i,value:r.total,count:r.count,min:r.min,max:r.max,stdDev:o,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+Pd.sdkVersion,e)})}}},t.prototype._trackHeapUsage=function(){var e,n,r;if(!this._disabledMetrics.heap){var i=process.memoryUsage(),o=i.heapUsed,s=i.heapTotal,a=i.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:o,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+Pd.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+Pd.sdkVersion,n)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(r={},r[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+Pd.sdkVersion,r)})}},t}();Ul.AutoCollectNativePerformance=bxe});var S8=x(Hs=>{"use strict";var b8=Hs&&Hs.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},w8=Hs&&Hs.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.AzureFunctionsHook=void 0;var cx=tt(),SA=Ps(),wxe=function(){function t(e){this._client=e,this._autoGenerateIncomingRequests=!1;try{this._functionsCoreModule=require("@azure/functions-core"),this._addPreInvocationHook(),this._addPostInvocationHook()}catch{cx.info("AzureFunctionsHook failed to load, not running in Azure Functions")}}return t.prototype._getFuncModelHelper=function(){if(this._cachedModelHelper===void 0){var e=this._functionsCoreModule.getProgrammingModel();e.name==="@azure/functions"&&(e.version.startsWith("3.")?this._cachedModelHelper=new Sxe:e.version.startsWith("4.")&&(this._cachedModelHelper=new Cxe)),this._cachedModelHelper||(this._cachedModelHelper=null,cx.warn('AzureFunctionsHook does not support model "'+e.name+'" version "'+e.version+'"'))}return this._cachedModelHelper},t.prototype.enable=function(e){this._autoGenerateIncomingRequests=e},t.prototype.dispose=function(){this.enable(!1),this._removeInvocationHooks(),this._functionsCoreModule=void 0},t.prototype._addPreInvocationHook=function(){var e=this;this._preInvocationHook||(this._preInvocationHook=this._functionsCoreModule.registerHook("preInvocation",function(n){return b8(e,void 0,void 0,function(){var r,i,o,s;return w8(this,function(a){try{r=this._getFuncModelHelper(),r&&(i=n.invocationContext,o=SA.CorrelationContextManager.startOperation(i),o&&(o.customProperties.setProperty("InvocationId",i.invocationId),s=i.traceContext,s.attributes&&(o.customProperties.setProperty("ProcessId",s.attributes.ProcessId),o.customProperties.setProperty("LogLevel",s.attributes.LogLevel),o.customProperties.setProperty("Category",s.attributes.Category),o.customProperties.setProperty("HostInstanceId",s.attributes.HostInstanceId),o.customProperties.setProperty("AzFuncLiveLogsSessionId",s.attributes["#AzFuncLiveLogsSessionId"])),n.functionCallback=SA.CorrelationContextManager.wrapCallback(n.functionCallback,o),r.isHttpTrigger(n)&&this._autoGenerateIncomingRequests&&(n.hookData.appInsightsExtractedContext=o,n.hookData.appInsightsStartTime=Date.now())))}catch(u){return cx.warn("Failed to propagate context in Azure Functions",u),[2]}return[2]})})}))},t.prototype._addPostInvocationHook=function(){var e=this;this._postInvocationHook||(this._postInvocationHook=this._functionsCoreModule.registerHook("postInvocation",function(n){return b8(e,void 0,void 0,function(){var r,i,o,s,a=this;return w8(this,function(u){try{r=this._getFuncModelHelper(),r&&this._autoGenerateIncomingRequests&&r.isHttpTrigger(n)&&(i=n.inputs[0],i&&(o=n.hookData.appInsightsStartTime||Date.now(),s=n.hookData.appInsightsExtractedContext,s?SA.CorrelationContextManager.runWithContext(s,function(){a._createIncomingRequestTelemetry(i,n,o,s.operation.parentId)}):this._createIncomingRequestTelemetry(i,n,o,null)))}catch(c){cx.warn("Error creating automatic incoming request in Azure Functions",c)}return[2]})})}))},t.prototype._createIncomingRequestTelemetry=function(e,n,r,i){var o=this._getFuncModelHelper().getStatusCodes(n),s=200;if(o)for(var a=0,u=o;a<u.length;a++){var c=u[a];if(typeof c=="number"&&Number.isInteger(c)){s=c;break}else if(typeof c=="string"){var l=parseInt(c);if(!isNaN(l)){s=l;break}}}else s=void 0;this._client.trackRequest({name:e.method+" "+e.url,resultCode:s,success:typeof s=="number"?0<s&&s<400:void 0,url:e.url,time:new Date(r),duration:Date.now()-r,id:i}),this._client.flush()},t.prototype._removeInvocationHooks=function(){this._preInvocationHook&&(this._preInvocationHook.dispose(),this._preInvocationHook=void 0),this._postInvocationHook&&(this._postInvocationHook.dispose(),this._postInvocationHook=void 0)},t}();Hs.AzureFunctionsHook=wxe;var Sxe=function(){function t(){}return t.prototype._getInvocationContext=function(e){return e.invocationContext},t.prototype.getStatusCodes=function(e){var n=this._getInvocationContext(e),r,i=n.bindingDefinitions.find(function(o){return o.direction==="out"&&o.type.toLowerCase()==="http"});return(i==null?void 0:i.name)==="$return"?r=e.result:i&&n.bindings&&n.bindings[i.name]!==void 0?r=n.bindings[i.name]:r=n.res,r?[r.statusCode,r.status]:void 0},t.prototype.isHttpTrigger=function(e){var n=this._getInvocationContext(e);return!!n.bindingDefinitions.find(function(r){var i;return((i=r.type)===null||i===void 0?void 0:i.toLowerCase())==="httptrigger"})},t}(),Cxe=function(){function t(){}return t.prototype._getInvocationContext=function(e){return e.invocationContext},t.prototype.getStatusCodes=function(e){var n=e.result;return n?[n.status]:void 0},t.prototype.isHttpTrigger=function(e){var n=this._getInvocationContext(e);return n.options.trigger.type.toLowerCase()==="httptrigger"},t}()});var CA=x((u4e,I8)=>{"use strict";var Txe=sc(),C8=oA(),c4e=tt(),T8=at(),Ixe=require("url"),Axe=iv(),Rxe=function(){function t(e){this._endpointBase=T8.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var n=this._connectionString,r=C8.parse(e),i=C8.parse(n),o=!r.instrumentationkey&&Object.keys(r).length>0?null:e,s=this._instrumentationKey;this.instrumentationKey=r.instrumentationkey||o||i.instrumentationkey||s;var a=""+(this.endpointUrl||r.ingestionendpoint||i.ingestionendpoint||this._endpointBase);a.endsWith("/")&&(a=a.slice(0,-1)),this.endpointUrl=a+"/v2.1/track",this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||30*1e3,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=r.ingestionendpoint||i.ingestionendpoint||process.env[t.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||r.liveendpoint||i.liveendpoint||process.env[t.ENV_quickPulseHost]||T8.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new Ixe.URL(this.quickPulseHost).host),this.aadAudience=r.aadaudience||i.aadaudience}return Object.defineProperty(t.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){this._profileQueryEndpoint=e,this.correlationId=Txe.correlationIdPrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instrumentationKey",{get:function(){return this._instrumentationKey},set:function(e){t._validateInstrumentationKey(e),this._instrumentationKey=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webSnippetConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webInstrumentationConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),t.prototype._mergeConfig=function(){var e=Axe.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableLoggerErrorToTrace=e.enableLoggerErrorToTrace,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectIncomingRequestAzureFunctions=e.enableAutoCollectIncomingRequestAzureFunctions,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},t._validateInstrumentationKey=function(e){var n="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",r=new RegExp(n);return r.test(e)},t.ENV_azurePrefix="APPSETTING_",t.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",t.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",t.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",t.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",t}();I8.exports=Rxe});function ux(){return TA.create()}var A8,TA,IA=I(()=>{A8=new Set(["Deserialize","Serialize","Retry","Sign"]),TA=class t{constructor(e){var n;this._policies=[],this._policies=(n=e==null?void 0:e.slice(0))!==null&&n!==void 0?n:[],this._orderedPolicies=void 0}addPolicy(e,n={}){if(n.phase&&n.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(n.phase&&!A8.has(n.phase))throw new Error(`Invalid phase name: ${n.phase}`);if(n.afterPhase&&!A8.has(n.afterPhase))throw new Error(`Invalid afterPhase name: ${n.afterPhase}`);this._policies.push({policy:e,options:n}),this._orderedPolicies=void 0}removePolicy(e){let n=[];return this._policies=this._policies.filter(r=>e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase?(n.push(r.policy),!1):!0),this._orderedPolicies=void 0,n}sendRequest(e,n){return this.getOrderedPolicies().reduceRight((o,s)=>a=>s.sendRequest(a,o),o=>e.sendRequest(o))(n)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],n=new Map;function r(h){return{name:h,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let i=r("Serialize"),o=r("None"),s=r("Deserialize"),a=r("Retry"),u=r("Sign"),c=[i,o,s,a,u];function l(h){return h==="Retry"?a:h==="Serialize"?i:h==="Deserialize"?s:h==="Sign"?u:o}for(let h of this._policies){let m=h.policy,g=h.options,v=m.name;if(n.has(v))throw new Error("Duplicate policy names not allowed in pipeline");let y={policy:m,dependsOn:new Set,dependants:new Set};g.afterPhase&&(y.afterPhase=l(g.afterPhase),y.afterPhase.hasAfterPolicies=!0),n.set(v,y),l(g.phase).policies.add(y)}for(let h of this._policies){let{policy:m,options:g}=h,v=m.name,y=n.get(v);if(!y)throw new Error(`Missing node for policy ${v}`);if(g.afterPolicies)for(let _ of g.afterPolicies){let E=n.get(_);E&&(y.dependsOn.add(E),E.dependants.add(y))}if(g.beforePolicies)for(let _ of g.beforePolicies){let E=n.get(_);E&&(E.dependsOn.add(y),y.dependants.add(E))}}function f(h){h.hasRun=!0;for(let m of h.policies)if(!(m.afterPhase&&(!m.afterPhase.hasRun||m.afterPhase.policies.size))&&m.dependsOn.size===0){e.push(m.policy);for(let g of m.dependants)g.dependsOn.delete(m);n.delete(m.policy.name),h.policies.delete(m)}}function p(){for(let h of c){if(f(h),h.policies.size>0&&h!==o){o.hasRun||f(o);return}h.hasAfterPolicies&&f(o)}}let d=0;for(;n.size>0;){d++;let h=e.length;if(p(),e.length<=h&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}});var en,jl=I(()=>{Zv();en=nl("core-rest-pipeline")});var AA,lx,R8=I(()=>{lx=typeof process<"u"&&!!process.version&&!!(!((AA=process.versions)===null||AA===void 0)&&AA.node)});function RA(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=$l.get(t);e&&e.slice().forEach(n=>{n.call(t,{type:"abort"})}),fx.set(t,!0)}var $l,fx,Od,P8=I(()=>{$l=new WeakMap,fx=new WeakMap,Od=class t{constructor(){this.onabort=null,$l.set(this,[]),fx.set(this,!1)}get aborted(){if(!fx.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return fx.get(this)}static get none(){return new t}addEventListener(e,n){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");$l.get(this).push(n)}removeEventListener(e,n){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let r=$l.get(this),i=r.indexOf(n);i>-1&&r.splice(i,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}});var ji,Nd,O8=I(()=>{P8();ji=class extends Error{constructor(e){super(e),this.name="AbortError"}},Nd=class{constructor(e){if(this._signal=new Od,!!e){Array.isArray(e)||(e=arguments);for(let n of e)n.aborted?this.abort():n.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){RA(this._signal)}static timeout(e){let n=new Od,r=setTimeout(RA,e,n);return typeof r.unref=="function"&&r.unref(),n}}});var px=I(()=>{O8()});function PA(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}var N8=I(()=>{});function Dd(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}var OA=I(()=>{});function Hl(t){if(Dd(t)){let e=typeof t.name=="string",n=typeof t.message=="string";return e&&n}return!1}function Bl(t){if(Hl(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}var D8=I(()=>{OA()});var Gl=I(()=>{R8();N8();OA();D8()});var NA,Pxe,Oxe,zl,DA=I(()=>{Gl();NA="REDACTED",Pxe=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Oxe=["api-version"],zl=class{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:n=[]}={}){e=Pxe.concat(e),n=Oxe.concat(n),this.allowedHeaderNames=new Set(e.map(r=>r.toLowerCase())),this.allowedQueryParameters=new Set(n.map(r=>r.toLowerCase()))}sanitize(e){let n=new Set;return JSON.stringify(e,(r,i)=>{if(i instanceof Error)return Object.assign(Object.assign({},i),{name:i.name,message:i.message});if(r==="headers")return this.sanitizeHeaders(i);if(r==="url")return this.sanitizeUrl(i);if(r==="query")return this.sanitizeQuery(i);if(r==="body")return;if(r==="response")return;if(r==="operationSpec")return;if(Array.isArray(i)||Dd(i)){if(n.has(i))return"[Circular]";n.add(i)}return i},2)}sanitizeHeaders(e){let n={};for(let r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?n[r]=e[r]:n[r]=NA;return n}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let n={};for(let r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?n[r]=e[r]:n[r]=NA;return n}sanitizeUrl(e){if(typeof e!="string"||e===null)return e;let n=new URL(e);if(!n.search)return e;for(let[r]of n.searchParams)this.allowedQueryParameters.has(r.toLowerCase())||n.searchParams.set(r,NA);return n.toString()}}});function dx(t={}){var e;let n=(e=t.logger)!==null&&e!==void 0?e:en.info,r=new zl({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:LA,async sendRequest(i,o){if(!n.enabled)return o(i);n(`Request: ${r.sanitize(i)}`);let s=await o(i);return n(`Response status code: ${s.status}`),n(`Headers: ${r.sanitize(s.headers)}`),s}}}var LA,kA=I(()=>{jl();DA();LA="logPolicy"});function hx(t={}){let{maxRetries:e=20}=t;return{name:FA,async sendRequest(n,r){let i=await r(n);return k8(r,i,e)}}}async function k8(t,e,n,r=0){let{request:i,status:o,headers:s}=e,a=s.get("location");if(a&&(o===300||o===301&&L8.includes(i.method)||o===302&&L8.includes(i.method)||o===303&&i.method==="POST"||o===307)&&r<n){let u=new URL(a,i.url);i.url=u.toString(),o===303&&(i.method="GET",i.headers.delete("Content-Length"),delete i.body),i.headers.delete("Authorization");let c=await t(i);return k8(t,c,n,r+1)}return e}var FA,L8,MA=I(()=>{FA="redirectPolicy",L8=["GET","HEAD"]});function F8(){return"User-Agent"}function M8(t){t.set("Node",process.version),t.set("OS",`(${Vl.arch()}-${Vl.type()}-${Vl.release()})`)}var Vl,q8=I(()=>{Vl=Y(require("os"))});var mx,qA=I(()=>{mx="1.10.1"});function Nxe(t){let e=[];for(let[n,r]of t){let i=r?`${n}/${r}`:n;e.push(i)}return e.join(" ")}function U8(){return F8()}function gx(t){let e=new Map;e.set("core-rest-pipeline",mx),M8(e);let n=Nxe(e);return t?`${t} ${n}`:n}var UA=I(()=>{q8();qA()});function vx(t={}){let e=gx(t.userAgentPrefix);return{name:jA,async sendRequest(n,r){return n.headers.has(j8)||n.headers.set(j8,e),r(n)}}}var j8,jA,$A=I(()=>{UA();j8=U8(),jA="userAgentPolicy"});function yx(){return{name:HA,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}var HA,BA=I(()=>{HA="decompressResponsePolicy"});function xx(t,e,n){return new Promise((r,i)=>{let o,s,a=()=>i(new ji(n!=null&&n.abortErrorMsg?n==null?void 0:n.abortErrorMsg:Dxe)),u=()=>{n!=null&&n.abortSignal&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(o&&clearTimeout(o),u(),a()),n!=null&&n.abortSignal&&n.abortSignal.aborted)return a();o=setTimeout(()=>{u(),r(e)},t),n!=null&&n.abortSignal&&n.abortSignal.addEventListener("abort",s)})}function $8(t,e){let n=t.headers.get(e);if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r}var Dxe,_x=I(()=>{px();Dxe="The operation was aborted."});function H8(t){if(t&&[429,503].includes(t.status))try{for(let i of Lxe){let o=$8(t,i);if(o===0||o)return o*(i===GA?1e3:1)}let e=t.headers.get(GA);if(!e)return;let r=Date.parse(e)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch{return}}function B8(t){return Number.isFinite(H8(t))}function Ex(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=H8(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}var GA,Lxe,bx=I(()=>{_x();GA="Retry-After",Lxe=["retry-after-ms","x-ms-retry-after-ms",GA]});function Wl(t={}){var e,n;let r=(e=t.retryDelayInMs)!==null&&e!==void 0?e:kxe,i=(n=t.maxRetryDelayInMs)!==null&&n!==void 0?n:Fxe,o=r;return{name:"exponentialRetryStrategy",retry({retryCount:s,response:a,responseError:u}){let c=qxe(u),l=c&&t.ignoreSystemErrors,f=Mxe(a),p=f&&t.ignoreHttpStatusCodes;if(a&&(B8(a)||!f)||p||l)return{skipStrategy:!0};if(u&&!c&&!f)return{errorToThrow:u};let h=o*Math.pow(2,s),m=Math.min(i,h);return o=m/2+PA(0,m/2),{retryAfterInMs:o}}}}function Mxe(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}function qxe(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT":!1}var kxe,Fxe,wx=I(()=>{Gl();bx();kxe=1e3,Fxe=1e3*64});function $i(t,e={maxRetries:3}){let n=e.logger||G8;return{name:Uxe,async sendRequest(r,i){var o,s;let a,u,c=-1;e:for(;;){c+=1,a=void 0,u=void 0;try{n.info(`Retry ${c}: Attempting to send request`,r.requestId),a=await i(r),n.info(`Retry ${c}: Received a response from request`,r.requestId)}catch(l){if(n.error(`Retry ${c}: Received an error from request`,r.requestId),u=l,!l||u.name!=="RestError")throw l;a=u.response}if(!((o=r.abortSignal)===null||o===void 0)&&o.aborted)throw n.error(`Retry ${c}: Request aborted.`),new ji;if(c>=((s=e.maxRetries)!==null&&s!==void 0?s:3)){if(n.info(`Retry ${c}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),u)throw u;if(a)return a;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${c}: Processing ${t.length} retry strategies.`);t:for(let l of t){let f=l.logger||G8;f.info(`Retry ${c}: Processing retry strategy ${l.name}.`);let p=l.retry({retryCount:c,response:a,responseError:u});if(p.skipStrategy){f.info(`Retry ${c}: Skipped.`);continue t}let{errorToThrow:d,retryAfterInMs:h,redirectTo:m}=p;if(d)throw f.error(`Retry ${c}: Retry strategy ${l.name} throws error:`,d),d;if(h||h===0){f.info(`Retry ${c}: Retry strategy ${l.name} retries after ${h}`),await xx(h,void 0,{abortSignal:r.abortSignal});continue e}if(m){f.info(`Retry ${c}: Retry strategy ${l.name} redirects to ${m}`),r.url=m;continue e}}if(u)throw n.info("None of the retry strategies could work with the received error. Throwing it."),u;if(a)return n.info("None of the retry strategies could work with the received response. Returning it."),a}}}}var G8,Uxe,Yl=I(()=>{_x();Zv();px();G8=nl("core-rest-pipeline retryPolicy"),Uxe="retryPolicy"});function Sx(t={}){var e;return{name:jxe,sendRequest:$i([Ex(),Wl(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3}).sendRequest}}var jxe,zA=I(()=>{wx();bx();Yl();jxe="defaultRetryPolicy"});var W8=x((r3e,V8)=>{var z8=require("stream").Stream,$xe=require("util");V8.exports=ci;function ci(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}$xe.inherits(ci,z8);ci.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var i=t.emit;return t.emit=function(){return n._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(ci.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});ci.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ci.prototype.resume=function(){this._released||this.release(),this.source.resume()};ci.prototype.pause=function(){this.source.pause()};ci.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};ci.prototype.pipe=function(){var t=z8.prototype.pipe.apply(this,arguments);return this.resume(),t};ci.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};ci.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var J8=x((i3e,X8)=>{var Hxe=require("util"),K8=require("stream").Stream,Y8=W8();X8.exports=mt;function mt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Hxe.inherits(mt,K8);mt.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};mt.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};mt.prototype.append=function(t){var e=mt.isStreamLike(t);if(e){if(!(t instanceof Y8)){var n=Y8.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};mt.prototype.pipe=function(t,e){return K8.prototype.pipe.call(this,t,e),this.resume(),t};mt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};mt.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=mt.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};mt.prototype._pipeNext=function(t){this._currentStream=t;var e=mt.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};mt.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};mt.prototype.write=function(t){this.emit("data",t)};mt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};mt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};mt.prototype.end=function(){this._reset(),this.emit("end")};mt.prototype.destroy=function(){this._reset(),this.emit("close")};mt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};mt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};mt.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};mt.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var Q8=x((o3e,Bxe)=>{Bxe.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var e5=x((s3e,Z8)=>{Z8.exports=Q8()});var r5=x(Vn=>{"use strict";var Cx=e5(),Gxe=require("path").extname,t5=/^\s*([^;\s]*)(?:;|\s|$)/,zxe=/^text\//i;Vn.charset=n5;Vn.charsets={lookup:n5};Vn.contentType=Vxe;Vn.extension=Wxe;Vn.extensions=Object.create(null);Vn.lookup=Yxe;Vn.types=Object.create(null);Kxe(Vn.extensions,Vn.types);function n5(t){if(!t||typeof t!="string")return!1;var e=t5.exec(t),n=e&&Cx[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&zxe.test(e[1])?"UTF-8":!1}function Vxe(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Vn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=Vn.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}function Wxe(t){if(!t||typeof t!="string")return!1;var e=t5.exec(t),n=e&&Vn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function Yxe(t){if(!t||typeof t!="string")return!1;var e=Gxe("x."+t).toLowerCase().substr(1);return e&&Vn.types[e]||!1}function Kxe(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(Cx).forEach(function(i){var o=Cx[i],s=o.extensions;if(!(!s||!s.length)){t[i]=s;for(var a=0;a<s.length;a++){var u=s[a];if(e[u]){var c=n.indexOf(Cx[e[u]].source),l=n.indexOf(o.source);if(e[u]!=="application/octet-stream"&&(c>l||c===l&&e[u].substr(0,12)==="application/"))continue}e[u]=i}}})}});var o5=x((c3e,i5)=>{i5.exports=Xxe;function Xxe(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var VA=x((u3e,a5)=>{var s5=o5();a5.exports=Jxe;function Jxe(t){var e=!1;return s5(function(){e=!0}),function(r,i){e?t(r,i):s5(function(){t(r,i)})}}});var WA=x((l3e,c5)=>{c5.exports=Qxe;function Qxe(t){Object.keys(t.jobs).forEach(Zxe.bind(t)),t.jobs={}}function Zxe(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var YA=x((f3e,l5)=>{var u5=VA(),e_e=WA();l5.exports=t_e;function t_e(t,e,n,r){var i=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[i]=n_e(e,i,t[i],function(o,s){i in n.jobs&&(delete n.jobs[i],o?e_e(n):n.results[i]=s,r(o,n.results))})}function n_e(t,e,n,r){var i;return t.length==2?i=t(n,u5(r)):i=t(n,e,u5(r)),i}});var KA=x((p3e,f5)=>{f5.exports=r_e;function r_e(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(i,o){return e(t[i],t[o])}),r}});var XA=x((d3e,p5)=>{var i_e=WA(),o_e=VA();p5.exports=s_e;function s_e(t){Object.keys(this.jobs).length&&(this.index=this.size,i_e(this),o_e(t)(null,this.results))}});var h5=x((h3e,d5)=>{var a_e=YA(),c_e=KA(),u_e=XA();d5.exports=l_e;function l_e(t,e,n){for(var r=c_e(t);r.index<(r.keyedList||t).length;)a_e(t,e,r,function(i,o){if(i){n(i,o);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return u_e.bind(r,n)}});var JA=x((m3e,Tx)=>{var m5=YA(),f_e=KA(),p_e=XA();Tx.exports=d_e;Tx.exports.ascending=g5;Tx.exports.descending=h_e;function d_e(t,e,n,r){var i=f_e(t,n);return m5(t,e,i,function o(s,a){if(s){r(s,a);return}if(i.index++,i.index<(i.keyedList||t).length){m5(t,e,i,o);return}r(null,i.results)}),p_e.bind(i,r)}function g5(t,e){return t<e?-1:t>e?1:0}function h_e(t,e){return-1*g5(t,e)}});var y5=x((g3e,v5)=>{var m_e=JA();v5.exports=g_e;function g_e(t,e,n){return m_e(t,e,null,n)}});var _5=x((v3e,x5)=>{x5.exports={parallel:h5(),serial:y5(),serialOrdered:JA()}});var b5=x((y3e,E5)=>{E5.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var C5=x((x3e,S5)=>{var tR=J8(),w5=require("util"),QA=require("path"),v_e=require("http"),y_e=require("https"),x_e=require("url").parse,__e=require("fs"),E_e=require("stream").Stream,ZA=r5(),b_e=_5(),eR=b5();S5.exports=Pe;w5.inherits(Pe,tR);function Pe(t){if(!(this instanceof Pe))return new Pe(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],tR.call(this),t=t||{};for(var e in t)this[e]=t[e]}Pe.LINE_BREAK=`\r
|
|
`;Pe.DEFAULT_CONTENT_TYPE="application/octet-stream";Pe.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=tR.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),w5.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),o=this._multiPartFooter();r(i),r(e),r(o),this._trackLength(i,e,n)};Pe.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Pe.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof E_e))&&(n.knownLength||this._valuesToMeasure.push(e))};Pe.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):__e.stat(t.path,function(n,r){var i;if(n){e(n);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Pe.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),i=this._getContentType(e,n),o="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&eR(s,n.header);var a;for(var u in s)s.hasOwnProperty(u)&&(a=s[u],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(o+=u+": "+a.join("; ")+Pe.LINE_BREAK)));return"--"+this.getBoundary()+Pe.LINE_BREAK+o+Pe.LINE_BREAK};Pe.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=QA.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=QA.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=QA.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Pe.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=ZA.lookup(t.name)),!n&&t.path&&(n=ZA.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=ZA.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Pe.DEFAULT_CONTENT_TYPE),n};Pe.prototype._multiPartFooter=function(){return function(t){var e=Pe.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Pe.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Pe.LINE_BREAK};Pe.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Pe.prototype.setBoundary=function(t){this._boundary=t};Pe.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Pe.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Pe.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Pe.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Pe.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Pe.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Pe.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}b_e.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};Pe.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=x_e(t),r=eR({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=eR(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=y_e.request(r):n=v_e.request(r),this.getLength(function(o,s){if(o&&o!=="Unknown stream"){this._error(o);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,u=function(c,l){return n.removeListener("error",u),n.removeListener("response",a),e.call(this,c,l)};a=u.bind(this,null),n.on("error",u),n.on("response",a)}}.bind(this)),n};Pe.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Pe.prototype.toString=function(){return"[object FormData]"}});function Ix(){return{name:nR,async sendRequest(t,e){if(t.formData){let n=t.headers.get("Content-Type");n&&n.indexOf("application/x-www-form-urlencoded")!==-1?(t.body=w_e(t.formData),t.formData=void 0):await S_e(t.formData,t)}return e(t)}}}function w_e(t){let e=new URLSearchParams;for(let[n,r]of Object.entries(t))if(Array.isArray(r))for(let i of r)e.append(n,i.toString());else e.append(n,r.toString());return e.toString()}async function S_e(t,e){let n=new T5.default;for(let i of Object.keys(t)){let o=t[i];if(Array.isArray(o))for(let s of o)n.append(i,s);else n.append(i,o)}e.body=n,e.formData=void 0;let r=e.headers.get("Content-Type");r&&r.indexOf("multipart/form-data")!==-1&&e.headers.set("Content-Type",`multipart/form-data; boundary=${n.getBoundary()}`);try{let i=await new Promise((o,s)=>{n.getLength((a,u)=>{a?s(a):o(u)})});e.headers.set("Content-Length",i)}catch{}}var T5,nR,rR=I(()=>{T5=Y(C5()),nR="formDataPolicy"});var I5=x(iR=>{"use strict";Object.defineProperty(iR,"__esModule",{value:!0});function C_e(t){return function(e,n){return new Promise((r,i)=>{t.call(this,e,n,(o,s)=>{o?i(o):r(s)})})}}iR.default=C_e});var aR=x((sR,R5)=>{"use strict";var A5=sR&&sR.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},T_e=require("events"),I_e=A5(Wi()),A_e=A5(I5()),kd=I_e.default("agent-base");function R_e(t){return!!t&&typeof t.addRequest=="function"}function oR(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function Ax(t,e){return new Ax.Agent(t,e)}(function(t){class e extends T_e.EventEmitter{constructor(r,i){super();let o=i;typeof r=="function"?this.callback=r:r&&(o=r),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:oR()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:oR()?"https:":"http:"}set protocol(r){this.explicitProtocol=r}callback(r,i,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(r,i){let o=Object.assign({},i);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=oR()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,r._last=!0,r.shouldKeepAlive=!1;let s=!1,a=null,u=o.timeout||this.timeout,c=d=>{r._hadError||(r.emit("error",d),r._hadError=!0)},l=()=>{a=null,s=!0;let d=new Error(`A "socket" was not created for HTTP request before ${u}ms`);d.code="ETIMEOUT",c(d)},f=d=>{s||(a!==null&&(clearTimeout(a),a=null),c(d))},p=d=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),R_e(d)){kd("Callback returned another Agent instance %o",d.constructor.name),d.addRequest(r,o);return}if(d){d.once("free",()=>{this.freeSocket(d,o)}),r.onSocket(d);return}let h=new Error(`no Duplex stream was returned to agent-base for \`${r.method} ${r.path}\``);c(h)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(kd("Converting legacy callback function to promise"),this.promisifiedCallback=A_e.default(this.callback)):this.promisifiedCallback=this.callback),typeof u=="number"&&u>0&&(a=setTimeout(l,u)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{kd("Resolving socket for %o request: %o",o.protocol,`${r.method} ${r.path}`),Promise.resolve(this.promisifiedCallback(r,o)).then(p,f)}catch(d){Promise.reject(d).catch(f)}}freeSocket(r,i){kd("Freeing socket %o %o",r.constructor.name,i),r.destroy()}destroy(){kd("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Ax||(Ax={}));R5.exports=Ax});var P5=x(Md=>{"use strict";var P_e=Md&&Md.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Md,"__esModule",{value:!0});var O_e=P_e(Wi()),Fd=O_e.default("https-proxy-agent:parse-proxy-response");function N_e(t){return new Promise((e,n)=>{let r=0,i=[];function o(){let f=t.read();f?l(f):t.once("readable",o)}function s(){t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",a),t.removeListener("readable",o)}function a(f){Fd("onclose had error %o",f)}function u(){Fd("onend")}function c(f){s(),Fd("onerror %o",f),n(f)}function l(f){i.push(f),r+=f.length;let p=Buffer.concat(i,r);if(p.indexOf(`\r
|
|
\r
|
|
`)===-1){Fd("have not received end of HTTP headers yet..."),o();return}let h=p.toString("ascii",0,p.indexOf(`\r
|
|
`)),m=+h.split(" ")[1];Fd("got proxy server response: %o",h),e({statusCode:m,buffered:p})}t.on("error",c),t.on("close",a),t.on("end",u),o()})}Md.default=N_e});var D5=x(wc=>{"use strict";var D_e=wc&&wc.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Kl=wc&&wc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wc,"__esModule",{value:!0});var O5=Kl(require("net")),N5=Kl(require("tls")),L_e=Kl(require("url")),k_e=Kl(require("assert")),F_e=Kl(Wi()),M_e=aR(),q_e=Kl(P5()),qd=F_e.default("https-proxy-agent:agent"),cR=class extends M_e.Agent{constructor(e){let n;if(typeof e=="string"?n=L_e.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");qd("creating new HttpsProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||$_e(r.protocol),r.host=r.hostname||r.host,typeof r.port=="string"&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in r)&&(r.ALPNProtocols=["http 1.1"]),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,n){return D_e(this,void 0,void 0,function*(){let{proxy:r,secureProxy:i}=this,o;i?(qd("Creating `tls.Socket`: %o",r),o=N5.default.connect(r)):(qd("Creating `net.Socket`: %o",r),o=O5.default.connect(r));let s=Object.assign({},r.headers),u=`CONNECT ${`${n.host}:${n.port}`} HTTP/1.1\r
|
|
`;r.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:c,port:l,secureEndpoint:f}=n;j_e(l,f)||(c+=`:${l}`),s.Host=c,s.Connection="close";for(let g of Object.keys(s))u+=`${g}: ${s[g]}\r
|
|
`;let p=q_e.default(o);o.write(`${u}\r
|
|
`);let{statusCode:d,buffered:h}=yield p;if(d===200){if(e.once("socket",U_e),n.secureEndpoint){qd("Upgrading socket connection to TLS");let g=n.servername||n.host;return N5.default.connect(Object.assign(Object.assign({},H_e(n,"host","hostname","path","port")),{socket:o,servername:g}))}return o}o.destroy();let m=new O5.default.Socket({writable:!1});return m.readable=!0,e.once("socket",g=>{qd("replaying proxy buffer for failed request"),k_e.default(g.listenerCount("data")>0),g.push(h),g.push(null)}),m})}};wc.default=cR;function U_e(t){t.resume()}function j_e(t,e){return!!(!e&&t===80||e&&t===443)}function $_e(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function H_e(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var k5=x((fR,L5)=>{"use strict";var B_e=fR&&fR.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},uR=B_e(D5());function lR(t){return new uR.default(t)}(function(t){t.HttpsProxyAgent=uR.default,t.prototype=uR.default.prototype})(lR||(lR={}));L5.exports=lR});var F5=x(pR=>{"use strict";Object.defineProperty(pR,"__esModule",{value:!0});function G_e(t,e,{signal:n}={}){return new Promise((r,i)=>{function o(){n==null||n.removeEventListener("abort",o),t.removeListener(e,s),t.removeListener("error",a)}function s(...u){o(),r(u)}function a(u){o(),i(u)}n==null||n.addEventListener("abort",o),t.on(e,s),t.on("error",a)})}pR.default=G_e});var M5=x(Sc=>{"use strict";var z_e=Sc&&Sc.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Ud=Sc&&Sc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sc,"__esModule",{value:!0});var V_e=Ud(require("net")),W_e=Ud(require("tls")),dR=Ud(require("url")),Y_e=Ud(Wi()),K_e=Ud(F5()),X_e=aR(),Bs=(0,Y_e.default)("http-proxy-agent");function J_e(t){return typeof t=="string"?/^https:?$/i.test(t):!1}var hR=class extends X_e.Agent{constructor(e){let n;if(typeof e=="string"?n=dR.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Bs("Creating new HttpProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||J_e(r.protocol),r.host=r.hostname||r.host,typeof r.port=="string"&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,n){return z_e(this,void 0,void 0,function*(){let{proxy:r,secureProxy:i}=this,o=dR.default.parse(e.path);o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=n.hostname||n.host||null),o.port==null&&typeof n.port&&(o.port=String(n.port)),o.port==="80"&&(o.port=""),e.path=dR.default.format(o),r.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`);let s;if(i?(Bs("Creating `tls.Socket`: %o",r),s=W_e.default.connect(r)):(Bs("Creating `net.Socket`: %o",r),s=V_e.default.connect(r)),e._header){let a,u;Bs("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(Bs("Patching connection write() output buffer with updated header"),a=e.output[0],u=a.indexOf(`\r
|
|
\r
|
|
`)+4,e.output[0]=e._header+a.substring(u),Bs("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(Bs("Patching connection write() output buffer with updated header"),a=e.outputData[0].data,u=a.indexOf(`\r
|
|
\r
|
|
`)+4,e.outputData[0].data=e._header+a.substring(u),Bs("Output buffer: %o",e.outputData[0].data))}return yield(0,K_e.default)(s,"connect"),s})}};Sc.default=hR});var U5=x((vR,q5)=>{"use strict";var Q_e=vR&&vR.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},mR=Q_e(M5());function gR(t){return new mR.default(t)}(function(t){t.HttpProxyAgent=mR.default,t.prototype=mR.default.prototype})(gR||(gR={}));q5.exports=gR});function Rx(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function iEe(){if(!process)return;let t=Rx(Z_e),e=Rx(tEe),n=Rx(eEe);return t||e||n}function oEe(t,e,n){if(e.length===0)return!1;let r=new URL(t).hostname;if(n!=null&&n.has(r))return n.get(r);let i=!1;for(let o of e)o[0]==="."?(r.endsWith(o)||r.length===o.length-1&&r===o.slice(1))&&(i=!0):r===o&&(i=!0);return n==null||n.set(r,i),i}function sEe(){let t=Rx(nEe);return G5=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function xR(t){if(!t&&(t=iEe(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function $5(t,{headers:e,tlsSettings:n}){let r;try{r=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}n&&en.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let i={hostname:r.hostname,port:t.port,protocol:r.protocol,headers:e.toJSON()};return t.username&&t.password?i.auth=`${t.username}:${t.password}`:t.username&&(i.auth=`${t.username}`),i}function aEe(t,e){if(t.agent)return;let r=new URL(t.url).protocol!=="https:",i=t.proxySettings;if(i)if(r){if(!e.httpProxyAgent){let o=$5(i,t);e.httpProxyAgent=new B5.HttpProxyAgent(o)}t.agent=e.httpProxyAgent}else{if(!e.httpsProxyAgent){let o=$5(i,t);e.httpsProxyAgent=new H5.HttpsProxyAgent(o)}t.agent=e.httpsProxyAgent}}function Px(t=xR(),e){G5||j5.push(...sEe());let n={};return{name:yR,async sendRequest(r,i){var o;return!r.proxySettings&&!oEe(r.url,(o=e==null?void 0:e.customNoProxyList)!==null&&o!==void 0?o:j5,e!=null&&e.customNoProxyList?void 0:rEe)&&(r.proxySettings=t),r.proxySettings&&aEe(r,n),i(r)}}}var H5,B5,Z_e,eEe,tEe,nEe,yR,j5,G5,rEe,_R=I(()=>{H5=Y(k5()),B5=Y(U5());jl();Z_e="HTTPS_PROXY",eEe="HTTP_PROXY",tEe="ALL_PROXY",nEe="NO_PROXY",yR="proxyPolicy",j5=[],G5=!1,rEe=new Map});function Ox(t="x-ms-client-request-id"){return{name:ER,async sendRequest(e,n){return e.headers.has(t)||e.headers.set(t,e.requestId),n(e)}}}var ER,bR=I(()=>{ER="setClientRequestIdPolicy"});function Nx(t){return{name:wR,sendRequest:async(e,n)=>(e.tlsSettings||(e.tlsSettings=t),n(e))}}var wR,SR=I(()=>{wR="tlsPolicy"});function z5(t={}){let e=new CR(t.parentContext);return t.span&&(e=e.setValue(Xl.span,t.span)),t.namespace&&(e=e.setValue(Xl.namespace,t.namespace)),e}var Xl,CR,TR=I(()=>{Xl={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};CR=class t{constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,n){let r=new t(this);return r._contextMap.set(e,n),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){let n=new t(this);return n._contextMap.delete(e),n}}});function cEe(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}}}function uEe(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:cEe(),tracingContext:z5({parentContext:e.tracingContext})}),withContext(t,e,...n){return e(...n)}}}function jd(){return IR||(IR=uEe()),IR}var IR,V5=I(()=>{TR()});function AR(t){let{namespace:e,packageName:n,packageVersion:r}=t;function i(c,l,f){var p;let d=jd().startSpan(c,Object.assign(Object.assign({},f),{packageName:n,packageVersion:r,tracingContext:(p=l==null?void 0:l.tracingOptions)===null||p===void 0?void 0:p.tracingContext})),h=d.tracingContext,m=d.span;h.getValue(Xl.namespace)||(h=h.setValue(Xl.namespace,e)),m.setAttribute("az.namespace",h.getValue(Xl.namespace));let g=Object.assign({},l,{tracingOptions:Object.assign(Object.assign({},l==null?void 0:l.tracingOptions),{tracingContext:h})});return{span:m,updatedOptions:g}}async function o(c,l,f,p){let{span:d,updatedOptions:h}=i(c,l,p);try{let m=await s(h.tracingOptions.tracingContext,()=>Promise.resolve(f(h,d)));return d.setStatus({status:"success"}),m}catch(m){throw d.setStatus({status:"error",error:m}),m}finally{d.end()}}function s(c,l,...f){return jd().withContext(c,l,...f)}function a(c){return jd().parseTraceparentHeader(c)}function u(c){return jd().createRequestHeaders(c)}return{startSpan:i,withSpan:o,withContext:s,parseTraceparentHeader:a,createRequestHeaders:u}}var W5=I(()=>{V5();TR()});var Y5=I(()=>{W5()});var K5,X5,J5=I(()=>{K5=require("util"),X5=K5.inspect.custom});function Dx(t){return t instanceof fr?!0:Hl(t)&&t.name==="RestError"}var lEe,fr,Lx=I(()=>{Gl();J5();DA();lEe=new zl,fr=class t extends Error{constructor(e,n={}){super(e),this.name="RestError",this.code=n.code,this.statusCode=n.statusCode,this.request=n.request,this.response=n.response,Object.setPrototypeOf(this,t.prototype)}[X5](){return`RestError: ${this.message}
|
|
${lEe.sanitize(this)}`}};fr.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";fr.PARSE_ERROR="PARSE_ERROR"});function kx(t={}){let e=gx(t.userAgentPrefix),n=fEe();return{name:RR,async sendRequest(r,i){var o,s;if(!n||!(!((o=r.tracingOptions)===null||o===void 0)&&o.tracingContext))return i(r);let{span:a,tracingContext:u}=(s=pEe(n,r,e))!==null&&s!==void 0?s:{};if(!a||!u)return i(r);try{let c=await n.withContext(u,i,r);return hEe(a,c),c}catch(c){throw dEe(a,c),c}}}}function fEe(){try{return AR({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:mx})}catch(t){en.warning(`Error when creating the TracingClient: ${Bl(t)}`);return}}function pEe(t,e,n){try{let{span:r,updatedOptions:i}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":e.method,"http.url":e.url,requestId:e.requestId}});if(!r.isRecording()){r.end();return}n&&r.setAttribute("http.user_agent",n);let o=t.createRequestHeaders(i.tracingOptions.tracingContext);for(let[s,a]of Object.entries(o))e.headers.set(s,a);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(r){en.warning(`Skipping creating a tracing span due to an error: ${Bl(r)}`);return}}function dEe(t,e){try{t.setStatus({status:"error",error:Hl(e)?e:void 0}),Dx(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(n){en.warning(`Skipping tracing span processing due to an error: ${Bl(n)}`)}}function hEe(t,e){try{t.setAttribute("http.status_code",e.status);let n=e.headers.get("x-ms-request-id");n&&t.setAttribute("serviceRequestId",n),t.setStatus({status:"success"}),t.end()}catch(n){en.warning(`Skipping tracing span processing due to an error: ${Bl(n)}`)}}var RR,PR=I(()=>{Y5();qA();UA();jl();Gl();Lx();RR="tracingPolicy"});function Q5(t){let e=ux();return lx&&(t.tlsOptions&&e.addPolicy(Nx(t.tlsOptions)),e.addPolicy(Px(t.proxyOptions)),e.addPolicy(yx())),e.addPolicy(Ix()),e.addPolicy(vx(t.userAgentOptions)),e.addPolicy(Ox()),e.addPolicy(Sx(t.retryOptions),{phase:"Retry"}),e.addPolicy(kx(t.userAgentOptions),{afterPhase:"Retry"}),lx&&e.addPolicy(hx(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy(dx(t.loggingOptions),{afterPhase:"Sign"}),e}var Z5=I(()=>{kA();IA();MA();$A();BA();zA();rR();Gl();_R();bR();SR();PR()});function Fx(t){return t.toLowerCase()}function*mEe(t){for(let e of t.values())yield[e.name,e.value]}function Jl(t){return new OR(t)}var OR,Mx=I(()=>{OR=class{constructor(e){if(this._headersMap=new Map,e)for(let n of Object.keys(e))this.set(n,e[n])}set(e,n){this._headersMap.set(Fx(e),{name:e,value:String(n)})}get(e){var n;return(n=this._headersMap.get(Fx(e)))===null||n===void 0?void 0:n.value}has(e){return this._headersMap.has(Fx(e))}delete(e){this._headersMap.delete(Fx(e))}toJSON(e={}){let n={};if(e.preserveCase)for(let r of this._headersMap.values())n[r.name]=r.value;else for(let[r,i]of this._headersMap)n[r]=i.value;return n}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return mEe(this._headersMap)}}});function $d(t){return t&&typeof t.pipe=="function"}function eY(t){return new Promise(e=>{t.on("close",e),t.on("end",e),t.on("error",e)})}function nY(t){return t&&typeof t.byteLength=="number"}function vEe(t){let e=Jl();for(let n of Object.keys(t.headers)){let r=t.headers[n];Array.isArray(r)?r.length>0&&e.set(n,r[0]):r&&e.set(n,r)}return e}function yEe(t,e){let n=e.get("Content-Encoding");if(n==="gzip"){let r=Ux.createGunzip();return t.pipe(r),r}else if(n==="deflate"){let r=Ux.createInflate();return t.pipe(r),r}return t}function xEe(t){return new Promise((e,n)=>{let r=[];t.on("data",i=>{Buffer.isBuffer(i)?r.push(i):r.push(Buffer.from(i))}),t.on("end",()=>{e(Buffer.concat(r).toString("utf8"))}),t.on("error",i=>{i&&(i==null?void 0:i.name)==="AbortError"?n(i):n(new fr(`Error reading response as text: ${i.message}`,{code:fr.PARSE_ERROR}))})})}function _Ee(t){return t?Buffer.isBuffer(t)?t.length:$d(t)?null:nY(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function rY(){return new NR}var Ql,Zl,Ux,tY,gEe,qx,NR,iY=I(()=>{Ql=Y(require("http")),Zl=Y(require("https")),Ux=Y(require("zlib")),tY=require("stream");px();Mx();Lx();jl();gEe={};qx=class extends tY.Transform{constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}_transform(e,n,r){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),r()}catch(i){r(i)}}},NR=class{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var n,r,i;let o=new Nd,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new ji("The operation was aborted.");s=f=>{f.type==="abort"&&o.abort()},e.abortSignal.addEventListener("abort",s)}e.timeout>0&&setTimeout(()=>{o.abort()},e.timeout);let a=e.headers.get("Accept-Encoding"),u=(a==null?void 0:a.includes("gzip"))||(a==null?void 0:a.includes("deflate")),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let f=_Ee(c);f!==null&&e.headers.set("Content-Length",f)}let l;try{if(c&&e.onUploadProgress){let g=e.onUploadProgress,v=new qx(g);v.on("error",y=>{en.error("Error in upload progress",y)}),$d(c)?c.pipe(v):v.end(c),c=v}let f=await this.makeRequest(e,o,c),p=vEe(f),h={status:(n=f.statusCode)!==null&&n!==void 0?n:0,headers:p,request:e};if(e.method==="HEAD")return f.resume(),h;l=u?yEe(f,p):f;let m=e.onDownloadProgress;if(m){let g=new qx(m);g.on("error",v=>{en.error("Error in download progress",v)}),l.pipe(g),l=g}return!((r=e.streamResponseStatusCodes)===null||r===void 0)&&r.has(Number.POSITIVE_INFINITY)||!((i=e.streamResponseStatusCodes)===null||i===void 0)&&i.has(h.status)?h.readableStreamBody=l:h.bodyAsText=await xEe(l),h}finally{if(e.abortSignal&&s){let f=Promise.resolve();$d(c)&&(f=eY(c));let p=Promise.resolve();$d(l)&&(p=eY(l)),Promise.all([f,p]).then(()=>{var d;s&&((d=e.abortSignal)===null||d===void 0||d.removeEventListener("abort",s))}).catch(d=>{en.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,n,r){var i;let o=new URL(e.url),s=o.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let u={agent:(i=e.agent)!==null&&i!==void 0?i:this.getOrCreateAgent(e,s),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise((c,l)=>{let f=s?Ql.request(u,c):Zl.request(u,c);f.once("error",p=>{var d;l(new fr(p.message,{code:(d=p.code)!==null&&d!==void 0?d:fr.REQUEST_SEND_ERROR,request:e}))}),n.signal.addEventListener("abort",()=>{let p=new ji("The operation was aborted.");f.destroy(p),l(p)}),r&&$d(r)?r.pipe(f):r?typeof r=="string"||Buffer.isBuffer(r)?f.end(r):nY(r)?f.end(ArrayBuffer.isView(r)?Buffer.from(r.buffer):Buffer.from(r)):(en.error("Unrecognized body type",r),l(new fr("Unrecognized body type"))):f.end()})}getOrCreateAgent(e,n){var r;let i=e.disableKeepAlive;if(n)return i?Ql.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Ql.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return Zl.globalAgent;let o=(r=e.tlsSettings)!==null&&r!==void 0?r:gEe,s=this.cachedHttpsAgents.get(o);return s&&s.options.keepAlive===!i||(en.info("No cached TLS Agent exist, creating a new Agent"),s=new Zl.Agent(Object.assign({keepAlive:!i},o)),this.cachedHttpsAgents.set(o,s)),s}}}});function oY(){return rY()}var sY=I(()=>{iY()});function DR(){return jx>$x.length-16&&(aY.default.randomFillSync($x),jx=0),$x.slice(jx,jx+=16)}var aY,$x,jx,cY=I(()=>{aY=Y(require("crypto")),$x=new Uint8Array(256),jx=$x.length});var uY,lY=I(()=>{uY=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function EEe(t){return typeof t=="string"&&uY.test(t)}var fY,pY=I(()=>{lY();fY=EEe});function bEe(t,e=0){let n=(tn[t[e+0]]+tn[t[e+1]]+tn[t[e+2]]+tn[t[e+3]]+"-"+tn[t[e+4]]+tn[t[e+5]]+"-"+tn[t[e+6]]+tn[t[e+7]]+"-"+tn[t[e+8]]+tn[t[e+9]]+"-"+tn[t[e+10]]+tn[t[e+11]]+tn[t[e+12]]+tn[t[e+13]]+tn[t[e+14]]+tn[t[e+15]]).toLowerCase();if(!fY(n))throw TypeError("Stringified UUID is invalid");return n}var tn,dY,hY=I(()=>{pY();tn=[];for(let t=0;t<256;++t)tn.push((t+256).toString(16).substr(1));dY=bEe});function wEe(t,e,n){t=t||{};let r=t.random||(t.rng||DR)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return dY(r)}var LR,mY=I(()=>{cY();hY();LR=wEe});var gY=I(()=>{mY()});function vY(){return LR()}var yY=I(()=>{gY()});function xY(t){return new kR(t)}var kR,_Y=I(()=>{Mx();yY();kR=class{constructor(e){var n,r,i,o,s,a,u;this.url=e.url,this.body=e.body,this.headers=(n=e.headers)!==null&&n!==void 0?n:Jl(),this.method=(r=e.method)!==null&&r!==void 0?r:"GET",this.timeout=(i=e.timeout)!==null&&i!==void 0?i:0,this.formData=e.formData,this.disableKeepAlive=(o=e.disableKeepAlive)!==null&&o!==void 0?o:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(s=e.withCredentials)!==null&&s!==void 0?s:!1,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||vY(),this.allowInsecureConnection=(a=e.allowInsecureConnection)!==null&&a!==void 0?a:!1,this.enableBrowserStreams=(u=e.enableBrowserStreams)!==null&&u!==void 0?u:!1}}});function bY(t={}){var e;return $i([Wl(Object.assign(Object.assign({},t),{ignoreSystemErrors:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3})}var EY,wY=I(()=>{wx();Yl();EY="exponentialRetryPolicy"});function SY(t={}){var e;return{name:FR,sendRequest:$i([Wl(Object.assign(Object.assign({},t),{ignoreHttpStatusCodes:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3}).sendRequest}}var FR,CY=I(()=>{wx();Yl();FR="systemErrorRetryPolicy"});function TY(t={}){var e;return{name:MR,sendRequest:$i([Ex()],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3}).sendRequest}}var MR,IY=I(()=>{bx();Yl();MR="throttlingRetryPolicy"});async function CEe(t,e,n){async function r(){if(Date.now()<n)try{return await t()}catch{return null}else{let o=await t();if(o===null)throw new Error("Failed to refresh access token.");return o}}let i=await r();for(;i===null;)await xx(e),i=await r();return i}function AY(t,e){let n=null,r=null,i,o=Object.assign(Object.assign({},SEe),e),s={get isRefreshing(){return n!==null},get shouldRefresh(){var u;return!s.isRefreshing&&((u=r==null?void 0:r.expiresOnTimestamp)!==null&&u!==void 0?u:0)-o.refreshWindowInMs<Date.now()},get mustRefresh(){return r===null||r.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function a(u,c){var l;return s.isRefreshing||(n=CEe(()=>t.getToken(u,c),o.retryIntervalInMs,(l=r==null?void 0:r.expiresOnTimestamp)!==null&&l!==void 0?l:Date.now()).then(p=>(n=null,r=p,i=c.tenantId,r)).catch(p=>{throw n=null,r=null,i=void 0,p})),n}return async(u,c)=>i!==c.tenantId||!!c.claims||s.mustRefresh?a(u,c):(s.shouldRefresh&&a(u,c),r)}var SEe,RY=I(()=>{_x();SEe={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2}});async function TEe(t){let{scopes:e,getAccessToken:n,request:r}=t,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},o=await n(e,i);o&&t.request.headers.set("Authorization",`Bearer ${o.token}`)}function IEe(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}function PY(t){var e;let{credential:n,scopes:r,challengeCallbacks:i}=t,o=t.logger||en,s=Object.assign({authorizeRequest:(e=i==null?void 0:i.authorizeRequest)!==null&&e!==void 0?e:TEe,authorizeRequestOnChallenge:i==null?void 0:i.authorizeRequestOnChallenge},i),a=n?AY(n):()=>Promise.resolve(null);return{name:qR,async sendRequest(u,c){if(!u.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:u,getAccessToken:a,logger:o});let l,f;try{l=await c(u)}catch(p){f=p,l=p.response}if(s.authorizeRequestOnChallenge&&(l==null?void 0:l.status)===401&&IEe(l)&&await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:u,response:l,getAccessToken:a,logger:o}))return c(u);if(f)throw f;return l}}}var qR,OY=I(()=>{RY();jl();qR="bearerTokenAuthenticationPolicy"});function NY(){return{name:UR,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let n=JSON.parse(t.body);Array.isArray(n)&&(t.body=n.map(r=>JSON.stringify(r)+`
|
|
`).join(""))}return e(t)}}}var UR,DY=I(()=>{UR="ndJsonPolicy"});var LY={};Nn(LY,{RestError:()=>fr,bearerTokenAuthenticationPolicy:()=>PY,bearerTokenAuthenticationPolicyName:()=>qR,createDefaultHttpClient:()=>oY,createEmptyPipeline:()=>ux,createHttpHeaders:()=>Jl,createPipelineFromOptions:()=>Q5,createPipelineRequest:()=>xY,decompressResponsePolicy:()=>yx,decompressResponsePolicyName:()=>HA,defaultRetryPolicy:()=>Sx,exponentialRetryPolicy:()=>bY,exponentialRetryPolicyName:()=>EY,formDataPolicy:()=>Ix,formDataPolicyName:()=>nR,getDefaultProxySettings:()=>xR,isRestError:()=>Dx,logPolicy:()=>dx,logPolicyName:()=>LA,ndJsonPolicy:()=>NY,ndJsonPolicyName:()=>UR,proxyPolicy:()=>Px,proxyPolicyName:()=>yR,redirectPolicy:()=>hx,redirectPolicyName:()=>FA,retryPolicy:()=>$i,setClientRequestIdPolicy:()=>Ox,setClientRequestIdPolicyName:()=>ER,systemErrorRetryPolicy:()=>SY,systemErrorRetryPolicyName:()=>FR,throttlingRetryPolicy:()=>TY,throttlingRetryPolicyName:()=>MR,tlsPolicy:()=>Nx,tlsPolicyName:()=>wR,tracingPolicy:()=>kx,tracingPolicyName:()=>RR,userAgentPolicy:()=>vx,userAgentPolicyName:()=>jA});var kY=I(()=>{IA();Z5();sY();Mx();_Y();Lx();BA();wY();bR();kA();_R();MA();CY();IY();Yl();PR();zA();$A();SR();rR();OY();DY()});var qY=x((Hd,MY)=>{"use strict";var AEe=Hd&&Hd.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},REe=Hd&&Hd.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},FY=(kY(),zt(LY)),PEe="https://monitor.azure.com//.default";function OEe(t){return null}var NEe=function(){function t(e,n){var r=n?[n]:[PEe];this._azureTokenPolicy=FY.bearerTokenAuthenticationPolicy({credential:e,scopes:r})}return t.prototype.addAuthorizationHeader=function(e){return AEe(this,void 0,void 0,function(){var n,r;return REe(this,function(i){switch(i.label){case 0:return n="authorization",r=FY.createPipelineRequest({url:"https://"}),[4,this._azureTokenPolicy.sendRequest(r,OEe)];case 1:return i.sent(),e.headers[n]=r.headers.get(n),[2]}})})},t}();MY.exports=NEe});var jY=x((gVe,UY)=>{"use strict";var DEe=tt(),LEe=Xt(),kEe=function(){function t(e,n,r,i){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=n,this._getBatchIntervalMs=r,this._sender=i}return t.prototype.setUseDiskRetryCaching=function(e,n,r){this._sender.setDiskRetryMode(e,n,r)},t.prototype.send=function(e){var n=this;if(!this._isDisabled()){if(!e){DEe.warn("Cannot send null/undefined telemetry");return}if(this._buffer.push(e),this._buffer.length>=this._getBatchSize()){this.triggerSend(!1);return}!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout(function(){n._timeoutHandle=null,n.triggerSend(!1)},this._getBatchIntervalMs()))}},t.prototype.triggerSend=function(e,n){var r=this._buffer.length<1;r||(e||LEe.isNodeExit?(this._sender.saveOnCrash(this._buffer),typeof n=="function"&&n("data saved on crash")):this._sender.send(this._buffer,n)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,r&&typeof n=="function"&&n("no data to send")},t}();UY.exports=kEe});var $Y=x(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});Hx.azureRoleEnvironmentTelemetryProcessor=void 0;function FEe(t,e){}Hx.azureRoleEnvironmentTelemetryProcessor=FEe});var GY=x(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.getSamplingHashCode=ef.samplingTelemetryProcessor=void 0;var HY=yn();function MEe(t,e){var n=t.sampleRate,r=!1;return n==null||n>=100||t.data&&HY.TelemetryType.Metric===HY.baseTypeToTelemetryType(t.data.baseType)?!0:(e.correlationContext&&e.correlationContext.operation?r=BY(e.correlationContext.operation.id)<n:r=Math.random()*100<n,r)}ef.samplingTelemetryProcessor=MEe;function BY(t){var e=-2147483648,n=2147483647,r=5381;if(!t)return 0;for(;t.length<8;)t=t+t;for(var i=0;i<t.length;i++)r=((r<<5)+r|0)+t.charCodeAt(i)|0;return r=r<=e?n:Math.abs(r),r/n*100}ef.getSamplingHashCode=BY});var zY=x(Bx=>{"use strict";Object.defineProperty(Bx,"__esModule",{value:!0});Bx.performanceMetricsTelemetryProcessor=void 0;var jR=Ky(),$R=yn();function qEe(t,e){switch(e&&e.addDocument(t),t.data.baseType){case $R.TelemetryTypeString.Exception:jR.countException();break;case $R.TelemetryTypeString.Request:var n=t.data.baseData;jR.countRequest(n.duration,n.success);break;case $R.TelemetryTypeString.Dependency:var r=t.data.baseData;jR.countDependency(r.duration,r.success);break}return!0}Bx.performanceMetricsTelemetryProcessor=qEe});var VY=x(tf=>{"use strict";var Hi=tf&&tf.__assign||function(){return Hi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hi.apply(this,arguments)};Object.defineProperty(tf,"__esModule",{value:!0});tf.preAggregatedMetricsTelemetryProcessor=void 0;var UEe=yn(),Bd=iA(),Gx=yn();function jEe(t,e){if(Bd.isEnabled())switch(t.data.baseType){case Gx.TelemetryTypeString.Exception:var n=t.data.baseData;n.properties=Hi(Hi({},n.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Exceptions', Ver:'1.1')"});var r={cloudRoleInstance:t.tags[e.keys.cloudRoleInstance],cloudRoleName:t.tags[e.keys.cloudRole]};Bd.countException(r);break;case Gx.TelemetryTypeString.Trace:var i=t.data.baseData;i.properties=Hi(Hi({},i.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Traces', Ver:'1.1')"});var o={cloudRoleInstance:t.tags[e.keys.cloudRoleInstance],cloudRoleName:t.tags[e.keys.cloudRole],traceSeverityLevel:UEe.SeverityLevel[i.severity]};Bd.countTrace(o);break;case Gx.TelemetryTypeString.Request:var s=t.data.baseData;s.properties=Hi(Hi({},s.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"});var a={cloudRoleInstance:t.tags[e.keys.cloudRoleInstance],cloudRoleName:t.tags[e.keys.cloudRole],operationSynthetic:t.tags[e.keys.operationSyntheticSource],requestSuccess:s.success,requestResultCode:s.responseCode};Bd.countRequest(s.duration,a);break;case Gx.TelemetryTypeString.Dependency:var u=t.data.baseData;u.properties=Hi(Hi({},u.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Dependencies', Ver:'1.1')"});var c={cloudRoleInstance:t.tags[e.keys.cloudRoleInstance],cloudRoleName:t.tags[e.keys.cloudRole],operationSynthetic:t.tags[e.keys.operationSyntheticSource],dependencySuccess:u.success,dependencyType:u.type,dependencyTarget:u.target,dependencyResultCode:u.resultCode};Bd.countDependency(u.duration,c);break}return!0}tf.preAggregatedMetricsTelemetryProcessor=jEe});var WY=x(Bi=>{"use strict";var $Ee=Bi&&Bi.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),zx=Bi&&Bi.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$Ee(e,t,n)};Object.defineProperty(Bi,"__esModule",{value:!0});zx($Y(),Bi);zx(GY(),Bi);zx(zY(),Bi);zx(VY(),Bi)});var HR=x((bVe,XY)=>{"use strict";var de=yn(),Wn=Xt(),YY=Ps(),HEe=tt(),BEe=function(){function t(){}return t.createEnvelope=function(e,n,r,i,o){var s=null;switch(n){case de.TelemetryType.Trace:s=t.createTraceData(e);break;case de.TelemetryType.Dependency:s=t.createDependencyData(e);break;case de.TelemetryType.Event:s=t.createEventData(e);break;case de.TelemetryType.Exception:s=t.createExceptionData(e);break;case de.TelemetryType.Request:s=t.createRequestData(e);break;case de.TelemetryType.Metric:s=t.createMetricData(e);break;case de.TelemetryType.Availability:s=t.createAvailabilityData(e);break;case de.TelemetryType.PageView:s=t.createPageViewData(e);break}if(s&&s.baseData&&de.domainSupportsProperties(s.baseData)){if(r)if(!s.baseData.properties)s.baseData.properties=r;else for(var a in r)s.baseData.properties[a]||(s.baseData.properties[a]=r[a]);t.addAzureFunctionsCorrelationProperties(s.baseData.properties),s.baseData.properties&&(s.baseData.properties=Wn.validateStringMap(s.baseData.properties))}var u=o&&o.instrumentationKey||"",c=new de.Envelope;return c.data=s,c.iKey=u,c.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+s.baseType.substr(0,s.baseType.length-4),c.tags=this.getTags(i,e.tagOverrides),c.time=new Date().toISOString(),c.ver=1,c.sampleRate=o?o.samplingPercentage:100,n===de.TelemetryType.Metric&&(c.sampleRate=100),c},t.addAzureFunctionsCorrelationProperties=function(e){var n=YY.CorrelationContextManager.getCurrentContext();if(n&&n.customProperties&&n.customProperties.getProperty instanceof Function){e=e||{};var r=n.customProperties.getProperty("InvocationId");r&&(e.InvocationId=r),r=n.customProperties.getProperty("ProcessId"),r&&(e.ProcessId=r),r=n.customProperties.getProperty("LogLevel"),r&&(e.LogLevel=r),r=n.customProperties.getProperty("Category"),r&&(e.Category=r),r=n.customProperties.getProperty("HostInstanceId"),r&&(e.HostInstanceId=r),r=n.customProperties.getProperty("AzFuncLiveLogsSessionId"),r&&(e.AzFuncLiveLogsSessionId=r)}},t.truncateProperties=function(e){if(e.properties)try{for(var n={},r=Object.keys(e.properties),i=Object.values(e.properties),o=0;o<r.length;o++)r[o].length<=150&&(Wn.isDate(i[o])||(i[o]==null&&(i[o]=""),typeof i[o]=="object"&&(i[o]=Wn.stringify(i[o])),n[r[o]]=String(i[o]).substring(0,8192)),n[r[o]]=i[o]);return n}catch(s){HEe.warn("Failed to properly truncate telemetry properties: ",s)}},t.createTraceData=function(e){var n,r=new de.MessageData;r.message=(n=e.message)===null||n===void 0?void 0:n.substring(0,32768),r.properties=this.truncateProperties(e),isNaN(e.severity)?r.severityLevel=de.SeverityLevel.Information:r.severityLevel=e.severity;var i=new de.Data;return i.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Trace),i.baseData=r,i},t.createDependencyData=function(e){var n,r,i,o=new de.RemoteDependencyData;o.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,1024),o.data=(r=e.data)===null||r===void 0?void 0:r.substring(0,8192),o.target=(i=e.target)===null||i===void 0?void 0:i.substring(0,1024),o.duration=Wn.msToTimeSpan(e.duration),o.success=e.success,o.type=e.dependencyTypeName,o.properties=this.truncateProperties(e),o.resultCode=e.resultCode?e.resultCode.toString():"0",e.id?o.id=e.id:o.id=Wn.w3cTraceId();var s=new de.Data;return s.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Dependency),s.baseData=o,s},t.createEventData=function(e){var n,r=new de.EventData;r.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,512),r.properties=this.truncateProperties(e),r.measurements=e.measurements;var i=new de.Data;return i.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Event),i.baseData=r,i},t.createExceptionData=function(e){var n,r,i=new de.ExceptionData;i.properties=this.truncateProperties(e),isNaN(e.severity)?i.severityLevel=de.SeverityLevel.Error:i.severityLevel=e.severity,i.measurements=e.measurements,i.exceptions=[];var o=e.exception.stack,s=new de.ExceptionDetails;s.message=(n=e.exception.message)===null||n===void 0?void 0:n.substring(0,32768),s.typeName=(r=e.exception.name)===null||r===void 0?void 0:r.substring(0,1024),s.parsedStack=this.parseStack(o),s.hasFullStack=Wn.isArray(s.parsedStack)&&s.parsedStack.length>0,i.exceptions.push(s);var a=new de.Data;return a.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Exception),a.baseData=i,a},t.createRequestData=function(e){var n,r,i,o,s=new de.RequestData;e.id?s.id=e.id:s.id=Wn.w3cTraceId(),s.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,1024),s.url=(r=e.url)===null||r===void 0?void 0:r.substring(0,2048),s.source=(i=e.source)===null||i===void 0?void 0:i.substring(0,1024),s.duration=Wn.msToTimeSpan(e.duration),s.responseCode=(o=e.resultCode?e.resultCode.toString():"0")===null||o===void 0?void 0:o.substring(0,1024),s.success=e.success,s.properties=this.truncateProperties(e),s.measurements=e.measurements;var a=new de.Data;return a.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Request),a.baseData=s,a},t.createMetricData=function(e){var n,r=new de.MetricData;r.metrics=[];var i=new de.DataPoint;i.count=isNaN(e.count)?1:e.count,i.kind=de.DataPointType.Aggregation,i.max=isNaN(e.max)?e.value:e.max,i.min=isNaN(e.min)?e.value:e.min,i.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,1024),i.stdDev=isNaN(e.stdDev)?0:e.stdDev,i.value=e.value,i.ns=e.namespace,r.metrics.push(i),r.properties=this.truncateProperties(e);var o=new de.Data;return o.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Metric),o.baseData=r,o},t.createAvailabilityData=function(e){var n,r,i=new de.AvailabilityData;e.id?i.id=e.id:i.id=Wn.w3cTraceId(),i.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,1024),i.duration=Wn.msToTimeSpan(e.duration),i.success=e.success,i.runLocation=e.runLocation,i.message=(r=e.message)===null||r===void 0?void 0:r.substring(0,8192),i.measurements=e.measurements,i.properties=this.truncateProperties(e);var o=new de.Data;return o.baseType=de.telemetryTypeToBaseType(de.TelemetryType.Availability),o.baseData=i,o},t.createPageViewData=function(e){var n,r,i=new de.PageViewData;i.name=(n=e.name)===null||n===void 0?void 0:n.substring(0,1024),i.duration=Wn.msToTimeSpan(e.duration),i.url=(r=e.url)===null||r===void 0?void 0:r.substring(0,2048),i.measurements=e.measurements,i.properties=this.truncateProperties(e);var o=new de.Data;return o.baseType=de.telemetryTypeToBaseType(de.TelemetryType.PageView),o.baseData=i,o},t.getTags=function(e,n){var r=YY.CorrelationContextManager.getCurrentContext(),i={};if(e&&e.tags)for(var o in e.tags)i[o]=e.tags[o];if(n)for(var o in n)i[o]=n[o];return r&&(i[e.keys.operationId]=i[e.keys.operationId]||r.operation.id,i[e.keys.operationName]=i[e.keys.operationName]||r.operation.name,i[e.keys.operationParentId]=i[e.keys.operationParentId]||r.operation.parentId),i},t.parseStack=function(e){var n=void 0;if(typeof e=="string"){var r=e.split(`
|
|
`);n=[];for(var i=0,o=0,s=0;s<=r.length;s++){var a=r[s];if(KY.regex.test(a)){var u=new KY(r[s],i++);o+=u.sizeInBytes,n.push(u)}}var c=32*1024;if(o>c)for(var l=0,f=n.length-1,p=0,d=l,h=f;l<f;){var m=n[l].sizeInBytes,g=n[f].sizeInBytes;if(p+=m+g,p>c){var v=h-d+1;n.splice(d,v);break}d=l,h=f,l++,f--}}return n},t}(),KY=function(){function t(e,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=Wn.trim(e);var r=e.match(t.regex);r&&r.length>=5&&(this.method=Wn.trim(r[2])||this.method,this.fileName=Wn.trim(r[4])||"<no_filename>",this.line=parseInt(r[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=t.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return t.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,t.baseSize=58,t}();XY.exports=BEe});var JY=x(Gs=>{"use strict";var GEe=Gs&&Gs.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},zEe=Gs&&Gs.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.FileAccessControl=void 0;var VEe=require("fs"),WEe=require("os"),nf=require("child_process"),YEe=tt(),KEe=function(){function t(){}return t.checkFileProtection=function(){if(!t.OS_PROVIDES_FILE_PROTECTION&&!t.OS_FILE_PROTECTION_CHECKED)if(t.OS_FILE_PROTECTION_CHECKED=!0,t.USE_ICACLS){try{t.OS_PROVIDES_FILE_PROTECTION=VEe.existsSync(t.ICACLS_PATH)}catch{}t.OS_PROVIDES_FILE_PROTECTION||YEe.warn(t.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else t.OS_PROVIDES_FILE_PROTECTION=!0},t.applyACLRules=function(e){return GEe(this,void 0,void 0,function(){var n,r;return zEe(this,function(i){switch(i.label){case 0:if(!t.USE_ICACLS)return[3,7];if(t.ACLED_DIRECTORIES[e]!==void 0)return[3,6];t.ACLED_DIRECTORIES[e]=!1,i.label=1;case 1:return i.trys.push([1,4,,5]),[4,this._getACLIdentity()];case 2:return n=i.sent(),[4,this._runICACLS(this._getACLArguments(e,n))];case 3:return i.sent(),t.ACLED_DIRECTORIES[e]=!0,[3,5];case 4:throw r=i.sent(),t.ACLED_DIRECTORIES[e]=!1,r;case 5:return[3,7];case 6:if(!t.ACLED_DIRECTORIES[e])throw new Error("Setting ACL restrictions did not succeed (cached result)");i.label=7;case 7:return[2]}})})},t.applyACLRulesSync=function(e){if(t.USE_ICACLS){if(t.ACLED_DIRECTORIES[e]===void 0){this._runICACLSSync(this._getACLArguments(e,this._getACLIdentitySync())),t.ACLED_DIRECTORIES[e]=!0;return}else if(!t.ACLED_DIRECTORIES[e])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},t._runICACLS=function(e){return new Promise(function(n,r){var i=nf.spawn(t.ICACLS_PATH,e,{windowsHide:!0});i.on("error",function(o){return r(o)}),i.on("close",function(o,s){o===0?n():r(new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+o+")"))})})},t._runICACLSSync=function(e){if(nf.spawnSync){var n=nf.spawnSync(t.ICACLS_PATH,e,{windowsHide:!0});if(n.error)throw n.error;if(n.status!==0)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")}else throw new Error("Could not synchronously call ICACLS under current version of Node.js")},t._getACLIdentity=function(){return new Promise(function(e,n){t.ACL_IDENTITY&&e(t.ACL_IDENTITY);var r=nf.spawn(t.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),i="";r.stdout.on("data",function(o){return i+=o}),r.on("error",function(o){return n(o)}),r.on("close",function(o,s){t.ACL_IDENTITY=i&&i.trim(),o===0?e(t.ACL_IDENTITY):n(new Error("Getting ACL identity did not succeed (PS returned code "+o+")"))})})},t._getACLIdentitySync=function(){if(t.ACL_IDENTITY)return t.ACL_IDENTITY;if(nf.spawnSync){var e=nf.spawnSync(t.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(e.error)throw e.error;if(e.status!==0)throw new Error("Getting ACL identity did not succeed (PS returned code "+e.status+")");return t.ACL_IDENTITY=e.stdout&&e.stdout.toString().trim(),t.ACL_IDENTITY}else throw new Error("Could not synchronously get ACL identity under current version of Node.js")},t._getACLArguments=function(e,n){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",n+":(OI)(CI)F","/inheritance:r"]},t.TAG="FileAccessControl",t.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",t.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",t.ACLED_DIRECTORIES={},t.ACL_IDENTITY=null,t.OS_FILE_PROTECTION_CHECKED=!1,t.OS_PROVIDES_FILE_PROTECTION=!1,t.USE_ICACLS=WEe.type()==="Windows_NT",t}();Gs.FileAccessControl=KEe});var GR=x((zd,ZY)=>{"use strict";var Vx=zd&&zd.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},Wx=zd&&zd.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},BR=require("fs"),XEe=require("os"),Cc=require("path"),JEe=require("zlib"),zs=at(),QEe=ql(),Fo=i0(),Yn=Xt(),ZEe=require("url"),QY=tt(),Gd=JY(),ebe=439,tbe=402,nbe=[200,206,402,408,429,439,500],rbe=function(){function t(e,n,r,i,o,s,a){this._redirectedHost=null,this._config=e,this._onSuccess=r,this._onError=i,this._statsbeat=o,this._enableDiskRetryMode=!1,this._resendInterval=t.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=t.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,this._numConsecutiveRedirects=0,this._resendTimer=null,this._getAuthorizationHandler=n,this._fileCleanupTimer=null,this._tempDir=Cc.join(XEe.tmpdir(),t.TEMPDIR_PREFIX+this._config.instrumentationKey),this._isStatsbeatSender=s||!1,this._shutdownStatsbeat=a,this._failedToIngestCounter=0,this._statsbeatHasReachedIngestionAtLeastOnce=!1}return t.prototype.setDiskRetryMode=function(e,n,r){var i=this;e&&Gd.FileAccessControl.checkFileProtection(),this._enableDiskRetryMode=Gd.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&e,typeof n=="number"&&n>=0&&(this._resendInterval=Math.floor(n)),typeof r=="number"&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),e&&!Gd.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(zs.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout(function(){i._fileCleanupTask()},t.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(zs.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},t.prototype.send=function(e,n){return Vx(this,void 0,void 0,function(){var r,i,o,s,a,u,c,l,f=this;return Wx(this,function(p){switch(p.label){case 0:if(!e)return[3,5];if(r=this._redirectedHost||this._config.endpointUrl,i=new ZEe.URL(r).hostname,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!s)return[3,4];this._statsbeat&&this._statsbeat.addFeature(zs.StatsbeatFeature.AAD_HANDLING),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,s.addAuthorizationHeader(o)];case 2:return p.sent(),[3,4];case 3:return a=p.sent(),u="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(u+="This batch of telemetry items will be retried. ",this._storeToDisk(e)),u+="Error:"+a.toString(),this._logWarn(u),typeof n=="function"&&n(u),[2];case 4:c="",e.forEach(function(d){var h=Yn.stringify(d);typeof h=="string"&&(c+=h+`
|
|
`)}),c.length>0&&(c=c.substring(0,c.length-1)),l=Buffer.from?Buffer.from(c):new Buffer(c),JEe.gzip(l,function(d,h){var m=h;d?(f._logWarn(Yn.dumpObj(d)),m=l,o.headers["Content-Length"]=l.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=h.length.toString()),f._logInfo(Yn.dumpObj(o)),o[QEe.disableCollectionRequestOption]=!0;var g=+new Date,v=function(_){_.setEncoding("utf-8");var E="";_.on("data",function(C){E+=C}),_.on("end",function(){var C=+new Date,L=C-g;if(f._numConsecutiveFailures=0,f._isStatsbeatSender&&!f._statsbeatHasReachedIngestionAtLeastOnce&&(nbe.includes(_.statusCode)?f._statsbeatHasReachedIngestionAtLeastOnce=!0:f._statsbeatFailedToIngest()),f._statsbeat&&(_.statusCode==tbe||_.statusCode==ebe?f._statsbeat.countThrottle(zs.StatsbeatNetworkCategory.Breeze,i,_.statusCode):f._statsbeat.countRequest(zs.StatsbeatNetworkCategory.Breeze,i,L,_.statusCode===200,_.statusCode)),f._enableDiskRetryMode){if(_.statusCode===200)f._resendTimer||(f._resendTimer=setTimeout(function(){f._resendTimer=null,f._sendFirstFileOnDisk()},f._resendInterval),f._resendTimer.unref());else if(f._isRetriable(_.statusCode))try{f._statsbeat&&f._statsbeat.countRetry(zs.StatsbeatNetworkCategory.Breeze,i,_.statusCode);var R=JSON.parse(E),D=[];R.errors&&(R.errors.forEach(function(S){(S.statusCode==429||S.statusCode==500||S.statusCode==503)&&D.push(e[S.index])}),D.length>0&&f._storeToDisk(D))}catch{f._storeToDisk(e)}}if(_.statusCode===307||_.statusCode===308)if(f._numConsecutiveRedirects++,f._numConsecutiveRedirects<10){var O=_.headers.location?_.headers.location.toString():null;O&&(f._redirectedHost=O,f.send(e,n))}else{var N={name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."};f._statsbeat&&f._statsbeat.countException(zs.StatsbeatNetworkCategory.Breeze,i,N),typeof n=="function"&&n("Error sending telemetry because of circular redirects.")}else f._numConsecutiveRedirects=0,typeof n=="function"&&n(E),f._logInfo(E),typeof f._onSuccess=="function"&&f._onSuccess(E)})},y=Yn.makeRequest(f._config,r,o,v);y.setTimeout(t.HTTP_TIMEOUT,function(){f._requestTimedOut=!0,y.abort()}),y.on("error",function(_){if(f._isStatsbeatSender&&!f._statsbeatHasReachedIngestionAtLeastOnce&&f._statsbeatFailedToIngest(),f._numConsecutiveFailures++,f._statsbeat&&f._statsbeat.countException(zs.StatsbeatNetworkCategory.Breeze,i,_),!f._enableDiskRetryMode||f._numConsecutiveFailures>0&&f._numConsecutiveFailures%t.MAX_CONNECTION_FAILURES_BEFORE_WARN===0){var E="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";f._enableDiskRetryMode&&(E="Ingestion endpoint could not be reached "+f._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),f._logWarn(E,Yn.dumpObj(_))}else{var E="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";f._logInfo(E,Yn.dumpObj(_))}f._onErrorHelper(_),typeof n=="function"&&(_?(f._requestTimedOut&&(_.name="telemetry timeout",_.message="telemetry request timed out"),n(Yn.dumpObj(_))):n("Error sending telemetry")),f._enableDiskRetryMode&&f._storeToDisk(e)}),y.write(m),y.end()}),p.label=5;case 5:return[2]}})})},t.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(Yn.stringify(e))},t.prototype._isRetriable=function(e){return e===206||e===401||e===403||e===408||e===429||e===500||e===502||e===503||e===504},t.prototype._logInfo=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._isStatsbeatSender||QY.info(t.TAG,e,n)},t.prototype._logWarn=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._isStatsbeatSender||QY.warn(t.TAG,e,n)},t.prototype._statsbeatFailedToIngest=function(){this._shutdownStatsbeat&&(this._failedToIngestCounter++,this._failedToIngestCounter>=3&&this._shutdownStatsbeat())},t.prototype._storeToDisk=function(e){return Vx(this,void 0,void 0,function(){var n,r,i,o,s,a,u;return Wx(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,Fo.confirmDirExists(this._tempDir)];case 1:return c.sent(),[3,3];case 2:return n=c.sent(),this._logWarn("Failed to create folder to put telemetry: "+Yn.dumpObj(n)),this._onErrorHelper(n),[2];case 3:return c.trys.push([3,5,,6]),[4,Gd.FileAccessControl.applyACLRules(this._tempDir)];case 4:return c.sent(),[3,6];case 5:return r=c.sent(),this._logWarn("Failed to apply file access control to folder: "+Yn.dumpObj(r)),this._onErrorHelper(r),[2];case 6:return c.trys.push([6,8,,9]),[4,Fo.getShallowDirectorySize(this._tempDir)];case 7:return i=c.sent(),i>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+i),[2]):[3,9];case 8:return o=c.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+Yn.dumpObj(o)),this._onErrorHelper(o),[2];case 9:return c.trys.push([9,11,,12]),s=new Date().getTime()+".ai.json",a=Cc.join(this._tempDir,s),this._logInfo("saving data to disk at: "+a),[4,Fo.writeFileAsync(a,Yn.stringify(e),{mode:384})];case 10:return c.sent(),[3,12];case 11:return u=c.sent(),this._logWarn("Failed to persist telemetry to disk: "+Yn.dumpObj(u)),this._onErrorHelper(u),[2];case 12:return[2]}})})},t.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),BR.existsSync(this._tempDir)||BR.mkdirSync(this._tempDir),Gd.FileAccessControl.applyACLRulesSync(this._tempDir);var n=Fo.getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk){this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+n);return}var r=new Date().getTime()+".ai.json",i=Cc.join(this._tempDir,r);this._logInfo("saving data before crash to disk at: "+i),BR.writeFileSync(i,e,{mode:384})}catch(o){this._logWarn("Error while saving data to disk: "+Yn.dumpObj(o)),this._onErrorHelper(o)}},t.prototype._sendFirstFileOnDisk=function(){return Vx(this,void 0,void 0,function(){var e,n,r,i,o,s;return Wx(this,function(a){switch(a.label){case 0:return a.trys.push([0,6,,7]),[4,Fo.readdirAsync(this._tempDir)];case 1:return e=a.sent(),e=e.filter(function(u){return Cc.basename(u).indexOf(".ai.json")>-1}),e.length>0?(n=e[0],r=Cc.join(this._tempDir,n),[4,Fo.readFileAsync(r)]):[3,5];case 2:return i=a.sent(),[4,Fo.unlinkAsync(r)];case 3:return a.sent(),o=JSON.parse(i.toString()),[4,this.send(o)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:return s=a.sent(),this._onErrorHelper(s),[3,7];case 7:return[2]}})})},t.prototype._onErrorHelper=function(e){typeof this._onError=="function"&&this._onError(e)},t.prototype._fileCleanupTask=function(){return Vx(this,void 0,void 0,function(){var e,n,r,i,o,s,a=this;return Wx(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,Fo.readdirAsync(this._tempDir)];case 1:if(e=u.sent(),e=e.filter(function(c){return Cc.basename(c).indexOf(".ai.json")>-1}),!(e.length>0))return[3,5];n=0,u.label=2;case 2:return n<e.length?(r=new Date(parseInt(e[n].split(".ai.json")[0])),i=new Date(+new Date-t.FILE_RETEMPTION_PERIOD)>r,i?(o=Cc.join(this._tempDir,e[n]),[4,Fo.unlinkAsync(o).catch(function(c){a._onErrorHelper(c)})]):[3,4]):[3,5];case 3:u.sent(),u.label=4;case 4:return n++,[3,2];case 5:return[3,7];case 6:return s=u.sent(),s.code!="ENOENT"&&this._onErrorHelper(s),[3,7];case 7:return[2]}})})},t.TAG="Sender",t.WAIT_BETWEEN_RESEND=60*1e3,t.MAX_BYTES_ON_DISK=50*1024*1024,t.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,t.CLEANUP_TIMEOUT=60*60*1e3,t.FILE_RETEMPTION_PERIOD=7*24*60*60*1e3,t.TEMPDIR_PREFIX="appInsights-node",t.HTTP_TIMEOUT=2e4,t}();ZY.exports=rbe});var t7=x(Yx=>{"use strict";Object.defineProperty(Yx,"__esModule",{value:!0});Yx.AzureVirtualMachine=void 0;var e7=tt(),ibe=Xt(),obe=ql(),sbe="http://169.254.169.254/metadata/instance/compute",abe="api-version=2017-12-01",cbe="format=json",ube="UNREACH",lbe=function(){function t(){}return t.getAzureComputeMetadata=function(e,n){var r,i=this,o={},s=sbe+"?"+abe+"&"+cbe,a=(r={method:"GET"},r[obe.disableCollectionRequestOption]=!0,r.headers={Metadata:"True"},r),u=ibe.makeRequest(e,s,a,function(c){if(c.statusCode===200){o.isVM=!0;var l="";c.on("data",function(f){l+=f}),c.on("end",function(){try{var f=JSON.parse(l);o.id=f.vmId||"",o.subscriptionId=f.subscriptionId||"",o.osType=f.osType||""}catch(p){e7.info(t.TAG,p)}n(o)})}else n(o)},!1,!1);u&&(setTimeout(function(){i._requestTimedOut=!0,u.abort()},t.HTTP_TIMEOUT),u.on("error",function(c){i._requestTimedOut&&c&&(c.name="telemetry timeout",c.message="telemetry request timed out"),c&&c.message&&c.message.indexOf(ube)>-1?o.isVM=!1:e7.info(t.TAG,c),n(o)}),u.end())},t.HTTP_TIMEOUT=2500,t.TAG="AzureVirtualMachine",t}();Yx.AzureVirtualMachine=lbe});var n7=x(Kx=>{"use strict";Object.defineProperty(Kx,"__esModule",{value:!0});Kx.NetworkStatsbeat=void 0;var fbe=function(){function t(e,n){this.endpoint=e,this.host=n,this.totalRequestCount=0,this.totalSuccesfulRequestCount=0,this.totalFailedRequestCount=[],this.retryCount=[],this.exceptionCount=[],this.throttleCount=[],this.intervalRequestExecutionTime=0,this.lastIntervalRequestExecutionTime=0,this.lastTime=+new Date,this.lastRequestCount=0}return t}();Kx.NetworkStatsbeat=fbe});var a7=x((Tc,s7)=>{"use strict";var Gi=Tc&&Tc.__assign||function(){return Gi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Gi.apply(this,arguments)},zR=Tc&&Tc.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{c(r.next(l))}catch(f){s(f)}}function u(l){try{c(r.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},VR=Tc&&Tc.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},pbe=require("os"),dbe=HR(),r7=tt(),hbe=GR(),rt=at(),mbe=yn(),gbe=t7(),vbe=CA(),i7=Ol(),ybe=n7(),o7=Xt(),xbe="node",_be=function(){function t(e,n){this._attach=rt.StatsbeatAttach.sdk,this._feature=rt.StatsbeatFeature.NONE,this._instrumentation=rt.StatsbeatInstrumentation.NONE,this._isInitialized=!1,this._statbeatMetrics=[],this._networkStatsbeatCollection=[],this._config=e,this._context=n||new i7;var r=this._getConnectionString(e);this._statsbeatConfig=new vbe(r),this._statsbeatConfig.samplingPercentage=100,this._sender=new hbe(this._statsbeatConfig,null,null,null,null,!0,this._shutdownStatsbeat.bind(this))}return t.prototype.enable=function(e){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._getCustomProperties(),this._isInitialized=!0),e?(this._handle||(this._handle=setInterval(function(){n.trackShortIntervalStatsbeats()},t.STATS_COLLECTION_SHORT_INTERVAL),this._handle.unref()),this._longHandle||(this.trackLongIntervalStatsbeats(),this._longHandle=setInterval(function(){n.trackLongIntervalStatsbeats()},t.STATS_COLLECTION_LONG_INTERVAL),this._longHandle.unref())):(this._handle&&(clearInterval(this._handle),this._handle=null),this._longHandle&&(clearInterval(this._longHandle),this._longHandle=null))},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.isEnabled=function(){return this._isEnabled},t.prototype.setCodelessAttach=function(){this._attach=rt.StatsbeatAttach.codeless},t.prototype.addFeature=function(e){this._feature|=e},t.prototype.removeFeature=function(e){this._feature&=~e},t.prototype.addInstrumentation=function(e){this._instrumentation|=e},t.prototype.removeInstrumentation=function(e){this._instrumentation&=~e},t.prototype.countRequest=function(e,n,r,i,o){if(this.isEnabled()){var s=this._getNetworkStatsbeatCounter(e,n);if(s.totalRequestCount++,s.intervalRequestExecutionTime+=r,i===!1){if(!o)return;var a=s.totalFailedRequestCount.find(function(u){return o===u.statusCode});a?a.count++:s.totalFailedRequestCount.push({statusCode:o,count:1})}else s.totalSuccesfulRequestCount++}},t.prototype.countException=function(e,n,r){if(this.isEnabled()){var i=this._getNetworkStatsbeatCounter(e,n),o=i.exceptionCount.find(function(s){return r.name===s.exceptionType});o?o.count++:i.exceptionCount.push({exceptionType:r.name,count:1})}},t.prototype.countThrottle=function(e,n,r){if(this.isEnabled()){var i=this._getNetworkStatsbeatCounter(e,n),o=i.throttleCount.find(function(s){return r===s.statusCode});o?o.count++:i.throttleCount.push({statusCode:r,count:1})}},t.prototype.countRetry=function(e,n,r){if(this.isEnabled()){var i=this._getNetworkStatsbeatCounter(e,n),o=i.retryCount.find(function(s){return r===s.statusCode});o?o.count++:i.retryCount.push({statusCode:r,count:1})}},t.prototype.trackShortIntervalStatsbeats=function(){return zR(this,void 0,void 0,function(){var e,n;return VR(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this._getResourceProvider()];case 1:return r.sent(),e={os:this._os,rp:this._resourceProvider,cikey:this._cikey,runtimeVersion:this._runtimeVersion,language:this._language,version:this._sdkVersion,attach:this._attach},this._trackRequestDuration(e),this._trackRequestsCount(e),[4,this._sendStatsbeats()];case 2:return r.sent(),[3,4];case 3:return n=r.sent(),r7.info(t.TAG,"Failed to send Statsbeat metrics: "+o7.dumpObj(n)),[3,4];case 4:return[2]}})})},t.prototype.trackLongIntervalStatsbeats=function(){return zR(this,void 0,void 0,function(){var e,n,r,i,o;return VR(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,this._getResourceProvider()];case 1:return s.sent(),e={os:this._os,rp:this._resourceProvider,cikey:this._cikey,runtimeVersion:this._runtimeVersion,language:this._language,version:this._sdkVersion,attach:this._attach},n=Object.assign({rpId:this._resourceIdentifier},e),this._statbeatMetrics.push({name:rt.StatsbeatCounter.ATTACH,value:1,properties:n}),this._instrumentation!=rt.StatsbeatInstrumentation.NONE&&(r=Object.assign({feature:this._instrumentation,type:rt.StatsbeatFeatureType.Instrumentation},e),this._statbeatMetrics.push({name:rt.StatsbeatCounter.FEATURE,value:1,properties:r})),this._feature!=rt.StatsbeatFeature.NONE&&(i=Object.assign({feature:this._feature,type:rt.StatsbeatFeatureType.Feature},e),this._statbeatMetrics.push({name:rt.StatsbeatCounter.FEATURE,value:1,properties:i})),[4,this._sendStatsbeats()];case 2:return s.sent(),[3,4];case 3:return o=s.sent(),r7.info(t.TAG,"Failed to send Statsbeat metrics: "+o7.dumpObj(o)),[3,4];case 4:return[2]}})})},t.prototype._getNetworkStatsbeatCounter=function(e,n){for(var r=this._getShortHost(n),i=0;i<this._networkStatsbeatCollection.length;i++)if(e===this._networkStatsbeatCollection[i].endpoint&&r===this._networkStatsbeatCollection[i].host)return this._networkStatsbeatCollection[i];var o=new ybe.NetworkStatsbeat(e,r);return this._networkStatsbeatCollection.push(o),o},t.prototype._trackRequestDuration=function(e){for(var n=0;n<this._networkStatsbeatCollection.length;n++){var r=this._networkStatsbeatCollection[n];r.time=+new Date;var i=r.totalRequestCount-r.lastRequestCount||0,o=r.intervalRequestExecutionTime-r.lastIntervalRequestExecutionTime,s=o>0&&o/i||0;if(r.lastIntervalRequestExecutionTime=r.intervalRequestExecutionTime,i>0){var a=Object.assign({endpoint:this._networkStatsbeatCollection[n].endpoint,host:this._networkStatsbeatCollection[n].host},e);this._statbeatMetrics.push({name:rt.StatsbeatCounter.REQUEST_DURATION,value:s,properties:a})}r.lastRequestCount=r.totalRequestCount,r.lastTime=r.time}},t.prototype._getShortHost=function(e){var n=e;try{var r=new RegExp(/^https?:\/\/(?:www\.)?([^\/.-]+)/),i=r.exec(e);i!=null&&i.length>1&&(n=i[1]),n=n.replace(".in.applicationinsights.azure.com","")}catch{}return n},t.prototype._trackRequestsCount=function(e){for(var n=this,r=function(a){o=i._networkStatsbeatCollection[a];var u=Object.assign({endpoint:o.endpoint,host:o.host},e);o.totalSuccesfulRequestCount>0&&(i._statbeatMetrics.push({name:rt.StatsbeatCounter.REQUEST_SUCCESS,value:o.totalSuccesfulRequestCount,properties:u}),o.totalSuccesfulRequestCount=0),o.totalFailedRequestCount.length>0&&(o.totalFailedRequestCount.forEach(function(c){u=Object.assign(Gi(Gi({},u),{statusCode:c.statusCode})),n._statbeatMetrics.push({name:rt.StatsbeatCounter.REQUEST_FAILURE,value:c.count,properties:u})}),o.totalFailedRequestCount=[]),o.retryCount.length>0&&(o.retryCount.forEach(function(c){u=Object.assign(Gi(Gi({},u),{statusCode:c.statusCode})),n._statbeatMetrics.push({name:rt.StatsbeatCounter.RETRY_COUNT,value:c.count,properties:u})}),o.retryCount=[]),o.throttleCount.length>0&&(o.throttleCount.forEach(function(c){u=Object.assign(Gi(Gi({},u),{statusCode:c.statusCode})),n._statbeatMetrics.push({name:rt.StatsbeatCounter.THROTTLE_COUNT,value:c.count,properties:u})}),o.throttleCount=[]),o.exceptionCount.length>0&&(o.exceptionCount.forEach(function(c){u=Object.assign(Gi(Gi({},u),{exceptionType:c.exceptionType})),n._statbeatMetrics.push({name:rt.StatsbeatCounter.EXCEPTION_COUNT,value:c.count,properties:u})}),o.exceptionCount=[])},i=this,o,s=0;s<this._networkStatsbeatCollection.length;s++)r(s)},t.prototype._sendStatsbeats=function(){return zR(this,void 0,void 0,function(){var e,n,r,i;return VR(this,function(o){switch(o.label){case 0:for(e=[],n=0;n<this._statbeatMetrics.length;n++)r={name:this._statbeatMetrics[n].name,value:this._statbeatMetrics[n].value,properties:this._statbeatMetrics[n].properties},i=dbe.createEnvelope(r,mbe.TelemetryType.Metric,null,this._context,this._statsbeatConfig),i.name=rt.StatsbeatTelemetryName,e.push(i);return this._statbeatMetrics=[],[4,this._sender.send(e)];case 1:return o.sent(),[2]}})})},t.prototype._getCustomProperties=function(){this._language=xbe,this._cikey=this._config.instrumentationKey,this._sdkVersion=i7.sdkVersion,this._os=pbe.type(),this._runtimeVersion=process.version},t.prototype._getResourceProvider=function(){var e=this;return new Promise(function(n,r){var i=!1;e._resourceProvider=rt.StatsbeatResourceProvider.unknown,e._resourceIdentifier=rt.StatsbeatResourceProvider.unknown,process.env.AKS_ARM_NAMESPACE_ID?(e._resourceProvider=rt.StatsbeatResourceProvider.aks,e._resourceIdentifier=process.env.AKS_ARM_NAMESPACE_ID):process.env.WEBSITE_SITE_NAME?(e._resourceProvider=rt.StatsbeatResourceProvider.appsvc,e._resourceIdentifier=process.env.WEBSITE_SITE_NAME,process.env.WEBSITE_HOME_STAMPNAME&&(e._resourceIdentifier+="/"+process.env.WEBSITE_HOME_STAMPNAME)):process.env.FUNCTIONS_WORKER_RUNTIME?(e._resourceProvider=rt.StatsbeatResourceProvider.functions,process.env.WEBSITE_HOSTNAME&&(e._resourceIdentifier=process.env.WEBSITE_HOSTNAME)):e._config&&(e._isVM===void 0||e._isVM==!0?(i=!0,gbe.AzureVirtualMachine.getAzureComputeMetadata(e._config,function(o){e._isVM=o.isVM,e._isVM&&(e._resourceProvider=rt.StatsbeatResourceProvider.vm,e._resourceIdentifier=o.id+"/"+o.subscriptionId,o.osType&&(e._os=o.osType)),n()})):e._resourceProvider=rt.StatsbeatResourceProvider.unknown),i||n()})},t.prototype._shutdownStatsbeat=function(){this.enable(!1)},t.prototype._getConnectionString=function(e){for(var n=e.endpointUrl,r=["westeurope","northeurope","francecentral","francesouth","germanywestcentral","norwayeast","norwaywest","swedencentral","switzerlandnorth","switzerlandwest","uksouth","ukwest"],i=0;i<r.length;i++)if(n.indexOf(r[i])>-1)return t.EU_CONNECTION_STRING;return t.NON_EU_CONNECTION_STRING},t.NON_EU_CONNECTION_STRING="InstrumentationKey=c4a29126-a7cb-47e5-b348-11414998b11e;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com",t.EU_CONNECTION_STRING="InstrumentationKey=7dc56bab-3c0c-4e9f-9ebb-d1acadee8d0f;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com",t.STATS_COLLECTION_SHORT_INTERVAL=9e5,t.STATS_COLLECTION_LONG_INTERVAL=864e5,t.TAG="Statsbeat",t}();s7.exports=_be});var l7=x((TVe,u7)=>{"use strict";var Ebe=require("url"),bbe=CA(),wbe=qY(),Sbe=Ol(),Mo=yn(),Cbe=jY(),WR=WY(),c7=Ps(),Tbe=a7(),Ibe=GR(),YR=Xt(),Xx=tt(),Abe=HR(),Rbe=function(){function t(e){this._telemetryProcessors=[];var n=new bbe(e);if(this.config=n,!this.config.instrumentationKey||this.config.instrumentationKey=="")throw new Error("Instrumentation key not found, please provide a connection string before starting Application Insights SDK.");this.context=new Sbe,this.commonProperties={},this.authorizationHandler=null,this.config.disableStatsbeat||(this._statsbeat=new Tbe(this.config,this.context),this._statsbeat.enable(!0));var r=new Ibe(this.config,this.getAuthorizationHandler,null,null,this._statsbeat);this.channel=new Cbe(function(){return n.disableAppInsights},function(){return n.maxBatchSize},function(){return n.maxBatchIntervalMs},r)}return t.prototype.trackAvailability=function(e){this.track(e,Mo.TelemetryType.Availability)},t.prototype.trackPageView=function(e){this.track(e,Mo.TelemetryType.PageView)},t.prototype.trackTrace=function(e){this.track(e,Mo.TelemetryType.Trace)},t.prototype.trackMetric=function(e){this.track(e,Mo.TelemetryType.Metric)},t.prototype.trackException=function(e){e&&e.exception&&!YR.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,Mo.TelemetryType.Exception)},t.prototype.trackEvent=function(e){this.track(e,Mo.TelemetryType.Event)},t.prototype.trackRequest=function(e){this.track(e,Mo.TelemetryType.Request)},t.prototype.trackDependency=function(e){if(e&&!e.target&&e.data)try{e.target=new Ebe.URL(e.data).host}catch(n){e.target=null,Xx.warn(t.TAG,"The URL object is failed to create.",n)}this.track(e,Mo.TelemetryType.Dependency)},t.prototype.flush=function(e){this.channel.triggerSend(e?!!e.isAppCrashing:!1,e?e.callback:void 0)},t.prototype.track=function(e,n){if(e&&Mo.telemetryTypeToBaseType(n)){var r=Abe.createEnvelope(e,n,this.commonProperties,this.context,this.config);e.time&&(r.time=e.time.toISOString());var i=this.runTelemetryProcessors(r,e.contextObjects);i=i&&WR.samplingTelemetryProcessor(r,{correlationContext:c7.CorrelationContextManager.getCurrentContext()}),WR.preAggregatedMetricsTelemetryProcessor(r,this.context),i&&(WR.performanceMetricsTelemetryProcessor(r,this.quickPulseClient),this.channel.send(r))}else Xx.warn(t.TAG,"track() requires telemetry object and telemetryType to be specified.")},t.prototype.setAutoPopulateAzureProperties=function(e){},t.prototype.getAuthorizationHandler=function(e){return e&&e.aadTokenCredential?(this.authorizationHandler||(Xx.info(t.TAG,"Adding authorization handler"),this.authorizationHandler=new wbe(e.aadTokenCredential,e.aadAudience)),this.authorizationHandler):null},t.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},t.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},t.prototype.runTelemetryProcessors=function(e,n){var r=!0,i=this._telemetryProcessors.length;if(i===0)return r;n=n||{},n.correlationContext=c7.CorrelationContextManager.getCurrentContext();for(var o=0;o<i;++o)try{var s=this._telemetryProcessors[o];if(s&&s.apply(null,[e,n])===!1){r=!1;break}}catch(a){r=!0,Xx.warn(t.TAG,"One of telemetry processors failed, telemetry item will be sent.",a,e)}return r&&(e&&e.tags&&(e.tags=YR.validateStringMap(e.tags)),e&&e.data&&e.data.baseData&&e.data.baseData.properties&&(e.data.baseData.properties=YR.validateStringMap(e.data.baseData.properties))),r},t.prototype.getStatsbeat=function(){return this._statsbeat},t.TAG="TelemetryClient",t}();u7.exports=Rbe});var d7=x((KR,p7)=>{"use strict";var Pbe=KR&&KR.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Obe=l7(),f7=yA(),Nbe=ql(),Jx=tt(),Dbe=function(t){Pbe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.trackNodeHttpRequestSync=function(n){n&&n.request&&n.response&&n.duration?f7.trackRequestSync(this,n):Jx.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},e.prototype.trackNodeHttpRequest=function(n){(n.duration||n.error)&&Jx.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),n&&n.request&&n.response?f7.trackRequest(this,n):Jx.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},e.prototype.trackNodeHttpDependency=function(n){n&&n.request?Nbe.trackRequest(this,n):Jx.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},e}(Obe);p7.exports=Dbe});var m7=x(h7=>{"use strict";Object.defineProperty(h7,"__esModule",{value:!0})});var _7=x(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.dispose=F.Configuration=F.wrapWithCorrelationContext=F.startOperation=F.getCorrelationContext=F.start=F.setup=F.liveMetricsClient=F.defaultClient=F.DistributedTracingModes=void 0;var XR=Ps(),Lbe=xW(),kbe=EW(),JR=Ky(),Fbe=iA(),Mbe=RW(),qbe=$W(),Ube=ql(),jbe=yA(),g7=sc(),Vd=tt(),v7=_8(),QR=E8(),$be=S8();F.TelemetryClient=d7();F.Contracts=yn();F.azureFunctionsTypes=m7();var y7;(function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C"})(y7=F.DistributedTracingModes||(F.DistributedTracingModes={}));var Wd,Yd,Kd,Xd,Jd,rf,of,Ic,Qd,Zd,pr=!1,Qx;function Hbe(t){return F.defaultClient?Vd.info("The default client is already setup"):(F.defaultClient=new F.TelemetryClient(t),Wd=new Lbe(F.defaultClient),Yd=new kbe(F.defaultClient),Kd=new JR(F.defaultClient),Xd=new Fbe(F.defaultClient),Jd=new Mbe(F.defaultClient),rf=new qbe(F.defaultClient),Ic=new jbe(F.defaultClient),Qd=new Ube(F.defaultClient),of||(of=new QR.AutoCollectNativePerformance(F.defaultClient)),Zd=new $be.AzureFunctionsHook(F.defaultClient)),ZR}F.setup=Hbe;function Bbe(){F.defaultClient&&(F.defaultClient.config.enableAutoCollectExternalLoggers==null&&(F.defaultClient.config.enableAutoCollectExternalLoggers=!0),F.defaultClient.config.enableAutoCollectConsole==null&&(F.defaultClient.config.enableAutoCollectConsole=!1),F.defaultClient.config.enableAutoCollectExceptions==null&&(F.defaultClient.config.enableAutoCollectExceptions=!0),F.defaultClient.config.enableAutoCollectPerformance==null&&(F.defaultClient.config.enableAutoCollectPerformance=!0),F.defaultClient.config.enableAutoCollectPreAggregatedMetrics==null&&(F.defaultClient.config.enableAutoCollectPreAggregatedMetrics=!0),F.defaultClient.config.enableAutoCollectHeartbeat==null&&(F.defaultClient.config.enableAutoCollectHeartbeat=!0),F.defaultClient.config.enableAutoCollectRequests==null&&(F.defaultClient.config.enableAutoCollectRequests=!0),F.defaultClient.config.enableAutoCollectDependencies==null&&(F.defaultClient.config.enableAutoCollectDependencies=!0),F.defaultClient.config.enableUseDiskRetryCaching==null&&(F.defaultClient.config.enableUseDiskRetryCaching=!0),F.defaultClient.config.enableAutoDependencyCorrelation==null&&(F.defaultClient.config.enableAutoDependencyCorrelation=!0),F.defaultClient.config.enableSendLiveMetrics==null&&(F.defaultClient.config.enableSendLiveMetrics=!1),F.defaultClient.config.enableAutoCollectExtendedMetrics==null&&(F.defaultClient.config.enableAutoCollectExtendedMetrics=!0),F.defaultClient.config.enableWebInstrumentation==null&&(F.defaultClient.config.enableWebInstrumentation=!1),F.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions==null&&(F.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=!1))}function x7(){if(F.defaultClient){pr=!0,Bbe(),Wd.enable(F.defaultClient.config.enableAutoCollectExternalLoggers,F.defaultClient.config.enableAutoCollectConsole),Yd.enable(F.defaultClient.config.enableAutoCollectExceptions),Kd.enable(F.defaultClient.config.enableAutoCollectPerformance),Xd.enable(F.defaultClient.config.enableAutoCollectPreAggregatedMetrics),Jd.enable(F.defaultClient.config.enableAutoCollectHeartbeat),Ic.useAutoCorrelation(F.defaultClient.config.enableAutoDependencyCorrelation,F.defaultClient.config.enableUseAsyncHooks),Ic.enable(F.defaultClient.config.enableAutoCollectRequests),Qd.enable(F.defaultClient.config.enableAutoCollectDependencies),rf.enable(F.defaultClient.config.enableWebInstrumentation,F.defaultClient.config.webInstrumentationConnectionString),F.defaultClient.config.enableSendLiveMetrics&&(F.liveMetricsClient||(F.liveMetricsClient=new v7(F.defaultClient.config,F.defaultClient.context,F.defaultClient.getAuthorizationHandler),Qx=new JR(F.liveMetricsClient,1e3,!0),F.liveMetricsClient.addCollector(Qx),F.defaultClient.quickPulseClient=F.liveMetricsClient),F.liveMetricsClient.enable(F.defaultClient.config.enableSendLiveMetrics)),Zd.enable(F.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions);var t=QR.AutoCollectNativePerformance.parseEnabled(F.defaultClient.config.enableAutoCollectExtendedMetrics,F.defaultClient.config);of.enable(F.defaultClient.config.enableAutoCollectExtendedMetrics,t.disabledMetrics),F.defaultClient&&F.defaultClient.channel&&F.defaultClient.channel.setUseDiskRetryCaching(F.defaultClient.config.enableUseDiskRetryCaching,F.defaultClient.config.enableResendInterval,F.defaultClient.config.enableMaxBytesOnDisk)}else Vd.warn("Start cannot be called before setup");return ZR}F.start=x7;function Gbe(){return XR.CorrelationContextManager.getCurrentContext()}F.getCorrelationContext=Gbe;function zbe(t,e){return XR.CorrelationContextManager.startOperation(t,e)}F.startOperation=zbe;function Vbe(t,e){return XR.CorrelationContextManager.wrapCallback(t,e)}F.wrapWithCorrelationContext=Vbe;var ZR=function(){function t(){}return t.setDistributedTracingMode=function(e){return g7.w3cEnabled=e===y7.AI_AND_W3C,t},t.setAutoCollectConsole=function(e,n){return n===void 0&&(n=!1),F.defaultClient&&(F.defaultClient.config.enableAutoCollectExternalLoggers=e,F.defaultClient.config.enableAutoCollectConsole=n,pr&&Wd.enable(e,n)),t},t.setAutoCollectExceptions=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectExceptions=e,pr&&Yd.enable(e)),t},t.setAutoCollectPerformance=function(e,n){if(n===void 0&&(n=!0),F.defaultClient){F.defaultClient.config.enableAutoCollectPerformance=e;var r=QR.AutoCollectNativePerformance.parseEnabled(n,F.defaultClient.config);F.defaultClient.config.enableAutoCollectExtendedMetrics=r.isEnabled,pr&&(Kd.enable(e),of.enable(F.defaultClient.config.enableAutoCollectExtendedMetrics,r.disabledMetrics))}return t},t.setAutoCollectPreAggregatedMetrics=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectPreAggregatedMetrics=e,pr&&Xd.enable(e)),t},t.setAutoCollectHeartbeat=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectHeartbeat=e,pr&&Jd.enable(e)),t},t.enableAutoWebSnippetInjection=function(e,n){return F.defaultClient&&(F.defaultClient.config.enableWebInstrumentation=e,F.defaultClient.config.webInstrumentationConnectionString=n,pr&&rf.enable(F.defaultClient.config.enableAutoWebSnippetInjection,F.defaultClient.config.webSnippetConnectionString)),t},t.enableWebInstrumentation=function(e,n){return F.defaultClient&&(F.defaultClient.config.enableWebInstrumentation=e,F.defaultClient.config.webInstrumentationConnectionString=n,pr&&rf.enable(F.defaultClient.config.enableWebInstrumentation,F.defaultClient.config.webInstrumentationConnectionString)),t},t.setAutoCollectRequests=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectRequests=e,pr&&Ic.enable(e)),t},t.setAutoCollectDependencies=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectDependencies=e,pr&&Qd.enable(e)),t},t.setAutoDependencyCorrelation=function(e,n){return F.defaultClient&&(F.defaultClient.config.enableAutoDependencyCorrelation=e,F.defaultClient.config.enableUseAsyncHooks=n,pr&&Ic.useAutoCorrelation(e,n)),t},t.setUseDiskRetryCaching=function(e,n,r){return F.defaultClient&&(F.defaultClient.config.enableUseDiskRetryCaching=e,F.defaultClient.config.enableResendInterval=n,F.defaultClient.config.enableMaxBytesOnDisk=r,F.defaultClient.channel&&F.defaultClient.channel.setUseDiskRetryCaching(F.defaultClient.config.enableUseDiskRetryCaching,F.defaultClient.config.enableResendInterval,F.defaultClient.config.enableMaxBytesOnDisk)),t},t.setInternalLogging=function(e,n){return e===void 0&&(e=!1),n===void 0&&(n=!0),Vd.enableDebug=e,Vd.disableWarnings=!n,t},t.setAutoCollectIncomingRequestAzureFunctions=function(e){return F.defaultClient&&(F.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=e,pr&&Zd.enable(e)),t},t.setSendLiveMetrics=function(e){return e===void 0&&(e=!1),F.defaultClient?(!F.liveMetricsClient&&e?(F.liveMetricsClient=new v7(F.defaultClient.config,F.defaultClient.context,F.defaultClient.getAuthorizationHandler),Qx=new JR(F.liveMetricsClient,1e3,!0),F.liveMetricsClient.addCollector(Qx),F.defaultClient.quickPulseClient=F.liveMetricsClient):F.liveMetricsClient&&F.liveMetricsClient.enable(e),F.defaultClient.config.enableSendLiveMetrics=e,t):(Vd.warn("Live metrics client cannot be setup without the default client"),t)},t.start=x7,t}();F.Configuration=ZR;function Wbe(){g7.w3cEnabled=!0,F.defaultClient=null,pr=!1,Wd&&Wd.dispose(),Yd&&Yd.dispose(),Kd&&Kd.dispose(),Xd&&Xd.dispose(),Jd&&Jd.dispose(),rf&&rf.dispose(),of&&of.dispose(),Ic&&Ic.dispose(),Qd&&Qd.dispose(),F.liveMetricsClient&&(F.liveMetricsClient.enable(!1),F.liveMetricsClient=void 0),Zd&&Zd.dispose()}F.dispose=Wbe});var w7=Y(require("fs"));function cf(t,e=!1){let n=t.length,r=0,i="",o=0,s=16,a=0,u=0,c=0,l=0,f=0;function p(_,E){let C=0,L=0;for(;C<_||!E;){let R=t.charCodeAt(r);if(R>=48&&R<=57)L=L*16+R-48;else if(R>=65&&R<=70)L=L*16+R-65+10;else if(R>=97&&R<=102)L=L*16+R-97+10;else break;r++,C++}return C<_&&(L=-1),L}function d(_){r=_,i="",o=0,s=16,f=0}function h(){let _=r;if(t.charCodeAt(r)===48)r++;else for(r++;r<t.length&&Rc(t.charCodeAt(r));)r++;if(r<t.length&&t.charCodeAt(r)===46)if(r++,r<t.length&&Rc(t.charCodeAt(r)))for(r++;r<t.length&&Rc(t.charCodeAt(r));)r++;else return f=3,t.substring(_,r);let E=r;if(r<t.length&&(t.charCodeAt(r)===69||t.charCodeAt(r)===101))if(r++,(r<t.length&&t.charCodeAt(r)===43||t.charCodeAt(r)===45)&&r++,r<t.length&&Rc(t.charCodeAt(r))){for(r++;r<t.length&&Rc(t.charCodeAt(r));)r++;E=r}else f=3;return t.substring(_,E)}function m(){let _="",E=r;for(;;){if(r>=n){_+=t.substring(E,r),f=2;break}let C=t.charCodeAt(r);if(C===34){_+=t.substring(E,r),r++;break}if(C===92){if(_+=t.substring(E,r),r++,r>=n){f=2;break}switch(t.charCodeAt(r++)){case 34:_+='"';break;case 92:_+="\\";break;case 47:_+="/";break;case 98:_+="\b";break;case 102:_+="\f";break;case 110:_+=`
|
|
`;break;case 114:_+="\r";break;case 116:_+=" ";break;case 117:let R=p(4,!0);R>=0?_+=String.fromCharCode(R):f=4;break;default:f=5}E=r;continue}if(C>=0&&C<=31)if(af(C)){_+=t.substring(E,r),f=2;break}else f=6;r++}return _}function g(){if(i="",f=0,o=r,u=a,l=c,r>=n)return o=n,s=17;let _=t.charCodeAt(r);if(t_(_)){do r++,i+=String.fromCharCode(_),_=t.charCodeAt(r);while(t_(_));return s=15}if(af(_))return r++,i+=String.fromCharCode(_),_===13&&t.charCodeAt(r)===10&&(r++,i+=`
|
|
`),a++,c=r,s=14;switch(_){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,i=m(),s=10;case 47:let E=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!af(t.charCodeAt(r));)r++;return i=t.substring(E,r),s=12}if(t.charCodeAt(r+1)===42){r+=2;let C=n-1,L=!1;for(;r<C;){let R=t.charCodeAt(r);if(R===42&&t.charCodeAt(r+1)===47){r+=2,L=!0;break}r++,af(R)&&(R===13&&t.charCodeAt(r)===10&&r++,a++,c=r)}return L||(r++,f=1),i=t.substring(E,r),s=13}return i+=String.fromCharCode(_),r++,s=16;case 45:if(i+=String.fromCharCode(_),r++,r===n||!Rc(t.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=h(),s=11;default:for(;r<n&&v(_);)r++,_=t.charCodeAt(r);if(o!==r){switch(i=t.substring(o,r),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(_),r++,s=16}}function v(_){if(t_(_)||af(_))return!1;switch(_){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function y(){let _;do _=g();while(_>=12&&_<=15);return _}return{setPosition:d,getPosition:()=>r,scan:e?y:g,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>r-o,getTokenStartLine:()=>u,getTokenStartCharacter:()=>o-l,getTokenError:()=>f}}function t_(t){return t===32||t===9}function af(t){return t===10||t===13}function Rc(t){return t>=48&&t<=57}var uP;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(uP||(uP={}));function n_(t,e,n){let r,i,o,s,a;if(e){for(s=e.offset,a=s+e.length,o=s;o>0&&!uf(t,o-1);)o--;let _=a;for(;_<t.length&&!uf(t,_);)_++;i=t.substring(o,_),r=F7(i,n)}else i=t,r=0,o=0,s=0,a=t.length;let u=M7(n,t),c=0,l=0,f;n.insertSpaces?f=Pc(" ",n.tabSize||4):f=" ";let p=cf(i,!1),d=!1;function h(){return c>1?Pc(u,c)+Pc(f,r+l):u+Pc(f,r+l)}function m(){let _=p.scan();for(c=0;_===15||_===14;)_===14&&n.keepLines?c+=1:_===14&&(c=1),_=p.scan();return d=_===16||p.getTokenError()!==0,_}let g=[];function v(_,E,C){!d&&(!e||E<a&&C>s)&&t.substring(E,C)!==_&&g.push({offset:E,length:C-E,content:_})}let y=m();if(n.keepLines&&c>0&&v(Pc(u,c),0,0),y!==17){let _=p.getTokenOffset()+o,E=Pc(f,r);v(E,o,_)}for(;y!==17;){let _=p.getTokenOffset()+p.getTokenLength()+o,E=m(),C="",L=!1;for(;c===0&&(E===12||E===13);){let D=p.getTokenOffset()+o;v(" ",_,D),_=p.getTokenOffset()+p.getTokenLength()+o,L=E===12,C=L?h():"",E=m()}if(E===2)y!==1&&l--,n.keepLines&&c>0||!n.keepLines&&y!==1?C=h():n.keepLines&&(C=" ");else if(E===4)y!==3&&l--,n.keepLines&&c>0||!n.keepLines&&y!==3?C=h():n.keepLines&&(C=" ");else{switch(y){case 3:case 1:l++,n.keepLines&&c>0||!n.keepLines?C=h():C=" ";break;case 5:n.keepLines&&c>0||!n.keepLines?C=h():C=" ";break;case 12:C=h();break;case 13:c>0?C=h():L||(C=" ");break;case 6:n.keepLines&&c>0?C=h():L||(C=" ");break;case 10:n.keepLines&&c>0?C=h():E===6&&!L&&(C="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&c>0?C=h():(E===12||E===13)&&!L?C=" ":E!==5&&E!==17&&(d=!0);break;case 16:d=!0;break}c>0&&(E===12||E===13)&&(C=h())}E===17&&(n.keepLines&&c>0?C=h():C=n.insertFinalNewline?u:"");let R=p.getTokenOffset()+o;v(C,_,R),y=E}return g}function Pc(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}function F7(t,e){let n=0,r=0,i=e.tabSize||4;for(;n<t.length;){let o=t.charAt(n);if(o===" ")r++;else if(o===" ")r+=i;else break;n++}return Math.floor(r/i)}function M7(t,e){for(let n=0;n<e.length;n++){let r=e.charAt(n);if(r==="\r")return n+1<e.length&&e.charAt(n+1)===`
|
|
`?`\r
|
|
`:"\r";if(r===`
|
|
`)return`
|
|
`}return t&&t.eol||`
|
|
`}function uf(t,e){return`\r
|
|
`.indexOf(t.charAt(e))!==-1}var lf;(function(t){t.DEFAULT={allowTrailingComma:!1}})(lf||(lf={}));function lP(t,e=[],n=lf.DEFAULT){let r=null,i=[],o=[];function s(u){Array.isArray(i)?i.push(u):r!==null&&(i[r]=u)}return i_(t,{onObjectBegin:()=>{let u={};s(u),o.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let u=[];s(u),o.push(i),i=u,r=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(u,c,l)=>{e.push({error:u,offset:c,length:l})}},n),i[0]}function r_(t,e=[],n=lf.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(u){r.type==="property"&&(r.length=u-r.offset,r=r.parent)}function o(u){return r.children.push(u),u}i_(t,{onObjectBegin:u=>{r=o({type:"object",offset:u,length:-1,parent:r,children:[]})},onObjectProperty:(u,c,l)=>{r=o({type:"property",offset:c,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:u,offset:c,length:l,parent:r})},onObjectEnd:(u,c)=>{i(u+c),r.length=u+c-r.offset,r=r.parent,i(u+c)},onArrayBegin:(u,c)=>{r=o({type:"array",offset:u,length:-1,parent:r,children:[]})},onArrayEnd:(u,c)=>{r.length=u+c-r.offset,r=r.parent,i(u+c)},onLiteralValue:(u,c,l)=>{o({type:U7(u),offset:c,length:l,parent:r,value:u}),i(c+l)},onSeparator:(u,c,l)=>{r.type==="property"&&(u===":"?r.colonOffset=c:u===","&&i(c))},onError:(u,c,l)=>{e.push({error:u,offset:c,length:l})}},n);let a=r.children[0];return a&&delete a.parent,a}function th(t,e){if(!t)return;let n=t;for(let r of e)if(typeof r=="string"){if(n.type!=="object"||!Array.isArray(n.children))return;let i=!1;for(let o of n.children)if(Array.isArray(o.children)&&o.children[0].value===r&&o.children.length===2){n=o.children[1],i=!0;break}if(!i)return}else{let i=r;if(n.type!=="array"||i<0||!Array.isArray(n.children)||i>=n.children.length)return;n=n.children[i]}return n}function i_(t,e,n=lf.DEFAULT){let r=cf(t,!1),i=[];function o(b){return b?()=>b(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(b){return b?()=>b(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(b){return b?T=>b(T,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(b){return b?T=>b(T,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}let c=s(e.onObjectBegin),l=u(e.onObjectProperty),f=o(e.onObjectEnd),p=s(e.onArrayBegin),d=o(e.onArrayEnd),h=u(e.onLiteralValue),m=a(e.onSeparator),g=o(e.onComment),v=a(e.onError),y=n&&n.disallowComments,_=n&&n.allowTrailingComma;function E(){for(;;){let b=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:y||C(11);break;case 2:C(12);break;case 6:C(16);break}switch(b){case 12:case 13:y?C(10):g();break;case 16:C(1);break;case 15:case 14:break;default:return b}}}function C(b,T=[],A=[]){if(v(b),T.length+A.length>0){let q=r.getToken();for(;q!==17;){if(T.indexOf(q)!==-1){E();break}else if(A.indexOf(q)!==-1)break;q=E()}}}function L(b){let T=r.getTokenValue();return b?h(T):(l(T),i.push(T)),E(),!0}function R(){switch(r.getToken()){case 11:let b=r.getTokenValue(),T=Number(b);isNaN(T)&&(C(2),T=0),h(T);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return E(),!0}function D(){return r.getToken()!==10?(C(3,[],[2,5]),!1):(L(!1),r.getToken()===6?(m(":"),E(),S()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0)}function O(){c(),E();let b=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(b||C(4,[],[]),m(","),E(),r.getToken()===2&&_)break}else b&&C(6,[],[]);D()||C(4,[],[2,5]),b=!0}return f(),r.getToken()!==2?C(7,[2],[]):E(),!0}function N(){p(),E();let b=!0,T=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(T||C(4,[],[]),m(","),E(),r.getToken()===4&&_)break}else T&&C(6,[],[]);b?(i.push(0),b=!1):i[i.length-1]++,S()||C(4,[],[4,5]),T=!0}return d(),b||i.pop(),r.getToken()!==4?C(8,[4],[]):E(),!0}function S(){switch(r.getToken()){case 3:return N();case 1:return O();case 10:return L(!0);default:return R()}}return E(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):S()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}function U7(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}function fP(t,e,n,r){let i=e.slice(),s=r_(t,[]),a,u;for(;i.length>0&&(u=i.pop(),a=th(s,i),a===void 0&&n!==void 0);)typeof u=="string"?n={[u]:n}:n=[n];if(a)if(a.type==="object"&&typeof u=="string"&&Array.isArray(a.children)){let c=th(a,[u]);if(c!==void 0)if(n===void 0){if(!c.parent)throw new Error("Malformed AST");let l=a.children.indexOf(c.parent),f,p=c.parent.offset+c.parent.length;if(l>0){let d=a.children[l-1];f=d.offset+d.length}else f=a.offset+1,a.children.length>1&&(p=a.children[1].offset);return Vs(t,{offset:f,length:p-f,content:""},r)}else return Vs(t,{offset:c.offset,length:c.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let l=`${JSON.stringify(u)}: ${JSON.stringify(n)}`,f=r.getInsertionIndex?r.getInsertionIndex(a.children.map(d=>d.children[0].value)):a.children.length,p;if(f>0){let d=a.children[f-1];p={offset:d.offset+d.length,length:0,content:","+l}}else a.children.length===0?p={offset:a.offset+1,length:0,content:l}:p={offset:a.offset+1,length:0,content:l+","};return Vs(t,p,r)}}else if(a.type==="array"&&typeof u=="number"&&Array.isArray(a.children)){let c=u;if(c===-1){let l=`${JSON.stringify(n)}`,f;if(a.children.length===0)f={offset:a.offset+1,length:0,content:l};else{let p=a.children[a.children.length-1];f={offset:p.offset+p.length,length:0,content:","+l}}return Vs(t,f,r)}else if(n===void 0&&a.children.length>=0){let l=u,f=a.children[l],p;if(a.children.length===1)p={offset:a.offset+1,length:a.length-2,content:""};else if(a.children.length-1===l){let d=a.children[l-1],h=d.offset+d.length,m=a.offset+a.length;p={offset:h,length:m-2-h,content:""}}else p={offset:f.offset,length:a.children[l+1].offset-f.offset,content:""};return Vs(t,p,r)}else if(n!==void 0){let l,f=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&a.children.length>u){let p=a.children[u];l={offset:p.offset,length:p.length,content:f}}else if(a.children.length===0||u===0)l={offset:a.offset+1,length:0,content:a.children.length===0?f:f+","};else{let p=u>a.children.length?a.children.length:u,d=a.children[p-1];l={offset:d.offset+d.length,length:0,content:","+f}}return Vs(t,l,r)}else throw new Error(`Can not ${n===void 0?"remove":r.isArrayInsertion?"insert":"modify"} Array index ${c} as length is not sufficient`)}else throw new Error(`Can not add ${typeof u!="number"?"index":"property"} to parent of type ${a.type}`);else{if(n===void 0)throw new Error("Can not delete in empty document");return Vs(t,{offset:s?s.offset:0,length:s?s.length:0,content:JSON.stringify(n)},r)}}function Vs(t,e,n){if(!n.formattingOptions)return[e];let r=nh(t,e),i=e.offset,o=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;i>0&&!uf(r,i-1);)i--;for(;o<r.length&&!uf(r,o);)o++}let s=n_(r,{offset:i,length:o-i},{...n.formattingOptions,keepLines:!1});for(let u=s.length-1;u>=0;u--){let c=s[u];r=nh(r,c),i=Math.min(i,c.offset),o=Math.max(o,c.offset+c.length),o+=c.content.length-c.length}let a=t.length-(r.length-o)-i;return[{offset:i,length:a,content:r.substring(i,o)}]}function nh(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var pP;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(pP||(pP={}));var dP;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(dP||(dP={}));var dr=lP;var hP;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(hP||(hP={}));function mP(t,e,n,r){return fP(t,e,n,r)}function rh(t,e){let n=e.slice(0).sort((i,o)=>{let s=i.offset-o.offset;return s===0?i.length-o.length:s}),r=t.length;for(let i=n.length-1;i>=0;i--){let o=n[i];if(o.offset+o.length<=r)t=nh(t,o);else throw new Error("Overlapping edit");r=o.offset}return t}var rP=Y(require("os")),Je=Y(require("path"));var fh=require("assert");var H7={right:W7,center:Y7},B7=0,ih=1,G7=2,oh=3,o_=class{constructor(e){var n;this.width=e.width,this.wrap=(n=e.wrap)!==null&&n!==void 0?n:!0,this.rows=[]}span(...e){let n=this.div(...e);n.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let n=e.map(r=>typeof r=="string"?this.colFromString(r):r);return this.rows.push(n),n}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let n=e.split(`
|
|
`).map(i=>i.split(" ")),r=0;return n.forEach(i=>{i.length>1&&Kn.stringWidth(i[0])>r&&(r=Math.min(Math.floor(this.width*.5),Kn.stringWidth(i[0])))}),n.forEach(i=>{this.div(...i.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&i.length>1?r:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let n=Kn.stripAnsi(e);return[0,n.match(/\s*$/)[0].length,0,n.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(n=>{this.rowToString(n,e)}),e.filter(n=>!n.hidden).map(n=>n.text).join(`
|
|
`)}rowToString(e,n){return this.rasterize(e).forEach((r,i)=>{let o="";r.forEach((s,a)=>{let{width:u}=e[a],c=this.negatePadding(e[a]),l=s;if(c>Kn.stringWidth(s)&&(l+=" ".repeat(c-Kn.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=H7[e[a].align];l=p(l,c),Kn.stringWidth(l)<c&&(l+=" ".repeat((u||0)-Kn.stringWidth(l)-1))}let f=e[a].padding||[0,0,0,0];f[oh]&&(o+=" ".repeat(f[oh])),o+=gP(e[a],l,"| "),o+=l,o+=gP(e[a],l," |"),f[ih]&&(o+=" ".repeat(f[ih])),i===0&&n.length>0&&(o=this.renderInline(o,n[n.length-1]))}),n.push({text:o.replace(/ +$/,""),span:e.span})}),n}renderInline(e,n){let r=e.match(/^ */),i=r?r[0].length:0,o=n.text,s=Kn.stringWidth(o.trimRight());return n.span?this.wrap?i<s?e:(n.hidden=!0,o.trimRight()+" ".repeat(i-s)+e.trimLeft()):(n.hidden=!0,o+e):e}rasterize(e){let n=[],r=this.columnWidths(e),i;return e.forEach((o,s)=>{o.width=r[s],this.wrap?i=Kn.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
|
|
`):i=o.text.split(`
|
|
`),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[B7]||0).fill("")),i.push(...new Array(o.padding[G7]||0).fill(""))),i.forEach((a,u)=>{n[u]||n.push([]);let c=n[u];for(let l=0;l<s;l++)c[l]===void 0&&c.push("");c.push(a)})}),n}negatePadding(e){let n=e.width||0;return e.padding&&(n-=(e.padding[oh]||0)+(e.padding[ih]||0)),e.border&&(n-=4),n}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||Kn.stringWidth(s.text));let n=e.length,r=this.width,i=e.map(s=>{if(s.width)return n--,r-=s.width,s.width}),o=n?Math.floor(r/n):0;return i.map((s,a)=>s===void 0?Math.max(o,z7(e[a])):s)}};function gP(t,e,n){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?n:" ":""}function z7(t){let e=t.padding||[],n=1+(e[oh]||0)+(e[ih]||0);return t.border?n+4:n}function V7(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function W7(t,e){t=t.trim();let n=Kn.stringWidth(t);return n<e?" ".repeat(e-n)+t:t}function Y7(t,e){t=t.trim();let n=Kn.stringWidth(t);return n>=e?t:" ".repeat(e-n>>1)+t}var Kn;function vP(t,e){return Kn=e,new o_({width:(t==null?void 0:t.width)||V7(),wrap:t==null?void 0:t.wrap})}var yP=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function s_(t){return t.replace(yP,"")}function xP(t,e){let[n,r]=t.match(yP)||["",""];t=s_(t);let i="";for(let o=0;o<t.length;o++)o!==0&&o%e===0&&(i+=`
|
|
`),i+=t.charAt(o);return n&&r&&(i=`${n}${i}${r}`),i}function a_(t){return vP(t,{stringWidth:e=>[...e].length,stripAnsi:s_,wrap:xP})}var Oc=require("path"),sh=require("fs");function _P(t,e){let n=(0,Oc.resolve)(".",t),r;for((0,sh.statSync)(n).isDirectory()||(n=(0,Oc.dirname)(n));;){if(r=e(n,(0,sh.readdirSync)(n)),r)return(0,Oc.resolve)(n,r);if(n=(0,Oc.dirname)(r=n),r===n)break}}var FP=require("util"),MP=require("fs"),qP=require("url");var CP=require("util"),lh=require("path");function Ws(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let n="",r=!1,i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);r&&(r=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?r=!0:s!=="-"&&s!=="_"&&(n+=s)}return n}}function ah(t,e){let n=t.toLowerCase();e=e||"-";let r="";for(let i=0;i<t.length;i++){let o=n.charAt(i),s=t.charAt(i);o!==s&&i>0?r+=`${e}${n.charAt(i)}`:r+=s}return r}function ch(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function EP(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,n=null,r=null,i=null,o=[];for(let s=0;s<t.length;s++){if(n=r,r=t.charAt(s),r===" "&&!i){n!==" "&&e++;continue}r===i?i=null:(r==="'"||r==='"')&&!i&&(i=r),o[e]||(o[e]=""),o[e]+=r}return o}var hr;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(hr||(hr={}));var zi,uh=class{constructor(e){zi=e}parse(e,n){let r=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},n),i=EP(e),o=typeof e=="string",s=K7(Object.assign(Object.create(null),r.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},r.configuration),u=Object.assign(Object.create(null),r.default),c=r.configObjects||[],l=r.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),h=Object.create(null),m=r.__||zi.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},v=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,y=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach(function(P){let M=typeof P=="object"?P.key:P,V=Object.keys(P).map(function(U){return{boolean:"bools",string:"strings",number:"numbers"}[U]}).filter(Boolean).pop();V&&(g[V][M]=!0),g.arrays[M]=!0,g.keys.push(M)}),[].concat(r.boolean||[]).filter(Boolean).forEach(function(P){g.bools[P]=!0,g.keys.push(P)}),[].concat(r.string||[]).filter(Boolean).forEach(function(P){g.strings[P]=!0,g.keys.push(P)}),[].concat(r.number||[]).filter(Boolean).forEach(function(P){g.numbers[P]=!0,g.keys.push(P)}),[].concat(r.count||[]).filter(Boolean).forEach(function(P){g.counts[P]=!0,g.keys.push(P)}),[].concat(r.normalize||[]).filter(Boolean).forEach(function(P){g.normalize[P]=!0,g.keys.push(P)}),typeof r.narg=="object"&&Object.entries(r.narg).forEach(([P,M])=>{typeof M=="number"&&(g.nargs[P]=M,g.keys.push(P))}),typeof r.coerce=="object"&&Object.entries(r.coerce).forEach(([P,M])=>{typeof M=="function"&&(g.coercions[P]=M,g.keys.push(P))}),typeof r.config<"u"&&(Array.isArray(r.config)||typeof r.config=="string"?[].concat(r.config).filter(Boolean).forEach(function(P){g.configs[P]=!0}):typeof r.config=="object"&&Object.entries(r.config).forEach(([P,M])=>{(typeof M=="boolean"||typeof M=="function")&&(g.configs[P]=M)})),le(r.key,s,r.default,g.arrays),Object.keys(u).forEach(function(P){(g.aliases[P]||[]).forEach(function(M){u[M]=u[P]})});let _=null;qo();let E=[],C=Object.assign(Object.create(null),{_:[]}),L={};for(let P=0;P<i.length;P++){let M=i[P],V=M.replace(/^-{3,}/,"---"),U,k,ie,X,ae,Ft;if(M!=="--"&&/^-/.test(M)&&Oe(M))R(M);else if(V.match(/^---+(=|$)/)){R(M);continue}else if(M.match(/^--.+=/)||!a["short-option-groups"]&&M.match(/^-.+=/))X=M.match(/^--?([^=]+)=([\s\S]*)$/),X!==null&&Array.isArray(X)&&X.length>=3&&(W(X[1],g.arrays)?P=O(P,X[1],i,X[2]):W(X[1],g.nargs)!==!1?P=D(P,X[1],i,X[2]):N(X[1],X[2],!0));else if(M.match(y)&&a["boolean-negation"])X=M.match(y),X!==null&&Array.isArray(X)&&X.length>=2&&(k=X[1],N(k,W(k,g.arrays)?[!1]:!1));else if(M.match(/^--.+/)||!a["short-option-groups"]&&M.match(/^-[^-]+/))X=M.match(/^--?(.+)/),X!==null&&Array.isArray(X)&&X.length>=2&&(k=X[1],W(k,g.arrays)?P=O(P,k,i):W(k,g.nargs)!==!1?P=D(P,k,i):(ae=i[P+1],ae!==void 0&&(!ae.match(/^-/)||ae.match(v))&&!W(k,g.bools)&&!W(k,g.counts)||/^(true|false)$/.test(ae)?(N(k,ae),P++):N(k,Fe(k))));else if(M.match(/^-.\..+=/))X=M.match(/^-([^=]+)=([\s\S]*)$/),X!==null&&Array.isArray(X)&&X.length>=3&&N(X[1],X[2]);else if(M.match(/^-.\..+/)&&!M.match(v))ae=i[P+1],X=M.match(/^-(.\..+)/),X!==null&&Array.isArray(X)&&X.length>=2&&(k=X[1],ae!==void 0&&!ae.match(/^-/)&&!W(k,g.bools)&&!W(k,g.counts)?(N(k,ae),P++):N(k,Fe(k)));else if(M.match(/^-[^-]+/)&&!M.match(v)){ie=M.slice(1,-1).split(""),U=!1;for(let bn=0;bn<ie.length;bn++){if(ae=M.slice(bn+2),ie[bn+1]&&ie[bn+1]==="="){Ft=M.slice(bn+3),k=ie[bn],W(k,g.arrays)?P=O(P,k,i,Ft):W(k,g.nargs)!==!1?P=D(P,k,i,Ft):N(k,Ft),U=!0;break}if(ae==="-"){N(ie[bn],ae);continue}if(/[A-Za-z]/.test(ie[bn])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ae)&&W(ae,g.bools)===!1){N(ie[bn],ae),U=!0;break}if(ie[bn+1]&&ie[bn+1].match(/\W/)){N(ie[bn],ae),U=!0;break}else N(ie[bn],Fe(ie[bn]))}k=M.slice(-1)[0],!U&&k!=="-"&&(W(k,g.arrays)?P=O(P,k,i):W(k,g.nargs)!==!1?P=D(P,k,i):(ae=i[P+1],ae!==void 0&&(!/^(-|--)[^-]/.test(ae)||ae.match(v))&&!W(k,g.bools)&&!W(k,g.counts)||/^(true|false)$/.test(ae)?(N(k,ae),P++):N(k,Fe(k))))}else if(M.match(/^-[0-9]$/)&&M.match(v)&&W(M.slice(1),g.bools))k=M.slice(1),N(k,Fe(k));else if(M==="--"){E=i.slice(P+1);break}else if(a["halt-at-non-option"]){E=i.slice(P);break}else R(M)}j(C,!0),j(C,!1),A(C),$(),G(C,g.aliases,u,!0),K(C),a["set-placeholder-key"]&&se(C),Object.keys(g.counts).forEach(function(P){fe(C,P.split("."))||N(P,0)}),f&&E.length&&(C[p]=[]),E.forEach(function(P){C[p].push(P)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(C).filter(P=>P!=="--"&&P.includes("-")).forEach(P=>{delete C[P]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(P=>s[P])).forEach(P=>{a["camel-case-expansion"]&&P.includes("-")&&delete C[P.split(".").map(M=>Ws(M)).join(".")],delete C[P]});function R(P){let M=T("_",P);(typeof M=="string"||typeof M=="number")&&C._.push(M)}function D(P,M,V,U){let k,ie=W(M,g.nargs);if(ie=typeof ie!="number"||isNaN(ie)?1:ie,ie===0)return En(U)||(_=Error(m("Argument unexpected for: %s",M))),N(M,Fe(M)),P;let X=En(U)?0:1;if(a["nargs-eats-options"])V.length-(P+1)+X<ie&&(_=Error(m("Not enough arguments following: %s",M))),X=ie;else{for(k=P+1;k<V.length&&(!V[k].match(/^-[^0-9]/)||V[k].match(v)||Oe(V[k]));k++)X++;X<ie&&(_=Error(m("Not enough arguments following: %s",M)))}let ae=Math.min(X,ie);for(!En(U)&&ae>0&&(N(M,U),ae--),k=P+1;k<ae+P+1;k++)N(M,V[k]);return P+ae}function O(P,M,V,U){let k=[],ie=U||V[P+1],X=W(M,g.nargs);if(W(M,g.bools)&&!/^(true|false)$/.test(ie))k.push(!0);else if(En(ie)||En(U)&&/^-/.test(ie)&&!v.test(ie)&&!Oe(ie)){if(u[M]!==void 0){let ae=u[M];k=Array.isArray(ae)?ae:[ae]}}else{En(U)||k.push(b(M,U,!0));for(let ae=P+1;ae<V.length&&!(!a["greedy-arrays"]&&k.length>0||X&&typeof X=="number"&&k.length>=X||(ie=V[ae],/^-/.test(ie)&&!v.test(ie)&&!Oe(ie)));ae++)P=ae,k.push(b(M,ie,o))}return typeof X=="number"&&(X&&k.length<X||isNaN(X)&&k.length===0)&&(_=Error(m("Not enough arguments following: %s",M))),N(M,k),P}function N(P,M,V=o){if(/-/.test(P)&&a["camel-case-expansion"]){let ie=P.split(".").map(function(X){return Ws(X)}).join(".");S(P,ie)}let U=b(P,M,V),k=P.split(".");ue(C,k,U),g.aliases[P]&&g.aliases[P].forEach(function(ie){let X=ie.split(".");ue(C,X,U)}),k.length>1&&a["dot-notation"]&&(g.aliases[k[0]]||[]).forEach(function(ie){let X=ie.split("."),ae=[].concat(k);ae.shift(),X=X.concat(ae),(g.aliases[P]||[]).includes(X.join("."))||ue(C,X,U)}),W(P,g.normalize)&&!W(P,g.arrays)&&[P].concat(g.aliases[P]||[]).forEach(function(X){Object.defineProperty(L,X,{enumerable:!0,get(){return M},set(ae){M=typeof ae=="string"?zi.normalize(ae):ae}})})}function S(P,M){g.aliases[P]&&g.aliases[P].length||(g.aliases[P]=[M],d[M]=!0),g.aliases[M]&&g.aliases[M].length||S(M,P)}function b(P,M,V){V&&(M=X7(M)),(W(P,g.bools)||W(P,g.counts))&&typeof M=="string"&&(M=M==="true");let U=Array.isArray(M)?M.map(function(k){return T(P,k)}):T(P,M);return W(P,g.counts)&&(En(U)||typeof U=="boolean")&&(U=c_()),W(P,g.normalize)&&W(P,g.arrays)&&(Array.isArray(M)?U=M.map(k=>zi.normalize(k)):U=zi.normalize(M)),U}function T(P,M){return!a["parse-positional-numbers"]&&P==="_"||!W(P,g.strings)&&!W(P,g.bools)&&!Array.isArray(M)&&(ch(M)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${M}`)))||!En(M)&&W(P,g.numbers))&&(M=Number(M)),M}function A(P){let M=Object.create(null);G(M,g.aliases,u),Object.keys(g.configs).forEach(function(V){let U=P[V]||M[V];if(U)try{let k=null,ie=zi.resolve(zi.cwd(),U),X=g.configs[V];if(typeof X=="function"){try{k=X(ie)}catch(ae){k=ae}if(k instanceof Error){_=k;return}}else k=zi.require(ie);q(k)}catch(k){k.name==="PermissionDenied"?_=k:P[V]&&(_=Error(m("Invalid JSON config file: %s",U)))}})}function q(P,M){Object.keys(P).forEach(function(V){let U=P[V],k=M?M+"."+V:V;typeof U=="object"&&U!==null&&!Array.isArray(U)&&a["dot-notation"]?q(U,k):(!fe(C,k.split("."))||W(k,g.arrays)&&a["combine-arrays"])&&N(k,U)})}function $(){typeof c<"u"&&c.forEach(function(P){q(P)})}function j(P,M){if(typeof l>"u")return;let V=typeof l=="string"?l:"",U=zi.env();Object.keys(U).forEach(function(k){if(V===""||k.lastIndexOf(V,0)===0){let ie=k.split("__").map(function(X,ae){return ae===0&&(X=X.substring(V.length)),Ws(X)});(M&&g.configs[ie.join(".")]||!M)&&!fe(P,ie)&&N(ie.join("."),U[k])}})}function K(P){let M,V=new Set;Object.keys(P).forEach(function(U){if(!V.has(U)&&(M=W(U,g.coercions),typeof M=="function"))try{let k=T(U,M(P[U]));[].concat(g.aliases[U]||[],U).forEach(ie=>{V.add(ie),P[ie]=k})}catch(k){_=k}})}function se(P){return g.keys.forEach(M=>{~M.indexOf(".")||typeof P[M]>"u"&&(P[M]=void 0)}),P}function G(P,M,V,U=!1){Object.keys(V).forEach(function(k){fe(P,k.split("."))||(ue(P,k.split("."),V[k]),U&&(h[k]=!0),(M[k]||[]).forEach(function(ie){fe(P,ie.split("."))||ue(P,ie.split("."),V[k])}))})}function fe(P,M){let V=P;a["dot-notation"]||(M=[M.join(".")]),M.slice(0,-1).forEach(function(k){V=V[k]||{}});let U=M[M.length-1];return typeof V!="object"?!1:U in V}function ue(P,M,V){let U=P;a["dot-notation"]||(M=[M.join(".")]),M.slice(0,-1).forEach(function(Ft){Ft=bP(Ft),typeof U=="object"&&U[Ft]===void 0&&(U[Ft]={}),typeof U[Ft]!="object"||Array.isArray(U[Ft])?(Array.isArray(U[Ft])?U[Ft].push({}):U[Ft]=[U[Ft],{}],U=U[Ft][U[Ft].length-1]):U=U[Ft]});let k=bP(M[M.length-1]),ie=W(M.join("."),g.arrays),X=Array.isArray(V),ae=a["duplicate-arguments-array"];!ae&&W(k,g.nargs)&&(ae=!0,(!En(U[k])&&g.nargs[k]===1||Array.isArray(U[k])&&U[k].length===g.nargs[k])&&(U[k]=void 0)),V===c_()?U[k]=c_(U[k]):Array.isArray(U[k])?ae&&ie&&X?U[k]=a["flatten-duplicate-arrays"]?U[k].concat(V):(Array.isArray(U[k][0])?U[k]:[U[k]]).concat([V]):!ae&&!!ie==!!X?U[k]=V:U[k]=U[k].concat([V]):U[k]===void 0&&ie?U[k]=X?V:[V]:ae&&!(U[k]===void 0||W(k,g.counts)||W(k,g.bools))?U[k]=[U[k],V]:U[k]=V}function le(...P){P.forEach(function(M){Object.keys(M||{}).forEach(function(V){g.aliases[V]||(g.aliases[V]=[].concat(s[V]||[]),g.aliases[V].concat(V).forEach(function(U){if(/-/.test(U)&&a["camel-case-expansion"]){let k=Ws(U);k!==V&&g.aliases[V].indexOf(k)===-1&&(g.aliases[V].push(k),d[k]=!0)}}),g.aliases[V].concat(V).forEach(function(U){if(U.length>1&&/[A-Z]/.test(U)&&a["camel-case-expansion"]){let k=ah(U,"-");k!==V&&g.aliases[V].indexOf(k)===-1&&(g.aliases[V].push(k),d[k]=!0)}}),g.aliases[V].forEach(function(U){g.aliases[U]=[V].concat(g.aliases[V].filter(function(k){return U!==k}))}))})})}function W(P,M){let V=[].concat(g.aliases[P]||[],P),U=Object.keys(M),k=V.find(ie=>U.includes(ie));return k?M[k]:!1}function nn(P){let M=Object.keys(g);return[].concat(M.map(U=>g[U])).some(function(U){return Array.isArray(U)?U.includes(P):U[P]})}function ne(P,...M){return[].concat(...M).some(function(U){let k=P.match(U);return k&&nn(k[1])})}function Ee(P){if(P.match(v)||!P.match(/^-[^-]+/))return!1;let M=!0,V,U=P.slice(1).split("");for(let k=0;k<U.length;k++){if(V=P.slice(k+2),!nn(U[k])){M=!1;break}if(U[k+1]&&U[k+1]==="="||V==="-"||/[A-Za-z]/.test(U[k])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(V)||U[k+1]&&U[k+1].match(/\W/))break}return M}function Oe(P){return a["unknown-options-as-args"]&&he(P)}function he(P){return P=P.replace(/^-{3,}/,"--"),P.match(v)||Ee(P)?!1:!ne(P,/^-+([^=]+?)=[\s\S]*$/,y,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function Fe(P){return!W(P,g.bools)&&!W(P,g.counts)&&`${P}`in u?u[P]:Be(rn(P))}function Be(P){return{[hr.BOOLEAN]:!0,[hr.STRING]:"",[hr.NUMBER]:void 0,[hr.ARRAY]:[]}[P]}function rn(P){let M=hr.BOOLEAN;return W(P,g.strings)?M=hr.STRING:W(P,g.numbers)?M=hr.NUMBER:W(P,g.bools)?M=hr.BOOLEAN:W(P,g.arrays)&&(M=hr.ARRAY),M}function En(P){return P===void 0}function qo(){Object.keys(g.counts).find(P=>W(P,g.arrays)?(_=Error(m("Invalid configuration: %s, opts.count excludes opts.array.",P)),!0):W(P,g.nargs)?(_=Error(m("Invalid configuration: %s, opts.count excludes opts.narg.",P)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(L,C),configuration:a,defaulted:Object.assign({},h),error:_,newAliases:Object.assign({},d)}}};function K7(t){let e=[],n=Object.create(null),r=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});r;){r=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),r=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,u){return u.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(n[o]=i)}),n}function c_(t){return t!==void 0?t+1:1}function bP(t){return t==="__proto__"?"___proto___":t}function X7(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}var TP=require("fs");var u_,l_,f_,wP=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,SP=(l_=(u_=process==null?void 0:process.versions)===null||u_===void 0?void 0:u_.node)!==null&&l_!==void 0?l_:(f_=process==null?void 0:process.version)===null||f_===void 0?void 0:f_.slice(1);if(SP&&Number(SP.match(/^([^.]+)/)[1])<wP)throw Error(`yargs parser supports a minimum Node.js version of ${wP}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var J7=process?process.env:{},IP=new uh({cwd:process.cwd,env:()=>J7,format:CP.format,normalize:lh.normalize,resolve:lh.resolve,require:t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse((0,TP.readFileSync)(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),ff=function(e,n){return IP.parse(e.slice(),n).argv};ff.detailed=function(t,e){return IP.parse(t.slice(),e)};ff.camelCase=Ws;ff.decamelize=ah;ff.looksLikeNumber=ch;var AP=ff;var zr=require("path");function Q7(){return Z7()?0:1}function Z7(){return eK()&&!process.defaultApp}function eK(){return!!process.versions.electron}function RP(){return process.argv[Q7()]}var Qe=class t extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};var Nc=require("fs"),PP=require("util"),OP=require("path"),NP={fs:{readFileSync:Nc.readFileSync,writeFile:Nc.writeFile},format:PP.format,resolve:OP.resolve,exists:t=>{try{return(0,Nc.statSync)(t).isFile()}catch{return!1}}};var Gr,p_=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let n=e.shift(),r=function(){};return typeof e[e.length-1]=="function"&&(r=e.pop()),r=r||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]=n,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})):r(),Gr.format.apply(Gr.format,[this.cache[this.locale][n]||n].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),n=e.shift(),r=e.shift(),i=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?n:r;this.cache[this.locale][n]&&(s=this.cache[this.locale][n][i===1?"one":"other"]),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]={one:n,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(i),Gr.format.apply(Gr.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.cache[this.locale][n]=e[n])}_taggedLiteral(e,...n){let r="";return e.forEach(function(i,o){let s=n[o+1];r+=i,typeof s<"u"&&(r+="%s")}),this.__.apply(this,[r].concat([].slice.call(n,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,n=this.writeQueue[0],r=n.directory,i=n.locale,o=n.cb,s=this._resolveLocaleFile(r,i),a=JSON.stringify(this.cache[i],null,2);Gr.fs.writeFile(s,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(u)})}_readLocaleFile(){let e={},n=this._resolveLocaleFile(this.directory,this.locale);try{Gr.fs.readFileSync&&(e=JSON.parse(Gr.fs.readFileSync(n,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+n),r.code==="ENOENT")e={};else throw r}this.cache[this.locale]=e}_resolveLocaleFile(e,n){let r=Gr.resolve(e,"./",n+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~n.lastIndexOf("_")){let i=Gr.resolve(e,"./",n.split("_")[0]+".json");this._fileExistsSync(i)&&(r=i)}return r}_fileExistsSync(e){return Gr.exists(e)}};function DP(t,e){Gr=e;let n=new p_(t);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var tK=t=>DP(t,NP),LP=tK;var nK="require is not supported by ESM",kP="loading a directory of commands is not supported yet for ESM",pf;try{pf=(0,qP.fileURLToPath)("file:///c%3A/mnt/vss/_work/1/s/node_modules/yargs/lib/platform-shims/esm.mjs")}catch{pf=process.cwd()}var rK=pf.substring(0,pf.lastIndexOf("node_modules")),UP={assert:{notStrictEqual:fh.notStrictEqual,strictEqual:fh.strictEqual},cliui:a_,findUp:_P,getEnv:t=>process.env[t],inspect:FP.inspect,getCallerFile:()=>{throw new Qe(kP)},getProcessArgvBin:RP,mainFilename:rK||process.cwd(),Parser:AP,path:{basename:zr.basename,dirname:zr.dirname,extname:zr.extname,relative:zr.relative,resolve:zr.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:MP.readFileSync,require:()=>{throw new Qe(nK)},requireDirectory:()=>{throw new Qe(kP)},stringWidth:t=>[...t].length,y18n:LP({directory:(0,zr.resolve)(pf,"../../../locales"),updateFiles:!1})};function wn(t,e,n,r){n.assert.notStrictEqual(t,e,r)}function d_(t,e){e.assert.strictEqual(typeof t,"string")}function Dc(t){return Object.keys(t)}function Ze(t){return!!t&&!!t.then&&typeof t.then=="function"}function jo(t){let n=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw new Error(`No command found in: ${t}`);let o={cmd:i.replace(r,""),demanded:[],optional:[]};return n.forEach((s,a)=>{let u=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===n.length-1&&(u=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(r,"").split("|"),variadic:u}):o.demanded.push({cmd:s.replace(r,"").split("|"),variadic:u})}),o}var iK=["first","second","third","fourth","fifth","sixth"];function ee(t,e,n){function r(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[jo(`cmd ${t}`),e,n]}try{let i=0,[o,s,a]=r(),u=[].slice.call(s);for(;u.length&&u[u.length-1]===void 0;)u.pop();let c=a||u.length;if(c<o.demanded.length)throw new Qe(`Not enough arguments provided. Expected ${o.demanded.length} but received ${u.length}.`);let l=o.demanded.length+o.optional.length;if(c>l)throw new Qe(`Too many arguments provided. Expected max ${l} but received ${c}.`);o.demanded.forEach(f=>{let p=u.shift(),d=jP(p);f.cmd.filter(m=>m===d||m==="*").length===0&&$P(d,f.cmd,i),i+=1}),o.optional.forEach(f=>{if(u.length===0)return;let p=u.shift(),d=jP(p);f.cmd.filter(m=>m===d||m==="*").length===0&&$P(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function jP(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function $P(t,e,n){throw new Qe(`Invalid ${iK[n]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var ph=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,n,r=!0,i=!1){if(ee("<array|function> [boolean] [boolean] [boolean]",[e,n,r],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=n,s.global=r}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=n,o.global=r,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,n){let r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...r[n]||[],n];return i.option?!o.includes(i.option):!0}),e.option=n,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function HP(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Ys(t,e,n,r){return n.reduce((i,o)=>{if(o.applyBeforeValidation!==r)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(Ze(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(i,e);return Ze(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Ks(t,e,n=r=>{throw r}){try{let r=oK(t)?t():t;return Ze(r)?r.then(i=>e(i)):e(r)}catch(r){return n(r)}}function oK(t){return typeof t=="function"}function h_(t){if(typeof require>"u")return null;for(let e=0,n=Object.keys(require.cache),r;e<n.length;e++)if(r=require.cache[n[e]],r.exports===t)return r;return null}var Lc=/(^\*)|(^\$0)/,m_=class{constructor(e,n,r,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=r,this.validation=n}addDirectory(e,n,r,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,u)=>{let c=o(s,a,u);if(c){if(this.requireCache.has(a))return c;this.requireCache.add(a),this.addHandler(c)}return c},this.shim.requireDirectory({require:n,filename:r},e,i)}addHandler(e,n,r,i,o,s){let a=[],u=HP(o);if(i=i||(()=>{}),Array.isArray(e))if(sK(e))[e,...a]=e;else for(let c of e)this.addHandler(c);else if(cK(e)){let c=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(c=[].concat(c).concat(e.aliases)),this.addHandler(c,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(BP(r)){this.addHandler([e].concat(a),n,r.builder,r.handler,r.middlewares,r.deprecated);return}if(typeof e=="string"){let c=jo(e);a=a.map(p=>jo(p).cmd);let l=!1,f=[c.cmd].concat(a).filter(p=>Lc.test(p)?(l=!0,!1):!0);f.length===0&&l&&f.push("$0"),l&&(c.cmd=f[0],a=f.slice(1),e=e.replace(Lc,c.cmd)),a.forEach(p=>{this.aliasMap[p]=c.cmd}),n!==!1&&this.usage.command(e,n,l,a,s),this.handlers[c.cmd]={original:e,description:n,handler:i,builder:r||{},middlewares:u,deprecated:s,demanded:c.demanded,optional:c.optional},l&&(this.defaultCommand=this.handlers[c.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,n,r,i,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=n.getInternalMethods().getContext(),c=u.commands.slice(),l=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(l,a,n,r.aliases,c,i,o,s);return Ze(f)?f.then(p=>this.applyMiddlewareAndGetResult(l,a,p.innerArgv,u,o,p.aliases,n)):this.applyMiddlewareAndGetResult(l,a,f.innerArgv,u,o,f.aliases,n)}applyBuilderUpdateUsageAndParse(e,n,r,i,o,s,a,u){let c=n.builder,l=r;if(dh(c)){r.getInternalMethods().getUsageInstance().freeze();let f=c(r.getInternalMethods().reset(i),u);if(Ze(f))return f.then(p=>(l=zP(p)?p:r,this.parseAndUpdateUsage(e,n,l,o,s,a)))}else aK(c)&&(r.getInternalMethods().getUsageInstance().freeze(),l=r.getInternalMethods().reset(i),Object.keys(n.builder).forEach(f=>{l.option(f,c[f])}));return this.parseAndUpdateUsage(e,n,l,o,s,a)}parseAndUpdateUsage(e,n,r,i,o,s){e&&r.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,n),n.description);let a=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return Ze(a)?a.then(u=>({aliases:r.parsed.aliases,innerArgv:u})):{aliases:r.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,n){let r=Lc.test(n.original)?n.original.replace(Lc,"").trim():n.original,i=e.filter(o=>!Lc.test(o));return i.push(r),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,n,r,i,o,s,a,u){if(!s.getInternalMethods().getHasOutput()){let c=s.getInternalMethods().runValidation(o,u,s.parsed.error,e);r=Ks(r,l=>(c(l),l))}if(n.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let c=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(r,c,!1,!1),r=Ys(r,s,a,!1),r=Ks(r,l=>{let f=n.handler(l);return Ze(f)?f.then(()=>l):l}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),Ze(r)&&!s.getInternalMethods().hasParseCallback()&&r.catch(l=>{try{s.getInternalMethods().getUsageInstance().fail(null,l)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),r}applyMiddlewareAndGetResult(e,n,r,i,o,s,a){let u={};if(o)return r;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(n,r,i,a));let c=this.globalMiddleware.getMiddleware().slice(0).concat(n.middlewares),l=Ys(r,a,c,!0);return Ze(l)?l.then(f=>this.handleValidationAndGetResult(e,n,f,i,s,a,c,u)):this.handleValidationAndGetResult(e,n,l,i,s,a,c,u)}populatePositionals(e,n,r,i){n._=n._.slice(r.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,n._.length);o.length;){let u=o.shift();this.populatePositional(u,n,a)}for(;s.length;){let u=s.shift();this.populatePositional(u,n,a)}return n._=r.commands.concat(n._.map(u=>""+u)),this.postProcessPositionals(n,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,n,r){let i=e.cmd[0];e.variadic?r[i]=n._.splice(0).map(String):n._.length&&(r[i]=[String(n._.shift())])}cmdToParseOptions(e){let n={array:[],default:{},alias:{},demand:{}},r=jo(e);return r.demanded.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(n.array.push(o),n.default[o]=[]),n.alias[o]=s,n.demand[o]=!0}),r.optional.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(n.array.push(o),n.default[o]=[]),n.alias[o]=s}),n}postProcessPositionals(e,n,r,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(r.default,o.default);for(let c of Object.keys(r.alias))o.alias[c]=(o.alias[c]||[]).concat(r.alias[c]);o.array=o.array.concat(r.array),o.config={};let s=[];if(Object.keys(n).forEach(c=>{n[c].map(l=>{o.configuration["unknown-options-as-args"]&&(o.key[c]=!0),s.push(`--${c}`),s.push(l)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(u.error)i.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let c=Object.keys(n);Object.keys(n).forEach(l=>{c.push(...u.aliases[l])}),Object.keys(u.argv).forEach(l=>{c.includes(l)&&(n[l]||(n[l]=u.argv[l]),!this.isInConfigs(i,l)&&!this.isDefaulted(i,l)&&Object.prototype.hasOwnProperty.call(e,l)&&Object.prototype.hasOwnProperty.call(u.argv,l)&&(Array.isArray(e[l])||Array.isArray(u.argv[l]))?e[l]=[].concat(e[l],u.argv[l]):e[l]=u.argv[l])})}}isDefaulted(e,n){let{default:r}=e.getOptions();return Object.prototype.hasOwnProperty.call(r,n)||Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(n))}isInConfigs(e,n){let{configObjects:r}=e.getOptions();return r.some(i=>Object.prototype.hasOwnProperty.call(i,n))||r.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(n)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let r=Lc.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(r,this.defaultCommand.description)}let n=this.defaultCommand.builder;if(dh(n))return n(e,!0);BP(n)||Object.keys(n).forEach(r=>{e.option(r,n[r])})}moduleName(e){let n=h_(e);if(!n)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(n.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:n,desc:r}){for(let i of[e,n,r]){if(typeof i=="string"||i===!1)return i;wn(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();wn(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function GP(t,e,n,r){return new m_(t,e,n,r)}function BP(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function sK(t){return t.every(e=>typeof e=="string")}function dh(t){return typeof t=="function"}function aK(t){return typeof t=="object"}function cK(t){return typeof t=="object"&&!Array.isArray(t)}function $o(t={},e=()=>!0){let n={};return Dc(t).forEach(r=>{e(r,t[r])&&(n[r]=t[r])}),n}function Ho(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let n=e;n._handle&&n.isTTY&&typeof n._handle.setBlocking=="function"&&n._handle.setBlocking(t)})}function uK(t){return typeof t=="boolean"}function WP(t,e){let n=e.y18n.__,r={},i=[];r.failFn=function(b){i.push(b)};let o=null,s=null,a=!0;r.showHelpOnFail=function(b=!0,T){let[A,q]=typeof b=="string"?[!0,b]:[b,T];return t.getInternalMethods().isGlobalContext()&&(s=q),o=q,a=A,r};let u=!1;r.fail=function(b,T){let A=t.getInternalMethods().getLoggerInstance();if(i.length)for(let q=i.length-1;q>=0;--q){let $=i[q];if(uK($)){if(T)throw T;if(b)throw Error(b)}else $(b,T,r)}else{if(t.getExitProcess()&&Ho(!0),!u){u=!0,a&&(t.showHelp("error"),A.error()),(b||T)&&A.error(b||T);let q=o||s;q&&((b||T)&&A.error(""),A.error(q))}if(T=T||new Qe(b),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,T);throw T}};let c=[],l=!1;r.usage=(S,b)=>S===null?(l=!0,c=[],r):(l=!1,c.push([S,b||""]),r),r.getUsage=()=>c,r.getUsageDisabled=()=>l,r.getPositionalGroupName=()=>n("Positionals:");let f=[];r.example=(S,b)=>{f.push([S,b||""])};let p=[];r.command=function(b,T,A,q,$=!1){A&&(p=p.map(j=>(j[2]=!1,j))),p.push([b,T||"",A,q,$])},r.getCommands=()=>p;let d={};r.describe=function(b,T){Array.isArray(b)?b.forEach(A=>{r.describe(A,T)}):typeof b=="object"?Object.keys(b).forEach(A=>{r.describe(A,b[A])}):d[b]=T},r.getDescriptions=()=>d;let h=[];r.epilog=S=>{h.push(S)};let m=!1,g;r.wrap=S=>{m=!0,g=S},r.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(m||(g=D(),m=!0),g);let v="__yargsString__:";r.deferY18nLookup=S=>v+S,r.help=function(){if(E)return E;_();let b=t.customScriptName?t.$0:e.path.basename(t.$0),T=t.getDemandedOptions(),A=t.getDemandedCommands(),q=t.getDeprecatedOptions(),$=t.getGroups(),j=t.getOptions(),K=[];K=K.concat(Object.keys(d)),K=K.concat(Object.keys(T)),K=K.concat(Object.keys(A)),K=K.concat(Object.keys(j.default)),K=K.filter(L),K=Object.keys(K.reduce((ne,Ee)=>(Ee!=="_"&&(ne[Ee]=!0),ne),{}));let se=r.getWrap(),G=e.cliui({width:se,wrap:!!se});if(!l){if(c.length)c.forEach(ne=>{G.div({text:`${ne[0].replace(/\$0/g,b)}`}),ne[1]&&G.div({text:`${ne[1]}`,padding:[1,0,0,0]})}),G.div();else if(p.length){let ne=null;A._?ne=`${b} <${n("command")}>
|
|
`:ne=`${b} [${n("command")}]
|
|
`,G.div(`${ne}`)}}if(p.length>1||p.length===1&&!p[0][2]){G.div(n("Commands:"));let ne=t.getInternalMethods().getContext(),Ee=ne.commands.length?`${ne.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((he,Fe)=>he[0].localeCompare(Fe[0])));let Oe=b?`${b} `:"";p.forEach(he=>{let Fe=`${Oe}${Ee}${he[0].replace(/^\$0 ?/,"")}`;G.span({text:Fe,padding:[0,2,0,2],width:y(p,se,`${b}${Ee}`)+4},{text:he[1]});let Be=[];he[2]&&Be.push(`[${n("default")}]`),he[3]&&he[3].length&&Be.push(`[${n("aliases:")} ${he[3].join(", ")}]`),he[4]&&(typeof he[4]=="string"?Be.push(`[${n("deprecated: %s",he[4])}]`):Be.push(`[${n("deprecated")}]`)),Be.length?G.div({text:Be.join(" "),padding:[0,0,0,2],align:"right"}):G.div()}),G.div()}let fe=(Object.keys(j.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);K=K.filter(ne=>!t.parsed.newAliases[ne]&&fe.every(Ee=>(j.alias[Ee]||[]).indexOf(ne)===-1));let ue=n("Options:");$[ue]||($[ue]=[]),C(K,j.alias,$,ue);let le=ne=>/^--/.test(hh(ne)),W=Object.keys($).filter(ne=>$[ne].length>0).map(ne=>{let Ee=$[ne].filter(L).map(Oe=>{if(fe.includes(Oe))return Oe;for(let he=0,Fe;(Fe=fe[he])!==void 0;he++)if((j.alias[Fe]||[]).includes(Oe))return Fe;return Oe});return{groupName:ne,normalizedKeys:Ee}}).filter(({normalizedKeys:ne})=>ne.length>0).map(({groupName:ne,normalizedKeys:Ee})=>{let Oe=Ee.reduce((he,Fe)=>(he[Fe]=[Fe].concat(j.alias[Fe]||[]).map(Be=>ne===r.getPositionalGroupName()?Be:(/^[0-9]$/.test(Be)?j.boolean.includes(Fe)?"-":"--":Be.length>1?"--":"-")+Be).sort((Be,rn)=>le(Be)===le(rn)?0:le(Be)?1:-1).join(", "),he),{});return{groupName:ne,normalizedKeys:Ee,switches:Oe}});if(W.filter(({groupName:ne})=>ne!==r.getPositionalGroupName()).some(({normalizedKeys:ne,switches:Ee})=>!ne.every(Oe=>le(Ee[Oe])))&&W.filter(({groupName:ne})=>ne!==r.getPositionalGroupName()).forEach(({normalizedKeys:ne,switches:Ee})=>{ne.forEach(Oe=>{le(Ee[Oe])&&(Ee[Oe]=lK(Ee[Oe],4))})}),W.forEach(({groupName:ne,normalizedKeys:Ee,switches:Oe})=>{G.div(ne),Ee.forEach(he=>{let Fe=Oe[he],Be=d[he]||"",rn=null;Be.includes(v)&&(Be=n(Be.substring(v.length))),j.boolean.includes(he)&&(rn=`[${n("boolean")}]`),j.count.includes(he)&&(rn=`[${n("count")}]`),j.string.includes(he)&&(rn=`[${n("string")}]`),j.normalize.includes(he)&&(rn=`[${n("string")}]`),j.array.includes(he)&&(rn=`[${n("array")}]`),j.number.includes(he)&&(rn=`[${n("number")}]`);let En=M=>typeof M=="string"?`[${n("deprecated: %s",M)}]`:`[${n("deprecated")}]`,qo=[he in q?En(q[he]):null,rn,he in T?`[${n("required")}]`:null,j.choices&&j.choices[he]?`[${n("choices:")} ${r.stringifiedValues(j.choices[he])}]`:null,R(j.default[he],j.defaultDescription[he])].filter(Boolean).join(" ");G.span({text:hh(Fe),padding:[0,2,0,2+VP(Fe)],width:y(Oe,se)+4},Be);let P=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;qo&&!P?G.div({text:qo,padding:[0,0,0,2],align:"right"}):G.div()}),G.div()}),f.length&&(G.div(n("Examples:")),f.forEach(ne=>{ne[0]=ne[0].replace(/\$0/g,b)}),f.forEach(ne=>{ne[1]===""?G.div({text:ne[0],padding:[0,2,0,2]}):G.div({text:ne[0],padding:[0,2,0,2],width:y(f,se)+4},{text:ne[1]})}),G.div()),h.length>0){let ne=h.map(Ee=>Ee.replace(/\$0/g,b)).join(`
|
|
`);G.div(`${ne}
|
|
`)}return G.toString().replace(/\s*$/,"")};function y(S,b,T){let A=0;return Array.isArray(S)||(S=Object.values(S).map(q=>[q])),S.forEach(q=>{A=Math.max(e.stringWidth(T?`${T} ${hh(q[0])}`:hh(q[0]))+VP(q[0]),A)}),b&&(A=Math.min(A,parseInt((b*.5).toString(),10))),A}function _(){let S=t.getDemandedOptions(),b=t.getOptions();(Object.keys(b.alias)||[]).forEach(T=>{b.alias[T].forEach(A=>{d[A]&&r.describe(T,d[A]),A in S&&t.demandOption(T,S[A]),b.boolean.includes(A)&&t.boolean(T),b.count.includes(A)&&t.count(T),b.string.includes(A)&&t.string(T),b.normalize.includes(A)&&t.normalize(T),b.array.includes(A)&&t.array(T),b.number.includes(A)&&t.number(T)})})}let E;r.cacheHelpMessage=function(){E=this.help()},r.clearCachedHelpMessage=function(){E=void 0},r.hasCachedHelpMessage=function(){return!!E};function C(S,b,T,A){let q=[],$=null;return Object.keys(T).forEach(j=>{q=q.concat(T[j])}),S.forEach(j=>{$=[j].concat(b[j]),$.some(K=>q.indexOf(K)!==-1)||T[A].push(j)}),q}function L(S){return t.getOptions().hiddenOptions.indexOf(S)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}r.showHelp=S=>{let b=t.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:b[S])(r.help())},r.functionDescription=S=>["(",S.name?e.Parser.decamelize(S.name,"-"):n("generated-value"),")"].join(""),r.stringifiedValues=function(b,T){let A="",q=T||", ",$=[].concat(b);return!b||!$.length||$.forEach(j=>{A.length&&(A+=q),A+=JSON.stringify(j)}),A};function R(S,b){let T=`[${n("default:")} `;if(S===void 0&&!b)return null;if(b)T+=b;else switch(typeof S){case"string":T+=`"${S}"`;break;case"object":T+=JSON.stringify(S);break;default:T+=S}return`${T}]`}function D(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let O=null;r.version=S=>{O=S},r.showVersion=S=>{let b=t.getInternalMethods().getLoggerInstance();S||(S="error"),(typeof S=="function"?S:b[S])(O)},r.reset=function(b){return o=null,u=!1,c=[],l=!1,h=[],f=[],p=[],d=$o(d,T=>!b[T]),r};let N=[];return r.freeze=function(){N.push({failMessage:o,failureOutput:u,usages:c,usageDisabled:l,epilogs:h,examples:f,commands:p,descriptions:d})},r.unfreeze=function(b=!1){let T=N.pop();T&&(b?(d={...T.descriptions,...d},p=[...T.commands,...p],c=[...T.usages,...c],f=[...T.examples,...f],h=[...T.epilogs,...h]):{failMessage:o,failureOutput:u,usages:c,usageDisabled:l,epilogs:h,examples:f,commands:p,descriptions:d}=T)},r}function g_(t){return typeof t=="object"}function lK(t,e){return g_(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}function VP(t){return g_(t)?t.indentation:0}function hh(t){return g_(t)?t.text:t}var YP=`###-begin-{{app_name}}-completions-###
|
|
#
|
|
# yargs command completion script
|
|
#
|
|
# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
|
|
# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
|
|
#
|
|
_{{app_name}}_yargs_completions()
|
|
{
|
|
local cur_word args type_list
|
|
|
|
cur_word="\${COMP_WORDS[COMP_CWORD]}"
|
|
args=("\${COMP_WORDS[@]}")
|
|
|
|
# ask yargs to generate completions.
|
|
type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
|
|
|
|
COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
|
|
|
|
# if no match was found, fall back to filename completion
|
|
if [ \${#COMPREPLY[@]} -eq 0 ]; then
|
|
COMPREPLY=()
|
|
fi
|
|
|
|
return 0
|
|
}
|
|
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
###-end-{{app_name}}-completions-###
|
|
`,KP=`#compdef {{app_name}}
|
|
###-begin-{{app_name}}-completions-###
|
|
#
|
|
# yargs command completion script
|
|
#
|
|
# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
|
|
# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
|
|
#
|
|
_{{app_name}}_yargs_completions()
|
|
{
|
|
local reply
|
|
local si=$IFS
|
|
IFS=$'
|
|
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
|
|
IFS=$si
|
|
_describe 'values' reply
|
|
}
|
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
###-end-{{app_name}}-completions-###
|
|
`;var v_=class{constructor(e,n,r,i){var o,s,a;this.yargs=e,this.usage=n,this.command=r,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,n,r,i){let o=this.command.getCommandHandlers();for(let a=0,u=e.length;a<u;++a)if(o[e[a]]&&o[e[a]].builder){let c=o[e[a]].builder;if(dh(c)){this.indexAfterLastReset=a+1;let l=this.yargs.getInternalMethods().reset();return c(l,!0),l.argv}}let s=[];this.commandCompletions(s,e,r),this.optionCompletions(s,e,n,r),this.choicesFromOptionsCompletions(s,e,n,r),this.choicesFromPositionalsCompletions(s,e,n,r),i(null,s)}commandCompletions(e,n,r){let i=this.yargs.getInternalMethods().getContext().commands;!r.match(/^-/)&&i[i.length-1]!==r&&!this.previousArgHasChoices(n)&&this.usage.getCommands().forEach(o=>{let s=jo(o[0]).cmd;if(n.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,n,r,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(n)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let u=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(n,a,u)&&this.completeOptionKey(a,e,i,u&&!!o.default[a])})}}choicesFromOptionsCompletions(e,n,r,i){if(this.previousArgHasChoices(n)){let o=this.getPreviousArgChoices(n);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,n,r,i){if(i===""&&e.length>0&&this.previousArgHasChoices(n))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[r._.length-s-1];if(!a)return;let u=this.yargs.getOptions().choices[a]||[];for(let c of u)c.startsWith(i)&&e.push(c.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let n=e[e.length-1],r="";if(!n.startsWith("-")&&e.length>1&&(r=n,n=e[e.length-2]),!n.startsWith("-"))return;let i=n.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]],a;for(let u of s)if(Object.prototype.hasOwnProperty.call(o.key,u)&&Array.isArray(o.choices[u])){a=o.choices[u];break}if(a)return a.filter(u=>!r||u.startsWith(r))}previousArgHasChoices(e){let n=this.getPreviousArgChoices(e);return n!==void 0&&n.length>0}argsContainKey(e,n,r){let i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(n)||r&&i(`no-${n}`))return!0;if(this.aliases){for(let o of this.aliases[n])if(i(o))return!0}return!1}completeOptionKey(e,n,r,i){var o,s,a,u;let c=e;if(this.zshShell){let d=this.usage.getDescriptions(),h=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(v=>{let y=d[v];return typeof y=="string"&&y.length>0}),m=h?d[h]:void 0,g=(u=(a=d[e])!==null&&a!==void 0?a:m)!==null&&u!==void 0?u:"";c=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let l=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!l(r)&&f(e)?"-":"--";n.push(p+c),i&&n.push(p+"no-"+c)}customCompletion(e,n,r,i){if(wn(this.customCompletionFunction,null,this.shim),pK(this.customCompletionFunction)){let o=this.customCompletionFunction(r,n);return Ze(o)?o.then(s=>{this.shim.process.nextTick(()=>{i(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{i(s,void 0)})}):i(null,o)}else return dK(this.customCompletionFunction)?this.customCompletionFunction(r,n,(o=i)=>this.defaultCompletion(e,n,r,o),o=>{i(null,o)}):this.customCompletionFunction(r,n,o=>{i(null,o)})}getCompletion(e,n){let r=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,r,n):s=>this.defaultCompletion(e,s,r,n);return Ze(i)?i.then(o):o(i)}generateCompletionScript(e,n){let r=this.zshShell?KP:YP,i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),r=r.replace(/{{app_name}}/g,i),r=r.replace(/{{completion_command}}/g,n),r.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function XP(t,e,n,r){return new v_(t,e,n,r)}function pK(t){return t.length<3}function dK(t){return t.length>3}function JP(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let n=[],r;for(r=0;r<=e.length;r++)n[r]=[r];let i;for(i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++)e.charAt(r-1)===t.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&e.charAt(r-2)===t.charAt(i-1)&&e.charAt(r-1)===t.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[e.length][t.length]}var QP=["$0","--","_"];function ZP(t,e,n){let r=n.y18n.__,i=n.y18n.__n,o={};o.nonOptionCount=function(f){let p=t.getDemandedCommands(),h=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;p._&&(h<p._.min||h>p._.max)&&(h<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,h.toString()).replace(/\$1/,p._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",h,h.toString(),p._.min.toString())):h>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,h.toString()).replace(/\$1/,p._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",h,h.toString(),p._.max.toString()))))},o.positionalCount=function(f,p){p<f&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",p,p+"",f+""))},o.requiredArguments=function(f,p){let d=null;for(let h of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,h)||typeof f[h]>"u")&&(d=d||{},d[h]=p[h]);if(d){let h=[];for(let g of Object.keys(d)){let v=d[g];v&&h.indexOf(v)<0&&h.push(v)}let m=h.length?`
|
|
${h.join(`
|
|
`)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(d).length,Object.keys(d).join(", ")+m))}},o.unknownArguments=function(f,p,d,h,m=!0){var g;let v=t.getInternalMethods().getCommandInstance().getCommands(),y=[],_=t.getInternalMethods().getContext();if(Object.keys(f).forEach(E=>{!QP.includes(E)&&!Object.prototype.hasOwnProperty.call(d,E)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),E)&&!o.isValidAndSomeAliasIsNotNew(E,p)&&y.push(E)}),m&&(_.commands.length>0||v.length>0||h)&&f._.slice(_.commands.length).forEach(E=>{v.includes(""+E)||y.push(""+E)}),m){let C=((g=t.getDemandedCommands()._)===null||g===void 0?void 0:g.max)||0,L=_.commands.length+C;L<f._.length&&f._.slice(L).forEach(R=>{R=String(R),!_.commands.includes(R)&&!y.includes(R)&&y.push(R)})}y.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",y.length,y.map(E=>E.trim()?E:`"${E}"`).join(", ")))},o.unknownCommands=function(f){let p=t.getInternalMethods().getCommandInstance().getCommands(),d=[],h=t.getInternalMethods().getContext();return(h.commands.length>0||p.length>0)&&f._.slice(h.commands.length).forEach(m=>{p.includes(""+m)||d.push(""+m)}),d.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",d.length,d.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;let d=t.parsed.newAliases;return[f,...p[f]].some(h=>!Object.prototype.hasOwnProperty.call(d,h)||!d[f])},o.limitedChoices=function(f){let p=t.getOptions(),d={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(g=>{QP.indexOf(g)===-1&&Object.prototype.hasOwnProperty.call(p.choices,g)&&[].concat(f[g]).forEach(v=>{p.choices[g].indexOf(v)===-1&&v!==void 0&&(d[g]=(d[g]||[]).concat(v))})});let h=Object.keys(d);if(!h.length)return;let m=r("Invalid values:");h.forEach(g=>{m+=`
|
|
${r("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(d[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(m)};let s={};o.implies=function(f,p){ee("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.implies(d,f[d])}):(t.global(f),s[f]||(s[f]=[]),Array.isArray(p)?p.forEach(d=>o.implies(f,d)):(wn(p,void 0,n),s[f].push(p)))},o.getImplied=function(){return s};function a(l,f){let p=Number(f);return f=isNaN(p)?f:p,typeof f=="number"?f=l._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(l,f)):f=Object.prototype.hasOwnProperty.call(l,f),f}o.implications=function(f){let p=[];if(Object.keys(s).forEach(d=>{let h=d;(s[d]||[]).forEach(m=>{let g=h,v=m;g=a(f,g),m=a(f,m),g&&!m&&p.push(` ${h} -> ${v}`)})}),p.length){let d=`${r("Implications failed:")}
|
|
`;p.forEach(h=>{d+=h}),e.fail(d)}};let u={};o.conflicts=function(f,p){ee("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.conflicts(d,f[d])}):(t.global(f),u[f]||(u[f]=[]),Array.isArray(p)?p.forEach(d=>o.conflicts(f,d)):u[f].push(p))},o.getConflicting=()=>u,o.conflicting=function(f){Object.keys(f).forEach(p=>{u[p]&&u[p].forEach(d=>{d&&f[p]!==void 0&&f[d]!==void 0&&e.fail(r("Arguments %s and %s are mutually exclusive",p,d))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(p=>{u[p].forEach(d=>{d&&f[n.Parser.camelCase(p)]!==void 0&&f[n.Parser.camelCase(d)]!==void 0&&e.fail(r("Arguments %s and %s are mutually exclusive",p,d))})})},o.recommendCommands=function(f,p){p=p.sort((g,v)=>v.length-g.length);let h=null,m=1/0;for(let g=0,v;(v=p[g])!==void 0;g++){let y=JP(f,v);y<=3&&y<m&&(m=y,h=v)}h&&e.fail(r("Did you mean %s?",h))},o.reset=function(f){return s=$o(s,p=>!f[p]),u=$o(u,p=>!f[p]),o};let c=[];return o.freeze=function(){c.push({implied:s,conflicting:u})},o.unfreeze=function(){let f=c.pop();wn(f,void 0,n),{implied:s,conflicting:u}=f},o}var y_=[],df;function mh(t,e,n,r){df=r;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;let o=/\.json|\..*rc$/.test(t.extends),s=null;if(o)s=mK(e,t.extends);else try{s=require.resolve(t.extends)}catch{return t}hK(s),y_.push(s),i=o?JSON.parse(df.readFileSync(s,"utf8")):require(t.extends),delete t.extends,i=mh(i,df.path.dirname(s),n,df)}return y_=[],n?eO(i,t):Object.assign({},i,t)}function hK(t){if(y_.indexOf(t)>-1)throw new Qe(`Circular extended configurations: '${t}'.`)}function mK(t,e){return df.path.resolve(t,e)}function eO(t,e){let n={};function r(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(n,t);for(let i of Object.keys(e))r(e[i])&&r(n[i])?n[i]=eO(t[i],e[i]):n[i]=e[i];return n}var te=function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},w=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},gt,Xs,hf,mr,Xn,gh,Bo,Js,vh,gr,yh,vr,ui,Jn,yr,xh,kc,Mt,oe,_h,Eh,Qn,Qs,Fc,Zs,Go,bh,pe,ea,ta,na,me,wh,li,pt;function _O(t){return(e=[],n=t.process.cwd(),r)=>{let i=new R_(e,n,r,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var tO=Symbol("copyDoubleDash"),nO=Symbol("copyDoubleDash"),x_=Symbol("deleteFromParserHintObject"),rO=Symbol("emitWarning"),iO=Symbol("freeze"),oO=Symbol("getDollarZero"),ra=Symbol("getParserConfiguration"),sO=Symbol("getUsageConfiguration"),__=Symbol("guessLocale"),aO=Symbol("guessVersion"),cO=Symbol("parsePositionalNumbers"),E_=Symbol("pkgUp"),zo=Symbol("populateParserHintArray"),Mc=Symbol("populateParserHintSingleValueDictionary"),b_=Symbol("populateParserHintArrayDictionary"),w_=Symbol("populateParserHintDictionary"),S_=Symbol("sanitizeKey"),C_=Symbol("setKey"),T_=Symbol("unfreeze"),uO=Symbol("validateAsync"),lO=Symbol("getCommandInstance"),fO=Symbol("getContext"),pO=Symbol("getHasOutput"),dO=Symbol("getLoggerInstance"),hO=Symbol("getParseContext"),mO=Symbol("getUsageInstance"),gO=Symbol("getValidationInstance"),Sh=Symbol("hasParseCallback"),vO=Symbol("isGlobalContext"),ia=Symbol("postProcess"),yO=Symbol("rebase"),I_=Symbol("reset"),mf=Symbol("runYargsParserAndExecuteCommands"),A_=Symbol("runValidation"),xO=Symbol("setHasOutput"),oa=Symbol("kTrackManuallySetKeys"),R_=class{constructor(e=[],n,r,i){this.customScriptName=!1,this.parsed=!1,gt.set(this,void 0),Xs.set(this,void 0),hf.set(this,{commands:[],fullCommands:[]}),mr.set(this,null),Xn.set(this,null),gh.set(this,"show-hidden"),Bo.set(this,null),Js.set(this,!0),vh.set(this,{}),gr.set(this,!0),yh.set(this,[]),vr.set(this,void 0),ui.set(this,{}),Jn.set(this,!1),yr.set(this,null),xh.set(this,!0),kc.set(this,void 0),Mt.set(this,""),oe.set(this,void 0),_h.set(this,void 0),Eh.set(this,{}),Qn.set(this,null),Qs.set(this,null),Fc.set(this,{}),Zs.set(this,{}),Go.set(this,void 0),bh.set(this,!1),pe.set(this,void 0),ea.set(this,!1),ta.set(this,!1),na.set(this,!1),me.set(this,void 0),wh.set(this,{}),li.set(this,null),pt.set(this,void 0),te(this,pe,i,"f"),te(this,Go,e,"f"),te(this,Xs,n,"f"),te(this,_h,r,"f"),te(this,vr,new ph(this),"f"),this.$0=this[oO](),this[I_](),te(this,gt,w(this,gt,"f"),"f"),te(this,me,w(this,me,"f"),"f"),te(this,pt,w(this,pt,"f"),"f"),te(this,oe,w(this,oe,"f"),"f"),w(this,oe,"f").showHiddenOpt=w(this,gh,"f"),te(this,kc,this[nO](),"f")}addHelpOpt(e,n){let r="help";return ee("[string|boolean] [string]",[e,n],arguments.length),w(this,yr,"f")&&(this[x_](w(this,yr,"f")),te(this,yr,null,"f")),e===!1&&n===void 0?this:(te(this,yr,typeof e=="string"?e:r,"f"),this.boolean(w(this,yr,"f")),this.describe(w(this,yr,"f"),n||w(this,me,"f").deferY18nLookup("Show help")),this)}help(e,n){return this.addHelpOpt(e,n)}addShowHiddenOpt(e,n){if(ee("[string|boolean] [string]",[e,n],arguments.length),e===!1&&n===void 0)return this;let r=typeof e=="string"?e:w(this,gh,"f");return this.boolean(r),this.describe(r,n||w(this,me,"f").deferY18nLookup("Show hidden options")),w(this,oe,"f").showHiddenOpt=r,this}showHidden(e,n){return this.addShowHiddenOpt(e,n)}alias(e,n){return ee("<object|string|array> [string|array]",[e,n],arguments.length),this[b_](this.alias.bind(this),"alias",e,n),this}array(e){return ee("<array|string>",[e],arguments.length),this[zo]("array",e),this[oa](e),this}boolean(e){return ee("<array|string>",[e],arguments.length),this[zo]("boolean",e),this[oa](e),this}check(e,n){return ee("<function> [boolean]",[e,n],arguments.length),this.middleware((r,i)=>Ks(()=>e(r,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&w(this,me,"f").fail(o.toString(),o):w(this,me,"f").fail(w(this,pe,"f").y18n.__("Argument check failed: %s",e.toString())),r),o=>(w(this,me,"f").fail(o.message?o.message:o.toString(),o),r)),!1,n),this}choices(e,n){return ee("<object|string|array> [string|array]",[e,n],arguments.length),this[b_](this.choices.bind(this),"choices",e,n),this}coerce(e,n){if(ee("<object|string|array> [function]",[e,n],arguments.length),Array.isArray(e)){if(!n)throw new Qe("coerce callback must be provided");for(let r of e)this.coerce(r,n);return this}else if(typeof e=="object"){for(let r of Object.keys(e))this.coerce(r,e[r]);return this}if(!n)throw new Qe("coerce callback must be provided");return w(this,oe,"f").key[e]=!0,w(this,vr,"f").addCoerceMiddleware((r,i)=>{let o;return Object.prototype.hasOwnProperty.call(r,e)?Ks(()=>(o=i.getAliases(),n(r[e])),a=>{r[e]=a;let u=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&u!==!0)for(let c of o[e])r[c]=a;return r},a=>{throw new Qe(a.message)}):r},e),this}conflicts(e,n){return ee("<string|object> [string|array]",[e,n],arguments.length),w(this,pt,"f").conflicts(e,n),this}config(e="config",n,r){return ee("[object|string] [string|function] [function]",[e,n,r],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=mh(e,w(this,Xs,"f"),this[ra]()["deep-merge-config"]||!1,w(this,pe,"f")),w(this,oe,"f").configObjects=(w(this,oe,"f").configObjects||[]).concat(e),this):(typeof n=="function"&&(r=n,n=void 0),this.describe(e,n||w(this,me,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{w(this,oe,"f").config[i]=r||!0}),this)}completion(e,n,r){return ee("[string] [string|boolean|function] [function]",[e,n,r],arguments.length),typeof n=="function"&&(r=n,n=void 0),te(this,Xn,e||w(this,Xn,"f")||"completion","f"),!n&&n!==!1&&(n="generate completion script"),this.command(w(this,Xn,"f"),n),r&&w(this,mr,"f").registerFunction(r),this}command(e,n,r,i,o,s){return ee("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,n,r,i,o,s],arguments.length),w(this,gt,"f").addHandler(e,n,r,i,o,s),this}commands(e,n,r,i,o,s){return this.command(e,n,r,i,o,s)}commandDir(e,n){ee("<string> [object]",[e,n],arguments.length);let r=w(this,_h,"f")||w(this,pe,"f").require;return w(this,gt,"f").addDirectory(e,r,w(this,pe,"f").getCallerFile(),n),this}count(e){return ee("<array|string>",[e],arguments.length),this[zo]("count",e),this[oa](e),this}default(e,n,r){return ee("<object|string|array> [*] [string]",[e,n,r],arguments.length),r&&(d_(e,w(this,pe,"f")),w(this,oe,"f").defaultDescription[e]=r),typeof n=="function"&&(d_(e,w(this,pe,"f")),w(this,oe,"f").defaultDescription[e]||(w(this,oe,"f").defaultDescription[e]=w(this,me,"f").functionDescription(n)),n=n.call()),this[Mc](this.default.bind(this),"default",e,n),this}defaults(e,n,r){return this.default(e,n,r)}demandCommand(e=1,n,r,i){return ee("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,n,r,i],arguments.length),typeof n!="number"&&(r=n,n=1/0),this.global("_",!1),w(this,oe,"f").demandedCommands._={min:e,max:n,minMsg:r,maxMsg:i},this}demand(e,n,r){return Array.isArray(n)?(n.forEach(i=>{wn(r,!0,w(this,pe,"f")),this.demandOption(i,r)}),n=1/0):typeof n!="number"&&(r=n,n=1/0),typeof e=="number"?(wn(r,!0,w(this,pe,"f")),this.demandCommand(e,n,r,r)):Array.isArray(e)?e.forEach(i=>{wn(r,!0,w(this,pe,"f")),this.demandOption(i,r)}):typeof r=="string"?this.demandOption(e,r):(r===!0||typeof r>"u")&&this.demandOption(e),this}demandOption(e,n){return ee("<object|string|array> [string]",[e,n],arguments.length),this[Mc](this.demandOption.bind(this),"demandedOptions",e,n),this}deprecateOption(e,n){return ee("<string> [string|boolean]",[e,n],arguments.length),w(this,oe,"f").deprecatedOptions[e]=n,this}describe(e,n){return ee("<object|string|array> [string]",[e,n],arguments.length),this[C_](e,!0),w(this,me,"f").describe(e,n),this}detectLocale(e){return ee("<boolean>",[e],arguments.length),te(this,Js,e,"f"),this}env(e){return ee("[string|boolean]",[e],arguments.length),e===!1?delete w(this,oe,"f").envPrefix:w(this,oe,"f").envPrefix=e||"",this}epilogue(e){return ee("<string>",[e],arguments.length),w(this,me,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,n){return ee("<string|array> [string]",[e,n],arguments.length),Array.isArray(e)?e.forEach(r=>this.example(...r)):w(this,me,"f").example(e,n),this}exit(e,n){te(this,Jn,!0,"f"),te(this,Bo,n,"f"),w(this,gr,"f")&&w(this,pe,"f").process.exit(e)}exitProcess(e=!0){return ee("[boolean]",[e],arguments.length),te(this,gr,e,"f"),this}fail(e){if(ee("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Qe("Invalid first argument. Expected function or boolean 'false'");return w(this,me,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,n){return ee("<array> [function]",[e,n],arguments.length),n?w(this,mr,"f").getCompletion(e,n):new Promise((r,i)=>{w(this,mr,"f").getCompletion(e,(o,s)=>{o?i(o):r(s)})})}getDemandedOptions(){return ee([],0),w(this,oe,"f").demandedOptions}getDemandedCommands(){return ee([],0),w(this,oe,"f").demandedCommands}getDeprecatedOptions(){return ee([],0),w(this,oe,"f").deprecatedOptions}getDetectLocale(){return w(this,Js,"f")}getExitProcess(){return w(this,gr,"f")}getGroups(){return Object.assign({},w(this,ui,"f"),w(this,Zs,"f"))}getHelp(){if(te(this,Jn,!0,"f"),!w(this,me,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[mf](w(this,Go,"f"),void 0,void 0,0,!0);if(Ze(n))return n.then(()=>w(this,me,"f").help())}let e=w(this,gt,"f").runDefaultBuilderOn(this);if(Ze(e))return e.then(()=>w(this,me,"f").help())}return Promise.resolve(w(this,me,"f").help())}getOptions(){return w(this,oe,"f")}getStrict(){return w(this,ea,"f")}getStrictCommands(){return w(this,ta,"f")}getStrictOptions(){return w(this,na,"f")}global(e,n){return ee("<string|array> [boolean]",[e,n],arguments.length),e=[].concat(e),n!==!1?w(this,oe,"f").local=w(this,oe,"f").local.filter(r=>e.indexOf(r)===-1):e.forEach(r=>{w(this,oe,"f").local.includes(r)||w(this,oe,"f").local.push(r)}),this}group(e,n){ee("<string|array> <string>",[e,n],arguments.length);let r=w(this,Zs,"f")[n]||w(this,ui,"f")[n];w(this,Zs,"f")[n]&&delete w(this,Zs,"f")[n];let i={};return w(this,ui,"f")[n]=(r||[]).concat(e).filter(o=>i[o]?!1:i[o]=!0),this}hide(e){return ee("<string>",[e],arguments.length),w(this,oe,"f").hiddenOptions.push(e),this}implies(e,n){return ee("<string|object> [number|string|array]",[e,n],arguments.length),w(this,pt,"f").implies(e,n),this}locale(e){return ee("[string]",[e],arguments.length),e===void 0?(this[__](),w(this,pe,"f").y18n.getLocale()):(te(this,Js,!1,"f"),w(this,pe,"f").y18n.setLocale(e),this)}middleware(e,n,r){return w(this,vr,"f").addMiddleware(e,!!n,r)}nargs(e,n){return ee("<string|object|array> [number]",[e,n],arguments.length),this[Mc](this.nargs.bind(this),"narg",e,n),this}normalize(e){return ee("<array|string>",[e],arguments.length),this[zo]("normalize",e),this}number(e){return ee("<array|string>",[e],arguments.length),this[zo]("number",e),this[oa](e),this}option(e,n){if(ee("<string|object> [object]",[e,n],arguments.length),typeof e=="object")Object.keys(e).forEach(r=>{this.options(r,e[r])});else{typeof n!="object"&&(n={}),this[oa](e),w(this,li,"f")&&(e==="version"||(n==null?void 0:n.alias)==="version")&&this[rO](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
`),void 0,"versionWarning"),w(this,oe,"f").key[e]=!0,n.alias&&this.alias(e,n.alias);let r=n.deprecate||n.deprecated;r&&this.deprecateOption(e,r);let i=n.demand||n.required||n.require;i&&this.demand(e,i),n.demandOption&&this.demandOption(e,typeof n.demandOption=="string"?n.demandOption:void 0),n.conflicts&&this.conflicts(e,n.conflicts),"default"in n&&this.default(e,n.default),n.implies!==void 0&&this.implies(e,n.implies),n.nargs!==void 0&&this.nargs(e,n.nargs),n.config&&this.config(e,n.configParser),n.normalize&&this.normalize(e),n.choices&&this.choices(e,n.choices),n.coerce&&this.coerce(e,n.coerce),n.group&&this.group(e,n.group),(n.boolean||n.type==="boolean")&&(this.boolean(e),n.alias&&this.boolean(n.alias)),(n.array||n.type==="array")&&(this.array(e),n.alias&&this.array(n.alias)),(n.number||n.type==="number")&&(this.number(e),n.alias&&this.number(n.alias)),(n.string||n.type==="string")&&(this.string(e),n.alias&&this.string(n.alias)),(n.count||n.type==="count")&&this.count(e),typeof n.global=="boolean"&&this.global(e,n.global),n.defaultDescription&&(w(this,oe,"f").defaultDescription[e]=n.defaultDescription),n.skipValidation&&this.skipValidation(e);let o=n.describe||n.description||n.desc,s=w(this,me,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,e)||typeof o=="string")&&this.describe(e,o),n.hidden&&this.hide(e),n.requiresArg&&this.requiresArg(e)}return this}options(e,n){return this.option(e,n)}parse(e,n,r){ee("[string|array] [function|boolean|object] [function]",[e,n,r],arguments.length),this[iO](),typeof e>"u"&&(e=w(this,Go,"f")),typeof n=="object"&&(te(this,Qs,n,"f"),n=r),typeof n=="function"&&(te(this,Qn,n,"f"),n=!1),n||te(this,Go,e,"f"),w(this,Qn,"f")&&te(this,gr,!1,"f");let i=this[mf](e,!!n),o=this.parsed;return w(this,mr,"f").setParsed(this.parsed),Ze(i)?i.then(s=>(w(this,Qn,"f")&&w(this,Qn,"f").call(this,w(this,Bo,"f"),s,w(this,Mt,"f")),s)).catch(s=>{throw w(this,Qn,"f")&&w(this,Qn,"f")(s,this.parsed.argv,w(this,Mt,"f")),s}).finally(()=>{this[T_](),this.parsed=o}):(w(this,Qn,"f")&&w(this,Qn,"f").call(this,w(this,Bo,"f"),i,w(this,Mt,"f")),this[T_](),this.parsed=o,i)}parseAsync(e,n,r){let i=this.parse(e,n,r);return Ze(i)?i:Promise.resolve(i)}parseSync(e,n,r){let i=this.parse(e,n,r);if(Ze(i))throw new Qe(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return ee("<object>",[e],arguments.length),te(this,Eh,e,"f"),this}pkgConf(e,n){ee("<string> [string]",[e,n],arguments.length);let r=null,i=this[E_](n||w(this,Xs,"f"));return i[e]&&typeof i[e]=="object"&&(r=mh(i[e],n||w(this,Xs,"f"),this[ra]()["deep-merge-config"]||!1,w(this,pe,"f")),w(this,oe,"f").configObjects=(w(this,oe,"f").configObjects||[]).concat(r)),this}positional(e,n){ee("<string> <object>",[e,n],arguments.length);let r=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];n=$o(n,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:r.includes(s));let i=w(this,hf,"f").fullCommands[w(this,hf,"f").fullCommands.length-1],o=i?w(this,gt,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return Dc(o).forEach(s=>{let a=o[s];Array.isArray(a)?a.indexOf(e)!==-1&&(n[s]=!0):a[e]&&!(s in n)&&(n[s]=a[e])}),this.group(e,w(this,me,"f").getPositionalGroupName()),this.option(e,n)}recommendCommands(e=!0){return ee("[boolean]",[e],arguments.length),te(this,bh,e,"f"),this}required(e,n,r){return this.demand(e,n,r)}require(e,n,r){return this.demand(e,n,r)}requiresArg(e){return ee("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&w(this,oe,"f").narg[e]?this:(this[Mc](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,n){return ee("[string] [string]",[e,n],arguments.length),e=e||this.$0,w(this,kc,"f").log(w(this,mr,"f").generateCompletionScript(e,n||w(this,Xn,"f")||"completion")),this}showHelp(e){if(ee("[string|function]",[e],arguments.length),te(this,Jn,!0,"f"),!w(this,me,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[mf](w(this,Go,"f"),void 0,void 0,0,!0);if(Ze(r))return r.then(()=>{w(this,me,"f").showHelp(e)}),this}let n=w(this,gt,"f").runDefaultBuilderOn(this);if(Ze(n))return n.then(()=>{w(this,me,"f").showHelp(e)}),this}return w(this,me,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,n){return ee("[boolean|string] [string]",[e,n],arguments.length),w(this,me,"f").showHelpOnFail(e,n),this}showVersion(e){return ee("[string|function]",[e],arguments.length),w(this,me,"f").showVersion(e),this}skipValidation(e){return ee("<array|string>",[e],arguments.length),this[zo]("skipValidation",e),this}strict(e){return ee("[boolean]",[e],arguments.length),te(this,ea,e!==!1,"f"),this}strictCommands(e){return ee("[boolean]",[e],arguments.length),te(this,ta,e!==!1,"f"),this}strictOptions(e){return ee("[boolean]",[e],arguments.length),te(this,na,e!==!1,"f"),this}string(e){return ee("<array|string>",[e],arguments.length),this[zo]("string",e),this[oa](e),this}terminalWidth(){return ee([],0),w(this,pe,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return ee("<object>",[e],arguments.length),te(this,Js,!1,"f"),w(this,pe,"f").y18n.updateLocale(e),this}usage(e,n,r,i){if(ee("<string|null|undefined> [string|boolean] [function|object] [function]",[e,n,r,i],arguments.length),n!==void 0){if(wn(e,null,w(this,pe,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,n,r,i);throw new Qe(".usage() description must start with $0 if being used as alias for .command()")}else return w(this,me,"f").usage(e),this}usageConfiguration(e){return ee("<object>",[e],arguments.length),te(this,wh,e,"f"),this}version(e,n,r){let i="version";if(ee("[boolean|string] [string] [string]",[e,n,r],arguments.length),w(this,li,"f")&&(this[x_](w(this,li,"f")),w(this,me,"f").version(void 0),te(this,li,null,"f")),arguments.length===0)r=this[aO](),e=i;else if(arguments.length===1){if(e===!1)return this;r=e,e=i}else arguments.length===2&&(r=n,n=void 0);return te(this,li,typeof e=="string"?e:i,"f"),n=n||w(this,me,"f").deferY18nLookup("Show version number"),w(this,me,"f").version(r||void 0),this.boolean(w(this,li,"f")),this.describe(w(this,li,"f"),n),this}wrap(e){return ee("<number|null|undefined>",[e],arguments.length),w(this,me,"f").wrap(e),this}[(gt=new WeakMap,Xs=new WeakMap,hf=new WeakMap,mr=new WeakMap,Xn=new WeakMap,gh=new WeakMap,Bo=new WeakMap,Js=new WeakMap,vh=new WeakMap,gr=new WeakMap,yh=new WeakMap,vr=new WeakMap,ui=new WeakMap,Jn=new WeakMap,yr=new WeakMap,xh=new WeakMap,kc=new WeakMap,Mt=new WeakMap,oe=new WeakMap,_h=new WeakMap,Eh=new WeakMap,Qn=new WeakMap,Qs=new WeakMap,Fc=new WeakMap,Zs=new WeakMap,Go=new WeakMap,bh=new WeakMap,pe=new WeakMap,ea=new WeakMap,ta=new WeakMap,na=new WeakMap,me=new WeakMap,wh=new WeakMap,li=new WeakMap,pt=new WeakMap,tO)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[nO](){return{log:(...e)=>{this[Sh]()||console.log(...e),te(this,Jn,!0,"f"),w(this,Mt,"f").length&&te(this,Mt,w(this,Mt,"f")+`
|
|
`,"f"),te(this,Mt,w(this,Mt,"f")+e.join(" "),"f")},error:(...e)=>{this[Sh]()||console.error(...e),te(this,Jn,!0,"f"),w(this,Mt,"f").length&&te(this,Mt,w(this,Mt,"f")+`
|
|
`,"f"),te(this,Mt,w(this,Mt,"f")+e.join(" "),"f")}}}[x_](e){Dc(w(this,oe,"f")).forEach(n=>{if((i=>i==="configObjects")(n))return;let r=w(this,oe,"f")[n];Array.isArray(r)?r.includes(e)&&r.splice(r.indexOf(e),1):typeof r=="object"&&delete r[e]}),delete w(this,me,"f").getDescriptions()[e]}[rO](e,n,r){w(this,vh,"f")[r]||(w(this,pe,"f").process.emitWarning(e,n),w(this,vh,"f")[r]=!0)}[iO](){w(this,yh,"f").push({options:w(this,oe,"f"),configObjects:w(this,oe,"f").configObjects.slice(0),exitProcess:w(this,gr,"f"),groups:w(this,ui,"f"),strict:w(this,ea,"f"),strictCommands:w(this,ta,"f"),strictOptions:w(this,na,"f"),completionCommand:w(this,Xn,"f"),output:w(this,Mt,"f"),exitError:w(this,Bo,"f"),hasOutput:w(this,Jn,"f"),parsed:this.parsed,parseFn:w(this,Qn,"f"),parseContext:w(this,Qs,"f")}),w(this,me,"f").freeze(),w(this,pt,"f").freeze(),w(this,gt,"f").freeze(),w(this,vr,"f").freeze()}[oO](){let e="",n;return/\b(node|iojs|electron)(\.exe)?$/.test(w(this,pe,"f").process.argv()[0])?n=w(this,pe,"f").process.argv().slice(1,2):n=w(this,pe,"f").process.argv().slice(0,1),e=n.map(r=>{let i=this[yO](w(this,Xs,"f"),r);return r.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<r.length?i:r}).join(" ").trim(),w(this,pe,"f").getEnv("_")&&w(this,pe,"f").getProcessArgvBin()===w(this,pe,"f").getEnv("_")&&(e=w(this,pe,"f").getEnv("_").replace(`${w(this,pe,"f").path.dirname(w(this,pe,"f").process.execPath())}/`,"")),e}[ra](){return w(this,Eh,"f")}[sO](){return w(this,wh,"f")}[__](){if(!w(this,Js,"f"))return;let e=w(this,pe,"f").getEnv("LC_ALL")||w(this,pe,"f").getEnv("LC_MESSAGES")||w(this,pe,"f").getEnv("LANG")||w(this,pe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[aO](){return this[E_]().version||"unknown"}[cO](e){let n=e["--"]?e["--"]:e._;for(let r=0,i;(i=n[r])!==void 0;r++)w(this,pe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(n[r]=Number(i));return e}[E_](e){let n=e||"*";if(w(this,Fc,"f")[n])return w(this,Fc,"f")[n];let r={};try{let i=e||w(this,pe,"f").mainFilename;!e&&w(this,pe,"f").path.extname(i)&&(i=w(this,pe,"f").path.dirname(i));let o=w(this,pe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});wn(o,void 0,w(this,pe,"f")),r=JSON.parse(w(this,pe,"f").readFileSync(o,"utf8"))}catch{}return w(this,Fc,"f")[n]=r||{},w(this,Fc,"f")[n]}[zo](e,n){n=[].concat(n),n.forEach(r=>{r=this[S_](r),w(this,oe,"f")[e].push(r)})}[Mc](e,n,r,i){this[w_](e,n,r,i,(o,s,a)=>{w(this,oe,"f")[o][s]=a})}[b_](e,n,r,i){this[w_](e,n,r,i,(o,s,a)=>{w(this,oe,"f")[o][s]=(w(this,oe,"f")[o][s]||[]).concat(a)})}[w_](e,n,r,i,o){if(Array.isArray(r))r.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(r))for(let s of Dc(r))e(s,r[s]);else o(n,this[S_](r),i)}[S_](e){return e==="__proto__"?"___proto___":e}[C_](e,n){return this[Mc](this[C_].bind(this),"key",e,n),this}[T_](){var e,n,r,i,o,s,a,u,c,l,f,p;let d=w(this,yh,"f").pop();wn(d,void 0,w(this,pe,"f"));let h;e=this,n=this,r=this,i=this,o=this,s=this,a=this,u=this,c=this,l=this,f=this,p=this,{options:{set value(m){te(e,oe,m,"f")}}.value,configObjects:h,exitProcess:{set value(m){te(n,gr,m,"f")}}.value,groups:{set value(m){te(r,ui,m,"f")}}.value,output:{set value(m){te(i,Mt,m,"f")}}.value,exitError:{set value(m){te(o,Bo,m,"f")}}.value,hasOutput:{set value(m){te(s,Jn,m,"f")}}.value,parsed:this.parsed,strict:{set value(m){te(a,ea,m,"f")}}.value,strictCommands:{set value(m){te(u,ta,m,"f")}}.value,strictOptions:{set value(m){te(c,na,m,"f")}}.value,completionCommand:{set value(m){te(l,Xn,m,"f")}}.value,parseFn:{set value(m){te(f,Qn,m,"f")}}.value,parseContext:{set value(m){te(p,Qs,m,"f")}}.value}=d,w(this,oe,"f").configObjects=h,w(this,me,"f").unfreeze(),w(this,pt,"f").unfreeze(),w(this,gt,"f").unfreeze(),w(this,vr,"f").unfreeze()}[uO](e,n){return Ks(n,r=>(e(r),r))}getInternalMethods(){return{getCommandInstance:this[lO].bind(this),getContext:this[fO].bind(this),getHasOutput:this[pO].bind(this),getLoggerInstance:this[dO].bind(this),getParseContext:this[hO].bind(this),getParserConfiguration:this[ra].bind(this),getUsageConfiguration:this[sO].bind(this),getUsageInstance:this[mO].bind(this),getValidationInstance:this[gO].bind(this),hasParseCallback:this[Sh].bind(this),isGlobalContext:this[vO].bind(this),postProcess:this[ia].bind(this),reset:this[I_].bind(this),runValidation:this[A_].bind(this),runYargsParserAndExecuteCommands:this[mf].bind(this),setHasOutput:this[xO].bind(this)}}[lO](){return w(this,gt,"f")}[fO](){return w(this,hf,"f")}[pO](){return w(this,Jn,"f")}[dO](){return w(this,kc,"f")}[hO](){return w(this,Qs,"f")||{}}[mO](){return w(this,me,"f")}[gO](){return w(this,pt,"f")}[Sh](){return!!w(this,Qn,"f")}[vO](){return w(this,xh,"f")}[ia](e,n,r,i){return r||Ze(e)||(n||(e=this[tO](e)),(this[ra]()["parse-positional-numbers"]||this[ra]()["parse-positional-numbers"]===void 0)&&(e=this[cO](e)),i&&(e=Ys(e,this,w(this,vr,"f").getMiddleware(),!1))),e}[I_](e={}){te(this,oe,w(this,oe,"f")||{},"f");let n={};n.local=w(this,oe,"f").local||[],n.configObjects=w(this,oe,"f").configObjects||[];let r={};n.local.forEach(s=>{r[s]=!0,(e[s]||[]).forEach(a=>{r[a]=!0})}),Object.assign(w(this,Zs,"f"),Object.keys(w(this,ui,"f")).reduce((s,a)=>{let u=w(this,ui,"f")[a].filter(c=>!(c in r));return u.length>0&&(s[a]=u),s},{})),te(this,ui,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{n[s]=(w(this,oe,"f")[s]||[]).filter(a=>!r[a])}),o.forEach(s=>{n[s]=$o(w(this,oe,"f")[s],a=>!r[a])}),n.envPrefix=w(this,oe,"f").envPrefix,te(this,oe,n,"f"),te(this,me,w(this,me,"f")?w(this,me,"f").reset(r):WP(this,w(this,pe,"f")),"f"),te(this,pt,w(this,pt,"f")?w(this,pt,"f").reset(r):ZP(this,w(this,me,"f"),w(this,pe,"f")),"f"),te(this,gt,w(this,gt,"f")?w(this,gt,"f").reset():GP(w(this,me,"f"),w(this,pt,"f"),w(this,vr,"f"),w(this,pe,"f")),"f"),w(this,mr,"f")||te(this,mr,XP(this,w(this,me,"f"),w(this,gt,"f"),w(this,pe,"f")),"f"),w(this,vr,"f").reset(),te(this,Xn,null,"f"),te(this,Mt,"","f"),te(this,Bo,null,"f"),te(this,Jn,!1,"f"),this.parsed=!1,this}[yO](e,n){return w(this,pe,"f").path.relative(e,n)}[mf](e,n,r,i=0,o=!1){let s=!!r||o;e=e||w(this,Go,"f"),w(this,oe,"f").__=w(this,pe,"f").y18n.__,w(this,oe,"f").configuration=this[ra]();let a=!!w(this,oe,"f").configuration["populate--"],u=Object.assign({},w(this,oe,"f").configuration,{"populate--":!0}),c=w(this,pe,"f").Parser.detailed(e,Object.assign({},w(this,oe,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),l=Object.assign(c.argv,w(this,Qs,"f")),f,p=c.aliases,d=!1,h=!1;Object.keys(l).forEach(m=>{m===w(this,yr,"f")&&l[m]?d=!0:m===w(this,li,"f")&&l[m]&&(h=!0)}),l.$0=this.$0,this.parsed=c,i===0&&w(this,me,"f").clearCachedHelpMessage();try{if(this[__](),n)return this[ia](l,a,!!r,!1);w(this,yr,"f")&&[w(this,yr,"f")].concat(p[w(this,yr,"f")]||[]).filter(_=>_.length>1).includes(""+l._[l._.length-1])&&(l._.pop(),d=!0),te(this,xh,!1,"f");let m=w(this,gt,"f").getCommands(),g=w(this,mr,"f").completionKey in l,v=d||g||o;if(l._.length){if(m.length){let y;for(let _=i||0,E;l._[_]!==void 0;_++)if(E=String(l._[_]),m.includes(E)&&E!==w(this,Xn,"f")){let C=w(this,gt,"f").runCommand(E,this,c,_+1,o,d||h||o);return this[ia](C,a,!!r,!1)}else if(!y&&E!==w(this,Xn,"f")){y=E;break}!w(this,gt,"f").hasDefaultCommand()&&w(this,bh,"f")&&y&&!v&&w(this,pt,"f").recommendCommands(y,m)}w(this,Xn,"f")&&l._.includes(w(this,Xn,"f"))&&!g&&(w(this,gr,"f")&&Ho(!0),this.showCompletionScript(),this.exit(0))}if(w(this,gt,"f").hasDefaultCommand()&&!v){let y=w(this,gt,"f").runCommand(null,this,c,0,o,d||h||o);return this[ia](y,a,!!r,!1)}if(g){w(this,gr,"f")&&Ho(!0),e=[].concat(e);let y=e.slice(e.indexOf(`--${w(this,mr,"f").completionKey}`)+1);return w(this,mr,"f").getCompletion(y,(_,E)=>{if(_)throw new Qe(_.message);(E||[]).forEach(C=>{w(this,kc,"f").log(C)}),this.exit(0)}),this[ia](l,!a,!!r,!1)}if(w(this,Jn,"f")||(d?(w(this,gr,"f")&&Ho(!0),s=!0,this.showHelp("log"),this.exit(0)):h&&(w(this,gr,"f")&&Ho(!0),s=!0,w(this,me,"f").showVersion("log"),this.exit(0))),!s&&w(this,oe,"f").skipValidation.length>0&&(s=Object.keys(l).some(y=>w(this,oe,"f").skipValidation.indexOf(y)>=0&&l[y]===!0)),!s){if(c.error)throw new Qe(c.error.message);if(!g){let y=this[A_](p,{},c.error);r||(f=Ys(l,this,w(this,vr,"f").getMiddleware(),!0)),f=this[uO](y,f??l),Ze(f)&&!r&&(f=f.then(()=>Ys(l,this,w(this,vr,"f").getMiddleware(),!1)))}}}catch(m){if(m instanceof Qe)w(this,me,"f").fail(m.message,m);else throw m}return this[ia](f??l,a,!!r,!0)}[A_](e,n,r,i){let o={...this.getDemandedOptions()};return s=>{if(r)throw new Qe(r.message);w(this,pt,"f").nonOptionCount(s),w(this,pt,"f").requiredArguments(s,o);let a=!1;w(this,ta,"f")&&(a=w(this,pt,"f").unknownCommands(s)),w(this,ea,"f")&&!a?w(this,pt,"f").unknownArguments(s,e,n,!!i):w(this,na,"f")&&w(this,pt,"f").unknownArguments(s,e,{},!1,!1),w(this,pt,"f").limitedChoices(s),w(this,pt,"f").implications(s),w(this,pt,"f").conflicting(s)}}[xO](){te(this,Jn,!0,"f")}[oa](e){if(typeof e=="string")w(this,oe,"f").key[e]=!0;else for(let n of e)w(this,oe,"f").key[n]=!0}};function zP(t){return!!t&&typeof t.getInternalMethods=="function"}var gK=_O(UP),P_=gK;var S7=require("child_process");var AO=require("events"),Vi=class{nodeEmitter=new AO.EventEmitter;disposables;constructor(...e){this.disposables=e}event=e=>(this.nodeEmitter.on("event",e),{dispose:()=>{this.nodeEmitter.off("event",e)}});fire(e){this.nodeEmitter.emit("event",e)}dispose(){this.nodeEmitter.removeAllListeners(),this.disposables.forEach(e=>e.dispose())}};var RO={info:3,debug:2,trace:1},NK=Object.keys(RO).reduce((t,e)=>(t[RO[e]]=e,t),[]);function Ah(t){return NK[t]||3}var Ne={write:()=>{},raw:()=>{},start:()=>Date.now(),stop:()=>{},event:()=>{}},Ih=/(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]/g;function NO(t,e,n){return{event(r){let i=DK(r,e(),n.getTime());i&&t(i)}}}function Vr(t,e=2){return{event:t.event,write(n,r=e){t.event({type:"text",level:r,timestamp:Date.now(),text:n})},raw(n,r=e){t.event({type:"raw",level:r,timestamp:Date.now(),text:n})},start(n,r=e){let i=Date.now();return t.event({type:"start",level:r,timestamp:i,text:n}),i},stop(n,r,i=e){t.event({type:"stop",level:i,timestamp:Date.now(),text:n,startTimestamp:r})},get dimensions(){return t.dimensions},onDidChangeDimensions:t.onDidChangeDimensions}}function DO(t){if(process.stdout.isTTY){Object.defineProperty(t,"dimensions",{get:function(){return{rows:process.stdout.rows,columns:process.stdout.columns}}});let e=()=>{n.fire({rows:process.stdout.rows,columns:process.stdout.columns})},n=new Vi({dispose:()=>process.stdout.off("resize",e)});return process.stdout.on("resize",e),t.onDidChangeDimensions=n.event,n}}function DK(t,e,n){if(!(!("level"in t)||t.level<e))switch(t.type){case"text":return`[${vf(PO,`${t.timestamp-n} ms`)}] ${qc(t.text)}`;case"raw":return t.text;case"start":return 1>=e?`${vf(qK,`[${t.timestamp-n} ms] Start`)}: ${qc(t.text)}`:`[${vf(PO,`${t.timestamp-n} ms`)}] Start: ${qc(t.text)}`;case"stop":return 1>=e?`${vf(MK,`[${t.timestamp-n} ms] Stop`)} (${t.timestamp-t.startTimestamp} ms): ${qc(t.text)}`:void 0;default:throw LK(t)}}function qc(t){return jK(t).replace(/\r?\n/g,`\r
|
|
`).replace(/(\r?\n)?$/,`\r
|
|
`)}function LK(t){return new Error(`Unknown log event type: ${t.type}`)}var kK="38;2;143;99;79",LO="38;2;99;143;79",FK="38;2;86;156;214",MK=kK,qK=LO,PO=LO,UK=FK;function vf(t,e){return e.split(`
|
|
`).map(n=>`\x1B[1m\x1B[${t}m${n}\x1B[39m\x1B[22m`).join(`
|
|
`)}function jK(t){let e,n=0,r=[];for(Ih.lastIndex=0;e=Ih.exec(t);)r.push(OO(t.substring(n,e.index))),r.push(e[0]),n=Ih.lastIndex;return r.push(OO(t.substr(n))),r.join("")}function OO(t){let e=/(?<=^|[^A-Za-z0-9_\-\.])[0-9]+(\.[0-9]+)*(?=$|[^A-Za-z0-9_\-\.])/g,n,r=0,i=[];for(;n=e.exec(t);)i.push(t.substring(r,n.index)),i.push(vf(UK,n[0])),r=e.lastIndex;return i.push(t.substr(r)),i.join("")}function qt(t){return t.split(/\r?\n/).map(e=>`\x1B[1m\x1B[31m${e}\x1B[39m\x1B[22m`).join(`\r
|
|
`)+`\r
|
|
`}var on=class extends Error{description;detail;step;originalError;manageContainer=!1;params;containerId;dockerParams;volumeName;repositoryPath;folderPath;containerProperties;config;actions=[];data={};constructor(e){var n;super(e.originalError&&e.originalError.message||e.description),Object.assign(this,e),this.actions||(this.actions=[]),this.data||(this.data={}),(n=this.originalError)!=null&&n.stack&&(this.stack=this.originalError.stack)}};var Pr=Y(require("path")),Vg=Y(require("fs")),Pj=Y(V_()),MS=require("string_decoder"),Wg=Y(jm());var Yg=Y(require("crypto")),Qie=Y(Qm()),Fu=Y(gf()),Zie=Y(xF()),eoe=Y(pM());var it=Y(require("fs")),xi=require("util");function Oa(t){return new Promise(e=>it.stat(t,(n,r)=>e(!n&&r.isFile())))}function dM(t){return new Promise(e=>it.stat(t,(n,r)=>e(!n&&r.isDirectory())))}function hM(t){return new Promise(e=>it.stat(t,(n,r)=>e(!n&&r.isSocket())))}var Tt=(0,xi.promisify)(it.readFile),jw=(0,xi.promisify)(it.writeFile),ITe=(0,xi.promisify)(it.appendFile),dg=(0,xi.promisify)(it.rename),$w=(0,xi.promisify)(it.readdir),Zne=(0,xi.promisify)(it.unlink),Iu=t=>new Promise((e,n)=>it.mkdir(t,{recursive:!0},r=>r?n(r):e())),ere=(0,xi.promisify)(it.rmdir),Hw=(0,xi.promisify)(it.rm),ATe=(0,xi.promisify)(it.copyFile);var jie=Y(require("path")),OS=require("string_decoder");var $g=Y(require("path")),uj=Y(require("stream")),lj=Y(require("os")),Hg=Y(require("child_process")),PS=require("string_decoder");var JU=Y(require("assert"));var mM;(()=>{"use strict";var t={470:i=>{function o(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function s(u,c){for(var l,f="",p=0,d=-1,h=0,m=0;m<=u.length;++m){if(m<u.length)l=u.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(d===m-1||h===1))if(d!==m-1&&h===2){if(f.length<2||p!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var g=f.lastIndexOf("/");if(g!==f.length-1){g===-1?(f="",p=0):p=(f=f.slice(0,g)).length-1-f.lastIndexOf("/"),d=m,h=0;continue}}else if(f.length===2||f.length===1){f="",p=0,d=m,h=0;continue}}c&&(f.length>0?f+="/..":f="..",p=2)}else f.length>0?f+="/"+u.slice(d+1,m):f=u.slice(d+1,m),p=m-d-1;d=m,h=0}else l===46&&h!==-1?++h:h=-1}return f}var a={resolve:function(){for(var u,c="",l=!1,f=arguments.length-1;f>=-1&&!l;f--){var p;f>=0?p=arguments[f]:(u===void 0&&(u=process.cwd()),p=u),o(p),p.length!==0&&(c=p+"/"+c,l=p.charCodeAt(0)===47)}return c=s(c,!l),l?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(u){if(o(u),u.length===0)return".";var c=u.charCodeAt(0)===47,l=u.charCodeAt(u.length-1)===47;return(u=s(u,!c)).length!==0||c||(u="."),u.length>0&&l&&(u+="/"),c?"/"+u:u},isAbsolute:function(u){return o(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,c=0;c<arguments.length;++c){var l=arguments[c];o(l),l.length>0&&(u===void 0?u=l:u+="/"+l)}return u===void 0?".":a.normalize(u)},relative:function(u,c){if(o(u),o(c),u===c||(u=a.resolve(u))===(c=a.resolve(c)))return"";for(var l=1;l<u.length&&u.charCodeAt(l)===47;++l);for(var f=u.length,p=f-l,d=1;d<c.length&&c.charCodeAt(d)===47;++d);for(var h=c.length-d,m=p<h?p:h,g=-1,v=0;v<=m;++v){if(v===m){if(h>m){if(c.charCodeAt(d+v)===47)return c.slice(d+v+1);if(v===0)return c.slice(d+v)}else p>m&&(u.charCodeAt(l+v)===47?g=v:v===0&&(g=0));break}var y=u.charCodeAt(l+v);if(y!==c.charCodeAt(d+v))break;y===47&&(g=v)}var _="";for(v=l+g+1;v<=f;++v)v!==f&&u.charCodeAt(v)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+c.slice(d+g):(d+=g,c.charCodeAt(d)===47&&++d,c.slice(d))},_makeLong:function(u){return u},dirname:function(u){if(o(u),u.length===0)return".";for(var c=u.charCodeAt(0),l=c===47,f=-1,p=!0,d=u.length-1;d>=1;--d)if((c=u.charCodeAt(d))===47){if(!p){f=d;break}}else p=!1;return f===-1?l?"/":".":l&&f===1?"//":u.slice(0,f)},basename:function(u,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');o(u);var l,f=0,p=-1,d=!0;if(c!==void 0&&c.length>0&&c.length<=u.length){if(c.length===u.length&&c===u)return"";var h=c.length-1,m=-1;for(l=u.length-1;l>=0;--l){var g=u.charCodeAt(l);if(g===47){if(!d){f=l+1;break}}else m===-1&&(d=!1,m=l+1),h>=0&&(g===c.charCodeAt(h)?--h==-1&&(p=l):(h=-1,p=m))}return f===p?p=m:p===-1&&(p=u.length),u.slice(f,p)}for(l=u.length-1;l>=0;--l)if(u.charCodeAt(l)===47){if(!d){f=l+1;break}}else p===-1&&(d=!1,p=l+1);return p===-1?"":u.slice(f,p)},extname:function(u){o(u);for(var c=-1,l=0,f=-1,p=!0,d=0,h=u.length-1;h>=0;--h){var m=u.charCodeAt(h);if(m!==47)f===-1&&(p=!1,f=h+1),m===46?c===-1?c=h:d!==1&&(d=1):c!==-1&&(d=-1);else if(!p){l=h+1;break}}return c===-1||f===-1||d===0||d===1&&c===f-1&&c===l+1?"":u.slice(c,f)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(c,l){var f=l.dir||l.root,p=l.base||(l.name||"")+(l.ext||"");return f?f===l.root?f+p:f+"/"+p:p}(0,u)},parse:function(u){o(u);var c={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return c;var l,f=u.charCodeAt(0),p=f===47;p?(c.root="/",l=1):l=0;for(var d=-1,h=0,m=-1,g=!0,v=u.length-1,y=0;v>=l;--v)if((f=u.charCodeAt(v))!==47)m===-1&&(g=!1,m=v+1),f===46?d===-1?d=v:y!==1&&(y=1):d!==-1&&(y=-1);else if(!g){h=v+1;break}return d===-1||m===-1||y===0||y===1&&d===m-1&&d===h+1?m!==-1&&(c.base=c.name=h===0&&p?u.slice(1,m):u.slice(h,m)):(h===0&&p?(c.name=u.slice(1,d),c.base=u.slice(1,m)):(c.name=u.slice(h,d),c.base=u.slice(h,m)),c.ext=u.slice(d,m)),h>0?c.dir=u.slice(0,h-1):p&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,i.exports=a}},e={};function n(i){var o=e[i];if(o!==void 0)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}n.d=(i,o)=>{for(var s in o)n.o(o,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:o[s]})},n.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>p,Utils:()=>N}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function u(S,b){if(!S.scheme&&b)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${S.authority}", path: "${S.path}", query: "${S.query}", fragment: "${S.fragment}"}`);if(S.scheme&&!o.test(S.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(S.path){if(S.authority){if(!s.test(S.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(S.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let c="",l="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(b){return b instanceof p||!!b&&typeof b.authority=="string"&&typeof b.fragment=="string"&&typeof b.path=="string"&&typeof b.query=="string"&&typeof b.scheme=="string"&&typeof b.fsPath=="string"&&typeof b.with=="function"&&typeof b.toString=="function"}scheme;authority;path;query;fragment;constructor(b,T,A,q,$,j=!1){typeof b=="object"?(this.scheme=b.scheme||c,this.authority=b.authority||c,this.path=b.path||c,this.query=b.query||c,this.fragment=b.fragment||c):(this.scheme=function(K,se){return K||se?K:"file"}(b,j),this.authority=T||c,this.path=function(K,se){switch(K){case"https":case"http":case"file":se?se[0]!==l&&(se=l+se):se=l}return se}(this.scheme,A||c),this.query=q||c,this.fragment=$||c,u(this,j))}get fsPath(){return y(this,!1)}with(b){if(!b)return this;let{scheme:T,authority:A,path:q,query:$,fragment:j}=b;return T===void 0?T=this.scheme:T===null&&(T=c),A===void 0?A=this.authority:A===null&&(A=c),q===void 0?q=this.path:q===null&&(q=c),$===void 0?$=this.query:$===null&&($=c),j===void 0?j=this.fragment:j===null&&(j=c),T===this.scheme&&A===this.authority&&q===this.path&&$===this.query&&j===this.fragment?this:new h(T,A,q,$,j)}static parse(b,T=!1){let A=f.exec(b);return A?new h(A[2]||c,L(A[4]||c),L(A[5]||c),L(A[7]||c),L(A[9]||c),T):new h(c,c,c,c,c)}static file(b){let T=c;if(i&&(b=b.replace(/\\/g,l)),b[0]===l&&b[1]===l){let A=b.indexOf(l,2);A===-1?(T=b.substring(2),b=l):(T=b.substring(2,A),b=b.substring(A)||l)}return new h("file",T,b,c,c)}static from(b){let T=new h(b.scheme,b.authority,b.path,b.query,b.fragment);return u(T,!0),T}toString(b=!1){return _(this,b)}toJSON(){return this}static revive(b){if(b){if(b instanceof p)return b;{let T=new h(b);return T._formatted=b.external,T._fsPath=b._sep===d?b.fsPath:null,T}}return b}}let d=i?1:void 0;class h extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(b=!1){return b?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let b={$mid:1};return this._fsPath&&(b.fsPath=this._fsPath,b._sep=d),this._formatted&&(b.external=this._formatted),this.path&&(b.path=this.path),this.scheme&&(b.scheme=this.scheme),this.authority&&(b.authority=this.authority),this.query&&(b.query=this.query),this.fragment&&(b.fragment=this.fragment),b}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(S,b,T){let A,q=-1;for(let $=0;$<S.length;$++){let j=S.charCodeAt($);if(j>=97&&j<=122||j>=65&&j<=90||j>=48&&j<=57||j===45||j===46||j===95||j===126||b&&j===47||T&&j===91||T&&j===93||T&&j===58)q!==-1&&(A+=encodeURIComponent(S.substring(q,$)),q=-1),A!==void 0&&(A+=S.charAt($));else{A===void 0&&(A=S.substr(0,$));let K=m[j];K!==void 0?(q!==-1&&(A+=encodeURIComponent(S.substring(q,$)),q=-1),A+=K):q===-1&&(q=$)}}return q!==-1&&(A+=encodeURIComponent(S.substring(q))),A!==void 0?A:S}function v(S){let b;for(let T=0;T<S.length;T++){let A=S.charCodeAt(T);A===35||A===63?(b===void 0&&(b=S.substr(0,T)),b+=m[A]):b!==void 0&&(b+=S[T])}return b!==void 0?b:S}function y(S,b){let T;return T=S.authority&&S.path.length>1&&S.scheme==="file"?`//${S.authority}${S.path}`:S.path.charCodeAt(0)===47&&(S.path.charCodeAt(1)>=65&&S.path.charCodeAt(1)<=90||S.path.charCodeAt(1)>=97&&S.path.charCodeAt(1)<=122)&&S.path.charCodeAt(2)===58?b?S.path.substr(1):S.path[1].toLowerCase()+S.path.substr(2):S.path,i&&(T=T.replace(/\//g,"\\")),T}function _(S,b){let T=b?v:g,A="",{scheme:q,authority:$,path:j,query:K,fragment:se}=S;if(q&&(A+=q,A+=":"),($||q==="file")&&(A+=l,A+=l),$){let G=$.indexOf("@");if(G!==-1){let fe=$.substr(0,G);$=$.substr(G+1),G=fe.lastIndexOf(":"),G===-1?A+=T(fe,!1,!1):(A+=T(fe.substr(0,G),!1,!1),A+=":",A+=T(fe.substr(G+1),!1,!0)),A+="@"}$=$.toLowerCase(),G=$.lastIndexOf(":"),G===-1?A+=T($,!1,!0):(A+=T($.substr(0,G),!1,!0),A+=$.substr(G))}if(j){if(j.length>=3&&j.charCodeAt(0)===47&&j.charCodeAt(2)===58){let G=j.charCodeAt(1);G>=65&&G<=90&&(j=`/${String.fromCharCode(G+32)}:${j.substr(3)}`)}else if(j.length>=2&&j.charCodeAt(1)===58){let G=j.charCodeAt(0);G>=65&&G<=90&&(j=`${String.fromCharCode(G+32)}:${j.substr(2)}`)}A+=T(j,!0,!1)}return K&&(A+="?",A+=T(K,!1,!1)),se&&(A+="#",A+=b?se:g(se,!1,!1)),A}function E(S){try{return decodeURIComponent(S)}catch{return S.length>3?S.substr(0,3)+E(S.substr(3)):S}}let C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function L(S){return S.match(C)?S.replace(C,b=>E(b)):S}var R=n(470);let D=R.posix||R,O="/";var N;(function(S){S.joinPath=function(b,...T){return b.with({path:D.join(b.path,...T)})},S.resolvePath=function(b,...T){let A=b.path,q=!1;A[0]!==O&&(A=O+A,q=!0);let $=D.resolve(A,...T);return q&&$[0]===O&&!b.authority&&($=$.substring(1)),b.with({path:$})},S.dirname=function(b){if(b.path.length===0||b.path===O)return b;let T=D.dirname(b.path);return T.length===1&&T.charCodeAt(0)===46&&(T=""),b.with({path:T})},S.basename=function(b){return D.basename(b.path)},S.extname=function(b){return D.extname(b.path)}})(N||(N={}))})(),mM=r})();var{URI:qn,Utils:PTe}=mM;var gM=Y(require("path"));function Bw(t,e){if(Gw(e)){let n=t.dirname(e);return{isWorkspaceFile:!0,workspaceOrFolderPath:e,rootFolderPath:n,configFolderPath:n}}return{isWorkspaceFile:!1,workspaceOrFolderPath:e,rootFolderPath:e,configFolderPath:e}}function Gw(t){return gM.extname(t)===".code-workspace"}var po=Y(require("path")),Rg=Y(jm());var Ig=Y(fp()),BU=require("string_decoder");var GU=Y(gf());async function bq(t,e,n){if(!("exec"in t)){for(let r=e,i="";r!==i;i=r,r=t.path.dirname(r))if(await t.isFile(t.path.join(r,".git","config")))return r;return}try{let{stdout:r}=await Re({exec:t.exec,cmd:"git",args:["rev-parse","--show-cdup"],cwd:e,output:n}),i=r.toString().trim();return t.path.resolve(e,i)}catch{return}}async function wq(t,e,n,r,i){let o=r[1],s={get:"fill",store:"approve",erase:"reject"}[o];if(s===void 0)throw new Error(`Expected get, store or erase, got: ${o}`);let a=await Eq(n?t:e,s,i).catch(u=>{if(n)throw u});return!n&&(a==null?void 0:a.code)!==0&&(a=await Eq(t,s,i),a.code===0&&(n=!0)),{result:a,preferLocalCLIHost:n}}async function Eq({exec:t},e,n){try{let{stdout:r,stderr:i}=await Re({exec:t,cmd:"git",args:["credential",e],env:{GIT_TERMINAL_PROMPT:"0"},stdin:Buffer.from(n),output:Ne});return{stdout:r.toString(),stderr:i.toString(),code:0}}catch(r){if(!(r&&r.stdout&&r.stderr))throw r;let{stdout:i,stderr:o,code:s}=r;return{stdout:i.toString(),stderr:o.toString(),code:s||0}}}async function Sq(t,e,n){if(!("exec"in t)){let i=await bq(t,e.rootFolderPath,n);if(!i)return;try{return(await t.readFile(t.path.join(i,".git","config"))).toString().split(/^\[/m).filter(a=>a.startsWith("remote")).map(a=>(/^\s*url\s*=\s*(\S+)/m.exec(a)||[])[1]).filter(Boolean)}catch(o){if((o==null?void 0:o.code)!=="ENOENT")throw o;return[]}}let r;try{let{stdout:i}=await Re({exec:t.exec,cmd:"git",args:["remote","-v"],cwd:e.rootFolderPath,output:n});r=i.toString()}catch{return}return Array.from(new Set(Ire(/^[^\s]+\s+([^\s]+)/gm,r,1)))}function Ire(t,e,n){return{[Symbol.iterator]:function*(){let r;for(;r=t.exec(e);)yield r[n],t.lastIndex===r.index&&t.lastIndex++}}}var fs=require("stream");async function Cq(t){let e=`for pid in \`cd /proc && ls -d [0-9]*\`; do { echo $pid ; readlink /proc/$pid/cwd || echo ; readlink /proc/$pid/ns/mnt || echo ; cat /proc/$pid/stat | tr "
|
|
" " " ; echo ; cat /proc/$pid/environ | tr "
|
|
" " " ; echo ; cat < /proc/$pid/cmdline | tr "
|
|
" " " ; echo ; } ; echo --- ; done ; readlink /proc/self/ns/mnt 2>/dev/null`,{stdout:n}=await t.exec(e,{logOutput:!1}),r=6,i=n.split(`
|
|
---
|
|
`),o=i.pop().trim();return{processes:i.map(a=>a.split(`
|
|
`)).filter(a=>a.length>=r).map(([a,u,c,l,f,p])=>{let d=/.*\) [^ ]* ([^ ]*) ([^ ]*)/.exec(l)||[];return{pid:a,ppid:d[1],pgrp:d[2],cwd:u,mntNS:c,cmd:p.replace(/\0/g," "),env:f.split("\0").reduce((h,m)=>{let g=m.indexOf("=");return g!==-1&&(h[m.substr(0,g)]=m.substr(g+1)),h},{})}}),mntNS:o}}function Tq(t){let e={};return t.forEach(n=>e[n.pid]={process:n,childProcesses:[]}),t.filter(n=>n.ppid).forEach(n=>{var r;return(r=e[n.ppid])==null?void 0:r.childProcesses.push(e[n.pid])}),e}function Jw(t,e=" ",n=" "){return`${n}${t.process.pid}: ${t.process.cmd}
|
|
${t.childProcesses.map(r=>Jw(r,e,n+e))}`}var Ir=Y(require("path")),Pq=Y(require("fs"));async function ls(t,e=process.cwd(),n=process.env){if(process.platform!=="win32")return t;if(Ir.isAbsolute(t))return await Qw(t)||t;if(/[/\\]/.test(t)){let s=Ir.join(e,t);return await Qw(s)||s}let r,i;if(n){for(let s of Object.keys(n))if(s.toLowerCase()==="path"){let a=n[s];typeof a=="string"&&(r=a,i=a.split(Ir.delimiter).filter(Boolean),i.push(Ir.join(n.ProgramW6432||"C:\\Program Files","Docker\\Docker\\resources\\bin")));break}}if(i===void 0||i.length===0){let s=new Error(`No PATH to look up executable '${t}'.`);throw s.code="ENOENT",s}for(let s of i){let a;Ir.isAbsolute(s)?a=Ir.join(s,t):a=Ir.join(e,s,t);let u=await Qw(a);if(u)return u}let o=new Error(`Exectuable '${t}' not found on PATH '${r}'.`);throw o.code="ENOENT",o}var Iq=process.env.PATHEXT,Aq=Iq?Iq.toLowerCase().split(";"):[".com",".exe",".bat",".cmd"];async function Qw(t){if(Aq.indexOf(Ir.extname(t))!==-1)return await Rq(t)?t:void 0;for(let e of Aq){let n=t+e;if(await Rq(n))return n}}function Rq(t){return new Promise(e=>Pq.stat(t,(n,r)=>e(!n&&r.isFile())))}var Lq="dev-containers-",Oq="credentials not found in native keychain";async function kq(t,e,n,r,i,o){let s=await Nq(n?t:e,r,i,o).catch(a=>{if(n)throw a});return!n&&(s==null?void 0:s.code)!==0&&(s=await Nq(t,r,i,o),s.code===0&&(n=!0)),{result:s,preferLocalCLIHost:n}}async function Nq(t,e,n,r){let i,o=e[1];try{let s=o==="store"?JSON.parse(n).ServerURL:n.trim(),a=await Pre(t,s,r);if(!a)return{stdout:o==="get"?Oq:"Docker credential helper not found.",stderr:"",code:1};if("identitytoken"in a)return o!=="get"?{stdout:`Docker credential command not supported without credential helper: ${o}.`,stderr:"",code:1}:{stdout:JSON.stringify({ServerURL:s,Username:"<token>",Secret:a.identitytoken}),stderr:"",code:0};if("auth"in a){if(o!=="get")return{stdout:`Docker credential command not supported without credential helper: ${o}.`,stderr:"",code:1};let[l,f]=Buffer.from(a.auth,"base64").toString().split(":");return{stdout:JSON.stringify({ServerURL:s,Username:l,Secret:f}),stderr:"",code:0}}i=`docker-credential-${a.helper}`;let{stdout:u,stderr:c}=await Re({exec:t.exec,cmd:i,args:e.slice(1),stdin:Buffer.from(n),output:Ne});return{stdout:u.toString(),stderr:c.toString(),code:0}}catch(s){if(i&&((s==null?void 0:s.code)==="ENOENT"||(s==null?void 0:s.code)==="EPIPE"))return{stdout:o==="get"?Oq:`Docker credential helper '${i}' not found: ${(s==null?void 0:s.message)||String(s)}.`,stderr:"",code:1};if(!(s&&s.stdout&&s.stderr))throw s;let{stdout:a,stderr:u,code:c}=s;return{stdout:a.toString(),stderr:u.toString(),code:c||0}}}async function Pre(t,e,n){var i,o,s,a,u;n.write(`Looking up Docker credential helper for '${e}'.`);try{let c=dr((await t.readFile(t.path.join(await t.homedir(),".docker","config.json"))).toString()),l=qn.parse(e).authority||e,f=(i=c==null?void 0:c.credHelpers)==null?void 0:i[l];if(f)return{helper:f};let p=(s=(o=c==null?void 0:c.auths)==null?void 0:o[e])==null?void 0:s.identitytoken;if(p)return{identitytoken:p};let d=(u=(a=c==null?void 0:c.auths)==null?void 0:a[e])==null?void 0:u.auth;if(d)return{auth:d};if(c!=null&&c.credsStore)return{helper:c.credsStore}}catch(c){(c==null?void 0:c.code)!=="ENOENT"&&n.write(`Error reading Docker config: ${(c==null?void 0:c.message)||String(c)}.`)}let r=await Fq(t);return r?{helper:r}:void 0}async function Zw(t,e){let n=t.path.join(await t.homedir(),".docker","config.json");try{let r=await t.readFile(n),i=dr(r.toString());return!!(i!=null&&i.credsStore)||Object.keys((i==null?void 0:i.credHelpers)||{}).some(o=>{var s;return(s=i==null?void 0:i.credHelpers)==null?void 0:s[o]})||Object.keys((i==null?void 0:i.auths)||{}).some(o=>{var s,a;return(a=(s=i==null?void 0:i.auths)==null?void 0:s[o])==null?void 0:a.auth})||Dq(t)}catch(r){return(r==null?void 0:r.code)!=="ENOENT"?(e.write(`Error reading Docker config (${n}): ${(r==null?void 0:r.stack)||(r==null?void 0:r.message)||String(r)}.`),!1):Dq(t)}}async function Dq(t){let e=await Fq(t);return!!e&&await Ore(t,`docker-credential-${e}`)}async function Fq(t){if(t.platform==="darwin")return"osxkeychain";if(t.platform==="win32")return"wincred";if(t.platform==="linux")try{return await Re({exec:t.exec,cmd:"/bin/sh",args:["-c","command -v docker-credential-pass >/dev/null 2>&1"],output:Ne}),"pass"}catch{return"secretservice"}}async function Ore(t,e){try{return t.platform==="win32"?!!await ls(e,t.cwd,t.env):(await Re({exec:t.exec,cmd:"/bin/sh",args:["-c",`command -v '${e}' >/dev/null 2>&1`],output:Ne}),!0)}catch{return!1}}function eS(t){return`remote.containers.${t}`}function tS(t){return`dev.containers.${t}`}var rS=Y(require("path"));var Nre=Y(require("http")),Dre=Y(require("https"));function nS(t,e={}){return new Promise((n,r)=>{let i=t.startsWith("https:")?Dre:Nre,o;if(Object.keys(e).length>0){let a=new URL(t);o={headers:e,host:a.host,path:a.pathname}}i.get(o??t,a=>{var u;if(a.statusCode<200||a.statusCode>299){if(a.statusCode===302){let c=(u=a.headers)==null?void 0:u.location;c&&n(nS(c,e))}r(new Error(`HTTP ${a.statusCode}: ${a.statusMessage}`))}else{a.on("error",r);let c=[];a.on("data",l=>c.push(l)),a.on("end",()=>n(Buffer.concat(c)))}}).on("error",r)})}async function bi(t){let e=await Tt(rS.join(t,"package.json"),"utf8");return JSON.parse(e)}async function iS(t){let e=await Tt(rS.join(t,"product.json"),"utf8"),n=JSON.parse(e);return n.commit||(n.commit=await Ou(n.quality)),n.serverDataFolderName||(n.serverDataFolderName=".vscode-server-oss"),n}async function Ou(t="insider"){let e=`https://update.code.visualstudio.com/api/update/server-linux-x64/${t}/latest`,n=await nS(e);return JSON.parse(n.toString()).version}var _ie=DU(),$U=gS(),yS=qU(),Eie=jU();async function hp(t,e,n,r,i){let{passwdUser:o,homeFolder:s,nodeExecutable:a,mrpcExec:u,mrpcPtyExec:c,setBaseEnv:l,connect:f,reconnect:p,terminate:d}=await bie(t,{remoteExec:e,platform:i},"Host",n,!0,r,void 0);return{passwdUser:o,homeFolder:s,nodeExecutable:a,exec:u,ptyExec:c,setBaseEnv:l,connect:f,reconnect:p,terminate:d}}async function bie(t,e,n,r,i,o,s,a,u,c,l,f){let{cliHost:p,product:d,output:h}=t,{remoteExec:m,platform:g,nodeExecutable:v,launchRootShellServer:y}=e,_=a&&Tt(po.join(t.extensionPath,"dist","common","remoteContainersCLI.js"),{encoding:"utf8"}),E=Tt(po.join(t.extensionPath,"dist","common","remoteContainersServer.js"),{encoding:"utf8"}),C=await wi(m,h,void 0,g,n),L=i?await Pg(C,await zU(C)):void 0,R=(await C.exec({posix:"echo ~",win32:"echo $env:userprofile"})).stdout.trim().split(`
|
|
`)[0],D=!0;if(!v||!s){let b=C.path.join(R,".vscode-remote-containers");v||(v=await Aie(t,C,b,R,d,o)),s||(s=C.path.join(b,"dist",`vscode-remote-containers-server-${t.package.version}.js`),await Pu(C,s)?D=!1:await C.exec(`mkdir -p '${C.path.dirname(s)}'`))}if(a){let b=`EOF-${a}`;await C.exec(`cat <<'${b}' >${a}
|
|
${await _}
|
|
${b}
|
|
`)}if(u&&y&&((p==null?void 0:p.type)!=="local"&&f&&await Zw(f,h)||p&&await Zw(p,h))){let b=(await C.exec(`cat ~/.docker/config.json || echo "{
|
|
}"`)).stdout,T=dr(b);if(!(T!=null&&T.credsStore)||T.credsStore.startsWith(Lq)){let A=await y(),q=`EOF-${u}`;await A.exec(`mkdir -p ${po.posix.dirname(u)} && cat <<'${q}' >${u}
|
|
#!/bin/sh
|
|
${v} ${a} docker-credential-helper $@
|
|
${q}
|
|
`),await A.exec(`chmod +x ${u}`);let $=mP(b,["credsStore"],po.posix.basename(u).substring(18),{formattingOptions:{}}),j=rh(b,$);await C.exec(`mkdir -p ~/.docker && cat <<'${q}' >~/.docker/config.json
|
|
${j}
|
|
${q}
|
|
`)}}if(D){let b=`EOF-${s}`,T=`${s}_${Date.now()}`;await C.exec(`cat <<'${b}' >${T}
|
|
${await E}
|
|
${b}
|
|
mv ${T} ${s}`)}let O=()=>wie(t,n,C,v,s,c,l,f),N=await O(),S;return{ready:N.ready,passwdUser:L,nodeExecutable:v,homeFolder:R,mrpcExec:Cie(()=>N.mrpc,n,r||R),mrpcPtyExec:Tie(()=>N.mrpc,n,r||R),mrpcExecToEnd:Iie(()=>N.mrpc,n,r||R),setBaseEnv:b=>new Promise((T,A)=>{S=b,N.mrpc.setBaseEnv(b,q=>q?A(q):T())}),connect:N.mrpc.connect,reconnect:async()=>{let b=`${n}: Reconnecting exec server`,T=h.start(b);await N.process.terminate().catch(()=>{}),C=await wi(m,h,void 0,void 0,n),N=await O(),S&&await new Promise((A,q)=>{N.mrpc.setBaseEnv(S,$=>$?q($):A())}),h.stop(b,T)},terminate:()=>N.process.terminate()}}async function wie(t,e,n,r,i,o,s,a){let{cliHost:u,output:c}=t,l=Object.keys(o||{}),f={...l.reduce((R,D)=>(R[D]="duplex",R),{}),rpc:"async",connected:"async",ready:"async"},p={exec:"async",stdin:"sink",stdout:"source",stderr:"source",exit:"async",terminate:"async",dispose:"async",ptyExec:"async",ptyIn:"sink",ptyOut:"source",ptyResize:"async",ptyExit:"async",ptyTerminate:"async",ptyDispose:"async",execToEnd:"async",setBaseEnv:"async",connect:"duplex"},d=n.process,h=`set -e ; echo -n ${or} >&2 ; ${s?`rm -f '${s}' ; `:""}REMOTE_CONTAINERS_SOCKETS='${JSON.stringify(l)}' REMOTE_CONTAINERS_IPC='${s||""}' '${r}' '${i}'
|
|
`;d.stdin.write(h);let m,g=new Promise(R=>m=R),v=new BU.StringDecoder;d.stderr.on("data",R=>{let D=v.write(R).replace(/^.*DeprecationWarning: Buffer\(\) is deprecated.*$\r?\n?/mg,"").trim();if(m){let O=D.indexOf(or);O!==-1&&(m(),m=void 0,D=D.substr(0,O)+D.substr(O+1))}D&&c.write(qt(`${e} server: ${D}`))}),d.exit.then(({code:R,signal:D})=>{c.write(`${e} server terminated (code: ${R}, signal: ${D}).`)},R=>{c.write(`${e} server did not launch or terminated: ${(R==null?void 0:R.stack)||(R==null?void 0:R.message)||String(R)}`)});let y=(u==null?void 0:u.type)==="local",_={git:y,docker:y},E,C=new Promise(R=>E=R),L=_ie(p,f)({...l.reduce((R,D)=>{let O=o[D];return R[D]=Sie(t,O),R},{}),rpc:async(R,D)=>{try{let{args:O,stdin:N}=JSON.parse(R);if(O[0]==="git-credential-helper"){let S=await wq(a,u,_.git,O,N);_.git=S.preferLocalCLIHost,D(void 0,JSON.stringify(S.result))}else if(O[0]==="docker-credential-helper"){let S=await kq(a,u,_.docker,O,N,c);_.docker=S.preferLocalCLIHost,D(void 0,JSON.stringify(S.result))}}catch(O){console.error(O),D(O)}},connected:R=>{R()},ready:R=>{E(),R()}});return(0,Ig.default)($U.source(d.stdout),L.createStream(),$U.sink(d.stdin)),await Promise.race([g,d.exit.then(({code:R,signal:D})=>{throw new Error(`${e} server terminated (code: ${R}, signal: ${D}).`)})]),{ready:C,mrpc:L,process:d}}function Sie(t,e){let{sendTelemetryEvent:n,output:r}=t,i=!1;function o(s){if(!i&&s instanceof Error&&s.code==="ENOENT"&&(i=!0,r.event({type:"notification",message:GU.t("Could not connect to {0} on {1} host ({2}). Make sure the service is running.",e.name,e.cliHost.type,e.unparsed)}),n)){let a={serviceName:e.name,hostType:e.cliHost.type,hostPlatform:e.cliHost.platform},u=e.cliHost.authority;if(u){let c=u.indexOf("+");c!==-1&&(a.hostAuthority=u.substring(0,c))}n("serviceConnectionFailure",a)}}return()=>{let s=e.cliHost.connect(e.connectTo);return{sink:a=>{s.sink((u,c)=>{o(u),a(u,c)})},source:(a,u)=>{s.source(a,(c,l)=>{o(c),u(c,l)})}}}}function Cie(t,e,n){return async r=>{let{cmd:i,args:o,cwd:s,env:a,output:u}=r,c=`Run in ${e}: ${i} ${(o||[]).join(" ").replace(/\n.*/g,"")}`,l=u.start(c),f=t(),p=await new Promise((d,h)=>{f.exec({cmd:i,args:o,cwd:s||n,env:a},(m,g)=>{m?h(m):d(g)})});return{stdin:yS.sink(f.stdin(p,d=>{d&&d.message!=="unexpected end of parent stream"&&console.error(d)})),stdout:yS.source(f.stdout(p)),stderr:yS.source(f.stderr(p)),exit:new Promise((d,h)=>{f.exit(p,(m,g)=>{var v;u.stop(c,l),m?((v=m.message)!=null&&v.endsWith("ENOENT")&&!m.code&&(m.code="ENOENT"),h(m)):d(g)})}),terminate:async()=>new Promise((d,h)=>{f.terminate(p,m=>{m?h(m):d()})})}}}function Tie(t,e,n){return async r=>{let{cmd:i,args:o,cwd:s,env:a,output:u}=r,c=`Run in ${e}: ${i} ${(o||[]).join(" ").replace(/\n.*/g,"")}`,l=u.start(c),f=t(),p=await new Promise((g,v)=>{var y,_;f.ptyExec({cmd:i,args:o,cwd:s||n,env:a,rows:(y=u.dimensions)==null?void 0:y.rows,cols:(_=u.dimensions)==null?void 0:_.columns},(E,C)=>{E?v(E):g(C)})}),d=[u.onDidChangeDimensions&&u.onDidChangeDimensions(g=>f.ptyResize(p,g.columns,g.rows))],h=Eie();(0,Ig.default)(h,f.ptyIn(p,g=>{g&&g.message!=="unexpected end of parent stream"&&console.error(g)}));let m=new Vi;return(0,Ig.default)(f.ptyOut(p),g=>{g(null,function v(y,_){if(y!==!0){if(y)throw y;m.fire(_),g(null,v)}})}),{write:g=>h.push(g),onData:m.event,resize:(g,v)=>f.ptyResize(p,g,v),exit:new Promise((g,v)=>{f.ptyExit(p,(y,_)=>{d.forEach(E=>E==null?void 0:E.dispose()),u.stop(c,l),y?v(y):g(_)})}),terminate:async()=>new Promise((g,v)=>{f.ptyTerminate(p,y=>{y?v(y):g()})})}}}function Iie(t,e,n){return async r=>{let{cmd:i,args:o,cwd:s,env:a,output:u}=r,c=`Run in ${e}: ${i} ${(o||[]).join(" ").replace(/\n.*/g,"")}`,l=u.start(c),f=t();return new Promise((p,d)=>{f.execToEnd({cmd:i,args:o,cwd:s||n,env:a},(h,m)=>{if(u.stop(c,l),h||!m)d({stdin:new fs.Writable,stdout:fs.Readable.from([]),stderr:fs.Readable.from([]),exit:Promise.reject(h),terminate:async()=>{}});else{let g=fs.Readable.from([Buffer.from(m.stdout.data)]),v=new Promise(E=>g.on("end",E)),y=fs.Readable.from([Buffer.from(m.stderr.data)]),_=new Promise(E=>y.on("end",E));p({stdin:new fs.Writable,stdout:g,stderr:y,exit:Promise.all([v,_]).then(()=>({code:m.code,signal:m.signal})),terminate:async()=>{}})}})})}}async function Aie(t,e,n,r,i,o){let s=i.commit||await Ou(i.quality),a=i.commit?i.quality||"insider":"stable",u=po.posix,c=`${a.substring(0,1).toUpperCase()}${a.substring(1)}${a==="insider"?"s":""}-${s}`,l=L=>Pu(e,L),f=u.join(xS(u,r,i),"cli","servers",c,"server");if(await Tg(f,l))return Du(f);let p=u.join(VU(u,r,i),"cli","servers",c,"server");if(await Tg(p,l))return Du(p);let d=u.join(xS(u,r,i),"bin",s);if(await Tg(d,l))return Du(d);let h=u.join(n,"bin",s);if(await Tg(h,l))return Du(h);let{localCacheFolder:m,output:g,alternateDownload:v}=t,y;if((await e.exec("uname -s")).stdout.trim().split(`
|
|
`)[0]==="Darwin")y=(await e.exec("uname -m")).stdout.trim()==="arm64"?Ag.arm64:Ag.x64;else{let L=await KU(e);y=YU(L,!1)}let E={localCacheFolder:m,build:y,commit:s,quality:a,web:!1,output:g,alternateDownload:v,legacy:!1},C=ES(E);if(await Oa(C)||await WU(E),y.id==="darwin")await _S({output:g},e,C,h,o);else{let L=[];await Rg.t({file:C,filter:D=>/^[^/]*\/(LICENSE$|node$|node_modules\/node-pty\/)/.test(D),onentry:D=>{new Rg.WriteEntry.Tar(D).on("data",N=>L.push(N))}});let R=Buffer.concat(L);await _S({output:g},e,R,h,o,!1)}return Du(h)}async function Tg(t,e){let n=Du(t),r=po.posix.join(t,"node_modules","node-pty","package.json");return await e(n)&&await e(r)}function Du(t){return po.posix.join(t,"node")}var gp=Y(require("net"));var bS=gS(),wS=t=>{if("port"in t)return bS.duplex(gp.connect(t.port,t.host));let e=t.socketPath;if(process.platform!=="win32"||e.startsWith("\\\\.\\pipe\\"))return bS.duplex(gp.connect(e));let n=new gp.Socket;return Oie(n,e)};function Rie(t){let e=[];return t.split("-").map(n=>{let r=n.match(/.{2}/g);r!==null&&r.reverse().map(i=>{e.push(parseInt(i,16))})}),Buffer.from(e)}function Pie(t,e,n){return e||n===void 0?{headerSize:t,err:e}:t===0?{headerSize:t,data:n}:n.length>t?(n=n.slice(t,n.length),t=0,{headerSize:t,data:n}):(t=t-n.length,{headerSize:t})}function Oie(t,e){let n=0,r=[],i=[],o,s=l=>{l instanceof Error&&console.error(l),t.destroy();for(let f of r)f.cb(l,void 0);r=[];for(let f of i)f(l,(p,d)=>{});i=[]};function a(l,f){o.source(l,function(p,d){let h=Pie(n,p,d);n=h.headerSize,h.err||h.data?f(h.err||null,h.data):a(l,f)})}return(async()=>{let l=await Tt(e),p=l.toString().match(/!<socket >(\d+)( s)? ((([A-Fa-f0-9]{2}){4}-?){4})/),d,h;if(p!==null){let m=p[1],g=p[3];d=parseInt(m,10);let v=Rie(g),y=Buffer.alloc(12);y.writeUInt32LE(process.pid,0),h=Buffer.concat([v,y]),n=16+3*4}else{let m=l.indexOf(10);d=parseInt(l.slice(0,m).toString(),10),h=l.slice(m+1),n=0}t.on("error",m=>{s(m)}),t.connect(d,"127.0.0.1",()=>{t.write(h,m=>{if(!m){o=bS.duplex(t);for(let g of r)a(g.abort,g.cb);r=[];for(let g of i)o.sink(g);i=[]}})})})().catch(l=>{s(l)}),{source:function(l,f){o!==void 0?a(l,f):r.push({abort:l,cb:f})},sink:function(l){o!==void 0?o.sink(l):i.push(l)}}}var Og=!1;function Ng(t,e,n){return Og?function(i){return Nie(t(i),`${e} ${JSON.stringify(i)}`,n)}:t}function Nie(t,e,n){return Og?{source:XU(t.source,`${e} Source`,n),sink:Die(t.sink,`${e} Sink`,n)}:t}function XU(t,e,n){return Og?function(i,o){n.write(`${e} end in (${typeof i}${i&&typeof i=="object"?`: ${Object.keys(i)}`:""}): ${i&&typeof i=="object"&&i.stack||i}`),t(i,function(a,u){n.write(`${e} end out (${typeof a}${a&&typeof a=="object"?`: ${Object.keys(a)}`:""}): ${a&&typeof a=="object"&&a.stack||a}`),n.write(`${e} data: ${u==null?void 0:u.toString("hex")}`),o(a,u)})}:t}function Die(t,e,n){return Og?function(i){t(XU(i,e,n))}:t}var SS=Y(gf()),QU=/^\\\\wsl(\.localhost|\$)?\\/;function Lu(t){return QU.test(t.toLowerCase())}function Dg(t){let e=t.toLowerCase(),n=QU.exec(e);if(!n)return"";let r=e.indexOf("\\",n[0].length);return t.substring(n[0].length,r)}async function ZU(t){let{stdout:e}=await Re({exec:ho(void 0),cmd:"wsl",args:["-l","-v"],output:t}),n=e.toString(e[1]===0?"utf16le":"utf8").trim();return(/^\*\s*(\S+)/m.exec(n)||[])[1]}async function La(t,e,n){let{stdout:r}=await Re({exec:ho(void 0),cmd:"wsl",args:["-d",t,"-e","wslpath","-u",e],output:n});return r.toString().trim()}async function Lie(t,e){let{stdout:n}=await Re({exec:ho(void 0),cmd:"wsl",args:["-d",t,"-e","/bin/sh","-c","echo ~"],output:e});return n.toString().trim()}async function CS(t,e){if(Lu(t)){let n=Dg(t);return La(n,t,e)}return t}async function TS(t,e,n){let{stdout:r}=await Re({exec:ho(void 0),cmd:"wsl",args:["-d",t,"-e","wslpath","-w",e],output:n});return r.toString().trim()}async function ej(t,e,n,r,i,o,s,a){var h;let{distro:u,cwd:c}=await kie(t,e,s);JU.ok(!u.startsWith("-"),SS.t("Distro must not start with a dash: {0}",u));let l=Lg("wsl",["-d",u,"-e"],c),f=await hp({extensionPath:n,localCacheFolder:r,package:await bi(n),product:i,loadNativeModule:o,output:s,alternateDownload:a},l,c,!1),p=await kg({defaultUserEnvProbe:"loginInteractiveShell",allowSystemConfigChange:!1,output:s},{shell:((h=f.passwdUser)==null?void 0:h.shell)||"/bin/sh",remoteExec:f.exec});delete p.WSL_INTEROP,await f.setBaseEnv(p);let d=ka("wsl",c,p,f.exec,f.ptyExec,Ng(f.connect,"WSL",s),f.nodeExecutable,s);return d.toCommonURI=async m=>{try{return qn.file((await Re({exec:f.exec,cmd:"wslpath",args:["-w",m],output:s})).stdout.toString().trim())}catch{return}},d.reconnect=()=>f.reconnect(),d.terminate=()=>f.terminate(),d}async function kie(t,{defaultDistro:e},n){let r,i;return typeof t=="object"?(r=t.wslDistro,i=t.wslPath):t&&Lu(t)?(r=Dg(t),i=await La(r,t,n)):(r=e||await ZU(n)||(()=>{throw new on({description:SS.t("No default WSL distro found.")})})(),i=t?await La(r,t,n):await Lie(r,n)),{distro:r,cwd:i}}function vp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var IS=Y(require("path")),qg=Y(require("os")),Ug=Y(require("crypto"));var tj=Y(require("os")),Fg=Y(require("assert")),Mg=Y(gf());async function nj(t,e,n,r,i,o,s,a,u,c){var v;let l=t.substr(6),f=l.indexOf(":"),p=[(c==null?void 0:c.settings.executablePath)||"ssh"];if(c!=null&&c.settings.executableArgs&&p.push(...c.settings.executableArgs),c!=null&&c.settings.configFilePath&&p.push("-F",Fie(c==null?void 0:c.settings.configFilePath)),f!==-1){let y=l.substr(f+1);Fg.ok(!y.startsWith("-"),Mg.t("Port number must not start with a dash: {0}",y));let _=l.substr(0,f);Fg.ok(!_.startsWith("-"),Mg.t("Hostname must not start with a dash: {0}",_)),p.push("-p",y,_)}else Fg.ok(!l.startsWith("-"),Mg.t("Hostname must not start with a dash: {0}",l)),p.push(l);let d=Lg(p[0],p.slice(1),void 0,await(c==null?void 0:c.sshAskpassEnv)||{}),h=await hp({extensionPath:r,localCacheFolder:i,package:await bi(r),product:o,loadNativeModule:s,output:a,alternateDownload:u},d,e,!1),m=await kg({defaultUserEnvProbe:"loginInteractiveShell",allowSystemConfigChange:!1,output:a},{shell:((v=h.passwdUser)==null?void 0:v.shell)||"/bin/sh",remoteExec:h.exec});await h.setBaseEnv(m);let g=ka("remote",e||h.homeFolder,m,h.exec,h.ptyExec,h.connect,h.nodeExecutable,a);return g.toCommonURI=()=>Promise.resolve(void 0),g.reconnect=()=>h.reconnect(),g.terminate=()=>h.terminate(),g}function Fie(t){return t.replace(/^~($|\/|\\)/,`${tj.homedir()}$1`)}function rj(t){let e=t.hostName;if(t.user||t.hostName.toLowerCase()!==t.hostName||t.port||t.hostName.match(/[\/\\\+]/)){let n=JSON.stringify(t);e=Buffer.from(n,"utf8").toString("hex")}return`ssh-remote+${e}`}function Mie(t){let e=t.match(/^(?:(.*)@)?(.+?)(?::(\d+))?$/);if(e){let[,n,r,i]=e;return{hostName:r,user:n,port:i?parseInt(i,10):void 0}}return{hostName:t}}function ij(t){return!!(t!=null&&t.startsWith("ssh-remote+"))}function oj(t){let e=/^ssh-remote\+(.*)$/.exec(t);if(!e)return;let n=e[1];try{let r=JSON.parse(Buffer.from(n,"hex").toString("utf8"));if(r&&r.hostName)return r}catch{}return Mie(n)}async function sj(t,e,n,r,i,o,s,a,u,c){return t!=null&&t.startsWith("ssh://")&&!(c!=null&&c.localDocker)?nj(t,e,r,i,o,s,n,a,u,c):typeof e=="object"||r.executeInWSL==="forWSLPath"&&e&&Lu(e)||r.executeInWSL==="always"?ej(e,r,i,o,s,n,a,u):Ei(e||process.cwd(),n,a)}async function Ei(t,e,n=Ne){let r=ho(t),i=await cj(t,e);return qie(t,r,i,n?Ng(wS,"Local",n):wS,e,n)}function ka(t,e,n,r,i,o,s,a){let u,c,l;return{type:t,platform:"linux",exec:r,ptyExec:i,cwd:e,env:n,path:IS.posix,async homedir(){if(typeof c>"u"){let p=(await Re({exec:r,cmd:"id",args:["-u"],output:Ne})).stdout.toString().trim(),d=await wi(r,Ne,void 0,"linux","Host"),h=await Pg(d,p);c=this.env.HOME||(h==null?void 0:h.home)||"/"}return c},async tmpdir(){return this.env.TMPDIR||"/tmp"},isFile:async f=>{try{return await Re({exec:r,cmd:"test",args:["-f",f],output:Ne}),!0}catch(p){if((p==null?void 0:p.code)!==1)throw p;return!1}},isFolder:async f=>{try{return await Re({exec:r,cmd:"test",args:["-d",f],output:Ne}),!0}catch(p){if((p==null?void 0:p.code)!==1)throw p;return!1}},isSocket:async f=>{try{return await Re({exec:r,cmd:"test",args:["-S",f],output:Ne}),!0}catch(p){if((p==null?void 0:p.code)!==1)throw p;return!1}},readFile:async f=>{try{return(await Re({exec:r,cmd:"cat",args:[f],output:Ne})).stdout}catch(p){let d=new Error(`Could not read file: ${f}`);throw d.originalError=p,d.code="ENOENT",d}},writeFile:async(f,p)=>{await Re({exec:r,cmd:"/bin/sh",args:["-c",`cat >'${f}'`],stdin:p,output:Ne})},rename:async(f,p)=>{await Re({exec:r,cmd:"mv",args:[f,p],output:Ne})},rm:async(f,{recursive:p,force:d}={})=>{await Re({exec:r,cmd:"rm",args:[...p?["-r"]:[],...d?["-f"]:[],f],output:Ne})},mkdirp:async f=>{await Re({exec:r,cmd:"mkdir",args:["-p",f],output:Ne})},readDir:async f=>(await Re({exec:r,cmd:"ls",args:["-a",f],output:Ne})).stdout.toString().trim().split(`
|
|
`).filter(p=>p!=="."&&p!==".."),readDirWithTypes:async f=>{let p={f:1,"*":1,"/":2,"@":64};return(await Re({exec:r,cmd:"ls",args:["-aF",f],output:Ne})).stdout.toString().trim().split(`
|
|
`).map(d=>"/*@=%|>".indexOf(d[d.length-1])!==-1?[d.substr(0,d.length-1),d[d.length-1]]:[d,"f"]).filter(([d])=>d!=="."&&d!=="..").map(([d,h])=>[d,p[h]||0])},getUsername:async()=>(u===void 0&&(u=(await Re({exec:r,cmd:"id",args:["-u","-n"],output:Ne})).stdout.toString().trim()),u),toCommonURI:()=>Promise.resolve(void 0),connect:o,locateCertificatesFile:function(){return l||(l=aj(this,void 0,a))},nodeExecutable:s}}function qie(t,e,n,r,i,o){let s;return{type:"local",platform:process.platform,exec:e,ptyExec:n,cwd:t,env:process.env,path:IS,homedir:async()=>qg.homedir(),tmpdir:async()=>qg.tmpdir(),isFile:Oa,isFolder:dM,isSocket:hM,readFile:Tt,writeFile:jw,rename:dg,rm:Hw,mkdirp:async a=>{await Iu(a)},readDir:$w,getUsername:jg,toCommonURI:async a=>qn.file(a),connect:r,locateCertificatesFile:function(){return s||(s=aj(this,i,o))}}}var Uie=["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt","/etc/ssl/ca-bundle.pem"];async function aj(t,e,n){if(t.env.NODE_EXTRA_CA_CERTS&&await t.isFile(t.env.NODE_EXTRA_CA_CERTS))return t.env.NODE_EXTRA_CA_CERTS;if(t.platform==="linux"){for(let u of Uie)if(await t.isFile(u))return u;return}if(t.type!=="local")return;let r=await(e==null?void 0:e("@vscode/proxy-agent"));if(!(r!=null&&r.loadSystemCertificates))return;let i=await r.loadSystemCertificates({log:{trace(u,...c){n.write(u,1)},debug(u,...c){n.write(u,2)},info(u,...c){n.write(u,3)},warn(u,...c){n.write(u,4)},error(u,...c){n.write(typeof u=="string"?u:String(u),5)}}});if(!i.length)return;let o=Buffer.from(i.join(t.platform==="win32"?`\r
|
|
`:`
|
|
`)),s=Ug.createHash("sha256").update(o).digest("hex"),a=t.path.join(await AS(t),`certificates-${s}.pem`);if(!await t.isFile(a)){await t.mkdirp(t.path.dirname(a));let u=`${a}-${Ug.randomUUID()}`;await t.writeFile(u,o),await t.rename(u,a)}return a}var BRe=$g.join(__dirname,"..","..","node_modules",".bin","ts-node"),mp=$g.basename(process.argv[0])==="ts-node"||process.argv.indexOf("ts-node/register")!==-1;async function Re(t){let{exec:e,cmd:n,args:r,cwd:i,env:o,stdin:s,output:a,print:u}=t,c=await e({cmd:n,args:r,cwd:i,env:o,output:a});return new Promise((l,f)=>{let p=[],d=[],h=u==="continuous"?new PS.StringDecoder:void 0;c.stdout.on("data",v=>{p.push(v),u==="continuous"&&a.write(h.write(v))}),c.stdout.on("error",v=>{if((v==null?void 0:v.code)!=="ENOTCONN")throw v});let m=u==="continuous"?new PS.StringDecoder:void 0;c.stderr.on("data",v=>{d.push(v),u==="continuous"&&a.write(qt(m.write(v)))}),c.stderr.on("error",v=>{if((v==null?void 0:v.code)!=="ENOTCONN")throw v});let g=[];c.exit.then(({code:v})=>{try{g.forEach(E=>E.dispose());let y=Buffer.concat(p),_=Buffer.concat(d);(u===!0||v&&u==="onerror")&&(a.write(y.toString().replace(/\r?\n/g,`\r
|
|
`)),a.write(qt(_.toString()))),u&&v&&a.write(`Exit code ${v}`),v?f({message:`Command failed: ${n} ${(r||[]).join(" ")}`,stdout:y,stderr:_,code:v}):l({stdout:y,stderr:_})}catch(y){f(y)}},v=>{u&&(v!=null&&v.message)&&a.write(qt(v==null?void 0:v.message)),f(v)}),s instanceof Buffer?(c.stdin.write(s,v=>{v&&f(v)}),c.stdin.end()):s instanceof uj.Readable?s.pipe(c.stdin):typeof s=="function"&&g.push(s(v=>c.stdin.write(v)))})}function ho(t){return async function(e){let{cmd:n,args:r,output:i}=e,o=`Run: ${n} ${(r||[]).join(" ").replace(/\n.*/g,"")}`,s=i.start(o),a=e.cwd||t,u=e.env?{...process.env,...e.env}:process.env,c=await ls(n,a,u),l=Hg.spawn(c,r,{cwd:a,env:u,windowsHide:!0});return{stdin:l.stdin,stdout:l.stdout,stderr:l.stderr,exit:new Promise((f,p)=>{l.once("error",d=>{i.stop(o,s),p(d)}),l.once("close",(d,h)=>{i.stop(o,s),f({code:d,signal:h})})}),async terminate(){l.kill("SIGKILL")}}}}async function cj(t,e){let n=await e("node-pty");if(!n)throw new Error("Missing node-pty");return async function(r){var m,g;let{cmd:i,args:o,output:s}=r,a=`Run: ${i} ${(o||[]).join(" ").replace(/\n.*/g,"")}`,u=s.start(a),c=!1,l=r.cwd||t,f=r.env?{...process.env,...r.env}:process.env,p=await ls(i,l,f),d=n.spawn(p,o||[],{cwd:l,env:f,cols:(m=s.dimensions)==null?void 0:m.columns,rows:(g=s.dimensions)==null?void 0:g.rows,useConpty:c}),h=[s.onDidChangeDimensions&&s.onDidChangeDimensions(v=>d.resize(v.columns,v.rows))];return{onData:d.onData.bind(d),write:d.write.bind(d),resize:d.resize.bind(d),exit:new Promise(v=>{d.onExit(({exitCode:y,signal:_})=>{if(h.forEach(E=>E==null?void 0:E.dispose()),s.stop(a,u),v({code:y,signal:_}),process.platform==="win32")try{d.kill()}catch{}})}),async terminate(){d.kill("SIGKILL")}}}}function Lg(t,e,n,r){return async function(i){let{env:o,cmd:s,args:a,output:u}=i,c=i.cwd||n,l=c?`cd '${c}' && `:"",f=Object.keys(o||{}).map(E=>o[E]===void 0?"":`${E}='${o[E]}' `).join(""),p=(a||[]).map(E=>` '${E.replace(/'/g,`'"'"'`)}'`).join(""),d=`${l}${f}${s}${p}`,h=d!==s?["/bin/sh","-c",d]:[d],m=[...e,...h],g=`Run: ${t} ${m.join(" ").replace(/\n.*/g,"")}`,v=u.start(g),y=await ls(t,process.cwd(),process.env),_=Hg.spawn(y,m,{windowsHide:!0,env:r?{...process.env,...r}:void 0});return{stdin:_.stdin,stdout:_.stdout,stderr:_.stderr,exit:new Promise((E,C)=>{_.once("error",L=>{u.stop(g,v),C(L)}),_.once("close",(L,R)=>{u.stop(g,v),E({code:L,signal:R})})}),async terminate(){_.kill("SIGKILL")}}}}async function Bg(t,e){if(!e){try{return require(t)}catch{}return}try{return require(`${e}/node_modules.asar/${t}`)}catch{}try{return require(`${e}/node_modules/${t}`)}catch{}try{return __non_webpack_require__(`${e}/node_modules.asar/${t}`)}catch{}try{return __non_webpack_require__(`${e}/node_modules/${t}`)}catch{}}function ku(t,e){return e&&typeof e=="object"&&"win32"in e?t==="win32"?e.win32:e.posix:e}async function Pu(t,e){return ku(t.platform,{posix:async()=>{try{return await t.exec(`test -f '${e}'`),!0}catch{return!1}},win32:async()=>(await t.exec(`Test-Path '${e}' -PathType Leaf`)).stdout.trim()==="True"})()}var RS;async function jg(){return RS===void 0&&(RS=(async()=>{try{return lj.userInfo().username}catch(t){if(process.platform!=="linux")throw t;return(await Re({exec:ho(void 0),cmd:"id",args:["-u","-n"],output:Ne})).stdout.toString().trim()}})()),RS}function fj(t){let e=t.replace(/['\\]/g,"\\$&"),n=vp(t).replaceAll("'","\\'");return` (command -v getent >/dev/null 2>&1 && getent passwd '${e}' || grep -E '^${n}|^[^:]*:[^:]*:${n}:' /etc/passwd || true)`}async function AS(t){return t.path.join(await t.tmpdir(),t.platform==="linux"?`vsch-${await t.getUsername()}`:"vsch")}var or="\u2404";async function wi(t,e,n,r="linux",i="Container"){let o=typeof t=="function",s=r==="win32",a=o?await t({env:n?{VSCODE_REMOTE_CONTAINERS_SESSION:n}:{},cmd:s?"powershell":"/bin/sh",args:s?["-NoProfile","-Command","-"]:[],output:e}):t;if(!o){let p=s?`powershell -NoProfile -Command "powershell -NoProfile -Command -"
|
|
`:`/bin/sh -c 'echo ${or}; /bin/sh'
|
|
`;a.stdin.write(p),await new Promise(h=>{let m="",g=new OS.StringDecoder;a.stdout.on("data",function v(y){m+=g.write(y),m.includes(p)&&(a.stdout.off("data",v),h())})})}let u=$ie(a),c;async function l(p,d){let h=c=(async()=>{try{await c}catch{}return f(ku(r,p),d)})();try{return await Promise.race([h,u.unexpectedExit])}finally{u.disposeStdioListeners(),c===h&&(c=void 0)}}async function f(p,d){let h=`Run in ${i.toLowerCase()}: ${p.replace(/\n.*/g,"")}`,m;if((d==null?void 0:d.logOutput)!=="silent"&&(m=e.start(h,d==null?void 0:d.logLevel)),a.stdin.destroyed){e.write("Stdin closed!");let{code:R,signal:D}=await a.exit;return Promise.reject({message:`Shell server terminated (code: ${R}, signal: ${D})`,code:R,signal:D})}r==="win32"?a.stdin.write(`[Console]::Write('${or}'); ( ${p} ); [Console]::Write("${or}$LastExitCode ${or}"); [Console]::Error.Write('${or}')
|
|
`):a.stdin.write(`echo -n ${or}; ( ${p} ); echo -n ${or}$?${or}; echo -n ${or} >&2
|
|
`);let[g,v]=pj(a.stdout,[1,2],(d==null?void 0:d.logOutput)==="continuous"?(R,D,O)=>{D===1&&O===0&&e.write(R,d==null?void 0:d.logLevel)}:()=>{}),y=pj(a.stderr,[1],(d==null?void 0:d.logOutput)==="continuous"?(R,D,O)=>{D===0&&O===0&&e.write(R,d==null?void 0:d.logLevel)}:()=>{})[0];d!=null&&d.stdin&&(await g,a.stdin.write(d==null?void 0:d.stdin));let[_,E]=await v,[C]=await y,L=parseInt(E,10)||0;return((d==null?void 0:d.logOutput)===void 0||(d==null?void 0:d.logOutput)===!0)&&(e.write(_,d==null?void 0:d.logLevel),e.write(C,d==null?void 0:d.logLevel),L&&e.write(`Exit code ${L}`,d==null?void 0:d.logLevel)),(d==null?void 0:d.logOutput)==="continuous"&&L&&e.write(`Exit code ${L}`,d==null?void 0:d.logLevel),(d==null?void 0:d.logOutput)!=="silent"&&e.stop(h,m,d==null?void 0:d.logLevel),L?Promise.reject({message:`Command in ${i.toLowerCase()} failed: ${p}`,code:L,stdout:_,stderr:C}):{stdout:_,stderr:C}}return{exec:l,process:a,platform:r,path:ku(r,jie)}}function pj(t,e,n){let r=e.map(()=>{let l;return{promise:new Promise((p,d)=>l={resolve:p,reject:d}),...l}}),i=new OS.StringDecoder("utf8"),o=[],s=0,a=[];function u(l){let f=i.write(l);c(f)}function c(l){let f=l.indexOf(or);if(f!==-1){let p=l.substr(0,f);o.push(p),n(p,s,a.length),a.push(o.join("")),o.length=0,a.length===e[s]&&(r[s].resolve(a),s++,a=[],s===e.length&&t.off("data",u)),f+1<l.length&&c(l.substr(f+1))}else o.push(l),n(l,s,a.length)}return t.on("data",u),r.map(l=>l.promise)}function $ie(t){let e,n=new Promise((u,c)=>e=c),r=[],i=[],o=u=>r.push(u),s=u=>i.push(u);return t.stdout.on("data",o),t.stderr.on("data",s),t.exit.then(({code:u,signal:c})=>{e(`Shell server terminated (code: ${u}, signal: ${c})
|
|
${Buffer.concat(r).toString()}
|
|
${Buffer.concat(i).toString()}`)},u=>{e(`Shell server failed: ${u&&(u.stack||u.message)}`)}),{unexpectedExit:n,disposeStdioListeners:()=>{t.stdout.off("data",o),t.stderr.off("data",s),r.length=0,i.length=0}}}var Kie=Y(Tj());async function yp(t){return new Promise(e=>setTimeout(e,t))}function Oj(t,e,n){let r,i;return{enabled:t,skipNonBlocking:e,output:n,onDidInput:new Vi().event,done:o=>o?i(o):r(),promise:new Promise((o,s)=>(r=o,i=s))}}async function zU(t){return(await t.exec("id -un")).stdout.trim()}async function Pg(t,e){let{stdout:n}=await t.exec(fj(e),{logOutput:!1});if(n.trim())return toe(n)}function toe(t){let e=t.replace(/\n$/,"").split(":");return{name:e[0],uid:e[2],gid:e[3],home:e[5],shell:e[6]}}function xS(t,e,n){return t.join(e,n.serverDataFolderName)}function VU(t,e,n){return t.join(e,n.dataFolderName)}async function WU(t){let{build:e,commit:n,quality:r,web:i,legacy:o,output:s}=t,a="Downloading VS Code Server",u=s.start(a);s.write(`${n} ${e.id} ${r}${i?" web":""}${o?" legacy":""}`);let c=ES(t);await Iu(Pr.dirname(c));let l=`https://update.code.visualstudio.com/commit:${n}/server-${o?e.id.replace("linux-","linux-legacy-"):e.id}${i?"-web":""}/${r}`,f,p;try{p=`${c}_${Date.now()}`,await new Promise((d,h)=>{let m=Vg.createWriteStream(p);s.write("Starting download.",1),Pj.https.get(l,{trackRedirects:!0},v=>{var E;if(v.statusCode<200||v.statusCode>299){s.write(`Download failed: ${v.statusCode} ${v.statusMessage}.`,1),h(new on({description:Fu.t("Downloading the VS Code Server failed. Please try again later."),originalError:`Failed to download VS Code Server (${l}): HTTP ${v.statusCode} - ${v.statusMessage}`}));return}let _=(E=[...v.redirects,v].find(C=>C.headers["x-sha256"]))==null?void 0:E.headers["x-sha256"];f=Array.isArray(_)?_[0]:_,s.write("Downloading data.",1),v.on("error",h),v.pipe(m),v.on("end",d)}).on("error",h)})}catch(d){if(s.write("Downloading failed.",1),s.write((d==null?void 0:d.stack)||(d==null?void 0:d.message)||String(d),1),t.alternateDownload)s.write(d&&(d.originalError||d.message)),s.write("Retrying to download VS Code Server."),p=`${c}_${Date.now()}`,await t.alternateDownload(l,p);else throw d||new on({description:Fu.t("Downloading the VS Code Server failed. Please try again later.")})}finally{s.stop(a,u)}if(f){let d=Yg.createHash("sha256"),h=await Tt(p);d.update(h);let m=d.digest("hex");if(m!==f)throw s.write(`Failed to download VS Code Server (${l}): SHA mismatch, actual ${m} != expected ${f}`),new on({description:Fu.t("Downloading the VS Code Server failed. Please try again later.")})}await dg(p,c)}async function _S(t,e,n,r,i,o=!0){let s="Installing VS Code Server",a=t.output.start(s),u=`${r}_${Date.now()}`;try{if(await e.exec(`mkdir -p ${u}`),i)typeof n=="string"&&n.endsWith(".zip")?await e.exec(`unzip ${n} -d ${u}`):await e.exec(`cat ${n} | tar --no-same-owner -x${o?"z":""} -C ${u}`);else{let c=typeof n=="string"?await Tt(n):n;await e.exec(`${_q(c.byteLength,!0)} | tar --no-same-owner -x${o?"z":""} -C ${u}`,{stdin:c,logOutput:"continuous"})}await e.exec(`mv -n ${Pr.posix.join(u,"*",".")} ${r} && rmdir ${u}`)}catch(c){try{await e.exec(`rm -rf ${u}`)}catch{}throw c}finally{t.output.stop(s,a)}}function ES(t){let{localCacheFolder:e,build:n,commit:r,quality:i,web:o,legacy:s}=t,a=Pr.join(e,"serverCache",r),u=`vscode-server-${n.id}${i==="stable"?"":`-${i}`}${o?"-web":""}${s?"-legacy":""}${n.archiveExt||".tar.gz"}`;return Pr.join(a,u)}var Nj={x64:{label:"x86-64",id:"linux-x64",arch:"x64",stable:!0,preview:!1},armhf:{label:"ARM",id:"linux-armhf",arch:"armhf",stable:!0,preview:!0},arm64:{label:"ARM64",id:"linux-arm64",arch:"arm64",stable:!0,preview:!0}},noe={x64:{label:"Alpine Linux",id:"linux-alpine",arch:"x64",stable:!0,preview:!0,minVersion:[3,9]},arm64:{label:"Alpine Linux ARM64",id:"alpine-arm64",arch:"arm64",stable:!0,preview:!0,minVersion:[3,9]}},Ag={x64:{label:"Mac",id:"darwin",arch:"x64",stable:!0,preview:!0,archiveExt:".zip"},arm64:{label:"Mac ARM",id:"darwin-arm64",arch:"arm64",stable:!0,preview:!0,archiveExt:".zip"}},roe={x64:{label:"Windows",id:"win32-x64",arch:"x64",stable:!0,preview:!0,archiveExt:".zip"},arm64:{label:"Windows ARM",id:"win32-arm64",arch:"arm64",stable:!0,preview:!0,archiveExt:".zip"}},ioe={linux:Nj,alpine:noe,darwin:Ag,win32:roe},ooe={x86_64:"x64",armv7l:"armhf",arm64:"arm64",aarch64:"arm64"};function YU(t,e){var i;let n=ooe[t.hardware],r=n&&(((i=ioe[t.id])==null?void 0:i[n])||Nj[n]);if(!r||e&&!r.stable)throw new on({description:t.id==="alpine"?Fu.t("Alpine Linux is not supported on the hardware architecture '{0}' of the container.",t.hardware):Fu.t("The hardware architecture '{0}' of the container is not supported.",t.hardware),data:{learnMoreUrl:"https://aka.ms/vscode-remote/linux",reload:!1}});return r}async function KU(t){let e="unknown",n="unknown",r="unknown";try{e=(await t.exec("uname -m")).stdout.trim();let{stdout:i}=await t.exec("(cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null");n=(i.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]||"notfound",r=(i.match(/^VERSION_ID=([^\u001b\r\n]*)/m)||[])[1]||"notfound"}catch(i){console.error(i)}return{hardware:e,id:n,version:r}}async function soe(t,{remoteExec:e},n,r,i={}){let o=i.print||(i.silent?"off":"end"),s=await e({env:i.remoteEnv,cwd:r,cmd:n[0],args:n.slice(1),output:i.silent?Ne:t.output}),a=[],u=[],c=new MS.StringDecoder,l=new MS.StringDecoder,f="",p="",d,h,m=new Promise((E,C)=>{d=E,h=C});s.stdout.on("data",E=>{a.push(E);let C=c.write(E);o==="continuous"&&t.output.write(C.replace(/\r?\n/g,`\r
|
|
`)),f+=C,i.resolveOn&&i.resolveOn.exec(f)&&d()}),s.stderr.on("data",E=>{u.push(E);let C=l.write(E);o==="continuous"&&t.output.write(C.replace(/\r?\n/g,`\r
|
|
`)),p+=C}),i.stdin instanceof Buffer?(s.stdin.write(i.stdin,E=>{E&&h(E)}),s.stdin.end()):i.stdin instanceof Vg.ReadStream&&i.stdin.pipe(s.stdin),o!=="off"&&s.exit.catch(E=>{E!=null&&E.message&&t.output.write(qt(E==null?void 0:E.message))});let g=await Promise.race([s.exit,m]),v=Buffer.concat(a),y=Buffer.concat(u);o==="end"&&(t.output.write(f.replace(/\r?\n/g,`\r
|
|
`)),t.output.write(qt(p)));let _=`${f}
|
|
${p}`;return g&&(g.code||g.signal)?Promise.reject({message:`Command failed: ${n.join(" ")}`,cmdOutput:_,stdout:v,stderr:y,code:g.code,signal:g.signal}):{cmdOutput:_,stdout:v,stderr:y}}function _q(t,e=!1){let r=t%8192;return`(dd iflag=fullblock bs=8192 count=${(t-r)/8192}${e?"":" 2>/dev/null"}; dd iflag=fullblock bs=${r} count=1${e?"":" 2>/dev/null"})`}async function kg(t,e,n,r){let i=uoe(n,t);if(!i||i==="none")return{};let o=await aoe(i,t,e.shellServer);return o||(t.output.write("userEnvProbe: not found in cache"),o=await Rj(i,t,e,r,"cat /proc/self/environ","\0"),o||(t.output.write("userEnvProbe: falling back to printenv"),o=await Rj(i,t,e,r,"printenv",`
|
|
`)),o&&await coe(o,i,t,e.shellServer),o||{})}async function aoe(t,e,n){if(!n||!e.containerSessionDataFolder)return;let r=Dj(t,e.containerSessionDataFolder);try{if(await Pu(n,r)){let{stdout:i}=await n.exec(`cat '${r}'`);return JSON.parse(i)}}catch(i){e.output.write(`Failed to read/parse user env cache: ${i}`,5)}}async function coe(t,e,n,r){if(!r||!n.containerSessionDataFolder)return;let i=Dj(e,n.containerSessionDataFolder);try{await r.exec(`mkdir -p '${Pr.posix.dirname(i)}' && cat > '${i}' << 'envJSON'
|
|
${JSON.stringify(t,null," ")}
|
|
envJSON
|
|
`)}catch(o){n.output.write(`Failed to cache user env: ${o}`,5)}}function Dj(t,e){return Pr.posix.join(e,`env-${t}.json`)}async function Rj(t,e,n,r,i,o){var s;if(t==="none")return{};try{let a=Yg.randomUUID(),u=new RegExp(a+"([^]*)"+a),c=n.shell;e.output.write(`userEnvProbe shell: ${c}`);let l=Pr.posix.basename(c),f=`echo -n ${a}; ${i}; echo -n ${a}`,p;/^pwsh(-preview)?$/.test(l)?p=t==="loginInteractiveShell"||t==="loginShell"?["-Login","-Command"]:["-Command"]:p=[t==="loginInteractiveShell"?"-lic":t==="loginShell"?"-lc":t==="interactiveShell"?"-ic":"-c"];let d=Vr(e.output,1),h=soe({output:d},{remoteExec:await r||n.remoteExec},[c,...p,f],n.installFolder);Promise.race([h,yp(2e3)]).then(async R=>{if(!R){let D,O=n.shellServer||await wi(n.remoteExec,e.output);try{({processes:D}=await Cq(O))}finally{n.shellServer||await O.process.terminate()}let N=D.find(S=>S.cmd.startsWith(c)&&S.cmd.indexOf(a)!==-1);if(N){let b=Tq(D)[N.pid];e.output.write(`userEnvProbe is taking longer than 2 seconds. Process tree:
|
|
${Jw(b)}`)}else e.output.write("userEnvProbe is taking longer than 2 seconds. Process not found.")}},()=>{}).catch(R=>e.output.write(qt(R&&(R.stack||R.message)||"Error reading process tree.")));let m=await Promise.race([h,yp(1e4)]);if(!m)return e.output.write(qt("userEnvProbe is taking longer than 10 seconds. Avoid waiting for user input in your shell's startup scripts. Continuing.")),{};let g=m.stdout.toString(),v=u.exec(g),y=v?v[1]:"";if(!y||y.trim()==="-n")return;let _=y.split(o).reduce((R,D)=>{let O=D.indexOf("=");return O!==-1&&(R[D.substring(0,O)]=D.substring(O+1)),R},{});e.output.write(`userEnvProbe parsed: ${JSON.stringify(_,void 0," ")}`,1),delete _.PWD;let E=_.PATH,C=(s=n.env)==null?void 0:s.PATH,L=!(e.allowSystemConfigChange&&n.launchRootShellServer)&&E&&C;if(L){let R=n.user;_.PATH=loe(E,C,R==="root"||R==="0")}return e.output.write(`userEnvProbe PATHs:
|
|
Probe: ${typeof E=="string"?`'${E}'`:"None"}
|
|
Container: ${typeof C=="string"?`'${C}'`:"None"}${L?`
|
|
Merged: ${typeof _.PATH=="string"?`'${_.PATH}'`:"None"}`:""}`),_}catch(a){return e.output.write(qt("Error reading shell environment.")),e.output.write(qt((a==null?void 0:a.stack)||(a==null?void 0:a.message)||String(a))),{}}}function uoe(t,e){let n=t==null?void 0:t.userEnvProbe;return e.output.write(`userEnvProbe: ${n||e.defaultUserEnvProbe}${n?"":" (default)"}`),n||(n=e.defaultUserEnvProbe),n}function loe(t,e,n){let r=t.split(":"),i=0;for(let o of e.split(":")){let s=r.indexOf(o);s===-1?(n||!/\/sbin(\/|$)/.test(o))&&r.splice(i++,0,o):i=s+1}return r.join(":")}function Kj(t){return typeof t>"u"||t===null}function foe(t){return typeof t=="object"&&t!==null}function poe(t){return Array.isArray(t)?t:Kj(t)?[]:[t]}function doe(t,e){var n,r,i,o;if(e)for(o=Object.keys(e),n=0,r=o.length;n<r;n+=1)i=o[n],t[i]=e[i];return t}function hoe(t,e){var n="",r;for(r=0;r<e;r+=1)n+=t;return n}function moe(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var goe=Kj,voe=foe,yoe=poe,xoe=hoe,_oe=moe,Eoe=doe,Dt={isNothing:goe,isObject:voe,toArray:yoe,repeat:xoe,isNegativeZero:_oe,extend:Eoe};function Xj(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+=`
|
|
|
|
`+t.mark.snippet),r+" "+n):r}function _p(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Xj(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_p.prototype=Object.create(Error.prototype);_p.prototype.constructor=_p;_p.prototype.toString=function(e){return this.name+": "+Xj(this,e)};var Un=_p;function qS(t,e,n,r,i){var o="",s="",a=Math.floor(i/2)-1;return r-e>a&&(o=" ... ",e=r-a+o.length),n-r>a&&(s=" ...",n=r+a-s.length),{str:o+t.slice(e,n).replace(/\t/g,"\u2192")+s,pos:r-e+o.length}}function US(t,e){return Dt.repeat(" ",e-t.length)+t}function boe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],o,s=-1;o=n.exec(t.buffer);)i.push(o.index),r.push(o.index+o[0].length),t.position<=o.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var a="",u,c,l=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+l+3);for(u=1;u<=e.linesBefore&&!(s-u<0);u++)c=qS(t.buffer,r[s-u],i[s-u],t.position-(r[s]-r[s-u]),f),a=Dt.repeat(" ",e.indent)+US((t.line-u+1).toString(),l)+" | "+c.str+`
|
|
`+a;for(c=qS(t.buffer,r[s],i[s],t.position,f),a+=Dt.repeat(" ",e.indent)+US((t.line+1).toString(),l)+" | "+c.str+`
|
|
`,a+=Dt.repeat("-",e.indent+l+3+c.pos)+`^
|
|
`,u=1;u<=e.linesAfter&&!(s+u>=i.length);u++)c=qS(t.buffer,r[s+u],i[s+u],t.position-(r[s]-r[s+u]),f),a+=Dt.repeat(" ",e.indent)+US((t.line+u+1).toString(),l)+" | "+c.str+`
|
|
`;return a.replace(/\n$/,"")}var woe=boe,Soe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Coe=["scalar","sequence","mapping"];function Toe(t){var e={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){e[String(r)]=n})}),e}function Ioe(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(Soe.indexOf(n)===-1)throw new Un('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(n){return n},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Toe(e.styleAliases||null),Coe.indexOf(this.kind)===-1)throw new Un('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var pn=Ioe;function Lj(t,e){var n=[];return t[e].forEach(function(r){var i=n.length;n.forEach(function(o,s){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=s)}),n[i]=r}),n}function Aoe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function r(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(r);return t}function $S(t){return this.extend(t)}$S.prototype.extend=function(e){var n=[],r=[];if(e instanceof pn)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(n=n.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Un("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof pn))throw new Un("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Un("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Un("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof pn))throw new Un("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create($S.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Lj(i,"implicit"),i.compiledExplicit=Lj(i,"explicit"),i.compiledTypeMap=Aoe(i.compiledImplicit,i.compiledExplicit),i};var Roe=$S,Poe=new pn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Ooe=new pn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Noe=new pn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Doe=new Roe({explicit:[Poe,Ooe,Noe]});function Loe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function koe(){return null}function Foe(t){return t===null}var Moe=new pn("tag:yaml.org,2002:null",{kind:"scalar",resolve:Loe,construct:koe,predicate:Foe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function qoe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Uoe(t){return t==="true"||t==="True"||t==="TRUE"}function joe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var $oe=new pn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qoe,construct:Uoe,predicate:joe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Hoe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Boe(t){return 48<=t&&t<=55}function Goe(t){return 48<=t&&t<=57}function zoe(t){if(t===null)return!1;var e=t.length,n=0,r=!1,i;if(!e)return!1;if(i=t[n],(i==="-"||i==="+")&&(i=t[++n]),i==="0"){if(n+1===e)return!0;if(i=t[++n],i==="b"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(!Hoe(t.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<e;n++)if(i=t[n],i!=="_"){if(!Boe(t.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<e;n++)if(i=t[n],i!=="_"){if(!Goe(t.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function Voe(t){var e=t,n=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return n*parseInt(e.slice(2),2);if(e[1]==="x")return n*parseInt(e.slice(2),16);if(e[1]==="o")return n*parseInt(e.slice(2),8)}return n*parseInt(e,10)}function Woe(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Dt.isNegativeZero(t)}var Yoe=new pn("tag:yaml.org,2002:int",{kind:"scalar",resolve:zoe,construct:Voe,predicate:Woe,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Koe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xoe(t){return!(t===null||!Koe.test(t)||t[t.length-1]==="_")}function Joe(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}var Qoe=/^[-+]?[0-9]+e/;function Zoe(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Dt.isNegativeZero(t))return"-0.0";return n=t.toString(10),Qoe.test(n)?n.replace("e",".e"):n}function ese(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Dt.isNegativeZero(t))}var tse=new pn("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xoe,construct:Joe,predicate:ese,represent:Zoe,defaultStyle:"lowercase"}),nse=Doe.extend({implicit:[Moe,$oe,Yoe,tse]}),rse=nse,Jj=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qj=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ise(t){return t===null?!1:Jj.exec(t)!==null||Qj.exec(t)!==null}function ose(t){var e,n,r,i,o,s,a,u=0,c=null,l,f,p;if(e=Jj.exec(t),e===null&&(e=Qj.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(o=+e[4],s=+e[5],a=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(l=+e[10],f=+(e[11]||0),c=(l*60+f)*6e4,e[9]==="-"&&(c=-c)),p=new Date(Date.UTC(n,r,i,o,s,a,u)),c&&p.setTime(p.getTime()-c),p}function sse(t){return t.toISOString()}var ase=new pn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ise,construct:ose,instanceOf:Date,represent:sse});function cse(t){return t==="<<"||t===null}var use=new pn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:cse}),VS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function lse(t){if(t===null)return!1;var e,n,r=0,i=t.length,o=VS;for(n=0;n<i;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function fse(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,o=VS,s=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(e));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),new Uint8Array(a)}function pse(t){var e="",n=0,r,i,o=t.length,s=VS;for(r=0;r<o;r++)r%3===0&&r&&(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]),n=(n<<8)+t[r];return i=o%3,i===0?(e+=s[n>>18&63],e+=s[n>>12&63],e+=s[n>>6&63],e+=s[n&63]):i===2?(e+=s[n>>10&63],e+=s[n>>4&63],e+=s[n<<2&63],e+=s[64]):i===1&&(e+=s[n>>2&63],e+=s[n<<4&63],e+=s[64],e+=s[64]),e}function dse(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var hse=new pn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:lse,construct:fse,predicate:dse,represent:pse}),mse=Object.prototype.hasOwnProperty,gse=Object.prototype.toString;function vse(t){if(t===null)return!0;var e=[],n,r,i,o,s,a=t;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,gse.call(i)!=="[object Object]")return!1;for(o in i)if(mse.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function yse(t){return t!==null?t:[]}var xse=new pn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vse,construct:yse}),_se=Object.prototype.toString;function Ese(t){if(t===null)return!0;var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(r=s[e],_se.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[e]=[i[0],r[i[0]]]}return!0}function bse(t){if(t===null)return[];var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],i=Object.keys(r),o[e]=[i[0],r[i[0]]];return o}var wse=new pn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ese,construct:bse}),Sse=Object.prototype.hasOwnProperty;function Cse(t){if(t===null)return!0;var e,n=t;for(e in n)if(Sse.call(n,e)&&n[e]!==null)return!1;return!0}function Tse(t){return t!==null?t:{}}var Ise=new pn("tag:yaml.org,2002:set",{kind:"mapping",resolve:Cse,construct:Tse}),Zj=rse.extend({implicit:[ase,use],explicit:[hse,xse,wse,Ise]}),hs=Object.prototype.hasOwnProperty,Kg=1,e$=2,t$=3,Xg=4,jS=1,Ase=2,kj=3,Rse=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Pse=/[\x85\u2028\u2029]/,Ose=/[,\[\]\{\}]/,n$=/^(?:!|!!|![a-z\-]+!)$/i,r$=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fj(t){return Object.prototype.toString.call(t)}function Si(t){return t===10||t===13}function Ma(t){return t===9||t===32}function jn(t){return t===9||t===32||t===10||t===13}function qu(t){return t===44||t===91||t===93||t===123||t===125}function Nse(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Dse(t){return t===120?2:t===117?4:t===85?8:0}function Lse(t){return 48<=t&&t<=57?t-48:-1}function Mj(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function kse(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var i$=new Array(256),o$=new Array(256);for(Fa=0;Fa<256;Fa++)i$[Fa]=Mj(Fa)?1:0,o$[Fa]=Mj(Fa);var Fa;function Fse(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Zj,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function s$(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=woe(n),new Un(e,n)}function ce(t,e){throw s$(t,e)}function Jg(t,e){t.onWarning&&t.onWarning.call(null,s$(t,e))}var qj={YAML:function(e,n,r){var i,o,s;e.version!==null&&ce(e,"duplication of %YAML directive"),r.length!==1&&ce(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&ce(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&ce(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&Jg(e,"unsupported YAML version of the document")},TAG:function(e,n,r){var i,o;r.length!==2&&ce(e,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],n$.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),hs.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),r$.test(o)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ce(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function ds(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||ce(t,"expected valid JSON character");else Rse.test(a)&&ce(t,"the stream contains non-printable characters");t.result+=a}}function Uj(t,e,n,r){var i,o,s,a;for(Dt.isObject(n)||ce(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],hs.call(e,o)||(e[o]=n[o],r[o]=!0)}function Uu(t,e,n,r,i,o,s,a,u){var c,l;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,l=i.length;c<l;c+=1)Array.isArray(i[c])&&ce(t,"nested arrays are not supported inside keys"),typeof i=="object"&&Fj(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&Fj(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,l=o.length;c<l;c+=1)Uj(t,e,o[c],n);else Uj(t,e,o,n);else!t.json&&!hs.call(n,i)&&hs.call(e,i)&&(t.line=s||t.line,t.lineStart=a||t.lineStart,t.position=u||t.position,ce(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[i]=o,delete n[i];return e}function WS(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ce(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function It(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Ma(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Si(i))for(WS(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&Jg(t,"deficient indentation"),r}function ev(t){var e=t.position,n;return n=t.input.charCodeAt(e),!!((n===45||n===46)&&n===t.input.charCodeAt(e+1)&&n===t.input.charCodeAt(e+2)&&(e+=3,n=t.input.charCodeAt(e),n===0||jn(n)))}function YS(t,e){e===1?t.result+=" ":e>1&&(t.result+=Dt.repeat(`
|
|
`,e-1))}function Mse(t,e,n){var r,i,o,s,a,u,c,l,f=t.kind,p=t.result,d;if(d=t.input.charCodeAt(t.position),jn(d)||qu(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(i=t.input.charCodeAt(t.position+1),jn(i)||n&&qu(i)))return!1;for(t.kind="scalar",t.result="",o=s=t.position,a=!1;d!==0;){if(d===58){if(i=t.input.charCodeAt(t.position+1),jn(i)||n&&qu(i))break}else if(d===35){if(r=t.input.charCodeAt(t.position-1),jn(r))break}else{if(t.position===t.lineStart&&ev(t)||n&&qu(d))break;if(Si(d))if(u=t.line,c=t.lineStart,l=t.lineIndent,It(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=u,t.lineStart=c,t.lineIndent=l;break}}a&&(ds(t,o,s,!1),YS(t,t.line-u),o=s=t.position,a=!1),Ma(d)||(s=t.position+1),d=t.input.charCodeAt(++t.position)}return ds(t,o,s,!1),t.result?!0:(t.kind=f,t.result=p,!1)}function qse(t,e){var n,r,i;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(ds(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,i=t.position;else return!0;else Si(n)?(ds(t,r,i,!0),YS(t,It(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ev(t)?ce(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);ce(t,"unexpected end of the stream within a single quoted scalar")}function Use(t,e){var n,r,i,o,s,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ds(t,n,t.position,!0),t.position++,!0;if(a===92){if(ds(t,n,t.position,!0),a=t.input.charCodeAt(++t.position),Si(a))It(t,!1,e);else if(a<256&&i$[a])t.result+=o$[a],t.position++;else if((s=Dse(a))>0){for(i=s,o=0;i>0;i--)a=t.input.charCodeAt(++t.position),(s=Nse(a))>=0?o=(o<<4)+s:ce(t,"expected hexadecimal character");t.result+=kse(o),t.position++}else ce(t,"unknown escape sequence");n=r=t.position}else Si(a)?(ds(t,n,r,!0),YS(t,It(t,!1,e)),n=r=t.position):t.position===t.lineStart&&ev(t)?ce(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ce(t,"unexpected end of the stream within a double quoted scalar")}function jse(t,e){var n=!0,r,i,o,s=t.tag,a,u=t.anchor,c,l,f,p,d,h=Object.create(null),m,g,v,y;if(y=t.input.charCodeAt(t.position),y===91)l=93,d=!1,a=[];else if(y===123)l=125,d=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);y!==0;){if(It(t,!0,e),y=t.input.charCodeAt(t.position),y===l)return t.position++,t.tag=s,t.anchor=u,t.kind=d?"mapping":"sequence",t.result=a,!0;n?y===44&&ce(t,"expected the node content, but found ','"):ce(t,"missed comma between flow collection entries"),g=m=v=null,f=p=!1,y===63&&(c=t.input.charCodeAt(t.position+1),jn(c)&&(f=p=!0,t.position++,It(t,!0,e))),r=t.line,i=t.lineStart,o=t.position,ju(t,e,Kg,!1,!0),g=t.tag,m=t.result,It(t,!0,e),y=t.input.charCodeAt(t.position),(p||t.line===r)&&y===58&&(f=!0,y=t.input.charCodeAt(++t.position),It(t,!0,e),ju(t,e,Kg,!1,!0),v=t.result),d?Uu(t,a,h,g,m,v,r,i,o):f?a.push(Uu(t,null,h,g,m,v,r,i,o)):a.push(m),It(t,!0,e),y=t.input.charCodeAt(t.position),y===44?(n=!0,y=t.input.charCodeAt(++t.position)):n=!1}ce(t,"unexpected end of the stream within a flow collection")}function $se(t,e){var n,r,i=jS,o=!1,s=!1,a=e,u=0,c=!1,l,f;if(f=t.input.charCodeAt(t.position),f===124)r=!1;else if(f===62)r=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)jS===i?i=f===43?kj:Ase:ce(t,"repeat of a chomping mode identifier");else if((l=Lse(f))>=0)l===0?ce(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ce(t,"repeat of an indentation width identifier"):(a=e+l-1,s=!0);else break;if(Ma(f)){do f=t.input.charCodeAt(++t.position);while(Ma(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Si(f)&&f!==0)}for(;f!==0;){for(WS(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndent<a)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>a&&(a=t.lineIndent),Si(f)){u++;continue}if(t.lineIndent<a){i===kj?t.result+=Dt.repeat(`
|
|
`,o?1+u:u):i===jS&&o&&(t.result+=`
|
|
`);break}for(r?Ma(f)?(c=!0,t.result+=Dt.repeat(`
|
|
`,o?1+u:u)):c?(c=!1,t.result+=Dt.repeat(`
|
|
`,u+1)):u===0?o&&(t.result+=" "):t.result+=Dt.repeat(`
|
|
`,u):t.result+=Dt.repeat(`
|
|
`,o?1+u:u),o=!0,s=!0,u=0,n=t.position;!Si(f)&&f!==0;)f=t.input.charCodeAt(++t.position);ds(t,n,t.position,!1)}return!0}function jj(t,e){var n,r=t.tag,i=t.anchor,o=[],s,a=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ce(t,"tab characters must not be used in indentation")),!(u!==45||(s=t.input.charCodeAt(t.position+1),!jn(s))));){if(a=!0,t.position++,It(t,!0,-1)&&t.lineIndent<=e){o.push(null),u=t.input.charCodeAt(t.position);continue}if(n=t.line,ju(t,e,t$,!1,!0),o.push(t.result),It(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&u!==0)ce(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0):!1}function Hse(t,e,n){var r,i,o,s,a,u,c=t.tag,l=t.anchor,f={},p=Object.create(null),d=null,h=null,m=null,g=!1,v=!1,y;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),y=t.input.charCodeAt(t.position);y!==0;){if(!g&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ce(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),o=t.line,(y===63||y===58)&&jn(r))y===63?(g&&(Uu(t,f,p,d,h,null,s,a,u),d=h=m=null),v=!0,g=!0,i=!0):g?(g=!1,i=!0):ce(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=r;else{if(s=t.line,a=t.lineStart,u=t.position,!ju(t,n,e$,!1,!0))break;if(t.line===o){for(y=t.input.charCodeAt(t.position);Ma(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),jn(y)||ce(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Uu(t,f,p,d,h,null,s,a,u),d=h=m=null),v=!0,g=!1,i=!1,d=t.tag,h=t.result;else if(v)ce(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=l,!0}else if(v)ce(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=l,!0}if((t.line===o||t.lineIndent>e)&&(g&&(s=t.line,a=t.lineStart,u=t.position),ju(t,e,Xg,!0,i)&&(g?h=t.result:m=t.result),g||(Uu(t,f,p,d,h,m,s,a,u),d=h=m=null),It(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&y!==0)ce(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&Uu(t,f,p,d,h,null,s,a,u),v&&(t.tag=c,t.anchor=l,t.kind="mapping",t.result=f),v}function Bse(t){var e,n=!1,r=!1,i,o,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&ce(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(n=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,n){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(o=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):ce(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!jn(s);)s===33&&(r?ce(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),n$.test(i)||ce(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Ose.test(o)&&ce(t,"tag suffix cannot contain flow indicator characters")}o&&!r$.test(o)&&ce(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ce(t,"tag name is malformed: "+o)}return n?t.tag=o:hs.call(t.tagMap,i)?t.tag=t.tagMap[i]+o:i==="!"?t.tag="!"+o:i==="!!"?t.tag="tag:yaml.org,2002:"+o:ce(t,'undeclared tag handle "'+i+'"'),!0}function Gse(t){var e,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&ce(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!jn(n)&&!qu(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&ce(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function zse(t){var e,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!jn(r)&&!qu(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ce(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),hs.call(t.anchorMap,n)||ce(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],It(t,!0,-1),!0}function ju(t,e,n,r,i){var o,s,a,u=1,c=!1,l=!1,f,p,d,h,m,g;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=Xg===n||t$===n,r&&It(t,!0,-1)&&(c=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;Bse(t)||Gse(t);)It(t,!0,-1)?(c=!0,a=o,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):a=!1;if(a&&(a=c||i),(u===1||Xg===n)&&(Kg===n||e$===n?m=e:m=e+1,g=t.position-t.lineStart,u===1?a&&(jj(t,g)||Hse(t,g,m))||jse(t,m)?l=!0:(s&&$se(t,m)||qse(t,m)||Use(t,m)?l=!0:zse(t)?(l=!0,(t.tag!==null||t.anchor!==null)&&ce(t,"alias node should not have any properties")):Mse(t,m,Kg===n)&&(l=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(l=a&&jj(t,g))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ce(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(h=t.implicitTypes[f],h.resolve(t.result)){t.result=h.construct(t.result),t.tag=h.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(hs.call(t.typeMap[t.kind||"fallback"],t.tag))h=t.typeMap[t.kind||"fallback"][t.tag];else for(h=null,d=t.typeMap.multi[t.kind||"fallback"],f=0,p=d.length;f<p;f+=1)if(t.tag.slice(0,d[f].tag.length)===d[f].tag){h=d[f];break}h||ce(t,"unknown tag !<"+t.tag+">"),t.result!==null&&h.kind!==t.kind&&ce(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ce(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||l}function Vse(t){var e=t.position,n,r,i,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(It(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),n=t.position;s!==0&&!jn(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),i=[],r.length<1&&ce(t,"directive name must not be less than one character in length");s!==0;){for(;Ma(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Si(s));break}if(Si(s))break;for(n=t.position;s!==0&&!jn(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(n,t.position))}s!==0&&WS(t),hs.call(qj,r)?qj[r](t,r,i):Jg(t,'unknown document directive "'+r+'"')}if(It(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,It(t,!0,-1)):o&&ce(t,"directives end mark is expected"),ju(t,t.lineIndent-1,Xg,!1,!0),It(t,!0,-1),t.checkLineBreaks&&Pse.test(t.input.slice(e,t.position))&&Jg(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ev(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,It(t,!0,-1));return}if(t.position<t.length-1)ce(t,"end of the stream or a document separator is expected");else return}function a$(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var n=new Fse(t,e),r=t.indexOf("\0");for(r!==-1&&(n.position=r,ce(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Vse(n);return n.documents}function Wse(t,e,n){e!==null&&typeof e=="object"&&typeof n>"u"&&(n=e,e=null);var r=a$(t,n);if(typeof e!="function")return r;for(var i=0,o=r.length;i<o;i+=1)e(r[i])}function Yse(t,e){var n=a$(t,e);if(n.length!==0){if(n.length===1)return n[0];throw new Un("expected a single document in the stream, but found more")}}var Kse=Wse,Xse=Yse,c$={loadAll:Kse,load:Xse},u$=Object.prototype.toString,l$=Object.prototype.hasOwnProperty,KS=65279,Jse=9,Ep=10,Qse=13,Zse=32,eae=33,tae=34,HS=35,nae=37,rae=38,iae=39,oae=42,f$=44,sae=45,Qg=58,aae=61,cae=62,uae=63,lae=64,p$=91,d$=93,fae=96,h$=123,pae=124,m$=125,dn={};dn[0]="\\0";dn[7]="\\a";dn[8]="\\b";dn[9]="\\t";dn[10]="\\n";dn[11]="\\v";dn[12]="\\f";dn[13]="\\r";dn[27]="\\e";dn[34]='\\"';dn[92]="\\\\";dn[133]="\\N";dn[160]="\\_";dn[8232]="\\L";dn[8233]="\\P";var dae=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],hae=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function mae(t,e){var n,r,i,o,s,a,u;if(e===null)return{};for(n={},r=Object.keys(e),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),u=t.compiledTypeMap.fallback[s],u&&l$.call(u.styleAliases,a)&&(a=u.styleAliases[a]),n[s]=a;return n}function gae(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else if(t<=4294967295)n="U",r=8;else throw new Un("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Dt.repeat("0",r-e.length)+e}var vae=1,bp=2;function yae(t){this.schema=t.schema||Zj,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Dt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=mae(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?bp:vae,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function $j(t,e){for(var n=Dt.repeat(" ",e),r=0,i=-1,o="",s,a=t.length;r<a;)i=t.indexOf(`
|
|
`,r),i===-1?(s=t.slice(r),r=a):(s=t.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
`&&(o+=n),o+=s;return o}function BS(t,e){return`
|
|
`+Dt.repeat(" ",t.indent*e)}function xae(t,e){var n,r,i;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(i=t.implicitTypes[n],i.resolve(e))return!0;return!1}function Zg(t){return t===Zse||t===Jse}function wp(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==KS||65536<=t&&t<=1114111}function Hj(t){return wp(t)&&t!==KS&&t!==Qse&&t!==Ep}function Bj(t,e,n){var r=Hj(t),i=r&&!Zg(t);return(n?r:r&&t!==f$&&t!==p$&&t!==d$&&t!==h$&&t!==m$)&&t!==HS&&!(e===Qg&&!i)||Hj(e)&&!Zg(e)&&t===HS||e===Qg&&i}function _ae(t){return wp(t)&&t!==KS&&!Zg(t)&&t!==sae&&t!==uae&&t!==Qg&&t!==f$&&t!==p$&&t!==d$&&t!==h$&&t!==m$&&t!==HS&&t!==rae&&t!==oae&&t!==eae&&t!==pae&&t!==aae&&t!==cae&&t!==iae&&t!==tae&&t!==nae&&t!==lae&&t!==fae}function Eae(t){return!Zg(t)&&t!==Qg}function xp(t,e){var n=t.charCodeAt(e),r;return n>=55296&&n<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function g$(t){var e=/^\n* /;return e.test(t)}var v$=1,GS=2,y$=3,x$=4,Mu=5;function bae(t,e,n,r,i,o,s,a){var u,c=0,l=null,f=!1,p=!1,d=r!==-1,h=-1,m=_ae(xp(t,0))&&Eae(xp(t,t.length-1));if(e||s)for(u=0;u<t.length;c>=65536?u+=2:u++){if(c=xp(t,u),!wp(c))return Mu;m=m&&Bj(c,l,a),l=c}else{for(u=0;u<t.length;c>=65536?u+=2:u++){if(c=xp(t,u),c===Ep)f=!0,d&&(p=p||u-h-1>r&&t[h+1]!==" ",h=u);else if(!wp(c))return Mu;m=m&&Bj(c,l,a),l=c}p=p||d&&u-h-1>r&&t[h+1]!==" "}return!f&&!p?m&&!s&&!i(t)?v$:o===bp?Mu:GS:n>9&&g$(t)?Mu:s?o===bp?Mu:GS:p?x$:y$}function wae(t,e,n,r,i){t.dump=function(){if(e.length===0)return t.quotingType===bp?'""':"''";if(!t.noCompatMode&&(dae.indexOf(e)!==-1||hae.test(e)))return t.quotingType===bp?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,n),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=r||t.flowLevel>-1&&n>=t.flowLevel;function u(c){return xae(t,c)}switch(bae(e,a,t.indent,s,u,t.quotingType,t.forceQuotes&&!r,i)){case v$:return e;case GS:return"'"+e.replace(/'/g,"''")+"'";case y$:return"|"+Gj(e,t.indent)+zj($j(e,o));case x$:return">"+Gj(e,t.indent)+zj($j(Sae(e,s),o));case Mu:return'"'+Cae(e)+'"';default:throw new Un("impossible error: invalid scalar style")}}()}function Gj(t,e){var n=g$(t)?String(e):"",r=t[t.length-1]===`
|
|
`,i=r&&(t[t.length-2]===`
|
|
`||t===`
|
|
`),o=i?"+":r?"":"-";return n+o+`
|
|
`}function zj(t){return t[t.length-1]===`
|
|
`?t.slice(0,-1):t}function Sae(t,e){for(var n=/(\n+)([^\n]*)/g,r=function(){var c=t.indexOf(`
|
|
`);return c=c!==-1?c:t.length,n.lastIndex=c,Vj(t.slice(0,c),e)}(),i=t[0]===`
|
|
`||t[0]===" ",o,s;s=n.exec(t);){var a=s[1],u=s[2];o=u[0]===" ",r+=a+(!i&&!o&&u!==""?`
|
|
`:"")+Vj(u,e),i=o}return r}function Vj(t,e){if(t===""||t[0]===" ")return t;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,u="";r=n.exec(t);)a=r.index,a-i>e&&(o=s>i?s:a,u+=`
|
|
`+t.slice(i,o),i=o+1),s=a;return u+=`
|
|
`,t.length-i>e&&s>i?u+=t.slice(i,s)+`
|
|
`+t.slice(s+1):u+=t.slice(i),u.slice(1)}function Cae(t){for(var e="",n=0,r,i=0;i<t.length;n>=65536?i+=2:i++)n=xp(t,i),r=dn[n],!r&&wp(n)?(e+=t[i],n>=65536&&(e+=t[i+1])):e+=r||gae(n);return e}function Tae(t,e,n){var r="",i=t.tag,o,s,a;for(o=0,s=n.length;o<s;o+=1)a=n[o],t.replacer&&(a=t.replacer.call(n,String(o),a)),(mo(t,e,a,!1,!1)||typeof a>"u"&&mo(t,e,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=i,t.dump="["+r+"]"}function Wj(t,e,n,r){var i="",o=t.tag,s,a,u;for(s=0,a=n.length;s<a;s+=1)u=n[s],t.replacer&&(u=t.replacer.call(n,String(s),u)),(mo(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&mo(t,e+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=BS(t,e)),t.dump&&Ep===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=o,t.dump=i||"[]"}function Iae(t,e,n){var r="",i=t.tag,o=Object.keys(n),s,a,u,c,l;for(s=0,a=o.length;s<a;s+=1)l="",r!==""&&(l+=", "),t.condenseFlow&&(l+='"'),u=o[s],c=n[u],t.replacer&&(c=t.replacer.call(n,u,c)),mo(t,e,u,!1,!1)&&(t.dump.length>1024&&(l+="? "),l+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),mo(t,e,c,!1,!1)&&(l+=t.dump,r+=l));t.tag=i,t.dump="{"+r+"}"}function Aae(t,e,n,r){var i="",o=t.tag,s=Object.keys(n),a,u,c,l,f,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Un("sortKeys must be a boolean or a function");for(a=0,u=s.length;a<u;a+=1)p="",(!r||i!=="")&&(p+=BS(t,e)),c=s[a],l=n[c],t.replacer&&(l=t.replacer.call(n,c,l)),mo(t,e+1,c,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&Ep===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,f&&(p+=BS(t,e)),mo(t,e+1,l,!0,f)&&(t.dump&&Ep===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=o,t.dump=i||"{}"}function Yj(t,e,n){var r,i,o,s,a,u;for(i=n?t.explicitTypes:t.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(n?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(u=t.styleMap[a.tag]||a.defaultStyle,u$.call(a.represent)==="[object Function]")r=a.represent(e,u);else if(l$.call(a.represent,u))r=a.represent[u](e,u);else throw new Un("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');t.dump=r}return!0}return!1}function mo(t,e,n,r,i,o,s){t.tag=null,t.dump=n,Yj(t,n,!1)||Yj(t,n,!0);var a=u$.call(t.dump),u=r,c;r&&(r=t.flowLevel<0||t.flowLevel>e);var l=a==="[object Object]"||a==="[object Array]",f,p;if(l&&(f=t.duplicates.indexOf(n),p=f!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(l&&p&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),a==="[object Object]")r&&Object.keys(t.dump).length!==0?(Aae(t,e,t.dump,i),p&&(t.dump="&ref_"+f+t.dump)):(Iae(t,e,t.dump),p&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?Wj(t,e-1,t.dump,i):Wj(t,e,t.dump,i),p&&(t.dump="&ref_"+f+t.dump)):(Tae(t,e,t.dump),p&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&wae(t,t.dump,e,o,u);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Un("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function Rae(t,e){var n=[],r=[],i,o;for(zS(t,n,r),i=0,o=r.length;i<o;i+=1)e.duplicates.push(n[r[i]]);e.usedDuplicates=new Array(o)}function zS(t,e,n){var r,i,o;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)zS(t[i],e,n);else for(r=Object.keys(t),i=0,o=r.length;i<o;i+=1)zS(t[r[i]],e,n)}function Pae(t,e){e=e||{};var n=new yae(e);n.noRefs||Rae(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),mo(n,0,r,!0,!0)?n.dump+`
|
|
`:""}var Oae=Pae,Nae={dump:Oae};function XS(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var Dae=c$.load,oOe=c$.loadAll,sOe=Nae.dump;var aOe=XS("safeLoad","load"),cOe=XS("safeLoadAll","loadAll"),uOe=XS("safeDump","dump");var vo=Y(require("path")),T$=Y(require("os")),I$=Y(require("crypto")),A$=Y(jm());var JS=Y(require("path")),_$=Y(require("os"));var ei=class t{constructor(e,n=t.scheme){this.fileHost=e;this.scheme=n}static scheme="vscode-fileHost";async readDocument(e){switch(e.scheme){case this.scheme:try{return(await this.fileHost.readFile(go(e,this.fileHost.platform))).toString()}catch{return}default:throw new Error(`Unsupported scheme: ${e.toString()}`)}}async applyEdits(e,n,r){switch(e.scheme){case this.scheme:let i=rh(r,n);await this.fileHost.writeFile(go(e,this.fileHost.platform),Buffer.from(i));break;default:throw new Error(`Unsupported scheme: ${e.toString()}`)}}};function go(t,e){let n;return t.authority&&t.path.length>1&&(t.scheme==="file"||t.scheme===ei.scheme)?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,e==="win32"&&(n=n.replace(/\//g,"\\"),n[0]==="\\"&&n[1]!=="\\"&&(n=`C:${n}`)),n}function tv(t,e){return[t.join(e,".devcontainer","devcontainer.json"),t.join(e,".devcontainer.json")]}function E$(t,e){return qn.file(t.path.join(e,".devcontainer","devcontainer.json")).with({scheme:ei.scheme})}async function b$(t,e){let n=tv(t.path,e);for(let r of n)if(await t.isFile(r))return qn.file(r).with({scheme:ei.scheme})}async function w$(t){let e=tv(JS,t);for(let n of e)if(await Oa(n))return n}var EOe=`{${_$.EOL}}`;var qa=require("string_decoder");async function QS(t,e){let{cliHost:n,postCreate:r,output:i}=t;i.write(`Running Dev Containers CLI: ${e.join(" ")}
|
|
`);let o=await R$(t),s=P$(n),a;try{await Fae({exec:n.exec,cwd:t.cwd||o.cwd,cmd:s.cmd,args:[...s.args,o.script,...e],env:await O$(t,s.cmd),stdin:r==null?void 0:r.onDidInput,output:i,stdoutData:u=>a=u,stderrData:u=>i.event(u)}),i.write(a?JSON.stringify(a,void 0,4):"(No dev container CLI standard out)",1),i.write("Dev Containers CLI completed",1)}catch(u){throw u.data=a,u}return a}async function R$(t){let{cliHost:e,extensionPath:n,output:r}=t,i=vo.join(n,"dist","spec-node","devContainersSpecCLI.js"),o=e.type==="local"?n:e.path.join(await e.homedir(),".vscode-remote-containers","dist",`dev-containers-cli-${t.package.version}`),s=e.type==="local"?i:e.path.join(o,"dist","spec-node","devContainersSpecCLI.js");if(["wsl","remote"].indexOf(e.type)!==-1){let a="Checking for Dev Containers CLI",u=r.start(a),c=await e.isFile(s);if(r.stop(a,u),!c){let l="Copying Dev Containers CLI",f=r.start(l),p=`${o}-${I$.randomUUID()}`,d=e.path.join(p,"dist","spec-node","devContainersSpecCLI.js");await e.mkdirp(e.path.dirname(d)),await Promise.all([S$(vo.join(n,"package.json"),e,e.path.join(p,"package.json")),S$(i,e,d),ZS(vo.join(n,"scripts"),e,e.path.join(p,"scripts"),r)]),await e.rename(p,o),r.stop(l,f)}}return{cwd:o,script:s}}function P$(t){if(t.type==="local")return mp?{cmd:process.argv[0],args:[]}:{cmd:process.argv[0],args:[]};if(t.nodeExecutable)return{cmd:t.nodeExecutable,args:[]};throw new Error("Node executable required")}async function Fae(t){let{exec:e,cmd:n,args:r,cwd:i,env:o,stdin:s,output:a,stdoutData:u,stderrData:c}=t,l=await e({cmd:n,args:r,cwd:i,env:o,output:a});return new Promise((f,p)=>{let d=new qa.StringDecoder,h="";l.stdout.on("data",y=>{h+=d.write(y);let _=h.split(`
|
|
`);h=_.pop();for(let E of _)if(E.trim())try{u(JSON.parse(E))}catch{a.write(E)}}),l.stdout.on("error",y=>{if((y==null?void 0:y.code)!=="ENOTCONN")throw y});let m=new qa.StringDecoder,g="";l.stderr.on("data",y=>{g+=m.write(y);let _=g.split(`
|
|
`);g=_.pop();for(let E of _)if(E.trim())try{c(JSON.parse(E))}catch{a.write(E)}}),l.stderr.on("error",y=>{if((y==null?void 0:y.code)!=="ENOTCONN")throw y});let v=[];l.exit.then(({code:y})=>{try{v.forEach(_=>_.dispose()),y?(a.write(`Exit code ${y}`),p({message:`Command failed: ${n} ${(r||[]).join(" ")}`,code:y})):f()}catch(_){p(_)}},p),typeof s=="function"&&v.push(s(y=>l.stdin.write(y)))})}async function O$(t,e){let{cliHost:n,env:r,appRoot:i}=t,o=await n.locateCertificatesFile();return{...r,...n.type==="local"?i?{NODE_PATH:`${n.path.join(i,"node_modules.asar")}${vo.delimiter}${n.path.join(i,"node_modules")}`}:void 0:n.type==="container"?void 0:{NODE_PATH:n.path.join(n.path.dirname(e),"node_modules")},...o?{NODE_EXTRA_CA_CERTS:o}:{},...mp?{TS_NODE_PROJECT:void 0}:{}}}async function S$(t,e,n){await e.writeFile(n,await Tt(t))}async function ZS(t,e,n,r){await e.mkdirp(n);let i=A$.c({cwd:t,filter:c=>(console.log(c),!0)},["."]),o=new Promise((c,l)=>{i.on("error",l),i.on("finish",c)}),s=await e.exec({cmd:"tar",args:["--no-same-owner","-x","-f","-"],cwd:n,output:r}),a=new qa.StringDecoder;s.stdout.on("data",c=>{r.write(a.write(c))});let u=new qa.StringDecoder;s.stderr.on("data",c=>{r.write(qt(u.write(c)))}),i.pipe(s.stdin),await Promise.all([s.exit,o])}async function N$(){return vo.join(T$.tmpdir(),process.platform==="linux"?`vsch-${await jg()}`:"vsch")}async function D$(t,e){let{cliHost:n,postCreate:r,output:i}=t,o=await R$(t),s=P$(n);return Mae({exec:n.exec,ptyExec:n.ptyExec,cwd:t.cwd||o.cwd,cmd:s.cmd,args:[...s.args,o.script,...e],env:await O$(t,s.cmd),output:i,stdin:r==null?void 0:r.onDidInput})}async function Mae(t){let{exec:e,ptyExec:n,cmd:r,args:i,cwd:o,env:s,output:a,stdin:u}=t;if(process.stdout.isTTY){let c=await n({cmd:r,args:i,cwd:o,env:s,output:{...a,start:()=>Date.now(),stop:()=>{}}}),l=[];l.push(c.onData(f=>a.raw(f))),typeof u=="function"&&l.push(u(f=>c.write(f)));try{return await c.exit}finally{l.forEach(f=>f.dispose())}}else{let c=await e({cmd:r,args:i,cwd:o,env:s,output:Ne}),l=[],f=new qa.StringDecoder,p=m=>a.raw(f.write(m));c.stdout.on("data",p);let d=new qa.StringDecoder,h=m=>a.raw(d.write(m));c.stderr.on("data",h),l.push({dispose:()=>{c.stdout.off("data",p),c.stderr.off("data",h)}}),typeof u=="function"&&l.push(u(m=>c.stdin.write(m)));try{return await c.exit}finally{l.forEach(m=>m.dispose())}}}var $u=Y(require("path"));var F$=Y(V_());var FNe=5*60*1e3;async function U$(t,e,n,r,i,o,s){let{cliHost:a,output:u}=t,c=await QS(t,["read-configuration",...t.dockerPath!=="docker"?["--docker-path",t.dockerPath]:[],...t.dockerComposePath!=="docker-compose"?["--docker-compose-path",t.dockerComposePath]:[],"--workspace-folder",e,...(i||[]).map(l=>["--id-label",l]).flat(),...o?["--container-id",o]:[],"--log-level",Ah(r),"--log-format","json",...n?["--config",go(n,a.platform)]:[],...s?["--override-config",go(s,a.platform)]:[],"--mount-workspace-git-root",...u.dimensions?["--terminal-columns",String(u.dimensions.columns),"--terminal-rows",String(u.dimensions.rows)]:[]]);return c.configuration.configFilePath=qn.revive(c.configuration.configFilePath).with({scheme:a.type==="local"?"file":ei.scheme}),c}async function j$(t,e,n,r,i,o){let s=await rce(t,e,n,r,i,o);return s==null?void 0:s.uri}async function rce(t,e,n,r,i,o){let s=await Sq(t,e,Ne),a=s&&await $$(s,n);if(a)return{uri:a,type:"repositoryConfig",fileHost:await Ei(process.cwd(),r,o)};let u=await b$(t,e.configFolderPath);if(u)return{uri:u,type:"workspace",fileHost:t};i&&o&&(s!=null&&s.length?o.write(`No dev container config found. Additional locations checked:
|
|
${H$(s,n).map(c=>`- ${$u.join(c,".devcontainer","devcontainer.json")}`).join(`
|
|
`)}`):o.write("No dev container config found. No repository connection string found."))}async function $$(t,e){let n=H$(t,e);for(let r of n){let i=await w$(r);if(i)return qn.file(i)}}function H$(t,e){let n=[],r=new Set(t.map(ice).filter(i=>!!i));for(let i of r)for(let o of e){let s=$u.join(o,i);n.push(s)}return n}function ice(t){let e;if(t.startsWith("https://"))e=t.substr(8);else{let n=/[^@:]+@([^:]+):(.+)/.exec(t);if(n)e=`${n[1]}/${n[2]}`;else return}if(!(e.toLowerCase().startsWith("github.com")&&(e=(/^[^/]+\/[^/]+\/[^/]+/.exec(e)||[])[0],!e)))return e.endsWith(".git")&&(e=e.substr(0,e.length-4)),e}function B$(t){return!!(t!=null&&t.startsWith("tunnel+"))}function G$(t,e,n,r,i,o){t=cce(t);let s=r||o?JSON.stringify({hostPath:e,localDocker:i,settings:r,configFile:o}):e;return`vscode-remote://dev-container+${Buffer.from(s,"utf8").toString("hex")}${t?`@${t}`:""}${n}`}function cce(t){if(t){if(ij(t)){let e=t.indexOf("@");if(e!==-1&&t.indexOf("+",e)===-1){let r=oj(t);return rj(r)}return t}if(B$(t))return t}}var eP=require("util");var e_=Y(require("os"));process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT="{}";var Zx=class{constructor(e){this.config=e;this.firstParty=!!e.firstParty,this.appInsightsClient=this.createAppInsightsClient(e.aiKey)}appInsightsClient;firstParty;async createAppInsightsClient(e){let n;process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let r=await Promise.resolve().then(()=>Y(_7()));return r.defaultClient?(n=new r.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(r.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setUseDiskRetryCaching(!0).start(),n=r.defaultClient),n.commonProperties={...this.getCommonProperties(),...this.config.commonProperties},e&&e.indexOf("AIF-")===0&&(n.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1",this.firstParty=!0),n}getCommonProperties(){let e=Object.create(null);return e["common.os"]=e_.platform(),e["common.platformversion"]=(e_.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.config.packageId,e["common.extversion"]=this.config.packageVersion,e}cloneAndChange(e,n){if(e===null||typeof e!="object"||typeof n!="function")return e;let r={};for(let i in e)r[i]=n(i,e[i]);return r}anonymizeFilePaths(e,n){let r;if(e==null)return"";let i=this.config.cleanupPaths.map(s=>new RegExp(vp(s),"gi")),o=e;if(n){let s=[];for(let l of i)for(;(r=l.exec(e))&&r;)s.push([r.index,l.lastIndex]);let a=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,u=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,c=0;for(o="";(r=u.exec(e))&&r;)r[0]&&!a.test(r[0])&&s.every(([l,f])=>r.index<l||r.index>=f)&&(o+=e.substring(c,r.index)+"<REDACTED: user-file-path>",c=u.lastIndex);c<e.length&&(o+=e.substr(c))}for(let s of i)o=o.replace(s,"");return o}removePropertiesWithPossibleUserInfo(e){if(typeof e!="object")return;let n=Object.create(null);for(let r of Object.keys(e)){let i=e[r];if(!i)continue;let o=/@[a-zA-Z0-9-.]+/;/\S*(key|token|sig|password|passwd|pwd)[="':\s]+\S*/.test(i.toLowerCase())?n[r]="<REDACTED: secret>":o.test(i)?n[r]="<REDACTED: email>":n[r]=i}return n}sendTelemetryEvent(e,n,r){this.appInsightsClient&&this.appInsightsClient.then(i=>{let o=this.cloneAndChange(n,(a,u)=>this.anonymizeFilePaths(u,this.firstParty)),s={name:`${this.config.eventPrefix}/${e}`,properties:this.removePropertiesWithPossibleUserInfo(o),measurements:r};i.trackEvent(s)})}dispose(){return new Promise(e=>{this.appInsightsClient?this.appInsightsClient.then(n=>{n.flush({callback:()=>{this.appInsightsClient=void 0,e(void 0)}})}):e(void 0)})}};var tP=class{constructor(e){this.settingsJSON=e}getDevContainerSetting(e){return this.settingsJSON[tS(e)]??this.settingsJSON[eS(e)]}getConfiguration(e){return this.settingsJSON[e]}},b7,bt=(b7=process.env.DEVCONTAINER_CLI_PATH)==null?void 0:b7.replace(/"/g,"");process.platform==="win32"&&(bt==null?void 0:bt[2])==="/"&&(bt=bt.replaceAll("/","\\"));var Ybe=bt?Je.basename(bt,Je.extname(bt)):"devcontainer",iP=process.env.WSL_DISTRO_NAME,oP=(process.env.IN_WSL??"false")==="true",sP=!bt;(async()=>{if(process.argv.length===2||process.argv.length>2&&process.argv[2]!=="build"&&process.argv[2]!=="open")return Kbe();let t=P_(process.argv.slice(2)).parserConfiguration({"boolean-negation":!1}).scriptName(Ybe).version(!1).demandCommand(1,"Specify a command").help("h").alias("h","help").completion("completion",!1).strict().option("disable-telemetry",{describe:"Disable telemetry",boolean:!0,default:!1});t.wrap(Math.min(120,t.terminalWidth())),sP||t.command("open [path]","Open a dev container in VS Code",Xbe,e=>E7("open",Jbe,e)),t.command("build [path]","Build a dev container image",Qbe,e=>E7("build",Zbe,e)),t.fail((e,n,r)=>{n||(console.error(e),r.showHelp(),process.exit(1)),n instanceof Ac?console.error(n.message):console.error(n)}),await t.argv})().catch(t=>{});async function Kbe(){let t=process.argv.slice(2),e=await C7(t),n=".";if(e["workspace-folder"]){n=e["workspace-folder"];for(let i=0;i<t.length;i++)if(t[i]==="--workspace-folder"){t.splice(i,2);break}else if(t[i].startsWith("--workspace-folder")){t.splice(i,1);break}}let r=await I7();await T7({settings:r,workspaceFolder:n,logLevel:"info",postCreateEnabled:!1,args:t})}async function E7(t,e,n){let r=await I7(),i=n["disable-telemetry"]!==!0&&((r==null?void 0:r.getConfiguration("telemetry.telemetryLevel"))||"on")==="on"&&(r==null?void 0:r.getConfiguration("telemetry.enableTelemetry"))!==!1,{sendTelemetryEvent:o,dispose:s}=await iwe(i);try{o("userCLI",{command:t}),await e({settings:r,enableTelemetry:i,sendTelemetryEvent:o},n)}finally{await s(),process.exit()}}var Ac=class extends Error{constructor(e){super(e)}};function Xbe(t){return t.positional("path",{describe:"path to project folder",default:"."}).options({config:{type:"string",description:"devcontainer.json path. The default is to use .devcontainer/devcontainer.json or, if that does not exist, .devcontainer.json in the workspace folder."}})}async function Jbe({settings:t},{config:e,path:n}){if(!bt)throw new Ac("Failed to determine CLI Path");let r=Je.dirname(bt),i=await sf(Je.join(r,"vscode-app-root"),"VS Code app root"),o=await sf(Je.join(r,"vscode-quality"),"VS Code build"),s=await sf(Je.join(r,"vscode-path"),"VS Code path"),a=process.cwd(),u=b=>Bg(b,i),c=Vr(NO(b=>process.stdout.write(b),()=>3,new Date)),l=await Ei(a,u,c),f=await A7(oP,iP,a,n,c),p=Bw(l.path,f),d=(t==null?void 0:t.getDevContainerSetting("repositoryConfigurationPaths"))??[],h=await j$(l,p,d,u)||E$(l,p.configFolderPath),m=(t==null?void 0:t.getDevContainerSetting("dockerPath"))||"docker",g=(t==null?void 0:t.getDevContainerSetting("dockerComposePath"))||"docker-compose",v=aP(),y=R7(v),_={cliHost:l,dockerPath:m,dockerComposePath:g,extensionPath:y,appRoot:i,package:await bi(v),output:c},C=(await U$(_,p.rootFolderPath,h,3)).workspace;if(C.workspaceFolder===void 0)throw new Ac("Failed to get workspace folder");let L=G$(void 0,f,C.workspaceFolder,void 0,void 0,e?qn.file(Je.resolve(process.cwd(),e)):void 0),R="";switch(o){case"stable":break;case"insider":R="-insiders";break;default:R=`${o}`;break}let D=rP.platform()==="win32"?`code${R}.cmd`:`code${R}`,O=Je.join(Je.dirname(s),"bin",D),N="";try{await(0,eP.promisify)(w7.stat)(O),N=O}catch{N=await ls(D)}let S=await(0,eP.promisify)(S7.exec)(`"${N}" --folder-uri=${L}`,{cwd:process.env.USERPROFILE??a});S.stdout.trim()!==""&&console.log(S.stdout),S.stderr.trim()!==""&&console.log(S.stderr)}function Qbe(t){return t.positional("path",{describe:"path to folder containing .devcontainer to build",type:"string"}).option("verbose",{type:"boolean",describe:"Run build with increased log level"}).options({"user-data-folder":{type:"string",description:"Host path to a directory that is intended to be persisted and share state between sessions."},"docker-path":{type:"string",description:"Docker CLI path."},"docker-compose-path":{type:"string",description:"Docker Compose CLI path."},"workspace-folder":{type:"string",description:"Workspace folder path. The devcontainer.json will be looked up relative to this path."},config:{type:"string",description:"devcontainer.json path. The default is to use .devcontainer/devcontainer.json or, if that does not exist, .devcontainer.json in the workspace folder."},"log-level":{choices:["info","debug","trace"],description:"Log level."},"log-format":{choices:["text","json"],default:"text",description:"Log format."},"no-cache":{type:"boolean",default:!1,description:"Builds the image with `--no-cache`."},"image-name":{type:"string",description:"Image name."},"cache-from":{type:"string",description:"Additional image to use as potential layer cache"},buildkit:{choices:["auto","never"],default:"auto",description:"Control whether BuildKit should be used"},platform:{type:"string",description:"Set target platforms."},push:{type:"boolean",default:!1,description:"Push to a container registry."}})}async function Zbe({settings:t},e){let n=process.argv.slice(2),r="info";if(e["log-level"])r=e["log-level"];else if(e.verbose){r="trace";let o=n.indexOf("--verbose");o>=0&&n.splice(o,1,"--log-level","trace")}let i=".";if(e["workspace-folder"]){i=e["workspace-folder"];for(let o=0;o<n.length;o++)if(n[o]==="--workspace-folder"){n.splice(o,2);break}else if(n[o].startsWith("--workspace-folder")){n.splice(o,1);break}}else if(e.path){let o=n.indexOf(e.path);o>=0&&(n.splice(o,1),i=e.path)}await T7({settings:t,workspaceFolder:i,logLevel:r,postCreateEnabled:!1,args:n})}var nP=class{constructor(e,n,r,i,o,s,a,u,c){this.cliHost=e;this.extensionPath=n;this.appRoot=r;this.pkg=i;this.buildLog=o;this.dockerPath=s;this.dockerComposePath=a;this.targetPath=u;this.dispose=c}};async function ewe(t,e,n){let r=process.cwd(),i=n==="trace"?1:n==="debug"?2:3,s=Vr({event:C=>{if(!("level"in C)||C.level<i)return;let L=!sP&&/( +)devcontainer up(?: )?( +)Create and run dev container/.exec(C.text);return L&&(C={...C,text:`${C.text.substring(0,L.index)}${L[1]}devcontainer open [path]${L[2]}Open a dev container in VS Code
|
|
${C.text.substring(L.index)}`}),process.stdout.write(C.type==="raw"?C.text:qc(C.text))}}),a=DO(s),u=Vr(s,i),{loadNativeModule:c}=await nwe(),l=bt&&Je.dirname(bt),f=l&&await sf(Je.join(l,"vscode-app-root"),"VS Code app root"),p=f?await iS(f):{applicationName:"code",commit:await Ou("stable"),quality:"stable",dataFolderName:".vscode",serverDataFolderName:".vscode-server"},d=await A7(oP,iP,r,e,s),h=aP(),m=R7(h),g=await sj(void 0,d,c,twe(t),m,await N$(),p,s,void 0),v=await CS(d,s),y=(t==null?void 0:t.getDevContainerSetting("dockerPath"))||"docker",_=(t==null?void 0:t.getDevContainerSetting("dockerComposePath"))||"docker-compose",E=await bi(h);return new nP(g,m,f,E,u,y,_,v,()=>a==null?void 0:a.dispose())}function C7(t){return new Promise((e,n)=>{P_(t).options({"docker-path":{type:"string"},"docker-compose-path":{type:"string"},"workspace-folder":{type:"string"}}).parse(t,(i,o,s)=>{if(i)return n(i);e(o)})})}async function T7(t){let{settings:e,workspaceFolder:n,logLevel:r,postCreateEnabled:i,args:o}=t,{cliHost:s,extensionPath:a,appRoot:u,pkg:c,buildLog:l,dockerPath:f,dockerComposePath:p,targetPath:d,dispose:h}=await ewe(e,n,r),m=await C7(o);!m["docker-path"]&&f!=="docker"&&o.splice(1,0,"--docker-path",f),!m["docker-compose-path"]&&p!=="docker-compose"&&o.splice(1,0,"--docker-compose-path",p),m["workspace-folder"]||o.splice(1,0,"--workspace-folder",d);let g=await D$({cliHost:s,dockerPath:m["docker-path"]||f,dockerComposePath:m["docker-compose-path"]||p,cwd:oP?await La(iP,process.cwd(),Ne):process.cwd(),env:{},extensionPath:a,appRoot:u,package:c,postCreate:Oj(i,!1,l),output:l},o);h(),g.code&&process.exit(g.code)}async function sf(t,e){try{return(await Tt(t)).toString()}catch{throw new Ac(`Failed to read ${e} from ${t}`)}}async function I7(){if(bt)try{let t=rP.platform()==="win32"?"\\User\\globalStorage":"/User/globalStorage",e=bt.indexOf(t);if(e<0)throw new Error(`Failed to determine user settings path from: ${bt}`);let n=Je.join(bt.substring(0,e+5),"settings.json"),r=await Tt(n),i=dr(r.toString());return new tP(i)}catch(t){(t==null?void 0:t.code)!=="ENOENT"&&(console.error("Failed to load user settings"),console.error(t));return}}function twe(t){return{executeInWSL:t!=null&&t.getDevContainerSetting("executeInWSL")?"always":"forWSLPath",defaultDistro:(t==null?void 0:t.getDevContainerSetting("executeInWSLDistro"))||void 0}}async function A7(t,e,n,r,i){if(r.length>1&&r.endsWith("/")&&(r=r.substring(0,r.length-1)),Je.isAbsolute(r)){if(t&&r.startsWith("/")){if(!e)throw new Ac("Using absolute paths only supported on WSL builds 18362 or later");return TS(e,r,i)}return r}return Je.join(n,r)}async function nwe(){if(bt){let e=Je.dirname(bt),n=await sf(Je.join(e,"vscode-app-root"),"VS Code app root");return{loadNativeModule:i=>Bg(i,n),appRoot:n}}return{loadNativeModule:e=>Bg(e,void 0),appRoot:void 0}}async function rwe(){if(bt){let t=Je.dirname(bt);return sf(Je.join(t,"vscode-machine-id"),"VS Code machine id")}}async function iwe(t){let e=await rwe(),n=aP(),r=await bi(n),i=t&&r.aiKey?new Zx({packageId:r.name,packageVersion:r.version,aiKey:r.aiKey,eventPrefix:"ms-vscode-remote.remote-containers",cleanupPaths:[n],commonProperties:{"common.cli":"true",...e?{"common.vscodemachineid":e}:{}}}):void 0;return{sendTelemetryEvent:(o,s,a)=>i==null?void 0:i.sendTelemetryEvent(o,s,a),dispose:()=>i==null?void 0:i.dispose()}}function aP(){return Je.join(__dirname,"..","..")}function R7(t){return sP?t:Je.join(t,"..")}
|
|
/*! Bundled license information:
|
|
|
|
@microsoft/applicationinsights-web-snippet/dist/esm/applicationinsights-web-snippet.js:
|
|
(*!
|
|
* Application Insights JavaScript SDK - Web Snippet, 1.0.1
|
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
*)
|
|
|
|
mime-db/index.js:
|
|
(*!
|
|
* mime-db
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
* MIT Licensed
|
|
*)
|
|
|
|
mime-types/index.js:
|
|
(*!
|
|
* mime-types
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
* MIT Licensed
|
|
*)
|
|
|
|
yargs-parser/build/lib/string-utils.js:
|
|
(**
|
|
* @license
|
|
* Copyright (c) 2016, Contributors
|
|
* SPDX-License-Identifier: ISC
|
|
*)
|
|
|
|
yargs-parser/build/lib/tokenize-arg-string.js:
|
|
(**
|
|
* @license
|
|
* Copyright (c) 2016, Contributors
|
|
* SPDX-License-Identifier: ISC
|
|
*)
|
|
|
|
yargs-parser/build/lib/yargs-parser-types.js:
|
|
(**
|
|
* @license
|
|
* Copyright (c) 2016, Contributors
|
|
* SPDX-License-Identifier: ISC
|
|
*)
|
|
|
|
yargs-parser/build/lib/yargs-parser.js:
|
|
(**
|
|
* @license
|
|
* Copyright (c) 2016, Contributors
|
|
* SPDX-License-Identifier: ISC
|
|
*)
|
|
|
|
yargs-parser/build/lib/index.js:
|
|
(**
|
|
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
|
* CJS and ESM environments.
|
|
*
|
|
* @license
|
|
* Copyright (c) 2016, Contributors
|
|
* SPDX-License-Identifier: ISC
|
|
*)
|
|
|
|
js-yaml/dist/js-yaml.mjs:
|
|
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
*/
|
|
//# sourceMappingURL=devContainersUserCLI.js.map
|