"use strict";var Gz=Object.create;var nh=Object.defineProperty;var ZT=Object.getOwnPropertyDescriptor;var Kz=Object.getOwnPropertyNames;var zz=Object.getPrototypeOf,Xz=Object.prototype.hasOwnProperty;var Jz=(t,e)=>()=>(t&&(e=t(t=0)),e);var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yz=(t,e)=>{for(var r in e)nh(t,r,{get:e[r],enumerable:!0})},e$=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Kz(e))!Xz.call(t,n)&&n!==r&&nh(t,n,{get:()=>e[n],enumerable:!(i=ZT(e,n))||i.enumerable});return t};var S=(t,e,r)=>(r=t!=null?Gz(zz(t)):{},e$(e||!t||!t.__esModule?nh(r,"default",{value:t,enumerable:!0}):r,t)),Qz=t=>e$(nh({},"__esModule",{value:!0}),t),k=(t,e,r,i)=>{for(var n=i>1?void 0:i?ZT(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&nh(e,r,n),n},A=(t,e)=>(r,i)=>e(r,i,t);var Se=b((c_e,o$)=>{"use strict";var Zz=Object.create,yH=Object.defineProperty,eX=Object.getOwnPropertyDescriptor,i$=Object.getOwnPropertyNames,tX=Object.getPrototypeOf,rX=Object.prototype.hasOwnProperty,iX=(t,e)=>function(){return e||(0,t[i$(t)[0]])((e={exports:{}}).exports,e),e.exports},nX=(t,e)=>{for(var r in e)yH(t,r,{get:e[r],enumerable:!0})},n$=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i$(e))!rX.call(t,n)&&n!==r&&yH(t,n,{get:()=>e[n],enumerable:!(i=eX(e,n))||i.enumerable});return t},sX=(t,e,r)=>(r=t!=null?Zz(tX(t)):{},n$(e||!t||!t.__esModule?yH(r,"default",{value:t,enumerable:!0}):r,t)),oX=t=>n$(yH({},"__esModule",{value:!0}),t),aX=iX({"node_modules/request-light/lib/node/main.js"(t){(()=>{var e={46:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u,c,{signal:l}={}){return new Promise((p,f)=>{function h(){l?.removeEventListener("abort",h),u.removeListener(c,g),u.removeListener("error",H)}function g(...v){h(),p(v)}function H(v){h(),f(v)}l?.addEventListener("abort",h),u.on(c,g),u.on("error",H)})}},54:function(o,a,u){"use strict";var c=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};let l=u(361),p=c(u(374)),f=c(u(304)),h=p.default("agent-base");function g(){let{stack:v}=new Error;return typeof v=="string"&&v.split(`
`).some(w=>w.indexOf("(https.js:")!==-1||w.indexOf("node:https:")!==-1)}function H(v,w){return new H.Agent(v,w)}(function(v){class w extends l.EventEmitter{constructor(U,x){super();let P=x;typeof U=="function"?this.callback=U:U&&(P=U),this.timeout=null,P&&typeof P.timeout=="number"&&(this.timeout=P.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:g()?443:80}set defaultPort(U){this.explicitDefaultPort=U}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:g()?"https:":"http:"}set protocol(U){this.explicitProtocol=U}callback(U,x,P){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(U,x){let P=Object.assign({},x);typeof P.secureEndpoint!="boolean"&&(P.secureEndpoint=g()),P.host==null&&(P.host="localhost"),P.port==null&&(P.port=P.secureEndpoint?443:80),P.protocol==null&&(P.protocol=P.secureEndpoint?"https:":"http:"),P.host&&P.path&&delete P.path,delete P.agent,delete P.hostname,delete P._defaultAgent,delete P.defaultPort,delete P.createConnection,U._last=!0,U.shouldKeepAlive=!1;let q=!1,j=null,F=P.timeout||this.timeout,$=N=>{U._hadError||(U.emit("error",N),U._hadError=!0)},O=()=>{j=null,q=!0;let N=new Error(`A "socket" was not created for HTTP request before ${F}ms`);N.code="ETIMEOUT",$(N)},E=N=>{q||(j!==null&&(clearTimeout(j),j=null),$(N))},M=N=>{if(q)return;if(j!=null&&(clearTimeout(j),j=null),z=N,Boolean(z)&&typeof z.addRequest=="function")return h("Callback returned another Agent instance %o",N.constructor.name),void N.addRequest(U,P);var z;if(N)return N.once("free",()=>{this.freeSocket(N,P)}),void U.onSocket(N);let D=new Error(`no Duplex stream was returned to agent-base for \`${U.method} ${U.path}\``);$(D)};if(typeof this.callback=="function"){this.promisifiedCallback||(this.callback.length>=3?(h("Converting legacy callback function to promise"),this.promisifiedCallback=f.default(this.callback)):this.promisifiedCallback=this.callback),typeof F=="number"&&F>0&&(j=setTimeout(O,F)),"port"in P&&typeof P.port!="number"&&(P.port=Number(P.port));try{h("Resolving socket for %o request: %o",P.protocol,`${U.method} ${U.path}`),Promise.resolve(this.promisifiedCallback(U,P)).then(M,E)}catch(N){Promise.reject(N).catch(E)}}else $(new Error("`callback` is not defined"))}freeSocket(U,x){h("Freeing socket %o %o",U.constructor.name,x),U.destroy()}destroy(){h("Destroying agent %o",this.constructor.name)}}v.Agent=w,v.prototype=v.Agent.prototype})(H||(H={})),o.exports=H},304:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(u){return function(c,l){return new Promise((p,f)=>{u.call(this,c,l,(h,g)=>{h?f(h):p(g)})})}}},370:function(o,a,u){"use strict";var c=this&&this.__awaiter||function(U,x,P,q){return new(P||(P=Promise))(function(j,F){function $(M){try{E(q.next(M))}catch(N){F(N)}}function O(M){try{E(q.throw(M))}catch(N){F(N)}}function E(M){var N;M.done?j(M.value):(N=M.value,N instanceof P?N:new P(function(z){z(N)})).then($,O)}E((q=q.apply(U,x||[])).next())})},l=this&&this.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),h=l(u(310)),g=l(u(374)),H=l(u(46)),v=u(54),w=(0,g.default)("http-proxy-agent");class T extends v.Agent{constructor(x){let P;if(P=typeof x=="string"?h.default.parse(x):x,!P)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");w("Creating new HttpProxyAgent instance: %o",P),super(P);let q=Object.assign({},P);var j;this.secureProxy=P.secureProxy||typeof(j=q.protocol)=="string"&&/^https:?$/i.test(j),q.host=q.hostname||q.host,typeof q.port=="string"&&(q.port=parseInt(q.port,10)),!q.port&&q.host&&(q.port=this.secureProxy?443:80),q.host&&q.path&&(delete q.path,delete q.pathname),this.proxy=q}callback(x,P){return c(this,void 0,void 0,function*(){let{proxy:q,secureProxy:j}=this,F=h.default.parse(x.path),$;if(F.protocol||(F.protocol="http:"),F.hostname||(F.hostname=P.hostname||P.host||null),F.port==null&&(P.port,1)&&(F.port=String(P.port)),F.port==="80"&&(F.port=""),x.path=h.default.format(F),q.auth&&x.setHeader("Proxy-Authorization",`Basic ${Buffer.from(q.auth).toString("base64")}`),j?(w("Creating `tls.Socket`: %o",q),$=f.default.connect(q)):(w("Creating `net.Socket`: %o",q),$=p.default.connect(q)),x._header){let O,E;w("Regenerating stored HTTP header string for request"),x._header=null,x._implicitHeader(),x.output&&x.output.length>0?(w("Patching connection write() output buffer with updated header"),O=x.output[0],E=O.indexOf(`\r
\r
`)+4,x.output[0]=x._header+O.substring(E),w("Output buffer: %o",x.output)):x.outputData&&x.outputData.length>0&&(w("Patching connection write() output buffer with updated header"),O=x.outputData[0].data,E=O.indexOf(`\r
\r
`)+4,x.outputData[0].data=x._header+O.substring(E),w("Output buffer: %o",x.outputData[0].data))}return yield(0,H.default)($,"connect"),$})}}a.default=T},201:function(o,a,u){"use strict";let c=(this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}})(u(370));function l(p){return new c.default(p)}(function(p){p.HttpProxyAgent=c.default,p.prototype=c.default.prototype})(l||(l={})),o.exports=l},146:function(o,a,u){"use strict";var c=this&&this.__awaiter||function(P,q,j,F){return new(j||(j=Promise))(function($,O){function E(z){try{N(F.next(z))}catch(D){O(D)}}function M(z){try{N(F.throw(z))}catch(D){O(D)}}function N(z){var D;z.done?$(z.value):(D=z.value,D instanceof j?D:new j(function(L){L(D)})).then(E,M)}N((F=F.apply(P,q||[])).next())})},l=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(a,"__esModule",{value:!0});let p=l(u(808)),f=l(u(404)),h=l(u(310)),g=l(u(491)),H=l(u(374)),v=u(54),w=l(u(829)),T=H.default("https-proxy-agent:agent");class U extends v.Agent{constructor(q){let j;if(j=typeof q=="string"?h.default.parse(q):q,!j)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");T("creating new HttpsProxyAgent instance: %o",j),super(j);let F=Object.assign({},j);var $;this.secureProxy=j.secureProxy||typeof($=F.protocol)=="string"&&/^https:?$/i.test($),F.host=F.hostname||F.host,typeof F.port=="string"&&(F.port=parseInt(F.port,10)),!F.port&&F.host&&(F.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in F)&&(F.ALPNProtocols=["http 1.1"]),F.host&&F.path&&(delete F.path,delete F.pathname),this.proxy=F}callback(q,j){return c(this,void 0,void 0,function*(){let{proxy:F,secureProxy:$}=this,O;$?(T("Creating `tls.Socket`: %o",F),O=f.default.connect(F)):(T("Creating `net.Socket`: %o",F),O=p.default.connect(F));let E=Object.assign({},F.headers),M=`CONNECT ${j.host}:${j.port} HTTP/1.1\r
`;F.auth&&(E["Proxy-Authorization"]=`Basic ${Buffer.from(F.auth).toString("base64")}`);let{host:N,port:z,secureEndpoint:D}=j;(function(J,te){return Boolean(!te&&J===80||te&&J===443)})(z,D)||(N+=`:${z}`),E.Host=N,E.Connection="close";for(let J of Object.keys(E))M+=`${J}: ${E[J]}\r
`;let L=w.default(O);O.write(`${M}\r
`);let{statusCode:ee,buffered:re}=yield L;if(ee===200){if(q.once("socket",x),j.secureEndpoint){T("Upgrading socket connection to TLS");let J=j.servername||j.host;return f.default.connect(Object.assign(Object.assign({},function(te,...ce){let ae={},he;for(he in te)ce.includes(he)||(ae[he]=te[he]);return ae}(j,"host","hostname","path","port")),{socket:O,servername:J}))}return O}O.destroy();let ie=new p.default.Socket({writable:!1});return ie.readable=!0,q.once("socket",J=>{T("replaying proxy buffer for failed request"),g.default(J.listenerCount("data")>0),J.push(re),J.push(null)}),ie})}}function x(P){P.resume()}a.default=U},18:function(o,a,u){"use strict";let c=(this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}})(u(146));function l(p){return new c.default(p)}(function(p){p.HttpsProxyAgent=c.default,p.prototype=c.default.prototype})(l||(l={})),o.exports=l},829:function(o,a,u){"use strict";var c=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(a,"__esModule",{value:!0});let l=c(u(374)).default("https-proxy-agent:parse-proxy-response");a.default=function(p){return new Promise((f,h)=>{let g=0,H=[];function v(){let U=p.read();U?function(x){H.push(x),g+=x.length;let P=Buffer.concat(H,g);if(P.indexOf(`\r
\r
`)===-1)return l("have not received end of HTTP headers yet..."),void v();let q=P.toString("ascii",0,P.indexOf(`\r
`)),j=+q.split(" ")[1];l("got proxy server response: %o",q),f({statusCode:j,buffered:P})}(U):p.once("readable",v)}function w(U){l("onclose had error %o",U)}function T(){l("onend")}p.on("error",function U(x){p.removeListener("end",T),p.removeListener("error",U),p.removeListener("close",w),p.removeListener("readable",v),l("onerror %o",x),h(x)}),p.on("close",w),p.on("end",T),v()})}},539:function(o,a,u){"use strict";var c,l=this&&this.__extends||(c=function($,O){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,M){E.__proto__=M}||function(E,M){for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(E[N]=M[N])},c($,O)},function($,O){if(typeof O!="function"&&O!==null)throw new TypeError("Class extends value "+String(O)+" is not a constructor or null");function E(){this.constructor=$}c($,O),$.prototype=O===null?Object.create(O):(E.prototype=O.prototype,new E)}),p=this&&this.__assign||function(){return p=Object.assign||function($){for(var O,E=1,M=arguments.length;E<M;E++)for(var N in O=arguments[E])Object.prototype.hasOwnProperty.call(O,N)&&($[N]=O[N]);return $},p.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.getErrorStatusDescription=a.xhr=a.configure=void 0;var f=u(685),h=u(687),g=u(310),H=u(472),v=u(796),w=u(201),T=u(18);if(process.env.VSCODE_NLS_CONFIG){var U=process.env.VSCODE_NLS_CONFIG;H.config(JSON.parse(U))}var x=H.loadMessageBundle(),P=void 0,q=!0;function j($){var O;return new Promise(function(E,M){var N=(0,g.parse)($.url),z={hostname:N.hostname,agent:!!$.agent&&$.agent,port:N.port?parseInt(N.port):N.protocol==="https:"?443:80,path:N.path,method:$.type||"GET",headers:$.headers,rejectUnauthorized:typeof $.strictSSL!="boolean"||$.strictSSL};$.user&&$.password&&(z.auth=$.user+":"+$.password);var D=function(L){if(L.statusCode>=300&&L.statusCode<400&&$.followRedirects&&$.followRedirects>0&&L.headers.location){var ee=L.headers.location;ee.startsWith("/")&&(ee=(0,g.format)({protocol:N.protocol,hostname:N.hostname,port:N.port,pathname:ee})),E(j(function(re){for(var ie=[],J=1;J<arguments.length;J++)ie[J-1]=arguments[J];return ie.forEach(function(te){return Object.keys(te).forEach(function(ce){return re[ce]=te[ce]})}),re}({},$,{url:ee,followRedirects:$.followRedirects-1})))}else E({req:O,res:L})};(O=N.protocol==="https:"?h.request(z,D):f.request(z,D)).on("error",M),$.timeout&&O.setTimeout($.timeout),$.data&&O.write($.data),O.end(),$.token&&($.token.isCancellationRequested&&O.destroy(new F),$.token.onCancellationRequested(function(){O.destroy(new F)}))})}a.configure=function($,O){P=$,q=O},a.xhr=function($){return typeof($=p({},$)).strictSSL!="boolean"&&($.strictSSL=q),$.agent||($.agent=function(O,E){E===void 0&&(E={});var M=(0,g.parse)(O),N=E.proxyUrl||function(L){return L.protocol==="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:L.protocol==="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(M);if(!N)return null;var z=(0,g.parse)(N);if(!/^https?:$/.test(z.protocol))return null;var D={host:z.hostname,port:Number(z.port),auth:z.auth,rejectUnauthorized:typeof E.strictSSL!="boolean"||E.strictSSL,protocol:z.protocol};return M.protocol==="http:"?w(D):T(D)}($.url,{proxyUrl:P,strictSSL:q})),typeof $.followRedirects!="number"&&($.followRedirects=5),j($).then(function(O){return new Promise(function(E,M){var N,z,D=O.res,L=D,ee=!1,re=D.headers&&D.headers["content-encoding"];if(re&&(N=$.type,z=O.res.statusCode,!(N==="HEAD"||z>=100&&z<200||z===204||z===304))){var ie={flush:v.constants.Z_SYNC_FLUSH,finishFlush:v.constants.Z_SYNC_FLUSH};if(re==="gzip"){var J=v.createGunzip(ie);D.pipe(J),L=J}else if(re==="deflate"){var te=v.createInflate(ie);D.pipe(te),L=te}}var ce=[];L.on("data",function(ae){return ce.push(ae)}),L.on("end",function(){if(!ee){if(ee=!0,$.followRedirects>0&&(D.statusCode>=300&&D.statusCode<=303||D.statusCode===307)){var ae=D.headers.location;if(ae.startsWith("/")){var he=(0,g.parse)($.url);ae=(0,g.format)({protocol:he.protocol,hostname:he.hostname,port:he.port,pathname:ae})}if(ae){var dt={type:$.type,url:ae,user:$.user,password:$.password,headers:$.headers,timeout:$.timeout,followRedirects:$.followRedirects-1,data:$.data,token:$.token};return void(0,a.xhr)(dt).then(E,M)}}var ge=Buffer.concat(ce),Gt={responseText:ge.toString(),body:ge,status:D.statusCode,headers:D.headers||{}};D.statusCode>=200&&D.statusCode<300||D.statusCode===1223?E(Gt):M(Gt)}}),L.on("error",function(ae){var he;he=F.is(ae)?ae:{responseText:x("error","Unable to access {0}. Error: {1}",$.url,ae.message),body:Buffer.concat(ce),status:500,headers:{}},ee=!0,M(he)}),$.token&&($.token.isCancellationRequested&&L.destroy(new F),$.token.onCancellationRequested(function(){L.destroy(new F)}))})},function(O){var E;return E=F.is(O)?O:{responseText:$.agent?x("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",$.url,O.message):x("error.cannot.connect","Unable to connect to {0}. Error: {1}",$.url,O.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(E)})},a.getErrorStatusDescription=function($){if(!($<400))switch($){case 400:return x("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return x("status.401","Unauthorized. The server is refusing to respond.");case 403:return x("status.403","Forbidden. The server is refusing to respond.");case 404:return x("status.404","Not Found. The requested location could not be found.");case 405:return x("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return x("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return x("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return x("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return x("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return x("status.410","Gone. The requested page is no longer available.");case 411:return x("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return x("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return x("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return x("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return x("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return x("status.500","Internal Server Error.");case 501:return x("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 x("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return x("status.416","HTTP status code {0}",$)}};var F=function($){function O(){var E=$.call(this,"The user aborted a request")||this;return E.name="AbortError",Object.setPrototypeOf(E,O.prototype),E}return l(O,$),O.is=function(E){return E instanceof O},O}(Error)},800:(o,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,p,f=u(926);function h(H){return H!==void 0}function g(H,v){return a.isPseudo&&(H="\uFF3B"+H.replace(/[aouei]/g,"$&$&")+"\uFF3D"),v.length===0?H:H.replace(/\{(\d+)\}/g,function(w,T){var U=T[0],x=v[U],P=w;return typeof x=="string"?P=x:typeof x!="number"&&typeof x!="boolean"&&x!=null||(P=String(x)),P})}(p=a.MessageFormat||(a.MessageFormat={})).file="file",p.bundle="bundle",p.both="both",(l=a.BundleFormat||(a.BundleFormat={})).standalone="standalone",l.languagePack="languagePack",function(H){H.is=function(v){var w=v;return w&&h(w.key)&&h(w.comment)}}(c||(c={})),a.isDefined=h,a.isPseudo=!1,a.setPseudo=function(H){a.isPseudo=H},a.format=g,a.localize=function(H,v){for(var w=[],T=2;T<arguments.length;T++)w[T-2]=arguments[T];return g(v,w)},a.loadMessageBundle=function(H){return(0,f.default)().loadMessageBundle(H)},a.config=function(H){return(0,f.default)().config(H)}},926:(o,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(p){if(p===void 0)throw new Error("No runtime abstraction layer provided");u=p}}(c||(c={})),a.default=c},472:(o,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),p=u(926),f=u(800),h=u(800);Object.defineProperty(a,"MessageFormat",{enumerable:!0,get:function(){return h.MessageFormat}}),Object.defineProperty(a,"BundleFormat",{enumerable:!0,get:function(){return h.BundleFormat}});var g,H,v=Object.prototype.toString;function w(O){return v.call(O)==="[object Number]"}function T(O){return v.call(O)==="[object String]"}function U(O){return JSON.parse(l.readFileSync(O,"utf8"))}function x(O){return function(E,M){for(var N=[],z=2;z<arguments.length;z++)N[z-2]=arguments[z];return w(E)?E>=O.length?void console.error(`Broken localize call found. Index out of bounds. Stacktrace is
: `.concat(new Error("").stack)):(0,f.format)(O[E],N):T(M)?(console.warn("Message ".concat(M," didn't get externalized correctly.")),(0,f.format)(M,N)):void console.error(`Broken localize call found. Stacktrace is
: `.concat(new Error("").stack))}}function P(O,E){return g[O]=E,E}function q(O){try{return function(E){var M=U(c.join(E,"nls.metadata.json")),N=Object.create(null);for(var z in M){var D=M[z];N[z]=D.messages}return N}(O)}catch(E){return void console.log("Generating default bundle from meta data failed.",E)}}function j(O,E){var M;if(H.languagePackSupport===!0&&H.cacheRoot!==void 0&&H.languagePackId!==void 0&&H.translationsConfigFile!==void 0&&H.translationsConfig!==void 0)try{M=function(z,D){var L,ee,re,ie=c.join(H.cacheRoot,"".concat(z.id,"-").concat(z.hash,".json")),J=!1,te=!1;try{return L=JSON.parse(l.readFileSync(ie,{encoding:"utf8",flag:"r"})),ee=ie,re=new Date,l.utimes(ee,re,re,function(){}),L}catch(ce){if(ce.code==="ENOENT")te=!0;else{if(!(ce instanceof SyntaxError))throw ce;console.log("Syntax error parsing message bundle: ".concat(ce.message,".")),l.unlink(ie,function(ae){ae&&console.error("Deleting corrupted bundle ".concat(ie," failed."))}),J=!0}}if(L=function(ce,ae){var he=H.translationsConfig[ce.id];if(he){var dt=U(he).contents,ge=U(c.join(ae,"nls.metadata.json")),Gt=Object.create(null);for(var kr in ge){var Z=ge[kr],Ae=dt["".concat(ce.outDir,"/").concat(kr)];if(Ae){for(var Q=[],be=0;be<Z.keys.length;be++){var Ge=Z.keys[be],wt=Ae[T(Ge)?Ge:Ge.key];wt===void 0&&(wt=Z.messages[be]),Q.push(wt)}Gt[kr]=Q}else Gt[kr]=Z.messages}return Gt}}(z,D),!L||J)return L;if(te)try{l.writeFileSync(ie,JSON.stringify(L),{encoding:"utf8",flag:"wx"})}catch(ce){if(ce.code==="EEXIST")return L;throw ce}return L}(O,E)}catch(z){console.log("Load or create bundle failed ",z)}if(!M){if(H.languagePackSupport)return q(E);var N=function(z){for(var D=H.language;D;){var L=c.join(z,"nls.bundle.".concat(D,".json"));if(l.existsSync(L))return L;var ee=D.lastIndexOf("-");D=ee>0?D.substring(0,ee):void 0}if(D===void 0&&(L=c.join(z,"nls.bundle.json"),l.existsSync(L)))return L}(E);if(N)try{return U(N)}catch(z){console.log("Loading in the box message bundle failed.",z)}M=q(E)}return M}function F(O){if(!O)return f.localize;var E=c.extname(O);if(E&&(O=O.substr(0,O.length-E.length)),H.messageFormat===f.MessageFormat.both||H.messageFormat===f.MessageFormat.bundle){var M=function(J){for(var te,ce=c.dirname(J);te=c.join(ce,"nls.metadata.header.json"),!l.existsSync(te);){var ae=c.dirname(ce);if(ae===ce){te=void 0;break}ce=ae}return te}(O);if(M){var N=c.dirname(M),z=g[N];if(z===void 0)try{var D=JSON.parse(l.readFileSync(M,"utf8"));try{var L=j(D,N);z=P(N,L?{header:D,nlsBundle:L}:null)}catch(J){console.error("Failed to load nls bundle",J),z=P(N,null)}}catch(J){console.error("Failed to read header file",J),z=P(N,null)}if(z){var ee=O.substr(N.length+1).replace(/\\/g,"/"),re=z.nlsBundle[ee];return re===void 0?(console.error("Messages for file ".concat(O," not found. See console for details.")),function(){return"Messages not found."}):x(re)}}}if(H.messageFormat===f.MessageFormat.both||H.messageFormat===f.MessageFormat.file)try{var ie=U(function(J){var te;if(!(H.cacheLanguageResolution&&te)){if(f.isPseudo||!H.language)te=".nls.json";else for(var ce=H.language;ce;){var ae=".nls."+ce+".json";if(l.existsSync(J+ae)){te=ae;break}var he=ce.lastIndexOf("-");he>0?ce=ce.substring(0,he):(te=".nls.json",ce=null)}H.cacheLanguageResolution}return J+te}(O));return Array.isArray(ie)?x(ie):(0,f.isDefined)(ie.messages)&&(0,f.isDefined)(ie.keys)?x(ie.messages):(console.error("String bundle '".concat(O,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(J){J.code!=="ENOENT"&&console.error("Failed to load single file bundle",J)}return console.error("Failed to load message bundle for file ".concat(O)),function(){return"Failed to load message bundle. See console for details."}}function $(O){return O&&(T(O.locale)&&(H.locale=O.locale.toLowerCase(),H.language=H.locale,g=Object.create(null)),O.messageFormat!==void 0&&(H.messageFormat=O.messageFormat),O.bundleFormat===f.BundleFormat.standalone&&H.languagePackSupport===!0&&(H.languagePackSupport=!1)),(0,f.setPseudo)(H.locale==="pseudo"),F}(function(){if(H={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:f.MessageFormat.bundle},T(process.env.VSCODE_NLS_CONFIG))try{var O=JSON.parse(process.env.VSCODE_NLS_CONFIG),E=void 0;if(O.availableLanguages){var M=O.availableLanguages["*"];T(M)&&(E=M)}if(T(O.locale)&&(H.locale=O.locale.toLowerCase()),E===void 0?H.language=H.locale:E!=="en"&&(H.language=E),function(z){return z===!0||z===!1}(O._languagePackSupport)&&(H.languagePackSupport=O._languagePackSupport),T(O._cacheRoot)&&(H.cacheRoot=O._cacheRoot),T(O._languagePackId)&&(H.languagePackId=O._languagePackId),T(O._translationsConfigFile)){H.translationsConfigFile=O._translationsConfigFile;try{H.translationsConfig=U(H.translationsConfigFile)}catch{if(O._corruptedFile){var N=c.dirname(O._corruptedFile);l.exists(N,function(D){D&&l.writeFile(O._corruptedFile,"corrupted","utf8",function(L){console.error(L)})})}}}}catch{}(0,f.setPseudo)(H.locale==="pseudo"),g=Object.create(null)})(),a.loadMessageBundle=F,a.config=$,p.default.install(Object.freeze({loadMessageBundle:F,config:$}))},374:(o,a)=>{function u(){}Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(c){return u}},491:o=>{"use strict";o.exports=require("assert")},361:o=>{"use strict";o.exports=require("events")},147:o=>{"use strict";o.exports=require("fs")},685:o=>{"use strict";o.exports=require("http")},687:o=>{"use strict";o.exports=require("https")},808:o=>{"use strict";o.exports=require("net")},17:o=>{"use strict";o.exports=require("path")},404:o=>{"use strict";o.exports=require("tls")},310:o=>{"use strict";o.exports=require("url")},796:o=>{"use strict";o.exports=require("zlib")}},r={},i=function o(a){var u=r[a];if(u!==void 0)return u.exports;var c=r[a]={exports:{}};return e[a].call(c.exports,c,c.exports,o),c.exports}(539),n=t;for(var s in i)n[s]=i[s];i.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})()}}),s$={};nX(s$,{config:()=>fX,t:()=>dX});o$.exports=oX(s$);var uX=require("fs"),cX=require("fs/promises"),t$=sX(aX());async function lX(t){if(t.protocol==="file:")return await(0,cX.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:")try{let e=await(0,t$.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,t$.getErrorStatusDescription)(e.status)??e.toString())}throw new Error("Unsupported protocol")}function pX(t){return(0,uX.readFileSync)(t,"utf8")}var Hl;function fX(t){if("contents"in t){typeof t.contents=="string"?Hl=JSON.parse(t.contents):Hl=t.contents;return}if("fsPath"in t){let e=pX(t.fsPath),r=JSON.parse(e);Hl=r$(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,i)=>{let n=lX(e).then(s=>{try{let o=JSON.parse(s);Hl=r$(o)?o.contents.bundle:o}catch(o){i(o)}}).catch(s=>{i(s)});r(n)})}}function dX(...t){let e=t[0],r,i,n;if(typeof e=="string"?(r=e,i=e,t.splice(0,1),n=!t||typeof t[0]!="object"?t:t[0]):(i=e.message,r=i,e.comment&&e.comment.length>0&&(r+=`/${Array.isArray(e.comment)?e.comment.join():e.comment}`),n=e.args??{}),!Hl)return sh(i,n);let s=Hl[r];return s?typeof s=="string"?sh(s,n):s.comment?sh(s.message,n):sh(i,n):sh(i,n)}var hX=/{([^}]+)}/g;function sh(t,e){return t.replace(hX,(r,i)=>e[i]??r)}function r$(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});var Gu=b(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.findWindowsCandidates=ci.sort=ci.preferredEdgePath=ci.preferredChromePath=ci.escapeRegexSpecialChars=ci.canAccess=void 0;var EX=require("path");async function LH({access:t},e){if(!e)return!1;try{return await t(e),!0}catch{return!1}}ci.canAccess=LH;var SX="/\\.?*()^${}|[]+";function CX(t,e){let r=SX.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}ci.escapeRegexSpecialChars=CX;async function xX(t,e){if(await LH(t,e.CHROME_PATH))return e.CHROME_PATH}ci.preferredChromePath=xX;async function DX(t,e){if(await LH(t,e.EDGE_PATH))return e.EDGE_PATH}ci.preferredEdgePath=DX;function PX(t,e){return[...t].filter(i=>!!i).map(i=>{let n=e.find(s=>s.regex.test(i));return n?{path:i,weight:n.weight,quality:n.quality}:{path:i,weight:10,quality:"dev"}}).sort((i,n)=>n.weight-i.weight).map(i=>({path:i.path,quality:i.quality}))}ci.sort=PX;async function LX(t,e,r){let i=[t.LOCALAPPDATA,t.PROGRAMFILES,t["PROGRAMFILES(X86)"]].filter(s=>!!s),n=[];for(let s of i)for(let o of r){let a=EX.win32.join(s,o.name);n.push(LH(e,a).then(u=>u?{path:a,quality:o.type}:void 0))}return(await Promise.all(n)).filter(s=>!!s)}ci.findWindowsCandidates=LX});var FA=b(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});TH.DarwinFinderBase=void 0;var TX=require("path"),OA=Gu(),g$=/( \(0x[a-f0-9]+\))/,NA=class{constructor(e,r,i){this.env=e,this.fs=r,this.execa=i,this.lsRegisterCommand="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump",this.wellKnownPaths=[]}async findWhere(e){for(let r of this.wellKnownPaths)if(e(r)&&await(0,OA.canAccess)(this.fs,r.path))return r;return(await this.findAll()).find(e)}findAll(){var e;return(e=this.foundAll)!==null&&e!==void 0||(this.foundAll=this.findAllInner()),this.foundAll}async findLaunchRegisteredApps(e,r,i){let{stdout:n}=await this.execa.command(`${this.lsRegisterCommand} | awk 'tolower($0) ~ /${e.toLowerCase()}${g$.source}?$/ { $1=""; print $0 }'`,{shell:!0,stdio:"pipe"}),s=[...r,...n.split(`
`).map(u=>u.trim().replace(g$,""))].filter(u=>!!u),o=this.getPreferredPath();o&&s.push(o);let a=new Set;for(let u of s)for(let c of i){let l=TX.posix.join(u.trim(),c);try{await this.fs.access(l),a.add(l)}catch{}}return a}createPriorities(e){let r=this.env.HOME&&(0,OA.escapeRegexSpecialChars)(this.env.HOME),i=this.getPreferredPath(),n=e.reduce((s,o)=>[...s,{regex:new RegExp(`^/Applications/.*${o.name}`),weight:o.weight+100,quality:o.quality},{regex:new RegExp(`^${r}/Applications/.*${o.name}`),weight:o.weight,quality:o.quality},{regex:new RegExp(`^/Volumes/.*${o.name}`),weight:o.weight-100,quality:o.quality}],[]);return i&&n.unshift({regex:new RegExp((0,OA.escapeRegexSpecialChars)(i)),weight:151,quality:"custom"}),n}};TH.DarwinFinderBase=NA});var H$=b($H=>{"use strict";Object.defineProperty($H,"__esModule",{value:!0});$H.DarwinChromeBrowserFinder=void 0;var $X=Gu(),kX=FA(),BA=class extends kX.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",quality:"stable"},{path:"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",quality:"canary"},{path:"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta",quality:"beta"},{path:"/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Google Chrome Canary","/Contents/MacOS/Google Chrome Beta","/Contents/MacOS/Google Chrome Dev","/Contents/MacOS/Google Chrome"],r=["/Applications/Google Chrome.app","/Applications/Google Chrome Canary.app"],i=await this.findLaunchRegisteredApps("google chrome[A-Za-z() ]*.app",r,e);return(0,$X.sort)(i,this.createPriorities([{name:"Chrome.app",weight:0,quality:"stable"},{name:"Chrome Canary.app",weight:1,quality:"canary"},{name:"Chrome Beta.app",weight:2,quality:"beta"},{name:"Chrome Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.CHROME_PATH}};$H.DarwinChromeBrowserFinder=BA});var y$=b(kH=>{"use strict";Object.defineProperty(kH,"__esModule",{value:!0});kH.DarwinEdgeBrowserFinder=void 0;var RX=Gu(),MX=FA(),UA=class extends MX.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",quality:"stable"},{path:"/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary",quality:"canary"},{path:"/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta",quality:"beta"},{path:"/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Microsoft Edge Canary","/Contents/MacOS/Microsoft Edge Beta","/Contents/MacOS/Microsoft Edge Dev","/Contents/MacOS/Microsoft Edge"],r=["/Applications/Microsoft Edge.app"],i=await this.findLaunchRegisteredApps("Microsoft Edge[A-Za-z ]*.app",r,e);return(0,RX.sort)(i,this.createPriorities([{name:"Microsoft Edge.app",weight:0,quality:"stable"},{name:"Microsoft Edge Canary.app",weight:1,quality:"canary"},{name:"Microsoft Edge Beta.app",weight:2,quality:"beta"},{name:"Microsoft Edge Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.EDGE_PATH}};kH.DarwinEdgeBrowserFinder=UA});var WA=b(RH=>{"use strict";Object.defineProperty(RH,"__esModule",{value:!0});RH.LinuxChromeBrowserFinder=void 0;var OX=require("path"),bl=Gu(),jA=require("child_process"),NX=require("os"),v$=/\r?\n/,qA=class{constructor(e,r){this.env=e,this.fs=r,this.pathEnvironmentVar="CHROME_PATH",this.priorities=[{regex:/chrome-wrapper$/,weight:54,quality:"custom"},{regex:/google-chrome-dev$/,weight:53,quality:"dev"},{regex:/google-chrome-canary$/,weight:52,quality:"canary"},{regex:/google-chrome-unstable$/,weight:51,quality:"canary"},{regex:/google-chrome-canary$/,weight:51,quality:"canary"},{regex:/google-chrome-stable$/,weight:50,quality:"stable"},{regex:/google-chrome$/,weight:49,quality:"stable"},{regex:/chromium-browser$/,weight:48,quality:"custom"},{regex:/chromium$/,weight:47,quality:"custom"}],this.executablesOnPath=["google-chrome-unstable","google-chrome-dev","google-chrome-beta","google-chrome-canary","google-chrome-stable","google-chrome","chromium-browser","chromium"]}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=new Set,r=this.env[this.pathEnvironmentVar];r&&await(0,bl.canAccess)(this.fs,r)&&e.add(r),[OX.posix.join((0,NX.homedir)(),".local/share/applications/"),"/usr/share/applications/","/usr/bin"].forEach(o=>{for(let a in this.findChromeExecutables(o))e.add(a)}),await Promise.all(this.executablesOnPath.map(async o=>{try{let a=(0,jA.execFileSync)("which",[o],{stdio:"pipe"}).toString().split(v$)[0];await(0,bl.canAccess)(this.fs,a)&&e.add(a)}catch{}}));let s=r?[{regex:new RegExp((0,bl.escapeRegexSpecialChars)(r)),weight:101,quality:"custom"}].concat(this.priorities):this.priorities;return(0,bl.sort)(e,s)}async findChromeExecutables(e){let r=/(^[^ ]+).*/,i=`^Exec=/.*/(${this.executablesOnPath.join("|")})-.*`,n=[];if(await(0,bl.canAccess)(this.fs,e)){let s;try{s=(0,jA.execSync)(`grep -ER "${i}" ${e} | awk -F '=' '{print $2}'`)}catch{s=(0,jA.execSync)(`grep -Er "${i}" ${e} | awk -F '=' '{print $2}'`)}let o=s.toString().split(v$).map(a=>a.replace(r,"$1"));await Promise.all(o.map(async a=>{await(0,bl.canAccess)(this.fs,a)&&n.push(a)}))}return n}};RH.LinuxChromeBrowserFinder=qA});var b$=b(MH=>{"use strict";Object.defineProperty(MH,"__esModule",{value:!0});MH.LinuxEdgeBrowserFinder=void 0;var FX=WA(),VA=class extends FX.LinuxChromeBrowserFinder{constructor(){super(...arguments),this.pathEnvironmentVar="EDGE_PATH",this.executablesOnPath=["microsoft-edge-dev","microsoft-edge-beta","microsoft-edge-stable","microsoft-edge"],this.priorities=[{regex:/microsoft-edge\-wrapper$/,weight:52,quality:"custom"},{regex:/microsoft-edge\-dev$/,weight:51,quality:"dev"},{regex:/microsoft-edge\-beta$/,weight:51,quality:"beta"},{regex:/microsoft-edge\-stable$/,weight:50,quality:"stable"},{regex:/microsoft-edge$/,weight:49,quality:"stable"}]}};MH.LinuxEdgeBrowserFinder=VA});var _$=b(OH=>{"use strict";Object.defineProperty(OH,"__esModule",{value:!0});OH.WindowsChromeBrowserFinder=void 0;var BX=require("path"),w$=Gu(),GA=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=BX.win32.sep,r=[{name:`${e}Google${e}Chrome Dev${e}Application${e}chrome.exe`,type:"dev"},{name:`${e}Google${e}Chrome SxS${e}Application${e}chrome.exe`,type:"canary"},{name:`${e}Google${e}Chrome Beta${e}Application${e}chrome.exe`,type:"beta"},{name:`${e}Google${e}Chrome${e}Application${e}chrome.exe`,type:"stable"}],i=await(0,w$.findWindowsCandidates)(this.env,this.fs,r),n=await(0,w$.preferredChromePath)(this.fs,this.env);return n&&i.unshift({path:n,quality:"custom"}),i}};OH.WindowsChromeBrowserFinder=GA});var I$=b(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});NH.WindowsEdgeBrowserFinder=void 0;var Rr=require("path"),A$=Gu(),KA=class{constructor(e,r){this.env=e,this.fs=r}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=[{name:`${Rr.sep}Microsoft${Rr.sep}Edge SxS${Rr.sep}Application${Rr.sep}msedge.exe`,type:"canary"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge Dev${Rr.sep}Application${Rr.sep}msedge.exe`,type:"dev"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge Beta${Rr.sep}Application${Rr.sep}msedge.exe`,type:"beta"},{name:`${Rr.sep}Microsoft${Rr.sep}Edge${Rr.sep}Application${Rr.sep}msedge.exe`,type:"stable"}],r=await(0,A$.findWindowsCandidates)(this.env,this.fs,e),i=await(0,A$.preferredEdgePath)(this.fs,this.env);return i&&r.unshift({path:i,quality:"custom"}),r}};NH.WindowsEdgeBrowserFinder=KA});var zA=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.EdgeBrowserFinder=Pn.ChromeBrowserFinder=Pn.isQuality=Pn.allQualities=void 0;var UX=H$(),jX=y$(),qX=WA(),WX=b$(),VX=_$(),GX=I$(),KX={canary:null,stable:null,beta:null,dev:null,custom:null};Pn.allQualities=new Set(Object.keys(KX));var zX=t=>Pn.allQualities.has(t);Pn.isQuality=zX;Pn.ChromeBrowserFinder=process.platform==="win32"?VX.WindowsChromeBrowserFinder:process.platform==="darwin"?UX.DarwinChromeBrowserFinder:qX.LinuxChromeBrowserFinder;Pn.EdgeBrowserFinder=process.platform==="win32"?GX.WindowsEdgeBrowserFinder:process.platform==="darwin"?jX.DarwinEdgeBrowserFinder:WX.LinuxEdgeBrowserFinder});var D$=b((C_e,x$)=>{x$.exports=C$;C$.sync=JX;var E$=require("fs");function XX(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function S$(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:XX(e,r)}function C$(t,e,r){E$.stat(t,function(i,n){r(i,i?!1:S$(n,t,e))})}function JX(t,e){return S$(E$.statSync(t),t,e)}});var k$=b((x_e,$$)=>{$$.exports=L$;L$.sync=YX;var P$=require("fs");function L$(t,e,r){P$.stat(t,function(i,n){r(i,i?!1:T$(n,e))})}function YX(t,e){return T$(P$.statSync(t),e)}function T$(t,e){return t.isFile()&&QX(t,e)}function QX(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,p=r&c||r&u&&n===o||r&a&&i===s||r&l&&s===0;return p}});var JA=b((P_e,R$)=>{var D_e=require("fs"),FH;process.platform==="win32"||global.TESTING_WINDOWS?FH=D$():FH=k$();R$.exports=XA;XA.sync=ZX;function XA(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){XA(t,e||{},function(s,o){s?n(s):i(o)})})}FH(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function ZX(t,e){try{return FH.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var j$=b((L_e,U$)=>{var wl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",M$=require("path"),eJ=wl?";":":",O$=JA(),N$=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),F$=(t,e)=>{let r=e.colon||eJ,i=t.match(/\//)||wl&&t.match(/\\/)?[""]:[...wl?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=wl?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=wl?n.split(r):[""];return wl&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},B$=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=F$(t,e),o=[],a=c=>new Promise((l,p)=>{if(c===i.length)return e.all&&o.length?l(o):p(N$(t));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,g=M$.join(h,t),H=!h&&/^\.[\\\/]/.test(t)?t.slice(0,2)+g:g;l(u(H,c,0))}),u=(c,l,p)=>new Promise((f,h)=>{if(p===n.length)return f(a(l+1));let g=n[p];O$(c+g,{pathExt:s},(H,v)=>{if(!H&&v)if(e.all)o.push(c+g);else return f(c+g);return f(u(c,l,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},tJ=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=F$(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=M$.join(u,t),l=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let p=0;p<i.length;p++){let f=l+i[p];try{if(O$.sync(f,{pathExt:n}))if(e.all)s.push(f);else return f}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw N$(t)};U$.exports=B$;B$.sync=tJ});var W$=b((T_e,YA)=>{"use strict";var q$=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};YA.exports=q$;YA.exports.default=q$});var z$=b(($_e,K$)=>{"use strict";var V$=require("path"),rJ=j$(),iJ=W$();function G$(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=rJ.sync(t.command,{path:r[iJ({env:r})],pathExt:e?V$.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=V$.resolve(n?t.options.cwd:"",o)),o}function nJ(t){return G$(t)||G$(t,!0)}K$.exports=nJ});var X$=b((k_e,ZA)=>{"use strict";var QA=/([()\][%!^"`<>&|;, *?])/g;function sJ(t){return t=t.replace(QA,"^$1"),t}function oJ(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(QA,"^$1"),e&&(t=t.replace(QA,"^$1")),t}ZA.exports.command=sJ;ZA.exports.argument=oJ});var Y$=b((R_e,J$)=>{"use strict";J$.exports=/^#!(.*)/});var Z$=b((M_e,Q$)=>{"use strict";var aJ=Y$();Q$.exports=(t="")=>{let e=t.match(aJ);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var t1=b((O_e,e1)=>{"use strict";var eI=require("fs"),uJ=Z$();function cJ(t){let r=Buffer.alloc(150),i;try{i=eI.openSync(t,"r"),eI.readSync(i,r,0,150,0),eI.closeSync(i)}catch{}return uJ(r.toString())}e1.exports=cJ});var s1=b((N_e,n1)=>{"use strict";var lJ=require("path"),r1=z$(),i1=X$(),pJ=t1(),fJ=process.platform==="win32",dJ=/\.(?:com|exe)$/i,hJ=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function mJ(t){t.file=r1(t);let e=t.file&&pJ(t.file);return e?(t.args.unshift(t.file),t.command=e,r1(t)):t.file}function gJ(t){if(!fJ)return t;let e=mJ(t),r=!dJ.test(e);if(t.options.forceShell||r){let i=hJ.test(e);t.command=lJ.normalize(t.command),t.command=i1.command(t.command),t.args=t.args.map(s=>i1.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function HJ(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:gJ(i)}n1.exports=HJ});var u1=b((F_e,a1)=>{"use strict";var tI=process.platform==="win32";function rI(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function yJ(t,e){if(!tI)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=o1(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function o1(t,e){return tI&&t===1&&!e.file?rI(e.original,"spawn"):null}function vJ(t,e){return tI&&t===1&&!e.file?rI(e.original,"spawnSync"):null}a1.exports={hookChildProcess:yJ,verifyENOENT:o1,verifyENOENTSync:vJ,notFoundError:rI}});var p1=b((B_e,_l)=>{"use strict";var c1=require("child_process"),iI=s1(),nI=u1();function l1(t,e,r){let i=iI(t,e,r),n=c1.spawn(i.command,i.args,i.options);return nI.hookChildProcess(n,i),n}function bJ(t,e,r){let i=iI(t,e,r),n=c1.spawnSync(i.command,i.args,i.options);return n.error=n.error||nI.verifyENOENTSync(n.status,i),n}_l.exports=l1;_l.exports.spawn=l1;_l.exports.sync=bJ;_l.exports._parse=iI;_l.exports._enoent=nI});var d1=b((U_e,f1)=>{"use strict";f1.exports=t=>{let e=typeof t=="string"?`
`:`
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var m1=b((j_e,sI)=>{"use strict";var h1=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};sI.exports=h1;sI.exports.default=h1});var y1=b((q_e,ph)=>{"use strict";var lh=require("path"),g1=m1(),H1=t=>{t={cwd:process.cwd(),path:process.env[g1()],execPath:process.execPath,...t};let e,r=lh.resolve(t.cwd),i=[];for(;e!==r;)i.push(lh.join(r,"node_modules/.bin")),e=r,r=lh.resolve(r,"..");let n=lh.resolve(t.cwd,t.execPath,"..");return i.push(n),i.concat(t.path).join(lh.delimiter)};ph.exports=H1;ph.exports.default=H1;ph.exports.env=t=>{t={env:process.env,...t};let e={...t.env},r=g1({env:e});return t.path=e[r],e[r]=ph.exports(t),e}});var b1=b((W_e,oI)=>{"use strict";var v1=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};oI.exports=v1;oI.exports.default=v1});var _1=b((V_e,UH)=>{"use strict";var wJ=b1(),BH=new WeakMap,w1=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(BH.set(s,++i),i===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return wJ(s,t),BH.set(s,i),s};UH.exports=w1;UH.exports.default=w1;UH.exports.callCount=t=>{if(!BH.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return BH.get(t)}});var A1=b(jH=>{"use strict";Object.defineProperty(jH,"__esModule",{value:!0});jH.SIGNALS=void 0;var _J=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];jH.SIGNALS=_J});var aI=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.SIGRTMAX=Al.getRealtimeSignals=void 0;var AJ=function(){let t=E1-I1+1;return Array.from({length:t},IJ)};Al.getRealtimeSignals=AJ;var IJ=function(t,e){return{name:`SIGRT${e+1}`,number:I1+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},I1=34,E1=64;Al.SIGRTMAX=E1});var S1=b(qH=>{"use strict";Object.defineProperty(qH,"__esModule",{value:!0});qH.getSignals=void 0;var EJ=require("os"),SJ=A1(),CJ=aI(),xJ=function(){let t=(0,CJ.getRealtimeSignals)();return[...SJ.SIGNALS,...t].map(DJ)};qH.getSignals=xJ;var DJ=function({name:t,number:e,description:r,action:i,forced:n=!1,standard:s}){let{signals:{[t]:o}}=EJ.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}}});var x1=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.signalsByNumber=Il.signalsByName=void 0;var PJ=require("os"),C1=S1(),LJ=aI(),TJ=function(){return(0,C1.getSignals)().reduce($J,{})},$J=function(t,{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}){return{...t,[e]:{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}}},kJ=TJ();Il.signalsByName=kJ;var RJ=function(){let t=(0,C1.getSignals)(),e=LJ.SIGRTMAX+1,r=Array.from({length:e},(i,n)=>MJ(n,t));return Object.assign({},...r)},MJ=function(t,e){let r=OJ(t,e);if(r===void 0)return{};let{name:i,description:n,supported:s,action:o,forced:a,standard:u}=r;return{[t]:{name:i,number:t,description:n,supported:s,action:o,forced:a,standard:u}}},OJ=function(t,e){let r=e.find(({name:i})=>PJ.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},NJ=RJ();Il.signalsByNumber=NJ});var P1=b((J_e,D1)=>{"use strict";var{signalsByName:FJ}=x1(),BJ=({timedOut:t,timeout:e,errorCode:r,signal:i,signalDescription:n,exitCode:s,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":r!==void 0?`failed with ${r}`:i!==void 0?`was killed with ${i} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed",UJ=({stdout:t,stderr:e,all:r,error:i,signal:n,exitCode:s,command:o,escapedCommand:a,timedOut:u,isCanceled:c,killed:l,parsed:{options:{timeout:p}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;let f=n===void 0?void 0:FJ[n].description,h=i&&i.code,H=`Command ${BJ({timedOut:u,timeout:p,errorCode:h,signal:n,signalDescription:f,exitCode:s,isCanceled:c})}: ${o}`,v=Object.prototype.toString.call(i)==="[object Error]",w=v?`${H}
${i.message}`:H,T=[w,e,t].filter(Boolean).join(`
`);return v?(i.originalMessage=i.message,i.message=T):i=new Error(T),i.shortMessage=w,i.command=o,i.escapedCommand=a,i.exitCode=s,i.signal=n,i.signalDescription=f,i.stdout=t,i.stderr=e,r!==void 0&&(i.all=r),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=Boolean(u),i.isCanceled=c,i.killed=l&&!u,i};D1.exports=UJ});var T1=b((Y_e,uI)=>{"use strict";var WH=["stdin","stdout","stderr"],jJ=t=>WH.some(e=>t[e]!==void 0),L1=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return WH.map(i=>t[i]);if(jJ(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${WH.map(i=>`\`${i}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,WH.length);return Array.from({length:r},(i,n)=>e[n])};uI.exports=L1;uI.exports.node=t=>{let e=L1(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var $1=b((Q_e,VH)=>{VH.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&VH.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&VH.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var M1=b((Z_e,hh)=>{var qJ=require("assert"),fh=$1(),WJ=/^win/i.test(process.platform),GH=require("events");typeof GH!="function"&&(GH=GH.EventEmitter);var br;process.__signal_exit_emitter__?br=process.__signal_exit_emitter__:(br=process.__signal_exit_emitter__=new GH,br.count=0,br.emitted={});br.infinite||(br.setMaxListeners(1/0),br.infinite=!0);hh.exports=function(t,e){qJ.equal(typeof t,"function","a callback must be provided for exit handler"),dh===!1&&k1();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){br.removeListener(r,t),br.listeners("exit").length===0&&br.listeners("afterexit").length===0&&lI()};return br.on(r,t),i};hh.exports.unload=lI;function lI(){dh&&(dh=!1,fh.forEach(function(t){try{process.removeListener(t,pI[t])}catch{}}),process.emit=cI,process.reallyExit=R1,br.count-=1)}function El(t,e,r){br.emitted[t]||(br.emitted[t]=!0,br.emit(t,e,r))}var pI={};fh.forEach(function(t){pI[t]=function(){var r=process.listeners(t);r.length===br.count&&(lI(),El("exit",null,t),El("afterexit",null,t),WJ&&t==="SIGHUP"&&(t="SIGINT"),process.kill(process.pid,t))}});hh.exports.signals=function(){return fh};hh.exports.load=k1;var dh=!1;function k1(){dh||(dh=!0,br.count+=1,fh=fh.filter(function(t){try{return process.on(t,pI[t]),!0}catch{return!1}}),process.emit=GJ,process.reallyExit=VJ)}var R1=process.reallyExit;function VJ(t){process.exitCode=t||0,El("exit",process.exitCode,null),El("afterexit",process.exitCode,null),R1.call(process,process.exitCode)}var cI=process.emit;function GJ(t,e){if(t==="exit"){e!==void 0&&(process.exitCode=e);var r=cI.apply(this,arguments);return El("exit",process.exitCode,null),El("afterexit",process.exitCode,null),r}else return cI.apply(this,arguments)}});var N1=b((eAe,O1)=>{"use strict";var KJ=require("os"),zJ=M1(),XJ=1e3*5,JJ=(t,e="SIGTERM",r={})=>{let i=t(e);return YJ(t,e,r,i),i},YJ=(t,e,r,i)=>{if(!QJ(e,r,i))return;let n=eY(r),s=setTimeout(()=>{t("SIGKILL")},n);s.unref&&s.unref()},QJ=(t,{forceKillAfterTimeout:e},r)=>ZJ(t)&&e!==!1&&r,ZJ=t=>t===KJ.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",eY=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return XJ;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},tY=(t,e)=>{t.kill()&&(e.isCanceled=!0)},rY=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},iY=(t,{timeout:e,killSignal:r="SIGTERM"},i)=>{if(e===0||e===void 0)return i;let n,s=new Promise((a,u)=>{n=setTimeout(()=>{rY(t,r,u)},e)}),o=i.finally(()=>{clearTimeout(n)});return Promise.race([s,o])},nY=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},sY=async(t,{cleanup:e,detached:r},i)=>{if(!e||r)return i;let n=zJ(()=>{t.kill()});return i.finally(()=>{n()})};O1.exports={spawnedKill:JJ,spawnedCancel:tY,setupTimeout:iY,validateTimeout:nY,setExitHandler:sY}});var B1=b((tAe,F1)=>{"use strict";var ns=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";ns.writable=t=>ns(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";ns.readable=t=>ns(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";ns.duplex=t=>ns.writable(t)&&ns.readable(t);ns.transform=t=>ns.duplex(t)&&typeof t._transform=="function"&&typeof t._transformState=="object";F1.exports=ns});var j1=b((rAe,U1)=>{"use strict";var{PassThrough:oY}=require("stream");U1.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new oY({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var q1=b((iAe,mh)=>{"use strict";var{constants:aY}=require("buffer"),uY=require("stream"),{promisify:cY}=require("util"),lY=j1(),pY=cY(uY.pipeline),KH=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function fI(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=lY(e);return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=aY.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};(async()=>{try{await pY(t,i),n()}catch(a){o(a)}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new KH)})}),i.getBufferedValue()}mh.exports=fI;mh.exports.buffer=(t,e)=>fI(t,{...e,encoding:"buffer"});mh.exports.array=(t,e)=>fI(t,{...e,array:!0});mh.exports.MaxBufferError=KH});var V1=b((nAe,W1)=>{"use strict";var{PassThrough:fY}=require("stream");W1.exports=function(){var t=[],e=new fY({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=i,e.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(r),e;function r(s){return Array.isArray(s)?(s.forEach(r),this):(t.push(s),s.once("end",n.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function i(){return t.length==0}function n(s){t=t.filter(function(o){return o!==s}),!t.length&&e.readable&&e.end()}}});var X1=b((sAe,z1)=>{"use strict";var K1=B1(),G1=q1(),dY=V1(),hY=(t,e)=>{e===void 0||t.stdin===void 0||(K1(e)?e.pipe(t.stdin):t.stdin.end(e))},mY=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=dY();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},dI=async(t,e)=>{if(t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},hI=(t,{encoding:e,buffer:r,maxBuffer:i})=>{if(!(!t||!r))return e?G1(t,{encoding:e,maxBuffer:i}):G1.buffer(t,{maxBuffer:i})},gY=async({stdout:t,stderr:e,all:r},{encoding:i,buffer:n,maxBuffer:s},o)=>{let a=hI(t,{encoding:i,buffer:n,maxBuffer:s}),u=hI(e,{encoding:i,buffer:n,maxBuffer:s}),c=hI(r,{encoding:i,buffer:n,maxBuffer:s*2});try{return await Promise.all([o,a,u,c])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},dI(t,a),dI(e,u),dI(r,c)])}},HY=({input:t})=>{if(K1(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};z1.exports={handleInput:hY,makeAllStream:mY,getSpawnedResult:gY,validateInputSync:HY}});var Y1=b((oAe,J1)=>{"use strict";var yY=(async()=>{})().constructor.prototype,vY=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(yY,t)]),bY=(t,e)=>{for(let[r,i]of vY){let n=typeof e=="function"?(...s)=>Reflect.apply(i.value,e(),s):i.value.bind(e);Reflect.defineProperty(t,r,{...i,value:n})}return t},wY=t=>new Promise((e,r)=>{t.on("exit",(i,n)=>{e({exitCode:i,signal:n})}),t.on("error",i=>{r(i)}),t.stdin&&t.stdin.on("error",i=>{r(i)})});J1.exports={mergePromise:bY,getSpawnedPromise:wY}});var ek=b((aAe,Z1)=>{"use strict";var Q1=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],_Y=/^[\w.-]+$/,AY=/"/g,IY=t=>typeof t!="string"||_Y.test(t)?t:`"${t.replace(AY,'\\"')}"`,EY=(t,e)=>Q1(t,e).join(" "),SY=(t,e)=>Q1(t,e).map(r=>IY(r)).join(" "),CY=/ +/g,xY=t=>{let e=[];for(let r of t.trim().split(CY)){let i=e[e.length-1];i&&i.endsWith("\\")?e[e.length-1]=`${i.slice(0,-1)} ${r}`:e.push(r)}return e};Z1.exports={joinCommand:EY,getEscapedCommand:SY,parseCommand:xY}});var gI=b((uAe,Sl)=>{"use strict";var DY=require("path"),mI=require("child_process"),PY=p1(),LY=d1(),TY=y1(),$Y=_1(),zH=P1(),rk=T1(),{spawnedKill:kY,spawnedCancel:RY,setupTimeout:MY,validateTimeout:OY,setExitHandler:NY}=N1(),{handleInput:FY,getSpawnedResult:BY,makeAllStream:UY,validateInputSync:jY}=X1(),{mergePromise:tk,getSpawnedPromise:qY}=Y1(),{joinCommand:ik,parseCommand:nk,getEscapedCommand:sk}=ek(),WY=1e3*1e3*100,VY=({env:t,extendEnv:e,preferLocal:r,localDir:i,execPath:n})=>{let s=e?{...process.env,...t}:t;return r?TY.env({env:s,cwd:i,execPath:n}):s},ok=(t,e,r={})=>{let i=PY._parse(t,e,r);return t=i.command,e=i.args,r=i.options,r={maxBuffer:WY,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=VY(r),r.stdio=rk(r),process.platform==="win32"&&DY.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:i}},gh=(t,e,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?LY(e):e,XH=(t,e,r)=>{let i=ok(t,e,r),n=ik(t,e),s=sk(t,e);OY(i.options);let o;try{o=mI.spawn(i.file,i.args,i.options)}catch(h){let g=new mI.ChildProcess,H=Promise.reject(zH({error:h,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return tk(g,H)}let a=qY(o),u=MY(o,i.options,a),c=NY(o,i.options,u),l={isCanceled:!1};o.kill=kY.bind(null,o.kill.bind(o)),o.cancel=RY.bind(null,o,l);let f=$Y(async()=>{let[{error:h,exitCode:g,signal:H,timedOut:v},w,T,U]=await BY(o,i.options,c),x=gh(i.options,w),P=gh(i.options,T),q=gh(i.options,U);if(h||g!==0||H!==null){let j=zH({error:h,exitCode:g,signal:H,stdout:x,stderr:P,all:q,command:n,escapedCommand:s,parsed:i,timedOut:v,isCanceled:l.isCanceled,killed:o.killed});if(!i.options.reject)return j;throw j}return{command:n,escapedCommand:s,exitCode:0,stdout:x,stderr:P,all:q,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return FY(o,i.options.input),o.all=UY(o,i.options),tk(o,f)};Sl.exports=XH;Sl.exports.sync=(t,e,r)=>{let i=ok(t,e,r),n=ik(t,e),s=sk(t,e);jY(i.options);let o;try{o=mI.spawnSync(i.file,i.args,i.options)}catch(c){throw zH({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1})}let a=gh(i.options,o.stdout,o.error),u=gh(i.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let c=zH({stdout:a,stderr:u,error:o.error,signal:o.signal,exitCode:o.status,command:n,escapedCommand:s,parsed:i,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!i.options.reject)return c;throw c}return{command:n,escapedCommand:s,exitCode:0,stdout:a,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};Sl.exports.command=(t,e)=>{let[r,...i]=nk(t);return XH(r,i,e)};Sl.exports.commandSync=(t,e)=>{let[r,...i]=nk(t);return XH.sync(r,i,e)};Sl.exports.node=(t,e,r={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(r=e,e=[]);let i=rk.node(r),n=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:s=process.execPath,nodeOptions:o=n}=r;return XH(s,[...o,t,...Array.isArray(e)?e:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:i,shell:!1})}});var Kt=b(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.NON_CUSTOM_TAG_KEYS=Me.PRE_DESTROY=Me.POST_CONSTRUCT=Me.DESIGN_PARAM_TYPES=Me.PARAM_TYPES=Me.TAGGED_PROP=Me.TAGGED=Me.MULTI_INJECT_TAG=Me.INJECT_TAG=Me.OPTIONAL_TAG=Me.UNMANAGED_TAG=Me.NAME_TAG=Me.NAMED_TAG=void 0;Me.NAMED_TAG="named";Me.NAME_TAG="name";Me.UNMANAGED_TAG="unmanaged";Me.OPTIONAL_TAG="optional";Me.INJECT_TAG="inject";Me.MULTI_INJECT_TAG="multi_inject";Me.TAGGED="inversify:tagged";Me.TAGGED_PROP="inversify:tagged_props";Me.PARAM_TYPES="inversify:paramtypes";Me.DESIGN_PARAM_TYPES="design:paramtypes";Me.POST_CONSTRUCT="post_construct";Me.PRE_DESTROY="pre_destroy";function GY(){return[Me.INJECT_TAG,Me.MULTI_INJECT_TAG,Me.NAME_TAG,Me.UNMANAGED_TAG,Me.NAMED_TAG,Me.OPTIONAL_TAG]}Me.NON_CUSTOM_TAG_KEYS=GY()});var Ln=b(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.TargetTypeEnum=la.BindingTypeEnum=la.BindingScopeEnum=void 0;var KY={Request:"Request",Singleton:"Singleton",Transient:"Transient"};la.BindingScopeEnum=KY;var zY={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};la.BindingTypeEnum=zY;var XY={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};la.TargetTypeEnum=XY});var pa=b(JH=>{"use strict";Object.defineProperty(JH,"__esModule",{value:!0});JH.id=void 0;var JY=0;function YY(){return JY++}JH.id=YY});var uk=b(YH=>{"use strict";Object.defineProperty(YH,"__esModule",{value:!0});YH.Binding=void 0;var ak=Ln(),QY=pa(),ZY=function(){function t(e,r){this.id=(0,QY.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=r,this.type=ak.BindingTypeEnum.Invalid,this.constraint=function(i){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return t.prototype.clone=function(){var e=new t(this.serviceIdentifier,this.scope);return e.activated=e.scope===ak.BindingScopeEnum.Singleton?this.activated:!1,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.onDeactivation=this.onDeactivation,e.cache=this.cache,e},t}();YH.Binding=ZY});var Mr=b(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.STACK_OVERFLOW=le.CIRCULAR_DEPENDENCY_IN_FACTORY=le.ON_DEACTIVATION_ERROR=le.PRE_DESTROY_ERROR=le.POST_CONSTRUCT_ERROR=le.ASYNC_UNBIND_REQUIRED=le.MULTIPLE_POST_CONSTRUCT_METHODS=le.MULTIPLE_PRE_DESTROY_METHODS=le.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=le.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=le.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=le.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=le.ARGUMENTS_LENGTH_MISMATCH=le.INVALID_DECORATOR_OPERATION=le.INVALID_TO_SELF_VALUE=le.LAZY_IN_SYNC=le.INVALID_FUNCTION_BINDING=le.INVALID_MIDDLEWARE_RETURN=le.NO_MORE_SNAPSHOTS_AVAILABLE=le.INVALID_BINDING_TYPE=le.NOT_IMPLEMENTED=le.CIRCULAR_DEPENDENCY=le.UNDEFINED_INJECT_ANNOTATION=le.MISSING_INJECT_ANNOTATION=le.MISSING_INJECTABLE_ANNOTATION=le.NOT_REGISTERED=le.CANNOT_UNBIND=le.AMBIGUOUS_MATCH=le.KEY_NOT_FOUND=le.NULL_ARGUMENT=le.DUPLICATED_METADATA=le.DUPLICATED_INJECTABLE_DECORATOR=void 0;le.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";le.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";le.NULL_ARGUMENT="NULL argument";le.KEY_NOT_FOUND="Key Not Found";le.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";le.CANNOT_UNBIND="Could not unbind serviceIdentifier:";le.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";le.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";le.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var eQ=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to  overcome this limitation."};le.UNDEFINED_INJECT_ANNOTATION=eQ;le.CIRCULAR_DEPENDENCY="Circular dependency found:";le.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";le.INVALID_BINDING_TYPE="Invalid binding type:";le.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";le.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";le.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var tQ=function(t){return"You are attempting to construct '"+t+`' in a synchronous way
 but it has asynchronous dependencies.`};le.LAZY_IN_SYNC=tQ;le.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";le.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";var rQ=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+(t[0]+" must be >= than the number of constructor arguments of its base class.")};le.ARGUMENTS_LENGTH_MISMATCH=rQ;le.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";le.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').";le.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";le.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";le.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";le.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";le.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var iQ=function(t,e){return"@postConstruct error in class "+t+": "+e};le.POST_CONSTRUCT_ERROR=iQ;var nQ=function(t,e){return"@preDestroy error in class "+t+": "+e};le.PRE_DESTROY_ERROR=nQ;var sQ=function(t,e){return"onDeactivation() error in class "+t+": "+e};le.ON_DEACTIVATION_ERROR=sQ;var oQ=function(t,e){return"It looks like there is a circular dependency in one of the '"+t+"' bindings. Please investigate bindings with"+("service identifier '"+e+"'.")};le.CIRCULAR_DEPENDENCY_IN_FACTORY=oQ;le.STACK_OVERFLOW="Maximum call stack size exceeded"});var yI=b(ss=>{"use strict";var aQ=ss&&ss.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),uQ=ss&&ss.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cQ=ss&&ss.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&aQ(e,t,r);return uQ(e,t),e};Object.defineProperty(ss,"__esModule",{value:!0});ss.MetadataReader=void 0;var HI=cQ(Kt()),lQ=function(){function t(){}return t.prototype.getConstructorMetadata=function(e){var r=Reflect.getMetadata(HI.PARAM_TYPES,e),i=Reflect.getMetadata(HI.TAGGED,e);return{compilerGeneratedMetadata:r,userGeneratedMetadata:i||{}}},t.prototype.getPropertiesMetadata=function(e){var r=Reflect.getMetadata(HI.TAGGED_PROP,e)||[];return r},t}();ss.MetadataReader=lQ});var ck=b(QH=>{"use strict";Object.defineProperty(QH,"__esModule",{value:!0});QH.BindingCount=void 0;var pQ={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};QH.BindingCount=pQ});var vI=b(Zi=>{"use strict";var fQ=Zi&&Zi.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),dQ=Zi&&Zi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hQ=Zi&&Zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fQ(e,t,r);return dQ(e,t),e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.tryAndThrowErrorIfStackOverflow=Zi.isStackOverflowExeption=void 0;var mQ=hQ(Mr());function lk(t){return t instanceof RangeError||t.message===mQ.STACK_OVERFLOW}Zi.isStackOverflowExeption=lk;var gQ=function(t,e){try{return t()}catch(r){throw lk(r)&&(r=e()),r}};Zi.tryAndThrowErrorIfStackOverflow=gQ});var Cl=b(zt=>{"use strict";var HQ=zt&&zt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),yQ=zt&&zt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vQ=zt&&zt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&HQ(e,t,r);return yQ(e,t),e};Object.defineProperty(zt,"__esModule",{value:!0});zt.getSymbolDescription=zt.circularDependencyToException=zt.listMetadataForTarget=zt.listRegisteredBindingsForServiceIdentifier=zt.getServiceIdentifierAsString=zt.getFunctionName=void 0;var bQ=vQ(Mr());function pk(t){if(typeof t=="function"){var e=t;return e.name}else{if(typeof t=="symbol")return t.toString();var e=t;return e}}zt.getServiceIdentifierAsString=pk;function wQ(t,e,r){var i="",n=r(t,e);return n.length!==0&&(i=`
Registered bindings:`,n.forEach(function(s){var o="Object";s.implementationType!==null&&(o=hk(s.implementationType)),i=i+`
 `+o,s.constraint.metaData&&(i=i+" - "+s.constraint.metaData)})),i}zt.listRegisteredBindingsForServiceIdentifier=wQ;function fk(t,e){return t.parentRequest===null?!1:t.parentRequest.serviceIdentifier===e?!0:fk(t.parentRequest,e)}function _Q(t){function e(i,n){n===void 0&&(n=[]);var s=pk(i.serviceIdentifier);return n.push(s),i.parentRequest!==null?e(i.parentRequest,n):n}var r=e(t);return r.reverse().join(" --> ")}function dk(t){t.childRequests.forEach(function(e){if(fk(e,e.serviceIdentifier)){var r=_Q(e);throw new Error(bQ.CIRCULAR_DEPENDENCY+" "+r)}else dk(e)})}zt.circularDependencyToException=dk;function AQ(t,e){if(e.isTagged()||e.isNamed()){var r="",i=e.getNamedTag(),n=e.getCustomTags();return i!==null&&(r+=i.toString()+`
`),n!==null&&n.forEach(function(s){r+=s.toString()+`
`})," "+t+`
 `+t+" - "+r}else return" "+t}zt.listMetadataForTarget=AQ;function hk(t){if(t.name)return t.name;var e=t.toString(),r=e.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+e}zt.getFunctionName=hk;function IQ(t){return t.toString().slice(7,-1)}zt.getSymbolDescription=IQ});var mk=b(ZH=>{"use strict";Object.defineProperty(ZH,"__esModule",{value:!0});ZH.Context=void 0;var EQ=pa(),SQ=function(){function t(e){this.id=(0,EQ.id)(),this.container=e}return t.prototype.addPlan=function(e){this.plan=e},t.prototype.setCurrentRequest=function(e){this.currentRequest=e},t}();ZH.Context=SQ});var Tn=b(os=>{"use strict";var CQ=os&&os.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),xQ=os&&os.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DQ=os&&os.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&CQ(e,t,r);return xQ(e,t),e};Object.defineProperty(os,"__esModule",{value:!0});os.Metadata=void 0;var PQ=DQ(Kt()),LQ=function(){function t(e,r){this.key=e,this.value=r}return t.prototype.toString=function(){return this.key===PQ.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},t}();os.Metadata=LQ});var gk=b(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.Plan=void 0;var TQ=function(){function t(e,r){this.parentContext=e,this.rootRequest=r}return t}();ey.Plan=TQ});var bI=b(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.LazyServiceIdentifer=void 0;var $Q=function(){function t(e){this._cb=e}return t.prototype.unwrap=function(){return this._cb()},t}();ty.LazyServiceIdentifer=$Q});var Hk=b(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.QueryableString=void 0;var kQ=function(){function t(e){this.str=e}return t.prototype.startsWith=function(e){return this.str.indexOf(e)===0},t.prototype.endsWith=function(e){var r="",i=e.split("").reverse().join("");return r=this.str.split("").reverse().join(""),this.startsWith.call({str:r},i)},t.prototype.contains=function(e){return this.str.indexOf(e)!==-1},t.prototype.equals=function(e){return this.str===e},t.prototype.value=function(){return this.str},t}();ry.QueryableString=kQ});var wI=b(as=>{"use strict";var RQ=as&&as.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),MQ=as&&as.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OQ=as&&as.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&RQ(e,t,r);return MQ(e,t),e};Object.defineProperty(as,"__esModule",{value:!0});as.Target=void 0;var lo=OQ(Kt()),NQ=pa(),FQ=Cl(),yk=Tn(),BQ=Hk(),UQ=function(){function t(e,r,i,n){this.id=(0,NQ.id)(),this.type=e,this.serviceIdentifier=i;var s=typeof r=="symbol"?(0,FQ.getSymbolDescription)(r):r;this.name=new BQ.QueryableString(s||""),this.identifier=r,this.metadata=new Array;var o=null;typeof n=="string"?o=new yk.Metadata(lo.NAMED_TAG,n):n instanceof yk.Metadata&&(o=n),o!==null&&this.metadata.push(o)}return t.prototype.hasTag=function(e){for(var r=0,i=this.metadata;r<i.length;r++){var n=i[r];if(n.key===e)return!0}return!1},t.prototype.isArray=function(){return this.hasTag(lo.MULTI_INJECT_TAG)},t.prototype.matchesArray=function(e){return this.matchesTag(lo.MULTI_INJECT_TAG)(e)},t.prototype.isNamed=function(){return this.hasTag(lo.NAMED_TAG)},t.prototype.isTagged=function(){return this.metadata.some(function(e){return lo.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})})},t.prototype.isOptional=function(){return this.matchesTag(lo.OPTIONAL_TAG)(!0)},t.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(e){return e.key===lo.NAMED_TAG})[0]:null},t.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return lo.NON_CUSTOM_TAG_KEYS.every(function(r){return e.key!==r})}):null},t.prototype.matchesNamedTag=function(e){return this.matchesTag(lo.NAMED_TAG)(e)},t.prototype.matchesTag=function(e){var r=this;return function(i){for(var n=0,s=r.metadata;n<s.length;n++){var o=s[n];if(o.key===e&&o.value===i)return!0}return!1}},t}();as.Target=UQ});var Sk=b(Or=>{"use strict";var jQ=Or&&Or.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),qQ=Or&&Or.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vk=Or&&Or.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&jQ(e,t,r);return qQ(e,t),e},iy=Or&&Or.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(Or,"__esModule",{value:!0});Or.getFunctionName=Or.getBaseClassDependencyCount=Or.getDependencies=void 0;var WQ=bI(),_I=vk(Mr()),bk=Ln(),Hh=vk(Kt()),AI=Cl();Object.defineProperty(Or,"getFunctionName",{enumerable:!0,get:function(){return AI.getFunctionName}});var wk=wI();function VQ(t,e){var r=(0,AI.getFunctionName)(e);return _k(t,r,e,!1)}Or.getDependencies=VQ;function _k(t,e,r,i){var n=t.getConstructorMetadata(r),s=n.compilerGeneratedMetadata;if(s===void 0){var o=_I.MISSING_INJECTABLE_ANNOTATION+" "+e+".";throw new Error(o)}var a=n.userGeneratedMetadata,u=Object.keys(a),c=r.length===0&&u.length>0,l=u.length>r.length,p=c||l?u.length:r.length,f=KQ(i,e,s,a,p),h=Ak(t,r,e),g=iy(iy([],f,!0),h,!0);return g}function GQ(t,e,r,i,n){var s=n[t.toString()]||[],o=Ek(s),a=o.unmanaged!==!0,u=i[t],c=o.inject||o.multiInject;if(u=c||u,u instanceof WQ.LazyServiceIdentifer&&(u=u.unwrap()),a){var l=u===Object,p=u===Function,f=u===void 0,h=l||p||f;if(!e&&h){var g=_I.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+r+".";throw new Error(g)}var H=new wk.Target(bk.TargetTypeEnum.ConstructorArgument,o.targetName,u);return H.metadata=s,H}return null}function KQ(t,e,r,i,n){for(var s=[],o=0;o<n;o++){var a=o,u=GQ(a,t,e,r,i);u!==null&&s.push(u)}return s}function zQ(t,e,r,i){var n=t||e;if(n===void 0){var s=_I.MISSING_INJECTABLE_ANNOTATION+" for property "+String(r)+" in class "+i+".";throw new Error(s)}return n}function Ak(t,e,r){for(var i=t.getPropertiesMetadata(e),n=[],s=Object.getOwnPropertySymbols(i),o=Object.keys(i),a=o.concat(s),u=0,c=a;u<c.length;u++){var l=c[u],p=i[l],f=Ek(p),h=f.targetName||l,g=zQ(f.inject,f.multiInject,l,r),H=new wk.Target(bk.TargetTypeEnum.ClassProperty,h,g);H.metadata=p,n.push(H)}var v=Object.getPrototypeOf(e.prototype).constructor;if(v!==Object){var w=Ak(t,v,r);n=iy(iy([],n,!0),w,!0)}return n}function Ik(t,e){var r=Object.getPrototypeOf(e.prototype).constructor;if(r!==Object){var i=(0,AI.getFunctionName)(r),n=_k(t,i,r,!0),s=n.map(function(u){return u.metadata.filter(function(c){return c.key===Hh.UNMANAGED_TAG})}),o=[].concat.apply([],s).length,a=n.length-o;return a>0?a:Ik(t,r)}else return 0}Or.getBaseClassDependencyCount=Ik;function Ek(t){var e={};return t.forEach(function(r){e[r.key.toString()]=r.value}),{inject:e[Hh.INJECT_TAG],multiInject:e[Hh.MULTI_INJECT_TAG],targetName:e[Hh.NAME_TAG],unmanaged:e[Hh.UNMANAGED_TAG]}}});var Ck=b(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.Request=void 0;var XQ=pa(),JQ=function(){function t(e,r,i,n,s){this.id=(0,XQ.id)(),this.serviceIdentifier=e,this.parentContext=r,this.parentRequest=i,this.target=s,this.childRequests=[],this.bindings=Array.isArray(n)?n:[n],this.requestScope=i===null?new Map:null}return t.prototype.addChildRequest=function(e,r,i){var n=new t(e,this.parentContext,this,r,i);return this.childRequests.push(n),n},t}();ny.Request=JQ});var xI=b(li=>{"use strict";var YQ=li&&li.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),QQ=li&&li.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Pk=li&&li.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YQ(e,t,r);return QQ(e,t),e};Object.defineProperty(li,"__esModule",{value:!0});li.getBindingDictionary=li.createMockRequest=li.plan=void 0;var sy=ck(),EI=Pk(Mr()),Lk=Ln(),xk=Pk(Kt()),ZQ=vI(),xl=Cl(),Tk=mk(),SI=Tn(),eZ=gk(),II=Sk(),CI=Ck(),$k=wI();function kk(t){return t._bindingDictionary}li.getBindingDictionary=kk;function tZ(t,e,r,i,n,s){var o=t?xk.MULTI_INJECT_TAG:xk.INJECT_TAG,a=new SI.Metadata(o,r),u=new $k.Target(e,i,r,a);if(n!==void 0){var c=new SI.Metadata(n,s);u.metadata.push(c)}return u}function Dk(t,e,r,i,n){var s=yh(r.container,n.serviceIdentifier),o=[];return s.length===sy.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&typeof n.serviceIdentifier=="function"&&t.getConstructorMetadata(n.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(n.serviceIdentifier).toSelf(),s=yh(r.container,n.serviceIdentifier)),e?o=s:o=s.filter(function(a){var u=new CI.Request(a.serviceIdentifier,r,i,a,n);return a.constraint(u)}),rZ(n.serviceIdentifier,o,n,r.container),o}function rZ(t,e,r,i){switch(e.length){case sy.BindingCount.NoBindingsAvailable:if(r.isOptional())return e;var n=(0,xl.getServiceIdentifierAsString)(t),s=EI.NOT_REGISTERED;throw s+=(0,xl.listMetadataForTarget)(n,r),s+=(0,xl.listRegisteredBindingsForServiceIdentifier)(i,n,yh),new Error(s);case sy.BindingCount.OnlyOneBindingAvailable:return e;case sy.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return e;var n=(0,xl.getServiceIdentifierAsString)(t),s=EI.AMBIGUOUS_MATCH+" "+n;throw s+=(0,xl.listRegisteredBindingsForServiceIdentifier)(i,n,yh),new Error(s)}}function Rk(t,e,r,i,n,s){var o,a;if(n===null){o=Dk(t,e,i,null,s),a=new CI.Request(r,i,null,o,s);var u=new eZ.Plan(i,a);i.addPlan(u)}else o=Dk(t,e,i,n,s),a=n.addChildRequest(s.serviceIdentifier,o,s);o.forEach(function(c){var l=null;if(s.isArray())l=a.addChildRequest(c.serviceIdentifier,c,s);else{if(c.cache)return;l=a}if(c.type===Lk.BindingTypeEnum.Instance&&c.implementationType!==null){var p=(0,II.getDependencies)(t,c.implementationType);if(!i.container.options.skipBaseClassChecks){var f=(0,II.getBaseClassDependencyCount)(t,c.implementationType);if(p.length<f){var h=EI.ARGUMENTS_LENGTH_MISMATCH((0,II.getFunctionName)(c.implementationType));throw new Error(h)}}p.forEach(function(g){Rk(t,!1,g.serviceIdentifier,i,l,g)})}})}function yh(t,e){var r=[],i=kk(t);return i.hasKey(e)?r=i.get(e):t.parent!==null&&(r=yh(t.parent,e)),r}function iZ(t,e,r,i,n,s,o,a){a===void 0&&(a=!1);var u=new Tk.Context(e),c=tZ(r,i,n,"",s,o);try{return Rk(t,a,n,u,null,c),u}catch(l){throw(0,ZQ.isStackOverflowExeption)(l)&&(0,xl.circularDependencyToException)(u.plan.rootRequest),l}}li.plan=iZ;function nZ(t,e,r,i){var n=new $k.Target(Lk.TargetTypeEnum.Variable,"",e,new SI.Metadata(r,i)),s=new Tk.Context(t),o=new CI.Request(e,s,null,[],n);return o}li.createMockRequest=nZ});var vh=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.isPromiseOrContainsPromise=Dl.isPromise=void 0;function DI(t){var e=typeof t=="object"&&t!==null||typeof t=="function";return e&&typeof t.then=="function"}Dl.isPromise=DI;function sZ(t){return DI(t)?!0:Array.isArray(t)&&t.some(DI)}Dl.isPromiseOrContainsPromise=sZ});var Mk=b(us=>{"use strict";var oZ=us&&us.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},aZ=us&&us.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(us,"__esModule",{value:!0});us.saveToScope=us.tryGetFromScope=void 0;var oy=Y(),uZ=vh(),cZ=function(t,e){return e.scope===oy.BindingScopeEnum.Singleton&&e.activated?e.cache:e.scope===oy.BindingScopeEnum.Request&&t.has(e.id)?t.get(e.id):null};us.tryGetFromScope=cZ;var lZ=function(t,e,r){e.scope===oy.BindingScopeEnum.Singleton&&fZ(e,r),e.scope===oy.BindingScopeEnum.Request&&pZ(t,e,r)};us.saveToScope=lZ;var pZ=function(t,e,r){t.has(e.id)||t.set(e.id,r)},fZ=function(t,e){t.cache=e,t.activated=!0,(0,uZ.isPromise)(e)&&dZ(t,e)},dZ=function(t,e){return oZ(void 0,void 0,void 0,function(){var r,i;return aZ(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e];case 1:return r=n.sent(),t.cache=r,[3,3];case 2:throw i=n.sent(),t.cache=null,t.activated=!1,i;case 3:return[2]}})})}});var Ok=b(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.FactoryType=void 0;var hZ;(function(t){t.DynamicValue="toDynamicValue",t.Factory="toFactory",t.Provider="toProvider"})(hZ=bh.FactoryType||(bh.FactoryType={}))});var LI=b(pi=>{"use strict";var mZ=pi&&pi.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),gZ=pi&&pi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HZ=pi&&pi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&mZ(e,t,r);return gZ(e,t),e};Object.defineProperty(pi,"__esModule",{value:!0});pi.getFactoryDetails=pi.ensureFullyBound=pi.multiBindToService=void 0;var yZ=Y(),vZ=HZ(Mr()),cs=Ln(),PI=Ok(),bZ=function(t){return function(e){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.forEach(function(n){return t.bind(n).toService(e)})}}};pi.multiBindToService=bZ;var wZ=function(t){var e=null;switch(t.type){case cs.BindingTypeEnum.ConstantValue:case cs.BindingTypeEnum.Function:e=t.cache;break;case cs.BindingTypeEnum.Constructor:case cs.BindingTypeEnum.Instance:e=t.implementationType;break;case cs.BindingTypeEnum.DynamicValue:e=t.dynamicValue;break;case cs.BindingTypeEnum.Provider:e=t.provider;break;case cs.BindingTypeEnum.Factory:e=t.factory;break}if(e===null){var r=(0,yZ.getServiceIdentifierAsString)(t.serviceIdentifier);throw new Error(vZ.INVALID_BINDING_TYPE+" "+r)}};pi.ensureFullyBound=wZ;var _Z=function(t){switch(t.type){case cs.BindingTypeEnum.Factory:return{factory:t.factory,factoryType:PI.FactoryType.Factory};case cs.BindingTypeEnum.Provider:return{factory:t.provider,factoryType:PI.FactoryType.Provider};case cs.BindingTypeEnum.DynamicValue:return{factory:t.dynamicValue,factoryType:PI.FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+t.type)}};pi.getFactoryDetails=_Z});var qk=b(lr=>{"use strict";var Pl=lr&&lr.__assign||function(){return Pl=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},Pl.apply(this,arguments)},AZ=lr&&lr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),IZ=lr&&lr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EZ=lr&&lr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&AZ(e,t,r);return IZ(e,t),e},Bk=lr&&lr.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},Uk=lr&&lr.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},SZ=lr&&lr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(lr,"__esModule",{value:!0});lr.resolveInstance=void 0;var TI=Mr(),kI=Ln(),$I=EZ(Kt()),RI=vh();function CZ(t,e){return t.reduce(function(r,i){var n=e(i),s=i.target.type;return s===kI.TargetTypeEnum.ConstructorArgument?r.constructorInjections.push(n):(r.propertyRequests.push(i),r.propertyInjections.push(n)),r.isAsync||(r.isAsync=(0,RI.isPromiseOrContainsPromise)(n)),r},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function xZ(t,e,r){var i;if(e.length>0){var n=CZ(e,r),s=Pl(Pl({},n),{constr:t});n.isAsync?i=DZ(s):i=jk(s)}else i=new t;return i}function jk(t){var e,r=new((e=t.constr).bind.apply(e,SZ([void 0],t.constructorInjections,!1)));return t.propertyRequests.forEach(function(i,n){var s=i.target.identifier,o=t.propertyInjections[n];r[s]=o}),r}function DZ(t){return Bk(this,void 0,void 0,function(){var e,r;return Uk(this,function(i){switch(i.label){case 0:return[4,Nk(t.constructorInjections)];case 1:return e=i.sent(),[4,Nk(t.propertyInjections)];case 2:return r=i.sent(),[2,jk(Pl(Pl({},t),{constructorInjections:e,propertyInjections:r}))]}})})}function Nk(t){return Bk(this,void 0,void 0,function(){var e,r,i,n;return Uk(this,function(s){for(e=[],r=0,i=t;r<i.length;r++)n=i[r],Array.isArray(n)?e.push(Promise.all(n)):e.push(n);return[2,Promise.all(e)]})})}function Fk(t,e){var r=PZ(t,e);return(0,RI.isPromise)(r)?r.then(function(){return e}):e}function PZ(t,e){var r,i;if(Reflect.hasMetadata($I.POST_CONSTRUCT,t)){var n=Reflect.getMetadata($I.POST_CONSTRUCT,t);try{return(i=(r=e)[n.value])===null||i===void 0?void 0:i.call(r)}catch(s){throw new Error((0,TI.POST_CONSTRUCT_ERROR)(t.name,s.message))}}}function LZ(t,e){t.scope!==kI.BindingScopeEnum.Singleton&&TZ(t,e)}function TZ(t,e){var r="Class cannot be instantiated in "+(t.scope===kI.BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof t.onDeactivation=="function")throw new Error((0,TI.ON_DEACTIVATION_ERROR)(e.name,r));if(Reflect.hasMetadata($I.PRE_DESTROY,e))throw new Error((0,TI.PRE_DESTROY_ERROR)(e.name,r))}function $Z(t,e,r,i){LZ(t,e);var n=xZ(e,r,i);return(0,RI.isPromise)(n)?n.then(function(s){return Fk(e,s)}):Fk(e,n)}lr.resolveInstance=$Z});var zk=b(fi=>{"use strict";var kZ=fi&&fi.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),RZ=fi&&fi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MZ=fi&&fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kZ(e,t,r);return RZ(e,t),e},OZ=fi&&fi.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},NZ=fi&&fi.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(fi,"__esModule",{value:!0});fi.resolve=void 0;var FZ=MZ(Mr()),ay=Ln(),BZ=xI(),Wk=Mk(),MI=vh(),Gk=LI(),UZ=vI(),jZ=qk(),OI=function(t){return function(e){e.parentContext.setCurrentRequest(e);var r=e.bindings,i=e.childRequests,n=e.target&&e.target.isArray(),s=!e.parentRequest||!e.parentRequest.target||!e.target||!e.parentRequest.target.matchesArray(e.target.serviceIdentifier);if(n&&s)return i.map(function(a){var u=OI(t);return u(a)});if(e.target.isOptional()&&r.length===0)return;var o=r[0];return GZ(t,e,o)}},qZ=function(t,e){var r=(0,Gk.getFactoryDetails)(t);return(0,UZ.tryAndThrowErrorIfStackOverflow)(function(){return r.factory.bind(t)(e)},function(){return new Error(FZ.CIRCULAR_DEPENDENCY_IN_FACTORY(r.factoryType,e.currentRequest.serviceIdentifier.toString()))})},WZ=function(t,e,r){var i,n=e.childRequests;switch((0,Gk.ensureFullyBound)(r),r.type){case ay.BindingTypeEnum.ConstantValue:case ay.BindingTypeEnum.Function:i=r.cache;break;case ay.BindingTypeEnum.Constructor:i=r.implementationType;break;case ay.BindingTypeEnum.Instance:i=(0,jZ.resolveInstance)(r,r.implementationType,n,OI(t));break;default:i=qZ(r,e.parentContext)}return i},VZ=function(t,e,r){var i=(0,Wk.tryGetFromScope)(t,e);return i!==null||(i=r(),(0,Wk.saveToScope)(t,e,i)),i},GZ=function(t,e,r){return VZ(t,r,function(){var i=WZ(t,e,r);return(0,MI.isPromise)(i)?i=i.then(function(n){return Vk(e,r,n)}):i=Vk(e,r,i),i})};function Vk(t,e,r){var i=KZ(t.parentContext,e,r),n=JZ(t.parentContext.container),s,o=n.next();do{s=o.value;var a=t.parentContext,u=t.serviceIdentifier,c=XZ(s,u);(0,MI.isPromise)(i)?i=Kk(c,a,i):i=zZ(c,a,i),o=n.next()}while(o.done!==!0&&!(0,BZ.getBindingDictionary)(s).hasKey(t.serviceIdentifier));return i}var KZ=function(t,e,r){var i;return typeof e.onActivation=="function"?i=e.onActivation(t,r):i=r,i},zZ=function(t,e,r){for(var i=t.next();!i.done;){if(r=i.value(e,r),(0,MI.isPromise)(r))return Kk(t,e,r);i=t.next()}return r},Kk=function(t,e,r){return OZ(void 0,void 0,void 0,function(){var i,n;return NZ(this,function(s){switch(s.label){case 0:return[4,r];case 1:i=s.sent(),n=t.next(),s.label=2;case 2:return n.done?[3,4]:[4,n.value(e,i)];case 3:return i=s.sent(),n=t.next(),[3,2];case 4:return[2,i]}})})},XZ=function(t,e){var r=t._activations;return r.hasKey(e)?r.get(e).values():[].values()},JZ=function(t){for(var e=[t],r=t.parent;r!==null;)e.push(r),r=r.parent;var i=function(){var s=e.pop();return s!==void 0?{done:!1,value:s}:{done:!0,value:void 0}},n={next:i};return n};function YZ(t){var e=OI(t.plan.rootRequest.requestScope);return e(t.plan.rootRequest)}fi.resolve=YZ});var NI=b(Nr=>{"use strict";var QZ=Nr&&Nr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),ZZ=Nr&&Nr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eee=Nr&&Nr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&QZ(e,t,r);return ZZ(e,t),e};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.typeConstraint=Nr.namedConstraint=Nr.taggedConstraint=Nr.traverseAncerstors=void 0;var tee=eee(Kt()),ree=Tn(),Xk=function(t,e){var r=t.parentRequest;return r!==null?e(r)?!0:Xk(r,e):!1};Nr.traverseAncerstors=Xk;var Jk=function(t){return function(e){var r=function(i){return i!==null&&i.target!==null&&i.target.matchesTag(t)(e)};return r.metaData=new ree.Metadata(t,e),r}};Nr.taggedConstraint=Jk;var iee=Jk(tee.NAMED_TAG);Nr.namedConstraint=iee;var nee=function(t){return function(e){var r=null;if(e!==null)if(r=e.bindings[0],typeof t=="string"){var i=r.serviceIdentifier;return i===t}else{var n=e.bindings[0].implementationType;return t===n}return!1}};Nr.typeConstraint=nee});var cy=b(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});uy.BindingWhenSyntax=void 0;var Xr=ly(),tr=NI(),see=function(){function t(e){this._binding=e}return t.prototype.when=function(e){return this._binding.constraint=e,new Xr.BindingOnSyntax(this._binding)},t.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,tr.namedConstraint)(e),new Xr.BindingOnSyntax(this._binding)},t.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){if(e===null)return!1;var r=e.target!==null&&!e.target.isNamed()&&!e.target.isTagged();return r},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenTargetTagged=function(e,r){return this._binding.constraint=(0,tr.taggedConstraint)(e)(r),new Xr.BindingOnSyntax(this._binding)},t.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.typeConstraint)(e)(r.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenParentNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.namedConstraint)(e)(r.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenParentTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,tr.taggedConstraint)(e)(r)(i.parentRequest)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,(0,tr.typeConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,(0,tr.typeConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,(0,tr.namedConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,(0,tr.namedConstraint)(e))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&(0,tr.traverseAncerstors)(i,(0,tr.taggedConstraint)(e)(r))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorTagged=function(e,r){return this._binding.constraint=function(i){return i!==null&&!(0,tr.traverseAncerstors)(i,(0,tr.taggedConstraint)(e)(r))},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&(0,tr.traverseAncerstors)(r,e)},new Xr.BindingOnSyntax(this._binding)},t.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(r){return r!==null&&!(0,tr.traverseAncerstors)(r,e)},new Xr.BindingOnSyntax(this._binding)},t}();uy.BindingWhenSyntax=see});var ly=b(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.BindingOnSyntax=void 0;var Yk=cy(),oee=function(){function t(e){this._binding=e}return t.prototype.onActivation=function(e){return this._binding.onActivation=e,new Yk.BindingWhenSyntax(this._binding)},t.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new Yk.BindingWhenSyntax(this._binding)},t}();py.BindingOnSyntax=oee});var FI=b(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.BindingWhenOnSyntax=void 0;var aee=ly(),uee=cy(),cee=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new uee.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new aee.BindingOnSyntax(this._binding)}return t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,r){return this._bindingWhenSyntax.whenTargetTagged(e,r)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,r){return this._bindingWhenSyntax.whenParentTagged(e,r)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,r)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenNoAncestorTagged(e,r)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t}();fy.BindingWhenOnSyntax=cee});var Qk=b(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.BindingInSyntax=void 0;var BI=Ln(),UI=FI(),lee=function(){function t(e){this._binding=e}return t.prototype.inRequestScope=function(){return this._binding.scope=BI.BindingScopeEnum.Request,new UI.BindingWhenOnSyntax(this._binding)},t.prototype.inSingletonScope=function(){return this._binding.scope=BI.BindingScopeEnum.Singleton,new UI.BindingWhenOnSyntax(this._binding)},t.prototype.inTransientScope=function(){return this._binding.scope=BI.BindingScopeEnum.Transient,new UI.BindingWhenOnSyntax(this._binding)},t}();dy.BindingInSyntax=lee});var Zk=b(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.BindingInWhenOnSyntax=void 0;var pee=Qk(),fee=ly(),dee=cy(),hee=function(){function t(e){this._binding=e,this._bindingWhenSyntax=new dee.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new fee.BindingOnSyntax(this._binding),this._bindingInSyntax=new pee.BindingInSyntax(e)}return t.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},t.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},t.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},t.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},t.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},t.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},t.prototype.whenTargetTagged=function(e,r){return this._bindingWhenSyntax.whenTargetTagged(e,r)},t.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},t.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},t.prototype.whenParentTagged=function(e,r){return this._bindingWhenSyntax.whenParentTagged(e,r)},t.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},t.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},t.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},t.prototype.whenAnyAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,r)},t.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},t.prototype.whenNoAncestorTagged=function(e,r){return this._bindingWhenSyntax.whenNoAncestorTagged(e,r)},t.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},t.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},t.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},t.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},t}();hy.BindingInWhenOnSyntax=hee});var rR=b(ls=>{"use strict";var mee=ls&&ls.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),gee=ls&&ls.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Hee=ls&&ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&mee(e,t,r);return gee(e,t),e};Object.defineProperty(ls,"__esModule",{value:!0});ls.BindingToSyntax=void 0;var eR=Hee(Mr()),Jr=Ln(),tR=Zk(),Ll=FI(),yee=function(){function t(e){this._binding=e}return t.prototype.to=function(e){return this._binding.type=Jr.BindingTypeEnum.Instance,this._binding.implementationType=e,new tR.BindingInWhenOnSyntax(this._binding)},t.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+eR.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},t.prototype.toConstantValue=function(e){return this._binding.type=Jr.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toDynamicValue=function(e){return this._binding.type=Jr.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new tR.BindingInWhenOnSyntax(this._binding)},t.prototype.toConstructor=function(e){return this._binding.type=Jr.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(eR.INVALID_FUNCTION_BINDING);var r=this.toConstantValue(e);return this._binding.type=Jr.BindingTypeEnum.Function,this._binding.scope=Jr.BindingScopeEnum.Singleton,r},t.prototype.toAutoFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=function(r){var i=function(){return r.container.get(e)};return i},this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toAutoNamedFactory=function(e){return this._binding.type=Jr.BindingTypeEnum.Factory,this._binding.factory=function(r){return function(i){return r.container.getNamed(e,i)}},new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toProvider=function(e){return this._binding.type=Jr.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=Jr.BindingScopeEnum.Singleton,new Ll.BindingWhenOnSyntax(this._binding)},t.prototype.toService=function(e){this.toDynamicValue(function(r){return r.container.get(e)})},t}();ls.BindingToSyntax=yee});var iR=b(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.ContainerSnapshot=void 0;var vee=function(){function t(){}return t.of=function(e,r,i,n,s){var o=new t;return o.bindings=e,o.middleware=r,o.deactivations=n,o.activations=i,o.moduleActivationStore=s,o},t}();my.ContainerSnapshot=vee});var nR=b(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.isClonable=void 0;function bee(t){return typeof t=="object"&&t!==null&&"clone"in t&&typeof t.clone=="function"}gy.isClonable=bee});var jI=b(ps=>{"use strict";var wee=ps&&ps.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),_ee=ps&&ps.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Aee=ps&&ps.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wee(e,t,r);return _ee(e,t),e};Object.defineProperty(ps,"__esModule",{value:!0});ps.Lookup=void 0;var Ku=Aee(Mr()),Iee=nR(),Eee=function(){function t(){this._map=new Map}return t.prototype.getMap=function(){return this._map},t.prototype.add=function(e,r){if(e==null)throw new Error(Ku.NULL_ARGUMENT);if(r==null)throw new Error(Ku.NULL_ARGUMENT);var i=this._map.get(e);i!==void 0?i.push(r):this._map.set(e,[r])},t.prototype.get=function(e){if(e==null)throw new Error(Ku.NULL_ARGUMENT);var r=this._map.get(e);if(r!==void 0)return r;throw new Error(Ku.KEY_NOT_FOUND)},t.prototype.remove=function(e){if(e==null)throw new Error(Ku.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Ku.KEY_NOT_FOUND)},t.prototype.removeIntersection=function(e){var r=this;this.traverse(function(i,n){var s=e.hasKey(i)?e.get(i):void 0;if(s!==void 0){var o=n.filter(function(a){return!s.some(function(u){return a===u})});r._setValue(i,o)}})},t.prototype.removeByCondition=function(e){var r=this,i=[];return this._map.forEach(function(n,s){for(var o=[],a=0,u=n;a<u.length;a++){var c=u[a],l=e(c);l?i.push(c):o.push(c)}r._setValue(s,o)}),i},t.prototype.hasKey=function(e){if(e==null)throw new Error(Ku.NULL_ARGUMENT);return this._map.has(e)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(r,i){r.forEach(function(n){return e.add(i,(0,Iee.isClonable)(n)?n.clone():n)})}),e},t.prototype.traverse=function(e){this._map.forEach(function(r,i){e(i,r)})},t.prototype._setValue=function(e,r){r.length>0?this._map.set(e,r):this._map.delete(e)},t}();ps.Lookup=Eee});var oR=b(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.ModuleActivationStore=void 0;var sR=jI(),See=function(){function t(){this._map=new Map}return t.prototype.remove=function(e){if(this._map.has(e)){var r=this._map.get(e);return this._map.delete(e),r}return this._getEmptyHandlersStore()},t.prototype.addDeactivation=function(e,r,i){this._getModuleActivationHandlers(e).onDeactivations.add(r,i)},t.prototype.addActivation=function(e,r,i){this._getModuleActivationHandlers(e).onActivations.add(r,i)},t.prototype.clone=function(){var e=new t;return this._map.forEach(function(r,i){e._map.set(i,{onActivations:r.onActivations.clone(),onDeactivations:r.onDeactivations.clone()})}),e},t.prototype._getModuleActivationHandlers=function(e){var r=this._map.get(e);return r===void 0&&(r=this._getEmptyHandlersStore(),this._map.set(e,r)),r},t.prototype._getEmptyHandlersStore=function(){var e={onActivations:new sR.Lookup,onDeactivations:new sR.Lookup};return e},t}();Hy.ModuleActivationStore=See});var uR=b(pr=>{"use strict";var vy=pr&&pr.__assign||function(){return vy=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},vy.apply(this,arguments)},Cee=pr&&pr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),xee=pr&&pr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aR=pr&&pr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Cee(e,t,r);return xee(e,t),e},en=pr&&pr.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(i.next(l))}catch(p){o(p)}}function u(l){try{c(i.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):n(l.value).then(a,u)}c((i=i.apply(t,e||[])).next())})},tn=pr&&pr.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Dee=pr&&pr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))};Object.defineProperty(pr,"__esModule",{value:!0});pr.Container=void 0;var Pee=uk(),$n=aR(Mr()),Tl=Ln(),zu=aR(Kt()),Lee=yI(),yy=xI(),Tee=zk(),$ee=rR(),Xu=vh(),kee=pa(),Ree=Cl(),Mee=iR(),wh=jI(),Oee=oR(),Nee=function(){function t(e){var r=e||{};if(typeof r!="object")throw new Error(""+$n.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(r.defaultScope===void 0)r.defaultScope=Tl.BindingScopeEnum.Transient;else if(r.defaultScope!==Tl.BindingScopeEnum.Singleton&&r.defaultScope!==Tl.BindingScopeEnum.Transient&&r.defaultScope!==Tl.BindingScopeEnum.Request)throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(r.autoBindInjectable===void 0)r.autoBindInjectable=!1;else if(typeof r.autoBindInjectable!="boolean")throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(r.skipBaseClassChecks===void 0)r.skipBaseClassChecks=!1;else if(typeof r.skipBaseClassChecks!="boolean")throw new Error(""+$n.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:r.autoBindInjectable,defaultScope:r.defaultScope,skipBaseClassChecks:r.skipBaseClassChecks},this.id=(0,kee.id)(),this._bindingDictionary=new wh.Lookup,this._snapshots=[],this._middleware=null,this._activations=new wh.Lookup,this._deactivations=new wh.Lookup,this.parent=null,this._metadataReader=new Lee.MetadataReader,this._moduleActivationStore=new Oee.ModuleActivationStore}return t.merge=function(e,r){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=new t,o=Dee([e,r],i,!0).map(function(c){return(0,yy.getBindingDictionary)(c)}),a=(0,yy.getBindingDictionary)(s);function u(c,l){c.traverse(function(p,f){f.forEach(function(h){l.add(h.serviceIdentifier,h.clone())})})}return o.forEach(function(c){u(c,a)}),s},t.prototype.load=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var i=this._getContainerModuleHelpersFactory(),n=0,s=e;n<s.length;n++){var o=s[n],a=i(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction,a.unbindAsyncFunction,a.onActivationFunction,a.onDeactivationFunction)}},t.prototype.loadAsync=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return en(this,void 0,void 0,function(){var i,n,s,o,a;return tn(this,function(u){switch(u.label){case 0:i=this._getContainerModuleHelpersFactory(),n=0,s=e,u.label=1;case 1:return n<s.length?(o=s[n],a=i(o.id),[4,o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction,a.unbindAsyncFunction,a.onActivationFunction,a.onDeactivationFunction)]):[3,4];case 2:u.sent(),u.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},t.prototype.unload=function(){for(var e=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(n){var s=e._removeModuleBindings(n.id);e._deactivateSingletons(s),e._removeModuleHandlers(n.id)})},t.prototype.unloadAsync=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return en(this,void 0,void 0,function(){var i,n,s,o;return tn(this,function(a){switch(a.label){case 0:i=0,n=e,a.label=1;case 1:return i<n.length?(s=n[i],o=this._removeModuleBindings(s.id),[4,this._deactivateSingletonsAsync(o)]):[3,4];case 2:a.sent(),this._removeModuleHandlers(s.id),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.bind=function(e){var r=this.options.defaultScope||Tl.BindingScopeEnum.Transient,i=new Pee.Binding(e,r);return this._bindingDictionary.add(e,i),new $ee.BindingToSyntax(i)},t.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},t.prototype.rebindAsync=function(e){return en(this,void 0,void 0,function(){return tn(this,function(r){switch(r.label){case 0:return[4,this.unbindAsync(e)];case 1:return r.sent(),[2,this.bind(e)]}})})},t.prototype.unbind=function(e){if(this._bindingDictionary.hasKey(e)){var r=this._bindingDictionary.get(e);this._deactivateSingletons(r)}this._removeServiceFromDictionary(e)},t.prototype.unbindAsync=function(e){return en(this,void 0,void 0,function(){var r;return tn(this,function(i){switch(i.label){case 0:return this._bindingDictionary.hasKey(e)?(r=this._bindingDictionary.get(e),[4,this._deactivateSingletonsAsync(r)]):[3,2];case 1:i.sent(),i.label=2;case 2:return this._removeServiceFromDictionary(e),[2]}})})},t.prototype.unbindAll=function(){var e=this;this._bindingDictionary.traverse(function(r,i){e._deactivateSingletons(i)}),this._bindingDictionary=new wh.Lookup},t.prototype.unbindAllAsync=function(){return en(this,void 0,void 0,function(){var e,r=this;return tn(this,function(i){switch(i.label){case 0:return e=[],this._bindingDictionary.traverse(function(n,s){e.push(r._deactivateSingletonsAsync(s))}),[4,Promise.all(e)];case 1:return i.sent(),this._bindingDictionary=new wh.Lookup,[2]}})})},t.prototype.onActivation=function(e,r){this._activations.add(e,r)},t.prototype.onDeactivation=function(e,r){this._deactivations.add(e,r)},t.prototype.isBound=function(e){var r=this._bindingDictionary.hasKey(e);return!r&&this.parent&&(r=this.parent.isBound(e)),r},t.prototype.isCurrentBound=function(e){return this._bindingDictionary.hasKey(e)},t.prototype.isBoundNamed=function(e,r){return this.isBoundTagged(e,zu.NAMED_TAG,r)},t.prototype.isBoundTagged=function(e,r,i){var n=!1;if(this._bindingDictionary.hasKey(e)){var s=this._bindingDictionary.get(e),o=(0,yy.createMockRequest)(this,e,r,i);n=s.some(function(a){return a.constraint(o)})}return!n&&this.parent&&(n=this.parent.isBoundTagged(e,r,i)),n},t.prototype.snapshot=function(){this._snapshots.push(Mee.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},t.prototype.restore=function(){var e=this._snapshots.pop();if(e===void 0)throw new Error($n.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._activations=e.activations,this._deactivations=e.deactivations,this._middleware=e.middleware,this._moduleActivationStore=e.moduleActivationStore},t.prototype.createChild=function(e){var r=new t(e||this.options);return r.parent=this,r},t.prototype.applyMiddleware=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce(function(n,s){return s(n)},i)},t.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},t.prototype.get=function(e){var r=this._getNotAllArgs(e,!1);return this._getButThrowIfAsync(r)},t.prototype.getAsync=function(e){return en(this,void 0,void 0,function(){var r;return tn(this,function(i){return r=this._getNotAllArgs(e,!1),[2,this._get(r)]})})},t.prototype.getTagged=function(e,r,i){var n=this._getNotAllArgs(e,!1,r,i);return this._getButThrowIfAsync(n)},t.prototype.getTaggedAsync=function(e,r,i){return en(this,void 0,void 0,function(){var n;return tn(this,function(s){return n=this._getNotAllArgs(e,!1,r,i),[2,this._get(n)]})})},t.prototype.getNamed=function(e,r){return this.getTagged(e,zu.NAMED_TAG,r)},t.prototype.getNamedAsync=function(e,r){return this.getTaggedAsync(e,zu.NAMED_TAG,r)},t.prototype.getAll=function(e){var r=this._getAllArgs(e);return this._getButThrowIfAsync(r)},t.prototype.getAllAsync=function(e){var r=this._getAllArgs(e);return this._getAll(r)},t.prototype.getAllTagged=function(e,r,i){var n=this._getNotAllArgs(e,!0,r,i);return this._getButThrowIfAsync(n)},t.prototype.getAllTaggedAsync=function(e,r,i){var n=this._getNotAllArgs(e,!0,r,i);return this._getAll(n)},t.prototype.getAllNamed=function(e,r){return this.getAllTagged(e,zu.NAMED_TAG,r)},t.prototype.getAllNamedAsync=function(e,r){return this.getAllTaggedAsync(e,zu.NAMED_TAG,r)},t.prototype.resolve=function(e){var r=this.isBound(e);r||this.bind(e).toSelf();var i=this.get(e);return r||this.unbind(e),i},t.prototype._preDestroy=function(e,r){if(Reflect.hasMetadata(zu.PRE_DESTROY,e)){var i=Reflect.getMetadata(zu.PRE_DESTROY,e);return r[i.value]()}},t.prototype._removeModuleHandlers=function(e){var r=this._moduleActivationStore.remove(e);this._activations.removeIntersection(r.onActivations),this._deactivations.removeIntersection(r.onDeactivations)},t.prototype._removeModuleBindings=function(e){return this._bindingDictionary.removeByCondition(function(r){return r.moduleId===e})},t.prototype._deactivate=function(e,r){var i=this,n=Object.getPrototypeOf(r).constructor;try{if(this._deactivations.hasKey(e.serviceIdentifier)){var s=this._deactivateContainer(r,this._deactivations.get(e.serviceIdentifier).values());if((0,Xu.isPromise)(s))return this._handleDeactivationError(s.then(function(){return i._propagateContainerDeactivationThenBindingAndPreDestroyAsync(e,r,n)}),n)}var o=this._propagateContainerDeactivationThenBindingAndPreDestroy(e,r,n);if((0,Xu.isPromise)(o))return this._handleDeactivationError(o,n)}catch(a){throw new Error($n.ON_DEACTIVATION_ERROR(n.name,a.message))}},t.prototype._handleDeactivationError=function(e,r){return en(this,void 0,void 0,function(){var i;return tn(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e];case 1:return n.sent(),[3,3];case 2:throw i=n.sent(),new Error($n.ON_DEACTIVATION_ERROR(r.name,i.message));case 3:return[2]}})})},t.prototype._deactivateContainer=function(e,r){for(var i=this,n=r.next();n.value;){var s=n.value(e);if((0,Xu.isPromise)(s))return s.then(function(){return i._deactivateContainerAsync(e,r)});n=r.next()}},t.prototype._deactivateContainerAsync=function(e,r){return en(this,void 0,void 0,function(){var i;return tn(this,function(n){switch(n.label){case 0:i=r.next(),n.label=1;case 1:return i.value?[4,i.value(e)]:[3,3];case 2:return n.sent(),i=r.next(),[3,1];case 3:return[2]}})})},t.prototype._getContainerModuleHelpersFactory=function(){var e=this,r=function(l,p){l._binding.moduleId=p},i=function(l){return function(p){var f=e.bind(p);return r(f,l),f}},n=function(){return function(l){return e.unbind(l)}},s=function(){return function(l){return e.unbindAsync(l)}},o=function(){return function(l){return e.isBound(l)}},a=function(l){return function(p){var f=e.rebind(p);return r(f,l),f}},u=function(l){return function(p,f){e._moduleActivationStore.addActivation(l,p,f),e.onActivation(p,f)}},c=function(l){return function(p,f){e._moduleActivationStore.addDeactivation(l,p,f),e.onDeactivation(p,f)}};return function(l){return{bindFunction:i(l),isboundFunction:o(),onActivationFunction:u(l),onDeactivationFunction:c(l),rebindFunction:a(l),unbindFunction:n(),unbindAsyncFunction:s()}}},t.prototype._getAll=function(e){return Promise.all(this._get(e))},t.prototype._get=function(e){var r=vy(vy({},e),{contextInterceptor:function(n){return n},targetType:Tl.TargetTypeEnum.Variable});if(this._middleware){var i=this._middleware(r);if(i==null)throw new Error($n.INVALID_MIDDLEWARE_RETURN);return i}return this._planAndResolve()(r)},t.prototype._getButThrowIfAsync=function(e){var r=this._get(e);if((0,Xu.isPromiseOrContainsPromise)(r))throw new Error($n.LAZY_IN_SYNC(e.serviceIdentifier));return r},t.prototype._getAllArgs=function(e){var r={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:e};return r},t.prototype._getNotAllArgs=function(e,r,i,n){var s={avoidConstraints:!1,isMultiInject:r,serviceIdentifier:e,key:i,value:n};return s},t.prototype._planAndResolve=function(){var e=this;return function(r){var i=(0,yy.plan)(e._metadataReader,e,r.isMultiInject,r.targetType,r.serviceIdentifier,r.key,r.value,r.avoidConstraints);i=r.contextInterceptor(i);var n=(0,Tee.resolve)(i);return n}},t.prototype._deactivateIfSingleton=function(e){var r=this;if(e.activated)return(0,Xu.isPromise)(e.cache)?e.cache.then(function(i){return r._deactivate(e,i)}):this._deactivate(e,e.cache)},t.prototype._deactivateSingletons=function(e){for(var r=0,i=e;r<i.length;r++){var n=i[r],s=this._deactivateIfSingleton(n);if((0,Xu.isPromise)(s))throw new Error($n.ASYNC_UNBIND_REQUIRED)}},t.prototype._deactivateSingletonsAsync=function(e){return en(this,void 0,void 0,function(){var r=this;return tn(this,function(i){switch(i.label){case 0:return[4,Promise.all(e.map(function(n){return r._deactivateIfSingleton(n)}))];case 1:return i.sent(),[2]}})})},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(e,r,i){return this.parent?this._deactivate.bind(this.parent)(e,r):this._bindingDeactivationAndPreDestroy(e,r,i)},t.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(e,r,i){return en(this,void 0,void 0,function(){return tn(this,function(n){switch(n.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(e,r)]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(e,r,i)];case 3:n.sent(),n.label=4;case 4:return[2]}})})},t.prototype._removeServiceFromDictionary=function(e){try{this._bindingDictionary.remove(e)}catch{throw new Error($n.CANNOT_UNBIND+" "+(0,Ree.getServiceIdentifierAsString)(e))}},t.prototype._bindingDeactivationAndPreDestroy=function(e,r,i){var n=this;if(typeof e.onDeactivation=="function"){var s=e.onDeactivation(r);if((0,Xu.isPromise)(s))return s.then(function(){return n._preDestroy(i,r)})}return this._preDestroy(i,r)},t.prototype._bindingDeactivationAndPreDestroyAsync=function(e,r,i){return en(this,void 0,void 0,function(){return tn(this,function(n){switch(n.label){case 0:return typeof e.onDeactivation!="function"?[3,2]:[4,e.onDeactivation(r)];case 1:n.sent(),n.label=2;case 2:return[4,this._preDestroy(i,r)];case 3:return n.sent(),[2]}})})},t}();pr.Container=Nee});var lR=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.AsyncContainerModule=$l.ContainerModule=void 0;var cR=pa(),Fee=function(){function t(e){this.id=(0,cR.id)(),this.registry=e}return t}();$l.ContainerModule=Fee;var Bee=function(){function t(e){this.id=(0,cR.id)(),this.registry=e}return t}();$l.AsyncContainerModule=Bee});var pR=b(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.getFirstArrayDuplicate=void 0;function Uee(t){for(var e=new Set,r=0,i=t;r<i.length;r++){var n=i[r];if(e.has(n))return n;e.add(n)}}by.getFirstArrayDuplicate=Uee});var po=b(Fr=>{"use strict";var jee=Fr&&Fr.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),qee=Fr&&Fr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dR=Fr&&Fr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&jee(e,t,r);return qee(e,t),e};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.createTaggedDecorator=Fr.tagProperty=Fr.tagParameter=Fr.decorate=void 0;var wy=dR(Mr()),hR=dR(Kt()),Wee=pR();function Vee(t){return t.prototype!==void 0}function Gee(t){if(t!==void 0)throw new Error(wy.INVALID_DECORATOR_OPERATION)}function mR(t,e,r,i){Gee(e),HR(hR.TAGGED,t,r.toString(),i)}Fr.tagParameter=mR;function gR(t,e,r){if(Vee(t))throw new Error(wy.INVALID_DECORATOR_OPERATION);HR(hR.TAGGED_PROP,t.constructor,e,r)}Fr.tagProperty=gR;function Kee(t){var e=[];if(Array.isArray(t)){e=t;var r=(0,Wee.getFirstArrayDuplicate)(e.map(function(i){return i.key}));if(r!==void 0)throw new Error(wy.DUPLICATED_METADATA+" "+r.toString())}else e=[t];return e}function HR(t,e,r,i){var n=Kee(i),s={};Reflect.hasOwnMetadata(t,e)&&(s=Reflect.getMetadata(t,e));var o=s[r];if(o===void 0)o=[];else for(var a=function(p){if(n.some(function(f){return f.key===p.key}))throw new Error(wy.DUPLICATED_METADATA+" "+p.key.toString())},u=0,c=o;u<c.length;u++){var l=c[u];a(l)}o.push.apply(o,n),s[r]=o,Reflect.defineMetadata(t,s,e)}function zee(t){return function(e,r,i){typeof i=="number"?mR(e,r,i,t):gR(e,r,t)}}Fr.createTaggedDecorator=zee;function fR(t,e){Reflect.decorate(t,e)}function Xee(t,e){return function(r,i){e(r,i,t)}}function Jee(t,e,r){typeof r=="number"?fR([Xee(r,t)],e):typeof r=="string"?Reflect.decorate([t],e,r):fR([t],e)}Fr.decorate=Jee});var vR=b(fs=>{"use strict";var Yee=fs&&fs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Qee=fs&&fs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yR=fs&&fs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Yee(e,t,r);return Qee(e,t),e};Object.defineProperty(fs,"__esModule",{value:!0});fs.injectable=void 0;var Zee=yR(Mr()),qI=yR(Kt());function ete(){return function(t){if(Reflect.hasOwnMetadata(qI.PARAM_TYPES,t))throw new Error(Zee.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(qI.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(qI.PARAM_TYPES,e,t),t}}fs.injectable=ete});var bR=b(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.tagged=void 0;var tte=Tn(),rte=po();function ite(t,e){return(0,rte.createTaggedDecorator)(new tte.Metadata(t,e))}_y.tagged=ite});var wR=b(ds=>{"use strict";var nte=ds&&ds.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),ste=ds&&ds.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ote=ds&&ds.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nte(e,t,r);return ste(e,t),e};Object.defineProperty(ds,"__esModule",{value:!0});ds.named=void 0;var ate=ote(Kt()),ute=Tn(),cte=po();function lte(t){return(0,cte.createTaggedDecorator)(new ute.Metadata(ate.NAMED_TAG,t))}ds.named=lte});var WI=b(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.injectBase=void 0;var pte=Mr(),fte=Tn(),dte=po();function hte(t){return function(e){return function(r,i,n){if(e===void 0){var s=typeof r=="function"?r.name:r.constructor.name;throw new Error((0,pte.UNDEFINED_INJECT_ANNOTATION)(s))}return(0,dte.createTaggedDecorator)(new fte.Metadata(t,e))(r,i,n)}}}Ay.injectBase=hte});var _R=b(hs=>{"use strict";var mte=hs&&hs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),gte=hs&&hs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Hte=hs&&hs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&mte(e,t,r);return gte(e,t),e};Object.defineProperty(hs,"__esModule",{value:!0});hs.inject=void 0;var yte=Hte(Kt()),vte=WI(),bte=(0,vte.injectBase)(yte.INJECT_TAG);hs.inject=bte});var AR=b(ms=>{"use strict";var wte=ms&&ms.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),_te=ms&&ms.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ate=ms&&ms.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wte(e,t,r);return _te(e,t),e};Object.defineProperty(ms,"__esModule",{value:!0});ms.optional=void 0;var Ite=Ate(Kt()),Ete=Tn(),Ste=po();function Cte(){return(0,Ste.createTaggedDecorator)(new Ete.Metadata(Ite.OPTIONAL_TAG,!0))}ms.optional=Cte});var IR=b(gs=>{"use strict";var xte=gs&&gs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Dte=gs&&gs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Pte=gs&&gs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xte(e,t,r);return Dte(e,t),e};Object.defineProperty(gs,"__esModule",{value:!0});gs.unmanaged=void 0;var Lte=Pte(Kt()),Tte=Tn(),$te=po();function kte(){return function(t,e,r){var i=new Tte.Metadata(Lte.UNMANAGED_TAG,!0);(0,$te.tagParameter)(t,e,r,i)}}gs.unmanaged=kte});var ER=b(Hs=>{"use strict";var Rte=Hs&&Hs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Mte=Hs&&Hs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ote=Hs&&Hs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Rte(e,t,r);return Mte(e,t),e};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.multiInject=void 0;var Nte=Ote(Kt()),Fte=WI(),Bte=(0,Fte.injectBase)(Nte.MULTI_INJECT_TAG);Hs.multiInject=Bte});var SR=b(ys=>{"use strict";var Ute=ys&&ys.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),jte=ys&&ys.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qte=ys&&ys.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ute(e,t,r);return jte(e,t),e};Object.defineProperty(ys,"__esModule",{value:!0});ys.targetName=void 0;var Wte=qte(Kt()),Vte=Tn(),Gte=po();function Kte(t){return function(e,r,i){var n=new Vte.Metadata(Wte.NAME_TAG,t);(0,Gte.tagParameter)(e,r,i,n)}}ys.targetName=Kte});var VI=b(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.propertyEventDecorator=void 0;var zte=Tn();function Xte(t,e){return function(){return function(r,i){var n=new zte.Metadata(t,i);if(Reflect.hasOwnMetadata(t,r.constructor))throw new Error(e);Reflect.defineMetadata(t,n,r.constructor)}}}Iy.propertyEventDecorator=Xte});var xR=b(vs=>{"use strict";var Jte=vs&&vs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Yte=vs&&vs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CR=vs&&vs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Jte(e,t,r);return Yte(e,t),e};Object.defineProperty(vs,"__esModule",{value:!0});vs.postConstruct=void 0;var Qte=CR(Mr()),Zte=CR(Kt()),ere=VI(),tre=(0,ere.propertyEventDecorator)(Zte.POST_CONSTRUCT,Qte.MULTIPLE_POST_CONSTRUCT_METHODS);vs.postConstruct=tre});var PR=b(bs=>{"use strict";var rre=bs&&bs.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),ire=bs&&bs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DR=bs&&bs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rre(e,t,r);return ire(e,t),e};Object.defineProperty(bs,"__esModule",{value:!0});bs.preDestroy=void 0;var nre=DR(Mr()),sre=DR(Kt()),ore=VI(),are=(0,ore.propertyEventDecorator)(sre.PRE_DESTROY,nre.MULTIPLE_PRE_DESTROY_METHODS);bs.preDestroy=are});var LR=b(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.interfaces=void 0;var GI;(function(t){})(GI||(GI={}));Ey.interfaces=GI});var Y=b(pe=>{"use strict";var ure=pe&&pe.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),cre=pe&&pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lre=pe&&pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ure(e,t,r);return cre(e,t),e};Object.defineProperty(pe,"__esModule",{value:!0});pe.multiBindToService=pe.getServiceIdentifierAsString=pe.typeConstraint=pe.namedConstraint=pe.taggedConstraint=pe.traverseAncerstors=pe.decorate=pe.interfaces=pe.id=pe.MetadataReader=pe.preDestroy=pe.postConstruct=pe.targetName=pe.multiInject=pe.unmanaged=pe.optional=pe.LazyServiceIdentifer=pe.inject=pe.named=pe.tagged=pe.injectable=pe.createTaggedDecorator=pe.ContainerModule=pe.AsyncContainerModule=pe.TargetTypeEnum=pe.BindingTypeEnum=pe.BindingScopeEnum=pe.Container=pe.METADATA_KEY=void 0;var pre=lre(Kt());pe.METADATA_KEY=pre;var fre=uR();Object.defineProperty(pe,"Container",{enumerable:!0,get:function(){return fre.Container}});var KI=Ln();Object.defineProperty(pe,"BindingScopeEnum",{enumerable:!0,get:function(){return KI.BindingScopeEnum}});Object.defineProperty(pe,"BindingTypeEnum",{enumerable:!0,get:function(){return KI.BindingTypeEnum}});Object.defineProperty(pe,"TargetTypeEnum",{enumerable:!0,get:function(){return KI.TargetTypeEnum}});var TR=lR();Object.defineProperty(pe,"AsyncContainerModule",{enumerable:!0,get:function(){return TR.AsyncContainerModule}});Object.defineProperty(pe,"ContainerModule",{enumerable:!0,get:function(){return TR.ContainerModule}});var dre=po();Object.defineProperty(pe,"createTaggedDecorator",{enumerable:!0,get:function(){return dre.createTaggedDecorator}});var hre=vR();Object.defineProperty(pe,"injectable",{enumerable:!0,get:function(){return hre.injectable}});var mre=bR();Object.defineProperty(pe,"tagged",{enumerable:!0,get:function(){return mre.tagged}});var gre=wR();Object.defineProperty(pe,"named",{enumerable:!0,get:function(){return gre.named}});var Hre=_R();Object.defineProperty(pe,"inject",{enumerable:!0,get:function(){return Hre.inject}});var yre=bI();Object.defineProperty(pe,"LazyServiceIdentifer",{enumerable:!0,get:function(){return yre.LazyServiceIdentifer}});var vre=AR();Object.defineProperty(pe,"optional",{enumerable:!0,get:function(){return vre.optional}});var bre=IR();Object.defineProperty(pe,"unmanaged",{enumerable:!0,get:function(){return bre.unmanaged}});var wre=ER();Object.defineProperty(pe,"multiInject",{enumerable:!0,get:function(){return wre.multiInject}});var _re=SR();Object.defineProperty(pe,"targetName",{enumerable:!0,get:function(){return _re.targetName}});var Are=xR();Object.defineProperty(pe,"postConstruct",{enumerable:!0,get:function(){return Are.postConstruct}});var Ire=PR();Object.defineProperty(pe,"preDestroy",{enumerable:!0,get:function(){return Ire.preDestroy}});var Ere=yI();Object.defineProperty(pe,"MetadataReader",{enumerable:!0,get:function(){return Ere.MetadataReader}});var Sre=pa();Object.defineProperty(pe,"id",{enumerable:!0,get:function(){return Sre.id}});var Cre=LR();Object.defineProperty(pe,"interfaces",{enumerable:!0,get:function(){return Cre.interfaces}});var xre=po();Object.defineProperty(pe,"decorate",{enumerable:!0,get:function(){return xre.decorate}});var Sy=NI();Object.defineProperty(pe,"traverseAncerstors",{enumerable:!0,get:function(){return Sy.traverseAncerstors}});Object.defineProperty(pe,"taggedConstraint",{enumerable:!0,get:function(){return Sy.taggedConstraint}});Object.defineProperty(pe,"namedConstraint",{enumerable:!0,get:function(){return Sy.namedConstraint}});Object.defineProperty(pe,"typeConstraint",{enumerable:!0,get:function(){return Sy.typeConstraint}});var Dre=Cl();Object.defineProperty(pe,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return Dre.getServiceIdentifierAsString}});var Pre=LI();Object.defineProperty(pe,"multiBindToService",{enumerable:!0,get:function(){return Pre.multiBindToService}})});var JR=b(XR=>{var zR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");XR.encode=function(t){if(0<=t&&t<zR.length)return zR[t];throw new TypeError("Must be between 0 and 63: "+t)}});var eE=b(ZR=>{var Ore=JR(),YR=5,QR=1<<YR,Nre=QR-1,Fre=QR;function Bre(t){return t<0?(-t<<1)+1:(t<<1)+0}ZR.encode=function(e){let r="",i,n=Bre(e);do i=n&Nre,n>>>=YR,n>0&&(i|=Fre),r+=Ore.encode(i);while(n>0);return r}});var tM=b((EIe,eM)=>{"use strict";eM.exports=typeof URL=="function"?URL:require("url").URL});var xh=b(As=>{var ha=tM();function Ure(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}As.getArg=Ure;var iM=function(){return!("__proto__"in Object.create(null))}();function nM(t){return t}function jre(t){return sM(t)?"$"+t:t}As.toSetString=iM?nM:jre;function qre(t){return sM(t)?t.slice(1):t}As.fromSetString=iM?nM:qre;function sM(t){if(!t)return!1;let e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(let r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function rM(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Wre(t,e){let r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=rM(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:rM(t.name,e.name)}As.compareByGeneratedPositionsInflated=Wre;function Vre(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}As.parseSourceMapInput=Vre;var rE="http:",Sh=`${rE}//host`;function iE(t){return e=>{let r=Rl(e),i=nE(e),n=new ha(e,i);t(n);let s=n.toString();return r==="absolute"?s:r==="scheme-relative"?s.slice(rE.length):r==="path-absolute"?s.slice(Sh.length):sE(i,s)}}function da(t,e){return new ha(t,e).toString()}function Gre(t,e){let r=0;do{let i=t+r++;if(e.indexOf(i)===-1)return i}while(!0)}function nE(t){let e=t.split("..").length-1,r=Gre("p",t),i=`${Sh}/`;for(let n=0;n<e;n++)i+=`${r}/`;return i}var Kre=/^[A-Za-z0-9\+\-\.]+:/;function Rl(t){return t[0]==="/"?t[1]==="/"?"scheme-relative":"path-absolute":Kre.test(t)?"absolute":"path-relative"}function sE(t,e){typeof t=="string"&&(t=new ha(t)),typeof e=="string"&&(e=new ha(e));let r=e.pathname.split("/"),i=t.pathname.split("/");for(i.length>0&&!i[i.length-1]&&i.pop();r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();return i.map(()=>"..").concat(r).join("/")+e.search+e.hash}var zre=iE(t=>{t.pathname=t.pathname.replace(/\/?$/,"/")}),Xre=iE(t=>{t.href=new ha(".",t.toString()).toString()}),Ch=iE(t=>{});As.normalize=Ch;function tE(t,e){let r=Rl(e),i=Rl(t);if(t=zre(t),r==="absolute")return da(e,void 0);if(i==="absolute")return da(e,t);if(r==="scheme-relative")return Ch(e);if(i==="scheme-relative")return da(e,da(t,Sh)).slice(rE.length);if(r==="path-absolute")return Ch(e);if(i==="path-absolute")return da(e,da(t,Sh)).slice(Sh.length);let n=nE(e+t),s=da(e,da(t,n));return sE(n,s)}As.join=tE;function Jre(t,e){let r=Yre(t,e);return typeof r=="string"?r:Ch(e)}As.relative=Jre;function Yre(t,e){if(Rl(t)!==Rl(e))return null;let i=nE(t+e),n=new ha(t,i),s=new ha(e,i);try{new ha("",s.toString())}catch{return null}return s.protocol!==n.protocol||s.user!==n.user||s.password!==n.password||s.hostname!==n.hostname||s.port!==n.port?null:sE(n,s)}function Qre(t,e,r){t&&Rl(e)==="path-absolute"&&(e=e.replace(/^\//,""));let i=Ch(e||"");return t&&(i=tE(t,i)),r&&(i=tE(Xre(r),i)),i}As.computeSourceURL=Qre});var oE=b(oM=>{var Dh=class{constructor(){this._array=[],this._set=new Map}static fromArray(e,r){let i=new Dh;for(let n=0,s=e.length;n<s;n++)i.add(e[n],r);return i}size(){return this._set.size}add(e,r){let i=this.has(e),n=this._array.length;(!i||r)&&this._array.push(e),i||this._set.set(e,n)}has(e){return this._set.has(e)}indexOf(e){let r=this._set.get(e);if(r>=0)return r;throw new Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)}toArray(){return this._array.slice()}};oM.ArraySet=Dh});var cM=b(uM=>{var aM=xh();function Zre(t,e){let r=t.generatedLine,i=e.generatedLine,n=t.generatedColumn,s=e.generatedColumn;return i>r||i==r&&s>=n||aM.compareByGeneratedPositionsInflated(t,e)<=0}var aE=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,r){this._array.forEach(e,r)}add(e){Zre(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))}toArray(){return this._sorted||(this._array.sort(aM.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};uM.MappingList=aE});var uE=b(lM=>{var Ph=eE(),Xt=xh(),My=oE().ArraySet,eie=cM().MappingList,Ml=class{constructor(e){e||(e={}),this._file=Xt.getArg(e,"file",null),this._sourceRoot=Xt.getArg(e,"sourceRoot",null),this._skipValidation=Xt.getArg(e,"skipValidation",!1),this._sources=new My,this._names=new My,this._mappings=new eie,this._sourcesContents=null}static fromSourceMap(e){let r=e.sourceRoot,i=new Ml({file:e.file,sourceRoot:r});return e.eachMapping(function(n){let s={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(s.source=n.source,r!=null&&(s.source=Xt.relative(r,s.source)),s.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(s.name=n.name)),i.addMapping(s)}),e.sources.forEach(function(n){let s=n;r!==null&&(s=Xt.relative(r,n)),i._sources.has(s)||i._sources.add(s);let o=e.sourceContentFor(n);o!=null&&i.setSourceContent(n,o)}),i}addMapping(e){let r=Xt.getArg(e,"generated"),i=Xt.getArg(e,"original",null),n=Xt.getArg(e,"source",null),s=Xt.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,i,n,s),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:n,name:s})}setSourceContent(e,r){let i=e;this._sourceRoot!=null&&(i=Xt.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Xt.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Xt.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))}applySourceMap(e,r,i){let n=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}let s=this._sourceRoot;s!=null&&(n=Xt.relative(s,n));let o=this._mappings.toArray().length>0?new My:this._sources,a=new My;this._mappings.unsortedForEach(function(u){if(u.source===n&&u.originalLine!=null){let p=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});p.source!=null&&(u.source=p.source,i!=null&&(u.source=Xt.join(i,u.source)),s!=null&&(u.source=Xt.relative(s,u.source)),u.originalLine=p.line,u.originalColumn=p.column,p.name!=null&&(u.name=p.name))}let c=u.source;c!=null&&!o.has(c)&&o.add(c);let l=u.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=o,this._names=a,e.sources.forEach(function(u){let c=e.sourceContentFor(u);c!=null&&(i!=null&&(u=Xt.join(i,u)),s!=null&&(u=Xt.relative(s,u)),this.setSourceContent(u,c))},this)}_validateMapping(e,r,i,n){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!n)){if(!(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:n}))}}_serializeMappings(){let e=0,r=1,i=0,n=0,s=0,o=0,a="",u,c,l,p,f=this._mappings.toArray();for(let h=0,g=f.length;h<g;h++){if(c=f[h],u="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)u+=";",r++;else if(h>0){if(!Xt.compareByGeneratedPositionsInflated(c,f[h-1]))continue;u+=","}u+=Ph.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(p=this._sources.indexOf(c.source),u+=Ph.encode(p-o),o=p,u+=Ph.encode(c.originalLine-1-n),n=c.originalLine-1,u+=Ph.encode(c.originalColumn-i),i=c.originalColumn,c.name!=null&&(l=this._names.indexOf(c.name),u+=Ph.encode(l-s),s=l)),a+=u}return a}_generateSourcesContent(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=Xt.relative(r,i));let n=Xt.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)}toJSON(){let e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e}toString(){return JSON.stringify(this.toJSON())}};Ml.prototype._version=3;lM.SourceMapGenerator=Ml});var pM=b(Qu=>{Qu.GREATEST_LOWER_BOUND=1;Qu.LEAST_UPPER_BOUND=2;function cE(t,e,r,i,n,s){let o=Math.floor((e-t)/2)+t,a=n(r,i[o],!0);return a===0?o:a>0?e-o>1?cE(o,e,r,i,n,s):s==Qu.LEAST_UPPER_BOUND?e<i.length?e:-1:o:o-t>1?cE(t,o,r,i,n,s):s==Qu.LEAST_UPPER_BOUND?o:t<0?-1:t}Qu.search=function(e,r,i,n){if(r.length===0)return-1;let s=cE(-1,r.length,e,r,i,n||Qu.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&i(r[s],r[s-1],!0)===0;)--s;return s}});var pE=b((LIe,lE)=>{"use strict";var tie=require("fs"),rie=require("path");lE.exports=function(){return new Promise((e,r)=>{let i=rie.join(__dirname,"mappings.wasm");tie.readFile(i,null,(n,s)=>{if(n){r(n);return}e(s.buffer)})})};lE.exports.initialize=t=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}});var dM=b((TIe,fM)=>{var iie=pE();function nie(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Lh=null;fM.exports=function(){if(Lh)return Lh;let e=[];return Lh=iie().then(r=>WebAssembly.instantiate(r,{env:{mapping_callback(i,n,s,o,a,u,c,l,p,f){let h=new nie;h.generatedLine=i+1,h.generatedColumn=n,s&&(h.lastGeneratedColumn=o-1),a&&(h.source=u,h.originalLine=c+1,h.originalColumn=l,p&&(h.name=f)),e[e.length-1](h)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}})).then(r=>({exports:r.instance.exports,withMappingCallback:(i,n)=>{e.push(i);try{n()}finally{e.pop()}}})).then(null,r=>{throw Lh=null,r}),Lh}});var hM=b(Ny=>{var xe=xh(),sie=pM(),fE=oE().ArraySet,$Ie=eE(),oie=pE(),aie=dM(),dE=Symbol("smcInternal"),Bt=class{constructor(e,r){return e==dE?Promise.resolve(this):uie(e,r)}static initialize(e){oie.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,r){return cie(e,r)}static async with(e,r,i){let n=await new Bt(e,r);try{return await i(n)}finally{n.destroy()}}eachMapping(e,r,i){throw new Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw new Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw new Error("Subclasses must implement destroy")}};Bt.prototype._version=3;Bt.GENERATED_ORDER=1;Bt.ORIGINAL_ORDER=2;Bt.GREATEST_LOWER_BOUND=1;Bt.LEAST_UPPER_BOUND=2;Ny.SourceMapConsumer=Bt;var ma=class extends Bt{constructor(e,r){return super(dE).then(i=>{let n=e;typeof e=="string"&&(n=xe.parseSourceMapInput(e));let s=xe.getArg(n,"version"),o=xe.getArg(n,"sources").map(String),a=xe.getArg(n,"names",[]),u=xe.getArg(n,"sourceRoot",null),c=xe.getArg(n,"sourcesContent",null),l=xe.getArg(n,"mappings"),p=xe.getArg(n,"file",null);if(s!=i._version)throw new Error("Unsupported version: "+s);return i._sourceLookupCache=new Map,i._names=fE.fromArray(a.map(String),!0),i._sources=fE.fromArray(o,!0),i._absoluteSources=fE.fromArray(i._sources.toArray().map(function(f){return xe.computeSourceURL(u,f,r)}),!0),i.sourceRoot=u,i.sourcesContent=c,i._mappings=l,i._sourceMapURL=r,i.file=p,i._computedColumnSpans=!1,i._mappingsPtr=0,i._wasm=null,aie().then(f=>(i._wasm=f,i))})}_findSourceIndex(e){let r=this._sourceLookupCache.get(e);if(typeof r=="number")return r;let i=xe.computeSourceURL(null,e,this._sourceMapURL);if(this._absoluteSources.has(i)){let s=this._absoluteSources.indexOf(i);return this._sourceLookupCache.set(e,s),s}let n=xe.computeSourceURL(this.sourceRoot,e,this._sourceMapURL);if(this._absoluteSources.has(n)){let s=this._absoluteSources.indexOf(n);return this._sourceLookupCache.set(e,s),s}return-1}static fromSourceMap(e,r){return new ma(e.toString())}get sources(){return this._absoluteSources.toArray()}_getMappingsPtr(){return this._mappingsPtr===0&&this._parseMappings(),this._mappingsPtr}_parseMappings(){let e=this._mappings,r=e.length,i=this._wasm.exports.allocate_mappings(r),n=new Uint8Array(this._wasm.exports.memory.buffer,i,r);for(let o=0;o<r;o++)n[o]=e.charCodeAt(o);let s=this._wasm.exports.parse_mappings(i);if(!s){let o=this._wasm.exports.get_last_error(),a=`Error parsing mappings (code ${o}): `;switch(o){case 1:a+="the mappings contained a negative line, column, source index, or name index";break;case 2:a+="the mappings contained a number larger than 2**32";break;case 3:a+="reached EOF while in the middle of parsing a VLQ";break;case 4:a+="invalid base 64 character while parsing a VLQ";break;default:a+="unknown error code";break}throw new Error(a)}this._mappingsPtr=s}eachMapping(e,r,i){let n=r||null,s=i||Bt.GENERATED_ORDER;this._wasm.withMappingCallback(o=>{o.source!==null&&(o.source=this._absoluteSources.at(o.source),o.name!==null&&(o.name=this._names.at(o.name))),this._computedColumnSpans&&o.lastGeneratedColumn===null&&(o.lastGeneratedColumn=1/0),e.call(n,o)},()=>{switch(s){case Bt.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case Bt.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw new Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let r=xe.getArg(e,"source"),i=xe.getArg(e,"line"),n=e.column||0;if(r=this._findSourceIndex(r),r<0)return[];if(i<1)throw new Error("Line numbers must be >= 1");if(n<0)throw new Error("Column numbers must be >= 0");let s=[];return this._wasm.withMappingCallback(o=>{let a=o.lastGeneratedColumn;this._computedColumnSpans&&a===null&&(a=1/0),s.push({line:o.generatedLine,column:o.generatedColumn,lastColumn:a})},()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),r,i-1,"column"in e,n)}),s}destroy(){this._mappingsPtr!==0&&(this._wasm.exports.free_mappings(this._mappingsPtr),this._mappingsPtr=0)}computeColumnSpans(){this._computedColumnSpans||(this._wasm.exports.compute_column_spans(this._getMappingsPtr()),this._computedColumnSpans=!0)}originalPositionFor(e){let r={generatedLine:xe.getArg(e,"line"),generatedColumn:xe.getArg(e,"column")};if(r.generatedLine<1)throw new Error("Line numbers must be >= 1");if(r.generatedColumn<0)throw new Error("Column numbers must be >= 0");let i=xe.getArg(e,"bias",Bt.GREATEST_LOWER_BOUND);i==null&&(i=Bt.GREATEST_LOWER_BOUND);let n;if(this._wasm.withMappingCallback(s=>n=s,()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),r.generatedLine-1,r.generatedColumn,i)}),n&&n.generatedLine===r.generatedLine){let s=xe.getArg(n,"source",null);s!==null&&(s=this._absoluteSources.at(s));let o=xe.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:xe.getArg(n,"originalLine",null),column:xe.getArg(n,"originalColumn",null),name:o}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1}sourceContentFor(e,r){if(!this.sourcesContent)return null;let i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){let r=xe.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};let i={source:r,originalLine:xe.getArg(e,"line"),originalColumn:xe.getArg(e,"column")};if(i.originalLine<1)throw new Error("Line numbers must be >= 1");if(i.originalColumn<0)throw new Error("Column numbers must be >= 0");let n=xe.getArg(e,"bias",Bt.GREATEST_LOWER_BOUND);n==null&&(n=Bt.GREATEST_LOWER_BOUND);let s;if(this._wasm.withMappingCallback(o=>s=o,()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),i.source,i.originalLine-1,i.originalColumn,n)}),s&&s.source===i.source){let o=s.lastGeneratedColumn;return this._computedColumnSpans&&o===null&&(o=1/0),{line:xe.getArg(s,"generatedLine",null),column:xe.getArg(s,"generatedColumn",null),lastColumn:o}}return{line:null,column:null,lastColumn:null}}};ma.prototype.consumer=Bt;Ny.BasicSourceMapConsumer=ma;var Oy=class extends Bt{constructor(e,r){return super(dE).then(i=>{let n=e;typeof e=="string"&&(n=xe.parseSourceMapInput(e));let s=xe.getArg(n,"version"),o=xe.getArg(n,"sections");if(s!=i._version)throw new Error("Unsupported version: "+s);let a={line:-1,column:0};return Promise.all(o.map(u=>{if(u.url)throw new Error("Support for url field in sections not implemented.");let c=xe.getArg(u,"offset"),l=xe.getArg(c,"line"),p=xe.getArg(c,"column");if(l<a.line||l===a.line&&p<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=c,new Bt(xe.getArg(u,"map"),r).then(h=>({generatedOffset:{generatedLine:l+1,generatedColumn:p+1},consumer:h}))})).then(u=>(i._sections=u,i))})}get sources(){let e=[];for(let r=0;r<this._sections.length;r++)for(let i=0;i<this._sections[r].consumer.sources.length;i++)e.push(this._sections[r].consumer.sources[i]);return e}originalPositionFor(e){let r={generatedLine:xe.getArg(e,"line"),generatedColumn:xe.getArg(e,"column")},i=sie.search(r,this._sections,function(s,o){let a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),n=this._sections[i];return n?n.consumer.originalPositionFor({line:r.generatedLine-(n.generatedOffset.generatedLine-1),column:r.generatedColumn-(n.generatedOffset.generatedLine===r.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})}sourceContentFor(e,r){for(let i=0;i<this._sections.length;i++){let s=this._sections[i].consumer.sourceContentFor(e,!0);if(s)return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')}_findSectionIndex(e){for(let r=0;r<this._sections.length;r++){let{consumer:i}=this._sections[r];if(i._findSourceIndex(e)!==-1)return r}return-1}generatedPositionFor(e){let r=this._findSectionIndex(xe.getArg(e,"source")),i=r>=0?this._sections[r]:null,n=r>=0&&r+1<this._sections.length?this._sections[r+1]:null,s=i&&i.consumer.generatedPositionFor(e);if(s&&s.line!==null){let o=i.generatedOffset.generatedLine-1,a=i.generatedOffset.generatedColumn-1;return s.line===1&&(s.column+=a,typeof s.lastColumn=="number"&&(s.lastColumn+=a)),s.lastColumn===1/0&&n&&s.line===n.generatedOffset.generatedLine&&(s.lastColumn=n.generatedOffset.generatedColumn-2),s.line+=o,s}return{line:null,column:null,lastColumn:null}}allGeneratedPositionsFor(e){let r=this._findSectionIndex(xe.getArg(e,"source")),i=r>=0?this._sections[r]:null,n=r>=0&&r+1<this._sections.length?this._sections[r+1]:null;return i?i.consumer.allGeneratedPositionsFor(e).map(s=>{let o=i.generatedOffset.generatedLine-1,a=i.generatedOffset.generatedColumn-1;return s.line===1&&(s.column+=a,typeof s.lastColumn=="number"&&(s.lastColumn+=a)),s.lastColumn===1/0&&n&&s.line===n.generatedOffset.generatedLine&&(s.lastColumn=n.generatedOffset.generatedColumn-2),s.line+=o,s}):[]}eachMapping(e,r,i){this._sections.forEach((n,s)=>{let o=s+1<this._sections.length?this._sections[s+1]:null,{generatedOffset:a}=n,u=a.generatedLine-1,c=a.generatedColumn-1;n.consumer.eachMapping(function(l){l.generatedLine===1&&(l.generatedColumn+=c,typeof l.lastGeneratedColumn=="number"&&(l.lastGeneratedColumn+=c)),l.lastGeneratedColumn===1/0&&o&&l.generatedLine===o.generatedOffset.generatedLine&&(l.lastGeneratedColumn=o.generatedOffset.generatedColumn-2),l.generatedLine+=u,e.call(this,l)},r,i)})}computeColumnSpans(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.computeColumnSpans()}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}};Ny.IndexedSourceMapConsumer=Oy;function uie(t,e){let r=t;typeof t=="string"&&(r=xe.parseSourceMapInput(t));let i=r.sections!=null?new Oy(r,e):new ma(r,e);return Promise.resolve(i)}function cie(t,e){return ma.fromSourceMap(t,e)}});var gM=b(mM=>{var lie=uE().SourceMapGenerator,Fy=xh(),pie=/(\r?\n)/,fie=10,Ol="$$$isSourceNode$$$",Nl=class{constructor(e,r,i,n,s){this.children=[],this.sourceContents={},this.line=e??null,this.column=r??null,this.source=i??null,this.name=s??null,this[Ol]=!0,n!=null&&this.add(n)}static fromStringWithSourceMap(e,r,i){let n=new Nl,s=e.split(pie),o=0,a=function(){let h=H(),g=H()||"";return h+g;function H(){return o<s.length?s[o++]:void 0}},u=1,c=0,l=null,p;return r.eachMapping(function(h){if(l!==null)if(u<h.generatedLine)f(l,a()),u++,c=0;else{p=s[o]||"";let g=p.substr(0,h.generatedColumn-c);s[o]=p.substr(h.generatedColumn-c),c=h.generatedColumn,f(l,g),l=h;return}for(;u<h.generatedLine;)n.add(a()),u++;c<h.generatedColumn&&(p=s[o]||"",n.add(p.substr(0,h.generatedColumn)),s[o]=p.substr(h.generatedColumn),c=h.generatedColumn),l=h},this),o<s.length&&(l&&f(l,a()),n.add(s.splice(o).join(""))),r.sources.forEach(function(h){let g=r.sourceContentFor(h);g!=null&&(i!=null&&(h=Fy.join(i,h)),n.setSourceContent(h,g))}),n;function f(h,g){if(h===null||h.source===void 0)n.add(g);else{let H=i?Fy.join(i,h.source):h.source;n.add(new Nl(h.originalLine,h.originalColumn,H,g,h.name))}}}add(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Ol]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}prepend(e){if(Array.isArray(e))for(let r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Ol]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}walk(e){let r;for(let i=0,n=this.children.length;i<n;i++)r=this.children[i],r[Ol]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})}join(e){let r,i,n=this.children.length;if(n>0){for(r=[],i=0;i<n-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this}replaceRight(e,r){let i=this.children[this.children.length-1];return i[Ol]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this}setSourceContent(e,r){this.sourceContents[Fy.toSetString(e)]=r}walkSourceContents(e){for(let i=0,n=this.children.length;i<n;i++)this.children[i][Ol]&&this.children[i].walkSourceContents(e);let r=Object.keys(this.sourceContents);for(let i=0,n=r.length;i<n;i++)e(Fy.fromSetString(r[i]),this.sourceContents[r[i]])}toString(){let e="";return this.walk(function(r){e+=r}),e}toStringWithSourceMap(e){let r={code:"",line:1,column:0},i=new lie(e),n=!1,s=null,o=null,a=null,u=null;return this.walk(function(c,l){r.code+=c,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||u!==l.name)&&i.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,u=l.name,n=!0):n&&(i.addMapping({generated:{line:r.line,column:r.column}}),s=null,n=!1);for(let p=0,f=c.length;p<f;p++)c.charCodeAt(p)===fie?(r.line++,r.column=0,p+1===f?(s=null,n=!1):n&&i.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(c,l){i.setSourceContent(c,l)}),{code:r.code,map:i}}};mM.SourceNode=Nl});var Uy=b(By=>{By.SourceMapGenerator=uE().SourceMapGenerator;By.SourceMapConsumer=hM().SourceMapConsumer;By.SourceNode=gM().SourceNode});var sv=b(EO=>{(function t(e){"use strict";var r,i,n,s,o,a;function u(x){var P={},q,j;for(q in x)x.hasOwnProperty(q)&&(j=x[q],typeof j=="object"&&j!==null?P[q]=u(j):P[q]=j);return P}function c(x,P){var q,j,F,$;for(j=x.length,F=0;j;)q=j>>>1,$=F+q,P(x[$])?j=q:(F=$+1,j-=q+1);return F}r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},n={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},s={},o={},a={},i={Break:s,Skip:o,Remove:a};function l(x,P){this.parent=x,this.key=P}l.prototype.replace=function(P){this.parent[this.key]=P},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function p(x,P,q,j){this.node=x,this.path=P,this.wrap=q,this.ref=j}function f(){}f.prototype.path=function(){var P,q,j,F,$,O;function E(M,N){if(Array.isArray(N))for(j=0,F=N.length;j<F;++j)M.push(N[j]);else M.push(N)}if(!this.__current.path)return null;for($=[],P=2,q=this.__leavelist.length;P<q;++P)O=this.__leavelist[P],E($,O.path);return E($,this.__current.path),$},f.prototype.type=function(){var x=this.current();return x.type||this.__current.wrap},f.prototype.parents=function(){var P,q,j;for(j=[],P=1,q=this.__leavelist.length;P<q;++P)j.push(this.__leavelist[P].node);return j},f.prototype.current=function(){return this.__current.node},f.prototype.__execute=function(P,q){var j,F;return F=void 0,j=this.__current,this.__current=q,this.__state=null,P&&(F=P.call(this,q.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=j,F},f.prototype.notify=function(P){this.__state=P},f.prototype.skip=function(){this.notify(o)},f.prototype.break=function(){this.notify(s)},f.prototype.remove=function(){this.notify(a)},f.prototype.__initialize=function(x,P){this.visitor=P,this.root=x,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,P.fallback==="iteration"?this.__fallback=Object.keys:typeof P.fallback=="function"&&(this.__fallback=P.fallback),this.__keys=n,P.keys&&(this.__keys=Object.assign(Object.create(this.__keys),P.keys))};function h(x){return x==null?!1:typeof x=="object"&&typeof x.type=="string"}function g(x,P){return(x===r.ObjectExpression||x===r.ObjectPattern)&&P==="properties"}function H(x,P){for(var q=x.length-1;q>=0;--q)if(x[q].node===P)return!0;return!1}f.prototype.traverse=function(P,q){var j,F,$,O,E,M,N,z,D,L,ee,re;for(this.__initialize(P,q),re={},j=this.__worklist,F=this.__leavelist,j.push(new p(P,null,null,null)),F.push(new p(null,null,null,null));j.length;){if($=j.pop(),$===re){if($=F.pop(),M=this.__execute(q.leave,$),this.__state===s||M===s)return;continue}if($.node){if(M=this.__execute(q.enter,$),this.__state===s||M===s)return;if(j.push(re),F.push($),this.__state===o||M===o)continue;if(O=$.node,E=O.type||$.wrap,L=this.__keys[E],!L)if(this.__fallback)L=this.__fallback(O);else throw new Error("Unknown node type "+E+".");for(z=L.length;(z-=1)>=0;)if(N=L[z],ee=O[N],!!ee){if(Array.isArray(ee)){for(D=ee.length;(D-=1)>=0;)if(ee[D]&&!H(F,ee[D])){if(g(E,L[z]))$=new p(ee[D],[N,D],"Property",null);else if(h(ee[D]))$=new p(ee[D],[N,D],null,null);else continue;j.push($)}}else if(h(ee)){if(H(F,ee))continue;j.push(new p(ee,N,null,null))}}}}},f.prototype.replace=function(P,q){var j,F,$,O,E,M,N,z,D,L,ee,re,ie;function J(te){var ce,ae,he,dt;if(te.ref.remove()){for(ae=te.ref.key,dt=te.ref.parent,ce=j.length;ce--;)if(he=j[ce],he.ref&&he.ref.parent===dt){if(he.ref.key<ae)break;--he.ref.key}}}for(this.__initialize(P,q),ee={},j=this.__worklist,F=this.__leavelist,re={root:P},M=new p(P,null,null,new l(re,"root")),j.push(M),F.push(M);j.length;){if(M=j.pop(),M===ee){if(M=F.pop(),E=this.__execute(q.leave,M),E!==void 0&&E!==s&&E!==o&&E!==a&&M.ref.replace(E),(this.__state===a||E===a)&&J(M),this.__state===s||E===s)return re.root;continue}if(E=this.__execute(q.enter,M),E!==void 0&&E!==s&&E!==o&&E!==a&&(M.ref.replace(E),M.node=E),(this.__state===a||E===a)&&(J(M),M.node=null),this.__state===s||E===s)return re.root;if($=M.node,!!$&&(j.push(ee),F.push(M),!(this.__state===o||E===o))){if(O=$.type||M.wrap,D=this.__keys[O],!D)if(this.__fallback)D=this.__fallback($);else throw new Error("Unknown node type "+O+".");for(N=D.length;(N-=1)>=0;)if(ie=D[N],L=$[ie],!!L)if(Array.isArray(L)){for(z=L.length;(z-=1)>=0;)if(L[z]){if(g(O,D[N]))M=new p(L[z],[ie,z],"Property",new l(L,z));else if(h(L[z]))M=new p(L[z],[ie,z],null,new l(L,z));else continue;j.push(M)}}else h(L)&&j.push(new p(L,ie,null,new l($,ie)))}}return re.root};function v(x,P){var q=new f;return q.traverse(x,P)}function w(x,P){var q=new f;return q.replace(x,P)}function T(x,P){var q;return q=c(P,function(F){return F.range[0]>x.range[0]}),x.extendedRange=[x.range[0],x.range[1]],q!==P.length&&(x.extendedRange[1]=P[q].range[0]),q-=1,q>=0&&(x.extendedRange[0]=P[q].range[1]),x}function U(x,P,q){var j=[],F,$,O,E;if(!x.range)throw new Error("attachComments needs range information");if(!q.length){if(P.length){for(O=0,$=P.length;O<$;O+=1)F=u(P[O]),F.extendedRange=[0,x.range[0]],j.push(F);x.leadingComments=j}return x}for(O=0,$=P.length;O<$;O+=1)j.push(T(u(P[O]),q));return E=0,v(x,{enter:function(M){for(var N;E<j.length&&(N=j[E],!(N.extendedRange[1]>M.range[0]));)N.extendedRange[1]===M.range[0]?(M.leadingComments||(M.leadingComments=[]),M.leadingComments.push(N),j.splice(E,1)):E+=1;if(E===j.length)return i.Break;if(j[E].extendedRange[0]>M.range[1])return i.Skip}}),E=0,v(x,{leave:function(M){for(var N;E<j.length&&(N=j[E],!(M.range[1]<N.extendedRange[0]));)M.range[1]===N.extendedRange[0]?(M.trailingComments||(M.trailingComments=[]),M.trailingComments.push(N),j.splice(E,1)):E+=1;if(E===j.length)return i.Break;if(j[E].extendedRange[0]>M.range[1])return i.Skip}}),x}return e.Syntax=r,e.traverse=v,e.replace=w,e.attachComments=U,e.VisitorKeys=n,e.VisitorOption=i,e.Controller=f,e.cloneEnvironment=function(){return t({})},e})(EO)});var DO=b((eEe,jh)=>{var CO={};CO.__wbindgen_placeholder__=jh.exports;var On,{TextDecoder:Xie}=require("util"),xO=new Xie("utf-8",{ignoreBOM:!0,fatal:!0});xO.decode();var ov=null;function RE(){return(ov===null||ov.buffer!==On.memory.buffer)&&(ov=new Uint8Array(On.memory.buffer)),ov}function Jie(t,e){return xO.decode(RE().subarray(t,t+e))}var kE=0;function SO(t,e){let r=e(t.length*1);return RE().set(t,r/1),kE=t.length,r}var Gl=class{static __wrap(e){let r=Object.create(Gl.prototype);return r.ptr=e,r}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();On.__wbg_hasher_free(e)}constructor(){var e=On.hasher_new();return Gl.__wrap(e)}update(e){var r=SO(e,On.__wbindgen_malloc),i=kE;On.hasher_update(this.ptr,r,i)}digest(e){try{var r=SO(e,On.__wbindgen_malloc),i=kE;On.hasher_digest(this.ptr,r,i)}finally{e.set(RE().subarray(r/1,r/1+i)),On.__wbindgen_free(r,i*1)}}};jh.exports.Hasher=Gl;jh.exports.__wbindgen_throw=function(t,e){throw new Error(Jie(t,e))};var Yie=require("path").join(__dirname,"chromehash_bg.wasm"),Qie=require("fs").readFileSync(Yie),Zie=new WebAssembly.Module(Qie),ene=new WebAssembly.Instance(Zie,CO);On=ene.exports;jh.exports.__wasm=On});var RO=b(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.shaHashFile=xs.hashFile=xs.shaHash=xs.hash=void 0;var TO=DO(),$O=require("fs"),PO=require("string_decoder"),kO=require("crypto"),uv=Buffer.alloc(4*5),tne=t=>{let e=new TO.Hasher;return e.update(sne(t)),e.digest(uv),e.free(),uv.toString("hex")};xs.hash=tne;var rne=t=>{let e=(0,kO.createHash)("sha256");return e.update(one(t)),e.digest("hex")};xs.shaHash=rne;var ine=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=new TO.Hasher,n;try{n=await $O.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(lv(o))for(i.update(o.slice(2));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));else if(pv(o))for(i.update(o.slice(2).swap16());s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead).swap16());else if(cv(o)){let a=new PO.StringDecoder("utf8");for(i.update(Buffer.from(a.write(o.slice(3)),"utf16le"));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(Buffer.from(a.write(r.slice(0,s.bytesRead)),"utf16le"))}else{let a=new PO.StringDecoder("utf8");for(i.update(Buffer.from(a.write(o),"utf16le"));s.bytesRead===r.length;)s=await n.read(r,0,r.length,null),i.update(Buffer.from(a.write(r.slice(0,s.bytesRead)),"utf16le"))}return i.digest(uv),uv.toString("hex")}finally{i.free(),n!==void 0&&await n.close()}};xs.hashFile=ine;var av={stream:!0},nne=async(t,e=4096)=>{e%2===1&&e++;let r=Buffer.alloc(e),i=(0,kO.createHash)("sha256"),n;try{n=await $O.promises.open(t,"r");let s=await n.read(r,0,r.length,null),o=r.slice(0,s.bytesRead);if(lv(o)){let a=new TextDecoder("utf-16le");for(i.update(a.decode(o.slice(2),av));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),av))}else if(pv(o)){let a=new TextDecoder("utf-16be");for(i.update(a.decode(o.slice(2),av));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(a.decode(r.slice(0,s.bytesRead),av))}else if(cv(o))for(i.update(o.slice(3));s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));else for(i.update(o);s.bytesRead>0;)s=await n.read(r,0,r.length,null),i.update(r.slice(0,s.bytesRead));return i.digest("hex")}finally{await n?.close()}};xs.shaHashFile=nne;var cv=t=>t.length>=3&&t[0]===239&&t[1]===187&&t[2]===191,lv=t=>t.length>=2&&t[0]===255&&t[1]===254,pv=t=>t.length>=2&&t[0]===254&&t[1]===255,sne=t=>cv(t)?LO(t.slice(3)):lv(t)?t.slice(2):pv(t)?t.slice(2).swap16():LO(t),one=t=>cv(t)?t.slice(3):lv(t)?new TextEncoder().encode(new TextDecoder("utf-16le").decode(t.slice(2))):pv(t)?new TextEncoder().encode(new TextDecoder("utf-16be").decode(t.slice(2))):t,LO=t=>Buffer.from(t.toString("utf8"),"utf16le")});var mN=b(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});function Lne(t){let e=[],r=new Array(4),i=[0,192,224,240],n=[127,63,63,63],s=[0,128,128,128];for(let o of t){let a=r,u=o.codePointAt(0),c=0-(-(u&4294967168)>>31)-(-(u&4294965248)>>31)-(-(u&4294901760)>>31),l=n[c],p=s[c];a[3]=p|u&l,a[2]=p|u>>>6&l,a[1]=p|u>>>12&l,a[0]=p|u>>>18&l;let f=3-c;a[f]|=i[c],Array.prototype.push.apply(e,a.slice(f))}return new Uint8Array(e)}xa.toUtf8_1=Lne;function Tne(t){let e=[];for(let r of t){let i=r.codePointAt(0);i<128?e.push(i):i<2048?e.push(192|i>>6&31,128|i&63):i<65536?e.push(224|i>>12&15,128|i>>6&63,128|i&63):e.push(240|i>>18&7,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(e)}xa.toUtf8_2=Tne;function hN(t){let e=[];for(let r=0,i=t.length;r<i;++r){let n=t.charCodeAt(r);if(n<128)e.push(n);else if(n<2048)e.push(192|n>>6,128|n&63);else if(n<55296||n>=57344)e.push(224|n>>12,128|n>>6&63,128|n&63);else{let s=65536+((n&1023)<<10|t.charCodeAt(++r)&1023);e.push(240|s>>18&7,128|s>>12&63,128|s>>6&63,128|s&63)}}return new Uint8Array(e)}xa.toUtf8_3=hN;xa.toUtf8=hN;xa.default=xa.toUtf8});var yN=b(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});var $ne=mN(),tp=2654435761,rp=2246822519,Iv=3266489917,gN=668265263,HN=374761393;function kne(t,e=0){t=typeof t=="string"?$ne.default(t):t;let r=t,i=e+HN&4294967295,n=0;if(r.length>=16){let o=[e+tp+rp&4294967295,e+rp&4294967295,e+0&4294967295,e-tp&4294967295],a=t,u=a.length-16,c=0;for(n=0;(n&4294967280)<=u;n+=4){let l=n,p=a[l+0]+(a[l+1]<<8),f=a[l+2]+(a[l+3]<<8),h=p*rp+(f*rp<<16),g=o[c]+h&4294967295;g=g<<13|g>>>19;let H=g&65535,v=g>>>16;o[c]=H*tp+(v*tp<<16)&4294967295,c=c+1&3}i=(o[0]<<1|o[0]>>>31)+(o[1]<<7|o[1]>>>25)+(o[2]<<12|o[2]>>>20)+(o[3]<<18|o[3]>>>14)&4294967295}i=i+t.length&4294967295;let s=t.length-4;for(;n<=s;n+=4){let o=n,a=r[o+0]+(r[o+1]<<8),u=r[o+2]+(r[o+3]<<8),c=a*Iv+(u*Iv<<16);i=i+c&4294967295,i=i<<17|i>>>15,i=(i&65535)*gN+((i>>>16)*gN<<16)&4294967295}for(;n<r.length;++n){let o=r[n];i=i+o*HN,i=i<<11|i>>>21,i=(i&65535)*tp+((i>>>16)*tp<<16)&4294967295}return i=i^i>>>15,i=((i&65535)*rp&4294967295)+((i>>>16)*rp<<16),i=i^i>>>13,i=((i&65535)*Iv&4294967295)+((i>>>16)*Iv<<16),i=i^i>>>16,i<0?i+4294967296:i}YE.xxHash32=kne});var QE=b(Ev=>{"use strict";function Rne(t){for(var e in t)Ev.hasOwnProperty(e)||(Ev[e]=t[e])}Object.defineProperty(Ev,"__esModule",{value:!0});Rne(yN())});var jv=b(ln=>{"use strict";ln.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;ln.find=(t,e)=>t.nodes.find(r=>r.type===e);ln.exceedsLimit=(t,e,r=1,i)=>i===!1||!ln.isInteger(t)||!ln.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;ln.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];i&&(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};ln.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);ln.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;ln.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;ln.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);ln.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var qv=b((kxe,qN)=>{"use strict";var jN=jv();qN.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&jN.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&jN.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let u of i.nodes)a+=r(u);return a};return r(t)}});var VN=b((Rxe,WN)=>{"use strict";WN.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var eF=b((Mxe,ZN)=>{"use strict";var GN=VN(),fc=(t,e,r)=>{if(GN(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(GN(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),u=t+":"+e+"="+n+s+o+a;if(fc.cache.hasOwnProperty(u))return fc.cache[u].result;let c=Math.min(t,e),l=Math.max(t,e);if(Math.abs(c-l)===1){let H=t+"|"+e;return i.capture?`(${H})`:i.wrap===!1?H:`(?:${H})`}let p=QN(t)||QN(e),f={min:t,max:e,a:c,b:l},h=[],g=[];if(p&&(f.isPadded=p,f.maxLen=String(f.max).length),c<0){let H=l<0?Math.abs(l):1;g=KN(H,Math.abs(c),f,i),c=f.a=0}return l>=0&&(h=KN(c,l,f,i)),f.negatives=g,f.positives=h,f.result=Gne(g,h,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&h.length+g.length>1&&(f.result=`(?:${f.result})`),fc.cache[u]=f,f.result};function Gne(t,e,r){let i=aS(t,e,"-",!1,r)||[],n=aS(e,t,"",!1,r)||[],s=aS(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function Kne(t,e){let r=1,i=1,n=XN(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=XN(t,r);for(n=JN(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=JN(e+1,i)-1;return s=[...s],s.sort(Jne),s}function zne(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=Xne(t,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[u,c]=i[a];u===c?s+=u:u!=="0"||c!=="9"?s+=Yne(u,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function KN(t,e,r,i){let n=Kne(t,e),s=[],o=t,a;for(let u=0;u<n.length;u++){let c=n[u],l=zne(String(o),String(c),i),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+YN(a.count),o=c+1;continue}r.isPadded&&(p=Qne(c,r,i)),l.string=p+l.pattern+YN(l.count),s.push(l),o=c+1,a=l}return s}function aS(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!zN(e,"string",a)&&s.push(r+a),i&&zN(e,"string",a)&&s.push(r+a)}return s}function Xne(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function Jne(t,e){return t>e?1:e>t?-1:0}function zN(t,e,r){return t.some(i=>i[e]===r)}function XN(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function JN(t,e){return t-t%Math.pow(10,e)}function YN(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Yne(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function QN(t){return/^-?(0+)\d/.test(t)}function Qne(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}fc.cache={};fc.clearCache=()=>fc.cache={};ZN.exports=fc});var lS=b((Oxe,uF)=>{"use strict";var Zne=require("util"),iF=eF(),tF=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),ese=t=>e=>t===!0?Number(e):String(e),uS=t=>typeof t=="number"||typeof t=="string"&&t!=="",rm=t=>Number.isInteger(+t),cS=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},tse=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,rse=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},rF=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},ise=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},nF=(t,e,r,i)=>{if(r)return iF(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},sF=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return iF(t,e,r)},oF=(...t)=>new RangeError("Invalid range arguments: "+Zne.inspect(...t)),aF=(t,e,r)=>{if(r.strictRanges===!0)throw oF([t,e]);return[]},nse=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},sse=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw oF([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),u=String(e),c=String(r);r=Math.max(Math.abs(r),1);let l=cS(a)||cS(u)||cS(c),p=l?Math.max(a.length,u.length,c.length):0,f=l===!1&&tse(t,e,i)===!1,h=i.transform||ese(f);if(i.toRegex&&r===1)return nF(rF(t,p),rF(e,p),!0,i);let g={negatives:[],positives:[]},H=T=>g[T<0?"negatives":"positives"].push(Math.abs(T)),v=[],w=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?H(n):v.push(rse(h(n,w),p,f)),n=o?n-r:n+r,w++;return i.toRegex===!0?r>1?ise(g,i):sF(v,null,{wrap:!1,...i}):v},ose=(t,e,r=1,i={})=>{if(!rm(t)&&t.length>1||!rm(e)&&e.length>1)return aF(t,e,i);let n=i.transform||(f=>String.fromCharCode(f)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,u=Math.min(s,o),c=Math.max(s,o);if(i.toRegex&&r===1)return nF(u,c,!1,i);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(n(s,p)),s=a?s-r:s+r,p++;return i.toRegex===!0?sF(l,null,{wrap:!1,options:i}):l},Wv=(t,e,r,i={})=>{if(e==null&&uS(t))return[t];if(!uS(t)||!uS(e))return aF(t,e,i);if(typeof r=="function")return Wv(t,e,1,{transform:r});if(tF(r))return Wv(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,rm(r)?rm(t)&&rm(e)?sse(t,e,r,n):ose(t,e,Math.max(Math.abs(r),1),n):r!=null&&!tF(r)?nse(r,n):Wv(t,e,1,r)};uF.exports=Wv});var pF=b((Nxe,lF)=>{"use strict";var ase=lS(),cF=jv(),use=(t,e={})=>{let r=(i,n={})=>{let s=cF.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,u=e.escapeInvalid===!0?"\\":"",c="";if(i.isOpen===!0||i.isClose===!0)return u+i.value;if(i.type==="open")return a?u+i.value:"(";if(i.type==="close")return a?u+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let l=cF.reduce(i.nodes),p=ase(...l,{...e,wrap:!1,toRegex:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(i.nodes)for(let l of i.nodes)c+=r(l,i);return c};return r(t)};lF.exports=use});var hF=b((Fxe,dF)=>{"use strict";var cse=lS(),fF=qv(),vp=jv(),dc=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?vp.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(dc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?dc(n,s,r):n+s);return vp.flatten(i)},lse=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(dc(a.pop(),fF(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(dc(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let p=vp.reduce(n.nodes);if(vp.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=cse(...p,e);f.length===0&&(f=fF(n,e)),a.push(dc(a.pop(),f)),n.nodes=[];return}let u=vp.encloseBrace(n),c=n.queue,l=n;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let p=0;p<n.nodes.length;p++){let f=n.nodes[p];if(f.type==="comma"&&n.type==="brace"){p===1&&c.push(""),c.push("");continue}if(f.type==="close"){a.push(dc(a.pop(),c,u));continue}if(f.value&&f.type!=="open"){c.push(dc(c.pop(),f.value));continue}f.nodes&&i(f,n)}return c};return vp.flatten(i(t))};dF.exports=lse});var gF=b((Bxe,mF)=>{"use strict";mF.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"	",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var wF=b((Uxe,bF)=>{"use strict";var pse=qv(),{MAX_LENGTH:HF,CHAR_BACKSLASH:pS,CHAR_BACKTICK:fse,CHAR_COMMA:dse,CHAR_DOT:hse,CHAR_LEFT_PARENTHESES:mse,CHAR_RIGHT_PARENTHESES:gse,CHAR_LEFT_CURLY_BRACE:Hse,CHAR_RIGHT_CURLY_BRACE:yse,CHAR_LEFT_SQUARE_BRACKET:yF,CHAR_RIGHT_SQUARE_BRACKET:vF,CHAR_DOUBLE_QUOTE:vse,CHAR_SINGLE_QUOTE:bse,CHAR_NO_BREAK_SPACE:wse,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_se}=gF(),Ase=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(HF,r.maxLength):HF;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,u=0,c=t.length,l=0,p=0,f,h={},g=()=>t[l++],H=v=>{if(v.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&v.type==="text"){a.value+=v.value;return}return o.nodes.push(v),v.parent=o,v.prev=a,a=v,v};for(H({type:"bos"});l<c;)if(o=s[s.length-1],f=g(),!(f===_se||f===wse)){if(f===pS){H({type:"text",value:(e.keepEscaping?f:"")+g()});continue}if(f===vF){H({type:"text",value:"\\"+f});continue}if(f===yF){u++;let v=!0,w;for(;l<c&&(w=g());){if(f+=w,w===yF){u++;continue}if(w===pS){f+=g();continue}if(w===vF&&(u--,u===0))break}H({type:"text",value:f});continue}if(f===mse){o=H({type:"paren",nodes:[]}),s.push(o),H({type:"text",value:f});continue}if(f===gse){if(o.type!=="paren"){H({type:"text",value:f});continue}o=s.pop(),H({type:"text",value:f}),o=s[s.length-1];continue}if(f===vse||f===bse||f===fse){let v=f,w;for(e.keepQuotes!==!0&&(f="");l<c&&(w=g());){if(w===pS){f+=w+g();continue}if(w===v){e.keepQuotes===!0&&(f+=w);break}f+=w}H({type:"text",value:f});continue}if(f===Hse){p++;let w={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=H(w),s.push(o),H({type:"open",value:f});continue}if(f===yse){if(o.type!=="brace"){H({type:"text",value:f});continue}let v="close";o=s.pop(),o.close=!0,H({type:v,value:f}),p--,o=s[s.length-1];continue}if(f===dse&&p>0){if(o.ranges>0){o.ranges=0;let v=o.nodes.shift();o.nodes=[v,{type:"text",value:pse(o)}]}H({type:"comma",value:f}),o.commas++;continue}if(f===hse&&p>0&&o.commas===0){let v=o.nodes;if(p===0||v.length===0){H({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){v.pop();let w=v[v.length-1];w.value+=a.value+f,a=w,o.ranges--;continue}H({type:"dot",value:f});continue}H({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let v=s[s.length-1],w=v.nodes.indexOf(o);v.nodes.splice(w,1,...o.nodes)}while(s.length>0);return H({type:"eos"}),n};bF.exports=Ase});var IF=b((jxe,AF)=>{"use strict";var _F=qv(),Ise=pF(),Ese=hF(),Sse=wF(),Mi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Mi.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Mi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Mi.parse=(t,e={})=>Sse(t,e);Mi.stringify=(t,e={})=>_F(typeof t=="string"?Mi.parse(t,e):t,e);Mi.compile=(t,e={})=>(typeof t=="string"&&(t=Mi.parse(t,e)),Ise(t,e));Mi.expand=(t,e={})=>{typeof t=="string"&&(t=Mi.parse(t,e));let r=Ese(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Mi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Mi.compile(t,e):Mi.expand(t,e);AF.exports=Mi});var im=b((qxe,DF)=>{"use strict";var Cse=require("path"),$s="\\\\/",EF=`[^${$s}]`,wo="\\.",xse="\\+",Dse="\\?",Vv="\\/",Pse="(?=.)",SF="[^/]",fS=`(?:${Vv}|$)`,CF=`(?:^|${Vv})`,dS=`${wo}{1,2}${fS}`,Lse=`(?!${wo})`,Tse=`(?!${CF}${dS})`,$se=`(?!${wo}{0,1}${fS})`,kse=`(?!${dS})`,Rse=`[^.${Vv}]`,Mse=`${SF}*?`,xF={DOT_LITERAL:wo,PLUS_LITERAL:xse,QMARK_LITERAL:Dse,SLASH_LITERAL:Vv,ONE_CHAR:Pse,QMARK:SF,END_ANCHOR:fS,DOTS_SLASH:dS,NO_DOT:Lse,NO_DOTS:Tse,NO_DOT_SLASH:$se,NO_DOTS_SLASH:kse,QMARK_NO_DOT:Rse,STAR:Mse,START_ANCHOR:CF},Ose={...xF,SLASH_LITERAL:`[${$s}]`,QMARK:EF,STAR:`${EF}*?`,DOTS_SLASH:`${wo}{1,2}(?:[${$s}]|$)`,NO_DOT:`(?!${wo})`,NO_DOTS:`(?!(?:^|[${$s}])${wo}{1,2}(?:[${$s}]|$))`,NO_DOT_SLASH:`(?!${wo}{0,1}(?:[${$s}]|$))`,NO_DOTS_SLASH:`(?!${wo}{1,2}(?:[${$s}]|$))`,QMARK_NO_DOT:`[^.${$s}]`,START_ANCHOR:`(?:^|[${$s}])`,END_ANCHOR:`(?:[${$s}]|$)`},Nse={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};DF.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Nse,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Cse.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Ose:xF}}});var nm=b(vi=>{"use strict";var Fse=require("path"),Bse=process.platform==="win32",{REGEX_BACKSLASH:Use,REGEX_REMOVE_BACKSLASH:jse,REGEX_SPECIAL_CHARS:qse,REGEX_SPECIAL_CHARS_GLOBAL:Wse}=im();vi.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);vi.hasRegexChars=t=>qse.test(t);vi.isRegexChar=t=>t.length===1&&vi.hasRegexChars(t);vi.escapeRegex=t=>t.replace(Wse,"\\$1");vi.toPosixSlashes=t=>t.replace(Use,"/");vi.removeBackslashes=t=>t.replace(jse,e=>e==="\\"?"":e);vi.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};vi.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Bse===!0||Fse.sep==="\\";vi.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?vi.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};vi.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};vi.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var OF=b((Vxe,MF)=>{"use strict";var PF=nm(),{CHAR_ASTERISK:hS,CHAR_AT:Vse,CHAR_BACKWARD_SLASH:sm,CHAR_COMMA:Gse,CHAR_DOT:mS,CHAR_EXCLAMATION_MARK:gS,CHAR_FORWARD_SLASH:RF,CHAR_LEFT_CURLY_BRACE:HS,CHAR_LEFT_PARENTHESES:yS,CHAR_LEFT_SQUARE_BRACKET:Kse,CHAR_PLUS:zse,CHAR_QUESTION_MARK:LF,CHAR_RIGHT_CURLY_BRACE:Xse,CHAR_RIGHT_PARENTHESES:TF,CHAR_RIGHT_SQUARE_BRACKET:Jse}=im(),$F=t=>t===RF||t===sm,kF=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Yse=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=t,c=-1,l=0,p=0,f=!1,h=!1,g=!1,H=!1,v=!1,w=!1,T=!1,U=!1,x=!1,P=!1,q=0,j,F,$={value:"",depth:0,isGlob:!1},O=()=>c>=i,E=()=>u.charCodeAt(c+1),M=()=>(j=F,u.charCodeAt(++c));for(;c<i;){F=M();let ee;if(F===sm){T=$.backslashes=!0,F=M(),F===HS&&(w=!0);continue}if(w===!0||F===HS){for(q++;O()!==!0&&(F=M());){if(F===sm){T=$.backslashes=!0,M();continue}if(F===HS){q++;continue}if(w!==!0&&F===mS&&(F=M())===mS){if(f=$.isBrace=!0,g=$.isGlob=!0,P=!0,n===!0)continue;break}if(w!==!0&&F===Gse){if(f=$.isBrace=!0,g=$.isGlob=!0,P=!0,n===!0)continue;break}if(F===Xse&&(q--,q===0)){w=!1,f=$.isBrace=!0,P=!0;break}}if(n===!0)continue;break}if(F===RF){if(s.push(c),o.push($),$={value:"",depth:0,isGlob:!1},P===!0)continue;if(j===mS&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(F===zse||F===Vse||F===hS||F===LF||F===gS)===!0&&E()===yS){if(g=$.isGlob=!0,H=$.isExtglob=!0,P=!0,F===gS&&c===l&&(x=!0),n===!0){for(;O()!==!0&&(F=M());){if(F===sm){T=$.backslashes=!0,F=M();continue}if(F===TF){g=$.isGlob=!0,P=!0;break}}continue}break}if(F===hS){if(j===hS&&(v=$.isGlobstar=!0),g=$.isGlob=!0,P=!0,n===!0)continue;break}if(F===LF){if(g=$.isGlob=!0,P=!0,n===!0)continue;break}if(F===Kse){for(;O()!==!0&&(ee=M());){if(ee===sm){T=$.backslashes=!0,M();continue}if(ee===Jse){h=$.isBracket=!0,g=$.isGlob=!0,P=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&F===gS&&c===l){U=$.negated=!0,l++;continue}if(r.noparen!==!0&&F===yS){if(g=$.isGlob=!0,n===!0){for(;O()!==!0&&(F=M());){if(F===yS){T=$.backslashes=!0,F=M();continue}if(F===TF){P=!0;break}}continue}break}if(g===!0){if(P=!0,n===!0)continue;break}}r.noext===!0&&(H=!1,g=!1);let N=u,z="",D="";l>0&&(z=u.slice(0,l),u=u.slice(l),p-=l),N&&g===!0&&p>0?(N=u.slice(0,p),D=u.slice(p)):g===!0?(N="",D=u):N=u,N&&N!==""&&N!=="/"&&N!==u&&$F(N.charCodeAt(N.length-1))&&(N=N.slice(0,-1)),r.unescape===!0&&(D&&(D=PF.removeBackslashes(D)),N&&T===!0&&(N=PF.removeBackslashes(N)));let L={prefix:z,input:t,start:l,base:N,glob:D,isBrace:f,isBracket:h,isGlob:g,isExtglob:H,isGlobstar:v,negated:U,negatedExtglob:x};if(r.tokens===!0&&(L.maxDepth=0,$F(F)||o.push($),L.tokens=o),r.parts===!0||r.tokens===!0){let ee;for(let re=0;re<s.length;re++){let ie=ee?ee+1:l,J=s[re],te=t.slice(ie,J);r.tokens&&(re===0&&l!==0?(o[re].isPrefix=!0,o[re].value=z):o[re].value=te,kF(o[re]),L.maxDepth+=o[re].depth),(re!==0||te!=="")&&a.push(te),ee=J}if(ee&&ee+1<t.length){let re=t.slice(ee+1);a.push(re),r.tokens&&(o[o.length-1].value=re,kF(o[o.length-1]),L.maxDepth+=o[o.length-1].depth)}L.slashes=s,L.parts=a}return L};MF.exports=Yse});var BF=b((Gxe,FF)=>{"use strict";var Gv=im(),Oi=nm(),{MAX_LENGTH:Kv,POSIX_REGEX_SOURCE:Qse,REGEX_NON_SPECIAL_CHARS:Zse,REGEX_SPECIAL_CHARS_BACKREF:eoe,REPLACEMENTS:NF}=Gv,toe=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>Oi.escapeRegex(n)).join("..")}return r},bp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,vS=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=NF[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(Kv,r.maxLength):Kv,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=Oi.isWindows(e),c=Gv.globChars(u),l=Gv.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:g,DOTS_SLASH:H,NO_DOT:v,NO_DOT_SLASH:w,NO_DOTS_SLASH:T,QMARK:U,QMARK_NO_DOT:x,STAR:P,START_ANCHOR:q}=c,j=Z=>`(${a}(?:(?!${q}${Z.dot?H:p}).)*?)`,F=r.dot?"":v,$=r.dot?U:x,O=r.bash===!0?j(r):P;r.capture&&(O=`(${O})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let E={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Oi.removePrefix(t,E),n=t.length;let M=[],N=[],z=[],D=s,L,ee=()=>E.index===n-1,re=E.peek=(Z=1)=>t[E.index+Z],ie=E.advance=()=>t[++E.index]||"",J=()=>t.slice(E.index+1),te=(Z="",Ae=0)=>{E.consumed+=Z,E.index+=Ae},ce=Z=>{E.output+=Z.output!=null?Z.output:Z.value,te(Z.value)},ae=()=>{let Z=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)ie(),E.start++,Z++;return Z%2===0?!1:(E.negated=!0,E.start++,!0)},he=Z=>{E[Z]++,z.push(Z)},dt=Z=>{E[Z]--,z.pop()},ge=Z=>{if(D.type==="globstar"){let Ae=E.braces>0&&(Z.type==="comma"||Z.type==="brace"),Q=Z.extglob===!0||M.length&&(Z.type==="pipe"||Z.type==="paren");Z.type!=="slash"&&Z.type!=="paren"&&!Ae&&!Q&&(E.output=E.output.slice(0,-D.output.length),D.type="star",D.value="*",D.output=O,E.output+=D.output)}if(M.length&&Z.type!=="paren"&&(M[M.length-1].inner+=Z.value),(Z.value||Z.output)&&ce(Z),D&&D.type==="text"&&Z.type==="text"){D.value+=Z.value,D.output=(D.output||"")+Z.value;return}Z.prev=D,o.push(Z),D=Z},Gt=(Z,Ae)=>{let Q={...l[Ae],conditions:1,inner:""};Q.prev=D,Q.parens=E.parens,Q.output=E.output;let be=(r.capture?"(":"")+Q.open;he("parens"),ge({type:Z,value:Ae,output:E.output?"":g}),ge({type:"paren",extglob:!0,value:ie(),output:be}),M.push(Q)},kr=Z=>{let Ae=Z.close+(r.capture?")":""),Q;if(Z.type==="negate"){let be=O;if(Z.inner&&Z.inner.length>1&&Z.inner.includes("/")&&(be=j(r)),(be!==O||ee()||/^\)+$/.test(J()))&&(Ae=Z.close=`)$))${be}`),Z.inner.includes("*")&&(Q=J())&&/^\.[^\\/.]+$/.test(Q)){let Ge=vS(Q,{...e,fastpaths:!1}).output;Ae=Z.close=`)${Ge})${be})`}Z.prev.type==="bos"&&(E.negatedExtglob=!0)}ge({type:"paren",extglob:!0,value:L,output:Ae}),dt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let Z=!1,Ae=t.replace(eoe,(Q,be,Ge,wt,Ct,aa)=>wt==="\\"?(Z=!0,Q):wt==="?"?be?be+wt+(Ct?U.repeat(Ct.length):""):aa===0?$+(Ct?U.repeat(Ct.length):""):U.repeat(Ge.length):wt==="."?p.repeat(Ge.length):wt==="*"?be?be+wt+(Ct?O:""):O:be?Q:`\\${Q}`);return Z===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),Ae===t&&r.contains===!0?(E.output=t,E):(E.output=Oi.wrapOutput(Ae,E,e),E)}for(;!ee();){if(L=ie(),L==="\0")continue;if(L==="\\"){let Q=re();if(Q==="/"&&r.bash!==!0||Q==="."||Q===";")continue;if(!Q){L+="\\",ge({type:"text",value:L});continue}let be=/^\\+/.exec(J()),Ge=0;if(be&&be[0].length>2&&(Ge=be[0].length,E.index+=Ge,Ge%2!==0&&(L+="\\")),r.unescape===!0?L=ie():L+=ie(),E.brackets===0){ge({type:"text",value:L});continue}}if(E.brackets>0&&(L!=="]"||D.value==="["||D.value==="[^")){if(r.posix!==!1&&L===":"){let Q=D.value.slice(1);if(Q.includes("[")&&(D.posix=!0,Q.includes(":"))){let be=D.value.lastIndexOf("["),Ge=D.value.slice(0,be),wt=D.value.slice(be+2),Ct=Qse[wt];if(Ct){D.value=Ge+Ct,E.backtrack=!0,ie(),!s.output&&o.indexOf(D)===1&&(s.output=g);continue}}}(L==="["&&re()!==":"||L==="-"&&re()==="]")&&(L=`\\${L}`),L==="]"&&(D.value==="["||D.value==="[^")&&(L=`\\${L}`),r.posix===!0&&L==="!"&&D.value==="["&&(L="^"),D.value+=L,ce({value:L});continue}if(E.quotes===1&&L!=='"'){L=Oi.escapeRegex(L),D.value+=L,ce({value:L});continue}if(L==='"'){E.quotes=E.quotes===1?0:1,r.keepQuotes===!0&&ge({type:"text",value:L});continue}if(L==="("){he("parens"),ge({type:"paren",value:L});continue}if(L===")"){if(E.parens===0&&r.strictBrackets===!0)throw new SyntaxError(bp("opening","("));let Q=M[M.length-1];if(Q&&E.parens===Q.parens+1){kr(M.pop());continue}ge({type:"paren",value:L,output:E.parens?")":"\\)"}),dt("parens");continue}if(L==="["){if(r.nobracket===!0||!J().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(bp("closing","]"));L=`\\${L}`}else he("brackets");ge({type:"bracket",value:L});continue}if(L==="]"){if(r.nobracket===!0||D&&D.type==="bracket"&&D.value.length===1){ge({type:"text",value:L,output:`\\${L}`});continue}if(E.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(bp("opening","["));ge({type:"text",value:L,output:`\\${L}`});continue}dt("brackets");let Q=D.value.slice(1);if(D.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&(L=`/${L}`),D.value+=L,ce({value:L}),r.literalBrackets===!1||Oi.hasRegexChars(Q))continue;let be=Oi.escapeRegex(D.value);if(E.output=E.output.slice(0,-D.value.length),r.literalBrackets===!0){E.output+=be,D.value=be;continue}D.value=`(${a}${be}|${D.value})`,E.output+=D.value;continue}if(L==="{"&&r.nobrace!==!0){he("braces");let Q={type:"brace",value:L,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};N.push(Q),ge(Q);continue}if(L==="}"){let Q=N[N.length-1];if(r.nobrace===!0||!Q){ge({type:"text",value:L,output:L});continue}let be=")";if(Q.dots===!0){let Ge=o.slice(),wt=[];for(let Ct=Ge.length-1;Ct>=0&&(o.pop(),Ge[Ct].type!=="brace");Ct--)Ge[Ct].type!=="dots"&&wt.unshift(Ge[Ct].value);be=toe(wt,r),E.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){let Ge=E.output.slice(0,Q.outputIndex),wt=E.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",L=be="\\}",E.output=Ge;for(let Ct of wt)E.output+=Ct.output||Ct.value}ge({type:"brace",value:L,output:be}),dt("braces"),N.pop();continue}if(L==="|"){M.length>0&&M[M.length-1].conditions++,ge({type:"text",value:L});continue}if(L===","){let Q=L,be=N[N.length-1];be&&z[z.length-1]==="braces"&&(be.comma=!0,Q="|"),ge({type:"comma",value:L,output:Q});continue}if(L==="/"){if(D.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",o.pop(),D=s;continue}ge({type:"slash",value:L,output:h});continue}if(L==="."){if(E.braces>0&&D.type==="dot"){D.value==="."&&(D.output=p);let Q=N[N.length-1];D.type="dots",D.output+=L,D.value+=L,Q.dots=!0;continue}if(E.braces+E.parens===0&&D.type!=="bos"&&D.type!=="slash"){ge({type:"text",value:L,output:p});continue}ge({type:"dot",value:L,output:p});continue}if(L==="?"){if(!(D&&D.value==="(")&&r.noextglob!==!0&&re()==="("&&re(2)!=="?"){Gt("qmark",L);continue}if(D&&D.type==="paren"){let be=re(),Ge=L;if(be==="<"&&!Oi.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(D.value==="("&&!/[!=<:]/.test(be)||be==="<"&&!/<([!=]|\w+>)/.test(J()))&&(Ge=`\\${L}`),ge({type:"text",value:L,output:Ge});continue}if(r.dot!==!0&&(D.type==="slash"||D.type==="bos")){ge({type:"qmark",value:L,output:x});continue}ge({type:"qmark",value:L,output:U});continue}if(L==="!"){if(r.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){Gt("negate",L);continue}if(r.nonegate!==!0&&E.index===0){ae();continue}}if(L==="+"){if(r.noextglob!==!0&&re()==="("&&re(2)!=="?"){Gt("plus",L);continue}if(D&&D.value==="("||r.regex===!1){ge({type:"plus",value:L,output:f});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||E.parens>0){ge({type:"plus",value:L});continue}ge({type:"plus",value:f});continue}if(L==="@"){if(r.noextglob!==!0&&re()==="("&&re(2)!=="?"){ge({type:"at",extglob:!0,value:L,output:""});continue}ge({type:"text",value:L});continue}if(L!=="*"){(L==="$"||L==="^")&&(L=`\\${L}`);let Q=Zse.exec(J());Q&&(L+=Q[0],E.index+=Q[0].length),ge({type:"text",value:L});continue}if(D&&(D.type==="globstar"||D.star===!0)){D.type="star",D.star=!0,D.value+=L,D.output=O,E.backtrack=!0,E.globstar=!0,te(L);continue}let Z=J();if(r.noextglob!==!0&&/^\([^?]/.test(Z)){Gt("star",L);continue}if(D.type==="star"){if(r.noglobstar===!0){te(L);continue}let Q=D.prev,be=Q.prev,Ge=Q.type==="slash"||Q.type==="bos",wt=be&&(be.type==="star"||be.type==="globstar");if(r.bash===!0&&(!Ge||Z[0]&&Z[0]!=="/")){ge({type:"star",value:L,output:""});continue}let Ct=E.braces>0&&(Q.type==="comma"||Q.type==="brace"),aa=M.length&&(Q.type==="pipe"||Q.type==="paren");if(!Ge&&Q.type!=="paren"&&!Ct&&!aa){ge({type:"star",value:L,output:""});continue}for(;Z.slice(0,3)==="/**";){let ua=t[E.index+4];if(ua&&ua!=="/")break;Z=Z.slice(3),te("/**",3)}if(Q.type==="bos"&&ee()){D.type="globstar",D.value+=L,D.output=j(r),E.output=D.output,E.globstar=!0,te(L);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!wt&&ee()){E.output=E.output.slice(0,-(Q.output+D.output).length),Q.output=`(?:${Q.output}`,D.type="globstar",D.output=j(r)+(r.strictSlashes?")":"|$)"),D.value+=L,E.globstar=!0,E.output+=Q.output+D.output,te(L);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&Z[0]==="/"){let ua=Z[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(Q.output+D.output).length),Q.output=`(?:${Q.output}`,D.type="globstar",D.output=`${j(r)}${h}|${h}${ua})`,D.value+=L,E.output+=Q.output+D.output,E.globstar=!0,te(L+ie()),ge({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&Z[0]==="/"){D.type="globstar",D.value+=L,D.output=`(?:^|${h}|${j(r)}${h})`,E.output=D.output,E.globstar=!0,te(L+ie()),ge({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-D.output.length),D.type="globstar",D.output=j(r),D.value+=L,E.output+=D.output,E.globstar=!0,te(L);continue}let Ae={type:"star",value:L,output:O};if(r.bash===!0){Ae.output=".*?",(D.type==="bos"||D.type==="slash")&&(Ae.output=F+Ae.output),ge(Ae);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&r.regex===!0){Ae.output=L,ge(Ae);continue}(E.index===E.start||D.type==="slash"||D.type==="dot")&&(D.type==="dot"?(E.output+=w,D.output+=w):r.dot===!0?(E.output+=T,D.output+=T):(E.output+=F,D.output+=F),re()!=="*"&&(E.output+=g,D.output+=g)),ge(Ae)}for(;E.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing","]"));E.output=Oi.escapeLast(E.output,"["),dt("brackets")}for(;E.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing",")"));E.output=Oi.escapeLast(E.output,"("),dt("parens")}for(;E.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(bp("closing","}"));E.output=Oi.escapeLast(E.output,"{"),dt("braces")}if(r.strictSlashes!==!0&&(D.type==="star"||D.type==="bracket")&&ge({type:"maybe_slash",value:"",output:`${h}?`}),E.backtrack===!0){E.output="";for(let Z of E.tokens)E.output+=Z.output!=null?Z.output:Z.value,Z.suffix&&(E.output+=Z.suffix)}return E};vS.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(Kv,r.maxLength):Kv,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=NF[t]||t;let s=Oi.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:g}=Gv.globChars(s),H=r.dot?p:l,v=r.dot?f:l,w=r.capture?"":"?:",T={negated:!1,prefix:""},U=r.bash===!0?".*?":h;r.capture&&(U=`(${U})`);let x=F=>F.noglobstar===!0?U:`(${w}(?:(?!${g}${F.dot?c:o}).)*?)`,P=F=>{switch(F){case"*":return`${H}${u}${U}`;case".*":return`${o}${u}${U}`;case"*.*":return`${H}${U}${o}${u}${U}`;case"*/*":return`${H}${U}${a}${u}${v}${U}`;case"**":return H+x(r);case"**/*":return`(?:${H}${x(r)}${a})?${v}${u}${U}`;case"**/*.*":return`(?:${H}${x(r)}${a})?${v}${U}${o}${u}${U}`;case"**/.*":return`(?:${H}${x(r)}${a})?${o}${u}${U}`;default:{let $=/^(.*?)\.(\w+)$/.exec(F);if(!$)return;let O=P($[1]);return O?O+o+$[2]:void 0}}},q=Oi.removePrefix(t,T),j=P(q);return j&&r.strictSlashes!==!0&&(j+=`${a}?`),j};FF.exports=vS});var jF=b((Kxe,UF)=>{"use strict";var roe=require("path"),ioe=OF(),bS=BF(),wS=nm(),noe=im(),soe=t=>t&&typeof t=="object"&&!Array.isArray(t),Ut=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(f=>Ut(f,e,r));return f=>{for(let h of l){let g=h(f);if(g)return g}return!1}}let i=soe(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=wS.isWindows(e),o=i?Ut.compileRe(t,e):Ut.makeRe(t,e,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(n.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};u=Ut(n.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:f,match:h,output:g}=Ut.test(l,o,e,{glob:t,posix:s}),H={glob:t,state:a,regex:o,posix:s,input:l,output:g,match:h,isMatch:f};return typeof n.onResult=="function"&&n.onResult(H),f===!1?(H.isMatch=!1,p?H:!1):u(l)?(typeof n.onIgnore=="function"&&n.onIgnore(H),H.isMatch=!1,p?H:!1):(typeof n.onMatch=="function"&&n.onMatch(H),p?H:!0)};return r&&(c.state=a),c};Ut.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?wS.toPosixSlashes:null),a=t===i,u=a&&o?o(t):t;return a===!1&&(u=o?o(t):t,a=u===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Ut.matchBase(t,e,r,n):a=e.exec(u)),{isMatch:Boolean(a),match:a,output:u}};Ut.matchBase=(t,e,r,i=wS.isWindows(r))=>(e instanceof RegExp?e:Ut.makeRe(e,r)).test(roe.basename(t));Ut.isMatch=(t,e,r)=>Ut(e,r)(t);Ut.parse=(t,e)=>Array.isArray(t)?t.map(r=>Ut.parse(r,e)):bS(t,{...e,fastpaths:!1});Ut.scan=(t,e)=>ioe(t,e);Ut.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=Ut.toRegex(a,e);return i===!0&&(u.state=t),u};Ut.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=bS.fastpaths(t,e)),n.output||(n=bS(t,e)),Ut.compileRe(n,e,r,i)};Ut.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Ut.constants=noe;UF.exports=Ut});var WF=b((zxe,qF)=>{"use strict";qF.exports=jF()});var om=b((Xxe,zF)=>{"use strict";var GF=require("util"),KF=IF(),ks=WF(),_S=nm(),VF=t=>t===""||t==="./",Et=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=ks(String(e[l]),{...r,onResult:a},!0),f=p.state.negated||p.state.negatedExtglob;f&&o++;for(let h of t){let g=p(h,!0);(f?!g.isMatch:g.isMatch)&&(f?i.add(g.output):(i.delete(g.output),n.add(g.output)))}}let c=(o===e.length?[...s]:[...n]).filter(l=>!i.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return c};Et.match=Et;Et.matcher=(t,e)=>ks(t,e);Et.isMatch=(t,e,r)=>ks(e,r)(t);Et.any=Et.isMatch;Et.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=new Set(Et(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};Et.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${GF.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>Et.contains(t,i,r));if(typeof e=="string"){if(VF(t)||VF(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return Et.isMatch(t,e,{...r,contains:!0})};Et.matchKeys=(t,e,r)=>{if(!_S.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=Et(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};Et.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ks(String(n),r);if(i.some(o=>s(o)))return!0}return!1};Et.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ks(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};Et.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${GF.inspect(t)}"`);return[].concat(e).every(i=>ks(i,r)(t))};Et.capture=(t,e,r)=>{let i=_S.isWindows(r),s=ks.makeRe(String(t),{...r,capture:!0}).exec(i?_S.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Et.makeRe=(...t)=>ks.makeRe(...t);Et.scan=(...t)=>ks.scan(...t);Et.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of KF(String(i),e))r.push(ks.parse(n,e));return r};Et.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:KF(t,e)};Et.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return Et.braces(t,{...e,expand:!0})};zF.exports=Et});var sB=b((jDe,nB)=>{"use strict";var{Duplex:loe}=require("stream");function rB(t){t.emit("close")}function poe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function iB(t){this.removeListener("error",iB),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function foe(t,e){let r=!0,i=new loe({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(s,o){let a=!o&&i._readableState.objectMode?s.toString():s;i.push(a)||t.pause()}),t.once("error",function(s){i.destroyed||(r=!1,i.destroy(s))}),t.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,s){if(t.readyState===t.CLOSED){s(n),process.nextTick(rB,i);return}let o=!1;t.once("error",function(u){o=!0,s(u)}),t.once("close",function(){o||s(n),process.nextTick(rB,i)}),r&&t.terminate()},i._final=function(n){if(t.readyState===t.CONNECTING){t.once("open",function(){i._final(n)});return}t._socket!==null&&(t._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(t._socket.once("finish",function(){n()}),t.close()))},i._read=function(){t.isPaused&&t.resume()},i._write=function(n,s,o){if(t.readyState===t.CONNECTING){t.once("open",function(){i._write(n,s,o)});return}t.send(n,o)},i.on("end",poe),i.on("error",iB),i}nB.exports=foe});var Ra=b((qDe,oB)=>{"use strict";oB.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var cm=b((WDe,IS)=>{"use strict";var{EMPTY_BUFFER:doe}=Ra();function aB(t,e){if(t.length===0)return doe;if(t.length===1)return t[0];let r=Buffer.allocUnsafe(e),i=0;for(let n=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return i<e?r.slice(0,i):r}function uB(t,e,r,i,n){for(let s=0;s<n;s++)r[i+s]=t[s]^e[s&3]}function cB(t,e){for(let r=0;r<t.length;r++)t[r]^=e[r&3]}function lB(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}function zv(t){if(zv.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=Buffer.from(t):ArrayBuffer.isView(t)?e=Buffer.from(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),zv.readOnly=!1),e}try{let t=require("bufferutil");IS.exports={concat:aB,mask(e,r,i,n,s){s<48?uB(e,r,i,n,s):t.mask(e,r,i,n,s)},toArrayBuffer:lB,toBuffer:zv,unmask(e,r){e.length<32?cB(e,r):t.unmask(e,r)}}}catch{IS.exports={concat:aB,mask:uB,toArrayBuffer:lB,toBuffer:zv,unmask:cB}}});var dB=b((VDe,fB)=>{"use strict";var pB=Symbol("kDone"),ES=Symbol("kRun"),SS=class{constructor(e){this[pB]=()=>{this.pending--,this[ES]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ES]()}[ES](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[pB])}}};fB.exports=SS});var fm=b((GDe,HB)=>{"use strict";var lm=require("zlib"),hB=cm(),hoe=dB(),{kStatusCode:mB}=Ra(),moe=Buffer.from([0,0,255,255]),Yv=Symbol("permessage-deflate"),_o=Symbol("total-length"),pm=Symbol("callback"),Ma=Symbol("buffers"),Jv=Symbol("error"),Xv,CS=class{constructor(e,r,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Xv){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Xv=new hoe(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[pm];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let r=this._options,i=e.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let r=e[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(e){return e.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),e}decompress(e,r,i){Xv.add(n=>{this._decompress(e,r,(s,o)=>{n(),i(s,o)})})}compress(e,r,i){Xv.add(n=>{this._compress(e,r,(s,o)=>{n(),i(s,o)})})}_decompress(e,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?lm.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=lm.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Yv]=this,this._inflate[_o]=0,this._inflate[Ma]=[],this._inflate.on("error",Hoe),this._inflate.on("data",gB)}this._inflate[pm]=i,this._inflate.write(e),r&&this._inflate.write(moe),this._inflate.flush(()=>{let s=this._inflate[Jv];if(s){this._inflate.close(),this._inflate=null,i(s);return}let o=hB.concat(this._inflate[Ma],this._inflate[_o]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[_o]=0,this._inflate[Ma]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?lm.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=lm.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[_o]=0,this._deflate[Ma]=[],this._deflate.on("data",goe)}this._deflate[pm]=i,this._deflate.write(e),this._deflate.flush(lm.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=hB.concat(this._deflate[Ma],this._deflate[_o]);r&&(s=s.slice(0,s.length-4)),this._deflate[pm]=null,this._deflate[_o]=0,this._deflate[Ma]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,s)})}};HB.exports=CS;function goe(t){this[Ma].push(t),this[_o]+=t.length}function gB(t){if(this[_o]+=t.length,this[Yv]._maxPayload<1||this[_o]<=this[Yv]._maxPayload){this[Ma].push(t);return}this[Jv]=new RangeError("Max payload size exceeded"),this[Jv].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Jv][mB]=1009,this.removeListener("data",gB),this.reset()}function Hoe(t){this[Yv]._inflate=null,t[mB]=1007,this[pm](t)}});var dm=b((KDe,xS)=>{"use strict";var yB=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function vB(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function bB(t){let e=t.length,r=0;for(;r<e;)if(!(t[r]&128))r++;else if((t[r]&224)===192){if(r+1===e||(t[r+1]&192)!==128||(t[r]&254)===192)return!1;r+=2}else if((t[r]&240)===224){if(r+2>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||t[r]===224&&(t[r+1]&224)===128||t[r]===237&&(t[r+1]&224)===160)return!1;r+=3}else if((t[r]&248)===240){if(r+3>=e||(t[r+1]&192)!==128||(t[r+2]&192)!==128||(t[r+3]&192)!==128||t[r]===240&&(t[r+1]&240)===128||t[r]===244&&t[r+1]>143||t[r]>244)return!1;r+=4}else return!1;return!0}try{let t=require("utf-8-validate");xS.exports={isValidStatusCode:vB,isValidUTF8(e){return e.length<150?bB(e):t(e)},tokenChars:yB}}catch{xS.exports={isValidStatusCode:vB,isValidUTF8:bB,tokenChars:yB}}});var TS=b((zDe,CB)=>{"use strict";var{Writable:yoe}=require("stream"),wB=fm(),{BINARY_TYPES:voe,EMPTY_BUFFER:_B,kStatusCode:boe,kWebSocket:woe}=Ra(),{concat:DS,toArrayBuffer:_oe,unmask:Aoe}=cm(),{isValidStatusCode:Ioe,isValidUTF8:AB}=dm(),hm=0,IB=1,EB=2,SB=3,PS=4,Eoe=5,LS=class extends yoe{constructor(e={}){super(),this._binaryType=e.binaryType||voe[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[woe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=hm,this._loop=!1}_write(e,r,i){if(this._opcode===8&&this._state==hm)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=i.slice(e),i.slice(0,e)}let r=Buffer.allocUnsafe(e);do{let i=this._buffers[0],n=r.length-e;e>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,e),n),this._buffers[0]=i.slice(e)),e-=i.length}while(e>0);return r}startLoop(e){let r;this._loop=!0;do switch(this._state){case hm:r=this.getInfo();break;case IB:r=this.getPayloadLength16();break;case EB:r=this.getPayloadLength64();break;case SB:this.getMask();break;case PS:r=this.getData(e);break;default:this._loop=!1;return}while(this._loop);e(r)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let e=this.consume(2);if(e[0]&48)return this._loop=!1,ir(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let r=(e[0]&64)===64;if(r&&!this._extensions[wB.extensionName])return this._loop=!1,ir(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(e[0]&128)===128,this._opcode=e[0]&15,this._payloadLength=e[1]&127,this._opcode===0){if(r)return this._loop=!1,ir(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,ir(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,ir(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,ir(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(r)return this._loop=!1,ir(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,ir(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,ir(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(e[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,ir(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,ir(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=IB;else if(this._payloadLength===127)this._state=EB;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let e=this.consume(8),r=e.readUInt32BE(0);return r>Math.pow(2,53-32)-1?(this._loop=!1,ir(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=r*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,ir(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=SB:this._state=PS}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=PS}getData(e){let r=_B;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Aoe(r,this._mask)}if(this._opcode>7)return this.controlMessage(r);if(this._compressed){this._state=Eoe,this.decompress(r,e);return}return r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage()}decompress(e,r){this._extensions[wB.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return r(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return r(ir(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(s)}let o=this.dataMessage();if(o)return r(o);this.startLoop(r)})}dataMessage(){if(this._fin){let e=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=DS(r,e):this._binaryType==="arraybuffer"?i=_oe(DS(r,e)):i=r,this.emit("message",i,!0)}else{let i=DS(r,e);if(!this._skipUTF8Validation&&!AB(i))return this._loop=!1,ir(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",i,!1)}}this._state=hm}controlMessage(e){if(this._opcode===8)if(this._loop=!1,e.length===0)this.emit("conclude",1005,_B),this.end();else{if(e.length===1)return ir(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{let r=e.readUInt16BE(0);if(!Ioe(r))return ir(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let i=e.slice(2);if(!this._skipUTF8Validation&&!AB(i))return ir(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",r,i),this.end()}}else this._opcode===9?this.emit("ping",e):this.emit("pong",e);this._state=hm}};CB.exports=LS;function ir(t,e,r,i,n){let s=new t(r?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(s,ir),s.code=n,s[boe]=i,s}});var $S=b((YDe,PB)=>{"use strict";var XDe=require("net"),JDe=require("tls"),{randomFillSync:Soe}=require("crypto"),xB=fm(),{EMPTY_BUFFER:Coe}=Ra(),{isValidStatusCode:xoe}=dm(),{mask:DB,toBuffer:Sp}=cm(),jn=Symbol("kByteLength"),Doe=Buffer.alloc(4),Ns=class{constructor(e,r,i){this._extensions=r||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,r){let i,n=!1,s=2,o=!1;r.mask&&(i=r.maskBuffer||Doe,r.generateMask?r.generateMask(i):Soe(i,0,4),o=(i[0]|i[1]|i[2]|i[3])===0,s=6);let a;typeof e=="string"?(!r.mask||o)&&r[jn]!==void 0?a=r[jn]:(e=Buffer.from(e),a=e.length):(a=e.length,n=r.mask&&r.readOnly&&!o);let u=a;a>=65536?(s+=8,u=127):a>125&&(s+=2,u=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(c[0]|=64),c[1]=u,u===126?c.writeUInt16BE(a,2):u===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),r.mask?(c[1]|=128,c[s-4]=i[0],c[s-3]=i[1],c[s-2]=i[2],c[s-1]=i[3],o?[c,e]:n?(DB(e,i,c,s,a),[c]):(DB(e,i,e,0,a),[c,e])):[c,e]}close(e,r,i,n){let s;if(e===void 0)s=Coe;else{if(typeof e!="number"||!xoe(e))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(r);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof r=="string"?s.write(r,2):s.set(r,2)}}let o={[jn]:s.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(Ns.frame(s,o),n)}ping(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Sp(e),n=e.length,s=Sp.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[jn]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(Ns.frame(e,o),i)}pong(e,r,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Sp(e),n=e.length,s=Sp.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[jn]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(Ns.frame(e,o),i)}send(e,r,i){let n=this._extensions[xB.extensionName],s=r.binary?2:1,o=r.compress,a,u;if(typeof e=="string"?(a=Buffer.byteLength(e),u=!1):(e=Sp(e),a=e.length,u=Sp.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),r.fin&&(this._firstFragment=!0),n){let c={[jn]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}else this.sendFrame(Ns.frame(e,{[jn]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:!1}),i)}dispatch(e,r,i,n){if(!r){this.sendFrame(Ns.frame(e,i),n);return}let s=this._extensions[xB.extensionName];this._bufferedBytes+=i[jn],this._deflating=!0,s.compress(e,i.fin,(o,a)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(u);for(let c=0;c<this._queue.length;c++){let l=this._queue[c],p=l[l.length-1];typeof p=="function"&&p(u)}return}this._bufferedBytes-=i[jn],this._deflating=!1,i.readOnly=!1,this.sendFrame(Ns.frame(a,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][jn],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][jn],this._queue.push(e)}sendFrame(e,r){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],r),this._socket.uncork()):this._socket.write(e[0],r)}};PB.exports=Ns});var BB=b((QDe,FB)=>{"use strict";var{kForOnEventAttribute:kS,kListener:LB}=Ra(),TB=Symbol("kCode"),$B=Symbol("kData"),kB=Symbol("kError"),RB=Symbol("kMessage"),MB=Symbol("kReason"),Cp=Symbol("kTarget"),OB=Symbol("kType"),NB=Symbol("kWasClean"),Ao=class{constructor(e){this[Cp]=null,this[OB]=e}get target(){return this[Cp]}get type(){return this[OB]}};Object.defineProperty(Ao.prototype,"target",{enumerable:!0});Object.defineProperty(Ao.prototype,"type",{enumerable:!0});var hc=class extends Ao{constructor(e,r={}){super(e),this[TB]=r.code===void 0?0:r.code,this[MB]=r.reason===void 0?"":r.reason,this[NB]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[TB]}get reason(){return this[MB]}get wasClean(){return this[NB]}};Object.defineProperty(hc.prototype,"code",{enumerable:!0});Object.defineProperty(hc.prototype,"reason",{enumerable:!0});Object.defineProperty(hc.prototype,"wasClean",{enumerable:!0});var xp=class extends Ao{constructor(e,r={}){super(e),this[kB]=r.error===void 0?null:r.error,this[RB]=r.message===void 0?"":r.message}get error(){return this[kB]}get message(){return this[RB]}};Object.defineProperty(xp.prototype,"error",{enumerable:!0});Object.defineProperty(xp.prototype,"message",{enumerable:!0});var mm=class extends Ao{constructor(e,r={}){super(e),this[$B]=r.data===void 0?null:r.data}get data(){return this[$B]}};Object.defineProperty(mm.prototype,"data",{enumerable:!0});var Poe={addEventListener(t,e,r={}){let i;if(t==="message")i=function(s,o){let a=new mm("message",{data:o?s:s.toString()});a[Cp]=this,e.call(this,a)};else if(t==="close")i=function(s,o){let a=new hc("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Cp]=this,e.call(this,a)};else if(t==="error")i=function(s){let o=new xp("error",{error:s,message:s.message});o[Cp]=this,e.call(this,o)};else if(t==="open")i=function(){let s=new Ao("open");s[Cp]=this,e.call(this,s)};else return;i[kS]=!!r[kS],i[LB]=e,r.once?this.once(t,i):this.on(t,i)},removeEventListener(t,e){for(let r of this.listeners(t))if(r[LB]===e&&!r[kS]){this.removeListener(t,r);break}}};FB.exports={CloseEvent:hc,ErrorEvent:xp,Event:Ao,EventTarget:Poe,MessageEvent:mm}});var RS=b((ZDe,UB)=>{"use strict";var{tokenChars:gm}=dm();function Fs(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Loe(t){let e=Object.create(null),r=Object.create(null),i=!1,n=!1,s=!1,o,a,u=-1,c=-1,l=-1,p=0;for(;p<t.length;p++)if(c=t.charCodeAt(p),o===void 0)if(l===-1&&gm[c]===1)u===-1&&(u=p);else if(p!==0&&(c===32||c===9))l===-1&&u!==-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let h=t.slice(u,l);c===44?(Fs(e,h,r),r=Object.create(null)):o=h,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(a===void 0)if(l===-1&&gm[c]===1)u===-1&&(u=p);else if(c===32||c===9)l===-1&&u!==-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p),Fs(r,t.slice(u,l),!0),c===44&&(Fs(e,o,r),r=Object.create(null),o=void 0),u=l=-1}else if(c===61&&u!==-1&&l===-1)a=t.slice(u,p),u=l=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(n){if(gm[c]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:i||(i=!0),n=!1}else if(s)if(gm[c]===1)u===-1&&(u=p);else if(c===34&&u!==-1)s=!1,l=p;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(c===34&&t.charCodeAt(p-1)===61)s=!0;else if(l===-1&&gm[c]===1)u===-1&&(u=p);else if(u!==-1&&(c===32||c===9))l===-1&&(l=p);else if(c===59||c===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);l===-1&&(l=p);let h=t.slice(u,l);i&&(h=h.replace(/\\/g,""),i=!1),Fs(r,a,h),c===44&&(Fs(e,o,r),r=Object.create(null),o=void 0),a=void 0,u=l=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=p);let f=t.slice(u,l);return o===void 0?Fs(e,f,r):(a===void 0?Fs(r,f,!0):i?Fs(r,a,f.replace(/\\/g,"")):Fs(r,a,f),Fs(e,o,r)),e}function Toe(t){return Object.keys(t).map(e=>{let r=t[e];return Array.isArray(r)||(r=[r]),r.map(i=>[e].concat(Object.keys(i).map(n=>{let s=i[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}UB.exports={format:Toe,parse:Loe}});var US=b((tPe,YB)=>{"use strict";var $oe=require("events"),koe=require("https"),Roe=require("http"),WB=require("net"),Moe=require("tls"),{randomBytes:Ooe,createHash:Noe}=require("crypto"),{Readable:ePe}=require("stream"),{URL:MS}=require("url"),Oa=fm(),Foe=TS(),Boe=$S(),{BINARY_TYPES:jB,EMPTY_BUFFER:Qv,GUID:Uoe,kForOnEventAttribute:OS,kListener:joe,kStatusCode:qoe,kWebSocket:qr,NOOP:VB}=Ra(),{EventTarget:{addEventListener:Woe,removeEventListener:Voe}}=BB(),{format:Goe,parse:Koe}=RS(),{toBuffer:zoe}=cm(),Io=["CONNECTING","OPEN","CLOSING","CLOSED"],Xoe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,NS=[8,13],Joe=30*1e3,Ee=class extends $oe{constructor(e,r,i){super(),this._binaryType=jB[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Qv,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ee.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),GB(this,e,r,i)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){jB.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,r,i){let n=new Foe({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new Boe(e,this._extensions,i.generateMask),this._receiver=n,this._socket=e,n[qr]=this,e[qr]=this,n.on("conclude",Zoe),n.on("drain",eae),n.on("error",tae),n.on("message",rae),n.on("ping",iae),n.on("pong",nae),e.setTimeout(0),e.setNoDelay(),r.length>0&&e.unshift(r),e.on("close",zB),e.on("data",Zv),e.on("end",XB),e.on("error",JB),this._readyState=Ee.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Ee.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Oa.extensionName]&&this._extensions[Oa.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ee.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,r){if(this.readyState!==Ee.CLOSED){if(this.readyState===Ee.CONNECTING){let i="WebSocket was closed before the connection was established";return fn(this,this._req,i)}if(this.readyState===Ee.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=Ee.CLOSING,this._sender.close(e,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),Joe)}}pause(){this.readyState===Ee.CONNECTING||this.readyState===Ee.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,r,i){if(this.readyState===Ee.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==Ee.OPEN){BS(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(e||Qv,r,i)}pong(e,r,i){if(this.readyState===Ee.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==Ee.OPEN){BS(this,e,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(e||Qv,r,i)}resume(){this.readyState===Ee.CONNECTING||this.readyState===Ee.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,r,i){if(this.readyState===Ee.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof e=="number"&&(e=e.toString()),this.readyState!==Ee.OPEN){BS(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[Oa.extensionName]||(n.compress=!1),this._sender.send(e||Qv,n,i)}terminate(){if(this.readyState!==Ee.CLOSED){if(this.readyState===Ee.CONNECTING){let e="WebSocket was closed before the connection was established";return fn(this,this._req,e)}this._socket&&(this._readyState=Ee.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ee,"CONNECTING",{enumerable:!0,value:Io.indexOf("CONNECTING")});Object.defineProperty(Ee.prototype,"CONNECTING",{enumerable:!0,value:Io.indexOf("CONNECTING")});Object.defineProperty(Ee,"OPEN",{enumerable:!0,value:Io.indexOf("OPEN")});Object.defineProperty(Ee.prototype,"OPEN",{enumerable:!0,value:Io.indexOf("OPEN")});Object.defineProperty(Ee,"CLOSING",{enumerable:!0,value:Io.indexOf("CLOSING")});Object.defineProperty(Ee.prototype,"CLOSING",{enumerable:!0,value:Io.indexOf("CLOSING")});Object.defineProperty(Ee,"CLOSED",{enumerable:!0,value:Io.indexOf("CLOSED")});Object.defineProperty(Ee.prototype,"CLOSED",{enumerable:!0,value:Io.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(Ee.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(Ee.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[OS])return e[joe];return null},set(e){for(let r of this.listeners(t))if(r[OS]){this.removeListener(t,r);break}typeof e=="function"&&this.addEventListener(t,e,{[OS]:!0})}})});Ee.prototype.addEventListener=Woe;Ee.prototype.removeEventListener=Voe;YB.exports=Ee;function GB(t,e,r,i){let n={protocolVersion:NS[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!NS.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${NS.join(", ")})`);let s;if(e instanceof MS)s=e,t._url=e.href;else{try{s=new MS(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",u;if(s.protocol!=="ws:"&&!o&&!a?u=`The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`:a&&!s.pathname?u="The URL's pathname is empty":s.hash&&(u="The URL contains a fragment identifier"),u){let H=new SyntaxError(u);if(t._redirects===0)throw H;FS(t,H);return}let c=o?443:80,l=Ooe(16).toString("base64"),p=o?koe.get:Roe.get,f=new Set,h;if(n.createConnection=o?Qoe:Yoe,n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket",...n.headers},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(h=new Oa(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=Goe({[Oa.extensionName]:h.offer()})),r.length){for(let H of r){if(typeof H!="string"||!Xoe.test(H)||f.has(H))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(H)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let H=n.path.split(":");n.socketPath=H[0],n.path=H[1]}if(n.followRedirects){if(t._redirects===0){t._originalHost=s.host;let H=i&&i.headers;if(i={...i,headers:{}},H)for(let[v,w]of Object.entries(H))i.headers[v.toLowerCase()]=w}else s.host!==t._originalHost&&(delete n.headers.authorization,delete n.headers.cookie,delete n.headers.host,n.auth=void 0);n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64"))}let g=t._req=p(n);n.timeout&&g.on("timeout",()=>{fn(t,g,"Opening handshake has timed out")}),g.on("error",H=>{g===null||g.aborted||(g=t._req=null,FS(t,H))}),g.on("response",H=>{let v=H.headers.location,w=H.statusCode;if(v&&n.followRedirects&&w>=300&&w<400){if(++t._redirects>n.maxRedirects){fn(t,g,"Maximum redirects exceeded");return}g.abort();let T;try{T=new MS(v,e)}catch{let x=new SyntaxError(`Invalid URL: ${v}`);FS(t,x);return}GB(t,T,r,i)}else t.emit("unexpected-response",g,H)||fn(t,g,`Unexpected server response: ${H.statusCode}`)}),g.on("upgrade",(H,v,w)=>{if(t.emit("upgrade",H),t.readyState!==Ee.CONNECTING)return;g=t._req=null;let T=Noe("sha1").update(l+Uoe).digest("base64");if(H.headers["sec-websocket-accept"]!==T){fn(t,v,"Invalid Sec-WebSocket-Accept header");return}let U=H.headers["sec-websocket-protocol"],x;if(U!==void 0?f.size?f.has(U)||(x="Server sent an invalid subprotocol"):x="Server sent a subprotocol but none was requested":f.size&&(x="Server sent no subprotocol"),x){fn(t,v,x);return}U&&(t._protocol=U);let P=H.headers["sec-websocket-extensions"];if(P!==void 0){if(!h){fn(t,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let q;try{q=Koe(P)}catch{fn(t,v,"Invalid Sec-WebSocket-Extensions header");return}let j=Object.keys(q);if(j.length!==1||j[0]!==Oa.extensionName){fn(t,v,"Server indicated an extension that was not requested");return}try{h.accept(q[Oa.extensionName])}catch{fn(t,v,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Oa.extensionName]=h}t.setSocket(v,w,{generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})})}function FS(t,e){t._readyState=Ee.CLOSING,t.emit("error",e),t.emitClose()}function Yoe(t){return t.path=t.socketPath,WB.connect(t)}function Qoe(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=WB.isIP(t.host)?"":t.host),Moe.connect(t)}function fn(t,e,r){t._readyState=Ee.CLOSING;let i=new Error(r);Error.captureStackTrace(i,fn),e.setHeader?(e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),e.once("abort",t.emitClose.bind(t)),t.emit("error",i)):(e.destroy(i),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function BS(t,e,r){if(e){let i=zoe(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${t.readyState} (${Io[t.readyState]})`);r(i)}}function Zoe(t,e){let r=this[qr];r._closeFrameReceived=!0,r._closeMessage=e,r._closeCode=t,r._socket[qr]!==void 0&&(r._socket.removeListener("data",Zv),process.nextTick(KB,r._socket),t===1005?r.close():r.close(t,e))}function eae(){let t=this[qr];t.isPaused||t._socket.resume()}function tae(t){let e=this[qr];e._socket[qr]!==void 0&&(e._socket.removeListener("data",Zv),process.nextTick(KB,e._socket),e.close(t[qoe])),e.emit("error",t)}function qB(){this[qr].emitClose()}function rae(t,e){this[qr].emit("message",t,e)}function iae(t){let e=this[qr];e.pong(t,!e._isServer,VB),e.emit("ping",t)}function nae(t){this[qr].emit("pong",t)}function KB(t){t.resume()}function zB(){let t=this[qr];this.removeListener("close",zB),this.removeListener("data",Zv),this.removeListener("end",XB),t._readyState=Ee.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[qr]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",qB),t._receiver.on("finish",qB))}function Zv(t){this[qr]._receiver.write(t)||this.pause()}function XB(){let t=this[qr];t._readyState=Ee.CLOSING,t._receiver.end(),this.end()}function JB(){let t=this[qr];this.removeListener("error",JB),this.on("error",VB),t&&(t._readyState=Ee.CLOSING,this.destroy())}});var ZB=b((rPe,QB)=>{"use strict";var{tokenChars:sae}=dm();function oae(t){let e=new Set,r=-1,i=-1,n=0;for(n;n<t.length;n++){let o=t.charCodeAt(n);if(i===-1&&sae[o]===1)r===-1&&(r=n);else if(n!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=n);else if(o===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let a=t.slice(r,i);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let s=t.slice(r,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}QB.exports={parse:oae}});var s2=b((oPe,n2)=>{"use strict";var aae=require("events"),eb=require("http"),iPe=require("https"),nPe=require("net"),sPe=require("tls"),{createHash:uae}=require("crypto"),e2=RS(),mc=fm(),cae=ZB(),lae=US(),{GUID:pae,kWebSocket:fae}=Ra(),dae=/^[+/0-9A-Za-z]{22}==$/,t2=0,r2=1,i2=2,jS=class extends aae{constructor(e,r){if(super(),e={maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:lae,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=eb.createServer((i,n)=>{let s=eb.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,r)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=hae(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=t2}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===i2){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Hm,this);return}if(e&&this.once("close",e),this._state!==r2)if(this._state=r2,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Hm,this):process.nextTick(Hm,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Hm(this)})}}shouldHandle(e){if(this.options.path){let r=e.url.indexOf("?");if((r!==-1?e.url.slice(0,r):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,r,i,n){r.on("error",qS);let s=e.headers["sec-websocket-key"]!==void 0?e.headers["sec-websocket-key"]:!1,o=+e.headers["sec-websocket-version"];if(e.method!=="GET"||e.headers.upgrade.toLowerCase()!=="websocket"||!s||!dae.test(s)||o!==8&&o!==13||!this.shouldHandle(e))return Dp(r,400);let a=e.headers["sec-websocket-protocol"],u=new Set;if(a!==void 0)try{u=cae.parse(a)}catch{return Dp(r,400)}let c=e.headers["sec-websocket-extensions"],l={};if(this.options.perMessageDeflate&&c!==void 0){let p=new mc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let f=e2.parse(c);f[mc.extensionName]&&(p.accept(f[mc.extensionName]),l[mc.extensionName]=p)}catch{return Dp(r,400)}}if(this.options.verifyClient){let p={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(f,h,g,H)=>{if(!f)return Dp(r,h||401,g,H);this.completeUpgrade(l,s,u,e,r,i,n)});return}if(!this.options.verifyClient(p))return Dp(r,401)}this.completeUpgrade(l,s,u,e,r,i,n)}completeUpgrade(e,r,i,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[fae])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>t2)return Dp(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${uae("sha1").update(r+pae).digest("base64")}`],l=new this.options.WebSocket(null);if(i.size){let p=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;p&&(c.push(`Sec-WebSocket-Protocol: ${p}`),l._protocol=p)}if(e[mc.extensionName]){let p=e[mc.extensionName].params,f=e2.format({[mc.extensionName]:[p]});c.push(`Sec-WebSocket-Extensions: ${f}`),l._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
`).join(`\r
`)),s.removeListener("error",qS),l.setSocket(s,o,{maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Hm,this)})),a(l,n)}};n2.exports=jS;function hae(t,e){for(let r of Object.keys(e))t.on(r,e[r]);return function(){for(let i of Object.keys(e))t.removeListener(i,e[i])}}function Hm(t){t._state=i2,t.emit("close")}function qS(){this.destroy()}function Dp(t,e,r,i){t.writable&&(r=r||eb.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},t.write(`HTTP/1.1 ${e} ${eb.STATUS_CODES[e]}\r
`+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
`)+`\r
\r
`+r)),t.removeListener("error",qS),t.destroy()}});var b2=b((BPe,v2)=>{"use strict";v2.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var _2=b((UPe,w2)=>{w2.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var E2=b((jPe,I2)=>{"use strict";var Aae=_2(),Iae=Array.prototype.concat,Eae=Array.prototype.slice,A2=I2.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];Aae(s)?r=Iae.call(r,Eae.call(s)):r.push(s)}return r};A2.wrap=function(t){return function(){return t(A2(arguments))}}});var D2=b((qPe,x2)=>{var vm=b2(),bm=E2(),S2=Object.hasOwnProperty,C2={};for(ob in vm)S2.call(vm,ob)&&(C2[vm[ob]]=ob);var ob,Ni=x2.exports={to:{},get:{}};Ni.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Ni.get.hsl(t),i="hsl";break;case"hwb":r=Ni.get.hwb(t),i="hwb";break;default:r=Ni.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Ni.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,u,c;if(a=t.match(r)){for(c=a[2],a=a[1],u=0;u<3;u++){var l=u*2;o[u]=parseInt(a.slice(l,l+2),16)}c&&(o[3]=parseInt(c,16)/255)}else if(a=t.match(e)){for(a=a[1],c=a[3],u=0;u<3;u++)o[u]=parseInt(a[u]+a[u],16);c&&(o[3]=parseInt(c+c,16)/255)}else if(a=t.match(i)){for(u=0;u<3;u++)o[u]=parseInt(a[u+1],0);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else if(a=t.match(n)){for(u=0;u<3;u++)o[u]=Math.round(parseFloat(a[u+1])*2.55);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:S2.call(vm,a[1])?(o=vm[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=Fa(o[u],0,255);return o[3]=Fa(o[3],0,1),o};Ni.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Fa(parseFloat(r[2]),0,100),o=Fa(parseFloat(r[3]),0,100),a=Fa(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};Ni.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Fa(parseFloat(r[2]),0,100),o=Fa(parseFloat(r[3]),0,100),a=Fa(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};Ni.to.hex=function(){var t=bm(arguments);return"#"+ab(t[0])+ab(t[1])+ab(t[2])+(t[3]<1?ab(Math.round(t[3]*255)):"")};Ni.to.rgb=function(){var t=bm(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};Ni.to.rgb.percent=function(){var t=bm(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Ni.to.hsl=function(){var t=bm(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Ni.to.hwb=function(){var t=bm(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Ni.to.keyword=function(t){return C2[t.slice(0,3)]};function Fa(t,e,r){return Math.min(Math.max(e,t),r)}function ab(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var L2=b((WPe,P2)=>{"use strict";P2.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var XS=b((VPe,$2)=>{var wm=L2(),T2={};for(let t of Object.keys(wm))T2[wm[t]]=t;var me={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};$2.exports=me;for(let t of Object.keys(me)){if(!("channels"in me[t]))throw new Error("missing channels property: "+t);if(!("labels"in me[t]))throw new Error("missing channel labels property: "+t);if(me[t].labels.length!==me[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=me[t];delete me[t].channels,delete me[t].labels,Object.defineProperty(me[t],"channels",{value:e}),Object.defineProperty(me[t],"labels",{value:r})}me.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,u;s===n?a=0:e===s?a=(r-i)/o:r===s?a=2+(i-e)/o:i===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let c=(n+s)/2;return s===n?u=0:c<=.5?u=o/(s+n):u=o/(2-s-n),[a,u*100,c*100]};me.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,c=Math.max(o,a,u),l=c-Math.min(o,a,u),p=function(f){return(c-f)/6/l+1/2};return l===0?(n=0,s=0):(s=l/c,e=p(o),r=p(a),i=p(u),o===c?n=i-r:a===c?n=1/3+e-i:u===c&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]};me.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=me.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};me.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function Sae(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}me.rgb.keyword=function(t){let e=T2[t];if(e)return e;let r=1/0,i;for(let n of Object.keys(wm)){let s=wm[n],o=Sae(t,s);o<r&&(r=o,i=n)}return i};me.keyword.rgb=function(t){return wm[t]};me.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,o=e*.0193+r*.1192+i*.9505;return[n*100,s*100,o*100]};me.rgb.lab=function(t){let e=me.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};me.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,o;if(r===0)return o=i*255,[o,o,o];i<.5?n=i*(1+r):n=i+r-i*r;let a=2*i-n,u=[0,0,0];for(let c=0;c<3;c++)s=e+1/3*-(c-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(n-a)*6*s:2*s<1?o=n:3*s<2?o=a+(n-a)*(2/3-s)*6:o=a,u[c]=o*255;return u};me.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};me.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),u=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,u,o];case 1:return[a,i,o];case 2:return[o,i,u];case 3:return[o,a,i];case 4:return[u,o,i];case 5:return[i,o,a]}};me.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};me.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,o&1&&(s=1-s);let u=r+s*(a-r),c,l,p;switch(o){default:case 6:case 0:c=a,l=u,p=r;break;case 1:c=u,l=a,p=r;break;case 2:c=r,l=a,p=u;break;case 3:c=r,l=u,p=a;break;case 4:c=u,l=r,p=a;break;case 5:c=a,l=r,p=u;break}return[c*255,l*255,p*255]};me.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};me.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,o=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[n*255,s*255,o*255]};me.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};me.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,u=n**3,c=o**3;return s=a>.008856?a:(s-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};me.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};me.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};me.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?me.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};me.hsv.ansi16=function(t){return me.rgb.ansi16(me.hsv.rgb(t),t[2])};me.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};me.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};me.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};me.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};me.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let i=parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};me.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),o=n-s,a,u;return o<1?a=s/(1-o):a=0,o<=0?u=0:n===e?u=(r-i)/o%6:n===r?u=2+(i-e)/o:u=4+(e-r)/o,u/=6,u%=1,[u*360,o*100,a*100]};me.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};me.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};me.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a}return u=(1-r)*i,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};me.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};me.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};me.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};me.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};me.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};me.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};me.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};me.gray.hsl=function(t){return[0,0,t[0]]};me.gray.hsv=me.gray.hsl;me.gray.hwb=function(t){return[0,100,t[0]]};me.gray.cmyk=function(t){return[0,0,0,t[0]]};me.gray.lab=function(t){return[t[0],0,0]};me.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};me.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var R2=b((GPe,k2)=>{var ub=XS();function Cae(){let t={},e=Object.keys(ub);for(let r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function xae(t){let e=Cae(),r=[t];for(e[t].distance=0;r.length;){let i=r.pop(),n=Object.keys(ub[i]);for(let s=n.length,o=0;o<s;o++){let a=n[o],u=e[a];u.distance===-1&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(a))}}return e}function Dae(t,e){return function(r){return e(t(r))}}function Pae(t,e){let r=[e[t].parent,t],i=ub[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=Dae(ub[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}k2.exports=function(t){let e=xae(t),r={},i=Object.keys(e);for(let n=i.length,s=0;s<n;s++){let o=i[s];e[o].parent!==null&&(r[o]=Pae(o,e))}return r}});var O2=b((KPe,M2)=>{var JS=XS(),Lae=R2(),Rp={},Tae=Object.keys(JS);function $ae(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function kae(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let s=n.length,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Tae.forEach(t=>{Rp[t]={},Object.defineProperty(Rp[t],"channels",{value:JS[t].channels}),Object.defineProperty(Rp[t],"labels",{value:JS[t].labels});let e=Lae(t);Object.keys(e).forEach(i=>{let n=e[i];Rp[t][i]=kae(n),Rp[t][i].raw=$ae(n)})});M2.exports=Rp});var B2=b((zPe,F2)=>{var Mp=D2(),Fi=O2(),ZS=[].slice,N2=["keyword","gray","hex"],YS={};for(let t of Object.keys(Fi))YS[ZS.call(Fi[t].labels).sort().join("")]=t;var cb={};function mr(t,e){if(!(this instanceof mr))return new mr(t,e);if(e&&e in N2&&(e=null),e&&!(e in Fi))throw new Error("Unknown model: "+e);let r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof mr)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){let n=Mp.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Fi[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length>0){this.model=e||"rgb",i=Fi[this.model].channels;let n=ZS.call(t,0,i);this.color=QS(n,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(t);"alpha"in t&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=n.sort().join("");if(!(s in YS))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=YS[s];let o=Fi[this.model].labels,a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=QS(a)}if(cb[this.model])for(i=Fi[this.model].channels,r=0;r<i;r++){let n=cb[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}mr.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Mp.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:e.color.concat(this.valpha);return Mp.to[e.model](r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return Mp.to.rgb.percent(r)},array(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object(){let t={},e=Fi[this.model].channels,r=Fi[this.model].labels;for(let i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new mr(this.color.map(Mae(t)).concat(this.valpha),this.model)},alpha(t){return arguments.length>0?new mr(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:Ot("rgb",0,nr(255)),green:Ot("rgb",1,nr(255)),blue:Ot("rgb",2,nr(255)),hue:Ot(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:Ot("hsl",1,nr(100)),lightness:Ot("hsl",2,nr(100)),saturationv:Ot("hsv",1,nr(100)),value:Ot("hsv",2,nr(100)),chroma:Ot("hcg",1,nr(100)),gray:Ot("hcg",2,nr(100)),white:Ot("hwb",1,nr(100)),wblack:Ot("hwb",2,nr(100)),cyan:Ot("cmyk",0,nr(100)),magenta:Ot("cmyk",1,nr(100)),yellow:Ot("cmyk",2,nr(100)),black:Ot("cmyk",3,nr(100)),x:Ot("xyz",0,nr(100)),y:Ot("xyz",1,nr(100)),z:Ot("xyz",2,nr(100)),l:Ot("lab",0,nr(100)),a:Ot("lab",1),b:Ot("lab",2),keyword(t){return arguments.length>0?new mr(t):Fi[this.model].keyword(this.color)},hex(t){return arguments.length>0?new mr(t):Mp.to.hex(this.rgb().round().color)},hexa(t){if(arguments.length>0)return new mr(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Mp.to.hex(e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,i]of t.entries()){let n=i/255;e[r]=n<=.03928?n/12.92:((n+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*299+t[1]*587+t[2]*114)/1e3<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return mr.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-a;return mr.rgb(a*r.red()+u*i.red(),a*r.green()+u*i.green(),a*r.blue()+u*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let t of Object.keys(Fi)){if(N2.includes(t))continue;let e=Fi[t].channels;mr.prototype[t]=function(){if(this.model===t)return new mr(this);if(arguments.length>0)return new mr(arguments,t);let r=typeof arguments[e]=="number"?e:this.valpha;return new mr(Oae(Fi[this.model][t].raw(this.color)).concat(r),t)},mr[t]=function(r){return typeof r=="number"&&(r=QS(ZS.call(arguments),e)),new mr(r,t)}}function Rae(t,e){return Number(t.toFixed(e))}function Mae(t){return function(e){return Rae(e,t)}}function Ot(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(cb[i]||(cb[i]=[]))[e]=r;return t=t[0],function(i){let n;return arguments.length>0?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function nr(t){return function(e){return Math.max(0,Math.min(t,e))}}function Oae(t){return Array.isArray(t)?t:[t]}function QS(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}F2.exports=mr});var M3=b((ake,R3)=>{"use strict";function fue(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),i="",n=!1,s=r[0]||"text/plain",o=s;for(let l=1;l<r.length;l++)r[l]==="base64"?n=!0:(o+=`;${r[l]}`,r[l].indexOf("charset=")===0&&(i=r[l].substring(8)));!r[0]&&!i.length&&(o+=";charset=US-ASCII",i="US-ASCII");let a=n?"base64":"ascii",u=unescape(t.substring(e+1)),c=Buffer.from(u,a);return c.type=s,c.typeFull=o,c.charset=i,c}R3.exports=fue});var So=b((Eo,Nb)=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var O3=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function due(t){return O3.includes(t)}var hue=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...O3];function mue(t){return hue.includes(t)}var gue=["null","undefined","string","number","bigint","boolean","symbol"];function Hue(t){return gue.includes(t)}function Gp(t){return e=>typeof e===t}var{toString:N3}=Object.prototype,Pm=t=>{let e=N3.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&C.domElement(t))return"HTMLElement";if(mue(e))return e},pt=t=>e=>Pm(e)===t;function C(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(C.observable(t))return"Observable";if(C.array(t))return"Array";if(C.buffer(t))return"Buffer";let e=Pm(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}C.undefined=Gp("undefined");C.string=Gp("string");var yue=Gp("number");C.number=t=>yue(t)&&!C.nan(t);C.bigint=Gp("bigint");C.function_=Gp("function");C.null_=t=>t===null;C.class_=t=>C.function_(t)&&t.toString().startsWith("class ");C.boolean=t=>t===!0||t===!1;C.symbol=Gp("symbol");C.numericString=t=>C.string(t)&&!C.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));C.array=(t,e)=>Array.isArray(t)?C.function_(e)?t.every(e):!0:!1;C.buffer=t=>{var e,r,i,n;return(n=(i=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||i===void 0?void 0:i.call(r,t))!==null&&n!==void 0?n:!1};C.blob=t=>pt("Blob")(t);C.nullOrUndefined=t=>C.null_(t)||C.undefined(t);C.object=t=>!C.null_(t)&&(typeof t=="object"||C.function_(t));C.iterable=t=>{var e;return C.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};C.asyncIterable=t=>{var e;return C.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};C.generator=t=>{var e,r;return C.iterable(t)&&C.function_((e=t)===null||e===void 0?void 0:e.next)&&C.function_((r=t)===null||r===void 0?void 0:r.throw)};C.asyncGenerator=t=>C.asyncIterable(t)&&C.function_(t.next)&&C.function_(t.throw);C.nativePromise=t=>pt("Promise")(t);var vue=t=>{var e,r;return C.function_((e=t)===null||e===void 0?void 0:e.then)&&C.function_((r=t)===null||r===void 0?void 0:r.catch)};C.promise=t=>C.nativePromise(t)||vue(t);C.generatorFunction=pt("GeneratorFunction");C.asyncGeneratorFunction=t=>Pm(t)==="AsyncGeneratorFunction";C.asyncFunction=t=>Pm(t)==="AsyncFunction";C.boundFunction=t=>C.function_(t)&&!t.hasOwnProperty("prototype");C.regExp=pt("RegExp");C.date=pt("Date");C.error=pt("Error");C.map=t=>pt("Map")(t);C.set=t=>pt("Set")(t);C.weakMap=t=>pt("WeakMap")(t);C.weakSet=t=>pt("WeakSet")(t);C.int8Array=pt("Int8Array");C.uint8Array=pt("Uint8Array");C.uint8ClampedArray=pt("Uint8ClampedArray");C.int16Array=pt("Int16Array");C.uint16Array=pt("Uint16Array");C.int32Array=pt("Int32Array");C.uint32Array=pt("Uint32Array");C.float32Array=pt("Float32Array");C.float64Array=pt("Float64Array");C.bigInt64Array=pt("BigInt64Array");C.bigUint64Array=pt("BigUint64Array");C.arrayBuffer=pt("ArrayBuffer");C.sharedArrayBuffer=pt("SharedArrayBuffer");C.dataView=pt("DataView");C.enumCase=(t,e)=>Object.values(e).includes(t);C.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;C.urlInstance=t=>pt("URL")(t);C.urlString=t=>{if(!C.string(t))return!1;try{return new URL(t),!0}catch{return!1}};C.truthy=t=>Boolean(t);C.falsy=t=>!t;C.nan=t=>Number.isNaN(t);C.primitive=t=>C.null_(t)||Hue(typeof t);C.integer=t=>Number.isInteger(t);C.safeInteger=t=>Number.isSafeInteger(t);C.plainObject=t=>{if(N3.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};C.typedArray=t=>due(Pm(t));var bue=t=>C.safeInteger(t)&&t>=0;C.arrayLike=t=>!C.nullOrUndefined(t)&&!C.function_(t)&&bue(t.length);C.inRange=(t,e)=>{if(C.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(C.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var wue=1,_ue=["innerHTML","ownerDocument","style","attributes","nodeValue"];C.domElement=t=>C.object(t)&&t.nodeType===wue&&C.string(t.nodeName)&&!C.plainObject(t)&&_ue.every(e=>e in t);C.observable=t=>{var e,r,i,n;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((n=(i=t)["@@observable"])===null||n===void 0?void 0:n.call(i)):!1};C.nodeStream=t=>C.object(t)&&C.function_(t.pipe)&&!C.observable(t);C.infinite=t=>t===1/0||t===-1/0;var F3=t=>e=>C.integer(e)&&Math.abs(e%2)===t;C.evenInteger=F3(0);C.oddInteger=F3(1);C.emptyArray=t=>C.array(t)&&t.length===0;C.nonEmptyArray=t=>C.array(t)&&t.length>0;C.emptyString=t=>C.string(t)&&t.length===0;var Aue=t=>C.string(t)&&!/\S/.test(t);C.emptyStringOrWhitespace=t=>C.emptyString(t)||Aue(t);C.nonEmptyString=t=>C.string(t)&&t.length>0;C.nonEmptyStringAndNotWhitespace=t=>C.string(t)&&!C.emptyStringOrWhitespace(t);C.emptyObject=t=>C.object(t)&&!C.map(t)&&!C.set(t)&&Object.keys(t).length===0;C.nonEmptyObject=t=>C.object(t)&&!C.map(t)&&!C.set(t)&&Object.keys(t).length>0;C.emptySet=t=>C.set(t)&&t.size===0;C.nonEmptySet=t=>C.set(t)&&t.size>0;C.emptyMap=t=>C.map(t)&&t.size===0;C.nonEmptyMap=t=>C.map(t)&&t.size>0;C.propertyKey=t=>C.any([C.string,C.number,C.symbol],t);C.formData=t=>pt("FormData")(t);C.urlSearchParams=t=>pt("URLSearchParams")(t);var B3=(t,e,r)=>{if(!C.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};C.any=(t,...e)=>(C.array(t)?t:[t]).some(i=>B3(Array.prototype.some,i,e));C.all=(t,...e)=>B3(Array.prototype.every,t,e);var se=(t,e,r,i={})=>{if(!t){let{multipleValues:n}=i,s=n?`received values of types ${[...new Set(r.map(o=>`\`${C(o)}\``))].join(", ")}`:`received value of type \`${C(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}};Eo.assert={undefined:t=>se(C.undefined(t),"undefined",t),string:t=>se(C.string(t),"string",t),number:t=>se(C.number(t),"number",t),bigint:t=>se(C.bigint(t),"bigint",t),function_:t=>se(C.function_(t),"Function",t),null_:t=>se(C.null_(t),"null",t),class_:t=>se(C.class_(t),"Class",t),boolean:t=>se(C.boolean(t),"boolean",t),symbol:t=>se(C.symbol(t),"symbol",t),numericString:t=>se(C.numericString(t),"string with a number",t),array:(t,e)=>{se(C.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>se(C.buffer(t),"Buffer",t),blob:t=>se(C.blob(t),"Blob",t),nullOrUndefined:t=>se(C.nullOrUndefined(t),"null or undefined",t),object:t=>se(C.object(t),"Object",t),iterable:t=>se(C.iterable(t),"Iterable",t),asyncIterable:t=>se(C.asyncIterable(t),"AsyncIterable",t),generator:t=>se(C.generator(t),"Generator",t),asyncGenerator:t=>se(C.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>se(C.nativePromise(t),"native Promise",t),promise:t=>se(C.promise(t),"Promise",t),generatorFunction:t=>se(C.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>se(C.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>se(C.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>se(C.boundFunction(t),"Function",t),regExp:t=>se(C.regExp(t),"RegExp",t),date:t=>se(C.date(t),"Date",t),error:t=>se(C.error(t),"Error",t),map:t=>se(C.map(t),"Map",t),set:t=>se(C.set(t),"Set",t),weakMap:t=>se(C.weakMap(t),"WeakMap",t),weakSet:t=>se(C.weakSet(t),"WeakSet",t),int8Array:t=>se(C.int8Array(t),"Int8Array",t),uint8Array:t=>se(C.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>se(C.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>se(C.int16Array(t),"Int16Array",t),uint16Array:t=>se(C.uint16Array(t),"Uint16Array",t),int32Array:t=>se(C.int32Array(t),"Int32Array",t),uint32Array:t=>se(C.uint32Array(t),"Uint32Array",t),float32Array:t=>se(C.float32Array(t),"Float32Array",t),float64Array:t=>se(C.float64Array(t),"Float64Array",t),bigInt64Array:t=>se(C.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>se(C.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>se(C.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>se(C.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>se(C.dataView(t),"DataView",t),enumCase:(t,e)=>se(C.enumCase(t,e),"EnumCase",t),urlInstance:t=>se(C.urlInstance(t),"URL",t),urlString:t=>se(C.urlString(t),"string with a URL",t),truthy:t=>se(C.truthy(t),"truthy",t),falsy:t=>se(C.falsy(t),"falsy",t),nan:t=>se(C.nan(t),"NaN",t),primitive:t=>se(C.primitive(t),"primitive",t),integer:t=>se(C.integer(t),"integer",t),safeInteger:t=>se(C.safeInteger(t),"integer",t),plainObject:t=>se(C.plainObject(t),"plain object",t),typedArray:t=>se(C.typedArray(t),"TypedArray",t),arrayLike:t=>se(C.arrayLike(t),"array-like",t),domElement:t=>se(C.domElement(t),"HTMLElement",t),observable:t=>se(C.observable(t),"Observable",t),nodeStream:t=>se(C.nodeStream(t),"Node.js Stream",t),infinite:t=>se(C.infinite(t),"infinite number",t),emptyArray:t=>se(C.emptyArray(t),"empty array",t),nonEmptyArray:t=>se(C.nonEmptyArray(t),"non-empty array",t),emptyString:t=>se(C.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>se(C.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>se(C.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>se(C.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>se(C.emptyObject(t),"empty object",t),nonEmptyObject:t=>se(C.nonEmptyObject(t),"non-empty object",t),emptySet:t=>se(C.emptySet(t),"empty set",t),nonEmptySet:t=>se(C.nonEmptySet(t),"non-empty set",t),emptyMap:t=>se(C.emptyMap(t),"empty map",t),nonEmptyMap:t=>se(C.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>se(C.propertyKey(t),"PropertyKey",t),formData:t=>se(C.formData(t),"FormData",t),urlSearchParams:t=>se(C.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>se(C.evenInteger(t),"even integer",t),oddInteger:t=>se(C.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>se(C.directInstanceOf(t,e),"T",t),inRange:(t,e)=>se(C.inRange(t,e),"in range",t),any:(t,...e)=>se(C.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>se(C.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(C,{class:{value:C.class_},function:{value:C.function_},null:{value:C.null_}});Object.defineProperties(Eo.assert,{class:{value:Eo.assert.class_},function:{value:Eo.assert.function_},null:{value:Eo.assert.null_}});Eo.default=C;Nb.exports=C;Nb.exports.default=C;Nb.exports.assert=Eo.assert});var U3=b((uke,LC)=>{"use strict";var Fb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},Kp=class{static fn(e){return(...r)=>new Kp((i,n,s)=>{r.push(s),e(...r).then(i,n)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let n=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a))},s=a=>{this._isPending=!1,i(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(n,s,o)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new Fb(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Kp.prototype,Promise.prototype);LC.exports=Kp;LC.exports.CancelError=Fb});var j3=b(($C,kC)=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});function Iue(t){return t.encrypted}var TC=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",n=typeof r.secureConnect=="function",s=typeof r.close=="function",o=()=>{i&&r.connect(),Iue(t)&&n&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),s&&t.once("close",r.close)};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&s&&r.close(t._hadError)};$C.default=TC;kC.exports=TC;kC.exports.default=TC});var q3=b((MC,OC)=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});var Eue=j3(),Sue=require("util"),Cue=Number(process.versions.node.split(".")[0]),RC=t=>{if(t.timings)return t.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=a=>{let u=a.emit.bind(a);a.emit=(c,...l)=>(c==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,a.emit=u),u(c,...l))};r(t);let i=()=>{e.abort=Date.now(),(!e.response||Cue>=13)&&(e.phases.total=Date.now()-e.start)};t.prependOnceListener("abort",i);let n=a=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,Sue.types.isProxy(a))return;let u=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};a.prependOnceListener("lookup",u),Eue.default(a,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(a.removeListener("lookup",u),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?n(t.socket):t.prependOnceListener("socket",n);let s=()=>{var a;e.upload=Date.now(),e.phases.request=e.upload-((a=e.secureConnect)!==null&&a!==void 0?a:e.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?s():t.prependOnceListener("finish",s),t.prependOnceListener("response",a=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,a.timings=e,r(a),a.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start}),a.prependOnceListener("aborted",i)}),e};MC.default=RC;OC.exports=RC;OC.exports.default=RC});var J3=b((cke,BC)=>{"use strict";var{V4MAPPED:xue,ADDRCONFIG:Due,ALL:X3,promises:{Resolver:W3},lookup:Pue}=require("dns"),{promisify:NC}=require("util"),Lue=require("os"),zp=Symbol("cacheableLookupCreateConnection"),FC=Symbol("cacheableLookupInstance"),V3=Symbol("expires"),Tue=typeof X3=="number",G3=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},$ue=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},K3=()=>{let t=!1,e=!1;for(let r of Object.values(Lue.networkInterfaces()))for(let i of r)if(!i.internal&&(i.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},kue=t=>Symbol.iterator in t,z3={ttl:!0},Rue={all:!0},Bb=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:i=3600,errorTtl:n=.15,resolver:s=new W3,lookup:o=Pue}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=s,this._dnsLookup=NC(o),this._resolver instanceof W3?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=NC(this._resolver.resolve4.bind(this._resolver)),this._resolve6=NC(this._resolver.resolve6.bind(this._resolver))),this._iface=K3(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,i<1)this._fallback=!1;else{this._fallback=!0;let a=setInterval(()=>{this._hostnamesToFallback.clear()},i*1e3);a.unref&&a.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,i){if(typeof r=="function"?(i=r,r={}):typeof r=="number"&&(r={family:r}),!i)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(n=>{r.all?i(null,n):i(null,n.address,n.family,n.expires,n.ttl)},i)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let i=await this.query(e);if(r.family===6){let n=i.filter(s=>s.family===6);r.hints&xue&&(Tue&&r.hints&X3||n.length===0)?$ue(i):i=n}else r.family===4&&(i=i.filter(n=>n.family===4));if(r.hints&Due){let{_iface:n}=this;i=i.filter(s=>s.family===6?n.has6:n.has4)}if(i.length===0){let n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return r.all?i:i[0]}async query(e){let r=await this._cache.get(e);if(!r){let i=this._pending[e];if(i)r=await i;else{let n=this.queryAndCache(e);this._pending[e]=n;try{r=await n}finally{delete this._pending[e]}}}return r=r.map(i=>({...i})),r}async _resolve(e){let r=async c=>{try{return await c}catch(l){if(l.code==="ENODATA"||l.code==="ENOTFOUND")return[];throw l}},[i,n]=await Promise.all([this._resolve4(e,z3),this._resolve6(e,z3)].map(c=>r(c))),s=0,o=0,a=0,u=Date.now();for(let c of i)c.family=4,c.expires=u+c.ttl*1e3,s=Math.max(s,c.ttl);for(let c of n)c.family=6,c.expires=u+c.ttl*1e3,o=Math.max(o,c.ttl);return i.length>0?n.length>0?a=Math.min(s,o):a=s:a=o,{entries:[...i,...n],cacheTtl:a}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,i){if(this.maxTtl>0&&i>0){i=Math.min(i,this.maxTtl)*1e3,r[V3]=Date.now()+i;try{await this._cache.set(e,r,i)}catch(n){this.lookupAsync=async()=>{let s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=n,s}}kue(this._cache)&&this._tick(i)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Rue);let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let i=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,i),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let i=1/0,n=Date.now();for(let[s,o]of this._cache){let a=o[V3];n>=a?this._cache.delete(s):a<i&&(i=a)}i!==1/0&&this._tick(i-n)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(G3(e),zp in e)throw new Error("CacheableLookup has been already installed");e[zp]=e.createConnection,e[FC]=this,e.createConnection=(r,i)=>("lookup"in r||(r.lookup=this.lookup),e[zp](r,i))}uninstall(e){if(G3(e),e[zp]){if(e[FC]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[zp],delete e[zp],delete e[FC]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=K3(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};BC.exports=Bb;BC.exports.default=Bb});var Z3=b((lke,Q3)=>{"use strict";var Mue="text/plain",Oue="us-ascii",Y3=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Nue=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:i,data:n,hash:s}=r.groups,o=i.split(";");s=e?"":s;let a=!1;o[o.length-1]==="base64"&&(o.pop(),a=!0);let u=(o.shift()||"").toLowerCase(),l=[...o.map(p=>{let[f,h=""]=p.split("=").map(g=>g.trim());return f==="charset"&&(h=h.toLowerCase(),h===Oue)?"":`${f}${h?`=${h}`:""}`}).filter(Boolean)];return a&&l.push("base64"),(l.length!==0||u&&u!==Mue)&&l.unshift(u),`data:${l.join(";")},${a?n.trim():n}${s?`#${s}`:""}`},Fue=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return Nue(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash?n.hash="":e.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname&&(n.pathname=n.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g,"/")),n.pathname)try{n.pathname=decodeURI(n.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let o=n.pathname.split("/"),a=o[o.length-1];Y3(a,e.removeDirectoryIndex)&&(o=o.slice(0,o.length-1),n.pathname=o.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let o of[...n.searchParams.keys()])Y3(o,e.removeQueryParameters)&&n.searchParams.delete(o);e.removeQueryParameters===!0&&(n.search=""),e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));let s=t;return t=n.toString(),!e.removeSingleSlash&&n.pathname==="/"&&!s.endsWith("/")&&n.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};Q3.exports=Fue});var UC=b((pke,tU)=>{tU.exports=eU;function eU(t,e){if(t&&e)return eU(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){r[i]=t[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var s=t.apply(this,i),o=i[i.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(a){s[a]=o[a]}),s}}});var Xp=b((fke,jC)=>{var rU=UC();jC.exports=rU(Ub);jC.exports.strict=rU(iU);Ub.proto=Ub(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ub(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return iU(this)},configurable:!0})});function Ub(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function iU(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var jb=b((dke,sU)=>{var Bue=Xp(),Uue=function(){},jue=function(t){return t.setHeader&&typeof t.abort=="function"},que=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},nU=function(t,e,r){if(typeof e=="function")return nU(t,null,e);e||(e={}),r=Bue(r||Uue);var i=t._writableState,n=t._readableState,s=e.readable||e.readable!==!1&&t.readable,o=e.writable||e.writable!==!1&&t.writable,a=!1,u=function(){t.writable||c()},c=function(){o=!1,s||r.call(t)},l=function(){s=!1,o||r.call(t)},p=function(v){r.call(t,v?new Error("exited with error code: "+v):null)},f=function(v){r.call(t,v)},h=function(){process.nextTick(g)},g=function(){if(!a){if(s&&!(n&&n.ended&&!n.destroyed))return r.call(t,new Error("premature close"));if(o&&!(i&&i.ended&&!i.destroyed))return r.call(t,new Error("premature close"))}},H=function(){t.req.on("finish",c)};return jue(t)?(t.on("complete",c),t.on("abort",h),t.req?H():t.on("request",H)):o&&!i&&(t.on("end",u),t.on("close",u)),que(t)&&t.on("exit",p),t.on("end",l),t.on("finish",c),e.error!==!1&&t.on("error",f),t.on("close",h),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",H),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",p),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",h)}};sU.exports=nU});var uU=b((hke,aU)=>{var Wue=Xp(),Vue=jb(),qC=require("fs"),Lm=function(){},Gue=/^v?\.0/.test(process.version),qb=function(t){return typeof t=="function"},Kue=function(t){return!Gue||!qC?!1:(t instanceof(qC.ReadStream||Lm)||t instanceof(qC.WriteStream||Lm))&&qb(t.close)},zue=function(t){return t.setHeader&&qb(t.abort)},Xue=function(t,e,r,i){i=Wue(i);var n=!1;t.on("close",function(){n=!0}),Vue(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,Kue(t))return t.close(Lm);if(zue(t))return t.abort();if(qb(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},oU=function(t){t()},Jue=function(t,e){return t.pipe(e)},Yue=function(){var t=Array.prototype.slice.call(arguments),e=qb(t[t.length-1]||Lm)&&t.pop()||Lm;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,i=t.map(function(n,s){var o=s<t.length-1,a=s>0;return Xue(n,o,a,function(u){r||(r=u),u&&i.forEach(oU),!o&&(i.forEach(oU),e(r))})});return t.reduce(Jue)};aU.exports=Yue});var lU=b((mke,cU)=>{"use strict";var{PassThrough:Que}=require("stream");cU.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new Que({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var pU=b((gke,Jp)=>{"use strict";var{constants:Zue}=require("buffer"),ece=uU(),tce=lU(),Wb=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Vb(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i;return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=Zue.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};i=ece(t,tce(e),a=>{if(a){o(a);return}n()}),i.on("data",()=>{i.getBufferedLength()>r&&o(new Wb)})}),i.getBufferedValue()}Jp.exports=Vb;Jp.exports.default=Vb;Jp.exports.buffer=(t,e)=>Vb(t,{...e,encoding:"buffer"});Jp.exports.array=(t,e)=>Vb(t,{...e,array:!0});Jp.exports.MaxBufferError=Wb});var dU=b((yke,fU)=>{"use strict";var rce=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),ice=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),nce=new Set([500,502,503,504]),sce={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},oce={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Cc(t){let e=parseInt(t,10);return isFinite(e)?e:0}function ace(t){return t?nce.has(t.status):!0}function WC(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let i of r){let[n,s]=i.split(/=/,2);e[n.trim()]=s===void 0?!0:s.trim().replace(/^"|"$/g,"")}return e}function uce(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i)}if(e.length)return e.join(", ")}fU.exports=class{constructor(e,r,{shared:i,cacheHeuristic:n,immutableMinTimeToLive:s,ignoreCargoCult:o,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=WC(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=WC(e.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":uce(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&ice.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||rce.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=WC(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of r)if(e.headers[i]!==this._reqHeaders[i])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)sce[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let n of i)delete r[n]}if(r.warning){let i=r.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));i.length?r.warning=i.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return Cc(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Cc(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Cc(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<r?0:Math.max(e,(i-r)/1e3)}if(this._resHeaders["last-modified"]){let i=Date.parse(this._resHeaders["last-modified"]);if(isFinite(i)&&r>i)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+Cc(this._rescc["stale-if-error"]),i=e+Cc(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Cc(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Cc(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let n=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));n.length?r["if-none-match"]=n.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&ace(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let n={};for(let o in this._resHeaders)n[o]=o in r.headers&&!oce[o]?r.headers[o]:this._resHeaders[o];let s=Object.assign({},r,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var Gb=b((vke,hU)=>{"use strict";hU.exports=t=>{let e={};for(let[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}});var gU=b((bke,mU)=>{"use strict";var cce=require("stream").Readable,lce=Gb(),VC=class extends cce{constructor(e,r,i,n){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(i instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof n!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=lce(r),this.body=i,this.url=n}_read(){this.push(this.body),this.push(null)}};mU.exports=VC});var yU=b((wke,HU)=>{"use strict";var pce=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];HU.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(pce));for(let i of r)i in e||(e[i]=typeof t[i]=="function"?t[i].bind(t):t[i])}});var bU=b((_ke,vU)=>{"use strict";var fce=require("stream").PassThrough,dce=yU(),hce=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new fce;return dce(t,e),t.pipe(e)};vU.exports=hce});var wU=b(GC=>{GC.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",i=Array.isArray(e);r=i?"[":"{";var n=!0;for(var s in e){var o=typeof e[s]=="function"||!i&&typeof e[s]>"u";Object.hasOwnProperty.call(e,s)&&!o&&(n||(r+=","),n=!1,i?e[s]==null?r+="null":r+=t(e[s]):e[s]!==void 0&&(r+=t(s)+":"+t(e[s])))}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};GC.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var EU=b((Ike,IU)=>{"use strict";var mce=require("events"),_U=wU(),gce=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(require(e[r]))(t)}return new Map},AU=["sqlite","postgres","mysql","mongo","redis","tiered"],KC=class extends mce{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:_U.stringify,deserialize:_U.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let s={...this.opts};this.opts.store=gce(s)}if(this.opts.compression){let s=this.opts.compression;this.opts.serialize=s.serialize.bind(s),this.opts.deserialize=s.deserialize.bind(s)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",s=>this.emit("error",s)),this.opts.store.namespace=this.opts.namespace;let n=s=>async function*(){for await(let[o,a]of typeof s=="function"?s(this.opts.store.namespace):s){let u=this.opts.deserialize(a);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(o);continue}yield[this._getKeyUnprefix(o),u.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=n(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=n(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return AU.includes(this.opts.store.opts.dialect)||AU.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:i}=this.opts,n=Array.isArray(e),s=n?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(n&&i.getMany===void 0){let o=[];for(let a of s)o.push(Promise.resolve().then(()=>i.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(o).then(a=>{let u=[];for(let c of a)u.push(c.value);return u})}return Promise.resolve().then(()=>n?i.getMany(s):i.get(s)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null){if(n){let a=[];for(let u of o){if(typeof u=="string"&&(u=this.opts.deserialize(u)),u==null){a.push(void 0);continue}typeof u.expires=="number"&&Date.now()>u.expires?(this.delete(e).then(()=>{}),a.push(void 0)):a.push(r&&r.raw?u:u.value)}return a}return typeof o.expires=="number"&&Date.now()>o.expires?this.delete(e).then(()=>{}):r&&r.raw?o:o.value}})}set(e,r,i){let n=this._getKeyPrefix(e);typeof i>"u"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:s}=this.opts;return Promise.resolve().then(()=>{let o=typeof i=="number"?Date.now()+i:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>s.set(n,o,i)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let n=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let s=[];for(let o of n)s.push(r.delete(o));return Promise.allSettled(s).then(o=>o.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(n))}let i=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(i))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(async()=>typeof i.has=="function"?i.has(r):await i.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};IU.exports=KC});var xU=b((Eke,CU)=>{"use strict";var Hce=require("events"),Kb=require("url"),yce=Z3(),vce=pU(),zC=dU(),SU=gU(),bce=Gb(),wce=bU(),_ce=EU(),qn=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new _ce({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,i)=>{let n;if(typeof r=="string")n=XC(Kb.parse(r)),r={};else if(r instanceof Kb.URL)n=XC(Kb.parse(r.toString())),r={};else{let[p,...f]=(r.path||"").split("?"),h=f.length>0?`?${f.join("?")}`:"";n=XC({...r,pathname:p,search:h})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...Ace(n)},r.headers=bce(r.headers);let s=new Hce,o=yce(Kb.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${r.method}:${o}`,u=!1,c=!1,l=p=>{c=!0;let f=!1,h,g=new Promise(v=>{h=()=>{f||(f=!0,v())}}),H=v=>{if(u&&!p.forceRefresh){v.status=v.statusCode;let T=zC.fromObject(u.cachePolicy).revalidatedPolicy(p,v);if(!T.modified){let U=T.policy.responseHeaders();v=new SU(u.statusCode,U,u.body,u.url),v.cachePolicy=T.policy,v.fromCache=!0}}v.fromCache||(v.cachePolicy=new zC(p,v,p),v.fromCache=!1);let w;p.cache&&v.cachePolicy.storable()?(w=wce(v),(async()=>{try{let T=vce.buffer(v);if(await Promise.race([g,new Promise(q=>v.once("end",q))]),f)return;let U=await T,x={cachePolicy:v.cachePolicy.toObject(),url:v.url,statusCode:v.fromCache?u.statusCode:v.statusCode,body:U},P=p.strictTtl?v.cachePolicy.timeToLive():void 0;p.maxTtl&&(P=P?Math.min(P,p.maxTtl):p.maxTtl),await this.cache.set(a,x,P)}catch(T){s.emit("error",new qn.CacheError(T))}})()):p.cache&&u&&(async()=>{try{await this.cache.delete(a)}catch(T){s.emit("error",new qn.CacheError(T))}})(),s.emit("response",w||v),typeof i=="function"&&i(w||v)};try{let v=e(p,H);v.once("error",h),v.once("abort",h),s.emit("request",v)}catch(v){s.emit("error",new qn.RequestError(v))}};return(async()=>{let p=async h=>{await Promise.resolve();let g=h.cache?await this.cache.get(a):void 0;if(typeof g>"u")return l(h);let H=zC.fromObject(g.cachePolicy);if(H.satisfiesWithoutRevalidation(h)&&!h.forceRefresh){let v=H.responseHeaders(),w=new SU(g.statusCode,v,g.body,g.url);w.cachePolicy=H,w.fromCache=!0,s.emit("response",w),typeof i=="function"&&i(w)}else u=g,h.headers=H.revalidationHeaders(h),l(h)},f=h=>s.emit("error",new qn.CacheError(h));this.cache.once("error",f),s.on("response",()=>this.cache.removeListener("error",f));try{await p(r)}catch(h){r.automaticFailover&&!c&&l(r),s.emit("error",new qn.CacheError(h))}})(),s}}};function Ace(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function XC(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}qn.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};qn.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};CU.exports=qn});var PU=b((xke,DU)=>{"use strict";var Ice=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];DU.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(Ice)),i={};for(let n of r)n in e||(i[n]={get(){let s=t[n];return typeof s=="function"?s.bind(t):s},set(s){t[n]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var TU=b((Dke,LU)=>{"use strict";var{Transform:Ece,PassThrough:Sce}=require("stream"),JC=require("zlib"),Cce=PU();LU.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof JC.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,n=new Ece({transform(a,u,c){i=!1,c(null,a)},flush(a){a()}}),s=new Sce({autoDestroy:!1,destroy(a,u){t.destroy(),u(a)}}),o=r?JC.createBrotliDecompress():JC.createUnzip();return o.once("error",a=>{if(i&&!t.readable){s.end();return}s.destroy(a)}),Cce(t,s),t.pipe(n).pipe(o).pipe(s),s}});var QC=b((Pke,$U)=>{"use strict";var YC=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,n]of this.oldCache.entries())this.onEviction(i,n);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};$U.exports=YC});var ex=b((Lke,OU)=>{"use strict";var xce=require("events"),Dce=require("tls"),Pce=require("http2"),Lce=QC(),ri=Symbol("currentStreamsCount"),kU=Symbol("request"),hn=Symbol("cachedOriginSet"),Yp=Symbol("gracefullyClosing"),Tce=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],$ce=(t,e,r)=>{let i=0,n=t.length;for(;i<n;){let s=i+n>>>1;r(t[s],e)?i=s+1:n=s}return i},kce=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,ZC=(t,e)=>{for(let r of t)r[hn].length<e[hn].length&&r[hn].every(i=>e[hn].includes(i))&&r[ri]+e[ri]<=e.remoteSettings.maxConcurrentStreams&&MU(r)},Rce=(t,e)=>{for(let r of t)e[hn].length<r[hn].length&&e[hn].every(i=>r[hn].includes(i))&&e[ri]+r[ri]<=r.remoteSettings.maxConcurrentStreams&&MU(e)},RU=({agent:t,isFree:e})=>{let r={};for(let i in t.sessions){let s=t.sessions[i].filter(o=>{let a=o[Us.kCurrentStreamsCount]<o.remoteSettings.maxConcurrentStreams;return e?a:!a});s.length!==0&&(r[i]=s)}return r},MU=t=>{t[Yp]=!0,t[ri]===0&&t.close()},Us=class extends xce{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:i=10,maxCachedTlsSessions:n=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=i,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Lce({maxSize:n})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let i of Tce)e[i]&&(r+=`:${e[i]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let i=this.queue[e][r];this._sessionsCount<this.maxSessions&&!i.completed&&(i.completed=!0,i())}getSession(e,r,i){return new Promise((n,s)=>{Array.isArray(i)?(i=[...i],n()):i=[{resolve:n,reject:s}];let o=this.normalizeOptions(r),a=Us.normalizeOrigin(e,r&&r.servername);if(a===void 0){for(let{reject:l}of i)l(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(o in this.sessions){let l=this.sessions[o],p=-1,f=-1,h;for(let g of l){let H=g.remoteSettings.maxConcurrentStreams;if(H<p)break;if(g[hn].includes(a)){let v=g[ri];if(v>=H||g[Yp]||g.destroyed)continue;h||(p=H),v>f&&(h=g,f=v)}}if(h){if(i.length!==1){for(let{reject:g}of i){let H=new Error(`Expected the length of listeners to be 1, got ${i.length}.
Please report this to https://github.com/szmarczak/http2-wrapper/`);g(H)}return}i[0].resolve(h);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let u=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let l=`${a}:${o}`,p=!1;try{let f=Pce.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(l),...r});f[ri]=0,f[Yp]=!1;let h=()=>f[ri]<f.remoteSettings.maxConcurrentStreams,g=!0;f.socket.once("session",v=>{this.tlsSessionCache.set(l,v)}),f.once("error",v=>{for(let{reject:w}of i)w(v);this.tlsSessionCache.delete(l)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(p){g&&this._freeSessionsCount--,this._sessionsCount--;let v=this.sessions[o];v.splice(v.indexOf(f),1),v.length===0&&delete this.sessions[o]}else{let v=new Error("Session closed without receiving a SETTINGS frame");v.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:w}of i)w(v);u()}this._tryToCreateNewSession(o,a)});let H=()=>{if(!(!(o in this.queue)||!h())){for(let v of f[hn])if(v in this.queue[o]){let{listeners:w}=this.queue[o][v];for(;w.length!==0&&h();)w.shift().resolve(f);let T=this.queue[o];if(T[v].listeners.length===0&&(delete T[v],Object.keys(T).length===0)){delete this.queue[o];break}if(!h())break}}};f.on("origin",()=>{f[hn]=f.originSet,h()&&(H(),ZC(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let v=new Error("Agent has been destroyed");for(let w of i)w.reject(v);f.destroy();return}f[hn]=f.originSet;{let v=this.sessions;if(o in v){let w=v[o];w.splice($ce(w,f,kce),0,f)}else v[o]=[f]}this._freeSessionsCount+=1,p=!0,this.emit("session",f),H(),u(),f[ri]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,r,i),i.length=0),f.on("remoteSettings",()=>{H(),ZC(this.sessions[o],f)})}),f[kU]=f.request,f.request=(v,w)=>{if(f[Yp])throw new Error("The session is gracefully closing. No new streams are allowed.");let T=f[kU](v,w);return f.ref(),++f[ri],f[ri]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,T.once("close",()=>{if(g=h(),--f[ri],!f.destroyed&&!f.closed&&(Rce(this.sessions[o],f),h()&&!f.closed)){g||(this._freeSessionsCount++,g=!0);let U=f[ri]===0;U&&f.unref(),U&&(this._freeSessionsCount>this.maxFreeSessions||f[Yp])?f.close():(ZC(this.sessions[o],f),H())}}),T}}catch(f){for(let h of i)h.reject(f);u()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,r,i,n){return new Promise((s,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(u){o(u)}}}])})}createConnection(e,r){return Us.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=n),Dce.connect(i,n,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ri]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let i of r)i.destroy(e);for(let r of Object.values(this.queue))for(let i of Object.values(r))i.destroyed=!0;this.queue={}}get freeSessions(){return RU({agent:this,isFree:!0})}get busySessions(){return RU({agent:this,isFree:!1})}};Us.kCurrentStreamsCount=ri;Us.kGracefullyClosing=Yp;OU.exports={Agent:Us,globalAgent:new Us}});var rx=b((Tke,NU)=>{"use strict";var{Readable:Mce}=require("stream"),tx=class extends Mce{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};NU.exports=tx});var ix=b(($ke,FU)=>{"use strict";FU.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var UU=b((kke,BU)=>{"use strict";BU.exports=(t,e,r)=>{for(let i of r)t.on(i,(...n)=>e.emit(i,...n))}});var qU=b((Rke,jU)=>{"use strict";jU.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var VU=b((Oke,WU)=>{"use strict";var Qp=(t,e,r)=>{WU.exports[e]=class extends t{constructor(...n){super(typeof r=="string"?r:r(n)),this.name=`${super.name} [${e}]`,this.code=e}}};Qp(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Qp(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Qp(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Qp(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Qp(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Qp(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var ux=b((Nke,QU)=>{"use strict";var Oce=require("http2"),{Writable:Nce}=require("stream"),{Agent:GU,globalAgent:Fce}=ex(),Bce=rx(),Uce=ix(),jce=UU(),qce=qU(),{ERR_INVALID_ARG_TYPE:nx,ERR_INVALID_PROTOCOL:Wce,ERR_HTTP_HEADERS_SENT:KU,ERR_INVALID_HTTP_TOKEN:Vce,ERR_HTTP_INVALID_HEADER_VALUE:Gce,ERR_INVALID_CHAR:Kce}=VU(),{HTTP2_HEADER_STATUS:zU,HTTP2_HEADER_METHOD:XU,HTTP2_HEADER_PATH:JU,HTTP2_METHOD_CONNECT:zce}=Oce.constants,Wr=Symbol("headers"),sx=Symbol("origin"),ox=Symbol("session"),YU=Symbol("options"),zb=Symbol("flushedHeaders"),Tm=Symbol("jobs"),Xce=/^[\^`\-\w!#$%&*+.|~]+$/,Jce=/[^\t\u0020-\u007E\u0080-\u00FF]/,ax=class extends Nce{constructor(e,r,i){super({autoDestroy:!1});let n=typeof e=="string"||e instanceof URL;if(n&&(e=Uce(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(i=r,r=n?e:{...e}):r={...e,...r},r.h2session)this[ox]=r.h2session;else if(r.agent===!1)this.agent=new GU({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new GU({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=Fce;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new nx("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new Wce(r.protocol,"https:");let s=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,o=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:a}=r;if(r.timeout=void 0,this[Wr]=Object.create(null),this[Tm]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[u,c]of Object.entries(r.headers))this.setHeader(u,c);r.auth&&!("authorization"in this[Wr])&&(this[Wr].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[YU]=r,s===443?(this[sx]=`https://${o}`,":authority"in this[Wr]||(this[Wr][":authority"]=o)):(this[sx]=`https://${o}:${s}`,":authority"in this[Wr]||(this[Wr][":authority"]=`${o}:${s}`)),a&&this.setTimeout(a),i&&this.once("response",i),this[zb]=!1}get method(){return this[Wr][XU]}set method(e){e&&(this[Wr][XU]=e.toUpperCase())}get path(){return this[Wr][JU]}set path(e){e&&(this[Wr][JU]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let n=()=>this._request.write(e,r,i);this._request?n():this[Tm].push(n)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[Tm].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[zb]||this.destroyed)return;this[zb]=!0;let e=this.method===zce,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||jce(i,this,["timeout","continue","close","error"]);let n=o=>(...a)=>{!this.writable&&!this.destroyed?o(...a):this.once("finish",()=>{o(...a)})};i.once("response",n((o,a,u)=>{let c=new Bce(this.socket,i.readableHighWaterMark);this.res=c,c.req=this,c.statusCode=o[zU],c.headers=o,c.rawHeaders=u,c.once("end",()=>{this.aborted?(c.aborted=!0,c.emit("aborted")):(c.complete=!0,c.socket=null,c.connection=null)}),e?(c.upgrade=!0,this.emit("connect",c,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",l=>{!c._dumped&&!c.push(l)&&i.pause()}),i.once("end",()=>{c.push(null)}),this.emit("response",c)||c._dump())})),i.once("headers",n(o=>this.emit("information",{statusCode:o[zU]}))),i.once("trailers",n((o,a,u)=>{let{res:c}=this;c.trailers=o,c.rawTrailers=u}));let{socket:s}=i.session;this.socket=s,this.connection=s;for(let o of this[Tm])o();this.emit("socket",this.socket)};if(this[ox])try{r(this[ox].request(this[Wr]))}catch(i){this.emit("error",i)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[sx],this[YU],this[Wr]))}catch(i){this.emit("error",i)}}}getHeader(e){if(typeof e!="string")throw new nx("name","string",e);return this[Wr][e.toLowerCase()]}get headersSent(){return this[zb]}removeHeader(e){if(typeof e!="string")throw new nx("name","string",e);if(this.headersSent)throw new KU("remove");delete this[Wr][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new KU("set");if(typeof e!="string"||!Xce.test(e)&&!qce(e))throw new Vce("Header name",e);if(typeof r>"u")throw new Gce(r,e);if(Jce.test(r))throw new Kce("header content",e);this[Wr][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Tm].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};QU.exports=ax});var ej=b((Fke,ZU)=>{"use strict";var Yce=require("tls");ZU.exports=(t={},e=Yce.connect)=>new Promise((r,i)=>{let n=!1,s,o=async()=>{await u,s.off("timeout",a),s.off("error",i),t.resolveSocket?(r({alpnProtocol:s.alpnProtocol,socket:s,timeout:n}),n&&(await Promise.resolve(),s.emit("timeout"))):(s.destroy(),r({alpnProtocol:s.alpnProtocol,timeout:n}))},a=async()=>{n=!0,o()},u=(async()=>{try{s=await e(t,o),s.on("error",i),s.once("timeout",a)}catch(c){i(c)}})()})});var rj=b((Bke,tj)=>{"use strict";var Qce=require("net");tj.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),Qce.isIP(e)?"":e}});var sj=b((Uke,lx)=>{"use strict";var ij=require("http"),cx=require("https"),Zce=ej(),ele=QC(),tle=ux(),rle=rj(),ile=ix(),Xb=new ele({maxSize:100}),$m=new Map,nj=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r)};e.on("free",i);let n=()=>{t.removeSocket(e,r)};e.on("close",n);let s=()=>{t.removeSocket(e,r),e.off("close",n),e.off("free",i),e.off("agentRemove",s)};e.on("agentRemove",s),t.emit("free",e,r)},nle=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Xb.has(e)){if($m.has(e))return(await $m.get(e)).alpnProtocol;let{path:r,agent:i}=t;t.path=t.socketPath;let n=Zce(t);$m.set(e,n);try{let{socket:s,alpnProtocol:o}=await n;if(Xb.set(e,o),t.path=r,o==="h2")s.destroy();else{let{globalAgent:a}=cx,u=cx.Agent.prototype.createConnection;i?i.createConnection===u?nj(i,s,t):s.destroy():a.createConnection===u?nj(a,s,t):s.destroy()}return $m.delete(e),o}catch(s){throw $m.delete(e),s}}return Xb.get(e)};lx.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=ile(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||rle(e),e.port=e.port||(i?443:80),e._defaultAgent=i?cx.globalAgent:ij.globalAgent;let n=e.agent;if(n){if(n.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=n[i?"https":"http"]}return i&&await nle(e)==="h2"?(n&&(e.agent=n.http2),new tle(e,r)):ij.request(e,r)};lx.exports.protocolCache=Xb});var aj=b((jke,oj)=>{"use strict";var sle=require("http2"),ole=ex(),px=ux(),ale=rx(),ule=sj(),cle=(t,e,r)=>new px(t,e,r),lle=(t,e,r)=>{let i=new px(t,e,r);return i.end(),i};oj.exports={...sle,ClientRequest:px,IncomingMessage:ale,...ole,request:cle,get:lle,auto:ule}});var dx=b(fx=>{"use strict";Object.defineProperty(fx,"__esModule",{value:!0});var uj=So();fx.default=t=>uj.default.nodeStream(t)&&uj.default.function_(t.getBoundary)});var fj=b(hx=>{"use strict";Object.defineProperty(hx,"__esModule",{value:!0});var lj=require("fs"),pj=require("util"),cj=So(),ple=dx(),fle=pj.promisify(lj.stat);hx.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(cj.default.string(t))return Buffer.byteLength(t);if(cj.default.buffer(t))return t.length;if(ple.default(t))return pj.promisify(t.getLength.bind(t))();if(t instanceof lj.ReadStream){let{size:r}=await fle(t.path);return r===0?void 0:r}}});var gx=b(mx=>{"use strict";Object.defineProperty(mx,"__esModule",{value:!0});function dle(t,e,r){let i={};for(let n of r)i[n]=(...s)=>{e.emit(n,...s)},t.on(n,i[n]);return()=>{for(let n of r)t.off(n,i[n])}}mx.default=dle});var dj=b(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});Hx.default=()=>{let t=[];return{once(e,r,i){e.once(r,i),t.push({origin:e,event:r,fn:i})},unhandleAll(){for(let e of t){let{origin:r,event:i,fn:n}=e;r.removeListener(i,n)}t.length=0}}}});var mj=b(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.TimeoutError=void 0;var hle=require("net"),mle=dj(),hj=Symbol("reentry"),gle=()=>{},Jb=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};km.TimeoutError=Jb;km.default=(t,e,r)=>{if(hj in t)return gle;t[hj]=!0;let i=[],{once:n,unhandleAll:s}=mle.default(),o=(p,f,h)=>{var g;let H=setTimeout(f,p,p,h);(g=H.unref)===null||g===void 0||g.call(H);let v=()=>{clearTimeout(H)};return i.push(v),v},{host:a,hostname:u}=r,c=(p,f)=>{t.destroy(new Jb(p,f))},l=()=>{for(let p of i)p();s()};if(t.once("error",p=>{if(l(),t.listenerCount("error")===0)throw p}),t.once("close",l),n(t,"response",p=>{n(p,"end",l)}),typeof e.request<"u"&&o(e.request,c,"request"),typeof e.socket<"u"){let p=()=>{c(e.socket,"socket")};t.setTimeout(e.socket,p),i.push(()=>{t.removeListener("timeout",p)})}return n(t,"socket",p=>{var f;let{socketPath:h}=t;if(p.connecting){let g=Boolean(h??hle.isIP((f=u??a)!==null&&f!==void 0?f:"")!==0);if(typeof e.lookup<"u"&&!g&&typeof p.address().address>"u"){let H=o(e.lookup,c,"lookup");n(p,"lookup",H)}if(typeof e.connect<"u"){let H=()=>o(e.connect,c,"connect");g?n(p,"connect",H()):n(p,"lookup",v=>{v===null&&n(p,"connect",H())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&n(p,"connect",()=>{let H=o(e.secureConnect,c,"secureConnect");n(p,"secureConnect",H)})}if(typeof e.send<"u"){let g=()=>o(e.send,c,"send");p.connecting?n(p,"connect",()=>{n(t,"upload-complete",g())}):n(t,"upload-complete",g())}}),typeof e.response<"u"&&n(t,"upload-complete",()=>{let p=o(e.response,c,"response");n(t,"response",p)}),l}});var Hj=b(yx=>{"use strict";Object.defineProperty(yx,"__esModule",{value:!0});var gj=So();yx.default=t=>{t=t;let e={protocol:t.protocol,hostname:gj.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return gj.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var yj=b(vx=>{"use strict";Object.defineProperty(vx,"__esModule",{value:!0});var Hle=require("url"),yle=["protocol","host","hostname","port","pathname","search"];vx.default=(t,e)=>{var r,i;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(i=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&i!==void 0?i:""}`}let n=new Hle.URL(t);if(e.path){let s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(let s of yle)e[s]&&(n[s]=e[s].toString());return n}});var vj=b(wx=>{"use strict";Object.defineProperty(wx,"__esModule",{value:!0});var bx=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};wx.default=bx});var Ax=b(_x=>{"use strict";Object.defineProperty(_x,"__esModule",{value:!0});var vle=async t=>{let e=[],r=0;for await(let i of t)e.push(i),r+=Buffer.byteLength(i);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};_x.default=vle});var wj=b(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.dnsLookupIpVersionToFamily=xc.isDnsLookupIpVersion=void 0;var bj={auto:0,ipv4:4,ipv6:6};xc.isDnsLookupIpVersion=t=>t in bj;xc.dnsLookupIpVersionToFamily=t=>{if(xc.isDnsLookupIpVersion(t))return bj[t];throw new Error("Invalid DNS lookup IP version")}});var Ix=b(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});Yb.isResponseOk=void 0;Yb.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var Aj=b(Ex=>{"use strict";Object.defineProperty(Ex,"__esModule",{value:!0});var _j=new Set;Ex.default=t=>{_j.has(t)||(_j.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var Ij=b(Sx=>{"use strict";Object.defineProperty(Sx,"__esModule",{value:!0});var Ht=So(),ble=(t,e)=>{if(Ht.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Ht.assert.any([Ht.default.string,Ht.default.undefined],t.encoding),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.resolveBodyOnly),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.methodRewriting),Ht.assert.any([Ht.default.boolean,Ht.default.undefined],t.isStream),Ht.assert.any([Ht.default.string,Ht.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:i=>i.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Ht.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(i=>i.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):Ht.default.number(r)&&(t.retry.limit=r),Ht.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Ht.default.number))),Ht.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:i}=t;if(!Ht.default.function_(i.transform))throw new Error("`options.pagination.transform` must be implemented");if(!Ht.default.function_(i.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!Ht.default.function_(i.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!Ht.default.function_(i.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};Sx.default=ble});var Ej=b(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.retryAfterStatusCodes=void 0;Rm.retryAfterStatusCodes=new Set([413,429,503]);var wle=({attemptCount:t,retryOptions:e,error:r,retryAfter:i})=>{if(t>e.limit)return 0;let n=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),o=r.response&&e.statusCodes.includes(r.response.statusCode);if(!n||!s&&!o)return 0;if(r.response){if(i)return e.maxRetryAfter===void 0||i>e.maxRetryAfter?0:i;if(r.response.statusCode===413)return 0}let a=Math.random()*100;return 2**(t-1)*1e3+a};Rm.default=wle});var Nm=b(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.UnsupportedProtocolError=Ve.ReadError=Ve.TimeoutError=Ve.UploadError=Ve.CacheError=Ve.HTTPError=Ve.MaxRedirectsError=Ve.RequestError=Ve.setNonEnumerableProperties=Ve.knownHookEvents=Ve.withoutBody=Ve.kIsNormalizedAlready=void 0;var Sj=require("util"),Cj=require("stream"),_le=require("fs"),Za=require("url"),xj=require("http"),Cx=require("http"),Ale=require("https"),Ile=q3(),Ele=J3(),Dj=xU(),Sle=TU(),Cle=aj(),xle=Gb(),K=So(),Dle=fj(),Pj=dx(),Ple=gx(),Lj=mj(),Lle=Hj(),Tj=yj(),Tle=vj(),$le=Ax(),$j=wj(),kle=Ix(),eu=Aj(),Rle=Ij(),Mle=Ej(),xx,Ir=Symbol("request"),e0=Symbol("response"),Zp=Symbol("responseSize"),ef=Symbol("downloadedSize"),tf=Symbol("bodySize"),rf=Symbol("uploadedSize"),Qb=Symbol("serverResponsesPiped"),kj=Symbol("unproxyEvents"),Rj=Symbol("isFromCache"),Dx=Symbol("cancelTimeouts"),Mj=Symbol("startedReading"),nf=Symbol("stopReading"),Zb=Symbol("triggerRead"),tu=Symbol("body"),Mm=Symbol("jobs"),Oj=Symbol("originalResponse"),Nj=Symbol("retryTimeout");Ve.kIsNormalizedAlready=Symbol("isNormalizedAlready");var Ole=K.default.string(process.versions.brotli);Ve.withoutBody=new Set(["GET","HEAD"]);Ve.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Nle(t){for(let e in t){let r=t[e];if(!K.default.string(r)&&!K.default.number(r)&&!K.default.boolean(r)&&!K.default.null_(r)&&!K.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function Fle(t){return K.default.object(t)&&!("statusCode"in t)}var Px=new Tle.default,Ble=async t=>new Promise((e,r)=>{let i=n=>{r(n)};t.pending||e(),t.once("error",i),t.once("ready",()=>{t.off("error",i),e()})}),Ule=new Set([300,301,302,303,304,307,308]),jle=["context","body","json","form"];Ve.setNonEnumerableProperties=(t,e)=>{let r={};for(let i of t)if(i)for(let n of jle)n in i&&(r[n]={writable:!0,configurable:!0,enumerable:!1,value:i[n]});Object.defineProperties(e,r)};var Vt=class extends Error{constructor(e,r,i){var n,s;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(n=r.code)!==null&&n!==void 0?n:"ERR_GOT_REQUEST_ERROR",i instanceof a0?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i[e0]}),Object.defineProperty(this,"options",{enumerable:!1,value:i.options})):Object.defineProperty(this,"options",{enumerable:!1,value:i}),this.timings=(s=this.request)===null||s===void 0?void 0:s.timings,K.default.string(r.stack)&&K.default.string(this.stack)){let o=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(o).split(`
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;u.length!==0&&u[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,o)}${a.reverse().join(`
`)}${u.reverse().join(`
`)}`}}};Ve.RequestError=Vt;var t0=class extends Vt{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}};Ve.MaxRedirectsError=t0;var r0=class extends Vt{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}};Ve.HTTPError=r0;var i0=class extends Vt{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};Ve.CacheError=i0;var n0=class extends Vt{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}};Ve.UploadError=n0;var s0=class extends Vt{constructor(e,r,i){super(e.message,e,i),this.name="TimeoutError",this.event=e.event,this.timings=r}};Ve.TimeoutError=s0;var Om=class extends Vt{constructor(e,r){super(e.message,e,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}};Ve.ReadError=Om;var o0=class extends Vt{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}};Ve.UnsupportedProtocolError=o0;var qle=["socket","connect","continue","information","upgrade","timeout"],a0=class extends Cj.Duplex{constructor(e,r={},i){super({autoDestroy:!1,highWaterMark:0}),this[ef]=0,this[rf]=0,this.requestInitialized=!1,this[Qb]=new Set,this.redirects=[],this[nf]=!1,this[Zb]=!1,this[Mm]=[],this.retryCount=0,this._progressCallbacks=[];let n=()=>this._unlockWrite(),s=()=>this._lockWrite();this.on("pipe",c=>{c.prependListener("data",n),c.on("data",s),c.prependListener("end",n),c.on("end",s)}),this.on("unpipe",c=>{c.off("data",n),c.off("data",s),c.off("end",n),c.off("end",s)}),this.on("pipe",c=>{c instanceof Cx.IncomingMessage&&(this.options.headers={...c.headers,...this.options.headers})});let{json:o,body:a,form:u}=r;if((o||a||u)&&this._lockWrite(),Ve.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,i)}catch(c){K.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(c);return}(async()=>{var c;try{this.options.body instanceof _le.ReadStream&&await Ble(this.options.body);let{url:l}=this.options;if(!l)throw new TypeError("Missing `url` property");if(this.requestUrl=l.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(c=this[Ir])===null||c===void 0||c.destroy();return}for(let p of this[Mm])p();this[Mm].length=0,this.requestInitialized=!0}catch(l){if(l instanceof Vt){this._beforeError(l);return}this.destroyed||this.destroy(l)}})()}static normalizeArguments(e,r,i){var n,s,o,a,u;let c=r;if(K.default.object(e)&&!K.default.urlInstance(e))r={...i,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...i,...r},e!==void 0&&(r.url=e),K.default.urlInstance(r.url)&&(r.url=new Za.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),K.assert.any([K.default.string,K.default.undefined],r.method),K.assert.any([K.default.object,K.default.undefined],r.headers),K.assert.any([K.default.string,K.default.urlInstance,K.default.undefined],r.prefixUrl),K.assert.any([K.default.object,K.default.undefined],r.cookieJar),K.assert.any([K.default.object,K.default.string,K.default.undefined],r.searchParams),K.assert.any([K.default.object,K.default.string,K.default.undefined],r.cache),K.assert.any([K.default.object,K.default.number,K.default.undefined],r.timeout),K.assert.any([K.default.object,K.default.undefined],r.context),K.assert.any([K.default.object,K.default.undefined],r.hooks),K.assert.any([K.default.boolean,K.default.undefined],r.decompress),K.assert.any([K.default.boolean,K.default.undefined],r.ignoreInvalidCookies),K.assert.any([K.default.boolean,K.default.undefined],r.followRedirect),K.assert.any([K.default.number,K.default.undefined],r.maxRedirects),K.assert.any([K.default.boolean,K.default.undefined],r.throwHttpErrors),K.assert.any([K.default.boolean,K.default.undefined],r.http2),K.assert.any([K.default.boolean,K.default.undefined],r.allowGetBody),K.assert.any([K.default.string,K.default.undefined],r.localAddress),K.assert.any([$j.isDnsLookupIpVersion,K.default.undefined],r.dnsLookupIpVersion),K.assert.any([K.default.object,K.default.undefined],r.https),K.assert.any([K.default.boolean,K.default.undefined],r.rejectUnauthorized),r.https&&(K.assert.any([K.default.boolean,K.default.undefined],r.https.rejectUnauthorized),K.assert.any([K.default.function_,K.default.undefined],r.https.checkServerIdentity),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.certificateAuthority),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.key),K.assert.any([K.default.string,K.default.object,K.default.array,K.default.undefined],r.https.certificate),K.assert.any([K.default.string,K.default.undefined],r.https.passphrase),K.assert.any([K.default.string,K.default.buffer,K.default.array,K.default.undefined],r.https.pfx)),K.assert.any([K.default.object,K.default.undefined],r.cacheOptions),K.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===i?.headers?r.headers={...r.headers}:r.headers=xle({...i?.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==i?.searchParams){let h;if(K.default.string(r.searchParams)||r.searchParams instanceof Za.URLSearchParams)h=new Za.URLSearchParams(r.searchParams);else{Nle(r.searchParams),h=new Za.URLSearchParams;for(let g in r.searchParams){let H=r.searchParams[g];H===null?h.append(g,""):H!==void 0&&h.append(g,H)}}(n=i?.searchParams)===null||n===void 0||n.forEach((g,H)=>{h.has(H)||h.append(H,g)}),r.searchParams=h}if(r.username=(s=r.username)!==null&&s!==void 0?s:"",r.password=(o=r.password)!==null&&o!==void 0?o:"",K.default.undefined(r.prefixUrl)?r.prefixUrl=(a=i?.prefixUrl)!==null&&a!==void 0?a:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),K.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=Tj.default(r.prefixUrl+r.url,r)}else(K.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=Tj.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:h}=r;Object.defineProperty(r,"prefixUrl",{set:H=>{let v=r.url;if(!v.href.startsWith(H))throw new Error(`Cannot change \`prefixUrl\` from ${h} to ${H}: ${v.href}`);r.url=new Za.URL(H+v.href.slice(h.length)),h=H},get:()=>h});let{protocol:g}=r.url;if(g==="unix:"&&(g="http:",r.url=new Za.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),g!=="http:"&&g!=="https:")throw new o0(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:l}=r;if(l){let{setCookie:h,getCookieString:g}=l;K.assert.function_(h),K.assert.function_(g),h.length===4&&g.length===0&&(h=Sj.promisify(h.bind(r.cookieJar)),g=Sj.promisify(g.bind(r.cookieJar)),r.cookieJar={setCookie:h,getCookieString:g})}let{cache:p}=r;if(p&&(Px.has(p)||Px.set(p,new Dj((h,g)=>{let H=h[Ir](h,g);return K.default.promise(H)&&(H.once=(v,w)=>{if(v==="error")H.catch(w);else if(v==="abort")(async()=>{try{(await H).once("abort",w)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${v}`);return H}),H},p))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)xx||(xx=new Ele.default),r.dnsCache=xx;else if(!K.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${K.default(r.dnsCache)}`);K.default.number(r.timeout)?r.timeout={request:r.timeout}:i&&r.timeout!==i.timeout?r.timeout={...i.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let f=r.hooks===i?.hooks;r.hooks={...r.hooks};for(let h of Ve.knownHookEvents)if(h in r.hooks)if(K.default.array(r.hooks[h]))r.hooks[h]=[...r.hooks[h]];else throw new TypeError(`Parameter \`${h}\` must be an Array, got ${K.default(r.hooks[h])}`);else r.hooks[h]=[];if(i&&!f)for(let h of Ve.knownHookEvents)i.hooks[h].length>0&&(r.hooks[h]=[...i.hooks[h],...r.hooks[h]]);if("family"in r&&eu.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),i?.https&&(r.https={...i.https,...r.https}),"rejectUnauthorized"in r&&eu.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&eu.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&eu.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&eu.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&eu.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&eu.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&eu.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let h in r.agent)if(h!=="http"&&h!=="https"&&h!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${h}\``)}return r.maxRedirects=(u=r.maxRedirects)!==null&&u!==void 0?u:0,Ve.setNonEnumerableProperties([i,c],r),Rle.default(r,i)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,i=!K.default.undefined(e.form),n=!K.default.undefined(e.json),s=!K.default.undefined(e.body),o=i||n||s,a=Ve.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=a,o){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,i,n].filter(u=>u).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof Cj.Readable)&&!K.default.string(e.body)&&!K.default.buffer(e.body)&&!Pj.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(i&&!K.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let u=!K.default.string(r["content-type"]);s?(Pj.default(e.body)&&u&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[tu]=e.body):i?(u&&(r["content-type"]="application/x-www-form-urlencoded"),this[tu]=new Za.URLSearchParams(e.form).toString()):(u&&(r["content-type"]="application/json"),this[tu]=e.stringifyJson(e.json));let c=await Dle.default(this[tu],e.headers);K.default.undefined(r["content-length"])&&K.default.undefined(r["transfer-encoding"])&&!a&&!K.default.undefined(c)&&(r["content-length"]=String(c))}}else a?this._lockWrite():this._unlockWrite();this[tf]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:i}=r;this[Oj]=e,r.decompress&&(e=Sle(e));let n=e.statusCode,s=e;s.statusMessage=s.statusMessage?s.statusMessage:xj.STATUS_CODES[n],s.url=r.url.toString(),s.requestUrl=this.requestUrl,s.redirectUrls=this.redirects,s.request=this,s.isFromCache=e.fromCache||!1,s.ip=this.ip,s.retryCount=this.retryCount,this[Rj]=s.isFromCache,this[Zp]=Number(e.headers["content-length"])||void 0,this[e0]=e,e.once("end",()=>{this[Zp]=this[ef],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new Om(a,this))}),e.once("aborted",()=>{this._beforeError(new Om({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=e.headers["set-cookie"];if(K.default.object(r.cookieJar)&&o){let a=o.map(async u=>r.cookieJar.setCookie(u,i.toString()));r.ignoreInvalidCookies&&(a=a.map(async u=>u.catch(()=>{})));try{await Promise.all(a)}catch(u){this._beforeError(u);return}}if(r.followRedirect&&e.headers.location&&Ule.has(n)){if(e.resume(),this[Ir]&&(this[Dx](),delete this[Ir],this[kj]()),(n===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[tu]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new t0(this));return}try{let p=function(f){return f.protocol==="unix:"||f.hostname==="unix"},u=Buffer.from(e.headers.location,"binary").toString(),c=new Za.URL(u,i),l=c.toString();if(decodeURI(l),!p(i)&&p(c)){this._beforeError(new Vt("Cannot redirect to UNIX socket",{},this));return}c.hostname!==i.hostname||c.port!==i.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(c.username=r.username,c.password=r.password),this.redirects.push(l),r.url=c;for(let f of r.hooks.beforeRedirect)await f(r,s);this.emit("redirect",s,r),await this._makeRequest()}catch(u){this._beforeError(u);return}return}if(r.isStream&&r.throwHttpErrors&&!kle.isResponseOk(s)){this._beforeError(new r0(s));return}e.on("readable",()=>{this[Zb]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let a of this[Qb])if(!a.headersSent){for(let u in e.headers){let c=r.decompress?u!=="content-encoding":!0,l=e.headers[u];c&&a.setHeader(u,l)}a.statusCode=n}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:i,url:n}=r;Ile.default(e),this[Dx]=Lj.default(e,i,n);let s=r.cache?"cacheableResponse":"response";e.once(s,u=>{this._onResponse(u)}),e.once("error",u=>{var c;e.destroy(),(c=e.res)===null||c===void 0||c.removeAllListeners("end"),u=u instanceof Lj.TimeoutError?new s0(u,this.timings,this):new Vt(u.message,u,this),this._beforeError(u)}),this[kj]=Ple.default(e,this,qle),this[Ir]=e,this.emit("uploadProgress",this.uploadProgress);let o=this[tu],a=this.redirects.length===0?this:e;K.default.nodeStream(o)?(o.pipe(a),o.once("error",u=>{this._beforeError(new n0(u,this))})):(this._unlockWrite(),K.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(a.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),a.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((i,n)=>{Object.assign(r,Lle.default(e)),delete r.url;let s,o=Px.get(r.cache)(r,async a=>{a._readableState.autoDestroy=!1,s&&(await s).emit("cacheableResponse",a),i(a)});r.url=e,o.once("error",n),o.once("request",async a=>{s=a,i(s)})})}async _makeRequest(){var e,r,i,n,s;let{options:o}=this,{headers:a}=o;for(let w in a)if(K.default.undefined(a[w]))delete a[w];else if(K.default.null_(a[w]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${w}\` header`);if(o.decompress&&K.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=Ole?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){let w=await o.cookieJar.getCookieString(o.url.toString());K.default.nonEmptyString(w)&&(o.headers.cookie=w)}for(let w of o.hooks.beforeRequest){let T=await w(o);if(!K.default.undefined(T)){o.request=()=>T;break}}o.body&&this[tu]!==o.body&&(this[tu]=o.body);let{agent:u,request:c,timeout:l,url:p}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),p.hostname==="unix"){let w=/(?<socketPath>.+?):(?<path>.+)/.exec(`${p.pathname}${p.search}`);if(w?.groups){let{socketPath:T,path:U}=w.groups;Object.assign(o,{socketPath:T,path:U,host:""})}}let f=p.protocol==="https:",h;o.http2?h=Cle.auto:h=f?Ale.request:xj.request;let g=(e=o.request)!==null&&e!==void 0?e:h,H=o.cache?this._createCacheableRequest:g;u&&!o.http2&&(o.agent=u[f?"https":"http"]),o[Ir]=g,delete o.request,delete o.timeout;let v=o;if(v.shared=(r=o.cacheOptions)===null||r===void 0?void 0:r.shared,v.cacheHeuristic=(i=o.cacheOptions)===null||i===void 0?void 0:i.cacheHeuristic,v.immutableMinTimeToLive=(n=o.cacheOptions)===null||n===void 0?void 0:n.immutableMinTimeToLive,v.ignoreCargoCult=(s=o.cacheOptions)===null||s===void 0?void 0:s.ignoreCargoCult,o.dnsLookupIpVersion!==void 0)try{v.family=$j.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(v.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(v.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(v.ca=o.https.certificateAuthority),o.https.certificate&&(v.cert=o.https.certificate),o.https.key&&(v.key=o.https.key),o.https.passphrase&&(v.passphrase=o.https.passphrase),o.https.pfx&&(v.pfx=o.https.pfx));try{let w=await H(p,v);K.default.undefined(w)&&(w=h(p,v)),o.request=c,o.timeout=l,o.agent=u,o.https&&("rejectUnauthorized"in o.https&&delete v.rejectUnauthorized,o.https.checkServerIdentity&&delete v.checkServerIdentity,o.https.certificateAuthority&&delete v.ca,o.https.certificate&&delete v.cert,o.https.key&&delete v.key,o.https.passphrase&&delete v.passphrase,o.https.pfx&&delete v.pfx),Fle(w)?this._onRequest(w):this.writable?(this.once("finish",()=>{this._onResponse(w)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(w)}catch(w){throw w instanceof Dj.CacheError?new i0(w,this):new Vt(w.message,w,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new Vt(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[nf])return;let{options:r}=this,i=this.retryCount+1;this[nf]=!0,e instanceof Vt||(e=new Vt(e.message,e,this));let n=e,{response:s}=n;(async()=>{if(s&&!s.body){s.setEncoding(this._readableState.encoding);try{s.rawBody=await $le.default(s),s.body=s.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let o;try{let a;s&&"retry-after"in s.headers&&(a=Number(s.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(s.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3),o=await r.retry.calculateDelay({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:Mle.default({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:0})})}catch(a){this._error(new Vt(a.message,a,this));return}if(o){let a=async()=>{try{for(let u of this.options.hooks.beforeRetry)await u(this.options,n,i)}catch(u){this._error(new Vt(u.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",i,e))};this[Nj]=setTimeout(a,o);return}}this._error(n)})()}_read(){this[Zb]=!0;let e=this[e0];if(e&&!this[nf]){e.readableLength&&(this[Zb]=!1);let r;for(;(r=e.read())!==null;){this[ef]+=r.length,this[Mj]=!0;let i=this.downloadProgress;i.percent<1&&this.emit("downloadProgress",i),this.push(r)}}}_write(e,r,i){let n=()=>{this._writeRequest(e,r,i)};this.requestInitialized?n():this[Mm].push(n)}_writeRequest(e,r,i){this[Ir].destroyed||(this._progressCallbacks.push(()=>{this[rf]+=Buffer.byteLength(e,r);let n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}),this[Ir].write(e,r,n=>{!n&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),i(n)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(Ir in this)){e();return}if(this[Ir].destroyed){e();return}this[Ir].end(i=>{i||(this[tf]=this[rf],this.emit("uploadProgress",this.uploadProgress),this[Ir].emit("upload-complete")),e(i)})};this.requestInitialized?r():this[Mm].push(r)}_destroy(e,r){var i;this[nf]=!0,clearTimeout(this[Nj]),Ir in this&&(this[Dx](),!((i=this[e0])===null||i===void 0)&&i.complete||this[Ir].destroy()),e!==null&&!K.default.undefined(e)&&!(e instanceof Vt)&&(e=new Vt(e.message,e,this)),r(e)}get _isAboutToError(){return this[nf]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,i;return((r=(e=this[Ir])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((i=this[Oj])===null||i===void 0)&&i.complete)}get socket(){var e,r;return(r=(e=this[Ir])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[Zp]?e=this[ef]/this[Zp]:this[Zp]===this[ef]?e=1:e=0,{percent:e,transferred:this[ef],total:this[Zp]}}get uploadProgress(){let e;return this[tf]?e=this[rf]/this[tf]:this[tf]===this[rf]?e=1:e=0,{percent:e,transferred:this[rf],total:this[tf]}}get timings(){var e;return(e=this[Ir])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[Rj]}pipe(e,r){if(this[Mj])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof Cx.ServerResponse&&this[Qb].add(e),super.pipe(e,r)}unpipe(e){return e instanceof Cx.ServerResponse&&this[Qb].delete(e),super.unpipe(e),this}};Ve.default=a0});var Fm=b(Wn=>{"use strict";var Wle=Wn&&Wn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Vle=Wn&&Wn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wle(e,t,r)};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.CancelError=Wn.ParseError=void 0;var Fj=Nm(),Lx=class extends Fj.RequestError{constructor(e,r){let{options:i}=r.request;super(`${e.message} in "${i.url.toString()}"`,e,r.request),this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}};Wn.ParseError=Lx;var Tx=class extends Fj.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};Wn.CancelError=Tx;Vle(Nm(),Wn)});var Uj=b($x=>{"use strict";Object.defineProperty($x,"__esModule",{value:!0});var Bj=Fm(),Gle=(t,e,r,i)=>{let{rawBody:n}=t;try{if(e==="text")return n.toString(i);if(e==="json")return n.length===0?"":r(n.toString());if(e==="buffer")return n;throw new Bj.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new Bj.ParseError(s,t)}};$x.default=Gle});var kx=b(ru=>{"use strict";var Kle=ru&&ru.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),zle=ru&&ru.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Kle(e,t,r)};Object.defineProperty(ru,"__esModule",{value:!0});var Xle=require("events"),Jle=So(),Yle=U3(),u0=Fm(),jj=Uj(),qj=Nm(),Qle=gx(),Zle=Ax(),Wj=Ix(),epe=["request","response","redirect","uploadProgress","downloadProgress"];function Vj(t){let e,r,i=new Xle.EventEmitter,n=new Yle((o,a,u)=>{let c=l=>{let p=new qj.default(void 0,t);p.retryCount=l,p._noPipe=!0,u(()=>p.destroy()),u.shouldReject=!1,u(()=>a(new u0.CancelError(p))),e=p,p.once("response",async g=>{var H;if(g.retryCount=l,g.request.aborted)return;let v;try{v=await Zle.default(p),g.rawBody=v}catch{return}if(p._isAboutToError)return;let w=((H=g.headers["content-encoding"])!==null&&H!==void 0?H:"").toLowerCase(),T=["gzip","deflate","br"].includes(w),{options:U}=p;if(T&&!U.decompress)g.body=v;else try{g.body=jj.default(g,U.responseType,U.parseJson,U.encoding)}catch(x){if(g.body=v.toString(),Wj.isResponseOk(g)){p._beforeError(x);return}}try{for(let[x,P]of U.hooks.afterResponse.entries())g=await P(g,async q=>{let j=qj.default.normalizeArguments(void 0,{...q,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},U);j.hooks.afterResponse=j.hooks.afterResponse.slice(0,x);for(let $ of j.hooks.beforeRetry)await $(j);let F=Vj(j);return u(()=>{F.catch(()=>{}),F.cancel()}),F})}catch(x){p._beforeError(new u0.RequestError(x.message,x,p));return}if(r=g,!Wj.isResponseOk(g)){p._beforeError(new u0.HTTPError(g));return}p.destroy(),o(p.options.resolveBodyOnly?g.body:g)});let f=g=>{if(n.isCanceled)return;let{options:H}=p;if(g instanceof u0.HTTPError&&!H.throwHttpErrors){let{response:v}=g;o(p.options.resolveBodyOnly?v.body:v);return}a(g)};p.once("error",f);let h=p.options.body;p.once("retry",(g,H)=>{var v,w;if(h===((v=H.request)===null||v===void 0?void 0:v.options.body)&&Jle.default.nodeStream((w=H.request)===null||w===void 0?void 0:w.options.body)){f(H);return}c(g)}),Qle.default(p,i,epe)};c(0)});n.on=(o,a)=>(i.on(o,a),n);let s=o=>{let a=(async()=>{await n;let{options:u}=r.request;return jj.default(r,o,u.parseJson,u.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)),a};return n.json=()=>{let{headers:o}=e.options;return!e.writableFinished&&o.accept===void 0&&(o.accept="application/json"),s("json")},n.buffer=()=>s("buffer"),n.text=()=>s("text"),n}ru.default=Vj;zle(Fm(),ru)});var Gj=b(Rx=>{"use strict";Object.defineProperty(Rx,"__esModule",{value:!0});var tpe=Fm();function rpe(t,...e){let r=(async()=>{if(t instanceof tpe.RequestError)try{for(let n of e)if(n)for(let s of n)t=await s(t)}catch(n){t=n}throw t})(),i=()=>r;return r.json=i,r.text=i,r.buffer=i,r.on=i,r}Rx.default=rpe});var Xj=b(Mx=>{"use strict";Object.defineProperty(Mx,"__esModule",{value:!0});var Kj=So();function zj(t){for(let e of Object.values(t))(Kj.default.plainObject(e)||Kj.default.array(e))&&zj(e);return Object.freeze(t)}Mx.default=zj});var Yj=b(Jj=>{"use strict";Object.defineProperty(Jj,"__esModule",{value:!0})});var Ox=b(gn=>{"use strict";var ipe=gn&&gn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),npe=gn&&gn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ipe(e,t,r)};Object.defineProperty(gn,"__esModule",{value:!0});gn.defaultHandler=void 0;var Qj=So(),mn=kx(),spe=Gj(),l0=Nm(),ope=Xj(),ape={RequestError:mn.RequestError,CacheError:mn.CacheError,ReadError:mn.ReadError,HTTPError:mn.HTTPError,MaxRedirectsError:mn.MaxRedirectsError,TimeoutError:mn.TimeoutError,ParseError:mn.ParseError,CancelError:mn.CancelError,UnsupportedProtocolError:mn.UnsupportedProtocolError,UploadError:mn.UploadError},upe=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:c0}=l0.default,Zj=(...t)=>{let e;for(let r of t)e=c0(void 0,r,e);return e},cpe=t=>t.isStream?new l0.default(void 0,t):mn.default(t),lpe=t=>"defaults"in t&&"options"in t.defaults,ppe=["get","post","put","patch","head","delete"];gn.defaultHandler=(t,e)=>e(t);var e8=(t,e)=>{if(t)for(let r of t)r(e)},t8=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(i=>(n,s)=>{let o,a=i(n,u=>(o=s(u),o));if(a!==o&&!n.isStream&&o){let u=a,{then:c,catch:l,finally:p}=u;Object.setPrototypeOf(u,Object.getPrototypeOf(o)),Object.defineProperties(u,Object.getOwnPropertyDescriptors(o)),u.then=c,u.catch=l,u.finally=p}return a});let e=(i,n={},s)=>{var o,a;let u=0,c=l=>t.handlers[u++](l,u===t.handlers.length?cpe:c);if(Qj.default.plainObject(i)){let l={...i,...n};l0.setNonEnumerableProperties([i,n],l),n=l,i=void 0}try{let l;try{e8(t.options.hooks.init,n),e8((o=n.hooks)===null||o===void 0?void 0:o.init,n)}catch(f){l=f}let p=c0(i,n,s??t.options);if(p[l0.kIsNormalizedAlready]=!0,l)throw new mn.RequestError(l.message,l,p);return c(p)}catch(l){if(n.isStream)throw l;return spe.default(l,t.options.hooks.beforeError,(a=n.hooks)===null||a===void 0?void 0:a.beforeError)}};e.extend=(...i)=>{let n=[t.options],s=[...t._rawHandlers],o;for(let a of i)lpe(a)?(n.push(a.defaults.options),s.push(...a.defaults._rawHandlers),o=a.defaults.mutableDefaults):(n.push(a),"handlers"in a&&s.push(...a.handlers),o=a.mutableDefaults);return s=s.filter(a=>a!==gn.defaultHandler),s.length===0&&s.push(gn.defaultHandler),t8({options:Zj(...n),handlers:s,mutableDefaults:Boolean(o)})};let r=async function*(i,n){let s=c0(i,n,t.options);s.resolveBodyOnly=!1;let o=s.pagination;if(!Qj.default.object(o))throw new TypeError("`options.pagination` must be implemented");let a=[],{countLimit:u}=o,c=0;for(;c<o.requestLimit;){c!==0&&await upe(o.backoff);let l=await e(void 0,void 0,s),p=await o.transform(l),f=[];for(let g of p)if(o.filter(g,a,f)&&(!o.shouldContinue(g,a,f)||(yield g,o.stackAllItems&&a.push(g),f.push(g),--u<=0)))return;let h=o.paginate(l,a,f);if(h===!1)return;h===l.request.options?s=l.request.options:h!==void 0&&(s=c0(void 0,h,s)),c++}};e.paginate=r,e.paginate.all=async(i,n)=>{let s=[];for await(let o of r(i,n))s.push(o);return s},e.paginate.each=r,e.stream=(i,n)=>e(i,{...n,isStream:!0});for(let i of ppe)e[i]=(n,s)=>e(n,{...s,method:i}),e.stream[i]=(n,s)=>e(n,{...s,method:i,isStream:!0});return Object.assign(e,ape),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:ope.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=Zj,e};gn.default=t8;npe(Yj(),gn)});var n8=b((Co,p0)=>{"use strict";var fpe=Co&&Co.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),r8=Co&&Co.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fpe(e,t,r)};Object.defineProperty(Co,"__esModule",{value:!0});var dpe=require("url"),i8=Ox(),hpe={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let i of e){let n=i.split(";");if(n[1].includes("next")){r=n[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new dpe.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[i8.defaultHandler],mutableDefaults:!1},Nx=i8.default(hpe);Co.default=Nx;p0.exports=Nx;p0.exports.default=Nx;p0.exports.__esModule=!0;r8(Ox(),Co);r8(kx(),Co)});var d8=b((hMe,d0)=>{var sr=function(t){"use strict";var e=1e7,r=7,i=9007199254740992,n=f(i),s="0123456789abcdefghijklmnopqrstuvwxyz",o=typeof BigInt=="function";function a(d,y,_,I){return typeof d>"u"?a[0]:typeof y<"u"?+y==10&&!_?_e(d):Ct(d,y,_,I):_e(d)}function u(d,y){this.value=d,this.sign=y,this.isSmall=!1}u.prototype=Object.create(a.prototype);function c(d){this.value=d,this.sign=d<0,this.isSmall=!0}c.prototype=Object.create(a.prototype);function l(d){this.value=d}l.prototype=Object.create(a.prototype);function p(d){return-i<d&&d<i}function f(d){return d<1e7?[d]:d<1e14?[d%1e7,Math.floor(d/1e7)]:[d%1e7,Math.floor(d/1e7)%1e7,Math.floor(d/1e14)]}function h(d){g(d);var y=d.length;if(y<4&&re(d,n)<0)switch(y){case 0:return 0;case 1:return d[0];case 2:return d[0]+d[1]*e;default:return d[0]+(d[1]+d[2]*e)*e}return d}function g(d){for(var y=d.length;d[--y]===0;);d.length=y+1}function H(d){for(var y=new Array(d),_=-1;++_<d;)y[_]=0;return y}function v(d){return d>0?Math.floor(d):Math.ceil(d)}function w(d,y){var _=d.length,I=y.length,R=new Array(_),B=0,V=e,G,W;for(W=0;W<I;W++)G=d[W]+y[W]+B,B=G>=V?1:0,R[W]=G-B*V;for(;W<_;)G=d[W]+B,B=G===V?1:0,R[W++]=G-B*V;return B>0&&R.push(B),R}function T(d,y){return d.length>=y.length?w(d,y):w(y,d)}function U(d,y){var _=d.length,I=new Array(_),R=e,B,V;for(V=0;V<_;V++)B=d[V]-R+y,y=Math.floor(B/R),I[V]=B-y*R,y+=1;for(;y>0;)I[V++]=y%R,y=Math.floor(y/R);return I}u.prototype.add=function(d){var y=_e(d);if(this.sign!==y.sign)return this.subtract(y.negate());var _=this.value,I=y.value;return y.isSmall?new u(U(_,Math.abs(I)),this.sign):new u(T(_,I),this.sign)},u.prototype.plus=u.prototype.add,c.prototype.add=function(d){var y=_e(d),_=this.value;if(_<0!==y.sign)return this.subtract(y.negate());var I=y.value;if(y.isSmall){if(p(_+I))return new c(_+I);I=f(Math.abs(I))}return new u(U(I,Math.abs(_)),_<0)},c.prototype.plus=c.prototype.add,l.prototype.add=function(d){return new l(this.value+_e(d).value)},l.prototype.plus=l.prototype.add;function x(d,y){var _=d.length,I=y.length,R=new Array(_),B=0,V=e,G,W;for(G=0;G<I;G++)W=d[G]-B-y[G],W<0?(W+=V,B=1):B=0,R[G]=W;for(G=I;G<_;G++){if(W=d[G]-B,W<0)W+=V;else{R[G++]=W;break}R[G]=W}for(;G<_;G++)R[G]=d[G];return g(R),R}function P(d,y,_){var I;return re(d,y)>=0?I=x(d,y):(I=x(y,d),_=!_),I=h(I),typeof I=="number"?(_&&(I=-I),new c(I)):new u(I,_)}function q(d,y,_){var I=d.length,R=new Array(I),B=-y,V=e,G,W;for(G=0;G<I;G++)W=d[G]+B,B=Math.floor(W/V),W%=V,R[G]=W<0?W+V:W;return R=h(R),typeof R=="number"?(_&&(R=-R),new c(R)):new u(R,_)}u.prototype.subtract=function(d){var y=_e(d);if(this.sign!==y.sign)return this.add(y.negate());var _=this.value,I=y.value;return y.isSmall?q(_,Math.abs(I),this.sign):P(_,I,this.sign)},u.prototype.minus=u.prototype.subtract,c.prototype.subtract=function(d){var y=_e(d),_=this.value;if(_<0!==y.sign)return this.add(y.negate());var I=y.value;return y.isSmall?new c(_-I):q(I,Math.abs(_),_>=0)},c.prototype.minus=c.prototype.subtract,l.prototype.subtract=function(d){return new l(this.value-_e(d).value)},l.prototype.minus=l.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},c.prototype.negate=function(){var d=this.sign,y=new c(-this.value);return y.sign=!d,y},l.prototype.negate=function(){return new l(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},l.prototype.abs=function(){return new l(this.value>=0?this.value:-this.value)};function j(d,y){var _=d.length,I=y.length,R=_+I,B=H(R),V=e,G,W,ue,de,ye;for(ue=0;ue<_;++ue){de=d[ue];for(var Ne=0;Ne<I;++Ne)ye=y[Ne],G=de*ye+B[ue+Ne],W=Math.floor(G/V),B[ue+Ne]=G-W*V,B[ue+Ne+1]+=W}return g(B),B}function F(d,y){var _=d.length,I=new Array(_),R=e,B=0,V,G;for(G=0;G<_;G++)V=d[G]*y+B,B=Math.floor(V/R),I[G]=V-B*R;for(;B>0;)I[G++]=B%R,B=Math.floor(B/R);return I}function $(d,y){for(var _=[];y-- >0;)_.push(0);return _.concat(d)}function O(d,y){var _=Math.max(d.length,y.length);if(_<=30)return j(d,y);_=Math.ceil(_/2);var I=d.slice(_),R=d.slice(0,_),B=y.slice(_),V=y.slice(0,_),G=O(R,V),W=O(I,B),ue=O(T(R,I),T(V,B)),de=T(T(G,$(x(x(ue,G),W),_)),$(W,2*_));return g(de),de}function E(d,y){return-.012*d-.012*y+15e-6*d*y>0}u.prototype.multiply=function(d){var y=_e(d),_=this.value,I=y.value,R=this.sign!==y.sign,B;if(y.isSmall){if(I===0)return a[0];if(I===1)return this;if(I===-1)return this.negate();if(B=Math.abs(I),B<e)return new u(F(_,B),R);I=f(B)}return E(_.length,I.length)?new u(O(_,I),R):new u(j(_,I),R)},u.prototype.times=u.prototype.multiply;function M(d,y,_){return d<e?new u(F(y,d),_):new u(j(y,f(d)),_)}c.prototype._multiplyBySmall=function(d){return p(d.value*this.value)?new c(d.value*this.value):M(Math.abs(d.value),f(Math.abs(this.value)),this.sign!==d.sign)},u.prototype._multiplyBySmall=function(d){return d.value===0?a[0]:d.value===1?this:d.value===-1?this.negate():M(Math.abs(d.value),this.value,this.sign!==d.sign)},c.prototype.multiply=function(d){return _e(d)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,l.prototype.multiply=function(d){return new l(this.value*_e(d).value)},l.prototype.times=l.prototype.multiply;function N(d){var y=d.length,_=H(y+y),I=e,R,B,V,G,W;for(V=0;V<y;V++){G=d[V],B=0-G*G;for(var ue=V;ue<y;ue++)W=d[ue],R=2*(G*W)+_[V+ue]+B,B=Math.floor(R/I),_[V+ue]=R-B*I;_[V+y]=B}return g(_),_}u.prototype.square=function(){return new u(N(this.value),!1)},c.prototype.square=function(){var d=this.value*this.value;return p(d)?new c(d):new u(N(f(Math.abs(this.value))),!1)},l.prototype.square=function(d){return new l(this.value*this.value)};function z(d,y){var _=d.length,I=y.length,R=e,B=H(y.length),V=y[I-1],G=Math.ceil(R/(2*V)),W=F(d,G),ue=F(y,G),de,ye,Ne,Ci,ui,AA,IA;for(W.length<=_&&W.push(0),ue.push(0),V=ue[I-1],ye=_-I;ye>=0;ye--){for(de=R-1,W[ye+I]!==V&&(de=Math.floor((W[ye+I]*R+W[ye+I-1])/V)),Ne=0,Ci=0,AA=ue.length,ui=0;ui<AA;ui++)Ne+=de*ue[ui],IA=Math.floor(Ne/R),Ci+=W[ye+ui]-(Ne-IA*R),Ne=IA,Ci<0?(W[ye+ui]=Ci+R,Ci=-1):(W[ye+ui]=Ci,Ci=0);for(;Ci!==0;){for(de-=1,Ne=0,ui=0;ui<AA;ui++)Ne+=W[ye+ui]-R+ue[ui],Ne<0?(W[ye+ui]=Ne+R,Ne=0):(W[ye+ui]=Ne,Ne=1);Ci+=Ne}B[ye]=de}return W=L(W,G)[0],[h(B),h(W)]}function D(d,y){for(var _=d.length,I=y.length,R=[],B=[],V=e,G,W,ue,de,ye;_;){if(B.unshift(d[--_]),g(B),re(B,y)<0){R.push(0);continue}W=B.length,ue=B[W-1]*V+B[W-2],de=y[I-1]*V+y[I-2],W>I&&(ue=(ue+1)*V),G=Math.ceil(ue/de);do{if(ye=F(y,G),re(ye,B)<=0)break;G--}while(G);R.push(G),B=x(B,ye)}return R.reverse(),[h(R),h(B)]}function L(d,y){var _=d.length,I=H(_),R=e,B,V,G,W;for(G=0,B=_-1;B>=0;--B)W=G*R+d[B],V=v(W/y),G=W-V*y,I[B]=V|0;return[I,G|0]}function ee(d,y){var _,I=_e(y);if(o)return[new l(d.value/I.value),new l(d.value%I.value)];var R=d.value,B=I.value,V;if(B===0)throw new Error("Cannot divide by zero");if(d.isSmall)return I.isSmall?[new c(v(R/B)),new c(R%B)]:[a[0],d];if(I.isSmall){if(B===1)return[d,a[0]];if(B==-1)return[d.negate(),a[0]];var G=Math.abs(B);if(G<e){_=L(R,G),V=h(_[0]);var W=_[1];return d.sign&&(W=-W),typeof V=="number"?(d.sign!==I.sign&&(V=-V),[new c(V),new c(W)]):[new u(V,d.sign!==I.sign),new c(W)]}B=f(G)}var ue=re(R,B);if(ue===-1)return[a[0],d];if(ue===0)return[a[d.sign===I.sign?1:-1],a[0]];R.length+B.length<=200?_=z(R,B):_=D(R,B),V=_[0];var de=d.sign!==I.sign,ye=_[1],Ne=d.sign;return typeof V=="number"?(de&&(V=-V),V=new c(V)):V=new u(V,de),typeof ye=="number"?(Ne&&(ye=-ye),ye=new c(ye)):ye=new u(ye,Ne),[V,ye]}u.prototype.divmod=function(d){var y=ee(this,d);return{quotient:y[0],remainder:y[1]}},l.prototype.divmod=c.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(d){return ee(this,d)[0]},l.prototype.over=l.prototype.divide=function(d){return new l(this.value/_e(d).value)},c.prototype.over=c.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(d){return ee(this,d)[1]},l.prototype.mod=l.prototype.remainder=function(d){return new l(this.value%_e(d).value)},c.prototype.remainder=c.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(d){var y=_e(d),_=this.value,I=y.value,R,B,V;if(I===0)return a[1];if(_===0)return a[0];if(_===1)return a[1];if(_===-1)return y.isEven()?a[1]:a[-1];if(y.sign)return a[0];if(!y.isSmall)throw new Error("The exponent "+y.toString()+" is too large.");if(this.isSmall&&p(R=Math.pow(_,I)))return new c(v(R));for(B=this,V=a[1];I&!0&&(V=V.times(B),--I),I!==0;)I/=2,B=B.square();return V},c.prototype.pow=u.prototype.pow,l.prototype.pow=function(d){var y=_e(d),_=this.value,I=y.value,R=BigInt(0),B=BigInt(1),V=BigInt(2);if(I===R)return a[1];if(_===R)return a[0];if(_===B)return a[1];if(_===BigInt(-1))return y.isEven()?a[1]:a[-1];if(y.isNegative())return new l(R);for(var G=this,W=a[1];(I&B)===B&&(W=W.times(G),--I),I!==R;)I/=V,G=G.square();return W},u.prototype.modPow=function(d,y){if(d=_e(d),y=_e(y),y.isZero())throw new Error("Cannot take modPow with modulus 0");var _=a[1],I=this.mod(y);for(d.isNegative()&&(d=d.multiply(a[-1]),I=I.modInv(y));d.isPositive();){if(I.isZero())return a[0];d.isOdd()&&(_=_.multiply(I).mod(y)),d=d.divide(2),I=I.square().mod(y)}return _},l.prototype.modPow=c.prototype.modPow=u.prototype.modPow;function re(d,y){if(d.length!==y.length)return d.length>y.length?1:-1;for(var _=d.length-1;_>=0;_--)if(d[_]!==y[_])return d[_]>y[_]?1:-1;return 0}u.prototype.compareAbs=function(d){var y=_e(d),_=this.value,I=y.value;return y.isSmall?1:re(_,I)},c.prototype.compareAbs=function(d){var y=_e(d),_=Math.abs(this.value),I=y.value;return y.isSmall?(I=Math.abs(I),_===I?0:_>I?1:-1):-1},l.prototype.compareAbs=function(d){var y=this.value,_=_e(d).value;return y=y>=0?y:-y,_=_>=0?_:-_,y===_?0:y>_?1:-1},u.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var y=_e(d),_=this.value,I=y.value;return this.sign!==y.sign?y.sign?1:-1:y.isSmall?this.sign?-1:1:re(_,I)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,c.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var y=_e(d),_=this.value,I=y.value;return y.isSmall?_==I?0:_>I?1:-1:_<0!==y.sign?_<0?-1:1:_<0?1:-1},c.prototype.compareTo=c.prototype.compare,l.prototype.compare=function(d){if(d===1/0)return-1;if(d===-1/0)return 1;var y=this.value,_=_e(d).value;return y===_?0:y>_?1:-1},l.prototype.compareTo=l.prototype.compare,u.prototype.equals=function(d){return this.compare(d)===0},l.prototype.eq=l.prototype.equals=c.prototype.eq=c.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(d){return this.compare(d)!==0},l.prototype.neq=l.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(d){return this.compare(d)>0},l.prototype.gt=l.prototype.greater=c.prototype.gt=c.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(d){return this.compare(d)<0},l.prototype.lt=l.prototype.lesser=c.prototype.lt=c.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(d){return this.compare(d)>=0},l.prototype.geq=l.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(d){return this.compare(d)<=0},l.prototype.leq=l.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(this.value[0]&1)===0},c.prototype.isEven=function(){return(this.value&1)===0},l.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return(this.value[0]&1)===1},c.prototype.isOdd=function(){return(this.value&1)===1},l.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},l.prototype.isPositive=c.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},l.prototype.isNegative=c.prototype.isNegative,u.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return Math.abs(this.value)===1},l.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return this.value===0},l.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(d){var y=_e(d);return y.isZero()?!1:y.isUnit()?!0:y.compareAbs(2)===0?this.isEven():this.mod(y).isZero()},l.prototype.isDivisibleBy=c.prototype.isDivisibleBy=u.prototype.isDivisibleBy;function ie(d){var y=d.abs();if(y.isUnit())return!1;if(y.equals(2)||y.equals(3)||y.equals(5))return!0;if(y.isEven()||y.isDivisibleBy(3)||y.isDivisibleBy(5))return!1;if(y.lesser(49))return!0}function J(d,y){for(var _=d.prev(),I=_,R=0,B,V,G,W;I.isEven();)I=I.divide(2),R++;e:for(G=0;G<y.length;G++)if(!d.lesser(y[G])&&(W=sr(y[G]).modPow(I,d),!(W.isUnit()||W.equals(_)))){for(B=R-1;B!=0;B--){if(W=W.square().mod(d),W.isUnit())return!1;if(W.equals(_))continue e}return!1}return!0}u.prototype.isPrime=function(d){var y=ie(this);if(y!==t)return y;var _=this.abs(),I=_.bitLength();if(I<=64)return J(_,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var R=Math.log(2)*I.toJSNumber(),B=Math.ceil(d===!0?2*Math.pow(R,2):R),V=[],G=0;G<B;G++)V.push(sr(G+2));return J(_,V)},l.prototype.isPrime=c.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(d,y){var _=ie(this);if(_!==t)return _;for(var I=this.abs(),R=d===t?5:d,B=[],V=0;V<R;V++)B.push(sr.randBetween(2,I.minus(2),y));return J(I,B)},l.prototype.isProbablePrime=c.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(d){for(var y=sr.zero,_=sr.one,I=_e(d),R=this.abs(),B,V,G;!R.isZero();)B=I.divide(R),V=y,G=I,y=_,I=R,_=V.subtract(B.multiply(_)),R=G.subtract(B.multiply(R));if(!I.isUnit())throw new Error(this.toString()+" and "+d.toString()+" are not co-prime");return y.compare(0)===-1&&(y=y.add(d)),this.isNegative()?y.negate():y},l.prototype.modInv=c.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var d=this.value;return this.sign?q(d,1,this.sign):new u(U(d,1),this.sign)},c.prototype.next=function(){var d=this.value;return d+1<i?new c(d+1):new u(n,!1)},l.prototype.next=function(){return new l(this.value+BigInt(1))},u.prototype.prev=function(){var d=this.value;return this.sign?new u(U(d,1),!0):q(d,1,this.sign)},c.prototype.prev=function(){var d=this.value;return d-1>-i?new c(d-1):new u(n,!0)},l.prototype.prev=function(){return new l(this.value-BigInt(1))};for(var te=[1];2*te[te.length-1]<=e;)te.push(2*te[te.length-1]);var ce=te.length,ae=te[ce-1];function he(d){return Math.abs(d)<=e}u.prototype.shiftLeft=function(d){var y=_e(d).toJSNumber();if(!he(y))throw new Error(String(y)+" is too large for shifting.");if(y<0)return this.shiftRight(-y);var _=this;if(_.isZero())return _;for(;y>=ce;)_=_.multiply(ae),y-=ce-1;return _.multiply(te[y])},l.prototype.shiftLeft=c.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(d){var y,_=_e(d).toJSNumber();if(!he(_))throw new Error(String(_)+" is too large for shifting.");if(_<0)return this.shiftLeft(-_);for(var I=this;_>=ce;){if(I.isZero()||I.isNegative()&&I.isUnit())return I;y=ee(I,ae),I=y[1].isNegative()?y[0].prev():y[0],_-=ce-1}return y=ee(I,te[_]),y[1].isNegative()?y[0].prev():y[0]},l.prototype.shiftRight=c.prototype.shiftRight=u.prototype.shiftRight;function dt(d,y,_){y=_e(y);for(var I=d.isNegative(),R=y.isNegative(),B=I?d.not():d,V=R?y.not():y,G=0,W=0,ue=null,de=null,ye=[];!B.isZero()||!V.isZero();)ue=ee(B,ae),G=ue[1].toJSNumber(),I&&(G=ae-1-G),de=ee(V,ae),W=de[1].toJSNumber(),R&&(W=ae-1-W),B=ue[0],V=de[0],ye.push(_(G,W));for(var Ne=_(I?1:0,R?1:0)!==0?sr(-1):sr(0),Ci=ye.length-1;Ci>=0;Ci-=1)Ne=Ne.multiply(ae).add(sr(ye[Ci]));return Ne}u.prototype.not=function(){return this.negate().prev()},l.prototype.not=c.prototype.not=u.prototype.not,u.prototype.and=function(d){return dt(this,d,function(y,_){return y&_})},l.prototype.and=c.prototype.and=u.prototype.and,u.prototype.or=function(d){return dt(this,d,function(y,_){return y|_})},l.prototype.or=c.prototype.or=u.prototype.or,u.prototype.xor=function(d){return dt(this,d,function(y,_){return y^_})},l.prototype.xor=c.prototype.xor=u.prototype.xor;var ge=1<<30,Gt=(e&-e)*(e&-e)|ge;function kr(d){var y=d.value,_=typeof y=="number"?y|ge:typeof y=="bigint"?y|BigInt(ge):y[0]+y[1]*e|Gt;return _&-_}function Z(d,y){if(y.compareTo(d)<=0){var _=Z(d,y.square(y)),I=_.p,R=_.e,B=I.multiply(y);return B.compareTo(d)<=0?{p:B,e:R*2+1}:{p:I,e:R*2}}return{p:sr(1),e:0}}u.prototype.bitLength=function(){var d=this;return d.compareTo(sr(0))<0&&(d=d.negate().subtract(sr(1))),d.compareTo(sr(0))===0?sr(0):sr(Z(d,sr(2)).e).add(sr(1))},l.prototype.bitLength=c.prototype.bitLength=u.prototype.bitLength;function Ae(d,y){return d=_e(d),y=_e(y),d.greater(y)?d:y}function Q(d,y){return d=_e(d),y=_e(y),d.lesser(y)?d:y}function be(d,y){if(d=_e(d).abs(),y=_e(y).abs(),d.equals(y))return d;if(d.isZero())return y;if(y.isZero())return d;for(var _=a[1],I,R;d.isEven()&&y.isEven();)I=Q(kr(d),kr(y)),d=d.divide(I),y=y.divide(I),_=_.multiply(I);for(;d.isEven();)d=d.divide(kr(d));do{for(;y.isEven();)y=y.divide(kr(y));d.greater(y)&&(R=y,y=d,d=R),y=y.subtract(d)}while(!y.isZero());return _.isUnit()?d:d.multiply(_)}function Ge(d,y){return d=_e(d).abs(),y=_e(y).abs(),d.divide(be(d,y)).multiply(y)}function wt(d,y,_){d=_e(d),y=_e(y);var I=_||Math.random,R=Q(d,y),B=Ae(d,y),V=B.subtract(R).add(1);if(V.isSmall)return R.add(Math.floor(I()*V));for(var G=ju(V,e).value,W=[],ue=!0,de=0;de<G.length;de++){var ye=ue?G[de]:e,Ne=v(I()*ye);W.push(Ne),Ne<ye&&(ue=!1)}return R.add(a.fromArray(W,e,!1))}var Ct=function(d,y,_,I){_=_||s,d=String(d),I||(d=d.toLowerCase(),_=_.toLowerCase());var R=d.length,B,V=Math.abs(y),G={};for(B=0;B<_.length;B++)G[_[B]]=B;for(B=0;B<R;B++){var W=d[B];if(W!=="-"&&W in G&&G[W]>=V){if(W==="1"&&V===1)continue;throw new Error(W+" is not a valid digit in base "+y+".")}}y=_e(y);var ue=[],de=d[0]==="-";for(B=de?1:0;B<d.length;B++){var W=d[B];if(W in G)ue.push(_e(G[W]));else if(W==="<"){var ye=B;do B++;while(d[B]!==">"&&B<d.length);ue.push(_e(d.slice(ye+1,B)))}else throw new Error(W+" is not a valid character")}return aa(ue,y,de)};function aa(d,y,_){var I=a[0],R=a[1],B;for(B=d.length-1;B>=0;B--)I=I.add(d[B].times(R)),R=R.times(y);return _?I.negate():I}function ua(d,y){return y=y||s,d<y.length?y[d]:"<"+d+">"}function ju(d,y){if(y=sr(y),y.isZero()){if(d.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(y.equals(-1)){if(d.isZero())return{value:[0],isNegative:!1};if(d.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-d.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var _=Array.apply(null,Array(d.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return _.unshift([1]),{value:[].concat.apply([],_),isNegative:!1}}var I=!1;if(d.isNegative()&&y.isPositive()&&(I=!0,d=d.abs()),y.isUnit())return d.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(d.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:I};for(var R=[],B=d,V;B.isNegative()||B.compareAbs(y)>=0;){V=B.divmod(y),B=V.quotient;var G=V.remainder;G.isNegative()&&(G=y.minus(G).abs(),B=B.next()),R.push(G.toJSNumber())}return R.push(B.toJSNumber()),{value:R.reverse(),isNegative:I}}function gl(d,y,_){var I=ju(d,y);return(I.isNegative?"-":"")+I.value.map(function(R){return ua(R,_)}).join("")}u.prototype.toArray=function(d){return ju(this,d)},c.prototype.toArray=function(d){return ju(this,d)},l.prototype.toArray=function(d){return ju(this,d)},u.prototype.toString=function(d,y){if(d===t&&(d=10),d!==10)return gl(this,d,y);for(var _=this.value,I=_.length,R=String(_[--I]),B="0000000",V;--I>=0;)V=String(_[I]),R+=B.slice(V.length)+V;var G=this.sign?"-":"";return G+R},c.prototype.toString=function(d,y){return d===t&&(d=10),d!=10?gl(this,d,y):String(this.value)},l.prototype.toString=c.prototype.toString,l.prototype.toJSON=u.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,l.prototype.valueOf=l.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function HH(d){if(p(+d)){var y=+d;if(y===v(y))return o?new l(BigInt(y)):new c(y);throw new Error("Invalid integer: "+d)}var _=d[0]==="-";_&&(d=d.slice(1));var I=d.split(/e/i);if(I.length>2)throw new Error("Invalid integer: "+I.join("e"));if(I.length===2){var R=I[1];if(R[0]==="+"&&(R=R.slice(1)),R=+R,R!==v(R)||!p(R))throw new Error("Invalid integer: "+R+" is not a valid exponent.");var B=I[0],V=B.indexOf(".");if(V>=0&&(R-=B.length-V-1,B=B.slice(0,V)+B.slice(V+1)),R<0)throw new Error("Cannot include negative exponent part for integers");B+=new Array(R+1).join("0"),d=B}var G=/^([0-9][0-9]*)$/.test(d);if(!G)throw new Error("Invalid integer: "+d);if(o)return new l(BigInt(_?"-"+d:d));for(var W=[],ue=d.length,de=r,ye=ue-de;ue>0;)W.push(+d.slice(ye,ue)),ye-=de,ye<0&&(ye=0),ue-=de;return g(W),new u(W,_)}function _A(d){if(o)return new l(BigInt(d));if(p(d)){if(d!==v(d))throw new Error(d+" is not an integer.");return new c(d)}return HH(d.toString())}function _e(d){return typeof d=="number"?_A(d):typeof d=="string"?HH(d):typeof d=="bigint"?new l(d):d}for(var Dn=0;Dn<1e3;Dn++)a[Dn]=_e(Dn),Dn>0&&(a[-Dn]=_e(-Dn));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=Ae,a.min=Q,a.gcd=be,a.lcm=Ge,a.isInstance=function(d){return d instanceof u||d instanceof c||d instanceof l},a.randBetween=wt,a.fromArray=function(d,y,_){return aa(d.map(_e),_e(y||10),_)},a}();typeof d0<"u"&&d0.hasOwnProperty("exports")&&(d0.exports=sr);typeof define=="function"&&define.amd&&define(function(){return sr})});var h8=b(or=>{"use strict";var ype=require("fs"),vpe=d8(),ou=!1;or.maxObjectSize=100*1e3*1e3;or.maxObjectCount=32768;var bpe=9783072e5,wpe=or.UID=function(t){this.UID=t},mMe=or.parseFile=function(t,e){function r(i){var n=null,s;try{s=_pe(i)}catch(o){n=o}e(n,s)}if(Buffer.isBuffer(t))return r(t);ype.readFile(t,function(i,n){if(i)return e(i);r(n)})},_pe=or.parseBuffer=function(t){var e={},r=t.slice(0,6).toString("utf8");if(r!=="bplist")throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");var i=t.slice(t.length-32,t.length),n=i.readUInt8(6);ou&&console.log("offsetSize: "+n);var s=i.readUInt8(7);ou&&console.log("objectRefSize: "+s);var o=Fx(i,8);ou&&console.log("numObjects: "+o);var a=Fx(i,16);ou&&console.log("topObject: "+a);var u=Fx(i,24);if(ou&&console.log("offsetTableOffset: "+u),o>or.maxObjectCount)throw new Error("maxObjectCount exceeded");for(var c=[],l=0;l<o;l++){var p=t.slice(u+l*n,u+(l+1)*n);c[l]=_i(p,0),ou&&console.log("Offset for Object #"+l+" is "+c[l]+" ["+c[l].toString(16)+"]")}function f(h){var g=c[h],H=t[g],v=(H&240)>>4,w=H&15;switch(v){case 0:return T();case 1:return x();case 8:return P();case 2:return q();case 3:return j();case 4:return F();case 5:return $();case 6:return $(!0);case 10:return O();case 13:return E();default:throw new Error("Unhandled type 0x"+v.toString(16))}function T(){switch(w){case 0:return null;case 8:return!1;case 9:return!0;case 15:return null;default:throw new Error("Unhandled simple type 0x"+v.toString(16))}}function U(M){var N="",z;for(z=0;z<M.length&&M[z]==0;z++);for(;z<M.length;z++){var D="00"+M[z].toString(16);N+=D.substr(D.length-2)}return N}function x(){var M=Math.pow(2,w);if(M>4){var N=t.slice(g+1,g+1+M),z=U(N);return vpe(z,16)}if(M<or.maxObjectSize)return _i(t.slice(g+1,g+1+M));throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function P(){var M=w+1;if(M<or.maxObjectSize)return new wpe(_i(t.slice(g+1,g+1+M)));throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function q(){var M=Math.pow(2,w);if(M<or.maxObjectSize){var N=t.slice(g+1,g+1+M);if(M===4)return N.readFloatBE(0);if(M===8)return N.readDoubleBE(0)}else throw new Error("To little heap space available! Wanted to read "+M+" bytes, but only "+or.maxObjectSize+" are available.")}function j(){w!=3&&console.error("Unknown date type :"+w+". Parsing anyway...");var M=t.slice(g+1,g+9);return new Date(bpe+1e3*M.readDoubleBE(0))}function F(){var M=1,N=w;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0x4: UNEXPECTED LENGTH-INT TYPE! "+D);var L=z&15,ee=Math.pow(2,L);M=2+ee,ee<3,N=_i(t.slice(g+2,g+2+ee))}if(N<or.maxObjectSize)return t.slice(g+M,g+M+N);throw new Error("To little heap space available! Wanted to read "+N+" bytes, but only "+or.maxObjectSize+" are available.")}function $(M){M=M||0;var N="utf8",z=w,D=1;if(w==15){var L=t[g+1],ee=(L&240)/16;ee!=1&&console.err("UNEXPECTED LENGTH-INT TYPE! "+ee);var re=L&15,ie=Math.pow(2,re),D=2+ie;ie<3,z=_i(t.slice(g+2,g+2+ie))}if(z*=M+1,z<or.maxObjectSize){var J=new Buffer(t.slice(g+D,g+D+z));return M&&(J=Ape(J),N="ucs2"),J.toString(N)}else throw new Error("To little heap space available! Wanted to read "+z+" bytes, but only "+or.maxObjectSize+" are available.")}function O(){var M=w,N=1;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0xa: UNEXPECTED LENGTH-INT TYPE! "+D);var L=z&15,ee=Math.pow(2,L);N=2+ee,ee<3,M=_i(t.slice(g+2,g+2+ee))}if(M*s>or.maxObjectSize)throw new Error("To little heap space available!");for(var re=[],ie=0;ie<M;ie++){var J=_i(t.slice(g+N+ie*s,g+N+(ie+1)*s));re[ie]=f(J)}return re}function E(){var M=w,N=1;if(w==15){var z=t[g+1],D=(z&240)/16;D!=1&&console.error("0xD: UNEXPECTED LENGTH-INT TYPE! "+D);var L=z&15,ee=Math.pow(2,L);N=2+ee,ee<3,M=_i(t.slice(g+2,g+2+ee))}if(M*2*s>or.maxObjectSize)throw new Error("To little heap space available!");ou&&console.log("Parsing dictionary #"+h);for(var re={},ie=0;ie<M;ie++){var J=_i(t.slice(g+N+ie*s,g+N+(ie+1)*s)),te=_i(t.slice(g+N+M*s+ie*s,g+N+M*s+(ie+1)*s)),ce=f(J),ae=f(te);ou&&console.log("  DICT #"+h+": Mapped "+ce+" to "+ae),re[ce]=ae}return re}}return[f(a)]};function _i(t,e){e=e||0;for(var r=0,i=e;i<t.length;i++)r<<=8,r|=t[i]&255;return r}function Fx(t,e){var r=t.slice(e,e+8);return r.readUInt32BE(4,8)}function Ape(t){for(var e=t.length,r=0;r<e;r+=2){var i=t[r];t[r]=t[r+1],t[r+1]=i}return t}});var H8=b((HMe,g8)=>{"use strict";var m8=require("os");function Ipe(){var t=process.env,e=t.HOME,r=t.LOGNAME||t.USER||t.LNAME||t.USERNAME;return process.platform==="win32"?t.USERPROFILE||t.HOMEDRIVE+t.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null}g8.exports=typeof m8.homedir=="function"?m8.homedir:Ipe});var b8=b((yMe,v8)=>{"use strict";var Epe=H8(),y8=Epe();v8.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return y8?t.replace(/^~($|\/|\\)/,y8+"$1"):t}});var Bx=b((vMe,A8)=>{"use strict";var w8=function(t,e,r){return function(){for(var i=this,n=new Array(arguments.length),s=0;s<arguments.length;s++)n[s]=arguments[s];return new e(function(o,a){n.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var l=new Array(arguments.length-1),p=1;p<arguments.length;p++)l[p-1]=arguments[p];o(l)}else o(c)}),t.apply(i,n)})}},_8=A8.exports=function(t,e,r){typeof e!="function"&&(r=e,e=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var i=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},n=typeof t=="function"?function(){return r.excludeMain?t.apply(this,arguments):w8(t,e,r).apply(this,arguments)}:{};return Object.keys(t).reduce(function(s,o){var a=t[o];return s[o]=typeof a=="function"&&i(o)?w8(a,e,r):a,s},n)};_8.all=_8});var E8=b((bMe,I8)=>{"use strict";var Spe=require("os"),Cpe=h8(),xpe=b8(),Dpe=Bx(),Ppe=Number(Spe.release().split(".")[0]),Lpe=xpe(Ppe>=14?"~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist":"~/Library/Preferences/com.apple.LaunchServices.plist");I8.exports=()=>{if(process.platform!=="darwin")return Promise.reject(new Error("Only OS X is supported"));let t="com.apple.Safari";return Dpe(Cpe.parseFile)(Lpe).then(e=>{let r=e&&e[0].LSHandlers;if(!r||r.length===0)return t;for(let i of r)if(i.LSHandlerURLScheme==="http"&&i.LSHandlerRoleAll){t=i.LSHandlerRoleAll;break}return t})}});var $8=b((wMe,T8)=>{"use strict";var jx="pending",S8="settled",h0="fulfilled",m0="rejected",Tpe=function(){},C8=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",$pe=typeof setImmediate>"u"?setTimeout:setImmediate,Um=[],Ux;function kpe(){for(var t=0;t<Um.length;t++)Um[t][0](Um[t][1]);Um=[],Ux=!1}function g0(t,e){Um.push([t,e]),Ux||(Ux=!0,$pe(kpe,0))}function Rpe(t,e){function r(n){qx(e,n)}function i(n){jm(e,n)}try{t(r,i)}catch(n){i(n)}}function x8(t){var e=t.owner,r=e._state,i=e._data,n=t[r],s=t.then;if(typeof n=="function"){r=h0;try{i=n(i)}catch(o){jm(s,o)}}D8(s,i)||(r===h0&&qx(s,i),r===m0&&jm(s,i))}function D8(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&(typeof e=="function"||typeof e=="object")){var i=e.then;if(typeof i=="function")return i.call(e,function(n){r||(r=!0,e===n?P8(t,n):qx(t,n))},function(n){r||(r=!0,jm(t,n))}),!0}}catch(n){return r||jm(t,n),!0}return!1}function qx(t,e){(t===e||!D8(t,e))&&P8(t,e)}function P8(t,e){t._state===jx&&(t._state=S8,t._data=e,g0(Mpe,t))}function jm(t,e){t._state===jx&&(t._state=S8,t._data=e,g0(Ope,t))}function L8(t){t._then=t._then.forEach(x8)}function Mpe(t){t._state=h0,L8(t)}function Ope(t){t._state=m0,L8(t),!t._handled&&C8&&global.process.emit("unhandledRejection",t._data,t)}function Npe(t){global.process.emit("rejectionHandled",t)}function qi(t){if(typeof t!="function")throw new TypeError("Promise resolver "+t+" is not a function");if(!(this instanceof qi))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],Rpe(t,this)}qi.prototype={constructor:qi,_state:jx,_then:null,_data:void 0,_handled:!1,then:function(t,e){var r={owner:this,then:new this.constructor(Tpe),fulfilled:t,rejected:e};return(e||t)&&!this._handled&&(this._handled=!0,this._state===m0&&C8&&g0(Npe,this)),this._state===h0||this._state===m0?g0(x8,r):this._then.push(r),r.then},catch:function(t){return this.then(null,t)}};qi.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new qi(function(e,r){var i=[],n=0;function s(u){return n++,function(c){i[u]=c,--n||e(i)}}for(var o=0,a;o<t.length;o++)a=t[o],a&&typeof a.then=="function"?a.then(s(o),r):i[o]=a;n||e(i)})};qi.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new qi(function(e,r){for(var i=0,n;i<t.length;i++)n=t[i],n&&typeof n.then=="function"?n.then(e,r):e(n)})};qi.resolve=function(t){return t&&typeof t=="object"&&t.constructor===qi?t:new qi(function(e){e(t)})};qi.reject=function(t){return new qi(function(e,r){r(t)})};T8.exports=qi});var R8=b((_Me,k8)=>{"use strict";k8.exports=typeof Promise=="function"?Promise:$8()});var N8=b((AMe,O8)=>{"use strict";var Fpe=require("child_process").execFile,M8=R8(),Bpe=Bx();O8.exports=function(t){return process.platform!=="darwin"?M8.reject(new Error("Only OS X systems are supported")):Bpe(Fpe,M8)("osascript",["-e",t]).then(function(e){return e.trim()})}});var B8=b((IMe,F8)=>{"use strict";var Upe=N8();F8.exports=t=>Upe(`tell application "Finder" to set app_path to application file id "${t}" as string
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)});var W8=b((EMe,q8)=>{var U8=Object.prototype.hasOwnProperty;q8.exports=Wi;function Wi(t){if(!(this instanceof Wi))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),t)if(t instanceof Wi||typeof Map=="function"&&t instanceof Map)t.forEach(function(e,r){this.set(r,e)},this);else if(Array.isArray(t))t.forEach(function(e){this.set(e[0],e[1])},this);else throw new TypeError("invalid argument")}Wi.prototype.forEach=function(t,e){e=e||this,Object.keys(this._data).forEach(function(r){r!=="size"&&t.call(e,this._data[r].value,this._data[r].key)},this)};Wi.prototype.has=function(t){return!!Wx(this._data,t)};Wi.prototype.get=function(t){var e=Wx(this._data,t);return e&&e.value};Wi.prototype.set=function(t,e){qpe(this._data,t,e)};Wi.prototype.delete=function(t){var e=Wx(this._data,t);e&&(delete this._data[e._index],this._data.size--)};Wi.prototype.clear=function(){var t=Object.create(null);t.size=0,Object.defineProperty(this,"_data",{value:t,enumerable:!1,configurable:!0,writable:!1})};Object.defineProperty(Wi.prototype,"size",{get:function(){return this._data.size},set:function(t){},enumerable:!0,configurable:!0});Wi.prototype.values=Wi.prototype.keys=Wi.prototype.entries=function(){throw new Error("iterators are not implemented in this version")};function j8(t,e){return t===e||t!==t&&e!==e}function jpe(t,e,r){this.key=t,this.value=e,this._index=r}function Wx(t,e){for(var r=0,i="_"+e,n=i;U8.call(t,n);n=i+r++)if(j8(t[n].key,e))return t[n]}function qpe(t,e,r){for(var i=0,n="_"+e,s=n;U8.call(t,s);s=n+i++)if(j8(t[s].key,e)){t[s].value=r;return}t.size++,t[s]=new jpe(e,r,s)}});var V8=b((SMe,Vx)=>{process.env.npm_package_name==="pseudomap"&&process.env.npm_lifecycle_script==="test"&&(process.env.TEST_PSEUDOMAP="true");typeof Map=="function"&&!process.env.TEST_PSEUDOMAP?Vx.exports=Map:Vx.exports=W8()});var K8=b((CMe,G8)=>{G8.exports=Ze;Ze.Node=qm;Ze.create=Ze;function Ze(t){var e=this;if(e instanceof Ze||(e=new Ze),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}Ze.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null};Ze.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++}};Ze.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++}};Ze.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Wpe(this,arguments[t]);return this.length};Ze.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Vpe(this,arguments[t]);return this.length};Ze.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}};Ze.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}};Ze.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};Ze.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};Ze.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Ze.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Ze.prototype.map=function(t,e){e=e||this;for(var r=new Ze,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};Ze.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Ze,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};Ze.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};Ze.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};Ze.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Ze.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Ze.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ze;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(;n!==null&&i<e;i++,n=n.next)r.push(n.value);return r};Ze.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ze;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};Ze.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Wpe(t,e){t.tail=new qm(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Vpe(t,e){t.head=new qm(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function qm(t,e,r,i){if(!(this instanceof qm))return new qm(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}});var Kx=b((xMe,J8)=>{"use strict";J8.exports=yt;var Gpe=V8(),Wm=require("util"),Kpe=K8(),zpe=typeof Symbol=="function"&&process.env._nodeLRUCacheForceNoSymbol!=="1",Gn;zpe?Gn=function(t){return Symbol(t)}:Gn=function(t){return"_"+t};var Do=Gn("max"),Vs=Gn("length"),Lc=Gn("lengthCalculator"),uf=Gn("allowStale"),au=Gn("maxAge"),xo=Gn("dispose"),z8=Gn("noDisposeOnSet"),ar=Gn("lruList"),Vn=Gn("cache");function Vm(){return 1}function yt(t){if(!(this instanceof yt))return new yt(t);typeof t=="number"&&(t={max:t}),t||(t={});var e=this[Do]=t.max;(!e||typeof e!="number"||e<=0)&&(this[Do]=1/0);var r=t.length||Vm;typeof r!="function"&&(r=Vm),this[Lc]=r,this[uf]=t.stale||!1,this[au]=t.maxAge||0,this[xo]=t.dispose,this[z8]=t.noDisposeOnSet||!1,this.reset()}Object.defineProperty(yt.prototype,"max",{set:function(t){(!t||typeof t!="number"||t<=0)&&(t=1/0),this[Do]=t,Gm(this)},get:function(){return this[Do]},enumerable:!0});Object.defineProperty(yt.prototype,"allowStale",{set:function(t){this[uf]=!!t},get:function(){return this[uf]},enumerable:!0});Object.defineProperty(yt.prototype,"maxAge",{set:function(t){(!t||typeof t!="number"||t<0)&&(t=0),this[au]=t,Gm(this)},get:function(){return this[au]},enumerable:!0});Object.defineProperty(yt.prototype,"lengthCalculator",{set:function(t){typeof t!="function"&&(t=Vm),t!==this[Lc]&&(this[Lc]=t,this[Vs]=0,this[ar].forEach(function(e){e.length=this[Lc](e.value,e.key),this[Vs]+=e.length},this)),Gm(this)},get:function(){return this[Lc]},enumerable:!0});Object.defineProperty(yt.prototype,"length",{get:function(){return this[Vs]},enumerable:!0});Object.defineProperty(yt.prototype,"itemCount",{get:function(){return this[ar].length},enumerable:!0});yt.prototype.rforEach=function(t,e){e=e||this;for(var r=this[ar].tail;r!==null;){var i=r.prev;X8(this,t,r,e),r=i}};function X8(t,e,r,i){var n=r.value;Km(t,n)&&(cf(t,r),t[uf]||(n=void 0)),n&&e.call(i,n.value,n.key,t)}yt.prototype.forEach=function(t,e){e=e||this;for(var r=this[ar].head;r!==null;){var i=r.next;X8(this,t,r,e),r=i}};yt.prototype.keys=function(){return this[ar].toArray().map(function(t){return t.key},this)};yt.prototype.values=function(){return this[ar].toArray().map(function(t){return t.value},this)};yt.prototype.reset=function(){this[xo]&&this[ar]&&this[ar].length&&this[ar].forEach(function(t){this[xo](t.key,t.value)},this),this[Vn]=new Gpe,this[ar]=new Kpe,this[Vs]=0};yt.prototype.dump=function(){return this[ar].map(function(t){if(!Km(this,t))return{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}},this).toArray().filter(function(t){return t})};yt.prototype.dumpLru=function(){return this[ar]};yt.prototype.inspect=function(t,e){var r="LRUCache {",i=!1,n=this[uf];n&&(r+=`
  allowStale: true`,i=!0);var s=this[Do];s&&s!==1/0&&(i&&(r+=","),r+=`
  max: `+Wm.inspect(s,e),i=!0);var o=this[au];o&&(i&&(r+=","),r+=`
  maxAge: `+Wm.inspect(o,e),i=!0);var a=this[Lc];a&&a!==Vm&&(i&&(r+=","),r+=`
  length: `+Wm.inspect(this[Vs],e),i=!0);var u=!1;return this[ar].forEach(function(c){u?r+=`,
  `:(i&&(r+=`,
`),u=!0,r+=`
  `);var l=Wm.inspect(c.key).split(`
`).join(`
  `),p={value:c.value};c.maxAge!==o&&(p.maxAge=c.maxAge),a!==Vm&&(p.length=c.length),Km(this,c)&&(p.stale=!0),p=Wm.inspect(p,e).split(`
`).join(`
  `),r+=l+" => "+p}),(u||i)&&(r+=`
`),r+="}",r};yt.prototype.set=function(t,e,r){r=r||this[au];var i=r?Date.now():0,n=this[Lc](e,t);if(this[Vn].has(t)){if(n>this[Do])return cf(this,this[Vn].get(t)),!1;var s=this[Vn].get(t),o=s.value;return this[xo]&&(this[z8]||this[xo](t,o.value)),o.now=i,o.maxAge=r,o.value=e,this[Vs]+=n-o.length,o.length=n,this.get(t),Gm(this),!0}var a=new Xpe(t,e,n,i,r);return a.length>this[Do]?(this[xo]&&this[xo](t,e),!1):(this[Vs]+=a.length,this[ar].unshift(a),this[Vn].set(t,this[ar].head),Gm(this),!0)};yt.prototype.has=function(t){if(!this[Vn].has(t))return!1;var e=this[Vn].get(t).value;return!Km(this,e)};yt.prototype.get=function(t){return Gx(this,t,!0)};yt.prototype.peek=function(t){return Gx(this,t,!1)};yt.prototype.pop=function(){var t=this[ar].tail;return t?(cf(this,t),t.value):null};yt.prototype.del=function(t){cf(this,this[Vn].get(t))};yt.prototype.load=function(t){this.reset();for(var e=Date.now(),r=t.length-1;r>=0;r--){var i=t[r],n=i.e||0;if(n===0)this.set(i.k,i.v);else{var s=n-e;s>0&&this.set(i.k,i.v,s)}}};yt.prototype.prune=function(){var t=this;this[Vn].forEach(function(e,r){Gx(t,r,!1)})};function Gx(t,e,r){var i=t[Vn].get(e);if(i){var n=i.value;Km(t,n)?(cf(t,i),t[uf]||(n=void 0)):r&&t[ar].unshiftNode(i),n&&(n=n.value)}return n}function Km(t,e){if(!e||!e.maxAge&&!t[au])return!1;var r=!1,i=Date.now()-e.now;return e.maxAge?r=i>e.maxAge:r=t[au]&&i>t[au],r}function Gm(t){if(t[Vs]>t[Do])for(var e=t[ar].tail;t[Vs]>t[Do]&&e!==null;){var r=e.prev;cf(t,e),e=r}}function cf(t,e){if(e){var r=e.value;t[xo]&&t[xo](r.key,r.value),t[Vs]-=r.length,t[Vn].delete(r.key),t[ar].removeNode(e)}}function Xpe(t,e,r,i,n){this.key=t,this.value=e,this.length=r,this.now=i,this.maxAge=n||0}});var iq=b((DMe,rq)=>{rq.exports=tq;tq.sync=Ype;var zx=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Y8=require("path"),Jpe=zx?";":":",Q8=JA();function Z8(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function eq(t,e){var r=e.colon||Jpe,i=e.path||process.env.PATH||"",n=[""];i=i.split(r);var s="";return zx&&(i.unshift(process.cwd()),s=e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM",n=s.split(r),t.indexOf(".")!==-1&&n[0]!==""&&n.unshift("")),(t.match(/\//)||zx&&t.match(/\\/))&&(i=[""]),{env:i,ext:n,extExe:s}}function tq(t,e,r){typeof e=="function"&&(r=e,e={});var i=eq(t,e),n=i.env,s=i.ext,o=i.extExe,a=[];(function u(c,l){if(c===l)return e.all&&a.length?r(null,a):r(Z8(t));var p=n[c];p.charAt(0)==='"'&&p.slice(-1)==='"'&&(p=p.slice(1,-1));var f=Y8.join(p,t);!p&&/^\.[\\\/]/.test(t)&&(f=t.slice(0,2)+f),function h(g,H){if(g===H)return u(c+1,l);var v=s[g];Q8(f+v,{pathExt:o},function(w,T){if(!w&&T)if(e.all)a.push(f+v);else return r(null,f+v);return h(g+1,H)})}(0,s.length)})(0,n.length)}function Ype(t,e){e=e||{};for(var r=eq(t,e),i=r.env,n=r.ext,s=r.extExe,o=[],a=0,u=i.length;a<u;a++){var c=i[a];c.charAt(0)==='"'&&c.slice(-1)==='"'&&(c=c.slice(1,-1));var l=Y8.join(c,t);!c&&/^\.[\\\/]/.test(t)&&(l=t.slice(0,2)+l);for(var p=0,f=n.length;p<f;p++){var h=l+n[p],g;try{if(g=Q8.sync(h,{pathExt:s}),g)if(e.all)o.push(h);else return h}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw Z8(t)}});var aq=b((PMe,oq)=>{"use strict";var nq=require("path"),sq=iq(),Qpe=Kx(),H0=new Qpe({max:50,maxAge:30*1e3}),Zpe=new RegExp(process.platform==="win32"?/[\/\\]/:/\//);function efe(t,e){var r;if(Zpe.test(t)&&(t=nq.resolve(t)),e=!!e,r=H0.get(t+"!"+e),H0.has(t))return H0.get(t);try{r=e?sq.sync(t,{pathExt:nq.delimiter+(process.env.PATHEXT||"")}):sq.sync(t)}catch{}return H0.set(t+"!"+e,r),r}oq.exports=efe});var pq=b((LMe,lq)=>{"use strict";var Xx=require("fs"),tfe=Kx(),uq=aq(),rfe=process.platform==="win32",Jx=new tfe({max:50,maxAge:30*1e3});function ife(t){var e,r,i,n;if(Jx.has(t))return Jx.get(t);e=new Buffer(150);try{r=Xx.openSync(t,"r"),Xx.readSync(r,e,0,150,0),Xx.closeSync(r)}catch{}return i=e.toString().trim().match(/#!(.+)/i),i&&(n=i[1].replace(/\/usr\/bin\/env\s+/i,"")),Jx.set(t,n),n}function cq(t,e){return t=""+t,e?(t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t='"'+t+'"'):t=t.replace(/([\(\)%!\^<>&|;,"'\s])/g,"^$1"),t}function nfe(t){return/^[a-z0-9_-]+$/i.test(t)?t:cq(t,!0)}function sfe(t,e,r){var i,n,s,o;return e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=r||{},o=t,rfe&&(s=uq(t),s=s||uq(t,!0),i=s&&ife(s),i&&(e.unshift(s),t=i),n=t!=="echo",t=nfe(t),e=e.map(function(a){return cq(a,n)}),e=["/s","/c",'"'+t+(e.length?" "+e.join(" "):"")+'"'],t=process.env.comspec||"cmd.exe",r.windowsVerbatimArguments=!0),{command:t,args:e,options:r,file:s,original:o}}lq.exports=sfe});var mq=b((TMe,y0)=>{"use strict";var fq=process.platform==="win32";function dq(t,e){var r;return r=new Error(e+" "+t+" ENOENT"),r.code=r.errno="ENOENT",r.syscall=e+" "+t,r}function ofe(t,e){var r;fq&&(r=t.emit,t.emit=function(i,n){var s;return i==="exit"&&(s=hq(n,e,"spawn"),s)?r.call(t,"error",s):r.apply(t,arguments)})}function hq(t,e,r){return fq&&t===1&&!e.file?dq(e.original,r):null}y0.exports.hookChildProcess=ofe;y0.exports.verifyENOENT=hq;y0.exports.notFoundError=dq});var vq=b(($Me,zm)=>{"use strict";var afe=require("child_process"),gq=pq(),Hq=mq();function yq(t,e,r){var i,n;return i=gq(t,e,r),n=afe.spawn(i.command,i.args,i.options),Hq.hookChildProcess(n,i),n}zm.exports=yq;zm.exports.spawn=yq;zm.exports._parse=gq;zm.exports._enoent=Hq});var wq=b((kMe,bq)=>{"use strict";bq.exports=function(t){var e=typeof t=="string"?`
`:`
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var Iq=b((RMe,Aq)=>{"use strict";var _q=Object.getOwnPropertySymbols,ufe=Object.prototype.hasOwnProperty,cfe=Object.prototype.propertyIsEnumerable;function lfe(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function pfe(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(e).map(function(s){return e[s]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(s){n[s]=s}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Aq.exports=pfe()?Object.assign:function(t,e){for(var r,i=lfe(t),n,s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var o in r)ufe.call(r,o)&&(i[o]=r[o]);if(_q){n=_q(r);for(var a=0;a<n.length;a++)cfe.call(r,n[a])&&(i[n[a]]=r[n[a]])}}return i}});var Yx=b((MMe,Eq)=>{"use strict";Eq.exports=function(t){t=t||{};var e=t.env||process.env,r=t.platform||process.platform;return r!=="win32"?"PATH":Object.keys(e).filter(function(i){return i.toUpperCase()==="PATH"})[0]||"Path"}});var Cq=b((OMe,Sq)=>{"use strict";var Xm=require("path"),ffe=Yx();Sq.exports=function(t){t=t||{};for(var e,r=Xm.resolve(t.cwd||"."),i=[];e!==r;)i.push(Xm.join(r,"node_modules/.bin")),e=r,r=Xm.resolve(r,"..");return i.push(Xm.dirname(process.execPath)),i.concat(t.path||process.env[ffe()]).join(Xm.delimiter)}});var Dq=b((NMe,Jm)=>{"use strict";var dfe=require("child_process"),Qx=vq(),hfe=wq(),Zx=Iq(),mfe=Cq(),xq=Yx()(),gfe=1024*1024*10;Jm.exports=function(t,e,r){return new Promise(function(i,n){var s=Qx._parse(t,e,r);r=Zx({maxBuffer:gfe,stripEof:!0,preferLocal:!0},s.options);var o=function(u){return r.stripEof&&(u=hfe(u)),u};r.preferLocal&&(r.env=Zx({},r.env||process.env),r.env[xq]=mfe({cwd:r.cwd,path:r.env[xq]}));var a=dfe.execFile(s.command,s.args,r,function(u,c,l){if(u){u.stdout=c,u.stderr=l,n(u);return}i({stdout:o(c),stderr:o(l)})});Qx._enoent.hookChildProcess(a,s)})};Jm.exports.shell=function(t,e){var r,i;return e=Zx({},e),process.platform==="win32"?(r=process.env.comspec||"cmd.exe",i=["/s","/c",'"'+t+'"'],e.windowsVerbatimArguments=!0):(r="/bin/sh",i=["-c",t]),e.shell&&(r=e.shell),Jm.exports(r,i,e)};Jm.exports.spawn=Qx});var Lq=b((FMe,Pq)=>{"use strict";Pq.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.toLowerCase().replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}});var $q=b((BMe,Tq)=>{"use strict";var Hfe=Dq(),yfe=Lq();Tq.exports=function(){return process.platform!=="linux"?Promise.reject(new Error("Only Linux systems are supported")):Hfe("xdg-mime",["query","default","x-scheme-handler/http"]).then(t=>{let e=t.stdout.trim();return{name:yfe(e.replace(/.desktop$/,"").replace("-"," ")),id:e}})}});var Rq=b((UMe,kq)=>{"use strict";var vfe=E8(),bfe=B8();kq.exports=()=>process.platform==="linux"?$q()():process.platform==="darwin"?vfe().then(t=>bfe(t).then(e=>({name:e,id:t}))):Promise.reject(new Error("Only macOS and Linux are supported"))});var Lo=b((pOe,tD)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?tD.exports={nextTick:Afe}:tD.exports=process;function Afe(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,s,o;switch(n){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,i)});default:for(s=new Array(n-1),o=0;o<s.length;)s[o++]=arguments[o];return process.nextTick(function(){t.apply(null,s)})}}});var rD=b((fOe,jq)=>{var Ife={}.toString;jq.exports=Array.isArray||function(t){return Ife.call(t)=="[object Array]"}});var iD=b((dOe,qq)=>{qq.exports=require("stream")});var $o=b((nD,Vq)=>{var A0=require("buffer"),To=A0.Buffer;function Wq(t,e){for(var r in t)e[r]=t[r]}To.from&&To.alloc&&To.allocUnsafe&&To.allocUnsafeSlow?Vq.exports=A0:(Wq(A0,nD),nD.Buffer=ff);function ff(t,e,r){return To(t,e,r)}Wq(To,ff);ff.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return To(t,e,r)};ff.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=To(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ff.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return To(t)};ff.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return A0.SlowBuffer(t)}});var Kn=b(Vr=>{function Efe(t){return Array.isArray?Array.isArray(t):I0(t)==="[object Array]"}Vr.isArray=Efe;function Sfe(t){return typeof t=="boolean"}Vr.isBoolean=Sfe;function Cfe(t){return t===null}Vr.isNull=Cfe;function xfe(t){return t==null}Vr.isNullOrUndefined=xfe;function Dfe(t){return typeof t=="number"}Vr.isNumber=Dfe;function Pfe(t){return typeof t=="string"}Vr.isString=Pfe;function Lfe(t){return typeof t=="symbol"}Vr.isSymbol=Lfe;function Tfe(t){return t===void 0}Vr.isUndefined=Tfe;function $fe(t){return I0(t)==="[object RegExp]"}Vr.isRegExp=$fe;function kfe(t){return typeof t=="object"&&t!==null}Vr.isObject=kfe;function Rfe(t){return I0(t)==="[object Date]"}Vr.isDate=Rfe;function Mfe(t){return I0(t)==="[object Error]"||t instanceof Error}Vr.isError=Mfe;function Ofe(t){return typeof t=="function"}Vr.isFunction=Ofe;function Nfe(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Vr.isPrimitive=Nfe;Vr.isBuffer=Buffer.isBuffer;function I0(t){return Object.prototype.toString.call(t)}});var Gq=b((mOe,sD)=>{typeof Object.create=="function"?sD.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:sD.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var ur=b((gOe,aD)=>{try{if(oD=require("util"),typeof oD.inherits!="function")throw"";aD.exports=oD.inherits}catch{aD.exports=Gq()}var oD});var zq=b((HOe,uD)=>{"use strict";function Ffe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Kq=$o().Buffer,Qm=require("util");function Bfe(t,e,r){t.copy(e,r)}uD.exports=function(){function t(){Ffe(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return Kq.alloc(0);if(this.length===1)return this.head.data;for(var i=Kq.allocUnsafe(r>>>0),n=this.head,s=0;n;)Bfe(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();Qm&&Qm.inspect&&Qm.inspect.custom&&(uD.exports.prototype[Qm.inspect.custom]=function(){var t=Qm.inspect({length:this.length});return this.constructor.name+" "+t})});var cD=b((yOe,Yq)=>{"use strict";var Xq=Lo();function Ufe(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(!this._writableState||!this._writableState.errorEmitted)&&Xq.nextTick(Jq,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(Xq.nextTick(Jq,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function jfe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Jq(t,e){t.emit("error",e)}Yq.exports={destroy:Ufe,undestroy:jfe}});var E0=b((vOe,Qq)=>{Qq.exports=require("util").deprecate});var pD=b((bOe,oW)=>{"use strict";var Tc=Lo();oW.exports=Qt;function eW(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ode(e,t)}}var qfe=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Tc.nextTick,df;Qt.WritableState=eg;var tW=Object.create(Kn());tW.inherits=ur();var Wfe={deprecate:E0()},rW=iD(),C0=$o().Buffer,Vfe=global.Uint8Array||function(){};function Gfe(t){return C0.from(t)}function Kfe(t){return C0.isBuffer(t)||t instanceof Vfe}var iW=cD();tW.inherits(Qt,rW);function zfe(){}function eg(t,e){df=df||$c(),t=t||{};var r=e instanceof df;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){tde(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new eW(this)}eg.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(eg.prototype,"buffer",{get:Wfe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var S0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Qt,Symbol.hasInstance,{value:function(t){return S0.call(this,t)?!0:this!==Qt?!1:t&&t._writableState instanceof eg}})):S0=function(t){return t instanceof this};function Qt(t){if(df=df||$c(),!S0.call(Qt,this)&&!(this instanceof df))return new Qt(t);this._writableState=new eg(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),rW.call(this)}Qt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Xfe(t,e){var r=new Error("write after end");t.emit("error",r),Tc.nextTick(e,r)}function Jfe(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),Tc.nextTick(i,s),n=!1),n}Qt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Kfe(t);return s&&!C0.isBuffer(t)&&(t=Gfe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=zfe),i.ended?Xfe(this,r):(s||Jfe(this,i,t,r))&&(i.pendingcb++,n=Qfe(this,i,s,t,e,r)),n};Qt.prototype.cork=function(){var t=this._writableState;t.corked++};Qt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&nW(this,t))};Qt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function Yfe(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=C0.from(e,r)),e}Object.defineProperty(Qt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Qfe(t,e,r,i,n,s){if(!r){var o=Yfe(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else lD(t,e,!1,a,i,n,s);return u}function lD(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Zfe(t,e,r,i,n){--e.pendingcb,r?(Tc.nextTick(n,i),Tc.nextTick(Zm,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),Zm(t,e))}function ede(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function tde(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(ede(r),e)Zfe(t,r,i,e,n);else{var s=sW(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nW(t,r),i?qfe(Zq,t,r,s,n):Zq(t,r,s,n)}}function Zq(t,e,r,i){r||rde(t,e),e.pendingcb--,i(),Zm(t,e)}function rde(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nW(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,lD(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new eW(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(lD(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Qt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Qt.prototype._writev=null;Qt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),!i.ending&&!i.finished&&sde(this,i,r)};function sW(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ide(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Zm(t,e)})}function nde(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,Tc.nextTick(ide,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Zm(t,e){var r=sW(e);return r&&(nde(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function sde(t,e,r){e.ending=!0,Zm(t,e),r&&(e.finished?Tc.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ode(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}Object.defineProperty(Qt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Qt.prototype.destroy=iW.destroy;Qt.prototype._undestroy=iW.undestroy;Qt.prototype._destroy=function(t,e){this.end(),e(t)}});var $c=b((wOe,lW)=>{"use strict";var aW=Lo(),ade=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lW.exports=ko;var uW=Object.create(Kn());uW.inherits=ur();var cW=hD(),dD=pD();uW.inherits(ko,cW);for(fD=ade(dD.prototype),x0=0;x0<fD.length;x0++)D0=fD[x0],ko.prototype[D0]||(ko.prototype[D0]=dD.prototype[D0]);var fD,D0,x0;function ko(t){if(!(this instanceof ko))return new ko(t);cW.call(this,t),dD.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",ude)}Object.defineProperty(ko.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ude(){this.allowHalfOpen||this._writableState.ended||aW.nextTick(cde,this)}function cde(t){t.end()}Object.defineProperty(ko.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});ko.prototype._destroy=function(t,e){this.push(null),this.end(),aW.nextTick(e,t)}});var HD=b(fW=>{"use strict";var gD=$o().Buffer,pW=gD.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function lde(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function pde(t){var e=lde(t);if(typeof e!="string"&&(gD.isEncoding===pW||!pW(t)))throw new Error("Unknown encoding: "+t);return e||t}fW.StringDecoder=tg;function tg(t){this.encoding=pde(t);var e;switch(this.encoding){case"utf16le":this.text=Hde,this.end=yde,e=4;break;case"utf8":this.fillLast=hde,e=4;break;case"base64":this.text=vde,this.end=bde,e=3;break;default:this.write=wde,this.end=_de;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gD.allocUnsafe(e)}tg.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};tg.prototype.end=gde;tg.prototype.text=mde;tg.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function mD(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function fde(t,e,r){var i=e.length-1;if(i<r)return 0;var n=mD(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=mD(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=mD(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function dde(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function hde(t){var e=this.lastTotal-this.lastNeed,r=dde(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function mde(t,e){var r=fde(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function gde(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Hde(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function yde(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function vde(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function bde(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wde(t){return t.toString(this.encoding)}function _de(t){return t&&t.length?this.write(t):""}});var hD=b((IOe,IW)=>{"use strict";var mf=Lo();IW.exports=vt;var Ade=rD(),rg;vt.ReadableState=vW;var AOe=require("events").EventEmitter,gW=function(t,e){return t.listeners(e).length},_D=iD(),ig=$o().Buffer,Ide=global.Uint8Array||function(){};function Ede(t){return ig.from(t)}function Sde(t){return ig.isBuffer(t)||t instanceof Ide}var HW=Object.create(Kn());HW.inherits=ur();var yD=require("util"),ze=void 0;yD&&yD.debuglog?ze=yD.debuglog("stream"):ze=function(){};var Cde=zq(),yW=cD(),hf;HW.inherits(vt,_D);var vD=["error","close","destroy","pause","resume"];function xde(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Ade(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function vW(t,e){rg=rg||$c(),t=t||{};var r=e instanceof rg;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Cde,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(hf||(hf=HD().StringDecoder),this.decoder=new hf(t.encoding),this.encoding=t.encoding)}function vt(t){if(rg=rg||$c(),!(this instanceof vt))return new vt(t);this._readableState=new vW(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),_D.call(this)}Object.defineProperty(vt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});vt.prototype.destroy=yW.destroy;vt.prototype._undestroy=yW.undestroy;vt.prototype._destroy=function(t,e){this.push(null),e(t)};vt.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=ig.from(t,e),e=""),i=!0),bW(this,t,e,!1,i)};vt.prototype.unshift=function(t){return bW(this,t,null,!0,!1)};function bW(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Tde(t,s);else{var o;n||(o=Dde(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==ig.prototype&&(e=Ede(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):bD(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?bD(t,s,e,!1):wW(t,s)):bD(t,s,e,!1))):i||(s.reading=!1)}return Pde(s)}function bD(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&P0(t)),wW(t,e)}function Dde(t,e){var r;return!Sde(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Pde(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}vt.prototype.isPaused=function(){return this._readableState.flowing===!1};vt.prototype.setEncoding=function(t){return hf||(hf=HD().StringDecoder),this._readableState.decoder=new hf(t),this._readableState.encoding=t,this};var dW=8388608;function Lde(t){return t>=dW?t=dW:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function hW(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Lde(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}vt.prototype.read=function(t){ze("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return ze("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?wD(this):P0(this),null;if(t=hW(t,e),t===0&&e.ended)return e.length===0&&wD(this),null;var i=e.needReadable;ze("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,ze("length less than watermark",i)),e.ended||e.reading?(i=!1,ze("reading or ended",i)):i&&(ze("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=hW(r,e)));var n;return t>0?n=_W(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&wD(this)),n!==null&&this.emit("data",n),n};function Tde(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,P0(t)}}function P0(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(ze("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?mf.nextTick(mW,t):mW(t))}function mW(t){ze("emit readable"),t.emit("readable"),AD(t)}function wW(t,e){e.readingMore||(e.readingMore=!0,mf.nextTick($de,t,e))}function $de(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(ze("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}vt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};vt.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,ze("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:v;i.endEmitted?mf.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,T){ze("onunpipe"),w===r&&T&&T.hasUnpiped===!1&&(T.hasUnpiped=!0,l())}function a(){ze("onend"),t.end()}var u=kde(r);t.on("drain",u);var c=!1;function l(){ze("cleanup"),t.removeListener("close",g),t.removeListener("finish",H),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",f),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var p=!1;r.on("data",f);function f(w){ze("ondata"),p=!1;var T=t.write(w);T===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&AW(i.pipes,t)!==-1)&&!c&&(ze("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function h(w){ze("onerror",w),v(),t.removeListener("error",h),gW(t,"error")===0&&t.emit("error",w)}xde(t,"error",h);function g(){t.removeListener("finish",H),v()}t.once("close",g);function H(){ze("onfinish"),t.removeListener("close",g),v()}t.once("finish",H);function v(){ze("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(ze("pipe resume"),r.resume()),t};function kde(t){return function(){var e=t._readableState;ze("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&gW(t,"data")&&(e.flowing=!0,AD(t))}}vt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,r);return this}var o=AW(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};vt.prototype.on=function(t,e){var r=_D.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&P0(this):mf.nextTick(Rde,this))}return r};vt.prototype.addListener=vt.prototype.on;function Rde(t){ze("readable nexttick read 0"),t.read(0)}vt.prototype.resume=function(){var t=this._readableState;return t.flowing||(ze("resume"),t.flowing=!0,Mde(this,t)),this};function Mde(t,e){e.resumeScheduled||(e.resumeScheduled=!0,mf.nextTick(Ode,t,e))}function Ode(t,e){e.reading||(ze("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),AD(t),e.flowing&&!e.reading&&t.read(0)}vt.prototype.pause=function(){return ze("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ze("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function AD(t){var e=t._readableState;for(ze("flow",e.flowing);e.flowing&&t.read()!==null;);}vt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(ze("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(ze("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<vD.length;s++)t.on(vD[s],this.emit.bind(this,vD[s]));return this._read=function(o){ze("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});vt._fromList=_W;function _W(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=Nde(t,e.buffer,e.decoder),r}function Nde(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?Fde(t,e):Bde(t,e),i}function Fde(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),t-=o,t===0){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}function Bde(t,e){var r=ig.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,t===0){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}function wD(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,mf.nextTick(Ude,e,t))}function Ude(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function AW(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ID=b((EOe,CW)=>{"use strict";CW.exports=Ro;var L0=$c(),SW=Object.create(Kn());SW.inherits=ur();SW.inherits(Ro,L0);function jde(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Ro(t){if(!(this instanceof Ro))return new Ro(t);L0.call(this,t),this._transformState={afterTransform:jde.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",qde)}function qde(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){EW(t,e,r)}):EW(this,null,null)}Ro.prototype.push=function(t,e){return this._transformState.needTransform=!1,L0.prototype.push.call(this,t,e)};Ro.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Ro.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Ro.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ro.prototype._destroy=function(t,e){var r=this;L0.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function EW(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var LW=b((SOe,PW)=>{"use strict";PW.exports=ng;var xW=ID(),DW=Object.create(Kn());DW.inherits=ur();DW.inherits(ng,xW);function ng(t){if(!(this instanceof ng))return new ng(t);xW.call(this,t)}ng.prototype._transform=function(t,e,r){r(null,t)}});var TW=b((Er,T0)=>{var Gs=require("stream");process.env.READABLE_STREAM==="disable"&&Gs?(T0.exports=Gs,Er=T0.exports=Gs.Readable,Er.Readable=Gs.Readable,Er.Writable=Gs.Writable,Er.Duplex=Gs.Duplex,Er.Transform=Gs.Transform,Er.PassThrough=Gs.PassThrough,Er.Stream=Gs):(Er=T0.exports=hD(),Er.Stream=Gs||Er,Er.Readable=Er,Er.Writable=pD(),Er.Duplex=$c(),Er.Transform=ID(),Er.PassThrough=LW())});var RW=b((COe,kW)=>{var $W=TW(),Wde=require("util");function Vde(t){return!(typeof t.pipe!="function"||!t.readable||typeof t._read!="function"||!t._readableState)}function Gde(t,e){if(!Vde(e))throw new Error("All input streams must be readable");var r=this;e._buffer=[],e.on("readable",function(){for(var i=e.read();i;)this===t[0]?r.push(i):this._buffer.push(i),i=e.read()}),e.on("end",function(){for(var i=t[0];i&&i._readableState.ended;i=t[0]){for(;i._buffer.length;)r.push(i._buffer.shift());t.shift()}t.length||r.push(null)}),e.on("error",this.emit.bind(this,"error")),t.push(e)}function sg(t,e){if(!(this instanceof sg))return new sg(t,e);if(t=t||[],e=e||{},e.objectMode=!0,$W.call(this,e),Array.isArray(t)||(t=[t]),!t.length)return this.push(null);var r=Gde.bind(this,[]);t.forEach(function(i){Array.isArray(i)?i.forEach(r):r(i)})}Wde.inherits(sg,$W);sg.prototype._read=function(){};kW.exports=sg});var ED=b((xOe,MW)=>{MW.exports=require("stream")});var NW=b((DOe,SD)=>{"use strict";function Kde(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var OW=$o().Buffer,og=require("util");function zde(t,e,r){t.copy(e,r)}SD.exports=function(){function t(){Kde(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return OW.alloc(0);if(this.length===1)return this.head.data;for(var i=OW.allocUnsafe(r>>>0),n=this.head,s=0;n;)zde(n.data,i,s),s+=n.data.length,n=n.next;return i},t}();og&&og.inspect&&og.inspect.custom&&(SD.exports.prototype[og.inspect.custom]=function(){var t=og.inspect({length:this.length});return this.constructor.name+" "+t})});var CD=b((POe,UW)=>{"use strict";var FW=Lo();function Xde(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(!this._writableState||!this._writableState.errorEmitted)&&FW.nextTick(BW,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?(FW.nextTick(BW,r,s),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(s)}),this)}function Jde(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function BW(t,e){t.emit("error",e)}UW.exports={destroy:Xde,undestroy:Jde}});var DD=b((LOe,XW)=>{"use strict";var kc=Lo();XW.exports=Zt;function qW(t){var e=this;this.next=null,this.entry=null,this.finish=function(){hhe(e,t)}}var Yde=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:kc.nextTick,gf;Zt.WritableState=ug;var WW=Kn();WW.inherits=ur();var Qde={deprecate:E0()},VW=ED(),k0=$o().Buffer,Zde=global.Uint8Array||function(){};function ehe(t){return k0.from(t)}function the(t){return k0.isBuffer(t)||t instanceof Zde}var GW=CD();WW.inherits(Zt,VW);function rhe(){}function ug(t,e){gf=gf||Rc(),t=t||{};var r=e instanceof gf;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){che(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new qW(this)}ug.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ug.prototype,"buffer",{get:Qde.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var $0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Zt,Symbol.hasInstance,{value:function(t){return $0.call(this,t)?!0:this!==Zt?!1:t&&t._writableState instanceof ug}})):$0=function(t){return t instanceof this};function Zt(t){if(gf=gf||Rc(),!$0.call(Zt,this)&&!(this instanceof gf))return new Zt(t);this._writableState=new ug(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),VW.call(this)}Zt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ihe(t,e){var r=new Error("write after end");t.emit("error",r),kc.nextTick(e,r)}function nhe(t,e,r,i){var n=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),kc.nextTick(i,s),n=!1),n}Zt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&the(t);return s&&!k0.isBuffer(t)&&(t=ehe(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=rhe),i.ended?ihe(this,r):(s||nhe(this,i,t,r))&&(i.pendingcb++,n=ohe(this,i,s,t,e,r)),n};Zt.prototype.cork=function(){var t=this._writableState;t.corked++};Zt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&KW(this,t))};Zt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function she(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=k0.from(e,r)),e}Object.defineProperty(Zt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ohe(t,e,r,i,n,s){if(!r){var o=she(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xD(t,e,!1,a,i,n,s);return u}function xD(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function ahe(t,e,r,i,n){--e.pendingcb,r?(kc.nextTick(n,i),kc.nextTick(ag,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ag(t,e))}function uhe(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function che(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(uhe(r),e)ahe(t,r,i,e,n);else{var s=zW(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&KW(t,r),i?Yde(jW,t,r,s,n):jW(t,r,s,n)}}function jW(t,e,r,i){r||lhe(t,e),e.pendingcb--,i(),ag(t,e)}function lhe(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function KW(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,xD(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new qW(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(xD(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Zt.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Zt.prototype._writev=null;Zt.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),!i.ending&&!i.finished&&dhe(this,i,r)};function zW(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function phe(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ag(t,e)})}function fhe(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,kc.nextTick(phe,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ag(t,e){var r=zW(e);return r&&(fhe(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function dhe(t,e,r){e.ending=!0,ag(t,e),r&&(e.finished?kc.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function hhe(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}Object.defineProperty(Zt.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Zt.prototype.destroy=GW.destroy;Zt.prototype._undestroy=GW.undestroy;Zt.prototype._destroy=function(t,e){this.end(),e(t)}});var Rc=b((TOe,ZW)=>{"use strict";var JW=Lo(),mhe=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ZW.exports=Mo;var YW=Kn();YW.inherits=ur();var QW=TD(),LD=DD();YW.inherits(Mo,QW);for(PD=mhe(LD.prototype),R0=0;R0<PD.length;R0++)M0=PD[R0],Mo.prototype[M0]||(Mo.prototype[M0]=LD.prototype[M0]);var PD,M0,R0;function Mo(t){if(!(this instanceof Mo))return new Mo(t);QW.call(this,t),LD.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",ghe)}Object.defineProperty(Mo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ghe(){this.allowHalfOpen||this._writableState.ended||JW.nextTick(Hhe,this)}function Hhe(t){t.end()}Object.defineProperty(Mo.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Mo.prototype._destroy=function(t,e){this.push(null),this.end(),JW.nextTick(e,t)}});var RD=b(tV=>{"use strict";var kD=$o().Buffer,eV=kD.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function yhe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function vhe(t){var e=yhe(t);if(typeof e!="string"&&(kD.isEncoding===eV||!eV(t)))throw new Error("Unknown encoding: "+t);return e||t}tV.StringDecoder=cg;function cg(t){this.encoding=vhe(t);var e;switch(this.encoding){case"utf16le":this.text=Ehe,this.end=She,e=4;break;case"utf8":this.fillLast=_he,e=4;break;case"base64":this.text=Che,this.end=xhe,e=3;break;default:this.write=Dhe,this.end=Phe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kD.allocUnsafe(e)}cg.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};cg.prototype.end=Ihe;cg.prototype.text=Ahe;cg.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function $D(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function bhe(t,e,r){var i=e.length-1;if(i<r)return 0;var n=$D(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=$D(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=$D(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function whe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function _he(t){var e=this.lastTotal-this.lastNeed,r=whe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Ahe(t,e){var r=bhe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Ihe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Ehe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function She(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Che(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function xhe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Dhe(t){return t.toString(this.encoding)}function Phe(t){return t&&t.length?this.write(t):""}});var TD=b((ROe,dV)=>{"use strict";var yf=Lo();dV.exports=bt;var Lhe=rD(),lg;bt.ReadableState=uV;var kOe=require("events").EventEmitter,sV=function(t,e){return t.listeners(e).length},BD=ED(),pg=$o().Buffer,The=global.Uint8Array||function(){};function $he(t){return pg.from(t)}function khe(t){return pg.isBuffer(t)||t instanceof The}var oV=Kn();oV.inherits=ur();var MD=require("util"),Xe=void 0;MD&&MD.debuglog?Xe=MD.debuglog("stream"):Xe=function(){};var Rhe=NW(),aV=CD(),Hf;oV.inherits(bt,BD);var OD=["error","close","destroy","pause","resume"];function Mhe(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Lhe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function uV(t,e){lg=lg||Rc(),t=t||{};var r=e instanceof lg;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Rhe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Hf||(Hf=RD().StringDecoder),this.decoder=new Hf(t.encoding),this.encoding=t.encoding)}function bt(t){if(lg=lg||Rc(),!(this instanceof bt))return new bt(t);this._readableState=new uV(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),BD.call(this)}Object.defineProperty(bt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bt.prototype.destroy=aV.destroy;bt.prototype._undestroy=aV.undestroy;bt.prototype._destroy=function(t,e){this.push(null),e(t)};bt.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=pg.from(t,e),e=""),i=!0),cV(this,t,e,!1,i)};bt.prototype.unshift=function(t){return cV(this,t,null,!0,!1)};function cV(t,e,r,i,n){var s=t._readableState;if(e===null)s.reading=!1,Bhe(t,s);else{var o;n||(o=Ohe(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==pg.prototype&&(e=$he(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):ND(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ND(t,s,e,!1):lV(t,s)):ND(t,s,e,!1))):i||(s.reading=!1)}return Nhe(s)}function ND(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O0(t)),lV(t,e)}function Ohe(t,e){var r;return!khe(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Nhe(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}bt.prototype.isPaused=function(){return this._readableState.flowing===!1};bt.prototype.setEncoding=function(t){return Hf||(Hf=RD().StringDecoder),this._readableState.decoder=new Hf(t),this._readableState.encoding=t,this};var rV=8388608;function Fhe(t){return t>=rV?t=rV:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function iV(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Fhe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}bt.prototype.read=function(t){Xe("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Xe("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?FD(this):O0(this),null;if(t=iV(t,e),t===0&&e.ended)return e.length===0&&FD(this),null;var i=e.needReadable;Xe("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Xe("length less than watermark",i)),e.ended||e.reading?(i=!1,Xe("reading or ended",i)):i&&(Xe("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=iV(r,e)));var n;return t>0?n=pV(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&FD(this)),n!==null&&this.emit("data",n),n};function Bhe(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,O0(t)}}function O0(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Xe("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?yf.nextTick(nV,t):nV(t))}function nV(t){Xe("emit readable"),t.emit("readable"),UD(t)}function lV(t,e){e.readingMore||(e.readingMore=!0,yf.nextTick(Uhe,t,e))}function Uhe(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Xe("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}bt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};bt.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Xe("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:v;i.endEmitted?yf.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(w,T){Xe("onunpipe"),w===r&&T&&T.hasUnpiped===!1&&(T.hasUnpiped=!0,l())}function a(){Xe("onend"),t.end()}var u=jhe(r);t.on("drain",u);var c=!1;function l(){Xe("cleanup"),t.removeListener("close",g),t.removeListener("finish",H),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",v),r.removeListener("data",f),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var p=!1;r.on("data",f);function f(w){Xe("ondata"),p=!1;var T=t.write(w);T===!1&&!p&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&fV(i.pipes,t)!==-1)&&!c&&(Xe("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function h(w){Xe("onerror",w),v(),t.removeListener("error",h),sV(t,"error")===0&&t.emit("error",w)}Mhe(t,"error",h);function g(){t.removeListener("finish",H),v()}t.once("close",g);function H(){Xe("onfinish"),t.removeListener("close",g),v()}t.once("finish",H);function v(){Xe("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Xe("pipe resume"),r.resume()),t};function jhe(t){return function(){var e=t._readableState;Xe("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&sV(t,"data")&&(e.flowing=!0,UD(t))}}bt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,r);return this}var o=fV(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};bt.prototype.on=function(t,e){var r=BD.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&O0(this):yf.nextTick(qhe,this))}return r};bt.prototype.addListener=bt.prototype.on;function qhe(t){Xe("readable nexttick read 0"),t.read(0)}bt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Xe("resume"),t.flowing=!0,Whe(this,t)),this};function Whe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,yf.nextTick(Vhe,t,e))}function Vhe(t,e){e.reading||(Xe("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),UD(t),e.flowing&&!e.reading&&t.read(0)}bt.prototype.pause=function(){return Xe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Xe("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function UD(t){var e=t._readableState;for(Xe("flow",e.flowing);e.flowing&&t.read()!==null;);}bt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Xe("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(Xe("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<OD.length;s++)t.on(OD[s],this.emit.bind(this,OD[s]));return this._read=function(o){Xe("wrapped _read",o),i&&(i=!1,t.resume())},this};Object.defineProperty(bt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});bt._fromList=pV;function pV(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=Ghe(t,e.buffer,e.decoder),r}function Ghe(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?Khe(t,e):zhe(t,e),i}function Khe(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),t-=o,t===0){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}function zhe(t,e){var r=pg.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,t===0){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}function FD(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,yf.nextTick(Xhe,e,t))}function Xhe(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function fV(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var jD=b((MOe,gV)=>{"use strict";gV.exports=Oo;var N0=Rc(),mV=Kn();mV.inherits=ur();mV.inherits(Oo,N0);function Jhe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Oo(t){if(!(this instanceof Oo))return new Oo(t);N0.call(this,t),this._transformState={afterTransform:Jhe.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Yhe)}function Yhe(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){hV(t,e,r)}):hV(this,null,null)}Oo.prototype.push=function(t,e){return this._transformState.needTransform=!1,N0.prototype.push.call(this,t,e)};Oo.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Oo.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Oo.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Oo.prototype._destroy=function(t,e){var r=this;N0.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function hV(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var bV=b((OOe,vV)=>{"use strict";vV.exports=fg;var HV=jD(),yV=Kn();yV.inherits=ur();yV.inherits(fg,HV);function fg(t){if(!(this instanceof fg))return new fg(t);HV.call(this,t)}fg.prototype._transform=function(t,e,r){r(null,t)}});var wV=b((Sr,F0)=>{var Ks=require("stream");process.env.READABLE_STREAM==="disable"&&Ks?(F0.exports=Ks,Sr=F0.exports=Ks.Readable,Sr.Readable=Ks.Readable,Sr.Writable=Ks.Writable,Sr.Duplex=Ks.Duplex,Sr.Transform=Ks.Transform,Sr.PassThrough=Ks.PassThrough,Sr.Stream=Ks):(Sr=F0.exports=TD(),Sr.Stream=Ks||Sr,Sr.Readable=Sr,Sr.Writable=DD(),Sr.Duplex=Rc(),Sr.Transform=jD(),Sr.PassThrough=bV())});var qD=b((NOe,_V)=>{_V.exports=Zhe;var Qhe=Object.prototype.hasOwnProperty;function Zhe(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)Qhe.call(r,i)&&(t[i]=r[i])}return t}});var SV=b((FOe,B0)=>{var AV=wV().Transform,IV=require("util").inherits,EV=qD();function vf(t){AV.call(this,t),this._destroyed=!1}IV(vf,AV);vf.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var e=this;process.nextTick(function(){t&&e.emit("error",t),e.emit("close")})}};function eme(t,e,r){r(null,t)}function WD(t){return function(e,r,i){return typeof e=="function"&&(i=r,r=e,e={}),typeof r!="function"&&(r=eme),typeof i!="function"&&(i=null),t(e,r,i)}}B0.exports=WD(function(t,e,r){var i=new vf(t);return i._transform=e,r&&(i._flush=r),i});B0.exports.ctor=WD(function(t,e,r){function i(n){if(!(this instanceof i))return new i(n);this.options=EV(t,n),vf.call(this,this.options)}return IV(i,vf),i.prototype._transform=e,r&&(i.prototype._flush=r),i});B0.exports.obj=WD(function(t,e,r){var i=new vf(EV({objectMode:!0,highWaterMark:16},t));return i._transform=e,r&&(i._flush=r),i})});var DV=b((BOe,dg)=>{"use strict";dg.exports=xV;dg.exports.ctor=VD;dg.exports.objCtor=rme;dg.exports.obj=ime;var tme=SV(),CV=qD();function VD(t,e){typeof t=="function"&&(e=t,t={});var r=tme.ctor(t,function(i,n,s){this.options.wantStrings&&(i=i.toString());try{return e.call(this,i,this._index++)&&this.push(i),s()}catch(o){return s(o)}});return r.prototype._index=0,r}function rme(t,e){return typeof t=="function"&&(e=t,t={}),t=CV({objectMode:!0,highWaterMark:16},t),VD(t,e)}function xV(t,e){return VD(t,e)()}function ime(t,e){return typeof t=="function"&&(e=t,t={}),t=CV({objectMode:!0,highWaterMark:16},t),xV(t,e)}});var LV=b((UOe,PV)=>{PV.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=e.space||"";typeof r=="number"&&(r=Array(r+1).join(" "));var i=typeof e.cycles=="boolean"?e.cycles:!1,n=e.replacer||function(a,u){return u},s=e.cmp&&function(a){return function(u){return function(c,l){var p={key:c,value:u[c]},f={key:l,value:u[l]};return a(p,f)}}}(e.cmp),o=[];return function a(u,c,l,p){var f=r?`
`+new Array(p+1).join(r):"",h=r?": ":":";if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l=n.call(u,c,l),l!==void 0){if(typeof l!="object"||l===null)return JSON.stringify(l);if(nme(l)){for(var g=[],H=0;H<l.length;H++){var v=a(l,H,l[H],p+1)||JSON.stringify(null);g.push(f+r+v)}return"["+g.join(",")+f+"]"}else{if(o.indexOf(l)!==-1){if(i)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else o.push(l);for(var w=sme(l).sort(s&&s(l)),g=[],H=0;H<w.length;H++){var c=w[H],T=a(l,c,l[c],p+1);if(T){var U=JSON.stringify(c)+h+T;g.push(f+r+U)}}return o.splice(o.indexOf(l),1),"{"+g.join(",")+f+"}"}}}({"":t},"",t,0)};var nme=Array.isArray||function(t){return{}.toString.call(t)==="[object Array]"},sme=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var i in t)e.call(t,i)&&r.push(i);return r}});var $V=b((jOe,TV)=>{"use strict";var ome=DV().obj,ame=LV(),GD;typeof global.Set=="function"?GD=global.Set:GD=function(){this.keys=[],this.has=function(t){return this.keys.indexOf(t)!==-1},this.add=function(t){this.keys.push(t)}};function ume(t){return function(e){return e[t]}}TV.exports=cme;function cme(t,e){e=e||new GD;var r=ame;return typeof t=="string"?r=ume(t):typeof t=="function"&&(r=t),ome(function(i){var n=r(i);return e.has(n)?!1:(e.add(n),!0)})}});var MV=b((qOe,RV)=>{var lme=Xp(),pme=jb(),KD=require("fs"),hg=function(){},fme=/^v?\.0/.test(process.version),U0=function(t){return typeof t=="function"},dme=function(t){return!fme||!KD?!1:(t instanceof(KD.ReadStream||hg)||t instanceof(KD.WriteStream||hg))&&U0(t.close)},hme=function(t){return t.setHeader&&U0(t.abort)},mme=function(t,e,r,i){i=lme(i);var n=!1;t.on("close",function(){n=!0}),pme(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,dme(t))return t.close(hg);if(hme(t))return t.abort();if(U0(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},kV=function(t){t()},gme=function(t,e){return t.pipe(e)},Hme=function(){var t=Array.prototype.slice.call(arguments),e=U0(t[t.length-1]||hg)&&t.pop()||hg;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,i=t.map(function(n,s){var o=s<t.length-1,a=s>0;return mme(n,o,a,function(u){r||(r=u),u&&i.forEach(kV),!o&&(i.forEach(kV),e(r))})});return t.reduce(gme)};RV.exports=Hme});var zD=b((WOe,OV)=>{OV.exports=require("stream")});var UV=b((VOe,BV)=>{"use strict";function NV(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function yme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NV(Object(r),!0).forEach(function(i){vme(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NV(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function vme(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FV(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function wme(t,e,r){return e&&FV(t.prototype,e),r&&FV(t,r),t}var _me=require("buffer"),j0=_me.Buffer,Ame=require("util"),XD=Ame.inspect,Ime=XD&&XD.custom||"inspect";function Eme(t,e,r){j0.prototype.copy.call(t,e,r)}BV.exports=function(){function t(){bme(this,t),this.head=null,this.tail=null,this.length=0}return wme(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return j0.alloc(0);for(var i=j0.allocUnsafe(r>>>0),n=this.head,s=0;n;)Eme(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=j0.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Ime,value:function(r,i){return XD(this,yme({},i,{depth:0,customInspect:!1}))}}]),t}()});var YD=b((GOe,qV)=>{"use strict";function Sme(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(JD,this,t)):process.nextTick(JD,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(q0,r):(r._writableState.errorEmitted=!0,process.nextTick(jV,r,s)):process.nextTick(jV,r,s):e?(process.nextTick(q0,r),e(s)):process.nextTick(q0,r)}),this)}function jV(t,e){JD(t,e),q0(t)}function q0(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Cme(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function JD(t,e){t.emit("error",e)}function xme(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}qV.exports={destroy:Sme,undestroy:Cme,errorOrDestroy:xme}});var uu=b((KOe,GV)=>{"use strict";var VV={};function yn(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,u){super(i(o,a,u))}}n.prototype.name=r.name,n.prototype.code=t,VV[t]=n}function WV(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Dme(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Pme(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Lme(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}yn("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);yn("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Dme(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Pme(t," argument"))n=`The ${t} ${i} ${WV(e,"type")}`;else{let s=Lme(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${WV(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);yn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");yn("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});yn("ERR_STREAM_PREMATURE_CLOSE","Premature close");yn("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});yn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");yn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");yn("ERR_STREAM_WRITE_AFTER_END","write after end");yn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);yn("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);yn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");GV.exports.codes=VV});var QD=b((zOe,KV)=>{"use strict";var Tme=uu().codes.ERR_INVALID_OPT_VALUE;function $me(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function kme(t,e,r,i){var n=$me(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Tme(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}KV.exports={getHighWaterMark:kme}});var tP=b((XOe,ZV)=>{"use strict";ZV.exports=Nt;function XV(t){var e=this;this.next=null,this.entry=null,this.finish=function(){age(e,t)}}var bf;Nt.WritableState=gg;var Rme={deprecate:E0()},JV=zD(),V0=require("buffer").Buffer,Mme=global.Uint8Array||function(){};function Ome(t){return V0.from(t)}function Nme(t){return V0.isBuffer(t)||t instanceof Mme}var eP=YD(),Fme=QD(),Bme=Fme.getHighWaterMark,cu=uu().codes,Ume=cu.ERR_INVALID_ARG_TYPE,jme=cu.ERR_METHOD_NOT_IMPLEMENTED,qme=cu.ERR_MULTIPLE_CALLBACK,Wme=cu.ERR_STREAM_CANNOT_PIPE,Vme=cu.ERR_STREAM_DESTROYED,Gme=cu.ERR_STREAM_NULL_VALUES,Kme=cu.ERR_STREAM_WRITE_AFTER_END,zme=cu.ERR_UNKNOWN_ENCODING,wf=eP.errorOrDestroy;ur()(Nt,JV);function Xme(){}function gg(t,e,r){bf=bf||Mc(),t=t||{},typeof r!="boolean"&&(r=e instanceof bf),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Bme(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){rge(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new XV(this)}gg.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(gg.prototype,"buffer",{get:Rme.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var W0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(W0=Function.prototype[Symbol.hasInstance],Object.defineProperty(Nt,Symbol.hasInstance,{value:function(e){return W0.call(this,e)?!0:this!==Nt?!1:e&&e._writableState instanceof gg}})):W0=function(e){return e instanceof this};function Nt(t){bf=bf||Mc();var e=this instanceof bf;if(!e&&!W0.call(Nt,this))return new Nt(t);this._writableState=new gg(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),JV.call(this)}Nt.prototype.pipe=function(){wf(this,new Wme)};function Jme(t,e){var r=new Kme;wf(t,r),process.nextTick(e,r)}function Yme(t,e,r,i){var n;return r===null?n=new Gme:typeof r!="string"&&!e.objectMode&&(n=new Ume("chunk",["string","Buffer"],r)),n?(wf(t,n),process.nextTick(i,n),!1):!0}Nt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Nme(t);return s&&!V0.isBuffer(t)&&(t=Ome(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Xme),i.ending?Jme(this,r):(s||Yme(this,i,t,r))&&(i.pendingcb++,n=Zme(this,i,s,t,e,r)),n};Nt.prototype.cork=function(){this._writableState.corked++};Nt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&YV(this,t))};Nt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new zme(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Nt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Qme(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=V0.from(e,r)),e}Object.defineProperty(Nt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Zme(t,e,r,i,n,s){if(!r){var o=Qme(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ZD(t,e,!1,a,i,n,s);return u}function ZD(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Vme("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function ege(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(mg,t,e),t._writableState.errorEmitted=!0,wf(t,i)):(n(i),t._writableState.errorEmitted=!0,wf(t,i),mg(t,e))}function tge(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function rge(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new qme;if(tge(r),e)ege(t,r,i,e,n);else{var s=QV(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&YV(t,r),i?process.nextTick(zV,t,r,s,n):zV(t,r,s,n)}}function zV(t,e,r,i){r||ige(t,e),e.pendingcb--,i(),mg(t,e)}function ige(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function YV(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,ZD(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new XV(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,p=e.objectMode?1:u.length;if(ZD(t,e,!1,p,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Nt.prototype._write=function(t,e,r){r(new jme("_write()"))};Nt.prototype._writev=null;Nt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||oge(this,i,r),this};Object.defineProperty(Nt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function QV(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function nge(t,e){t._final(function(r){e.pendingcb--,r&&wf(t,r),e.prefinished=!0,t.emit("prefinish"),mg(t,e)})}function sge(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(nge,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function mg(t,e){var r=QV(e);if(r&&(sge(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function oge(t,e,r){e.ending=!0,mg(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function age(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Nt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Nt.prototype.destroy=eP.destroy;Nt.prototype._undestroy=eP.undestroy;Nt.prototype._destroy=function(t,e){e(t)}});var Mc=b((JOe,t4)=>{"use strict";var uge=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t4.exports=zs;var e4=nP(),iP=tP();ur()(zs,e4);for(rP=uge(iP.prototype),G0=0;G0<rP.length;G0++)K0=rP[G0],zs.prototype[K0]||(zs.prototype[K0]=iP.prototype[K0]);var rP,K0,G0;function zs(t){if(!(this instanceof zs))return new zs(t);e4.call(this,t),iP.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",cge)))}Object.defineProperty(zs.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(zs.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(zs.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function cge(){this._writableState.ended||process.nextTick(lge,this)}function lge(t){t.end()}Object.defineProperty(zs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var n4=b((sP,i4)=>{var z0=require("buffer"),Xs=z0.Buffer;function r4(t,e){for(var r in t)e[r]=t[r]}Xs.from&&Xs.alloc&&Xs.allocUnsafe&&Xs.allocUnsafeSlow?i4.exports=z0:(r4(z0,sP),sP.Buffer=Oc);function Oc(t,e,r){return Xs(t,e,r)}Oc.prototype=Object.create(Xs.prototype);r4(Xs,Oc);Oc.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Xs(t,e,r)};Oc.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Xs(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Oc.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Xs(t)};Oc.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return z0.SlowBuffer(t)}});var uP=b(o4=>{"use strict";var aP=n4().Buffer,s4=aP.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function pge(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function fge(t){var e=pge(t);if(typeof e!="string"&&(aP.isEncoding===s4||!s4(t)))throw new Error("Unknown encoding: "+t);return e||t}o4.StringDecoder=Hg;function Hg(t){this.encoding=fge(t);var e;switch(this.encoding){case"utf16le":this.text=yge,this.end=vge,e=4;break;case"utf8":this.fillLast=mge,e=4;break;case"base64":this.text=bge,this.end=wge,e=3;break;default:this.write=_ge,this.end=Age;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=aP.allocUnsafe(e)}Hg.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Hg.prototype.end=Hge;Hg.prototype.text=gge;Hg.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function oP(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function dge(t,e,r){var i=e.length-1;if(i<r)return 0;var n=oP(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=oP(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=oP(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function hge(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function mge(t){var e=this.lastTotal-this.lastNeed,r=hge(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function gge(t,e){var r=dge(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Hge(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function yge(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function vge(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function bge(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function wge(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function _ge(t){return t.toString(this.encoding)}function Age(t){return t&&t.length?this.write(t):""}});var X0=b((QOe,c4)=>{"use strict";var a4=uu().codes.ERR_STREAM_PREMATURE_CLOSE;function Ige(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Ege(){}function Sge(t){return t.setHeader&&typeof t.abort=="function"}function u4(t,e,r){if(typeof e=="function")return u4(t,null,e);e||(e={}),r=Ige(r||Ege);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(t)},l=function(g){r.call(t,g)},p=function(){var g;if(i&&!u)return(!t._readableState||!t._readableState.ended)&&(g=new a4),r.call(t,g);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(g=new a4),r.call(t,g)},f=function(){t.req.on("finish",a)};return Sge(t)?(t.on("complete",a),t.on("abort",p),t.req?f():t.on("request",f)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",c),t.on("finish",a),e.error!==!1&&t.on("error",l),t.on("close",p),function(){t.removeListener("complete",a),t.removeListener("abort",p),t.removeListener("request",f),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",p)}}c4.exports=u4});var p4=b((ZOe,l4)=>{"use strict";var J0;function lu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cge=X0(),pu=Symbol("lastResolve"),Nc=Symbol("lastReject"),yg=Symbol("error"),Y0=Symbol("ended"),Fc=Symbol("lastPromise"),cP=Symbol("handlePromise"),Bc=Symbol("stream");function fu(t,e){return{value:t,done:e}}function xge(t){var e=t[pu];if(e!==null){var r=t[Bc].read();r!==null&&(t[Fc]=null,t[pu]=null,t[Nc]=null,e(fu(r,!1)))}}function Dge(t){process.nextTick(xge,t)}function Pge(t,e){return function(r,i){t.then(function(){if(e[Y0]){r(fu(void 0,!0));return}e[cP](r,i)},i)}}var Lge=Object.getPrototypeOf(function(){}),Tge=Object.setPrototypeOf((J0={get stream(){return this[Bc]},next:function(){var e=this,r=this[yg];if(r!==null)return Promise.reject(r);if(this[Y0])return Promise.resolve(fu(void 0,!0));if(this[Bc].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[yg]?a(e[yg]):o(fu(void 0,!0))})});var i=this[Fc],n;if(i)n=new Promise(Pge(i,this));else{var s=this[Bc].read();if(s!==null)return Promise.resolve(fu(s,!1));n=new Promise(this[cP])}return this[Fc]=n,n}},lu(J0,Symbol.asyncIterator,function(){return this}),lu(J0,"return",function(){var e=this;return new Promise(function(r,i){e[Bc].destroy(null,function(n){if(n){i(n);return}r(fu(void 0,!0))})})}),J0),Lge),$ge=function(e){var r,i=Object.create(Tge,(r={},lu(r,Bc,{value:e,writable:!0}),lu(r,pu,{value:null,writable:!0}),lu(r,Nc,{value:null,writable:!0}),lu(r,yg,{value:null,writable:!0}),lu(r,Y0,{value:e._readableState.endEmitted,writable:!0}),lu(r,cP,{value:function(s,o){var a=i[Bc].read();a?(i[Fc]=null,i[pu]=null,i[Nc]=null,s(fu(a,!1))):(i[pu]=s,i[Nc]=o)},writable:!0}),r));return i[Fc]=null,Cge(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Nc];s!==null&&(i[Fc]=null,i[pu]=null,i[Nc]=null,s(n)),i[yg]=n;return}var o=i[pu];o!==null&&(i[Fc]=null,i[pu]=null,i[Nc]=null,o(fu(void 0,!0))),i[Y0]=!0}),e.on("readable",Dge.bind(null,i)),i};l4.exports=$ge});var m4=b((eNe,h4)=>{"use strict";function f4(t,e,r,i,n,s,o){try{var a=t[s](o),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(i,n)}function kge(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(u){f4(s,i,n,o,a,"next",u)}function a(u){f4(s,i,n,o,a,"throw",u)}o(void 0)})}}function d4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Rge(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?d4(Object(r),!0).forEach(function(i){Mge(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d4(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Mge(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oge=uu().codes.ERR_INVALID_ARG_TYPE;function Nge(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Oge("iterable",["Iterable"],e);var n=new t(Rge({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=kge(function*(){try{var u=yield i.next(),c=u.value,l=u.done;l?n.push(null):n.push(yield c)?o():s=!1}catch(p){n.destroy(p)}}),a.apply(this,arguments)}return n}h4.exports=Nge});var nP=b((rNe,E4)=>{"use strict";E4.exports=Ue;var _f;Ue.ReadableState=v4;var tNe=require("events").EventEmitter,y4=function(e,r){return e.listeners(r).length},bg=zD(),Q0=require("buffer").Buffer,Fge=global.Uint8Array||function(){};function Bge(t){return Q0.from(t)}function Uge(t){return Q0.isBuffer(t)||t instanceof Fge}var lP=require("util"),De;lP&&lP.debuglog?De=lP.debuglog("stream"):De=function(){};var jge=UV(),HP=YD(),qge=QD(),Wge=qge.getHighWaterMark,Z0=uu().codes,Vge=Z0.ERR_INVALID_ARG_TYPE,Gge=Z0.ERR_STREAM_PUSH_AFTER_EOF,Kge=Z0.ERR_METHOD_NOT_IMPLEMENTED,zge=Z0.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Af,pP,fP;ur()(Ue,bg);var vg=HP.errorOrDestroy,dP=["error","close","destroy","pause","resume"];function Xge(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function v4(t,e,r){_f=_f||Mc(),t=t||{},typeof r!="boolean"&&(r=e instanceof _f),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Wge(this,t,"readableHighWaterMark",r),this.buffer=new jge,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Af||(Af=uP().StringDecoder),this.decoder=new Af(t.encoding),this.encoding=t.encoding)}function Ue(t){if(_f=_f||Mc(),!(this instanceof Ue))return new Ue(t);var e=this instanceof _f;this._readableState=new v4(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),bg.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=HP.destroy;Ue.prototype._undestroy=HP.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Q0.from(t,e),e=""),i=!0),b4(this,t,e,!1,i)};Ue.prototype.unshift=function(t){return b4(this,t,null,!0,!1)};function b4(t,e,r,i,n){De("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Qge(t,s);else{var o;if(n||(o=Jge(s,e)),o)vg(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Q0.prototype&&(e=Bge(e)),i)s.endEmitted?vg(t,new zge):hP(t,s,e,!0);else if(s.ended)vg(t,new Gge);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?hP(t,s,e,!1):gP(t,s)):hP(t,s,e,!1)}else i||(s.reading=!1,gP(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function hP(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ew(t)),gP(t,e)}function Jge(t,e){var r;return!Uge(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Vge("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){Af||(Af=uP().StringDecoder);var e=new Af(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var g4=1073741824;function Yge(t){return t>=g4?t=g4:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function H4(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Yge(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){De("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return De("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?mP(this):ew(this),null;if(t=H4(t,e),t===0&&e.ended)return e.length===0&&mP(this),null;var i=e.needReadable;De("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,De("length less than watermark",i)),e.ended||e.reading?(i=!1,De("reading or ended",i)):i&&(De("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=H4(r,e)));var n;return t>0?n=A4(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&mP(this)),n!==null&&this.emit("data",n),n};function Qge(t,e){if(De("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?ew(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,w4(t)))}}function ew(t){var e=t._readableState;De("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(De("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(w4,t))}function w4(t){var e=t._readableState;De("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,yP(t)}function gP(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Zge,t,e))}function Zge(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(De("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){vg(this,new Kge("_read()"))};Ue.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,De("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:H;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,w){De("onunpipe"),v===r&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,l())}function a(){De("onend"),t.end()}var u=eHe(r);t.on("drain",u);var c=!1;function l(){De("cleanup"),t.removeListener("close",h),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",f),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",H),r.removeListener("data",p),c=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",p);function p(v){De("ondata");var w=t.write(v);De("dest.write",w),w===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&I4(i.pipes,t)!==-1)&&!c&&(De("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function f(v){De("onerror",v),H(),t.removeListener("error",f),y4(t,"error")===0&&vg(t,v)}Xge(t,"error",f);function h(){t.removeListener("finish",g),H()}t.once("close",h);function g(){De("onfinish"),t.removeListener("close",h),H()}t.once("finish",g);function H(){De("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(De("pipe resume"),r.resume()),t};function eHe(t){return function(){var r=t._readableState;De("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&y4(t,"data")&&(r.flowing=!0,yP(t))}}Ue.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=I4(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ue.prototype.on=function(t,e){var r=bg.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,De("on readable",i.length,i.reading),i.length?ew(this):i.reading||process.nextTick(tHe,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=bg.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(_4,this),r};Ue.prototype.removeAllListeners=function(t){var e=bg.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(_4,this),e};function _4(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function tHe(t){De("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(De("resume"),t.flowing=!t.readableListening,rHe(this,t)),t.paused=!1,this};function rHe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(iHe,t,e))}function iHe(t,e){De("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),yP(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return De("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(De("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function yP(t){var e=t._readableState;for(De("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(De("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(De("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var s=0;s<dP.length;s++)t.on(dP[s],this.emit.bind(this,dP[s]));return this._read=function(o){De("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return pP===void 0&&(pP=p4()),pP(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=A4;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function A4(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function mP(t){var e=t._readableState;De("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(nHe,e,t))}function nHe(t,e){if(De("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ue.from=function(t,e){return fP===void 0&&(fP=m4()),fP(Ue,t,e)});function I4(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var vP=b((iNe,C4)=>{"use strict";C4.exports=No;var tw=uu().codes,sHe=tw.ERR_METHOD_NOT_IMPLEMENTED,oHe=tw.ERR_MULTIPLE_CALLBACK,aHe=tw.ERR_TRANSFORM_ALREADY_TRANSFORMING,uHe=tw.ERR_TRANSFORM_WITH_LENGTH_0,rw=Mc();ur()(No,rw);function cHe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new oHe);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function No(t){if(!(this instanceof No))return new No(t);rw.call(this,t),this._transformState={afterTransform:cHe.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",lHe)}function lHe(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){S4(t,e,r)}):S4(this,null,null)}No.prototype.push=function(t,e){return this._transformState.needTransform=!1,rw.prototype.push.call(this,t,e)};No.prototype._transform=function(t,e,r){r(new sHe("_transform()"))};No.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};No.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};No.prototype._destroy=function(t,e){rw.prototype._destroy.call(this,t,function(r){e(r)})};function S4(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new uHe;if(t._transformState.transforming)throw new aHe;return t.push(null)}});var P4=b((nNe,D4)=>{"use strict";D4.exports=wg;var x4=vP();ur()(wg,x4);function wg(t){if(!(this instanceof wg))return new wg(t);x4.call(this,t)}wg.prototype._transform=function(t,e,r){r(null,t)}});var R4=b((sNe,k4)=>{"use strict";var bP;function pHe(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var $4=uu().codes,fHe=$4.ERR_MISSING_ARGS,dHe=$4.ERR_STREAM_DESTROYED;function L4(t){if(t)throw t}function hHe(t){return t.setHeader&&typeof t.abort=="function"}function mHe(t,e,r,i){i=pHe(i);var n=!1;t.on("close",function(){n=!0}),bP===void 0&&(bP=X0()),bP(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,hHe(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new dHe("pipe"))}}}function T4(t){t()}function gHe(t,e){return t.pipe(e)}function HHe(t){return!t.length||typeof t[t.length-1]!="function"?L4:t.pop()}function yHe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=HHe(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new fHe("streams");var n,s=e.map(function(o,a){var u=a<e.length-1,c=a>0;return mHe(o,u,c,function(l){n||(n=l),l&&s.forEach(T4),!u&&(s.forEach(T4),i(n))})});return e.reduce(gHe)}k4.exports=yHe});var wP=b((vn,Ag)=>{var _g=require("stream");process.env.READABLE_STREAM==="disable"&&_g?(Ag.exports=_g.Readable,Object.assign(Ag.exports,_g),Ag.exports.Stream=_g):(vn=Ag.exports=nP(),vn.Stream=_g||vn,vn.Readable=vn,vn.Writable=tP(),vn.Duplex=Mc(),vn.Transform=vP(),vn.PassThrough=P4(),vn.finished=X0(),vn.pipeline=R4())});var O4=b((oNe,M4)=>{M4.exports=vHe;function vHe(t){var e=t._readableState;return e?e.objectMode?t.read():t.read(bHe(e)):null}function bHe(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}});var j4=b((aNe,U4)=>{var iw=wP(),N4=jb(),wHe=ur(),_He=O4(),F4=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),_P=function(t,e){t._corked?t.once("uncork",e):e()},AHe=function(t,e){t._autoDestroy&&t.destroy(e)},B4=function(t,e){return function(r){r?AHe(t,r.message==="premature close"?null:r):e&&!t._ended&&t.end()}},IHe=function(t,e){if(!t||t._writableState&&t._writableState.finished)return e();if(t._writableState)return t.end(e);t.end(),e()},EHe=function(){},SHe=function(t){return new iw.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},Cr=function(t,e,r){if(!(this instanceof Cr))return new Cr(t,e,r);iw.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};wHe(Cr,iw.Duplex);Cr.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new Cr(t,e,r)};Cr.prototype.cork=function(){++this._corked===1&&this.emit("cork")};Cr.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};Cr.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.end();return}var e=this,r=N4(t,{writable:!0,readable:!1},B4(this,this._forwardEnd)),i=function(){var s=e._ondrain;e._ondrain=null,s&&s()},n=function(){e._writable.removeListener("drain",i),r()};this._unwrite&&process.nextTick(i),this._writable=t,this._writable.on("drain",i),this._unwrite=n,this.uncork()};Cr.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.push(null),this.resume();return}var e=this,r=N4(t,{writable:!1,readable:!0},B4(this)),i=function(){e._forward()},n=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",i),e._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:SHe(t),this._readable2.on("readable",i),this._readable2.on("end",n),this._unread=s,this._forward()};Cr.prototype._read=function(){this._drained=!0,this._forward()};Cr.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var t;this._drained&&(t=_He(this._readable2))!==null;)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}};Cr.prototype.destroy=function(t,e){if(e||(e=EHe),this.destroyed)return e(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(t),e(null)})};Cr.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};Cr.prototype._write=function(t,e,r){if(!this.destroyed){if(this._corked)return _P(this,this._write.bind(this,t,e,r));if(t===F4)return this._finish(r);if(!this._writable)return r();this._writable.write(t)===!1?this._ondrain=r:this.destroyed||r()}};Cr.prototype._finish=function(t){var e=this;this.emit("preend"),_P(this,function(){IHe(e._forwardEnd&&e._writable,function(){e._writableState.prefinished===!1&&(e._writableState.prefinished=!0),e.emit("prefinish"),_P(e,t)})})};Cr.prototype.end=function(t,e,r){return typeof t=="function"?this.end(null,null,t):typeof e=="function"?this.end(t,null,e):(this._ended=!0,t&&this.write(t),!this._writableState.ending&&!this._writableState.destroyed&&this.write(F4),iw.Writable.prototype.end.call(this,r))};U4.exports=Cr});var V4=b((uNe,nw)=>{var CHe=MV(),xHe=ur(),q4=j4(),W4=function(t){return t.length?Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t):[]},AP=function(t){var e=function(){var r=W4(arguments);if(!(this instanceof e))return new e(r);q4.call(this,null,null,t),r.length&&this.setPipeline(r)};return xHe(e,q4),e.prototype.setPipeline=function(){var r=W4(arguments),i=this,n=!1,s=r[0],o=r[r.length-1];o=o.readable?o:null,s=s.writable?s:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||i.cork()}),CHe(r,function(u){if(i.removeListener("close",a),u)return i.destroy(u.message==="premature close"?null:u);n=!0,i._autoDestroy===!1&&(i._autoDestroy=!0),i.uncork()}),this.destroyed)return a();this.setWritable(s),this.setReadable(o)},e};nw.exports=AP({autoDestroy:!1,destroy:!1});nw.exports.obj=AP({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});nw.exports.ctor=AP});var IP=b((cNe,G4)=>{"use strict";G4.exports=function(t){if(typeof t!="string")throw new TypeError("expected a string");var e={negated:!1,pattern:t,original:t};return t.charAt(0)==="!"&&t.charAt(1)!=="("&&(e.negated=!0,e.pattern=t.slice(1)),e}});var EP=b((lNe,e5)=>{"use strict";var sw=Object.prototype.hasOwnProperty,Z4=Object.prototype.toString,K4=Object.defineProperty,z4=Object.getOwnPropertyDescriptor,X4=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Z4.call(e)==="[object Array]"},J4=function(e){if(!e||Z4.call(e)!=="[object Object]")return!1;var r=sw.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&sw.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;var n;for(n in e);return typeof n>"u"||sw.call(e,n)},Y4=function(e,r){K4&&r.name==="__proto__"?K4(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Q4=function(e,r){if(r==="__proto__")if(sw.call(e,r)){if(z4)return z4(e,r).value}else return;return e[r]};e5.exports=function t(){var e,r,i,n,s,o,a=arguments[0],u=1,c=arguments.length,l=!1;for(typeof a=="boolean"&&(l=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(e=arguments[u],e!=null)for(r in e)i=Q4(a,r),n=Q4(e,r),a!==n&&(l&&n&&(J4(n)||(s=X4(n)))?(s?(s=!1,o=i&&X4(i)?i:[]):o=i&&J4(i)?i:{},Y4(a,{name:r,newValue:t(l,o,n)})):typeof n<"u"&&Y4(a,{name:r,newValue:n}));return a}});var t5=b(SP=>{var Uc=require("path"),hu=process.platform==="win32",du=require("fs"),DHe=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function PHe(){var t;if(DHe){var e=new Error;t=r}else t=i;return t;function r(n){n&&(e.message=n.message,n=e,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var s="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function LHe(t){return typeof t=="function"?t:PHe()}var pNe=Uc.normalize;hu?Fo=/(.*?)(?:[\/\\]+|$)/g:Fo=/(.*?)(?:[\/]+|$)/g;var Fo;hu?Ig=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:Ig=/^[\/]*/;var Ig;SP.realpathSync=function(e,r){if(e=Uc.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var i=e,n={},s={},o,a,u,c;l();function l(){var v=Ig.exec(e);o=v[0].length,a=v[0],u=v[0],c="",hu&&!s[u]&&(du.lstatSync(u),s[u]=!0)}for(;o<e.length;){Fo.lastIndex=o;var p=Fo.exec(e);if(c=a,a+=p[0],u=c+p[1],o=Fo.lastIndex,!(s[u]||r&&r[u]===u)){var f;if(r&&Object.prototype.hasOwnProperty.call(r,u))f=r[u];else{var h=du.lstatSync(u);if(!h.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var g=null;if(!hu){var H=h.dev.toString(32)+":"+h.ino.toString(32);n.hasOwnProperty(H)&&(g=n[H])}g===null&&(du.statSync(u),g=du.readlinkSync(u)),f=Uc.resolve(c,g),r&&(r[u]=f),hu||(n[H]=g)}e=Uc.resolve(f,e.slice(o)),l()}}return r&&(r[i]=e),e};SP.realpath=function(e,r,i){if(typeof i!="function"&&(i=LHe(r),r=null),e=Uc.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(i.bind(null,null,r[e]));var n=e,s={},o={},a,u,c,l;p();function p(){var v=Ig.exec(e);a=v[0].length,u=v[0],c=v[0],l="",hu&&!o[c]?du.lstat(c,function(w){if(w)return i(w);o[c]=!0,f()}):process.nextTick(f)}function f(){if(a>=e.length)return r&&(r[n]=e),i(null,e);Fo.lastIndex=a;var v=Fo.exec(e);return l=u,u+=v[0],c=l+v[1],a=Fo.lastIndex,o[c]||r&&r[c]===c?process.nextTick(f):r&&Object.prototype.hasOwnProperty.call(r,c)?H(r[c]):du.lstat(c,h)}function h(v,w){if(v)return i(v);if(!w.isSymbolicLink())return o[c]=!0,r&&(r[c]=c),process.nextTick(f);if(!hu){var T=w.dev.toString(32)+":"+w.ino.toString(32);if(s.hasOwnProperty(T))return g(null,s[T],c)}du.stat(c,function(U){if(U)return i(U);du.readlink(c,function(x,P){hu||(s[T]=P),g(x,P)})})}function g(v,w,T){if(v)return i(v);var U=Uc.resolve(l,w);r&&(r[T]=U),H(U)}function H(v){e=Uc.resolve(v,e.slice(a)),p()}}});var PP=b((dNe,s5)=>{s5.exports=mu;mu.realpath=mu;mu.sync=DP;mu.realpathSync=DP;mu.monkeypatch=$He;mu.unmonkeypatch=kHe;var If=require("fs"),CP=If.realpath,xP=If.realpathSync,THe=process.version,r5=/^v[0-5]\./.test(THe),i5=t5();function n5(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function mu(t,e,r){if(r5)return CP(t,e,r);typeof e=="function"&&(r=e,e=null),CP(t,e,function(i,n){n5(i)?i5.realpath(t,e,r):r(i,n)})}function DP(t,e){if(r5)return xP(t,e);try{return xP(t,e)}catch(r){if(n5(r))return i5.realpathSync(t,e);throw r}}function $He(){If.realpath=mu,If.realpathSync=DP}function kHe(){If.realpath=CP,If.realpathSync=xP}});var a5=b((hNe,o5)=>{o5.exports=function(t,e){for(var r=[],i=0;i<t.length;i++){var n=e(t[i],i);RHe(n)?r.push.apply(r,n):r.push(n)}return r};var RHe=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var f5=b((mNe,p5)=>{"use strict";p5.exports=c5;function c5(t,e,r){t instanceof RegExp&&(t=u5(t,r)),e instanceof RegExp&&(e=u5(e,r));var i=l5(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function u5(t,e){var r=e.match(t);return r?r[0]:null}c5.range=l5;function l5(t,e,r){var i,n,s,o,a,u=r.indexOf(t),c=r.indexOf(e,u+1),l=u;if(u>=0&&c>0){for(i=[],s=r.length;l>=0&&!a;)l==u?(i.push(l),u=r.indexOf(t,l+1)):i.length==1?a=[i.pop(),c]:(n=i.pop(),n<s&&(s=n,o=c),c=r.indexOf(e,l+1)),l=u<c&&u>=0?u:c;i.length&&(a=[s,o])}return a}});var b5=b((gNe,v5)=>{var MHe=a5(),d5=f5();v5.exports=FHe;var h5="\0SLASH"+Math.random()+"\0",m5="\0OPEN"+Math.random()+"\0",TP="\0CLOSE"+Math.random()+"\0",g5="\0COMMA"+Math.random()+"\0",H5="\0PERIOD"+Math.random()+"\0";function LP(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function OHe(t){return t.split("\\\\").join(h5).split("\\{").join(m5).split("\\}").join(TP).split("\\,").join(g5).split("\\.").join(H5)}function NHe(t){return t.split(h5).join("\\").split(m5).join("{").split(TP).join("}").split(g5).join(",").split(H5).join(".")}function y5(t){if(!t)return[""];var e=[],r=d5("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,o=i.split(",");o[o.length-1]+="{"+n+"}";var a=y5(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function FHe(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Ef(OHe(t),!0).map(NHe)):[]}function BHe(t){return"{"+t+"}"}function UHe(t){return/^-?0\d/.test(t)}function jHe(t,e){return t<=e}function qHe(t,e){return t>=e}function Ef(t,e){var r=[],i=d5("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),o=n||s,a=i.body.indexOf(",")>=0;if(!o&&!a)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+TP+i.post,Ef(t)):[t];var u;if(o)u=i.body.split(/\.\./);else if(u=y5(i.body),u.length===1&&(u=Ef(u[0],!1).map(BHe),u.length===1)){var l=i.post.length?Ef(i.post,!1):[""];return l.map(function(E){return i.pre+u[0]+E})}var c=i.pre,l=i.post.length?Ef(i.post,!1):[""],p;if(o){var f=LP(u[0]),h=LP(u[1]),g=Math.max(u[0].length,u[1].length),H=u.length==3?Math.abs(LP(u[2])):1,v=jHe,w=h<f;w&&(H*=-1,v=qHe);var T=u.some(UHe);p=[];for(var U=f;v(U,h);U+=H){var x;if(s)x=String.fromCharCode(U),x==="\\"&&(x="");else if(x=String(U),T){var P=g-x.length;if(P>0){var q=new Array(P+1).join("0");U<0?x="-"+q+x.slice(1):x=q+x}}p.push(x)}}else p=MHe(u,function(O){return Ef(O,!1)});for(var j=0;j<p.length;j++)for(var F=0;F<l.length;F++){var $=c+p[j]+l[F];(!e||o||$)&&r.push($)}return r}});var uw=b((HNe,E5)=>{E5.exports=Vi;Vi.Minimatch=xr;var Eg=function(){try{return require("path")}catch{}}()||{sep:"/"};Vi.sep=Eg.sep;var RP=Vi.GLOBSTAR=xr.GLOBSTAR={},WHe=b5(),w5={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},$P="[^/]",kP=$P+"*?",VHe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",GHe="(?:(?!(?:\\/|^)\\.).)*?",_5=KHe("().*{}+?[]^$\\!");function KHe(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var A5=/\/+/;Vi.filter=zHe;function zHe(t,e){return e=e||{},function(r,i,n){return Vi(r,t,e)}}function gu(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(i){r[i]=t[i]}),Object.keys(e).forEach(function(i){r[i]=e[i]}),r}Vi.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return Vi;var e=Vi,r=function(n,s,o){return e(n,s,gu(t,o))};return r.Minimatch=function(n,s){return new e.Minimatch(n,gu(t,s))},r.Minimatch.defaults=function(n){return e.defaults(gu(t,n)).Minimatch},r.filter=function(n,s){return e.filter(n,gu(t,s))},r.defaults=function(n){return e.defaults(gu(t,n))},r.makeRe=function(n,s){return e.makeRe(n,gu(t,s))},r.braceExpand=function(n,s){return e.braceExpand(n,gu(t,s))},r.match=function(i,n,s){return e.match(i,n,gu(t,s))},r};xr.defaults=function(t){return Vi.defaults(t).Minimatch};function Vi(t,e,r){return aw(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new xr(e,r).match(t)}function xr(t,e){if(!(this instanceof xr))return new xr(t,e);aw(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&Eg.sep!=="/"&&(t=t.split(Eg.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}xr.prototype.debug=function(){};xr.prototype.make=XHe;function XHe(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(i){return i.split(A5)}),this.debug(this.pattern,r),r=r.map(function(i,n,s){return i.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}xr.prototype.parseNegate=JHe;function JHe(){var t=this.pattern,e=!1,r=this.options,i=0;if(!r.nonegate){for(var n=0,s=t.length;n<s&&t.charAt(n)==="!";n++)e=!e,i++;i&&(this.pattern=t.substr(i)),this.negate=e}}Vi.braceExpand=function(t,e){return I5(t,e)};xr.prototype.braceExpand=I5;function I5(t,e){return e||(this instanceof xr?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,aw(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:WHe(t)}var YHe=1024*64,aw=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>YHe)throw new TypeError("pattern is too long")};xr.prototype.parse=QHe;var ow={};function QHe(t,e){aw(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return RP;if(t==="")return"";var i="",n=!!r.nocase,s=!1,o=[],a=[],u,c=!1,l=-1,p=-1,f=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",h=this;function g(){if(u){switch(u){case"*":i+=kP,n=!0;break;case"?":i+=$P,n=!0;break;default:i+="\\"+u;break}h.debug("clearStateChar %j %j",u,i),u=!1}}for(var H=0,v=t.length,w;H<v&&(w=t.charAt(H));H++){if(this.debug("%s	%s %s %j",t,H,i,w),s&&_5[w]){i+="\\"+w,s=!1;continue}switch(w){case"/":return!1;case"\\":g(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s	%s %s %j <-- stateChar",t,H,i,w),c){this.debug("  in class"),w==="!"&&H===p+1&&(w="^"),i+=w;continue}h.debug("call clearStateChar %j",u),g(),u=w,r.noext&&g();continue;case"(":if(c){i+="(";continue}if(!u){i+="\\(";continue}o.push({type:u,start:H-1,reStart:i.length,open:w5[u].open,close:w5[u].close}),i+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,i),u=!1;continue;case")":if(c||!o.length){i+="\\)";continue}g(),n=!0;var T=o.pop();i+=T.close,T.type==="!"&&a.push(T),T.reEnd=i.length;continue;case"|":if(c||!o.length||s){i+="\\|",s=!1;continue}g(),i+="|";continue;case"[":if(g(),c){i+="\\"+w;continue}c=!0,p=H,l=i.length,i+=w;continue;case"]":if(H===p+1||!c){i+="\\"+w,s=!1;continue}var U=t.substring(p+1,H);try{RegExp("["+U+"]")}catch{var x=this.parse(U,ow);i=i.substr(0,l)+"\\["+x[0]+"\\]",n=n||x[1],c=!1;continue}n=!0,c=!1,i+=w;continue;default:g(),s?s=!1:_5[w]&&!(w==="^"&&c)&&(i+="\\"),i+=w}}for(c&&(U=t.substr(p+1),x=this.parse(U,ow),i=i.substr(0,l)+"\\["+x[0],n=n||x[1]),T=o.pop();T;T=o.pop()){var P=i.slice(T.reStart+T.open.length);this.debug("setting tail",i,T),P=P.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(J,te,ce){return ce||(ce="\\"),te+te+ce+"|"}),this.debug(`tail=%j
   %s`,P,P,T,i);var q=T.type==="*"?kP:T.type==="?"?$P:"\\"+T.type;n=!0,i=i.slice(0,T.reStart)+q+"\\("+P}g(),s&&(i+="\\\\");var j=!1;switch(i.charAt(0)){case"[":case".":case"(":j=!0}for(var F=a.length-1;F>-1;F--){var $=a[F],O=i.slice(0,$.reStart),E=i.slice($.reStart,$.reEnd-8),M=i.slice($.reEnd-8,$.reEnd),N=i.slice($.reEnd);M+=N;var z=O.split("(").length-1,D=N;for(H=0;H<z;H++)D=D.replace(/\)[+*?]?/,"");N=D;var L="";N===""&&e!==ow&&(L="$");var ee=O+E+N+L+M;i=ee}if(i!==""&&n&&(i="(?=.)"+i),j&&(i=f+i),e===ow)return[i,n];if(!n)return eye(t);var re=r.nocase?"i":"";try{var ie=new RegExp("^"+i+"$",re)}catch{return new RegExp("$.")}return ie._glob=t,ie._src=i,ie}Vi.makeRe=function(t,e){return new xr(t,e||{}).makeRe()};xr.prototype.makeRe=ZHe;function ZHe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?kP:e.dot?VHe:GHe,i=e.nocase?"i":"",n=t.map(function(s){return s.map(function(o){return o===RP?r:typeof o=="string"?tye(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}Vi.match=function(t,e,r){r=r||{};var i=new xr(e,r);return t=t.filter(function(n){return i.match(n)}),i.options.nonull&&!t.length&&t.push(e),t};xr.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var i=this.options;Eg.sep!=="/"&&(e=e.split(Eg.sep).join("/")),e=e.split(A5),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],u=e;i.matchBase&&a.length===1&&(u=[s]);var c=this.matchOne(u,a,r);if(c)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};xr.prototype.matchOne=function(t,e,r){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,s=0,o=t.length,a=e.length;n<o&&s<a;n++,s++){this.debug("matchOne loop");var u=e[s],c=t[n];if(this.debug(e,u,c),u===!1)return!1;if(u===RP){this.debug("GLOBSTAR",[e,u,c]);var l=n,p=s+1;if(p===a){for(this.debug("** at the end");n<o;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;l<o;){var f=t[l];if(this.debug(`
globstar while`,t,l,e,p,f),this.matchOne(t.slice(l),e.slice(p),r))return this.debug("globstar found match!",l,o,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,l,e,p);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
>>> no match, partial?`,t,l,e,p),l===o))}var h;if(typeof u=="string"?(h=c===u,this.debug("string match",u,c,h)):(h=c.match(u),this.debug("pattern match",u,c,h)),!h)return!1}if(n===o&&s===a)return!0;if(n===o)return r;if(s===a)return n===o-1&&t[n]==="";throw new Error("wtf?")};function eye(t){return t.replace(/\\(.)/g,"$1")}function tye(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var lw=b((yNe,cw)=>{"use strict";function S5(t){return t.charAt(0)==="/"}function C5(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=e.exec(t),i=r[1]||"",n=Boolean(i&&i.charAt(1)!==":");return Boolean(r[2]||n)}cw.exports=process.platform==="win32"?C5:S5;cw.exports.posix=S5;cw.exports.win32=C5});var OP=b(Hu=>{Hu.setopts=aye;Hu.ownProp=x5;Hu.makeAbs=Sg;Hu.finish=uye;Hu.mark=cye;Hu.isIgnored=P5;Hu.childrenIgnored=lye;function x5(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var rye=require("fs"),Sf=require("path"),iye=uw(),D5=lw(),MP=iye.Minimatch;function nye(t,e){return t.localeCompare(e,"en")}function sye(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(oye))}function oye(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new MP(r,{dot:!0})}return{matcher:new MP(t,{dot:!0}),gmatcher:e}}function aye(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||rye,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),sye(t,r),t.changedCwd=!1;var i=process.cwd();x5(r,"cwd")?(t.cwd=Sf.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=i,t.root=r.root||Sf.resolve(t.cwd,"/"),t.root=Sf.resolve(t.root),process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/")),t.cwdAbs=D5(t.cwd)?t.cwd:Sg(t,t.cwd),process.platform==="win32"&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),t.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,t.minimatch=new MP(e,r),t.options=t.minimatch.options}function uye(t){for(var e=t.nounique,r=e?[]:Object.create(null),i=0,n=t.matches.length;i<n;i++){var s=t.matches[i];if(!s||Object.keys(s).length===0){if(t.nonull){var o=t.minimatch.globSet[i];e?r.push(o):r[o]=!0}}else{var a=Object.keys(s);e?r.push.apply(r,a):a.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(nye)),t.mark){for(var i=0;i<r.length;i++)r[i]=t._mark(r[i]);t.nodir&&(r=r.filter(function(u){var c=!/\/$/.test(u),l=t.cache[u]||t.cache[Sg(t,u)];return c&&l&&(c=l!=="DIR"&&!Array.isArray(l)),c}))}t.ignore.length&&(r=r.filter(function(u){return!P5(t,u)})),t.found=r}function cye(t,e){var r=Sg(t,e),i=t.cache[r],n=e;if(i){var s=i==="DIR"||Array.isArray(i),o=e.slice(-1)==="/";if(s&&!o?n+="/":!s&&o&&(n=n.slice(0,-1)),n!==e){var a=Sg(t,n);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return n}function Sg(t,e){var r=e;return e.charAt(0)==="/"?r=Sf.join(t.root,e):D5(e)||e===""?r=e:t.changedCwd?r=Sf.resolve(t.cwd,e):r=Sf.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function P5(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function lye(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var R5=b((ANe,k5)=>{k5.exports=$5;$5.GlobSync=cr;var pye=PP(),L5=uw(),bNe=L5.Minimatch,wNe=BP().Glob,_Ne=require("util"),NP=require("path"),T5=require("assert"),pw=lw(),jc=OP(),fye=jc.setopts,FP=jc.ownProp,dye=jc.childrenIgnored,hye=jc.isIgnored;function $5(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);return new cr(t,e).found}function cr(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof cr))return new cr(t,e);if(fye(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}cr.prototype._finish=function(){if(T5(this instanceof cr),this.realpath){var t=this;this.matches.forEach(function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n);var s=pye.realpathSync(n,t.realpathCache);i[s]=!0}catch(o){if(o.syscall==="stat")i[t._makeAbs(n)]=!0;else throw o}})}jc.finish(this)};cr.prototype._process=function(t,e,r){T5(this instanceof cr);for(var i=0;typeof t[i]=="string";)i++;var n;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i),o;n===null?o=".":((pw(n)||pw(t.join("/")))&&(!n||!pw(n))&&(n="/"+n),o=n);var a=this._makeAbs(o);if(!dye(this,o)){var u=s[0]===L5.GLOBSTAR;u?this._processGlobStar(n,o,a,s,e,r):this._processReaddir(n,o,a,s,e,r)}};cr.prototype._processReaddir=function(t,e,r,i,n,s){var o=this._readdir(r,s);if(o){for(var a=i[0],u=!!this.minimatch.negate,c=a._glob,l=this.dot||c.charAt(0)===".",p=[],f=0;f<o.length;f++){var h=o[f];if(h.charAt(0)!=="."||l){var g;u&&!t?g=!h.match(a):g=h.match(a),g&&p.push(h)}}var H=p.length;if(H!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var f=0;f<H;f++){var h=p[f];t&&(t.slice(-1)!=="/"?h=t+"/"+h:h=t+h),h.charAt(0)==="/"&&!this.nomount&&(h=NP.join(this.root,h)),this._emitMatch(n,h)}return}i.shift();for(var f=0;f<H;f++){var h=p[f],v;t?v=[t,h]:v=[h],this._process(v.concat(i),n,s)}}}};cr.prototype._emitMatch=function(t,e){if(!hye(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};cr.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,i;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,!n&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};cr.prototype._readdir=function(t,e){var r;if(e&&!FP(this.symlinks,t))return this._readdirInGlobStar(t);if(FP(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(n){return this._readdirError(t,n),null}};cr.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var i=e[r];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};cr.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};cr.prototype._processGlobStar=function(t,e,r,i,n,s){var o=this._readdir(r,s);if(o){var a=i.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,n,!1);var l=o.length,p=this.symlinks[r];if(!(p&&s))for(var f=0;f<l;f++){var h=o[f];if(!(h.charAt(0)==="."&&!this.dot)){var g=u.concat(o[f],a);this._process(g,n,!0);var H=u.concat(o[f],i);this._process(H,n,!0)}}}};cr.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&pw(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=NP.join(this.root,t):(t=NP.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};cr.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&FP(this.cache,e)){var o=this.cache[e];if(Array.isArray(o)&&(o="DIR"),!r||o==="DIR")return o;if(r&&o==="FILE")return!1}var i,n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(a){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch{n=s}else n=s}this.statCache[e]=n;var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,r&&o==="FILE"?!1:o};cr.prototype._mark=function(t){return jc.mark(this,t)};cr.prototype._makeAbs=function(t){return jc.makeAbs(this,t)}});var O5=b((INe,M5)=>{var mye=UC(),Cg=Object.create(null),gye=Xp();M5.exports=mye(Hye);function Hye(t,e){return Cg[t]?(Cg[t].push(e),null):(Cg[t]=[e],yye(t))}function yye(t){return gye(function e(){var r=Cg[t],i=r.length,n=vye(arguments);try{for(var s=0;s<i;s++)r[s].apply(null,n)}finally{r.length>i?(r.splice(0,i),process.nextTick(function(){e.apply(null,n)})):delete Cg[t]}})}function vye(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var BP=b((CNe,F5)=>{F5.exports=qc;var bye=PP(),N5=uw(),ENe=N5.Minimatch,wye=ur(),_ye=require("events").EventEmitter,UP=require("path"),jP=require("assert"),xg=lw(),WP=R5(),Wc=OP(),Aye=Wc.setopts,qP=Wc.ownProp,VP=O5(),SNe=require("util"),Iye=Wc.childrenIgnored,Eye=Wc.isIgnored,Sye=Xp();function qc(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return WP(t,e)}return new et(t,e,r)}qc.sync=WP;var Cye=qc.GlobSync=WP.GlobSync;qc.glob=qc;function xye(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}qc.hasMagic=function(t,e){var r=xye({},e);r.noprocess=!0;var i=new et(t,r),n=i.minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};qc.Glob=et;wye(et,_ye);function et(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new Cye(t,e)}if(!(this instanceof et))return new et(t,e,r);Aye(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=Sye(r),this.on("error",r),this.on("end",function(u){r(null,u)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return a();for(var s=!0,o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,a);s=!1;function a(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}}et.prototype._finish=function(){if(jP(this instanceof et),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Wc.finish(this),this.emit("end",this.found)}};et.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--t===0&&e._finish()}};et.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,s=i.length;if(s===0)return e();var o=this.matches[t]=Object.create(null);i.forEach(function(a,u){a=n._makeAbs(a),bye.realpath(a,n.realpathCache,function(c,l){c?c.syscall==="stat"?o[a]=!0:n.emit("error",c):o[l]=!0,--s===0&&(n.matches[t]=o,e())})})};et.prototype._mark=function(t){return Wc.mark(this,t)};et.prototype._makeAbs=function(t){return Wc.makeAbs(this,t)};et.prototype.abort=function(){this.aborted=!0,this.emit("abort")};et.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};et.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var n=i[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};et.prototype._process=function(t,e,r,i){if(jP(this instanceof et),jP(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,i]);return}for(var n=0;typeof t[n]=="string";)n++;var s;switch(n){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var o=t.slice(n),a;s===null?a=".":((xg(s)||xg(t.join("/")))&&(!s||!xg(s))&&(s="/"+s),a=s);var u=this._makeAbs(a);if(Iye(this,a))return i();var c=o[0]===N5.GLOBSTAR;c?this._processGlobStar(s,a,u,o,e,r,i):this._processReaddir(s,a,u,o,e,r,i)}};et.prototype._processReaddir=function(t,e,r,i,n,s,o){var a=this;this._readdir(r,s,function(u,c){return a._processReaddir2(t,e,r,i,n,s,c,o)})};et.prototype._processReaddir2=function(t,e,r,i,n,s,o,a){if(!o)return a();for(var u=i[0],c=!!this.minimatch.negate,l=u._glob,p=this.dot||l.charAt(0)===".",f=[],h=0;h<o.length;h++){var g=o[h];if(g.charAt(0)!=="."||p){var H;c&&!t?H=!g.match(u):H=g.match(u),H&&f.push(g)}}var v=f.length;if(v===0)return a();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var h=0;h<v;h++){var g=f[h];t&&(t!=="/"?g=t+"/"+g:g=t+g),g.charAt(0)==="/"&&!this.nomount&&(g=UP.join(this.root,g)),this._emitMatch(n,g)}return a()}i.shift();for(var h=0;h<v;h++){var g=f[h],w;t&&(t!=="/"?g=t+"/"+g:g=t+g),this._process([g].concat(i),n,s,a)}a()};et.prototype._emitMatch=function(t,e){if(!this.aborted&&!Eye(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=xg(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var n=this.statCache[r];n&&this.emit("stat",e,n),this.emit("match",e)}}};et.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,i=this,n=VP(r,s);n&&i.fs.lstat(t,n);function s(o,a){if(o&&o.code==="ENOENT")return e();var u=a&&a.isSymbolicLink();i.symlinks[t]=u,!u&&a&&!a.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};et.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=VP("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!qP(this.symlinks,t))return this._readdirInGlobStar(t,r);if(qP(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(t,Dye(this,t,r))}};function Dye(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}et.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var n=e[i];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,r(null,e)}};et.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};et.prototype._processGlobStar=function(t,e,r,i,n,s,o){var a=this;this._readdir(r,s,function(u,c){a._processGlobStar2(t,e,r,i,n,s,c,o)})};et.prototype._processGlobStar2=function(t,e,r,i,n,s,o,a){if(!o)return a();var u=i.slice(1),c=t?[t]:[],l=c.concat(u);this._process(l,n,!1,a);var p=this.symlinks[r],f=o.length;if(p&&s)return a();for(var h=0;h<f;h++){var g=o[h];if(!(g.charAt(0)==="."&&!this.dot)){var H=c.concat(o[h],u);this._process(H,n,!0,a);var v=c.concat(o[h],i);this._process(v,n,!0,a)}}a()};et.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};et.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&xg(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=UP.join(this.root,t):(t=UP.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};et.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&qP(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return e(null,n);if(i&&n==="FILE")return e()}var s,o=this.statCache[r];if(o!==void 0){if(o===!1)return e(null,o);var a=o.isDirectory()?"DIR":"FILE";return i&&a==="FILE"?e():e(null,a,o)}var u=this,c=VP("stat\0"+r,l);c&&u.fs.lstat(r,c);function l(p,f){if(f&&f.isSymbolicLink())return u.fs.stat(r,function(h,g){h?u._stat2(t,r,null,f,e):u._stat2(t,r,h,g,e)});u._stat2(t,r,p,f,e)}};et.prototype._stat2=function(t,e,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,n();var s=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,s&&o==="FILE"?n():n(null,o,i)}});var U5=b((xNe,B5)=>{B5.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var W5=b((DNe,q5)=>{var Pye=U5(),j5={"{":"}","(":")","[":"]"},Lye=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(o===-1||o>i||(o=t.indexOf("\\",e),o===-1||o>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var u=j5[a];if(u){var c=t.indexOf(u,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},Tye=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=j5[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};q5.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Pye(e))return!0;var i=Lye;return r&&r.strict===!1&&(i=Tye),i(e)}});var G5=b((PNe,V5)=>{"use strict";var $ye=W5(),kye=require("path").posix.dirname,Rye=require("os").platform()==="win32",fw="/",Mye=/\\/g,Oye=/\\([!*?|[\](){}])/g;V5.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&Rye&&e.indexOf(fw)<0&&(e=e.replace(Mye,fw)),Nye(e)&&(e+=fw),e+="a";do e=kye(e);while(Fye(e));return e.replace(Oye,"$1")};function Nye(t){var e=t.slice(-1),r;switch(e){case"}":r="{";break;case"]":r="[";break;default:return!1}var i=t.indexOf(r);return i<0?!1:t.slice(i+1,-1).includes(fw)}function Fye(t){return/\([^()]+$/.test(t)||t[0]==="{"||t[0]==="["||/[^\\][{[]/.test(t)?!0:$ye(t)}});var z5=b((LNe,K5)=>{"use strict";K5.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}});var J5=b((TNe,X5)=>{"use strict";var Bye=z5()();X5.exports=function(t){if(typeof t!="string")throw new TypeError("expected a string");return Bye.test(t)}});var Q5=b(($Ne,Y5)=>{"use strict";var Uye=J5();Y5.exports=function(e){if(typeof e!="string")throw new TypeError("expected filepath to be a string");return!Uye(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}});var Z5=b((GP,KP)=>{(function(t){GP&&typeof GP=="object"&&typeof KP<"u"?KP.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var t6=b((kNe,e6)=>{"use strict";var jye=Q5(),qye=Z5();e6.exports=Dg;function Dg(t){if(typeof t!="string")throw new TypeError("isAbsolute expects a string.");return qye()?Dg.win32(t):Dg.posix(t)}Dg.posix=function(e){return e.charAt(0)==="/"};Dg.win32=function(e){return/[a-z]/i.test(e.charAt(0))&&e.charAt(1)===":"&&e.charAt(2)==="\\"||e.slice(0,2)==="\\\\"?!0:!jye(e)}});var XP=b((RNe,s6)=>{"use strict";var r6=require("path"),Wye=IP(),i6=t6();s6.exports=function(t,e){var r=e||{},i=r6.resolve(r.cwd?r.cwd:process.cwd());i=zP(i);var n=r.root;n&&(n=zP(n),(process.platform==="win32"||!i6(n))&&(n=zP(r6.resolve(n)))),t.slice(0,2)==="./"&&(t=t.slice(2)),t.length===1&&t==="."&&(t="");var s=t.slice(-1),o=Wye(t);return t=o.pattern,n&&t.charAt(0)==="/"?t=n6(n,t):(!i6(t)||t.slice(0,1)==="\\")&&(t=n6(i,t)),s==="/"&&t.slice(-1)!=="/"&&(t+="/"),o.negated?"!"+t:t};function zP(t){return t.replace(/\\/g,"/")}function n6(t,e){return t.charAt(t.length-1)==="/"&&(t=t.slice(0,-1)),e.charAt(0)==="/"&&(e=e.slice(1)),e?t+"/"+e:t}});var a6=b((MNe,o6)=>{var Vye=process.platform==="win32";o6.exports=function(t){var e=t.length-1;if(e<2)return t;for(;Gye(t,e);)e--;return t.substr(0,e+1)};function Gye(t,e){var r=t[e];return e>0&&(r==="/"||Vye&&r==="\\")}});var l6=b((ONe,c6)=>{"use strict";var Kye=require("util").inherits,zye=BP(),Xye=EP(),u6=wP().Readable,Jye=G5(),JP=XP(),Yye=a6(),Qye="File not found with singular glob: ",Zye=" (if this was purposeful, use `allowEmpty` option)";function eve(t,e){return Jye(JP(t,e))}function tve(t){var e=t.minimatch.set;return e.length!==1?!1:e[0].every(function(i){return typeof i=="string"})}function Cf(t,e,r){if(!(this instanceof Cf))return new Cf(t,e,r);var i=Xye({},r);u6.call(this,{objectMode:!0,highWaterMark:i.highWaterMark||16}),delete i.highWaterMark;var n=this;function s(h){return JP(h,i)}var o=e.map(s);i.ignore=o;var a=i.cwd,u=i.allowEmpty||!1,c=i.base||eve(t,i);t=JP(t,i),delete i.root;var l=new zye.Glob(t,i);this._globber=l;var p=!1;l.on("match",function(h){p=!0;var g={cwd:a,base:c,path:Yye(h)};n.push(g)||l.pause()}),l.once("end",function(){if(u!==!0&&!p&&tve(l)){var h=new Error(Qye+t+Zye);return n.destroy(h)}n.push(null)});function f(h){n.destroy(h)}l.once("error",f)}Kye(Cf,u6);Cf.prototype._read=function(){this._globber.resume()};Cf.prototype.destroy=function(t){var e=this;this._globber.abort(),process.nextTick(function(){t&&e.emit("error",t),e.emit("close")})};c6.exports=Cf});var f6=b((NNe,p6)=>{"use strict";var rve=RW(),ive=$V(),nve=V4(),sve=IP(),ove=EP(),ave=l6();function uve(t,e){e||(e={});var r=ove({},e),i=r.ignore;r.cwd=typeof r.cwd=="string"?r.cwd:process.cwd(),r.dot=typeof r.dot=="boolean"?r.dot:!1,r.silent=typeof r.silent=="boolean"?r.silent:!0,r.cwdbase=typeof r.cwdbase=="boolean"?r.cwdbase:!1,r.uniqueBy=typeof r.uniqueBy=="string"||typeof r.uniqueBy=="function"?r.uniqueBy:"path",r.cwdbase&&(r.base=r.cwd),typeof i=="string"&&(i=[i]),Array.isArray(i)||(i=[]),Array.isArray(t)||(t=[t]);var n=[],s=[];t.forEach(o);function o(p,f){if(typeof p!="string")throw new Error("Invalid glob at index "+f);var h=sve(p),g=h.negated?s:n;g.push({index:f,glob:h.pattern})}if(n.length===0)throw new Error("Missing positive glob");var a=n.map(l),u=new rve(a),c=ive(r.uniqueBy);return nve.obj(u,c);function l(p){var f=s.filter(cve(p.index)).map(lve).concat(i);return new ave(p.glob,f,r)}}function cve(t){return function(e){return e.index>t}}function lve(t){return t.glob}p6.exports=uve});var nL=b((KFe,E6)=>{"use strict";var{Transform:mve}=require("stream"),{StringDecoder:gve}=require("string_decoder"),wu=Symbol("last"),vw=Symbol("decoder");function Hve(t,e,r){let i;if(this.overflow){if(i=this[vw].write(t).split(this.matcher),i.length===1)return r();i.shift(),this.overflow=!1}else this[wu]+=this[vw].write(t),i=this[wu].split(this.matcher);this[wu]=i.pop();for(let n=0;n<i.length;n++)try{I6(this,this.mapper(i[n]))}catch(s){return r(s)}if(this.overflow=this[wu].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function yve(t){if(this[wu]+=this[vw].end(),this[wu])try{I6(this,this.mapper(this[wu]))}catch(e){return t(e)}t()}function I6(t,e){e!==void 0&&t.push(e)}function A6(t){return t}function vve(t,e,r){switch(t=t||/\r?\n/,e=e||A6,r=r||{},arguments.length){case 1:typeof t=="function"?(e=t,t=/\r?\n/):typeof t=="object"&&!(t instanceof RegExp)&&(r=t,t=/\r?\n/);break;case 2:typeof t=="function"?(r=e,e=t,t=/\r?\n/):typeof e=="object"&&(r=e,e=A6)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Hve,r.flush=yve,r.readableObjectMode=!0;let i=new mve(r);return i[wu]="",i[vw]=new gve("utf8"),i.matcher=t,i.mapper=e,i.maxLength=r.maxLength,i.skipOverflow=r.skipOverflow||!1,i.overflow=!1,i._destroy=function(n,s){this._writableState.errorEmitted=!1,s(n)},i}E6.exports=vve});var z6,K6=Jz(()=>{z6="./w32appcontainertokens-XTRA77NA.node"});var J6=b((y3e,X6)=>{K6();try{X6.exports=require(z6)}catch{}});var Q6=b(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.getAppContainerProcessTokens=void 0;var Eve=require("path"),Y6,Sve=()=>{if(process.platform==="win32")return Y6??=J6(),Y6},Cve=t=>Sve()?.getAppContainerProcessTokens().map(e=>(0,Eve.join)(e,t));Cw.getAppContainerProcessTokens=Cve});var H9=b((mje,Nw)=>{var Rve=require("fs"),g9=require("path"),Mve=require("os"),Ove=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Nve(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
`);let i;for(;(i=Ove.exec(r))!=null;){let n=i[1],s=i[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function pL(t){console.log(`[dotenv][DEBUG] ${t}`)}function Fve(t){return t[0]==="~"?g9.join(Mve.homedir(),t.slice(1)):t}function Bve(t){let e=g9.resolve(process.cwd(),".env"),r="utf8",i=Boolean(t&&t.debug),n=Boolean(t&&t.override);t&&(t.path!=null&&(e=Fve(t.path)),t.encoding!=null&&(r=t.encoding));try{let s=Ow.parse(Rve.readFileSync(e,{encoding:r}));return Object.keys(s).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?(n===!0&&(process.env[o]=s[o]),i&&pL(n===!0?`"${o}" is already defined in \`process.env\` and WAS overwritten`:`"${o}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[o]=s[o]}),{parsed:s}}catch(s){return i&&pL(`Failed to load ${e} ${s.message}`),{error:s}}}var Ow={config:Bve,parse:Nve};Nw.exports.config=Ow.config;Nw.exports.parse=Ow.parse;Nw.exports=Ow});var bL=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var t_=require("vscode"),id=class{constructor(e,r,i){this.extensionName=e,this.extensionVersion=r,this.targetPopulation=i}static trimVersionSuffix(e){let r=/\-[a-zA-Z0-9]+$/;return e.split(r)[0]}getFilterValue(e){switch(e){case Yo.ApplicationVersion:return id.trimVersionSuffix(t_.version);case Yo.Build:return t_.env.appName;case Yo.ClientId:return t_.env.machineId;case Yo.ExtensionName:return this.extensionName;case Yo.ExtensionVersion:return id.trimVersionSuffix(this.extensionVersion);case Yo.Language:return t_.env.language;case Yo.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,r=Object.values(Yo);for(let i of r)e.set(i,this.getFilterValue(i));return e}};el.VSCodeFilterProvider=id;var Yo;(function(t){t.Market="X-MSEdge-Market",t.CorpNet="X-FD-Corpnet",t.ApplicationVersion="X-VSCode-AppVersion",t.Build="X-VSCode-Build",t.ClientId="X-MSEdge-ClientId",t.ExtensionName="X-VSCode-ExtensionName",t.ExtensionVersion="X-VSCode-ExtensionVersion",t.Language="X-VSCode-Language",t.TargetPopulation="X-VSCode-TargetPopulation"})(Yo=el.Filters||(el.Filters={}));var ibe;(function(t){t.Team="team",t.Internal="internal",t.Insiders="insider",t.Public="public"})(ibe=el.TargetPopulation||(el.TargetPopulation={}))});var tG=b(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var wL=class{constructor(e){this.telemetry=e,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let e=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,e}};_L.BaseFeatureProvider=wL});var rG=b(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var nbe=tG(),AL=class extends nbe.BaseFeatureProvider{constructor(e,r){super(e),this.telemetry=e,this.filterProviders=r,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let r of this.filterProviders){let i=r.getFilters();for(let n of i.keys()){let s=i.get(n);e.set(n,s)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;let r=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",r]])),this.cachedTelemetryEvents.push(e)}};IL.FilteredFeatureProvider=AL});var iG=b(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var sbe=rG(),EL=class extends sbe.FilteredFeatureProvider{constructor(e,r,i){super(r,i),this.httpClient=e,this.telemetry=r,this.filterProviders=i}async fetch(){let e=this.getFilters(),r={};for(let a of e.keys()){let u=e.get(a);r[a]=u}let i=await this.httpClient.get({headers:r});e.keys.length>0&&this.PostEventToTelemetry(r);let n=i.data,s=n.Configs,o=[];for(let a of s)if(a.Parameters)for(let u of Object.keys(a.Parameters)){let c=u+(a.Parameters[u]?"":"cf");o.includes(c)||o.push(c)}return{features:o,assignmentContext:n.AssignmentContext,configs:s}}};SL.TasApiFeatureProvider=EL});var CL=b((bVe,nG)=>{"use strict";nG.exports=function(e,r){return function(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];return e.apply(r,n)}}});var Gr=b((wVe,uG)=>{"use strict";var obe=CL(),Lu=Object.prototype.toString;function PL(t){return Array.isArray(t)}function xL(t){return typeof t>"u"}function abe(t){return t!==null&&!xL(t)&&t.constructor!==null&&!xL(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function sG(t){return Lu.call(t)==="[object ArrayBuffer]"}function ube(t){return Lu.call(t)==="[object FormData]"}function cbe(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&sG(t.buffer),e}function lbe(t){return typeof t=="string"}function pbe(t){return typeof t=="number"}function oG(t){return t!==null&&typeof t=="object"}function r_(t){if(Lu.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function fbe(t){return Lu.call(t)==="[object Date]"}function dbe(t){return Lu.call(t)==="[object File]"}function hbe(t){return Lu.call(t)==="[object Blob]"}function aG(t){return Lu.call(t)==="[object Function]"}function mbe(t){return oG(t)&&aG(t.pipe)}function gbe(t){return Lu.call(t)==="[object URLSearchParams]"}function Hbe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ybe(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function LL(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),PL(t))for(var r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}function DL(){var t={};function e(n,s){r_(t[s])&&r_(n)?t[s]=DL(t[s],n):r_(n)?t[s]=DL({},n):PL(n)?t[s]=n.slice():t[s]=n}for(var r=0,i=arguments.length;r<i;r++)LL(arguments[r],e);return t}function vbe(t,e,r){return LL(e,function(n,s){r&&typeof n=="function"?t[s]=obe(n,r):t[s]=n}),t}function bbe(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}uG.exports={isArray:PL,isArrayBuffer:sG,isBuffer:abe,isFormData:ube,isArrayBufferView:cbe,isString:lbe,isNumber:pbe,isObject:oG,isPlainObject:r_,isUndefined:xL,isDate:fbe,isFile:dbe,isBlob:hbe,isFunction:aG,isStream:mbe,isURLSearchParams:gbe,isStandardBrowserEnv:ybe,forEach:LL,merge:DL,extend:vbe,trim:Hbe,stripBOM:bbe}});var i_=b((_Ve,lG)=>{"use strict";var nd=Gr();function cG(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}lG.exports=function(e,r,i){if(!r)return e;var n;if(i)n=i(r);else if(nd.isURLSearchParams(r))n=r.toString();else{var s=[];nd.forEach(r,function(u,c){u===null||typeof u>"u"||(nd.isArray(u)?c=c+"[]":u=[u],nd.forEach(u,function(p){nd.isDate(p)?p=p.toISOString():nd.isObject(p)&&(p=JSON.stringify(p)),s.push(cG(c)+"="+cG(p))}))}),n=s.join("&")}if(n){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var fG=b((AVe,pG)=>{"use strict";var wbe=Gr();function n_(){this.handlers=[]}n_.prototype.use=function(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};n_.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};n_.prototype.forEach=function(e){wbe.forEach(this.handlers,function(i){i!==null&&e(i)})};pG.exports=n_});var hG=b((IVe,dG)=>{"use strict";var _be=Gr();dG.exports=function(e,r){_be.forEach(e,function(n,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[s])})}});var s_=b((EVe,mG)=>{"use strict";mG.exports=function(e,r,i,n,s){return e.config=r,i&&(e.code=i),e.request=n,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}});var o_=b((SVe,gG)=>{"use strict";gG.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var a_=b((CVe,HG)=>{"use strict";var Abe=s_();HG.exports=function(e,r,i,n,s){var o=new Error(e);return Abe(o,r,i,n,s)}});var TL=b((xVe,yG)=>{"use strict";var Ibe=a_();yG.exports=function(e,r,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):r(Ibe("Request failed with status code "+i.status,i.config,null,i.request,i))}});var bG=b((DVe,vG)=>{"use strict";var u_=Gr();vG.exports=u_.isStandardBrowserEnv()?function(){return{write:function(r,i,n,s,o,a){var u=[];u.push(r+"="+encodeURIComponent(i)),u_.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),u_.isString(s)&&u.push("path="+s),u_.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var _G=b((PVe,wG)=>{"use strict";wG.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}});var IG=b((LVe,AG)=>{"use strict";AG.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var $L=b((TVe,EG)=>{"use strict";var Ebe=_G(),Sbe=IG();EG.exports=function(e,r){return e&&!Ebe(r)?Sbe(e,r):r}});var CG=b(($Ve,SG)=>{"use strict";var kL=Gr(),Cbe=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];SG.exports=function(e){var r={},i,n,s;return e&&kL.forEach(e.split(`
`),function(a){if(s=a.indexOf(":"),i=kL.trim(a.substr(0,s)).toLowerCase(),n=kL.trim(a.substr(s+1)),i){if(r[i]&&Cbe.indexOf(i)>=0)return;i==="set-cookie"?r[i]=(r[i]?r[i]:[]).concat([n]):r[i]=r[i]?r[i]+", "+n:n}}),r}});var PG=b((kVe,DG)=>{"use strict";var xG=Gr();DG.exports=xG.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(o){var a=xG.isString(o)?n(o):o;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}()});var sd=b((RVe,LG)=>{"use strict";function RL(t){this.message=t}RL.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};RL.prototype.__CANCEL__=!0;LG.exports=RL});var $G=b((MVe,TG)=>{"use strict";var c_=Gr(),xbe=TL(),Dbe=bG(),Pbe=i_(),Lbe=$L(),Tbe=CG(),$be=PG(),ML=a_(),kbe=o_(),Rbe=sd();TG.exports=function(e){return new Promise(function(i,n){var s=e.data,o=e.headers,a=e.responseType,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}c_.isFormData(s)&&delete o["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(p+":"+f)}var h=Lbe(e.baseURL,e.url);l.open(e.method.toUpperCase(),Pbe(h,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function g(){if(l){var v="getAllResponseHeaders"in l?Tbe(l.getAllResponseHeaders()):null,w=!a||a==="text"||a==="json"?l.responseText:l.response,T={data:w,status:l.status,statusText:l.statusText,headers:v,config:e,request:l};xbe(function(x){i(x),c()},function(x){n(x),c()},T),l=null}}if("onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(g)},l.onabort=function(){l&&(n(ML("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(ML("Network Error",e,null,l)),l=null},l.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",T=e.transitional||kbe;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(ML(w,e,T.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",l)),l=null},c_.isStandardBrowserEnv()){var H=(e.withCredentials||$be(h))&&e.xsrfCookieName?Dbe.read(e.xsrfCookieName):void 0;H&&(o[e.xsrfHeaderName]=H)}"setRequestHeader"in l&&c_.forEach(o,function(w,T){typeof s>"u"&&T.toLowerCase()==="content-type"?delete o[T]:l.setRequestHeader(T,w)}),c_.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(v){l&&(n(!v||v&&v.type?new Rbe("canceled"):v),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),l.send(s)})}});var RG=b((OVe,kG)=>{var od=1e3,ad=od*60,ud=ad*60,tl=ud*24,Mbe=tl*7,Obe=tl*365.25;kG.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Nbe(t);if(r==="number"&&isFinite(t))return e.long?Bbe(t):Fbe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Nbe(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 r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Obe;case"weeks":case"week":case"w":return r*Mbe;case"days":case"day":case"d":return r*tl;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ud;case"minutes":case"minute":case"mins":case"min":case"m":return r*ad;case"seconds":case"second":case"secs":case"sec":case"s":return r*od;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Fbe(t){var e=Math.abs(t);return e>=tl?Math.round(t/tl)+"d":e>=ud?Math.round(t/ud)+"h":e>=ad?Math.round(t/ad)+"m":e>=od?Math.round(t/od)+"s":t+"ms"}function Bbe(t){var e=Math.abs(t);return e>=tl?l_(t,e,tl,"day"):e>=ud?l_(t,e,ud,"hour"):e>=ad?l_(t,e,ad,"minute"):e>=od?l_(t,e,od,"second"):t+" ms"}function l_(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var OL=b((NVe,MG)=>{function Ube(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=n,r.enabled=o,r.humanize=RG(),r.destroy=c,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let p=0;for(let f=0;f<l.length;f++)p=(p<<5)-p+l.charCodeAt(f),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(l){let p,f=null,h,g;function H(...v){if(!H.enabled)return;let w=H,T=Number(new Date),U=T-(p||T);w.diff=U,w.prev=p,w.curr=T,p=T,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let x=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(q,j)=>{if(q==="%%")return"%";x++;let F=r.formatters[j];if(typeof F=="function"){let $=v[x];q=F.call(w,$),v.splice(x,1),x--}return q}),r.formatArgs.call(w,v),(w.log||r.log).apply(w,v)}return H.namespace=l,H.useColors=r.useColors(),H.color=r.selectColor(l),H.extend=i,H.destroy=r.destroy,Object.defineProperty(H,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(l)),g),set:v=>{f=v}}),typeof r.init=="function"&&r.init(H),H}function i(l,p){let f=r(this.namespace+(typeof p>"u"?":":p)+l);return f.log=this.log,f}function n(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p,f=(typeof l=="string"?l:"").split(/[\s,]+/),h=f.length;for(p=0;p<h;p++)f[p]&&(l=f[p].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function s(){let l=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let p,f;for(p=0,f=r.skips.length;p<f;p++)if(r.skips[p].test(l))return!1;for(p=0,f=r.names.length;p<f;p++)if(r.names[p].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 r.enable(r.load()),r}MG.exports=Ube});var OG=b((zi,p_)=>{zi.formatArgs=qbe;zi.save=Wbe;zi.load=Vbe;zi.useColors=jbe;zi.storage=Gbe();zi.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`."))}})();zi.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 jbe(){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 qbe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+p_.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}zi.log=console.debug||console.log||(()=>{});function Wbe(t){try{t?zi.storage.setItem("debug",t):zi.storage.removeItem("debug")}catch{}}function Vbe(){let t;try{t=zi.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Gbe(){try{return localStorage}catch{}}p_.exports=OL()(zi);var{formatters:Kbe}=p_.exports;Kbe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var FG=b((FVe,NG)=>{"use strict";NG.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1?!0:i<n)}});var UG=b((BVe,BG)=>{"use strict";var zbe=require("os"),Zn=FG(),Kr=process.env,cd;Zn("no-color")||Zn("no-colors")||Zn("color=false")?cd=!1:(Zn("color")||Zn("colors")||Zn("color=true")||Zn("color=always"))&&(cd=!0);"FORCE_COLOR"in Kr&&(cd=Kr.FORCE_COLOR.length===0||parseInt(Kr.FORCE_COLOR,10)!==0);function Xbe(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Jbe(t){if(cd===!1)return 0;if(Zn("color=16m")||Zn("color=full")||Zn("color=truecolor"))return 3;if(Zn("color=256"))return 2;if(t&&!t.isTTY&&cd!==!0)return 0;let e=cd?1:0;if(process.platform==="win32"){let r=zbe.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Kr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in Kr)||Kr.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Kr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Kr.TEAMCITY_VERSION)?1:0;if(Kr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Kr){let r=parseInt((Kr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Kr.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Kr.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Kr.TERM)||"COLORTERM"in Kr?1:(Kr.TERM==="dumb",e)}function NL(t){let e=Jbe(t);return Xbe(e)}BG.exports={supportsColor:NL,stdout:NL(process.stdout),stderr:NL(process.stderr)}});var qG=b((Dr,d_)=>{var Ybe=require("tty"),f_=require("util");Dr.init=n0e;Dr.log=t0e;Dr.formatArgs=Zbe;Dr.save=r0e;Dr.load=i0e;Dr.useColors=Qbe;Dr.destroy=f_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Dr.colors=[6,2,3,4,5,1];try{let t=UG();t&&(t.stderr||t).level>=2&&(Dr.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{}Dr.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),t[r]=i,t},{});function Qbe(){return"colors"in Dr.inspectOpts?Boolean(Dr.inspectOpts.colors):Ybe.isatty(process.stderr.fd)}function Zbe(t){let{namespace:e,useColors:r}=this;if(r){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),s=`  ${n};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
`).join(`
`+s),t.push(n+"m+"+d_.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=e0e()+e+" "+t[0]}function e0e(){return Dr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function t0e(...t){return process.stderr.write(f_.format(...t)+`
`)}function r0e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function i0e(){return process.env.DEBUG}function n0e(t){t.inspectOpts={};let e=Object.keys(Dr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Dr.inspectOpts[e[r]]}d_.exports=OL()(Dr);var{formatters:jG}=d_.exports;jG.o=function(t){return this.inspectOpts.colors=this.useColors,f_.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};jG.O=function(t){return this.inspectOpts.colors=this.useColors,f_.inspect(t,this.inspectOpts)}});var WG=b((UVe,FL)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?FL.exports=OG():FL.exports=qG()});var GG=b((jVe,VG)=>{var Vg;VG.exports=function(){if(!Vg){try{Vg=WG()("follow-redirects")}catch{}typeof Vg!="function"&&(Vg=function(){})}Vg.apply(null,arguments)}});var WL=b((qVe,qL)=>{var rl=require("url"),BL=rl.URL,s0e=require("http"),o0e=require("https"),XG=require("stream").Writable,a0e=require("assert"),JG=GG(),il=["abort","aborted","connect","error","socket","timeout"],jL=Object.create(null);il.forEach(function(t){jL[t]=function(e,r,i){this._redirectable.emit(t,e,r,i)}});var KG=h_("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),u0e=h_("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),c0e=h_("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),l0e=h_("ERR_STREAM_WRITE_AFTER_END","write after end");function Xi(t,e){XG.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 r=this;this._onNativeResponse=function(i){r._processResponse(i)},this._performRequest()}Xi.prototype=Object.create(XG.prototype);Xi.prototype.abort=function(){QG(this._currentRequest),this.emit("abort")};Xi.prototype.write=function(t,e,r){if(this._ending)throw new l0e;if(!(typeof t=="string"||typeof t=="object"&&"length"in t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(typeof e=="function"&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new c0e),this.abort())};Xi.prototype.end=function(t,e,r){if(typeof t=="function"?(r=t,t=e=null):typeof e=="function"&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(t,e,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};Xi.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Xi.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Xi.prototype.setTimeout=function(t,e){var r=this;function i(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function n(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),i(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Xi.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Xi.prototype,t,{get:function(){return this._currentRequest[t]}})});Xi.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))}};Xi.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=rl.format(this._options),i._redirectable=this;for(var n=0;n<il.length;n++)i.on(il[n],jL[il[n]]);if(this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function u(c){if(i===o._currentRequest)if(c)o.emit("error",c);else if(s<a.length){var l=a[s++];i.finished||i.write(l.data,l.encoding,u)}else o._ended&&i.end()})()}};Xi.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(QG(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new u0e);return}var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=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=[],UL(/^content-/i,this._options.headers));var o=UL(/^host$/i,this._options.headers),a=rl.parse(this._currentUrl),u=o||a.host,c=/^\w+:/.test(r)?this._currentUrl:rl.format(Object.assign(a,{host:u})),l;try{l=rl.resolve(c,r)}catch(g){this.emit("error",new KG(g));return}JG("redirecting to",l),this._isRedirect=!0;var p=rl.parse(l);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==u&&!f0e(p.host,u))&&UL(/^(?:authorization|cookie)$/i,this._options.headers),typeof n=="function"){var f={headers:t.headers,statusCode:e},h={url:c,method:s,headers:i};try{n(this._options,f,h)}catch(g){this.emit("error",g);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(g){this.emit("error",new KG(g))}};function YG(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(i){var n=i+":",s=r[n]=t[i],o=e[i]=Object.create(s);function a(c,l,p){if(typeof c=="string"){var f=c;try{c=zG(new BL(f))}catch{c=rl.parse(f)}}else BL&&c instanceof BL?c=zG(c):(p=l,l=c,c={protocol:n});return typeof l=="function"&&(p=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,l),l.nativeProtocols=r,a0e.equal(l.protocol,n,"protocol mismatch"),JG("options",l),new Xi(l,p)}function u(c,l,p){var f=o.request(c,l,p);return f.end(),f}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),e}function p0e(){}function zG(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function UL(t,e){var r;for(var i in e)t.test(i)&&(r=e[i],delete e[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function h_(t,e){function r(i){Error.captureStackTrace(this,this.constructor),i?(this.message=e+": "+i.message,this.cause=i):this.message=e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}function QG(t){for(var e=0;e<il.length;e++)t.removeListener(il[e],jL[il[e]]);t.on("error",p0e),t.abort()}function f0e(t,e){let r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}qL.exports=YG({http:s0e,https:o0e});qL.exports.wrap=YG});var m_=b((WVe,ZG)=>{ZG.exports={version:"0.26.1"}});var o7=b((VVe,s7)=>{"use strict";var Gg=Gr(),e7=TL(),d0e=$L(),t7=i_(),h0e=require("http"),m0e=require("https"),g0e=WL().http,H0e=WL().https,r7=require("url"),y0e=require("zlib"),v0e=m_().version,ld=a_(),g_=s_(),b0e=o_(),w0e=sd(),i7=/https:?/;function n7(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var i=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.beforeRedirect=function(s){s.headers.host=s.host,n7(s,e,s.href)}}s7.exports=function(e){return new Promise(function(i,n){var s;function o(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}var a=function(ae){o(),i(ae)},u=!1,c=function(ae){o(),u=!0,n(ae)},l=e.data,p=e.headers,f={};if(Object.keys(p).forEach(function(ae){f[ae.toLowerCase()]=ae}),"user-agent"in f?p[f["user-agent"]]||delete p[f["user-agent"]]:p["User-Agent"]="axios/"+v0e,l&&!Gg.isStream(l)){if(!Buffer.isBuffer(l))if(Gg.isArrayBuffer(l))l=Buffer.from(new Uint8Array(l));else if(Gg.isString(l))l=Buffer.from(l,"utf-8");else return c(ld("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));if(e.maxBodyLength>-1&&l.length>e.maxBodyLength)return c(ld("Request body larger than maxBodyLength limit",e));f["content-length"]||(p["Content-Length"]=l.length)}var h=void 0;if(e.auth){var g=e.auth.username||"",H=e.auth.password||"";h=g+":"+H}var v=d0e(e.baseURL,e.url),w=r7.parse(v),T=w.protocol||"http:";if(!h&&w.auth){var U=w.auth.split(":"),x=U[0]||"",P=U[1]||"";h=x+":"+P}h&&f.authorization&&delete p[f.authorization];var q=i7.test(T),j=q?e.httpsAgent:e.httpAgent;try{t7(w.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(ce){var F=new Error(ce.message);F.config=e,F.url=e.url,F.exists=!0,c(F)}var $={path:t7(w.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:p,agent:j,agents:{http:e.httpAgent,https:e.httpsAgent},auth:h};e.socketPath?$.socketPath=e.socketPath:($.hostname=w.hostname,$.port=w.port);var O=e.proxy;if(!O&&O!==!1){var E=T.slice(0,-1)+"_proxy",M=process.env[E]||process.env[E.toUpperCase()];if(M){var N=r7.parse(M),z=process.env.no_proxy||process.env.NO_PROXY,D=!0;if(z){var L=z.split(",").map(function(ae){return ae.trim()});D=!L.some(function(ae){return ae?ae==="*"||ae[0]==="."&&w.hostname.substr(w.hostname.length-ae.length)===ae?!0:w.hostname===ae:!1})}if(D&&(O={host:N.hostname,port:N.port,protocol:N.protocol},N.auth)){var ee=N.auth.split(":");O.auth={username:ee[0],password:ee[1]}}}}O&&($.headers.host=w.hostname+(w.port?":"+w.port:""),n7($,O,T+"//"+w.hostname+(w.port?":"+w.port:"")+$.path));var re,ie=q&&(O?i7.test(O.protocol):!0);e.transport?re=e.transport:e.maxRedirects===0?re=ie?m0e:h0e:(e.maxRedirects&&($.maxRedirects=e.maxRedirects),re=ie?H0e:g0e),e.maxBodyLength>-1&&($.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&($.insecureHTTPParser=e.insecureHTTPParser);var J=re.request($,function(ae){if(!J.aborted){var he=ae,dt=ae.req||J;if(ae.statusCode!==204&&dt.method!=="HEAD"&&e.decompress!==!1)switch(ae.headers["content-encoding"]){case"gzip":case"compress":case"deflate":he=he.pipe(y0e.createUnzip()),delete ae.headers["content-encoding"];break}var ge={status:ae.statusCode,statusText:ae.statusMessage,headers:ae.headers,config:e,request:dt};if(e.responseType==="stream")ge.data=he,e7(a,c,ge);else{var Gt=[],kr=0;he.on("data",function(Ae){Gt.push(Ae),kr+=Ae.length,e.maxContentLength>-1&&kr>e.maxContentLength&&(u=!0,he.destroy(),c(ld("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,dt)))}),he.on("aborted",function(){u||(he.destroy(),c(ld("error request aborted",e,"ERR_REQUEST_ABORTED",dt)))}),he.on("error",function(Ae){J.aborted||c(g_(Ae,e,null,dt))}),he.on("end",function(){try{var Ae=Gt.length===1?Gt[0]:Buffer.concat(Gt);e.responseType!=="arraybuffer"&&(Ae=Ae.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(Ae=Gg.stripBOM(Ae))),ge.data=Ae}catch(Q){c(g_(Q,e,Q.code,ge.request,ge))}e7(a,c,ge)})}}});if(J.on("error",function(ae){J.aborted&&ae.code!=="ERR_FR_TOO_MANY_REDIRECTS"||c(g_(ae,e,null,J))}),J.on("socket",function(ae){ae.setKeepAlive(!0,1e3*60)}),e.timeout){var te=parseInt(e.timeout,10);if(isNaN(te)){c(ld("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",J));return}J.setTimeout(te,function(){J.abort();var ae="";e.timeoutErrorMessage?ae=e.timeoutErrorMessage:ae="timeout of "+e.timeout+"ms exceeded";var he=e.transitional||b0e;c(ld(ae,e,he.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",J))})}(e.cancelToken||e.signal)&&(s=function(ce){J.aborted||(J.abort(),c(!ce||ce&&ce.type?new w0e("canceled"):ce))},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s))),Gg.isStream(l)?l.on("error",function(ae){c(g_(ae,e,null,J))}).pipe(J):J.end(l)})}});var y_=b((GVe,c7)=>{"use strict";var Pr=Gr(),a7=hG(),_0e=s_(),A0e=o_(),I0e={"Content-Type":"application/x-www-form-urlencoded"};function u7(t,e){!Pr.isUndefined(t)&&Pr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function E0e(){var t;return typeof XMLHttpRequest<"u"?t=$G():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=o7()),t}function S0e(t,e,r){if(Pr.isString(t))try{return(e||JSON.parse)(t),Pr.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}var H_={transitional:A0e,adapter:E0e(),transformRequest:[function(e,r){return a7(r,"Accept"),a7(r,"Content-Type"),Pr.isFormData(e)||Pr.isArrayBuffer(e)||Pr.isBuffer(e)||Pr.isStream(e)||Pr.isFile(e)||Pr.isBlob(e)?e:Pr.isArrayBufferView(e)?e.buffer:Pr.isURLSearchParams(e)?(u7(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Pr.isObject(e)||r&&r["Content-Type"]==="application/json"?(u7(r,"application/json"),S0e(e)):e}],transformResponse:[function(e){var r=this.transitional||H_.transitional,i=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||n&&Pr.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?_0e(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Pr.forEach(["delete","get","head"],function(e){H_.headers[e]={}});Pr.forEach(["post","put","patch"],function(e){H_.headers[e]=Pr.merge(I0e)});c7.exports=H_});var p7=b((KVe,l7)=>{"use strict";var C0e=Gr(),x0e=y_();l7.exports=function(e,r,i){var n=this||x0e;return C0e.forEach(i,function(o){e=o.call(n,e,r)}),e}});var VL=b((zVe,f7)=>{"use strict";f7.exports=function(e){return!!(e&&e.__CANCEL__)}});var m7=b((XVe,h7)=>{"use strict";var d7=Gr(),GL=p7(),D0e=VL(),P0e=y_(),L0e=sd();function KL(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new L0e("canceled")}h7.exports=function(e){KL(e),e.headers=e.headers||{},e.data=GL.call(e,e.data,e.headers,e.transformRequest),e.headers=d7.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),d7.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||P0e.adapter;return r(e).then(function(n){return KL(e),n.data=GL.call(e,n.data,n.headers,e.transformResponse),n},function(n){return D0e(n)||(KL(e),n&&n.response&&(n.response.data=GL.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var zL=b((JVe,g7)=>{"use strict";var Ji=Gr();g7.exports=function(e,r){r=r||{};var i={};function n(l,p){return Ji.isPlainObject(l)&&Ji.isPlainObject(p)?Ji.merge(l,p):Ji.isPlainObject(p)?Ji.merge({},p):Ji.isArray(p)?p.slice():p}function s(l){if(Ji.isUndefined(r[l])){if(!Ji.isUndefined(e[l]))return n(void 0,e[l])}else return n(e[l],r[l])}function o(l){if(!Ji.isUndefined(r[l]))return n(void 0,r[l])}function a(l){if(Ji.isUndefined(r[l])){if(!Ji.isUndefined(e[l]))return n(void 0,e[l])}else return n(void 0,r[l])}function u(l){if(l in r)return n(e[l],r[l]);if(l in e)return n(void 0,e[l])}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return Ji.forEach(Object.keys(e).concat(Object.keys(r)),function(p){var f=c[p]||s,h=f(p);Ji.isUndefined(h)&&f!==u||(i[p]=h)}),i}});var v7=b((YVe,y7)=>{"use strict";var T0e=m_().version,XL={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){XL[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});var H7={};XL.transitional=function(e,r,i){function n(s,o){return"[Axios v"+T0e+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return function(s,o,a){if(e===!1)throw new Error(n(o," has been removed"+(r?" in "+r:"")));return r&&!H7[o]&&(H7[o]=!0,console.warn(n(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,a):!0}};function $0e(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var i=Object.keys(t),n=i.length;n-- >0;){var s=i[n],o=e[s];if(o){var a=t[s],u=a===void 0||o(a,s,t);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+s)}}y7.exports={assertOptions:$0e,validators:XL}});var E7=b((QVe,I7)=>{"use strict";var _7=Gr(),k0e=i_(),b7=fG(),w7=m7(),v_=zL(),A7=v7(),pd=A7.validators;function Kg(t){this.defaults=t,this.interceptors={request:new b7,response:new b7}}Kg.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=v_(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&A7.assertOptions(i,{silentJSONParsing:pd.transitional(pd.boolean),forcedJSONParsing:pd.transitional(pd.boolean),clarifyTimeoutError:pd.transitional(pd.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(s=s&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var o=[];this.interceptors.response.forEach(function(h){o.push(h.fulfilled,h.rejected)});var a;if(!s){var u=[w7,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),a=Promise.resolve(r);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=r;n.length;){var l=n.shift(),p=n.shift();try{c=l(c)}catch(f){p(f);break}}try{a=w7(c)}catch(f){return Promise.reject(f)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};Kg.prototype.getUri=function(e){return e=v_(this.defaults,e),k0e(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};_7.forEach(["delete","get","head","options"],function(e){Kg.prototype[e]=function(r,i){return this.request(v_(i||{},{method:e,url:r,data:(i||{}).data}))}});_7.forEach(["post","put","patch"],function(e){Kg.prototype[e]=function(r,i,n){return this.request(v_(n||{},{method:e,url:r,data:i}))}});I7.exports=Kg});var C7=b((ZVe,S7)=>{"use strict";var R0e=sd();function fd(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var r=this;this.promise.then(function(i){if(r._listeners){var n,s=r._listeners.length;for(n=0;n<s;n++)r._listeners[n](i);r._listeners=null}}),this.promise.then=function(i){var n,s=new Promise(function(o){r.subscribe(o),n=o}).then(i);return s.cancel=function(){r.unsubscribe(n)},s},t(function(n){r.reason||(r.reason=new R0e(n),e(r.reason))})}fd.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};fd.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};fd.prototype.unsubscribe=function(e){if(this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}};fd.source=function(){var e,r=new fd(function(n){e=n});return{token:r,cancel:e}};S7.exports=fd});var D7=b((e4e,x7)=>{"use strict";x7.exports=function(e){return function(i){return e.apply(null,i)}}});var L7=b((t4e,P7)=>{"use strict";var M0e=Gr();P7.exports=function(e){return M0e.isObject(e)&&e.isAxiosError===!0}});var k7=b((r4e,JL)=>{"use strict";var T7=Gr(),O0e=CL(),b_=E7(),N0e=zL(),F0e=y_();function $7(t){var e=new b_(t),r=O0e(b_.prototype.request,e);return T7.extend(r,b_.prototype,e),T7.extend(r,e),r.create=function(n){return $7(N0e(t,n))},r}var io=$7(F0e);io.Axios=b_;io.Cancel=sd();io.CancelToken=C7();io.isCancel=VL();io.VERSION=m_().version;io.all=function(e){return Promise.all(e)};io.spread=D7();io.isAxiosError=L7();JL.exports=io;JL.exports.default=io});var M7=b((i4e,R7)=>{R7.exports=k7()});var O7=b(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var B0e=M7(),YL=class{constructor(e){this.endpoint=e}get(e){return B0e.default.get(this.endpoint,Object.assign(Object.assign({},e),{proxy:!1}))}};QL.AxiosHttpClient=YL});var N7=b(eT=>{"use strict";Object.defineProperty(eT,"__esModule",{value:!0});var ZL=class{constructor(){this.storage=new Map}async getValue(e,r){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(r||void 0)}setValue(e,r){this.storage.set(e,r)}};eT.MemoryKeyValueStorage=ZL});var F7=b(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});var U0e=N7(),tT=class{constructor(e,r,i,n,s,o){this.telemetry=e,this.featuresTelemetryPropertyName=r,this.assignmentContextTelemetryPropertyName=i,this.telemetryEventName=n,this.storageKey=s,this.storage=o,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(o=new U0e.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise((a,u)=>{this.resolveInitialFetchPromise=a})}get features(){return this._features}set features(e){this._features=e,this.telemetry&&(this.telemetry.setSharedProperty(this.featuresTelemetryPropertyName,this.features.features.join(";")),this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext))}async getFeaturesAsync(e=!1){if(this.fetchPromise!=null){try{await this.fetchPromise}catch{}return this.features}if(!this.featureProviders||this.featureProviders.length===0)return Promise.resolve({features:[],assignmentContext:"",configs:[]});this.fetchPromise=Promise.all(this.featureProviders.map(async r=>await r.getFeatures()));try{let r=await this.fetchPromise;this.updateFeatures(r,e)}catch{}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,r=!1){let i={features:[],assignmentContext:"",configs:[]};for(let n of e){for(let s of n.features)i.features.includes(s)||i.features.push(s);for(let s of n.configs){let o=i.configs.find(a=>a.Id===s.Id);o?o.Parameters=Object.assign(Object.assign({},o.Parameters),s.Parameters):i.configs.push(s)}i.assignmentContext+=n.assignmentContext}(r||!this.featuresConsumed)&&(this.features=i),this.storage&&this.storage.setValue(this.storageKey,i)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),e!==void 0&&e.configs===void 0&&(e.configs=[])),this.features.features.length===0&&(this.features=e||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(e){return this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isCachedFlightEnabled(e){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isFlightEnabledAsync(e){let r=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),r.features.includes(e)}getTreatmentVariable(e,r){var i;return this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${r}`),(i=this.features.configs.find(s=>s.Id===e))===null||i===void 0?void 0:i.Parameters[r]}async getTreatmentVariableAsync(e,r,i){if(i){let n=this.featuresConsumed,s=this.getTreatmentVariable(e,r);if(s===void 0)this.featuresConsumed=n;else return s}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,r)}PostEventToTelemetry(e){this.cachedTelemetryEvents.includes(e)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",e]])),this.cachedTelemetryEvents.push(e))}invokeInit(){this.init()}addFeatureProvider(...e){if(!(e==null||this.featureProviders==null))for(let r of e)this.featureProviders.push(r)}};rT.ExperimentationServiceBase=tT});var B7=b(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});var iT=class{constructor(e){this.fetchInterval=e}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(e){this.onTick=e}StartPolling(e=!1){this.intervalHandle&&this.StopPolling(),this.onTick!=null&&(e&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}};nT.PollingService=iT});var U7=b(oT=>{"use strict";Object.defineProperty(oT,"__esModule",{value:!0});var j0e=F7(),q0e=B7(),sT=class extends j0e.ExperimentationServiceBase{constructor(e,r,i,n,s,o,a,u){if(super(e,n,s,o,a,u),this.telemetry=e,this.filterProviders=r,this.refreshRateMs=i,this.featuresTelemetryPropertyName=n,this.assignmentContextTelemetryPropertyName=s,this.telemetryEventName=o,this.storageKey=a,this.storage=u,i<1e3&&i!==0)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");i>0&&(this.pollingService=new q0e.PollingService(i),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let r=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),r}else return await super.getFeaturesAsync(e)}};oT.ExperimentationServiceAutoPolling=sT});var j7=b(aT=>{"use strict";Object.defineProperty(aT,"__esModule",{value:!0});var W0e=iG(),V0e=O7(),G0e=U7(),w_=class extends G0e.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],e.refetchInterval!=null?e.refetchInterval:0,e.featuresTelemetryPropertyName,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new W0e.TasApiFeatureProvider(new V0e.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}};aT.ExperimentationService=w_;w_.REFRESH_RATE_IN_MINUTES=30});var q7=b(uT=>{"use strict";Object.defineProperty(uT,"__esModule",{value:!0});var K0e=j7();uT.ExperimentationService=K0e.ExperimentationService});var W7=b(lT=>{"use strict";Object.defineProperty(lT,"__esModule",{value:!0});var cT=class{constructor(e){this.mementoGlobalStorage=e}async getValue(e,r){return await this.mementoGlobalStorage.get(e)||r}setValue(e,r){this.mementoGlobalStorage.update(e,r)}};lT.MementoKeyValueStorage=cT});var V7=b(fT=>{"use strict";Object.defineProperty(fT,"__esModule",{value:!0});var pT=class{constructor(){this.initializePromise=Promise.resolve(),this.initialFetch=Promise.resolve()}isFlightEnabled(e){return!1}isCachedFlightEnabled(e){return Promise.resolve(!1)}isFlightEnabledAsync(e){return Promise.resolve(!1)}getTreatmentVariable(e,r){}getTreatmentVariableAsync(e,r){return Promise.resolve(void 0)}};fT.default=pT});var K7=b(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});var z0e=bL(),X0e=q7(),dT=require("vscode"),J0e=W7(),Y0e=V7(),Q0e="https://default.exp-tas.com/vscode/ab",Z0e="query-expfeature",ewe="VSCode.ABExp.Features",twe="abexp.assignmentcontext",rwe="VSCode.ABExp.FeatureData",iwe=1e3*60*30;function G7(t,e,r,i,n,...s){if(!n)throw new Error("Memento storage was not provided.");let o=dT.workspace.getConfiguration("telemetry");if(!(dT.env.isTelemetryEnabled===void 0?o.get("enableTelemetry",!0):dT.env.isTelemetryEnabled))return new Y0e.default;let c=[new z0e.VSCodeFilterProvider(t,e,r),...s],l=new J0e.MementoKeyValueStorage(n);return new X0e.ExperimentationService({filterProviders:c,telemetry:i,storageKey:rwe,keyValueStorage:l,featuresTelemetryPropertyName:ewe,assignmentContextTelemetryPropertyName:twe,telemetryEventName:Z0e,endpoint:Q0e,refetchInterval:iwe})}__.getExperimentationService=G7;async function nwe(t,e,r,i,n,...s){let o=G7(t,e,r,i,n,...s);return await o.initializePromise,o}__.getExperimentationServiceAsync=nwe});var X7=b(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});var z7=K7();zg.getExperimentationService=z7.getExperimentationService;zg.getExperimentationServiceAsync=z7.getExperimentationServiceAsync;var swe=bL();zg.TargetPopulation=swe.TargetPopulation});var ez=b(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});function MT(t){this.j={},this.jr=[],this.jd=null,this.t=t}MT.prototype={accepts:function(){return!!this.t},tt:function(e,r){if(r&&r.j)return this.j[e]=r,r;var i=r,n=this.j[e];if(n)return i&&(n.t=i),n;n=st();var s=j_(this,e);return s?(Object.assign(n.j,s.j),n.jr.append(s.jr),n.jr=s.jd,n.t=i||s.t):n.t=i,this.j[e]=n,n}};var st=function(){return new MT},ve=function(e){return new MT(e)},oe=function(e,r,i){e.j[r]||(e.j[r]=i)},yr=function(e,r,i){e.jr.push([r,i])},j_=function(e,r){var i=e.j[r];if(i)return i;for(var n=0;n<e.jr.length;n++){var s=e.jr[n][0],o=e.jr[n][1];if(s.test(r))return o}return e.jd},Te=function(e,r,i){for(var n=0;n<r.length;n++)oe(e,r[n],i)},Lwe=function(e,r){for(var i=0;i<r.length;i++){var n=r[i][0],s=r[i][1];oe(e,n,s)}},pl=function(e,r,i,n){for(var s=0,o=r.length,a;s<o&&(a=e.j[r[s]]);)e=a,s++;if(s>=o)return[];for(;s<o-1;)a=n(),oe(e,r[s],a),e=a,s++;oe(e,r[o-1],i)},ts="DOMAIN",ia="LOCALHOST",oo="TLD",Cn="NUM",Zd="PROTOCOL",OT="MAILTO",JK="WS",NT="NL",zd="OPENBRACE",lH="OPENBRACKET",pH="OPENANGLEBRACKET",fH="OPENPAREN",fl="CLOSEBRACE",Xd="CLOSEBRACKET",Jd="CLOSEANGLEBRACKET",Yd="CLOSEPAREN",q_="AMPERSAND",W_="APOSTROPHE",V_="ASTERISK",Qd="AT",G_="BACKSLASH",K_="BACKTICK",z_="CARET",dH="COLON",FT="COMMA",X_="DOLLAR",Bu="DOT",J_="EQUALS",BT="EXCLAMATION",Y_="HYPHEN",Q_="PERCENT",Z_="PIPE",eA="PLUS",tA="POUND",rA="QUERY",UT="QUOTE",jT="SEMI",na="SLASH",iA="TILDE",nA="UNDERSCORE",sA="SYM",Twe=Object.freeze({__proto__:null,DOMAIN:ts,LOCALHOST:ia,TLD:oo,NUM:Cn,PROTOCOL:Zd,MAILTO:OT,WS:JK,NL:NT,OPENBRACE:zd,OPENBRACKET:lH,OPENANGLEBRACKET:pH,OPENPAREN:fH,CLOSEBRACE:fl,CLOSEBRACKET:Xd,CLOSEANGLEBRACKET:Jd,CLOSEPAREN:Yd,AMPERSAND:q_,APOSTROPHE:W_,ASTERISK:V_,AT:Qd,BACKSLASH:G_,BACKTICK:K_,CARET:z_,COLON:dH,COMMA:FT,DOLLAR:X_,DOT:Bu,EQUALS:J_,EXCLAMATION:BT,HYPHEN:Y_,PERCENT:Q_,PIPE:Z_,PLUS:eA,POUND:tA,QUERY:rA,QUOTE:UT,SEMI:jT,SLASH:na,TILDE:iA,UNDERSCORE:nA,SYM:sA}),KK="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xF6gensberater-ctb verm\xF6gensberatung-pwb \u03B5\u03BB \u03B5\u03C5 \u0431\u0433 \u0431\u0435\u043B \u0434\u0435\u0442\u0438 \u0435\u044E \u043A\u0430\u0442\u043E\u043B\u0438\u043A \u043A\u043E\u043C \u049B\u0430\u0437 \u043C\u043A\u0434 \u043C\u043E\u043D \u043C\u043E\u0441\u043A\u0432\u0430 \u043E\u043D\u043B\u0430\u0439\u043D \u043E\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043A\u0440 \u10D2\u10D4 \u0570\u0561\u0575 \u05D9\u05E9\u05E8\u05D0\u05DC \u05E7\u05D5\u05DD \u0627\u0628\u0648\u0638\u0628\u064A \u0627\u062A\u0635\u0627\u0644\u0627\u062A \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062F\u0646 \u0627\u0644\u0628\u062D\u0631\u064A\u0646 \u0627\u0644\u062C\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629 \u0627\u0644\u0639\u0644\u064A\u0627\u0646 \u0627\u0644\u0645\u063A\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062A \u0627\u06CC\u0631\u0627\u0646 \u0628\u0627\u0631\u062A \u0628\u0627\u0632\u0627\u0631 \u0628\u06BE\u0627\u0631\u062A \u0628\u064A\u062A\u0643 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646 \u0680\u0627\u0631\u062A \u062A\u0648\u0646\u0633 \u0633\u0648\u062F\u0627\u0646 \u0633\u0648\u0631\u064A\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064A\u0646 \u0642\u0637\u0631 \u0643\u0627\u062B\u0648\u0644\u064A\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064A\u0633\u064A\u0627 \u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092E \u0928\u0947\u091F \u092D\u093E\u0930\u0924 \u092D\u093E\u0930\u0924\u092E\u094D \u092D\u093E\u0930\u094B\u0924 \u0938\u0902\u0917\u0920\u0928 \u09AC\u09BE\u0982\u09B2\u09BE \u09AD\u09BE\u09B0\u09A4 \u09AD\u09BE\u09F0\u09A4 \u0A2D\u0A3E\u0A30\u0A24 \u0AAD\u0ABE\u0AB0\u0AA4 \u0B2D\u0B3E\u0B30\u0B24 \u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE \u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0C2D\u0C3E\u0C30\u0C24\u0C4D \u0CAD\u0CBE\u0CB0\u0CA4 \u0D2D\u0D3E\u0D30\u0D24\u0D02 \u0DBD\u0D82\u0D9A\u0DCF \u0E04\u0E2D\u0E21 \u0E44\u0E17\u0E22 \u0EA5\u0EB2\u0EA7 \uB2F7\uB137 \uB2F7\uCEF4 \uC0BC\uC131 \uD55C\uAD6D \u30A2\u30DE\u30BE\u30F3 \u30B0\u30FC\u30B0\u30EB \u30AF\u30E9\u30A6\u30C9 \u30B3\u30E0 \u30B9\u30C8\u30A2 \u30BB\u30FC\u30EB \u30D5\u30A1\u30C3\u30B7\u30E7\u30F3 \u30DD\u30A4\u30F3\u30C8 \u307F\u3093\u306A \u4E16\u754C \u4E2D\u4FE1 \u4E2D\u56FD \u4E2D\u570B \u4E2D\u6587\u7F51 \u4E9A\u9A6C\u900A \u4F01\u4E1A \u4F5B\u5C71 \u4FE1\u606F \u5065\u5EB7 \u516B\u5366 \u516C\u53F8 \u516C\u76CA \u53F0\u6E7E \u53F0\u7063 \u5546\u57CE \u5546\u5E97 \u5546\u6807 \u5609\u91CC \u5609\u91CC\u5927\u9152\u5E97 \u5728\u7EBF \u5927\u4F17\u6C7D\u8F66 \u5927\u62FF \u5929\u4E3B\u6559 \u5A31\u4E50 \u5BB6\u96FB \u5E7F\u4E1C \u5FAE\u535A \u6148\u5584 \u6211\u7231\u4F60 \u624B\u673A \u62DB\u8058 \u653F\u52A1 \u653F\u5E9C \u65B0\u52A0\u5761 \u65B0\u95FB \u65F6\u5C1A \u66F8\u7C4D \u673A\u6784 \u6DE1\u9A6C\u9521 \u6E38\u620F \u6FB3\u9580 \u70B9\u770B \u79FB\u52A8 \u7EC4\u7EC7\u673A\u6784 \u7F51\u5740 \u7F51\u5E97 \u7F51\u7AD9 \u7F51\u7EDC \u8054\u901A \u8BFA\u57FA\u4E9A \u8C37\u6B4C \u8D2D\u7269 \u901A\u8CA9 \u96C6\u56E2 \u96FB\u8A0A\u76C8\u79D1 \u98DE\u5229\u6D66 \u98DF\u54C1 \u9910\u5385 \u9999\u683C\u91CC\u62C9 \u9999\u6E2F".split(" "),oH=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,aH=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,uH=/\uFE0F/,cH=/\d/,zK=/\s/;function $we(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=st(),r=ve(Cn),i=ve(ts),n=st(),s=ve(JK),o=[[cH,i],[oH,i],[aH,i],[uH,i]],a=function(){var x=ve(ts);return x.j={"-":n},x.jr=[].concat(o),x},u=function(x){var P=a();return P.t=x,P};Lwe(e,[["'",ve(W_)],["{",ve(zd)],["[",ve(lH)],["<",ve(pH)],["(",ve(fH)],["}",ve(fl)],["]",ve(Xd)],[">",ve(Jd)],[")",ve(Yd)],["&",ve(q_)],["*",ve(V_)],["@",ve(Qd)],["`",ve(K_)],["^",ve(z_)],[":",ve(dH)],[",",ve(FT)],["$",ve(X_)],[".",ve(Bu)],["=",ve(J_)],["!",ve(BT)],["-",ve(Y_)],["%",ve(Q_)],["|",ve(Z_)],["+",ve(eA)],["#",ve(tA)],["?",ve(rA)],['"',ve(UT)],["/",ve(na)],[";",ve(jT)],["~",ve(iA)],["_",ve(nA)],["\\",ve(G_)]]),oe(e,`
`,ve(NT)),yr(e,zK,s),oe(s,`
`,st()),yr(s,zK,s);for(var c=0;c<KK.length;c++)pl(e,KK[c],u(oo),a);var l=a(),p=a(),f=a(),h=a();pl(e,"file",l,a),pl(e,"ftp",p,a),pl(e,"http",f,a),pl(e,"mailto",h,a);var g=a(),H=ve(Zd),v=ve(OT);oe(p,"s",g),oe(p,":",H),oe(f,"s",g),oe(f,":",H),oe(l,":",H),oe(g,":",H),oe(h,":",v);for(var w=a(),T=0;T<t.length;T++)pl(e,t[T],w,a);return oe(w,":",H),pl(e,"localhost",u(ia),a),yr(e,cH,r),yr(e,oH,i),yr(e,aH,i),yr(e,uH,i),yr(r,cH,r),yr(r,oH,i),yr(r,aH,i),yr(r,uH,i),oe(r,"-",n),oe(i,"-",n),oe(n,"-",n),yr(i,cH,i),yr(i,oH,i),yr(i,aH,i),yr(i,uH,i),yr(n,cH,i),yr(n,oH,i),yr(n,aH,i),yr(n,uH,i),e.jd=ve(sA),e}function kwe(t,e){for(var r=Rwe(e.replace(/[A-Z]/g,function(h){return h.toLowerCase()})),i=r.length,n=[],s=0,o=0;o<i;){for(var a=t,u=null,c=0,l=null,p=-1,f=-1;o<i&&(u=j_(a,r[o]));)a=u,a.accepts()?(p=0,f=0,l=a):p>=0&&(p+=r[o].length,f++),c+=r[o].length,s+=r[o].length,o++;s-=p,o-=f,c-=p,n.push({t:l.t,v:e.substr(s-c,c),s:s-c,e:s})}return n}function Rwe(t){for(var e=[],r=t.length,i=0;i<r;){var n=t.charCodeAt(i),s=void 0,o=n<55296||n>56319||i+1===r||(s=t.charCodeAt(i+1))<56320||s>57343?t[i]:t.slice(i,i+2);e.push(o),i+=o.length}return e}function U_(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U_=function(e){return typeof e}:U_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U_(t)}var Tr={defaultProtocol:"http",events:null,format:XK,formatHref:XK,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function qT(t){t=t||{},this.defaultProtocol="defaultProtocol"in t?t.defaultProtocol:Tr.defaultProtocol,this.events="events"in t?t.events:Tr.events,this.format="format"in t?t.format:Tr.format,this.formatHref="formatHref"in t?t.formatHref:Tr.formatHref,this.nl2br="nl2br"in t?t.nl2br:Tr.nl2br,this.tagName="tagName"in t?t.tagName:Tr.tagName,this.target="target"in t?t.target:Tr.target,this.rel="rel"in t?t.rel:Tr.rel,this.validate="validate"in t?t.validate:Tr.validate,this.truncate="truncate"in t?t.truncate:Tr.truncate,this.className="className"in t?t.className:Tr.className,this.attributes=t.attributes||Tr.attributes,this.ignoreTags=[];for(var e=("ignoreTags"in t)?t.ignoreTags:Tr.ignoreTags,r=0;r<e.length;r++)this.ignoreTags.push(e[r].toUpperCase())}qT.prototype={resolve:function(e){var r=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",r,e),tagName:this.get("tagName",r,e),className:this.get("className",r,e),target:this.get("target",r,e),rel:this.get("rel",r,e),events:this.getObject("events",r,e),attributes:this.getObject("attributes",r,e),truncate:this.get("truncate",r,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,r,i){var n=this[e];if(!n)return n;var s;switch(U_(n)){case"function":return n(r,i.t);case"object":return s=i.t in n?n[i.t]:Tr[e],typeof s=="function"?s(r,i.t):s}return n},getObject:function(e,r,i){var n=this[e];return typeof n=="function"?n(r,i.t):n}};function XK(t){return t}var Mwe=Object.freeze({__proto__:null,defaults:Tr,Options:qT});function Owe(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=Object.create(t.prototype);for(var n in r)i[n]=r[n];return i.constructor=e,e.prototype=i,e}function oA(){}oA.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};function dl(t,e){function r(i,n){this.t=t,this.v=i,this.tk=n}return Owe(oA,r,e),r}var YK=dl("email",{isLink:!0}),$T=dl("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),kT=dl("text"),QK=dl("nl"),Fu=dl("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr.defaultProtocol,r=this.tk,i=!1,n=!1,s=[],o=0;r[o].t===Zd;)i=!0,s.push(r[o].v),o++;for(;r[o].t===na;)n=!0,s.push(r[o].v),o++;for(;o<r.length;o++)s.push(r[o].v);return s=s.join(""),i||n||(s="".concat(e,"://").concat(s)),s},hasProtocol:function(){return this.tk[0].t===Zd}}),Nwe=Object.freeze({__proto__:null,MultiToken:oA,Base:oA,createTokenClass:dl,MailtoEmail:YK,Email:$T,Text:kT,Nl:QK,Url:Fu});function Fwe(){var t=st(),e=st(),r=st(),i=st(),n=st(),s=st(),o=st(),a=ve(Fu),u=st(),c=ve(Fu),l=ve(Fu),p=st(),f=st(),h=st(),g=st(),H=st(),v=ve(Fu),w=ve(Fu),T=ve(Fu),U=ve(Fu),x=st(),P=st(),q=st(),j=st(),F=st(),$=st(),O=ve($T),E=st(),M=ve($T),N=ve(YK),z=st(),D=st(),L=st(),ee=st(),re=ve(QK);oe(t,NT,re),oe(t,Zd,e),oe(t,OT,r),oe(e,na,i),oe(i,na,n),oe(t,oo,s),oe(t,ts,s),oe(t,ia,a),oe(t,Cn,s),oe(n,oo,l),oe(n,ts,l),oe(n,Cn,l),oe(n,ia,l),oe(s,Bu,o),oe(F,Bu,$),oe(o,oo,a),oe(o,ts,s),oe(o,Cn,s),oe(o,ia,s),oe($,oo,O),oe($,ts,F),oe($,Cn,F),oe($,ia,F),oe(a,Bu,o),oe(O,Bu,$),oe(a,dH,u),oe(a,na,l),oe(u,Cn,c),oe(c,na,l),oe(O,dH,E),oe(E,Cn,M);var ie=[q_,V_,Qd,G_,K_,z_,X_,ts,J_,Y_,ia,Cn,Q_,Z_,eA,tA,Zd,na,sA,iA,oo,nA],J=[W_,Jd,fl,Xd,Yd,dH,FT,Bu,BT,pH,zd,lH,fH,rA,UT,jT];oe(l,zd,f),oe(l,lH,h),oe(l,pH,g),oe(l,fH,H),oe(p,zd,f),oe(p,lH,h),oe(p,pH,g),oe(p,fH,H),oe(f,fl,l),oe(h,Xd,l),oe(g,Jd,l),oe(H,Yd,l),oe(v,fl,l),oe(w,Xd,l),oe(T,Jd,l),oe(U,Yd,l),oe(x,fl,l),oe(P,Xd,l),oe(q,Jd,l),oe(j,Yd,l),Te(f,ie,v),Te(h,ie,w),Te(g,ie,T),Te(H,ie,U),Te(f,J,x),Te(h,J,P),Te(g,J,q),Te(H,J,j),Te(v,ie,v),Te(w,ie,w),Te(T,ie,T),Te(U,ie,U),Te(v,J,v),Te(w,J,w),Te(T,J,T),Te(U,J,U),Te(x,ie,v),Te(P,ie,w),Te(q,ie,T),Te(j,ie,U),Te(x,J,x),Te(P,J,P),Te(q,J,q),Te(j,J,j),Te(l,ie,l),Te(p,ie,l),Te(l,J,p),Te(p,J,p),oe(r,oo,N),oe(r,ts,N),oe(r,Cn,N),oe(r,ia,N),Te(N,ie,N),Te(N,J,z),Te(z,ie,N),Te(z,J,z);var te=[q_,W_,V_,G_,K_,z_,fl,X_,ts,J_,Y_,Cn,zd,Q_,Z_,eA,tA,rA,na,sA,iA,oo,nA];return Te(s,te,D),oe(s,Qd,L),Te(a,te,D),oe(a,Qd,L),Te(o,te,D),Te(D,te,D),oe(D,Qd,L),oe(D,Bu,ee),Te(ee,te,D),oe(L,oo,F),oe(L,ts,F),oe(L,Cn,F),oe(L,ia,O),t}function Bwe(t,e,r){for(var i=r.length,n=0,s=[],o=[];n<i;){for(var a=t,u=null,c=null,l=0,p=null,f=-1;n<i&&!(u=j_(a,r[n].t));)o.push(r[n++]);for(;n<i&&(c=u||j_(a,r[n].t));)u=null,a=c,a.accepts()?(f=0,p=a):f>=0&&f++,n++,l++;if(f<0)for(var h=n-l;h<n;h++)o.push(r[h]);else{o.length>0&&(s.push(TT(kT,e,o)),o=[]),n-=f,l-=f;var g=p.t,H=r.slice(n-l,n);s.push(TT(g,e,H))}}return o.length>0&&s.push(TT(kT,e,o)),s}function TT(t,e,r){var i=r[0].s,n=r[r.length-1].e,s=e.substr(i,n-i);return new t(s,r)}var RT=typeof console<"u"&&console&&console.warn||function(){},Lt={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Uwe(){Lt.scanner=null,Lt.parser=null,Lt.pluginQueue=[],Lt.customProtocols=[],Lt.initialized=!1}function jwe(t,e){for(var r=0;r<Lt.pluginQueue.length;r++)if(t===Lt.pluginQueue[r][0]){RT('linkifyjs: plugin "'.concat(t,'" already registered - will be overwritten')),Lt.pluginQueue[r]=[t,e];return}Lt.pluginQueue.push([t,e]),Lt.initialized&&RT('linkifyjs: already initialized - will not register plugin "'.concat(t,'" until you manually call linkify.init(). To avoid this warning, please register all plugins before invoking linkify the first time.'))}function qwe(t){if(Lt.initialized&&RT('linkifyjs: already initialized - will not register custom protocol "'.concat(t,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(t))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Lt.customProtocols.push(t)}function ZK(){Lt.scanner={start:$we(Lt.customProtocols),tokens:Twe},Lt.parser={start:Fwe(),tokens:Nwe};for(var t={createTokenClass:dl},e=0;e<Lt.pluginQueue.length;e++)Lt.pluginQueue[e][1]({scanner:Lt.scanner,parser:Lt.parser,utils:t});Lt.initialized=!0}function WT(t){return Lt.initialized||ZK(),Bwe(Lt.parser.start,t,kwe(Lt.scanner.start,t))}function Wwe(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=WT(t),i=[],n=0;n<r.length;n++){var s=r[n];s.isLink&&(!e||s.t===e)&&i.push(s.toObject())}return i}function Vwe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=WT(t);return r.length===1&&r[0].isLink&&(!e||r[0].t===e)}rs.Options=qT;rs.find=Wwe;rs.init=ZK;rs.options=Mwe;rs.registerCustomProtocol=qwe;rs.registerPlugin=jwe;rs.reset=Uwe;rs.test=Vwe;rs.tokenize=WT});var rz=b((AGe,tz)=>{tz.exports=ez()});var a_e={};Yz(a_e,{activate:()=>s_e,deactivate:()=>o_e});module.exports=Qz(a_e);var Wz=S(Se()),Vz=require("os"),er=S(require("vscode"));var oh=new Map([["pwa-node","node"],["pwa-chrome","chrome"],["pwa-extensionHost","extensionHost"],["pwa-msedge","msedge"]]),yl=t=>oh.get(t)||t,mX={["pwa-extensionHost"]:null,["node-terminal"]:null,["pwa-node"]:null,["pwa-chrome"]:null,["pwa-msedge"]:null},gX={["extension.js-debug.addCustomBreakpoints"]:null,["extension.pwa-node-debug.attachNodeProcess"]:null,["extension.js-debug.clearAutoAttachVariables"]:null,["extension.js-debug.setAutoAttachVariables"]:null,["extension.js-debug.autoAttachToProcess"]:null,["extension.js-debug.createDebuggerTerminal"]:null,["extension.js-debug.createDiagnostics"]:null,["extension.js-debug.getDiagnosticLogs"]:null,["extension.js-debug.debugLink"]:null,["extension.js-debug.npmScript"]:null,["extension.js-debug.pickNodeProcess"]:null,["extension.js-debug.prettyPrint"]:null,["extension.js-debug.removeAllCustomBreakpoints"]:null,["extension.js-debug.removeCustomBreakpoint"]:null,["extension.js-debug.revealPage"]:null,["extension.js-debug.startProfile"]:null,["extension.js-debug.stopProfile"]:null,["extension.js-debug.toggleSkippingFile"]:null,["extension.node-debug.startWithStopOnEntry"]:null,["extension.js-debug.requestCDPProxy"]:null,["extension.js-debug.openEdgeDevTools"]:null,["extension.js-debug.callers.add"]:null,["extension.js-debug.callers.goToCaller"]:null,["extension.js-debug.callers.gotToTarget"]:null,["extension.js-debug.callers.remove"]:null,["extension.js-debug.callers.removeAll"]:null,["extension.js-debug.enableSourceMapStepping"]:null,["extension.js-debug.disableSourceMapStepping"]:null},l_e=new Set(Object.keys(gX)),EA=new Set(Object.keys(mX)),ca=t=>EA.has(t);var $e=(t,e,r)=>t.registerCommand(e,r),vH=async(t,e,...r)=>await t.executeCommand(e,...r);var $t=(t,e,r)=>t.getConfiguration(void 0,r).get(e),SA=(t,e,r,i)=>t.getConfiguration().update(e,r,i);var ah=async(t,e,r)=>await t.executeCommand("setContext",e,r);var bH={name:"js-debug",displayName:"JavaScript Debugger",version:"1.77.1",publisher:"ms-vscode",author:{name:"Microsoft Corporation"},keywords:["pwa","javascript","node","chrome","debugger"],description:"An extension for debugging Node.js programs and Chrome.",license:"MIT",engines:{vscode:"^1.73.0",node:">=10"},icon:"resources/logo.png",categories:["Debuggers"],private:!0,repository:{type:"git",url:"https://github.com/Microsoft/vscode-pwa.git"},bugs:{url:"https://github.com/Microsoft/vscode-pwa/issues"},scripts:{compile:"gulp",watch:"gulp watch",fmt:"gulp format",prepare:"husky install",package:"gulp package",publish:"gulp publish",precommit:"npm-run-all --parallel test:lint test:types",updatetypes:"cd src/typings && npx vscode-dts dev && npx vscode-dts master",updatenodeapi:"python src/build/getNodePdl.py && prettier --write src/build/nodeCustom.ts",generateapis:"node dist/src/build/generateDap.js && node dist/src/build/generateCdp.js",test:"gulp && npm-run-all --parallel test:unit test:types test:golden test:lint","test:types":"tsc --noEmit","test:unit":"tsx node_modules/mocha/bin/mocha.js --config .mocharc.unit.js","test:golden":"node ./src/test/runTest.js","test:lint":"gulp lint"},dependencies:{"@c4312/chromehash":"^0.3.0","@vscode/js-debug-browsers":"^1.0.8","@vscode/l10n":"^0.0.11","@vscode/win32-app-container-tokens":"^0.1.0",acorn:"^8.7.0","acorn-loose":"^8.3.0",astring:"^1.8.1",color:"^4.2.1","data-uri-to-buffer":"^3.0.1","default-browser":"^2.0.1",dotenv:"^16.0.0",estraverse:"^5.3.0",execa:"^5.1.1","glob-stream":"^7.0.0",got:"^11.8.6",inversify:"^6.0.1","js-xxhash":"^1.0.4","jsonc-parser":"^3.0.0",linkifyjs:"^3.0.5",micromatch:"^4.0.5","path-browserify":"^1.0.1",preact:"^10.6.6","reflect-metadata":"^0.1.13",signale:"^1.4.0","source-map":"0.8.0-beta.0","source-map-support":"^0.5.21",split2:"^4.1.0","to-absolute-glob":"^2.0.2","vscode-tas-client":"^0.1.42",ws:"^8.5.0"},prettier:{trailingComma:"all",singleQuote:!0,arrowParens:"avoid",printWidth:100,tabWidth:2},devDependencies:{"@c4312/matcha":"^1.3.1","@mixer/parallel-prettier":"^2.0.1","@pptr/testrunner":"^0.8.0","@types/chai":"^4.3.0","@types/chai-as-promised":"^7.1.5","@types/chai-string":"^1.4.2","@types/chai-subset":"^1.3.3","@types/color":"^3.0.3","@types/debug":"^4.1.7","@types/del":"^4.0.0","@types/diff":"^5.0.2","@types/estraverse":"^5.1.1","@types/estree":"0.0.51","@types/express":"^4.17.13","@types/glob":"^7.2.0","@types/glob-stream":"^6.1.1","@types/gulp":"^4.0.9","@types/js-beautify":"^1.13.3","@types/json-schema":"^7.0.11","@types/linkifyjs":"^2.1.4","@types/long":"^4.0.1","@types/marked":"^4.0.3","@types/micromatch":"^4.0.2","@types/minimist":"^1.2.2","@types/mkdirp":"^1.0.2","@types/mocha":"^9.1.0","@types/node":"^17.0.23","@types/prettier":"^2.4.4","@types/signale":"^1.4.4","@types/sinon":"^10.0.11","@types/split2":"^3.2.1","@types/stream-buffers":"^3.0.4","@types/tmp":"^0.2.3","@types/to-absolute-glob":"^2.0.1","@types/ws":"^8.5.3","@typescript-eslint/eslint-plugin":"^5.17.0","@typescript-eslint/parser":"^5.17.0","@vscode/test-electron":"^2.2.3",chai:"^4.3.6","chai-as-promised":"^7.1.1","chai-string":"^1.5.0","chai-subset":"^1.6.0",deepmerge:"^4.2.2",del:"^6.0.0",diff:"^5.0.0",esbuild:"^0.17.10",eslint:"^8.12.0","eslint-plugin-header":"^3.1.1","eslint-plugin-react":"^7.29.4",express:"^4.17.3",glob:"^7.2.0",gulp:"^4.0.2","gulp-cli":"^2.3.0","gulp-filter":"^7.0.0","gulp-rename":"^2.0.0","gulp-util":"^3.0.8",husky:"^7.0.4",marked:"^4.0.12",merge2:"^1.4.1",minimist:"^1.2.6",mocha:"^10.2.0","mocha-junit-reporter":"^2.0.2","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",nyc:"^15.1.0",playwright:"^1.26.0",prettier:"^2.6.1",sinon:"^13.0.1","stream-buffers":"^3.0.2","ts-node":"^10.7.0",tsx:"^3.12.3",typescript:"^4.6.3",vsce:"^2.7.0","vscode-debugadapter-testsupport":"^1.47.0","vscode-debugprotocol":"^1.47.0"},main:"./src/extension.js",enabledApiProposals:["portsAttributes","findTextInFiles","workspaceTrust","tunnels"],extensionKind:["workspace"],contributes:{terminal:{profiles:[{id:"extension.js-debug.debugTerminal",title:"%debug.terminal.label%",icon:"$(debug)"}]}}};var kt=t=>!!t,vl=t=>_H(t,e=>e!==null),a$=t=>_H(t,e=>e!==void 0),qu=t=>e=>e instanceof t,wH=(t,e)=>{debugger;throw new Error(e.replace("{value}",JSON.stringify(t)))};function _H(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];e(n,i)&&(r[i]=n)}return r}function ao(t,e){let r={};for(let i of Object.keys(t)){let n=t[i];r[i]=e(n,i)}return r}function u$(t,e){let r={};for(let i of Object.keys(t))e(i,t[i])&&(r[i]=t[i]);return r}function c$(...t){if(t.length===0)return{};let e={},r=Object.create(null);for(let i of t)if(i)for(let n of Object.keys(i)){let s=n.toLowerCase();r[s]?e[r[s]]=i[n]:(r[s]=n,e[n]=i[n])}return e}function l$(t,e){if(t.hasOwnProperty(e))return t[e];let r=e.toLowerCase();for(let i of Object.keys(t))if(i.toLowerCase()===r)return t[i]}var CA=Symbol("unset");function Fe(t){let e=CA,r=(...i)=>(e===CA&&(r.value=e=t(...i)),e);return r.forget=()=>{e=CA,r.value=void 0},r.value=void 0,r}function uo(t){let e=new Map,r=i=>{if(e.has(i))return e.get(i);let n=t(i);return e.set(i,n),n};return r.clear=()=>e.clear(),r}function p$(t){let e,r=i=>((e==null?void 0:e.arg)===i||(e={arg:i,val:t(i)}),e.val);return r.clear=()=>e=void 0,r}function f$(t,e){let r,i=()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e()},t)};return i.clear=()=>{r&&(clearTimeout(r),r=void 0)},i}function d$(t,e){let r,i=()=>{r===void 0&&(r=setTimeout(()=>{r=void 0,e()},t))};return i.queued=()=>!!r,i.clear=()=>{r&&(clearTimeout(r),r=void 0)},i}function h$(t,e){let r=[],i=[];for(let n of t)e(n)?r.push(n):i.push(n);return[r,i]}function Wu(t){let e=[];for(let r of t)e=e.concat(r);return e}var yX=2**31-1,AH=()=>{let t=0;return()=>t++&yX};var Ke=Symbol("AnyLaunchConfiguration"),IH={type:"",name:"",request:"",trace:!1,outputCapture:"console",timeout:1e4,timeouts:{},showAsyncStacks:!0,skipFiles:[],smartStep:!0,sourceMaps:!0,sourceMapRenames:!0,pauseForSourceMap:!0,resolveSourceMapLocations:null,rootPath:"${workspaceFolder}",outFiles:["${workspaceFolder}/**/*.js","!**/node_modules/**"],sourceMapPathOverrides:TA("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},uh={...IH,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:["<node_internals>/**"],enableTurboSourcemaps:!0},EH={...uh,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},vX={...uh,type:"node-terminal",request:"attach",name:EH.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},xA={...uh,type:"pwa-extensionHost",name:"Debug Extension",request:"launch",args:["--extensionDevelopmentPath=${workspaceFolder}"],outFiles:["${workspaceFolder}/out/**/*.js"],resolveSourceMapLocations:["${workspaceFolder}/**","!**/node_modules/**"],rendererDebugOptions:{},runtimeExecutable:"${execPath}",autoAttachChildProcesses:!1,debugWebviews:!1,debugWebWorkerHost:!1,__sessionId:""},bX={...uh,type:"pwa-node",request:"launch",program:"",cwd:"${workspaceFolder}",stopOnEntry:!1,console:"internalConsole",restart:!1,args:[],runtimeExecutable:"node",runtimeVersion:"default",runtimeArgs:[],profileStartup:!1,attachSimplePort:null,killBehavior:"forceful"},ch={...IH,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:TA("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},DA={...ch,type:"pwa-msedge",useWebView:!1},SH={...ch,type:"pwa-chrome",request:"launch",cwd:null,file:null,env:{},urlFilter:"*",includeDefaultArgs:!0,includeLaunchArgs:!0,runtimeArgs:null,runtimeExecutable:"*",userDataDir:!0,browserLaunchLocation:"workspace",profileStartup:!1,cleanUp:"wholeBrowser"},PA={...SH,type:"pwa-msedge",useWebView:!1},LA={...uh,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function TA(t){return{"webpack:///./~/*":`${t}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${t}/*`,"webpack://?:*/*":`${t}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${t}/*`}}var CH=t=>{!t.sourceMapPathOverrides&&t.cwd&&(t.sourceMapPathOverrides=TA(t.cwd)),t.resolveSourceMapLocations===void 0&&!t.remoteRoot&&(t.resolveSourceMapLocations=t.outFiles)};function $A({...t}){return CH(t),t.request==="attach"?{...LA,...t}:{...bX,...t}}function wX(t,e){return t.request==="attach"?{...ch,browserAttachLocation:e,...t}:{...SH,browserLaunchLocation:e,...t}}function _X(t,e){return t.request==="attach"?{...DA,browserAttachLocation:e,...t}:{...PA,browserLaunchLocation:e,...t}}function AX(t){let e={...xA,...t};return e.skipFiles=[...e.skipFiles,"**/node_modules.asar/**","**/bootstrap-fork.js"],e}function kA(t){return CH(t),t.request==="launch"?{...EH,...t}:{...vX,...t}}function co(t,e){let r,i=e==="remote"?"ui":"workspace";switch(t.type){case"pwa-node":r=$A(t);break;case"pwa-msedge":r=_X(t,i);break;case"pwa-chrome":r=wX(t,i);break;case"pwa-extensionHost":r=AX(t);break;case"node-terminal":r=kA(t);break;default:throw wH(t,"Unknown config: {value}")}return MA(r)}function RA(t){var i,n,s,o;let e="${workspaceFolder}",r={...t,rootPath:void 0,outFiles:t.outFiles.filter(a=>!a.includes(e)),sourceMapPathOverrides:_H(t.sourceMapPathOverrides,a=>!a.includes("${workspaceFolder}"))};return"vueComponentPaths"in r&&(r.vueComponentPaths=r.vueComponentPaths.filter(a=>!a.includes(e))),"resolveSourceMapLocations"in r&&(r.resolveSourceMapLocations=(n=(i=r.resolveSourceMapLocations)==null?void 0:i.filter(a=>!a.includes(e)))!=null?n:null),"cwd"in r&&((s=r.cwd)!=null&&s.includes(e))&&(r.cwd=void 0),"webRoot"in r&&((o=r.webRoot)!=null&&o.includes(e))&&(r.webRoot="/"),r}function MA(t){return t.__workspaceFolder||(t=RA(t)),t=is(t,"workspaceFolder",t.__workspaceFolder),t=is(t,"webRoot","webRoot"in t?t.webRoot:t.__workspaceFolder),t}function is(t,e,r){let i;if(typeof t=="string")i=t.replace(new RegExp(`\\$\\{${e}\\}`,"g"),()=>{if(!r)throw new Error(`Unable to resolve \${${e}} in configuration (${JSON.stringify(e)})`);return r});else if(t instanceof Array)i=t.map(n=>is(n,e,r));else if(typeof t=="object"&&t){let n={};for(let[s,o]of Object.entries(t))n[is(s,e,r)]=is(o,e,r);i=n}else i=t;return i}var xH=["javascript","typescript","typescriptreact","javascriptreact","fsharp","html"],DH=bH.name,Vu=bH.version,IX=bH.publisher,PH=DH.includes("nightly"),m$=`${IX}.${DH}`;var cA=S(zA()),az=S(gI()),uA=require("fs"),lA=S(Y());var $R;(function(t){(function(e){var r=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),i=n(t);typeof r.Reflect>"u"?r.Reflect=t:i=n(r.Reflect,i),e(i);function n(s,o){return function(a,u){typeof s[a]!="function"&&Object.defineProperty(s,a,{configurable:!0,writable:!0,value:u}),o&&o(a,u)}}})(function(e){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",n=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",a={__proto__:[]}instanceof Array,u=!o&&!a,c={create:o?function(){return Dn(Object.create(null))}:a?function(){return Dn({__proto__:null})}:function(){return Dn({})},has:u?function(d,y){return r.call(d,y)}:function(d,y){return y in d},get:u?function(d,y){return r.call(d,y)?d[y]:void 0}:function(d,y){return d[y]}},l=Object.getPrototypeOf(Function),p=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",f=!p&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:HH(),h=!p&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:_A(),g=!p&&typeof WeakMap=="function"?WeakMap:_e(),H=new g;function v(d,y,_,I){if(te(_)){if(!Ae(d))throw new TypeError;if(!be(y))throw new TypeError;return O(d,y)}else{if(!Ae(d))throw new TypeError;if(!he(y))throw new TypeError;if(!he(I)&&!te(I)&&!ce(I))throw new TypeError;return ce(I)&&(I=void 0),_=Z(_),E(d,y,_,I)}}e("decorate",v);function w(d,y){function _(I,R){if(!he(I))throw new TypeError;if(!te(R)&&!Ge(R))throw new TypeError;ee(d,y,I,R)}return _}e("metadata",w);function T(d,y,_,I){if(!he(_))throw new TypeError;return te(I)||(I=Z(I)),ee(d,y,_,I)}e("defineMetadata",T);function U(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),N(d,y,_)}e("hasMetadata",U);function x(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),z(d,y,_)}e("hasOwnMetadata",x);function P(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),D(d,y,_)}e("getMetadata",P);function q(d,y,_){if(!he(y))throw new TypeError;return te(_)||(_=Z(_)),L(d,y,_)}e("getOwnMetadata",q);function j(d,y){if(!he(d))throw new TypeError;return te(y)||(y=Z(y)),re(d,y)}e("getMetadataKeys",j);function F(d,y){if(!he(d))throw new TypeError;return te(y)||(y=Z(y)),ie(d,y)}e("getOwnMetadataKeys",F);function $(d,y,_){if(!he(y))throw new TypeError;te(_)||(_=Z(_));var I=M(y,_,!1);if(te(I)||!I.delete(d))return!1;if(I.size>0)return!0;var R=H.get(y);return R.delete(_),R.size>0||H.delete(y),!0}e("deleteMetadata",$);function O(d,y){for(var _=d.length-1;_>=0;--_){var I=d[_],R=I(y);if(!te(R)&&!ce(R)){if(!be(R))throw new TypeError;y=R}}return y}function E(d,y,_,I){for(var R=d.length-1;R>=0;--R){var B=d[R],V=B(y,_,I);if(!te(V)&&!ce(V)){if(!he(V))throw new TypeError;I=V}}return I}function M(d,y,_){var I=H.get(d);if(te(I)){if(!_)return;I=new f,H.set(d,I)}var R=I.get(y);if(te(R)){if(!_)return;R=new f,I.set(y,R)}return R}function N(d,y,_){var I=z(d,y,_);if(I)return!0;var R=gl(y);return ce(R)?!1:N(d,R,_)}function z(d,y,_){var I=M(y,_,!1);return te(I)?!1:Gt(I.has(d))}function D(d,y,_){var I=z(d,y,_);if(I)return L(d,y,_);var R=gl(y);if(!ce(R))return D(d,R,_)}function L(d,y,_){var I=M(y,_,!1);if(!te(I))return I.get(d)}function ee(d,y,_,I){var R=M(_,I,!0);R.set(d,y)}function re(d,y){var _=ie(d,y),I=gl(d);if(I===null)return _;var R=re(I,y);if(R.length<=0)return _;if(_.length<=0)return R;for(var B=new h,V=[],G=0,W=_;G<W.length;G++){var ue=W[G],de=B.has(ue);de||(B.add(ue),V.push(ue))}for(var ye=0,Ne=R;ye<Ne.length;ye++){var ue=Ne[ye],de=B.has(ue);de||(B.add(ue),V.push(ue))}return V}function ie(d,y){var _=[],I=M(d,y,!1);if(te(I))return _;for(var R=I.keys(),B=Ct(R),V=0;;){var G=ua(B);if(!G)return _.length=V,_;var W=aa(G);try{_[V]=W}catch(ue){try{ju(B)}finally{throw ue}}V++}}function J(d){if(d===null)return 1;switch(typeof d){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return d===null?1:6;default:return 6}}function te(d){return d===void 0}function ce(d){return d===null}function ae(d){return typeof d=="symbol"}function he(d){return typeof d=="object"?d!==null:typeof d=="function"}function dt(d,y){switch(J(d)){case 0:return d;case 1:return d;case 2:return d;case 3:return d;case 4:return d;case 5:return d}var _=y===3?"string":y===5?"number":"default",I=wt(d,n);if(I!==void 0){var R=I.call(d,_);if(he(R))throw new TypeError;return R}return ge(d,_==="default"?"number":_)}function ge(d,y){if(y==="string"){var _=d.toString;if(Q(_)){var I=_.call(d);if(!he(I))return I}var R=d.valueOf;if(Q(R)){var I=R.call(d);if(!he(I))return I}}else{var R=d.valueOf;if(Q(R)){var I=R.call(d);if(!he(I))return I}var B=d.toString;if(Q(B)){var I=B.call(d);if(!he(I))return I}}throw new TypeError}function Gt(d){return!!d}function kr(d){return""+d}function Z(d){var y=dt(d,3);return ae(y)?y:kr(y)}function Ae(d){return Array.isArray?Array.isArray(d):d instanceof Object?d instanceof Array:Object.prototype.toString.call(d)==="[object Array]"}function Q(d){return typeof d=="function"}function be(d){return typeof d=="function"}function Ge(d){switch(J(d)){case 3:return!0;case 4:return!0;default:return!1}}function wt(d,y){var _=d[y];if(_!=null){if(!Q(_))throw new TypeError;return _}}function Ct(d){var y=wt(d,s);if(!Q(y))throw new TypeError;var _=y.call(d);if(!he(_))throw new TypeError;return _}function aa(d){return d.value}function ua(d){var y=d.next();return y.done?!1:y}function ju(d){var y=d.return;y&&y.call(d)}function gl(d){var y=Object.getPrototypeOf(d);if(typeof d!="function"||d===l||y!==l)return y;var _=d.prototype,I=_&&Object.getPrototypeOf(_);if(I==null||I===Object.prototype)return y;var R=I.constructor;return typeof R!="function"||R===d?y:R}function HH(){var d={},y=[],_=function(){function V(G,W,ue){this._index=0,this._keys=G,this._values=W,this._selector=ue}return V.prototype["@@iterator"]=function(){return this},V.prototype[s]=function(){return this},V.prototype.next=function(){var G=this._index;if(G>=0&&G<this._keys.length){var W=this._selector(this._keys[G],this._values[G]);return G+1>=this._keys.length?(this._index=-1,this._keys=y,this._values=y):this._index++,{value:W,done:!1}}return{value:void 0,done:!0}},V.prototype.throw=function(G){throw this._index>=0&&(this._index=-1,this._keys=y,this._values=y),G},V.prototype.return=function(G){return this._index>=0&&(this._index=-1,this._keys=y,this._values=y),{value:G,done:!0}},V}();return function(){function V(){this._keys=[],this._values=[],this._cacheKey=d,this._cacheIndex=-2}return Object.defineProperty(V.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),V.prototype.has=function(G){return this._find(G,!1)>=0},V.prototype.get=function(G){var W=this._find(G,!1);return W>=0?this._values[W]:void 0},V.prototype.set=function(G,W){var ue=this._find(G,!0);return this._values[ue]=W,this},V.prototype.delete=function(G){var W=this._find(G,!1);if(W>=0){for(var ue=this._keys.length,de=W+1;de<ue;de++)this._keys[de-1]=this._keys[de],this._values[de-1]=this._values[de];return this._keys.length--,this._values.length--,G===this._cacheKey&&(this._cacheKey=d,this._cacheIndex=-2),!0}return!1},V.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=d,this._cacheIndex=-2},V.prototype.keys=function(){return new _(this._keys,this._values,I)},V.prototype.values=function(){return new _(this._keys,this._values,R)},V.prototype.entries=function(){return new _(this._keys,this._values,B)},V.prototype["@@iterator"]=function(){return this.entries()},V.prototype[s]=function(){return this.entries()},V.prototype._find=function(G,W){return this._cacheKey!==G&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=G)),this._cacheIndex<0&&W&&(this._cacheIndex=this._keys.length,this._keys.push(G),this._values.push(void 0)),this._cacheIndex},V}();function I(V,G){return V}function R(V,G){return G}function B(V,G){return[V,G]}}function _A(){return function(){function d(){this._map=new f}return Object.defineProperty(d.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),d.prototype.has=function(y){return this._map.has(y)},d.prototype.add=function(y){return this._map.set(y,y),this},d.prototype.delete=function(y){return this._map.delete(y)},d.prototype.clear=function(){this._map.clear()},d.prototype.keys=function(){return this._map.keys()},d.prototype.values=function(){return this._map.values()},d.prototype.entries=function(){return this._map.entries()},d.prototype["@@iterator"]=function(){return this.keys()},d.prototype[s]=function(){return this.keys()},d}()}function _e(){var d=16,y=c.create(),_=I();return function(){function W(){this._key=I()}return W.prototype.has=function(ue){var de=R(ue,!1);return de!==void 0?c.has(de,this._key):!1},W.prototype.get=function(ue){var de=R(ue,!1);return de!==void 0?c.get(de,this._key):void 0},W.prototype.set=function(ue,de){var ye=R(ue,!0);return ye[this._key]=de,this},W.prototype.delete=function(ue){var de=R(ue,!1);return de!==void 0?delete de[this._key]:!1},W.prototype.clear=function(){this._key=I()},W}();function I(){var W;do W="@@WeakMap@@"+G();while(c.has(y,W));return y[W]=!0,W}function R(W,ue){if(!r.call(W,_)){if(!ue)return;Object.defineProperty(W,_,{value:c.create()})}return W[_]}function B(W,ue){for(var de=0;de<ue;++de)W[de]=Math.random()*255|0;return W}function V(W){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(W)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(W)):B(new Uint8Array(W),W):B(new Array(W),W)}function G(){var W=V(d);W[6]=W[6]&79|64,W[8]=W[8]&191|128;for(var ue="",de=0;de<d;++de){var ye=W[de];(de===4||de===6||de===8)&&(ue+="-"),ye<16&&(ue+="0"),ue+=ye.toString(16).toLowerCase()}return ue}}function Dn(d){return d.__=void 0,delete d.__,d}})})($R||($R={}));var Jh=require("fs"),Jt=S(Y()),xv=S(require("path"));var X=class{constructor(){this._listeners=new Set;this.event=(e,r,i)=>{let n={listener:e,thisArg:r};this._listeners.add(n);let s={dispose:()=>{s.dispose=()=>{},this._listeners.delete(n)}};return i&&i.push(s),s}}get size(){return this._listeners.size}fire(e){let r=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(let i of this._listeners)this._deliveryQueue.push({data:i,event:e});if(r){for(let i=0;i<this._deliveryQueue.length;i++){let{data:n,event:s}=this._deliveryQueue[i];n.listener.call(n.thisArg,s)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}},_h=class{constructor(){this.map=new Map;this.listeners=this.map}listen(e,r){let i=this.map.get(e);i||(i=new X,this.map.set(e,i));let n=i.event(r);return{dispose:Fe(()=>{n.dispose(),(i==null?void 0:i.size)===0&&this.map.delete(e)})}}emit(e,r){var i;(i=this.listeners.get(e))==null||i.fire(r)}};var Yu=S(Y()),Ih=S(require("path"));var NR=require("crypto"),FR=S(gI()),BR=require("os"),je=S(require("path"));var ws=S(require("fs")),kR=S(require("util"));async function Ju({access:t},e){if(!e)return!1;try{return await t(e),!0}catch(r){return!1}}async function XI(t,e,r){try{await t.copyFile(e,r)}catch(i){try{if(await Ju(t,r))await t.unlink(r),await t.copyFile(e,r);else throw i}catch(n){throw i}}}async function Di({stat:t},e){if(e)try{return await t(e)}catch(r){return}}async function RR({lstat:t},e){if(e)try{return await t(e)}catch(r){return}}async function MR({copyFile:t,rename:e,unlink:r},i,n){try{await e(i,n)}catch(s){await t(i,n),await r(i)}}function OR(t){return new Promise(e=>{ws.stat(t,(r,i)=>e(r?void 0:i))})}function xy(t){return new Promise(e=>{ws.readFile(t,"utf8",async(r,i)=>{e(r?"":i)})})}var lIe=kR.promisify(ws.writeFile);var Br=Symbol("FsUtils"),xi=class{constructor(e){this.fs=e}realPath(e){return this.fs.realpath(e)}async exists(e){try{return await this.fs.access(e,ws.constants.F_OK),!0}catch(r){return!1}}readFile(e){return this.fs.readFile(e)}},zI=class{constructor(e){this.dap=e}async realPath(){throw new Error("not implemented")}async exists(e){try{let{doesExists:r}=await this.dap.remoteFileExistsRequest({localFilePath:e});return r}catch(r){return!1}}readFile(){throw new Error("not implemented")}},Cy=class{constructor(e,r,i){this.remoteFilePrefix=e;this.localFsUtils=r;this.remoteFsUtils=i}static create(e,r,i){let n=new xi(r);return e!==void 0?new this(e.toLowerCase(),n,new zI(i)):n}async exists(e){return this.selectFs(e).exists(e)}async readFile(e){return this.selectFs(e).readFile(e)}async realPath(e){return this.selectFs(e).realPath(e)}selectFs(e){return e.toLowerCase().startsWith(this.remoteFilePrefix)?this.remoteFsUtils:this.localFsUtils}};var Lre=process.platform==="win32"?"\\\\.\\pipe\\":(0,BR.tmpdir)(),Tre=0,Dy=()=>je.join(Lre,`node-cdp.${process.pid}-${(0,NR.randomBytes)(4).toString("hex")}-${Tre++}.sock`);async function Py(t,e,r){let i;if(process.platform==="win32"){let n=r.WINDIR||"C:\\Windows";i=je.join(n,"System32","where.exe")}else i="/usr/bin/which";try{if(await Di(t,i)){let s=(await(0,FR.default)(i,[e],{env:vl(r)})).stdout.split(/\r?\n/);if(process.platform==="win32"){let o=String(r.PATHEXT||".exe").toUpperCase().split(";");for(let a of s){let u=je.extname(a).toUpperCase();if(u&&o.includes(u))return a}}else if(s.length>0)return s[0];return}return e}catch(n){}}async function UR(t,e,r){if(e){if(process.platform==="win32"&&!je.extname(e)){let i=r.lookup("PATHEXT");if(i){let n=i.split(";");for(let s of n){let o=e+s;if(await Di(t,o))return o}}}if(await Di(t,e))return e}}var jR=t=>t.includes(`.asar${je.sep}`);function fa(...t){return je.posix.isAbsolute(t[0])?qe(je.posix.join(...t)):je.win32.isAbsolute(t[0])?je.win32.join(...t):je.join(...t)}function Pi(...t){return je.posix.isAbsolute(t[0])?je.posix.resolve(...t):je.win32.isAbsolute(t[0])?je.win32.resolve(...t):je.resolve(...t)}function Ah(t,e){return je.posix.isAbsolute(t)?je.posix.relative(t,e):je.win32.isAbsolute(t)?je.win32.relative(t,e):je.relative(t,e)}var $re=/\/|\\/,JI=t=>t.split($re);function YI(t,e=!1){return t&&(t.match(/file:\/\/\/[A-Za-z]:/)?t="file:///"+t[8].toLowerCase()+t.substr(8+1):$y(t)&&(t=(e?t[0].toUpperCase():t[0].toLowerCase())+t.substr(1)),t)}function Ft(t,e=!1){return t&&(t=YI(t,e),t.match(/file:\/\/\/[A-Za-z]:/)?t=t.substr(0,8+1)+t.substr(8+1).replace(/\//g,"\\"):$y(t)&&(t=t.replace(/\//g,"\\")),t)}function qe(t){return t.replace(/\\\//g,"/").replace(/\\/g,"/")}var Ly=(t,e)=>{let r=je.relative(t,e);return r.length&&!je.isAbsolute(r)&&!r.startsWith("..")},Ty=(t,e)=>{let r=je.relative(t,e);return!je.isAbsolute(r)&&!r.startsWith("..")},QI=t=>t.startsWith("\\\\"),$y=t=>/^[A-Za-z]:/.test(t)||QI(t);var kl=class{get empty(){return this.patterns.length===0}constructor({rootPath:e,patterns:r}){!e||!r?(this.rootPath="",this.patterns=[]):(this.rootPath=e,this.patterns=r.map(i=>{let n=i.startsWith("!");return{negated:n,pattern:i.slice(n?1:0)}}))}*explode(){for(let e=0;e<this.patterns.length;e++){let{negated:r,pattern:i}=this.patterns[e];if(r)continue;let n=Ih.resolve(this.rootPath,i).split(/[\\/]/g),s=n.findIndex(u=>u.includes("*"));if(s===-1){yield{cwd:n.slice(0,-1).join("/"),pattern:n[n.length-1],negations:[]};continue}let o=n.slice(0,s).join("/"),a=[];for(let u=e+1;u<this.patterns.length;u++){let{negated:c,pattern:l}=this.patterns[u];if(c)if(l.startsWith("**"))a.push(qe(l));else{let p=Ih.relative(o,Ih.resolve(this.rootPath,l));p.startsWith("..")||a.push(qe(p))}}yield{cwd:o,negations:a,pattern:n.slice(s).join("/")}}}};kl=k([(0,Yu.injectable)()],kl);var _s=class extends kl{constructor({rootPath:e,outFiles:r}){super({rootPath:e,patterns:r})}};_s=k([(0,Yu.injectable)(),A(0,(0,Yu.inject)(Ke))],_s);var fo=class extends kl{constructor(e){super({rootPath:e.rootPath,patterns:"vueComponentPaths"in e?e.vueComponentPaths:[]})}};fo=k([(0,Yu.injectable)(),A(0,(0,Yu.inject)(Ke))],fo);var WR=require("crypto"),VR=require("os"),GR=S(require("path"));var Eh=require("fs"),qR=require("path"),Ry=require("zlib"),Rre=(t,e)=>e instanceof Error?{message:e.message,stack:e.stack}:typeof e=="bigint"?e.toString():e,ky=class{constructor(e,r){this.file=e;this.dap=r;try{(0,Eh.mkdirSync)((0,qR.dirname)(e),{recursive:!0})}catch(i){}e.endsWith(".gz")?(this.stream=(0,Ry.createGzip)(),this.stream.pipe((0,Eh.createWriteStream)(e))):this.stream=(0,Eh.createWriteStream)(e)}async setup(){var e;(e=this.dap)==null||e.output({category:"console",output:`Verbose logs are written to:
${this.file}
`})}dispose(){this.stream&&(this.stream.end(),this.stream=void 0)}write(e){var r,i;this.stream&&(this.stream.write(JSON.stringify(e,Rre)+`
`),(i=(r=this.stream).flush)==null||i.call(r,Ry.constants.Z_SYNC_FLUSH))}};var Mre={["runtime"]:null,["runtime.sourcecreate"]:null,["runtime.assertion"]:null,["runtime.launch"]:null,["runtime.target"]:null,["runtime.welcome"]:null,["runtime.exception"]:null,["runtime.sourcemap"]:null,["runtime.breakpoints"]:null,["sourcemap.parsing"]:null,["perf.function"]:null,["cdp.send"]:null,["cdp.receive"]:null,["dap.send"]:null,["dap.receive"]:null,["internal"]:null,["proxyActivity"]:null},wIe=Object.keys(Mre),fe=Symbol("ILogger");function ZI(t,e=(0,VR.tmpdir)()){if(t===!1)return{stdio:!1,logFile:null};let r={stdio:!0,logFile:GR.join(e,`vscode-debugadapter-${(0,WR.randomBytes)(4).toString("hex")}.json.gz`)};return t===!0?r:{...r,...t}}function KR(t,e){let r=ZI(e),i={sinks:[]};return r.logFile&&i.sinks.push(new ky(r.logFile,t)),i}var Sa=S(Y()),dN=S(Uy());var jy=class extends Error{constructor(r,i,n){super(`Unexpected ${r} response from ${i}: ${n!=null?n:"<empty body>"}`);this.statusCode=r;this.url=i;this.body=n}},Zu=Symbol("IResourceProvider");var Oe=t=>isFinite(t)?new Promise(e=>setTimeout(e,t)):new Promise(()=>{}),HM=(t,e)=>{let r=setTimeout(t,e);return{dispose:()=>clearTimeout(r)}};function Is(t){return new Promise((e,r)=>{let i=t.length;for(let n of t)n.then(s=>{s?(e(s),i=-1):--i===0&&e(void 0)}).catch(r)})}function Je(){let t=null,e=null,r=!1,i,n=new Promise((s,o)=>{t=a=>{r=!0,i=a,s(a)},e=a=>{r=!0,o(a)}});return{resolve:t,reject:e,promise:n,get settledValue(){return i},hasSettled:()=>r}}var _t=S(Se());var ne=class extends Error{constructor(r){super("__errorMarker"in r?r.error.format:r.format);this._cause="__errorMarker"in r?r.error:r}get cause(){return this._cause}};function yM(t,e){t.output({category:"console",output:e+`
`})}function ot(t,e=9222){return{__errorMarker:!0,error:{id:e,format:t,showUser:!1}}}function at(t,e=9223){return{__errorMarker:!0,error:{id:e,format:t,showUser:!0}}}var hE=()=>at(_t.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvs' or 'nvm' to be installed."),9224),vM=()=>at(_t.t("Attribute 'runtimeVersion' with a flavor/architecture requires 'nvs' to be installed."),9225),bM=()=>at(_t.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'."),9226),mE=(t,e)=>at(_t.t("Node.js version '{0}' not installed using version manager {1}.",t,e),9226),wM=t=>at(_t.t("Cannot launch debug target in terminal ({0}).",t),9227),_M=t=>at(_t.t("Can't load environment variables from file ({0}).",t),9228),AM=t=>at(_t.t("The configured `cwd` {0} does not exist.",t),9245),gE=(t,e)=>at(_t.t(`Can't find Node.js binary "{0}": {1}. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json`,t,e),9229),IM=(t,e)=>at(_t.t('The Node version in "{0}" is outdated (version {1}), we require at least Node 8.x.',e,t),9230),EM=t=>at(_t.t('Invalid hit condition "{0}". Expected an expression like "> 42" or "== 2".',t),9231),Fl=()=>at(_t.t("An error occurred taking a profile from the target."),9235),SM=()=>at(_t.t("Please stop the running profile before starting a new one."),9236),CM=t=>ot(t,9238),qy=(t,e,r)=>at(e==="*"&&!r.length?_t.t('Unable to find an installation of the browser on your system. Try installing it, or providing an absolute path to the browser in the "runtimeExecutable" in your launch.json.'):_t.t('Unable to find {0} version {1}. Available auto-discovered versions are: {2}. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable.',t,e,JSON.stringify([...new Set(r)])),9233),xM=t=>at(_t.t('Unable to launch browser: "{0}"',t.message),9240),Th=t=>at(t!=null?t:_t.t("Unable to attach to browser"),9242),Wy=()=>at(_t.t('Target page not found. You may need to update your "urlFilter" to match the page you want to debug.'),9241);var DM=()=>ot(_t.t("Variables not available in async stacks"),9234),ga=(t,e)=>at(_t.t("Syntax error setting breakpoint with condition {0} on line {1}: {2}",JSON.stringify(t.condition),t.line,e),9237),HE=()=>ot(_t.t("Thread not found"),9244),Vy=(t,e)=>at(_t.t("Could not read source map for {0}: {1}",t,e)),PM=()=>at(_t.t("UWP webview debugging is not available on your platform.")),LM=()=>at(_t.t("Could not connect to any UWP Webview pipe. Make sure your webview is hosted in debug mode, and that the `pipeName` in your `launch.json` is correct.")),TM=t=>typeof t=="object"&&!!t&&"__errorMarker"in t,$M=(t,e)=>t instanceof ne&&t.cause.id===e;var kM=new WeakSet;var die="Request",hie=t=>t.endsWith("Request"),rn=Symbol("IDapApi"),Bl=Symbol("IRootDapApi"),$h=class{constructor(e,r){this.transport=e;this.logger=r;this._pendingRequests=new Map;this._requestHandlers=new Map;this._eventListeners=new Map;this.disposables=[];this._initialized=Je();this.closed=!1;this._sequence=1,this.disposables.push(this.transport.messageReceived(i=>this._onMessage(i.message,i.receivedTime))),this._dap=Promise.resolve(this._createApi())}get initializedBlocker(){return this._initialized.promise}attachTelemetry(e){this.telemetryReporter=e,this._dap.then(r=>e.attachDap(r))}dap(){return this._dap}_createApi(){return new Proxy({},{get:(e,r)=>{if(r!=="then")return r==="on"?(i,n)=>(this._requestHandlers.set(i,n),()=>this._requestHandlers.delete(i)):r==="off"?i=>this._requestHandlers.delete(i):i=>{if(hie(r))return this.enqueueRequest(r.slice(0,-die.length),i);this._send({seq:0,type:"event",event:r,body:i})}}})}createTestApi(){let e=(n,s)=>{let o=this._eventListeners.get(n);o||(o=new Set,this._eventListeners.set(n,o)),o.add(s)},r=(n,s)=>{let o=this._eventListeners.get(n);o&&o.delete(s)},i=(n,s)=>new Promise(o=>{let a=u=>{s&&!s(u)||(r(n,a),o(u))};e(n,a)});return new Proxy({},{get:(n,s)=>s==="on"?e:s==="off"?r:s==="once"?i:o=>this.enqueueRequest(s,o)})}enqueueRequest(e,r){return new Promise(i=>{let n={seq:0,type:"request",command:e,arguments:r||{}};this._send(n),this._pendingRequests.set(n.seq,i)})}stop(){this.closed=!0,this.transport.close()}_send(e,r){if(this.closed)this.logger.warn("dap.send","Not sending message because the connection has ended",e),r==null||r();else{e.seq=this._sequence++;let i=e.type!=="event"||!kM.has(e.body);this.transport.send(e,i,r)}}async _onMessage(e,r){var i,n,s,o;if(e.type==="request"){let a={seq:0,type:"response",request_seq:e.seq,command:e.command,success:!0};try{let u=this._requestHandlers.get(e.command);if(!u)console.error(`Unknown request: ${e.command}`);else{let c=await u(e.arguments);if(TM(c))this._send({...a,success:!1,message:c.error.format,body:{error:c.error}});else{let l={...a,body:c};a.command==="initialize"?(this._send(l),this._initialized.resolve(this)):a.command==="disconnect"?this._send({...a,body:c},()=>{this.stop()}):this._send(l)}}(i=this.telemetryReporter)==null||i.reportOperation("dapOperation",e.command,r.elapsed().ms)}catch(u){u instanceof ne?this._send({...a,success:!1,body:{error:u.cause}}):(console.error(u),this._send({...a,success:!1,body:{error:{id:9221,format:`Error processing ${e.command}: ${u.stack||u.message}`,showUser:!1,sendTelemetry:!1}}})),(n=this.telemetryReporter)==null||n.reportOperation("dapOperation",e.command,r.elapsed().ms,u)}}if(e.type==="event"){let a=this._eventListeners.get(e.event)||new Set;for(let u of a)u(e.body)}if(e.type==="response"){let a=this._pendingRequests.get(e.request_seq);if(!this.logger.assert(a,`Expected callback for request sequence ID ${e.request_seq}`))return;if(this._pendingRequests.delete(e.request_seq),e.success)a(e.body);else{let u=(o=(s=e.body)==null?void 0:s.error)==null?void 0:o.format;a(u||e.message||"Unknown error")}}}};var Gy=class{constructor(e,r){this.key=e;this.value=r}toString(){return`${this.key}: ${this.value}`}},Es=class{constructor(e,r){this.projection=e;this.initialContents=r;let i=Array.from(r||[]).map(n=>[this.projection(n[0]),new Gy(n[0],n[1])]);this.projectionToKeyAndValue=new Map(i)}clear(){this.projectionToKeyAndValue.clear()}delete(e){let r=this.projection(e);return this.projectionToKeyAndValue.delete(r)}forEach(e,r){this.projectionToKeyAndValue.forEach(i=>{e.call(r,i.value,i.key,this)},r)}get(e){let r=this.projection(e),i=this.projectionToKeyAndValue.get(r);return i?i.value:void 0}has(e){return this.projectionToKeyAndValue.has(this.projection(e))}set(e,r){return this.projectionToKeyAndValue.set(this.projection(e),new Gy(e,r)),this}get size(){return this.projectionToKeyAndValue.size}*entries(){for(let e of this.projectionToKeyAndValue.values())yield[e.key,e.value]}*keys(){for(let e of this.projectionToKeyAndValue.values())yield e.key}*values(){for(let e of this.projectionToKeyAndValue.values())yield e.value}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return JSON.stringify(Array.from(this.entries()))}toString(){return`MapUsingProjection<${JSON.stringify([...this.entries()])}>`}};var ut=Symbol("ISourcePathResolver");var aN=require("dns"),$i=S(require("path")),yo=require("url");var rN=require("url");var vE={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},bE="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",mie={5:bE,"5module":bE+" export import",6:bE+" const class extends export import super"},gie=/^in(stanceof)?$/,IE="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",FM="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",Hie=new RegExp("["+IE+"]"),yie=new RegExp("["+IE+FM+"]");IE=FM=null;var BM=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],vie=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function _E(t,e){for(var r=65536,i=0;i<e.length;i+=2){if(r+=e[i],r>t)return!1;if(r+=e[i+1],r>=t)return!0}}function mo(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&Hie.test(String.fromCharCode(t)):e===!1?!1:_E(t,BM)}function Ul(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&yie.test(String.fromCharCode(t)):e===!1?!1:_E(t,BM)||_E(t,vie)}var Be=function(e,r){r===void 0&&(r={}),this.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function nn(t,e){return new Be(t,{beforeExpr:!0,binop:e})}var sn={beforeExpr:!0},di={startsExpr:!0},EE={};function Re(t,e){return e===void 0&&(e={}),e.keyword=t,EE[t]=new Be(t,e)}var m={num:new Be("num",di),regexp:new Be("regexp",di),string:new Be("string",di),name:new Be("name",di),privateId:new Be("privateId",di),eof:new Be("eof"),bracketL:new Be("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Be("]"),braceL:new Be("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Be("}"),parenL:new Be("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Be(")"),comma:new Be(",",sn),semi:new Be(";",sn),colon:new Be(":",sn),dot:new Be("."),question:new Be("?",sn),questionDot:new Be("?."),arrow:new Be("=>",sn),template:new Be("template"),invalidTemplate:new Be("invalidTemplate"),ellipsis:new Be("...",sn),backQuote:new Be("`",di),dollarBraceL:new Be("${",{beforeExpr:!0,startsExpr:!0}),eq:new Be("=",{beforeExpr:!0,isAssign:!0}),assign:new Be("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Be("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Be("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:nn("||",1),logicalAND:nn("&&",2),bitwiseOR:nn("|",3),bitwiseXOR:nn("^",4),bitwiseAND:nn("&",5),equality:nn("==/!=/===/!==",6),relational:nn("</>/<=/>=",7),bitShift:nn("<</>>/>>>",8),plusMin:new Be("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:nn("%",10),star:nn("*",10),slash:nn("/",10),starstar:new Be("**",{beforeExpr:!0}),coalesce:nn("??",1),_break:Re("break"),_case:Re("case",sn),_catch:Re("catch"),_continue:Re("continue"),_debugger:Re("debugger"),_default:Re("default",sn),_do:Re("do",{isLoop:!0,beforeExpr:!0}),_else:Re("else",sn),_finally:Re("finally"),_for:Re("for",{isLoop:!0}),_function:Re("function",di),_if:Re("if"),_return:Re("return",sn),_switch:Re("switch"),_throw:Re("throw",sn),_try:Re("try"),_var:Re("var"),_const:Re("const"),_while:Re("while",{isLoop:!0}),_with:Re("with"),_new:Re("new",{beforeExpr:!0,startsExpr:!0}),_this:Re("this",di),_super:Re("super",di),_class:Re("class",di),_extends:Re("extends",sn),_export:Re("export"),_import:Re("import",di),_null:Re("null",di),_true:Re("true",di),_false:Re("false",di),_in:Re("in",{beforeExpr:!0,binop:7}),_instanceof:Re("instanceof",{beforeExpr:!0,binop:7}),_typeof:Re("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Re("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Re("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},hi=/\r\n?|\n|\u2028|\u2029/,Qy=new RegExp(hi.source,"g");function Ss(t){return t===10||t===13||t===8232||t===8233}function UM(t,e,r){r===void 0&&(r=t.length);for(var i=e;i<r;i++){var n=t.charCodeAt(i);if(Ss(n))return i<r-1&&n===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var jM=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,on=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qM=Object.prototype,bie=qM.hasOwnProperty,wie=qM.toString,Nh=Object.hasOwn||function(t,e){return bie.call(t,e)},RM=Array.isArray||function(t){return wie.call(t)==="[object Array]"};function ec(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var _ie=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Rh=function(e,r){this.line=e,this.column=r};Rh.prototype.offset=function(e){return new Rh(this.line,this.column+e)};var tc=function(e,r,i){this.start=r,this.end=i,e.sourceFile!==null&&(this.source=e.sourceFile)};function jl(t,e){for(var r=1,i=0;;){var n=UM(t,i,e);if(n<0)return new Rh(r,e-i);++r,i=n}}var Mh={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},MM=!1;function Aie(t){var e={};for(var r in Mh)e[r]=t&&Nh(t,r)?t[r]:Mh[r];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!MM&&typeof console=="object"&&console.warn&&(MM=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),RM(e.onToken)){var i=e.onToken;e.onToken=function(n){return i.push(n)}}return RM(e.onComment)&&(e.onComment=Iie(e,e.onComment)),e}function Iie(t,e){return function(r,i,n,s,o,a){var u={type:r?"Block":"Line",value:i,start:n,end:s};t.locations&&(u.loc=new tc(this,o,a)),t.ranges&&(u.range=[n,s]),e.push(u)}}var Oh=1,ql=2,SE=4,WM=8,VM=16,GM=32,CE=64,KM=128,Fh=256,xE=Oh|ql|Fh;function DE(t,e){return ql|(t?SE:0)|(e?WM:0)}var zy=0,PE=1,ho=2,zM=3,XM=4,JM=5,At=function(e,r,i){this.options=e=Aie(e),this.sourceFile=e.sourceFile,this.keywords=ec(mie[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var n="";e.allowReserved!==!0&&(n=vE[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(n+=" await")),this.reservedWords=ec(n);var s=(n?n+" ":"")+vE.strict;this.reservedWordsStrict=ec(s),this.reservedWordsStrictBind=ec(s+" "+vE.strictBind),this.input=String(r),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(`
`,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(hi).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=m.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Oh),this.regexpState=null,this.privateNameStack=[]},Cs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};At.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};Cs.inFunction.get=function(){return(this.currentVarScope().flags&ql)>0};Cs.inGenerator.get=function(){return(this.currentVarScope().flags&WM)>0&&!this.currentVarScope().inClassFieldInit};Cs.inAsync.get=function(){return(this.currentVarScope().flags&SE)>0&&!this.currentVarScope().inClassFieldInit};Cs.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t];if(e.inClassFieldInit||e.flags&Fh)return!1;if(e.flags&ql)return(e.flags&SE)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Cs.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&CE)>0||r||this.options.allowSuperOutsideMethod};Cs.allowDirectSuper.get=function(){return(this.currentThisScope().flags&KM)>0};Cs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Cs.allowNewDotTarget.get=function(){var t=this.currentThisScope(),e=t.flags,r=t.inClassFieldInit;return(e&(ql|Fh))>0||r};Cs.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Fh)>0};At.extend=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];for(var i=this,n=0;n<e.length;n++)i=e[n](i);return i};At.parse=function(e,r){return new this(r,e).parse()};At.parseExpressionAt=function(e,r,i){var n=new this(i,e,r);return n.nextToken(),n.parseExpression()};At.tokenizer=function(e,r){return new this(r,e)};Object.defineProperties(At.prototype,Cs);var Yr=At.prototype,Eie=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;Yr.strictDirective=function(t){for(;;){on.lastIndex=t,t+=on.exec(this.input)[0].length;var e=Eie.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){on.lastIndex=t+e[0].length;var r=on.exec(this.input),i=r.index+r[0].length,n=this.input.charAt(i);return n===";"||n==="}"||hi.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(i+1)==="=")}t+=e[0].length,on.lastIndex=t,t+=on.exec(this.input)[0].length,this.input[t]===";"&&t++}};Yr.eat=function(t){return this.type===t?(this.next(),!0):!1};Yr.isContextual=function(t){return this.type===m.name&&this.value===t&&!this.containsEsc};Yr.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};Yr.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};Yr.canInsertSemicolon=function(){return this.type===m.eof||this.type===m.braceR||hi.test(this.input.slice(this.lastTokEnd,this.start))};Yr.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Yr.semicolon=function(){!this.eat(m.semi)&&!this.insertSemicolon()&&this.unexpected()};Yr.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};Yr.expect=function(t){this.eat(t)||this.unexpected()};Yr.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};function Zy(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Yr.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var r=e?t.parenthesizedAssign:t.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}};Yr.checkExpressionErrors=function(t,e){if(!t)return!1;var r=t.shorthandAssign,i=t.doubleProto;if(!e)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};Yr.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Yr.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var we=At.prototype;we.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==m.eof;){var r=this.parseStatement(null,!0,e);t.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var LE={kind:"loop"},Sie={kind:"switch"};we.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;on.lastIndex=this.pos;var e=on.exec(this.input),r=this.pos+e[0].length,i=this.input.charCodeAt(r);if(i===91||i===92||i>55295&&i<56320)return!0;if(t)return!1;if(i===123)return!0;if(mo(i,!0)){for(var n=r+1;Ul(i=this.input.charCodeAt(n),!0);)++n;if(i===92||i>55295&&i<56320)return!0;var s=this.input.slice(r,n);if(!gie.test(s))return!0}return!1};we.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;on.lastIndex=this.pos;var t=on.exec(this.input),e=this.pos+t[0].length,r;return!hi.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(Ul(r=this.input.charCodeAt(e+8))||r>55295&&r<56320))};we.parseStatement=function(t,e,r){var i=this.type,n=this.startNode(),s;switch(this.isLet(t)&&(i=m._var,s="let"),i){case m._break:case m._continue:return this.parseBreakContinueStatement(n,i.keyword);case m._debugger:return this.parseDebuggerStatement(n);case m._do:return this.parseDoStatement(n);case m._for:return this.parseForStatement(n);case m._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!t);case m._class:return t&&this.unexpected(),this.parseClass(n,!0);case m._if:return this.parseIfStatement(n);case m._return:return this.parseReturnStatement(n);case m._switch:return this.parseSwitchStatement(n);case m._throw:return this.parseThrowStatement(n);case m._try:return this.parseTryStatement(n);case m._const:case m._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(n,s);case m._while:return this.parseWhileStatement(n);case m._with:return this.parseWithStatement(n);case m.braceL:return this.parseBlock(!0,n);case m.semi:return this.parseEmptyStatement(n);case m._export:case m._import:if(this.options.ecmaVersion>10&&i===m._import){on.lastIndex=this.pos;var o=on.exec(this.input),a=this.pos+o[0].length,u=this.input.charCodeAt(a);if(u===40||u===46)return this.parseExpressionStatement(n,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===m._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!t);var c=this.value,l=this.parseExpression();return i===m.name&&l.type==="Identifier"&&this.eat(m.colon)?this.parseLabeledStatement(n,c,l,t):this.parseExpressionStatement(n,l)}};we.parseBreakContinueStatement=function(t,e){var r=e==="break";this.next(),this.eat(m.semi)||this.insertSemicolon()?t.label=null:this.type!==m.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var n=this.labels[i];if((t.label==null||n.name===t.label.name)&&(n.kind!=null&&(r||n.kind==="loop")||t.label&&r))break}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,r?"BreakStatement":"ContinueStatement")};we.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};we.parseDoStatement=function(t){return this.next(),this.labels.push(LE),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(m._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(m.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};we.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(LE),this.enterScope(0),this.expect(m.parenL),this.type===m.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var r=this.isLet();if(this.type===m._var||this.type===m._const||r){var i=this.startNode(),n=r?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===m._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===m._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,i)):(e>-1&&this.unexpected(e),this.parseFor(t,i))}var s=this.isContextual("let"),o=!1,a=new Zy,u=this.parseExpression(e>-1?"await":!0,a);return this.type===m._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===m._in?e>-1&&this.unexpected(e):t.await=e>-1),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,a),this.checkLValPattern(u),this.parseForIn(t,u)):(this.checkExpressionErrors(a,!0),e>-1&&this.unexpected(e),this.parseFor(t,u))};we.parseFunctionStatement=function(t,e,r){return this.next(),this.parseFunction(t,kh|(r?0:AE),!1,e)};we.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(m._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};we.parseReturnStatement=function(t){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(m.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};we.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(m.braceL),this.labels.push(Sie),this.enterScope(0);for(var e,r=!1;this.type!==m.braceR;)if(this.type===m._case||this.type===m._default){var i=this.type===m._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,e.test=null),this.expect(m.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};we.parseThrowStatement=function(t){return this.next(),hi.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Cie=[];we.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===m._catch){var e=this.startNode();if(this.next(),this.eat(m.parenL)){e.param=this.parseBindingAtom();var r=e.param.type==="Identifier";this.enterScope(r?GM:0),this.checkLValPattern(e.param,r?XM:ho),this.expect(m.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(m._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};we.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")};we.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(LE),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};we.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};we.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};we.parseLabeledStatement=function(t,e,r,i){for(var n=0,s=this.labels;n<s.length;n+=1){var o=s[n];o.name===e&&this.raise(r.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===m._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var c=this.labels[u];if(c.statementStart===t.start)c.statementStart=this.start,c.kind=a;else break}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),t.label=r,this.finishNode(t,"LabeledStatement")};we.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};we.parseBlock=function(t,e,r){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(m.braceL),t&&this.enterScope(0);this.type!==m.braceR;){var i=this.parseStatement(null);e.body.push(i)}return r&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};we.parseFor=function(t,e){return t.init=e,this.expect(m.semi),t.test=this.type===m.semi?null:this.parseExpression(),this.expect(m.semi),t.update=this.type===m.parenR?null:this.parseExpression(),this.expect(m.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};we.parseForIn=function(t,e){var r=this.type===m._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(m.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")};we.parseVar=function(t,e,r){for(t.declarations=[],t.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(m.eq)?i.init=this.parseMaybeAssign(e):r==="const"&&!(this.type===m._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():i.id.type!=="Identifier"&&!(e&&(this.type===m._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,t.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(m.comma))break}return t};we.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?PE:ho,!1)};var kh=1,AE=2,YM=4;we.parseFunction=function(t,e,r,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===m.star&&e&AE&&this.unexpected(),t.generator=this.eat(m.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&kh&&(t.id=e&YM&&this.type!==m.name?null:this.parseIdent(),t.id&&!(e&AE)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?PE:ho:zM));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(DE(t.async,t.generator)),e&kh||(t.id=this.type===m.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,r,!1,n),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&kh?"FunctionDeclaration":"FunctionExpression")};we.parseFunctionParams=function(t){this.expect(m.parenL),t.params=this.parseBindingList(m.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};we.parseClass=function(t,e){this.next();var r=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),n=this.startNode(),s=!1;for(n.body=[],this.expect(m.braceL);this.type!==m.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(n.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&xie(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};we.parseClassElement=function(t){if(this.eat(m.semi))return null;var e=this.options.ecmaVersion,r=this.startNode(),i="",n=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(m.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===m.star?a=!0:i="static"}if(r.static=a,!i&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===m.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(e>=9||!s)&&this.eat(m.star)&&(n=!0),!i&&!s&&!n){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:i=u)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),e<13||this.type===m.parenL||o!=="method"||n||s){var c=!r.static&&Xy(r,"constructor"),l=c&&t;c&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=c?"constructor":o,this.parseClassMethod(r,n,s,l)}else this.parseClassField(r);return r};we.isClassElementNameStart=function(){return this.type===m.name||this.type===m.privateId||this.type===m.num||this.type===m.string||this.type===m.bracketL||this.type.keyword};we.parseClassElementName=function(t){this.type===m.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};we.parseClassMethod=function(t,e,r,i){var n=t.key;t.kind==="constructor"?(e&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method")):t.static&&Xy(t,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,r,i);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")};we.parseClassField=function(t){if(Xy(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&Xy(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(m.eq)){var e=this.currentThisScope(),r=e.inClassFieldInit;e.inClassFieldInit=!0,t.value=this.parseMaybeAssign(),e.inClassFieldInit=r}else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")};we.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(Fh|CE);this.type!==m.braceR;){var r=this.parseStatement(null);t.body.push(r)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};we.parseClassId=function(t,e){this.type===m.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ho,!1)):(e===!0&&this.unexpected(),t.id=null)};we.parseClassSuper=function(t){t.superClass=this.eat(m._extends)?this.parseExprSubscripts(!1):null};we.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};we.exitClassBody=function(){for(var t=this.privateNameStack.pop(),e=t.declared,r=t.used,i=this.privateNameStack.length,n=i===0?null:this.privateNameStack[i-1],s=0;s<r.length;++s){var o=r[s];Nh(e,o.name)||(n?n.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function xie(t,e){var r=e.key.name,i=t[r],n="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(n=(e.static?"s":"i")+e.kind),i==="iget"&&n==="iset"||i==="iset"&&n==="iget"||i==="sget"&&n==="sset"||i==="sset"&&n==="sget"?(t[r]="true",!1):i?!0:(t[r]=n,!1)}function Xy(t,e){var r=t.computed,i=t.key;return!r&&(i.type==="Identifier"&&i.name===e||i.type==="Literal"&&i.value===e)}we.parseExport=function(t,e){if(this.next(),this.eat(m.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==m.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(m._default)){this.checkExport(e,"default",this.lastTokStart);var r;if(this.type===m._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),t.declaration=this.parseFunction(i,kh|YM,!1,r)}else if(this.type===m._class){var n=this.startNode();t.declaration=this.parseClass(n,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==m.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var s=0,o=t.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local),a.local.type==="Literal"&&this.raise(a.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};we.checkExport=function(t,e,r){t&&(Nh(t,e)&&this.raiseRecoverable(r,"Duplicate export '"+e+"'"),t[e]=!0)};we.checkPatternExport=function(t,e){var r=e.type;if(r==="Identifier")this.checkExport(t,e.name,e.start);else if(r==="ObjectPattern")for(var i=0,n=e.properties;i<n.length;i+=1){var s=n[i];this.checkPatternExport(t,s)}else if(r==="ArrayPattern")for(var o=0,a=e.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(t,u)}else r==="Property"?this.checkPatternExport(t,e.value):r==="AssignmentPattern"?this.checkPatternExport(t,e.left):r==="RestElement"?this.checkPatternExport(t,e.argument):r==="ParenthesizedExpression"&&this.checkPatternExport(t,e.expression)};we.checkVariableExport=function(t,e){if(t)for(var r=0,i=e;r<i.length;r+=1){var n=i[r];this.checkPatternExport(t,n.id)}};we.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};we.parseExportSpecifiers=function(t){var e=[],r=!0;for(this.expect(m.braceL);!this.eat(m.braceR);){if(r)r=!1;else if(this.expect(m.comma),this.afterTrailingComma(m.braceR))break;var i=this.startNode();i.local=this.parseModuleExportName(),i.exported=this.eatContextual("as")?this.parseModuleExportName():i.local,this.checkExport(t,i.exported[i.exported.type==="Identifier"?"name":"value"],i.exported.start),e.push(this.finishNode(i,"ExportSpecifier"))}return e};we.parseImport=function(t){return this.next(),this.type===m.string?(t.specifiers=Cie,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===m.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};we.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===m.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLValSimple(r.local,ho),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(m.comma))return t}if(this.type===m.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,ho),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(m.braceL);!this.eat(m.braceR);){if(e)e=!1;else if(this.expect(m.comma),this.afterTrailingComma(m.braceR))break;var n=this.startNode();n.imported=this.parseModuleExportName(),this.eatContextual("as")?n.local=this.parseIdent():(this.checkUnreserved(n.imported),n.local=n.imported),this.checkLValSimple(n.local,ho),t.push(this.finishNode(n,"ImportSpecifier"))}return t};we.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===m.string){var t=this.parseLiteral(this.value);return _ie.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};we.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};we.isDirectiveCandidate=function(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var Rn=At.prototype;Rn.toAssignable=function(t,e,r){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,r);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return t};Rn.toAssignableList=function(t,e){for(var r=t.length,i=0;i<r;i++){var n=t[i];n&&this.toAssignable(n,e)}if(r){var s=t[r-1];this.options.ecmaVersion===6&&e&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return t};Rn.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};Rn.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==m.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};Rn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case m.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(m.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case m.braceL:return this.parseObj(!0)}return this.parseIdent()};Rn.parseBindingList=function(t,e,r){for(var i=[],n=!0;!this.eat(t);)if(n?n=!1:this.expect(m.comma),e&&this.type===m.comma)i.push(null);else{if(r&&this.afterTrailingComma(t))break;if(this.type===m.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else{var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),i.push(o)}}return i};Rn.parseBindingListItem=function(t){return t};Rn.parseMaybeDefault=function(t,e,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(m.eq))return r;var i=this.startNodeAt(t,e);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};Rn.checkLValSimple=function(t,e,r){e===void 0&&(e=zy);var i=e!==zy;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(i?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(e===ho&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),r&&(Nh(r,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),r[t.name]=!0),e!==JM&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,r);default:this.raise(t.start,(i?"Binding":"Assigning to")+" rvalue")}};Rn.checkLValPattern=function(t,e,r){switch(e===void 0&&(e=zy),t.type){case"ObjectPattern":for(var i=0,n=t.properties;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,e,r)}break;case"ArrayPattern":for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkLValInnerPattern(u,e,r)}break;default:this.checkLValSimple(t,e,r)}};Rn.checkLValInnerPattern=function(t,e,r){switch(e===void 0&&(e=zy),t.type){case"Property":this.checkLValInnerPattern(t.value,e,r);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,r);break;case"RestElement":this.checkLValPattern(t.argument,e,r);break;default:this.checkLValPattern(t,e,r)}};var kn=function(e,r,i,n,s){this.token=e,this.isExpr=!!r,this.preserveSpace=!!i,this.override=n,this.generator=!!s},ct={b_stat:new kn("{",!1),b_expr:new kn("{",!0),b_tmpl:new kn("${",!1),p_stat:new kn("(",!1),p_expr:new kn("(",!0),q_tmpl:new kn("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new kn("function",!1),f_expr:new kn("function",!0),f_expr_gen:new kn("function",!0,!1,null,!0),f_gen:new kn("function",!1,!1,null,!0)},Wl=At.prototype;Wl.initialContext=function(){return[ct.b_stat]};Wl.curContext=function(){return this.context[this.context.length-1]};Wl.braceIsBlock=function(t){var e=this.curContext();return e===ct.f_expr||e===ct.f_stat?!0:t===m.colon&&(e===ct.b_stat||e===ct.b_expr)?!e.isExpr:t===m._return||t===m.name&&this.exprAllowed?hi.test(this.input.slice(this.lastTokEnd,this.start)):t===m._else||t===m.semi||t===m.eof||t===m.parenR||t===m.arrow?!0:t===m.braceL?e===ct.b_stat:t===m._var||t===m._const||t===m.name?!1:!this.exprAllowed};Wl.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};Wl.updateContext=function(t){var e,r=this.type;r.keyword&&t===m.dot?this.exprAllowed=!1:(e=r.updateContext)?e.call(this,t):this.exprAllowed=r.beforeExpr};Wl.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)};m.parenR.updateContext=m.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();t===ct.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr};m.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ct.b_stat:ct.b_expr),this.exprAllowed=!0};m.dollarBraceL.updateContext=function(){this.context.push(ct.b_tmpl),this.exprAllowed=!0};m.parenL.updateContext=function(t){var e=t===m._if||t===m._for||t===m._with||t===m._while;this.context.push(e?ct.p_stat:ct.p_expr),this.exprAllowed=!0};m.incDec.updateContext=function(){};m._function.updateContext=m._class.updateContext=function(t){t.beforeExpr&&t!==m._else&&!(t===m.semi&&this.curContext()!==ct.p_stat)&&!(t===m._return&&hi.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===m.colon||t===m.braceL)&&this.curContext()===ct.b_stat)?this.context.push(ct.f_expr):this.context.push(ct.f_stat),this.exprAllowed=!1};m.backQuote.updateContext=function(){this.curContext()===ct.q_tmpl?this.context.pop():this.context.push(ct.q_tmpl),this.exprAllowed=!1};m.star.updateContext=function(t){if(t===m._function){var e=this.context.length-1;this.context[e]===ct.f_expr?this.context[e]=ct.f_expr_gen:this.context[e]=ct.f_gen}this.exprAllowed=!0};m.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==m.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var Ce=At.prototype;Ce.checkPropClash=function(t,e,r){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var i=t.key,n;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6){n==="__proto__"&&s==="init"&&(e.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),e.proto=!0);return}n="$"+n;var o=e[n];if(o){var a;s==="init"?a=this.strict&&o.init||o.get||o.set:a=o.init||o[s],a&&this.raiseRecoverable(i.start,"Redefinition of property")}else o=e[n]={init:!1,get:!1,set:!1};o[s]=!0}};Ce.parseExpression=function(t,e){var r=this.start,i=this.startLoc,n=this.parseMaybeAssign(t,e);if(this.type===m.comma){var s=this.startNodeAt(r,i);for(s.expressions=[n];this.eat(m.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return n};Ce.parseMaybeAssign=function(t,e,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var i=!1,n=-1,s=-1,o=-1;e?(n=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Zy,i=!0);var a=this.start,u=this.startLoc;(this.type===m.parenL||this.type===m.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var c=this.parseMaybeConditional(t,e);if(r&&(c=r.call(this,c,a,u)),this.type.isAssign){var l=this.startNodeAt(a,u);return l.operator=this.value,this.type===m.eq&&(c=this.toAssignable(c,!1,e)),i||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=c.start&&(e.shorthandAssign=-1),this.type===m.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(l,"AssignmentExpression")}else i&&this.checkExpressionErrors(e,!0);return n>-1&&(e.parenthesizedAssign=n),s>-1&&(e.trailingComma=s),c};Ce.parseMaybeConditional=function(t,e){var r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.eat(m.question)){var s=this.startNodeAt(r,i);return s.test=n,s.consequent=this.parseMaybeAssign(),this.expect(m.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return n};Ce.parseExprOps=function(t,e){var r=this.start,i=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||n.start===r&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,r,i,-1,t)};Ce.parseExprOp=function(t,e,r,i,n){var s=this.type.binop;if(s!=null&&(!n||this.type!==m._in)&&s>i){var o=this.type===m.logicalOR||this.type===m.logicalAND,a=this.type===m.coalesce;a&&(s=m.logicalAND.binop);var u=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),c,l,s,n),f=this.buildBinary(e,r,t,p,u,o||a);return(o&&this.type===m.coalesce||a&&(this.type===m.logicalOR||this.type===m.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,e,r,i,n)}return t};Ce.buildBinary=function(t,e,r,i,n,s){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=r,o.operator=n,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")};Ce.parseMaybeUnary=function(t,e,r,i){var n=this.start,s=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(i),e=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===m.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,i),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(a.argument):this.strict&&a.operator==="delete"&&a.argument.type==="Identifier"?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):a.operator==="delete"&&QM(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===m.privateId)(i||this.privateNameStack.length===0)&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==m._in&&this.unexpected();else{if(o=this.parseExprSubscripts(t,i),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(n,s);c.operator=this.value,c.prefix=!1,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression")}}if(!r&&this.eat(m.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(n,s,o,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return o};function QM(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&QM(t.expression)}Ce.parseExprSubscripts=function(t,e){var r=this.start,i=this.startLoc,n=this.parseExprAtom(t,e);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var s=this.parseSubscripts(n,r,i,!1,e);return t&&s.type==="MemberExpression"&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s};Ce.parseSubscripts=function(t,e,r,i,n){for(var s=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,r,i,s,o,n);if(a.optional&&(o=!0),a===t||a.type==="ArrowFunctionExpression"){if(o){var u=this.startNodeAt(e,r);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}t=a}};Ce.parseSubscript=function(t,e,r,i,n,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(m.questionDot);i&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(m.bracketL);if(c||u&&this.type!==m.parenL&&this.type!==m.backQuote||this.eat(m.dot)){var l=this.startNodeAt(e,r);l.object=t,c?(l.property=this.parseExpression(),this.expect(m.bracketR)):this.type===m.privateId&&t.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,a&&(l.optional=u),t=this.finishNode(l,"MemberExpression")}else if(!i&&this.eat(m.parenL)){var p=new Zy,f=this.yieldPos,h=this.awaitPos,g=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var H=this.parseExprList(m.parenR,this.options.ecmaVersion>=8,!1,p);if(n&&!u&&!this.canInsertSemicolon()&&this.eat(m.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=g,this.parseArrowExpression(this.startNodeAt(e,r),H,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=g||this.awaitIdentPos;var v=this.startNodeAt(e,r);v.callee=t,v.arguments=H,a&&(v.optional=u),t=this.finishNode(v,"CallExpression")}else if(this.type===m.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var w=this.startNodeAt(e,r);w.tag=t,w.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(w,"TaggedTemplateExpression")}return t};Ce.parseExprAtom=function(t,e){this.type===m.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case m._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===m.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==m.dot&&this.type!==m.bracketL&&this.type!==m.parenL&&this.unexpected(),this.finishNode(r,"Super");case m._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case m.name:var n=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&a.name==="async"&&!this.canInsertSemicolon()&&this.eat(m._function))return this.overrideContext(ct.f_expr),this.parseFunction(this.startNodeAt(n,s),0,!1,!0,e);if(i&&!this.canInsertSemicolon()){if(this.eat(m.arrow))return this.parseArrowExpression(this.startNodeAt(n,s),[a],!1,e);if(this.options.ecmaVersion>=8&&a.name==="async"&&this.type===m.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return a=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(m.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,s),[a],!0,e)}return a;case m.regexp:var u=this.value;return r=this.parseLiteral(u.value),r.regex={pattern:u.pattern,flags:u.flags},r;case m.num:case m.string:return this.parseLiteral(this.value);case m._null:case m._true:case m._false:return r=this.startNode(),r.value=this.type===m._null?null:this.type===m._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case m.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(i,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),l;case m.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(m.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case m.braceL:return this.overrideContext(ct.b_expr),this.parseObj(!1,t);case m._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case m._class:return this.parseClass(this.startNode(),!1);case m._new:return this.parseNew();case m.backQuote:return this.parseTemplate();case m._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}};Ce.parseExprImport=function(){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var e=this.parseIdent(!0);switch(this.type){case m.parenL:return this.parseDynamicImport(t);case m.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}};Ce.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(m.parenR)){var e=this.start;this.eat(m.comma)&&this.eat(m.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};Ce.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};Ce.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};Ce.parseParenExpression=function(){this.expect(m.parenL);var t=this.parseExpression();return this.expect(m.parenR),t};Ce.parseParenAndDistinguishExpression=function(t,e){var r=this.start,i=this.startLoc,n,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,u=[],c=!0,l=!1,p=new Zy,f=this.yieldPos,h=this.awaitPos,g;for(this.yieldPos=0,this.awaitPos=0;this.type!==m.parenR;)if(c?c=!1:this.expect(m.comma),s&&this.afterTrailingComma(m.parenR,!0)){l=!0;break}else if(this.type===m.ellipsis){g=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var H=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(m.parenR),t&&!this.canInsertSemicolon()&&this.eat(m.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(r,i,u,e);(!u.length||l)&&this.unexpected(this.lastTokStart),g&&this.unexpected(g),this.checkExpressionErrors(p,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,u.length>1?(n=this.startNodeAt(o,a),n.expressions=u,this.finishNodeAt(n,"SequenceExpression",H,v)):n=u[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(r,i);return w.expression=n,this.finishNode(w,"ParenthesizedExpression")}else return n};Ce.parseParenItem=function(t){return t};Ce.parseParenArrowList=function(t,e,r,i){return this.parseArrowExpression(this.startNodeAt(t,e),r,!1,i)};var Die=[];Ce.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(m.dot)){t.meta=e;var r=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,n=this.startLoc,s=this.type===m._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),i,n,!0,!1),s&&t.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(m.parenL)?t.arguments=this.parseExprList(m.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Die,this.finishNode(t,"NewExpression")};Ce.parseTemplateElement=function(t){var e=t.isTagged,r=this.startNode();return this.type===m.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),r.tail=this.type===m.backQuote,this.finishNode(r,"TemplateElement")};Ce.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(r.quasis=[i];!i.tail;)this.type===m.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(m.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(m.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(r,"TemplateLiteral")};Ce.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===m.name||this.type===m.num||this.type===m.string||this.type===m.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===m.star)&&!hi.test(this.input.slice(this.lastTokEnd,this.start))};Ce.parseObj=function(t,e){var r=this.startNode(),i=!0,n={};for(r.properties=[],this.next();!this.eat(m.braceR);){if(i)i=!1;else if(this.expect(m.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(m.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,n,e),r.properties.push(s)}return this.finishNode(r,t?"ObjectPattern":"ObjectExpression")};Ce.parseProperty=function(t,e){var r=this.startNode(),i,n,s,o;if(this.options.ecmaVersion>=9&&this.eat(m.ellipsis))return t?(r.argument=this.parseIdent(!1),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===m.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,e),this.type===m.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(t||e)&&(s=this.start,o=this.startLoc),t||(i=this.eat(m.star)));var a=this.containsEsc;return this.parsePropertyName(r),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(m.star),this.parsePropertyName(r,e)):n=!1,this.parsePropertyValue(r,t,i,n,s,o,e,a),this.finishNode(r,"Property")};Ce.parsePropertyValue=function(t,e,r,i,n,s,o,a){if((r||i)&&this.type===m.colon&&this.unexpected(),this.eat(m.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===m.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(r,i);else if(!e&&!a&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==m.comma&&this.type!==m.braceR&&this.type!==m.eq){(r||i)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var u=t.kind==="get"?0:1;if(t.value.params.length!==u){var c=t.value.start;t.kind==="get"?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),t.kind="init",e?t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key)):this.type===m.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(n,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected()};Ce.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(m.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(m.bracketR),t.key;t.computed=!1}return t.key=this.type===m.num||this.type===m.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Ce.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};Ce.parseMethod=function(t,e,r){var i=this.startNode(),n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(DE(e,i.generator)|CE|(r?KM:0)),this.expect(m.parenL),i.params=this.parseBindingList(m.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")};Ce.parseArrowExpression=function(t,e,r,i){var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(DE(r,!1)|VM),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")};Ce.parseFunctionBody=function(t,e,r,i){var n=e&&this.type!==m.braceL,s=this.strict,o=!1;if(n)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!s&&!o&&!e&&!r&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,JM),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=u}this.exitScope()};Ce.isSimpleParamList=function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(i.type!=="Identifier")return!1}return!0};Ce.checkParams=function(t,e){for(var r=Object.create(null),i=0,n=t.params;i<n.length;i+=1){var s=n[i];this.checkLValInnerPattern(s,PE,e?null:r)}};Ce.parseExprList=function(t,e,r,i){for(var n=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(m.comma),e&&this.afterTrailingComma(t))break;var o=void 0;r&&this.type===m.comma?o=null:this.type===m.ellipsis?(o=this.parseSpread(i),i&&this.type===m.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),n.push(o)}return n};Ce.checkUnreserved=function(t){var e=t.start,r=t.end,i=t.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(e,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(e,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(e,r).indexOf("\\")!==-1)){var n=this.strict?this.reservedWordsStrict:this.reservedWords;n.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+i+"' is reserved"))}};Ce.parseIdent=function(t,e){var r=this.startNode();return this.type===m.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,(r.name==="class"||r.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(r,"Identifier"),t||(this.checkUnreserved(r),r.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r.start)),r};Ce.parsePrivateIdent=function(){var t=this.startNode();return this.type===m.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t),t};Ce.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===m.semi||this.canInsertSemicolon()||this.type!==m.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(m.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")};Ce.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Jy=At.prototype;Jy.raise=function(t,e){var r=jl(this.input,t);e+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(e);throw i.pos=t,i.loc=r,i.raisedAt=this.pos,i};Jy.raiseRecoverable=Jy.raise;Jy.curPosition=function(){if(this.options.locations)return new Rh(this.curLine,this.pos-this.lineStart)};var Ha=At.prototype,Pie=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Ha.enterScope=function(t){this.scopeStack.push(new Pie(t))};Ha.exitScope=function(){this.scopeStack.pop()};Ha.treatFunctionsAsVarInScope=function(t){return t.flags&ql||!this.inModule&&t.flags&Oh};Ha.declareName=function(t,e,r){var i=!1;if(e===ho){var n=this.currentScope();i=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&n.flags&Oh&&delete this.undefinedExports[t]}else if(e===XM){var s=this.currentScope();s.lexical.push(t)}else if(e===zM){var o=this.currentScope();this.treatFunctionsAsVar?i=o.lexical.indexOf(t)>-1:i=o.lexical.indexOf(t)>-1||o.var.indexOf(t)>-1,o.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var u=this.scopeStack[a];if(u.lexical.indexOf(t)>-1&&!(u.flags&GM&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){i=!0;break}if(u.var.push(t),this.inModule&&u.flags&Oh&&delete this.undefinedExports[t],u.flags&xE)break}i&&this.raiseRecoverable(r,"Identifier '"+t+"' has already been declared")};Ha.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};Ha.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Ha.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&xE)return e}};Ha.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&xE&&!(e.flags&VM))return e}};var ya=function(e,r,i){this.type="",this.start=r,this.end=0,e.options.locations&&(this.loc=new tc(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[r,0])},Bh=At.prototype;Bh.startNode=function(){return new ya(this,this.start,this.startLoc)};Bh.startNodeAt=function(t,e){return new ya(this,t,e)};function ZM(t,e,r,i){return t.type=e,t.end=r,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=r),t}Bh.finishNode=function(t,e){return ZM.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};Bh.finishNodeAt=function(t,e,r,i){return ZM.call(this,t,e,r,i)};Bh.copyNode=function(t){var e=new ya(this,t.start,this.startLoc);for(var r in t)e[r]=t[r];return e};var eO="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",tO=eO+" Extended_Pictographic",rO=tO,iO=rO+" EBase EComp EMod EPres ExtPict",Lie=iO,Tie={9:eO,10:tO,11:rO,12:iO,13:Lie},OM="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",nO="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",sO=nO+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",oO=sO+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",aO=oO+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",$ie=aO+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",kie={9:nO,10:sO,11:oO,12:aO,13:$ie},uO={};function Rie(t){var e=uO[t]={binary:ec(Tie[t]+" "+OM),nonBinary:{General_Category:ec(OM),Script:ec(kie[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(Ky=0,wE=[9,10,11,12,13];Ky<wE.length;Ky+=1)NM=wE[Ky],Rie(NM);var NM,Ky,wE,He=At.prototype,go=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=uO[e.options.ecmaVersion>=13?13:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};go.prototype.reset=function(e,r,i){var n=i.indexOf("u")!==-1;this.start=e|0,this.source=r+"",this.flags=i,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9};go.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};go.prototype.at=function(e,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(e>=n)return-1;var s=i.charCodeAt(e);if(!(r||this.switchU)||s<=55295||s>=57344||e+1>=n)return s;var o=i.charCodeAt(e+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};go.prototype.nextIndex=function(e,r){r===void 0&&(r=!1);var i=this.source,n=i.length;if(e>=n)return n;var s=i.charCodeAt(e),o;return!(r||this.switchU)||s<=55295||s>=57344||e+1>=n||(o=i.charCodeAt(e+1))<56320||o>57343?e+1:e+2};go.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};go.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};go.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};go.prototype.eat=function(e,r){return r===void 0&&(r=!1),this.current(r)===e?(this.advance(r),!0):!1};function Yy(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}He.validateRegExpFlags=function(t){for(var e=t.validFlags,r=t.flags,i=0;i<r.length;i++){var n=r.charAt(i);e.indexOf(n)===-1&&this.raise(t.start,"Invalid regular expression flag"),r.indexOf(n,i+1)>-1&&this.raise(t.start,"Duplicate regular expression flag")}};He.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))};He.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,r=t.backReferenceNames;e<r.length;e+=1){var i=r[e];t.groupNames.indexOf(i)===-1&&t.raise("Invalid named capture referenced")}};He.regexp_disjunction=function(t){for(this.regexp_alternative(t);t.eat(124);)this.regexp_alternative(t);this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};He.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););};He.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))?(this.regexp_eatQuantifier(t),!0):!1};He.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!r,!0}return t.pos=e,!1};He.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};He.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};He.regexp_eatBracedQuantifier=function(t,e){var r=t.pos;if(t.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue),t.eat(125)))return n!==-1&&n<i&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=r}return!1};He.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)};He.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1};He.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)&&t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}t.pos=e}return!1};He.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};He.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};He.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};He.regexp_eatSyntaxCharacter=function(t){var e=t.current();return cO(e)?(t.lastIntValue=e,t.advance(),!0):!1};function cO(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}He.regexp_eatPatternCharacters=function(t){for(var e=t.pos,r=0;(r=t.current())!==-1&&!cO(r);)t.advance();return t.pos!==e};He.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};He.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t)){t.groupNames.indexOf(t.lastStringValue)!==-1&&t.raise("Duplicate capture group name"),t.groupNames.push(t.lastStringValue);return}t.raise("Invalid group")}};He.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1};He.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=Yy(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=Yy(t.lastIntValue);return!0}return!1};He.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,i=t.current(r);return t.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(i=t.lastIntValue),Mie(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function Mie(t){return mo(t,!0)||t===36||t===95}He.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,i=t.current(r);return t.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(i=t.lastIntValue),Oie(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function Oie(t){return Ul(t,!0)||t===36||t===95||t===8204||t===8205}He.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};He.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var r=t.lastIntValue;if(t.switchU)return r>t.maxBackReference&&(t.maxBackReference=r),!0;if(r<=t.numCapturingParens)return!0;t.pos=e}return!1};He.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};He.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};He.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};He.regexp_eatZero=function(t){return t.current()===48&&!ev(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};He.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};He.regexp_eatControlLetter=function(t){var e=t.current();return lO(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function lO(t){return t>=65&&t<=90||t>=97&&t<=122}He.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var r=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(i&&n>=55296&&n<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=(n-55296)*1024+(o-56320)+65536,!0}t.pos=s,t.lastIntValue=n}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&Nie(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=r}return!1};function Nie(t){return t>=0&&t<=1114111}He.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};He.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};He.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(Fie(e))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(e===80||e===112)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1};function Fie(t){return t===100||t===68||t===115||t===83||t===119||t===87}He.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var r=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,r,i),!0}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,n),!0}return!1};He.regexp_validateUnicodePropertyNameAndValue=function(t,e,r){Nh(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(r)||t.raise("Invalid property value")};He.regexp_validateUnicodePropertyNameOrValue=function(t,e){t.unicodeProperties.binary.test(e)||t.raise("Invalid property name")};He.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";pO(e=t.current());)t.lastStringValue+=Yy(e),t.advance();return t.lastStringValue!==""};function pO(t){return lO(t)||t===95}He.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Bie(e=t.current());)t.lastStringValue+=Yy(e),t.advance();return t.lastStringValue!==""};function Bie(t){return pO(t)||ev(t)}He.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};He.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1};He.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var r=t.lastIntValue;t.switchU&&(e===-1||r===-1)&&t.raise("Invalid character class"),e!==-1&&r!==-1&&e>r&&t.raise("Range out of order in character class")}}};He.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var r=t.current();(r===99||hO(r))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return i!==93?(t.lastIntValue=i,t.advance(),!0):!1};He.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};He.regexp_eatClassControlLetter=function(t){var e=t.current();return ev(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};He.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};He.regexp_eatDecimalDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;ev(r=t.current());)t.lastIntValue=10*t.lastIntValue+(r-48),t.advance();return t.pos!==e};function ev(t){return t>=48&&t<=57}He.regexp_eatHexDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;fO(r=t.current());)t.lastIntValue=16*t.lastIntValue+dO(r),t.advance();return t.pos!==e};function fO(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function dO(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}He.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var r=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+r*8+t.lastIntValue:t.lastIntValue=e*8+r}else t.lastIntValue=e;return!0}return!1};He.regexp_eatOctalDigit=function(t){var e=t.current();return hO(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function hO(t){return t>=48&&t<=55}He.regexp_eatFixedHexDigits=function(t,e){var r=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var n=t.current();if(!fO(n))return t.pos=r,!1;t.lastIntValue=16*t.lastIntValue+dO(n),t.advance()}return!0};var Uh=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new tc(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ke=At.prototype;ke.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Uh(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};ke.getToken=function(){return this.next(),new Uh(this)};typeof Symbol<"u"&&(ke[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===m.eof,value:e}}}});ke.nextToken=function(){var t=this.curContext();if((!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(m.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};ke.readToken=function(t){return mo(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};ke.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888};ke.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,n=e;(i=UM(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,r),e,this.pos,t,this.curPosition())};ke.skipLineComment=function(t){for(var e=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!Ss(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,r,this.curPosition())};ke.skipSpace=function(){e:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(t>8&&t<14||t>=5760&&jM.test(String.fromCharCode(t)))++this.pos;else break e}}};ke.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=t,this.value=e,this.updateContext(r)};ke.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(m.ellipsis)):(++this.pos,this.finishToken(m.dot))};ke.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(m.assign,2):this.finishOp(m.slash,1)};ke.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),r=1,i=t===42?m.star:m.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++r,i=m.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(m.assign,r+1):this.finishOp(i,r)};ke.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(m.assign,3)}return this.finishOp(t===124?m.logicalOR:m.logicalAND,2)}return e===61?this.finishOp(m.assign,2):this.finishOp(t===124?m.bitwiseOR:m.bitwiseAND,1)};ke.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(m.assign,2):this.finishOp(m.bitwiseXOR,1)};ke.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||hi.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(m.incDec,2):e===61?this.finishOp(m.assign,2):this.finishOp(m.plusMin,1)};ke.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),r=1;return e===t?(r=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(m.assign,r+1):this.finishOp(m.bitShift,r)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(r=2),this.finishOp(m.relational,r))};ke.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(m.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(m.arrow)):this.finishOp(t===61?m.eq:m.prefix,1)};ke.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(m.questionDot,2)}if(e===63){if(t>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(m.assign,3)}return this.finishOp(m.coalesce,2)}}return this.finishOp(m.question,1)};ke.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),mo(e,!0)||e===92))return this.finishToken(m.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+tv(e)+"'")};ke.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(m.parenL);case 41:return++this.pos,this.finishToken(m.parenR);case 59:return++this.pos,this.finishToken(m.semi);case 44:return++this.pos,this.finishToken(m.comma);case 91:return++this.pos,this.finishToken(m.bracketL);case 93:return++this.pos,this.finishToken(m.bracketR);case 123:return++this.pos,this.finishToken(m.braceL);case 125:return++this.pos,this.finishToken(m.braceR);case 58:return++this.pos,this.finishToken(m.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(m.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(m.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+tv(t)+"'")};ke.finishOp=function(t,e){var r=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,r)};ke.readRegexp=function(){for(var t,e,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(hi.test(i)&&this.raise(r,"Unterminated regular expression"),t)t=!1;else{if(i==="[")e=!0;else if(i==="]"&&e)e=!1;else if(i==="/"&&!e)break;t=i==="\\"}++this.pos}var n=this.input.slice(r,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new go(this));a.reset(r,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(n,o)}catch{}return this.finishToken(m.regexp,{pattern:n,flags:o,value:u})};ke.readInt=function(t,e,r){for(var i=this.options.ecmaVersion>=12&&e===void 0,n=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,u=0,c=e??1/0;u<c;++u,++this.pos){var l=this.input.charCodeAt(this.pos),p=void 0;if(i&&l===95){n&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),a===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=l;continue}if(l>=97?p=l-97+10:l>=65?p=l-65+10:l>=48&&l<=57?p=l-48:p=1/0,p>=t)break;a=l,o=o*t+p}return i&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||e!=null&&this.pos-s!==e?null:o};function Uie(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function mO(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}ke.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var r=this.readInt(t);return r==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=mO(this.input.slice(e,this.pos)),++this.pos):mo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(m.num,r)};ke.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var r=this.pos-e>=2&&this.input.charCodeAt(e)===48;r&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!t&&this.options.ecmaVersion>=11&&i===110){var n=mO(this.input.slice(e,this.pos));return++this.pos,mo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(m.num,n)}r&&/[89]/.test(this.input.slice(e,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),mo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Uie(this.input.slice(e,this.pos),r);return this.finishToken(m.num,s)};ke.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else e=this.readHexChar(4);return e};function tv(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}ke.readString=function(t){for(var e="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;i===92?(e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ss(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(r,this.pos++),this.finishToken(m.string,e)};var gO={};ke.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===gO)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};ke.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gO;this.raise(t,e)};ke.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===m.template||this.type===m.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(m.dollarBraceL)):(++this.pos,this.finishToken(m.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(m.template,t));if(r===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(Ss(r)){switch(t+=this.input.slice(e,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
`;break;default:t+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}};ke.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(m.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};ke.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return tv(this.readCodePoint());case 116:return"	";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),(i!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return Ss(e)?"":String.fromCharCode(e)}};ke.readHexChar=function(t){var e=this.pos,r=this.readInt(16,t);return r===null&&this.invalidStringToken(e,"Bad character escape sequence"),r};ke.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(Ul(n,i))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,t+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?mo:Ul)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=tv(o),r=this.pos}else break;e=!1}return t+this.input.slice(r,this.pos)};ke.readWord=function(){var t=this.readWord1(),e=m.name;return this.keywords.test(t)&&(e=EE[t]),this.finishToken(e,t)};var jie="8.7.0";At.acorn={Parser:At,version:jie,defaultOptions:Mh,Position:Rh,SourceLocation:tc,getLineInfo:jl,Node:ya,TokenType:Be,tokTypes:m,keywordTypes:EE,TokContext:kn,tokContexts:ct,isIdentifierChar:Ul,isIdentifierStart:mo,Token:Uh,isNewLine:Ss,lineBreak:hi,lineBreakG:Qy,nonASCIIwhitespace:jM};function HO(t,e){return At.parse(t,e)}function rv(t,e,r){return At.parseExpressionAt(t,e,r)}var eN=require("crypto");var{stringify:qie}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");var iv={"||":3,"&&":4,"|":5,"??":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Mn=17,Wie={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Mn,ClassExpression:Mn,FunctionExpression:Mn,ObjectExpression:Mn,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Vl(t,e){let{generator:r}=t;if(t.write("("),e!=null&&e.length>0){r[e[0].type](e[0],t);let{length:i}=e;for(let n=1;n<i;n++){let s=e[n];t.write(", "),r[s.type](s,t)}}t.write(")")}function IO(t,e,r,i){let n=t.expressionsPrecedence[e.type];if(n===Mn)return!0;let s=t.expressionsPrecedence[r.type];return n!==s?!i&&n===15&&s===14&&r.operator==="**"||n<s:n!==13&&n!==14?!1:e.operator==="**"&&r.operator==="**"?!i:i?iv[e.operator]<=iv[r.operator]:iv[e.operator]<iv[r.operator]}function nv(t,e,r,i){let{generator:n}=t;IO(t,e,r,i)?(t.write("("),n[e.type](e,t),t.write(")")):n[e.type](e,t)}function Vie(t,e,r,i){let n=e.split(`
`),s=n.length-1;if(t.write(n[0].trim()),s>0){t.write(i);for(let o=1;o<s;o++)t.write(r+n[o].trim()+i);t.write(r+n[s].trim())}}function Qr(t,e,r,i){let{length:n}=e;for(let s=0;s<n;s++){let o=e[s];t.write(r),o.type[0]==="L"?t.write("// "+o.value.trim()+`
`,o):(t.write("/*"),Vie(t,o.value,r,i),t.write("*/"+i))}}function Gie(t){let e=t;for(;e!=null;){let{type:r}=e;if(r[0]==="C"&&r[1]==="a")return!0;if(r[0]==="M"&&r[1]==="e"&&r[2]==="m")e=e.object;else return!1}}function TE(t,e){let{generator:r}=t,{declarations:i}=e;t.write(e.kind+" ");let{length:n}=i;if(n>0){r.VariableDeclarator(i[0],t);for(let s=1;s<n;s++)t.write(", "),r.VariableDeclarator(i[s],t)}}var yO,vO,bO,wO,_O,AO,Kie={Program(t,e){let r=e.indent.repeat(e.indentLevel),{lineEnd:i,writeComments:n}=e;n&&t.comments!=null&&Qr(e,t.comments,r,i);let s=t.body,{length:o}=s;for(let a=0;a<o;a++){let u=s[a];n&&u.comments!=null&&Qr(e,u.comments,r,i),e.write(r),this[u.type](u,e),e.write(i)}n&&t.trailingComments!=null&&Qr(e,t.trailingComments,r,i)},BlockStatement:AO=function(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e,s=r+e.indent;e.write("{");let o=t.body;if(o!=null&&o.length>0){e.write(i),n&&t.comments!=null&&Qr(e,t.comments,s,i);let{length:a}=o;for(let u=0;u<a;u++){let c=o[u];n&&c.comments!=null&&Qr(e,c.comments,s,i),e.write(s),this[c.type](c,e),e.write(i)}e.write(r)}else n&&t.comments!=null&&(e.write(i),Qr(e,t.comments,s,i),e.write(r));n&&t.trailingComments!=null&&Qr(e,t.trailingComments,s,i),e.write("}"),e.indentLevel--},ClassBody:AO,StaticBlock(t,e){e.write("static "),this.BlockStatement(t,e)},EmptyStatement(t,e){e.write(";")},ExpressionStatement(t,e){let r=e.expressionsPrecedence[t.expression.type];r===Mn||r===3&&t.expression.left.type[0]==="O"?(e.write("("),this[t.expression.type](t.expression,e),e.write(")")):this[t.expression.type](t.expression,e),e.write(";")},IfStatement(t,e){e.write("if ("),this[t.test.type](t.test,e),e.write(") "),this[t.consequent.type](t.consequent,e),t.alternate!=null&&(e.write(" else "),this[t.alternate.type](t.alternate,e))},LabeledStatement(t,e){this[t.label.type](t.label,e),e.write(": "),this[t.body.type](t.body,e)},BreakStatement(t,e){e.write("break"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},ContinueStatement(t,e){e.write("continue"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},WithStatement(t,e){e.write("with ("),this[t.object.type](t.object,e),e.write(") "),this[t.body.type](t.body,e)},SwitchStatement(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e;e.indentLevel++;let s=r+e.indent,o=s+e.indent;e.write("switch ("),this[t.discriminant.type](t.discriminant,e),e.write(") {"+i);let{cases:a}=t,{length:u}=a;for(let c=0;c<u;c++){let l=a[c];n&&l.comments!=null&&Qr(e,l.comments,s,i),l.test?(e.write(s+"case "),this[l.test.type](l.test,e),e.write(":"+i)):e.write(s+"default:"+i);let{consequent:p}=l,{length:f}=p;for(let h=0;h<f;h++){let g=p[h];n&&g.comments!=null&&Qr(e,g.comments,o,i),e.write(o),this[g.type](g,e),e.write(i)}}e.indentLevel-=2,e.write(r+"}")},ReturnStatement(t,e){e.write("return"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e)),e.write(";")},ThrowStatement(t,e){e.write("throw "),this[t.argument.type](t.argument,e),e.write(";")},TryStatement(t,e){if(e.write("try "),this[t.block.type](t.block,e),t.handler){let{handler:r}=t;r.param==null?e.write(" catch "):(e.write(" catch ("),this[r.param.type](r.param,e),e.write(") ")),this[r.body.type](r.body,e)}t.finalizer&&(e.write(" finally "),this[t.finalizer.type](t.finalizer,e))},WhileStatement(t,e){e.write("while ("),this[t.test.type](t.test,e),e.write(") "),this[t.body.type](t.body,e)},DoWhileStatement(t,e){e.write("do "),this[t.body.type](t.body,e),e.write(" while ("),this[t.test.type](t.test,e),e.write(");")},ForStatement(t,e){if(e.write("for ("),t.init!=null){let{init:r}=t;r.type[0]==="V"?TE(e,r):this[r.type](r,e)}e.write("; "),t.test&&this[t.test.type](t.test,e),e.write("; "),t.update&&this[t.update.type](t.update,e),e.write(") "),this[t.body.type](t.body,e)},ForInStatement:yO=function(t,e){e.write(`for ${t.await?"await ":""}(`);let{left:r}=t;r.type[0]==="V"?TE(e,r):this[r.type](r,e),e.write(t.type[3]==="I"?" in ":" of "),this[t.right.type](t.right,e),e.write(") "),this[t.body.type](t.body,e)},ForOfStatement:yO,DebuggerStatement(t,e){e.write("debugger;",t)},FunctionDeclaration:vO=function(t,e){e.write((t.async?"async ":"")+(t.generator?"function* ":"function ")+(t.id?t.id.name:""),t),Vl(e,t.params),e.write(" "),this[t.body.type](t.body,e)},FunctionExpression:vO,VariableDeclaration(t,e){TE(e,t),e.write(";")},VariableDeclarator(t,e){this[t.id.type](t.id,e),t.init!=null&&(e.write(" = "),this[t.init.type](t.init,e))},ClassDeclaration(t,e){if(e.write("class "+(t.id?`${t.id.name} `:""),t),t.superClass){e.write("extends ");let{superClass:r}=t,{type:i}=r,n=e.expressionsPrecedence[i];(i[0]!=="C"||i[1]!=="l"||i[5]!=="E")&&(n===Mn||n<e.expressionsPrecedence.ClassExpression)?(e.write("("),this[t.superClass.type](r,e),e.write(")")):this[r.type](r,e),e.write(" ")}this.ClassBody(t.body,e)},ImportDeclaration(t,e){e.write("import ");let{specifiers:r}=t,{length:i}=r,n=0;if(i>0){for(;n<i;){n>0&&e.write(", ");let s=r[n],o=s.type[6];if(o==="D")e.write(s.local.name,s),n++;else if(o==="N")e.write("* as "+s.local.name,s),n++;else break}if(n<i){for(e.write("{");;){let s=r[n],{name:o}=s.imported;if(e.write(o,s),o!==s.local.name&&e.write(" as "+s.local.name),++n<i)e.write(", ");else break}e.write("}")}e.write(" from ")}this.Literal(t.source,e),e.write(";")},ImportExpression(t,e){e.write("import("),this[t.source.type](t.source,e),e.write(")")},ExportDefaultDeclaration(t,e){e.write("export default "),this[t.declaration.type](t.declaration,e),e.expressionsPrecedence[t.declaration.type]!=null&&t.declaration.type[0]!=="F"&&e.write(";")},ExportNamedDeclaration(t,e){if(e.write("export "),t.declaration)this[t.declaration.type](t.declaration,e);else{e.write("{");let{specifiers:r}=t,{length:i}=r;if(i>0)for(let n=0;;){let s=r[n],{name:o}=s.local;if(e.write(o,s),o!==s.exported.name&&e.write(" as "+s.exported.name),++n<i)e.write(", ");else break}e.write("}"),t.source&&(e.write(" from "),this.Literal(t.source,e)),e.write(";")}},ExportAllDeclaration(t,e){t.exported!=null?e.write("export * as "+t.exported.name+" from "):e.write("export * from "),this.Literal(t.source,e),e.write(";")},MethodDefinition(t,e){t.static&&e.write("static ");let r=t.kind[0];(r==="g"||r==="s")&&e.write(t.kind+" "),t.value.async&&e.write("async "),t.value.generator&&e.write("*"),t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),Vl(e,t.value.params),e.write(" "),this[t.value.body.type](t.value.body,e)},ClassExpression(t,e){this.ClassDeclaration(t,e)},ArrowFunctionExpression(t,e){e.write(t.async?"async ":"",t);let{params:r}=t;r!=null&&(r.length===1&&r[0].type[0]==="I"?e.write(r[0].name,r[0]):Vl(e,t.params)),e.write(" => "),t.body.type[0]==="O"?(e.write("("),this.ObjectExpression(t.body,e),e.write(")")):this[t.body.type](t.body,e)},ThisExpression(t,e){e.write("this",t)},Super(t,e){e.write("super",t)},RestElement:bO=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:bO,YieldExpression(t,e){e.write(t.delegate?"yield*":"yield"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e))},AwaitExpression(t,e){e.write("await ",t),nv(e,t.argument,t)},TemplateLiteral(t,e){let{quasis:r,expressions:i}=t;e.write("`");let{length:n}=i;for(let o=0;o<n;o++){let a=i[o],u=r[o];e.write(u.value.raw,u),e.write("${"),this[a.type](a,e),e.write("}")}let s=r[r.length-1];e.write(s.value.raw,s),e.write("`")},TemplateElement(t,e){e.write(t.value.raw,t)},TaggedTemplateExpression(t,e){nv(e,t.tag,t),this[t.quasi.type](t.quasi,e)},ArrayExpression:_O=function(t,e){if(e.write("["),t.elements.length>0){let{elements:r}=t,{length:i}=r;for(let n=0;;){let s=r[n];if(s!=null&&this[s.type](s,e),++n<i)e.write(", ");else{s==null&&e.write(", ");break}}}e.write("]")},ArrayPattern:_O,ObjectExpression(t,e){let r=e.indent.repeat(e.indentLevel++),{lineEnd:i,writeComments:n}=e,s=r+e.indent;if(e.write("{"),t.properties.length>0){e.write(i),n&&t.comments!=null&&Qr(e,t.comments,s,i);let o=","+i,{properties:a}=t,{length:u}=a;for(let c=0;;){let l=a[c];if(n&&l.comments!=null&&Qr(e,l.comments,s,i),e.write(s),this[l.type](l,e),++c<u)e.write(o);else break}e.write(i),n&&t.trailingComments!=null&&Qr(e,t.trailingComments,s,i),e.write(r+"}")}else n?t.comments!=null?(e.write(i),Qr(e,t.comments,s,i),t.trailingComments!=null&&Qr(e,t.trailingComments,s,i),e.write(r+"}")):t.trailingComments!=null?(e.write(i),Qr(e,t.trailingComments,s,i),e.write(r+"}")):e.write("}"):e.write("}");e.indentLevel--},Property(t,e){t.method||t.kind[0]!=="i"?this.MethodDefinition(t,e):(t.shorthand||(t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),e.write(": ")),this[t.value.type](t.value,e))},PropertyDefinition(t,e){t.static&&e.write("static "),this[t.key.type](t.key,e),e.write(" = "),this[t.value.type](t.value,e)},ObjectPattern(t,e){if(e.write("{"),t.properties.length>0){let{properties:r}=t,{length:i}=r;for(let n=0;this[r[n].type](r[n],e),++n<i;)e.write(", ")}e.write("}")},SequenceExpression(t,e){Vl(e,t.expressions)},UnaryExpression(t,e){if(t.prefix){let{operator:r,argument:i,argument:{type:n}}=t;e.write(r);let s=IO(e,i,t);!s&&(r.length>1||n[0]==="U"&&(n[1]==="n"||n[1]==="p")&&i.prefix&&i.operator[0]===r&&(r==="+"||r==="-"))&&e.write(" "),s?(e.write(r.length>1?" (":"("),this[n](i,e),e.write(")")):this[n](i,e)}else this[t.argument.type](t.argument,e),e.write(t.operator)},UpdateExpression(t,e){t.prefix?(e.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.write(t.operator))},AssignmentExpression(t,e){this[t.left.type](t.left,e),e.write(" "+t.operator+" "),this[t.right.type](t.right,e)},AssignmentPattern(t,e){this[t.left.type](t.left,e),e.write(" = "),this[t.right.type](t.right,e)},BinaryExpression:wO=function(t,e){let r=t.operator==="in";r&&e.write("("),nv(e,t.left,t,!1),e.write(" "+t.operator+" "),nv(e,t.right,t,!0),r&&e.write(")")},LogicalExpression:wO,ConditionalExpression(t,e){let{test:r}=t,i=e.expressionsPrecedence[r.type];i===Mn||i<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[r.type](r,e),e.write(")")):this[r.type](r,e),e.write(" ? "),this[t.consequent.type](t.consequent,e),e.write(" : "),this[t.alternate.type](t.alternate,e)},NewExpression(t,e){e.write("new ");let r=e.expressionsPrecedence[t.callee.type];r===Mn||r<e.expressionsPrecedence.CallExpression||Gie(t.callee)?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),Vl(e,t.arguments)},CallExpression(t,e){let r=e.expressionsPrecedence[t.callee.type];r===Mn||r<e.expressionsPrecedence.CallExpression?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),t.optional&&e.write("?."),Vl(e,t.arguments)},ChainExpression(t,e){this[t.expression.type](t.expression,e)},MemberExpression(t,e){let r=e.expressionsPrecedence[t.object.type];r===Mn||r<e.expressionsPrecedence.MemberExpression?(e.write("("),this[t.object.type](t.object,e),e.write(")")):this[t.object.type](t.object,e),t.computed?(t.optional&&e.write("?."),e.write("["),this[t.property.type](t.property,e),e.write("]")):(t.optional?e.write("?."):e.write("."),this[t.property.type](t.property,e))},MetaProperty(t,e){e.write(t.meta.name+"."+t.property.name,t)},Identifier(t,e){e.write(t.name,t)},PrivateIdentifier(t,e){e.write(`#${t.name}`,t)},Literal(t,e){t.raw!=null?e.write(t.raw,t):t.regex!=null?this.RegExpLiteral(t,e):t.bigint!=null?e.write(t.bigint+"n",t):e.write(qie(t.value),t)},RegExpLiteral(t,e){let{regex:r}=t;e.write(`/${r.pattern}/${r.flags}`,t)}},zie={};var $E=class{constructor(e){let r=e??zie;this.output="",r.output!=null?(this.output=r.output,this.write=this.writeToStream):this.output="",this.generator=r.generator!=null?r.generator:Kie,this.expressionsPrecedence=r.expressionsPrecedence!=null?r.expressionsPrecedence:Wie,this.indent=r.indent!=null?r.indent:"  ",this.lineEnd=r.lineEnd!=null?r.lineEnd:`
`,this.indentLevel=r.startingIndentLevel!=null?r.startingIndentLevel:0,this.writeComments=r.comments?r.comments:!1,r.sourceMap!=null&&(this.write=r.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=r.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
`).length-1,this.mapping={original:null,generated:this,name:void 0,source:r.sourceMap.file||r.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,r){this.output+=e,this.map(e,r)}writeToStreamAndMap(e,r){this.output.write(e),this.map(e,r)}map(e,r){if(r!=null){let{type:s}=r;if(s[0]==="L"&&s[2]==="n"){this.column=0,this.line++;return}if(r.loc!=null){let{mapping:o}=this;o.original=r.loc.start,o.name=r.name,this.sourceMap.addMapping(o)}if(s[0]==="T"&&s[8]==="E"||s[0]==="L"&&s[1]==="i"&&typeof r.value=="string"){let{length:o}=e,{column:a,line:u}=this;for(let c=0;c<o;c++)e[c]===`
`?(a=0,u++):a++;this.column=a,this.line=u;return}}let{length:i}=e,{lineEnd:n}=this;i>0&&(this.lineEndSize>0&&(n.length===1?e[i-1]===n:e.endsWith(n))?(this.line+=this.lineEndSize,this.column=0):this.column+=i)}toString(){return this.output}};function Ho(t,e){let r=new $E(e);return r.generator[t.type](t,r),r.output}var Kl=S(sv()),XO=require("fs"),qh=S(Uy());var NO=require("path"),FO=require("worker_threads");var rc=S(RO()),ME=require("fs"),OE=require("worker_threads");var ane=Buffer.from("(function (exports, require, module, __filename, __dirname) { "),une=Buffer.from(`
});`),cne=Buffer.from("(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { "),lne=Buffer.from(`
}.call(this, exports, require, module, __filename, __dirname); });`),pne=Buffer.from("#!"),fne=Buffer.from("\r")[0],dne=Buffer.from(`
`)[0],hne=(t,e)=>t.slice(0,e.length).equals(e),MO=(t,e,r)=>{let i=e.length===64?rc.shaHash:rc.hash;if(i(t)===e)return!0;if(r){if(hne(t,pne)){let n=t.indexOf(dne);return t[n-1]===fne&&n--,i(t.slice(n))===e}if(i(Buffer.concat([ane,t,une]))===e)return!0}return i(Buffer.concat([cne,t,lne]))===e},OO=t=>t instanceof Buffer?t:Buffer.from(t,"utf-8");async function mne(t){switch(t.type){case 0:try{let e=await ME.promises.readFile(t.file);return{id:t.id,hash:t.mode===0?(0,rc.hash)(e):(0,rc.shaHash)(e)}}catch(e){return{id:t.id}}case 1:try{return{id:t.id,hash:(0,rc.hash)(OO(t.data))}}catch(e){return{id:t.id}}case 2:try{let e=await ME.promises.readFile(t.file);return{id:t.id,matches:MO(e,t.expected,t.checkNode)}}catch(e){return{id:t.id,matches:!1}}case 3:try{return{id:t.id,matches:MO(OO(t.data),t.expected,t.checkNode)}}catch(e){return{id:t.id,matches:!1}}}}function gne(t){t.on("message",e=>{mne(e).then(r=>t.postMessage(r))})}OE.parentPort&&gne(OE.parentPort);var fv=class{constructor(e=3,r=(0,NO.join)(__dirname,"hash.js")){this.maxFailures=e;this.hasherScriptPath=r;this.idCounter=0;this.failureCount=0;this.deferredMap=new Map;this.deferCleanup=f$(3e4,()=>this.cleanup())}async hashBytes(e,r){return(await this.send({type:1,data:r,mode:e,id:this.idCounter++})).hash}async hashFile(e,r){return(await this.send({type:0,file:r,mode:e,id:this.idCounter++})).hash}async verifyBytes(e,r,i){return(await this.send({type:3,data:e,id:this.idCounter++,expected:r,checkNode:i})).matches}async verifyFile(e,r,i){return(await this.send({type:2,file:e,id:this.idCounter++,expected:r,checkNode:i})).matches}dispose(){this.cleanup(),this.deferCleanup.clear()}send(e){let r=this.getProcess();if(!r)throw new Error("hash.js process unexpectedly exited");this.deferCleanup();let i=Je();return this.deferredMap.set(e.id,{deferred:i,request:e}),r.postMessage(e),i.promise}cleanup(){this.instance&&(this.instance.removeAllListeners("exit"),this.instance.terminate(),this.instance=void 0,this.failureCount=0)}getProcess(){if(this.instance)return this.instance;if(this.failureCount>this.maxFailures)return;let e=this.instance=new FO.Worker(this.hasherScriptPath);return e.setMaxListeners(1/0),e.on("message",r=>{let i=r,n=this.deferredMap.get(i.id);n&&(n.deferred.resolve(i),this.deferredMap.delete(i.id))}),e.on("exit",()=>{this.instance=void 0,this.failureCount++;let r=this.getProcess();if(r){this.deferCleanup();for(let{request:i}of this.deferredMap.values())r.postMessage(i)}else{for(let{deferred:i}of this.deferredMap.values())i.reject(new Error("hash.js process unexpectedly exited"));this.deferredMap.clear(),this.deferCleanup.clear()}}),e}};var dv="\u2716";function Li(t){return t.name===dv}function BO(){}var nt=function(e,r){if(r===void 0&&(r={}),this.toks=this.constructor.BaseParser.tokenizer(e,r),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:m.eof,start:0,end:0},this.tok.validateRegExpFlags=BO,this.tok.validateRegExpPattern=BO,this.options.locations){var i=this.toks.curPosition();this.tok.loc=new tc(this.toks,i,i)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};nt.prototype.startNode=function(){return new ya(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)};nt.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start};nt.prototype.startNodeAt=function(e){return this.options.locations?new ya(this.toks,e[0],e[1]):new ya(this.toks,e)};nt.prototype.finishNode=function(e,r){return e.type=r,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e};nt.prototype.dummyNode=function(e){var r=this.startNode();return r.type=e,r.end=r.start,this.options.locations&&(r.loc.end=r.loc.start),this.options.ranges&&(r.range[1]=r.start),this.last={type:m.name,start:r.start,end:r.start,loc:r.loc},r};nt.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=dv,e};nt.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=dv,e};nt.prototype.eat=function(e){return this.tok.type===e?(this.next(),!0):!1};nt.prototype.isContextual=function(e){return this.tok.type===m.name&&this.tok.value===e};nt.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(m.name)};nt.prototype.canInsertSemicolon=function(){return this.tok.type===m.eof||this.tok.type===m.braceR||hi.test(this.input.slice(this.last.end,this.tok.start))};nt.prototype.semicolon=function(){return this.eat(m.semi)};nt.prototype.expect=function(e){if(this.eat(e))return!0;for(var r=1;r<=2;r++)if(this.lookAhead(r).type===e){for(var i=0;i<r;i++)this.next();return!0}};nt.prototype.pushCx=function(){this.context.push(this.curIndent)};nt.prototype.popCx=function(){this.curIndent=this.context.pop()};nt.prototype.lineEnd=function(e){for(;e<this.input.length&&!Ss(this.input.charCodeAt(e));)++e;return e};nt.prototype.indentationAfter=function(e){for(var r=0;;++e){var i=this.input.charCodeAt(e);if(i===32)++r;else if(i===9)r+=this.options.tabSize;else return r}};nt.prototype.closes=function(e,r,i,n){return this.tok.type===e||this.tok.type===m.eof?!0:i!==this.curLineStart&&this.curIndent<r&&this.tokenStartsLine()&&(!n||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<r)};nt.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var r=this.input.charCodeAt(e);if(r!==9&&r!==32)return!1}return!0};nt.prototype.extend=function(e,r){this[e]=r(this[e])};nt.prototype.parse=function(){return this.next(),this.parseTopLevel()};nt.extend=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];for(var i=this,n=0;n<e.length;n++)i=e[n](i);return i};nt.parse=function(e,r){return new this(e,r).parse()};nt.BaseParser=At;var hv=nt.prototype;function Hne(t){return t<14&&t>8||t===32||t===160||Ss(t)}hv.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}};hv.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===m.dot&&this.input.substr(this.toks.end,1)==="."&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=m.ellipsis),new Uh(this.toks)}catch(s){if(!(s instanceof SyntaxError))throw s;var t=s.message,e=s.raisedAt,r=!0;if(/unterminated/i.test(t))if(e=this.lineEnd(s.pos+1),/string/.test(t))r={start:s.pos,end:e,type:m.string,value:this.input.slice(s.pos+1,e)};else if(/regular expr/i.test(t)){var i=this.input.slice(s.pos,e);try{i=new RegExp(i)}catch{}r={start:s.pos,end:e,type:m.regexp,value:i}}else/template/.test(t)?r={start:s.pos,end:e,type:m.template,value:this.input.slice(s.pos,e)}:r=!1;else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(t))for(;e<this.input.length&&!Hne(this.input.charCodeAt(e));)++e;else if(/character escape|expected hexadecimal/i.test(t))for(;e<this.input.length;){var n=this.input.charCodeAt(e++);if(n===34||n===39||Ss(n))break}else if(/unexpected character/i.test(t))e++,r=!1;else if(/regular expression/i.test(t))r=!0;else throw s;if(this.resetTo(e),r===!0&&(r={start:e,end:e,type:m.name,value:dv}),r)return this.options.locations&&(r.loc=new tc(this.toks,jl(this.input,r.start),jl(this.input,r.end))),r}};hv.resetTo=function(t){this.toks.pos=t;var e=this.input.charAt(t-1);if(this.toks.exprAllowed=!e||/[[{(,;:?/*=+\-~!|&%^<>]/.test(e)||/[enwfd]/.test(e)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(t-10,t)),this.options.locations){this.toks.curLine=1,this.toks.lineStart=Qy.lastIndex=0;for(var r;(r=Qy.exec(this.input))&&r.index<t;)++this.toks.curLine,this.toks.lineStart=r.index+r[0].length}};hv.lookAhead=function(t){for(;t>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[t-1]};var wr=nt.prototype;wr.parseTopLevel=function(){var t=this.startNodeAt(this.options.locations?[0,jl(this.input,0)]:0);for(t.body=[];this.tok.type!==m.eof;)t.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(t.body),this.last=this.tok,t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};wr.parseStatement=function(){var t=this.tok.type,e=this.startNode(),r;switch(this.toks.isLet()&&(t=m._var,r="let"),t){case m._break:case m._continue:this.next();var i=t===m._break;return this.semicolon()||this.canInsertSemicolon()?e.label=null:(e.label=this.tok.type===m.name?this.parseIdent():null,this.semicolon()),this.finishNode(e,i?"BreakStatement":"ContinueStatement");case m._debugger:return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement");case m._do:return this.next(),e.body=this.parseStatement(),e.test=this.eat(m._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(e,"DoWhileStatement");case m._for:this.next();var n=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(m.parenL),this.tok.type===m.semi)return this.parseFor(e,null);var s=this.toks.isLet();if(s||this.tok.type===m._var||this.tok.type===m._const){var o=this.parseVar(this.startNode(),!0,s?"let":this.tok.value);return o.declarations.length===1&&(this.tok.type===m._in||this.isContextual("of"))?(this.options.ecmaVersion>=9&&this.tok.type!==m._in&&(e.await=n),this.parseForIn(e,o)):this.parseFor(e,o)}var a=this.parseExpression(!0);return this.tok.type===m._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==m._in&&(e.await=n),this.parseForIn(e,this.toAssignable(a))):this.parseFor(e,a);case m._function:return this.next(),this.parseFunction(e,!0);case m._if:return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(),e.alternate=this.eat(m._else)?this.parseStatement():null,this.finishNode(e,"IfStatement");case m._return:return this.next(),this.eat(m.semi)||this.canInsertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement");case m._switch:var u=this.curIndent,c=this.curLineStart;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.pushCx(),this.expect(m.braceL);for(var l;!this.closes(m.braceR,u,c,!0);)if(this.tok.type===m._case||this.tok.type===m._default){var p=this.tok.type===m._case;l&&this.finishNode(l,"SwitchCase"),e.cases.push(l=this.startNode()),l.consequent=[],this.next(),p?l.test=this.parseExpression():l.test=null,this.expect(m.colon)}else l||(e.cases.push(l=this.startNode()),l.consequent=[],l.test=null),l.consequent.push(this.parseStatement());return l&&this.finishNode(l,"SwitchCase"),this.popCx(),this.eat(m.braceR),this.finishNode(e,"SwitchStatement");case m._throw:return this.next(),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement");case m._try:if(this.next(),e.block=this.parseBlock(),e.handler=null,this.tok.type===m._catch){var f=this.startNode();this.next(),this.eat(m.parenL)?(f.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(m.parenR)):f.param=null,f.body=this.parseBlock(),e.handler=this.finishNode(f,"CatchClause")}return e.finalizer=this.eat(m._finally)?this.parseBlock():null,!e.handler&&!e.finalizer?e.block:this.finishNode(e,"TryStatement");case m._var:case m._const:return this.parseVar(e,!1,r||this.tok.value);case m._while:return this.next(),e.test=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WhileStatement");case m._with:return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WithStatement");case m.braceL:return this.parseBlock();case m.semi:return this.next(),this.finishNode(e,"EmptyStatement");case m._class:return this.parseClass(!0);case m._import:if(this.options.ecmaVersion>10){var h=this.lookAhead(1).type;if(h===m.parenL||h===m.dot)return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"ExpressionStatement")}return this.parseImport();case m._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,!0,!0);var g=this.parseExpression();return Li(g)?(this.next(),this.tok.type===m.eof?this.finishNode(e,"EmptyStatement"):this.parseStatement()):t===m.name&&g.type==="Identifier"&&this.eat(m.colon)?(e.body=this.parseStatement(),e.label=g,this.finishNode(e,"LabeledStatement")):(e.expression=g,this.semicolon(),this.finishNode(e,"ExpressionStatement"))}};wr.parseBlock=function(){var t=this.startNode();this.pushCx(),this.expect(m.braceL);var e=this.curIndent,r=this.curLineStart;for(t.body=[];!this.closes(m.braceR,e,r,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(m.braceR),this.finishNode(t,"BlockStatement")};wr.parseFor=function(t,e){return t.init=e,t.test=t.update=null,this.eat(m.semi)&&this.tok.type!==m.semi&&(t.test=this.parseExpression()),this.eat(m.semi)&&this.tok.type!==m.parenR&&(t.update=this.parseExpression()),this.popCx(),this.expect(m.parenR),t.body=this.parseStatement(),this.finishNode(t,"ForStatement")};wr.parseForIn=function(t,e){var r=this.tok.type===m._in?"ForInStatement":"ForOfStatement";return this.next(),t.left=e,t.right=this.parseExpression(),this.popCx(),this.expect(m.parenR),t.body=this.parseStatement(),this.finishNode(t,r)};wr.parseVar=function(t,e,r){t.kind=r,this.next(),t.declarations=[];do{var i=this.startNode();i.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),i.init=this.eat(m.eq)?this.parseMaybeAssign(e):null,t.declarations.push(this.finishNode(i,"VariableDeclarator"))}while(this.eat(m.comma));if(!t.declarations.length){var n=this.startNode();n.id=this.dummyIdent(),t.declarations.push(this.finishNode(n,"VariableDeclarator"))}return e||this.semicolon(),this.finishNode(t,"VariableDeclaration")};wr.parseClass=function(t){var e=this.startNode();this.next(),this.tok.type===m.name?e.id=this.parseIdent():t===!0?e.id=this.dummyIdent():e.id=null,e.superClass=this.eat(m._extends)?this.parseExpression():null,e.body=this.startNode(),e.body.body=[],this.pushCx();var r=this.curIndent+1,i=this.curLineStart;for(this.eat(m.braceL),this.curIndent+1<r&&(r=this.curIndent,i=this.curLineStart);!this.closes(m.braceR,r,i);){var n=this.parseClassElement();n&&e.body.body.push(n)}return this.popCx(),this.eat(m.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(e.body,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};wr.parseClassElement=function(){if(this.eat(m.semi))return null;var t=this.options,e=t.ecmaVersion,r=t.locations,i=this.curIndent,n=this.curLineStart,s=this.startNode(),o="",a=!1,u=!1,c="method",l=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(m.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.toks.type===m.star?l=!0:o="static"}if(s.static=l,!o&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.toks.type===m.star)&&!this.canInsertSemicolon()?u=!0:o="async"),!o){a=this.eat(m.star);var p=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?c=p:o=p)}if(o)s.computed=!1,s.key=this.startNodeAt(r?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),s.key.name=o,this.finishNode(s.key,"Identifier");else if(this.parseClassElementName(s),Li(s.key))return Li(this.parseMaybeAssign())&&this.next(),this.eat(m.comma),null;if(e<13||this.toks.type===m.parenL||c!=="method"||a||u){var f=!s.computed&&!s.static&&!a&&!u&&c==="method"&&(s.key.type==="Identifier"&&s.key.name==="constructor"||s.key.type==="Literal"&&s.key.value==="constructor");s.kind=f?"constructor":c,s.value=this.parseMethod(a,u),this.finishNode(s,"MethodDefinition")}else{if(this.eat(m.eq))if(this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine())s.value=null;else{var h=this.inAsync,g=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=h,this.inGenerator=g}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s};wr.parseClassStaticBlock=function(t){var e=this.curIndent,r=this.curLineStart;for(t.body=[],this.pushCx();!this.closes(m.braceR,e,r,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(m.braceR),this.finishNode(t,"StaticBlock")};wr.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()};wr.parseClassElementName=function(t){this.toks.type===m.privateId?(t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};wr.parseFunction=function(t,e,r){var i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=6&&(t.generator=this.eat(m.star)),this.options.ecmaVersion>=8&&(t.async=!!r),this.tok.type===m.name?t.id=this.parseIdent():e===!0&&(t.id=this.dummyIdent()),this.inAsync=t.async,this.inGenerator=t.generator,this.inFunction=!0,t.params=this.parseFunctionParams(),t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")};wr.parseExport=function(){var t=this.startNode();if(this.next(),this.eat(m.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?t.exported=this.parseExprAtom():t.exported=null),t.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(m._default)){var e;if(this.tok.type===m._function||(e=this.toks.isAsyncFunction())){var r=this.startNode();this.next(),e&&this.next(),t.declaration=this.parseFunction(r,"nullableID",e)}else this.tok.type===m._class?t.declaration=this.parseClass("nullableID"):(t.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(t,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(t.declaration=this.parseStatement(),t.specifiers=[],t.source=null):(t.declaration=null,t.specifiers=this.parseExportSpecifierList(),t.source=this.eatContextual("from")?this.parseExprAtom():null,this.semicolon()),this.finishNode(t,"ExportNamedDeclaration")};wr.parseImport=function(){var t=this.startNode();if(this.next(),this.tok.type===m.string)t.specifiers=[],t.source=this.parseExprAtom();else{var e;this.tok.type===m.name&&this.tok.value!=="from"&&(e=this.startNode(),e.local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(m.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===m.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)}return this.semicolon(),this.finishNode(t,"ImportDeclaration")};wr.parseImportSpecifiers=function(){var t=[];if(this.tok.type===m.star){var e=this.startNode();this.next(),e.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),t.push(this.finishNode(e,"ImportNamespaceSpecifier"))}else{var r=this.curIndent,i=this.curLineStart,n=this.nextLineStart;for(this.pushCx(),this.eat(m.braceL),this.curLineStart>n&&(n=this.curLineStart);!this.closes(m.braceR,r+(this.curLineStart<=n?1:0),i);){var s=this.startNode();if(this.eat(m.star))s.local=this.eatContextual("as")?this.parseModuleExportName():this.dummyIdent(),this.finishNode(s,"ImportNamespaceSpecifier");else{if(this.isContextual("from")||(s.imported=this.parseModuleExportName(),Li(s.imported)))break;s.local=this.eatContextual("as")?this.parseModuleExportName():s.imported,this.finishNode(s,"ImportSpecifier")}t.push(s),this.eat(m.comma)}this.eat(m.braceR),this.popCx()}return t};wr.parseExportSpecifierList=function(){var t=[],e=this.curIndent,r=this.curLineStart,i=this.nextLineStart;for(this.pushCx(),this.eat(m.braceL),this.curLineStart>i&&(i=this.curLineStart);!this.closes(m.braceR,e+(this.curLineStart<=i?1:0),r)&&!this.isContextual("from");){var n=this.startNode();if(n.local=this.parseModuleExportName(),Li(n.local))break;n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local,this.finishNode(n,"ExportSpecifier"),t.push(n),this.eat(m.comma)}return this.eat(m.braceR),this.popCx(),t};wr.parseModuleExportName=function(){return this.options.ecmaVersion>=13&&this.tok.type===m.string?this.parseExprAtom():this.parseIdent()};var Ye=nt.prototype;Ye.checkLVal=function(t){if(!t)return t;switch(t.type){case"Identifier":case"MemberExpression":return t;case"ParenthesizedExpression":return t.expression=this.checkLVal(t.expression),t;default:return this.dummyIdent()}};Ye.parseExpression=function(t){var e=this.storeCurrentPos(),r=this.parseMaybeAssign(t);if(this.tok.type===m.comma){var i=this.startNodeAt(e);for(i.expressions=[r];this.eat(m.comma);)i.expressions.push(this.parseMaybeAssign(t));return this.finishNode(i,"SequenceExpression")}return r};Ye.parseParenExpression=function(){this.pushCx(),this.expect(m.parenL);var t=this.parseExpression();return this.popCx(),this.expect(m.parenR),t};Ye.parseMaybeAssign=function(t){if(this.inGenerator&&this.toks.isContextual("yield")){var e=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==m.star&&!this.tok.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(m.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}var r=this.storeCurrentPos(),i=this.parseMaybeConditional(t);if(this.tok.type.isAssign){var n=this.startNodeAt(r);return n.operator=this.tok.value,n.left=this.tok.type===m.eq?this.toAssignable(i):this.checkLVal(i),this.next(),n.right=this.parseMaybeAssign(t),this.finishNode(n,"AssignmentExpression")}return i};Ye.parseMaybeConditional=function(t){var e=this.storeCurrentPos(),r=this.parseExprOps(t);if(this.eat(m.question)){var i=this.startNodeAt(e);return i.test=r,i.consequent=this.parseMaybeAssign(),i.alternate=this.expect(m.colon)?this.parseMaybeAssign(t):this.dummyIdent(),this.finishNode(i,"ConditionalExpression")}return r};Ye.parseExprOps=function(t){var e=this.storeCurrentPos(),r=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),e,-1,t,r,i)};Ye.parseExprOp=function(t,e,r,i,n,s){if(this.curLineStart!==s&&this.curIndent<n&&this.tokenStartsLine())return t;var o=this.tok.type.binop;if(o!=null&&(!i||this.tok.type!==m._in)&&o>r){var a=this.startNodeAt(e);if(a.left=t,a.operator=this.tok.value,this.next(),this.curLineStart!==s&&this.curIndent<n&&this.tokenStartsLine())a.right=this.dummyIdent();else{var u=this.storeCurrentPos();a.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,i,n,s)}return this.finishNode(a,/&&|\|\||\?\?/.test(a.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,e,r,i,n,s)}return t};Ye.parseMaybeUnary=function(t){var e=this.storeCurrentPos(),r;if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||this.toks.inModule&&this.options.ecmaVersion>=13||!this.inFunction&&this.options.allowAwaitOutsideFunction))r=this.parseAwait(),t=!0;else if(this.tok.type.prefix){var i=this.startNode(),n=this.tok.type===m.incDec;n||(t=!0),i.operator=this.tok.value,i.prefix=!0,this.next(),i.argument=this.parseMaybeUnary(!0),n&&(i.argument=this.checkLVal(i.argument)),r=this.finishNode(i,n?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===m.ellipsis){var s=this.startNode();this.next(),s.argument=this.parseMaybeUnary(t),r=this.finishNode(s,"SpreadElement")}else if(!t&&this.tok.type===m.privateId)r=this.parsePrivateIdent();else for(r=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(e);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(r),this.next(),r=this.finishNode(o,"UpdateExpression")}if(!t&&this.eat(m.starstar)){var a=this.startNodeAt(e);return a.operator="**",a.left=r,a.right=this.parseMaybeUnary(!1),this.finishNode(a,"BinaryExpression")}return r};Ye.parseExprSubscripts=function(){var t=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),t,!1,this.curIndent,this.curLineStart)};Ye.parseSubscripts=function(t,e,r,i,n){for(var s=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine())if(this.tok.type===m.dot&&this.curIndent===i)--i;else break;var a=t.type==="Identifier"&&t.name==="async"&&!this.canInsertSemicolon(),u=s&&this.eat(m.questionDot);if(u&&(o=!0),u&&this.tok.type!==m.parenL&&this.tok.type!==m.bracketL&&this.tok.type!==m.backQuote||this.eat(m.dot)){var c=this.startNodeAt(e);c.object=t,this.curLineStart!==n&&this.curIndent<=i&&this.tokenStartsLine()?c.property=this.dummyIdent():c.property=this.parsePropertyAccessor()||this.dummyIdent(),c.computed=!1,s&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(this.tok.type===m.bracketL){this.pushCx(),this.next();var l=this.startNodeAt(e);l.object=t,l.property=this.parseExpression(),l.computed=!0,s&&(l.optional=u),this.popCx(),this.expect(m.bracketR),t=this.finishNode(l,"MemberExpression")}else if(!r&&this.tok.type===m.parenL){var p=this.parseExprList(m.parenR);if(a&&this.eat(m.arrow))return this.parseArrowExpression(this.startNodeAt(e),p,!0);var f=this.startNodeAt(e);f.callee=t,f.arguments=p,s&&(f.optional=u),t=this.finishNode(f,"CallExpression")}else if(this.tok.type===m.backQuote){var h=this.startNodeAt(e);h.tag=t,h.quasi=this.parseTemplate(),t=this.finishNode(h,"TaggedTemplateExpression")}else break}if(o){var g=this.startNodeAt(e);g.expression=t,t=this.finishNode(g,"ChainExpression")}return t};Ye.parseExprAtom=function(){var t;switch(this.tok.type){case m._this:case m._super:var e=this.tok.type===m._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,e);case m.name:var r=this.storeCurrentPos(),i=this.parseIdent(),n=!1;if(i.name==="async"&&!this.canInsertSemicolon()){if(this.eat(m._function))return this.toks.overrideContext(ct.f_expr),this.parseFunction(this.startNodeAt(r),!1,!0);this.tok.type===m.name&&(i=this.parseIdent(),n=!0)}return this.eat(m.arrow)?this.parseArrowExpression(this.startNodeAt(r),[i],n):i;case m.regexp:t=this.startNode();var s=this.tok.value;return t.regex={pattern:s.pattern,flags:s.flags},t.value=s.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(t,"Literal");case m.num:case m.string:return t=this.startNode(),t.value=this.tok.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===m.num&&t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal");case m._null:case m._true:case m._false:return t=this.startNode(),t.value=this.tok.type===m._null?null:this.tok.type===m._true,t.raw=this.tok.type.keyword,this.next(),this.finishNode(t,"Literal");case m.parenL:var o=this.storeCurrentPos();this.next();var a=this.parseExpression();if(this.expect(m.parenR),this.eat(m.arrow)){var u=a.expressions||[a];return u.length&&Li(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var c=this.startNodeAt(o);c.expression=a,a=this.finishNode(c,"ParenthesizedExpression")}return a;case m.bracketL:return t=this.startNode(),t.elements=this.parseExprList(m.bracketR,!0),this.finishNode(t,"ArrayExpression");case m.braceL:return this.toks.overrideContext(ct.b_expr),this.parseObj();case m._class:return this.parseClass(!1);case m._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case m._new:return this.parseNew();case m.backQuote:return this.parseTemplate();case m._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}};Ye.parseExprImport=function(){var t=this.startNode(),e=this.parseIdent(!0);switch(this.tok.type){case m.parenL:return this.parseDynamicImport(t);case m.dot:return t.meta=e,this.parseImportMeta(t);default:return t.name="import",this.finishNode(t,"Identifier")}};Ye.parseDynamicImport=function(t){return t.source=this.parseExprList(m.parenR)[0]||this.dummyString(),this.finishNode(t,"ImportExpression")};Ye.parseImportMeta=function(t){return this.next(),t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty")};Ye.parseNew=function(){var t=this.startNode(),e=this.curIndent,r=this.curLineStart,i=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(m.dot))return t.meta=i,t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty");var n=this.storeCurrentPos();return t.callee=this.parseSubscripts(this.parseExprAtom(),n,!0,e,r),this.tok.type===m.parenL?t.arguments=this.parseExprList(m.parenR):t.arguments=[],this.finishNode(t,"NewExpression")};Ye.parseTemplateElement=function(){var t=this.startNode();return this.tok.type===m.invalidTemplate?t.value={raw:this.tok.value,cooked:null}:t.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,`
`),cooked:this.tok.value},this.next(),t.tail=this.tok.type===m.backQuote,this.finishNode(t,"TemplateElement")};Ye.parseTemplate=function(){var t=this.startNode();this.next(),t.expressions=[];var e=this.parseTemplateElement();for(t.quasis=[e];!e.tail;)this.next(),t.expressions.push(this.parseExpression()),this.expect(m.braceR)?e=this.parseTemplateElement():(e=this.startNode(),e.value={cooked:"",raw:""},e.tail=!0,this.finishNode(e,"TemplateElement")),t.quasis.push(e);return this.expect(m.backQuote),this.finishNode(t,"TemplateLiteral")};Ye.parseObj=function(){var t=this.startNode();t.properties=[],this.pushCx();var e=this.curIndent+1,r=this.curLineStart;for(this.eat(m.braceL),this.curIndent+1<e&&(e=this.curIndent,r=this.curLineStart);!this.closes(m.braceR,e,r);){var i=this.startNode(),n=void 0,s=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(m.ellipsis)){i.argument=this.parseMaybeAssign(),t.properties.push(this.finishNode(i,"SpreadElement")),this.eat(m.comma);continue}if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),i.method=!1,i.shorthand=!1,n=this.eat(m.star)),this.parsePropertyName(i),this.toks.isAsyncProp(i)?(s=!0,n=this.options.ecmaVersion>=9&&this.eat(m.star),this.parsePropertyName(i)):s=!1,Li(i.key)){Li(this.parseMaybeAssign())&&this.next(),this.eat(m.comma);continue}if(this.eat(m.colon))i.kind="init",i.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===m.parenL||this.tok.type===m.braceL))i.kind="init",i.method=!0,i.value=this.parseMethod(n,s);else if(this.options.ecmaVersion>=5&&i.key.type==="Identifier"&&!i.computed&&(i.key.name==="get"||i.key.name==="set")&&this.tok.type!==m.comma&&this.tok.type!==m.braceR&&this.tok.type!==m.eq)i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);else{if(i.kind="init",this.options.ecmaVersion>=6)if(this.eat(m.eq)){var a=this.startNodeAt(o);a.operator="=",a.left=i.key,a.right=this.parseMaybeAssign(),i.value=this.finishNode(a,"AssignmentExpression")}else i.value=i.key;else i.value=this.dummyIdent();i.shorthand=!0}t.properties.push(this.finishNode(i,"Property")),this.eat(m.comma)}return this.popCx(),this.eat(m.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(t,"ObjectExpression")};Ye.parsePropertyName=function(t){if(this.options.ecmaVersion>=6)if(this.eat(m.bracketL)){t.computed=!0,t.key=this.parseExpression(),this.expect(m.bracketR);return}else t.computed=!1;var e=this.tok.type===m.num||this.tok.type===m.string?this.parseExprAtom():this.parseIdent();t.key=e||this.dummyIdent()};Ye.parsePropertyAccessor=function(){if(this.tok.type===m.name||this.tok.type.keyword)return this.parseIdent();if(this.tok.type===m.privateId)return this.parsePrivateIdent()};Ye.parseIdent=function(){var t=this.tok.type===m.name?this.tok.value:this.tok.type.keyword;if(!t)return this.dummyIdent();var e=this.startNode();return this.next(),e.name=t,this.finishNode(e,"Identifier")};Ye.parsePrivateIdent=function(){var t=this.startNode();return t.name=this.tok.value,this.next(),this.finishNode(t,"PrivateIdentifier")};Ye.initFunction=function(t){t.id=null,t.params=[],this.options.ecmaVersion>=6&&(t.generator=!1,t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};Ye.toAssignable=function(t,e){if(!(!t||t.type==="Identifier"||t.type==="MemberExpression"&&!e))if(t.type==="ParenthesizedExpression")this.toAssignable(t.expression,e);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if(t.type==="ObjectExpression"){t.type="ObjectPattern";for(var r=0,i=t.properties;r<i.length;r+=1){var n=i[r];this.toAssignable(n,e)}}else if(t.type==="ArrayExpression")t.type="ArrayPattern",this.toAssignableList(t.elements,e);else if(t.type==="Property")this.toAssignable(t.value,e);else if(t.type==="SpreadElement")t.type="RestElement",this.toAssignable(t.argument,e);else if(t.type==="AssignmentExpression")t.type="AssignmentPattern",delete t.operator;else return this.dummyIdent()}return t};Ye.toAssignableList=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r];this.toAssignable(n,e)}return t};Ye.parseFunctionParams=function(t){return t=this.parseExprList(m.parenR),this.toAssignableList(t,!0)};Ye.parseMethod=function(t,e){var r=this.startNode(),i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=!!t),this.options.ecmaVersion>=8&&(r.async=!!e),this.inAsync=r.async,this.inGenerator=r.generator,this.inFunction=!0,r.params=this.parseFunctionParams(),r.body=this.parseBlock(),this.toks.adaptDirectivePrologue(r.body.body),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(r,"FunctionExpression")};Ye.parseArrowExpression=function(t,e,r){var i=this.inAsync,n=this.inGenerator,s=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!r),this.inAsync=t.async,this.inGenerator=!1,this.inFunction=!0,t.params=this.toAssignableList(e,!0),t.expression=this.tok.type!==m.braceL,t.expression?t.body=this.parseMaybeAssign():(t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body)),this.inAsync=i,this.inGenerator=n,this.inFunction=s,this.finishNode(t,"ArrowFunctionExpression")};Ye.parseExprList=function(t,e){this.pushCx();var r=this.curIndent,i=this.curLineStart,n=[];for(this.next();!this.closes(t,r+1,i);){if(this.eat(m.comma)){n.push(e?null:this.dummyIdent());continue}var s=this.parseMaybeAssign();if(Li(s)){if(this.closes(t,r,i))break;this.next()}else n.push(s);this.eat(m.comma)}return this.popCx(),this.eat(t)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),n};Ye.parseAwait=function(){var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")};Mh.tabSize=4;function UO(t,e){return nt.parse(t,e)}var NE={ecmaVersion:"latest",locations:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReserved:!0,allowReturnOutsideFunction:!0},va=t=>t.start,FE=t=>t.end,jO=(t,e)=>t.slice(va(e),FE(e)),ba=(t,e=!1)=>(e?HO:UO)(t,NE),mv=t=>{let e=ba(t);for(let r of e.body)r.type==="FunctionDeclaration"&&r.id&&Li(r.id)&&(r.id=null);return e.body};function qO(t,e,r){return e.length>1||e[0].type!=="FunctionDeclaration"?GO(t,e,!0,r):WO(t,[{type:"ReturnStatement",argument:{type:"CallExpression",optional:!1,arguments:[{type:"ThisExpression"},...t.map(i=>({type:"Identifier",name:i}))],callee:{type:"MemberExpression",property:{type:"Identifier",name:"call"},computed:!1,optional:!1,object:{type:"FunctionExpression",params:e[0].params,body:e[0].body}}}}],!0,r)}var WO=(t,e,r,i)=>{let n={type:"Identifier",name:"e"},o=i?[{type:"TryStatement",block:{type:"BlockStatement",body:e},handler:{type:"CatchClause",param:n,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"MemberExpression",object:n,property:{type:"Identifier",name:"stack"},computed:!1,optional:!1},operator:"||",right:{type:"MemberExpression",object:n,property:{type:"Identifier",name:"message"},computed:!1,optional:!1}},operator:"||",right:{type:"CallExpression",callee:{type:"Identifier",name:"String"},arguments:[n],optional:!1}}}]}}}]:e;return r?{type:"FunctionExpression",id:{type:"Identifier",name:"_generatedCode"},params:t.map(a=>({type:"Identifier",name:a})),body:{type:"BlockStatement",body:o}}:{type:"ArrowFunctionExpression",params:t.map(a=>({type:"Identifier",name:a})),expression:!1,body:{type:"BlockStatement",body:o}}},yne=(t,e)=>({type:"CallExpression",arguments:t.map(r=>({type:"Identifier",name:r})),callee:e,optional:!1}),VO=(t,e,r)=>yne(t,GO(t,e,r,!0));function GO(t,e,r,i){let n=e[e.length-1];if(n.type!=="ReturnStatement"){let s=vne(n);s&&(e=[...e.slice(0,-1),{type:"ReturnStatement",argument:s}])}return WO(t,e,r,i)}function vne(t){switch(t.type){case"ExpressionStatement":return t.expression;case"BlockStatement":return{type:"CallExpression",arguments:[],callee:{type:"ArrowFunctionExpression",params:[],expression:!1,body:t},optional:!1};case"ReturnStatement":return t.argument||void 0;default:return}}var BE=class{constructor(e,r,i,n,s){this.original=e;this.metadata=r;this.actualRoot=i;this.actualSources=n;this.hasNames=s;this.sourceActualToOriginal=new Map;this.sourceOriginalToActual=new Map;this.id=BE.idCounter++;if(n.length!==e.sources.length)throw new Error("Expected actualSources.length === original.source.length");for(let o=0;o<n.length;o++)this.sourceActualToOriginal.set(n[o],e.sources[o]),this.sourceOriginalToActual.set(e.sources[o],n[o])}get sources(){return this.actualSources.slice()}get sourceRoot(){return this.actualRoot}computedSourceUrl(e){return Ft(gv(_r(this.metadata.sourceMapUrl)?this.metadata.compiledPath:this.metadata.sourceMapUrl,this.sourceRoot+e))}computeColumnSpans(){this.original.computeColumnSpans()}originalPositionFor(e){var i;let r=this.original.originalPositionFor(e);return r.source&&(r.source=(i=this.sourceOriginalToActual.get(r.source))!=null?i:r.source),r}generatedPositionFor(e){var r;return this.original.generatedPositionFor({...e,source:(r=this.sourceActualToOriginal.get(e.source))!=null?r:e.source})}allGeneratedPositionsFor(e){var r;return this.original.allGeneratedPositionsFor({...e,source:(r=this.sourceActualToOriginal.get(e.source))!=null?r:e.source})}hasContentsOfAllSources(){return this.original.hasContentsOfAllSources()}sourceContentFor(e,r){var i;return this.original.sourceContentFor((i=this.sourceActualToOriginal.get(e))!=null?i:e,r)}eachMapping(e,r,i){return this.original.eachMapping(e,r,i)}destroy(){this.original.destroy()}},ic=BE;ic.idCounter=0;async function JO(t,e,r,i){let n=At.parse(e,{locations:!0,ecmaVersion:"latest"}),s=new qh.SourceMapGenerator({file:t}),o=Ho(n,{sourceMap:{setSourceContent:(a,u)=>s.setSourceContent(a,u),applySourceMap:(a,u,c)=>s.applySourceMap(a,u,c),toJSON:()=>s.toJSON(),toString:()=>s.toString(),addMapping:a=>s.addMapping({generated:a.original,original:{column:a.generated.column,line:a.generated.line},source:t,name:a.name})}});return s.setSourceContent(t,o),new ic(await qh.SourceMapConsumer.fromSourceMap(s),{sourceMapUrl:i,compiledPath:r},"",[t],!1)}function YO(t){let e;try{e=ba(t,!0)}catch(u){return}let r=(u,c)=>({type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:u,right:c}}),i=!1,n=!1,s=(0,Kl.replace)(e,{enter(u,c){switch(u.type){case"ClassDeclaration":return r(u.id||{type:"Identifier",name:"_default"},{...u,type:"ClassExpression"});case"FunctionDeclaration":return this.skip(),r(u.id||{type:"Identifier",name:"_default"},{...u,type:"FunctionExpression"});case"FunctionExpression":case"ArrowFunctionExpression":case"MethodDefinition":return Kl.VisitorOption.Skip;case"AwaitExpression":i=!0;return;case"ForOfStatement":u.await&&(i=!0);return;case"ReturnStatement":n=!0;return;case"VariableDeclaration":if(!c||!("body"in c)||!(c.body instanceof Array))return;let l=c.body,p=u.declarations.map(f=>({type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:f.id,right:f.init||{type:"Identifier",name:"undefined"}}}}));l.splice(l.indexOf(u),1,...p)}}});if(!i||n)return;let o=s.body[s.body.length-1];o.type==="ExpressionStatement"&&(s.body[s.body.length-1]={type:"ReturnStatement",argument:o.expression});let a={type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"ArrowFunctionExpression",params:[],generator:!1,expression:!1,async:!0,body:{type:"BlockStatement",body:s.body}},arguments:[],optional:!1}};return Ho(a)}function Wh(t){try{let e=rv(t,0,NE);return e.end<t.length||e.type!=="ObjectExpression"?t:`(${t})`}catch(e){return t}}function zl(t){if(!t)return;let e="sourceMappingURL",r=t.length,i=e.length,n=r,s=0;for(;;){if(n=t.lastIndexOf(e,n),n===-1||n<4)return;if(n-=4,t[n]==="/"&&t[n+1]==="/"&&!(t[n+2]!=="#"&&t[n+2]!=="@")&&!(t[n+3]!==" "&&t[n+3]!=="	")&&(s=n+4+i,!(s<r&&t[s]!=="=")))break}let o=t.substring(s+1),a=o.indexOf(`
`);return a!==-1&&(o=o.substring(0,a)),o.trim()}var KO=new fv;async function QO(t,e,r){return!t||jR(t)?void 0:e?(typeof r=="string"?await KO.verifyBytes(r,e,!0):await KO.verifyFile(t,e,!0))?t:void 0:await new xi(XO.promises).exists(t)?t:void 0}function Hv(t,e,r){let i=r.generatedPositionFor({source:t,line:e.lineNumber,column:e.columnNumber-1,bias:qh.SourceMapConsumer.GREATEST_LOWER_BOUND}),n=a=>{if(a.line===null||a.column===null)return 1e11;let u=r.originalPositionFor(a);return u.line!==null?Math.abs(e.lineNumber-u.line):1e11},s=n(i),o=r.allGeneratedPositionsFor({source:t,line:e.lineNumber,column:e.columnNumber-1}).filter(a=>a.line!==null&&a.column!==null).sort((a,u)=>a.line!==u.line?a.line-u.line:a.column-u.column).map(a=>[a,n(a)]);return o.push([i,s]),o.sort(([a,u],[c,l])=>u-l||a.line-c.line||a.column-c.column),o[0][0]}var UE=(t,e)=>!!e&&((e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression")&&e.params.includes(t)||(e.type==="ForInStatement"||e.type==="ForOfStatement")&&e.left===t||e.type==="VariableDeclarator"&&e.id===t||e.type==="AssignmentPattern"&&e.left===t||e.type==="CatchClause"&&e.param===t||"kind"in e&&e.kind==="init"&&e.value===t||e.type==="RestElement"&&e.argument===t||e.type==="AssignmentPattern"&&e.left===t);function wa(t){try{new Function(t)}catch(e){return e}}function bne(t,e){let r=ba(t),i,n;return(0,Kl.traverse)(r,{enter:s=>{let o=s;e>=o.start&&e<o.end&&(s.type==="CallExpression"||s.type==="NewExpression"?n=s:i=s)}}),n||i}var zO=/^[^()]+/g;function ZO(t,e){try{let i=bne(t,e);if(i&&"callee"in i){let n=i.callee;return{text:`${t.slice(n.start,n.end)}(...)`,start:n.start,end:n.end}}else{let n=i;return{text:t.slice(n.start,n.end),start:n.start,end:n.end}}}catch(i){}zO.lastIndex=e-1;let r=zO.exec(t);if(r)return{text:r[0],start:e,end:e+r[0].length}}var Rt=()=>`
//# sourceURL=eval-${(0,eN.randomBytes)(4).toString("hex")}${".cdp"}
`;function nc(t){return wne(""+t)}function wne(t){let e=rv(t,0,{ecmaVersion:"latest",locations:!0});if(e.type!=="FunctionExpression")throw new Error(`Could not find function declaration for:

${t}`);let r=e.params.map(o=>{if(o.type!=="Identifier")throw new Error("Parameter must be identifier");return o.name}),{start:i,end:n}=e.body,s=o=>`
    ${o.map((a,u)=>`let ${r[u]} = ${a}`).join("; ")};
    ${t.slice(i+1,n-1)}
  `;return{expr:(...o)=>`(()=>{${s(o)}})();
${Rt()}`,decl:(...o)=>`function(){${s(o)};
${Rt()}}`}}var Xl=class extends Error{constructor(r){super(r.text);this.details=r}},Vh=class{constructor(e){this.objectId=e}};function Ur(t){let e=(""+t).replace("}",Rt()+"}"),r=async({cdp:i,args:n,...s})=>{let o=await i.Runtime.callFunctionOn({functionDeclaration:e,arguments:n.map(a=>a instanceof Vh?{objectId:a.objectId}:{value:a}),...s});if(!o)throw new Xl({exceptionId:0,text:"No response from CDP",lineNumber:0,columnNumber:0});if(o.exceptionDetails)throw new Xl(o.exceptionDetails);return o.result};return r.source=e,r}var tN=()=>"globalThis.__jsDebugIsReady = true; "+Rt();var Gh=new Set(["page","iframe","worker","service_worker"]),VE=new Set(["page","iframe"]),WE=new Set(["page","iframe"]),_ne=WE,Jl=class{constructor(e,r,i,n,s,o,a,u,c){this._manager=e;this._targetInfo=r;this.launchConfig=o;this.sessionId=a;this.logger=u;this._attached=!1;this._onNameChangedEmitter=new X;this.onNameChanged=this._onNameChangedEmitter.event;this.entryBreakpoint=void 0;this._children=new Map;this.sourcePathResolver=this._manager._sourcePathResolver;this._cdp=i,i.pause(),this.parentTarget=n,this._waitingForDebugger=s,this._updateFromInfo(r),this._ondispose=c}get targetInfo(){return this._targetInfo}get targetId(){return this._targetInfo.targetId}get independentLifeycle(){return WE.has(this.type())}get supplementalConfig(){let e=this.type();return{__browserTargetType:e,__usePerformanceFromParent:e!=="page"}}targetOrigin(){return this._manager._targetOrigin}id(){return this.sessionId}cdp(){return this._cdp}name(){return this._computeName()}fileName(){return this._targetInfo.url}type(){return this._targetInfo.type}afterBind(){return this._cdp.resume(),Promise.resolve()}initialize(){return Promise.resolve()}async runIfWaitingForDebugger(){await Promise.all([this._cdp.Runtime.runIfWaitingForDebugger({}),this._cdp.Runtime.evaluate({expression:tN()})])}parent(){return this.parentTarget&&!Gh.has(this.parentTarget.type())?this.parentTarget.parentTarget:this.parentTarget}children(){let e=[];for(let r of this._children.values())Gh.has(r.type())?e.push(r):e.push(...r.children());return e}canStop(){return _ne.has(this.type())}stop(){if(this._manager.targetList().includes(this))if(this.type()==="service_worker"){if(this._manager.serviceWorkerModel.stopWorker(this.id()),!this.parentTarget)return;this._manager.serviceWorkerModel.stopWorker(this.parentTarget.id())}else this._cdp.Target.closeTarget({targetId:this._targetInfo.targetId})}canRestart(){return WE.has(this.type())}restart(){this._cdp.Page.reload({})}waitingForDebugger(){return this._waitingForDebugger}canAttach(){return!this._attached}async attach(){return this._waitingForDebugger=!1,this._attached=!0,Promise.resolve(this._cdp)}canDetach(){return this._attached}async detach(){this._attached=!1,this._manager._detachedFromTarget(this.sessionId)}executionContextName(e){let r=e.auxData,i=e.name;if(!r)return i;let n=r.frameId,s=n?this._manager.frameModel.frameForId(n):void 0;return s&&r.isDefault&&!s.parentFrame()?"top":s&&r.isDefault?s.displayName():s?`${i}`:i}supportsCustomBreakpoints(){return VE.has(this.type())}scriptUrlToUrl(e){return _a(this._targetInfo.url,e)||e}_updateFromInfo(e){this._targetInfo={...e,type:this._targetInfo.type},this._onNameChangedEmitter.fire()}setComputeNameFn(e){this._customNameComputeFn=e,this._onNameChangedEmitter.fire()}_computeName(){var n;let e=(n=this._customNameComputeFn)==null?void 0:n.call(this,this);if(e)return e;if(this.type()==="service_worker"){let s=this._manager.serviceWorkerModel.version(this.id());if(s)return s.label()+" [Service Worker]"}let r=this._targetInfo.title;if(!(r&&this._manager.targetList().some(s=>s instanceof Jl&&s!==this&&s._targetInfo.title===this._targetInfo.title)))return r;try{let s=new rN.URL(this._targetInfo.url);s.protocol==="data:"?r=" <data>":s?r+=` (${this._targetInfo.url.replace(/^[a-z]+:\/\/|\/$/gi,"")})`:r+=` (${this._targetInfo.url})`}catch(s){r+=` (${this._targetInfo.url})`}return r}async _detached(){await this._manager.serviceWorkerModel.detached(this._cdp),this._ondispose(this)}};function Ds(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function Yl(t,e){if(t.length<=e)return t;let r=e>>1,i=e-r-1,n=t.codePointAt(t.length-i-1);n&&n>=65536&&(--i,++r);let s=t.codePointAt(r-1);return r>0&&s&&s>=65536&&--r,t.substr(0,r)+"\u2026"+t.substr(t.length-i,i)}var iN="/\\.?*()^${}|[]+",nN=t=>iN.includes(t);function Zr(t,e){let r=iN.split("").filter(n=>!e||e.indexOf(n)<0).join("").replace(/[\\\]]/g,"\\$&"),i=new RegExp(`[${r}]`,"g");return t.replace(i,"\\$&")}var Aa=class{constructor(e){this.source=e;this.lines=[];this.lines.push(0);for(let r=e.indexOf(`
`);r!==-1;r=e.indexOf(`
`,r+1))this.lines.push(r+1)}getLineOffset(e){return e>=this.lines.length?this.source.length:this.lines[e]}convert(e){var s;let r=e.base0;if(r.lineNumber>this.lines.length)return this.source.length;let i=this.lines[r.lineNumber],n=(s=this.lines[r.lineNumber+1])!=null?s:this.source.length+1;return i+Math.min(n-i-1,r.columnNumber)}};var vv=process.platform!=="win32";function zE(){return vv}function bv(t){return vv?t:t.toLowerCase()}function wv(t,e){return vv?t===e:t.toLowerCase()===e.toLowerCase()}function sc(){return zE()?new Map:new Es(bv)}var oN,sN=process.platform==="win32"?(oN=process.env.PATHEXT)==null?void 0:oN.toLowerCase().split(";"):void 0,_v=t=>{let e=bv($i.basename(t));if(sN){for(let r of sN)if(e.endsWith(r))return e.slice(0,-r.length)}return e},XE=async(t,e)=>{for(;;){if(await e(t))return t;let r=$i.dirname(t);if(r===t)return;t=r}},Ql=(t,e,r)=>XE(e,i=>t.exists($i.join(i,r))),Ine=new Set(["localhost","127.0.0.1","::1"]),Ene=new Set(["0.0.0.0","::","0000:0000:0000:0000:0000:0000:0000:0000"]),yv=t=>Ine.has(t.toLowerCase()),uN=t=>{try{return new yo.URL(t).hostname.replace(/^\[|\]$/g,"")}catch(e){return t}},cN=t=>Ene.has(uN(t)),Zl=uo(async t=>{let e=uN(t);if(yv(e))return!0;try{let r=await aN.promises.lookup(e);return yv(r.address)}catch(r){return!1}});function _a(t,e){try{return new yo.URL(e,t).href}catch(r){}}function gv(t,e){try{return new yo.URL(e),e}catch(n){}let r;try{r=new yo.URL(t||"")}catch(n){return e}let i=r.protocol+"//";return r.username&&(i+=r.username+":"+r.password+"@"),i+=r.host,i+=$i.dirname(r.pathname),i[i.length-1]!=="/"&&(i+="/"),i+=e,i}function Av(t){try{return new yo.URL(t),!0}catch(e){return!1}}function lN(t){return t.replace(/\/$/,"").replace(/\\$/,"")}var Sne=/^https:\/\/([a-z0-9\-]+)\+\.vscode-resource\.vscode-(?:webview|cdn)\.net\/(.+)/i;function mt(t){let e=Sne.exec(t);if(e)t=`${e[1]}:///${e[2]}`;else if(t.startsWith("vscode-webview-resource://"))t=new yo.URL(t).pathname.replace(/%2F/gi,"/").replace(/^\/([a-z0-9\-]+)(\/{1,2})/i,(i,n,s)=>s.length===1?`${n}:///`:`${n}://`);else if(!ki(t))return;return t=t.replace("file:///",""),t=decodeURIComponent(t),t.startsWith("/")&&process.platform==="win32"&&t[1]!=="/"&&(t="/"+t),t[0]!=="/"&&!t.match(/^[A-Za-z]:/)&&(t="/"+t),Ft(t)}function pN(t){return ki(t)&&(t=t.replace("file:///","\\\\"),t=t.replace(/\//g,"\\"),t=decodeURIComponent(t)),t}function Qe(t){return JE==="win32"?"file:///"+Ia(t):"file://"+Ia(t)}function fN(t){return t.startsWith("/")?"file://"+Ia(t):"file:///"+Ia(t)}function jr(t){return $i.posix.isAbsolute(t)||$i.win32.isAbsolute(t)}function _r(t){return!!t&&t.startsWith("data:")}var GE=(t,e,r)=>{if(!r||t===":"){e.add(t);return}if(t==="/"){e.add(`\\${t}`);return}nN(t)?e.add(`\\${t}`):e.add(t);let i=encodeURIComponent(t);t!=="\\"&&i!==t&&e.add(i)},Cne=t=>{switch(t.size){case 0:return"";case 1:return t.values().next().value;default:let e=[...t];return e.some(r=>r.length>1)?`(?:${e.join("|")})`:`[${e.join("")}]`}},Kh=new Set,KE=(t,e,r,i)=>{let n="";for(let s of t.slice(e,r))vv?GE(s,Kh,i):(GE(s.toLowerCase(),Kh,i),GE(s.toUpperCase(),Kh,i)),n+=Cne(Kh),Kh.clear();return n};function mi(t,[e,r]=[0,t.length]){if(r<=e)return t;let i=[],n=KE(t,0,e,!1),s=KE(t,r,t.length,!1),o=t.slice(e,r);for(let a of[decodeURIComponent(o),mt(o)]){if(!a)continue;let u=KE(a,0,a.length,!0);i.push(xne(`${n}${u}${s}`).concat("($|\\?)"))}return i.join("|")}var xne=t=>t.replace(/^(file:\\\/\\\/\\\/)?([a-z]):/i,(e,r="",i)=>`${r}[${i.toUpperCase()}${i.toLowerCase()}]:`);function ki(t){return t.startsWith("file:///")}var JE=process.platform;function Ia(t){return t=Nn(t),JE==="win32"?(QI(t)&&(t=t.slice(1)),t.split(/[\\//]/g).map((e,r)=>r>0?encodeURIComponent(e):e).join("/")):t.split("/").map(encodeURIComponent).join("/")}function Nn(t){return t&&JE==="win32"&&t[1]===":"?t[0].toUpperCase()+t.substring(1):t}var Ea=(t,e=[])=>{let r=t.urlFilter||t.url||"file"in t&&t.file;if(!r)return()=>!0;let i=Pne(r,...e);return n=>i(n.url)},ep=t=>e=>e.type==="page"&&t(e);function Dne(t){return!!t&&!$i.isAbsolute(t)&&!!(0,yo.parse)(t).protocol}var Pne=(...t)=>{let e=n=>{n=n.toLowerCase();let s=mt(n);s?n=s:Dne(n)&&n.includes("://")&&(n=n.substr(n.indexOf("://")+3)),n.endsWith("/")&&(n=n.substr(0,n.length-1));let o=n.indexOf("#");return o!==-1&&(n=n.slice(0,n[o-1]==="/"?o-1:o)),n},r=t.map(n=>Zr(e(n),"/*").replace(/(\/\*$)|\*/g,".*")),i=new RegExp("^("+r.join("|")+")$","g");return n=>(i.lastIndex=0,i.test(e(n)))};var vo=Symbol("ISourceMapFactory"),Xh=class{constructor(e,r,i,n){this.pathResolve=e;this.resourceProvider=r;this.dap=i;this.logger=n;this.hasWarnedAboutMaps=new WeakSet}async load(e){var o,a;let r=await this.parseSourceMap(e.sourceMapUrl),i=r.sourceRoot;r.sourceRoot=void 0;let n=!1,s=[];if("sections"in r){s=[];let u=0;for(let c of r.sections)s.push(...c.map.sources),c.map.sources=c.map.sources.map(()=>`source${u++}.js`),n||(n=!!((o=c.map.names)!=null&&o.length))}else"sources"in r&&Array.isArray(r.sources)&&(s=r.sources,r.sources=r.sources.map((u,c)=>`source${c}.js`),n=!!((a=r.names)!=null&&a.length));return new ic(await new dN.SourceMapConsumer(r),e,i!=null?i:"",s,n)}async parseSourceMap(e){let r;try{r=await this.parseSourceMapDirect(e)}catch(i){if(r=await this.parsePathMappedSourceMap(e),!r)throw i}if("sections"in r){let i=await Promise.all(r.sections.map((n,s)=>"url"in n?this.parseSourceMap(n.url).then(o=>({offset:n.offset,map:o})).catch(o=>{this.logger.warn("sourcemap.parsing",`Error parsing nested map ${s}: ${o}`)}):n));r.sections=i.filter(kt)}return r}async parsePathMappedSourceMap(e){if(_r(e))return;let r=await this.pathResolve.urlToAbsolutePath({url:e});if(r)try{return this.parseSourceMapDirect(r)}catch(i){this.logger.info("sourcemap.parsing","Parsing path mapped source map failed.",i)}}guardSourceMapFn(e,r,i){try{return r()}catch(n){if(!/error parsing/i.test(String(n.message)))throw n;if(!this.hasWarnedAboutMaps.has(e)){let s=Vy(e.metadata.compiledPath,n.message).error;this.dap.output({output:s.format+`
`,category:"stderr"}),this.hasWarnedAboutMaps.add(e)}return i()}}dispose(){}async parseSourceMapDirect(e){let r=mt(e);r&&(r=this.pathResolve.rebaseRemoteToLocal(r));let i=await this.resourceProvider.fetch(r||e);if(!i.ok)throw i.error;let n=i.body;return n.slice(0,3)===")]}"&&(n=n.substring(n.indexOf(`
`))),JSON.parse(n)}};Xh=k([(0,Sa.injectable)(),A(0,(0,Sa.inject)(ut)),A(1,(0,Sa.inject)(Zu)),A(2,(0,Sa.inject)(Bl)),A(3,(0,Sa.inject)(fe))],Xh);var Ca=class extends Xh{constructor(){super(...arguments);this.knownMaps=new Es(r=>r.toLowerCase());this.overwrittenSourceMaps=[]}load(r){let i=this.knownMaps.get(r.sourceMapUrl);if(!i)return this.loadNewSourceMap(r);let n=r.cacheKey,s=i.metadata.cacheKey;return i.reloadIfNoMtime?n&&s&&n===s?(i.reloadIfNoMtime=!1,i.prom):(this.overwrittenSourceMaps.push(i.prom),this.loadNewSourceMap(r)):s&&n&&n!==s?(this.overwrittenSourceMaps.push(i.prom),this.loadNewSourceMap(r)):i.prom}loadNewSourceMap(r){let i=super.load(r);return this.knownMaps.set(r.sourceMapUrl,{metadata:r,reloadIfNoMtime:!1,prom:i}),i}dispose(){for(let r of this.knownMaps.values())r.prom.then(i=>i.destroy(),()=>{});for(let r of this.overwrittenSourceMaps)r.then(i=>i.destroy(),()=>{});this.knownMaps.clear()}invalidateCache(){for(let r of this.knownMaps.values())r.reloadIfNoMtime=!0}};Ca=k([(0,Sa.injectable)()],Ca);var vN=S(QE());var ip=Symbol("ISearchStrategy"),Sv=Symbol("ISearchStrategyFallback"),np=async(t,e)=>{typeof e=="undefined"&&(e=await xy(t));let r=zl(e);if(!r)return;let i=_r(r);if(i||(r=_a(Qe(t),r)),!r||!r.startsWith("data:")&&!r.startsWith("file://"))return;let n;if(i)n=(0,vN.xxHash32)(r);else{let s=await OR(mt(r)||t);if(!s)return;n=s.mtimeMs}return{compiledPath:t,sourceMapUrl:r,cacheKey:n}};var Cv=async(t,e,r,i={})=>{let n=Date.now();try{return await r()}finally{t.verbose("perf.function","",{method:e,duration:Date.now()-n,...i})}};var ZE=Symbol("InlineSourceMapUrl"),bN=10*1e3,oc=class{constructor(e){e.__workspaceCachePath&&(this.path=xv.join(e.__workspaceCachePath,"bp-predict.json"))}async load(){if(this.value||!this.path)return this.value;try{this.value=JSON.parse(await Jh.promises.readFile(this.path,"utf-8"))}catch(e){}return this.value}async store(e){this.value=e,this.path&&(await Jh.promises.mkdir(xv.dirname(this.path),{recursive:!0}),await Jh.promises.writeFile(this.path,JSON.stringify(e)))}};oc=k([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ke))],oc);var Ps=class{constructor(e,r,i,n,s,o,a,u){this.outFiles=r;this.logger=s;this.sourceMapFactory=o;this.sourcePathResolver=a;this.state=u;this.repo="enableTurboSourcemaps"in e&&e.enableTurboSourcemaps===!1?n:i}async createMapping(e){if(this.outFiles.empty)return new Map;let r=sc(),i=await this.state.load();try{let{state:n}=await this.repo.streamChildrenWithSourcemaps({files:this.outFiles,processMap:async s=>{let o=[],a=await this.sourceMapFactory.load(s);for(let u of a.sources){let c=this.sourcePathResolver?await this.sourcePathResolver.urlToAbsolutePath({url:u,map:a}):mt(u);c&&o.push({...s,sourceMapUrl:_r(s.sourceMapUrl)?{[ZE]:s.sourceMapUrl}:s.sourceMapUrl,resolvedPath:c,sourceUrl:u})}return{discovered:o,compiledPath:Ft(s.compiledPath)}},onProcessedMap:({discovered:s})=>{for(let o of s){let a=r.get(o.resolvedPath);a||(a=new Set,r.set(o.resolvedPath,a)),a.add(o)}},lastState:i,...e});n&&this.state.store(n).catch(s=>this.logger.warn("runtime.exception","Error saving sourcemap cache",{error:s}))}catch(n){this.logger.warn("runtime.exception","Error reading sourcemaps from disk",{error:n})}return r}};Ps=k([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ke)),A(1,(0,Jt.inject)(_s)),A(2,(0,Jt.inject)(ip)),A(3,(0,Jt.inject)(Sv)),A(4,(0,Jt.inject)(fe)),A(5,(0,Jt.inject)(vo)),A(6,(0,Jt.inject)(ut)),A(7,(0,Jt.inject)(oc))],Ps);var sp=class extends Ps{async getMetadataForPaths(r){this.sourcePathToCompiled||(this.sourcePathToCompiled=this.createInitialMapping());let i=await this.sourcePathToCompiled;return r.map(n=>i.get(n))}async createInitialMapping(){return Cv(this.logger,"BreakpointsPredictor.createInitialMapping",()=>this.createMapping())}};sp=k([(0,Jt.injectable)()],sp);var op=class extends Ps{constructor(){super(...arguments);this.sourcePathToCompiled=new Map}async getMetadataForPaths(r){let i=r.map(o=>this.sourcePathToCompiled.get(o)),n=r.map((o,a)=>a).filter(o=>!i[o]);if(n.length){let o=new Set(n.map(u=>qe(r[u]))),a=this.createMapping({filter:(u,c)=>!c||c.discovered.some(l=>o.has(qe(l.resolvedPath)))});for(let u of n)this.sourcePathToCompiled.set(r[u],a),i[u]=a}return await Promise.all(i.map(async(o,a)=>(await o).get(r[a])))}};op=k([(0,Jt.injectable)()],op);var uc=Symbol("IBreakpointsPredictor"),ac=class{constructor(e,r,i,n){this.bpSearch=e;this.outFiles=r;this.logger=i;this.sourceMapFactory=n;this.predictedLocations=new Map;this.longParseEmitter=new X;this.targetedMode=!1;this.onLongParse=this.longParseEmitter.event}async predictBreakpoints(e){var n,s;if(!e.source.path||!((n=e.breakpoints)!=null&&n.length))return;let r=await this.getMetadataForPaths([e.source.path]).then(o=>o[0]);if(!r)return;let i=async(o,a,u)=>{let c=typeof u.sourceMapUrl=="string"?u.sourceMapUrl:u.sourceMapUrl.hasOwnProperty(ZE)?u.sourceMapUrl[ZE]:await Jh.promises.readFile(u.compiledPath,"utf8").then(zl);if(!c)return[];let l=await this.sourceMapFactory.load({...u,sourceMapUrl:c}),p=this.sourceMapFactory.guardSourceMapFn(l,()=>Hv(u.sourceUrl,{lineNumber:o,columnNumber:a||1},l),()=>null);if(!p||p.line===null)return[];let f=await this.getMetadataForPaths([u.compiledPath]).then(h=>h[0]);return f?(await Promise.all([...f].map(g=>i(p.line,p.column,g)))).flat():[{absolutePath:u.compiledPath,lineNumber:p.line||1,columnNumber:p.column?p.column+1:1}]};for(let o of(s=e.breakpoints)!=null?s:[]){let a=`${e.source.path}:${o.line}:${o.column||1}`;if(this.predictedLocations.has(a))return;let u=[];this.predictedLocations.set(a,u);for(let c of r)u.push(...await i(o.line,o.column||0,c))}}async getPredictionForSource(e){return this.getMetadataForPaths([e]).then(r=>r[0])}async getMetadataForPaths(e){let r=setTimeout(()=>{this.longParseEmitter.fire(),this.logger.warn("runtime.sourcemap","Long breakpoint predictor runtime",{longPredictionWarning:bN,patterns:[...this.outFiles.explode()].join(", ")})},bN),i=await this.bpSearch.getMetadataForPaths(e);return clearTimeout(r),i}predictedResolvedLocations(e){var i;let r=`${e.absolutePath}:${e.lineNumber}:${e.columnNumber||1}`;return(i=this.predictedLocations.get(r))!=null?i:[]}};ac=k([(0,Jt.injectable)(),A(0,(0,Jt.inject)(Ps)),A(1,(0,Jt.inject)(_s)),A(2,(0,Jt.inject)(fe)),A(3,(0,Jt.inject)(vo))],ac);var Rs=S(Y());var Dv=class{constructor(e=!1,r=!1){this.verified=e;this.hit=r}},Pv=class{constructor(){this._statisticsById=new Map}registerBreakpoints(e){e.forEach(r=>{r.id!==void 0&&!this._statisticsById.has(r.id)&&this._statisticsById.set(r.id,new Dv(r.verified,!1))})}registerResolvedBreakpoint(e){this.getStatistics(e).verified=!0}registerBreakpointHit(e){this.getStatistics(e).hit=!0}getStatistics(e){let r=this._statisticsById.get(e);if(r!==void 0)return r;{let i=new Dv;return this._statisticsById.set(e,i),i}}statistics(){let e=0,r=0,i=0;for(let n of this._statisticsById.values())e++,n.hit&&i++,n.verified&&r++;return{set:e,verified:r,hit:i}}};var Hp=S(Y());var RN=require("crypto"),MN=S(sv()),tm=S(Y());var Mne=0,Mt=Symbol("ICdpApi"),cc=class extends Error{constructor(r){super("<<message>>");this.method=r}setCause(r,i){var n;return this.cause={code:r,message:i},this.message=`CDP error ${r} calling method ${this.method}: ${i}`,this.stack=(n=this.stack)==null?void 0:n.replace("<<message>>",this.message),this}},Yt=class{constructor(e,r,i){this.logger=r;this.telemetryReporter=i;this._connectionId=Mne++;this._lastId=1e3;this._disposedSessions=new Map;this._onDisconnectedEmitter=new X;this.waitWrapper=Nne();this.onDisconnected=this._onDisconnectedEmitter.event;this._transport=e,this._transport.onMessage(([n,s])=>this._onMessage(n,s)),this._transport.onEnd(()=>this._onTransportClose()),this._sessions=new Map,this._closed=!1,this._rootSession=new Lv(this,"",this.logger),this._sessions.set("",this._rootSession)}rootSession(){return this._rootSession.cdp()}_send(e,r={},i){let n=++this._lastId,s={id:n,method:e,params:r};i&&(s.sessionId=i);let o=JSON.stringify(s);return this.logger.verbose("cdp.send",void 0,{connectionId:this._connectionId,message:s}),this._transport.send(o),n}_onMessage(e,r){let i=JSON.parse(e),n=i;i.result&&i.result.scriptSource?n={...i,result:{...i.result,scriptSource:"<script source>"}}:i.method==="Debugger.scriptParsed"&&i.params&&_r(i.params.sourceMapURL)&&(n={...i,params:{...i.params,sourceMapURL:"<data source map url>"}}),this.logger.verbose("cdp.receive",void 0,{connectionId:this._connectionId,message:n});let s=this._sessions.get(i.sessionId||"");if(!s){let u=this._disposedSessions.get(i.sessionId);if(u){let c=(Date.now()-u.getTime())/1e3;this.logger.warn("internal",`Got message for a session disposed ${c} seconds ago`,{sessionId:i.sessionId,disposeOn:u});return}else throw new Error(`Unknown session id: ${i.sessionId} while processing: ${i.method}`)}let o=i.method,a;try{s._onMessage(i)}catch(u){a=u}o&&this.telemetryReporter.reportOperation("cdpOperation",o,r.elapsed().ms,a)}_onTransportClose(){if(!this._closed){this._closed=!0,this._transport.dispose(),this.logger.info("cdp.receive","Connection closed",{connectionId:this._connectionId});for(let e of this._sessions.values())e._onClose();this._sessions.clear(),this._onDisconnectedEmitter.fire()}}close(){this._onTransportClose()}isClosed(){return this._closed}createSession(e){let r=new Lv(this,e,this.logger);return this._sessions.set(e,r),r.cdp()}disposeSession(e){let r=this._sessions.get(e);r&&(r._onClose(),this._disposedSessions.set(r.sessionId(),new Date),this._sessions.delete(r.sessionId()))}},One=+process.version.substring(1).split(".")[0]<11,Lv=class{constructor(e,r,i){this.logger=i;this._queue=[];this._prefixListeners=new _h;this._directListeners=new _h;this.paused=!1;this._callbacks=new Map,this._connection=e,this._sessionId=r,this._cdp=this._createApi()}pause(){this.paused=!0}resume(){if(!this.paused)return;this.paused=!1;let e=this._queue;this._queue=[],this.logger.verbose("cdp.receive","Dequeue messages",{message:e});for(let r of e)this._processResponse(r)}cdp(){return this._cdp}sessionId(){return this._sessionId}_createApi(){return new Proxy({},{get:(e,r)=>r==="pause"?()=>this.pause():r==="resume"?()=>this.resume():r==="session"?this:new Proxy({},{get:(i,n)=>{if(n!=="then")return n==="on"?(s,o)=>this.on(`${r}.${s}`,o):s=>this.send(`${r}.${n}`,s)}})})}on(e,r){return this._directListeners.listen(e,r)}onPrefix(e,r){return this._prefixListeners.listen(e,r)}send(e,r={}){return this.sendOrDie(e,r).catch(()=>{})}sendOrDie(e,r={}){if(!this._connection)return Promise.reject(new cc(e).setCause(0,"Connection is closed"));let i=this._connection._send(e,r,this._sessionId);return new Promise((n,s)=>{this._callbacks.set(i,{resolve:n,reject:s,from:new cc(e),method:e})})}_onMessage(e){if(this.paused&&e.id){this._processResponse(e);return}if(this._queue.length>0){this._queue.push(e);return}if(!One&&!this.paused){this._processResponse(e);return}this._queue.push(e),this.paused||this._processQueue()}_processQueue(){var e;(e=this._connection)==null||e.waitWrapper(()=>{if(this.paused)return;let r=this._queue.shift();r&&(this._processResponse(r),this._queue.length&&this._processQueue())})}_processResponse(e){if(e.id===void 0){let i=e;this._directListeners.emit(i.method,i.params);for(let[n,s]of this._prefixListeners.listeners)i.method.startsWith(n)&&s.fire(i);return}let r=this._callbacks.get(e.id);r&&(this._callbacks.delete(e.id),"error"in e?r.reject(r.from.setCause(e.error.code,e.error.message)):"result"in e&&r.resolve(e.result))}async detach(){if(!this._connection)throw new Error("Session already detached. Most likely the target has been closed.");this._connection._send("Target.detachFromTarget",{},this._sessionId)}isClosed(){return!this._connection}_onClose(){for(let e of this._callbacks.values())e.reject(e.from.setCause(0,"Connection is closed"));this._callbacks.clear(),this._connection=void 0}};function Nne(){if(parseInt(process.versions.node,10)>=11)return setImmediate;let t=!1,e=[],r=()=>{let i=e.shift();if(!i){t=!1;return}setImmediate(r),i()};return i=>{e.push(i),t||(t=!0,setImmediate(r))}}var em=S(Y());var xN=S(Se()),Fn=S(Y()),DN=S(QE()),PN=require("path"),nS=S(Uy()),LN=require("url");var ap=Symbol("IContainer"),Ls=Symbol("StoragePath"),gi=Symbol("IInitializeParams"),an=Symbol("VSCodeApi"),up=Symbol("IsVSCode"),It=Symbol("ExtensionContext"),tS=Symbol("ProcessEnv"),Yh=Symbol("execa"),Ie=Symbol("FS"),Ts="ExtensionLocation",lc=Symbol("IBrowserFinder"),cp=Symbol("SessionSubStates"),eS=new WeakMap,xt=(t,e)=>{if(!(typeof e=="object"&&e&&"dispose"in e))return e;let r=e,i=eS.get(t.container);return i?i.push(r):eS.set(t.container,[r]),e},Tv=t=>{var e;(e=eS.get(t))==null||e.forEach(r=>r.dispose())},Hi=Symbol("IExtensionContribution");var kv=S(Y());var wN=S(require("fs")),$v=S(require("path")),_N=t=>{let e={};f(e);function r(g,H){return t({category:"telemetry",output:g,data:H})}let i=g=>r("js-debug/dap/operation",{...e,...g}),n=g=>r("js-debug/cdp/operation",{...e,...g}),s=g=>r("js-debug/error",{...e,...g}),o=g=>{e.browser=(g.targetProject||g.targetProject)+"/"+g.targetVersion,r("js-debug/browserVersion",{...e,...g})},a=g=>r("js-debug/breakpointStats",{...e,...g}),u=g=>r("js-debug/statistics",{...e,...g}),c=g=>{e.nodeVersion=g.version,r("js-debug/nodeRuntime",{...e,...g})},l=g=>{r("js-debug/launch",{...e,...g,parameters:JSON.stringify(g.parameters)})},p=g=>{r("js-debug/diagnosticPrompt",{...e,...g})};function f(g){try{let H=$v.resolve($v.dirname(__filename),"..","..",".gitcommit");g.jsDebugCommitId=wN.readFileSync(H,"utf8")}catch(H){}}return{breakpointStats:a,statistics:u,browserVersion:o,cdpOperation:n,dapOperation:i,error:s,launch:l,nodeRuntime:c,diagnosticPrompt:p,setGlobalMetric:(g,H)=>{e[g]=H}}};var Qh=class{constructor(e=!0){this.isVSCode=e;this.measurements=Object.create(null)}add(e,r,i){let n=this.measurements[e];n||(n=this.measurements[e]={times:[],errors:[]}),n.times.push(r),i&&n.errors.push(i)}flush(){let e={errors:[]};for(let r in this.measurements){let{times:i,errors:n}=this.measurements[r],s={operation:r,totalTime:0,max:0,avg:0,stddev:0,count:i.length,failed:n.length};for(let o of i)s.totalTime+=o,s.max=Math.max(s.max,o);s.avg=s.totalTime/s.count;for(let o of i)s.stddev+=(o-s.avg)**2;s.stddev=Math.sqrt(s.stddev/(i.length-1)),e[s.operation]=s,e[`!${s.operation}.errors`]=n,this.isVSCode||(e[`${s.operation}.errors`]=n)}return this.measurements=Object.create(null),e}};var yi=class{constructor(e=!0){this.isVsCode=e;this.target=[];this.flushEmitter=new X;this.loggers=_N(e=>this.pushOutput(e));this.batchFlushTimeout={};this.batchers={dapOperation:new Qh(this.isVsCode),cdpOperation:new Qh(this.isVsCode)};this.onFlush=this.flushEmitter.event;this.setGlobalMetric=this.loggers.setGlobalMetric}report(e,...r){let i=this.loggers[e];i(...r)}reportOperation(e,r,i,n){this.batchers[e].add(r,i,n),this.batchFlushTimeout[e]===void 0&&(this.batchFlushTimeout[e]=setTimeout(()=>{this.report(e,this.batchers[e].flush()),this.batchFlushTimeout[e]=void 0},yi.batchFlushInterval))}attachDap(e){this.target instanceof Array&&this.target.forEach(r=>e.output(r)),this.target=e}flush(){this.flushEmitter.fire();let e=Object.entries(this.batchFlushTimeout);for(let[r,i]of e){let n=this.batchers[r].flush();n.length&&this.report(r,n),this.batchFlushTimeout[r]=void 0,clearTimeout(i)}}dispose(){for(let e of Object.values(this.batchFlushTimeout))e&&clearTimeout(e)}pushOutput(e){e.data=rS(e.data),this.target instanceof Array?this.target.push(e):this.target.output(e)}};yi.batchFlushInterval=5e3,yi=k([(0,kv.injectable)(),A(0,(0,kv.inject)(up))],yi);var rS=t=>typeof t=="number"?Number(t.toFixed(1)):typeof t!="object"||!t?t:t instanceof Error?iS(t):t instanceof Array?t.map(rS):ao(t,rS),AN=/(?:[A-z]:)?(?:[\\/][^:]*)+[\\/]([^:]*:)/g;function iS(t){let e=String(t.message),r=String(t.name);AN.lastIndex=0;let i=typeof t.stack=="string"?t.stack.replace(AN,"$1"):void 0;return{error:{message:e,name:r,stack:i}}}var Da=Symbol("IScriptSkipper");function IN(t){return typeof t.lineNumber=="number"&&typeof t.columnNumber=="number"&&!!t.source}var EN=()=>({source:null,line:null,column:null,name:null,lastColumn:null,isSourceMapLoadFailure:!0}),Fne=t=>t.endsWith(".hot-update.js"),Bne={load:0,resolveLocation:2e3,sourceMapMinPause:1e3,output:1e3,sourceMapCumulativePause:1e4},Zh=class{constructor(e,r,i,n,s,o,a,u){this.url=r;this.inlineScriptOffset=o;this.runtimeScriptOffset=a;this.contentHash=u;this._scripts=[];this.sourceReference=e.getSourceReference(r),this._contentGetter=Fe(n),this._container=e,this.absolutePath=i||"",this._fqname=this._fullyQualifiedName(),this._name=this._humanName(),this.setSourceMapUrl(s),this._existingAbsolutePath=QO(this.absolutePath,o||a?void 0:u,e._fileContentOverridesForTest.get(this.absolutePath))}setSourceMapUrl(e){if(!e){this.sourceMap=void 0;return}this.sourceMap={url:e,sourceByUrl:new Map,metadata:{sourceMapUrl:e,compiledPath:this.absolutePath||this.url}}}addScript(e){this._scripts.push(e)}filterScripts(e){this._scripts=this._scripts.filter(e)}get scripts(){return this._scripts}get getSuggestedMimeType(){if(!/\.[^/]+$/.test(this.url))return"text/javascript"}async content(){var r;let e=await this._contentGetter();return(r=this.inlineScriptOffset)!=null&&r.lineOffset&&(e=`
`.repeat(this.inlineScriptOffset.lineOffset)+e),e}async prettyPrint(){var c,l;if(!this._container)return;if(ei(this)&&this.sourceMap.url.endsWith("-pretty.map")){let p=(l=this._container._sourceMaps.get((c=this.sourceMap)==null?void 0:c.url))==null?void 0:l.map;return p&&{map:p,source:[...this.sourceMap.sourceByUrl.values()][0]}}let e=await this.content();if(!e)return;let r=this.url||`eval://${this.sourceReference}.js`,i=r+"-pretty.map",s=r.split(/[\/\\]/).pop()+"-pretty.js",o=await JO(s,e,r,i);if(!o)return;this.setSourceMapUrl(i);let a=this,u={compiled:new Set([a]),map:o,loaded:Promise.resolve()};return this._container._sourceMaps.set(i,u),await this._container._addSourceMapSources(a,o),{map:o,source:[...a.sourceMap.sourceByUrl.values()][0]}}async toDap(){return this.toDapShallow()}async toDapShallow(){let e=await this._existingAbsolutePath,r={name:this._name,path:this._fqname,sourceReference:this.sourceReference,presentationHint:this.blackboxed()?"deemphasize":void 0,origin:this.blackboxed()?xN.t("Skipped by skipFiles"):void 0};return e&&(r.sourceReference=0,r.path=e),r}existingAbsolutePath(){return this._existingAbsolutePath}async prettyName(){let e=await this._existingAbsolutePath;return e||this._fqname}_humanName(){if(jr(this._fqname)){for(let e of this._container.rootPaths)if(Ly(e,this._fqname))return qe((0,PN.relative)(e,this._fqname))}return this._fqname}_fullyQualifiedName(){var i;if(!this.url)return"<eval>/VM"+this.sourceReference;if(this.url.endsWith(".repl"))return"repl";if(this.absolutePath.startsWith("<node_internals>"))return this.absolutePath;if(jr(this.url))return this.url;let e=mt(this.url);if(e)return e;let r=this.url;try{let n=[],s=new LN.URL(this.url);if(s.protocol==="data:")return"<eval>/VM"+this.sourceReference;s.hostname&&n.push(s.hostname),s.port&&n.push("\uA789"+s.port),s.pathname&&n.push(/^\/[a-z]:/.test(s.pathname)?s.pathname.slice(1):s.pathname);let o=(i=s.searchParams)==null?void 0:i.toString();o&&n.push("?"+o),r=n.join("")}catch(n){}return r.endsWith("/")&&(r+="(index)"),this.inlineScriptOffset&&(r+=`\uA789${this.inlineScriptOffset.lineOffset+1}:${this.inlineScriptOffset.columnOffset+1}`),r}blackboxed(){return this._container.isSourceSkipped(this.url)}},rr=class extends Zh{constructor(){super(...arguments);this.compiledToSourceUrl=new Map}},ei=t=>!!t&&t instanceof Zh&&!!t.sourceMap,SN=(t,e)=>e instanceof rr&&e.compiledToSourceUrl.has(t);var CN=2**31-1,fr=class{constructor(e,r,i,n,s,o,a,u){this.sourceMapFactory=r;this.logger=i;this.launchConfig=n;this.initializeConfig=s;this.sourcePathResolver=o;this.scriptSkipper=a;this.resourceProvider=u;this.rootPaths=[];this.scriptsById=new Map;this.onSourceMappedSteppingChangeEmitter=new X;this.onScriptEmitter=new X;this._sourceByOriginalUrl=new Es(e=>e.toLowerCase());this._sourceByReference=new Map;this._sourceMapSourcesByUrl=new Map;this._sourceByAbsolutePath=sc();this._sourceMaps=new Map;this._sourceMapTimeouts=Bne;this._fileContentOverridesForTest=new Map;this._temporarilyDisabledSourceMaps=new Set;this._permanentlyDisabledSourceMaps=new Set;this.onScript=this.onScriptEmitter.event;this._statistics={fallbackSourceMapCount:0};this._doSourceMappedStepping=this.launchConfig.sourceMaps;this.onSourceMappedSteppingChange=this.onSourceMappedSteppingChangeEmitter.event;this._dap=e;let c="webRoot"in n?n.webRoot:n.rootPath;c&&(this.rootPaths=[c,Pi(c,"..","ClientApp")]),a.setSourceContainer(this),this.setSourceMapTimeouts({...this.sourceMapTimeouts(),...n.timeouts})}get sources(){return this._sourceByReference.values()}statistics(){return this._statistics}get doSourceMappedStepping(){return this._doSourceMappedStepping}set doSourceMappedStepping(e){e!==this._doSourceMappedStepping&&(this._doSourceMappedStepping=e,this.onSourceMappedSteppingChangeEmitter.fire(e))}setSourceMapTimeouts(e){this._sourceMapTimeouts=e}sourceMapTimeouts(){return this._sourceMapTimeouts}setFileContentOverrideForTest(e,r){r===void 0?this._fileContentOverridesForTest.delete(e):this._fileContentOverridesForTest.set(e,r)}async loadedSources(){let e=[];for(let r of this._sourceByReference.values())e.push(r.toDap());return await Promise.all(e)}source(e){if(e.sourceReference)return this._sourceByReference.get(e.sourceReference);if(e.path)return this._sourceByAbsolutePath.get(e.path)}isSourceSkipped(e){return this.scriptSkipper.isScriptSkipped(e)}addScriptById(e){this.scriptsById.set(e.scriptId,e),this.onScriptEmitter.fire(e)}getScriptById(e){return this.scriptsById.get(e)}getSourceByOriginalUrl(e){return this._sourceByOriginalUrl.get(e)}getSourceReference(e){let r=(0,DN.xxHash32)(e)&CN;for(let i=0;i<65535;i++){if(!this._sourceByReference.has(r))return r;r===CN&&(r=0),r++}return this.logger.assert(!1,"Max iterations exceeding for source reference assignment"),r}async preferredUiLocation(e){let r=!1,i=4;if(this._doSourceMappedStepping)for(;ei(e.source);){let n=this._sourceMaps.get(e.source.sourceMap.url);if(!this.logger.assert(n,`Expected to have sourcemap for loaded source ${e.source.sourceMap.url}`))break;if(await Promise.race([n.loaded,Oe(this._sourceMapTimeouts.resolveLocation)]),!n.map)return{...e,isMapped:r,unmappedReason:i};let s=this._sourceMappedUiLocation(e,n.map);if(!IN(s)){i=r?void 0:s;break}e=s,r=!0,i=void 0}return{...e,isMapped:r,unmappedReason:i}}currentSiblingUiLocations(e,r){return this._uiLocations(e).filter(i=>!r||i.source===r)}clear(e){this.scriptsById.clear();for(let r of this._sourceByReference.values())this.removeSource(r,e);this._sourceByReference.clear(),this.sourceMapFactory instanceof Ca&&this.sourceMapFactory.invalidateCache()}_uiLocations(e){return[...this.getSourceMapUiLocations(e),e,...this.getCompiledLocations(e)]}getSourceMapUiLocations(e){var s;if(!ei(e.source)||!this._doSourceMappedStepping)return[];let r=(s=this._sourceMaps.get(e.source.sourceMap.url))==null?void 0:s.map;if(!r)return[];let i=this._sourceMappedUiLocation(e,r);if(!IN(i))return[];let n=this.getSourceMapUiLocations(i);return n.push(i),n}_sourceMappedUiLocation(e,r){let i=e.source;if(!ei(i))return 1;if(this._temporarilyDisabledSourceMaps.has(i)||this._permanentlyDisabledSourceMaps.has(i))return 0;let n=this.getOptiminalOriginalPosition(r,pc(e,i.inlineScriptOffset));if("isSourceMapLoadFailure"in n)return 2;if(!n.source)return 3;let s=i.sourceMap.sourceByUrl.get(n.source);return s?{lineNumber:n.line||1,columnNumber:n.column?n.column+1:1,source:s}:3}getCompiledLocations(e){if(!(e.source instanceof rr))return[];let r=[];for(let[i,n]of e.source.compiledToSourceUrl){let s=this._sourceMaps.get(i.sourceMap.url);if(!s||!s.map)continue;let o=this.sourceMapFactory.guardSourceMapFn(s.map,()=>Hv(n,e,s.map),EN);if(!o)continue;let{lineNumber:a,columnNumber:u}=Pa({lineNumber:o.line||1,columnNumber:(o.column||0)+1},i.inlineScriptOffset),c={lineNumber:a,columnNumber:u,source:i};r=r.concat(c,this.getCompiledLocations(c))}return r}getOptiminalOriginalPosition(e,r){return this.sourceMapFactory.guardSourceMapFn(e,()=>{let i=e.originalPositionFor({line:r.lineNumber,column:r.columnNumber-1,bias:nS.SourceMapConsumer.GREATEST_LOWER_BOUND});return i.line!==null?i:e.originalPositionFor({line:r.lineNumber,column:r.columnNumber-1,bias:nS.SourceMapConsumer.LEAST_UPPER_BOUND})},EN)}async addSource(e,r,i,n,s,o){let a=await this.sourcePathResolver.urlToAbsolutePath({url:e});this.logger.verbose("runtime.sourcecreate","Creating source from url",{inputUrl:e,absolutePath:a});let u=new Zh(this,e,a,r,i&&this.sourcePathResolver.shouldResolveSourceMap({sourceMapUrl:i,compiledPath:a||e})?i:void 0,n,s,o);return this._addSource(u),u}async _addSource(e){let r=e.url&&this._sourceByOriginalUrl.get(e.url);r&&!SN(r,e)&&this.removeSource(r,!0),this._sourceByOriginalUrl.set(e.url,e),this._sourceByReference.set(e.sourceReference,e),e instanceof rr&&this._sourceMapSourcesByUrl.set(e.url,e);let i=this._sourceByAbsolutePath.get(e.absolutePath);if((i===void 0||i.url.length>=e.url.length||SN(i,e))&&this._sourceByAbsolutePath.set(e.absolutePath,e),this.scriptSkipper.initializeSkippingValueForSource(e),e.toDap().then(u=>this._dap.loadedSource({reason:"new",source:u})),!ei(e))return;let n=this._sourceMaps.get(e.sourceMap.url);if(n){n.compiled.add(e),n.map&&await this._addSourceMapSources(e,n.map);return}let s=Je(),o={compiled:new Set([e]),loaded:s.promise};this._sourceMaps.set(e.sourceMap.url,o);try{o.map=await this.sourceMapFactory.load(e.sourceMap.metadata)}catch(u){if(this.initializeConfig.clientID==="visualstudio"){let c=e.sourceMap.metadata.sourceMapUrl;try{let l=await this.sourcePathResolver.urlToAbsolutePath({url:c});l&&(e.sourceMap.metadata.sourceMapUrl=Qe(l)),o.map=await this.sourceMapFactory.load(e.sourceMap.metadata),this._statistics.fallbackSourceMapCount++,this.logger.info("sourcemap.parsing","Failed to process original source-map; falling back to storage source-map",{fallbackSourceMapUrl:e.sourceMap.metadata.sourceMapUrl,originalSourceMapUrl:c,originalSourceMapError:iS(u)})}catch(l){}}if(!o.map)return this._dap.output({output:Vy(e.url,u.message).error.format+`
`,category:"stderr"}),s.resolve()}if(this._sourceMaps.get(e.sourceMap.url)!==o)return s.resolve();this.logger.verbose("sourcemap.parsing","Creating sources from source map",{sourceMapId:o.map.id,metadata:o.map.metadata});let a=[];for(let u of o.compiled)a.push(this._addSourceMapSources(u,o.map));await Promise.all(a),this.scriptSkipper.initializeSkippingValueForSource(e),s.resolve()}removeSource(e,r=!1){let i=this._sourceByReference.get(e.sourceReference);if(i===void 0)return;if(this.logger.assert(e===i,"Expected source to be the same as the existing reference"),this._sourceByReference.delete(e.sourceReference),this._sourceByOriginalUrl.get(e.url)===e&&this._sourceByOriginalUrl.delete(e.url),e instanceof rr){this._sourceMapSourcesByUrl.delete(e.url);for(let[s,o]of e.compiledToSourceUrl)s.sourceMap.sourceByUrl.delete(o)}if(this._sourceByAbsolutePath.delete(e.absolutePath),ei(e)&&(this._permanentlyDisabledSourceMaps.delete(e),this._temporarilyDisabledSourceMaps.delete(e)),r||e.toDap().then(s=>this._dap.loadedSource({reason:"removed",source:s})),!ei(e))return;let n=this._sourceMaps.get(e.sourceMap.url);this.logger.assert(n,`Source map missing for ${e.sourceMap.url} in removeSource()`)&&(this.logger.assert(n.compiled.has(e),`Source map ${e.sourceMap.url} does not contain source ${e.url}`),n.compiled.delete(e),n.compiled.size||(n.map&&n.map.destroy(),this._sourceMaps.delete(e.sourceMap.url)),n.map&&this._removeSourceMapSources(e,n.map,r))}async _addSourceMapSources(e,r){let i=[];for(let n of r.sources){let s=await this.sourcePathResolver.urlToAbsolutePath({url:n,map:r}),o=s?Qe(s):r.computedSourceUrl(n),a=this._sourceMapSourcesByUrl.get(o);if(e===a)continue;if(a)if(Fne(e.url))this.removeSource(a);else{a.compiledToSourceUrl.set(e,n),e.sourceMap.sourceByUrl.set(n,a);continue}this.logger.verbose("runtime.sourcecreate","Creating source from source map",{inputUrl:n,sourceMapId:r.id,absolutePath:s,resolvedUrl:o});let u=s&&Qe(s),c=this.sourceMapFactory.guardSourceMapFn(r,()=>r.sourceContentFor(n,!0),()=>null),l;if(c){let f=zl(c);if(f&&(!_r(f)&&s?l=_a(s?Qe(s):n,f):l=f),s&&l){let h={sourceMapUrl:l,compiledPath:s};this.sourcePathResolver.shouldResolveSourceMap(h)||(l=void 0)}}let p=new rr(this,o,s,c!==null?()=>Promise.resolve(c):u?()=>this.resourceProvider.fetch(u).then(f=>f.body):()=>e.content(),l,void 0,e.runtimeScriptOffset);p.compiledToSourceUrl.set(e,n),e.sourceMap.sourceByUrl.set(n,p),i.push(this._addSource(p))}await Promise.all(i)}_removeSourceMapSources(e,r,i){for(let n of r.sources){let s=e.sourceMap.sourceByUrl.get(n);s&&(e.sourceMap.sourceByUrl.delete(n),s.compiledToSourceUrl.delete(e),!s.compiledToSourceUrl.size&&this.removeSource(s,i))}}async waitForSourceMapSources(e){if(!ei(e))return[];let r=this._sourceMaps.get(e.sourceMap.url);return this.logger.assert(r,"Unrecognized source map url in waitForSourceMapSources()")?(await r.loaded,[...e.sourceMap.sourceByUrl.values()]):[]}async revealUiLocation(e){this._dap.revealLocationRequested({source:await e.source.toDap(),line:e.lineNumber,column:e.columnNumber})}disableSourceMapForSource(e,r=!1){r?this._permanentlyDisabledSourceMaps.add(e):this._temporarilyDisabledSourceMaps.add(e)}clearDisabledSourceMaps(e){e?this._temporarilyDisabledSourceMaps.delete(e):this._temporarilyDisabledSourceMaps.clear()}};fr=k([(0,Fn.injectable)(),A(0,(0,Fn.inject)(rn)),A(1,(0,Fn.inject)(vo)),A(2,(0,Fn.inject)(fe)),A(3,(0,Fn.inject)(Ke)),A(4,(0,Fn.inject)(gi)),A(5,(0,Fn.inject)(ut)),A(6,(0,Fn.inject)(Da)),A(7,(0,Fn.inject)(Zu))],fr);function Pa(t,e){if(!e)return t;let{lineNumber:r,columnNumber:i}=t;return e&&(r+=e.lineOffset,r<=1&&(i+=e.columnOffset)),{...t,lineNumber:r,columnNumber:i}}function pc(t,e){if(!e)return t;let{lineNumber:r,columnNumber:i}=t;return e&&(r=Math.max(1,r-e.lineOffset),r<=1&&(i=Math.max(1,i-e.columnOffset))),{...t,lineNumber:r,columnNumber:i}}var TN=t=>({lineNumber:t.lineNumber+1,columnNumber:t.columnNumber+1}),La=t=>({lineNumber:t.lineNumber-1,columnNumber:t.columnNumber-1});var lp=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return this}get base1(){return new Ri(this.lineNumber+1,this.columnNumber+1)}get base01(){return new pp(this.lineNumber,this.columnNumber+1)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},Ri=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new lp(this.lineNumber-1,this.columnNumber-1)}get base1(){return this}get base01(){return new pp(this.lineNumber-1,this.columnNumber)}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}},pp=class{constructor(e,r){this.lineNumber=e;this.columnNumber=r}get base0(){return new lp(this.lineNumber-1,this.columnNumber)}get base1(){return new Ri(this.lineNumber,this.columnNumber+1)}get base01(){return this}compare(e){return this.lineNumber-e.lineNumber||this.columnNumber-e.columnNumber||0}};var $N=/[$a-z_][$0-9A-Z_$]*/iy,Ta=Symbol("IRenameProvider"),fp=class{constructor(e,r){this.sourceMapFactory=e;this.launchConfig=r;this.renames=new Map}provideOnStackframe(e){if(!this.launchConfig.sourceMapRenames)return Bn.None;let r=e.uiLocation();return r===void 0?Bn.None:"then"in r?r.then(i=>this.provideForSource(i==null?void 0:i.source)):this.provideForSource(r==null?void 0:r.source)}provideForSource(e){if(!this.launchConfig.sourceMapRenames||!(e instanceof rr))return Bn.None;let r=e.compiledToSourceUrl.keys().next().value;if(!r)throw new Error("unreachable");let i=this.renames.get(r.url);if(i)return i;let n=this.sourceMapFactory.load(r.sourceMap.metadata).then(async s=>{if(!(s!=null&&s.hasNames))return Bn.None;let o=await r.content();return o?this.createFromSourceMap(s,o):Bn.None}).catch(()=>Bn.None);return this.renames.set(r.url,n),n}createFromSourceMap(e,r){let i=new Aa(r),n=[];return e.eachMapping(s=>{if(!s.name)return;let o=new pp(s.generatedLine,s.generatedColumn),a=i.convert(o);$N.lastIndex=a;let u=$N.exec(r);u&&n.push({compiled:u[0],original:s.name,position:o})}),n.sort((s,o)=>s.position.compare(o.position)),new Bn(n)}};fp=k([(0,em.injectable)(),A(0,(0,em.inject)(vo)),A(1,(0,em.inject)(Ke))],fp);var sS=class{constructor(e){this.renames=e}getOriginalName(e,r){var i;return(i=this.getClosestRename(r,n=>n.compiled===e))==null?void 0:i.original}getCompiledName(e,r){var i;return(i=this.getClosestRename(r,n=>n.original===e))==null?void 0:i.compiled}getClosestRename(e,r){let i=e.base01,n;for(let s of this.renames){if(!r(s))continue;if(!(s.position.compare(i)<0)&&n)return n;n=s}return n}},Bn=sS;Bn.None=new sS([]);var bo="$returnValue",Une="__js_debug_hoisted_",kN=()=>Une+(0,RN.randomBytes)(8).toString("hex"),un=Symbol("IEvaluator"),dp=class{constructor(e,r){this.cdp=e;this.renameProvider=r}get hasReturnValue(){return!!this.returnValue}setReturnedValue(e){this.returnValue=e}prepare(e,{isInternalScript:r,hoist:i,renames:n}={}){r!==!1&&(e+=Rt());let s=new Map;s.set(bo,kN());for(let u of i!=null?i:[])s.set(u,kN());let{transformed:o,hoisted:a}=this.replaceVariableInExpression(e,s,n);return a.size?{canEvaluateDirectly:!1,invoke:(u,c={})=>Promise.all([...s].map(([l,p])=>this.hoistValue(l===bo?this.returnValue:c[l],p))).then(()=>this.cdp.Debugger.evaluateOnCallFrame({...u,expression:o}))}:{canEvaluateDirectly:!0,invoke:u=>this.cdp.Debugger.evaluateOnCallFrame({...u,expression:o})}}async evaluate(e,r){if(!("callFrameId"in e))return this.cdp.Runtime.evaluate(e);let i=r;if(r!=null&&r.stackFrame){let n=await this.renameProvider.provideOnStackframe(r.stackFrame);i={...i,renames:{mapping:n,position:r.stackFrame.rawPosition}}}return this.prepare(e.expression,i).invoke(e)}async hoistValue(e,r){let i=e==null?void 0:e.objectId,n=`setTimeout(() => { delete globalThis.${r} }, 0)`;i?await this.cdp.Runtime.callFunctionOn({objectId:i,functionDeclaration:`function() { globalThis.${r} = this; ${n}; ${Rt()} }`}):await this.cdp.Runtime.evaluate({expression:`globalThis.${r} = ${JSON.stringify(e==null?void 0:e.value)};${n};`+Rt()})}replaceVariableInExpression(e,r,i){let n=new Set,s=!1,o=(p,f)=>({type:"ConditionalExpression",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:p}},operator:"!==",right:{type:"Literal",value:"undefined"}},consequent:{type:"Identifier",name:p},alternate:f}),a=[],u=ba(e),c=(0,MN.replace)(u,{enter(p,f){let h=p;if(p.type!=="Identifier"||e[h.start-1]===".")return;let g=r.get(p.name);if(g)return n.add(p.name),s=!0,this.skip(),UE(p,f)?{type:"Identifier",name:g}:o(g,jne);let H=i==null?void 0:i.mapping.getCompiledName(p.name,i.position);if(H)return s=!0,this.skip(),UE(p,f)?{type:"Identifier",name:H}:o(H,p)},leave:()=>{a.pop()}});if(!s)return{hoisted:n,transformed:e};let l=u.body[u.body.length-1].end;return{hoisted:n,transformed:Ho(c)+e.slice(l)}}};dp=k([(0,tm.injectable)(),A(0,(0,tm.inject)(Mt)),A(1,(0,tm.inject)(Ta))],dp);var jne={type:"Identifier",name:"undefined"};var hp=class{static parse(e,r,i,n){i&&(r=oS(r));let s=r&&wa(r);if(s)throw new ne(ga(e,s.message));let{canEvaluateDirectly:o,invoke:a}=n.prepare(r);return new hp(o?r:a)}constructor(e){typeof e=="function"?this.invoke=e:this.breakCondition=e}async shouldStayPaused(e){if(!this.invoke)return Promise.resolve(!0);let r=await this.invoke({callFrameId:e.callFrames[0].callFrameId,returnByValue:!0});return(r==null?void 0:r.result.value)===!0}},oS=t=>`(()=>{try{return ${t};}catch(e){console.error(e);return true}})()`;var qne=/^(>|>=|={1,3}|<|<=|%)?\s*([0-9]+)$/,$a=class{constructor(e){this.predicate=e;this.hits=0;this.breakCondition=void 0}shouldStayPaused(){return Promise.resolve(this.predicate(++this.hits))}static parse(e){let r=qne.exec(e);if(!r)throw new ne(EM(e));let[,i,n]=r,s=i==="%"?`return (numHits % ${n}) === 0;`:i[0]==="="?`return numHits === ${n};`:`return numHits ${i} ${n};`;return new $a(new Function("numHits",s))}};var ON=require("crypto"),Mv=S(Y());var Rv=class{constructor(e){this.invoke=e;this.breakCondition=void 0}async shouldStayPaused(e){return await this.invoke({callFrameId:e.callFrames[0].callFrameId}),!1}};var mp=class{constructor(e,r){this.breakCondition=r;let i=r&&wa(r);if(i)throw new ne(ga(e,i.message))}shouldStayPaused(){return Promise.resolve(!0)}};var ka=class{constructor(e){this.evaluator=e}compile(e,r){let i=this.logMessageToExpression(r),n=wa(i);if(n)throw new ne(ga(e,n.message));let{canEvaluateDirectly:s,invoke:o}=this.evaluator.prepare(i);return s?new mp(e,this.logMessageToExpression(r)):new Rv(o)}serializeLogStatements(e){return VO([],e,!1)}logMessageToExpression(e){let r=c=>c.replace(/%/g,"%%"),i=[],n=[],s=0;for(;;){let c=e.indexOf("{",s);if(c===-1){i.push(r(e.slice(s)));break}i.push(r(e.slice(s,c)));let[l]=mv(e.slice(c));if(s=c+l.end,s-1===c+1||e[s-1]!=="}"){i.push(r(e.slice(c,s)));continue}if(l.type!=="BlockStatement")break;n.push(Ho(this.serializeLogStatements(l.body))),i.push("%O")}let a=`console.log(${[JSON.stringify(i.join("")),...n].join(", ")}), false`,u=(0,ON.createHash)("sha1").update(a).digest("hex").slice(0,7);return a+`
//# sourceURL=logpoint-${u}.cdp`}};ka=k([(0,Mv.injectable)(),A(0,(0,Mv.inject)(un))],ka);var Wne=new mp({line:0},void 0),Ov=Symbol("IBreakpointConditionFactory"),gp=class{constructor(e,r,i){this.logPointCompiler=e;this.evaluator=r;this.breakOnError=i.__breakOnConditionalError}getConditionFor(e){return e.condition?hp.parse(e,e.condition,this.breakOnError,this.evaluator):e.logMessage?this.logPointCompiler.compile(e,e.logMessage):e.hitCondition?$a.parse(e.hitCondition):Wne}};gp=k([(0,Hp.injectable)(),A(0,(0,Hp.inject)(ka)),A(1,(0,Hp.inject)(un)),A(2,(0,Hp.inject)(Ke))],gp);var Bv=require("path");var Nv=(t,e)=>t.lineNumber===e.lineNumber&&t.columnNumber===e.columnNumber;var Fv=t=>!("location"in t),NN=t=>"location"in t,FN=(t,e)=>t.url&&e===t.url||t.urlRegex&&new RegExp(t.urlRegex).test(e),yp=class{constructor(e,r,i){this._manager=e;this._source=r;this._originalPosition=i;this.isEnabled=!1;this.setInCdpScriptIds=new Set;this.cdpScriptIds=this.setInCdpScriptIds;this.cdpBreakpoints=[];this._cdpIds=new Set}get enabled(){return this.isEnabled}get cdpIds(){return this._cdpIds}get source(){return this._source}get originalPosition(){return this._originalPosition}async updateSourceLocation(e,r){this._source=e,this._originalPosition=r,this.updateCdpRefs(i=>i.map(n=>n.state===1?{...n,uiLocations:this._manager._sourceContainer.currentSiblingUiLocations(r)}:n))}async refreshUiLocations(e){await Promise.all(this.cdpBreakpoints.filter(r=>r.state===1).map(r=>this.updateUiLocations(e,r.cdpId,r.locations)))}async enable(e){if(this.isEnabled)return;this.isEnabled=!0;let r=[this._setPredicted(e)],i=this._manager._sourceContainer.source(this.source);if((!i||!(i instanceof rr))&&r.push(this._setByPath(e,Pa(this.originalPosition,i==null?void 0:i.runtimeScriptOffset))),await Promise.all(r),i&&this.isEnabled){let n=this._manager._sourceContainer.currentSiblingUiLocations({lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber,source:i});await Promise.all(n.map(s=>this._setByUiLocation(e,Pa(s,i.runtimeScriptOffset))))}}async updateUiLocations(e,r,i){this.updateExistingCdpRef(r,o=>({...o,locations:i}));let n=(await Promise.all(i.map(o=>e.rawLocationToUiLocation(e.rawLocation(o))))).find(o=>!!o);if(!n)return;let s=this._manager._sourceContainer.source(this.source);s&&this.updateExistingCdpRef(r,o=>{let a=this._manager._sourceContainer.currentSiblingUiLocations(n),u=a.filter(c=>c.source===s);return{...o,locations:i,uiLocations:u.length?u:a}})}compare(e){let r=this.originalPosition,i=e.originalPosition;return r.lineNumber!==i.lineNumber?r.lineNumber-i.lineNumber:r.columnNumber-i.columnNumber}async disable(){if(!this.isEnabled)return;this.isEnabled=!1;let e=this.cdpBreakpoints.map(r=>this.removeCdpBreakpoint(r));await Promise.all(e)}async updateForSourceMap(e,r){let i=this._manager._sourceContainer.source(this.source);if(!i)return[];let n=this._manager._sourceContainer.currentSiblingUiLocations({lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber,source:i},await r.source);if(!n.length)return[];let s=[];for(let o of n)s.push(this._setByScriptId(e,r,Pa(o,i.runtimeScriptOffset)));for(let o of this.cdpBreakpoints){if(!Fv(o.args)||!this.breakpointIsForSource(o.args,i))continue;let a=o.args;n.some(u=>u.columnNumber-1===a.columnNumber&&u.lineNumber-1===a.lineNumber)||(this._manager.logger.verbose("runtime.sourcemap","Adjusted breakpoint due to overlaid sourcemap",{url:i.url}),s.push(this.removeCdpBreakpoint(o)))}return await Promise.all(s),n}executionContextWasCleared(){this.updateCdpRefs(e=>e.filter(r=>Fv(r.args)))}breakpointIsForSource(e,r){if(FN(e,r.url))return!0;let i=this._manager._sourceContainer.sourcePathResolver.rebaseLocalToRemote(r.absolutePath);return!!FN(e,i)}getBreakCondition(){}updateExistingCdpRef(e,r){this.updateCdpRefs(i=>i.map(n=>n.state!==1||n.cdpId!==e?n:r(n)))}updateCdpRefs(e){let r=this;r.cdpBreakpoints=e(this.cdpBreakpoints);let i=new Set;this.setInCdpScriptIds.clear();for(let n of this.cdpBreakpoints)if(n.state===1){i.add(n.cdpId);for(let s of n.locations)this.setInCdpScriptIds.add(s.scriptId)}this._cdpIds=i}async _setPredicted(e){if(!this.source.path||!this._manager._breakpointsPredictor)return;let r=this._manager._breakpointsPredictor.predictedResolvedLocations({absolutePath:this.source.path,lineNumber:this.originalPosition.lineNumber,columnNumber:this.originalPosition.columnNumber}),i=[];for(let n of r){let s=this._manager._sourceContainer.sourcePathResolver.absolutePathToUrlRegexp(n.absolutePath);s!==void 0&&(typeof s=="string"?i.push(this._setByUrlRegexp(e,s,n)):i.push(s.then(o=>o?this._setByUrlRegexp(e,o,n):void 0)))}await Promise.all(i)}async _setByUiLocation(e,r){await Promise.all(r.source.scripts.map(i=>this._setByScriptId(e,i,r)))}async _setByPath(e,r){let i=this._manager._sourceContainer.source({path:this.source.path});if(!(i instanceof rr&&[...i.compiledToSourceUrl.keys()].some(s=>s.absolutePath===this.source.path)))if(this.source.path){let n=await this._manager._sourceContainer.sourcePathResolver.absolutePathToUrlRegexp(this.source.path);if(!n)return;await this._setByUrlRegexp(e,n,r)}else{let n=this._manager._sourceContainer.source(this.source),s=n==null?void 0:n.url;if(!s)return;await this._setByUrl(e,s,r),this.source.path!==s&&this.source.path!==void 0&&await this._setByUrl(e,Qe(this.source.path),r)}}hasSetOnLocation(e,r){return this.cdpBreakpoints.find(i=>{var n;return e.scriptId&&NN(i.args)&&i.args.location.scriptId===e.scriptId&&Nv(i.args.location,r)||e.url&&Fv(i.args)&&new RegExp((n=i.args.urlRegex)!=null?n:"").test(e.url)&&Nv(i.args,r)})}hasSetOnLocationByRegexp(e,r){return this.cdpBreakpoints.find(i=>{if(Fv(i.args))return i.args.urlRegex===e&&Nv(i.args,r);let n=this._manager._sourceContainer.getScriptById(i.args.location.scriptId);if(n)return Nv(i.args.location,r)&&new RegExp(e).test(n.url)})}async _setByUrl(e,r,i){return this._setByUrlRegexp(e,mi(r),i)}async _setByUrlRegexp(e,r,i){i=La(i);let n=this.hasSetOnLocationByRegexp(r,i);if(n){n.state===0&&await n.done;return}return this._setAny(e,{urlRegex:r,condition:this.getBreakCondition(),...i})}async _setByScriptId(e,r,i){i=La(i);let n=this.hasSetOnLocation(r,i);if(n){n.state===0&&await n.done;return}return this._setAny(e,{condition:this.getBreakCondition(),location:{scriptId:r.scriptId,...i}})}async _setAny(e,r){if(!this.isEnabled)return;let i={state:0,args:r,deadletter:!1};i.done=(async()=>{let n=NN(r)?await e.cdp().Debugger.setBreakpoint(r):await e.cdp().Debugger.setBreakpointByUrl(r);if(!n)return;if(i.deadletter){await e.cdp().Debugger.removeBreakpoint({breakpointId:n.breakpointId});return}let s="actualLocation"in n?[n.actualLocation]:n.locations;this._manager._resolvedBreakpoints.set(n.breakpointId,this);let o={state:1,cdpId:n.breakpointId,args:r,locations:s,uiLocations:[]};return this.updateCdpRefs(a=>a.map(u=>u===i?o:u)),await this.updateUiLocations(e,n.breakpointId,s),o})(),this.updateCdpRefs(n=>[...n,i]),await i.done}async removeCdpBreakpoint(e){var r;this.updateCdpRefs(i=>i.filter(n=>n!==e)),e.state===0?(e.deadletter=!0,await e.done):(await((r=this._manager._thread)==null?void 0:r.cdp().Debugger.removeBreakpoint({breakpointId:e.cdpId})),this._manager._resolvedBreakpoints.delete(e.cdpId))}};var Un=class extends yp{constructor(r,i,n){super(r,i,{lineNumber:1,columnNumber:1});this.mode=n}static getModeKeyForSource(r,i){return r===1?(0,Bv.basename)(i,(0,Bv.extname)(i)||void 0):i}_setPredicted(){return Promise.resolve()}_setByPath(r,i){if(!this.source.path)return Promise.resolve();let n=Un.getModeKeyForSource(this.mode,this.source.path);return this.mode===1?super._setByUrlRegexp(r,Zr(n),i):super._setByPath(r,i)}};var UN=S(Se());var cn=class extends yp{constructor(r,i,n,s,o){super(r,n,{lineNumber:s.line,columnNumber:s.column||1});this.dapId=i;this.dapParams=s;this.condition=o;this.completedSet=Je()}equivalentTo(r){return r.dapParams.column===this.dapParams.column&&r.dapParams.line===this.dapParams.line&&r.dapParams.hitCondition===this.dapParams.hitCondition&&r.dapParams.condition===this.dapParams.condition&&r.dapParams.logMessage===this.dapParams.logMessage}untilSetCompleted(){return this.completedSet.promise}markSetCompleted(){this.completedSet.resolve()}testHitCondition(r){return this.condition.shouldStayPaused(r)}async toDap(){let r=this.enabled&&this.getResolvedUiLocation();return r?{id:this.dapId,verified:!0,source:await r.source.toDap(),line:r.lineNumber,column:r.columnNumber}:{id:this.dapId,verified:!1,message:UN.t("Unbound breakpoint")}}diagnosticDump(){return{source:this.source,params:this.dapParams,cdp:this.cdpBreakpoints}}getBreakCondition(){return this.condition.breakCondition}updateCdpRefs(r){let i=this.getResolvedUiLocation();super.updateCdpRefs(r),this.getResolvedUiLocation()!==i&&this.notifyResolved()}getResolvedUiLocation(){for(let r of this.cdpBreakpoints)if(r.state===1&&r.uiLocations.length)return r.uiLocations[0]}async notifyResolved(){await this._manager.notifyBreakpointChange(this,this.completedSet.hasSettled())}};var Uv=class extends cn{constructor(e,r,i,n){super(e,r,i,n,new $a(()=>!1))}getResolvedUiLocation(){}};var XF=S(om());var wp=class extends Un{constructor(r,i){super(r,{path:i},1);this.pattern=i}async enable(r){if(this.isEnabled)return;this.isEnabled=!0;let i=(0,XF.makeRe)(qe(this.pattern),{contains:!0,lookbehinds:!1});await this._setAny(r,{urlRegex:i.source.replace(/([a-z]):/i,(n,s)=>`[${s.toLowerCase()}${s.toUpperCase()}]:`),lineNumber:0,columnNumber:0})}};var Ip=S(Y());var _p={dispose:()=>{}},Le=class{constructor(e){this.disposed=!1;this.items=[];e&&(this.items=e.slice())}get isDisposed(){return this.disposed}callback(...e){for(let r of e)this.push({dispose:r})}push(...e){return this.disposed?(e.forEach(r=>r.dispose()),e[0]):(this.items.push(...e),e[0])}disposeObject(e){this.items=this.items.filter(r=>r!==e),e.dispose()}dispose(){let e=Promise.all(this.items.map(r=>r.dispose()));return this.items=[],this.disposed=!0,e}};var Ap=Symbol("IExperimentationService");var jt=Symbol("ITelemetryReporter");var ooe=/\/node_modules\/|^node\:/,aoe=2,JF=5e3,uoe=JF/2,St=class{constructor(e,r,i){this.telemetry=r;this.experimentation=i;this.disposable=new Le;this.hadBreakpoint=!1;this.didVerifyBreakpoint=!1;this.hadNonModuleSourcemap=!1;this.startedAt=Date.now();this.disposable.push(St.didVerifyEmitter.event(()=>{this.didVerifyBreakpoint=!0})),St.consecutiveQualifyingSessions>=aoe&&this.disposable.push(HM(async()=>{this.currentlyQualifying&&await this.experimentation.getTreatment("diagnosticPrompt",!0)&&(r.report("diagnosticPrompt",{event:"suggested"}),St.didSuggest=!0,e.suggestDiagnosticTool({}))},JF))}get currentlyQualifying(){return this.hadBreakpoint&&!this.didVerifyBreakpoint&&this.hadNonModuleSourcemap}notifyHadBreakpoint(){this.hadBreakpoint=!0}notifyVerifiedBreakpoint(){this.didVerifyBreakpoint||(St.didVerifyEmitter.fire(),St.didSuggest&&(St.didSuggest=!1,this.telemetry.report("diagnosticPrompt",{event:"resolved"})))}attach(e){if(!this.hadNonModuleSourcemap){let r=this.disposable.push(e.Debugger.on("scriptParsed",i=>{i.sourceMapURL&&!ooe.test(i.url)&&(this.hadNonModuleSourcemap=!0,this.disposable.disposeObject(r))}))}}dispose(){this.currentlyQualifying&&Date.now()-uoe>this.startedAt?St.consecutiveQualifyingSessions++:St.consecutiveQualifyingSessions=0,this.disposable.dispose()}};St.consecutiveQualifyingSessions=0,St.didVerifyEmitter=new X,St.didSuggest=!1,St=k([(0,Ip.injectable)(),A(0,(0,Ip.inject)(Bl)),A(1,(0,Ip.inject)(jt)),A(2,(0,Ip.inject)(Ap))],St);var YF=t=>t.originalPosition.columnNumber===1&&t.originalPosition.lineNumber===1,QF=500,ZF=Symbol("DontCompare");var pn=class{constructor(e,r,i,n,s,o,a){this.logger=i;this.launchConfig=n;this.conditionFactory=s;this.suggester=o;this._breakpointsPredictor=a;this._resolvedBreakpoints=new Map;this._totalBreakpointsCount=0;this._launchBlocker=new Set;this._predictorDisabledForTest=!1;this._breakpointsStatisticsCalculator=new Pv;this.entryBreakpointMode=0;this._enabledFilter=()=>!0;this._byDapId=new Map;this._byPath=sc();this._byRef=new Map;this.moduleEntryBreakpoints=sc();this._dap=e,this._sourceContainer=r,a==null||a.onLongParse(()=>e.longPrediction({})),r.onSourceMappedSteppingChange(()=>{if(this._thread)for(let u of this._byDapId.values())u.refreshUiLocations(this._thread)}),this._scriptSourceMapHandler=async(u,c)=>{if(!i.assert(this._thread,"Expected thread to be set for the breakpoint source map handler"))return[];let l=[],p=[c];for(let f=0;f<p.length;f++)for(let h of p[f]){let g=h.absolutePath,H=g?this._byPath.get(g):void 0;for(let w of H||[])l.push(w.updateForSourceMap(this._thread,u));let v=this._byRef.get(h.sourceReference);for(let w of v||[])l.push(w.updateForSourceMap(this._thread,u));h.sourceMap&&p.push(h.sourceMap.sourceByUrl.values())}return Wu(await Promise.all(l))}}get appliedByPath(){return this._byPath}get appliedByRef(){return this._byRef}hasAtLocation(e){let r=this._byPath.get(e.source.absolutePath)||[],i=this._byRef.get(e.source.sourceReference)||[];return r.concat(i).some(n=>n.originalPosition.columnNumber===e.columnNumber&&n.originalPosition.lineNumber===e.lineNumber)}moveBreakpoints(e,r,i){let n=c=>h$(c,l=>{let p=this._sourceContainer.getOptiminalOriginalPosition(r,l.originalPosition);return p.column===null||p.line===null||l.updateSourceLocation({path:i.absolutePath,sourceReference:i.sourceReference},{lineNumber:p.line,columnNumber:p.column+1,source:i}),!1}),s=e.absolutePath,o=i.absolutePath,a=s?this._byPath.get(s):void 0;if(a&&o){let[c,l]=n(a);this._byPath.set(s,c),this._byPath.set(o,l)}let u=this._byRef.get(e.sourceReference);if(u){let[c,l]=n(u);this._byRef.set(e.sourceReference,c),this._byRef.set(i.sourceReference,l)}}async updateEntryBreakpointMode(e,r){if(r===this.entryBreakpointMode)return;let i=[...this.moduleEntryBreakpoints.values()];this.moduleEntryBreakpoints.clear(),this.entryBreakpointMode=r,await Promise.all(i.map(n=>this.ensureModuleEntryBreakpoint(e,n.source)))}async applyEnabledFilter(e,r=ZF){if(r!==ZF&&this._enabledFilter!==r)return;this._enabledFilter=e||(()=>!0);let i=this._thread;i&&await Promise.all([...this._byDapId.values()].map(n=>this._enabledFilter(n)?n.enable(i):n.disable()))}async getBreakpointLocations(e,r,i,n){let s=i.base1,o=this._sourceContainer.currentSiblingUiLocations({source:r,lineNumber:s.lineNumber,columnNumber:s.columnNumber}),a=n.base1,u=this._sourceContainer.currentSiblingUiLocations({source:r,lineNumber:a.lineNumber,columnNumber:a.columnNumber});if(o.length!==u.length)return this.logger.warn("internal","Expected to have the same number of start and end locations"),[];let c=[],l=[];for(let p=0;p<o.length;p++){let f=o[p],h=u[p];if(f.source!==h.source){this.logger.warn("internal","Expected to have the same number of start and end scripts");continue}let g=f.source;if(!g.scripts.length)continue;let{scriptId:H}=g.scripts[g.scripts.length-1];c.push(e.cdp().Debugger.getPossibleBreakpoints({restrictToFunction:!1,start:{scriptId:H,...Pa(La(f),g.runtimeScriptOffset)},end:{scriptId:H,...Pa(La(h),g.runtimeScriptOffset)}}).then(v=>{if(v)for(let w of v.locations){let{lineNumber:T,columnNumber:U=0}=w,x=this._sourceContainer.currentSiblingUiLocations({source:g,...pc(TN({lineNumber:T,columnNumber:U}),g.runtimeScriptOffset)});l.push({breakLocation:w,uiLocations:x})}}))}return await Promise.all(c),l}setThread(e){var r;this._thread=e,this._thread.cdp().Debugger.on("breakpointResolved",i=>{let n=this._resolvedBreakpoints.get(i.breakpointId);n&&n.updateUiLocations(e,i.breakpointId,[i.location])}),this._thread.setSourceMapDisabler(i=>{let n=[];for(let s of i){let o=this._resolvedBreakpoints.get(s);if(o){let a=this._sourceContainer.source(o.source);ei(a)&&n.push(a)}}return n});for(let i of this._byPath.values())i.forEach(n=>this._setBreakpoint(n,e)),this.ensureModuleEntryBreakpoint(e,(r=i[0])==null?void 0:r.source);for(let i of this._byRef.values())i.forEach(n=>this._setBreakpoint(n,e));"runtimeSourcemapPausePatterns"in this.launchConfig&&this.launchConfig.runtimeSourcemapPausePatterns.length&&this.setRuntimeSourcemapPausePatterns(e,this.launchConfig.runtimeSourcemapPausePatterns),this._byDapId.size>0&&this._installSourceMapHandler(this._thread)}async launchBlocker(){Cv(this.logger,"BreakpointManager.launchBlocker",async()=>{this._predictorDisabledForTest||await Promise.all([...this._launchBlocker])})}setRuntimeSourcemapPausePatterns(e,r){return Promise.all(r.map(i=>this._setBreakpoint(new wp(this,i),e)))}addLaunchBlocker(...e){for(let r of e)this._launchBlocker.add(r),r.finally(()=>this._launchBlocker.delete(r))}setPredictorDisabledForTest(e){this._predictorDisabledForTest=e}_installSourceMapHandler(e){return this.launchConfig.perScriptSourcemaps==="yes"?Promise.all([this.updateEntryBreakpointMode(e,1),e.setScriptSourceMapHandler(!1,this._scriptSourceMapHandler)]).then(()=>!0):this._breakpointsPredictor&&!this.launchConfig.pauseForSourceMap?e.setScriptSourceMapHandler(!1,this._scriptSourceMapHandler):e.setScriptSourceMapHandler(!0,this._scriptSourceMapHandler)}async _uninstallSourceMapHandler(e){e.setScriptSourceMapHandler(!1),this._sourceMapHandlerInstalled=void 0}_setBreakpoint(e,r){this._enabledFilter(e)&&this.addLaunchBlocker(Promise.race([Oe(QF),e.enable(r)]))}async setBreakpoints(e,r){var l,p,f;!this._sourceMapHandlerInstalled&&this._thread&&((l=e.breakpoints)!=null&&l.length)&&(this._sourceMapHandlerInstalled={entryBpSet:this._installSourceMapHandler(this._thread)});let i=await((p=this._sourceMapHandlerInstalled)==null?void 0:p.entryBpSet);e.source.path=Nn(e.source.path);let n=this._sourceContainer.source(e.source);if(e.source.sourceReference&&e.source.path&&!n&&(e.source.sourceReference=void 0),!i&&this._breakpointsPredictor&&!n){let h=this._breakpointsPredictor.predictBreakpoints(e);this.addLaunchBlocker(h),await h}let s=this._thread;if((s==null?void 0:s.debuggerReady.hasSettled())===!1){let h=s.debuggerReady.promise;this.addLaunchBlocker(h),await h}let o=h=>{var H;let g={unbound:h.slice(),new:[],list:[]};if(!e.breakpoints)return g;for(let v=0;v<e.breakpoints.length;v++){let w=e.breakpoints[v],T;try{T=new cn(this,r[v],e.source,w,this.conditionFactory.getConditionFor(w))}catch(P){if(!(P instanceof ne))throw P;this._dap.output({category:"stderr",output:P.message}),T=new Uv(this,r[v],e.source,w)}let U=g.unbound.findIndex(P=>P.equivalentTo(T)),x=g.unbound[U];(H=x==null?void 0:x.equivalentTo)!=null&&H.call(x,T)?(g.list.push(x),g.unbound.splice(U,1)):(g.new.push(T),g.list.push(T),this._byDapId.set(T.dapId,T))}return g},a=()=>e.source.path?this._byPath.get(e.source.path):e.source.sourceReference?this._byRef.get(e.source.sourceReference):void 0,u=o((f=a())!=null?f:[]);if(e.source.path)this._byPath.set(e.source.path,u.list);else if(e.source.sourceReference)this._byRef.set(e.source.sourceReference,u.list);else return{breakpoints:[]};if(this._totalBreakpointsCount-=u.unbound.length,await Promise.all(u.unbound.map(h=>(this._byDapId.delete(h.dapId),h.disable()))),this._totalBreakpointsCount+=u.new.length,this._thread&&this._totalBreakpointsCount===0&&this._sourceMapHandlerInstalled&&this._uninstallSourceMapHandler(this._thread),s&&u.new.length){this.ensureModuleEntryBreakpoint(s,e.source);let h=a(),g=Promise.all(u.new.filter(this._enabledFilter).filter(H=>h==null?void 0:h.includes(H)).map(H=>H.enable(s)));this.addLaunchBlocker(Promise.race([Oe(QF),g])),await g}let c=await Promise.all(u.list.map(h=>h.toDap()));return this._breakpointsStatisticsCalculator.registerBreakpoints(c),Oe(0).then(()=>u.new.forEach(h=>h.markSetCompleted())),{breakpoints:c}}async notifyBreakpointChange(e,r){if(!this._byDapId.has(e.dapId))return;let i=await e.toDap();i.verified&&(this._breakpointsStatisticsCalculator.registerResolvedBreakpoint(e.dapId),this.suggester.notifyVerifiedBreakpoint()),r&&this._dap.breakpoint({reason:"changed",breakpoint:i})}isEntrypointBreak(e,r){let i=[...this.moduleEntryBreakpoints.values()].filter(n=>n.enabled&&n.cdpScriptIds.has(r));if(i.length){for(let n of i)n instanceof wp||n.disable();return!0}return e.some(n=>{let s=this._resolvedBreakpoints.get(n);return s&&(s instanceof Un||YF(s))})}async shouldPauseAt(e,r,i,n=!1){if(!r.length)return e.reason!=="instrumentation";let s=0,o=n?1:0;return await Promise.all(r.map(async a=>{if((i==null?void 0:i.cdpId)===a){s++;return}let u=this._resolvedBreakpoints.get(a);if(u instanceof Un){this.entryBreakpointMode===0&&!(u instanceof wp)&&u.disable(),o++;return}u instanceof cn&&(await u.testHitCondition(e)?s++:o++)})),s>0||o===0}registerBreakpointsHit(e){for(let r of e){let i=this._resolvedBreakpoints.get(r);i instanceof cn&&this._breakpointsStatisticsCalculator.registerBreakpointHit(i.dapId)}}statisticsForTelemetry(){return this._breakpointsStatisticsCalculator.statistics()}ensureModuleEntryBreakpoint(e,r){var o;if(!r.path||((o=this._byPath.get(r.path))!=null?o:[]).some(YF))return;let n=Un.getModeKeyForSource(this.entryBreakpointMode,r.path);if(!r.path||this.moduleEntryBreakpoints.has(n))return;let s=new Un(this,r,this.entryBreakpointMode);this.moduleEntryBreakpoints.set(r.path,s),this._setBreakpoint(s,e)}executionContextWasCleared(){for(let e of this._byDapId.values())e.executionContextWasCleared()}async reapply(){let e=[...this._byDapId.values()];if(await Promise.all(e.map(r=>r.disable())),this._thread){let r=this._thread;await Promise.all(e.map(i=>i.enable(r)))}}};pn=k([(0,Rs.injectable)(),A(0,(0,Rs.inject)(rn)),A(1,(0,Rs.inject)(fr)),A(2,(0,Rs.inject)(fe)),A(3,(0,Rs.inject)(Ke)),A(4,(0,Rs.inject)(Ov)),A(5,(0,Rs.inject)(St)),A(6,(0,Rs.inject)(uc))],pn);var H2=require("crypto"),Tp=S(Y());var am=class{constructor(e){this.element=e,this.next=am.Undefined,this.prev=am.Undefined}},lt=am;lt.Undefined=new am(void 0);var um=class{constructor(){this._first=lt.Undefined;this._last=lt.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===lt.Undefined}clear(){let e=this._first;for(;e!==lt.Undefined;){let r=e.next;e.prev=lt.Undefined,e.next=lt.Undefined,e=r}this._first=lt.Undefined,this._last=lt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let i=new lt(e);if(this._first===lt.Undefined)this._first=i,this._last=i;else if(r){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==lt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==lt.Undefined){let e=this._last.element;return this._remove(this._last),e}}applyFilter(e){let r=this._first;for(;r!==lt.Undefined;){let i=r.next;e(r.element)||this._remove(r),r=i}}_remove(e){if(e.prev!==lt.Undefined&&e.next!==lt.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===lt.Undefined&&e.next===lt.Undefined?(this._first=lt.Undefined,this._last=lt.Undefined):e.next===lt.Undefined?(this._last=this._last.prev,this._last.next=lt.Undefined):e.prev===lt.Undefined&&(this._first=this._first.next,this._first.prev=lt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==lt.Undefined;)yield e.element,e=e.next}};var rb=S(Y()),d2=S(require("net"));var Ms=class extends ne{constructor(e){super({id:9243,format:e,showUser:!0}),this._cause={id:9243,format:e,showUser:!0}}};function Os(t,e,r){if(e.isCancellationRequested)return Promise.reject(new Ms(r||"Task cancelled"));let i=Je(),n=e.onCancellationRequested(i.resolve);return Promise.race([i.promise.then(()=>{throw new Ms(r||"Task cancelled")}),t.then(s=>(n.dispose(),s)).catch(s=>{throw n.dispose(),s})])}function eB(t,e){let r=new dr(e),i=t.map(async n=>{try{return await n(r.token)}finally{r.cancel()}});return Promise.race(i)}var tB=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),hr=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),coe=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tB}),dr=class{constructor(e){this._token=void 0;this._parentListener=void 0;this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}static withTimeout(e,r){let i=new dr(r),n=i._token=new Ep,s=setTimeout(()=>n.cancel(),e);return n.onCancellationRequested(()=>clearTimeout(s)),i}get token(){return this._token||(this._token=new Ep),this._token}cancel(){this._token?this._token instanceof Ep&&this._token.cancel():this._token=coe}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Ep&&this._token.dispose():this._token=hr}},Ep=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tB:(this._emitter||(this._emitter=new X),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var VS=S(require("net"));var mae=S(sB(),1),gae=S(TS(),1),Hae=S($S(),1),o2=S(US(),1),yae=S(s2(),1);var a2=o2.default;var u2=(t,e)=>t+Math.floor(Math.random()*(e-t));async function Na({min:t=53e3,max:e=54e3,attempts:r=1e3,tester:i=l2}={},n=hr){let s=u2(t,e);for(let o=Math.min(r,e-t);;o--)try{return await i(s,n)}catch(a){if(o===0||a instanceof Ms)throw a;s=s===e-1?t:s+1}}async function c2(t,e){try{return await l2(t,e),!0}catch(r){return!1}}function l2(t,e=hr){let r;return new Promise((i,n)=>{let s=VS.createServer();s.listen(t,"127.0.0.1",()=>{let o=s.address();s.close(()=>i(o.port))}),s.on("error",n),r=e.onCancellationRequested(()=>{s.close(),n(new Ms("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())}var p2=(t,e)=>(r,i)=>{let n=VS.createServer(t);return n.listen(r,e),tb(n,i)},f2=t=>(e,r)=>tb(new(void 0)({host:"127.0.0.1",...t,port:e}),r),tb=(t,e)=>{let r;return new Promise((i,n)=>{t.on("error",n),t.on("listening",()=>i(t)),r=e.onCancellationRequested(()=>{t.close(),n(new Ms("Port open lookup cancelled"))})}).finally(()=>r==null?void 0:r.dispose())};var h2=async(t,e,r,i,n=hr)=>{let s=r?await tb(d2.createServer(e).listen(r,i),n):await Na({tester:p2(e,i)},n),o=t.register(s.address().port);return s.on("close",()=>o.dispose()),s.on("error",()=>o.dispose()),s},ib=async(t,e,r)=>{let i=await Na({tester:f2(e)},r),n=t.register(i.address().port);return i.on("close",()=>n.dispose()),i.on("error",()=>n.dispose()),i},gt=Symbol("IPortLeaseTracker"),Pp=class{constructor(e){this.usedPorts=new Set;this.onRegistered=new X;this.isMandated=e==="remote"}register(e){return this.usedPorts.add(e),this.onRegistered.fire(e),{dispose:()=>this.usedPorts.delete(e)}}isRegistered(e,r=2e3){return this.usedPorts.has(e)?Promise.resolve(!0):e<53e3||e>=54e3?Promise.resolve(!1):eB([()=>Oe(r).then(()=>!1),i=>new Promise(n=>{let s=this.onRegistered.event(o=>{o===e&&n(!0)});i.onCancellationRequested(()=>s.dispose())})])}};Pp=k([(0,rb.injectable)(),A(0,(0,rb.inject)(Ts))],Pp);var m2="JsDebug",g2="*";var GS=class{constructor(){this.replays=new Map}addReplay(e,r,i){let n=this.replays.get(e);return n||(n=new um,this.replays.set(e,n)),n.push({event:`${e}.${r}`,params:i})}capture(e,r,i,n){let s=e[r];if(n===0)s.on(i,o=>this.addReplay(r,i,o));else if(n===2){let o;s.on(i,a=>{o==null||o(),o=this.addReplay(r,i,a)})}else{let o=new um;s.on(i,a=>{var u;o.size===n.cap&&((u=o.shift())==null||u()),o.push(this.addReplay(r,i,a))})}}filter(e,r){let i=this.replays.get(e);i&&i.applyFilter(r)}clearEvent(e,r){let i=`${e}.${r}`;this.filter(e,n=>n.event!==i)}clearDomain(e){this.replays.delete(e)}read(e){var r;return(r=this.replays.get(e))!=null?r:[]}},nb=Symbol("ICdpProxyProvider"),Lp=class{constructor(e,r,i){this.cdp=e;this.portTracker=r;this.logger=i;this.disposables=new Le;this.replay=new GS;this.jsDebugApi={subscribe:(e,{events:r})=>{for(let i of r)i.endsWith(g2)?e.pushDisposable(this.cdp.session.onPrefix(i.slice(0,-g2.length),n=>e.send({method:n.method,params:n.params}))):e.pushDisposable(this.cdp.session.on(i,n=>e.send({method:i,params:n})));return{}}};this.replay.capture(e,"CSS","styleSheetAdded",0),this.replay.capture(e,"Debugger","paused",2),this.replay.capture(e,"Runtime","executionContextCreated",{cap:50,type:1}),this.replay.capture(e,"Runtime","consoleAPICalled",{cap:50,type:1}),e.Debugger.on("resumed",()=>{this.replay.clearEvent("Debugger","paused")}),e.CSS.on("fontsUpdated",n=>{n.font&&this.replay.addReplay("CSS","fontsUpdated",n)}),e.CSS.on("styleSheetRemoved",n=>this.replay.filter("CSS",s=>s.params.styleSheetId!==n.styleSheetId))}async proxy(){this.server||(this.server=this.createServer());let{server:e,path:r}=await this.server,i=e.address();return{host:i.address,port:i.port,path:r}}async createServer(){let e=`/${(0,H2.randomBytes)(20).toString("hex")}`,r=await ib(this.portTracker,{perMessageDeflate:!0,path:e});return this.logger.info("proxyActivity","activated cdp proxy"),r.on("connection",i=>{let n=new KS(i,this.logger);this.logger.info("proxyActivity","accepted proxy connection",{id:n.id}),i.on("close",()=>{this.logger.verbose("proxyActivity","closed proxy connection",{id:n.id}),this.disposables.disposeObject(n)}),i.on("message",async s=>{let o;try{o=JSON.parse(s.toString())}catch(f){return n.send({id:0,error:{code:-32700,message:f.message}})}this.logger.verbose("proxyActivity","received proxy message",o);let{method:a,params:u,id:c=0}=o,[l,p]=a.split(".");try{let f=l===m2?await this.invokeJsDebugDomainMethod(n,p,u):await this.invokeCdpMethod(n,l,p,u);n.send({id:c,result:f})}catch(f){let h=f instanceof cc&&f.cause?f.cause:{code:0,message:f.message};n.send({id:c,error:h})}})}),{server:r,path:e}}dispose(){var e;this.disposables.dispose(),(e=this.server)==null||e.then(r=>r.server.close()),this.server=void 0}invokeCdpMethod(e,r,i,n){let s=this.cdp.session.sendOrDie(`${r}.${i}`,n);switch(i){case"enable":for(let o of this.replay.read(r))e.send({method:o.event,params:o.params});break;case"disable":this.replay.clearDomain(r);break;default:}return s}invokeJsDebugDomainMethod(e,r,i){if(!this.jsDebugApi.hasOwnProperty(r))throw new cc(r).setCause(-32601,`${m2}.${r} not found`);return this.jsDebugApi[r](e,i)}};Lp=k([(0,Tp.injectable)(),A(0,(0,Tp.inject)(Mt)),A(1,(0,Tp.inject)(gt)),A(2,(0,Tp.inject)(fe))],Lp);var bae=0,KS=class{constructor(e,r){this.webSocket=e;this.logger=r;this.disposables=new Le;this.id=bae++}pushDisposable(e){this.disposables.push(e)}dispose(){this.disposables.dispose(),this.webSocket.close()}send(e){this.logger.verbose("proxyActivity","send proxy message",e),this.webSocket.send(JSON.stringify(e))}};var kp=S(sv()),ym=S(Y());var zS=Ur(function(t,e,r){let i=r?"variable":"property",n=(l,p,f)=>{if(p!=="function")return i;if(l==="constructor")return"class";let h=String(f);return h.startsWith("class ")||h.includes("[native code]")&&/^[A-Z]/.test(l)?"class":r?"function":"method"},s=l=>{switch(typeof l){case"number":case"boolean":return`${l}`;case"object":return l===null?"null":l.constructor.name||"object";case"function":return`fn(${new Array(l.length).fill("?").join(", ")})`;default:return typeof l}},o=[],a=new Set,u="~",c=t===void 0?this:t;for(;c!=null;c=c.__proto__){u+="~";let l=Object.getOwnPropertyNames(c).filter(p=>p.startsWith(e)&&!p.match(/^\d+$/));for(let p of l){if(a.has(p))continue;a.add(p);let f=Object.getOwnPropertyDescriptor(c,p),h=i,g;try{let H=c[p];h=n(p,typeof(f==null?void 0:f.value),H),g=s(H)}catch(H){}o.push({label:p,sortText:u+p.replace(/^_+/,H=>"{".repeat(H.length)),type:h,detail:g})}r=!1}return{result:o,isArray:this instanceof Array}}),y2=nc(zS.source);var wae=t=>{var e,r,i;switch(t.type){case"ClassDeclaration":case"ClassExpression":return{type:"class",id:t.id};case"MethodDefinition":return{type:((e=t.key)==null?void 0:e.type)==="Identifier"&&t.key.name==="constructor"?"constructor":"method",id:t.key};case"VariableDeclarator":return{type:((r=t.init)==null?void 0:r.type)==="FunctionExpression"||((i=t.init)==null?void 0:i.type)==="ArrowFunctionExpression"?"function":"variable",id:t.id}}};function _ae(t){let e=!1;return(0,kp.traverse)(t,{enter(r){if(r.type==="CallExpression"||r.type==="NewExpression"||r.type==="UnaryExpression"&&r.operator==="delete"||r.type==="ClassBody")return e=!0,kp.VisitorOption.Break}}),e}var sb=Symbol("ICompletions"),$p=class{constructor(e,r){this.evaluator=e;this.cdp=r}async completions(e){let r=ba(e.expression),i=new Aa(e.expression).convert(e.position),n=()=>Promise.resolve([]);return(0,kp.traverse)(r,{enter:s=>{let o=s;o.start<i&&i<=o.end&&(s.type==="Identifier"?n=()=>this.identifierCompleter(e,r,s,i):s.type==="MemberExpression"&&(n=s.computed?()=>this.elementAccessCompleter(e,s,i):()=>this.propertyAccessCompleter(e,s,i)))}}),n().then(s=>s.sort((o,a)=>o.sortText>a.sortText?1:-1))}async elementAccessCompleter(e,r,i){if(r.property.type!=="Literal"||typeof r.property.value!="string")return[];let n=e.expression.slice(va(r.property)+1,i);return(await this.defaultCompletions(e,n)).filter(o=>o.sortText!=="~~[").map(o=>{var a;return{...o,text:JSON.stringify((a=o.text)!=null?a:o.label)+"]",start:va(r.property),length:FE(r.property)-va(r.property)}})}async identifierCompleter(e,r,i,n){let s=[];(0,kp.traverse)(r,{enter(u){var l;let c=wae(u);((l=c==null?void 0:c.id)==null?void 0:l.type)==="Identifier"&&s.push({label:c.id.name,type:c.type,sortText:c.id.name})}});let o=e.expression.slice(va(i),n),a=[...s,...await this.defaultCompletions(e,o)];return this.evaluator.hasReturnValue&&e.executionContextId!==void 0&&bo.startsWith(o)&&a.push({sortText:`~${bo}`,label:bo,type:"variable"}),a}async propertyAccessCompleter(e,r,i){let{result:n,isArray:s}=await this.completePropertyAccess({executionContextId:e.executionContextId,stackFrame:e.stackFrame,expression:jO(e.expression,r.object),prefix:Li(r.property)?"":e.expression.slice(va(r.property),i),throwOnSideEffect:_ae(r)}),o=va(r.property)-1,a=/^[$a-z_][0-9a-z_$]*$/i;for(let u of n)a.test(u.label)||(u.text=`[${JSON.stringify(u.label)}]`,u.start=o,u.length=1);if(s){let u="index";n.unshift({label:`[${u}]`,text:`[${u}]`,type:"property",sortText:"~~[",start:o,selectionStart:1,selectionLength:u.length,length:1})}return n}async completePropertyAccess({executionContextId:e,stackFrame:r,expression:i,prefix:n,isInGlobalScope:s=!1,throwOnSideEffect:o=!1}){let a={expression:`(${i})`,objectGroup:"console",silent:!0,throwOnSideEffect:o},u=r&&r.callFrameId(),c=await this.evaluator.evaluate(u?{...a,callFrameId:u}:{...a,contextId:e},{stackFrame:r});if(!c||c.exceptionDetails)return{result:[],isArray:!1};if(!c.result.objectId){let l={...a,returnByValue:!0,throwOnSideEffect:!1,expression:y2.expr(`(${i})`,JSON.stringify(n),JSON.stringify(s))},p=await this.evaluator.evaluate(u?{...l,callFrameId:u}:{...l,contextId:e});return!p||p.exceptionDetails?{result:[],isArray:!1}:p.result.value}try{return(await zS({cdp:this.cdp,args:[void 0,n,s],objectId:c.result.objectId,returnByValue:!0})).value}catch(l){return{result:[],isArray:!1}}finally{this.cdp.Runtime.releaseObject({objectId:c.result.objectId})}}async defaultCompletions(e,r=""){for(let i of["self","global","this"]){let{result:n}=await this.completePropertyAccess({executionContextId:e.executionContextId,stackFrame:e.stackFrame,expression:i,prefix:r,isInGlobalScope:!0});if(e.stackFrame){let s=r.toLowerCase(),o=new Set(n.map(a=>a.label));for(let a of await e.stackFrame.completions())o.has(a.label)||!a.label.toLowerCase().includes(s)||(o.add(a.label),n.push(a))}return n.push(...this.syntheticCompletions(e,r)),n}return this.syntheticCompletions(e,r)}syntheticCompletions(e,r){return this.evaluator.hasReturnValue&&bo.startsWith(r)?[{sortText:`~${bo}`,label:bo,type:"variable"}]:[]}};$p=k([(0,ym.injectable)(),A(0,(0,ym.inject)(un)),A(1,(0,ym.inject)(Mt))],$p);var db=S(Se());var Bs=class{constructor(e,r){this._tokens=[];this._separator=r||"",this._budget=e-1-this._separator.length}append(e){if(e.length>this.budget()){this.appendEllipsis();return}this._append(e)}_append(e){this._tokens.length&&(this._budget-=this._separator.length),this._tokens.push(e),this._budget-=e.length}appendEllipsis(){this._tokens[this._tokens.length-1]!=="\u2026"&&this._append("\u2026")}checkBudget(){return this._budget<=0&&this.appendEllipsis(),this._budget>0}budget(){return this._budget-(this._tokens.length?this._separator.length:0)}build(){return this._tokens.join(this._separator)}isEmpty(){return!this._tokens.length}};var j2=S(B2());var Nae=1e4;function Fae(t,e){if(!t.includes("%"))return[{type:"string",value:t}];let r=[];function i(u){if(!u)return;let c=r[r.length-1];(c==null?void 0:c.type)==="string"?c.value+=u:r.push({type:"string",value:u})}function n(u,c,l){r.push({type:"specifier",specifier:u,precision:c,substitutionIndex:l})}let s=0,o=0,a=new RegExp(`%%|%(?:(\\d+)\\$)?(?:\\.(\\d*))?([${e.join("")}])`,"g");for(let u=a.exec(t);u;u=a.exec(t)){let c=u.index;if(c>s&&i(t.substring(s,c)),u[0]==="%%")i("%");else{let[,l,p,f]=u;l&&Number(l)>0&&(o=Number(l)-1);let h=p?Number(p):void 0;n(f,h,o),++o}s=c+u[0].length}return i(t.substring(s)),r}function eC(t,e,r){let i=Fae(t,Array.from(r.keys())),n=new Set,s=r.get("");if(!s)throw new Error("Expected to hav a default formatter");let o=new Bs(Nae),a=!1;for(let u=0;o.checkBudget()&&u<i.length;++u){let c=i[u];if(c.type==="string"){o.append(c.value);continue}let l=c.substitutionIndex;if(l>=e.length){o.append("%"+(c.precision||"")+c.specifier);continue}n.add(l),c.specifier==="c"&&(a=!0);let p=r.get(c.specifier)||s;o.append(p(e[l],{budget:o.budget(),quoted:!1}))}a&&o.append("\x1B[0m");for(let u=0;o.checkBudget()&&u<e.length;++u)n.has(u)||(n.add(u),(t||u)&&o.append(" "),o.append(s(e[u],{budget:o.budget(),quoted:!1})));return{result:o.build(),usedAllSubs:n.size===e.length}}function U2(t){try{return new j2.default(t).ansi256().object().ansi256}catch(e){}}function q2(t){let e=/\s*(.*?)\s*:\s*(.*?)\s*(?:;|$)/g,r="\x1B[0m",i=e.exec(t);for(;i!==null;){if(i.length===3)switch(i[1]){case"color":let n=U2(i[2]);n&&(r+=`\x1B[38;5;${n}m`);break;case"background":case"background-color":let s=U2(i[2]);s&&(r+=`\x1B[48;5;${s}m`);break;case"font-weight":i[2]==="bold"&&(r+="\x1B[1m");break;case"font-style":i[2]==="italic"&&(r+="\x1B[3m");break;case"text-decoration":i[2]==="underline"&&(r+="\x1B[4m");break;default:}i=e.exec(t)}return r}var V2=t=>t.replace(/\\/gm,"\\\\").replace(/\n/gm,"\\n").replace(/\r/gm,"\\r").replace(/\t/gm,"\\t"),Uae={budget:1e5,quoted:!0},W2={budget:1e3,quoted:!0,postProcess:V2},jae={budget:1/0,quoted:!1},qae={budget:1e3,quoted:!0,postProcess:V2},Wae={budget:1e5,quoted:!0},lb=t=>{switch(t){case"repl":return Uae;case"hover":return W2;case"propertyValue":return W2;case"watch":return qae;case"copy":case"clipboard":return jae;default:return Wae}};var Vae=30,Gae=100,tC=20,Kae=1e4,zae=3,G2=120,rC=new Set(["null","regexp","date"]);function gc(t){return t.type==="function"||t.type==="object"&&!rC.has(t.subtype)}function iC(t){return t.subtype==="array"||t.subtype==="typedarray"}function Hc(t,e,r){var s,o;let i=lb(e),n=pb(t,i,r);return(o=(s=i.postProcess)==null?void 0:s.call(i,n))!=null?o:n}function pb(t,e,r){return t.type==="function"?t.description?J2(t.description,e.budget):"<function>":t.type==="object"&&t.subtype==="node"?t.description:"preview"in t&&t.preview?fb(t.preview,e.budget,r):X2(t,e.budget,e.quoted,r)}function fb(t,e,r){return iC(t)?Xae(t,e):t.subtype==="internal#entry"?Ds(t.description||"",e):t.type==="function"?J2(t.description,e):gc(t)?Jae(t,e,r):Qae(t,e,r)}function Xae(t,e){let r=new Bs(e),i=t.description,n=i.match(/[^(]*\(([\d]+)\)/);if(!n)return i;let s=parseInt(n[1],10);i.startsWith("Array(")&&(i=i.substring(5)),r.append(Ds(i,r.budget())),r.append(" ");let o=new Bs(r.budget()-2,", "),a=-1;for(let u of t.properties){if(!o.checkBudget())break;if(isNaN(u.name))continue;let c=parseInt(u.name,10);c>a+1&&o.appendEllipsis(),a=c,o.append(_m(u,o.budget()))}s>a+1&&o.appendEllipsis();for(let u of t.properties){if(!o.checkBudget())break;isNaN(u.name)&&o.append(_m(u,o.budget(),u.name))}return t.overflow&&o.appendEllipsis(),r.append("["+o.build()+"]"),r.build()}function Jae(t,e,r){let i=new Bs(e," ");t.description!=="Object"&&i.append(Ds(t.description,i.budget()));let n=new Map,s=t.properties||[];for(let f of s)n.set(f.name,f);let o=n.get("[[PrimitiveValue]]");if(o)return i.append(`(${_m(o,i.budget()-2)})`),i.build();let a=n.get("[[PromiseStatus]]"),u=n.get("[[PromiseValue]]");if(a&&u)return a.value==="pending"?i.append(`{<${a.value}>}`):i.append(`{${_m(u,i.budget()-2,`<${a.value}>`)}}`),i.build();let c=n.get("[[GeneratorStatus]]");if(c)return i.append(`{<${c.value}>}`),i.build();let l=new Bs(i.budget()-2,", ");for(let f of s){if(!l.checkBudget())break;l.append(_m(f,l.budget(),f.name))}for(let f of t.entries||[]){if(!l.checkBudget())break;if(f.key){let h=fb(f.key,Math.min(tC,l.budget()),r),g=fb(f.value,Math.min(tC,l.budget()-h.length-4),r);l.append(Op(h," => ",g,l.budget()))}else l.append(fb(f.value,Math.min(tC,l.budget()),r))}t.overflow&&l.appendEllipsis();let p=l.build();return p?i.append("{"+p+"}"):i.isEmpty()&&i.append("{}"),i.build()}function K2(t,e){return t.length<=e?t:"\u2026"}function Yae(t,e){return t.length>=e?t.slice(0,e-1)+"\u2026":t}function Qae(t,e,r){var i;if(t.type==="object"&&t.subtype==="null")return K2("null",e);if(t.type==="undefined")return K2("undefined",e);if(t.type==="string"){let n=(i=t.description)!=null?i:t.value;return r!=null&&r.hex&&(n=Buffer.from(n,"utf8").toString("hex")),Yl(n,e)}return t.type==="number"||t.type==="bigint"?Am(t,!1,e,r):Yae(t.description||"",e)}function Op(t,e,r,i){return t===void 0?Yl(r,i):t.length+e.length>i?Ds(t,i):`${t}${e}${Yl(r,i-t.length-e.length)}`}function _m(t,e,r){var i;return e=Math.min(e,Gae),t.type==="function"?Op(r,": ","\u0192",e):t.type==="object"&&t.value==="Object"?Op(r,": ","{\u2026}",e):typeof t.value=="undefined"?Op(r,": ",`<${t.type}>`,e):t.type==="string"?Op(r,": ",`'${t.value}'`,e):Op(r,": ",(i=t.value)!=null?i:"unknown",e)}function X2(t,e,r,i){if(t.type==="string"){let n=t.value||(t.description?t.description:"");i!=null&&i.hex&&(n=Buffer.from(n,"utf8").toString("hex"),r=!1);let s=Yl(n,r?e-2:e);return r?`'${s}'`:s}return t.type==="undefined"?"undefined":t.subtype==="null"?"null":t.type==="bigint"||t.type==="number"?Am(t,!1,e,i):t.description?Ds(t.description,Math.max(e,1e5)):Ds(String("value"in t?t.value:t.description),e)}function J2(t,e){let r=new Bs(e),i=t.replace(/^function [gs]et /,"function ").replace(/^function [gs]et\(/,"function(").replace(/^[gs]et /,""),n=i.match(/^(async\s+function)/),s=i.startsWith("function*"),o=i.startsWith("*"),a=!s&&i.startsWith("function"),u=i.startsWith("class ")||i.startsWith("class{"),c=i.indexOf("=>"),l=!n&&!s&&!a&&!u&&c>0,p;if(u){p=i.substring(5);let g=/^[^{\s]+/.exec(p.trim()),H="";g&&(H=g[0].trim()||""),h("class",p,H)}else if(n)p=i.substring(n[1].length),h("async \u0192",p,f(p));else if(s)p=i.substring(9),h("\u0192*",p,f(p));else if(o)p=i.substring(1),h("\u0192*",p,f(p));else if(a)p=i.substring(8),h("\u0192",p,f(p));else if(l){let g=i;i.length>Vae&&(g=i.substring(0,c+2)+" {\u2026}"),h("",i,g)}else h("\u0192",i,f(i));return r.build();function f(g){let H=g.indexOf("("),v=g.match(/\)\s*{/),w=v&&v.index||0;if(H!==-1&&v&&w>H){let T=g.substring(0,H).trim()||"",U=g.substring(H,w+1);return T+U}return"()"}function h(g,H,v){r.checkBudget()&&(g.length&&r.append(g+" "),H=H.trim(),H.endsWith(" { [native code] }")&&(H=H.substring(0,H.length-18)),r.budget()>=H.length?r.append(H):r.append(v.replace(/\n/g," ")))}}function yc(t){var n,s;let e=t;if(e.type!=="object"||e.subtype==="null")return{title:X2(e,Kae,!1,void 0)};let r=(s=(n=e.description)!=null?n:e.className)!=null?s:"Error",i=/^\s+at\s/m.exec(r);if(!i){let o=r.lastIndexOf(`
`);return o===-1?{title:r}:{title:r.substring(0,o)}}return{title:r.substring(0,i.index-1),stackTrace:r.substring(i.index+2)}}function Am(t,e,r,i){if(t.type==="number"){if("unserializableValue"in t)return t.unserializableValue;let o=t.value||+t.description;return i!=null&&i.hex?o.toString(16):String(o)}if(t.type==="bigint"){let o=t.unserializableValue||t.description;return i!=null&&i.hex?BigInt(o.slice(0,-1)).toString(16):o}let n=t,s=typeof n.value=="number"?n.value:+String(n.description);return Ds(String(e?Math.floor(s):s),r)}function Zae(t,e){return Yl(String(typeof t.value!="undefined"?t.value:t.description),e)}function Y2(t){var l;let e=[],r=new Set([void 0]),i=new Map;for(let p of t.properties.filter(f=>f.valuePreview)){let f=new Map;f.set(void 0,p.name),i.set(void 0,Math.max(i.get(void 0)||0,p.name.length)),e.push(f),(l=p.valuePreview)==null||l.properties.map(h=>{h.value&&(r.add(h.name),f.set(h.name,h.value),i.set(h.name,Math.max(i.get(h.name)||0,h.value.length)))})}for(let p of r.values())p&&i.set(p,Math.max(i.get(p)||0,p.length));let n=Array.from(i.values()).reduce((p,f)=>p+f,0),s=G2-4-(r.size-1)*3;if(n>s){let p=s/n;for(let f of i.keys()){let h=Math.max(zae,i.get(f)*p|0);i.set(f,h)}}let o=[];for(let p of r.values())o.push("-".repeat(i.get(p)));let a="[-"+o.join("-|-")+"-]",u=[];u.push(a.replace("[","\u256D").replace(/\|/g,"\u252C").replace("]","\u256E").replace(/-/g,"\u2504"));let c=[];for(let p of r.values())c.push(z2(p||"",i.get(p)));u.push("\u250A "+c.join(" \u250A ")+" \u250A"),u.push(a.replace("[","\u251C").replace(/\|/g,"\u253C").replace("]","\u2524").replace(/-/g,"\u2504"));for(let p of e){let f=[];for(let h of r.values())f.push(z2(p.get(h)||"",i.get(h)));u.push("\u250A "+f.join(" \u250A ")+" \u250A")}return u.push(a.replace("[","\u2570").replace(/\|/g,"\u2534").replace("]","\u256F").replace(/-/g,"\u2504")),u.map(p=>Ds(p,G2)).join(`
`)}var nC=new Map([["",(t,e)=>pb(t,e)],["s",(t,e)=>Zae(t,e.budget)],["i",(t,e)=>Am(t,!0,e.budget,void 0)],["d",(t,e)=>Am(t,!0,e.budget,void 0)],["f",(t,e)=>Am(t,!1,e.budget,void 0)],["c",t=>q2(t.value)],["o",(t,e)=>pb(t,e)],["O",(t,e)=>pb(t,e)]]);function z2(t,e){return t.length===e?t:t.length<e?t+" ".repeat(e-t.length):Ds(t,e)}var Z2=Ur(function(){return this});var hb=class{constructor(e,r){this.protoObj=e;this.cdp=r}async toDap(e){if(!this.protoObj.objectId)return{category:"stderr",output:db.t("Only objects can be queried")};let r=await this.cdp.Runtime.queryObjects({prototypeObjectId:this.protoObj.objectId,objectGroup:"console"});if(await this.cdp.Runtime.releaseObject({objectId:this.protoObj.objectId}),!r)return{category:"stderr",output:db.t("Could not query the provided object")};let i;try{i=await Z2({cdp:this.cdp,args:[],objectId:r.objects.objectId,objectGroup:"console",generatePreview:!0})}catch(o){return{category:"stderr",output:db.t(o.message)}}let n="\x1B[32mobjects: "+Hc(i,"repl")+"\x1B[0m";return{category:"stdout",output:"",variablesReference:e.replVariables.createVariableForOutput(n,[i]).id}}};var e3=/^(\W*at .*\()(.*):(\d+):(\d+)(\))$/,t3=/^(\W*at )(.*):(\d+):(\d+)$/,Ba=class{constructor(e){this.stack=e}static isStackLike(e){return e3.test(e)||t3.test(e)}*[Symbol.iterator](){for(let e of this.stack.split(`
`)){let r=e3.exec(e)||t3.exec(e);if(!r){yield e+`
`;continue}let[,i,n,s,o,a]=r;i&&(yield i),yield new sC(n,new Ri(Number(s),Number(o))),a&&(yield a),yield`
`}}},sC=class{constructor(e,r){this.path=e;this.position=r}toString(){return`${this.path}:${this.position.lineNumber}:${this.position.columnNumber}`}};var bi=S(Se());var Cm=S(Y());var We=S(Se()),g3=require("crypto");var ti=class{constructor(e=process.hrtime()){this.value=e}get ms(){return this.s*1e3}get s(){return this.value[0]+this.value[1]/1e9}elapsed(){return new ti().subtract(this)}subtract(e){let r=this.value[1]-e.value[1],i=this.value[0]-e.value[0];return r<0&&(r+=1e9,i--),new ti([i,r])}};var Np=class{constructor(e,r,i,n,s,o){this.launchConfig=e;this.targetInfo=r;this.parentTarget=i;this.targetOriginValue=n;this.cdp=s;this.logger=o;this.onNameChanged=new X().event;this.attached=!1;this.isWaitingForDebugger=!0;s.pause()}id(){return this.targetInfo.targetId}name(){return this.targetInfo.title}fileName(){return this.targetInfo.url}type(){return"node"}parent(){return this.parentTarget}children(){return[]}canStop(){return!1}stop(){}canRestart(){return!1}restart(){}canAttach(){return!this.attached}async attach(){return await Promise.all([this.cdp.Debugger.enable({}),this.cdp.Runtime.enable({})]),this.attached=!0,this.cdp}canDetach(){return this.attached}async detach(){await this.cdp.Debugger.resume({}),await this.cdp.NodeWorker.detach({sessionId:this.targetInfo.targetId}),this.attached=!1}targetOrigin(){return this.targetOriginValue}afterBind(){return this.cdp.resume(),Promise.resolve()}async runIfWaitingForDebugger(){this.isWaitingForDebugger=!1,await this.cdp.Runtime.runIfWaitingForDebugger({})}initialize(){return Promise.resolve()}waitingForDebugger(){return this.isWaitingForDebugger}supportsCustomBreakpoints(){return!1}scriptUrlToUrl(e){return e[0]==="/"||process.platform==="win32"&&e[1]===":"&&e[2]==="\\"?Qe(e):e}executionContextName(){return this.targetInfo.title}};var qt=S(Se()),mb=new Map;function Im(){if(mb.size)return mb;function t(s,o){for(let a of o)a.group=s,mb.set(a.id,a)}function e(s,o){let a=o||s;return{id:"instrumentation:"+s,title:a,group:"",details:u=>{if(s==="webglErrorFired"){let c=u.webglErrorName;return c=c.replace(/^.*(0x[0-9a-f]+).*$/i,"$1"),{short:c,long:qt.t('Paused on WebGL Error instrumentation breakpoint, error "{0}"',c)}}return s==="scriptBlockedByCSP"&&u.directiveText?{short:qt.t('CSP violation "{0}"',u.directiveText),long:qt.t('Paused on Content Security Policy violation instrumentation breakpoint, directive "{0}"',u.directiveText)}:{short:a,long:qt.t('Paused on instrumentation breakpoint "{0}"',a)}},apply:async(u,c)=>c?!!await u.DOMDebugger.setInstrumentationBreakpoint({eventName:s}):!!await u.DOMDebugger.removeInstrumentationBreakpoint({eventName:s})}}function r(s,o,a){let u=o===void 0?"*":typeof o=="string"?[o]:o;return{id:"listener:"+s,title:a||s,group:"",details:c=>{let l=(c.targetName||"*").toLowerCase();return{short:l+"."+s,long:qt.t('Paused on event listener breakpoint "{0}", triggered on "{1}"',s,l)}},apply:async(c,l)=>{let p=!0;for(let f of u)l?p=p&&!!await c.DOMDebugger.setEventListenerBreakpoint({eventName:s,targetName:f}):p=p&&!!await c.DOMDebugger.removeEventListenerBreakpoint({eventName:s,targetName:f});return p}}}t("Animation",[e("requestAnimationFrame",qt.t("Request Animation Frame")),e("cancelAnimationFrame",qt.t("Cancel Animation Frame")),e("requestAnimationFrame.callback",qt.t("Animation Frame Fired"))]),t("Canvas",[e("canvasContextCreated",qt.t("Create canvas context")),e("webglErrorFired",qt.t("WebGL Error Fired")),e("webglWarningFired",qt.t("WebGL Warning Fired"))]),t("Script",[e("scriptFirstStatement",qt.t("Script First Statement")),e("scriptBlockedByCSP",qt.t("Script Blocked by Content Security Policy"))]),t("Geolocation",[e("Geolocation.getCurrentPosition","getCurrentPosition"),e("Geolocation.watchPosition","watchPosition")]),t("Notification",[e("Notification.requestPermission","requestPermission")]),t("Parse",[e("Element.setInnerHTML",qt.t("Set innerHTML")),e("Document.write","document.write")]),t("Timer",[e("setTimeout"),e("clearTimeout"),e("setInterval"),e("clearInterval"),e("setTimeout.callback",qt.t("setTimeout fired")),e("setInterval.callback",qt.t("setInterval fired"))]),t("Window",[e("DOMWindow.close","window.close")]),t("WebAudio",[e("audioContextCreated",qt.t("Create AudioContext")),e("audioContextClosed",qt.t("Close AudioContext")),e("audioContextResumed",qt.t("Resume AudioContext")),e("audioContextSuspended",qt.t("Suspend AudioContext"))]);let i=["audio","video"];t("Media",[r("play",i),r("pause",i),r("playing",i),r("canplay",i),r("canplaythrough",i),r("seeking",i),r("seeked",i),r("timeupdate",i),r("ended",i),r("ratechange",i),r("durationchange",i),r("volumechange",i),r("loadstart",i),r("progress",i),r("suspend",i),r("abort",i),r("error",i),r("emptied",i),r("stalled",i),r("loadedmetadata",i),r("loadeddata",i),r("waiting",i)]),t("Picture-in-Picture",[r("enterpictureinpicture","video"),r("leavepictureinpicture","video"),r("resize","PictureInPictureWindow")]),t("Clipboard",[r("copy"),r("cut"),r("paste"),r("beforecopy"),r("beforecut"),r("beforepaste")]),t("Control",[r("resize"),r("scroll"),r("zoom"),r("focus"),r("blur"),r("select"),r("change"),r("submit"),r("reset")]),t("Device",[r("deviceorientation"),r("devicemotion")]),t("DOM Mutation",[r("DOMActivate"),r("DOMFocusIn"),r("DOMFocusOut"),r("DOMAttrModified"),r("DOMCharacterDataModified"),r("DOMNodeInserted"),r("DOMNodeInsertedIntoDocument"),r("DOMNodeRemoved"),r("DOMNodeRemovedFromDocument"),r("DOMSubtreeModified"),r("DOMContentLoaded")]),t("Drag / drop",[r("drag"),r("dragstart"),r("dragend"),r("dragenter"),r("dragover"),r("dragleave"),r("drop")]),t("Keyboard",[r("keydown"),r("keyup"),r("keypress"),r("input")]),t("Load",[r("load"),r("beforeunload"),r("unload"),r("abort"),r("error"),r("hashchange"),r("popstate")]),t("Mouse",[r("auxclick"),r("click"),r("dblclick"),r("mousedown"),r("mouseup"),r("mouseover"),r("mousemove"),r("mouseout"),r("mouseenter"),r("mouseleave"),r("mousewheel"),r("wheel"),r("contextmenu")]),t("Pointer",[r("pointerover"),r("pointerout"),r("pointerenter"),r("pointerleave"),r("pointerdown"),r("pointerup"),r("pointermove"),r("pointercancel"),r("gotpointercapture"),r("lostpointercapture")]),t("Touch",[r("touchstart"),r("touchmove"),r("touchend"),r("touchcancel")]),t("Worker",[r("message"),r("messageerror")]);let n=["xmlhttprequest","xmlhttprequestupload"];return t("XHR",[r("readystatechange",n),r("load",n),r("loadstart",n),r("loadend",n),r("abort",n),r("error",n),r("progress",n),r("timeout",n)]),mb}var oC=nc(function(t,e){let r=" ".repeat(e),i=`
`;function n(o){if(o instanceof Uint8Array)return Uint8Array;if(o instanceof Uint8ClampedArray)return Uint8ClampedArray;if(o instanceof Uint16Array)return Uint16Array;if(o instanceof Uint32Array)return Uint32Array;if(o instanceof BigUint64Array)return BigUint64Array;if(o instanceof Int8Array)return Int8Array;if(o instanceof Int32Array)return Int32Array;if(o instanceof BigInt64Array)return BigInt64Array;if(o instanceof Float32Array)return Float32Array;if(o instanceof Float64Array)return Float64Array}function s(o,a=0,u=[]){switch(typeof o){case"bigint":return`${o}n`;case"boolean":return o.toString();case"function":{let p=o.toString().replace(/^[^\s]+\(/,"function(").split(/\r?\n/g),f=/^$/;for(let h of p){let g=/^[ \t]+/.exec(h);if(g){f=new RegExp(`^[ \\t]{0,${g[0].length}}`);break}}return p.map((h,g)=>g===0?h:(h=h.replace(f,""),g===p.length-1?r.repeat(a)+h:r.repeat(a+1)+h)).join(i)}case"number":return`${o}`;case"object":if(o===null)return"null";if(u.includes(o))return"[Circular]";if(o instanceof Date)return`"${o.toISOString()}"`;if(typeof Node!="undefined"&&t instanceof Node)return t.outerHTML;let c=n(o);if(c)return`new ${c.name}([${o.join(", ")}])`;if(o instanceof ArrayBuffer)return`new Uint8Array([${new Uint8Array(o).join(", ")}]).buffer`;if(o instanceof Array)return["[",...o.map(p=>r.repeat(a+1)+s(p,a+1,[...u,o])+","),r.repeat(a)+"]"].join(i);let l=o;return["{",...Object.keys(l).map(p=>r.repeat(a+1)+(/^[$a-z_][0-9a-z_$]*$/i.test(p)?p:JSON.stringify(p))+": "+s(l[p],a+1,[...u,o])+","),r.repeat(a)+"}"].join(i);case"string":return JSON.stringify(o);case"symbol":return o.toString();case"undefined":return"undefined";default:return String(o)}}try{return s(t)}catch(o){return""+t}}),r3=Ur(`
  function(spaces2) {
    const result = ${oC.expr("this","spaces2")};
    return result;
  }
`);var ja=S(Se());var vc=S(Y());var i3=Ur(function(){let t={__proto__:this.__proto__},e=Object.getOwnPropertyNames(this);for(let r=0;r<e.length;++r){let i=e[r],n=i>>>0;if(String(n>>>0)===i&&n>>>0!==4294967295)continue;let s=Object.getOwnPropertyDescriptor(this,i);s&&Object.defineProperty(t,i,s)}return t});var n3=Ur(function(t,e){let r={},i=t===-1?0:t,n=e===-1?this.length:t+e;for(let s=i;s<n&&s<this.length;++s){let o=Object.getOwnPropertyDescriptor(this,s);o&&Object.defineProperty(r,s,o)}return r});var s3=nc(function(t,e){let r={},i="<<default preview>>";if(typeof this!="object"||!this)return r;for(let[n,s]of Object.entries(this)){if(e)try{let o=e.call(s,i);if(o!==i){r[n]=String(o);continue}}catch(o){r[n]=`<<indescribable>>${JSON.stringify([String(o),n])}`;continue}if(typeof s=="object"&&s&&!String(s.toString).includes("[native code]")){let o=String(s);if(!o.startsWith("[object ")){r[n]=o.length>=t?o.slice(0,t)+"\u2026":o;continue}}}return r}),o3=nc(function(t,e){if(e)try{let r="<<default preview>>",i=e.call(this,r);if(i!==r)return String(i)}catch(r){return`<<indescribable>>${JSON.stringify([String(r),"object"])}`}if(typeof this=="object"&&this&&!String(this.toString).includes("[native code]")){let r=String(this);if(!r.startsWith("[object "))return r.length>=t?r.slice(0,t)+"\u2026":r}});var a3=Ur(function(t){return t.call(this)});var u3=Ur(function(t,e){let{buffer:r,byteLength:i,byteOffset:n}=this instanceof ArrayBuffer?new DataView(this):this instanceof WebAssembly.Memory?new DataView(this.buffer):this,s=n+Math.min(t,i),o=Math.max(0,Math.min(e,i-t));return a(new Uint8Array(r,s,o));function a(u){let c="0123456789abcdef",l="";for(let p=0;p<u.length;p++){let f=u[p];l+=c[f>>>4]+c[f&15]}return l}});var c3=Ur(function(t,e){let r=u(e),{buffer:i,byteLength:n,byteOffset:s}=this instanceof ArrayBuffer?new DataView(this):this instanceof WebAssembly.Memory?new DataView(this.buffer):this,o=s+Math.min(t,n),a=Math.max(0,Math.min(r.length,n-t));return new Uint8Array(i,o,a).set(r.subarray(0,a)),a;function u(c){let l=new Uint8Array(c.length>>>1);for(let p=0;p<c.length;p+=2)l[p>>>1]=parseInt(c.slice(p,p+2),16);return l}});var HC=(()=>{let t=0,e=2147483647-1;return()=>t++%e+1})(),yC=t=>{if(typeof t=="string")return{value:t};let e=t;return e.objectId?{objectId:e.objectId}:e.unserializableValue?{unserializableValue:e.unserializableValue}:{value:e.value}},tue=new Set(["typedarray","dataview","arraybuffer","webassemblymemory"]);var f3=1024,rue=/^[$a-z_][0-9a-z_$]*$/i,iue=/^#[0-9a-z_$]+$/i,nue=t=>t.hasOwnProperty("configurable"),l3=(t,e,r)=>{let i=qO(t,mv(e),r);return Ho(i)},p3="<<indescribable>>",d3=t=>{if(!t.startsWith(p3))return t;let e,r;try{[e,r]=JSON.parse(t.slice(p3.length))}catch(i){return t}return ja.t("{0} (couldn't describe: {1})",e,r)},aC=t=>!!t&&typeof t=="object"&&"readMemory"in t&&"writeMemory"in t,Fp=class{constructor(e,r,i,n,s,o,a){this.cdp=e;this.parent=r;this.vars=n;this.locationProvider=s;this.currentRef=o;this.settings=a;this.name=i.name,this.presentationHint=i.presentationHint,this.sortOrder=i.sortOrder||0}get customDescriptionGenerator(){return this.settings.customDescriptionGenerator}createVariable(e,r,...i){var s;let n=new e(new Fp(this.cdp,(s=this.currentRef)==null?void 0:s.call(this),r,this.vars,this.locationProvider,()=>n,this.settings),...i);return n.id>0&&this.vars.add(n),n}createVariableByType(e,r,i){return iC(r)?this.createVariable(yb,e,r):r.objectId&&!rC.has(r.subtype)?this.createVariable(Hb,e,r,i):this.createVariable(dn,e,r)}async createObjectPropertyVars(e,r){var c,l;let i=[];if(this.settings.customPropertiesGenerator){let{result:p,errorDescription:f}=await this.evaluateCodeForObject(e,this.settings.customPropertiesGenerator,[]);p&&p.type!=="undefined"?e=p:i.push([this.createVariable(pC,{name:"",sortOrder:-1},p,(p==null?void 0:p.description)||f||ja.t("Unknown error"))])}if(!e.objectId)return[];r&&this.cdp.DotnetDebugger.setEvaluationOptions({options:r,type:"variable"});let[n,s,o]=await Promise.all([this.cdp.Runtime.getProperties({objectId:e.objectId,accessorPropertiesOnly:!0,ownProperties:!1,generatePreview:!0}),this.cdp.Runtime.getProperties({objectId:e.objectId,ownProperties:!0,generatePreview:!0}),this.cdp.Runtime.callFunctionOn({functionDeclaration:s3.decl(`${f3}`,this.settings.customDescriptionGenerator||"null"),objectId:e.objectId,throwOnSideEffect:!0,returnByValue:!0}).then(p=>(p==null?void 0:p.result.value)||{}).catch(()=>({}))]);if(!n||!s)return[];let a=new Map,u=[];for(let p of n.result){if(p.symbol){u.push(p);continue}p.name==="__proto__"&&((c=s.internalProperties)!=null&&c.some(f=>f.name==="[[Prototype]]"))||a.set(p.name,p)}for(let p of s.result)p.get||p.set||(p.symbol?u.push(p):a.set(p.name,p));for(let p of[a.values(),u.values()])for(let f of p)i.push(this.createPropertyVar(f,e,o!=null&&o.hasOwnProperty(f.name)?d3(o[f.name]):void 0));for(let p of(l=s.privateProperties)!=null?l:[])i.push(this.createPropertyVar(p,e,void 0,{presentationHint:{visibility:"private"},sortOrder:1}));for(let p of s.internalProperties||[]){if(p.name==="[[StableObjectId]]")continue;let f;p.name==="[[FunctionLocation]]"&&p.value&&p.value.subtype==="internal#location"?f=this.createVariable(lC,{name:p.name,presentationHint:{visibility:"internal",attributes:["readOnly"]},sortOrder:2},p.value):p.value!==void 0&&(f=this.createVariableByType({name:p.name,presentationHint:{visibility:"internal"},sortOrder:2},p.value)),f&&i.push([f])}return Wu(await Promise.all(i))}async createPropertyVar(e,r,i,n){let s=[],o=e.get&&e.get.type!=="undefined",a=e.set&&e.set.type!=="undefined",u={name:e.name,presentationHint:{},sortOrder:0,...n};return n||(nue(e)?(e.enumerable===!1&&!o&&(u.presentationHint.visibility="internal",u.sortOrder=1),(e.writable===!1||o&&!a)&&(u.presentationHint.attributes=["readOnly"])):(u.presentationHint.visibility="private",u.sortOrder=1)),"value"in e&&e.value&&s.push(this.createVariableByType(u,e.value,i)),o?s.push(this.createVariable(mC,u,e.get,r)):a&&s.push(this.createVariable(hC,u,e.set)),s}async evaluateCodeForObject(e,r,i){try{let n=await this.cdp.Runtime.callFunctionOn({objectId:e.objectId,functionDeclaration:r,arguments:i.map(yC)});if(n){if(n.exceptionDetails===void 0)return{result:n.result};if(n&&n.result.description)return{errorDescription:n.result.description}}return{errorDescription:ja.t("Unknown error")}}catch(n){return{errorDescription:n.stack||n.message||String(n)}}}},dn=class{constructor(e,r){this.context=e;this.remoteObject=r;this.id=HC()}get name(){return this.context.name}get sortOrder(){return this.context.sortOrder}get accessor(){let{parent:e,name:r}=this.context;return!e||e instanceof bc?this.context.name:e instanceof Em?e.accessor:typeof r=="number"||/^[0-9]+$/.test(r)?`${e.accessor}[${r}]`:rue.test(r)?`${e.accessor}.${r}`:e.accessor==="this"&&iue.test(r)?`${e.accessor}.${r}`:`${e.accessor}[${JSON.stringify(r)}]`}async toDap(e,r){let i=this.context.name;return this.context.parent instanceof bc&&(i=await this.context.parent.getRename(i)),Promise.resolve({name:i,value:Hc(this.remoteObject,e,r),evaluateName:this.accessor,type:this.remoteObject.type,variablesReference:0,presentationHint:this.context.presentationHint})}async setProperty(e,r){let i=await this.context.cdp.Runtime.callFunctionOn({objectId:this.remoteObject.objectId,functionDeclaration:`function(a) { return this[a] = ${r}; ${Rt()} }`,arguments:[yC(e)],silent:!0});if(!i)throw new ne(ot(ja.t("Unable to set variable value")));if(i.exceptionDetails)throw new ne(h3(i.exceptionDetails));return this.context.createVariableByType({name:e},i.result)}async getChildren(e){return Promise.resolve([])}},gb=class{constructor(e){this.child=e;this.id=HC()}getChildren(){return Promise.resolve([this.child])}},uC=class extends dn{constructor(r,i,n,s){var o,a;super(r,{type:(a=(o=n[0])==null?void 0:o.type)!=null?a:"string"});this.value=i;this.args=n;this.stackTrace=s}toDap(){return Promise.resolve({name:this.context.name,value:this.value,variablesReference:this.stackTrace||this.args.some(gc)?this.id:0})}getChildren(r){let i=[],{args:n,stackTrace:s}=this;for(let o=0;o<n.length;++o)gc(n[o])&&i.push(this.context.createVariableByType({name:`arg${o}`,sortOrder:o},n[o]));return s&&i.push(this.context.createVariable(cC,{name:"",sortOrder:Number.MAX_SAFE_INTEGER},this.remoteObject,s)),Promise.resolve(i)}},cC=class extends dn{constructor(r,i,n){super(r,i);this.stacktrace=n}async toDap(){return{name:"",value:await this.stacktrace.format(),variablesReference:0}}},lC=class extends dn{constructor(r,i){super(r,i);this.location=i.value}async toDap(){return{name:this.context.name,value:await this.context.locationProvider.renderDebuggerLocation(this.location),variablesReference:0,presentationHint:{visibility:"internal"}}}},pC=class extends dn{constructor(r,i,n){super(r,i);this.message=n}get accessor(){if(!(this.context.parent instanceof dn))throw new Error("ErrorVariable must have a parent Variable");return this.context.parent.accessor}toDap(){return Promise.resolve({name:this.context.name,value:this.message,variablesReference:0})}},fC=Symbol("NoStringRepr"),Hb=class extends dn{constructor(r,i,n){super(r,i);this.customStringRepr=n}async toDap(r,i){let[n,s]=await Promise.all([await super.toDap(r,i),await this.getValueRepresentation(r)]);return{...n,type:this.remoteObject.className||this.remoteObject.subtype||this.remoteObject.type,variablesReference:this.id,memoryReference:tue.has(this.remoteObject.subtype)?String(this.id):void 0,value:s}}async getValueRepresentation(r){if(typeof this.customStringRepr=="string")return this.customStringRepr;if(!this.context.parent&&this.customStringRepr!==fC)try{let i=await this.context.cdp.Runtime.callFunctionOn({functionDeclaration:o3.decl(`${f3}`,this.context.customDescriptionGenerator||"null"),objectId:this.remoteObject.objectId,returnByValue:!0});if(i!=null&&i.result.value)return this.customStringRepr=d3(i.result.value)}catch(i){this.customStringRepr=fC}return this.context.name==="__proto__"&&this.remoteObject.description||Hc(this.remoteObject,r)}async readMemory(r,i){let n=await u3({cdp:this.context.cdp,args:[r,i],objectId:this.remoteObject.objectId,returnByValue:!0});return Buffer.from(n.value,"hex")}async writeMemory(r,i){return(await c3({cdp:this.context.cdp,args:[r,i.toString("hex")],objectId:this.remoteObject.objectId,returnByValue:!0})).value}getChildren(r){return this.context.createObjectPropertyVars(this.remoteObject,r.evaluationOptions)}},yb=class extends Hb{constructor(r,i){super(r,i,fC);this.length=0;let n=String(i.description).match(/\(([0-9]+)\)/);this.length=n?+n[1]:0}async toDap(r){return{...await super.toDap(r),indexedVariables:this.length>100?this.length:void 0,namedVariables:this.length>100?1:void 0}}async getChildren(r){switch(r==null?void 0:r.filter){case"indexed":return this.getArraySlots(r);case"named":return this.getArrayProperties();default:return Promise.all([this.getArrayProperties(),this.getArraySlots()]).then(Wu)}}async getArrayProperties(){try{let r=await i3({cdp:this.context.cdp,args:[],objectId:this.remoteObject.objectId,generatePreview:!0});return this.context.createObjectPropertyVars(r)}catch(r){return[]}}async getArraySlots(r){let i=r&&typeof r.start!="undefined"?r.start:-1,n=r&&typeof r.count!="undefined"?r.count:-1,s;try{s=await n3({cdp:this.context.cdp,generatePreview:!1,args:[i,n],objectId:this.remoteObject.objectId})}catch(a){return[]}let o=await this.context.createObjectPropertyVars(s);return s.objectId&&await this.context.cdp.Runtime.releaseObject({objectId:s.objectId}),o}},dC=class extends yb{async toDap(e){return this.remoteObject.preview?{...await super.toDap(e),name:Y2(this.remoteObject.preview)}:super.toDap(e)}},Em=class extends dn{constructor(e,r){super(e,r)}getChildren(e){return this.context.createObjectPropertyVars(this.remoteObject)}},hC=class extends Em{async toDap(e,r){return{...await super.toDap(e,r),value:"write-only",variablesReference:this.id}}},mC=class extends Em{constructor(r,i,n){super(r,i);this.parentObject=n}async toDap(r,i){let n=await super.toDap(r,i);return n.variablesReference=this.id,n.presentationHint={...n.presentationHint,lazy:!0},n}async getChildren(r){try{let i=await a3({cdp:this.context.cdp,objectId:this.parentObject.objectId,args:[new Vh(this.remoteObject.objectId)]});return[this.context.createVariableByType({name:this.name,presentationHint:this.context.presentationHint},i)]}catch(i){if(!(i instanceof Xl))throw i}return super.getChildren(r)}},bc=class{constructor(e,r,i,n,s){this.remoteObject=e;this.context=r;this.ref=i;this.extraProperties=n;this.renameProvider=s;this.id=HC()}async getChildren(e){let r=await this.context.createObjectPropertyVars(this.remoteObject),i=new Set(r.map(n=>n.name));for(let n of this.extraProperties)i.has(n.name)||r.push(this.context.createVariableByType({name:n.name},n.value));return r}async getRename(e){return(await this.renameProvider.provideOnStackframe(this.ref.stackFrame)).getOriginalName(e,this.ref.stackFrame.rawPosition)||e}async setProperty(e,r){let i=await this.context.cdp.Debugger.evaluateOnCallFrame({expression:`${r} ${Rt()}`,callFrameId:this.ref.callFrameId});if(!i)throw new ne(at(ja.t("Invalid expression")));if(i.exceptionDetails)throw new ne(h3(i.exceptionDetails));return await this.context.cdp.Debugger.setVariableValue({callFrameId:this.ref.callFrameId,scopeNumber:this.ref.scopeNumber,variableName:e,newValue:yC(i.result)}),this.context.createVariableByType({name:e},i.result)}},gC=class{constructor(){this.value=new Map}get(e){return this.value.get(e)}add(e){this.value.set(e.id,e)}clear(){this.value.clear()}},Ua=class{constructor(e,r,i,n,s){this.renameProvider=e;this.cdp=r;this.dap=i;this.launchConfig=n;this.locationProvider=s;this.vars=new gC;this.contextSettings={customDescriptionGenerator:n.customDescriptionGenerator&&l3(["defaultValue"],n.customDescriptionGenerator,!1),customPropertiesGenerator:n.customPropertiesGenerator&&l3([],n.customPropertiesGenerator,!1)}}createDetached(){return new Ua(this.renameProvider,this.cdp,this.dap,this.launchConfig,this.locationProvider)}clear(){this.vars.clear()}createFloatingVariable(e,r){return this.createFloatingContext().createVariableByType({name:e},r)}createVariableForOutput(e,r,i,n){let s=this.createFloatingContext(),o=r.length===1&&n==="table"?s.createVariable(dC,{name:""},r[0]):r.length===1&&gc(r[0])&&!i?s.createVariableByType({name:""},r[0]):s.createVariable(uC,{name:""},e,r,i),a=new gb(o);return this.vars.add(a),a}createScope(e,r,i){let n=new bc(e,new Fp(this.cdp,void 0,{name:""},this.vars,this.locationProvider,()=>n,this.contextSettings),r,i,this.renameProvider);return this.vars.add(n),n}hasVariable(e){return!!this.vars.get(e)}hasMemory(e){return aC(this.vars.get(Number(e)))}async readMemory(e,r,i){let n=this.vars.get(Number(e));return aC(n)?n.readMemory(r,i):void 0}async writeMemory(e,r,i){let n=this.vars.get(Number(e)),s=aC(n)?await n.writeMemory(r,i):0;return s>0&&this.dap.invalidated({areas:["variables"]}),s}async getVariableNames(e){let r=this.vars.get(e.variablesReference);return r?(await r.getChildren(e)).filter(qu(dn)).map(n=>n.name):[]}async getVariables(e){let r=this.vars.get(e.variablesReference);if(!r)return[];let i=await r.getChildren(e);return(await Promise.all(i.map(s=>s.toDap(r instanceof bc||r instanceof gb?"repl":"propertyValue",e.format).then(o=>({v:s,dap:o}))))).sort((s,o)=>s.v.sortOrder-o.v.sortOrder||+s.dap.name-+o.dap.name||s.dap.name.localeCompare(o.dap.name)).map(s=>s.dap)}async setVariable(e){let r=this.vars.get(e.variablesReference);if(!e.value)throw new ne(at(ja.t("Cannot set an empty value")));if(r instanceof bc||r instanceof dn)return await(await r.setProperty(e.name,e.value)).toDap("propertyValue",e.format);throw new ne(ot(ja.t("Variable not found")))}createFloatingContext(){return new Fp(this.cdp,void 0,{name:"<unnamed>"},this.vars,this.locationProvider,void 0,this.contextSettings)}};Ua=k([(0,vc.injectable)(),A(0,(0,vc.inject)(Ta)),A(1,(0,vc.inject)(Mt)),A(2,(0,vc.inject)(rn)),A(3,(0,vc.inject)(Ke))],Ua);function h3(t){let e=t.exception&&yc(t.exception).title||t.text;return at(e)}var vC=class{constructor(e){this.description=e;this.sourceMapLoads=new Map;this.scripts=[]}get isDefault(){return this.description.auxData&&this.description.auxData.isDefault}async remove(e){await Promise.all(this.scripts.map(async r=>{let i=await r.source;i.filterScripts(n=>n.executionContextId!==this.description.id),i.scripts.length||e.removeSource(i)}))}},bC=class{constructor(e){this._obj=e;this._dapDeferred=Je()}resolve(){this._dapDeferred.resolve(this._obj)}with(e){return this._dapDeferred.hasSettled()?e(this._obj):this._dapDeferred.promise.then(r=>e(r))}},oue=50,m3=(t,e)=>t.sourceReference===e.sourceReference&&wv(t.path||"",e.path||""),aue=()=>`
//# sourceURL=eval-${(0,g3.randomBytes)(4).toString("hex")}${".repl"}
`,qa=class{constructor(e,r,i,n,s,o,a,u,c,l,p,f,h,g){this.target=n;this.logger=o;this.evaluator=a;this.completer=u;this.launchConfig=c;this._breakpointManager=l;this.console=p;this.exceptionPause=f;this._smartStepper=h;this.shutdown=g;this._executionContexts=new Map;this._excludedCallers=[];this._onPausedEmitter=new X;this.disposed=!1;this.debuggerReady=Je();this.onPaused=this._onPausedEmitter.event;this._dap=new bC(i),this._sourceContainer=e,this._cdp=r,this.id=qa._lastThreadId++,this.replVariables=new Ua(s,this._cdp,i,c,this),e.onSourceMappedSteppingChange(()=>this.refreshStackTrace()),this._initialize()}setExcludedCallers(e){this._excludedCallers=e}cdp(){return this._cdp}name(){return this.target.name()}pausedDetails(){return this._pausedDetails}pausedVariables(){return this._pausedVariables}defaultExecutionContext(){for(let e of this._executionContexts.values())if(e.isDefault)return e}async resume(){return this._sourceContainer.clearDisabledSourceMaps(),!await this._cdp.Debugger.resume({})&&this._pausedDetails!==void 0?ot(We.t("Unable to resume")):{allThreadsContinued:!1}}async pause(){return this._expectedPauseReason={reason:"pause"},await this._cdp.Debugger.pause({})?{}:ot(We.t("Unable to pause"))}async stepOver(){return this._expectedPauseReason={reason:"step",direction:1},await this._cdp.Debugger.stepOver({})?{}:ot(We.t("Unable to step next"))}async stepInto(e){var i,n;this._waitingForStepIn={lastDetails:this._pausedDetails},this._expectedPauseReason={reason:"step",direction:0};let r=(n=(i=this._pausedDetails)==null?void 0:i.stepInTargets)==null?void 0:n[e];if(r){let s=await this._cdp.Debugger.setBreakpoint({location:r.breakLocation});if(this._waitingForStepIn.intoTargetBreakpoint=s==null?void 0:s.breakpointId,await this._cdp.Debugger.resume({}))return{}}else if(await this._cdp.Debugger.stepInto({breakOnAsyncCall:!0}))return{};return ot(We.t("Unable to step in"))}async stepOut(){return this._expectedPauseReason={reason:"step",direction:2},await this._cdp.Debugger.stepOut({})?{}:ot(We.t("Unable to step out"))}_stackFrameNotFoundError(){return ot(We.t("Stack frame not found"))}_evaluateOnAsyncFrameError(){return ot(We.t("Unable to evaluate on async stack frame"))}async restartFrame(e){var s;let r=(s=this._pausedDetails)==null?void 0:s.stackTrace.frame(e.frameId);if(!r)return this._stackFrameNotFoundError();let i=r.callFrameId();return i?await this._cdp.Debugger.restartFrame({callFrameId:i,mode:"StepInto"})?(this._expectedPauseReason={reason:"frame_entry",description:We.t("Paused on frame entry")},r.canExplicitlyBeRestarted||await this._cdp.Debugger.stepInto({}),{}):at(We.t("Frame could not be restarted")):at(We.t("Cannot restart asynchronous frame"))}async stackTrace(e){return this._pausedDetails?this._pausedDetails.stackTrace.toDap(e):ot(We.t("Thread is not paused"))}async scopes(e){let r=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0;return r?r.scopes():this._stackFrameNotFoundError()}async exceptionInfo(){let e=this._pausedDetails&&this._pausedDetails.exception;if(!e)return ot(We.t("Thread is not paused on exception"));let r=yc(e);return{exceptionId:r.title,breakMode:"all",details:{stackTrace:r.stackTrace,evaluateName:void 0}}}async revealPage(){return this._cdp.Page.bringToFront({}),{}}async completions(e){let r;if(e.frameId!==void 0){if(r=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0,!r)return this._stackFrameNotFoundError();if(!r.callFrameId())return this._evaluateOnAsyncFrameError()}if(e.line===1&&e.text.startsWith("cd "))return{targets:this.getExecutionContextCompletions(e)};let i=await this.completer.completions({executionContextId:this._selectedContext?this._selectedContext.description.id:void 0,stackFrame:r,expression:e.text,position:new Ri(e.line||1,e.column)});return{targets:[...this.getExecutionContextCompletions(e),...i]}}getExecutionContextCompletions(e){if(e.line&&e.line>1)return[];let r=e.text.slice(0,e.column).trim();return[...this._executionContexts.values()].map(i=>`cd ${this.target.executionContextName(i.description)}`).filter(i=>i.startsWith(r)).map(i=>({label:i,start:0,length:e.text.length}))}async evaluate(e){let r,i;if(e.frameId!==void 0){if(i=this._pausedDetails?this._pausedDetails.stackTrace.frame(e.frameId):void 0,!i)throw new ne(this._stackFrameNotFoundError());if(r=i.callFrameId(),!r)throw new ne(this._evaluateOnAsyncFrameError())}if(e.context==="repl"&&e.expression.startsWith("cd ")){let c=e.expression.substring(3).trim();for(let l of this._executionContexts.values())if(this.target.executionContextName(l.description)===c)return this._selectedContext=l,{result:`[${c}]`,variablesReference:0}}let n=e.context==="clipboard"?{expression:oC.expr(e.expression,"2"),includeCommandLineAPI:!0,returnByValue:!0,objectGroup:"console"}:{expression:e.expression,includeCommandLineAPI:!0,objectGroup:"console",generatePreview:!0,timeout:e.context==="hover"?this.getHoverEvalTimeout():void 0};if(e.context==="repl"){if(n.expression=Wh(n.expression),n.expression.indexOf("await")!==-1){let c=YO(n.expression);c&&(n.expression=c,n.awaitPromise=!0)}n.expression+=aue()}e.evaluationOptions&&this.cdp().DotnetDebugger.setEvaluationOptions({options:e.evaluationOptions,type:"evaluation"});let s=this.evaluator.evaluate(r?{...n,callFrameId:r}:{...n,contextId:this._selectedContext?this._selectedContext.description.id:void 0},{isInternalScript:!1,stackFrame:i});if(e.context==="repl")return await this._evaluateRepl(e,s,e.format);let o=await s;if(!o)throw new ne(ot(We.t("Unable to evaluate")));if(o.exceptionDetails){let c=o.exceptionDetails.exception?yc(o.exceptionDetails.exception).title:o.exceptionDetails.text;throw c.startsWith("Uncaught")||(c="Uncaught "+c),new ne(ot(c))}let a=r?this._pausedVariables:this.replVariables;if(!a)throw new ne(ot(We.t("Unable to evaluate")));let u=await a.createFloatingVariable(n.expression,o.result).toDap(e.context,e.format);return{type:o.result.type,result:u.value,variablesReference:u.variablesReference,namedVariables:u.namedVariables,indexedVariables:u.indexedVariables,memoryReference:u.memoryReference}}getHoverEvalTimeout(){var r;let e=(r=this.launchConfig.timeouts)==null?void 0:r.hoverEvaluation;if(e===void 0)return 500;if(!(e<=0))return e}async _evaluateRepl(e,r,i){let n=await r;if(!n)return{result:"",variablesReference:0};if(n.exceptionDetails){let u=await new Sm(n.exceptionDetails).toDap(this);throw new ne(CM(u.output))}let s=this._selectedContext&&this.defaultExecutionContext()!==this._selectedContext?`\x1B[33m[${this.target.executionContextName(this._selectedContext.description)}] `:"",o=await this.replVariables.createFloatingVariable(e.expression,n.result).toDap("repl",i),a=lb("repl").budget;return o.variablesReference===0&&o.value.length===a&&setImmediate(()=>this.console.enqueue(this,{toDap:()=>({output:We.t("Output has been truncated to the first {0} characters. Run `{1}` to copy the full output.",a,`copy(${e.expression.trim()}))`),category:"stdout"})})),{...o,result:`${s}${o.value}`}}_initialize(){this._cdp.Runtime.on("executionContextCreated",e=>{this._executionContextCreated(e.context)}),this._cdp.Runtime.on("executionContextDestroyed",e=>{this._executionContextDestroyed(e.executionContextId)}),this._cdp.Runtime.on("executionContextsCleared",()=>{this.launchConfig.noDebug||this._ensureDebuggerEnabledAndRefreshDebuggerId(),this.replVariables.clear(),this._executionContextsCleared()}),this._cdp.Inspector.on("targetReloadedAfterCrash",()=>{this._breakpointManager.reapply()}),this.launchConfig.outputCapture==="console"&&(this._cdp.Runtime.on("consoleAPICalled",e=>{this.console.dispatch(this,e)}),this._cdp.Runtime.on("exceptionThrown",e=>{this.console.enqueue(this,new Sm(e.exceptionDetails))})),this._cdp.Runtime.on("inspectRequested",e=>{e.hints.copyToClipboard?this._copyObjectToClipboard(e.object):e.hints.queryObjects?this.console.enqueue(this,new hb(e.object,this.cdp())):this._revealObject(e.object)}),this._cdp.Debugger.on("paused",async e=>this._onPaused(e)),this._cdp.Debugger.on("resumed",()=>this.onResumed()),this._cdp.Debugger.on("scriptParsed",e=>this._onScriptParsed(e)),this._cdp.Debugger.on("scriptFailedToParse",e=>this._onScriptParsed(e)),this._cdp.Runtime.enable({}),this._cdp.Profiler.enable({}),this.launchConfig.noDebug?this.logger.info("runtime.launch","Running with noDebug, so debug domains are disabled"):this._ensureDebuggerEnabledAndRefreshDebuggerId(),this.target.initialize(),this._dap.with(e=>e.thread({reason:"started",threadId:this.id}))}dapInitialized(){this._dap.resolve()}async getStepInTargets(e){var l,p;let r=this._pausedDetails;if(!r)return[];let i=r.stackTrace.frames.find(f=>f.frameId===e);if(!(i instanceof Wt))return[];let n=await i.uiLocation();if(!n)return[];let s=r.event.callFrames[0].location,[o,a]=await Promise.all([this._breakpointManager.getBreakpointLocations(this,n.source,new Ri(n.lineNumber,1),new Ri(n.lineNumber+1,1)).then(f=>f.filter(h=>h.breakLocation.lineNumber!==s.lineNumber||h.breakLocation.columnNumber!==s.columnNumber)),n.source.content()]),u=((l=r.stepInTargets)==null?void 0:l.length)||0;r.stepInTargets=((p=r.stepInTargets)==null?void 0:p.concat(o))||o;let c=a&&new Aa(a);return o.map((f,h)=>{let g=f.uiLocations.find(v=>v.source===n.source);if(!g)return;if(!c)return{id:u+h,label:`Column ${g}`,line:g.lineNumber,column:g.columnNumber};let H=ZO(a.slice(c.getLineOffset(g.lineNumber-1),c.getLineOffset(g.lineNumber)),g.columnNumber-1);if(H)return{id:u+h,label:H.text,line:g.lineNumber,column:H.start+1,endLine:g.lineNumber,endColumn:H.end+1}}).filter(kt)}async refreshStackTrace(){this._pausedDetails&&(this._pausedDetails=this._createPausedDetails(this._pausedDetails.event),this._onThreadResumed(),await this._onThreadPaused(this._pausedDetails))}_executionContextCreated(e){let r=new vC(e);this._executionContexts.set(e.id,r)}_executionContextDestroyed(e){let r=this._executionContexts.get(e);r&&(this._executionContexts.delete(e),r.remove(this._sourceContainer))}_executionContextsCleared(){this._removeAllScripts(),this._breakpointManager.executionContextWasCleared(),this._pausedDetails&&this.onResumed(),this._executionContexts.clear()}_ensureDebuggerEnabledAndRefreshDebuggerId(){this._cdp.Debugger.enable({}).then(e=>{this.debuggerReady.resolve(),e&&qa._allThreadsByDebuggerId.set(e.debuggerId,this)}),this.exceptionPause.apply(this._cdp)}async _onPaused(e){var l,p,f,h,g,H,v,w;let r=((l=e.hitBreakpoints)!=null?l:[]).filter(T=>T!==this._pauseOnSourceMapBreakpointId),i=e.reason==="Break on start"||e.reason==="debugCommand",n=(p=e.callFrames[0])==null?void 0:p.location,s=((f=e.data)==null?void 0:f.scriptId)||(n==null?void 0:n.scriptId),o=e.reason==="instrumentation"&&((h=e.data)==null?void 0:h.scriptId)||s&&this._breakpointManager.isEntrypointBreak(r,s);if(this.evaluator.setReturnedValue((g=e.callFrames[0])==null?void 0:g.returnValue),o){if(this.launchConfig.perScriptSourcemaps==="auto"&&this._shouldEnablePerScriptSms(e)&&await this._enablePerScriptSourcemaps(),e.data&&!i&&(e.data.__rewriteAs="breakpoint"),!(s&&await this._handleSourceMapPause(s,n))){if(!i){if(await this.isCrossThreadStep(e))e.data={...e.data,__rewriteAs:"step"};else if(!await this._breakpointManager.shouldPauseAt(e,r,this.target.entryBreakpoint,!0))return((H=this._expectedPauseReason)==null?void 0:H.reason)==="step"&&this._expectedPauseReason.direction===1?this._cdp.Debugger.stepOut({}):this.resume()}}}else if(!(e.reason==="exception"||e.reason==="promiseRejection"?await this.exceptionPause.shouldPauseAt(e):await this._breakpointManager.shouldPauseAt(e,r,this.target.entryBreakpoint,!1)))return this.resume();let a=(v=this._waitingForStepIn)==null?void 0:v.intoTargetBreakpoint;if(a){(w=e.hitBreakpoints)!=null&&w.includes(a)?(this._waitingForStepIn.intoTargetBreakpoint=void 0,await this._cdp.Debugger.removeBreakpoint({breakpointId:a}),await this._cdp.Debugger.stepInto({breakOnAsyncCall:!1})):this.resume();return}if(i&&("continueOnAttach"in this.launchConfig&&this.launchConfig.continueOnAttach||this.launchConfig.type==="pwa-extensionHost"||this.target instanceof Np)){this.resume();return}let u=this._pausedDetails=this._createPausedDetails(e);if(this._excludedCallers.length&&await this._matchesExcludedCaller(this._pausedDetails.stackTrace)){this.logger.info("runtime","Skipping pause due to excluded caller"),this.resume();return}let c=await this._smartStepper.getSmartStepDirection(u,this._expectedPauseReason);if(this._pausedDetails===u){switch(c){case 0:return this.stepInto();case 2:return this.stepOut();case 1:return this.stepOver();default:}this._waitingForStepIn=void 0,this._pausedVariables=this.replVariables.createDetached(),await this._onThreadPaused(u)}}async _matchesExcludedCaller(e){var a;if(!this._excludedCallers.length)return!1;let r=e.frames[0],i=r instanceof Wt&&await r.uiLocation();if(!i)return!1;let n,s,o=[];for(let{caller:u,target:c}of this._excludedCallers)if(!(c.line!==i.lineNumber||c.column!==i.columnNumber)&&(n!=null||(n=await i.source.toDapShallow()),!!m3(n,c.source))){s||(s=await e.loadFrames(oue).then(p=>Promise.all(p.slice(1).filter(qu(Wt)).map(f=>f.uiLocation()))));for(let l=0;l<s.length;l++){let p=s[l];if(!p||p.lineNumber!==u.line||p.columnNumber!==u.column)continue;let f=(a=o[l])!=null?a:o[l]=await p.source.toDapShallow();if(m3(f,u.source))return!0}}return!1}onResumed(){this._pausedDetails=void 0,this._pausedVariables=void 0,this.evaluator.setReturnedValue(void 0),this._onThreadResumed()}async dispose(){this.disposed=!0,await this.shutdown.shutdown();for(let[e,r]of qa._allThreadsByDebuggerId)r===this&&qa._allThreadsByDebuggerId.delete(e);this._removeAllScripts(!0),this._executionContextsCleared(),await this._dap.with(e=>e.thread({reason:"exited",threadId:this.id}))}rawLocation(e){if("location"in e){let r=e;return{lineNumber:Math.max(0,r.location.lineNumber)+1,columnNumber:Math.max(0,r.location.columnNumber||0)+1,scriptId:r.location.scriptId}}return{lineNumber:Math.max(0,e.lineNumber)+1,columnNumber:Math.max(0,e.columnNumber||0)+1,scriptId:e.scriptId}}rawLocationToUiLocation(e){if(!e.scriptId||this.disposed||this.launchConfig.noDebug)return;let r=this._sourceContainer.getScriptById(e.scriptId);return r?r.resolvedSource?this._sourceContainer.preferredUiLocation({...pc(e,r.resolvedSource.runtimeScriptOffset),source:r.resolvedSource}):r.source.then(i=>this._sourceContainer.preferredUiLocation({...pc(e,i.runtimeScriptOffset),source:i})):this.rawLocationToUiLocationWithWaiting(e)}async rawLocationToUiLocationWithWaiting(e){let r=e.scriptId?await this.getScriptByIdOrWait(e.scriptId):void 0;if(!r)return;let i=await r.source;return this._sourceContainer.preferredUiLocation({...pc(e,i.runtimeScriptOffset),source:i})}getScriptById(e){return this._sourceContainer.getScriptById(e)}getScriptByIdOrWait(e,r=500){return this._sourceContainer.getScriptById(e)||this.waitForScriptId(e,r)}waitForScriptId(e,r){return new Promise(i=>{let n=this._sourceContainer.onScript(o=>{o.scriptId===e&&(i(o),n.dispose(),clearTimeout(s))}),s=setTimeout(()=>{i(void 0),n.dispose()},r)})}async renderDebuggerLocation(e){let r=this.rawLocation(e),i=await this.rawLocationToUiLocation(r);return i?`@ ${await i.source.prettyName()}:${i.lineNumber}`:`@ VM${r.scriptId||"XX"}:${r.lineNumber}`}async updateCustomBreakpoint(e,r){if(!this.target.supportsCustomBreakpoints())return;let i=Im().get(e);i&&await i.apply(this._cdp,r)}_createPausedDetails(e){var s,o;let r=e.reason==="assert"||e.reason==="exception"||e.reason==="promiseRejection"||e.reason==="other"||e.reason==="ambiguous";if((!!(e.hitBreakpoints&&e.hitBreakpoints.length)||!r)&&this._sourceContainer.clearDisabledSourceMaps(),e.hitBreakpoints&&this._sourceMapDisabler)for(let a of this._sourceMapDisabler(e.hitBreakpoints))this._sourceContainer.disableSourceMapForSource(a);let n=Bi.fromDebugger(this,e.callFrames,e.asyncStackTrace,e.asyncStackTraceId);if(((s=e.data)==null?void 0:s.__rewriteAs)==="breakpoint")return{thread:this,event:e,stackTrace:n,reason:"breakpoint",description:We.t("Paused on breakpoint")};if(((o=e.data)==null?void 0:o.__rewriteAs)==="step")return{thread:this,event:e,stackTrace:n,reason:"step",description:We.t("Paused")};switch(e.reason){case"assert":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused on assert")};case"debugCommand":return{thread:this,event:e,stackTrace:n,reason:"pause",description:We.t("Paused on debug() call")};case"DOM":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:We.t("Paused on DOM breakpoint")};case"EventListener":return this._resolveEventListenerBreakpointDetails(n,e);case"exception":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused on exception"),exception:e.data};case"promiseRejection":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused on promise rejection"),exception:e.data};case"instrumentation":return e.data&&e.data.scriptId?{thread:this,event:e,stackTrace:n,reason:"step",description:We.t("Paused")}:{thread:this,event:e,stackTrace:n,reason:"function breakpoint",description:We.t("Paused on instrumentation breakpoint")};case"XHR":return{thread:this,event:e,stackTrace:n,reason:"data breakpoint",description:We.t("Paused on XMLHttpRequest or fetch")};case"OOM":return{thread:this,event:e,stackTrace:n,reason:"exception",description:We.t("Paused before Out Of Memory exception")};default:if(e.hitBreakpoints&&e.hitBreakpoints.length){let a=!1,u=this.target.entryBreakpoint;if(u&&e.hitBreakpoints.includes(u.cdpId)){a=!0;let c=this._sourceContainer.source({path:mt(u.path)});c!==void 0&&(a=!this._sourceContainer.currentSiblingUiLocations({lineNumber:e.callFrames[0].location.lineNumber+1,columnNumber:(e.callFrames[0].location.columnNumber||0)+1,source:c}).some(p=>this._breakpointManager.hasAtLocation(p)))}return a||this._breakpointManager.registerBreakpointsHit(e.hitBreakpoints),{thread:this,event:e,stackTrace:n,hitBreakpoints:e.hitBreakpoints,reason:a?"entry":"breakpoint",description:We.t("Paused on breakpoint")}}return this._expectedPauseReason?{thread:this,event:e,stackTrace:n,description:We.t("Paused"),...this._expectedPauseReason}:{thread:this,event:e,stackTrace:n,reason:"pause",description:We.t("Paused on debugger statement")}}}_resolveEventListenerBreakpointDetails(e,r){let i=r.data,n=i&&i.eventName||"",s=Im().get(n);if(s){let o=s.details(i);return{thread:this,event:r,stackTrace:e,reason:"function breakpoint",description:o.short,text:o.long}}return{thread:this,event:r,stackTrace:e,reason:"function breakpoint",description:We.t("Paused on event listener")}}_clearDebuggerConsole(){return{category:"console",output:"\x1B[2J"}}_removeAllScripts(e=!1){this._sourceContainer.clear(e)}_onScriptParsed(e){if(e.url.endsWith(".cdp")||(jr(e.url)&&(e.url=Qe(e.url)),this._sourceContainer.getScriptById(e.scriptId)))return;e.url&&(e.url=this.target.scriptUrlToUrl(e.url));let r=this._executionContexts.get(e.executionContextId);if(!r)return;let i=async()=>{let s=this._sourceContainer.getSourceByOriginalUrl(e.url);if(e.hash&&(s==null?void 0:s.contentHash)===e.hash)return s.addScript({scriptId:e.scriptId,url:e.url,executionContextId:e.executionContextId}),s;let o=async()=>{let p=await this._cdp.Debugger.getScriptSource({scriptId:e.scriptId});return p?p.scriptSource:void 0},a=e.startLine||e.startColumn?{lineOffset:e.startLine,columnOffset:e.startColumn}:void 0,u=e.url.endsWith("#vscode-extension")?{lineOffset:2,columnOffset:0}:void 0,c;e.sourceMapURL&&(c=_r(e.sourceMapURL)?e.sourceMapURL:e.url&&_a(e.url,e.sourceMapURL)||e.url,c||this._dap.with(p=>yM(p,`Could not load source map from ${e.sourceMapURL}`)));let l=await this._sourceContainer.addSource(e.url,o,c,a,u,!e.hasSourceURL&&this.launchConfig.enableContentValidation?e.hash:void 0);return l.addScript({scriptId:e.scriptId,url:e.url,executionContextId:e.executionContextId}),l},n={url:e.url,scriptId:e.scriptId,executionContextId:e.executionContextId,source:i()};n.source.then(s=>n.resolvedSource=s),r.scripts.push(n),this._sourceContainer.addScriptById(n),e.sourceMapURL&&this._getOrStartLoadingSourceMaps(n)}async _handleSourceMapPause(e,r){this._pausedForSourceMapScriptId=e;let i=this._sourceContainer.sourceMapTimeouts().sourceMapMinPause,n=i+this._sourceContainer.sourceMapTimeouts().sourceMapCumulativePause,s=this._sourceContainer.getScriptById(e);if(!s)return this._pausedForSourceMapScriptId=void 0,!1;let o=new ti,a=await Promise.race([this._getOrStartLoadingSourceMaps(s),Oe(n)]),u=o.elapsed().ms,c=this._sourceContainer.sourceMapTimeouts().sourceMapCumulativePause-Math.max(u-i,0);this._sourceContainer.setSourceMapTimeouts({...this._sourceContainer.sourceMapTimeouts(),sourceMapCumulativePause:c}),this.logger.verbose("internal","Blocked execution waiting for source-map",{timeSpentWallClockInMs:u,sourceMapCumulativePause:c}),a||this._dap.with(f=>f.output({category:"stderr",output:We.t("WARNING: Processing source-maps of {0} took longer than {1} ms so we continued execution without waiting for all the breakpoints for the script to be set.",s.url||s.scriptId,n)})),console.assert(this._pausedForSourceMapScriptId===e),this._pausedForSourceMapScriptId=void 0;let l=(r==null?void 0:r.lineNumber)||0,p=r==null?void 0:r.columnNumber;return!!(a!=null&&a.map(La).some(f=>f.lineNumber===l&&(p===void 0||p===f.columnNumber)))}_getOrStartLoadingSourceMaps(e){let r=this._executionContexts.get(e.executionContextId);if(!r)return Promise.resolve([]);let i=r.sourceMapLoads.get(e.scriptId);if(i)return i;let n=e.source.then(s=>this._sourceContainer.waitForSourceMapSources(s)).then(s=>s.length&&this._scriptWithSourceMapHandler?this._scriptWithSourceMapHandler(e,s):[]);return r.sourceMapLoads.set(e.scriptId,n),n}async _revealObject(e){if(e.type!=="function"||e.objectId===void 0)return;let r=await this._cdp.Runtime.getProperties({objectId:e.objectId,ownProperties:!0});if(r)for(let i of r.internalProperties||[]){if(i.name!=="[[FunctionLocation]]"||!i.value||i.value.subtype!=="internal#location")continue;let n=await this.rawLocationToUiLocation(this.rawLocation(i.value.value));n&&this._sourceContainer.revealUiLocation(n);break}}async _copyObjectToClipboard(e){if(!e.objectId){this._dap.with(r=>r.copyRequested({text:Hc(e,"copy")}));return}try{let r=await r3({cdp:this.cdp(),objectId:e.objectId,args:[2],silent:!0,returnByValue:!0});this._dap.with(i=>i.copyRequested({text:r.value}))}catch(r){}finally{this.cdp().Runtime.releaseObject({objectId:e.objectId}).catch(()=>{})}}async _onThreadPaused(e){this._expectedPauseReason=void 0,this._onPausedEmitter.fire(e);let r;e.hitBreakpoints&&(r=await Promise.race([Oe(1e3).then(()=>{}),Promise.all(e.hitBreakpoints.map(i=>this._breakpointManager._resolvedBreakpoints.get(i)).filter(qu(cn)).map(i=>i.untilSetCompleted().then(()=>i.dapId)))])),this._dap.with(i=>i.stopped({reason:e.reason,description:e.description,threadId:this.id,text:e.text,hitBreakpointIds:r,allThreadsStopped:!1}))}_onThreadResumed(){this._dap.with(e=>e.continued({threadId:this.id,allThreadsContinued:!1}))}isCrossThreadStep(e){var n;if(!e.asyncStackTraceId||!e.asyncStackTraceId.debuggerId)return!1;let r=qa.threadForDebuggerId(e.asyncStackTraceId.debuggerId);if(!r||!((n=r._waitingForStepIn)!=null&&n.lastDetails))return!1;let i=r._waitingForStepIn.lastDetails.stackTrace;return r._cdp.Debugger.getStackTrace({stackTraceId:e.asyncStackTraceId}).then(s=>!s||!s.stackTrace.callFrames.length||!Wt.fromRuntime(r,s.stackTrace.callFrames[0],!1).equivalentTo(i.frames[0])?!1:(r._waitingForStepIn=void 0,!0))}async setScriptSourceMapHandler(e,r){this._scriptWithSourceMapHandler=r;let i=e&&this._sourceContainer.sourceMapTimeouts().sourceMapMinPause&&r;if(i&&!this._pauseOnSourceMapBreakpointId){let n=await this._cdp.Debugger.setInstrumentationBreakpoint({instrumentation:"beforeScriptWithSourceMapExecution"});this._pauseOnSourceMapBreakpointId=n?n.breakpointId:void 0}else if(!i&&this._pauseOnSourceMapBreakpointId){let n=this._pauseOnSourceMapBreakpointId;this._pauseOnSourceMapBreakpointId=void 0,await this._cdp.Debugger.removeBreakpoint({breakpointId:n})}return!!this._pauseOnSourceMapBreakpointId}async _enablePerScriptSourcemaps(){await this._breakpointManager.updateEntryBreakpointMode(this,1),await this.setScriptSourceMapHandler(!1,this._scriptWithSourceMapHandler)}_shouldEnablePerScriptSms(e){var r,i,n;return e.reason!=="instrumentation"||!_r((r=e.data)==null?void 0:r.sourceMapURL)?!1:((i=e.data.url)==null?void 0:i.startsWith("webpack"))||((n=e.data.url)==null?void 0:n.startsWith("ng:"))}setSourceMapDisabler(e){this._sourceMapDisabler=e}static threadForDebuggerId(e){return qa._allThreadsByDebuggerId.get(e)}async replacePathsInStackTrace(e){let r=[];for(let n of new Ba(e)){if(typeof n=="string"){r.push(n);continue}let s=this._sourceContainer.getSourceByOriginalUrl(Qe(n.path))||this._sourceContainer.getSourceByOriginalUrl(n.path);if(!s){r.push(n.toString());continue}r.push(this._sourceContainer.preferredUiLocation({columnNumber:n.position.base1.columnNumber,lineNumber:n.position.base1.lineNumber,source:s}).then(({source:o,lineNumber:a,columnNumber:u})=>`${o.absolutePath}:${a}:${u}`))}return(await Promise.all(r)).join("")}},Wa=qa;Wa._lastThreadId=0,Wa._allThreadsByDebuggerId=new Map;async function wC(t){let e=await t.uiLocation();return e?e.source.blackboxed()?2:ei(e.source)&&!e.isMapped&&e.unmappedReason===3?1:0:0}var uue=new Set(["breakpoint","exception","entry"]),cue=16,Va=class{constructor(e,r){this.launchConfig=e;this.logger=r;this._smartStepCount=0}resetSmartStepCount(){this._smartStepCount>0&&(this.logger.verbose("internal",`smartStep: skipped ${this._smartStepCount} steps`),this._smartStepCount=0)}async getSmartStepDirection(e,r){if(!this.launchConfig.smartStep||uue.has(e.reason))return;let i=(await e.stackTrace.loadFrames(1)).find(qu(Wt));if((i&&await wC(i))===0){this.resetSmartStepCount();return}return this._smartStepCount++>cue?2:(r==null?void 0:r.reason)==="step"?r.direction:0}};Va=k([(0,Cm.injectable)(),A(0,(0,Cm.inject)(Ke)),A(1,(0,Cm.inject)(fe))],Va);var Bi=class{constructor(e){this.frames=[];this._frameById=new Map;this._lastFrameThread=e}static fromRuntime(e,r){let i=new Bi(e);for(let n of r.callFrames)n.url.endsWith(".cdp")||i.frames.push(Wt.fromRuntime(e,n,!1));return r.parentId?(i._asyncStackTraceId=r.parentId,console.assert(!r.parent)):i._appendStackTrace(e,r.parent),i}static async fromRuntimeWithPredicate(e,r,i,n=1/0){let s=new Bi(e);for(let o=0;o<r.callFrames.length&&n>0;o++)if(!r.callFrames[o].url.endsWith(".cdp")){let a=Wt.fromRuntime(e,r.callFrames[o],!1);await i(a)&&(s.frames.push(),n--)}return r.parentId?(s._asyncStackTraceId=r.parentId,console.assert(!r.parent)):s._appendStackTrace(e,r.parent),s}static fromDebugger(e,r,i,n){let s=new Bi(e);for(let o of r)s._appendFrame(Wt.fromDebugger(e,o));return n?(s._asyncStackTraceId=n,console.assert(!i)):s._appendStackTrace(e,i),s}async loadFrames(e,r){for(;this.frames.length<e&&this._asyncStackTraceId;){if(this._asyncStackTraceId.debuggerId&&(this._lastFrameThread=Wa.threadForDebuggerId(this._asyncStackTraceId.debuggerId)),!this._lastFrameThread){this._asyncStackTraceId=void 0;break}r&&this._lastFrameThread.cdp().DotnetDebugger.setEvaluationOptions({options:{noFuncEval:r},type:"stackFrame"});let i=await this._lastFrameThread.cdp().Debugger.getStackTrace({stackTraceId:this._asyncStackTraceId});this._asyncStackTraceId=void 0,i&&this._appendStackTrace(this._lastFrameThread,i.stackTrace)}return this.frames}frame(e){return this._frameById.get(e)}_appendStackTrace(e,r){for(console.assert(!r||!this._asyncStackTraceId);r;){if(r.description==="async function"&&r.callFrames.length&&r.callFrames.shift(),r.callFrames.length){this._appendFrame(new _C(r.description||"async"));for(let i of r.callFrames)this._appendFrame(Wt.fromRuntime(e,i,!0))}r.parentId&&(this._asyncStackTraceId=r.parentId,console.assert(!r.parent)),r=r.parent}}_appendFrame(e){this.frames.push(e),e instanceof Wt&&this._frameById.set(e.frameId,e)}async formatAsNative(){return await this.formatWithMapper(e=>e.formatAsNative())}async format(){return await this.formatWithMapper(e=>e.format())}async formatWithMapper(e){let r=await this.loadFrames(50);for(let n=r.length-1;n>=0;n--){let s=r[n];if(s instanceof Wt&&s.isReplEval){r=r.slice(0,n+1);break}}let i=r.map(e);return(await Promise.all(i)).join(`
`)+`
`}async toDap(e){let r=e.startFrame||0,i=(e.levels||50)+r,n=await this.loadFrames(i,e.noFuncEval);i=Math.min(n.length,e.levels?i:n.length);let s=[];for(let o=r;o<i;o++)s.push(n[o].toDap(e.format));return{stackFrames:await Promise.all(s),totalFrames:this._asyncStackTraceId?1e6:n.length}}},H3=AH(),_C=class{constructor(e="async"){this.label=e;this.frameId=H3()}async toDap(){return{name:this.label,id:0,line:0,column:0,presentationHint:"label"}}async formatAsNative(){return`    --- ${this.label} ---`}async format(){return`\u25C0 ${this.label} \u25B6`}},Wt=class{constructor(e,r,i,n=!1){this.callFrame=r;this.isAsync=n;this.frameId=H3();this.completions=Fe(async()=>{if(!this._scope)return[];let e=this._thread.pausedVariables();if(!e)return[];let r=[];for(let n=0;n<this._scope.chain.length;n++)r.push(this._scopeVariable(n,this._scope).then(async s=>(await e.getVariableNames({variablesReference:s.id})).map(a=>({label:a,type:"property"}))));let i=await Promise.all(r);return[].concat(...i)});this._name=r.functionName||"<anonymous>",this._rawLocation=i,this.uiLocation=Fe(()=>e.rawLocationToUiLocation(i)),this._thread=e;let s=i.scriptId?e.getScriptById(i.scriptId):void 0;this.isReplEval=s?s.url.endsWith(".repl"):!1}get rawPosition(){return new lp(this._rawLocation.lineNumber,this._rawLocation.columnNumber)}static fromRuntime(e,r,i){return new Wt(e,r,e.rawLocation(r),i)}static fromDebugger(e,r){let i=new Wt(e,r,e.rawLocation(r));return i._scope={chain:r.scopeChain,thisObject:r.this,returnValue:r.returnValue,variables:new Array(r.scopeChain.length).fill(void 0),callFrameId:r.callFrameId},i}get canExplicitlyBeRestarted(){return!!this.callFrame.canBeRestarted}equivalentTo(e){return e instanceof Wt&&e._rawLocation.columnNumber===this._rawLocation.columnNumber&&e._rawLocation.lineNumber===this._rawLocation.lineNumber&&e._rawLocation.scriptId===this._rawLocation.scriptId}callFrameId(){return this._scope?this._scope.callFrameId:void 0}async scopes(){if(!this._scope)throw new ne(DM());let e=[];for(let r=0;r<this._scope.chain.length;r++){let i=this._scope.chain[r],n="",s;switch(i.type){case"global":n=bi.t("Global");break;case"local":n=bi.t("Local"),s="locals";break;case"with":n=bi.t("With Block"),s="locals";break;case"closure":n=bi.t("Closure"),s="arguments";break;case"catch":n=bi.t("Catch Block"),s="locals";break;case"block":n=bi.t("Block"),s="locals";break;case"script":n=bi.t("Script");break;case"eval":n=bi.t("Eval");break;case"module":n=bi.t("Module");break;default:n=i.type.substr(0,1).toUpperCase()+i.type.substr(1);break}i.name&&i.type==="closure"?n=bi.t("Closure ({0})",i.name):i.name&&(n=`${n}: ${i.name}`);let o=await this._scopeVariable(r,this._scope),a={name:n,presentationHint:s,expensive:i.type==="global",variablesReference:o.id};if(i.startLocation){let u=this._thread.rawLocation(i.startLocation),c=await this._thread.rawLocationToUiLocation(u);if(a.line=(c||u).lineNumber,a.column=(c||u).columnNumber,c&&(a.source=await c.source.toDap()),i.endLocation){let l=this._thread.rawLocation(i.endLocation),p=await this._thread.rawLocationToUiLocation(l);a.endLine=(p||l).lineNumber,a.endColumn=(p||l).columnNumber}}e.push(a)}return{scopes:e}}async toDap(e){var c;let r=await this.uiLocation(),i=r?await r.source.toDap():void 0,n=await wC(this),s=n?"deemphasize":"normal";n&&i&&(i.origin=n===1?bi.t("Skipped by smartStep"):bi.t("Skipped by skipFiles"));let o=(r||this._rawLocation).lineNumber,a=(r||this._rawLocation).columnNumber,u=this._name;return i&&e&&(e.module&&(u+=` [${i.name}]`),e.line&&(u+=` Line ${o}`)),{id:this.frameId,name:u,line:o,column:a,source:i,presentationHint:s,canRestart:(c=this.callFrame.canBeRestarted)!=null?c:!this.isAsync}}async formatAsNative(){let e=await this.uiLocation(),r=await(e==null?void 0:e.source.existingAbsolutePath())||await(e==null?void 0:e.source.prettyName())||this.callFrame.url,{lineNumber:i,columnNumber:n}=e||this._rawLocation;return`    at ${this._name} (${r}:${i}:${n})`}async format(){let e=await this.uiLocation(),r=await(e==null?void 0:e.source.prettyName())||"<unknown>",i=e||this._rawLocation,n=`${this._name} @ ${r}:${i.lineNumber}`;return i.columnNumber>1&&(n+=`:${i.columnNumber}`),n}async _scopeVariable(e,r){let i=r.variables[e];if(i)return i;let n={stackFrame:this,callFrameId:r.callFrameId,scopeNumber:e},s=[];e===0&&(r.thisObject&&s.push({name:"this",value:r.thisObject}),r.returnValue&&s.push({name:bi.t("Return value"),value:r.returnValue}));let o=this._thread.pausedVariables().createScope(r.chain[e].object,n,s);return r.variables[e]=o}};var y3=S(Se());var wc=class{constructor(e){this.event=e;this.stackTrace=Fe(e=>this.event.stackTrace?Bi.fromRuntime(e,this.event.stackTrace):void 0);this.getUiLocation=Fe(async e=>{let r=this.stackTrace(e);if(!r)return;let i;for(let n of r.frames){if(!(n instanceof Wt))continue;let s=await n.uiLocation();if(s&&(i||(i=s),!s.source.blackboxed()))return{source:await s.source.toDap(),line:s.lineNumber,column:s.columnNumber}}if(i)return{source:await i.source.toDap(),line:i.lineNumber,column:i.columnNumber}})}formatDefaultString(e,r,i=!1){let s=r.length>1&&r[0].type==="string"?eC(r[0].value,r.slice(1),nC):eC("",r,nC),o=s.result+`
`;return s.usedAllSubs&&!r.some(gc)?{output:o}:this.formatComplexStringOutput(e,o,r,i)}async formatComplexStringOutput(e,r,i,n){(i.some(o=>o.subtype==="error")||Ba.isStackLike(r))&&(await this.getUiLocation(e),r=await e.replacePathsInStackTrace(r),n=!0);let s=e.replVariables.createVariableForOutput(r,i,n?this.stackTrace(e):void 0);return{output:r,variablesReference:s.id}}},vb=class extends wc{async toDap(e){var r;return((r=this.event.args[0])==null?void 0:r.value)==="console.assert"&&(this.event.args[0].value=y3.t("Assertion failed")),{category:"stderr",...await this.formatDefaultString(e,this.event.args,!0),...await this.getUiLocation(e)}}},_c=class extends wc{constructor(r,i,n){super(r);this.includeStack=i;this.category=n}async toDap(r){return{category:this.category,...await this.formatDefaultString(r,this.event.args,this.includeStack),...await this.getUiLocation(r)}}},Ga=class extends _c{constructor(e){super(e,!1,"stdout")}},bb=class extends _c{constructor(e){super(e,!0,"stdout")}},wb=class extends _c{constructor(e){super(e,!0,"stderr")}},_b=class extends _c{constructor(e){super(e,!0,"stderr")}},Ab=class extends wc{async toDap(e){return{category:"stdout",group:this.event.type==="startGroupCollapsed"?"startCollapsed":"start",...await this.formatDefaultString(e,this.event.args),...await this.getUiLocation(e)}}},Ib=class extends _c{constructor(e){super(e,!1,"stdout")}async toDap(e){var r;return(r=this.event.args[0])!=null&&r.preview?{category:"stdout",output:"",variablesReference:e.replVariables.createVariableForOutput("",this.event.args,void 0,this.event.type).id,...await this.getUiLocation(e)}:super.toDap(e)}};var Sm=class extends wc{constructor(){super(...arguments);this.stackTrace=Fe(r=>{if(this.event.stackTrace)return Bi.fromRuntime(r,this.event.stackTrace);if(this.event.scriptId)return Bi.fromRuntime(r,{callFrames:[{functionName:"(program)",lineNumber:this.event.lineNumber,columnNumber:this.event.columnNumber,scriptId:this.event.scriptId,url:this.event.url||""}]})})}async toDap(r){var a,u;let i=this.event.exception?yc(this.event.exception):{title:""},n=i.title;n.startsWith("Uncaught")||(n=`Uncaught ${(u=(a=this.event.exception)==null?void 0:a.className)!=null?u:"Error"} `+n);let s=this.stackTrace(r),o=this.event.exception&&!i.stackTrace?[this.event.exception]:[];return Ba.isStackLike(n)?n=await r.replacePathsInStackTrace(n):s&&(n+=`
`+await s.formatAsNative()),{category:"stderr",output:n,variablesReference:s||o.length?r.replVariables.createVariableForOutput(n,o,s).id:void 0,...await this.getUiLocation(r)}}};var Eb=Symbol("IConsole");var Dm=S(Y());var v3=S(Y());var Ka=Symbol("IShutdownParticipants"),Bp=class{constructor(){this.participants=[]}register(e,r){if(this.shutdownStage!==void 0&&this.shutdownStage>=e)return r(),_p;for(;this.participants.length<=e;)this.participants.push(new Set);return this.participants[e].add(r),{dispose:()=>this.participants[e].delete(r)}}async shutdown(){for(this.shutdownStage=0;this.shutdownStage<this.participants.length;this.shutdownStage++)await Promise.all([...this.participants[this.shutdownStage]].map(e=>e()))}};Bp=k([(0,v3.injectable)()],Bp);var xm=class{toDap(){return{category:"console",output:"\x1B[2J"}}},Sb=class{toDap(){return{category:"stdout",output:"",group:"end"}}};var Cb=class{constructor(e){this.sink=e;this.q=[];this.disposed=!1;this.onDrainedEmitter=new X;this.onDrained=this.onDrainedEmitter.event}get length(){return this.q.length}enqueue(e){this.disposed||(this.q.push(new AC(e)),this.q.length===1&&this.process())}dispose(){this.disposed=!0,this.q=[]}async process(){let e=this.q.findIndex(r=>r.value===w3);e===0?await this.q[0].wait:e===-1?(this.sink(b3(this.q)),this.q=[]):(this.sink(b3(this.q.slice(0,e))),this.q=this.q.slice(e)),this.q.length?this.process():this.onDrainedEmitter.fire()}},b3=t=>t.map(e=>e.value).filter(e=>e!==_3),w3=Symbol("unsettled"),_3=Symbol("unsettled"),AC=class{constructor(e){this.value=w3;e instanceof Promise?this.wait=e.then(r=>{this.value=r},()=>{this.value=_3}):(this.value=e,this.wait=Promise.resolve())}};var pue=new Set(["group","assert","count"]),Up=class{constructor(e,r){this.dap=e;this.isDirty=!1;this.queue=new Cb(e=>{for(let r of e)this.dap.output(r)});this.onDrained=this.queue.onDrained;r.register(0,async()=>{this.length&&await new Promise(i=>this.onDrained(i)),this.dispose()})}get length(){return this.queue.length}dispose(){this.queue.dispose()}dispatch(e,r){let i=this.parse(r);i&&this.enqueue(e,i)}enqueue(e,r){if(!(r instanceof xm))this.isDirty=!0;else if(this.isDirty)this.isDirty=!1;else return;this.queue.enqueue(r.toDap(e))}parse(e){var r;if(e.type==="log"){let i=(r=e.stackTrace)==null?void 0:r.callFrames[0];if(i&&i.url==="internal/console/constructor.js"&&pue.has(i.functionName))return}switch(e.type){case"clear":return new xm;case"endGroup":return new Sb;case"assert":return new vb(e);case"table":return new Ib(e);case"startGroup":case"startGroupCollapsed":return new Ab(e);case"debug":case"log":case"info":return new Ga(e);case"trace":return new bb(e);case"error":return new _b(e);case"warning":return new wb(e);case"dir":case"dirxml":return new Ga(e);case"count":return new Ga(e);case"profile":case"profileEnd":return new Ga(e);case"timeEnd":return new Ga(e);default:try{wH(e.type,"unknown console message type")}catch(i){}}}};Up=k([(0,Dm.injectable)(),A(0,(0,Dm.inject)(rn)),A(1,(0,Dm.inject)(Ka))],Up);var Ac=S(Y()),E3=require("os"),S3=require("path");var IC=require("path"),A3=(0,IC.join)(__dirname,"diagnosticTool.js"),I3=(0,IC.join)(__dirname,"diagnosticTool.css");var za=Symbol("ITarget"),Ar=Symbol("ILauncher");var Xa=class{constructor(e,r,i,n){this.fs=e;this.sources=r;this.breakpoints=i;this.target=n}async generateObject(){let[e]=await Promise.all([this.dumpSources()]);return{breakpoints:this.dumpBreakpoints(),sources:e,config:this.target.launchConfig}}async generateHtml(e=(0,S3.join)((0,E3.tmpdir)(),"js-debug-diagnostics.html")){return await this.fs.writeFile(e,`<!DOCTYPE html>
      <html lang="en">
      <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>${await this.fs.readFile(I3,"utf-8")}<</style>
      </head>
      <body>
        <script>window.DUMP=${JSON.stringify(await this.generateObject())}</script>
        <script>${await this.fs.readFile(A3,"utf-8")}</script>
      </body>
      </html>`),e}dumpBreakpoints(){let e=[];for(let r of[this.breakpoints.appliedByPath,this.breakpoints.appliedByRef])for(let i of r.values())for(let n of i){let s=n.diagnosticDump();e.push({source:s.source,params:s.params,cdp:s.cdp.map(o=>o.state===1?{...o,uiLocations:o.uiLocations.map(a=>this.dumpUiLocation(a))}:{...o,done:void 0})})}return e}dumpSources(){let e=[],r=0;for(let i of this.sources.sources)e.push((async()=>({uniqueId:r++,url:i.url,sourceReference:i.sourceReference,absolutePath:i.absolutePath,actualAbsolutePath:await i.existingAbsolutePath(),scriptIds:i.scripts.map(n=>n.scriptId),prettyName:await i.prettyName(),compiledSourceRefToUrl:i instanceof rr?[...i.compiledToSourceUrl.entries()].map(([n,s])=>[n.sourceReference,s]):void 0,sourceMap:i.sourceMap&&{url:i.sourceMap.url,metadata:i.sourceMap.metadata,sources:ao(Object.fromEntries(i.sourceMap.sourceByUrl),n=>n.sourceReference)}}))());return Promise.all(e)}dumpUiLocation(e){return{lineNumber:e.lineNumber,columnNumber:e.columnNumber,sourceReference:e.source.sourceReference}}};Xa=k([(0,Ac.injectable)(),A(0,(0,Ac.inject)(Ie)),A(1,(0,Ac.inject)(fr)),A(2,(0,Ac.inject)(pn)),A(3,(0,Ac.inject)(za))],Xa);var Ja=S(Y());var qp=Symbol("IExceptionPauseService");var jp=class{constructor(e,r,i,n,s){this.evaluator=e;this.scriptSkipper=r;this.dap=i;this.sourceContainer=s;this.state={cdp:"none"};this.blocker=Je();this.noDebug=!!n.noDebug,this.breakOnError=n.__breakOnConditionalError,this.blocker.resolve()}get launchBlocker(){return this.blocker.promise}async setBreakpoints(e){if(!this.noDebug){try{this.state=this.parseBreakpointRequest(e)}catch(r){if(!(r instanceof ne))throw r;this.dap.output({category:"stderr",output:r.message});return}this.cdp?await this.sendToCdp(this.cdp):this.state.cdp!=="none"&&this.blocker.hasSettled()&&(this.blocker=Je())}}async shouldPauseAt(e){var i;if(e.reason!=="exception"&&e.reason!=="promiseRejection"||this.state.cdp==="none"||this.shouldScriptSkip(e))return!1;let r=this.state.condition;if((i=e.data)!=null&&i.uncaught){if(r.uncaught&&!await this.evalCondition(e,r.uncaught))return!1}else if(r.caught&&!await this.evalCondition(e,r.caught))return!1;return!0}async apply(e){this.cdp=e,this.state.cdp!=="none"&&await this.sendToCdp(e)}async sendToCdp(e){await e.Debugger.setPauseOnExceptions({state:this.state.cdp}),this.blocker.resolve()}async evalCondition(e,r){let i=await r({callFrameId:e.callFrames[0].callFrameId},{error:e.data});return!!(i!=null&&i.result.value)}shouldScriptSkip(e){var i;if((i=e.data)!=null&&i.uncaught||!e.callFrames.length)return!1;let r=this.sourceContainer.getScriptById(e.callFrames[0].location.scriptId);return!!r&&this.scriptSkipper.isScriptSkipped(r.url)}parseBreakpointRequest(e){var a;let r=((a=e.filterOptions)!=null?a:[]).concat(e.filters.map(u=>({filterId:u}))),i="none",n=[],s=[];for(let{filterId:u,condition:c}of r)u==="all"?(i="all",c&&n.push(u)):u==="uncaught"&&(i==="none"&&(i="uncaught"),c&&s.push(u));let o=u=>{if(u.length===0)return;let c="!!("+r.map(f=>f.condition).filter(kt).join(") || !!(")+")",l=wa(c);if(l)throw new ne(ga({line:0,condition:c},l.message));let p=this.breakOnError?oS(c):c;return this.evaluator.prepare(p,{hoist:["error"]}).invoke};return i==="none"?{cdp:i}:{cdp:i,condition:{caught:o(n),uncaught:o(s)}}}};jp=k([(0,Ja.injectable)(),A(0,(0,Ja.inject)(un)),A(1,(0,Ja.inject)(Da)),A(2,(0,Ja.inject)(rn)),A(3,(0,Ja.inject)(Ke)),A(4,(0,Ja.inject)(fr))],jp);var Pb=S(Y());var xb=class{constructor(){this.didEnable=new WeakSet}async retrieve(e){this.didEnable.has(e)||(this.didEnable.add(e),await e.Performance.enable({}));let r=await e.Performance.getMetrics({});if(!r)return{error:"Error in CDP"};let i={};for(let n of r.metrics)i[n.name]=n.value;return{metrics:i}}};var Db=class{async retrieve(e){let r=await e.Runtime.evaluate({expression:`({
        memory: process.memoryUsage(),
        cpu: process.cpuUsage(),
        timestamp: Date.now(),
        resourceUsage: process.resourceUsage && process.resourceUsage(),
      })${Rt()}`,returnByValue:!0});return r?r.exceptionDetails?{error:r.exceptionDetails.text}:{metrics:r.result.value}:{error:"No response from CDP"}}};var Lb=Symbol("IPerformanceProvider"),Ic=class{constructor(e){this.target=e}create(){return this.target.type()==="node"?new Db:new xb}};Ic=k([(0,Pb.injectable)(),A(0,(0,Pb.inject)(za))],Ic);var PC=S(Se()),D3=require("crypto"),Ya=S(Y()),P3=require("os"),L3=require("path");var kb=S(Y());var EC=S(Se()),Ec=S(Y()),Tb=require("path");var Wp=class{constructor(e){this.sources=e;this.locationIdCounter=0;this.locationsByRef=new Map}getLocationIdFor(e){let r=[e.functionName,e.url,e.scriptId,e.lineNumber,e.columnNumber].join(":"),i=this.locationsByRef.get(r);if(i)return i.id;let n=this.locationIdCounter++;return this.locationsByRef.set(r,{id:n,callFrame:e,locations:(async()=>{var o;let s=await((o=this.sources.getScriptById(e.scriptId))==null?void 0:o.source);return s?Promise.all(this.sources.currentSiblingUiLocations({lineNumber:e.lineNumber+1,columnNumber:e.columnNumber+1,source:s}).map(async a=>({...a,source:await a.source.toDapShallow()}))):[]})()}),n}getLocations(){return Promise.all([...this.locationsByRef.values()].sort((e,r)=>e.id-r.id).map(async e=>({callFrame:e.callFrame,locations:await e.locations})))}};var gr=class{constructor(e,r,i,n){this.cdp=e;this.fs=r;this.sources=i;this.launchConfig=n}static canApplyTo(){return!0}async start(e,r){if(!await this.cdp.Profiler.start({}))throw new ne(Fl());return new SC(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}async save(e,r){let i=await C3(e,this.sources,this.launchConfig.__workspaceFolder);(0,Tb.isAbsolute)(r)||(r=(0,Tb.join)(this.launchConfig.__workspaceFolder,r)),await this.fs.writeFile(r,JSON.stringify(i))}};gr.type="cpu",gr.extension=".cpuprofile",gr.label=EC.t("CPU Profile"),gr.description=EC.t("Generates a .cpuprofile file you can open in the Chrome devtools"),gr.editable=!0,gr=k([(0,Ec.injectable)(),A(0,(0,Ec.inject)(Mt)),A(1,(0,Ec.inject)(Ie)),A(2,(0,Ec.inject)(fr)),A(3,(0,Ec.inject)(Ke))],gr);var SC=class{constructor(e,r,i,n,s){this.cdp=e;this.fs=r;this.sources=i;this.workspaceFolder=n;this.file=s;this.stopEmitter=new X;this.disposed=!1;this.onUpdate=new X().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,this.stopEmitter.fire())}async stop(){let e=await this.cdp.Profiler.stop({});if(!e)throw new ne(Fl());await this.dispose();let r=await C3(e.profile,this.sources,this.workspaceFolder);await this.fs.writeFile(this.file,JSON.stringify(r))}};async function C3(t,e,r){let i=new Wp(e),n=t.nodes.map(s=>{var o;return{...s,locationId:i.getLocationIdFor(s.callFrame),positionTicks:(o=s.positionTicks)==null?void 0:o.map(a=>({...a,startLocationId:i.getLocationIdFor({...s.callFrame,lineNumber:a.line-1,columnNumber:0}),endLocationId:i.getLocationIdFor({...s.callFrame,lineNumber:a.line,columnNumber:0})}))}});return{...t,nodes:n,$vscode:{rootPath:r,locations:await i.getLocations()}}}var CC=S(Se()),Sc=S(Y());var Ui=class{constructor(e,r,i,n){this.cdp=e;this.fs=r;this.sources=i;this.launchConfig=n}static canApplyTo(){return!0}async start(e,r){if(await this.cdp.HeapProfiler.enable({}),!await this.cdp.HeapProfiler.startSampling({}))throw new ne(Fl());return new xC(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,r)}};Ui.type="heap",Ui.extension=".heapprofile",Ui.label=CC.t("Heap Profile"),Ui.description=CC.t("Generates a .heapprofile file you can open in the Chrome devtools"),Ui.editable=!0,Ui=k([(0,Sc.injectable)(),A(0,(0,Sc.inject)(Mt)),A(1,(0,Sc.inject)(Ie)),A(2,(0,Sc.inject)(fr)),A(3,(0,Sc.inject)(Ke))],Ui);var xC=class{constructor(e,r,i,n,s){this.cdp=e;this.fs=r;this.sources=i;this.workspaceFolder=n;this.file=s;this.stopEmitter=new X;this.disposed=!1;this.onUpdate=new X().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,await this.cdp.HeapProfiler.disable({}),this.stopEmitter.fire())}async stop(){let e=await this.cdp.HeapProfiler.stopSampling({});if(!e)throw new ne(Fl());await this.dispose();let r=await this.annotateSources(e.profile);await this.fs.writeFile(this.file,JSON.stringify(r))}async annotateSources(e){let r=new Wp(this.sources),i=(s,o)=>{o.locationId=r.getLocationIdFor(s.callFrame);for(let a of s.children){let u={...a,children:[]};o.children.push(u),i(a,u)}},n={...e.head,children:[]};return i(e.head,n),{...e,head:n,$vscode:{rootPath:this.workspaceFolder,locations:await r.getLocations()}}}};var DC=S(Se()),x3=require("fs"),$b=S(Y());var ji=class{constructor(e){this.cdp=e;this.cdp.HeapProfiler.on("addHeapSnapshotChunk",({chunk:r})=>{var i;return(i=this.currentWriter)==null?void 0:i.stream.write(r)})}static canApplyTo(){return!0}async start(e,r){return{onStop:new X().event,onUpdate:new X().event,dispose:()=>{},stop:async()=>{await this.cdp.HeapProfiler.enable({}),await this.dumpToFile(r),await this.cdp.HeapProfiler.disable({})}}}async dumpToFile(e){let{stream:r,promise:i}=this.currentWriter={stream:(0,x3.createWriteStream)(e),promise:this.cdp.HeapProfiler.takeHeapSnapshot({})};await i,r.end(),this.currentWriter=void 0}};ji.type="memory",ji.extension=".heapsnapshot",ji.label=DC.t("Heap Snapshot"),ji.description=DC.t("Generates a .heapsnapshot file you can open in the Chrome devtools"),ji.instant=!0,ji=k([(0,$b.injectable)(),A(0,(0,$b.inject)(Mt))],ji);var Rb=Symbol("IProfilerFactory"),Mb=()=>{let t=new Date;return["vscode-profile",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].map(e=>String(e).padStart(2,"0")).join("-")},wi=class{constructor(e){this.container=e}get(e){let r=wi.ctors.find(i=>i.type===e);if(!r)throw new Error(`Invalid profilter type ${e}`);return this.container.get(r)}};wi.ctors=[gr,Ui,ji],wi=k([(0,kb.injectable)(),A(0,(0,kb.inject)(ap))],wi);var Ob=Symbol("IProfileController"),Vp=class{constructor(e,r,i,n,s){this.cdp=e;this.factory=r;this.basicCpuProfiler=i;this.breakpoints=n;this.shutdown=s}connect(e,r){e.on("startProfile",async i=>(await this.start(e,r,i),{})),e.on("stopProfile",()=>this.stopProfiling(e)),this.cdp.Profiler.on("consoleProfileStarted",()=>{e.output({output:PC.t("Console profile started")+`
`,category:"console"})}),this.cdp.Profiler.on("consoleProfileFinished",async i=>{let n=this.saveConsoleProfile(e,i),s=this.shutdown.register(0,()=>n);await n,s.dispose()}),r.onPaused(()=>this.stopProfiling(e))}async start(e,r,i){if(this.profile)throw new ne(SM());this.profile=this.startProfileInner(e,r,i).catch(n=>{throw this.profile=void 0,n}),await this.profile}async saveConsoleProfile(e,r){var s;let n=(((s=r.title)==null?void 0:s.replace(/[\/\\]/g,"-"))||Mb())+gr.extension;await this.basicCpuProfiler.save(r.profile,n),e.output({output:PC.t('CPU profile saved as "{0}" in your workspace folder',n)+`
`,category:"console"})}async startProfileInner(e,r,i){var l;let n=!1,s;if((l=i.stopAtBreakpoint)!=null&&l.length){let p=new Set(i.stopAtBreakpoint);n=!0,s=f=>!(f instanceof cn)||p.has(f.dapId)}else s=()=>!1;await this.breakpoints.applyEnabledFilter(s);let o=(0,L3.join)((0,P3.tmpdir)(),`vscode-js-profile-${(0,D3.randomBytes)(4).toString("hex")}`),a=await this.factory.get(i.type).start(i,o),u={file:o,profile:a,enableFilter:s,keptDebuggerOn:n};a.onUpdate(p=>e.profilerStateUpdate({label:p,running:!0})),a.onStop(()=>this.disposeProfile(u));let c=!!r.pausedDetails();return n?await r.resume():c&&(await this.cdp.Debugger.disable({}),c&&r.onResumed()),e.profileStarted({file:u.file,type:i.type}),u}async stopProfiling(e){var i;let r=await((i=this.profile)==null?void 0:i.catch(()=>{}));return!r||!this.profile?{}:(this.profile=void 0,await(r==null?void 0:r.profile.stop()),e.profilerStateUpdate({label:"",running:!1}),{})}async disposeProfile({profile:e,enableFilter:r,keptDebuggerOn:i}){i||await this.cdp.Debugger.enable({}),await this.breakpoints.applyEnabledFilter(void 0,r),e.dispose()}};Vp=k([(0,Ya.injectable)(),A(0,(0,Ya.inject)(Mt)),A(1,(0,Ya.inject)(Rb)),A(2,(0,Ya.inject)(gr)),A(3,(0,Ya.inject)(pn)),A(4,(0,Ya.inject)(Ka))],Vp);var k3=S(Y());var T3=(t,e,r)=>{e=e.toLowerCase();let i=t==null?void 0:t[e];return{...t,[e]:i?i instanceof Array?i.concat(r):[i,r]:r}},$3=(t,e)=>{let r=t;for(let[i,n]of Object.entries(e))typeof n=="object"&&n?r[i]=Object.assign(r[i]||{},n):r[i]=n};var Qa=class{constructor(){this.cdp=[]}attach(e){return this.cdp.push({cdp:e,enabledNetwork:!1}),{dispose:()=>{this.cdp=this.cdp.filter(r=>r.cdp!==e)}}}async apply(e,r){let i=this.cdp[0];return i&&(r=await this.applyCookies(i,e,r)),r}async applyCookies(e,r,i){var s;e.enabledNetwork||(e.enabledNetwork=!0,await e.cdp.Network.enable({}));let n=await e.cdp.Network.getCookies({urls:[r]});return(s=n==null?void 0:n.cookies)!=null&&s.length?T3(i,"Cookie",n.cookies.sort((o,a)=>o.path.length-a.path.length).map(o=>`${o.name}=${o.value}`).join("; ")):i}};Qa=k([(0,k3.injectable)()],Qa);var js=S(Y());var s8=S(M3()),o8=require("dns"),f0=S(n8()),Dc=S(Y());var sf=Symbol("IRequestOptionsProvider");var iu=class{constructor(e,r){this.fs=e;this.options=r}async fetch(e,r=hr,i){try{let s=(0,s8.default)(e);return{ok:!0,url:e,body:s.toString("utf-8"),statusCode:200}}catch(s){}let n=jr(e)?e:mt(e);if(n)try{return{ok:!0,url:e,body:await this.fs.readFile(n,"utf-8"),statusCode:200}}catch(s){return{ok:!1,url:e,error:s,statusCode:200}}return this.fetchHttp(e,r,i)}async fetchJson(e,r,i){let n=await this.fetch(e,r,{Accept:"application/json",...i});if(!n.ok)return n;try{return{...n,body:JSON.parse(n.body)}}catch(s){return{...n,ok:!1,url:e,error:s}}}async fetchHttp(e,r,i){var u;let n=new URL(e),s=n.protocol!=="http:",o={headers:i,followRedirect:!0};s&&await Zl(e)&&(o.rejectUnauthorized=!1),(u=this.options)==null||u.provideOptions(o,e);let a=await this.requestHttp(e,o,r);if(a.statusCode===503&&n.hostname==="localhost"){let c;try{c=await o8.promises.lookup(n.hostname)}catch(l){return a}return n.hostname=c.family===6?"127.0.0.1":"::1",this.requestHttp(n.toString(),o,r)}return a}async requestHttp(e,r,i){var s,o,a,u;(s=this.options)==null||s.provideOptions(r,e);let n=new Le;try{let c=(0,f0.default)(e,r);n.push(i.onCancellationRequested(()=>c.cancel()));let l=await c;return{ok:!0,url:e,body:l.body,statusCode:l.statusCode}}catch(c){if(!(c instanceof f0.RequestError))throw c;let l=c.response?String((o=c.response)==null?void 0:o.body):c.message,p=(u=(a=c.response)==null?void 0:a.statusCode)!=null?u:503;return{ok:!1,body:l,statusCode:p,url:e,error:new jy(p,e,l)}}finally{n.dispose()}}};iu=k([(0,Dc.injectable)(),A(0,(0,Dc.inject)(Ie)),A(1,(0,Dc.optional)()),A(1,(0,Dc.inject)(sf))],iu);var Pc=class extends iu{constructor(r,i,n,s){super(r,s);this.state=i;this.disposables=new Le;n&&this.disposables.push(this.state.attach(n))}dispose(){this.disposables.dispose()}async fetchHttp(r,i,n={}){let s=await super.fetchHttp(r,i,n);if(!s.ok){let o=await this.state.apply(r,n);if(o!==n)return await super.fetchHttp(r,i,o)}return s}};Pc=k([(0,js.injectable)(),A(0,(0,js.inject)(Ie)),A(1,(0,js.inject)(Qa)),A(2,(0,js.optional)()),A(2,(0,js.inject)(Mt)),A(3,(0,js.optional)()),A(3,(0,js.inject)(sf))],Pc);var su=S(Y()),c8=S(om());var nu="node:";function u8(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("!")){let n=a8(i.slice(1));for(let s=0;s<e.length;s++)e[s]=`^(?!${n.slice(1)})${e[s].slice(1)}`}else e.push(a8(i))}return e.map(r=>new RegExp(r,"i"))}function a8(t){let e=t.split("/"),r=[];for(let i=0;i<e.length;i++){let n=e[i];if(n==="**")i===0?r.push("(.+/)?"):i===e.length-1||r.push(".*/");else{if(n.includes("*")){let s=n.split("*");r.push(s.map(o=>Zr(o)).join("[^\\/]*"))}else r.push(Zr(n));r.push(i<e.length-1?"\\/":"$")}}return`^${r.join("")}`}function mpe(t){let e=/^<node_internals>[\/\\](.*)$/,r=t.map(i=>{i=i.trim();let n=e.exec(i);return n?n[1]:null}).filter(kt);return r.length>0?r:void 0}function gpe(t,e){return e.filter(i=>!i.includes("<node_internals>")).map(i=>jr(i)?fN(t.rebaseLocalToRemote(i)):qe(i)).map(bv)}var qs=class{constructor({skipFiles:e},r,i,n,s){this.logger=i;this.cdp=n;this._regexForAuthored=p$(u8);this._scriptsWithSkipping=new Set;this._targetId=s.id(),this._rootTargetId=l8(s).id(),this._isUrlFromSourceMapSkipped=new Es(o=>this._normalizeUrl(o)),this._authoredGlobs=gpe(r,e),this._nodeInternalsGlobs=mpe(e),this._initNodeInternals(s),this._updateSkippedDebounce=d$(500,()=>this._updateGeneratedSkippedSources()),e.length&&this._updateGeneratedSkippedSources(),qs.sharedSkipsEmitter.event(o=>{o.rootTargetId===this._rootTargetId&&o.targetId!==this._targetId&&this._toggleSkippingFile(o.params)})}setSourceContainer(e){this._sourceContainer=e}_testSkipNodeInternal(e){return this._nodeInternalsGlobs?(e.startsWith(nu)&&(e=e.slice(nu.length)),(0,c8.default)([e],this._nodeInternalsGlobs).length>0):!1}_testSkipAuthored(e){return this._regexForAuthored(this._authoredGlobs).some(r=>r.test(e))}_isNodeInternal(e,r){return e.startsWith(nu)?!0:(r==null?void 0:r.has(e))||/^internal\/.+\.js$/.test(e)}async _updateGeneratedSkippedSources(){var i;let e=this._regexForAuthored(this._authoredGlobs).map(n=>n.source),r=(i=this._allNodeInternals)==null?void 0:i.settledValue;if(r){e.push(`^(${nu})?internal\\/`);for(let n of r)this._testSkipNodeInternal(n)&&e.push(`^(${nu})?${Zr(n)}$`)}await this.cdp.Debugger.setBlackboxPatterns({patterns:e})}_normalizeUrl(e){return qe(e.toLowerCase())}isScriptSkipped(e){var r;return this._isNodeInternal(e,(r=this._allNodeInternals)==null?void 0:r.settledValue)?this._testSkipNodeInternal(e):(e=this._normalizeUrl(e),this._isUrlFromSourceMapSkipped.get(e)===!0?!0:this._testSkipAuthored(e))}async _updateSourceWithSkippedSourceMappedSources(e,r){let i=this.isScriptSkipped(e.url),n=[],s=i;Array.from(e.sourceMap.sourceByUrl.values()).forEach(a=>{let u=this.isScriptSkipped(a.url);if(typeof u=="undefined"&&(u=i),u!==s){let c=this._sourceContainer.currentSiblingUiLocations({source:a,lineNumber:1,columnNumber:1},e);c[0]?(n.push({lineNumber:c[0].lineNumber-1,columnNumber:c[0].columnNumber-1}),s=!s):this.logger.error("internal","Could not map script beginning for "+a.sourceReference)}});let o=r;n.length||(o=o.filter(a=>this._scriptsWithSkipping.has(a.scriptId)),o.forEach(a=>this._scriptsWithSkipping.delete(a.scriptId))),await Promise.all(o.map(({scriptId:a})=>this.cdp.Debugger.setBlackboxedRanges({scriptId:a,positions:n})))}initializeSkippingValueForSource(e){this._initializeSkippingValueForSource(e)}_initializeSkippingValueForSource(e,r=e.scripts){let i=e.url,n=this.isScriptSkipped(i);if(!n&&e.absolutePath&&this._testSkipAuthored(Qe(e.absolutePath))&&(this.setIsUrlBlackboxSkipped(i,!0),n=!0,this._updateSkippedDebounce()),ei(e)){if(n)for(let s of e.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(s.url,!0);for(let s of e.sourceMap.sourceByUrl.values())this._initializeSkippingValueForSource(s,r);this._updateSourceWithSkippedSourceMappedSources(e,r)}}async _initNodeInternals(e){if(e.type()!=="node"||!this._nodeInternalsGlobs||this._allNodeInternals)return;let r=this._allNodeInternals=Je(),i=await this.cdp.Runtime.evaluate({expression:"require('module').builtinModules"+Rt(),returnByValue:!0,includeCommandLineAPI:!0});i&&!i.exceptionDetails?r.resolve(new Set(i.result.value.map(n=>n+".js"))):r.resolve(new Set),await this._updateGeneratedSkippedSources()}async _toggleSkippingFile(e){let r;e.resource&&jr(e.resource)&&(r=e.resource);let i={path:r,sourceReference:e.sourceReference},n=this._sourceContainer.source(i);if(!n)return{};let s=!this.isScriptSkipped(n.url);if(n instanceof rr){this._isUrlFromSourceMapSkipped.set(n.url,s);let o=Array.from(n.compiledToSourceUrl.keys());await Promise.all(o.map(a=>this._updateSourceWithSkippedSourceMappedSources(a,a.scripts)))}else{if(ei(n))for(let o of n.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(o.url,s);this.setIsUrlBlackboxSkipped(n.url,s),await this._updateGeneratedSkippedSources()}return{}}setIsUrlBlackboxSkipped(e,r){let i=e,n=`!${i}`,s=this._authoredGlobs.filter(o=>o!==i&&o!==n);this._regexForAuthored(s).some(o=>o.test(e))!==r&&(s.push(r?i:n),this._regexForAuthored.clear()),this._authoredGlobs=s}async toggleSkippingFile(e){let r=await this._toggleSkippingFile(e);return qs.sharedSkipsEmitter.fire({params:e,rootTargetId:this._rootTargetId,targetId:this._targetId}),r}};qs.sharedSkipsEmitter=new X,qs=k([(0,su.injectable)(),A(0,(0,su.inject)(Ke)),A(1,(0,su.inject)(ut)),A(2,(0,su.inject)(fe)),A(3,(0,su.inject)(Mt)),A(4,(0,su.inject)(za))],qs);function l8(t){let e=t.parent();return e?l8(e):t}var Bm=S(Y());var f8=require("path");var p8=/^webpack:\/{3}([^/]+?\.vue)(\?[0-9a-z]*)?$/i,Hpe=/^webpack:\/{3}\.\/.+\.vue\?[0-9a-z]+$/i,af=Symbol("IVueFileMapper");var of=class{constructor(e,r){this.files=e;this.search=r;this.getMapping=Fe(async()=>{let e=new Map;return await this.search.streamAllChildren(this.files,r=>e.set((0,f8.basename)(r),r)),e})}async lookup(e){let r=p8.exec(e);return r?(await this.getMapping()).get(r[1]):void 0}getVueHandling(e){return this.files.empty?0:p8.test(e)?1:Hpe.test(e)?2:0}};of=k([(0,Bm.injectable)(),A(0,(0,Bm.inject)(fo)),A(1,(0,Bm.inject)(ip))],of);var Ws=class{constructor(){this.changeEmitter=new X;this.addEmitter=new X;this.removeEmitter=new X;this.targetMap=new Map;this.onChanged=this.changeEmitter.event;this.onAdd=this.addEmitter.event;this.onRemove=this.removeEmitter.event}get size(){return this.targetMap.size}add(e,r){this.targetMap.set(e,r),this.addEmitter.fire([e,r]),this.changeEmitter.fire()}get(e){return this.targetMap.get(e)}remove(e){let r=this.targetMap.get(e);return r===void 0?!1:(this.targetMap.delete(e),this.removeEmitter.fire([e,r]),this.changeEmitter.fire(),!0)}value(){return this.targetMap.values()}};var Nq=S(Rq()),b0=S(Y());var Mq=require("child_process"),Po=class extends Error{constructor(r,i,n,s,o){super(`${r} exited with code ${s||-1}: ${i}`);this.command=r;this.stderr=i;this.stdout=n;this.code=s;this.innerError=o}static fromExeca(r){return new Po(r.command,r.stderr.toString(),r.stdout.toString(),r.exitCode)}};function v0(t,e,r){return new Promise((i,n)=>{let s=(0,Mq.spawn)(t,e,{...r,stdio:"pipe"}),o=[],a=[];s.stderr.on("data",c=>o.push(c)),s.stdout.on("data",c=>a.push(c));let u=(c,l)=>n(new Po(t,Buffer.concat(o).toString(),Buffer.concat(a).toString(),c,l));s.on("error",c=>u(void 0,c)),s.on("close",c=>c?u(c):i({stdout:Buffer.concat(a).toString(),stderr:Buffer.concat(o).toString()}))})}var wfe=new Map([["chrome",0],["safari",1],["firefox",2],["msedge",3],["microsoft edge",3],["appxq0fevzme2pys62n3e0fbqa7peapykr8v",4],["ie.http",5]]),Oq=t=>{t=t.toLowerCase();for(let[e,r]of wfe.entries())if(t.includes(e))return r},pf=Symbol("IDefaultBrowserProvider"),lf=class{constructor(e,r=process.platform){this.execa=e;this.platform=r;this.lookup=Fe(()=>this.platform==="win32"?this.lookupWindows():this.lookupUnix())}async lookupUnix(){let{name:e}=await(0,Nq.default)();return Oq(e)}async lookupWindows(){let e=await this.execa("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]);if(e.failed)throw Po.fromExeca(e);let r=/ProgId\s*REG_SZ\s*(\S+)/.exec(e.stdout);if(r)return Oq(r[1])}};lf=k([(0,b0.injectable)(),A(0,(0,b0.inject)(Yh))],lf);var Bq=S(Y()),_0=S(require("os"));var w0=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var eD=class{constructor(e=512){this.size=e;this.items=[];this.i=0}write(e){this.items[this.i]=e,this.i=(this.i+1)%this.size}read(){return this.items.slice(this.i).concat(this.items.slice(0,this.i))}},Hn=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new eD}static async test(){let e=new Hn;return e.setup({sinks:[new w0],showWelcome:!1}),e}info(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:1})}verbose(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:0})}warn(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:2})}error(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:3})}fatal(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:4})}assert(e,r){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",r,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(r);debugger;return!1}return!0}log(e){if(this.logBuffer.write(e),"queue"in this.logTarget){this.logTarget.queue.push(e);return}for(let r of this.logTarget.sinks)r.write(e)}getRecentLogs(){return this.logBuffer.read()}dispose(){if("sinks"in this.logTarget){for(let e of this.logTarget.sinks)e.dispose();this.logTarget={queue:[]}}}forTarget(){return this}async setup(e){if(await Promise.all(e.sinks.map(i=>i.setup())),e.showWelcome!==!1){let i=_fe();for(let n of e.sinks)n.write(i)}let r=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in r?r.sinks.forEach(i=>i.dispose()):r.queue.forEach(i=>this.log(i))}};Hn.null=(()=>{let e=new Hn;return e.setup({sinks:[]}),e})(),Hn=k([(0,Bq.injectable)()],Hn);var _fe=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${DH} v${Vu} started`,metadata:{os:`${_0.platform()} ${_0.arch()}`,nodeVersion:process.version,adapterVersion:Vu}});var Ym=Symbol("MutableLaunchConfig"),Uq=t=>{let e=new X;return new Proxy({},{ownKeys(){return Object.keys(t)},get(r,i){switch(i){case"update":return n=>{t=n,e.fire()};case"onChange":return e.event;default:return t[i]}}})};var h6=S(Y());var d6=S(f6()),dw=S(Y());var Bo=class{constructor(e){this.logger=e}async streamAllChildren(e,r){let i=[];return await this.globForFiles(e,s=>i.push(r(Ft(s.path)))),(await Promise.all(i)).filter(s=>s!==void 0)}async streamChildrenWithSourcemaps(e){let r=[];return await this.globForFiles(e.files,n=>r.push(np(Ft(n.path)).then(s=>s&&e.processMap(s)).then(s=>s&&e.onProcessedMap(s)).catch(s=>this.logger.warn("sourcemap.parsing","Error parsing source map",{error:s,file:n.path})))),{values:(await Promise.all(r)).filter(kt),state:void 0}}async globForFiles(e,r){await Promise.all([...e.explode()].map(i=>new Promise((n,s)=>(0,d6.default)([i.pattern,"!**/*.asar/**"],{ignore:i.negations,matchBase:!0,cwd:i.cwd}).on("data",r).on("finish",n).on("error",s))))}};Bo=k([(0,dw.injectable)(),A(0,(0,dw.inject)(fe))],Bo);var yu=class{constructor(e,r){this.vscode=e;this.logger=r;this.nodeStrategy=new Bo(this.logger)}static createOrFallback(e){try{let r=require("vscode");if(r.workspace.findTextInFiles!==void 0)return new yu(r,e)}catch(r){}return new Bo(e)}async streamAllChildren(e,r){return this.nodeStrategy.streamAllChildren(e,r)}async streamChildrenWithSourcemaps(e){let r=[];return await Promise.all([...e.files.explode()].map(n=>this._streamChildrenWithSourcemaps(e,n,r))),{values:(await Promise.all(r)).filter(kt),state:void 0}}async _streamChildrenWithSourcemaps(e,r,i){return await this.vscode.workspace.findTextInFiles({pattern:"sourceMappingURL",isCaseSensitive:!0},{...this.getTextSearchOptions(r),previewOptions:{charsPerLine:Number.MAX_SAFE_INTEGER,matchLines:1}},s=>{let o="text"in s?s.text:s.preview.text;i.push(np(s.uri.fsPath,o).then(a=>a&&e.processMap(a)).then(a=>a&&e.onProcessedMap(a)).catch(a=>{this.logger.warn("sourcemap.parsing","Error parsing source map",{error:a,file:s.uri.fsPath})}))}),this.logger.info("sourcemap.parsing",`findTextInFiles search found ${i.length} files`),(await Promise.all(i)).filter(kt)}getTextSearchOptions(e){return{include:new this.vscode.RelativePattern(this.vscode.Uri.file(e.cwd),e.pattern),exclude:e.negations.join(","),useDefaultExcludes:!1,useIgnoreFiles:!1,useGlobalIgnoreFiles:!1,followSymlinks:!0,beforeContext:0,afterContext:0}}};yu=k([(0,h6.injectable)()],yu);var g6=S(Y());var xf=Symbol("touched"),Uo;(u=>{function t(){return{children:{},[xf]:1}}u.root=t;function e(c,l){return a(c,o(l),0)}u.getPath=e;function r(c){c[xf]=1}u.touch=r;function i(c){c[xf]=2}u.touchAll=i;function n(c,l){var f,h;let p=(h=(f=c.children)[l])!=null?h:f[l]={children:{}};return p[xf]=1,p}u.getOrMakeChild=n;function s(c){if(c[xf]){for(let[l,p]of Object.entries(c.children))switch(p[xf]){case 1:s(p);break;case 2:break;default:delete c.children[l]}return c}}u.prune=s;function o(c){let l=c.split(/\/|\\/);return l[0]===""&&l.unshift(),l}function a(c,l,p){let f=n(c,l[p]);return p===l.length-1?f:a(f,l,p+1)}})(Uo||(Uo={}));var YP=require("fs"),QP=S(om()),Vc=require("path"),m6=S(XP());var pve=/\//g,hw=class{constructor(e){this.stat=uo(e=>YP.promises.lstat(e));this.readdir=uo(e=>YP.promises.readdir(e,{withFileTypes:!0}));this.alreadyProcessedFiles=new Set;this.fileEmitter=new X;this.onFile=this.fileEmitter.event;this.errorEmitter=new X;this.onError=this.errorEmitter.event;this.processor=e.fileProcessor,this.filter=e.filter,this.ignore=e.ignore.map(n=>QP.default.matcher((0,m6.default)(qe(n),{cwd:e.cwd})));let r=(0,Vc.isAbsolute)(e.pattern)?(0,Vc.relative)(e.cwd,e.pattern):e.pattern,i=QP.default.parse(qe(r),{ignore:e.ignore,cwd:e.cwd,expand:!0});this.done=Promise.all(i.map(n=>{let s=[];for(let c=1;c<n.tokens.length;){let l=c+1;for(;l<n.tokens.length&&n.tokens[l].type!=="slash";)l++;let p=n.tokens[c];p.type==="globstar"?s.push("**"):l===c+1&&p.type==="text"?s.push(p.value):s.push(new RegExp("^"+n.tokens.slice(c,l).map(f=>f.output||f.value).join("")+"$")),c=l+1}let o=s[0]==="**"?[0,1]:[0],a=Uo.getPath(e.cache,e.cwd),u={elements:s,seen:new Set};return Promise.all(o.map(c=>this.readSomething(u,c,e.cwd,a)))})).then(()=>{})}async readSomething(e,r,i,n){if(this.alreadyProcessedFiles.has(n))return;let s=`${r}:${i}`;if(e.seen.has(s))return;e.seen.add(s);let o;try{o=await this.stat(i)}catch(u){this.errorEmitter.fire({path:i,error:u});return}if(this.alreadyProcessedFiles.has(n))return;let a=n.data;if(a&&o.mtimeMs===a.mtime){if(a.type===0){let u=[];for(let[c,l]of Object.entries(n.children))u.push(l.data!==void 0?this.handleDirectoryEntry(e,r,i,{name:c,type:l.data.type},n):this.stat(i).then(p=>this.handleDirectoryEntry(e,r,i,{name:c,type:p.isFile()?1:0},n),()=>{}));await Promise.all(u)}else a.type===1&&(this.alreadyProcessedFiles.add(n),this.fileEmitter.fire(a.extracted));return}o.isDirectory()?await this.handleDir(e,r,o.mtimeMs,i,n):(this.alreadyProcessedFiles.add(n),await this.handleFile(o.mtimeMs,i,n))}applyFilterToFile(e,r,i){var o;let n=i.children[e];if(this.alreadyProcessedFiles.has(n))return!1;if(!this.filter||!this.filter(r))return!0;let s=((o=n.data)==null?void 0:o.type)===1?n.data.extracted:void 0;return this.alreadyProcessedFiles.add(n),Uo.touch(n),this.filter(r,s)}handleDirectoryEntry(e,r,i,n,s){let o=i+"/"+n.name,a=this.getDirectoryReadDescends(e,r,i,n);if(a===void 0)return;let u=Uo.getOrMakeChild(s,n.name);if(!(n.type===1&&!this.applyFilterToFile(n.name,o,s)))return typeof a=="number"?this.readSomething(e,r+a,o,u):Promise.all(a.map(c=>this.readSomething(e,r+c,o,u)))}getDirectoryReadDescends(e,r,i,n){let s=i+"/"+n.name;if(this.ignore.some(u=>u(s)))return;let o=r===e.elements.length-1,a=e.elements[r];if(a==="**")return n.type===1?o?0:this.getDirectoryReadDescends(e,r+1,i,n):o?0:[0,1];if((a instanceof RegExp&&a.test(n.name)||a===n.name)&&(n.type===0?!o:o))return 1}async handleFile(e,r,i){let n=Vc.sep==="/"?r:r.replace(pve,Vc.sep),s;try{s=await this.processor(n)}catch(o){this.errorEmitter.fire({path:n,error:o});return}i.data={type:1,mtime:e,extracted:s},this.fileEmitter.fire(s)}async handleDir(e,r,i,n,s){let o;try{o=await this.readdir(n)}catch(u){this.errorEmitter.fire({path:n,error:u});return}let a=[];for(let u of o){if(u.name.startsWith("."))continue;let c;if(u.isDirectory())c=0;else if(u.isFile())c=1;else continue;a.push(this.handleDirectoryEntry(e,r,n,{name:u.name,type:c},s))}await Promise.all(a),s.data={type:0,mtime:i}}};var Df=class extends Bo{async streamAllChildren(e,r){return super.streamAllChildren(e,r)}async streamChildrenWithSourcemaps(e){let r=[],i=e.lastState||{},n={};return await Promise.all([...e.files.explode()].map(async o=>{let a=JSON.stringify(o),u=i[a]||Uo.root();await this._streamChildrenWithSourcemaps(u,e,r,o);let c=Uo.prune(u);c&&(n[a]=c)})),this.logger.info("sourcemap.parsing",`turboGlobStream search found ${r.length} files`),{values:(await Promise.all(r)).filter(kt),state:n}}async _streamChildrenWithSourcemaps(e,r,i,n){let s=new hw({pattern:n.pattern,ignore:n.negations,cwd:n.cwd,cache:e,filter:r.filter,fileProcessor:o=>np(o).then(a=>a&&r.processMap(a))});s.onError(({path:o,error:a})=>{this.logger.warn("sourcemap.parsing","Error parsing source map",{error:a,path:o})}),s.onFile(o=>o&&i.push(r.onProcessedMap(o))),await s.done}};Df=k([(0,g6.injectable)()],Df);var Iw=S(Se()),_u=S(Y());var H6=require("url"),y6=S(require("path"));var mw=class{constructor(){this._onFrameAddedEmitter=new X;this._onFrameRemovedEmitter=new X;this._onFrameNavigatedEmitter=new X;this.onFrameAdded=this._onFrameAddedEmitter.event;this.onFrameRemoved=this._onFrameRemovedEmitter.event;this.onFrameNavigated=this._onFrameNavigatedEmitter.event;this._frames=new Map}attached(e,r){e.Page.enable({}),e.Page.getResourceTree({}).then(i=>{this._processCachedResources(e,i?i.frameTree:void 0,r)})}mainFrame(){return this._mainFrame}_processCachedResources(e,r,i){r&&this._addFramesRecursively(e,r,r.frame.parentId,i),e.Page.on("frameAttached",n=>{this._frameAttached(e,i,n.frameId,n.parentFrameId)}),e.Page.on("frameNavigated",n=>{this._frameNavigated(e,i,n.frame)}),e.Page.on("frameDetached",n=>{this._frameDetached(e,i,n.frameId)})}_addFrame(e,r,i){let n=new eL(this,e,r,i);return this._frames.set(n.id,n),n.isMainFrame()&&(this._mainFrame=n),this._onFrameAddedEmitter.fire(n),n}_frameAttached(e,r,i,n){let s=this._frames.get(i);return s||(s=this._addFrame(e,i,n)),s._ref(r),s}_frameNavigated(e,r,i){let n=this._frames.get(i.id);n||(n=this._frameAttached(e,r,i.id,i.parentId)),n._navigate(i,r),this._onFrameNavigatedEmitter.fire(n)}_frameDetached(e,r,i){let n=this._frames.get(i);n&&n._unref(r)}frameForId(e){return this._frames.get(e)}frames(){return Array.from(this._frames.values())}_addFramesRecursively(e,r,i,n){let s=r.frame,o=this._frames.get(s.id);o?(o._navigate(s,n),this._onFrameNavigatedEmitter.fire(o)):(o=this._addFrame(e,s.id,i),o._navigate(s,n));for(let a=0;r.childFrames&&a<r.childFrames.length;++a)this._addFramesRecursively(e,r.childFrames[a],o.id,n)}},eL=class{constructor(e,r,i,n){this._targets=new Set;this.cdp=r,this.model=e,this._parentFrameId=n,this.id=i,this._url=""}_ref(e){this._targets.add(e)}_navigate(e,r){this._name=e.name,this._url=e.url,this._securityOrigin=e.securityOrigin,this._unreachableUrl=e.unreachableUrl||"",this._ref(r),this._unrefChildFrames(r)}name(){return this._name||""}url(){return this._url}securityOrigin(){return this._securityOrigin}unreachableUrl(){return this._unreachableUrl}isMainFrame(){return!this._parentFrameId}parentFrame(){return this._parentFrameId?this.model.frameForId(this._parentFrameId):void 0}childFrames(){return this.model.frames().filter(e=>e._parentFrameId===this.id)}_unrefChildFrames(e){for(let r of this.childFrames())r._unref(e)}_unref(e){this._targets.delete(e),!this._targets.size&&(this._unrefChildFrames(e),this.model._frames.delete(this.id),this.model._onFrameRemovedEmitter.fire(this))}displayName(){return this._name?this._name:fve(this._url)||`<iframe ${this.id}>`}};function ZP(t,e){return t.length<=e?t:t.substr(0,e-1)+"\u2026"}function fve(t){let e;try{e=new H6.URL(t)}catch(i){return ZP(t,20)}if(e.protocol==="data")return ZP(t,20);if(e.protocol==="blob"||t==="about:blank")return t;let r=y6.basename(e.pathname);return r||(r=(e.host||"")+"/"),r==="/"&&(r=ZP(t,20)),r}var v6=require("url"),tL=class{constructor(e){this.versions=new Map;this.id=e.registrationId,this.scopeURL=e.scopeURL}},rL=class{constructor(e,r){this.revisions=[];this.registration=e,this.id=r.versionId,this.scriptURL=r.scriptURL,this._targetId=r.targetId,this._status=r.status,this._runningStatus=r.runningStatus}addRevision(e){this._targetId&&e.targetId&&this._targetId!==e.targetId&&console.error(`${this._targetId} !== ${e.targetId}`),e.targetId&&(this._targetId=e.targetId),this._status=e.status,this._runningStatus=e.runningStatus,this.revisions.unshift(e)}status(){return this._status}runningStatus(){return this._runningStatus}targetId(){return this._targetId}label(){let e=new v6.URL(this.registration.scopeURL),r=e.pathname.substr(1);r.endsWith("/")&&(r=r.substring(0,r.length-1));let i=r||`${e.host}`,n=this._status==="activated"?"":` ${this._status}`,s=this._runningStatus==="running"?"":` ${this._runningStatus}`;return`${i} #${this.id}${n}${s}`}},vu=class{constructor(e){this._registrations=new Map;this._versions=new Map;this._onDidChangeUpdater=new X;this.onDidChange=this._onDidChangeUpdater.event;this._targets=new Set;this._frameModel=e,vu._instances.add(this)}dispose(){vu._instances.delete(this)}attached(e){this._targets.add(e),!this._cdp&&(this._cdp=e,e.ServiceWorker.enable({}),e.ServiceWorker.on("workerRegistrationUpdated",r=>this._workerRegistrationsUpdated(r.registrations)),e.ServiceWorker.on("workerVersionUpdated",r=>this._workerVersionsUpdated(r.versions)),vu._mode!=="normal"&&this.setMode(vu._mode))}async detached(e){this._targets.delete(e)}version(e){return this._versions.get(e)}registrations(){let e=[],r=this._frameModel.frames().map(i=>i.url());for(let i of this._registrations.values())for(let n of r)if(n.startsWith(i.scopeURL)){e.push(i);break}return e}registration(e){return this._registrations.get(e)}_workerVersionsUpdated(e){for(let r of e){let i=this._registrations.get(r.registrationId);if(!i)continue;let n=i.versions.get(r.versionId);n||(n=new rL(i,r),i.versions.set(r.versionId,n)),r.targetId&&this._versions.set(r.targetId,n),n.addRevision(r),n.status()==="redundant"&&n.runningStatus()==="stopped"&&(r.targetId&&this._versions.delete(r.targetId),i.versions.delete(n.id))}this._onDidChangeUpdater.fire()}_workerRegistrationsUpdated(e){for(let r of e)if(r.isDeleted){if(!this._registrations.has(r.registrationId))debugger;this._registrations.delete(r.registrationId)}else{if(this._registrations.has(r.registrationId))return;this._registrations.set(r.registrationId,new tL(r))}this._onDidChangeUpdater.fire()}static setModeForAll(e){vu._mode=e;for(let r of vu._instances)r.setMode(e)}setMode(e){if(this._cdp){this._cdp.ServiceWorker.setForceUpdateOnPageLoad({forceUpdateOnPageLoad:e==="force"});for(let r of this._targets.values())e==="bypass"?(r.Network.enable({}),r.Network.setBypassServiceWorker({bypass:!0})):r.Network.disable({})}}async stopWorker(e){if(!this._cdp)return;let r=this.version(e);r&&await this._cdp.ServiceWorker.stopWorker({versionId:r.id})}},Pg=vu;Pg._instances=new Set;var bu=class{constructor(e,r,i,n,s,o,a,u){this.process=r;this.logger=s;this.telemetry=o;this.launchParams=a;this._targets=new Map;this._detachedTargets=new Set;this.frameModel=new mw;this.serviceWorkerModel=new Pg(this.frameModel);this._lifecycleQueue=Promise.resolve();this._onTargetAddedEmitter=new X;this._onTargetRemovedEmitter=new X;this.onTargetAdded=this._onTargetAddedEmitter.event;this.onTargetRemoved=this._onTargetRemovedEmitter.event;this._connection=e,this._sourcePathResolver=n,this._browser=i,this._targetOrigin=u,this.serviceWorkerModel.onDidChange(()=>{for(let c of this._targets.values())c.type()==="service_worker"&&c._onNameChangedEmitter.fire()})}static async connect(e,r,i,n,s,o,a){let c=await e.rootSession().Target.attachToBrowserTarget({});if(!c)return;let l=e.createSession(c.sessionId);return new this(e,r,l,i,s,o,n,a)}dispose(){this.serviceWorkerModel.dispose()}targetList(){return Array.from(this._targets.values()).filter(e=>Gh.has(e.type()))}async getCandiateInfo(e){let r=await this._browser.Target.getTargets({});return r?e?r.targetInfos.filter(e):r.targetInfos:[]}async closeBrowser(){var e;if(this.launchParams.request==="launch"){if(this.launchParams.cleanUp==="wholeBrowser")await this._browser.Browser.close({}),(e=this.process)==null||e.kill();else for(let r of this._targets.values())await this._browser.Target.closeTarget({targetId:r.targetId}),this._connection.close();this.process=void 0}}waitForMainTarget(e){let r,i=new Promise(s=>r=s),n=async s=>{if([...this._targets.values()].some(u=>u.targetId===s.targetId)||this._detachedTargets.has(s.targetId)||e&&!e(s))return;let o=this._browser.Target.on("targetInfoChanged",u=>{u.targetInfo.targetId===s.targetId&&(s=u.targetInfo)}),a;try{a=await this._browser.Target.attachToTarget({targetId:s.targetId,flatten:!0})}finally{o.dispose()}if(!a){r(void 0);return}r(this.attachedToTarget(s,a.sessionId,!0))};return this._browser.Target.setDiscoverTargets({discover:!0}),this._browser.Target.on("targetCreated",this.enqueueLifecycleFn(s=>n(s.targetInfo))),this._browser.Target.on("targetInfoChanged",s=>this._targetInfoChanged(s.targetInfo,this.enqueueLifecycleFn(n))),this._browser.Target.on("detachedFromTarget",this.enqueueLifecycleFn(async s=>{s.targetId&&await this._detachedFromTarget(s.sessionId,!1)})),i}enqueueLifecycleFn(e){return r=>this._lifecycleQueue=this._lifecycleQueue.then(()=>e(r))}attachedToTarget(e,r,i,n,s=!0){let o=this._targets.get(r);if(o)return o;let a=this._connection.createSession(r),u=new Jl(this,e,a,n,i,this.launchParams,r,this.logger,()=>{this._connection.disposeSession(r),this._detachedFromTarget(r)});this._targets.set(r,u),n&&n._children.set(e.targetId,u),a.Target.on("attachedToTarget",async l=>{this.attachedToTarget(l.targetInfo,l.sessionId,l.waitingForDebugger,u)}),a.Target.on("detachedFromTarget",async l=>{l.targetId&&this._detachedFromTarget(l.sessionId,!1)}),a.Target.setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:s,flatten:!0}),a.Network.setCacheDisabled({cacheDisabled:this.launchParams.disableNetworkCache}).catch(l=>this.logger.info("runtime.target","Error setting network cache state",l)),n||this.retrieveBrowserTelemetry(a);let c=e.type;return VE.has(c)&&this.frameModel.attached(a,e.targetId),this.serviceWorkerModel.attached(a),this._onTargetAddedEmitter.fire(u),!Gh.has(c)||c==="service_worker"?u.runIfWaitingForDebugger():c==="page"&&s&&a.Page.waitForDebugger({}),u}async retrieveBrowserTelemetry(e){try{let r=await e.Browser.getVersion({});if(!r)throw new Error("Undefined return from getVersion()");let i={targetCRDPVersion:r.protocolVersion,targetRevision:r.revision,targetUserAgent:r.userAgent,targetV8:r.jsVersion,targetVersion:"",targetProject:"",targetProduct:""};this.logger.verbose("runtime.target","Retrieved browser information",r);let n=(r.product||"").split("/");n.length===2?(i.targetProject=n[0],i.targetVersion=n[1]):i.targetProduct=r.product,this.telemetry.report("browserVersion",i)}catch(r){this.logger.warn("runtime.target","Error getting browser telemetry",r)}}async _detachedFromTarget(e,r=!0){var n;let i=this._targets.get(e);if(i){this._targets.delete(e),(n=i.parentTarget)==null||n._children.delete(e);try{await i._detached()}catch(s){}if(this._onTargetRemovedEmitter.fire(i),r&&(this._detachedTargets.add(i.targetId),await this._browser.Target.detachFromTarget({sessionId:e})),!this._targets.size&&this.launchParams.request==="launch")try{this.launchParams.cleanUp==="wholeBrowser"?await this._browser.Browser.close({}):(await this._browser.Target.closeTarget({targetId:i.id()}),this._connection.close())}catch(s){}}}async _targetInfoChanged(e,r){let i=[...this._targets.values()].filter(n=>n.targetId===e.targetId);if(!e.attached||!i.length)return i.length&&await Promise.all(i.map(n=>this._detachedFromTarget(n.sessionId,!1))),r(e);for(let n of i)n._updateFromInfo(e);for(let n of this._targets.values())n.targetId!==e.targetId&&n._onNameChangedEmitter.fire()}};var R6=S(require("child_process")),M6=require("fs");var dve=50,ii=class{constructor(e){this.messageEmitter=new X;this.endEmitter=new X;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this._ws=e,this._ws.addEventListener("message",r=>{this.messageEmitter.fire([r.data.toString("utf-8"),new ti])}),this._ws.addEventListener("close",()=>{this.endEmitter.fire(),this._ws=void 0}),this._ws.addEventListener("error",()=>{})}static async create(e,r){let i=!e.startsWith("ws://"),n=await Zl(e);for(;;){let s=Date.now()+dve;try{let o={headers:{host:"localhost"},perMessageDeflate:!1,maxPayload:268435456,rejectUnauthorized:!(i&&n),followRedirects:!0},a=new a2(e,[],o);return await Os(new Promise((u,c)=>{a.addEventListener("open",()=>u(new ii(a))),a.addEventListener("error",l=>{let p=e===a.url?e:a.url.replace(/^http(s?):/,"ws$1:");if(p===e){c(l.error);return}this.create(p,r).then(u,c)})}),dr.withTimeout(2e3,r).token,`Could not open ${e}`).catch(u=>{throw a.close(),u})}catch(o){if(r.isCancellationRequested)throw o;let a=s-Date.now();a>0&&await Oe(a)}}}send(e){var r;(r=this._ws)==null||r.send(e)}dispose(){return new Promise(e=>{if(!this._ws)return e();this._ws.addEventListener("close",()=>e()),this._ws.close()})}};var gw=S(require("path"));function hve(t){let e=[/^APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL$/i,/^ELECTRON_.+$/i,/^GOOGLE_API_KEY$/i,/^VSCODE_.+$/i,/^SNAP(|_.*)$/i,/^GDK_PIXBUF_.+$/i];return new Dt(t).map((r,i)=>e.some(n=>n.test(r))?void 0:i)}var bn=class{constructor(e){this.defined=Fe(()=>vl(this.value));this.value=e?a$(e):{}}lookup(e){return bn.platform==="win32"?l$(this.value,e):this.value[e]}addToPath(e,r="append",i=!1){let n=bn.platform==="win32"?"Path":"PATH",s=bn.platform==="win32"?gw.win32.delimiter:gw.posix.delimiter,o=this.lookup(n);return i&&!o&&(o=`\${env:${n}}`),o?r==="append"?o=o+s+e:o=e+s+o:o=e,this.update(n,o)}addNodeOption(e){let r=this.lookup("NODE_OPTIONS");return this.update("NODE_OPTIONS",r?`${r} ${e}`:e)}update(e,r){return bn.merge(this,{[e]:r})}merge(...e){return bn.merge(this,...e)}map(e){return new bn(ao(this.value,(r,i)=>e(i,r)))}static merge(...e){let r=e.map(n=>n instanceof bn?n.value:n),i=bn.platform==="win32"?c$(...r):Object.assign({},...r);return new bn(i)}},Dt=bn;Dt.platform=process.platform,Dt.empty=new bn({}),Dt.processEnv=Fe(()=>hve(process.env));var b6="--remote-debugging-port",w6="--remote-debugging-pipe",_6=t=>{let e={};for(let r of t){let i=r.indexOf("=");i===-1?e[r]=null:e[r.slice(0,i)]=r.slice(i+1)}return e},Hw=t=>{let e=[];for(let r of Object.keys(t)){let i=t[r];i!==void 0&&e.push(i===null?r:`${r}=${i}`)}return e},jo=class{constructor(e=[]){this.args=e;this.argMap=Fe(()=>_6(this.args))}add(e,r=null){return new jo(Hw({...this.argMap(),[e]:r}))}remove(e){return new jo(Hw({...this.argMap(),[e]:void 0}))}merge(e){return new jo(Hw({...this.argMap(),...e instanceof jo?e.argMap():_6(e)}))}setConnection(e){return new jo(Hw({...this.argMap(),[w6]:e==="pipe"?null:void 0,[b6]:e!=="pipe"?String(e):void 0}))}getSuggestedConnection(){let e=this.argMap();if(e.hasOwnProperty(w6))return"pipe";let r=e[b6];if(r!==void 0)return r&&Number(r)||0}filter(e){let r=this.argMap(),i=[];for(let n of Object.keys(r)){let s=r[n];e(n,s)&&i.push(s===null?n:`${n}=${s}`)}return new jo(i)}toArray(){return this.args.slice()}},qo=jo;qo.default=new jo(["--disable-background-networking","--disable-background-timer-throttling","--disable-backgrounding-occluded-windows","--disable-breakpad","--disable-client-side-phishing-detection","--disable-default-apps","--disable-dev-shm-usage","--disable-renderer-backgrounding","--disable-sync","--metrics-recording-only","--no-first-run","--no-default-browser-check"]);var iL=require("url");function yw(t,e,r){let i=uo(o=>{if(o)return new iL.URL(o);throw new Error(`A valid url wasn't supplied: <${o}>`)}),n={"url.hostname":()=>i(e).hostname,"url.port":()=>i(e).port,browserInspectUri:()=>encodeURIComponent(r),browserInspectUriPath:()=>new iL.URL(r).pathname,wsProtocol:()=>i(e).protocol==="https:"?"wss":"ws"};return t.replace(/{([^\}]+)}/g,(o,a)=>n.hasOwnProperty(a)?n[a]():o)}var L6=S(require("readline"));var S6=S(nL());var wn=class{constructor(e,r,i){this.logger=e;this.pipeWrite=r;this.pipeRead=i;this.messageEmitter=new X;this.endEmitter=new X;this.onMessage=this.messageEmitter.event;this.onEnd=this.endEmitter.event;this.onceEnded=Fe(()=>{var e;this.streams&&(this.beforeClose(),this.streams.read.removeAllListeners(),(e=this.pipeRead)==null||e.destroy(),this.streams.write.removeListener("end",this.onceEnded),this.streams.write.removeListener("error",this.onWriteError),this.streams.write.on("error",()=>{}),this.streams.write.end(),this.streams=void 0,this.endEmitter.fire())});this.onWriteError=e=>{this.logger.error("internal","pipeWrite error",{error:e})};let n=i||r;this.streams={read:n.on("error",s=>this.logger.error("internal","pipeRead error",{error:s})).pipe((0,S6.default)("\0")).on("data",s=>this.messageEmitter.fire([s,new ti])).on("end",this.onceEnded),write:r.on("end",this.onceEnded).on("error",this.onWriteError)}}send(e){var r;(r=this.streams)==null||r.write.write(e+"\0")}dispose(){this.onceEnded()}beforeClose(){}};var bw=require("child_process"),sL=require("path");function Wo(t,e,r="forceful"){if(r==="none")return!0;if(process.platform==="win32"){let i=process.env.WINDIR||"C:\\Windows",n=(0,sL.join)(i,"System32","taskkill.exe");try{return(0,bw.execSync)(`${n} ${r==="forceful"?"/F":""} /T /PID ${t}`,{stdio:"pipe"}),!0}catch(s){return e.error("runtime.exception","Error running taskkill.exe",s),!1}}else try{let i=(0,sL.join)(__dirname,"./targets/node/terminateProcess.sh"),n=(0,bw.spawnSync)("sh",[i,t.toString(),r==="forceful"?"9":"15"]);return n.stderr&&n.status?(e.error("runtime.exception","Error running terminateProcess",n),!1):!0}catch(i){return e.error("runtime.exception","Error running terminateProcess",i),!1}}var D6=require("fs");async function oL(t,e,r,i){let n=new iu(D6.promises),[s,o]=await Promise.all([C6(n,new URL("/json/version",t),e),i?C6(n,new URL("/json/list",t),e):Promise.resolve(void 0)]);if(!s.ok)r.verbose("runtime.launch","Error looking up /json/version",s);else if(s.body.webSocketDebuggerUrl){let a=x6(s.url,s.body.webSocketDebuggerUrl);return r.verbose("runtime.launch","Discovered target URL from /json/version",{url:s.body.webSocketDebuggerUrl,fixed:a}),a}if(o)if(!o.ok)r.verbose("runtime.launch","Error looking up /json/list",o);else{let a=x6(o.url,o.body[0].webSocketDebuggerUrl);return r.verbose("runtime.launch","Discovered target URL from /json/list",{url:o.body[0].webSocketDebuggerUrl,fixed:a}),a}throw new Error("Could not find any debuggable target")}async function C6(t,e,r){if(e.hostname!=="localhost")return t.fetchJson(e.toString(),r,{host:"localhost"});let i=e.toString();e.hostname="127.0.0.1";let n=e.toString(),s=new dr(r);try{let o;return await Is([i,n].map(async u=>(o=await t.fetchJson(u,s.token),o.ok&&o)))||o}finally{s.cancel()}}var P6=t=>async(e,r,i)=>{for(;;)try{return await oL(e,r,i,t)}catch(n){if(r.isCancellationRequested)throw new Error(`Could not connect to debug target at ${e}: ${n.message}`);await Oe(200)}},Pf=P6(!0),ww=P6(!1);function x6(t,e){let r=new URL(t),i=new URL(e);return i.host=r.host,i.toString()}var T6=async(t,e,r,i)=>{let n=r.connection===0?await wve(e,i):await ww(`http://localhost:${r.connection}`,i,t),s=r.inspectUri?yw(r.inspectUri,r.url,n):n;for(;;)try{return await ii.create(s,i)}catch(o){if(i.isCancellationRequested)throw o;await Oe(200)}},_w=class{constructor(e){this.logger=e;this.pid=void 0;this.onExit=new X().event;this.onError=new X().event}async transport(e,r){return T6(this.logger,this,e,r)}kill(){}},Aw=class{constructor(e,r){this.cp=e;this.logger=r;this.pid=void 0;this.exitEmitter=new X;this.onExit=this.exitEmitter.event;this.errorEmitter=new X;this.onError=this.errorEmitter.event;e.on("exit",i=>this.exitEmitter.fire(i||0)),e.on("error",i=>this.errorEmitter.fire(i))}get stderr(){return this.cp.stderr}get stdio(){return this.cp.stdio}async transport(e,r){return e.connection==="pipe"?new wn(this.logger,this.cp.stdio[3],this.cp.stdio[4]):T6(this.logger,this,e,r)}kill(){Wo(this.cp.pid,this.logger)}};function wve(t,e){if(!t.stderr)throw new Error("Cannot wait for a websocket for a target that lacks stderr");return new Promise((r,i)=>{let n=L6.createInterface({input:t.stderr}),s="",o=()=>c();n.on("line",l),n.on("close",o);let a=new Le([t.onExit(()=>c()),t.onError(c)]),u=e.onCancellationRequested(()=>{p(),i(new Ms(`Timed out after ${u} ms while trying to connect to the browser!`))});function c(f){p(),i(new Error(["Failed to launch browser!"+(f?" "+f.message:""),s,"","TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md",""].join(`
`)))}function l(f){s+=f+`
`;let h=f.match(/^DevTools listening on (ws:\/\/.*)$/);h&&(p(),r(h[1]))}function p(){u.dispose(),n.removeListener("line",l),n.removeListener("close",o),a.dispose()}})}async function $6(t,e,r,i){let n=t.launchUnelevatedRequest({process:e,args:r});await Os(n,i,"Could not launch browser unelevated")}var k6=()=>{};async function O6(t,e,r,i,n,s,o={}){var j,F,$,O;let{onStderr:a=k6,onStdout:u=k6,args:c=[],dumpio:l=!1,cwd:p=process.cwd(),env:f=Dt.empty,connection:h="pipe",cleanUp:g="wholeBrowser",url:H,inspectUri:v}=o,w=new qo(c),T=w.getSuggestedConnection();o.includeLaunchArgs!==!1?(w=aL(w,o),T===void 0&&(w=w.setConnection(h),T=h)):T===void 0&&(T="pipe");let U=["pipe","pipe","pipe"];T==="pipe"&&(l?U=["ignore","pipe","pipe","pipe","pipe"]:U=["ignore","ignore","ignore","pipe","pipe"]);let x;if(!!(n.supportsLaunchUnelevatedProcessRequest&&o.launchUnelevated)&&typeof T=="number"&&T!==0)await $6(t,e,w.toArray(),s),x=new _w(r);else{r.info("runtime.launch",`Launching Chrome from ${e}`);let E=R6.spawn(e,w.toArray(),{detached:!0,env:f.defined(),cwd:await Ju(M6.promises,p)?p:process.cwd(),stdio:U});if(E.pid===void 0)throw await Promise.race([Oe(1e3).then(()=>new Error("Unable to launch the executable (undefined pid)")),new Promise(M=>E.once("error",M))]);x=new Aw(E,r)}l?((j=x.stderr)==null||j.on("data",E=>a(E.toString())),(F=x.stdout)==null||F.on("data",E=>u(E.toString()))):(($=x.stderr)==null||$.resume(),(O=x.stdout)==null||O.resume());let q=()=>{g==="wholeBrowser"&&x.kill()};process.on("exit",q),x.onExit(()=>process.removeListener("exit",q));try{o.promisedPort&&(T=await o.promisedPort);let E=await x.transport({connection:T,inspectUri:v||void 0,url:H||void 0},s),M=new Yt(E,r,i);return q=async()=>{g==="wholeBrowser"?(await M.rootSession().Browser.close({}),x.kill()):M.close()},{cdp:M,process:x}}catch(E){throw q(),E}}function aL(t,e={}){let{userDataDir:r=null,ignoreDefaultArgs:i=!1}=e,n=i===!0?new qo:qo.default;return i instanceof Array&&(n=n.filter(s=>!i.includes(s))),r&&(n=n.add("--user-data-dir",r)),n=n.merge(t),t.toArray().every(s=>s.startsWith("-"))&&e.hasUserNavigation&&(n=n.add("about:blank")),n}async function N6(t,e,r,i){let{browserWSEndpoint:n,browserURL:s}=t;if(n){let o=await ii.create(n,e);return new Yt(o,r,i)}else if(s){let o=await ww(s,e,r),a=t.inspectUri?yw(t.inspectUri,t.pageURL,o):o,u=await ii.create(a,e);return new Yt(u,r,i)}throw new Error("Either browserURL or browserWSEndpoint needs to be specified")}var _n=class{constructor(e,r,i){this.logger=e;this.pathResolver=r;this.vscode=i;this._disposables=[];this._onTerminatedEmitter=new X;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new X;this.onTargetListChanged=this._onTargetListChangedEmitter.event}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[],this._attemptTimer&&clearTimeout(this._attemptTimer),this._targetManager&&this._targetManager.dispose()}resolveParams(e){return e.request==="attach"&&(e.type==="pwa-chrome"||e.type==="pwa-msedge"&&typeof e.useWebView!="object")&&e.browserAttachLocation==="workspace"}async launch(e,r){return this.resolveParams(e)?(this._lastLaunchParams={...e,timeout:1/0},await this.attemptToAttach(this._lastLaunchParams,r),{blockSessionTermination:!0}):{blockSessionTermination:!1}}_scheduleAttach(e,r){this._attemptTimer=setTimeout(()=>{this._attemptTimer=void 0,this.attemptToAttach(e,{...r,cancellationToken:hr})},1e3)}createTargetManager(e,r,i){return bu.connect(e,void 0,this.pathResolver,r,this.logger,i.telemetryReporter,i.targetOrigin)}async attemptToAttach(e,r){let i=await this.acquireConnectionForBrowser(r,e);this._connection=i,i.onDisconnected(()=>{this._connection=void 0,this._targetManager&&(this._targetManager.dispose(),this._targetManager=void 0,this._onTargetListChangedEmitter.fire()),this._lastLaunchParams===e&&e.restart?this._scheduleAttach(e,r):this._onTerminatedEmitter.fire({killed:!0,code:0})},void 0,this._disposables);let n=this._targetManager=await this.createTargetManager(i,e,r);if(!n)return;n.serviceWorkerModel.onDidChange(()=>this._onTargetListChangedEmitter.fire()),n.frameModel.onFrameNavigated(()=>this._onTargetListChangedEmitter.fire()),n.onTargetAdded(()=>{this._onTargetListChangedEmitter.fire()}),n.onTargetRemoved(()=>{this._onTargetListChangedEmitter.fire(),n.targetList().length||this._onTerminatedEmitter.fire({killed:!0,code:0})});let s=await Promise.race([n.waitForMainTarget(await this.getTargetFilter(n,e)),Oe(e.timeout).then(()=>{throw new ne(Wy())})]);return typeof s=="string"?s:void 0}async getTargetFilter(e,r){let i=Ea(r),n=ep(i);if(r.targetSelection!=="pick")return n;let s=await e.getCandiateInfo(n);if(s.length===0)return n;if(s.length===1||!this.vscode)return u=>u.targetId===s[0].targetId;let o=Iw.t("Select a tab"),a=await this.vscode.window.showQuickPick(s.map(u=>({label:u.title,detail:u.url,targetId:u.targetId})),{matchOnDescription:!0,matchOnDetail:!0,placeHolder:o});return a?u=>u.targetId===a.targetId:n}async acquireConnectionForBrowser({telemetryReporter:e,cancellationToken:r},i){for(;this._lastLaunchParams===i;)try{return await this.acquireConnectionInner(e,i,r)}catch(n){if(r.isCancellationRequested)throw new ne(Th(Iw.t("Cannot connect to the target at {0}: {1}",`${i.address}:${i.port}`,n.message)));await Oe(1e3)}throw new ne(Th(Iw.t("Cannot connect to the target at {0}: {1}",`${i.address}:${i.port}`,"Cancelled")))}async acquireConnectionInner(e,r,i){let n=`http://${r.address}:${r.port}`;return await N6({browserURL:n,inspectUri:r.inspectUri,pageURL:r.url},i,this.logger,e)}async terminate(){var e;this._lastLaunchParams=void 0,(e=this._connection)==null||e.close()}disconnect(){return this.terminate()}async restart(){if(this._targetManager)for(let e of this._targetManager.targetList())e.type()==="page"&&!e.name().startsWith("devtools://")&&e.restart()}targetList(){let e=this._targetManager;return e?e.targetList():[]}};_n=k([(0,_u.injectable)(),A(0,(0,_u.inject)(fe)),A(1,(0,_u.inject)(ut)),A(2,(0,_u.optional)()),A(2,(0,_u.inject)(an))],_n);var zn=S(Y());var B6=S(zA()),U6=S(require("fs")),Au=S(Y()),Ew=S(require("path"));var Js=class{constructor(e,r,i,n,s){this.storagePath=e;this.logger=r;this.pathResolver=i;this.initializeParams=n;this.fs=s;this._disposables=new Le;this._terminated=!1;this._onTerminatedEmitter=new X;this.onTerminated=this._onTerminatedEmitter.event;this._onTargetListChangedEmitter=new X;this.onTargetListChanged=this._onTargetListChangedEmitter.event}dispose(){this._disposables.dispose()}async launchBrowser({runtimeExecutable:e,trace:r,includeDefaultArgs:i,includeLaunchArgs:n,runtimeArgs:s,userDataDir:o,env:a,cwd:u,port:c,url:l,file:p,inspectUri:f,webRoot:h,cleanUp:g,launchUnelevated:H},v,w,T,U){let x=await this.findBrowserPath(e||"stable"),P;typeof o=="string"?P=o:o&&(P=Ew.join(this.storagePath,s!=null&&s.includes("--headless")?".headless-profile":".profile"));try{U6.mkdirSync(this.storagePath)}catch(q){}return await O6(v,x,this.logger,T,this.initializeParams,w,{onStdout:q=>v.output({category:"stdout",output:q}),onStderr:q=>v.output({category:"stderr",output:q}),dumpio:typeof r=="boolean"?r:r.stdio,cleanUp:g,hasUserNavigation:!!(l||p),cwd:u||h||void 0,env:Dt.merge(Dt.processEnv(),a),args:s||[],userDataDir:P,connection:c||(f?0:"pipe"),launchUnelevated:H,ignoreDefaultArgs:!i,includeLaunchArgs:n,url:l,inspectUri:f,promisedPort:U})}getFilterForTarget(e){return ep(Ea(e,["about:blank"]))}async prepareLaunch(e,{dap:r,targetOrigin:i,cancellationToken:n,telemetryReporter:s}){let o;try{o=await this.launchBrowser(e,r,n,s)}catch(c){throw new ne(xM(c))}if(this._disposables.push(o.cdp.onDisconnected(()=>this.fireTerminatedEvent())),this._connectionForTest=o.cdp,this._launchParams=e,this._targetManager=await bu.connect(o.cdp,o.process,this.pathResolver,this._launchParams,this.logger,s,i),!this._targetManager)throw o.process.kill(),new ne(Th());this._targetManager.serviceWorkerModel.onDidChange(()=>this._onTargetListChangedEmitter.fire()),this._targetManager.frameModel.onFrameNavigated(()=>this._onTargetListChangedEmitter.fire()),this._disposables.push(this._targetManager),this._targetManager.onTargetAdded(()=>{this._onTargetListChangedEmitter.fire()}),this._targetManager.onTargetRemoved(()=>{this._onTargetListChangedEmitter.fire()});let a=this.getFilterForTarget(e),u=await Os(this._targetManager.waitForMainTarget(a),n,"Could not attach to main target");if(!u)throw o.process.kill(),new ne(Wy());return u}async finishLaunch(e,r){if("skipNavigateForTest"in r)return;let i;if(r.file){let n=Ew.resolve(r.webRoot||r.rootPath||"",r.file),s=Math.min(n.includes("#")?n.indexOf("#"):1/0,n.includes("?")?n.indexOf("?"):1/0);isFinite(s)&&!await Di(this.fs,n)?i=Qe(n.slice(0,s))+n.slice(s):i=Qe(n)}else i=r.url;i&&await e.cdp().Page.navigate({url:i})}async launch(e,r){let i=this.resolveParams(e);if(!i)return{blockSessionTermination:!1};let n=await this.prepareLaunch(i,r);return await this.finishLaunch(n,i),{blockSessionTermination:!0}}async terminate(){for(let e of this.targetList())e.type()==="page"&&await e.cdp().Page.close({})}async disconnect(){var e;await((e=this._targetManager)==null?void 0:e.closeBrowser())}async restart(){for(let e of this.targetList())e.type()==="page"&&e.restart()}async findBrowserByExe(e,r){var i;if(r==="*"){let n=await e.findWhere(s=>s.quality==="stable")||(await e.findAll())[0];return n==null?void 0:n.path}else return(0,B6.isQuality)(r)?(i=await e.findWhere(n=>n.quality===r))==null?void 0:i.path:r}targetList(){let e=this._targetManager;return e?e.targetList():[]}connectionForTest(){return this._connectionForTest}fireTerminatedEvent(){this._terminated||(this._terminated=!0,this._onTerminatedEmitter.fire({code:0,killed:!0}))}};Js=k([(0,Au.injectable)(),A(0,(0,Au.inject)(Ls)),A(1,(0,Au.inject)(fe)),A(2,(0,Au.inject)(ut)),A(3,(0,Au.inject)(gi)),A(4,(0,Au.inject)(Ie))],Js);var Gc=class extends Js{constructor(r,i,n,s,o,a){super(r,i,o,a,s);this.browserFinder=n}resolveParams(r){return r.type==="pwa-chrome"&&r.request==="launch"&&r.browserLaunchLocation==="workspace"?r:void 0}async findBrowserPath(r){let i=await this.findBrowserByExe(this.browserFinder,r);if(!i||!await Ju(this.fs,i))throw new ne(qy("Chrome",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Gc=k([(0,zn.injectable)(),A(0,(0,zn.inject)(Ls)),A(1,(0,zn.inject)(fe)),A(2,(0,zn.inject)(lc)),A(2,(0,zn.tagged)("browser","chrome")),A(3,(0,zn.inject)(Ie)),A(4,(0,zn.inject)(ut)),A(5,(0,zn.inject)(gi))],Gc);var j6=require("crypto"),Xn=S(Y()),q6=require("net"),W6=require("os"),V6=require("path");var _ve=["--do-not-de-elevate"],Lf=class extends Js{constructor(r,i,n,s,o,a){super(r,i,o,a,s);this.browserFinder=n}resolveParams(r){return r.type==="pwa-msedge"&&r.request==="launch"&&r.browserLaunchLocation==="workspace"?r:void 0}launchBrowser(r,i,n,s){var o;return super.launchBrowser({...r,runtimeArgs:(o=r.runtimeArgs)!=null?o:_ve},i,n,s,r.useWebView?this.getWebviewPort(r,s):void 0)}getFilterForTarget(r){return r.useWebView&&r.urlFilter?ep(Ea(r)):super.getFilterForTarget(r)}async getWebviewPort(r,i){let n=Je();if(!r.runtimeExecutable)return n.resolve(r.port),n.promise;let s=r.runtimeExecutable.split(/\\|\//).pop(),o=`VSCode_${(0,j6.randomBytes)(12).toString("base64")}`,a=`\\\\.\\pipe\\WebView2\\Debugger\\${s}\\${o}`,u=(0,q6.createServer)(c=>{c.on("data",async l=>{let p=JSON.parse(l.toString()),f=p.devtoolsActivePort||"",h=parseInt(f.split(`
`).shift()||""),g=r.port||h;n.resolve(g);let H=`ws://${r.address}:${g}/devtools/${p.type}/${p.id}`,v=await ii.create(H,hr),w=new Yt(v,this.logger,i);await w.rootSession().Runtime.runIfWaitingForDebugger({}),w.close()})});return u.on("error",n.reject),u.on("close",()=>n.resolve(r.port)),u.listen(a),r.userDataDir=r.userDataDir||(0,V6.join)((0,W6.tmpdir)(),`vscode-js-debug-userdatadir_${r.port}`),r.env=r.env||{},r.env.WEBVIEW2_USER_DATA_FOLDER=r.userDataDir.toString(),r.env.WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=`--remote-debugging-port=${r.port}`,r.env.WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER="true",r.env.WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER=o,n.promise}async findBrowserPath(r){let i=await this.findBrowserByExe(this.browserFinder,r);if(!i||!await Ju(this.fs,i))throw new ne(qy("Edge",r,(await this.browserFinder.findAll()).map(n=>n.quality)));return i}};Lf=k([(0,Xn.injectable)(),A(0,(0,Xn.inject)(Ls)),A(1,(0,Xn.inject)(fe)),A(2,(0,Xn.inject)(lc)),A(2,(0,Xn.tagged)("browser","edge")),A(3,(0,Xn.inject)(Ie)),A(4,(0,Xn.inject)(ut)),A(5,(0,Xn.inject)(gi))],Lf);var Vo=S(Y());var G6=require("crypto"),Sw=S(Y());var Ave=0,Ys=class{constructor(e){this.portLeaseTracker=e;this.teardown=new WeakMap}async launch(e,r,i){this.server&&this.server.close();let n=`/${(0,G6.randomBytes)(20).toString("hex")}`,s=this.server=await ib(this.portLeaseTracker,{perMessageDeflate:!0,host:"127.0.0.1",path:n}),o=++Ave;e.launchBrowserInCompanion({...i,serverPort:s.address().port,path:n,launchId:o});let a=await Os(new Promise((c,l)=>{s.once("connection",c),s.once("error",l)}),r,"Timed out waiting for browser connection"),u=new ii(a);return this.teardown.set(u,()=>e.killCompanionBrowser({launchId:o})),u}close(e){var r;(r=this.teardown.get(e))==null||r()}dispose(){var e;(e=this.server)==null||e.close(),this.server=void 0}};Ys=k([(0,Sw.injectable)(),A(0,(0,Sw.inject)(gt))],Ys);var Tf=class extends _n{constructor(r,i,n,s){super(i,n,s);this.helper=r}resolveParams(r){return r.request==="attach"&&(r.type==="pwa-chrome"||r.type==="pwa-msedge")&&r.browserAttachLocation==="ui"}async acquireConnectionForBrowser(r,i){let n=await this.helper.launch(r.dap,r.cancellationToken,{type:i.type==="pwa-chrome"?"chrome":"edge",params:i,attach:{host:i.address,port:i.port}});return new Yt(n,this.logger,r.telemetryReporter)}};Tf=k([(0,Vo.injectable)(),A(0,(0,Vo.inject)(Ys)),A(1,(0,Vo.inject)(fe)),A(2,(0,Vo.inject)(ut)),A(3,(0,Vo.optional)()),A(3,(0,Vo.inject)(an))],Tf);var Go=S(Y());var $f=class extends Js{constructor(r,i,n,s,o,a){super(r,i,n,s,o);this.helper=a}resolveParams(r){return(r.type==="pwa-chrome"||r.type==="pwa-msedge")&&r.request==="launch"&&r.browserLaunchLocation==="ui"?r:void 0}async launchBrowser(r,i,n,s){let o=await this.helper.launch(i,n,{type:r.type==="pwa-chrome"?"chrome":"edge",browserArgs:aL(new qo(r.runtimeArgs||[]),{hasUserNavigation:!!r.url,ignoreDefaultArgs:!r.includeDefaultArgs}).setConnection(r.port||"pipe").toArray(),params:r});return{cdp:new Yt(o,this.logger,s),process:{onExit:new X().event,onError:new X().event,transport:()=>Promise.resolve(o),kill:()=>this.helper.close(o)}}}async findBrowserPath(){throw new Error("not implemented")}};$f=k([(0,Go.injectable)(),A(0,(0,Go.inject)(Ls)),A(1,(0,Go.inject)(fe)),A(2,(0,Go.inject)(ut)),A(3,(0,Go.inject)(gi)),A(4,(0,Go.inject)(Ie)),A(5,(0,Go.inject)(Ys))],$f);var Iu=S(Y()),Z6=require("net");var kf=class extends _n{constructor(e,r,i){super(e,r,i)}resolveParams(e){return e.request==="attach"&&e.type==="pwa-msedge"&&typeof e.useWebView=="object"}async acquireConnectionForBrowser(e,r){let{getAppContainerProcessTokens:i}=await Promise.resolve().then(()=>S(Q6())),n=i(r.useWebView.pipeName);if(!n)throw new ne(PM());let s=n.map(u=>(0,Z6.connect)(u)),o;try{o=await Os(Is(s.map(u=>new Promise(c=>u.on("error",()=>c(void 0)).on("connect",()=>c(u))))),e.cancellationToken)}finally{for(let u of s)u!==o&&u.destroy()}if(!o)throw new ne(LM());let a=new wn(this.logger,o);return new Yt(a,this.logger,e.telemetryReporter)}};kf=k([(0,Iu.injectable)(),A(0,(0,Iu.inject)(fe)),A(1,(0,Iu.inject)(ut)),A(2,(0,Iu.optional)()),A(2,(0,Iu.inject)(an))],kf);var Nf=S(Y()),d9=require("net");var Gi=S(Y());var Lg=Symbol("ILinkedBreakpointLocation");var a9=S(require("path"));var $g=S(Y()),Su=S(require("path")),o9=require("url");var e9=require("fs"),Ko=S(require("path")),uL=require("url");function xw(t,e){return t?(t.endsWith("/")||(t+="/"),t+e):e}async function Dw(t,e,r,i,n){e=mt(e)||e;let s;if(t){if(ki(t))s=mt(t);else if(jr(t))s=await i(t,r,n)||t;else if(Ko.isAbsolute(e))s=Pve(e,t);else{let o=new uL.URL(e).pathname,a=await i(o,r,n),u=Ko.dirname(a);s=fa(u,t)}n.verbose("sourcemap.parsing","resolved sourceRoot",{sourceRoot:t,absSourceRoot:s})}else if(Ko.isAbsolute(e))s=Ko.dirname(e),n.verbose("sourcemap.parsing","no sourceRoot specified, using script dirname",{absSourceRoot:s});else{let o=new uL.URL(e).pathname||"/placeholder.js",a=await i(o,r,n);s=a?Ko.dirname(a):"",n.verbose("sourcemap.parsing","no sourceRoot specified, using webRoot + script path dirname",{absSourceRoot:s})}return s=lN(s),s=Ft(s),s}var Tg=async(t,e,r)=>{if(!t||!t.startsWith("/"))return"";let i=Object.keys(e).sort((n,s)=>s.length-n.length);for(let n of i){if(!n)continue;let s=e[n];if(n[0]!=="/"&&(r.verbose("sourcemap.parsing",`Keys should be absolute: ${n}`),n="/"+n),xve(n,t))return Dve(n,s,t)}return""},t9=(t,e)=>async(r,i,n)=>{if(process.platform==="win32"&&/^[a-z]:/i.test(r))return r;let s=await Ql(t,Ko.dirname(e),"package.json");if(!s)return Tg(r,i,n);let o=await Tg(r,u$(i,a=>a.length>=s.length),n);if(process.platform!=="win32"&&r!=="/"&&!o){let a=await e9.promises.stat(r).catch(()=>{});if(a!=null&&a.isDirectory())return r}return o||s};function xve(t,e){return t===e?!0:(t.endsWith("/")||(t+="/"),e.startsWith(t))}function Dve(t,e,r){let i=decodeURIComponent(r.substring(t.length));return i?fa(e,i):e}function Pve(t,e){return Pi(Ko.dirname(t),e)}var s9=S(om()),Mf=S(require("path"));var Tw="*",r9=new RegExp(Zr(Tw),"g"),Pw="?:"+Tw,Lve=new RegExp(Zr(Pw),"g"),cL=(t,e)=>{let r=e.match(t);return t.lastIndex=0,r?r.length:0},i9=new RegExp(`${Zr(Pw)}|${Zr(Tw)}`,"g"),Lw=class{constructor(e,r){this.logger=r;this.replacers=[];let i=Object.keys(e).sort((n,s)=>s.replace(Pw,"*").length-n.replace(Pw,"*").length);for(let n of i){let s=e[n];if(!s.includes("*")&&/\$[0-9'`&]/.test(s)){this.replacers.push([new RegExp(`^${n}$`,"i"),s]);continue}let o=qe(n),a=`"${o}": "${s}"`,u=cL(r9,o)-cL(Lve,o);if(u>1){r.warn("runtime.sourcemap",`Warning: only one asterisk allowed in a sourceMapPathOverrides entry - ${a}`);continue}if(cL(r9,s)>u){r.warn("runtime.sourcemap",`The right side of a sourceMapPathOverrides entry must have 0 or 1 asterisks - ${a}}`);continue}let c="^",l=0;for(i9.lastIndex=0;;){let p=i9.exec(o);if(c+=Zr(o.slice(l,p==null?void 0:p.index),"/"),!p)break;p[0]===Tw?c+="(.*?)":c+=".*?",l=p.index+p[0].length}u===0&&(c+="([\\/\\\\].*)?",s+="*"),this.replacers.push([new RegExp(c+"$","i"),s.replace(/\$/g,"$$$$").replace(/\*/,"$1")])}}apply(e){let r=qe(e);for(let[i,n]of this.replacers){let s=r.replace(i,n);if(s!==r)return this.logger.verbose("runtime.sourcemap",`SourceMap: mapping ${e} => ${s}, via sourceMapPathOverrides entry - ${i.toString()}`),fa(s)}return e}};var Tve=/\x00/,n9,Rf=class{constructor(e,r){this.options=e;this.logger=r;this.sourceMapOverrides=new Lw(this.options.sourceMapOverrides,this.logger);this.resolvePatterns=(n9=this.options.resolveSourceMapLocations)==null?void 0:n9.map(e=>{let r=e.startsWith("!")?"!":"",i=e.slice(r.length).replace(/\.[a-z0-9]+$/,".*");if(!jr(i))return qe(e);i=qe(Pi(i));let n=JI(this.options.workspaceFolder),s=JI(i),o=0;for(let a=0;a<n.length&&a<s.length&&s[a].toLowerCase()===n[a].toLowerCase();a++)o+=n[a].length+1;return i=i.slice(0,o).replace(/[\[\]\(\)\{\}\!\*]/g,"\\$&")+i.slice(o),r+i})}shouldResolveSourceMap({sourceMapUrl:e,compiledPath:r}){if(r.startsWith(nu))return!1;if(!this.resolvePatterns||this.resolvePatterns.length===0)return!0;let i=mt(e)||_r(e)&&r||e;if(i.startsWith("webpack-internal:///"))return!0;let n=$y(e)?!1:zE(),s=this.rebaseRemoteToLocal(i);return(0,s9.default)((s!==i?[i,s]:[i]).map(qe),this.resolvePatterns,{dot:!0,nocase:!n}).length>0}rebaseRemoteToLocal(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return Mf.resolve(e);let r=Ah(this.options.remoteRoot,e);if(r.startsWith(".."))return"";let i=fa(this.options.localRoot,r);return i=YI(i),this.logger.verbose("runtime.sourcemap",`Mapped remoteToLocal: ${e} -> ${i}`),Pi(i)}rebaseLocalToRemote(e){if(!this.options.remoteRoot||!this.options.localRoot||!this.canMapPath(e))return e;let r=Ah(this.options.localRoot,e),i=fa(this.options.remoteRoot,r);return i=Ft(i,!0),this.logger.verbose("runtime.sourcemap",`Mapped localToRemote: ${e} -> ${i}`),i}normalizeSourceMapUrl(e){e=e.replace(Tve,"");let r=e.lastIndexOf("?");return r!==-1&&e.slice(r-4,r)!==".vue"&&(e=e.slice(0,r)),e}canMapPath(e){return Mf.posix.isAbsolute(e)||Mf.win32.isAbsolute(e)||ki(e)}};var lL="https?:\\/\\/[^\\/]+\\/",Eu=class extends Rf{constructor(r,i,n,s){super(n,s);this.vueMapper=r;this.fsUtils=i}absolutePathToUrlPath(r){r=Su.normalize(r);let{baseUrl:i,pathMapping:n}=this.options,s=["/",n["/"]],o=Object.entries(n).sort(([c,l],[p,f])=>f.length-l.length||p.length-c.length).find(([,c])=>Ty(c,r))||s;if(!o)return{url:Qe(r),needsWildcard:!1};let a=Ia(Su.relative(o[1],r)),u=o[0].replace(/\/$|^\//g,"");return u&&(a=u+"/"+a),!i&&!Av(a)?{url:a,needsWildcard:!0}:{url:gv(i,a),needsWildcard:!1}}async urlToAbsolutePath({url:r,map:i}){let n=r.indexOf("?");return n!==-1&&r.slice(n-4,n)!==".vue"&&(r=r.slice(0,n)),i?this.sourceMapSourceToAbsolute(r,i):this.simpleUrlToAbsolute(r)}async simpleUrlToAbsolute(r){if(!r)return;if(ki(r)){let o=mt(r);if(await this.fsUtils.exists(o))return o;let a=pN(r);if(await this.fsUtils.exists(a))return a}let i;try{let o=new o9.URL(r);if(!o.pathname||o.pathname==="/"?i="index.html":i=o.pathname,o.protocol==="webpack-internal:")return}catch(o){i=r}let n=Su.extname(i),s=i.replace(/^\//,"").split(/[\/\\]/);for(;s.length>0;){let o="/"+s.join("/"),a=await Tg(o,this.options.pathMapping,this.logger);if(a){if(!n&&await this.fsUtils.exists(a+".html"))return a+".html";if(await this.fsUtils.exists(a))return a}s.shift()}}async sourceMapSourceToAbsolute(r,i){if(!this.shouldResolveSourceMap(i.metadata))return;switch(this.vueMapper.getVueHandling(r)){case 2:return;case 1:let a=await this.vueMapper.lookup(r);if(a)return Ft(a);break;default:}r=this.normalizeSourceMapUrl(r);let{pathMapping:n}=this.options,s=xw(i.sourceRoot,r),o=this.sourceMapOverrides.apply(s);if(o!==s){o=Ft(o);let a=Pi(n["/"],"..","ClientApp",Ah(n["/"],o));return this.options.clientID==="visualstudio"&&s.startsWith("webpack:///")&&!await this.fsUtils.exists(o)&&await this.fsUtils.exists(a)?a:o}return ki(r)?mt(r):Su.isAbsolute(r)?Ft(r):Pi(await Dw(i.sourceRoot,i.metadata.compiledPath,n,Tg,this.logger),r)}absolutePathToUrlRegexp(r){let i=this.absolutePathToUrlPath(r),n=i.url,s=r.length;n.endsWith("index.html")?(s=n.length-10-1,n=n.slice(0,s)+"\\/?($|index(\\.html)?)"):n.endsWith(".html")&&(s=n.length-5,n=n.slice(0,s)+"(\\.html)?");let o=0;i.needsWildcard&&(n=lL+n,o=lL.length,s+=lL.length);let a=mi(n,[o,s]);return i.needsWildcard?`${mi(Qe(r))}|${a}`:a}};Eu=k([(0,$g.injectable)(),A(0,(0,$g.inject)(af)),A(1,(0,$g.inject)(Br))],Eu);var $w=class extends Eu{constructor(r,i,n,s){super(r,i,n,s);this.blazorInCodespacesRegexpSubstitution="$1:\\$2";if(this.options.remoteFilePrefix){let o=`\\${a9.default.sep}`,a=this.options.remoteFilePrefix.replace(new RegExp(o,"g"),o);this.blazorInCodespacesRegexp=new RegExp(`^${a}${o}([A-z])\\$${o}(.*)$`)}else this.blazorInCodespacesRegexp=new RegExp("")}absolutePathToUrlRegexp(r){if(this.options.remoteFilePrefix){let i=r.replace(this.blazorInCodespacesRegexp,this.blazorInCodespacesRegexpSubstitution),s=Ia(i).replace(/^(\w):(.*)$/,"$1$2"),o=mi(s);if(o){let a=`dotnet://.*\\.dll/${o}`;return this.logger.verbose("runtime.breakpoints","absolutePathToUrlRegexp.blazor.remoteFs",{absolutePath:r,dotnetUrlRegexp:a}),a}}else{let i=Qe(r),n=mi(i),s=super.absolutePathToUrlRegexp(r);return n.includes(s)?n:`${n}|${s}`}return super.absolutePathToUrlRegexp(r)}};var u9=require("url");function c9(t){if(t.url)try{let e=new u9.URL(t.url);return e.pathname="/",e.search="",e.hash="",e.protocol==="data:"?void 0:e.href}catch(e){}}var Kc=S(require("path")),p9=require("url");var l9="node:",Jn=class extends Rf{constructor(r,i,n,s){super(n,s);this.fsUtils=r;this.linkedBp=i;this.options=n;this.logger=s}static shouldWarnAboutSymlinks(r){var i;return"runtimeArgs"in r&&!((i=r.runtimeArgs)!=null&&i.includes("--preserve-symlinks"))}static getOptions(r){return{workspaceFolder:r.__workspaceFolder,resolveSourceMapLocations:r.resolveSourceMapLocations,basePath:r.cwd,sourceMapOverrides:r.sourceMapPathOverrides,remoteRoot:r.remoteRoot,localRoot:r.localRoot}}derive(r){return new Jn(this.fsUtils,this.linkedBp,{...this.options,...r},this.logger)}get resolutionOptions(){return this.options}async urlToAbsolutePath({url:r,map:i}){var o;if(r=this.normalizeSourceMapUrl(r),r.startsWith(l9)&&this.options.basePath)return r=Kc.join(this.options.basePath,"lib",r.slice(l9.length)),r.endsWith(".js")||(r+=".js"),r;if(i)return this.sourceMapSourceToAbsolute(r,i);let n=mt(r);if(n)return this.rebaseRemoteToLocal(n);if(Av(r)){let a=this.sourceMapOverrides.apply(r);r=a===r?new p9.URL(r).pathname.slice(1):a}else if(Kc.isAbsolute(r))r=this.sourceMapOverrides.apply(r);else return`<node_internals>/${r}`;let s=Pi((o=this.options.basePath)!=null?o:"",r);return this.rebaseRemoteToLocal(s)}absolutePathToUrl(r){return Qe(this.rebaseLocalToRemote(Kc.normalize(r)))}async absolutePathToUrlRegexp(r){var n;let i=r;try{i=await this.fsUtils.realPath(r)}catch(s){}return wv(i,r)?mi(this.absolutePathToUrl(r)):((n=this.linkedBp)==null||n.warn(),mi(this.absolutePathToUrl(r))+"|"+mi(this.absolutePathToUrl(i)))}async sourceMapSourceToAbsolute(r,i){if(!this.shouldResolveSourceMap(i.metadata))return;let n=xw(i.sourceRoot,r),s=this.sourceMapOverrides.apply(n);return s!==n?Ft(s):ki(r)?mt(r):(!Kc.isAbsolute(r)&&this.options.basePath&&(r=Pi(await Dw(this.options.remoteRoot&&jr(i.sourceRoot)&&this.rebaseRemoteToLocal(i.sourceRoot)||i.sourceRoot,i.metadata.compiledPath,{"/":this.options.basePath},t9(this.fsUtils,i.metadata.compiledPath),this.logger),r)),this.rebaseRemoteToLocal(r)||r)}};var ni=Symbol("ISourcePathResolverFactory"),Yn=class{constructor(e,r){this.fsUtils=e;this.linkedBp=r}create(e,r){if(e.type==="pwa-node"||e.type==="node-terminal"||e.type==="pwa-extensionHost")return new Jn(this.fsUtils,Jn.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,Jn.getOptions(e),r);throw new Error(`Not usable for type ${e.type}`)}};Yn=k([(0,Gi.injectable)(),A(0,(0,Gi.inject)(Br)),A(1,(0,Gi.optional)()),A(1,(0,Gi.inject)(Lg))],Yn);var Of=class{constructor(e,r,i,n){this.initializeParams=e;this.vueMapper=r;this.fsUtils=i;this.linkedBp=n}create(e,r){if(e.type==="pwa-node"||e.type==="node-terminal"||e.type==="pwa-extensionHost")return new Jn(this.fsUtils,Jn.shouldWarnAboutSymlinks(e)?this.linkedBp:void 0,Jn.getOptions(e),r);{let i=!!e.inspectUri;return new(i?$w:Eu)(this.vueMapper,this.fsUtils,{workspaceFolder:e.__workspaceFolder,resolveSourceMapLocations:e.resolveSourceMapLocations,baseUrl:c9(e),localRoot:null,remoteRoot:null,pathMapping:{"/":e.webRoot,...e.pathMapping},sourceMapOverrides:e.sourceMapPathOverrides,clientID:this.initializeParams.clientID,remoteFilePrefix:e.__remoteFilePrefix},r)}}};Of=k([(0,Gi.injectable)(),A(0,(0,Gi.inject)(gi)),A(1,(0,Gi.inject)(af)),A(2,(0,Gi.inject)(Br)),A(3,(0,Gi.optional)()),A(3,(0,Gi.inject)(Lg))],Of);var f9=require("url");var kw=class extends bu{constructor(){super(...arguments);this.baseFilter=Ea(this.launchParams);this.filter=r=>{let{debugWebWorkerExtHost:i,debugWebviews:n}=this.launchParams;return!!(i&&(r.type==="worker"&&r.title==="DebugWorkerExtensionHost"||r.type==="page"&&r.title.includes("[Extension Development Host]"))||n&&r.type==="iframe"&&this.baseFilter(r))}}static async connectRenderer(r,i,n,s,o,a){let c=await r.rootSession().Target.attachToBrowserTarget({});if(!c)return;let l=r.createSession(c.sessionId);return new this(r,void 0,l,i,s,o,n,a)}waitForMainTarget(r){let i=this.launchParams;return i.debugWebWorkerExtHost&&this._browser.Target.on("targetCreated",this.enqueueLifecycleFn(async({targetInfo:n})=>{if(!n.url.includes(i.__sessionId))return;let s=await this._browser.Target.attachToTarget({targetId:n.targetId,flatten:!0});s&&this.attachedToTarget(n,s.sessionId,!1)})),super.waitForMainTarget(r)}attachedToTarget(r,i,n,s){let o=super.attachedToTarget(r,i,n||this.filter(r),s,!1);return r.type==="iframe"&&o.setComputeNameFn($ve),o}},$ve=t=>{let e;try{e=new f9.URL(t.targetInfo.url)}catch(r){return}switch(e.searchParams.get("purpose")){case"customEditor":return`${e.searchParams.get("extensionId")} editor: ${e.host}`;case"notebookRenderer":return`Notebook Renderer: ${e.host}`;default:let r=e.searchParams.get("extensionId");return`Webview: ${r?r+" ":""} ${e.host}`}};var Qn=class extends _n{constructor(r,i,n){super(r,i);this.pathResolverFactory=n}async launch(r,i){if(r.type!=="pwa-extensionHost"||r.request!=="attach")return{blockSessionTermination:!1};let n=Qn.debugIdToRendererDebugPort.get(r.__sessionId);if(!n)return{blockSessionTermination:!1};let s=co({name:"Webview",type:"pwa-chrome",request:"attach",port:n,__workspaceFolder:r.__workspaceFolder,urlFilter:"",...r.rendererDebugOptions});return s.__sessionId=r.__sessionId,s.debugWebWorkerExtHost=r.debugWebWorkerHost,s.debugWebviews=r.debugWebviews,super.launch(s,i).catch(o=>this.logger.error("runtime.exception","Error in webview attach",{err:o})),{blockSessionTermination:!1}}async acquireConnectionInner(r,i,n){let s=new Le,o=await new Promise((a,u)=>{let c=(0,d9.createConnection)({port:i.port},()=>a(c));c.on("error",u),s.push(n.onCancellationRequested(()=>{c.destroy(),u(new Error("connection timed out"))}))}).finally(()=>s.dispose());return new Yt(new wn(this.logger,o),this.logger,r)}async getTargetFilter(r){return r.filter}async createTargetManager(r,i,n){return new kw(r,void 0,r.rootSession(),this.pathResolverFactory.create(i,this.logger),this.logger,n.telemetryReporter,i,n.targetOrigin)}};Qn.debugIdToRendererDebugPort=new Map,Qn=k([(0,Nf.injectable)(),A(0,(0,Nf.inject)(fe)),A(1,(0,Nf.inject)(ut)),A(2,(0,Nf.inject)(ni))],Qn);var Qs=class{constructor(){this.target={queue:[]}}connectTo(e){this.target={logger:e}}info(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:1})}verbose(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:0})}warn(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:2})}error(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:3})}fatal(e,r,i){this.log({tag:e,timestamp:Date.now(),message:r,metadata:i,level:4})}log(e){this.target&&("queue"in this.target?this.target.queue.push(e):this.target.logger.log(e))}getRecentLogs(){return this.target?"queue"in this.target?this.target.queue:this.target.logger.getRecentLogs():[]}assert(e,r){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",r,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(r);debugger;return!1}return!0}setup(){throw new Error("A ProxyLogger cannot be setup()")}dispose(){this.target=void 0}forTarget(){return new Qs}};var h9=Symbol("ITargetOrigin"),Rw=class{constructor(e){this.id=e}},Ff=class{constructor(e){this.id=e}};var Mw=class{constructor(e,r){this.parentList=e;this.logger=r;this.targets=new Ws;this.onTerminatedEmitter=new X;this.onTerminated=this.onTerminatedEmitter.event;this.onTargetListChanged=this.targets.onChanged;e.onAdd(([,i])=>{i.parent&&this.targets.get(i.parent.id)&&this.targets.add(i.id,i.target)}),e.onRemove(([i])=>{this.targets.remove(i)&&!this.targets.size&&this.onTerminatedEmitter.fire({killed:!0,code:0})})}async launch(e,r){if(e.type!=="node-terminal"||e.request!=="attach")return{blockSessionTermination:!1};let i=this.parentList.get(e.delegateId);if(i===void 0)return setTimeout(()=>this.onTerminatedEmitter.fire({killed:!0,code:0}),1),{blockSessionTermination:!0};let n=i.target.targetOrigin();if(!(n instanceof Ff))throw new Error("Expected delegate session to have a mutable target origin");let s=i.target.logger;if(!(s instanceof Qs))throw new Error("Expected delegate session to have a proxy logger");return n.id=r.targetOrigin.id,s.connectTo(this.logger),setTimeout(()=>{this.targets.add(e.delegateId,i.target),i.dap.connect(r.dap)},0),{blockSessionTermination:!0}}terminate(){for(let e of this.targets.value())e.stop();return Promise.resolve()}disconnect(){return this.terminate()}restart(){for(let e of this.targets.value())e.restart();return Promise.resolve()}targetList(){return[...this.targets.value()]}dispose(){this.terminate()}};var m9=S(Y());var kve=0,Zs=class{constructor(){this.delegateSessions=new Ws;this.refsByTarget=new WeakMap}createLauncher(e){return new Mw(this.delegateSessions,e)}addDelegate(e,r,i){let n={id:kve++,target:e,dap:r,parent:i&&this.refsByTarget.get(i)};return this.refsByTarget.set(e,n),this.delegateSessions.add(n.id,n),n.id}removeDelegate(e){let r=this.refsByTarget.get(e);r&&this.delegateSessions.remove(r.id)}};Zs=k([(0,m9.injectable)()],Zs);var P9=S(Y());var tt=class{constructor(e,r,i){this.major=e;this.minor=r;this.patch=i}static parse(e){let r=e.split(".").map(Number);if(r.length!==3||r.some(isNaN))throw new SyntaxError(`Input string '${e}' is not a semver`);return new tt(r[0],r[1],r[2])}static min(e,r){return e.lt(r)?e:r}compare(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch}gt(e){return this.compare(e)>0}gte(e){return this.compare(e)>=0}lt(e){return this.compare(e)<0}lte(e){return this.compare(e)<=0}toString(){return`${this.major}.${this.minor}.${this.patch}`}};var E9=S(Y());var A9=S(H9()),to=S(require("fs")),Xc=S(Y()),I9=S(require("net")),hL=S(require("os")),mL=S(require("path"));var Fw=class{constructor(e,r){this.sessionId=e;this.sink=r;this.onMessageEmitter=new X;this.onEndEmitter=new X;this.disposables=new Le;this.onMessage=this.onMessageEmitter.event;this.onEnd=this.onEndEmitter.event;this.disposables.push(r.NodeWorker.on("detachedFromWorker",i=>{i.sessionId===e&&(this.onEndEmitter.fire(),this.dispose())}),r.NodeWorker.on("receivedMessageFromWorker",i=>{i.sessionId===e&&this.onMessageEmitter.fire([i.message,new ti])}))}send(e){this.sink.NodeWorker.sendMessageToWorker({message:e,sessionId:this.sessionId})}dispose(){this.disposables.isDisposed||(this.disposables.dispose(),this.onEndEmitter.fire())}};var fL=require("path"),y9=(0,fL.join)(__dirname,"watchdog.js"),Bw=(0,fL.join)(__dirname,"bootloader.js");var Mg=S(Se()),An=S(Y()),eo=require("path");var kg=S(Y()),v9=require("path");var zc=Symbol("IPackageJsonProvider"),Uw={getPath:()=>Promise.resolve(void 0),getContents:()=>Promise.resolve(void 0)},Bf=class{constructor(e,r){this.fs=e;this.config=r;this.getPath=Fe(async()=>{if(this.config.type!=="pwa-node"||this.config.request!=="launch")return;let e=await Ql(this.fs,this.config.cwd,"package.json");return e?(0,v9.join)(e,"package.json"):void 0});this.getContents=Fe(async()=>{let e=await this.getPath();if(e)try{let r=await this.fs.readFile(e);return JSON.parse(r.toString())}catch(r){return}})}};Bf=k([(0,kg.injectable)(),A(0,(0,kg.inject)(Br)),A(1,(0,kg.inject)(Ke))],Bf);var In=Symbol("INodeBinaryProvider");function jw(t,e){return t.has(1)?e.addNodeOption("--inspect-publish-uid=http"):e}var Uve=new Set(["npm","yarn","pnpm","tnpm","cnpm"]),b9=t=>Uve.has((0,eo.basename)(t,(0,eo.extname)(t))),w9=(t,e)=>{if(!(!t||!b9(t)))return e.find(r=>!r.startsWith("-")&&r!=="run"&&r!=="run-script")},dL=new tt(12,0,0),jve=new tt(8,0,0),qve=[{inclusiveMin:new tt(16,0,0),inclusiveMax:new tt(16,3,99),message:Mg.t("Some breakpoints might not work in your version of Node.js. We recommend upgrading for the latest bug, performance, and security fixes. Details: https://aka.ms/AAcsvqm")},{inclusiveMin:new tt(7,0,0),inclusiveMax:new tt(8,99,99),message:Mg.t("You're running an outdated version of Node.js. We recommend upgrading for the latest bug, performance, and security fixes.")}],si=class{constructor(e,r){this.path=e;this.version=r;this.capabilities=new Set;r===void 0&&(r=dL),r.gte(new tt(12,0,0))&&this.capabilities.add(0),r.gte(new tt(12,6,0))&&this.capabilities.add(1)}get isPreciselyKnown(){return this.version!==void 0}get warning(){if(this.version){for(let e of qve)if(e.inclusiveMax.gte(this.version)&&e.inclusiveMin.lte(this.version))return e}}has(e,r){return!this.isPreciselyKnown&&r!==void 0?r:this.capabilities.has(e)}},Rg=class extends ne{constructor(r,i){super(IM(r.toString(),i));this.version=r;this.location=i}},Wve=["node","node64","electron"],Vve=new Map([[11,new tt(12,0,0)],[10,new tt(12,0,0)],[9,new tt(12,0,0)],[8,new tt(12,0,0)],[7,new tt(12,0,0)],[6,new tt(12,0,0)],[5,new tt(10,0,0)],[4,new tt(10,0,0)],[3,new tt(10,0,0)],[2,new tt(8,0,0)],[1,new tt(8,0,0)]]),zo=class{constructor(e,r,i){this.logger=e;this.fs=r;this.packageJson=i;this.knownGoodMappings=new Map}async resolveAndValidate(e,r="node",i,n){try{return await this.resolveAndValidateInner(e,r,i,n)}catch(s){if(!(s instanceof Rg))throw s;if(await this.shouldTryDebuggingAnyway(s))return new si(s.location,s.version instanceof tt?s.version:void 0);throw s}}shouldTryDebuggingAnyway(e){return Promise.resolve(!1)}async resolveAndValidateInner(e,r,i,n){var H,v;let s=await this.resolveBinaryLocation(r,e);if(this.logger.info("runtime.launch","Using binary at",{location:s,executable:r}),!s)throw new ne(gE(r,Mg.t("path does not exist")));if(i)return new si(s,new tt(i,0,0));let o=_v(s);if(!Wve.includes(o)){if(b9(s)){let w=await this.packageJson.getPath();w&&(e=e.addToPath((0,eo.resolve)((0,eo.dirname)(w),"node_modules/.bin"),"prepend"))}try{let w=await this.resolveAndValidateInner(e,"node",void 0,n);return new si(s,w.version)}catch(w){if($M(w,9230))throw w;return new si(s,void 0)}}if(s.startsWith("/snap/"))return new si(s,void 0);let a=this.knownGoodMappings.get(s);if(a)return a;let u=await this.getVersionText(s,n);if(!u)return new si(s,void 0);this.logger.info("runtime.launch","Discovered version",{version:u});let c=/v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(u);if(!c)throw new Rg(u,s);let[,l,p,f]=c.map(Number),h=new tt(l,p,f);if(o==="electron"){let w=await this.resolveAndValidate(e);h=tt.min((H=Vve.get(h.major))!=null?H:dL,(v=w.version)!=null?v:dL)}if(h.lt(jve))throw new Rg(h,s);let g=new si(s,h);return this.knownGoodMappings.set(s,g),g}async resolveBinaryLocation(e,r){return e&&(0,eo.isAbsolute)(e)?await UR(this.fs,e,r):await Py(this.fs,e,r.value)}async getVersionText(e,r){var i;try{let{stdout:n}=await v0(e,["--version"],{env:Dt.processEnv().defined(),cwd:r});return n.trim()}catch(n){throw r&&!((i=await Di(this.fs,r))!=null&&i.isDirectory())?new ne(AM(r)):new ne(gE(e,n.message))}}};zo=k([(0,An.injectable)(),A(0,(0,An.inject)(fe)),A(1,(0,An.inject)(Ie)),A(2,(0,An.inject)(zc))],zo);var Uf=class extends zo{constructor(r,i,n,s){super(r,i,n);this.vscode=s}async shouldTryDebuggingAnyway({message:r}){if(!this.vscode)return!1;let i=Mg.t("Yes");return await this.vscode.window.showErrorMessage(r,i)===i}};Uf=k([A(0,(0,An.inject)(fe)),A(1,(0,An.inject)(Ie)),A(2,(0,An.inject)(zc)),A(3,(0,An.optional)()),A(3,(0,An.inject)(an))],Uf);var _9=require("path");var jf=class{constructor(e,r,i,n,s,o,a={},u){this.launchConfig=e;this.targetOriginValue=r;this.connection=i;this.targetInfo=s;this.logger=o;this.lifecycle=a;this._parent=u;this._serialize=Promise.resolve(void 0);this._attached=!1;this._onNameChangedEmitter=new X;this._onDisconnectEmitter=new X;this.entryBreakpoint=void 0;this.onDisconnect=this._onDisconnectEmitter.event;this.onNameChanged=this._onNameChangedEmitter.event;this.connection=i,this._cdp=n,n.pause(),this._waitingForDebugger=s.type==="waitingForDebugger",s.title?this._targetName=`${(0,_9.basename)(s.title)} [${s.processId}]`:this._targetName=`[${s.processId}]`,n.Target.on("targetDestroyed",()=>this.connection.close()),i.onDisconnected(()=>this._disconnected())}id(){return this.targetInfo.targetId}processId(){return this.targetInfo.processId}name(){return this._targetName}fileName(){return this.targetInfo.title}type(){return"node"}targetOrigin(){return this.targetOriginValue}parent(){return this._parent}async initialize(){this.lifecycle.initialized&&(this.entryBreakpoint=await this.lifecycle.initialized(this)||void 0)}waitingForDebugger(){return this._waitingForDebugger}scriptUrlToUrl(e){return e[0]==="/"||process.platform==="win32"&&e[1]===":"&&e[2]==="\\"?Qe(e):e}supportsCustomBreakpoints(){return!1}executionContextName(){return this._targetName}hasParent(){return!!this._parent}async runIfWaitingForDebugger(){await this._cdp.Runtime.runIfWaitingForDebugger({})}async _disconnected(){this._onDisconnectEmitter.fire()}canAttach(){return!this._attached}async attach(){return this._serialize=this._serialize.then(async()=>{if(!this._attached)return this._doAttach()}),this._serialize}async _doAttach(){this._waitingForDebugger=!1,this._attached=!0;let e=await this._cdp.Target.attachToTarget({targetId:this.targetInfo.targetId});if(!e){this.logger.info("runtime.launch","Failed to attach to target",{targetId:this.targetInfo.targetId});return}this._cdp.NodeWorker.enable({waitForDebuggerOnStart:!0}),e&&"__dynamicAttach"in e&&(await this._cdp.Runtime.enable({}),await this._cdp.Debugger.enable({}));let r;return this._cdp.Runtime.on("executionContextCreated",i=>{i.context.auxData&&i.context.auxData.isDefault&&(r=i.context.id)}),this._cdp.Runtime.on("executionContextDestroyed",i=>{i.executionContextId===r&&this.connection.close()}),this._cdp}async afterBind(){this._cdp.resume()}canDetach(){return this._attached}async detach(){this._serialize=this._serialize.then(async()=>{if(this._waitingForDebugger){let e=await this._doAttach();await(e==null?void 0:e.Runtime.runIfWaitingForDebugger({}))}this._attached&&this._doDetach()})}async _doDetach(){await Promise.all([this._cdp.Target.detachFromTarget({targetId:this.targetInfo.targetId}),this._cdp.NodeWorker.disable({})]),this.connection.close(),this._attached=!1}canRestart(){return!1}restart(){}canStop(){return!0}stop(){try{this.lifecycle.close&&this.lifecycle.close(this)}finally{this.connection.close()}}};var Ai=class{constructor(e,r,i,n){this.pathProvider=e;this.logger=r;this.portLeaseTracker=i;this.pathResolverFactory=n;this.serverConnections=new Set;this.targets=new Ws;this.onTerminatedEmitter=new X;this.onTerminated=this.onTerminatedEmitter.event;this.onTargetListChanged=this.targets.onChanged;this.bootloaderFile=Fe(this.getBootloaderFile.bind(this))}async launch(e,r){let i=this.resolveParams(e);if(!i)return{blockSessionTermination:!1};this._stopServer();let{server:n,pipe:s}=await this._startServer(r.telemetryReporter),o=this.logger.forTarget(),a=this.run={server:n,serverAddress:s,params:i,context:r,logger:o,pathResolver:this.pathResolverFactory.create(i,this.logger)};return await this.launchProgram(a),{blockSessionTermination:!0}}async terminate(){this.program?await this.program.stop():this.onProgramTerminated({code:0,killed:!0})}async disconnect(){await this.terminate()}async restart(e){var i;if(!this.run)return;let r=this.program;r&&(this.program=void 0,await r.stop(),await Promise.race([Oe(2e3).then(()=>!1),Promise.all([...this.serverConnections].map(s=>new Promise(o=>s.onDisconnected(o))))])||(this.logger.warn("runtime.launch","Timeout waiting for server connections to close"),this.closeAllConnections())),await this.launchProgram({...this.run,params:e?(i=this.resolveParams(e))!=null?i:this.run.params:this.run.params,context:{...this.run.context,cancellationToken:this.run.params.timeout>0?dr.withTimeout(this.run.params.timeout).token:hr}})}targetList(){return[...this.targets.value()]}dispose(){this._stopServer()}onProgramTerminated(e){this.onTerminatedEmitter.fire(e),this._stopServer(),this.program=void 0}resolveNodePath(e,r="node"){return this.pathProvider.resolveAndValidate(Dt.merge(Dt.processEnv(),this.getConfiguredEnvironment(e)),r,e.nodeVersionHint,e.cwd)}getConfiguredEnvironment(e){let r=Dt.empty;if(e.envFile)try{r=r.merge(zve(e.envFile))}catch(i){throw new ne(_M(i.message))}return r.merge(e.env)}async resolveEnvironment({params:e,serverAddress:r},i,n){let s=this.getConfiguredEnvironment(e),o=await this.bootloaderFile(e.cwd,i),a={inspectorIpc:r,deferredMode:!1,waitForDebugger:"",execPath:await Py(to.promises,"node",process.env),onlyEntrypoint:!e.autoAttachChildProcesses,verbose:e.trace===!0||typeof e.trace=="object"&&e.trace.stdio?!0:void 0,autoAttachMode:"always",mandatePortTracking:this.portLeaseTracker.isMandated?!0:void 0,...n},u={NODE_OPTIONS:`--require ${o.interpolatedPath}`,VSCODE_INSPECTOR_OPTIONS:JSON.stringify(a),ELECTRON_RUN_AS_NODE:null},c=s.lookup("NODE_OPTIONS");c&&(u.NODE_OPTIONS+=` ${c}`);let l=Dt.processEnv().lookup("NODE_OPTIONS");return l&&(u.NODE_OPTIONS+=` ${l}`),s.merge({...u})}createLifecycle(e,r,i){return{}}async _startServer(e){let r=Dy(),i=await new Promise((n,s)=>{let o=I9.createServer(a=>this._startSession(a,e)).on("error",s).listen(r,()=>n(o))});return{pipe:r,server:i}}_stopServer(){var e,r;(e=this.run)==null||e.server.close(),this.run=void 0,(r=this.bootloaderFile.value)==null||r.then(i=>i.dispose()),this.bootloaderFile.forget(),this.closeAllConnections()}closeAllConnections(){this.serverConnections.forEach(e=>e.close()),this.serverConnections.clear()}async _startSession(e,r){if(!this.run)return;let{connection:i,cdp:n,targetInfo:s}=await this.acquireTarget(e,r,this.run.logger);if(!this.run){e.destroy();return}s.processId===void 0&&(s.processId=Number(s.targetId));let o=new jf(this.run.params,this.run.context.targetOrigin,i,n,s,this.run.logger,this.createLifecycle(n,this.run,s),s.openerId?this.targets.get(s.openerId):void 0);this.listenToWorkerDomain(n,r,o),this.targets.add(s.targetId,o),o.onDisconnect(()=>this.targets.remove(s.targetId))}async listenToWorkerDomain(e,r,i){e.NodeWorker.on("attachedToWorker",n=>{let s=new Fw(n.sessionId,e),o=new Np(i.launchConfig,{attached:!0,canAccessOpener:!1,type:"node-worker",targetId:`${i.id()}-${n.sessionId}`,title:n.workerInfo.title,url:n.workerInfo.url,openerId:i.id()},i,i.targetOrigin(),new Yt(s,i.logger,r).rootSession(),i.logger),a=new Le;a.push(s),a.push(i.onDisconnect(()=>a.dispose())),a.push(s.onEnd(()=>a.dispose())),a.callback(()=>this.targets.remove(o.id())),this.targets.add(o.id(),o)})}async acquireTarget(e,r,i){let n=new Yt(new wn(i,e),i,r);this.serverConnections.add(n),n.onDisconnected(()=>this.serverConnections.delete(n));let s=n.rootSession(),{targetInfo:o}=await new Promise(c=>s.Target.on("targetCreated",c)),a=o,u=this.portLeaseTracker.register(a.processInspectorPort);return n.onDisconnected(()=>u.dispose()),{targetInfo:a,cdp:s,connection:n,logger:i}}async getBootloaderFile(e,r){let i=qe(Bw);if(!i.includes(" "))return{interpolatedPath:i,dispose:()=>{}};if(r.has(0))return{interpolatedPath:`"${i}"`,dispose:()=>{}};let n=`require(${JSON.stringify(i)})`;if(!hL.tmpdir().includes(" ")||!e){let a=mL.join(hL.tmpdir(),"vscode-js-debug-bootloader.js");return await to.promises.writeFile(a,n),{interpolatedPath:a,dispose:()=>{}}}let s=".vscode-js-debug-bootloader.js",o=mL.join(e,s);return await to.promises.writeFile(o,n),{interpolatedPath:`./${s}`,dispose:()=>to.unlinkSync(o)}}async gatherTelemetryFromCdp(e,r){for(let i=0;i<8;i++){let n=await e.Runtime.evaluate({contextId:1,returnByValue:!0,expression:"typeof process === 'undefined' || process.pid === undefined ? 'process not defined' : ({ processId: process.pid, nodeVersion: process.version, architecture: process.arch })"+Rt()});if(!this.program)return;if(!n||!n.result.value){this.logger.error("runtime.target","Undefined result getting telemetry");return}if(typeof n.result.value!="object"){this.logger.info("runtime.target","Process not yet defined, will retry"),await Oe(50*2**i);continue}let s=n.result.value;return r.context.telemetryReporter.report("nodeRuntime",{version:s.nodeVersion,arch:s.architecture}),this.program.gotTelemetery(s),s}}};Ai=k([(0,Xc.injectable)(),A(0,(0,Xc.inject)(In)),A(1,(0,Xc.inject)(fe)),A(2,(0,Xc.inject)(gt)),A(3,(0,Xc.inject)(ni))],Ai);function zve(t){if(!to.existsSync(t))return{};let e=Xve(to.readFileSync(t,"utf8"));return A9.parse(Buffer.from(e))}function Xve(t){return t&&t[0]==="\uFEFF"&&(t=t.substr(1)),t}var Cu=class extends Ai{};Cu=k([(0,E9.injectable)()],Cu);var qw=class{constructor(e,r){this.a=e;this.b=r;this.stopped=Promise.race([this.a.stopped.then(async e=>await this.b.stop()&&e),this.b.stopped.then(async e=>await this.a.stop()&&e)])}gotTelemetery(e){this.a.gotTelemetery(e),this.b.gotTelemetery(e)}async stop(){return(await Promise.all([this.a.stop(),this.b.stop()]))[0]}},Ww=class{constructor(e,r,i){this.child=e;this.logger=r;this.killBehavior=i;this.killed=!1;this.stopped=new Promise((n,s)=>{e.once("exit",o=>n({killed:this.killed,code:o||0})),e.once("error",o=>s({killed:this.killed,code:1,error:o}))})}gotTelemetery(){}stop(){return this.killed=!0,Wo(this.child.pid,this.logger,this.killBehavior),this.stopped}},Xo=class{constructor(){this.stopped=new Promise(e=>this.stopDefer=e)}gotTelemetery(e){this.telemetry=e}stop(){return this.stopDefer({code:0,killed:!0}),this.stopped}},Du=class extends Xo{constructor(r){super();this.wd=r;r.onEnd(i=>{this.stopDefer(i),this.wd.dispose()})}stop(){return this.wd.dispose(),this.stopped}},Og=class{constructor(e,r,i){this.terminalResult=e;this.logger=r;this.killBehavior=i;this.didStop=!1;this.stopped=new Promise(e=>this.onStopped=r=>{this.didStop=!0,e({code:0,killed:r})});e.processId&&this.startPollLoop(e.processId)}gotTelemetery({processId:e}){if(this.didStop){Wo(e,this.logger,this.killBehavior);return}this.loop||this.startPollLoop(e)}stop(){return this.didStop?this.stopped:(this.didStop=!0,this.loop?(Wo(this.loop.processId,this.logger,this.killBehavior),this.startPollLoop(this.loop.processId,Og.killConfirmInterval)):this.terminalResult.shellProcessId?(Wo(this.terminalResult.shellProcessId,this.logger,this.killBehavior),this.startPollLoop(this.terminalResult.shellProcessId,Og.killConfirmInterval)):this.onStopped(!0),this.stopped)}startPollLoop(e,r=Og.terminationPollInterval){this.loop&&clearInterval(this.loop.timer);let i={processId:e,timer:setInterval(()=>{Jve(e)||(clearInterval(i.timer),this.onStopped(!0))},r)};this.loop=i}},xu=Og;xu.terminationPollInterval=1e3,xu.killConfirmInterval=200;function Jve(t){try{return process.kill(t,0),!0}catch(e){return!1}}var D9=S(require("net"));var S9=require("crypto"),C9=()=>(0,S9.randomBytes)(12).toString("hex");var x9,Ii=class{constructor(e,r){this.info=e;this.server=r;this.onEndEmitter=new X;this.cts=new dr;this.gracefulExit=!1;this.targetAlive=!1;this.targetInfo={targetId:(x9=this.info.ownId)!=null?x9:C9(),processId:Number(this.info.pid)||0,type:this.info.waitForDebugger?"waitingForDebugger":"",title:this.info.scriptName,url:"file://"+this.info.scriptName,openerId:this.info.openerId,attached:!0,canAccessOpener:!1,processInspectorPort:Number(new URL(this.info.inspectorURL).port)};this.onEnd=this.onEndEmitter.event;this.listenToServer()}get isTargetAlive(){return this.targetAlive}static async attach(e){let r=await new Promise((n,s)=>{let o=D9.createConnection(e.ipcAddress,()=>n(o));o.on("error",s)}),i=new wn(Hn.null,r);return new Ii(e,i)}listenToServer(){let{server:e,targetInfo:r}=this;e.send(JSON.stringify({method:"Target.targetCreated",params:{targetInfo:r}})),e.onMessage(async([i])=>{if(this.target&&!i.includes("Target.attachToTarget")&&!i.includes("Target.detachFromTarget")){this.target.send(i);return}let n=await this.execute(i);n&&e.send(JSON.stringify(n))}),e.onEnd(()=>{this.disposeTarget(),this.onEndEmitter.fire({killed:this.gracefulExit,code:this.gracefulExit?0:1})})}dispose(){this.gracefulExit=!0,this.cts.dispose(!0),this.disposeTarget(),this.server.dispose()}async execute(e){var i;let r=JSON.parse(e);switch(r.method){case"Target.attachToTarget":return this.target&&this.disposeTarget(),this.target=await this.createTarget(),{id:r.id,result:{sessionId:this.targetInfo.targetId,__dynamicAttach:this.info.dynamicAttach?!0:void 0}};case"Target.detachFromTarget":return this.gracefulExit=!0,this.disposeTarget(),{id:r.id,result:{}};default:(i=this.target)==null||i.send(r);return}}async createTarget(){this.gracefulExit=!1;let e=await ii.create(this.info.inspectorURL,this.cts.token);return e.onMessage(([r])=>this.server.send(r)),e.onEnd(()=>{e&&this.server.send(JSON.stringify({method:"Target.targetDestroyed",params:{targetId:this.targetInfo.targetId,sessionId:this.targetInfo.targetId}})),this.targetAlive=!1,this.server.dispose()}),e}disposeTarget(){this.target&&(this.target.dispose(),this.target=void 0)}};var gL=class extends Du{constructor(r,i){super(r);this.logger=i;this.stopped.then(()=>{this.telemetry&&Wo(this.telemetry.processId,this.logger,"polite")})}},qf=class extends Cu{constructor(){super(...arguments);this.restarting=!1}async restart(){var r;this.restarting=!0,this.onProgramTerminated({code:0,killed:!0,restart:!0}),(r=this.program)==null||r.stop()}resolveParams(r){return r.type==="pwa-extensionHost"&&r.request==="attach"?r:void 0}async launchProgram(r){let i=await Pf(`http://localhost:${r.params.port}`,r.context.cancellationToken,this.logger),n=await Ii.attach({ipcAddress:r.serverAddress,scriptName:"Extension Host",inspectorURL:i,waitForDebugger:!0,dynamicAttach:!0}),s=this.program=new gL(n,this.logger);this.program.stopped.then(o=>{s===this.program&&this.onProgramTerminated(o)})}createLifecycle(r,i,n){return n.openerId?{}:{initialized:()=>this.onFirstInitialize(r,i,n)}}async onFirstInitialize(r,i,n){this.setEnvironmentVariables(r,i,n.targetId);let s=await this.gatherTelemetryFromCdp(r,i),o=this.program;if(s&&o){let a=new xu({processId:s.processId},this.logger,"forceful");a.stopped.then(()=>o.stop()),o.stopped.then(()=>{this.restarting||a.stop()})}}async setEnvironmentVariables(r,i,n){if(!i.params.autoAttachChildProcesses)return;let s=await this.resolveEnvironment(i,new si("node",tt.parse(process.versions.node)),{openerId:n});for(let o=0;o<200;o++){let a=await r.Runtime.evaluate({contextId:1,returnByValue:!0,expression:`Object.assign(process.env, ${JSON.stringify(s.defined())})`+Rt()});if(!a)this.logger.error("runtime.target","Undefined result setting child environment vars");else if(a.exceptionDetails)this.logger.error("runtime.target","Error setting child environment vars",a.exceptionDetails);else return;await Oe(50)}}};qf=k([(0,P9.injectable)()],qf);var Ng=require("fs"),L9=S(Y());var Wf=class extends Ai{resolveParams(e){return e.type==="pwa-extensionHost"&&e.request==="launch"?e:void 0}async launchProgram(e){let r=e.params.port||await Na(),i=await e.context.dap.launchVSCodeRequest({args:Yve(e.params,r),env:this.getConfiguredEnvironment(e.params).defined(),debugRenderer:e.params.debugWebviews||e.params.debugWebWorkerHost});i.rendererDebugPort&&Qn.debugIdToRendererDebugPort.set(e.params.__sessionId,i.rendererDebugPort),this.program=new Xo,this.program.stop()}};Wf=k([(0,L9.injectable)()],Wf);var Yve=(t,e)=>{let r=t.args.map(i=>{if(i.startsWith("-")){let n=i.split("=",2);return n.length===2&&((0,Ng.existsSync)(n[1])||(0,Ng.existsSync)(n[1]+".js"))?{prefix:n[0]+"=",path:n[1]}:{prefix:i}}else{try{let n=(0,Ng.lstatSync)(i);if(n.isDirectory())return{prefix:"--folder-uri=",path:i};if(n.isFile())return{prefix:"--file-uri=",path:i}}catch(n){}return{path:i}}});return t.noDebug||r.unshift({prefix:`--inspect-brk-extensions=${e}`}),r.unshift({prefix:`--debugId=${t.__sessionId}`}),r};var q9=S(Se()),Yc=S(Y());var T9=require("crypto"),Fg=require("fs"),$9=require("os"),k9=S(require("path")),Vw=class{constructor(){this.disposed=!1;this.path=k9.join((0,$9.tmpdir)(),`node-debug-callback-${(0,T9.randomBytes)(8).toString("hex")}`);this.file=Fg.promises.open(this.path,"w")}static isValid(e){try{let r=(0,Fg.readFileSync)(e);return r.length?r.readDoubleBE()>Date.now()-Vw.recencyDeadline:!1}catch(r){return!1}}async startTouchLoop(){await this.touch(),this.disposed||(this.updateInterval=setInterval(()=>this.touch(),Vw.updateInterval))}async touch(e=()=>Date.now()){let r=await this.file,i=Buffer.alloc(8);i.writeDoubleBE(e()),await r.write(i,0,i.length,0)}async dispose(){if(!this.disposed){this.disposed=!0,this.updateInterval&&clearInterval(this.updateInterval);try{await(await this.file).close(),await Fg.promises.unlink(this.path)}catch(e){}}}},Vf=Vw;Vf.updateInterval=1e3,Vf.recencyDeadline=2e3;var B9=require("fs");var O9=require("path");var R9=require("child_process"),M9=S(nL()),Gf=class{constructor(e=R9.spawn){this.spawn=e}lookup(e,r){return new Promise((i,n)=>{let s=this.createProcess(),o=this.createParser();s.on("error",n),s.stderr.on("error",a=>n(`Error finding processes: ${a.toString()}`)),s.stdout.pipe((0,M9.default)(/\r?\n/)).on("data",a=>{let u=o(a);u&&(r=e(u,r))}),s.on("close",(a,u)=>{a===0?i(r):u?n(new Error(`process terminated with signal: ${u}`)):a&&n(new Error(`process terminated with exit code: ${a}`))})})}};var Kf=class extends Gf{constructor(r){super();this.fsUtils=r}async getWorkingDirectory(r){try{let{stdout:i}=await v0("lsof",["-a","-dcwd","-Fn",`-p${r}`]),n=i.trim().split(`
`).pop().slice(1);return n&&(0,O9.isAbsolute)(n)&&await this.fsUtils.exists(n)?n:void 0}catch(i){if(i instanceof Po)return;throw i}}createProcess(){return this.spawn("/bin/ps",["-xo",`pid=PID,ppid=PPID,comm=${"a".repeat(256)},command=COMMAND`])}createParser(){let r;return i=>{if(!r){r=i.indexOf("COMMAND");return}let n=/^\W*([0-9]+)\W*([0-9]+)\W*/.exec(i);if(n)return{pid:Number(n[1]),ppid:Number(n[2]),command:i.slice(n[0].length,r).trim(),args:i.slice(r).trim()}}}};var Gw=class extends Kf{createProcess(){return this.spawn("/bin/ps",["-axo","pid=PID,ppid=PPID,comm:30,command=COMMAND"])}createParser(){let e=super.createParser();return r=>{let i=e(r);if(!i)return;let n=i.args.indexOf(i.command);if(n===-1)return i;for(n=n+i.command.length;n<i.args.length&&i.args[n]!==" ";)n++;return i.command=i.args.substr(0,n),i.args=i.args.substr(n+1),i}}};var N9=require("path");var Kw=class extends Gf{async getWorkingDirectory(){}createProcess(){let e=(0,N9.join)(process.env.WINDIR||"C:\\Windows","System32","wbem","WMIC.exe");return this.spawn(e,["process","get","CommandLine,CreationDate,ParentProcessId,ProcessId"])}createParser(){let e=/^(.*)\s+([0-9]+)\.[0-9]+[+-][0-9]+\s+([0-9]+)\s+([0-9]+)$/;return r=>{let i=e.exec(r.trim());if(!i||i.length!==5)return;let n=Number(i[4]),s=Number(i[3]),o=Number(i[2]),a=i[1].trim();if(!isNaN(n)&&!isNaN(s)&&a){let u=a;if(a[0]==='"'){let c=a.indexOf('"',1);c>0&&(u=a.substr(1,c-1),a=a.substr(c+2))}else{let c=a.indexOf(" ");c>0?(u=a.substr(0,c),a=a.substr(c+1)):a=""}return{pid:n,ppid:s,command:u,args:a,date:o}}}}};var F9=new xi(B9.promises),Bg=process.platform==="win32"?new Kw:process.platform==="darwin"?new Kf(F9):new Gw(F9);function zw(t){let e=/--inspect(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/,r=/--inspect-port=(\d+)/,i,n,s=e.exec(t);return s&&s.length>=1&&(s.length>=5&&s[4]&&(i=s[4]),s.length>=6&&s[5]&&(n=parseInt(s[5]))),s=r.exec(t),s&&s.length===2&&(n=parseInt(s[1])),{address:i,port:n}}async function U9(t,e,r,i=hr){let n=await Qve(t.pid,r);if(!n)return[];let s=[],o=n.children.slice();for(;o.length;){let a=o.pop();o=o.concat(a.children);let{port:u}=zw(a.args);u&&s.push(oL(`http://${t.hostname}:${u}`,i,r,!0).then(c=>Ii.attach({ipcAddress:t.ipcAddress,scriptName:"Child Process",inspectorURL:c,waitForDebugger:!0,dynamicAttach:!0,pid:String(a.pid),openerId:e})).catch(c=>r.info("internal","Could not spawn WD for child process",{err:c,port:u,child:a})))}return(await Promise.all(s)).filter(a=>!!a)}async function Qve(t,e){let r=new Map;r.set(0,{children:[],pid:0,ppid:0,command:"",args:""});try{await Bg.lookup(({pid:n,ppid:s,command:o,args:a})=>(n!==s&&r.set(n,{pid:n,ppid:s,command:o,args:a,children:[]}),r),null)}catch(n){e.warn("internal","Error getting child process tree",n);return}let i=r.values();for(let n of i){let s=r.get(n.ppid);s&&s!==n&&s.children.push(n)}return!isNaN(t)&&t>0?r.get(t):r.get(0)}var j9=S(Y());var ro=class{create(e){var r,i;return e===!1?new HL:e===!0?new Jc({maxAttempts:1/0,delay:1e3}):new Jc({maxAttempts:(r=e.maxAttempts)!=null?r:1/0,delay:(i=e.delay)!=null?i:1e3})}};ro=k([(0,j9.injectable)()],ro);var Jc=class{constructor(e,r=0){this.options=e;this.attempt=r}get delay(){return this.options.delay}next(){return this.attempt===this.options.maxAttempts?void 0:new Jc(this.options,this.attempt+1)}reset(){return this.attempt?new Jc(this.options):this}},HL=class{constructor(){this.delay=-1}next(){}reset(){return this}};var zf=class extends Cu{constructor(r,i,n,s,o=new ro){super(r,i,s,n);this.restarters=o}resolveParams(r){return r.type==="pwa-node"&&r.request==="attach"?r:void 0}async launchProgram(r){let i=async(s,o)=>{let a=this.program,u;try{r.params.websocketAddress?u=r.params.websocketAddress:u=await Pf(`http://${r.params.address}:${r.params.port}`,o&&r.params.timeout>0?dr.withTimeout(r.params.timeout).token:r.context.cancellationToken,this.logger)}catch(p){if(a&&a===o)return n(s,a,{killed:!1,code:1});throw p}let c=await Ii.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:u,waitForDebugger:!0,dynamicAttach:!0}),l=this.program=new Du(c);l.stopped.then(p=>n(s.reset(),l,p))},n=async(s,o,a)=>{if(this.program!==o)return;if(a.killed){this.onProgramTerminated(a);return}let u=s.next();if(!u){this.onProgramTerminated(a);return}r.context.dap.output({output:q9.t(`Lost connection to debugee, reconnecting in {0}ms\r
`,u.delay)});let c=new Xo;this.program=c;let l=await Promise.race([Oe(u.delay),c.stopped]);this.program===c&&(l?this.onProgramTerminated(a):i(u,c))};return i(this.restarters.create(r.params.restart))}createLifecycle(r,i,n){if(n.openerId)return{};let s;return{initialized:async()=>{s=this.onFirstInitialize(r,i,n),await s},close:()=>{var o;this.targetList().length&&((o=this.program)==null||o.stop()),s==null||s.then(a=>a.dispose())}}}async onFirstInitialize(r,i,n){let s=new Vf;await s.startTouchLoop();let o=await this.resolveNodePath(i.params),[a]=await Promise.all([this.gatherTelemetryFromCdp(r,i),this.setEnvironmentVariables(r,i,s.path,n.targetId,o)]);return a&&i.params.attachExistingChildren&&U9({pid:a.processId,nodePath:o.path,hostname:i.params.address,ipcAddress:i.serverAddress},n.targetId,this.logger).catch(u=>this.logger.warn("internal","Error watching child processes",{err:u})),s}async setEnvironmentVariables(r,i,n,s,o){if(!i.params.autoAttachChildProcesses)return;if(!await Zl(i.params.address)){this.logger.warn("runtime.target","Cannot attach to children of remote process");return}let a=await this.resolveEnvironment(i,o,{requireLease:n,openerId:s});for(let u=0;u<5;u++){let c=await r.Runtime.evaluate({contextId:1,returnByValue:!0,expression:`typeof process === 'undefined' || process.pid === undefined ? 'process not defined' : Object.assign(process.env, ${JSON.stringify(a.defined())})`+Rt()});if(!c){this.logger.error("runtime.target","Undefined result setting child environment vars");return}if(!c.exceptionDetails&&c.result.value!=="process not defined")return;this.logger.error("runtime.target","Error setting child environment vars",c),await Oe(50)}}};zf=k([(0,Yc.injectable)(),A(0,(0,Yc.inject)(In)),A(1,(0,Yc.inject)(fe)),A(2,(0,Yc.inject)(ni)),A(3,(0,Yc.inject)(gt))],zf);var Ki=S(Y()),Yf=require("path");function Ug(t){return t instanceof Array?t:[t]}function Xw(t){if(!t.runtimeArgs||t.attachSimplePort)return;let e=[];for(let r of t.runtimeArgs)/^--inspect-brk(=|$)/.test(r)?t.stopOnEntry=t.stopOnEntry||!0:e.push(r);t.runtimeArgs=e}var W9=require("os"),V9=S(require("path")),G9=require("crypto"),Xf=require("fs"),yL=class{constructor(){this.path=V9.join((0,W9.tmpdir)(),`node-debug-callback-${(0,G9.randomBytes)(8).toString("hex")}`);this.disposed=!1}read(e=yL.pollInterval){return this.readPromise?this.readPromise:(this.readPromise=new Promise((r,i)=>{let n=setInterval(()=>{if(this.disposed){clearInterval(n),r(void 0);return}if((0,Xf.existsSync)(this.path)){try{r(JSON.parse((0,Xf.readFileSync)(this.path,"utf-8")))}catch(s){i(s)}finally{this.dispose()}clearInterval(n)}},e)}),this.readPromise)}dispose(){if(!this.disposed){this.disposed=!0;try{(0,Xf.unlinkSync)(this.path)}catch(e){}}}},jg=yL;jg.pollInterval=200;var Qc=S(require("path"));var qg=Symbol("IProgramLauncher"),Jw=t=>{let e=t.program;if(e&&Qc.isAbsolute(e)){let r=Qc.relative(t.cwd,e);e=Qc.isAbsolute(r)?r:`.${Qc.sep}${r}`}return e?[...t.runtimeArgs,e,...Ug(t.args)]:[...t.runtimeArgs,...Ug(t.args)]};var Zve=async(t,e)=>{if(typeof e.stopOnEntry=="string")return(0,Yf.resolve)(e.cwd,e.stopOnEntry);if(e.program)return(0,Yf.resolve)(e.cwd,e.program);for(let r of Ug(e.args)){if(r.startsWith("-"))continue;let i=(0,Yf.resolve)(e.cwd,r);if(await t.exists(i))return i}},Jf=class extends Ai{constructor(r,i,n,s,o,a,u,c,l){super(r,i,l,c);this.bpPredictor=n;this.launchers=s;this.restarters=o;this.fsUtils=a;this.packageJson=u}resolveParams(r){let i;if(r.type==="pwa-node"&&r.request==="launch"?i={...r}:"server"in r&&r.server&&"program"in r.server&&(i={...r.server}),!!i)return Xw(i),i}async launchProgram(r){r.params.program&&(r.params.program=await this.tryGetCompiledFile(r.params.program)),this.attachSimplePort=await this.getSimpleAttachPortIfAny(r.params);let i=async n=>{this.program&&this.program.stop();let s=await this.resolveNodePath(r.params,r.params.runtimeExecutable||void 0),o=s.warning;o&&r.context.dap.output({category:"stderr",output:o.message});let a=new jg,u=await this.resolveEnvironment(r,s,{fileCallback:a.path});this.attachSimplePort?(r.params.attachSimplePort||r.context.dap.output({category:"stderr",output:"Using legacy attach mode for --inspect-brk in npm scripts. We recommend removing --inspect-brk, and using `stopOnEntry` in your launch.json if you need it."}),u=u.merge({NODE_OPTIONS:null})):u=jw(s,u);let c={...r.params,env:u.value},l=this.launchers.find(f=>f.canLaunch(c));if(!l)throw new Error("Cannot find an appropriate launcher for the given set of options");let p=await l.launchProgram(s.path,c,r.context);if(this.attachSimplePort){let f=await Ii.attach({ipcAddress:r.serverAddress,scriptName:"Remote Process",inspectorURL:await Pf(`http://127.0.0.1:${this.attachSimplePort}`,r.context.cancellationToken,this.logger),waitForDebugger:!0,dynamicAttach:!0});p=new qw(p,new Du(f))}else a.read().then(f=>{f&&p.gotTelemetery(f)});this.program=p,p.stopped.then(async f=>{if(a.dispose(),this.program!==p)return;if(f.killed||f.code===0){this.onProgramTerminated(f);return}let h=n.next();if(!h){this.onProgramTerminated(f);return}await Oe(h.delay),this.program===p&&i(h)})};return i(this.restarters.create(r.params.restart))}async getSimpleAttachPortIfAny(r){var s,o,a;if(r.attachSimplePort)return r.attachSimplePort;let i=w9(r.runtimeExecutable,r.runtimeArgs);if(!i)return;let n=await this.packageJson.getContents();if((o=(s=n==null?void 0:n.scripts)==null?void 0:s[i])!=null&&o.includes("--inspect-brk"))return(a=r.port)!=null?a:9229}createLifecycle(r,i,{targetId:n}){return{initialized:async()=>{if(this.attachSimplePort&&await this.gatherTelemetryFromCdp(r,i),!i.params.stopOnEntry)return;let s=await Zve(this.fsUtils,i.params);if(!s){this.logger.warn("runtime","Could not resolve program entrypointfrom args");return}let o="(?:entryBreakpoint){0}",a=Qe(s),u=mi(a)+o,c=await r.Debugger.setBreakpointByUrl({urlRegex:u,lineNumber:0,columnNumber:0});return c!=null&&c.breakpointId?{cdpId:c==null?void 0:c.breakpointId,path:a}:void 0},close:()=>{let s=Number(n);if(s>0)try{process.kill(s)}catch(o){}}}}async tryGetCompiledFile(r){r=Ft(r);let i=(0,Yf.extname)(r);if(!i||i===".js")return r;let n=await this.bpPredictor.getPredictionForSource(r);if(!n||n.size===0)return r;let s=n.values().next().value;return s?(this.logger.info("runtime.launch","Updating entrypoint to compiled file",{from:r,to:s.compiledPath,candidates:n.size}),s.compiledPath):r}};Jf=k([(0,Ki.injectable)(),A(0,(0,Ki.inject)(In)),A(1,(0,Ki.inject)(fe)),A(2,(0,Ki.inject)(uc)),A(3,(0,Ki.multiInject)(qg)),A(4,(0,Ki.inject)(ro)),A(5,(0,Ki.inject)(Br)),A(6,(0,Ki.inject)(zc)),A(7,(0,Ki.inject)(ni)),A(8,(0,Ki.inject)(gt))],Jf);var Zf=S(require("fs")),K9=require("fs"),Yw=S(Y()),z9=S(require("os")),oi=S(require("path"));var Qw=Symbol("INvmResolver");var Qf=class{constructor(e=new xi(K9.promises),r=process.env,i=process.arch,n=process.platform,s=z9.homedir()){this.fsUtils=e;this.env=r;this.arch=i;this.platform=n;this.homedir=s}async resolveNvmVersionPath(e){let r=this.env["NVS_HOME"];if(!r){let o=this.platform==="win32"?oi.join(this.env.LOCALAPPDATA||"","nvs"):oi.join(this.env.HOME||"",".nvs");Zf.existsSync(o)&&(r=o)}let i,n=[],s=this.parseVersionString(e);if(s.nvsFormat||r){if(i=await this.resolveNvs(r,s),!i&&s.nvsFormat)throw new ne(mE(e,"nvs"));n.push("nvs")}if(!i)if(this.platform==="win32")this.env["NVM_HOME"]&&(i=await this.resolveWindowsNvm(e),n.push("nvm-windows"));else{let o=this.env["NVM_DIR"]||oi.join(this.homedir,".nvm");await this.fsUtils.exists(o)&&(i=await this.resolveUnixNvm(e),n.push("nvm"))}if(!n.length)throw new ne(hE());if(!i||!await this.fsUtils.exists(i))throw new ne(mE(e,n.join("/")));return{directory:i,binary:await this.getBinaryInFolder(i)}}async getBinaryInFolder(e){return await Is(["node64.exe","node64"].map(r=>this.fsUtils.exists(oi.join(e,r))))?"node64":"node"}async resolveNvs(e,{remoteName:r,semanticVersion:i,arch:n}){if(!e)throw new ne(vM());let s=this.findBinFolderForVersion(oi.join(e,r),i,o=>Zf.existsSync(oi.join(o,n)));if(s)return this.platform!=="win32"?oi.join(s,n,"bin"):oi.join(s,n)}async resolveUnixNvm(e){let r=this.env["NVM_DIR"];if(!r){let n=oi.join(this.env.HOME||"",".nvm");await this.fsUtils.exists(n)&&(r=n)}if(!r)throw new ne(hE());let i=this.findBinFolderForVersion(oi.join(r,"versions","node"),`v${e}`);return i?oi.join(i,"bin"):void 0}async resolveWindowsNvm(e){let r=this.env["NVM_HOME"];if(!r)throw new ne(bM());return this.findBinFolderForVersion(r,`v${e}`)}findBinFolderForVersion(e,r,i){if(!Zf.existsSync(e))return;let n=Zf.readdirSync(e);if(n.includes(r))return oi.join(e,r);let s=n.filter(o=>o.startsWith(`${r}.`)).sort(ebe).filter(o=>i?i(oi.join(e,o)):!0).pop();return s?oi.join(e,s):void 0}parseVersionString(e){let i=/^(([\w-]+)\/)?(v?(\d+(\.\d+(\.\d+)?)?))(\/((x86)|(32)|((x)?64)|(arm\w*)|(ppc\w*)))?$/i.exec(e);if(!i)throw new Error("Invalid version string: "+e);let n=!!(i[2]||i[8]),s=i[2]||"node",o=i[4]||"",a=tbe(i[8]||this.arch);return{nvsFormat:n,remoteName:s,semanticVersion:o,arch:a}}};Qf=k([(0,Yw.injectable)(),A(0,(0,Yw.inject)(Br))],Qf);var ebe=(t,e)=>{let r=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(t),i=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(e);if(!r||!i)return(i?-1:0)+(r?1:0);let[,n,s,o]=r,[,a,u,c]=i;return Number(n)-Number(a)||Number(s)-Number(u)||Number(o)-Number(c)};function tbe(t){switch(t){case"32":case"x86":case"ia32":return"x86";case"64":case"x64":case"amd64":return"x64";case"arm":let e=process.config.variables.arm_version;return e?"armv"+e+"l":"arm";default:return t}}var X9=require("child_process"),Zw=S(Y());var ed=class{constructor(e){this.logger=e}canLaunch(e){return e.console==="internalConsole"}async launchProgram(e,r,i){let{executable:n,args:s,shell:o,cwd:a}=rbe(e,Jw(r),r.cwd);i.dap.output({category:"console",output:[n,...s].join(" ")+`
`});let u=(0,X9.spawn)(n,s,{shell:o,cwd:a,env:Dt.merge(Dt.processEnv(),r.env).defined()});return r.outputCapture==="console"?this.discardStdio(i.dap,u):this.captureStdio(i.dap,u),new Ww(u,this.logger,r.killBehavior)}captureStdio(e,r){r.stdout.on("data",i=>e.output({category:"stdout",output:i.toString()})),r.stderr.on("data",i=>e.output({category:"stderr",output:i.toString()})),r.stdout.resume(),r.stderr.resume()}discardStdio(e,r){let i=[],n=()=>{i&&e.output({category:"stderr",output:Buffer.concat(i).toString()})},s=Buffer.from("Debugger attached."),o=a=>{a.includes(s)?(i=void 0,r.stderr.removeListener("data",o)):i&&i.push(a)};r.stderr.on("data",o),r.on("error",a=>{n(),e.output({category:"stderr",output:a.stack||a.message})}),r.on("exit",a=>{a!==null&&a>0&&(n(),e.output({category:"stderr",output:`Process exited with code ${a}\r
`}))}),r.stdout.resume(),r.stderr.resume()}};ed=k([(0,Zw.injectable)(),A(0,(0,Zw.inject)(fe))],ed);var rbe=(t,e,r)=>{if(process.platform==="win32"&&(t=Nn(t),r=Nn(r),t.endsWith(".ps1")&&(e=["-File",t,...e],t="powershell.exe")),process.platform!=="win32"||!t.includes(" "))return{executable:t,args:e,shell:!1,cwd:r};let i=!1,n=[];for(let s of e)s.includes(" ")?(n.push(`"${s}"`),i=!0):n.push(s);return i?{executable:`"${t}"`,args:n,shell:!0,cwd:r}:{executable:t,args:e,shell:!1,cwd:r}};var e_=S(Y());var td=class{constructor(e){this.logger=e}canLaunch(e){return e.internalConsoleOptions,e.console!=="internalConsole"}async launchProgram(e,r,i){let n={kind:r.console==="integratedTerminal"?"integrated":"external",title:r.name,cwd:r.cwd,args:[e,...Jw(r)],env:vl(r.env),argsCanBeInterpretedByShell:!Array.isArray(r.args)},s;try{s=await this.sendLaunchRequest(n,i)}catch(o){throw new ne(wM(o.message))}return new xu(s,this.logger,r.killBehavior)}sendLaunchRequest(e,r){return r.dap.runInTerminalRequest(e)}};td=k([(0,e_.injectable)(),A(0,(0,e_.inject)(fe))],td);var J9=S(Y());var rd=class{getTreatment(e,r){return Promise.resolve(r)}};rd=k([(0,J9.injectable)()],rd);var Y9=S(Y());var Zc=class{constructor(){this.flushEmitter=new X;this.onFlush=this.flushEmitter.event}report(){}reportOperation(){}attachDap(){}flush(){this.flushEmitter.fire()}dispose(){}};Zc=k([(0,Y9.injectable)()],Zc);var Q9=require("crypto"),Pu=S(Y()),Z9=require("os"),eG=S(require("path")),Wg=S(require("vscode"));var vL=class{constructor(e){this.terminal=e;this.stopped=new Promise(r=>{let i=Wg.window.onDidCloseTerminal(n=>{n===e&&(r({code:0,killed:!0}),i.dispose())})})}gotTelemetery(){}stop(){return this.terminal.sendText(""),setTimeout(()=>this.terminal.dispose(),1),this.stopped}},Jo=class extends Ai{constructor(r,i,n,s,o){super(r,i,o,s);this.fs=n;this.terminalCreatedEmitter=new X;this.callbackFile=eG.join((0,Z9.tmpdir)(),`node-debug-callback-${(0,Q9.randomBytes)(8).toString("hex")}`);this.onTerminalCreated=this.terminalCreatedEmitter.event}async getProcessTelemetry(){try{return JSON.parse(await this.fs.readFile(this.callbackFile,"utf-8"))}catch(r){return}}resolveParams(r){if(r.type==="node-terminal"&&r.request==="launch")return r;if(r.type==="pwa-chrome"&&r.server&&"command"in r.server)return r.server}async launchProgram(r){let i;try{i=await this.resolveNodePath(r.params)}catch(a){if(a instanceof ne&&a.cause.id===9230)throw a;i=new si("node",void 0)}let n=await this.resolveEnvironment(r,i,{fileCallback:this.callbackFile}),s=await this.createTerminal({name:r.params.name,cwd:r.params.cwd,iconPath:new Wg.ThemeIcon("debug"),env:jw(i,n).defined(),isTransient:!0});this.terminalCreatedEmitter.fire(s),s.show();let o=this.program=new vL(s);r.params.command&&s.sendText(r.params.command,!0),o.stopped.then(a=>{o===this.program&&this.onProgramTerminated(a)})}createTerminal(r){return Promise.resolve(Wg.window.createTerminal(r))}dispose(){super.dispose(),this.fs.unlink(this.callbackFile).catch(()=>{})}};Jo=k([(0,Pu.injectable)(),A(0,(0,Pu.inject)(In)),A(1,(0,Pu.inject)(fe)),A(2,(0,Pu.inject)(Ie)),A(3,(0,Pu.inject)(ni)),A(4,(0,Pu.inject)(gt))],Jo);var nl=S(Y()),Xg=S(X7());var dd=class{constructor(e,r){r&&e instanceof yi&&(this.service=(0,Xg.getExperimentationService)("ms-vscode.js-debug",Vu,PH?Xg.TargetPopulation.Insiders:Xg.TargetPopulation.Public,{setSharedProperty(i,n){e.setGlobalMetric(i,n)},postEvent(i,n){e.pushOutput({category:"telemetry",output:i,data:n})}},r.globalState))}async getTreatment(e,r){if(!this.service)return r;try{return await this.service.getTreatmentVariableAsync("vscode",e,!0)}catch(i){return r}}};dd=k([(0,nl.injectable)(),A(0,(0,nl.inject)(jt)),A(1,(0,nl.optional)()),A(1,(0,nl.inject)(It))],dd);var A_=S(Y()),Y7=S(require("vscode"));var J7=S(Y()),Lr=S(require("vscode"));var it=class{constructor(){this._onSessionAddedEmitter=new Lr.EventEmitter;this._onSessionEndedEmitter=new Lr.EventEmitter;this._disposables=[];this.sessions=new Map;this.onSessionAdded=this._onSessionAddedEmitter.event;this.onSessionEnded=this._onSessionEndedEmitter.event}static isConcreteSession(e){return!!e.configuration.__pendingTargetId}static pickSession(e,r){if(e.length<2)return e[0];let i=Lr.window.createQuickPick();return i.title=r,i.items=e.map(n=>({label:n.name,id:n.id})),i.ignoreFocusOut=!0,new Promise(n=>{i.onDidAccept(()=>n(e.find(s=>{var o;return s.id===((o=i.selectedItems[0])==null?void 0:o.id)}))),i.onDidHide(()=>n(void 0)),i.show()}).finally(()=>i.dispose())}get isDebugging(){return this.sessions.size>0}getById(e){return this.sessions.get(e)}isRunning(e){return[...this.sessions.values()].includes(e)}getByName(e){return[...this.sessions.values()].filter(r=>r.name===e)}getConcreteSessions(){return[...this.sessions.values()].filter(it.isConcreteSession)}getChildren(e){return[...this.sessions.values()].filter(r=>r.configuration.__parentId===e.id)}attach(){Lr.debug.onDidStartDebugSession(e=>{ca(e.type)&&(this.sessions.set(e.id,e),this._onSessionAddedEmitter.fire(e))},void 0,this._disposables),Lr.debug.onDidTerminateDebugSession(e=>{ca(e.type)&&(this.sessions.delete(e.id),this._onSessionEndedEmitter.fire(e))},void 0,this._disposables),Lr.debug.onDidReceiveDebugSessionCustomEvent(e=>{if(ca(e.session.type)){if(e.event==="revealLocationRequested"){let r=e.body,i=Lr.debug.asDebugSourceUri(e.body.source),n={};if(r.line){let s=new Lr.Position((r.line||1)-1,(r.column||1)-1);n.selection=new Lr.Range(s,s)}Lr.window.showTextDocument(i,n);return}if(e.event==="copyRequested"){let r=e.body;Lr.env.clipboard.writeText(r.text);return}}},void 0,this._disposables)}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[]}};it=k([(0,J7.injectable)()],it);var hd=class{constructor(e){this.tracker=e}register(e){e.subscriptions.push(this.tracker.onSessionEnded(r=>{let i=r.configuration.cascadeTerminateToConfigurations;if(!(!i||!(i instanceof Array)))for(let n of i)for(let s of this.tracker.getByName(n))Y7.debug.stopDebugging(s)}))}};hd=k([(0,A_.injectable)(),A(0,(0,A_.inject)(it))],hd);var I_=Symbol("IDebugConfigurationResolver"),E_=Symbol("IDebugConfigurationProvider");var bd=S(Se()),ta=S(Y()),pK=require("os"),wd=require("path"),Yg=S(require("vscode"));var Q7=S(Y()),Z7=S(require("vscode"));var Qo=class{get type(){return this.getType()}get triggerKind(){return this.getTriggerKind()}async provideDebugConfigurations(e,r){try{let i=await this.provide(e,r);if(!i)return[];let n=i instanceof Array?i:[i],s=oh.get(this.type);if(s)for(let o of n)o.type===this.type&&(o.type=s);return n}catch(i){return Z7.window.showErrorMessage(i.message,{modal:!0}),[]}}};Qo=k([(0,Q7.injectable)()],Qo);var x_=S(Y()),rK=require("path"),Zo=S(require("vscode"));var Jg=S(Y()),hT=S(require("vscode"));var eK=S(require("vscode")),md=class{constructor(e){this.key=e}set value(e){e!==this._value&&(this._value=e,eK.commands.executeCommand("setContext",this.key,e))}get value(){return this._value}};var tK=Symbol("Uninitialized"),S_=class{constructor(e,r){this.key=e;this.defaultValue=r;this._value=tK}write(e,r){r!==this.read(e)&&(this._value=r,e.update(this.key,r))}read(e){var r;return this._value===tK&&(this._value=(r=e.get(this.key))!=null?r:this.defaultValue),this._value}};var C_=new S_("sourceSteppingEnabled",!0),gd=class{constructor(e,r){this.context=e;this.tracker=r}register(e){let r=new md("jsDebugIsMapSteppingDisabled");C_.read(this.context.workspaceState)===!1&&(r.value=!0);let i=n=>{r.value=!n,C_.write(this.context.workspaceState,n);for(let s of this.tracker.getConcreteSessions())s.customRequest("setSourceMapStepping",{enabled:n})};e.subscriptions.push($e(hT.commands,"extension.js-debug.enableSourceMapStepping",async()=>{i(!0)}),$e(hT.commands,"extension.js-debug.disableSourceMapStepping",async()=>{i(!1)}))}};gd=k([(0,Jg.injectable)(),A(0,(0,Jg.inject)(It)),A(1,(0,Jg.inject)(it))],gd);var En=class{constructor(e){this.extensionContext=e}get type(){return this.getType()}async resolveDebugConfiguration(e,r,i){var s;if(r.type&&(r.type=this.getType()),"__pendingTargetId"in r)return r;let n=r;(s=n.sourceMaps)!=null||(n.sourceMaps=C_.read(this.extensionContext.workspaceState));try{let o=await this.resolveDebugConfigurationAsync(e,n,i);return o&&this.commonResolution(o,e)}catch(o){Zo.window.showErrorMessage(o.message,{modal:!0})}}applyDefaultRuntimeExecutable(e){if(e.runtimeExecutable)return;let r=$t(Zo.workspace,"debug.javascript.defaultRuntimeExecutable"),i=r?r[e.type]:void 0;i&&(e.runtimeExecutable=i)}commonResolution(e,r){var i,n,s;return e.trace=ZI(e.trace,this.extensionContext.logPath),e.__workspaceCachePath=this.extensionContext.storagePath,e.__breakOnConditionalError=(i=$t(Zo.workspace,"debug.javascript.breakOnConditionalError",r))!=null?i:!1,r?e.__workspaceFolder=r.uri.fsPath:(e.__workspaceFolder||(e.__workspaceFolder=this.getSuggestedWorkspaceFolders(e).filter(kt).filter(o=>!o.includes("${workspaceFolder}")).map(o=>{var a;return(0,rK.isAbsolute)(o)?(a=Zo.workspace.getWorkspaceFolder(Zo.Uri.file(o)))==null?void 0:a.uri.fsPath:o}).find(kt)||((s=(n=Zo.workspace.workspaceFolders)==null?void 0:n[0])==null?void 0:s.uri.fsPath)||""),e.__workspaceFolder?e=MA(e):e=RA(e)),e}getSuggestedWorkspaceFolders(e){return[]}};En=k([(0,x_.injectable)(),A(0,(0,x_.inject)(It))],En);var Tu=S(Se()),yd=require("fs"),Hd=S(Y()),Pt=S(require("path")),Yi=S(require("vscode"));var iK=S(require("vscode"));function D_(t){iK.debug.activeDebugConsole.appendLine(t)}var sl=S(Se()),nK=require("child_process"),sK=require("fs"),oK=require("path"),Ei=S(require("vscode"));var owe=9229;async function aK(){let t=await HT();if(!t)return;let e=$t(Ei.workspace,"debug.javascript.pickAndAttachOptions"),r={...LA,...e,name:"process",processId:t};await gT(new xi(sK.promises),r,!0),await Ei.debug.startDebugging(r.cwd?Ei.workspace.getWorkspaceFolder(Ei.Uri.file(r.cwd)):void 0,r)}async function gT(t,e,r=!1){var s;let i=(s=e.processId)==null?void 0:s.trim(),n=i&&cwe(i);if(!n||isNaN(n.pid))throw new Error(sl.t("Attach to process: '{0}' doesn't look like a process id.",i||"<unknown>"));if(n.port||pwe(n.pid),e.port=n.port||owe,delete e.processId,r){let o=await awe(t,n.pid);o&&(e.cwd=o)}}async function awe(t,e){var s;let r=e&&await Bg.getWorkingDirectory(e);if(!r)return(s=Ei.workspace.workspaceFolders)==null?void 0:s[0].uri.fsPath;let i=await Ql(t,r,"package.json");if(!i)return r;let n=Ei.workspace.getWorkspaceFolder(Ei.Uri.file(r));return!n||Ly(n.uri.fsPath,i)?i:n.uri.fsPath}async function HT(){try{let t=await lwe();return t?t.pidAndPort:null}catch(t){return await Ei.window.showErrorMessage(sl.t("Process picker failed ({0})",t.message),{modal:!0}),null}}var uwe=(t,e)=>`${t}:${e!=null?e:""}`,cwe=t=>{let[e,r]=t.split(":");return{pid:Number(e),port:r?Number(r):void 0}};async function lwe(){let t=/^(?:node|iojs)(?:$|\b)/i,e=0,r=Ei.window.createQuickPick();r.placeholder=sl.t("Pick the node.js process to attach to"),r.matchOnDescription=!0,r.matchOnDetail=!0,r.busy=!0,r.show();let i=!1,n=new Promise(o=>{r.onDidAccept(()=>o(r.selectedItems[0])),r.onDidHide(()=>o(void 0))});Bg.lookup((o,a)=>{if(i)return a;process.platform==="win32"&&o.command.indexOf("\\??\\")===0&&(o.command=o.command.replace("\\??\\",""));let u=(0,oK.basename)(o.command,".exe"),{port:c}=zw(o.args);if(!c&&!t.test(u))return a;let l={label:u,description:o.args,pidAndPort:uwe(o.pid,c),sortKey:o.date?o.date:e++,detail:c?sl.t("process id: {0}, debug port: {1} ({2})",o.pid,c,"SIGUSR1"):sl.t("process id: {0} ({1})",o.pid,"SIGUSR1")},p=a.findIndex(f=>f.sortKey<l.sortKey);return a.splice(p===-1?a.length:p,0,l),r.items=a,a},[]).then(()=>r.busy=!1).catch(o=>{Ei.window.showErrorMessage(`Error listing processes: ${o.message}`),r.dispose()});let s=await n;return i=!0,r.dispose(),s}function pwe(t){try{if(process.platform==="win32"){let e=`node -e process._debugProcess(${t})`;(0,nK.execSync)(e)}else process.kill(t,"SIGUSR1")}catch(e){throw new Error(sl.t("Attach to process: cannot enable debug mode for process '{0}' ({1}).",t,e))}}var $u=class extends En{constructor(r,i,n){super(r);this.nvmResolver=i;this.fsUtils=n}async resolveDebugConfigurationWithSubstitutedVariables(r,i){let n=i;if(n.type==="pwa-node"&&n.request==="attach"&&typeof n.processId=="string"&&await gT(this.fsUtils,n),n.cwd){let s=await Di(yd.promises,n.cwd);if(!s){Yi.window.showErrorMessage(Tu.t("The configured `cwd` {0} does not exist.",n.cwd),{modal:!0});return}if(!s.isDirectory()){Yi.window.showErrorMessage(Tu.t("The configured `cwd` {0} is not a folder.",n.cwd),{modal:!0});return}}return n}async resolveDebugConfigurationAsync(r,i,n){var s;if(!i.name&&!i.type&&!i.request&&(i=await vT(r,!0,i),i.request==="launch"&&!i.program)){Yi.window.showErrorMessage(Tu.t("Cannot find a program to debug"),{modal:!0});return}if(i.cwd||(i.cwd=i.localRoot||yT(i.request==="launch"?i.program:void 0,r)),i.remoteRoot&&!i.localRoot&&(i.localRoot="${workspaceFolder}"),i.request==="launch"){if(this.applyDefaultRuntimeExecutable(i),i.runtimeExecutable&&_v(i.runtimeExecutable)==="deno"&&!i.attachSimplePort){let a=await Na();i.attachSimplePort=a,(s=i.continueOnAttach)!=null||(i.continueOnAttach=!0);let u=[`--inspect-brk=127.0.0.1:${a}`,"--allow-all"];i.runtimeArgs?i.runtimeArgs.includes("run")?i.runtimeArgs=[...i.runtimeArgs,...u]:i.runtimeArgs=["run",...u,...i.runtimeArgs]:i.runtimeArgs=["run",...u]}let o=i.runtimeVersion;if(typeof o=="string"&&o!=="default"){let{directory:a,binary:u}=await this.nvmResolver.resolveNvmVersionPath(o);i.env=new Dt(i.env).addToPath(a,"prepend",!0).value,i.runtimeExecutable=!i.runtimeExecutable||i.runtimeExecutable==="node"?u:i.runtimeExecutable}if(i.console==="integratedTerminal"&&!i.internalConsoleOptions&&(i.internalConsoleOptions="neverOpen"),i.attachSimplePort===null||i.attachSimplePort===void 0)Xw(i);else{if(i.attachSimplePort===0){i.attachSimplePort=await Na(void 0,n);let a=`--inspect-brk=${i.attachSimplePort}`;i.runtimeArgs=i.runtimeArgs?[...i.runtimeArgs,a]:[a]}i.continueOnAttach=!i.stopOnEntry,i.stopOnEntry=!1}await fwe(this.fsUtils,r,i)}return $A(i)}getType(){return"pwa-node"}getSuggestedWorkspaceFolders(r){return[r.rootPath,r.cwd]}};$u=k([(0,Hd.injectable)(),A(0,(0,Hd.inject)(It)),A(1,(0,Hd.inject)(Qw)),A(2,(0,Hd.inject)(Br))],$u);function yT(t,e){if(e)return e.uri.fsPath;if(Yi.workspace.workspaceFolders&&Yi.workspace.workspaceFolders.length>0)return Yi.workspace.workspaceFolders[0].uri.fsPath;if(t){if(t==="${file}")return"${fileDirname}";if(Pt.isAbsolute(t))return Pt.dirname(t)}return"${workspaceFolder}"}function uK(t,e){var r;if(t&&(e=is(e,"workspaceFolder",t.uri.fsPath)),(r=Yi.workspace.workspaceFolders)!=null&&r.length&&(e=is(e,"workspaceRoot",Yi.workspace.workspaceFolders[0].uri.fsPath)),Pt.isAbsolute(e))return e;if(t)return Pt.join(t.uri.fsPath,e)}async function fwe(t,e,r){if(r.outFiles||!e)return;let i;if(r.program?(i=uK(e,r.program),i&&(i=Pt.dirname(i))):r.cwd&&(i=uK(e,r.cwd)),!i||Ty(e.uri.fsPath,i))return;let n=await XE(i,async s=>!s.includes("node_modules")&&await t.exists(Pt.join(s,"package.json")));if(n){let s=qe(Pt.relative(e.uri.fsPath,n));s.length&&(r.outFiles=[...IH.outFiles,`\${workspaceFolder}/${s}/**/*.js`,`!\${workspaceFolder}/${s}/**/node_modules/**`])}}var dwe=["index.js","main.js"];async function vT(t,e,r){var a;let i={type:"pwa-node",request:"launch",name:Tu.t("Launch Program"),skipFiles:["<node_internals>/**"]};r&&r.noDebug&&(i.noDebug=!0);let n=await cK(t,"package.json"),s,o=!1;if(n&&n.name==="mern-starter")return e&&D_(Tu.t("Launch configuration for '{0}' project created.","Mern Starter")),mwe(i),i;if(n&&(s=await Hwe(t,n,e),s&&e&&D_(Tu.t("Launch configuration created based on 'package.json'."))),!s){let u=Yi.window.activeTextEditor;u&&xH.includes(u.document.languageId)&&(o=u.document.languageId!=="javascript",s=t?Pt.relative(t.uri.fsPath,u.document.uri.fsPath):u.document.uri.fsPath,Pt.isAbsolute(s)||(s="${workspaceFolder}"+Pt.sep+s))}if(!s&&t){let u=t.uri.fsPath;s=await Is(dwe.map(async c=>await Di(yd.promises,Pt.join(u,c))&&"${workspaceFolder}"+Pt.sep+c))}if(s||(s="${file}"),s&&(i.program=s,t||(i.__workspaceFolder=Pt.dirname(s))),o||Yi.workspace.textDocuments.some(u=>gwe(u.languageId))){e&&D_(Tu.t("Adjust glob pattern(s) in the 'outFiles' attribute so that they cover the generated JavaScript."));let u="",c=await cK(t,"tsconfig.json");if((a=c==null?void 0:c.compilerOptions)!=null&&a.outDir&&hwe()){let l=c.compilerOptions.outDir;Pt.isAbsolute(l)||(u=l,u.indexOf("./")===0&&(u=u.substr(2)),u[u.length-1]!=="/"&&(u+="/")),i.preLaunchTask="tsc: build - tsconfig.json"}i.outFiles=["${workspaceFolder}/"+u+"**/*.js"]}return i}function hwe(){let t=Yi.workspace.getConfiguration().get("typescript.tsc.autoDetect");return t!=="off"&&t!=="watch"}function mwe(t){t.request==="launch"&&(t.runtimeExecutable="nodemon",t.program="${workspaceFolder}/index.js",t.restart=!0,t.env={BABEL_DISABLE_CACHE:"1",NODE_ENV:"development"},t.console="integratedTerminal",t.internalConsoleOptions="neverOpen")}function gwe(t){return t==="typescript"||t==="coffeescript"}async function cK(t,e){if(t)try{let r=await yd.promises.readFile(Pt.join(t.uri.fsPath,e),"utf8");return JSON.parse(r)}catch(r){}}async function Hwe(t,e,r){let i;try{if(e.main?i=e.main:e.scripts&&typeof e.scripts.start=="string"&&(i=e.scripts.start.split(" ").pop()),i){let n;if(Pt.isAbsolute(i)?n=i:(n=t?Pt.join(t.uri.fsPath,i):void 0,i=Pt.join("${workspaceFolder}",i)),r&&n&&!await Di(yd.promises,n)&&!await Di(yd.promises,n+".js"))return}}catch(n){}return i}var lK=S(require("vscode"));var vd=class extends En{async resolveDebugConfigurationAsync(e,r){if(r.cwd||(r.cwd=yT(void 0,e)),r.request==="launch"&&!r.command){await vH(lK.commands,"extension.js-debug.createDebuggerTerminal",void 0,e);return}return r.remoteRoot&&!r.localRoot&&(r.localRoot="${workspaceFolder}"),kA(r)}getType(){return"node-terminal"}};var ywe=t=>t.request==="launch",vwe=t=>t.request==="attach",ku=class extends En{constructor(r,i,n,s,o){super(r);this.nodeProvider=i;this.terminalProvider=n;this.location=s;this.fs=o}async resolveBrowserCommon(r,i){if(i.request,i.server&&"program"in i.server){let s={...i.server,type:"pwa-node",request:"launch",name:`${i.name}: Server`};i.server=await this.nodeProvider.resolveDebugConfiguration(r,s)}else i.server&&"command"in i.server&&(i.server=await this.terminalProvider.resolveDebugConfiguration(r,{...i.server,type:"node-terminal",request:"launch",name:`${i.name}: Server`}));let n=this.location==="remote"?"ui":"workspace";if(ywe(i)&&!i.browserLaunchLocation&&(i.browserLaunchLocation=n),vwe(i)&&!i.browserAttachLocation&&(i.browserAttachLocation=n),i.request==="launch"){let s=i;this.applyDefaultRuntimeExecutable(s)}}getSuggestedWorkspaceFolders(r){return[r.rootPath,r.webRoot]}async resolveDebugConfigurationWithSubstitutedVariables(r,i){if("__pendingTargetId"in i)return i;let n=i;if(n.request==="launch"){let s=await this.ensureNoLockfile(n);if(s===void 0)return;n=s}return n}async ensureNoLockfile(r){var a,u;if(r.request!=="launch")return r;let i=r;if(i.userDataDir===!1||i.port&&!await c2(i.port))return r;let n=typeof i.userDataDir=="string"?i.userDataDir:(0,wd.join)((a=this.extensionContext.storagePath)!=null?a:(0,pK.tmpdir)(),(u=i.runtimeArgs)!=null&&u.includes("--headless")?".headless-profile":".profile"),s=(0,wd.join)(n,process.platform==="win32"?"lockfile":"SingletonLock");if(await Is([RR(this.fs,s),this.isVsCodeLocked((0,wd.join)(n,"code.lock"))])){let c=bd.t("Debug Anyway");if(await Yg.window.showErrorMessage(bd.t("It looks like a browser is already running from {0}. Please close it before trying to debug, otherwise VS Code may not be able to connect to it.",i.userDataDir===!0?bd.t("an old debug session"):bd.t("the configured userDataDir")),{modal:!0},c)!==c)return}return{...r,userDataDir:n}}async isVsCodeLocked(r){try{let i=Number(await this.fs.readFile(r,"utf-8"));return process.kill(i,0),!0}catch(i){return!1}}};ku=k([(0,ta.injectable)(),A(0,(0,ta.inject)(It)),A(1,(0,ta.inject)($u)),A(2,(0,ta.inject)(vd)),A(3,(0,ta.inject)(Ts)),A(4,(0,ta.inject)(Ie))],ku);var Ru=class extends Qo{provide(){return this.createLaunchConfigFromContext()||this.getDefaultLaunch()}getTriggerKind(){return Yg.DebugConfigurationProviderTriggerKind.Initial}createLaunchConfigFromContext(){let e=Yg.window.activeTextEditor;if(e&&e.document.languageId==="html")return{type:this.getType(),request:"launch",name:`Open ${(0,wd.basename)(e.document.uri.fsPath)}`,file:e.document.uri.fsPath}}getDefaultLaunch(){return{type:this.getType(),request:"launch",name:bd.t("Launch Chrome against localhost"),url:"http://localhost:8080",webRoot:"${workspaceFolder}"}}};Ru=k([(0,ta.injectable)()],Ru);var bT=S(Y());var _d=class extends ku{async resolveDebugConfigurationAsync(e,r){if(!r.name&&!r.type&&!r.request){let i=new ol().createLaunchConfigFromContext();if(!i)return null;r=i}return await this.resolveBrowserCommon(e,r),r.request==="attach"?{...ch,...r}:{...SH,...r}}getType(){return"pwa-chrome"}};_d=k([(0,bT.injectable)()],_d);var ol=class extends Ru{getType(){return"pwa-chrome"}};ol=k([(0,bT.injectable)()],ol);var fK=S(Se()),wT=S(Y());var Ad=class extends ku{async resolveDebugConfigurationAsync(e,r){var i;if(!r.name&&!r.type&&!r.request){let n=new al().createLaunchConfigFromContext();if(!n)return;r=n}return await this.resolveBrowserCommon(e,r),r.useWebView&&(r.timeout=(i=r.timeout)!=null?i:0),r.request==="attach"?{...DA,...r}:{...PA,...r}}getType(){return"pwa-msedge"}};Ad=k([(0,wT.injectable)()],Ad);var al=class extends Ru{getType(){return"pwa-msedge"}getDefaultLaunch(){return{...super.getDefaultLaunch(),name:fK.t("Launch Edge against localhost")}}};al=k([(0,wT.injectable)()],al);var hK=require("fs"),mK=S(Y()),gK=require("path");var Id=class extends En{async resolveDebugConfigurationAsync(e,r){if(r.debugWebWorkerHost===void 0){let i=await bwe(e,r);r={...r,debugWebWorkerHost:i.length===1&&i[0]==="web"}}return r.debugWebWorkerHost&&(r.outFiles=[]),CH(r),Promise.resolve({...xA,...r})}getType(){return"pwa-extensionHost"}};Id=k([(0,mK.injectable)()],Id);var dK="--extensionDevelopmentPath=",bwe=async(t,e)=>{var s,o,a,u;let r=(s=e.args)==null?void 0:s.find(c=>c.startsWith(dK));if(!r)return["workspace"];let i=is(r.slice(dK.length),"workspaceFolder",(a=(o=t==null?void 0:t.uri.fsPath)!=null?o:e.__workspaceFolder)!=null?a:""),n;try{let c=await hK.promises.readFile((0,gK.join)(i,"package.json"),"utf-8");n=(u=JSON.parse(c).extensionKind)!=null?u:"workspace"}catch(c){return["workspace"]}return n instanceof Array?n:[n]};var L_=S(Se()),ET=S(Y()),xd=S(require("path")),Qg=S(require("vscode"));var Ed=S(Se()),bK=S(require("fs")),P_=S(require("path")),ft=S(require("vscode"));var HK=require("vscode"),_T=async t=>{try{return await HK.commands.executeCommand("npm.packageManager",t==null?void 0:t.uri)}catch(e){return"npm"}},yK=async(t,e)=>`${await _T(e)} run ${t}`;async function wK(t){let e=await IT(t?[t]:void 0);if(!e)return;let r=async a=>{let u=ft.workspace.getWorkspaceFolder(ft.Uri.file(a.directory));vH(ft.commands,"extension.js-debug.createDebuggerTerminal",await yK(a.name,u),u,{cwd:a.directory})};if(e.length===1)return r(e[0]);let i=e.some(a=>a.directory!==e[0].directory),n=ft.window.createQuickPick(),s,o=[];for(let a of e)a.directory!==s&&i&&(o.push({label:P_.basename(a.directory),kind:ft.QuickPickItemKind.Separator}),s=a.directory),o.push({script:a,label:a.name,description:a.command});n.items=o,n.onDidAccept(async()=>{r(n.selectedItems[0].script),n.dispose()}),n.show()}var AT=(t,e)=>t.score>e.score?t:e;async function IT(t,e=!1){var o;let r=(o=t!=null?t:ft.workspace.workspaceFolders)!=null?o:[];if(!r||r.length===0){e||ft.window.showErrorMessage(Ed.t("You need to open a workspace folder to debug npm scripts."));return}let i=(await Promise.all(r.map(a=>ft.workspace.findFiles(new ft.RelativePattern(a,"**/package.json"),"**/{node_modules,.vscode-test}/**")))).flat();if(i.length===0){e||ft.window.showErrorMessage(Ed.t("No package.json files found in your workspace."));return}let n=[],s={path:i[0].fsPath,score:0};for(let{fsPath:a}of new Set(i)){s=AT(s,{path:a,score:1});let u;try{u=JSON.parse(await xy(a))}catch(c){e||vK("showWarningMessage",Ed.t("Could not read {0}: {1}",a,c.message),a),s=AT(s,{path:void 0,score:3});continue}if(s=AT(s,{path:void 0,score:2}),!!u.scripts)for(let c of Object.keys(u.scripts))n.push({directory:P_.dirname(a),name:c,command:u.scripts[c]})}if(n.length===0){s.path&&!e&&vK("showErrorMessage",Ed.t("No npm scripts found in your package.json"),s.path);return}return n.sort((a,u)=>(a.name==="start"?-1:0)+(u.name==="start"?1:0)),n}var wwe=`{
  "scripts": {
    
  }
}
`;async function vK(t,e,r){let i=Ed.t("Edit package.json");if(await ft.window[t](e,i)!==i)return;if(bK.existsSync(r)){let a=await ft.workspace.openTextDocument(r);await ft.window.showTextDocument(a);return}let n=await ft.workspace.openTextDocument(ft.Uri.file(r).with({scheme:"untitled"})),s=await ft.window.showTextDocument(n);await s.edit(a=>a.insert(new ft.Position(0,0),wwe));let o=new ft.Position(2,5);s.selection=new ft.Selection(o,o)}var Sd=class extends Qo{provide(e){return vT(e,!0)}getType(){return"pwa-node"}getTriggerKind(){return Qg.DebugConfigurationProviderTriggerKind.Initial}};Sd=k([(0,ET.injectable)()],Sd);var _we=["cwd","program"],Cd=class extends Qo{async provide(e){let r=Wu(await Promise.all([this.getFromNpmScripts(e),this.getFromActiveFile()]));if(e)for(let i of r){let n=i;for(let s of _we){let o=n[s];o&&xd.isAbsolute(o)&&(n[s]=xd.join("${workspaceFolder}",xd.relative(e.uri.fsPath,o)))}}return r}getType(){return"pwa-node"}getTriggerKind(){return Qg.DebugConfigurationProviderTriggerKind.Dynamic}async getFromNpmScripts(e){let r={type:yl("node-terminal"),name:L_.t("JavaScript Debug Terminal"),request:"launch",cwd:e==null?void 0:e.uri.fsPath};if(!e)return[r];let i=await IT([e],!0);if(!i)return[r];let n=await _T(e);return i.map(s=>({type:yl("node-terminal"),name:L_.t("Run Script: {0}",s.name),request:"launch",command:`${n} run ${s.name}`,cwd:s.directory})).concat(r)}getFromActiveFile(){let e=Qg.window.activeTextEditor;return!e||!xH.includes(e.document.languageId)||e.document.uri.scheme!=="file"?[]:[{type:yl("pwa-node"),name:L_.t("Run Current File"),request:"launch",program:e.document.uri.fsPath}]}};Cd=k([(0,ET.injectable)()],Cd);var _K=[_d,Ad,Id,$u,vd],AK=[ol,al,Sd,Cd];var Dd=S(Se()),Zg=S(Y()),CT=require("url"),Si=S(require("vscode"));function ST(t,e){if(t){try{if(new CT.URL(t).hostname)return t}catch(r){}try{let r=`http://${t}`,i=new CT.URL(r);if(!e||i.port)return r}catch(r){}}}var Pd=class{constructor(e,r){this.defaultBrowser=e;this.context=r}register(e){e.subscriptions.push(Si.commands.registerCommand("extension.js-debug.debugLink",r=>this.handle(r)))}async handle(e){var s,o,a;if(e=(s=e!=null?e:await this.getLinkFromTextEditor())!=null?s:await this.getLinkFromQuickInput(),!e)return;let r="pwa-chrome";try{await this.defaultBrowser.lookup()===3&&(r="pwa-msedge")}catch(u){}let i=(o=$t(Si.workspace,"debug.javascript.debugByLinkOptions"))!=null?o:{},n={...typeof i=="string"?{}:i,type:yl(r),name:e,request:"launch",url:e};Si.debug.startDebugging((a=Si.workspace.workspaceFolders)==null?void 0:a[0],n),this.persistConfig(n)}getLinkFromTextEditor(){let e=Si.window.activeTextEditor;if(e)return ST(e.document.getText(e.selection),!0)}async getLinkFromQuickInput(){let e=await Si.env.clipboard.readText(),r=await Si.window.showInputBox({value:ST(e,!1)||this.mostRecentLink,placeHolder:"https://localhost:8080",validateInput:i=>{if(i&&!ST(i,!1))return Dd.t("The URL provided is invalid")}});if(r)return this.mostRecentLink=r,r}async persistConfig(e){var a;if(this.context.globalState.get("saveDebugLinks")===!1)return;let r=Si.workspace.getConfiguration("launch"),i=(a=r.get("configurations"))!=null?a:[];if(i.some(u=>u.url===e.url))return;let n=Dd.t("Yes"),s=Dd.t("Never"),o=await Si.window.showInformationMessage(Dd.t("Would you like to save a configuration in your launch.json for easy access later?"),n,Dd.t("No"),s);o===s&&this.context.globalState.update("saveDebugLinks",!1),o===n&&await r.update("configurations",[...i,e])}};Pd=k([(0,Zg.injectable)(),A(0,(0,Zg.inject)(pf)),A(1,(0,Zg.inject)(It))],Pd);var Ld=S(Se()),$d=S(Y()),Qi=S(require("vscode"));var IK="neverRemind",Td=class{constructor(e,r,i){this.fs=e;this.context=r;this.tracker=i;this.dismissedForSession=!1;this.isPrompting=!1}register(e){e.subscriptions.push($e(Qi.commands,"extension.js-debug.getDiagnosticLogs",async()=>{let r=await this.getTargetSession();if(!r)return;let i=await Qi.window.showSaveDialog({filters:{JSON:["json"]}});i&&r.customRequest("saveDiagnosticLogs",{toFile:i.fsPath})}),$e(Qi.commands,"extension.js-debug.createDiagnostics",async()=>this.getDiagnosticInfo(await this.getTargetSession())),Qi.debug.onDidReceiveDebugSessionCustomEvent(async r=>{if(r.event==="openDiagnosticTool")return this.openDiagnosticTool(r.body.file);if(r.event!=="suggestDiagnosticTool"||this.dismissedForSession||this.context.workspaceState.get(IK)||this.isPrompting)return;this.isPrompting=!0;let i=Ld.t("Yes"),n=Ld.t("Not Now"),s=Ld.t("Never"),o=await Qi.window.showInformationMessage("It looks like you might be having trouble with breakpoints. Would you like to open our diagnostic tool?",i,n,s);switch(this.isPrompting=!1,o){case i:this.getDiagnosticInfo(await this.getTargetSession(),!0);break;case s:e.workspaceState.update(IK,!0);break;case n:this.dismissedForSession=!0;break}}))}getTargetSession(){let e=Qi.debug.activeDebugSession;if(!e||!ca(e==null?void 0:e.type))return this.pickSession();if(it.isConcreteSession(e))return e;let r=this.tracker.getChildren(e);return r.length===1?r[0]:this.pickSession()}pickSession(){return it.pickSession(this.tracker.getConcreteSessions(),Ld.t("Select the session you want to inspect:"))}async getDiagnosticInfo(e,r=!1){if(!e||!this.tracker.isRunning(e)){Qi.window.showErrorMessage(Ld.t('It looks like your debug session has already ended. Try debugging again, then run the "Debug: Diagnose Breakpoint Problems" command.'));return}let{file:i}=await e.customRequest("createDiagnostics",{fromSuggestion:r});await this.openDiagnosticTool(i)}async openDiagnosticTool(e){let r=Qi.window.createWebviewPanel("jsDebugDiagnostics","Debug Diagnostics",Qi.ViewColumn.Active,{enableScripts:!0});r.webview.html=await this.fs.readFile(e,"utf-8")}};Td=k([(0,$d.injectable)(),A(0,(0,$d.inject)(Ie)),A(1,(0,$d.inject)(It)),A(2,(0,$d.inject)(it))],Td);var kd=S(Se()),EK=S(Y()),Sn=S(require("vscode"));var ul=class{register(e){e.subscriptions.push(Sn.debug.onDidReceiveDebugSessionCustomEvent(r=>{if(r.event!=="suggestDisableSourcemap"||!ca(r.session.type))return;let i=r.body;this.unmap(r.session,i.source).catch(n=>Sn.window.showErrorMessage(n.message))}))}async unmap(e,r){($t(Sn.workspace,"debug.javascript.unmapMissingSources")||await this.prompt())&&await e.customRequest("disableSourcemap",{source:r})}async prompt(){let e=kd.t("Always"),r=kd.t("Always in this Workspace"),i=kd.t("Yes");switch(await Sn.window.showInformationMessage(kd.t("This is a missing file path referenced by a sourcemap. Would you like to debug the compiled version instead?"),e,r,kd.t("No"),i)){case e:return SA(Sn.workspace,"debug.javascript.unmapMissingSources",!0,Sn.ConfigurationTarget.Global),!0;case r:return SA(Sn.workspace,"debug.javascript.unmapMissingSources",!0,Sn.ConfigurationTarget.Workspace),!0;case i:return!0;default:return!1}}};ul=k([(0,EK.injectable)()],ul);var CK=S(Se()),T_=S(Y()),Mu=S(require("vscode"));var SK=t=>{if((t==null?void 0:t.type)!=="pwa-msedge")return!1;let e=t.configuration.__browserTargetType;return e==="iframe"||e==="page"},Iwe="ms-edgedevtools.vscode-edge-devtools",Ewe="vscode-edge-devtools.attachToCurrentDebugTarget";function Swe(t){let e=t;for(;e.parentSession;)e=e.parentSession;return e}var Rd=class{constructor(e){this.tracker=e}register(e){e.subscriptions.push($e(Mu.commands,"extension.js-debug.openEdgeDevTools",async()=>{let r=Mu.debug.activeDebugSession&&SK(Mu.debug.activeDebugSession)?Mu.debug.activeDebugSession:await it.pickSession(this.tracker.getConcreteSessions().filter(SK),CK.t("Select the page where you want to open the devtools"));if(!r)return;let i=Swe(r);try{return await Mu.commands.executeCommand(Ewe,r.id,i.configuration)}catch(n){if(n instanceof Error&&/command .+ not found/.test(n.message))return Mu.commands.executeCommand("workbench.extensions.action.showExtensionsWithIds",[Iwe]);throw n}}))}};Rd=k([(0,T_.injectable)(),A(0,(0,T_.inject)(it))],Rd);var LK=require("crypto"),$_=S(Y()),TK=require("path"),ht=S(require("vscode"));var xK=({name:t,line:e,column:r,source:i})=>`${t} (${(0,TK.basename)(String(i.path))}:${e}:${r})`,DK=({name:t,line:e,column:r,source:i})=>`${t} (${i.path}:${e}:${r})`,PK=async({line:t,column:e,source:r})=>{if(r.sourceReference!==0||!r.path)return;let i=ht.Uri.file(r.path),n=await ht.workspace.openTextDocument(i),s=await ht.window.showTextDocument(n),o=new ht.Position(t-1,e-1);s.revealRange(new ht.Range(o,o)),s.selection=new ht.Selection(o,o)},xT=class{constructor(e,r){this.caller=e;this.target=r;this.treeItem=new ht.TreeItem(`${xK(e)} \u2192 ${xK(r)}`,ht.TreeItemCollapsibleState.None),this.treeItem.tooltip=`Breaks at ${DK(r)} containing ${DK(e)} will be skipped`,this.id=this.treeItem.id=(0,LK.createHash)("sha1").update(JSON.stringify([e,r])).digest("base64")}toDap(){return{caller:this.caller,target:this.target}}},Md=class{constructor(e){this.sessionTracker=e;this._onDidChangeTreeData=new ht.EventEmitter;this.allCallers=new Map;this.lastHadCallers=!1;this.onDidChangeTreeData=this._onDidChangeTreeData.event}register(e){e.subscriptions.push(ht.window.createTreeView("jsExcludedCallers",{treeDataProvider:this}),$e(ht.commands,"extension.js-debug.callers.add",async(r,i)=>{var a;let n=await((a=this.sessionTracker.getById(i.sessionId))==null?void 0:a.customRequest("stackTrace",{threadId:0,startFrame:0,levels:1}));if(!(n!=null&&n.stackFrames.length))return;let s=n.stackFrames[0],o=new xT({name:i.frameName,column:i.frameLocation.range.startColumn,line:i.frameLocation.range.startLineNumber,source:i.frameLocation.source},{name:s.name,column:s.column,line:s.line,source:s.source});this.allCallers.set(o.id,o),this.triggerUpdate()}),$e(ht.commands,"extension.js-debug.callers.goToCaller",r=>PK(r.caller)),$e(ht.commands,"extension.js-debug.callers.gotToTarget",r=>PK(r.target)),$e(ht.commands,"extension.js-debug.callers.remove",async r=>{this.allCallers.delete(r.id),this.triggerUpdate()}),$e(ht.commands,"extension.js-debug.callers.removeAll",async()=>{this.allCallers.clear(),this.triggerUpdate()}),this.sessionTracker.onSessionAdded(r=>{this.allCallers.size>0&&this.sendCallersToSession(r)}))}getTreeItem(e){return e.treeItem}getChildren(e){return e?[]:[...this.allCallers.values()]}sendCallersToSession(e){e.customRequest("setExcludedCallers",{callers:[...this.allCallers.values()].map(r=>r.toDap())})}triggerUpdate(){this._onDidChangeTreeData.fire(void 0);for(let r of this.sessionTracker.getConcreteSessions())this.sendCallersToSession(r);let e=this.allCallers.size>0;e!==this.lastHadCallers&&(ah(ht.commands,"jsDebugHasExcludedCallers",e),this.lastHadCallers=e)}};Md=k([(0,$_.injectable)(),A(0,(0,$_.inject)(it))],Md);var DT=S(Se()),eH=S(Y());var $K="linkBpWarnIgnored",xwe="https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_can-i-debug-if-im-using-symlinks",Od=class{constructor(e,r){this.vscode=e;this.context=r;this.didWarn=this.context.workspaceState.get($K,!1)}async warn(){if(this.didWarn)return;this.didWarn=!0;let e=DT.t("Read More"),r=DT.t("Ignore"),i=await this.vscode.window.showWarningMessage("It looks like you have symlinked files. You might need to update your configuration to make this work as expected.",r,e);i===r?this.context.workspaceState.update($K,!0):i===e&&this.vscode.env.openExternal(this.vscode.Uri.parse(xwe))}};Od=k([(0,eH.injectable)(),A(0,(0,eH.inject)(an)),A(1,(0,eH.inject)(It))],Od);var tH=S(Se()),k_=S(Y()),RK=require("path"),ra=S(require("vscode"));var kK="omitLongPredictions",Nd=class{constructor(e){this.context=e}register(e){e.subscriptions.push(ra.debug.onDidReceiveDebugSessionCustomEvent(r=>{r.event==="longPrediction"&&this.promptLongBreakpoint(r.session.workspaceFolder)}))}async promptLongBreakpoint(e){if(this.context.workspaceState.get(kK))return;let r=tH.t("It's taking a while to configure your breakpoints. You can speed this up by updating the 'outFiles' in your launch.json."),i=tH.t("Open launch.json"),n=tH.t("Don't show again"),s=await ra.window.showWarningMessage(r,n,i);if(s===n){this.context.workspaceState.update(kK,!0);return}if(s!==i)return;if(e||(e=await ra.window.showWorkspaceFolderPick()),!e){await ra.window.showWarningMessage(tH.t("No workspace folder open."));return}let o=await ra.workspace.openTextDocument((0,RK.join)(e.uri.fsPath,".vscode","launch.json"));await ra.window.showTextDocument(o)}};Nd=k([(0,k_.injectable)(),A(0,(0,k_.inject)(It))],Nd);var R_=S(Y()),Bd=require("vscode");var Fd=class{constructor(e){this.leaseTracker=e;this.cachedResolutions=new Array(16).fill("");this.cachedResolutionIndex=0}register(e){typeof Bd.workspace.registerPortAttributesProvider=="function"&&e.subscriptions.push(Bd.workspace.registerPortAttributesProvider({portRange:[53e3,54e3]},this))}async providePortAttributes(e,r){if(r&&this.cachedResolutions.includes(`${e}:${r}`))return{port:e,autoForwardAction:Bd.PortAutoForwardAction.Ignore};if(await this.leaseTracker.isRegistered(e)){if(r){let i=this.cachedResolutionIndex++%this.cachedResolutions.length;this.cachedResolutions[i]=`${e}:${r}`}return{port:e,autoForwardAction:Bd.PortAutoForwardAction.Ignore}}}};Fd=k([(0,R_.injectable)(),A(0,(0,R_.inject)(gt))],Fd);var M_=S(Y()),OK=S(require("querystring")),cl=S(require("vscode"));var Ud=class{constructor(e){this.tracker=e;this.canPrettyPrintKey=new md("jsDebugCanPrettyPrint")}register(e){e.subscriptions.push($e(cl.commands,"extension.js-debug.prettyPrint",()=>this.prettifyActive()),cl.window.onDidChangeActiveTextEditor(r=>this.updateEditorState(r)),this.tracker.onSessionAdded(()=>this.updateEditorState(cl.window.activeTextEditor)),this.tracker.onSessionEnded(()=>this.updateEditorState(cl.window.activeTextEditor)))}async prettifyActive(){let e=cl.window.activeTextEditor;if(!e||!this.canPrettyPrint(e))return;let{sessionId:r,source:i}=Dwe(e.document.uri),n=r&&this.tracker.getById(r);if(n)MK(n,i,e.selection.start);else for(let s of this.tracker.getConcreteSessions())MK(s,i,e.selection.start)}canPrettyPrint(e){return this.tracker.isDebugging&&e.document.languageId==="javascript"&&!e.document.fileName.endsWith("-pretty.js")}updateEditorState(e){var r;if(!this.tracker.isDebugging){this.canPrettyPrintKey.value=void 0;return}e&&this.canPrettyPrint(e)&&e.document.uri.toString()!==((r=this.canPrettyPrintKey.value)==null?void 0:r[0])&&(this.canPrettyPrintKey.value=[e.document.uri.toString()])}};Ud=k([(0,M_.injectable)(),A(0,(0,M_.inject)(it))],Ud);var MK=(t,e,r)=>t.customRequest("prettyPrintSource",{source:e,line:r.line,column:r.character}),Dwe=t=>{let e=OK.parse(t.query),r=e.session,i={path:t.fsPath,sourceReference:Number(e.ref)||0};return{sessionId:r,source:i}};var rH=S(Se()),iH=S(Y()),FK=S(require("path")),es=S(require("vscode"));var NK="breakpointTerminationWarnedSlow",jd=class{constructor(e,r){this.fs=e;this.context=r;this.sortOrder=2;this.id="breakpoint";this.label=rH.t("Pick Breakpoint");this.description=rH.t("Run until a specific breakpoint is hit")}async onPick(e,r){if(r)return new O_(r);let i=es.window.createQuickPick();i.canSelectMany=!0,i.matchOnDescription=!0,i.busy=!0;let n=await new Promise(s=>{i.onDidAccept(()=>s(i.selectedItems)),i.onDidHide(()=>s(void 0)),i.onDidChangeActive(async o=>{if(!o.length)return;let a=o[0].location,u=await es.workspace.openTextDocument(a.uri);es.window.showTextDocument(u,{selection:a.range,preview:!0,preserveFocus:!0})}),i.show(),(async()=>{let o=es.debug.breakpoints.filter(c=>c.enabled&&c instanceof es.SourceBreakpoint),a=await Promise.all(o.map(c=>e.getDebugProtocolBreakpoint(c))),u=await this.getCandidates(a,o);i.items=u,i.selectedItems=u,i.busy=!1})()});if(i.dispose(),!!n)return await this.warnSlowCode(),new O_(n.map(s=>Number(s.id)))}async warnSlowCode(){this.context.workspaceState.get(NK)||(es.window.showWarningMessage(rH.t('Profiling with breakpoints enabled can change the performance of your code. It can be useful to validate your findings with the "duration" or "manual" termination conditions.'),rH.t("Got it!")),await this.context.workspaceState.update(NK,!0))}async getCandidates(e,r){if(e.length!==r.length)throw new Error("Mismatched breakpoint array lengths");let i=uo(s=>this.getFileLines(s));return(await Promise.all(r.map(async(s,o)=>{var f;let a=e[o];if(!a||!a.id)return;let u=s.location,c=es.workspace.getWorkspaceFolder(u.uri),l=c?FK.relative(c.uri.fsPath,u.uri.fsPath):u.uri.fsPath,p=await i(u.uri.fsPath);return{id:a.id,label:`${l}:${u.range.start.line}:${u.range.start.character}`,location:u,description:(f=p==null?void 0:p[u.range.start.line])==null?void 0:f.trim()}}))).filter(kt)}async getFileLines(e){try{return(await this.fs.readFile(e,"utf-8")).split(`
`)}catch(r){return}}};jd=k([(0,iH.injectable)(),A(0,(0,iH.inject)(Ie)),A(1,(0,iH.inject)(It))],jd);var O_=class{constructor(e){this.breakpointIds=e}get customData(){return{stopAtBreakpoint:this.breakpointIds.slice()}}dispose(){}};var ll=S(Se()),BK=S(Y()),UK=S(require("vscode"));var N_=S(Se()),no=S(require("vscode"));var nH=class{constructor(e,r,i){this.session=e;this.impl=r;this.termination=i;this.statusChangeEmitter=new X;this.stopEmitter=new X;this._innerStatus=[];this.disposables=new Le;this.state=0;this.onStatusChange=this.statusChangeEmitter.event;this.onStop=this.stopEmitter.event;var n;this.disposables.push(no.debug.onDidReceiveDebugSessionCustomEvent(s=>{s.session===e&&s.event==="profilerStateUpdate"&&this.onStateUpdate(s.body)}),no.debug.onDidTerminateDebugSession(s=>{s===e&&this.stopEmitter.fire(void 0)})),i&&(this.disposables.push(i),(n=i.attachTo)==null||n.call(i,this))}get status(){return this._innerStatus.filter(e=>!!e).join(", ")||void 0}async start(){try{await no.window.withProgress({location:no.ProgressLocation.Window,title:N_.t("Starting profile...")},()=>{var e;return this.session.customRequest("startProfile",{type:this.impl.type,...(e=this.termination)==null?void 0:e.customData})})}catch(e){no.window.showErrorMessage(e.message),this.stopEmitter.fire(void 0)}}dispose(){this.state=2,this.disposables.dispose()}setFile(e){this.file=e}async stop(){this.state===0&&(this.setStatus(-1,N_.t("Saving")),this.state=1,await no.window.withProgress({location:no.ProgressLocation.Window,title:N_.t("Stopping profile...")},()=>this.session.customRequest("stopProfile",{})))}onStateUpdate(e){if(e.running){this.setStatus(0,e.label);return}this.state=2,this.stopEmitter.fire(this.file),this.dispose()}setStatus(e,r){this.state===0&&(e===-1?this._innerStatus=[r]:this._innerStatus[e]=r,this.statusChangeEmitter.fire(this.status))}};var qd=class{constructor(){this.sortOrder=1;this.id="duration";this.label=ll.t("Duration");this.description=ll.t("Run for a specific amount of time")}async onPick(e,r){if(r)return new F_(r*1e3);let i=UK.window.createInputBox();i.title=ll.t("Duration of Profile"),i.placeholder=ll.t('Profile duration in seconds, e.g "5"'),this.lastDuration&&(i.value=String(this.lastDuration)),i.onDidChangeValue(s=>{/^[0-9]+$/.test(s)?Number(s)<1?i.validationMessage=ll.t("Please enter a number greater than 1"):i.validationMessage=void 0:i.validationMessage=ll.t("Please enter a number")});let n=await new Promise(s=>{i.onDidAccept(()=>{if(i.validationMessage)return s(void 0);this.lastDuration=Number(i.value),s(new F_(this.lastDuration*1e3))}),i.onDidHide(()=>s(void 0)),i.show()});return i.dispose(),n}};qd=k([(0,BK.injectable)()],qd);var F_=class{constructor(e){this.duration=e;this.disposable=new Le}attachTo(e){let r=Date.now()+this.duration,i=()=>e.setStatus(1,`${Math.round((r-Date.now())/1e3)}s`),n=setTimeout(()=>e.stop(),this.duration),s=setInterval(i,1e3);i(),this.disposable.callback(()=>{clearTimeout(n),clearInterval(s)})}dispose(){this.disposable.dispose()}};var PT=S(Se()),jK=S(Y());var Wd=class{constructor(){this.sortOrder=0;this.id="manual";this.label=PT.t("Manual");this.description=PT.t("Run until manually stopped")}async onPick(){return new sH}};Wd=k([(0,jK.injectable)()],Wd);var sH=class{dispose(){}};var Vd=Symbol("ITerminationConditionFactory");var so=S(Se()),Nu=S(Y()),qK=require("os"),B_=require("path"),Hr=S(require("vscode"));var Pwe=t=>"__pendingTargetId"in t.configuration,Ou=class{constructor(e,r,i,n){this.tracker=e;this.fs=r;this.sessionStates=i;this.terminationConditions=n;this.activeSessions=new Map;this.disposables=new Le;this.disposables.push(Hr.debug.onDidReceiveDebugSessionCustomEvent(s=>{if(s.event!=="profileStarted")return;let o=s.body,a=this.activeSessions.get(s.session.id);a||(a=new nH(s.session,wi.ctors.find(u=>u.type===o.type)||wi.ctors[0],new sH),this.registerSession(a)),a.setFile(o.file)}))}async start(e){let r,i=[...this.tracker.getConcreteSessions()].filter(Pwe);if(e.sessionId?r=i.find(c=>c.id===e.sessionId):r=await this.pickSession(i),!r)return;let n=r,s=this.activeSessions.get(n.id);if(s&&!await this.alreadyRunningSession(s))return;let o=await this.pickType(n,e.type);if(!o)return;let a;if(!o.instant&&(a=await this.pickTermination(n,e.termination),!a))return;let u=new nH(n,o,a);u&&(this.registerSession(u,e.onCompleteCommand),await u.start(),o.instant&&await u.stop())}async stop(e){let r;if(e)r=this.activeSessions.get(e);else{let i=await this.pickSession([...this.activeSessions.values()].map(n=>n.session));r=i&&this.activeSessions.get(i.id)}r&&(this.sessionStates.remove(r.session.id),await r.stop())}dispose(){for(let e of this.activeSessions.values())e.dispose();this.activeSessions.clear(),this.disposables.dispose()}registerSession(e,r){this.activeSessions.set(e.session.id,e),this.sessionStates.add(e.session.id,so.t("Profiling")),e.onStatusChange(()=>this.updateStatusBar()),e.onStop(i=>{i&&this.openProfileFile(e,r,e.session,i),this.activeSessions.delete(e.session.id),e.dispose(),this.updateStatusBar()}),this.updateStatusBar()}async openProfileFile(e,r,i,n){var u,c,l,p;if(r)return Promise.all([Hr.commands.executeCommand(r,{contents:await this.fs.readFile(n,"utf-8"),basename:(0,B_.basename)(n)+e.impl.extension}),this.fs.unlink(n)]);let s=(p=(l=(u=i.workspaceFolder)==null?void 0:u.uri.fsPath)!=null?l:(c=Hr.workspace.workspaceFolders)==null?void 0:c[0].uri.fsPath)!=null?p:(0,qK.homedir)(),o=Mb()+e.impl.extension,a=Hr.Uri.file((0,B_.join)(s,o));await MR(this.fs,n,a.fsPath),await Hr.commands.executeCommand(e.impl.editable?"vscode.open":"revealInExplorer",a)}updateStatusBar(){var e;if(this.activeSessions.size===0){(e=this.statusBarItem)==null||e.hide(),ah(Hr.commands,"jsDebugIsProfiling",!1);return}if(this.statusBarItem||(this.statusBarItem=Hr.window.createStatusBarItem(Hr.StatusBarAlignment.Right,500),this.statusBarItem.command="extension.js-debug.stopProfile"),ah(Hr.commands,"jsDebugIsProfiling",!0),this.activeSessions.size===1){let r=this.activeSessions.values().next().value;this.statusBarItem.text=r.status?so.t("{0} Click to Stop Profiling ({1})","$(loading~spin)",r.status):so.t("{0} Click to Stop Profiling","$(loading~spin)")}else this.statusBarItem.text=so.t("{0} Click to Stop Profiling ({1} sessions)","$(loading~spin)",this.activeSessions.size);this.statusBarItem.show()}async alreadyRunningSession(e){let r=so.t("Yes"),i=so.t("No");return await Hr.window.showErrorMessage(so.t("A profiling session is already running, would you like to stop it and start a new session?"),r,i)!==r?!1:(await this.stop(e.session.id),!0)}async pickSession(e){if(e.length===0)return;if(e.length===1)return e[0];let r=await Hr.window.showQuickPick(e.map(i=>({label:i.name,id:i.id})));return r&&e.find(i=>i.id===r.id)}async pickType(e,r){let i=e.configuration;if(r)return wi.ctors.find(s=>s.type===r&&s.canApplyTo(i));let n=await this.pickWithLastDefault(so.t("Type of profile:"),wi.ctors.filter(s=>s.canApplyTo(i)),this.lastChosenType);return n&&(this.lastChosenType=n.label),n}async pickTermination(e,r){var n,s;if(r){let o=typeof r=="string"?{type:r}:r;return(s=this.terminationConditions.find(a=>a.id===o.type))==null?void 0:s.onPick(e,...(n=o.args)!=null?n:[])}let i=await this.pickWithLastDefault(so.t("How long to run the profile:"),this.terminationConditions,this.lastChosenTermination);return i&&(this.lastChosenTermination=i.label),i==null?void 0:i.onPick(e)}async pickWithLastDefault(e,r,i){if(r.length<=1)return r[0];let n=Hr.window.createQuickPick();n.title=e,n.items=r.slice().sort((o,a)=>{var u,c;return o.label===i||a.label===i?o.label===i?-1:1:((u=o.sortOrder)!=null?u:0)-((c=a.sortOrder)!=null?c:0)}).map(o=>({label:o.label,description:o.description,alwaysShow:!0}));let s=await new Promise(o=>{n.onDidAccept(()=>{var a;return o((a=n.selectedItems[0])==null?void 0:a.label)}),n.onDidHide(()=>o(void 0)),n.show()});if(n.dispose(),!!s)return r.find(o=>o.label===s)}};Ou=k([(0,Nu.injectable)(),A(0,(0,Nu.inject)(it)),A(1,(0,Nu.inject)(Ie)),A(2,(0,Nu.inject)(cp)),A(3,(0,Nu.multiInject)(Vd))],Ou);var WK=S(Y()),VK=require("vscode");var Gd=class{constructor(){this.read=Fe(()=>$t(VK.workspace,"debug.javascript.resourceRequestOptions"))}provideOptions(e){$3(e,this.read()||{})}};Gd=k([(0,WK.injectable)()],Gd);var GK=S(Y()),LT=require("vscode");var Kd=class{register(e){e.subscriptions.push($e(LT.commands,"extension.node-debug.startWithStopOnEntry",()=>LT.commands.executeCommand("workbench.action.debug.start",{config:{stopOnEntry:!0}})))}};Kd=k([(0,GK.injectable)()],Kd);var VT=S(Se()),aA=S(Y()),iz=S(rz()),nz=require("url"),vr=S(require("vscode"));var Uu=class{constructor(e){this.defaultBrowser=e;this.enabledTerminals=new WeakSet;this.disposable=new Le;this.notifiedCantOpenOnWeb=!1;this.baseConfiguration=this.readConfig();this.disposable.push(vr.workspace.onDidChangeConfiguration(r=>{r.affectsConfiguration("debug.javascript.debugByLinkOptions")&&(this.baseConfiguration=this.readConfig())}))}enableHandlingInTerminal(e){this.enabledTerminals.add(e)}dispose(){this.disposable.dispose()}provideTerminalLinks(e){var n;switch(this.baseConfiguration.enabled){case"off":return[];case"always":break;case"on":default:if(!this.enabledTerminals.has(e.terminal))return[]}let r=[],i=Fe(()=>{var s;if("cwd"in e.terminal.creationOptions&&e.terminal.creationOptions.cwd){let o=vr.workspace.getWorkspaceFolder(typeof e.terminal.creationOptions.cwd=="string"?vr.Uri.file(e.terminal.creationOptions.cwd):e.terminal.creationOptions.cwd);if(o)return o}return(s=vr.workspace.workspaceFolders)==null?void 0:s[0]});for(let s of(0,iz.find)(e.line,"url")){let o=-1;for(;(o=e.line.indexOf(s.value,o+1))!==-1;){let a;try{a=new nz.URL(s.href)}catch(u){continue}a.protocol==="http:"&&!s.value.startsWith("http:")&&!yv(a.hostname)&&(a.protocol="https:"),!(a.protocol!=="http:"&&a.protocol!=="https:")&&r.push({startIndex:o,length:s.value.length,tooltip:VT.t("Debug URL"),target:a,workspaceFolder:(n=i())==null?void 0:n.index})}}return r}async handleTerminalLink(e){await this.handleTerminalLinkInner(e)||vr.env.openExternal(vr.Uri.parse(e.target.toString()))}async handleTerminalLinkInner(e){var s;if(!e.target)return!1;let r=e.target;if(vr.env.uiKind===vr.UIKind.Web)return this.notifiedCantOpenOnWeb||(vr.window.showInformationMessage(VT.t("We can't launch a browser in debug mode from here. If you want to debug this webpage, open this workspace from VS Code on your desktop.")),this.notifiedCantOpenOnWeb=!0),!1;cN(r.hostname)&&(r.hostname="localhost");let i="pwa-chrome";try{await this.defaultBrowser.lookup()===3&&(i="pwa-msedge")}catch(o){}let n=e.workspaceFolder!==void 0?(s=vr.workspace.workspaceFolders)==null?void 0:s[e.workspaceFolder]:void 0;return vr.debug.startDebugging(n,{...this.baseConfiguration,type:i,name:r.toString(),request:"launch",url:r.toString()}),!0}readConfig(){let e=$t(vr.workspace,"debug.javascript.debugByLinkOptions");return typeof e=="boolean"&&(e=e?"on":"off"),typeof e=="string"?{enabled:e}:{enabled:"on",...e}}};Uu=k([(0,aA.injectable)(),A(0,(0,aA.inject)(pf))],Uu);var sz=t=>{t.bind(an).toConstantValue(require("vscode")),_K.forEach(e=>{t.bind(e).toSelf().inSingletonScope(),t.bind(I_).to(e)}),AK.forEach(e=>t.bind(E_).to(e).inSingletonScope()),t.bind(Hi).to(Nd).inSingletonScope(),t.bind(Hi).to(Pd).inSingletonScope(),t.bind(Hi).to(hd).inSingletonScope(),t.bind(Hi).to(ul).inSingletonScope(),t.bind(Hi).to(Td).inSingletonScope(),t.bind(Hi).to(Kd).inSingletonScope(),t.bind(Hi).to(Fd).inSingletonScope(),t.bind(Hi).to(Rd).inSingletonScope(),t.bind(Hi).to(Md).inSingletonScope(),t.bind(Hi).to(Ud).inSingletonScope(),t.bind(Hi).to(gd).inSingletonScope(),t.bind(Lg).to(Od).inSingletonScope(),t.bind(it).toSelf().inSingletonScope().onActivation(xt),t.bind(Ou).toSelf().inSingletonScope().onActivation(xt),t.bind(Uu).toSelf().inSingletonScope(),t.bind(ul).toSelf().inSingletonScope(),t.bind(Vd).to(qd).inSingletonScope(),t.bind(Vd).to(Wd).inSingletonScope(),t.bind(Vd).to(jd).inSingletonScope()},oz=t=>{t.bind(Ar).to(Jo).onActivation(xt),t.bind(sf).to(Gd).inSingletonScope(),t.bind(Ap).to(dd).inSingletonScope()};var uz=(t,e,r,i)=>{let n=new lA.Container;return n.parent=t,n.bind(Ke).toConstantValue(e.launchConfig),n.bind(ap).toConstantValue(n),n.bind(rn).toConstantValue(r),n.bind(Mt).toConstantValue(i),n.bind(za).toConstantValue(e),n.bind(h9).toConstantValue(e.targetOrigin()),n.bind(Zu).to(Pc).inSingletonScope(),n.bind(Ov).to(gp).inSingletonScope(),n.bind(ka).toSelf().inSingletonScope(),e.sourcePathResolver&&n.bind(ut).toConstantValue(e.sourcePathResolver),n.bind(Ic).toSelf(),n.bind(Lb).toDynamicValue(s=>s.container.get(Ic).create()).inSingletonScope(),e.parent()&&(n.bind(uc).to(ac).inSingletonScope(),n.bind(Ps).to(op).inSingletonScope()),n.bind(jt).to(process.env.DA_TEST_DISABLE_TELEMETRY?Zc:yi).inSingletonScope().onActivation(xt),n.bind(pn).toSelf().inSingletonScope(),n.bind(fr).toSelf().inSingletonScope(),n.bind(Xa).toSelf().inSingletonScope(),n.bind(Da).to(qs).inSingletonScope(),n.bind(Va).toSelf().inSingletonScope(),n.bind(qp).to(jp).inSingletonScope(),n.bind(sb).to($p).inSingletonScope(),n.bind(un).to(dp).inSingletonScope(),n.bind(Eb).to(Up).inSingletonScope(),n.bind(Ka).to(Bp).inSingletonScope(),n.bind(gr).toSelf(),n.bind(Ui).toSelf(),n.bind(ji).toSelf(),n.bind(Rb).to(wi).inSingletonScope(),n.bind(Ob).to(Vp).inSingletonScope(),n.bind(nb).to(Lp).inSingletonScope().onActivation(xt),n},cz=t=>{let e=new lA.Container;e.parent=t,e.bind(ap).toConstantValue(e),e.bind(fe).to(Hn).inSingletonScope().onActivation(xt),e.bind(Qa).toSelf().inSingletonScope(),e.bind(Zu).to(Pc).inSingletonScope(),e.bind(jt).to(process.env.DA_TEST_DISABLE_TELEMETRY?Zc:yi).inSingletonScope().onActivation(xt),e.bind(_s).to(_s).inSingletonScope(),e.bind(fo).to(fo).inSingletonScope(),e.bind(af).to(of).inSingletonScope(),e.bind(Sv).toDynamicValue(i=>yu.createOrFallback(i.container.get(fe))).inSingletonScope(),e.bind(ip).to(Df).inSingletonScope(),e.bind(In).to(Uf),e.bind(Ys).toSelf().inSingletonScope().onActivation(xt),e.bind(ro).toSelf(),e.bind(Ar).to(Qn).onActivation(xt),e.bind(Ar).to(qf).onActivation(xt),e.bind(Ar).to(Wf).onActivation(xt),e.bind(Ar).to(Jf).onActivation(xt),e.bind(qg).to(ed),e.bind(qg).to(td),e.bind(zc).to(Bf).inSingletonScope(),oz(e),e.bind(Ar).to(zf).onActivation(xt),e.bind(Gc).toSelf().inSingletonScope().onActivation(xt),e.bind(Ar).toService(Gc),e.bind(Ar).to(Lf).inSingletonScope().onActivation(xt),e.bind(Ar).to($f).inSingletonScope().onActivation(xt),e.bind(Ar).to(Tf).inSingletonScope().onActivation(xt),e.bind(Ar).to(kf).inSingletonScope().onActivation(xt),e.bind(Ar).to(_n).onActivation(xt),e.bind(Ar).toDynamicValue(()=>t.get(Zs).createLauncher(e.get(fe))).inSingletonScope();let r=i=>n=>new i(n.container.get(tS),n.container.get(Ie),n.container.get(Yh));return e.bind(lc).toDynamicValue(r(cA.ChromeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","chrome"),e.bind(lc).toDynamicValue(r(cA.EdgeBrowserFinder)).inSingletonScope().whenTargetTagged("browser","edge"),e},lz=t=>{let e=new lA.Container;return e.bind(ap).toConstantValue(e),e.bind(Zs).toSelf().inSingletonScope(),e.bind(Yn).toSelf().inSingletonScope(),e.bind(Ap).to(rd).inSingletonScope(),e.bind(cp).toConstantValue(new Ws),e.bind(pf).to(lf).inSingletonScope(),e.bind(Ls).toConstantValue(t.storagePath),e.bind(up).toConstantValue(t.isVsCode),e.bind(Qw).to(Qf),e.bind(gt).to(Pp).inSingletonScope(),e.bind(tS).toConstantValue(process.env),e.bind(Yh).toConstantValue(az.default),e.bind(Ie).toConstantValue(uA.promises),e.bind(Br).toConstantValue(new xi(uA.promises)),e.bind(Ts).toConstantValue(t.isRemote?"remote":"local"),t.context&&e.bind(It).toConstantValue(t.context),sz(e),e},pz=(t,e,r)=>{t.bind(Ym).toConstantValue(Uq(e)),t.bind(Ke).toService(Ym),t.bind(ni).to(Of).inSingletonScope(),t.bind(Bl).toConstantValue(r),t.bind(ut).toDynamicValue(i=>i.container.get(ni).create(e,i.container.get(fe))).inSingletonScope(),t.bind(Br).toConstantValue(Cy.create(e.__remoteFilePrefix,uA.promises,r)),t.bind(vo).to(Ca).inSingletonScope().onActivation(xt),t.bind(Ta).to(fp).inSingletonScope(),t.bind(St).toSelf().inSingletonScope().onActivation(xt),t.bind(oc).toSelf().inSingletonScope(),t.bind(uc).to(ac).inSingletonScope(),t.bind(Ps).to(sp).inSingletonScope()};var yz=S(Se()),ai=S(require("vscode"));var sa=S(Y()),KT=S(require("path")),eh=S(require("vscode"));var GT=":::",pA=class{constructor(e){this.processEnv=e}get nodeOptions(){return this.processEnv.NODE_OPTIONS}set nodeOptions(e){e===void 0?delete this.processEnv.NODE_OPTIONS:this.processEnv.NODE_OPTIONS=e}get inspectorOptions(){let e=this.processEnv.VSCODE_INSPECTOR_OPTIONS;if(!e)return;let r=e.split(GT).find(i=>!!i);if(r)try{return JSON.parse(r)}catch(i){return}}set inspectorOptions(e){e===void 0?delete this.processEnv.VSCODE_INSPECTOR_OPTIONS:this.processEnv.VSCODE_INSPECTOR_OPTIONS=JSON.stringify(e)}unsetForTree(){delete this.processEnv.VSCODE_INSPECTOR_OPTIONS}updateInspectorOption(e,r){let i=this.inspectorOptions;i&&(this.inspectorOptions={...i,[e]:r})}};var hl=class extends Ai{constructor(r,i,n,s,o,a){super(r,i,a,o);this.extensionContext=n;this.fs=s;this.telemetryItems=new Map}get deferredSocketName(){var n;let r=this.extensionContext.environmentVariableCollection.get("VSCODE_INSPECTOR_OPTIONS");return r?(n=new pA({VSCODE_INSPECTOR_OPTIONS:r.value}).inspectorOptions)==null?void 0:n.inspectorIpc:void 0}getProcessTelemetry(r){return Promise.resolve(r instanceof jf?this.telemetryItems.get(r.processId()):void 0)}resolveParams(r){if(r.type==="node-terminal"&&r.request==="launch")return r}async launchProgram(r){await this.applyInspectorOptions(this.extensionContext.environmentVariableCollection,r),this.program=new Xo,this.program.stopped.then(i=>this.onProgramTerminated(i))}async refreshVariables(){this.run&&await this.applyInspectorOptions(this.extensionContext.environmentVariableCollection,this.run)}async applyInspectorOptions(r,i){var u;let n;try{n=await this.resolveNodePath(i.params)}catch(c){if(c instanceof ne&&c.cause.id===9229)n=new si("node",void 0);else throw c}let s=$t(eh.workspace,"debug.javascript.autoAttachFilter"),a=(await this.resolveEnvironment(i,n,{deferredMode:!0,inspectorIpc:(u=this.deferredSocketName)!=null?u:i.serverAddress+".deferred",autoAttachMode:s,aaPatterns:s==="smart"?this.readSmartPatterns():void 0})).defined();r.persistent=!0,r.prepend("NODE_OPTIONS",a.NODE_OPTIONS+" "),r.append("VSCODE_INSPECTOR_OPTIONS",GT+a.VSCODE_INSPECTOR_OPTIONS)}readSmartPatterns(){var n,s;let r=$t(eh.workspace,"debug.javascript.autoAttachSmartPattern"),i=((n=eh.workspace.workspaceFolders)==null?void 0:n.length)===1?eh.workspace.workspaceFolders[0].uri.fsPath:`{${(s=eh.workspace.workspaceFolders)==null?void 0:s.map(o=>o.uri.fsPath).join(",")}}`;return r==null?void 0:r.map(o=>o.replace("${workspaceFolder}",i)).map(qe)}async getBootloaderFile(r,i){var a;let n=this.extensionContext.storagePath||this.extensionContext.globalStoragePath;if(n.includes(" ")&&i.isPreciselyKnown&&!i.has(0))throw new hH(`The \`node\` version on your PATH is too old (${(a=i.version)==null?void 0:a.major}), so we cannot enable auto-attach in your environment`,"https://github.com/microsoft/vscode-js-debug/issues/708");let s=KT.join(n,"bootloader.js");try{await this.fs.mkdir(n)}catch(u){}await Promise.all([XI(this.fs,Bw,s),XI(this.fs,y9,KT.join(n,"watchdog.js"))]);let o=qe(s);return{interpolatedPath:o.includes(" ")?`"${o}"`:o,dispose:()=>{}}}async spawnForChild(r){var s;if(!this.run)return;let i=Number((s=r.pid)!=null?s:"0");this.telemetryItems.set(i,r.telemetry);let n=await Ii.attach({...r,ipcAddress:this.run.serverAddress});n.onEnd(()=>{this.telemetryItems.delete(i),n.dispose()})}static clearVariables(r){r.environmentVariableCollection.clear()}};hl=k([(0,sa.injectable)(),A(0,(0,sa.inject)(In)),A(1,(0,sa.inject)(fe)),A(2,(0,sa.inject)(It)),A(3,(0,sa.inject)(Ie)),A(4,(0,sa.inject)(ni)),A(5,(0,sa.inject)(gt))],hl);var hH=class extends Error{constructor(r,i){super(r);this.helpLink=i}};var hz=S(Se()),mz=require("os"),Tt=S(require("vscode"));var fz=()=>{let t,e=Je(),r=(i,n)=>n==="connect"?s=>{e.resolve(s),t=s}:n==="disconnect"?()=>{e=Je(),t=void 0}:async(...s)=>(t||await e.promise)[n](...s);return new Proxy({},{get:r})};var XT=(t,e,r={},i=()=>!0)=>{let n=new yi,s={...$t(Tt.workspace,"debug.javascript.terminalOptions"),internalConsoleOptions:"neverOpen"},o=fz();n.attachDap(o);let a=new Set,u=async c=>{var h,g;let l=await e.getProcessTelemetry(c),p=l&&Tt.Uri.file(l.cwd),f=p&&Tt.workspace.getWorkspaceFolder(p);return f?f.uri:r.__workspaceFolder?Tt.Uri.file(r.__workspaceFolder):(g=(h=Tt.workspace.workspaceFolders)==null?void 0:h[0].uri)!=null?g:p};return e.onTargetListChanged(async()=>{let c=await Tt.workspace.requestWorkspaceTrust(),l=new Set;for(let p of e.targetList()){if(l.add(p),a.has(p)){a.delete(p);continue}let f=t.addDelegate(p,o,p.parent());if(!i(p)){p.detach();return}if(p.targetInfo.openerId&&!p.parent()){p.detach();return}if(!c){p.detach();return}if(!p.parent()){let h=await u(p);Tt.debug.startDebugging(h&&Tt.workspace.getWorkspaceFolder(h),{...s,type:"node-terminal",name:"Node.js Process",request:"attach",delegateId:f,cwd:h==null?void 0:h.fsPath,__workspaceFolder:h})}}for(let p of a)t.removeDelegate(p);a=l}),e.launch(co({...s,type:"node-terminal",name:EH.name,request:"launch",...r}),{dap:o,telemetryReporter:n,cancellationToken:hr,get targetOrigin(){return new Ff("<unset>")}})},gz=Symbol("Abort"),dz=(0,mz.homedir)(),Gwe=process.platform==="win32"?t=>t:t=>t.startsWith(dz)?`~${t.slice(dz.length)}`:t;async function Kwe(){var r;let t=Tt.workspace.workspaceFolders;if(!t||t.length<2)return t==null?void 0:t[0];let e=await Tt.window.showQuickPick(t.map(i=>({label:i.name,description:Gwe(i.uri.fsPath),folder:i})),{placeHolder:hz.t("Select current working directory for new terminal")});return(r=e==null?void 0:e.folder)!=null?r:gz}var zT=class extends Jo{constructor(){super(...arguments);this.optionsReadyEmitter=new X;this.onOptionsReady=this.optionsReadyEmitter.event}createTerminal(r){return this.optionsReadyEmitter.fire(r),new Promise(i=>{let n=Tt.window.onDidOpenTerminal(s=>{n.dispose(),i(s)})})}};function Hz(t,e,r,i){var a,u;let n=new Map,s=(c,l)=>new Jo(l,c,i.get(Ie),i.get(Yn),i.get(gt));async function o(c,l,p,f,h=s){if(!p){let v=await Kwe();if(v===gz)return;p=v}if(l){for(let[v,w]of n)if(w.folder===p&&w.cwd===(f==null?void 0:f.cwd)&&!w.launcher.targetList().length){v.show(!0),v.sendText(l);return}}let g=new Qs,H=h(g,new zo(g,i.get(Ie),Uw));H.onTerminalCreated(v=>{n.set(v,{launcher:H,folder:p,cwd:f==null?void 0:f.cwd}),r.enableHandlingInTerminal(v)});try{await XT(c,H,{command:l,...f,__workspaceFolder:p==null?void 0:p.uri.fsPath},()=>{for(let[v,w]of n)if(w.launcher===H&&v.state.isInteractedWith)return!0;return!1})}catch(v){Tt.window.showErrorMessage(v.message)}}t.subscriptions.push(Tt.window.onDidCloseTerminal(c=>{n.delete(c)}),$e(Tt.commands,"extension.js-debug.createDebuggerTerminal",(c,l,p)=>o(e,c,l,p)),Tt.window.registerTerminalProfileProvider("extension.js-debug.debugTerminal",{provideTerminalProfile:()=>new Promise(c=>o(e,void 0,void 0,void 0,(l,p)=>{let f=new zT(p,l,i.get(Ie),i.get(Yn),i.get(gt));return f.onOptionsReady(h=>c(new Tt.TerminalProfile(h))),f}))}),(u=(a=Tt.window).registerTerminalLinkProvider)==null?void 0:u.call(a,r))}function vz(t,e,r){let i,n,s=()=>i||(i=(async()=>{let o=new Qs,a=new hl(new zo(o,r.get(Ie),Uw),o,t,r.get(Ie),r.get(Yn),r.get(gt));return await XT(e,a,$t(ai.workspace,"debug.javascript.terminalOptions")),a.onTargetListChanged(()=>{a.targetList().length===0&&!n?n=setTimeout(()=>{i=void 0,a.terminate()},3e5):n&&(clearTimeout(n),n=void 0)}),a})(),i);t.subscriptions.push($e(ai.commands,"extension.js-debug.setAutoAttachVariables",async()=>{try{return{ipcAddress:(await s()).deferredSocketName}}catch(o){if(o instanceof hH&&o.helpLink){let a=yz.t("Details");await ai.window.showErrorMessage(o.message,a)===a&&ai.env.openExternal(ai.Uri.parse(o.helpLink))}else await ai.window.showErrorMessage(o.message)}}),ai.workspace.onDidChangeWorkspaceFolders(()=>{i==null||i.then(o=>o.refreshVariables())}),$e(ai.commands,"extension.js-debug.autoAttachToProcess",async o=>{try{(await s()).spawnForChild(o)}catch(a){console.error(a),ai.window.showErrorMessage(`Error activating auto attach: ${a.stack||a}`)}}),$e(ai.commands,"extension.js-debug.clearAutoAttachVariables",async()=>{hl.clearVariables(t);let o=await i;o&&(o.terminate(),i=void 0)}))}var bz=S(Se()),wz=require("url"),$r=S(require("vscode"));var fA=S(require("vscode"));var th=class{constructor(){this.tunnels=new Map;this.disposable=new Le;this.disposable.push(fA.debug.onDidTerminateDebugSession(e=>this.destroySession(e.id)))}dispose(){return this.disposable.dispose()}destroySession(e){let r=this.tunnels.get(e);r&&(r.dispose(),this.tunnels.delete(e))}async request(e,r){var s;let i=this.tunnels.get(e);i||(i=await fA.workspace.openTunnel({remoteAddress:{port:r.remotePort,host:"localhost"},localAddressPort:(s=r.localPort)!=null?s:r.remotePort,label:r.label}),this.tunnels.set(e,i));let n;if(typeof i.localAddress=="string"){let[o,a]=i.localAddress.split(":");n={host:o,port:Number(a)}}else n=i.localAddress;return{remoteAddress:i.remoteAddress,localAddress:n}}};var zwe=t=>e=>typeof e.localAddress=="string"?e.localAddress.endsWith(`:${t}`):e.localAddress.port===t,Xwe=async t=>{let e=t.params.url;if(!e)return;let r;try{r=new wz.URL(e)}catch(s){return}if(!$t($r.workspace,"debug.javascript.automaticallyTunnelRemoteServer"))return;let i=Number(r.port)||80;if(!(await $r.workspace.tunnels).some(zwe(i)))try{await $r.workspace.openTunnel({remoteAddress:{port:i,host:"localhost"},localAddressPort:i})}catch(s){}},Jwe=async(t,e,r)=>{if($r.env.uiKind===$r.UIKind.Web)return $r.debug.stopDebugging(t),$r.window.showErrorMessage(bz.t("We can't launch a browser in debug mode from here. Open this workspace in VS Code on your desktop to enable debugging."));try{let[,i]=await Promise.all([Xwe(r),e.request(t.id,{remotePort:r.serverPort,label:"Browser Debug Tunnel"}).catch(()=>{})]);await $r.commands.executeCommand("js-debug-companion.launchAndAttach",{proxyUri:i?`127.0.0.1:${i.localAddress.port}`:`127.0.0.1:${r.serverPort}`,...r})}catch(i){$r.window.showErrorMessage(`Error launching browser: ${i.message||i.stack}`)}},Ywe=async(t,e,{launchId:r})=>{await $r.commands.executeCommand("js-debug-companion.kill",{launchId:r}),e.destroySession(t.id)};function _z(t){let e=new th;t.subscriptions.push(e,$r.debug.onDidReceiveDebugSessionCustomEvent(async r=>{switch(r.event){case"launchBrowserInCompanion":return Jwe(r.session,e,r.body);case"killCompanionBrowser":return Ywe(r.session,e,r.body);default:}}))}var oa=S(require("vscode"));var dA=class{constructor(e,r){this.id=e.id,this.enabled=r,this.label=`${e.group}: ${e.title}`,this.treeItem=new oa.TreeItem(this.label),this.treeItem.id=e.id}static compare(e,r){return e.label.localeCompare(r.label)}},JT=class{constructor(e){this._onDidChangeTreeData=new X;this.onDidChangeTreeData=this._onDidChangeTreeData.event;this.breakpoints=[];for(let r of Im().values())this.breakpoints.push(new dA(r,!1));this._debugSessionTracker=e,e.onSessionAdded(r=>{it.isConcreteSession(r)&&r.customRequest("enableCustomBreakpoints",{ids:this.breakpoints.filter(i=>i.enabled).map(i=>i.id)})})}getTreeItem(e){return e.treeItem}async getChildren(e){return e?[]:this.breakpoints.filter(r=>r.enabled).sort(dA.compare)}async getParent(){}addBreakpoints(e){for(let i of e)i.enabled=!0;let r=e.map(i=>i.id);for(let i of this._debugSessionTracker.getConcreteSessions())i.customRequest("enableCustomBreakpoints",{ids:r});this._onDidChangeTreeData.fire(void 0)}removeBreakpoints(e){let r=new Set(e);for(let i of this.breakpoints)r.has(i.id)&&(i.enabled=!1);for(let i of this._debugSessionTracker.getConcreteSessions())i.customRequest("disableCustomBreakpoints",{ids:e});this._onDidChangeTreeData.fire(void 0)}};function Az(t,e){let r=new JT(e);oa.window.createTreeView("jsBrowserBreakpoints",{treeDataProvider:r}),t.subscriptions.push(oa.commands.registerCommand("extension.js-debug.addCustomBreakpoints",()=>{let i=oa.window.createQuickPick(),n=r.breakpoints.filter(s=>!s.enabled);i.items=n,i.onDidAccept(()=>{r.addBreakpoints(i.selectedItems),i.dispose()}),i.show()})),t.subscriptions.push(oa.commands.registerCommand("extension.js-debug.removeAllCustomBreakpoints",()=>{r.removeBreakpoints(r.breakpoints.filter(i=>i.enabled).map(i=>i.id))})),t.subscriptions.push(oa.commands.registerCommand("extension.js-debug.removeCustomBreakpoint",i=>{r.removeBreakpoints([i.id])}))}var YT=S(require("vscode"));var Iz=(t,e)=>{let r=e.get(Ou);t.subscriptions.push($e(YT.commands,"extension.js-debug.startProfile",i=>r.start(typeof i=="string"?{sessionId:i}:i!=null?i:{})),$e(YT.commands,"extension.js-debug.stopProfile",i=>r.stop(i)))};var Ez=S(require("vscode"));var Sz=(t,e)=>{let r=new th;t.subscriptions.push(r,$e(Ez.commands,"extension.js-debug.requestCDPProxy",async(i,n)=>{let s=e.getById(i);if(!s)return;let o=await s.customRequest("requestCDPProxy");if(!n)return o;try{let a=await r.request(i,{label:"Edge Devtools Tunnel",remotePort:o.port});return{host:a.localAddress.host,port:a.localAddress.port,path:o.path}}catch(a){return o}}))};var Cz=S(require("vscode"));var xz=(t,e)=>{t.subscriptions.push($e(Cz.commands,"extension.js-debug.revealPage",async r=>{let i=e.getById(r);await(i==null?void 0:i.customRequest("revealPage"))}))};var mH=S(require("vscode")),Dz=require("url");async function Pz(t){if(!t){let e=mH.window.activeTextEditor;if(!e)return;t=e&&e.document.fileName}if(t&&mH.debug.activeDebugSession){let e;typeof t=="string"?ki(t)?e={resource:(0,Dz.fileURLToPath)(t)}:e={resource:t}:e={sourceReference:t},await mH.debug.activeDebugSession.customRequest("toggleSkipFileStatus",e)}}var ih=S(require("vscode"));var jz=require("fs"),qz=S(require("net"));var Lz=`\r
\r
`,Qwe=0,gH=class{constructor(e,r,i){this.inputStream=e;this.outputStream=r;this._contentLength=-1;this._connectionId=Qwe++;this.msgEmitter=new X;this.messageReceived=this.msgEmitter.event;this.endedEmitter=new X;this.closed=this.endedEmitter.event;this._handleData=e=>{var i;let r=new ti;for(this._rawData=Buffer.concat([this._rawData,e]);;){if(this._contentLength>=0){if(this._rawData.length>=this._contentLength){let n=this._rawData.toString("utf8",0,this._contentLength);if(this._rawData=this._rawData.slice(this._contentLength),this._contentLength=-1,n.length>0)try{let s=JSON.parse(n);(i=this.logger)==null||i.verbose("dap.receive",void 0,{connectionId:this._connectionId,message:s}),this.msgEmitter.fire({message:s,receivedTime:r})}catch(s){console.error("Error handling data: "+(s&&s.message))}continue}}else{let n=this._rawData.indexOf(Lz);if(n!==-1){let o=this._rawData.toString("utf8",0,n).split(`\r
`);for(let a=0;a<o.length;a++){let u=o[a].split(/: +/);u[0]==="Content-Length"&&(this._contentLength=+u[1])}this._rawData=this._rawData.slice(n+Lz.length);continue}}break}};this.logger=i,this._rawData=Buffer.alloc(0),e.on("end",()=>this.endedEmitter.fire()),e.on("data",this._handleData)}send(e,r=!0,i){var o,a;let n=JSON.stringify(e);if(r){let u=e;e.type==="response"&&e.command==="source"&&(u={...e,body:{...e.body,content:"<script source>"}}),(o=this.logger)==null||o.verbose("dap.send",void 0,{connectionId:this._connectionId,message:u})}let s=`Content-Length: ${Buffer.byteLength(n,"utf8")}\r
\r
${n}`;if(this.outputStream.destroyed){(a=this.logger)==null||a.warn("dap.send","Message not sent. Connection was closed."),i==null||i();return}this.outputStream.write(s,"utf8",u=>{var c;i==null||i(),u&&(console.log(e),(c=this.logger)==null||c.error("dap.send","Error while writing to output stream",u),this.close())})}close(){this.inputStream.destroy(),this.outputStream.destroy()}setLogger(e){return this.logger=e,this}};var Uz=S(Se()),HA=S(require("os"));var Zwe={connect:async()=>_p},$z=t=>({async connect(e){return await e.Debugger.setAsyncCallStackDepth({maxDepth:t}),_p}}),e_e=t=>{let e=new X,r=!1,i=()=>{r||(r=!0,e.fire())};return{async connect(n){if(r)return await n.Debugger.setAsyncCallStackDepth({maxDepth:t}),_p;let s=new Le;return s.push(e.event(()=>{s.dispose(),n.Debugger.setAsyncCallStackDepth({maxDepth:t})}),n.Debugger.on("breakpointResolved",i),n.Debugger.on("paused",o=>{o.reason!=="instrumentation"&&i()})),s}}},Tz=$z(32),kz=t=>t===!1?Zwe:t===!0?Tz:"onAttach"in t?$z(t.onAttach):"onceBreakpointResolved"in t?e_e(t.onceBreakpointResolved):Tz;var xn=S(Se());var ml=class{constructor(e,r,i,n){this.asyncStackPolicy=r;this.launchConfig=i;this._services=n;this._disposables=new Le;this._customBreakpoints=new Set;this._threadDeferred=Je();this.breakpointIdCounter=AH();this._cdpProxyProvider=this._services.get(nb);this._configurationDoneDeferred=Je(),this.sourceContainer=n.get(fr),this.breakpointManager=n.get(pn);let s=n.get(Lb),o=n.get(jt);o.onFlush(()=>{o.report("breakpointStats",this.breakpointManager.statisticsForTelemetry()),o.report("statistics",this.sourceContainer.statistics())}),this.dap=e,this.dap.on("initialize",a=>this._onInitialize(a)),this.dap.on("setBreakpoints",a=>this._onSetBreakpoints(a)),this.dap.on("setExceptionBreakpoints",a=>this.setExceptionBreakpoints(a)),this.dap.on("configurationDone",()=>this.configurationDone()),this.dap.on("loadedSources",()=>this._onLoadedSources()),this.dap.on("disableSourcemap",a=>this._onDisableSourcemap(a)),this.dap.on("source",a=>this._onSource(a)),this.dap.on("threads",()=>this._onThreads()),this.dap.on("stackTrace",a=>this._withThread(u=>u.stackTrace(a))),this.dap.on("variables",a=>this._onVariables(a)),this.dap.on("readMemory",a=>this._onReadMemory(a)),this.dap.on("writeMemory",a=>this._onWriteMemory(a)),this.dap.on("setVariable",a=>this._onSetVariable(a)),this.dap.on("setExpression",a=>this._onSetExpression(a)),this.dap.on("continue",()=>this._withThread(a=>a.resume())),this.dap.on("pause",()=>this._withThread(a=>a.pause())),this.dap.on("next",()=>this._withThread(a=>a.stepOver())),this.dap.on("stepIn",a=>this._withThread(u=>u.stepInto(a.targetId))),this.dap.on("stepOut",()=>this._withThread(a=>a.stepOut())),this.dap.on("restartFrame",a=>this._withThread(u=>u.restartFrame(a))),this.dap.on("scopes",a=>this._withThread(u=>u.scopes(a))),this.dap.on("evaluate",a=>this.onEvaluate(a)),this.dap.on("completions",a=>this._withThread(u=>u.completions(a))),this.dap.on("exceptionInfo",()=>this._withThread(a=>a.exceptionInfo())),this.dap.on("enableCustomBreakpoints",a=>this.enableCustomBreakpoints(a)),this.dap.on("toggleSkipFileStatus",a=>this._toggleSkipFileStatus(a)),this.dap.on("disableCustomBreakpoints",a=>this._disableCustomBreakpoints(a)),this.dap.on("prettyPrintSource",a=>this._prettyPrintSource(a)),this.dap.on("revealPage",()=>this._withThread(a=>a.revealPage())),this.dap.on("getPerformance",()=>this._withThread(a=>s.retrieve(a.cdp()))),this.dap.on("breakpointLocations",a=>this._breakpointLocations(a)),this.dap.on("createDiagnostics",a=>this._dumpDiagnostics(a)),this.dap.on("requestCDPProxy",()=>this._requestCDPProxy()),this.dap.on("setExcludedCallers",a=>this._onSetExcludedCallers(a)),this.dap.on("saveDiagnosticLogs",({toFile:a})=>this._saveDiagnosticLogs(a)),this.dap.on("setSourceMapStepping",a=>this._setSourceMapStepping(a)),this.dap.on("stepInTargets",a=>this._stepInTargets(a)),this.dap.on("setDebuggerProperty",a=>this._setDebuggerProperty(a)),this.dap.on("setSymbolOptions",a=>this._setSymbolOptions(a))}_setDebuggerProperty(e){var r;return(r=this._thread)==null||r.cdp().DotnetDebugger.setDebuggerProperty(e),Promise.resolve({})}_setSymbolOptions(e){var r;return(r=this._thread)==null||r.cdp().DotnetDebugger.setSymbolOptions(e),Promise.resolve({})}_breakpointLocations(e){return this._withThread(async r=>{let i=this.sourceContainer.source(e.source);return i?{breakpoints:(await this.breakpointManager.getBreakpointLocations(r,i,new Ri(e.line,e.column||1),new Ri(e.endLine||e.line+1,e.endColumn||e.column||1))).map(s=>s.uiLocations.find(o=>o.source===i)).filter(kt).map(s=>({line:s.lineNumber,column:s.columnNumber}))}:{breakpoints:[]}})}_stepInTargets(e){return this._withThread(async r=>({targets:await r.getStepInTargets(e.frameId)}))}_setSourceMapStepping({enabled:e}){return this.sourceContainer.doSourceMappedStepping=e,Promise.resolve({})}async _saveDiagnosticLogs(e){let r=this._services.get(fe).getRecentLogs();return await this._services.get(Ie).writeFile(e,r.map(i=>JSON.stringify(i)).join(`
`)),{}}async launchBlocker(){await this._configurationDoneDeferred.promise,await this._services.get(qp).launchBlocker,await this.breakpointManager.launchBlocker()}async _onSetExcludedCallers({callers:e}){return(await this._threadDeferred.promise).setExcludedCallers(e),{}}async _onInitialize(e){console.assert(e.linesStartAt1),console.assert(e.columnsStartAt1);let r=ml.capabilities(!0);return setTimeout(()=>this.dap.initialized({}),0),setTimeout(()=>{var i;return(i=this._thread)==null?void 0:i.dapInitialized()},0),r}static capabilities(e=!1){return{supportsConfigurationDoneRequest:!0,supportsFunctionBreakpoints:!1,supportsConditionalBreakpoints:!0,supportsHitConditionalBreakpoints:!0,supportsEvaluateForHovers:!0,supportsReadMemoryRequest:!0,supportsWriteMemoryRequest:!0,exceptionBreakpointFilters:[{filter:"all",label:xn.t("Caught Exceptions"),default:!1,supportsCondition:!0,description:xn.t("Breaks on all throw errors, even if they're caught later."),conditionDescription:'error.name == "MyError"'},{filter:"uncaught",label:xn.t("Uncaught Exceptions"),default:!1,supportsCondition:!0,description:xn.t("Breaks only on errors or promise rejections that are not handled."),conditionDescription:'error.name == "MyError"'}],supportsStepBack:!1,supportsSetVariable:!0,supportsRestartFrame:!0,supportsGotoTargetsRequest:!1,supportsStepInTargetsRequest:!0,supportsCompletionsRequest:!0,supportsModulesRequest:!1,additionalModuleColumns:[],supportedChecksumAlgorithms:[],supportsRestartRequest:!0,supportsExceptionOptions:!1,supportsValueFormattingOptions:!0,supportsExceptionInfoRequest:!0,supportTerminateDebuggee:!1,supportsDelayedStackTraceLoading:!0,supportsLoadedSourcesRequest:!0,supportsLogPoints:!0,supportsTerminateThreadsRequest:!1,supportsSetExpression:!0,supportsTerminateRequest:!1,completionTriggerCharacters:[".","[",'"',"'"],supportsBreakpointLocationsRequest:!0,supportsClipboardContext:!0,supportsExceptionFilterOptions:!0,supportsEvaluationOptions:!!e,supportsDebuggerProperties:!!e,supportsSetSymbolOptions:!!e}}async _onSetBreakpoints(e){var r,i;return this.breakpointManager.setBreakpoints(e,(i=(r=e.breakpoints)==null?void 0:r.map(()=>this.breakpointIdCounter()))!=null?i:[])}async setExceptionBreakpoints(e){return await this._services.get(qp).setBreakpoints(e),{}}async configurationDone(){return this._configurationDoneDeferred.resolve(),{}}async _onLoadedSources(){return{sources:await this.sourceContainer.loadedSources()}}async _onDisableSourcemap(e){var i;let r=this.sourceContainer.source(e.source);if(!r)return ot(xn.t("Source not found"));if(!(r instanceof rr))return ot(xn.t("Source not a source map"));for(let n of r.compiledToSourceUrl.keys())this.sourceContainer.disableSourceMapForSource(n,!0);return await((i=this._thread)==null?void 0:i.refreshStackTrace()),{}}async _onSource(e){e.source||(e.source={sourceReference:e.sourceReference}),e.source.path=Nn(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return ot(xn.t("Source not found"));let i=await r.content();return i===void 0?(r instanceof rr&&this.dap.suggestDisableSourcemap({source:e.source}),ot(xn.t("Unable to retrieve source content"))):{content:i,mimeType:r.getSuggestedMimeType}}async _onThreads(){let e=[];return this._thread&&e.push({id:this._thread.id,name:this._thread.name()}),{threads:e}}findVariableStore(e){if(!this._thread)return;let r=this._thread.pausedVariables();if(r&&e(r))return r;if(e(this._thread.replVariables))return this._thread.replVariables}async _onVariables(e){var i;let r=this.findVariableStore(n=>n.hasVariable(e.variablesReference));return{variables:(i=await(r==null?void 0:r.getVariables(e)))!=null?i:[]}}async _onReadMemory(e){var n,s;let r=e.memoryReference,i=await((s=this.findVariableStore(o=>o.hasMemory(r)))==null?void 0:s.readMemory(r,(n=e.offset)!=null?n:0,e.count));return i?{address:"0",data:i.toString("base64"),unreadableBytes:e.count-i.length}:{address:"0",unreadableBytes:e.count}}async _onWriteMemory(e){var n,s;let r=e.memoryReference;return{bytesWritten:await((s=this.findVariableStore(o=>o.hasMemory(r)))==null?void 0:s.writeMemory(r,(n=e.offset)!=null?n:0,Buffer.from(e.data,"base64")))}}async _onSetExpression(e){if(!this._thread)throw new ne(HE());let r=await this._thread.evaluate({expression:`${e.expression} = ${Wh(e.value)}`,context:"repl",frameId:e.frameId});return{value:r.result,variablesReference:r.variablesReference,indexedVariables:r.indexedVariables,namedVariables:r.namedVariables,presentationHint:r.presentationHint,type:r.type}}async _onSetVariable(e){let r=this.findVariableStore(i=>i.hasVariable(e.variablesReference));return r?(e.value=Wh(e.value.trim()),r.setVariable(e)):ot(xn.t("Variable not found"))}_withThread(e){if(!this._thread)throw new ne(HE());return e(this._thread)}async _refreshStackTrace(){if(!this._thread)return;this._thread.pausedDetails()&&await this._thread.refreshStackTrace()}createThread(e,r){this._thread=new Wa(this.sourceContainer,e,this.dap,r,this._services.get(Ta),this._services.get(fe),this._services.get(un),this._services.get(sb),this.launchConfig,this.breakpointManager,this._services.get(Eb),this._services.get(qp),this._services.get(Va),this._services.get(Ka));let i=this._services.get(Ob);i.connect(this.dap,this._thread),"profileStartup"in this.launchConfig&&this.launchConfig.profileStartup&&i.start(this.dap,this._thread,{type:gr.type});for(let n of this._customBreakpoints)this._thread.updateCustomBreakpoint(n,!0);return this.asyncStackPolicy.connect(e).then(n=>this._disposables.push(n)).catch(n=>this._services.get(fe).error("internal","Error enabling async stacks",n)),this.breakpointManager.setThread(this._thread),this._services.get(St).attach(e),this._threadDeferred.resolve(this._thread),this._thread}async enableCustomBreakpoints(e){let r=[];for(let i of e.ids)this._customBreakpoints.add(i),this._thread&&r.push(this._thread.updateCustomBreakpoint(i,!0));return await Promise.all(r),{}}async _disableCustomBreakpoints(e){let r=[];for(let i of e.ids)this._customBreakpoints.delete(i),this._thread&&r.push(this._thread.updateCustomBreakpoint(i,!1));return await Promise.all(r),{}}async _toggleSkipFileStatus(e){return await this._services.get(Da).toggleSkippingFile(e),await this._refreshStackTrace(),{}}async _prettyPrintSource(e){if(!e.source)return{canPrettyPrint:!1};e.source.path=Nn(e.source.path);let r=this.sourceContainer.source(e.source);if(!r)return ot(xn.t("Source not found"));let i=await r.prettyPrint();if(!i)return ot(xn.t("Unable to pretty print"));let{map:n,source:s}=i;return this.breakpointManager.moveBreakpoints(r,n,s),this.sourceContainer.clearDisabledSourceMaps(r),await this._refreshStackTrace(),{}}onEvaluate(e){return e.expression===".scripts"?this._dumpDiagnostics({fromSuggestion:!1}).then(this.dap.openDiagnosticTool).then(()=>({result:"Opening diagnostic tool...",variablesReference:0})):this._withThread(r=>r.evaluate(e))}async _dumpDiagnostics(e){let r={file:await this._services.get(Xa).generateHtml()};return e.fromSuggestion&&this._services.get(jt).report("diagnosticPrompt",{event:"opened"}),r}async _requestCDPProxy(){return await this._cdpProxyProvider.proxy()}dispose(){this._disposables.dispose(),Tv(this._services)}};var Rz=require("inspector"),Mz=require("fs"),hA=class{constructor(e){this.file=e;this.session=new Rz.Session;this.session.connect()}async start(){try{await this.post("Profiler.enable")}catch(e){}await this.post("Profiler.start")}async stop(){let{profile:e}=await this.post("Profiler.stop");await Mz.promises.writeFile(this.file,JSON.stringify(e))}dispose(){this.session.disconnect()}post(e,r){return new Promise((i,n)=>this.session.post(e,r,(s,o)=>{s?n(s):i(o)}))}};var mA=S(require("path"));function Nz(t,e,r){let i=Oz(t,e,"uncaughtException",r),n=Oz(t,e,"unhandledRejection",r);return process.addListener("uncaughtException",i),process.addListener("unhandledRejection",n),{dispose:()=>{process.removeListener("uncaughtException",i),process.removeListener("unhandledRejection",n)}}}var Oz=(t,e,r,i=!0)=>n=>{i_e(n)&&(e.report("error",{"!error":n,error:i?void 0:n,exceptionType:r}),t.error("runtime.exception","Unhandled error in debug adapter",n))},t_e=t=>typeof t=="object"&&!!t&&"stack"in t,r_e=mA.dirname(mA.dirname(mA.dirname(__dirname)));function i_e(t){var e;return!Fz||t_e(t)&&!!((e=t.stack)!=null&&e.includes(r_e))}var Fz=!1;function Bz(){Fz=!0}var gA=class{constructor(e,r,i,n){this._rootServices=i;this._threads=new Map;this._terminationCount=0;this._onTargetListChangedEmitter=new X;this.onTargetListChanged=this._onTargetListChangedEmitter.event;this._serviceTree=new WeakMap;this._delegate=e,this._dap=r.dap(),this._targetOrigin=n,this._disposables=[this._onTargetListChangedEmitter,Nz(i.get(fe),i.get(jt),i.get(up))],r.attachTelemetry(i.get(jt)),this._dap.then(s=>{let o=0,a;s.on("initialize",async u=>{this._rootServices.bind(gi).toConstantValue(u);let c=ml.capabilities();return u.clientID==="vscode"&&Bz(),setTimeout(()=>{s.initialized({})},0),c}),s.on("setExceptionBreakpoints",async()=>({})),s.on("setBreakpoints",async u=>{var c,l,p;return(c=u.breakpoints)!=null&&c.length&&i.get(St).notifyHadBreakpoint(),{breakpoints:(p=(l=u.breakpoints)==null?void 0:l.map(()=>({id:++o,verified:!1,message:Uz.t("Unbound breakpoint")})))!=null?p:[]}}),s.on("configurationDone",async()=>({})),s.on("threads",async()=>({threads:[]})),s.on("loadedSources",async()=>({sources:[]})),s.on("breakpointLocations",()=>Promise.resolve({breakpoints:[]})),s.on("attach",u=>this._boot(co(u,this._rootServices.get(Ts)),s)),s.on("launch",u=>this._boot(co(u,this._rootServices.get(Ts)),s)),s.on("pause",async()=>({})),s.on("terminate",async()=>(await this._disconnect(),{})),s.on("disconnect",async()=>(await this._disconnect(),{})),s.on("restart",async({arguments:u})=>(await this._restart(u),{})),s.on("startSelfProfile",async({file:u})=>(a==null||a.dispose(),a=new hA(u),await a.start(),{})),s.on("stopSelfProfile",async()=>(a&&(await a.stop(),a.dispose(),a=void 0),{}))})}getLaunchers(){if(!this._launchers){this._launchers=new Set(this._rootServices.getAll(Ar));for(let e of this._launchers)e.onTargetListChanged(()=>{let r=this.targetList();this._attachToNewTargets(r,e),this._detachOrphanThreads(r),this._onTargetListChangedEmitter.fire()},void 0,this._disposables)}return this._launchers}async _disconnect(){if(!this._launchers)return;this._rootServices.get(jt).flush(),await Promise.all([...this._launchers].map(r=>r.disconnect()));let e=()=>!this.targetList.length&&this._terminationCount===0;e()||(await new Promise(r=>this.onTargetListChanged(()=>{e()&&r()})),await Oe(0))}async _boot(e,r){n_e(r),this.reportBootTelemetry(e),pz(this._rootServices,e,r),this._rootServices.get(fe).setup(KR(r,e.trace));let i=e.timeout>0?dr.withTimeout(e.timeout):new dr;e.rootPath&&(e.rootPath=Nn(e.rootPath)),this._launchParams=e;try{await Promise.all([...this.getLaunchers()].map(n=>this._launch(n,e,i.token)))}catch(n){throw n}return{}}reportBootTelemetry(e){let r=co({type:e.type,request:e.request,name:"<string>",__workspaceFolder:"<workspace>"}),i=(n,s)=>typeof n=="string"?s&&r[s]===n?n:"<string>":n instanceof Array?n.map(o=>i(o)):n&&typeof n=="object"?ao(n,o=>i(o)):n;this._rootServices.get(jt).report("launch",{type:e.type,request:e.request,os:`${HA.platform()} ${HA.arch()}`,nodeVersion:process.version,adapterVersion:Vu,parameters:ao(e,i)})}async _restart(e){let r;if(e){let i=this._rootServices.get(Ym);r=co({__workspaceFolder:i.__workspaceFolder,...e},this._rootServices.get(Ts)),i.update(r)}await Promise.all([...this.getLaunchers()].map(i=>i.restart(r)))}async _launch(e,r,i){if(!(await this.captureLaunch(e,r,i)).blockSessionTermination)return;++this._terminationCount;let s=e.onTerminated(o=>{s.dispose();let a=this._detachOrphanThreads(this.targetList(),{restart:o.restart});--this._terminationCount,this._onTargetListChangedEmitter.fire(),this._terminationCount||a.then(()=>this._dap).then(u=>u.terminated({restart:o.restart}))});this._disposables.push(s)}async captureLaunch(e,r,i){let n=e.constructor.name,s;try{s=await e.launch(r,{telemetryReporter:this._rootServices.get(jt),cancellationToken:i,targetOrigin:this._targetOrigin,dap:await this._dap})}catch(o){throw this._rootServices.get(fe).warn("runtime.launch","Launch returned error",{error:o,wasCancelled:i.isCancellationRequested,name:n}),o}return s.blockSessionTermination&&this._rootServices.get(fe).info("runtime.launch","Launched successfully",{name:n}),s}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[],Tv(this._rootServices),this._detachOrphanThreads([])}targetList(){let e=[];for(let r of this.getLaunchers())e.push(...r.targetList());return e}async attach(e,r,i){if(!this._launchParams)throw new Error("Cannot launch before params have been set");if(!e.canAttach())return;let n=await e.attach();if(!n)return;let s=await this._delegate.acquireDap(e),o=await s.dap(),a=this._launchParams;this._asyncStackPolicy||(this._asyncStackPolicy=kz(a.showAsyncStacks));let u=e.parent(),c=u&&this._serviceTree.get(u)||this._rootServices,l=uz(c,e,o,n);s.attachTelemetry(l.get(jt)),this._serviceTree.set(e,c);let p=new ml(o,this._asyncStackPolicy,a,l),f=p.createThread(n,e),h=async()=>(await p.launchBlocker(),e.runIfWaitingForDebugger(),r.resolve({thread:f,debugAdapter:p}),{});await this._delegate.initAdapter(p,e,i)?h():(o.on("attach",h),o.on("launch",h),o.on("disconnect",()=>this.detachTarget(e,l)),o.on("terminate",()=>this.stopTarget(e,l)),o.on("restart",async()=>(e.canRestart()?e.restart():await this._restart(),{}))),await e.afterBind()}async detachTarget(e,r){return r.get(jt).flush(),this.targetList().includes(e)?(e.canDetach()?(await e.detach(),this._releaseTarget(e)):this._disconnect(),{}):{}}stopTarget(e,r){return r.get(jt).flush(),this.targetList().includes(e)?(e.canStop()?e.stop():this._disconnect(),Promise.resolve({})):Promise.resolve({})}_attachToNewTargets(e,r){for(let i of e.values())if(i.waitingForDebugger()&&!this._threads.has(i)){let n=Je();this._threads.set(i,n),this.attach(i,n,r)}}async _detachOrphanThreads(e,r){await Promise.all([...this._threads.keys()].filter(i=>!e.includes(i)).map(i=>this._releaseTarget(i,r)))}async _releaseTarget(e,r={}){let i=this._threads.get(e);if(!i)return;this._threads.delete(e);let n=await i.promise;await n.thread.dispose(),n.debugAdapter.dap.terminated(r),n.debugAdapter.dispose(),this._delegate.releaseDap(e)}};function n_e(t){PH&&t.output({category:"console",output:`Note: Using the "preview" debug extension
`})}var yA=class{constructor(e,r,i,n,s){this.debugSession=e;this.logger=i;this.sessionStates=n;this.parent=s;this.subscriptions=new Le;r.setLogger(i),this.connection=new $h(r,this.logger)}listenToTarget(e){this.subscriptions.push(e.onNameChanged(()=>this.setName(e)),this.sessionStates.onAdd(([r])=>r===this.debugSession.id&&this.setName(e)),this.sessionStates.onRemove(([r])=>r===this.debugSession.id&&this.setName(e))),this.setName(e)}dispose(){this.subscriptions.dispose()}setName(e){let r=this.sessionStates.get(this.debugSession.id),i=e.name();this.parent instanceof rh&&(i=`${this.parent.debugSession.name}: ${i}`),this.debugSession.name=r?`${i} (${r})`:i}},rh=class extends yA{constructor(r,i,n){super(r,i,n.get(fe),n.get(cp));this.debugSession=r;this.services=n;this.connection.attachTelemetry(n.get(jt))}createBinder(r){this._binder=new gA(r,this.connection,this.services,new Rw(this.debugSession.id))}dispose(){var r,i;super.dispose(),(i=(r=this._binder)==null?void 0:r.dispose)==null||i.call(r)}},vA=class{constructor(e,r){this.globalContainer=e;this.sessionLauncher=r;this._disposables=[];this._sessions=new Map;this._pendingTarget=new Map;this._sessionForTarget=new Map;this._sessionForTargetCallbacks=new Map}terminate(e){let r=this._sessions.get(e.id);this._sessions.delete(e.id),r&&r.dispose()}createNewRootSession(e,r){let i=new rh(e,r,cz(this.globalContainer));return i.createBinder(this),this._sessions.set(e.id,i),i}createNewChildSession(e,r,i){var c;let n=this._pendingTarget.get(r);if(!n)throw new Error(`Cannot find target ${r}`);let{target:s,parent:o}=n,a=new yA(e,i,o.logger,o.sessionStates,o);this._pendingTarget.delete(r),a.debugSession.name=s.name(),a.listenToTarget(s);let u=this._sessionForTargetCallbacks.get(s);return this._sessionForTargetCallbacks.delete(s),(c=u==null?void 0:u.fulfill)==null||c.call(u,a),this._sessions.set(e.id,a),a}async acquireDap(e){return(await this.getOrLaunchSession(e)).connection}getOrLaunchSession(e){let r=this._sessionForTarget.get(e);if(r)return r;let i=new Promise(async(n,s)=>{var l,p;let o,a=e.parent();if(a?o=await this.getOrLaunchSession(a):o=this._sessions.get(e.targetOrigin().id),!o)throw new Error("Expected to get a parent debug session for target");this._pendingTarget.set(e.id(),{target:e,parent:o}),this._sessionForTargetCallbacks.set(e,{fulfill:n,reject:s});let u=o.debugSession.configuration,c={type:u.type==="pwa-extensionHost"?"pwa-chrome":u.type,name:e.name(),request:o.debugSession.configuration.request,__pendingTargetId:e.id(),preRestartTask:(l=u.preRestartTask)!=null?l:u.postDebugTask,postRestartTask:(p=u.postRestartTask)!=null?p:u.preLaunchTask};this.sessionLauncher.launch(o,e,c)});return this._sessionForTarget.set(e,i),i}initAdapter(){return Promise.resolve(!1)}releaseDap(e){this._sessionForTarget.delete(e);let r=this._sessionForTargetCallbacks.get(e);r&&r.reject(new Error("Target gone")),this._sessionForTargetCallbacks.delete(e)}dispose(){for(let e of this._sessions.values())e.dispose();this._sessions.clear(),this._pendingTarget.clear(),this._sessionForTarget.clear(),this._sessionForTargetCallbacks.clear();for(let e of this._disposables)e.dispose();this._disposables=[]}};var bA=class{constructor(e,r,i="127.0.0.1"){this.host=i;this.disposables=[];this.servers=new Map;this.sessionManager=new vA(e,r),this.portLeaseTracker=e.get(gt),this.disposables.push(this.sessionManager)}createDebugServer(e,r){return e.configuration.__pendingTargetId?this.createChildDebugServer(e):this.createRootDebugServer(e,r)}createRootDebugServer(e,r){return this.innerCreateServer(e,i=>this.sessionManager.createNewRootSession(e,i),r)}createRootDebugSessionFromStreams(e,r,i){let n=new gH(r,i);return this.sessionManager.createNewRootSession(e,n)}createChildDebugServer(e,r){return this.innerCreateServer(e,i=>this.sessionManager.createNewChildSession(e,e.configuration.__pendingTargetId,i),r)}async innerCreateServer(e,r,i){let n=Je(),s=a=>{let u=new gH(a,a),c=r(u);n.resolve(c.connection)},o=i===void 0?await new Promise((a,u)=>{let c=Dy(),l=qz.createServer(s).on("error",u).on("close",()=>jz.promises.unlink(c).catch(()=>{})).listen(c,()=>a(l))}):await h2(this.portLeaseTracker,s,i,this.host);return this.servers.set(e.id,o),{server:o,connectionPromise:n.promise}}terminate(e){var r;this.sessionManager.terminate(e),(r=this.servers.get(e.id))==null||r.close(),this.servers.delete(e.id)}dispose(){this.sessionManager.dispose()}};var QT=class{launch(e,r,i){ih.debug.startDebugging(e.debugSession.workspaceFolder,{...i,...r.supplementalConfig,serverReadyAction:e.debugSession.configuration.serverReadyAction,__parentId:e.debugSession.id},{parentSession:e.debugSession,consoleMode:ih.DebugConsoleMode.MergeWithParent,noDebug:e.debugSession.configuration.noDebug,compact:e instanceof rh,lifecycleManagedByParent:!r.independentLifeycle})}},wA=class{constructor(e){this.sessionServerManager=new bA(e,new QT)}async createDebugAdapterDescriptor(e){let r=await this.sessionServerManager.createDebugServer(e);return new ih.DebugAdapterNamedPipeServer(r.server.address())}terminate(e){this.sessionServerManager.terminate(e)}dispose(){this.sessionServerManager.dispose()}};function s_e(t){var o;er.l10n.bundle&&Wz.config({contents:er.l10n.bundle});let e=lz({storagePath:process.platform==="win32"?(0,Vz.tmpdir)():t.storagePath||t.extensionPath,isVsCode:!0,isRemote:!!process.env.JS_DEBUG_USE_COMPANION||((o=er.extensions.getExtension(m$))==null?void 0:o.extensionKind)===er.ExtensionKind.Workspace,context:t});t.subscriptions.push($e(er.commands,"extension.js-debug.npmScript",wK),$e(er.commands,"extension.js-debug.pickNodeProcess",HT),$e(er.commands,"extension.pwa-node-debug.attachNodeProcess",aK),$e(er.commands,"extension.js-debug.toggleSkippingFile",Pz));let r=e.getAll(I_);for(let a of r){let u=a;t.subscriptions.push(er.debug.registerDebugConfigurationProvider(a.type,u));let c=oh.get(a.type);c&&t.subscriptions.push(er.debug.registerDebugConfigurationProvider(c,u))}let i=e.getAll(E_);for(let a of i)er.debug.registerDebugConfigurationProvider(a.type,a,er.DebugConfigurationProviderTriggerKind!==void 0?a.triggerKind:void 0);let n=new wA(e);t.subscriptions.push(...[...EA].map(a=>er.debug.registerDebugAdapterDescriptorFactory(a,n))),t.subscriptions.push(er.debug.onDidTerminateDebugSession(a=>n.terminate(a))),t.subscriptions.push(n);let s=e.get(it);s.attach(),_z(t),Az(t,s),Hz(t,e.get(Zs),e.get(Uu),e),Iz(t,e),vz(t,e.get(Zs),e),xz(t,s),Sz(t,s),e.getAll(Hi).forEach(a=>a.register(t))}function o_e(){}0&&(module.exports={activate,deactivate});
/*! Bundled license information:

is-number/index.js:
  (*!
   * is-number <https://github.com/jonschlinkert/is-number>
   *
   * Copyright (c) 2014-present, Jon Schlinkert.
   * Released under the MIT License.
   *)

to-regex-range/index.js:
  (*!
   * to-regex-range <https://github.com/micromatch/to-regex-range>
   *
   * Copyright (c) 2015-present, Jon Schlinkert.
   * Released under the MIT License.
   *)

fill-range/index.js:
  (*!
   * fill-range <https://github.com/jonschlinkert/fill-range>
   *
   * Copyright (c) 2014-present, Jon Schlinkert.
   * Licensed under the MIT License.
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

is-extglob/index.js:
  (*!
   * is-extglob <https://github.com/jonschlinkert/is-extglob>
   *
   * Copyright (c) 2014-2016, Jon Schlinkert.
   * Licensed under the MIT License.
   *)

is-glob/index.js:
  (*!
   * is-glob <https://github.com/jonschlinkert/is-glob>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)

is-windows/index.js:
  (*!
   * is-windows <https://github.com/jonschlinkert/is-windows>
   *
   * Copyright © 2015-2018, Jon Schlinkert.
   * Released under the MIT License.
   *)

reflect-metadata/Reflect.js:
  (*! *****************************************************************************
  Copyright (C) Microsoft. All rights reserved.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of the
  License at http://www.apache.org/licenses/LICENSE-2.0
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** *)
*/
//# sourceMappingURL=extension.js.map
