code-server
Version:
Run VS Code on a remote server.
2 lines • 589 kB
JavaScript
/*! For license information please see serverWorkerMain.js.LICENSE.txt */
(()=>{var e={5747:(e,t,r)=>{"use strict";var n,o,i=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,d=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of c(t))l.call(e,o)||o===r||s(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e},f=(n={"node_modules/request-light/lib/node/main.js"(e){(()=>{var t={46:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:r}={}){return new Promise(((n,o)=>{function i(){null==r||r.removeEventListener("abort",i),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){i(),n(e)}function a(e){i(),o(e)}null==r||r.addEventListener("abort",i),e.on(t,s),e.on("error",a)}))}},54:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const o=r(361),i=n(r(374)),s=n(r(304)),a=i.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends o.EventEmitter{constructor(e,t){super();let r=t;"function"==typeof e?this.callback=e:e&&(r=e),this.timeout=null,r&&"number"==typeof r.timeout&&(this.timeout=r.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const r=Object.assign({},t);"boolean"!=typeof r.secureEndpoint&&(r.secureEndpoint=c()),null==r.host&&(r.host="localhost"),null==r.port&&(r.port=r.secureEndpoint?443:80),null==r.protocol&&(r.protocol=r.secureEndpoint?"https:":"http:"),r.host&&r.path&&delete r.path,delete r.agent,delete r.hostname,delete r._defaultAgent,delete r.defaultPort,delete r.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,o=null;const i=r.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,n=!0;const e=new Error(`A "socket" was not created for HTTP request before ${i}ms`);e.code="ETIMEOUT",u(e)},d=e=>{n||(null!==o&&(clearTimeout(o),o=null),u(e))},f=t=>{if(n)return;if(null!=o&&(clearTimeout(o),o=null),i=t,Boolean(i)&&"function"==typeof i.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,r);var i;if(t)return t.once("free",(()=>{this.freeSocket(t,r)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof i&&i>0&&(o=setTimeout(l,i)),"port"in r&&"number"!=typeof r.port&&(r.port=Number(r.port));try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,r)).then(f,d)}catch(e){Promise.reject(e).catch(d)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},304:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r){return new Promise(((n,o)=>{e.call(this,t,r,((e,t)=>{e?o(e):n(t)}))}))}}},370:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(r(808)),s=o(r(404)),a=o(r(310)),c=o(r(374)),u=o(r(46)),l=r(54),d=(0,c.default)("http-proxy-agent");class f extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const r=Object.assign({},t);var n;this.secureProxy=t.secureProxy||"string"==typeof(n=r.protocol)&&/^https:?$/i.test(n),r.host=r.hostname||r.host,"string"==typeof r.port&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,t){return n(this,void 0,void 0,(function*(){const{proxy:r,secureProxy:n}=this,o=a.default.parse(e.path);let c;if(o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),null==o.port&&(t.port,1)&&(o.port=String(t.port)),"80"===o.port&&(o.port=""),e.path=a.default.format(o),r.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),n?(d("Creating `tls.Socket`: %o",r),c=s.default.connect(r)):(d("Creating `net.Socket`: %o",r),c=i.default.connect(r)),e._header){let t,r;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],r=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(r),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,r=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(r),d("Output buffer: %o",e.outputData[0].data))}return yield(0,u.default)(c,"connect"),c}))}}t.default=f},201:function(e,t,r){const n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(370));function o(e){return new n.default(e)}var i;(i=o||(o={})).HttpProxyAgent=n.default,i.prototype=n.default.prototype,e.exports=o},146:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(r(808)),s=o(r(404)),a=o(r(310)),c=o(r(491)),u=o(r(374)),l=r(54),d=o(r(829)),f=u.default("https-proxy-agent:agent");class p extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",t),super(t);const r=Object.assign({},t);var n;this.secureProxy=t.secureProxy||"string"==typeof(n=r.protocol)&&/^https:?$/i.test(n),r.host=r.hostname||r.host,"string"==typeof r.port&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in r)&&(r.ALPNProtocols=["http 1.1"]),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,t){return n(this,void 0,void 0,(function*(){const{proxy:r,secureProxy:n}=this;let o;n?(f("Creating `tls.Socket`: %o",r),o=s.default.connect(r)):(f("Creating `net.Socket`: %o",r),o=i.default.connect(r));const a=Object.assign({},r.headers);let u=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;r.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:l,port:p,secureEndpoint:g}=t;var m,v;m=p,v=g,Boolean(!v&&80===m||v&&443===m)||(l+=`:${p}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const y=d.default(o);o.write(`${u}\r\n`);const{statusCode:b,buffered:D}=yield y;if(200===b){if(e.once("socket",h),t.secureEndpoint){f("Upgrading socket connection to TLS");const e=t.servername||t.host;return s.default.connect(Object.assign(Object.assign({},function(e,...t){const r={};let n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}(t,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const w=new i.default.Socket({writable:!1});return w.readable=!0,e.once("socket",(e=>{f("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(D),e.push(null)})),w}))}}function h(e){e.resume()}t.default=p},18:function(e,t,r){const n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(146));function o(e){return new n.default(e)}var i;(i=o||(o={})).HttpsProxyAgent=n.default,i.prototype=n.default.prototype,e.exports=o},829:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(374)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,r)=>{let n=0;const i=[];function s(){const r=e.read();r?function(e){i.push(e),n+=e.length;const r=Buffer.concat(i,n);if(-1===r.indexOf("\r\n\r\n"))return o("have not received end of HTTP headers yet..."),void s();const a=r.toString("ascii",0,r.indexOf("\r\n")),c=+a.split(" ")[1];o("got proxy server response: %o",a),t({statusCode:c,buffered:r})}(r):e.once("readable",s)}function a(e){o("onclose had error %o",e)}function c(){o("onend")}e.on("error",(function t(n){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),o("onerror %o",n),r(n)})),e.on("close",a),e.on("end",c),s()}))}},539:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorStatusDescription=t.xhr=t.configure=void 0;var s=r(685),a=r(687),c=r(310),u=r(472),l=r(796),d=r(201),f=r(18);if(process.env.VSCODE_NLS_CONFIG){var p=process.env.VSCODE_NLS_CONFIG;u.config(JSON.parse(p))}var h=u.loadMessageBundle(),g=void 0,m=!0;function v(e){var t;return new Promise((function(r,n){var o=(0,c.parse)(e.url),i={hostname:o.hostname,agent:!!e.agent&&e.agent,port:o.port?parseInt(o.port):"https:"===o.protocol?443:80,path:o.path,method:e.type||"GET",headers:e.headers,rejectUnauthorized:"boolean"!=typeof e.strictSSL||e.strictSSL};e.user&&e.password&&(i.auth=e.user+":"+e.password);var u=function(n){if(n.statusCode>=300&&n.statusCode<400&&e.followRedirects&&e.followRedirects>0&&n.headers.location){var i=n.headers.location;i.startsWith("/")&&(i=(0,c.format)({protocol:o.protocol,hostname:o.hostname,port:o.port,pathname:i})),r(v(function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach((function(t){return Object.keys(t).forEach((function(r){return e[r]=t[r]}))})),e}({},e,{url:i,followRedirects:e.followRedirects-1})))}else r({req:t,res:n})};(t="https:"===o.protocol?a.request(i,u):s.request(i,u)).on("error",n),e.timeout&&t.setTimeout(e.timeout),e.data&&t.write(e.data),t.end(),e.token&&(e.token.isCancellationRequested&&t.destroy(new y),e.token.onCancellationRequested((function(){t.destroy(new y)})))}))}t.configure=function(e,t){g=e,m=t},t.xhr=function(e){return"boolean"!=typeof(e=i({},e)).strictSSL&&(e.strictSSL=m),e.agent||(e.agent=function(e,t){void 0===t&&(t={});var r,n=(0,c.parse)(e),o=t.proxyUrl||("http:"===(r=n).protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===r.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null);if(!o)return null;var i=(0,c.parse)(o);if(!/^https?:$/.test(i.protocol))return null;var s={host:i.hostname,port:Number(i.port),auth:i.auth,rejectUnauthorized:"boolean"!=typeof t.strictSSL||t.strictSSL,protocol:i.protocol};return"http:"===n.protocol?d(s):f(s)}(e.url,{proxyUrl:g,strictSSL:m})),"number"!=typeof e.followRedirects&&(e.followRedirects=5),v(e).then((function(r){return new Promise((function(n,o){var i,s,a=r.res,u=a,d=!1,f=a.headers&&a.headers["content-encoding"];if(f&&(i=e.type,s=r.res.statusCode,!("HEAD"===i||s>=100&&s<200||204===s||304===s))){var p={flush:l.constants.Z_SYNC_FLUSH,finishFlush:l.constants.Z_SYNC_FLUSH};if("gzip"===f){var g=l.createGunzip(p);a.pipe(g),u=g}else if("deflate"===f){var m=l.createInflate(p);a.pipe(m),u=m}}var v=[];u.on("data",(function(e){return v.push(e)})),u.on("end",(function(){if(!d){if(d=!0,e.followRedirects>0&&(a.statusCode>=300&&a.statusCode<=303||307===a.statusCode)){var r=a.headers.location;if(r.startsWith("/")){var i=(0,c.parse)(e.url);r=(0,c.format)({protocol:i.protocol,hostname:i.hostname,port:i.port,pathname:r})}if(r){var s={type:e.type,url:r,user:e.user,password:e.password,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data,token:e.token};return void(0,t.xhr)(s).then(n,o)}}var u=Buffer.concat(v),l={responseText:u.toString(),body:u,status:a.statusCode,headers:a.headers||{}};a.statusCode>=200&&a.statusCode<300||1223===a.statusCode?n(l):o(l)}})),u.on("error",(function(t){var r;r=y.is(t)?t:{responseText:h("error","Unable to access {0}. Error: {1}",e.url,t.message),body:Buffer.concat(v),status:500,headers:{}},d=!0,o(r)})),e.token&&(e.token.isCancellationRequested&&u.destroy(new y),e.token.onCancellationRequested((function(){u.destroy(new y)})))}))}),(function(t){var r;return r=y.is(t)?t:{responseText:e.agent?h("error.cannot.connect.proxy","Unable to connect to {0} through a proxy. Error: {1}",e.url,t.message):h("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,t.message),body:Buffer.concat([]),status:404,headers:{}},Promise.reject(r)}))},t.getErrorStatusDescription=function(e){if(!(e<400))switch(e){case 400:return h("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return h("status.401","Unauthorized. The server is refusing to respond.");case 403:return h("status.403","Forbidden. The server is refusing to respond.");case 404:return h("status.404","Not Found. The requested location could not be found.");case 405:return h("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return h("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return h("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return h("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return h("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return h("status.410","Gone. The requested page is no longer available.");case 411:return h("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return h("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return h("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return h("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return h("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return h("status.500","Internal Server Error.");case 501:return h("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 h("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return h("status.416","HTTP status code {0}",e)}};var y=function(e){function t(){var r=e.call(this,"The user aborted a request")||this;return r.name="AbortError",Object.setPrototypeOf(r,t.prototype),r}return o(t,e),t.is=function(e){return e instanceof t},t}(Error)},800:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var n,o,i,s=r(926);function a(e){return void 0!==e}function c(e,r){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===r.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var n=t[0],o=r[n],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",(n||(n={})).is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)},t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return c(t,r)},t.loadMessageBundle=function(e){return(0,s.default)().loadMessageBundle(e)},t.config=function(e){return(0,s.default)().config(e)}},926:(e,t)=>{var r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),(n||(n={})).install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e},t.default=n},472:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.BundleFormat=t.MessageFormat=void 0;var n=r(17),o=r(147),i=r(926),s=r(800),a=r(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object String]"===l.call(e)}function f(e){return JSON.parse(o.readFileSync(e,"utf8"))}function p(e){return function(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return function(e){return"[object Number]"===l.call(e)}(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,s.format)(e[t],n):d(r)?(console.warn("Message ".concat(r," didn't get externalized correctly.")),(0,s.format)(r,n)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function h(e,t){return c[e]=t,t}function g(e){try{return function(e){var t=f(n.join(e,"nls.metadata.json")),r=Object.create(null);for(var o in t){var i=t[o];r[o]=i.messages}return r}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function m(e){if(!e)return s.localize;var t=n.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var r=function(e){for(var t,r=n.dirname(e);t=n.join(r,"nls.metadata.header.json"),!o.existsSync(t);){var i=n.dirname(r);if(i===r){t=void 0;break}r=i}return t}(e);if(r){var i=n.dirname(r),a=c[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(r,"utf8"));try{var m=function(e,t){var r;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{r=function(e,t){var r,i,s,a=n.join(u.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),c=!1,l=!1;try{return r=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),r}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle ".concat(a," failed."))})),c=!0}}if(!(r=function(e,t){var r=u.translationsConfig[e.id];if(r){var o=f(r).contents,i=f(n.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=o["".concat(e.outDir,"/").concat(a)];if(l){for(var p=[],h=0;h<c.keys.length;h++){var g=c.keys[h],m=l[d(g)?g:g.key];void 0===m&&(m=c.messages[h]),p.push(m)}s[a]=p}else s[a]=c.messages}return s}}(e,t))||c)return r;if(l)try{o.writeFileSync(a,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return r;throw e}return r}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!r){if(u.languagePackSupport)return g(t);var i=function(e){for(var t=u.language;t;){var r=n.join(e,"nls.bundle.".concat(t,".json"));if(o.existsSync(r))return r;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(r=n.join(e,"nls.bundle.json"),o.existsSync(r)))return r}(t);if(i)try{return f(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}r=g(t)}return r}(l,i);a=h(i,m?{header:l,nlsBundle:m}:null)}catch(e){console.error("Failed to load nls bundle",e),a=h(i,null)}}catch(e){console.error("Failed to read header file",e),a=h(i,null)}if(a){var v=e.substr(i.length+1).replace(/\\/g,"/"),y=a.nlsBundle[v];return void 0===y?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):p(y)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var b=f(function(e){var t;if(u.cacheLanguageResolution&&t);else{if(s.isPseudo||!u.language)t=".nls.json";else for(var r=u.language;r;){var n=".nls."+r+".json";if(o.existsSync(e+n)){t=n;break}var i=r.lastIndexOf("-");i>0?r=r.substring(0,i):(t=".nls.json",r=null)}u.cacheLanguageResolution}return e+t}(e));return Array.isArray(b)?p(b):(0,s.isDefined)(b.messages)&&(0,s.isDefined)(b.keys)?p(b.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}function v(e){return e&&(d(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),(0,s.setPseudo)("pseudo"===u.locale),m}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var r=e.availableLanguages["*"];d(r)&&(t=r)}if(d(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),(!0===(a=e._languagePackSupport)||!1===a)&&(u.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(u.languagePackId=e._languagePackId),d(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=f(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=n.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(a){}var a;(0,s.setPseudo)("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=m,t.config=v,i.default.install(Object.freeze({loadMessageBundle:m,config:v}))},374:(e,t)=>{function r(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r}},491:e=>{e.exports=r(2613)},361:e=>{e.exports=r(4434)},147:e=>{e.exports=r(9896)},685:e=>{e.exports=r(8611)},687:e=>{e.exports=r(5692)},808:e=>{e.exports=r(9278)},17:e=>{e.exports=r(6928)},404:e=>{e.exports=r(4756)},310:e=>{e.exports=r(7016)},796:e=>{e.exports=r(3106)}},n={},o=function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return t[r].call(i.exports,i,i.exports,e),i.exports}(539),i=e;for(var s in o)i[s]=o[s];o.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()}},function(){return o||(0,n[c(n)[0]])((o={exports:{}}).exports,o),o.exports}),p={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(p,{config:()=>y,t:()=>b}),e.exports=(e=>d(s({},"__esModule",{value:!0}),e))(p);var h,g=r(9896),m=r(1943),v=((e,t,r)=>(r=null!=e?i(u(e)):{},d(e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)))(f());function y(e){if("contents"in e)h="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const r=(t=e.fsPath,(0,g.readFileSync)(t,"utf8")),n=JSON.parse(r);h=k(n)?n.contents.bundle:n}else{var t;if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,r)=>{const n=async function(e){if("file:"===e.protocol)return await(0,m.readFile)(e,"utf8");if("http:"===e.protocol||"https:"===e.protocol)try{const t=await(0,v.xhr)({url:e.toString(),followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"}});return(new TextDecoder).decode(t.body)}catch(e){throw new Error(e.responseText??(0,v.getErrorStatusDescription)(e.status)??e.toString())}throw new Error("Unsupported protocol")}(t).then((e=>{try{const t=JSON.parse(e);h=k(t)?t.contents.bundle:t}catch(e){r(e)}})).catch((e=>{r(e)}));e(n)}))}}}function b(...e){const t=e[0];let r,n,o;if("string"==typeof t?(r=t,n=t,e.splice(0,1),o=e&&"object"==typeof e[0]?e[0]:e):(n=t.message,r=n,t.comment&&t.comment.length>0&&(r+=`/${Array.isArray(t.comment)?t.comment.join():t.comment}`),o=t.args??{}),!h)return w(n,o);const i=h[r];return i?"string"==typeof i?w(i,o):i.comment?w(i.message,o):w(n,o):w(n,o)}var D=/{([^}]+)}/g;function w(e,t){return e.replace(D,((e,r)=>t[r]??e))}function k(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},1264:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},3762:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var o=n(r(1264)),i=/[-[\]{}()*+?.,\\^$|#\s]/g;function s(e){return e.replace(i,"\\$&")}var a=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function c(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&a.has(e.name)}t.attributeRules={equals:function(e,t,r){var n=r.adapter,o=t.name,i=t.value;return c(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,o);return null!=r&&r.length===i.length&&r.toLowerCase()===i&&e(t)}):function(t){return n.getAttributeValue(t,o)===i&&e(t)}},hyphen:function(e,t,r){var n=r.adapter,o=t.name,i=t.value,s=i.length;return c(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,o);return null!=r&&(r.length===s||"-"===r.charAt(s))&&r.substr(0,s).toLowerCase()===i&&e(t)}):function(t){var r=n.getAttributeValue(t,o);return null!=r&&(r.length===s||"-"===r.charAt(s))&&r.substr(0,s)===i&&e(t)}},element:function(e,t,r){var n=r.adapter,i=t.name,a=t.value;if(/\s/.test(a))return o.default.falseFunc;var u=new RegExp("(?:^|\\s)".concat(s(a),"(?:$|\\s)"),c(t,r)?"i":"");return function(t){var r=n.getAttributeValue(t,i);return null!=r&&r.length>=a.length&&u.test(r)&&e(t)}},exists:function(e,t,r){var n=t.name,o=r.adapter;return function(t){return o.hasAttrib(t,n)&&e(t)}},start:function(e,t,r){var n=r.adapter,i=t.name,s=t.value,a=s.length;return 0===a?o.default.falseFunc:c(t,r)?(s=s.toLowerCase(),function(t){var r=n.getAttributeValue(t,i);return null!=r&&r.length>=a&&r.substr(0,a).toLowerCase()===s&&e(t)}):function(t){var r;return!!(null===(r=n.getAttributeValue(t,i))||void 0===r?void 0:r.startsWith(s))&&e(t)}},end:function(e,t,r){var n=r.adapter,i=t.name,s=t.value,a=-s.length;return 0===a?o.default.falseFunc:c(t,r)?(s=s.toLowerCase(),function(t){var r;return(null===(r=n.getAttributeValue(t,i))||void 0===r?void 0:r.substr(a).toLowerCase())===s&&e(t)}):function(t){var r;return!!(null===(r=n.getAttributeValue(t,i))||void 0===r?void 0:r.endsWith(s))&&e(t)}},any:function(e,t,r){var n=r.adapter,i=t.name,a=t.value;if(""===a)return o.default.falseFunc;if(c(t,r)){var u=new RegExp(s(a),"i");return function(t){var r=n.getAttributeValue(t,i);return null!=r&&r.length>=a.length&&u.test(r)&&e(t)}}return function(t){var r;return!!(null===(r=n.getAttributeValue(t,i))||void 0===r?void 0:r.includes(a))&&e(t)}},not:function(e,t,r){var n=r.adapter,o=t.name,i=t.value;return""===i?function(t){return!!n.getAttributeValue(t,o)&&e(t)}:c(t,r)?(i=i.toLowerCase(),function(t){var r=n.getAttributeValue(t,o);return(null==r||r.length!==i.length||r.toLowerCase()!==i)&&e(t)}):function(t){return n.getAttributeValue(t,o)!==i&&e(t)}}}},8118:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var a=r(4090),c=s(r(1264)),u=i(r(6491)),l=r(5327),d=r(5234);function f(e,t,r){return v("string"==typeof e?(0,a.parse)(e):e,t,r)}function p(e){return e.type===a.SelectorType.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(p)})))}t.compile=function(e,t,r){var n=f(e,t,r);return(0,d.ensureIsTag)(n,t.adapter)},t.compileUnsafe=f;var h={type:a.SelectorType.Descendant},g={type:"_flexibleDescendant"},m={type:a.SelectorType.Pseudo,name:"scope",data:null};function v(e,t,r){var n;e.forEach(u.default),r=null!==(n=t.context)&&void 0!==n?n:r;var o=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(!1!==t.relativeSelector)!function(e,t,r){for(var n=t.adapter,o=!!(null==r?void 0:r.every((function(e){var t=n.isTag(e)&&n.getParent(e);return e===d.PLACEHOLDER_ELEMENT||t&&n.isTag(t)}))),i=0,s=e;i<s.length;i++){var c=s[i];if(c.length>0&&(0,u.isTraversal)(c[0])&&c[0].type!==a.SelectorType.Descendant);else{if(!o||c.some(p))continue;c.unshift(h)}c.unshift(m)}}(e,t,i);else if(e.some((function(e){return e.length>0&&(0,u.isTraversal)(e[0])})))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");var s=!1,f=e.map((function(e){if(e.length>=2){var r=e[0],n=e[1];r.type!==a.SelectorType.Pseudo||"scope"!==r.name||(o&&n.type===a.SelectorType.Descendant?e[1]=g:n.type!==a.SelectorType.Adjacent&&n.type!==a.SelectorType.Sibling||(s=!0))}return function(e,t,r){var n;return e.reduce((function(e,n){return e===c.default.falseFunc?c.default.falseFunc:(0,l.compileGeneralSelector)(e,n,t,r,v)}),null!==(n=t.rootFunc)&&void 0!==n?n:c.default.trueFunc)}(e,t,i)})).reduce(y,c.default.falseFunc);return f.shouldTestNextSiblings=s,f}function y(e,t){return t===c.default.falseFunc||e===c.default.trueFunc?e:e===c.default.falseFunc||t===c.default.trueFunc?t:function(r){return e(r)||t(r)}}t.compileToken=v},5327:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileGeneralSelector=void 0;var n=r(3762),o=r(8161),i=r(4090);function s(e,t){var r=t.getParent(e);return r&&t.isTag(r)?r:null}t.compileGeneralSelector=function(e,t,r,a,c){var u=r.adapter,l=r.equals;switch(t.type){case i.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case i.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case i.SelectorType.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return r.xmlMode&&!r.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),n.attributeRules[t.action](e,t,r);case i.SelectorType.Pseudo:return(0,o.compilePseudoSelector)(e,t,r,a,c);case i.SelectorType.Tag:if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");var d=t.name;return r.xmlMode&&!r.lowerCaseTags||(d=d.toLowerCase()),function(t){return u.getName(t)===d&&e(t)};case i.SelectorType.Descendant:if(!1===r.cacheResults||"undefined"==typeof WeakSet)return function(t){for(var r=t;r=s(r,u);)if(e(r))return!0;return!1};var f=new WeakSet;return function(t){for(var r=t;r=s(r,u);)if(!f.has(r)){if(u.isTag(r)&&e(r))return!0;f.add(r)}return!1};case"_flexibleDescendant":return function(t){var r=t;do{if(e(r))return!0}while(r=s(r,u));return!1};case i.SelectorType.Parent:return function(t){return u.getChildren(t).some((function(t){return u.isTag(t)&&e(t)}))};case i.SelectorType.Child:return function(t){var r=u.getParent(t);return null!=r&&u.isTag(r)&&e(r)};case i.SelectorType.Sibling:return function(t){for(var r=u.getSiblings(t),n=0;n<r.length;n++){var o=r[n];if(l(t,o))break;if(u.isTag(o)&&e(o))return!0}return!1};case i.SelectorType.Adjacent:return u.prevElementSibling?function(t){var r=u.prevElementSibling(t);return null!=r&&e(r)}:function(t){for(var r,n=u.getSiblings(t),o=0;o<n.length;o++){var i=n[o];if(l(t,i))break;u.isTag(i)&&(r=i)}return!!r&&e(r)};case i.SelectorType.Universal:if(null!=t.namespace&&"*"!==t.namespace)throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}},2603:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=t.pseudos=t.filters=t.is=t.selectOne=t.selectAll=t.prepareContext=t._compileToken=t._compileUnsafe=t.compile=void 0;var a=i(r(8888)),c=s(r(1264)),u=r(8118),l=r(5234),d=function(e,t){return e===t},f={adapter:a,equals:d};function p(e){var t,r,n,o,i=null!=e?e:f;return null!==(t=i.adapter)&&void 0!==t||(i.adapter=a),null!==(r=i.equals)&&void 0!==r||(i.equals=null!==(o=null===(n=i.adapter)||void 0===n?void 0:n.equals)&&void 0!==o?o:d),i}function h(e){return function(t,r,n){var o=p(r);return e(t,o,n)}}function g(e){return function(t,r,n){var o=p(n);"function"!=typeof t&&(t=(0,u.compileUnsafe)(t,o,r));var i=m(r,o.adapter,t.shouldTestNextSiblings);return e(t,i,o)}}function m(e,t,r){return void 0===r&&(r=!1),r&&(e=function(e,t){for(var r=Array.isArray(e)?e.slice(0):[e],n=r.length,o=0;o<n;o++){var i=(0,l.getNextSiblings)(r[o],t);r.push.apply(r,i)}return r}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}t.compile=h(u.compile),t._compileUnsafe=h(u.compileUnsafe),t._compileToken=h(u.compileToken),t.prepareContext=m,t.selectAll=g((function(e,t,r){return e!==c.default.falseFunc&&t&&0!==t.length?r.adapter.findAll(e,t):[]})),t.selectOne=g((function(e,t,r){return e!==c.default.falseFunc&&t&&0!==t.length?r.adapter.findOne(e,t):null})),t.is=function(e,t,r){var n=p(r);return("function"==typeof t?t:(0,u.compile)(t,n))(e)},t.default=t.selectAll;var v=r(8161);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return v.filters}}),Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return v.pseudos}}),Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return v.aliases}})},9433:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=void 0,t.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},6310:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var o=n(r(3172)),i=n(r(1264));function s(e,t){return function(r){var n=t.getParent(r);return null!=n&&t.isTag(n)&&e(r)}}function a(e){return function(t,r,n){var o=n.adapter[e];return"function"!=typeof o?i.default.falseFunc:function(e){return o(e)&&t(e)}}}t.filters={contains:function(e,t,r){var n=r.adapter;return function(r){return e(r)&&n.getText(r).includes(t)}},icontains:function(e,t,r){var n=r.adapter,o=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(o)}},"nth-child":function(e,t,r){var n=r.adapter,a=r.equals,c=(0,o.default)(t);return c===i.default.falseFunc?i.default.falseFunc:c===i.default.trueFunc?s(e,n):function(t){for(var r=n.getSiblings(t),o=0,i=0;i<r.length&&!a(t,r[i]);i++)n.isTag(r[i])&&o++;return c(o)&&e(t)}},"nth-last-child":function(e,t,r){var n=r.adapter,a=r.equals,c=(0,o.default)(t);return c===i.default.falseFunc?i.default.falseFunc:c===i.default.trueFunc?s(e,n):function(t){for(var r=n.getSiblings(t),o=0,i=r.length-1;i>=0&&!a(t,r[i]);i--)n.isTag(r[i])&&o++;return c(o)&&e(t)}},"nth-of-type":function(e,t,r){var n=r.adapter,a=r.equals,c=(0,o.default)(t);return c===i.default.falseFunc?i.default.falseFunc:c===i.default.trueFunc?s(e,n):function(t){for(var r=n.getSiblings(t),o=0,i=0;i<r.length;i++){var s=r[i];if(a(t,s))break;n.isTag(s)&&n.getName(s)===n.getName(t)&&o++}return c(o)&&e(t)}},"nth-last-of-type":function(e,t,r){var n=r.adapter,a=r.equals,c=(0,o.default)(t);return c===i.default.falseFunc?i.default.falseFunc:c===i.default.trueFunc?s(e,n):function(t){for(var r=n.getSiblings(t),o=0,i=r.length-1;i>=0;i--){var s=r[i];if(a(t,s))break;n.isTag(s)&&n.getName(s)===n.getName(t)&&o++}return c(o)&&e(t)}},root:function(e,t,r){var n=r.adapter;return function(t){var r=n.getParent(t);return(null==r||!n.isTag(r))&&e(t)}},scope:function(e,r,n,o){var i=n.equals;return o&&0!==o.length?1===o.length?function(t){return i(o[0],t)&&e(t)}:function(t){return o.includes(t)&&e(t)}:t.filters.root(e,r,n)},hover:a("isHovered"),visited:a("isVisited"),active:a("isActive")}},8161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilePseudoSelector=t.aliases=t.pseudos=t.filters=void 0;var n=r(4090),o=r(6310);Object.defineProperty(t,"filters",{enumerable:!0,get:function(){return o.filters}});var i=r(682);Object.defineProperty(t,"pseudos",{enumerable:!0,get:function(){return i.pseudos}});var s=r(9433);Object.defineProperty(t,"aliases",{enumerable:!0,get:function(){return s.aliases}});var a=r(5234);t.compilePseudoSelector=function(e,t,r,c,u){var l,d=t.name,f=t.data;if(Array.isArray(f)){if(!(d in a.subselects))throw new Error("Unknown pseudo-class :".concat(d,"(").concat(f,")"));return a.subselects[d](e,f,r,c,u)}var p=null===(l=r.pseudos)||void 0===l?void 0:l[d],h="string"==typeof p?p:s.aliases[d];if("string"==typeof h){if(null!=f)throw new Error("Pseudo ".concat(d," doesn't have any arguments"));var g=(0,n.parse)(h);return a.subselects.is(e,g,r,c,u)}if("function"==typeof p)return(0,i.verifyPseudoArgs)(p,d,f,1),function(t){return p(t,f)&&e(t)};if(d in o.filters)return o.filters[d](e,f,r,c);if(d in i.pseudos){var m=i.pseudos[d];return(0,i.verifyPseudoArgs)(m,d,f,2),function(t){return m(t,r,f)&&e(t)}}throw new Error("Unknown pseudo-class :".concat(d))}},682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPseudoArgs=t.pseudos=void 0,t.pseudos={empty:function(e,t){var r=t.adapter;return!r.getChildren(e).some((function(e){return r.isTag(e)||""!==r.getText(e)}))},"first-child":function(e,t){var r=t.adapter,n=t.equals;if(r.prevElementSibling)return null==r.prevElementSibling(e);var o=r.getSiblings(e).find((function(e){return r.isTag(e)}));return null!=o&&n(e,o)},"last-child":function(e,t){for(var r=t.adapter,n=t.equals,o=r.getSiblings(e),i=o.length-1;i>=0;i--){if(n(e,o[i]))return!0;if(r.isTag(o[i]))break}return!1},"first-of-type":function(e,t){for(var r=t.adapter,n=t.equals,o=r.getSiblings(e),i=r.getName(e),s=0;s<o.length;s++){var a=o[s];if(n(e,a))return!0;if(r.isTag(a)&&r.getName(a)===i)break}return!1},"last-of-type":function(e,t){for(var r=t.adapter,n=t.equals,o=r.getSiblings(e),i=r.getName(e),s=o.length-1;s>=0;s--){var a=o[s];if(n(e,a))return!0;if(r.isTag(a)&&r.getName(a)===i)break}return!1},"only-of-type":function(e,t){var r=t.adapter,n=t.equals,o=r.getName(e);return r.getSiblings(e).every((function(t){return n(e,t)||!r.isTag(t)||r.getName(t)!==o}))},"only-child":function(e,t){var r=t.adapter,n=t.equals;return r.getSiblings(e).every((function(t){return n(e,t)||!r.isTag(t)}))}},t.verifyPseudoArgs=function(e,t,r,n){if(null===r){if(e.length>n)throw new Error("Pseudo-class :".concat(t," requires an argument"))}else if(e.length===n)throw new Error("Pseudo-class :".concat(t," doesn't have any arguments"))}},5234:function(e,t,r){"use strict";var n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.subselects=t.getNextSiblings=t.ensureIsTag=t.PLACEHOLDER_ELEMENT=void 0;var i=o(r(1264)),s=r(6491);function a(e,t){return e===i.default.falseFunc?i.default.falseFunc:function(r){return t.isTag(r)&&e(r)}}function c(e,t){var r=t.getSiblings(e);if(r.length<=1)return[];var n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function u(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}t.PLACEHOLDER_ELEMENT={},t.ensureIsTag=a,t.getNextSiblings=c;var l=function(e,t,r,n,o){var s=o(t,u(r),n);return s===i.default.trueFunc?e:s===i.default.falseFunc?i.default.falseFunc:function(t){return s(t)&&e(t)}};t.subselects={is:l,matches:l,where:l,not:function(e,t,r,n,o){var s=o(t,u(r),n);return s===i.default.falseFunc?e:s===i.default.trueFunc?i.default.falseFunc:function(t){return!s(t)&&e(t)}},has:function(e,r,o,l,d){var f=o.adapter,p=u(o);p.relativeSelector=!0;var h=r.some((function(e){return e.some(s.isTraversal)}))?[t.PLACEHOLDER_ELEMENT]:void 0,g=d(r,p,h);if(g===i.default.falseFunc)return i.default.falseFunc;var m=a(g,f);if(h&&g!==i.default.trueFunc){var v=g.shouldTestNextSiblings,y=void 0!==v&&v;return function(t){if(!e(t))return!1;h[0]=t;var r=f.getChildren(t),o=y?n(n([],r,!0),c(t,f),!0):r;return f.existsOne(m,o)}}return function(t){return e(t)&&f.existsOne(m,f.getChildren(t))}}}},6491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTraversal=void 0;var n=r(4090),o=new Map([[n.SelectorType.Universal,50],[n.SelectorType.Tag,30],[n.SelectorType.Attribute,1],[n.SelectorType.Pseudo,0]]);t.isTraversal=function(e){return!o.has(e.type)};var i=new Map([[n.AttributeAction.Exists,10],[n.AttributeAction.Equals,8],[n.AttributeAction.Not,7],[n.AttributeAction.Start,6],[n.AttributeAction.End,6],[n.AttributeAction.Any,5]]);function s(e){var t,r,a=null!==(t=o.get(e.type))&&void 0!==t?t:-1;return e.type===n.SelectorType.Attribute?(a=null!==(r=i.get(e.action))&&void 0!==r?r:4,e.action===n.AttributeAction.Equals&&"id"===e.name&&(a=9),e.ignoreCase&&(a>>=1)):e.type===n.SelectorType.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?a=0:Array.isArray(e.data)?(a=Math.min.apply(Math,e.data.map((function(e){return Math.min.apply(Math,e.map(s))}))))<0&&(a=0):a=2:a=3),a}t.default=function(e){for(var t=e.map(s),r=1;r<e.length;r++){var n=t[r];if(!(n<0))for(var o=r-1;o>=0&&n<t[o];o--){var i=e[o+1];e[o+1]=e[o],e[o]=i,t[o+1]=t[o],t[o]=n}}}},4090:(e,t,r)=>{"use strict";var n;r.r(t),r.d(t,{AttributeAction:()=>i,IgnoreCaseMode:()=>o,SelectorType:()=>n,isTraversal:()=>l,parse:()=>m,stringify:()=>C}),function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(n||(n={}));const o={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var i;!function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(i||(i={}));const s=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,a=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,c=new Map([[126,i.Element],[94,i.Start],[36,i.End],[42,i.Any],[33,i.Not],[124,i.Hyphen]]),u=new Set(["has","not","matches","is","where","host","host-context"]);function l(e){switch(e.type){case n.Adjacent:case n.Child:case n.Descendant:case n.Parent:case n.Sibling:case n.ColumnCombinator:return!0;default:return!1}}const d=new Set(["contains","icontains"]);function f(e,t,r){const n=parseInt(t,16)-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function p(e){return e.replace(a,f)}function h(e){return 39===e||34===e}function g(e){return 32===e||9===e||10===e||12===e||13===e}function m(e){const t=[],r=v(t,`${e}`,0);if(r<e.length)throw new Error(`Unmatched selector: ${e.slice(r)}`);return t}function v(e,t,r){let o=[];function a(e){const n=t.slice(r+e).match(s);if(!n)throw new Error(`Expected name, found ${t.slice(r)}`);const[o]=n;return r+=e+o.length,p(o)}function f(e){for(r+=e;r<t.length&&g(t.charCodeAt(r));)r++}function m(){const e=r+=1;let n=1;for(;n>0&&r<t.length;r++)40!==t.charCodeAt(r)||y(r)?41!==t.charCodeAt(r)||y(r)||n--:n++;if(n)throw new Error("Parenthesis not matched");return p(t.slice(e,r-1))}function y(e){let r=0;for(;92===t.charCodeAt(--e);)r++;return!(1&~r)}function b(){if(o.length>0&&l(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function D(e){o.length>0&&o[o.length-1].type===n.Descendant?o[o.length-1].type=e:(b(),o.push({type:e}))}function w(e,t){o.push({type:n.Attribute,name:e,action:t,value:a(1),namespace:null,ignoreCase:"quirks"})}function k(){if(o.length&&o[o.length-1].type===n.Descendant&&o.pop(),0===o.length)throw new Error("Empty sub-selector");e.push(o)}if(f(0),t.length===r)return r;e:for(;r<t.length;){const e=t.charCodeAt(r);switch(e){case 32:case 9:case 10:case 12:case 13:0!==o.length&&o[0].type===n.Descendant||(b(),o.push({type:n.Descendant})),f(1);break;case 62:D(n.Child),f(1);break;case 60:D(n.Parent),f(1);break;case 126:D(n.Sibling),f(1);break;case 43:D(n.Adjacent),f(1);break;case 46:w("class",i.Element);break;case 35:w("id",i.Equals);break;case 91:{let e;f(1);let s=null;124===t.charCodeAt(r)?e=a(1):t.startsWith("*|",r)?(s="*",e=a(2)):(e=a(0),124===t.charCodeAt(r)&&61!==t.charCodeAt(r+1)&&(s=e,e=a(1))),f(0);let u=i.Exists;const l=c.get(t.charCodeAt(r));if(l){if(u=l,61!==t.charCodeAt(r+1))throw new Error("Expected `=`");f(2)}else 61===t.charCodeAt(r)&&(u=i.Equals,f(1));let d="",m=null;if("exists"!==u){if(h(t.charCodeAt(r))){const e=t.charCodeAt(r);let n=r+1;for(;n<t.length&&(t.charCodeAt(n)!==e||y(n));)n+=1;if(t.charCodeAt(n)!==e)throw new Error("Attribute value didn't end");d=p(t.slice(r+1,n)),r=n+1}else{const e=r;for(;r<t.length&&(!g(t.charCodeAt(r))&&93!==t.charCodeAt(r)||y(r));)r+=1;d=p(t.slice(e,r))}f(0);const e=32|t.charCodeAt(r);115===e?(m=!1,f(1)):105===e&&(m=!0,f(1))}if(93!==t.charCodeAt(r))throw new Error("Attribute selector didn't terminate");r+=1;const v={